Skip to content

AuraClient

Thin client for the Strangeworks Aura public /api/v1 surface.

Authenticates with a company API key (sk-aura-…). chat delivers a turn live over the project WebSocket (key on the upgrade header) and reconciles the final message via /chat/sync; when the socket can’t be held open it degrades to dispatch + poll.

new AuraClient(options): AuraClient;
Parameter Type
options AuraClientOptions

AuraClient

cancel(projectId, conversationId?): Promise<boolean>;

Stop a running turn, scoped to conversationId when given and to the whole project otherwise. Returns whether anything was cancelled.

Parameter Type
projectId string
conversationId? string

Promise<boolean>


chat(
projectId,
content,
opts?): Promise<{
}>;

Send a message, follow the turn live, and return the reply to this dispatch. onDelta receives assistant text as it is generated and onToolActivity each tool start/completion, streamed over the project WebSocket. The stream is liveness only — the returned message always comes from a final /chat/sync reconcile, and when the socket can’t be opened or dies mid-turn the call silently degrades to a polling wait (see waitForIdleReply): the reply is unaffected, only the live callbacks stop.

The wait is pinned to the conversation the dispatch resolved to, so a concurrent activate or createConversation on the same project cannot make it watch another thread.

Throws AuraTurnTimeoutError on timeout — it carries the pinned conversation id to pass to cancel, and the turn keeps running server-side — and AuraTurnCancelledError when the turn ended partially or opts.signal aborts, carrying whatever partial output was streamed or stored, so a caller that stopped the turn can still show what it produced.

Parameter Type
projectId string
content string
opts ChatTurnOptions

Promise<{ }>


checkDeployment(name): Promise<{
}>;

Run the server-side run contract against a deployment: does it have a solver package under run/ and a dataset under data/?

Parameter Type
name string

Promise<{ }>

ok, plus missing and warnings naming what a project created from this deployment would fail on.


checkout(
projectId,
source,
conversationId?): Promise<{
}>;

Point the project’s workspace at source, which the server dispatches on segment count: one segment is a snapshot id or a tag name, two is a <group>/<name> deployment handle, three is a <group>/<project>/<name> in-project snapshot tag.

Parameter Type
projectId string
source string
conversationId? string

Promise<{ }>


createConversation(projectId, title?): Promise<{
}>;

Start a new conversation in a project.

Parameter Type Description
projectId string -
title? string Optional label; the server names it if omitted.

Promise<{ }>


createDeployment(name): Promise<{
}>;

Create an empty deployment. Upload its files with deployFromFolder or uploadFile against a { source: "deployment", deploymentName } container, then confirm it with checkDeployment.

Parameter Type Description
name string Deployment name — lowercase letters, digits and hyphens.

Promise<{ }>


createProject(input): Promise<{
}>;

Create a project, optionally seeded from a published deployment. A project seeded from a deployment lands directly in run mode, so the run agent is usable on it immediately.

Parameter Type Description
input { description?: string; fromDeployment?: string; name: string; shortDescription?: string; } -
input.description? string -
input.fromDeployment? string A deployment handle, “/”. The wire field is from.
input.name string -
input.shortDescription? string -

Promise<{ }>

AuraApiError when the deployment handle is unknown or fails its run contract.


deleteConversation(projectId, conversationId): Promise<void>;

Delete one conversation and its messages. The project is untouched.

Parameter Type
projectId string
conversationId string

Promise<void>


deleteDeployment(name): Promise<{
}>;

Delete a deployment: its files are purged and its name is freed for reuse.

Irreversible — there is no undelete, and a new deployment claiming the same name starts empty. Projects already seeded from this deployment keep their own copy of the workspace and are not touched; the returned seeded_project_count reports how many there were.

Requires an admin, which every API key satisfies.

Parameter Type
name string

Promise<{ }>

AuraApiError with status 404 when no such deployment exists.


deleteFile(container, path): Promise<{
}>;

Remove one file from a container. Not recursive — pass a file path, not a directory.

Parameter Type
container FileContainer
path string

Promise<{ }>


deleteProject(projectId): Promise<void>;

Delete a project and everything in it — conversations, executions, snapshots and the workspace. Not recoverable.

Parameter Type
projectId string

Promise<void>


getAgentStatus(projectId): Promise<{
}>;

Whether a turn is in flight, without inferring it from /chat/sync.

Parameter Type
projectId string

Promise<{ }>


getConversationState(projectId, conversationId?): Promise<{
}>;

An atomic snapshot of a conversation: the messages the server has stored, plus whether a turn is in flight.

Parameter Type Description
projectId string -
conversationId? string Defaults to the project’s active conversation at the time of the call, so pass it explicitly when polling a specific thread.

Promise<{ }>


getDeployment(name): Promise<{
}>;

One deployment by name.

Parameter Type
name string

Promise<{ }>

AuraApiError with status 404 when no such deployment exists.


getExecution(projectId, executionId): Promise<{
}>;

One solve execution by id.

Parameter Type
projectId string
executionId string

Promise<{ }>


getProject(projectId): Promise<{
}>;

One project in full.

Parameter Type
projectId string

Promise<{ }>

AuraApiError with status 404 when no such project exists.


getSnapshot(projectId, ref): Promise<{
}>;

One snapshot, including its files — which the list response omits.

Parameter Type Description
projectId string -
ref string A snapshot id or a tag name defined in this project.

Promise<{ }>


listConversations(projectId): Promise<object[]>;

A project’s conversations, newest first. Reads all pages.

Parameter Type
projectId string

Promise<object[]>


listDeployments(): Promise<object[]>;

Every deployment in your company, newest first. Reads all pages.

Promise<object[]>


listExecutions(projectId): Promise<object[]>;

Solve executions for the project, most recent first — the run the agent triggered.

Parameter Type
projectId string

Promise<object[]>


listFiles(container, pathPrefix?): Promise<object[]>;

The files currently in a container. Reads all pages.

Parameter Type Description
container FileContainer -
pathPrefix? string Restrict to one subtree, e.g. "run/output/".

Promise<object[]>


listProjects(): Promise<object[]>;

Every project in your company, as summaries rather than full projects. Reads all pages.

Promise<object[]>


listSnapshots(projectId): Promise<object[]>;

A project’s snapshots, newest first, so index 0 is the most recent. Reads all pages.

Parameter Type
projectId string

Promise<object[]>


listTags(projectId): Promise<object[]>;

A project’s snapshot tags. Reads all pages.

Parameter Type
projectId string

Promise<object[]>


readFile(container, path): Promise<{
}>;

Read one file. text is set for text files, base64 for binary.

Parameter Type
container FileContainer
path string

Promise<{ }>


sendMessage(projectId, input): Promise<{
}>;

Dispatch a message without waiting for the agent’s reply — chat is the one-await version. Use this when you want to drive the polling yourself with getConversationState.

Parameter Type
projectId string
input object & SendChatOptions

Promise<{ }>

The dispatch result, including the stored user message and its sequence — which is what identifies the reply to this message.


setTag(
projectId,
name,
snapshotId): Promise<{
}>;

Point a tag at a snapshot, creating it or moving an existing one. Idempotent.

Parameter Type Description
projectId string -
name string The tag name, e.g. "best-known".
snapshotId string -

Promise<{ }>


uploadFile(
container,
path,
body,
contentType): Promise<{
}>;

Upload one file via the unified files API: plan → PUT the bytes to the plan URL → complete. The byte PUT targets the plan URL directly (presigned on R2, a tokenized backend URL in dev) with only the plan’s headers — never the API key.

Parameter Type
container FileContainer
path string
body string | Uint8Array<ArrayBufferLike>
contentType string

Promise<{ }>