@arbidocs/sdk 0.4.3 → 0.4.5
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/dist/{browser-4VHbRx1J.d.cts → browser-5spRium9.d.cts} +195 -6
- package/dist/{browser-4VHbRx1J.d.ts → browser-5spRium9.d.ts} +195 -6
- package/dist/browser.cjs +141 -10
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.d.cts +1 -1
- package/dist/browser.d.ts +1 -1
- package/dist/browser.js +141 -10
- package/dist/browser.js.map +1 -1
- package/dist/index.cjs +133 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +18 -3
- package/dist/index.d.ts +18 -3
- package/dist/index.js +133 -10
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -841,6 +841,8 @@ interface UploadOptions {
|
|
|
841
841
|
* ``wp_type='skill'`` AND in a ``skills/<slug>`` folder so the
|
|
842
842
|
* backend's ``SkillManager`` recognises them. */
|
|
843
843
|
wpType?: 'source' | 'skill' | 'memory' | 'artifact' | 'webpage';
|
|
844
|
+
/** Save the upload as a new immutable version of this document (`parent_ext_id` lineage). */
|
|
845
|
+
parentExtId?: string;
|
|
844
846
|
}
|
|
845
847
|
interface SkippedFile {
|
|
846
848
|
file_name: string;
|
|
@@ -1881,6 +1883,7 @@ declare namespace files {
|
|
|
1881
1883
|
type TaskResponse = components['schemas']['TaskResponse'];
|
|
1882
1884
|
type CreateTaskRequest = components['schemas']['CreateTaskRequest'];
|
|
1883
1885
|
type UpdateTaskRequest = components['schemas']['UpdateTaskRequest'];
|
|
1886
|
+
type TaskRunResponse = components['schemas']['TaskRunResponse'];
|
|
1884
1887
|
/** List the caller's scheduled tasks (newest first). */
|
|
1885
1888
|
declare function listTasks(arbi: ArbiClient): Promise<TaskResponse[]>;
|
|
1886
1889
|
/** Create a scheduled task. `name` is required; supply trigger + action fields. */
|
|
@@ -1891,18 +1894,22 @@ declare function updateTask(arbi: ArbiClient, taskId: string, body: UpdateTaskRe
|
|
|
1891
1894
|
declare function deleteTask(arbi: ArbiClient, taskId: string): Promise<void>;
|
|
1892
1895
|
/** Fire a task immediately without advancing its schedule. */
|
|
1893
1896
|
declare function runTask(arbi: ArbiClient, taskId: string): Promise<TaskResponse>;
|
|
1897
|
+
/** A task's run history, newest first. Each run links to its conversation. */
|
|
1898
|
+
declare function listTaskRuns(arbi: ArbiClient, taskId: string): Promise<TaskRunResponse[]>;
|
|
1894
1899
|
|
|
1895
1900
|
type tasks_CreateTaskRequest = CreateTaskRequest;
|
|
1896
1901
|
type tasks_TaskResponse = TaskResponse;
|
|
1902
|
+
type tasks_TaskRunResponse = TaskRunResponse;
|
|
1897
1903
|
type tasks_UpdateTaskRequest = UpdateTaskRequest;
|
|
1898
1904
|
declare const tasks_createTask: typeof createTask;
|
|
1899
1905
|
declare const tasks_deleteTask: typeof deleteTask;
|
|
1900
1906
|
declare const tasks_getTask: typeof getTask;
|
|
1907
|
+
declare const tasks_listTaskRuns: typeof listTaskRuns;
|
|
1901
1908
|
declare const tasks_listTasks: typeof listTasks;
|
|
1902
1909
|
declare const tasks_runTask: typeof runTask;
|
|
1903
1910
|
declare const tasks_updateTask: typeof updateTask;
|
|
1904
1911
|
declare namespace tasks {
|
|
1905
|
-
export { type tasks_CreateTaskRequest as CreateTaskRequest, type tasks_TaskResponse as TaskResponse, type tasks_UpdateTaskRequest as UpdateTaskRequest, tasks_createTask as createTask, tasks_deleteTask as deleteTask, tasks_getTask as getTask, tasks_listTasks as listTasks, tasks_runTask as runTask, tasks_updateTask as updateTask };
|
|
1912
|
+
export { type tasks_CreateTaskRequest as CreateTaskRequest, type tasks_TaskResponse as TaskResponse, type tasks_TaskRunResponse as TaskRunResponse, type tasks_UpdateTaskRequest as UpdateTaskRequest, tasks_createTask as createTask, tasks_deleteTask as deleteTask, tasks_getTask as getTask, tasks_listTaskRuns as listTaskRuns, tasks_listTasks as listTasks, tasks_runTask as runTask, tasks_updateTask as updateTask };
|
|
1906
1913
|
}
|
|
1907
1914
|
|
|
1908
1915
|
/**
|
|
@@ -2068,6 +2075,8 @@ declare class Arbi {
|
|
|
2068
2075
|
* Useful for session recovery without re-entering the password.
|
|
2069
2076
|
*/
|
|
2070
2077
|
loginWithKey(email: string, signingPrivateKeyBase64: string): Promise<void>;
|
|
2078
|
+
/** A workspace's key, sealed to the caller's own session (what `/open` and `POST /workspace/users` take). */
|
|
2079
|
+
private sealWorkspaceKey;
|
|
2071
2080
|
/**
|
|
2072
2081
|
* Select a workspace by ID. Fetches the workspace list, finds the matching
|
|
2073
2082
|
* workspace, decrypts the wrapped key, and sets up auth headers.
|
|
@@ -2418,6 +2427,63 @@ declare class Arbi {
|
|
|
2418
2427
|
agent_ext_id?: string | null | undefined;
|
|
2419
2428
|
is_temporary: boolean;
|
|
2420
2429
|
}[]>;
|
|
2430
|
+
/**
|
|
2431
|
+
* Grant users a temporary key scoped to ONE session (identified by its public key), for
|
|
2432
|
+
* example an agent's run session minted by `agents.authorize()`. Nothing standing is created:
|
|
2433
|
+
* the grant expires with that session. Works for any workspace the caller holds a key for;
|
|
2434
|
+
* it does not need to be the open one.
|
|
2435
|
+
*/
|
|
2436
|
+
grantTemporaryAccess: (params: {
|
|
2437
|
+
workspaceId: string;
|
|
2438
|
+
emails: string[];
|
|
2439
|
+
sessionPubkeyB64: string;
|
|
2440
|
+
role?: "owner" | "collaborator" | "guest";
|
|
2441
|
+
}) => Promise<{
|
|
2442
|
+
user: {
|
|
2443
|
+
external_id: string;
|
|
2444
|
+
parent_ext_id?: string | null | undefined;
|
|
2445
|
+
email: string;
|
|
2446
|
+
given_name: string;
|
|
2447
|
+
family_name?: string | null | undefined;
|
|
2448
|
+
picture?: string | null | undefined;
|
|
2449
|
+
encryption_public_key: string;
|
|
2450
|
+
is_sso: boolean;
|
|
2451
|
+
};
|
|
2452
|
+
role: components["schemas"]["WorkspaceRole"];
|
|
2453
|
+
joined_at: string;
|
|
2454
|
+
conversation_count: number;
|
|
2455
|
+
document_count: number;
|
|
2456
|
+
files_mb: number;
|
|
2457
|
+
agent_ext_id?: string | null | undefined;
|
|
2458
|
+
is_temporary: boolean;
|
|
2459
|
+
}[]>;
|
|
2460
|
+
/**
|
|
2461
|
+
* Add users (standing, permanent membership) to ANY workspace the caller holds a key for,
|
|
2462
|
+
* without opening it. `addUsers` does the same for the currently open workspace.
|
|
2463
|
+
*/
|
|
2464
|
+
grantAccess: (params: {
|
|
2465
|
+
workspaceId: string;
|
|
2466
|
+
emails: string[];
|
|
2467
|
+
role?: "owner" | "collaborator" | "guest";
|
|
2468
|
+
}) => Promise<{
|
|
2469
|
+
user: {
|
|
2470
|
+
external_id: string;
|
|
2471
|
+
parent_ext_id?: string | null | undefined;
|
|
2472
|
+
email: string;
|
|
2473
|
+
given_name: string;
|
|
2474
|
+
family_name?: string | null | undefined;
|
|
2475
|
+
picture?: string | null | undefined;
|
|
2476
|
+
encryption_public_key: string;
|
|
2477
|
+
is_sso: boolean;
|
|
2478
|
+
};
|
|
2479
|
+
role: components["schemas"]["WorkspaceRole"];
|
|
2480
|
+
joined_at: string;
|
|
2481
|
+
conversation_count: number;
|
|
2482
|
+
document_count: number;
|
|
2483
|
+
files_mb: number;
|
|
2484
|
+
agent_ext_id?: string | null | undefined;
|
|
2485
|
+
is_temporary: boolean;
|
|
2486
|
+
}[]>;
|
|
2421
2487
|
removeUsers: (userIds: string[]) => Promise<void>;
|
|
2422
2488
|
setUserRole: (userIds: string[], role: "owner" | "collaborator" | "guest") => Promise<{
|
|
2423
2489
|
user: {
|
|
@@ -2736,9 +2802,7 @@ declare class Arbi {
|
|
|
2736
2802
|
reason: string;
|
|
2737
2803
|
}[] | undefined;
|
|
2738
2804
|
}>;
|
|
2739
|
-
uploadFile: (fileData: Blob, fileName: string, options?:
|
|
2740
|
-
folder?: string;
|
|
2741
|
-
}) => Promise<UploadResult>;
|
|
2805
|
+
uploadFile: (fileData: Blob, fileName: string, options?: UploadOptions) => Promise<UploadResult>;
|
|
2742
2806
|
download: (docId: string) => Promise<Response>;
|
|
2743
2807
|
getParsedContent: (docId: string, stage: string) => Promise<Record<string, unknown>>;
|
|
2744
2808
|
getThumbnails: (docIds: string[]) => Promise<Record<string, string | null>>;
|
|
@@ -3119,6 +3183,22 @@ declare class Arbi {
|
|
|
3119
3183
|
* Respond to an agent's question during a human-in-the-loop workflow.
|
|
3120
3184
|
*/
|
|
3121
3185
|
respond: (assistantMessageExtId: string, answer: string) => Promise<unknown>;
|
|
3186
|
+
/** The skills the caller can run (own + shared marketplace), metadata only. */
|
|
3187
|
+
listSkills: (options?: {
|
|
3188
|
+
includeHidden?: boolean;
|
|
3189
|
+
}) => Promise<{
|
|
3190
|
+
name: string;
|
|
3191
|
+
slug: string;
|
|
3192
|
+
description: string;
|
|
3193
|
+
user_invocable: boolean;
|
|
3194
|
+
arg_hint: string;
|
|
3195
|
+
skill_type: string;
|
|
3196
|
+
workspace_ext_id: string;
|
|
3197
|
+
doc_ext_id: string;
|
|
3198
|
+
updated_at: string;
|
|
3199
|
+
visibility: string;
|
|
3200
|
+
is_owner: boolean;
|
|
3201
|
+
}[]>;
|
|
3122
3202
|
/**
|
|
3123
3203
|
* Search documents without LLM generation (retrieval only).
|
|
3124
3204
|
*/
|
|
@@ -4225,6 +4305,25 @@ declare class Arbi {
|
|
|
4225
4305
|
delete: (agentExtIds: string[]) => Promise<{
|
|
4226
4306
|
[x: string]: unknown;
|
|
4227
4307
|
}>;
|
|
4308
|
+
/** Mint a TTL'd run session for an agent; see `grantTemporaryAccess` to also deposit a key. */
|
|
4309
|
+
authorize: (agentExtId: string, workspaceId: string, ttlSeconds?: number) => Promise<{
|
|
4310
|
+
session_pubkey_b64: string;
|
|
4311
|
+
agent_email: string;
|
|
4312
|
+
ttl: number;
|
|
4313
|
+
}>;
|
|
4314
|
+
authorizeLimits: () => Promise<{
|
|
4315
|
+
default_ttl_seconds: number;
|
|
4316
|
+
max_ttl_seconds: number;
|
|
4317
|
+
}>;
|
|
4318
|
+
/**
|
|
4319
|
+
* Give an agent temporary, session-scoped access to a workspace: mint its run session, then
|
|
4320
|
+
* deposit the workspace key on it. Returns the session details (`ttl` in seconds).
|
|
4321
|
+
*/
|
|
4322
|
+
grantTemporaryAccess: (agentExtId: string, workspaceId: string, ttlSeconds?: number) => Promise<{
|
|
4323
|
+
session_pubkey_b64: string;
|
|
4324
|
+
agent_email: string;
|
|
4325
|
+
ttl: number;
|
|
4326
|
+
}>;
|
|
4228
4327
|
};
|
|
4229
4328
|
readonly tasks: {
|
|
4230
4329
|
list: () => Promise<{
|
|
@@ -4413,6 +4512,56 @@ declare class Arbi {
|
|
|
4413
4512
|
created_at: string;
|
|
4414
4513
|
updated_at: string;
|
|
4415
4514
|
}>;
|
|
4515
|
+
listRuns: (taskId: string) => Promise<{
|
|
4516
|
+
run_id?: string | null;
|
|
4517
|
+
conversation_ext_id?: string | null;
|
|
4518
|
+
status: string;
|
|
4519
|
+
error?: string | null;
|
|
4520
|
+
started_at?: string | null;
|
|
4521
|
+
finished_at?: string | null;
|
|
4522
|
+
}[]>;
|
|
4523
|
+
/**
|
|
4524
|
+
* Run a task and, when the run is parked waiting for workspace access (a temporary
|
|
4525
|
+
* authorization tier), grant the agent's run session a temporary key and run it again.
|
|
4526
|
+
* A task that needs no approval returns from the first call already running.
|
|
4527
|
+
*/
|
|
4528
|
+
runWithAuth: (taskId: string) => Promise<{
|
|
4529
|
+
external_id: string;
|
|
4530
|
+
name: string;
|
|
4531
|
+
trigger_type: string;
|
|
4532
|
+
rrule: string | null;
|
|
4533
|
+
run_at: string | null;
|
|
4534
|
+
timezone: string;
|
|
4535
|
+
event_kind: string | null;
|
|
4536
|
+
action_type: string;
|
|
4537
|
+
prompt: string;
|
|
4538
|
+
skill_ref: string | null;
|
|
4539
|
+
status: string;
|
|
4540
|
+
next_run_at: string | null;
|
|
4541
|
+
last_run_at: string | null;
|
|
4542
|
+
last_error: string | null;
|
|
4543
|
+
in_progress: boolean;
|
|
4544
|
+
active_run_id: string | null;
|
|
4545
|
+
agent_session: string | null;
|
|
4546
|
+
active_response_id?: string | null;
|
|
4547
|
+
active_conversation_ext_id?: string | null;
|
|
4548
|
+
run_started_at: string | null;
|
|
4549
|
+
notify_on_complete: boolean;
|
|
4550
|
+
auth_mode: components["schemas"]["AuthMode"];
|
|
4551
|
+
pending_auth_request_id?: string | null;
|
|
4552
|
+
pending_auth_session_pubkey?: string | null;
|
|
4553
|
+
pending_auth_agent_email?: string | null;
|
|
4554
|
+
created_by_kind: string;
|
|
4555
|
+
workspace_ext_id?: string | null;
|
|
4556
|
+
agent_ext_id?: string | null;
|
|
4557
|
+
task_plan?: components["schemas"]["TaskPlan"] | null;
|
|
4558
|
+
is_goal_task: boolean;
|
|
4559
|
+
goal_state?: {
|
|
4560
|
+
[key: string]: unknown;
|
|
4561
|
+
} | null;
|
|
4562
|
+
created_at: string;
|
|
4563
|
+
updated_at: string;
|
|
4564
|
+
}>;
|
|
4416
4565
|
};
|
|
4417
4566
|
readonly facts: {
|
|
4418
4567
|
create: (body: CreateFactRequest) => Promise<{
|
|
@@ -4686,7 +4835,46 @@ declare function listWorkspaceUsers(arbi: ArbiClient): Promise<{
|
|
|
4686
4835
|
agent_ext_id?: string | null | undefined;
|
|
4687
4836
|
is_temporary: boolean;
|
|
4688
4837
|
}[]>;
|
|
4689
|
-
declare function addWorkspaceUsers(arbi: ArbiClient, emails: string[], role?: 'owner' | 'collaborator' | 'guest'
|
|
4838
|
+
declare function addWorkspaceUsers(arbi: ArbiClient, emails: string[], role?: 'owner' | 'collaborator' | 'guest',
|
|
4839
|
+
/** Share a workspace other than the open one: its id and its key sealed to the caller's session. */
|
|
4840
|
+
target?: {
|
|
4841
|
+
workspaceExtId: string;
|
|
4842
|
+
workspaceKey: string;
|
|
4843
|
+
}): Promise<{
|
|
4844
|
+
user: {
|
|
4845
|
+
external_id: string;
|
|
4846
|
+
parent_ext_id?: string | null | undefined;
|
|
4847
|
+
email: string;
|
|
4848
|
+
given_name: string;
|
|
4849
|
+
family_name?: string | null | undefined;
|
|
4850
|
+
picture?: string | null | undefined;
|
|
4851
|
+
encryption_public_key: string;
|
|
4852
|
+
is_sso: boolean;
|
|
4853
|
+
};
|
|
4854
|
+
role: components["schemas"]["WorkspaceRole"];
|
|
4855
|
+
joined_at: string;
|
|
4856
|
+
conversation_count: number;
|
|
4857
|
+
document_count: number;
|
|
4858
|
+
files_mb: number;
|
|
4859
|
+
agent_ext_id?: string | null | undefined;
|
|
4860
|
+
is_temporary: boolean;
|
|
4861
|
+
}[]>;
|
|
4862
|
+
/**
|
|
4863
|
+
* Grant users a TEMPORARY, session-scoped workspace key (`session_pubkey_b64` path of
|
|
4864
|
+
* `POST /v1/workspace/users`). The key is deposited onto the recipient's session (typically an
|
|
4865
|
+
* agent run session) and the membership row expires with it; no standing membership is created.
|
|
4866
|
+
*
|
|
4867
|
+
* `workspaceKey` is the workspace key sealed to the CALLER's own session (what `/open` takes), so
|
|
4868
|
+
* the workspace need not be the open one. Use `Arbi.workspaces.grantTemporaryAccess()` to have the
|
|
4869
|
+
* key derived for you.
|
|
4870
|
+
*/
|
|
4871
|
+
declare function grantTemporaryWorkspaceAccess(arbi: ArbiClient, params: {
|
|
4872
|
+
emails: string[];
|
|
4873
|
+
workspaceExtId: string;
|
|
4874
|
+
workspaceKey: string;
|
|
4875
|
+
sessionPubkeyB64: string;
|
|
4876
|
+
role?: 'owner' | 'collaborator' | 'guest';
|
|
4877
|
+
}): Promise<{
|
|
4690
4878
|
user: {
|
|
4691
4879
|
external_id: string;
|
|
4692
4880
|
parent_ext_id?: string | null | undefined;
|
|
@@ -4746,13 +4934,14 @@ declare const workspaces_addWorkspaceUsers: typeof addWorkspaceUsers;
|
|
|
4746
4934
|
declare const workspaces_copyDocuments: typeof copyDocuments;
|
|
4747
4935
|
declare const workspaces_createWorkspace: typeof createWorkspace;
|
|
4748
4936
|
declare const workspaces_deleteWorkspaces: typeof deleteWorkspaces;
|
|
4937
|
+
declare const workspaces_grantTemporaryWorkspaceAccess: typeof grantTemporaryWorkspaceAccess;
|
|
4749
4938
|
declare const workspaces_listWorkspaceUsers: typeof listWorkspaceUsers;
|
|
4750
4939
|
declare const workspaces_listWorkspaces: typeof listWorkspaces;
|
|
4751
4940
|
declare const workspaces_removeWorkspaceUsers: typeof removeWorkspaceUsers;
|
|
4752
4941
|
declare const workspaces_setUserRole: typeof setUserRole;
|
|
4753
4942
|
declare const workspaces_updateWorkspace: typeof updateWorkspace;
|
|
4754
4943
|
declare namespace workspaces {
|
|
4755
|
-
export { workspaces_addWorkspaceUsers as addWorkspaceUsers, workspaces_copyDocuments as copyDocuments, workspaces_createWorkspace as createWorkspace, workspaces_deleteWorkspaces as deleteWorkspaces, workspaces_listWorkspaceUsers as listWorkspaceUsers, workspaces_listWorkspaces as listWorkspaces, workspaces_removeWorkspaceUsers as removeWorkspaceUsers, workspaces_setUserRole as setUserRole, workspaces_updateWorkspace as updateWorkspace };
|
|
4944
|
+
export { workspaces_addWorkspaceUsers as addWorkspaceUsers, workspaces_copyDocuments as copyDocuments, workspaces_createWorkspace as createWorkspace, workspaces_deleteWorkspaces as deleteWorkspaces, workspaces_grantTemporaryWorkspaceAccess as grantTemporaryWorkspaceAccess, workspaces_listWorkspaceUsers as listWorkspaceUsers, workspaces_listWorkspaces as listWorkspaces, workspaces_removeWorkspaceUsers as removeWorkspaceUsers, workspaces_setUserRole as setUserRole, workspaces_updateWorkspace as updateWorkspace };
|
|
4756
4945
|
}
|
|
4757
4946
|
|
|
4758
4947
|
/**
|
|
@@ -841,6 +841,8 @@ interface UploadOptions {
|
|
|
841
841
|
* ``wp_type='skill'`` AND in a ``skills/<slug>`` folder so the
|
|
842
842
|
* backend's ``SkillManager`` recognises them. */
|
|
843
843
|
wpType?: 'source' | 'skill' | 'memory' | 'artifact' | 'webpage';
|
|
844
|
+
/** Save the upload as a new immutable version of this document (`parent_ext_id` lineage). */
|
|
845
|
+
parentExtId?: string;
|
|
844
846
|
}
|
|
845
847
|
interface SkippedFile {
|
|
846
848
|
file_name: string;
|
|
@@ -1881,6 +1883,7 @@ declare namespace files {
|
|
|
1881
1883
|
type TaskResponse = components['schemas']['TaskResponse'];
|
|
1882
1884
|
type CreateTaskRequest = components['schemas']['CreateTaskRequest'];
|
|
1883
1885
|
type UpdateTaskRequest = components['schemas']['UpdateTaskRequest'];
|
|
1886
|
+
type TaskRunResponse = components['schemas']['TaskRunResponse'];
|
|
1884
1887
|
/** List the caller's scheduled tasks (newest first). */
|
|
1885
1888
|
declare function listTasks(arbi: ArbiClient): Promise<TaskResponse[]>;
|
|
1886
1889
|
/** Create a scheduled task. `name` is required; supply trigger + action fields. */
|
|
@@ -1891,18 +1894,22 @@ declare function updateTask(arbi: ArbiClient, taskId: string, body: UpdateTaskRe
|
|
|
1891
1894
|
declare function deleteTask(arbi: ArbiClient, taskId: string): Promise<void>;
|
|
1892
1895
|
/** Fire a task immediately without advancing its schedule. */
|
|
1893
1896
|
declare function runTask(arbi: ArbiClient, taskId: string): Promise<TaskResponse>;
|
|
1897
|
+
/** A task's run history, newest first. Each run links to its conversation. */
|
|
1898
|
+
declare function listTaskRuns(arbi: ArbiClient, taskId: string): Promise<TaskRunResponse[]>;
|
|
1894
1899
|
|
|
1895
1900
|
type tasks_CreateTaskRequest = CreateTaskRequest;
|
|
1896
1901
|
type tasks_TaskResponse = TaskResponse;
|
|
1902
|
+
type tasks_TaskRunResponse = TaskRunResponse;
|
|
1897
1903
|
type tasks_UpdateTaskRequest = UpdateTaskRequest;
|
|
1898
1904
|
declare const tasks_createTask: typeof createTask;
|
|
1899
1905
|
declare const tasks_deleteTask: typeof deleteTask;
|
|
1900
1906
|
declare const tasks_getTask: typeof getTask;
|
|
1907
|
+
declare const tasks_listTaskRuns: typeof listTaskRuns;
|
|
1901
1908
|
declare const tasks_listTasks: typeof listTasks;
|
|
1902
1909
|
declare const tasks_runTask: typeof runTask;
|
|
1903
1910
|
declare const tasks_updateTask: typeof updateTask;
|
|
1904
1911
|
declare namespace tasks {
|
|
1905
|
-
export { type tasks_CreateTaskRequest as CreateTaskRequest, type tasks_TaskResponse as TaskResponse, type tasks_UpdateTaskRequest as UpdateTaskRequest, tasks_createTask as createTask, tasks_deleteTask as deleteTask, tasks_getTask as getTask, tasks_listTasks as listTasks, tasks_runTask as runTask, tasks_updateTask as updateTask };
|
|
1912
|
+
export { type tasks_CreateTaskRequest as CreateTaskRequest, type tasks_TaskResponse as TaskResponse, type tasks_TaskRunResponse as TaskRunResponse, type tasks_UpdateTaskRequest as UpdateTaskRequest, tasks_createTask as createTask, tasks_deleteTask as deleteTask, tasks_getTask as getTask, tasks_listTaskRuns as listTaskRuns, tasks_listTasks as listTasks, tasks_runTask as runTask, tasks_updateTask as updateTask };
|
|
1906
1913
|
}
|
|
1907
1914
|
|
|
1908
1915
|
/**
|
|
@@ -2068,6 +2075,8 @@ declare class Arbi {
|
|
|
2068
2075
|
* Useful for session recovery without re-entering the password.
|
|
2069
2076
|
*/
|
|
2070
2077
|
loginWithKey(email: string, signingPrivateKeyBase64: string): Promise<void>;
|
|
2078
|
+
/** A workspace's key, sealed to the caller's own session (what `/open` and `POST /workspace/users` take). */
|
|
2079
|
+
private sealWorkspaceKey;
|
|
2071
2080
|
/**
|
|
2072
2081
|
* Select a workspace by ID. Fetches the workspace list, finds the matching
|
|
2073
2082
|
* workspace, decrypts the wrapped key, and sets up auth headers.
|
|
@@ -2418,6 +2427,63 @@ declare class Arbi {
|
|
|
2418
2427
|
agent_ext_id?: string | null | undefined;
|
|
2419
2428
|
is_temporary: boolean;
|
|
2420
2429
|
}[]>;
|
|
2430
|
+
/**
|
|
2431
|
+
* Grant users a temporary key scoped to ONE session (identified by its public key), for
|
|
2432
|
+
* example an agent's run session minted by `agents.authorize()`. Nothing standing is created:
|
|
2433
|
+
* the grant expires with that session. Works for any workspace the caller holds a key for;
|
|
2434
|
+
* it does not need to be the open one.
|
|
2435
|
+
*/
|
|
2436
|
+
grantTemporaryAccess: (params: {
|
|
2437
|
+
workspaceId: string;
|
|
2438
|
+
emails: string[];
|
|
2439
|
+
sessionPubkeyB64: string;
|
|
2440
|
+
role?: "owner" | "collaborator" | "guest";
|
|
2441
|
+
}) => Promise<{
|
|
2442
|
+
user: {
|
|
2443
|
+
external_id: string;
|
|
2444
|
+
parent_ext_id?: string | null | undefined;
|
|
2445
|
+
email: string;
|
|
2446
|
+
given_name: string;
|
|
2447
|
+
family_name?: string | null | undefined;
|
|
2448
|
+
picture?: string | null | undefined;
|
|
2449
|
+
encryption_public_key: string;
|
|
2450
|
+
is_sso: boolean;
|
|
2451
|
+
};
|
|
2452
|
+
role: components["schemas"]["WorkspaceRole"];
|
|
2453
|
+
joined_at: string;
|
|
2454
|
+
conversation_count: number;
|
|
2455
|
+
document_count: number;
|
|
2456
|
+
files_mb: number;
|
|
2457
|
+
agent_ext_id?: string | null | undefined;
|
|
2458
|
+
is_temporary: boolean;
|
|
2459
|
+
}[]>;
|
|
2460
|
+
/**
|
|
2461
|
+
* Add users (standing, permanent membership) to ANY workspace the caller holds a key for,
|
|
2462
|
+
* without opening it. `addUsers` does the same for the currently open workspace.
|
|
2463
|
+
*/
|
|
2464
|
+
grantAccess: (params: {
|
|
2465
|
+
workspaceId: string;
|
|
2466
|
+
emails: string[];
|
|
2467
|
+
role?: "owner" | "collaborator" | "guest";
|
|
2468
|
+
}) => Promise<{
|
|
2469
|
+
user: {
|
|
2470
|
+
external_id: string;
|
|
2471
|
+
parent_ext_id?: string | null | undefined;
|
|
2472
|
+
email: string;
|
|
2473
|
+
given_name: string;
|
|
2474
|
+
family_name?: string | null | undefined;
|
|
2475
|
+
picture?: string | null | undefined;
|
|
2476
|
+
encryption_public_key: string;
|
|
2477
|
+
is_sso: boolean;
|
|
2478
|
+
};
|
|
2479
|
+
role: components["schemas"]["WorkspaceRole"];
|
|
2480
|
+
joined_at: string;
|
|
2481
|
+
conversation_count: number;
|
|
2482
|
+
document_count: number;
|
|
2483
|
+
files_mb: number;
|
|
2484
|
+
agent_ext_id?: string | null | undefined;
|
|
2485
|
+
is_temporary: boolean;
|
|
2486
|
+
}[]>;
|
|
2421
2487
|
removeUsers: (userIds: string[]) => Promise<void>;
|
|
2422
2488
|
setUserRole: (userIds: string[], role: "owner" | "collaborator" | "guest") => Promise<{
|
|
2423
2489
|
user: {
|
|
@@ -2736,9 +2802,7 @@ declare class Arbi {
|
|
|
2736
2802
|
reason: string;
|
|
2737
2803
|
}[] | undefined;
|
|
2738
2804
|
}>;
|
|
2739
|
-
uploadFile: (fileData: Blob, fileName: string, options?:
|
|
2740
|
-
folder?: string;
|
|
2741
|
-
}) => Promise<UploadResult>;
|
|
2805
|
+
uploadFile: (fileData: Blob, fileName: string, options?: UploadOptions) => Promise<UploadResult>;
|
|
2742
2806
|
download: (docId: string) => Promise<Response>;
|
|
2743
2807
|
getParsedContent: (docId: string, stage: string) => Promise<Record<string, unknown>>;
|
|
2744
2808
|
getThumbnails: (docIds: string[]) => Promise<Record<string, string | null>>;
|
|
@@ -3119,6 +3183,22 @@ declare class Arbi {
|
|
|
3119
3183
|
* Respond to an agent's question during a human-in-the-loop workflow.
|
|
3120
3184
|
*/
|
|
3121
3185
|
respond: (assistantMessageExtId: string, answer: string) => Promise<unknown>;
|
|
3186
|
+
/** The skills the caller can run (own + shared marketplace), metadata only. */
|
|
3187
|
+
listSkills: (options?: {
|
|
3188
|
+
includeHidden?: boolean;
|
|
3189
|
+
}) => Promise<{
|
|
3190
|
+
name: string;
|
|
3191
|
+
slug: string;
|
|
3192
|
+
description: string;
|
|
3193
|
+
user_invocable: boolean;
|
|
3194
|
+
arg_hint: string;
|
|
3195
|
+
skill_type: string;
|
|
3196
|
+
workspace_ext_id: string;
|
|
3197
|
+
doc_ext_id: string;
|
|
3198
|
+
updated_at: string;
|
|
3199
|
+
visibility: string;
|
|
3200
|
+
is_owner: boolean;
|
|
3201
|
+
}[]>;
|
|
3122
3202
|
/**
|
|
3123
3203
|
* Search documents without LLM generation (retrieval only).
|
|
3124
3204
|
*/
|
|
@@ -4225,6 +4305,25 @@ declare class Arbi {
|
|
|
4225
4305
|
delete: (agentExtIds: string[]) => Promise<{
|
|
4226
4306
|
[x: string]: unknown;
|
|
4227
4307
|
}>;
|
|
4308
|
+
/** Mint a TTL'd run session for an agent; see `grantTemporaryAccess` to also deposit a key. */
|
|
4309
|
+
authorize: (agentExtId: string, workspaceId: string, ttlSeconds?: number) => Promise<{
|
|
4310
|
+
session_pubkey_b64: string;
|
|
4311
|
+
agent_email: string;
|
|
4312
|
+
ttl: number;
|
|
4313
|
+
}>;
|
|
4314
|
+
authorizeLimits: () => Promise<{
|
|
4315
|
+
default_ttl_seconds: number;
|
|
4316
|
+
max_ttl_seconds: number;
|
|
4317
|
+
}>;
|
|
4318
|
+
/**
|
|
4319
|
+
* Give an agent temporary, session-scoped access to a workspace: mint its run session, then
|
|
4320
|
+
* deposit the workspace key on it. Returns the session details (`ttl` in seconds).
|
|
4321
|
+
*/
|
|
4322
|
+
grantTemporaryAccess: (agentExtId: string, workspaceId: string, ttlSeconds?: number) => Promise<{
|
|
4323
|
+
session_pubkey_b64: string;
|
|
4324
|
+
agent_email: string;
|
|
4325
|
+
ttl: number;
|
|
4326
|
+
}>;
|
|
4228
4327
|
};
|
|
4229
4328
|
readonly tasks: {
|
|
4230
4329
|
list: () => Promise<{
|
|
@@ -4413,6 +4512,56 @@ declare class Arbi {
|
|
|
4413
4512
|
created_at: string;
|
|
4414
4513
|
updated_at: string;
|
|
4415
4514
|
}>;
|
|
4515
|
+
listRuns: (taskId: string) => Promise<{
|
|
4516
|
+
run_id?: string | null;
|
|
4517
|
+
conversation_ext_id?: string | null;
|
|
4518
|
+
status: string;
|
|
4519
|
+
error?: string | null;
|
|
4520
|
+
started_at?: string | null;
|
|
4521
|
+
finished_at?: string | null;
|
|
4522
|
+
}[]>;
|
|
4523
|
+
/**
|
|
4524
|
+
* Run a task and, when the run is parked waiting for workspace access (a temporary
|
|
4525
|
+
* authorization tier), grant the agent's run session a temporary key and run it again.
|
|
4526
|
+
* A task that needs no approval returns from the first call already running.
|
|
4527
|
+
*/
|
|
4528
|
+
runWithAuth: (taskId: string) => Promise<{
|
|
4529
|
+
external_id: string;
|
|
4530
|
+
name: string;
|
|
4531
|
+
trigger_type: string;
|
|
4532
|
+
rrule: string | null;
|
|
4533
|
+
run_at: string | null;
|
|
4534
|
+
timezone: string;
|
|
4535
|
+
event_kind: string | null;
|
|
4536
|
+
action_type: string;
|
|
4537
|
+
prompt: string;
|
|
4538
|
+
skill_ref: string | null;
|
|
4539
|
+
status: string;
|
|
4540
|
+
next_run_at: string | null;
|
|
4541
|
+
last_run_at: string | null;
|
|
4542
|
+
last_error: string | null;
|
|
4543
|
+
in_progress: boolean;
|
|
4544
|
+
active_run_id: string | null;
|
|
4545
|
+
agent_session: string | null;
|
|
4546
|
+
active_response_id?: string | null;
|
|
4547
|
+
active_conversation_ext_id?: string | null;
|
|
4548
|
+
run_started_at: string | null;
|
|
4549
|
+
notify_on_complete: boolean;
|
|
4550
|
+
auth_mode: components["schemas"]["AuthMode"];
|
|
4551
|
+
pending_auth_request_id?: string | null;
|
|
4552
|
+
pending_auth_session_pubkey?: string | null;
|
|
4553
|
+
pending_auth_agent_email?: string | null;
|
|
4554
|
+
created_by_kind: string;
|
|
4555
|
+
workspace_ext_id?: string | null;
|
|
4556
|
+
agent_ext_id?: string | null;
|
|
4557
|
+
task_plan?: components["schemas"]["TaskPlan"] | null;
|
|
4558
|
+
is_goal_task: boolean;
|
|
4559
|
+
goal_state?: {
|
|
4560
|
+
[key: string]: unknown;
|
|
4561
|
+
} | null;
|
|
4562
|
+
created_at: string;
|
|
4563
|
+
updated_at: string;
|
|
4564
|
+
}>;
|
|
4416
4565
|
};
|
|
4417
4566
|
readonly facts: {
|
|
4418
4567
|
create: (body: CreateFactRequest) => Promise<{
|
|
@@ -4686,7 +4835,46 @@ declare function listWorkspaceUsers(arbi: ArbiClient): Promise<{
|
|
|
4686
4835
|
agent_ext_id?: string | null | undefined;
|
|
4687
4836
|
is_temporary: boolean;
|
|
4688
4837
|
}[]>;
|
|
4689
|
-
declare function addWorkspaceUsers(arbi: ArbiClient, emails: string[], role?: 'owner' | 'collaborator' | 'guest'
|
|
4838
|
+
declare function addWorkspaceUsers(arbi: ArbiClient, emails: string[], role?: 'owner' | 'collaborator' | 'guest',
|
|
4839
|
+
/** Share a workspace other than the open one: its id and its key sealed to the caller's session. */
|
|
4840
|
+
target?: {
|
|
4841
|
+
workspaceExtId: string;
|
|
4842
|
+
workspaceKey: string;
|
|
4843
|
+
}): Promise<{
|
|
4844
|
+
user: {
|
|
4845
|
+
external_id: string;
|
|
4846
|
+
parent_ext_id?: string | null | undefined;
|
|
4847
|
+
email: string;
|
|
4848
|
+
given_name: string;
|
|
4849
|
+
family_name?: string | null | undefined;
|
|
4850
|
+
picture?: string | null | undefined;
|
|
4851
|
+
encryption_public_key: string;
|
|
4852
|
+
is_sso: boolean;
|
|
4853
|
+
};
|
|
4854
|
+
role: components["schemas"]["WorkspaceRole"];
|
|
4855
|
+
joined_at: string;
|
|
4856
|
+
conversation_count: number;
|
|
4857
|
+
document_count: number;
|
|
4858
|
+
files_mb: number;
|
|
4859
|
+
agent_ext_id?: string | null | undefined;
|
|
4860
|
+
is_temporary: boolean;
|
|
4861
|
+
}[]>;
|
|
4862
|
+
/**
|
|
4863
|
+
* Grant users a TEMPORARY, session-scoped workspace key (`session_pubkey_b64` path of
|
|
4864
|
+
* `POST /v1/workspace/users`). The key is deposited onto the recipient's session (typically an
|
|
4865
|
+
* agent run session) and the membership row expires with it; no standing membership is created.
|
|
4866
|
+
*
|
|
4867
|
+
* `workspaceKey` is the workspace key sealed to the CALLER's own session (what `/open` takes), so
|
|
4868
|
+
* the workspace need not be the open one. Use `Arbi.workspaces.grantTemporaryAccess()` to have the
|
|
4869
|
+
* key derived for you.
|
|
4870
|
+
*/
|
|
4871
|
+
declare function grantTemporaryWorkspaceAccess(arbi: ArbiClient, params: {
|
|
4872
|
+
emails: string[];
|
|
4873
|
+
workspaceExtId: string;
|
|
4874
|
+
workspaceKey: string;
|
|
4875
|
+
sessionPubkeyB64: string;
|
|
4876
|
+
role?: 'owner' | 'collaborator' | 'guest';
|
|
4877
|
+
}): Promise<{
|
|
4690
4878
|
user: {
|
|
4691
4879
|
external_id: string;
|
|
4692
4880
|
parent_ext_id?: string | null | undefined;
|
|
@@ -4746,13 +4934,14 @@ declare const workspaces_addWorkspaceUsers: typeof addWorkspaceUsers;
|
|
|
4746
4934
|
declare const workspaces_copyDocuments: typeof copyDocuments;
|
|
4747
4935
|
declare const workspaces_createWorkspace: typeof createWorkspace;
|
|
4748
4936
|
declare const workspaces_deleteWorkspaces: typeof deleteWorkspaces;
|
|
4937
|
+
declare const workspaces_grantTemporaryWorkspaceAccess: typeof grantTemporaryWorkspaceAccess;
|
|
4749
4938
|
declare const workspaces_listWorkspaceUsers: typeof listWorkspaceUsers;
|
|
4750
4939
|
declare const workspaces_listWorkspaces: typeof listWorkspaces;
|
|
4751
4940
|
declare const workspaces_removeWorkspaceUsers: typeof removeWorkspaceUsers;
|
|
4752
4941
|
declare const workspaces_setUserRole: typeof setUserRole;
|
|
4753
4942
|
declare const workspaces_updateWorkspace: typeof updateWorkspace;
|
|
4754
4943
|
declare namespace workspaces {
|
|
4755
|
-
export { workspaces_addWorkspaceUsers as addWorkspaceUsers, workspaces_copyDocuments as copyDocuments, workspaces_createWorkspace as createWorkspace, workspaces_deleteWorkspaces as deleteWorkspaces, workspaces_listWorkspaceUsers as listWorkspaceUsers, workspaces_listWorkspaces as listWorkspaces, workspaces_removeWorkspaceUsers as removeWorkspaceUsers, workspaces_setUserRole as setUserRole, workspaces_updateWorkspace as updateWorkspace };
|
|
4944
|
+
export { workspaces_addWorkspaceUsers as addWorkspaceUsers, workspaces_copyDocuments as copyDocuments, workspaces_createWorkspace as createWorkspace, workspaces_deleteWorkspaces as deleteWorkspaces, workspaces_grantTemporaryWorkspaceAccess as grantTemporaryWorkspaceAccess, workspaces_listWorkspaceUsers as listWorkspaceUsers, workspaces_listWorkspaces as listWorkspaces, workspaces_removeWorkspaceUsers as removeWorkspaceUsers, workspaces_setUserRole as setUserRole, workspaces_updateWorkspace as updateWorkspace };
|
|
4756
4945
|
}
|
|
4757
4946
|
|
|
4758
4947
|
/**
|