@arbidocs/sdk 0.5.80 → 0.5.82

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -137,6 +137,18 @@ workspace cannot be opened, nothing is sent and the call rejects with
137
137
  `ArbiWorkspaceUnavailableError`. `workspaceConflictOf(error)` reads either 409.
138
138
  `assistant.submit` and `assistant.retrieve` take `workspaceId` the same way.
139
139
 
140
+ ### Which workspace other calls act in
141
+
142
+ Facts (`facts.create`, `createBatch`, `list`, `search`), conversations
143
+ (`conversations.list`, `search`, `createWork`, `plan`), `assistant.listSkills`,
144
+ `files.list` and `files.upload` act in the current workspace, or in the `workspaceId`
145
+ option they are given, which is opened for this session first without becoming current.
146
+ Either way the request names the workspace (`workspace_ext_id`), so a switch while it is
147
+ sent cannot move it. A note, a task or a conversation changed by id is changed in its own
148
+ workspace, which the server derives from it. A refusal for the workspace (409
149
+ `workspace_key_required`, or `workspace_mismatch` for a sub-task whose parent is in
150
+ another workspace) is an `ArbiApiError` with that `code`, saying nothing was saved.
151
+
140
152
  ## Session recovery
141
153
 
142
154
  Browsers persist the signing key encrypted in IndexedDB. Without IndexedDB, each SDK client keeps its own key in memory; it is not shared with other instances or saved to disk. Recover a session without a password:
@@ -2922,8 +2922,11 @@ type AssistantMode = components['schemas']['AssistantMode'];
2922
2922
  type ConversationSearchRequest = components['schemas']['ConversationSearchRequest'];
2923
2923
  type ConversationSearchResponse = components['schemas']['ConversationSearchResponse'];
2924
2924
 
2925
- /** The caller's conversations. A conversation with a `status` is also a task (work item). */
2926
- declare function listConversations(arbi: ArbiClient): Promise<{
2925
+ /**
2926
+ * The caller's conversations in `workspaceExtId` (absent: the session's open workspace). A
2927
+ * conversation with a `status` is also a task (work item).
2928
+ */
2929
+ declare function listConversations(arbi: ArbiClient, workspaceExtId?: string | null): Promise<{
2927
2930
  label_ext_ids?: string[] | undefined;
2928
2931
  external_id: string;
2929
2932
  title: string | null;
@@ -3067,15 +3070,14 @@ declare function listConversations(arbi: ArbiClient): Promise<{
3067
3070
  is_owner: boolean;
3068
3071
  }[]>;
3069
3072
  /**
3070
- * Import a conversation export into the active workspace.
3073
+ * Import a conversation export into `workspaceExtId` (absent: the session's open workspace).
3071
3074
  *
3072
3075
  * Accepts a ChatGPT data export (`conversations.json`), an OpenClaw session log, or a
3073
3076
  * Claude Code transcript (`.jsonl`); `source='auto'` lets the server detect the format.
3074
3077
  * Uses raw multipart fetch (the typed client can't express file uploads), mirroring
3075
- * `files.uploadFile`. The active workspace + cipher are resolved server-side from the
3076
- * session, so no extra header is needed.
3078
+ * `files.uploadFile`.
3077
3079
  */
3078
- declare function importConversations(auth: AuthHeaders, fileData: Blob, fileName: string, source?: string): Promise<ConversationImportResponse>;
3080
+ declare function importConversations(auth: AuthHeaders, fileData: Blob, fileName: string, source?: string, workspaceExtId?: string | null): Promise<ConversationImportResponse>;
3079
3081
  declare function getConversationThreads(arbi: ArbiClient, conversationId: string): Promise<{
3080
3082
  conversation_ext_id: string;
3081
3083
  threads: {
@@ -3284,8 +3286,11 @@ declare function getConversationThreads(arbi: ArbiClient, conversationId: string
3284
3286
  declare function deleteConversation(arbi: ArbiClient, conversationId: string): Promise<{
3285
3287
  detail: string;
3286
3288
  }>;
3287
- /** Keyword + semantic search over the open workspace's past conversation messages, grouped. */
3288
- declare function searchConversations(arbi: ArbiClient, body: ConversationSearchRequest): Promise<ConversationSearchResponse>;
3289
+ /**
3290
+ * Keyword + semantic search over the past conversation messages of `workspaceExtId` (absent: the
3291
+ * session's open workspace), grouped.
3292
+ */
3293
+ declare function searchConversations(arbi: ArbiClient, body: ConversationSearchRequest, workspaceExtId?: string | null): Promise<ConversationSearchResponse>;
3289
3294
  declare function getMessage(arbi: ArbiClient, messageId: string): Promise<{
3290
3295
  role: "user" | "assistant" | "system";
3291
3296
  content: string;
@@ -3969,9 +3974,8 @@ type SkillSummary = components['schemas']['SkillSummaryResponse'];
3969
3974
  * never the SKILL.md body. To read the body, fetch the document via
3970
3975
  * ``getParsedContent(authHeaders, doc_ext_id, 'content')``.
3971
3976
  *
3972
- * Scoped to the workspace the caller has open (the backend uses the
3973
- * session's ``active_workspace``); cross-workspace listing isn't
3974
- * supported because each workspace has its own encryption key.
3977
+ * Without a deployment marketplace the skills are a workspace's: ``workspaceExtId``
3978
+ * (its key must be on the session), else the session's open workspace.
3975
3979
  *
3976
3980
  * @param includeHidden When ``true``, returns skills with
3977
3981
  * ``user-invocable: false`` in their frontmatter. Off by default —
@@ -3980,6 +3984,8 @@ type SkillSummary = components['schemas']['SkillSummaryResponse'];
3980
3984
  */
3981
3985
  declare function listSkills(arbi: ArbiClient, options?: {
3982
3986
  includeHidden?: boolean;
3987
+ /** The workspace whose skills back the list without a marketplace; absent: the open one. */
3988
+ workspaceExtId?: string | null;
3983
3989
  }): Promise<SkillSummary[]>;
3984
3990
  /**
3985
3991
  * Whether a skill is the caller's own and shared with everyone (``global``), so saving it again
@@ -5207,6 +5213,8 @@ interface ListFilesOptions {
5207
5213
  limit?: number;
5208
5214
  order?: string;
5209
5215
  after?: string | null;
5216
+ /** The workspace listed (its key must be on the session); absent: the session's open one. */
5217
+ workspaceExtId?: string | null;
5210
5218
  }
5211
5219
  declare function listFiles(arbi: ArbiClient, options?: ListFilesOptions): Promise<{
5212
5220
  object: string;
@@ -5242,10 +5250,10 @@ declare function deleteFile(arbi: ArbiClient, fileId: string): Promise<{
5242
5250
  deleted: boolean;
5243
5251
  }>;
5244
5252
  /**
5245
- * Upload a file via the OpenAI-compatible Files API.
5246
- * Uses raw fetch for multipart upload.
5253
+ * Upload a file via the OpenAI-compatible Files API into `workspaceExtId` (absent: the session's
5254
+ * open workspace). Uses raw fetch for multipart upload.
5247
5255
  */
5248
- declare function uploadFile(auth: AuthHeaders, fileData: Blob, fileName: string, purpose?: string): Promise<FileObject>;
5256
+ declare function uploadFile(auth: AuthHeaders, fileData: Blob, fileName: string, purpose?: string, workspaceExtId?: string | null): Promise<FileObject>;
5249
5257
  /**
5250
5258
  * Get file content (binary). Returns the raw Response for the caller to handle.
5251
5259
  */
@@ -7404,8 +7412,11 @@ type AuthMode = components['schemas']['src__models__work__AuthMode'];
7404
7412
  * and rename.
7405
7413
  */
7406
7414
  declare function updateConversation(arbi: ArbiClient, conversationId: string, body: UpdateConversationRequest): Promise<ConversationResponse>;
7407
- /** Create a work item. With a `prompt` / `skill_ref` the agent starts at once; otherwise a to-do. */
7408
- declare function createWork(arbi: ArbiClient, body: CreateWorkRequest): Promise<ConversationResponse>;
7415
+ /**
7416
+ * Create a work item in `workspaceExtId` (absent: the session's open workspace). With a `prompt` /
7417
+ * `skill_ref` the agent starts at once; otherwise a to-do. A parent must be in the same workspace.
7418
+ */
7419
+ declare function createWork(arbi: ArbiClient, body: CreateWorkRequest, workspaceExtId?: string | null): Promise<ConversationResponse>;
7409
7420
  /** Run a work item now (or retry). Not while a run is live. */
7410
7421
  declare function runConversation(arbi: ArbiClient, conversationId: string): Promise<ConversationResponse>;
7411
7422
  /** What an unattended run waits on (agent email + session public key); 404 when nothing waits. */
@@ -7440,8 +7451,11 @@ declare function getConversationUsage(arbi: ArbiClient, conversationId: string):
7440
7451
  declare function notifyConversation(arbi: ArbiClient, conversationId: string, userIds: string[]): Promise<string[]>;
7441
7452
  /** The task's history, oldest first: created, run started, handed off, sent back, done and so on. */
7442
7453
  declare function getActivity(arbi: ArbiClient, conversationId: string): Promise<ActivityResponse[]>;
7443
- /** Draft an editable plan (goal and acceptance checklist) from a plain objective. */
7444
- declare function planWork(arbi: ArbiClient, body: PlanWorkRequest): Promise<TaskPlan>;
7454
+ /**
7455
+ * Draft an editable plan (goal and acceptance checklist) from a plain objective, for a task in
7456
+ * `workspaceExtId` (absent: the session's open workspace).
7457
+ */
7458
+ declare function planWork(arbi: ArbiClient, body: PlanWorkRequest, workspaceExtId?: string | null): Promise<TaskPlan>;
7445
7459
  /** A stepped run as it stands: its conversation, each step's phase, and what it waits for now. */
7446
7460
  interface RunProgress {
7447
7461
  conversation: ConversationResponse;
@@ -7568,8 +7582,9 @@ declare namespace workflows {
7568
7582
  /**
7569
7583
  * Workspace facts — per-workspace encrypted statements with citations.
7570
7584
  * The firm's practice profile / house style / precedent knowhow lives here (`/setup`
7571
- * records it as ordinary facts) and is read by grounded agents. All endpoints
7572
- * require an OPEN workspace.
7585
+ * records it as ordinary facts) and is read by grounded agents. Create, list and search name
7586
+ * their workspace (`workspaceExtId`; its key must be on the session); edit, delete and remind act
7587
+ * in the fact's own workspace, which the server derives from the fact.
7573
7588
  * Backend: `/v1/facts` (src/api/v1/routers/facts.py).
7574
7589
  */
7575
7590
 
@@ -7594,16 +7609,17 @@ interface ListFactsOptions {
7594
7609
  limit?: number;
7595
7610
  /** Notes to skip, for paging with `limit`. */
7596
7611
  offset?: number;
7612
+ /** The workspace listed (its key must be on the session); absent: the session's open one. */
7613
+ workspaceExtId?: string | null;
7597
7614
  }
7598
- /** Create a note. `content` is required; `shared` makes it workspace-wide. */
7599
- declare function createFact(arbi: ArbiClient, body: CreateFactRequest): Promise<FactResponse>;
7615
+ /** Create a note in `workspaceExtId` (absent: the open one). `shared` makes it workspace-wide. */
7616
+ declare function createFact(arbi: ArbiClient, body: CreateFactRequest, workspaceExtId?: string | null): Promise<FactResponse>;
7600
7617
  /**
7601
7618
  * Create several notes in one all-or-nothing request (max 200). Prefer this to a loop of
7602
7619
  * {@link createFact} for an import: tags are resolved once and the notes are indexed in batches.
7603
7620
  * Results come back in request order.
7604
7621
  */
7605
- declare function createFactsBatch(arbi: ArbiClient, body: CreateFactsRequest): Promise<FactResponse[]>;
7606
- /** List the open workspace's notes (newest first). */
7622
+ declare function createFactsBatch(arbi: ArbiClient, body: CreateFactsRequest, workspaceExtId?: string | null): Promise<FactResponse[]>;
7607
7623
  /**
7608
7624
  * List notes. Passing a date range — or `datedOnly` — turns this into the
7609
7625
  * TIMELINE: only dated notes, ordered by when they happened rather than when
@@ -7616,8 +7632,8 @@ declare function createFactsBatch(arbi: ArbiClient, body: CreateFactsRequest): P
7616
7632
  * Narrow with `tagExtIds` / `docExtId` and page with `limit` / `offset`.
7617
7633
  */
7618
7634
  declare function listFacts(arbi: ArbiClient, options?: ListFactsOptions): Promise<FactResponse[]>;
7619
- /** Semantic/keyword/hybrid search across the workspace's notes. */
7620
- declare function searchFacts(arbi: ArbiClient, body: FactSearchRequest): Promise<FactSearchResponse>;
7635
+ /** Semantic/keyword/hybrid search across the notes of `workspaceExtId` (absent: the open one). */
7636
+ declare function searchFacts(arbi: ArbiClient, body: FactSearchRequest, workspaceExtId?: string | null): Promise<FactSearchResponse>;
7621
7637
  declare function updateFact(arbi: ArbiClient, factId: string, body: UpdateFactRequest): Promise<FactResponse>;
7622
7638
  declare function deleteFact(arbi: ArbiClient, factId: string): Promise<void>;
7623
7639
  /**
@@ -11247,7 +11263,10 @@ declare class Arbi {
11247
11263
  getThumbnails: (docIds: string[]) => Promise<Record<string, string | null>>;
11248
11264
  };
11249
11265
  readonly conversations: {
11250
- list: () => Promise<{
11266
+ /** The current workspace's conversations, or `options.workspaceId`'s (opened, not switched to). */
11267
+ list: (options?: {
11268
+ workspaceId?: string;
11269
+ }) => Promise<{
11251
11270
  label_ext_ids?: string[] | undefined;
11252
11271
  external_id: string;
11253
11272
  title: string | null;
@@ -11598,8 +11617,13 @@ declare class Arbi {
11598
11617
  delete: (conversationId: string) => Promise<{
11599
11618
  detail: string;
11600
11619
  }>;
11601
- /** Search the open workspace's past conversation messages (keyword + semantic), grouped. */
11602
- search: (body: ConversationSearchRequest) => Promise<{
11620
+ /**
11621
+ * Search the past conversation messages (keyword + semantic, grouped) of the current
11622
+ * workspace, or `options.workspaceId` (opened for this session, not switched to).
11623
+ */
11624
+ search: (body: ConversationSearchRequest, options?: {
11625
+ workspaceId?: string;
11626
+ }) => Promise<{
11603
11627
  query: string;
11604
11628
  search_mode: string;
11605
11629
  results: components["schemas"]["ConversationSearchGroup"][];
@@ -11655,8 +11679,14 @@ declare class Arbi {
11655
11679
  owner_ext_id?: string | null;
11656
11680
  is_owner: boolean;
11657
11681
  }>;
11658
- /** Create a work item: a plain to-do, or (with a prompt / skill) agent work that starts now. */
11659
- createWork: (body: CreateWorkRequest) => Promise<{
11682
+ /**
11683
+ * Create a work item: a plain to-do, or (with a prompt / skill) agent work that starts now. It
11684
+ * is made in the current workspace, or `options.workspaceId` (opened, not switched to), which
11685
+ * the request names: a switch while it is sent cannot move it.
11686
+ */
11687
+ createWork: (body: CreateWorkRequest, options?: {
11688
+ workspaceId?: string;
11689
+ }) => Promise<{
11660
11690
  label_ext_ids?: string[];
11661
11691
  external_id: string;
11662
11692
  title: string | null;
@@ -11983,8 +12013,10 @@ declare class Arbi {
11983
12013
  }>;
11984
12014
  /** Notify people about a conversation (each gets a notification); resolves with who was. */
11985
12015
  notify: (conversationId: string, userIds: string[]) => Promise<string[]>;
11986
- /** Draft an editable plan from an objective. */
11987
- plan: (body: PlanWorkRequest) => Promise<{
12016
+ /** Draft an editable plan from an objective, in the current workspace or `options.workspaceId`. */
12017
+ plan: (body: PlanWorkRequest, options?: {
12018
+ workspaceId?: string;
12019
+ }) => Promise<{
11988
12020
  goal: string;
11989
12021
  criteria: components["schemas"]["TaskPlanCriterion"][];
11990
12022
  max_passes: number;
@@ -12679,9 +12711,14 @@ declare class Arbi {
12679
12711
  } | null;
12680
12712
  conversation_ext_id?: string | null;
12681
12713
  }>;
12682
- /** The skills the caller can run (own + shared marketplace), metadata only. */
12714
+ /**
12715
+ * The skills the caller can run (own + shared marketplace), metadata only. Without a
12716
+ * marketplace they are the current workspace's, or `options.workspaceId`'s (opened, not
12717
+ * switched to).
12718
+ */
12683
12719
  listSkills: (options?: {
12684
12720
  includeHidden?: boolean;
12721
+ workspaceId?: string;
12685
12722
  }) => Promise<{
12686
12723
  name: string;
12687
12724
  slug: string;
@@ -15270,7 +15307,10 @@ declare class Arbi {
15270
15307
  }>;
15271
15308
  };
15272
15309
  readonly files: {
15273
- list: (options?: ListFilesOptions) => Promise<{
15310
+ /** The current workspace's files, or `options.workspaceId`'s (opened, not switched to). */
15311
+ list: (options?: Omit<ListFilesOptions, "workspaceExtId"> & {
15312
+ workspaceId?: string;
15313
+ }) => Promise<{
15274
15314
  object: string;
15275
15315
  data: {
15276
15316
  id: string;
@@ -15303,7 +15343,10 @@ declare class Arbi {
15303
15343
  object: string;
15304
15344
  deleted: boolean;
15305
15345
  }>;
15306
- upload: (fileData: Blob, fileName: string, purpose?: string) => Promise<{
15346
+ /** Upload a file into the current workspace, or `options.workspaceId` (opened, not switched to). */
15347
+ upload: (fileData: Blob, fileName: string, purpose?: string, options?: {
15348
+ workspaceId?: string;
15349
+ }) => Promise<{
15307
15350
  id: string;
15308
15351
  object: string;
15309
15352
  bytes: number;
@@ -16239,8 +16282,15 @@ declare class Arbi {
16239
16282
  }>;
16240
16283
  export: (databaseId: string, format: "csv" | "xlsx") => Promise<Blob>;
16241
16284
  };
16285
+ /**
16286
+ * Notes. Create, list and search act in the current workspace, or `workspaceId` (opened for this
16287
+ * session, not switched to), which the request names; update, delete and remind act in the
16288
+ * note's own workspace, which the server derives from it.
16289
+ */
16242
16290
  readonly facts: {
16243
- create: (body: CreateFactRequest) => Promise<{
16291
+ create: (body: CreateFactRequest, options?: {
16292
+ workspaceId?: string;
16293
+ }) => Promise<{
16244
16294
  text: string;
16245
16295
  citations?: components["schemas"]["CitationSources"] | null;
16246
16296
  external_id: string;
@@ -16257,7 +16307,9 @@ declare class Arbi {
16257
16307
  updated_at: string;
16258
16308
  }>;
16259
16309
  /** Create up to 200 notes in one all-or-nothing request. */
16260
- createBatch: (body: CreateFactsRequest) => Promise<{
16310
+ createBatch: (body: CreateFactsRequest, options?: {
16311
+ workspaceId?: string;
16312
+ }) => Promise<{
16261
16313
  text: string;
16262
16314
  citations?: components["schemas"]["CitationSources"] | null;
16263
16315
  external_id: string;
@@ -16276,7 +16328,9 @@ declare class Arbi {
16276
16328
  /** Pass `from`/`to`/`datedOnly` for the timeline view — dated notes only,
16277
16329
  * ordered by when they happened. `tagExtIds` / `docExtId` narrow the list;
16278
16330
  * `limit` / `offset` page it. */
16279
- list: (options?: ListFactsOptions) => Promise<{
16331
+ list: (options?: Omit<ListFactsOptions, "workspaceExtId"> & {
16332
+ workspaceId?: string;
16333
+ }) => Promise<{
16280
16334
  text: string;
16281
16335
  citations?: components["schemas"]["CitationSources"] | null;
16282
16336
  external_id: string;
@@ -16292,7 +16346,9 @@ declare class Arbi {
16292
16346
  created_at: string;
16293
16347
  updated_at: string;
16294
16348
  }[]>;
16295
- search: (body: FactSearchRequest) => Promise<{
16349
+ search: (body: FactSearchRequest, options?: {
16350
+ workspaceId?: string;
16351
+ }) => Promise<{
16296
16352
  facts: components["schemas"]["FactSearchHit"][];
16297
16353
  }>;
16298
16354
  update: (factId: string, body: UpdateFactRequest) => Promise<{
@@ -2922,8 +2922,11 @@ type AssistantMode = components['schemas']['AssistantMode'];
2922
2922
  type ConversationSearchRequest = components['schemas']['ConversationSearchRequest'];
2923
2923
  type ConversationSearchResponse = components['schemas']['ConversationSearchResponse'];
2924
2924
 
2925
- /** The caller's conversations. A conversation with a `status` is also a task (work item). */
2926
- declare function listConversations(arbi: ArbiClient): Promise<{
2925
+ /**
2926
+ * The caller's conversations in `workspaceExtId` (absent: the session's open workspace). A
2927
+ * conversation with a `status` is also a task (work item).
2928
+ */
2929
+ declare function listConversations(arbi: ArbiClient, workspaceExtId?: string | null): Promise<{
2927
2930
  label_ext_ids?: string[] | undefined;
2928
2931
  external_id: string;
2929
2932
  title: string | null;
@@ -3067,15 +3070,14 @@ declare function listConversations(arbi: ArbiClient): Promise<{
3067
3070
  is_owner: boolean;
3068
3071
  }[]>;
3069
3072
  /**
3070
- * Import a conversation export into the active workspace.
3073
+ * Import a conversation export into `workspaceExtId` (absent: the session's open workspace).
3071
3074
  *
3072
3075
  * Accepts a ChatGPT data export (`conversations.json`), an OpenClaw session log, or a
3073
3076
  * Claude Code transcript (`.jsonl`); `source='auto'` lets the server detect the format.
3074
3077
  * Uses raw multipart fetch (the typed client can't express file uploads), mirroring
3075
- * `files.uploadFile`. The active workspace + cipher are resolved server-side from the
3076
- * session, so no extra header is needed.
3078
+ * `files.uploadFile`.
3077
3079
  */
3078
- declare function importConversations(auth: AuthHeaders, fileData: Blob, fileName: string, source?: string): Promise<ConversationImportResponse>;
3080
+ declare function importConversations(auth: AuthHeaders, fileData: Blob, fileName: string, source?: string, workspaceExtId?: string | null): Promise<ConversationImportResponse>;
3079
3081
  declare function getConversationThreads(arbi: ArbiClient, conversationId: string): Promise<{
3080
3082
  conversation_ext_id: string;
3081
3083
  threads: {
@@ -3284,8 +3286,11 @@ declare function getConversationThreads(arbi: ArbiClient, conversationId: string
3284
3286
  declare function deleteConversation(arbi: ArbiClient, conversationId: string): Promise<{
3285
3287
  detail: string;
3286
3288
  }>;
3287
- /** Keyword + semantic search over the open workspace's past conversation messages, grouped. */
3288
- declare function searchConversations(arbi: ArbiClient, body: ConversationSearchRequest): Promise<ConversationSearchResponse>;
3289
+ /**
3290
+ * Keyword + semantic search over the past conversation messages of `workspaceExtId` (absent: the
3291
+ * session's open workspace), grouped.
3292
+ */
3293
+ declare function searchConversations(arbi: ArbiClient, body: ConversationSearchRequest, workspaceExtId?: string | null): Promise<ConversationSearchResponse>;
3289
3294
  declare function getMessage(arbi: ArbiClient, messageId: string): Promise<{
3290
3295
  role: "user" | "assistant" | "system";
3291
3296
  content: string;
@@ -3969,9 +3974,8 @@ type SkillSummary = components['schemas']['SkillSummaryResponse'];
3969
3974
  * never the SKILL.md body. To read the body, fetch the document via
3970
3975
  * ``getParsedContent(authHeaders, doc_ext_id, 'content')``.
3971
3976
  *
3972
- * Scoped to the workspace the caller has open (the backend uses the
3973
- * session's ``active_workspace``); cross-workspace listing isn't
3974
- * supported because each workspace has its own encryption key.
3977
+ * Without a deployment marketplace the skills are a workspace's: ``workspaceExtId``
3978
+ * (its key must be on the session), else the session's open workspace.
3975
3979
  *
3976
3980
  * @param includeHidden When ``true``, returns skills with
3977
3981
  * ``user-invocable: false`` in their frontmatter. Off by default —
@@ -3980,6 +3984,8 @@ type SkillSummary = components['schemas']['SkillSummaryResponse'];
3980
3984
  */
3981
3985
  declare function listSkills(arbi: ArbiClient, options?: {
3982
3986
  includeHidden?: boolean;
3987
+ /** The workspace whose skills back the list without a marketplace; absent: the open one. */
3988
+ workspaceExtId?: string | null;
3983
3989
  }): Promise<SkillSummary[]>;
3984
3990
  /**
3985
3991
  * Whether a skill is the caller's own and shared with everyone (``global``), so saving it again
@@ -5207,6 +5213,8 @@ interface ListFilesOptions {
5207
5213
  limit?: number;
5208
5214
  order?: string;
5209
5215
  after?: string | null;
5216
+ /** The workspace listed (its key must be on the session); absent: the session's open one. */
5217
+ workspaceExtId?: string | null;
5210
5218
  }
5211
5219
  declare function listFiles(arbi: ArbiClient, options?: ListFilesOptions): Promise<{
5212
5220
  object: string;
@@ -5242,10 +5250,10 @@ declare function deleteFile(arbi: ArbiClient, fileId: string): Promise<{
5242
5250
  deleted: boolean;
5243
5251
  }>;
5244
5252
  /**
5245
- * Upload a file via the OpenAI-compatible Files API.
5246
- * Uses raw fetch for multipart upload.
5253
+ * Upload a file via the OpenAI-compatible Files API into `workspaceExtId` (absent: the session's
5254
+ * open workspace). Uses raw fetch for multipart upload.
5247
5255
  */
5248
- declare function uploadFile(auth: AuthHeaders, fileData: Blob, fileName: string, purpose?: string): Promise<FileObject>;
5256
+ declare function uploadFile(auth: AuthHeaders, fileData: Blob, fileName: string, purpose?: string, workspaceExtId?: string | null): Promise<FileObject>;
5249
5257
  /**
5250
5258
  * Get file content (binary). Returns the raw Response for the caller to handle.
5251
5259
  */
@@ -7404,8 +7412,11 @@ type AuthMode = components['schemas']['src__models__work__AuthMode'];
7404
7412
  * and rename.
7405
7413
  */
7406
7414
  declare function updateConversation(arbi: ArbiClient, conversationId: string, body: UpdateConversationRequest): Promise<ConversationResponse>;
7407
- /** Create a work item. With a `prompt` / `skill_ref` the agent starts at once; otherwise a to-do. */
7408
- declare function createWork(arbi: ArbiClient, body: CreateWorkRequest): Promise<ConversationResponse>;
7415
+ /**
7416
+ * Create a work item in `workspaceExtId` (absent: the session's open workspace). With a `prompt` /
7417
+ * `skill_ref` the agent starts at once; otherwise a to-do. A parent must be in the same workspace.
7418
+ */
7419
+ declare function createWork(arbi: ArbiClient, body: CreateWorkRequest, workspaceExtId?: string | null): Promise<ConversationResponse>;
7409
7420
  /** Run a work item now (or retry). Not while a run is live. */
7410
7421
  declare function runConversation(arbi: ArbiClient, conversationId: string): Promise<ConversationResponse>;
7411
7422
  /** What an unattended run waits on (agent email + session public key); 404 when nothing waits. */
@@ -7440,8 +7451,11 @@ declare function getConversationUsage(arbi: ArbiClient, conversationId: string):
7440
7451
  declare function notifyConversation(arbi: ArbiClient, conversationId: string, userIds: string[]): Promise<string[]>;
7441
7452
  /** The task's history, oldest first: created, run started, handed off, sent back, done and so on. */
7442
7453
  declare function getActivity(arbi: ArbiClient, conversationId: string): Promise<ActivityResponse[]>;
7443
- /** Draft an editable plan (goal and acceptance checklist) from a plain objective. */
7444
- declare function planWork(arbi: ArbiClient, body: PlanWorkRequest): Promise<TaskPlan>;
7454
+ /**
7455
+ * Draft an editable plan (goal and acceptance checklist) from a plain objective, for a task in
7456
+ * `workspaceExtId` (absent: the session's open workspace).
7457
+ */
7458
+ declare function planWork(arbi: ArbiClient, body: PlanWorkRequest, workspaceExtId?: string | null): Promise<TaskPlan>;
7445
7459
  /** A stepped run as it stands: its conversation, each step's phase, and what it waits for now. */
7446
7460
  interface RunProgress {
7447
7461
  conversation: ConversationResponse;
@@ -7568,8 +7582,9 @@ declare namespace workflows {
7568
7582
  /**
7569
7583
  * Workspace facts — per-workspace encrypted statements with citations.
7570
7584
  * The firm's practice profile / house style / precedent knowhow lives here (`/setup`
7571
- * records it as ordinary facts) and is read by grounded agents. All endpoints
7572
- * require an OPEN workspace.
7585
+ * records it as ordinary facts) and is read by grounded agents. Create, list and search name
7586
+ * their workspace (`workspaceExtId`; its key must be on the session); edit, delete and remind act
7587
+ * in the fact's own workspace, which the server derives from the fact.
7573
7588
  * Backend: `/v1/facts` (src/api/v1/routers/facts.py).
7574
7589
  */
7575
7590
 
@@ -7594,16 +7609,17 @@ interface ListFactsOptions {
7594
7609
  limit?: number;
7595
7610
  /** Notes to skip, for paging with `limit`. */
7596
7611
  offset?: number;
7612
+ /** The workspace listed (its key must be on the session); absent: the session's open one. */
7613
+ workspaceExtId?: string | null;
7597
7614
  }
7598
- /** Create a note. `content` is required; `shared` makes it workspace-wide. */
7599
- declare function createFact(arbi: ArbiClient, body: CreateFactRequest): Promise<FactResponse>;
7615
+ /** Create a note in `workspaceExtId` (absent: the open one). `shared` makes it workspace-wide. */
7616
+ declare function createFact(arbi: ArbiClient, body: CreateFactRequest, workspaceExtId?: string | null): Promise<FactResponse>;
7600
7617
  /**
7601
7618
  * Create several notes in one all-or-nothing request (max 200). Prefer this to a loop of
7602
7619
  * {@link createFact} for an import: tags are resolved once and the notes are indexed in batches.
7603
7620
  * Results come back in request order.
7604
7621
  */
7605
- declare function createFactsBatch(arbi: ArbiClient, body: CreateFactsRequest): Promise<FactResponse[]>;
7606
- /** List the open workspace's notes (newest first). */
7622
+ declare function createFactsBatch(arbi: ArbiClient, body: CreateFactsRequest, workspaceExtId?: string | null): Promise<FactResponse[]>;
7607
7623
  /**
7608
7624
  * List notes. Passing a date range — or `datedOnly` — turns this into the
7609
7625
  * TIMELINE: only dated notes, ordered by when they happened rather than when
@@ -7616,8 +7632,8 @@ declare function createFactsBatch(arbi: ArbiClient, body: CreateFactsRequest): P
7616
7632
  * Narrow with `tagExtIds` / `docExtId` and page with `limit` / `offset`.
7617
7633
  */
7618
7634
  declare function listFacts(arbi: ArbiClient, options?: ListFactsOptions): Promise<FactResponse[]>;
7619
- /** Semantic/keyword/hybrid search across the workspace's notes. */
7620
- declare function searchFacts(arbi: ArbiClient, body: FactSearchRequest): Promise<FactSearchResponse>;
7635
+ /** Semantic/keyword/hybrid search across the notes of `workspaceExtId` (absent: the open one). */
7636
+ declare function searchFacts(arbi: ArbiClient, body: FactSearchRequest, workspaceExtId?: string | null): Promise<FactSearchResponse>;
7621
7637
  declare function updateFact(arbi: ArbiClient, factId: string, body: UpdateFactRequest): Promise<FactResponse>;
7622
7638
  declare function deleteFact(arbi: ArbiClient, factId: string): Promise<void>;
7623
7639
  /**
@@ -11247,7 +11263,10 @@ declare class Arbi {
11247
11263
  getThumbnails: (docIds: string[]) => Promise<Record<string, string | null>>;
11248
11264
  };
11249
11265
  readonly conversations: {
11250
- list: () => Promise<{
11266
+ /** The current workspace's conversations, or `options.workspaceId`'s (opened, not switched to). */
11267
+ list: (options?: {
11268
+ workspaceId?: string;
11269
+ }) => Promise<{
11251
11270
  label_ext_ids?: string[] | undefined;
11252
11271
  external_id: string;
11253
11272
  title: string | null;
@@ -11598,8 +11617,13 @@ declare class Arbi {
11598
11617
  delete: (conversationId: string) => Promise<{
11599
11618
  detail: string;
11600
11619
  }>;
11601
- /** Search the open workspace's past conversation messages (keyword + semantic), grouped. */
11602
- search: (body: ConversationSearchRequest) => Promise<{
11620
+ /**
11621
+ * Search the past conversation messages (keyword + semantic, grouped) of the current
11622
+ * workspace, or `options.workspaceId` (opened for this session, not switched to).
11623
+ */
11624
+ search: (body: ConversationSearchRequest, options?: {
11625
+ workspaceId?: string;
11626
+ }) => Promise<{
11603
11627
  query: string;
11604
11628
  search_mode: string;
11605
11629
  results: components["schemas"]["ConversationSearchGroup"][];
@@ -11655,8 +11679,14 @@ declare class Arbi {
11655
11679
  owner_ext_id?: string | null;
11656
11680
  is_owner: boolean;
11657
11681
  }>;
11658
- /** Create a work item: a plain to-do, or (with a prompt / skill) agent work that starts now. */
11659
- createWork: (body: CreateWorkRequest) => Promise<{
11682
+ /**
11683
+ * Create a work item: a plain to-do, or (with a prompt / skill) agent work that starts now. It
11684
+ * is made in the current workspace, or `options.workspaceId` (opened, not switched to), which
11685
+ * the request names: a switch while it is sent cannot move it.
11686
+ */
11687
+ createWork: (body: CreateWorkRequest, options?: {
11688
+ workspaceId?: string;
11689
+ }) => Promise<{
11660
11690
  label_ext_ids?: string[];
11661
11691
  external_id: string;
11662
11692
  title: string | null;
@@ -11983,8 +12013,10 @@ declare class Arbi {
11983
12013
  }>;
11984
12014
  /** Notify people about a conversation (each gets a notification); resolves with who was. */
11985
12015
  notify: (conversationId: string, userIds: string[]) => Promise<string[]>;
11986
- /** Draft an editable plan from an objective. */
11987
- plan: (body: PlanWorkRequest) => Promise<{
12016
+ /** Draft an editable plan from an objective, in the current workspace or `options.workspaceId`. */
12017
+ plan: (body: PlanWorkRequest, options?: {
12018
+ workspaceId?: string;
12019
+ }) => Promise<{
11988
12020
  goal: string;
11989
12021
  criteria: components["schemas"]["TaskPlanCriterion"][];
11990
12022
  max_passes: number;
@@ -12679,9 +12711,14 @@ declare class Arbi {
12679
12711
  } | null;
12680
12712
  conversation_ext_id?: string | null;
12681
12713
  }>;
12682
- /** The skills the caller can run (own + shared marketplace), metadata only. */
12714
+ /**
12715
+ * The skills the caller can run (own + shared marketplace), metadata only. Without a
12716
+ * marketplace they are the current workspace's, or `options.workspaceId`'s (opened, not
12717
+ * switched to).
12718
+ */
12683
12719
  listSkills: (options?: {
12684
12720
  includeHidden?: boolean;
12721
+ workspaceId?: string;
12685
12722
  }) => Promise<{
12686
12723
  name: string;
12687
12724
  slug: string;
@@ -15270,7 +15307,10 @@ declare class Arbi {
15270
15307
  }>;
15271
15308
  };
15272
15309
  readonly files: {
15273
- list: (options?: ListFilesOptions) => Promise<{
15310
+ /** The current workspace's files, or `options.workspaceId`'s (opened, not switched to). */
15311
+ list: (options?: Omit<ListFilesOptions, "workspaceExtId"> & {
15312
+ workspaceId?: string;
15313
+ }) => Promise<{
15274
15314
  object: string;
15275
15315
  data: {
15276
15316
  id: string;
@@ -15303,7 +15343,10 @@ declare class Arbi {
15303
15343
  object: string;
15304
15344
  deleted: boolean;
15305
15345
  }>;
15306
- upload: (fileData: Blob, fileName: string, purpose?: string) => Promise<{
15346
+ /** Upload a file into the current workspace, or `options.workspaceId` (opened, not switched to). */
15347
+ upload: (fileData: Blob, fileName: string, purpose?: string, options?: {
15348
+ workspaceId?: string;
15349
+ }) => Promise<{
15307
15350
  id: string;
15308
15351
  object: string;
15309
15352
  bytes: number;
@@ -16239,8 +16282,15 @@ declare class Arbi {
16239
16282
  }>;
16240
16283
  export: (databaseId: string, format: "csv" | "xlsx") => Promise<Blob>;
16241
16284
  };
16285
+ /**
16286
+ * Notes. Create, list and search act in the current workspace, or `workspaceId` (opened for this
16287
+ * session, not switched to), which the request names; update, delete and remind act in the
16288
+ * note's own workspace, which the server derives from it.
16289
+ */
16242
16290
  readonly facts: {
16243
- create: (body: CreateFactRequest) => Promise<{
16291
+ create: (body: CreateFactRequest, options?: {
16292
+ workspaceId?: string;
16293
+ }) => Promise<{
16244
16294
  text: string;
16245
16295
  citations?: components["schemas"]["CitationSources"] | null;
16246
16296
  external_id: string;
@@ -16257,7 +16307,9 @@ declare class Arbi {
16257
16307
  updated_at: string;
16258
16308
  }>;
16259
16309
  /** Create up to 200 notes in one all-or-nothing request. */
16260
- createBatch: (body: CreateFactsRequest) => Promise<{
16310
+ createBatch: (body: CreateFactsRequest, options?: {
16311
+ workspaceId?: string;
16312
+ }) => Promise<{
16261
16313
  text: string;
16262
16314
  citations?: components["schemas"]["CitationSources"] | null;
16263
16315
  external_id: string;
@@ -16276,7 +16328,9 @@ declare class Arbi {
16276
16328
  /** Pass `from`/`to`/`datedOnly` for the timeline view — dated notes only,
16277
16329
  * ordered by when they happened. `tagExtIds` / `docExtId` narrow the list;
16278
16330
  * `limit` / `offset` page it. */
16279
- list: (options?: ListFactsOptions) => Promise<{
16331
+ list: (options?: Omit<ListFactsOptions, "workspaceExtId"> & {
16332
+ workspaceId?: string;
16333
+ }) => Promise<{
16280
16334
  text: string;
16281
16335
  citations?: components["schemas"]["CitationSources"] | null;
16282
16336
  external_id: string;
@@ -16292,7 +16346,9 @@ declare class Arbi {
16292
16346
  created_at: string;
16293
16347
  updated_at: string;
16294
16348
  }[]>;
16295
- search: (body: FactSearchRequest) => Promise<{
16349
+ search: (body: FactSearchRequest, options?: {
16350
+ workspaceId?: string;
16351
+ }) => Promise<{
16296
16352
  facts: components["schemas"]["FactSearchHit"][];
16297
16353
  }>;
16298
16354
  update: (factId: string, body: UpdateFactRequest) => Promise<{