@arbidocs/sdk 0.4.3 → 0.4.4
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-Bdzn5DIN.d.cts} +192 -3
- package/dist/{browser-4VHbRx1J.d.ts → browser-Bdzn5DIN.d.ts} +192 -3
- package/dist/browser.cjs +138 -4
- 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 +138 -4
- package/dist/browser.js.map +1 -1
- package/dist/index.cjs +130 -4
- 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 +130 -4
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -1881,6 +1881,7 @@ declare namespace files {
|
|
|
1881
1881
|
type TaskResponse = components['schemas']['TaskResponse'];
|
|
1882
1882
|
type CreateTaskRequest = components['schemas']['CreateTaskRequest'];
|
|
1883
1883
|
type UpdateTaskRequest = components['schemas']['UpdateTaskRequest'];
|
|
1884
|
+
type TaskRunResponse = components['schemas']['TaskRunResponse'];
|
|
1884
1885
|
/** List the caller's scheduled tasks (newest first). */
|
|
1885
1886
|
declare function listTasks(arbi: ArbiClient): Promise<TaskResponse[]>;
|
|
1886
1887
|
/** Create a scheduled task. `name` is required; supply trigger + action fields. */
|
|
@@ -1891,18 +1892,22 @@ declare function updateTask(arbi: ArbiClient, taskId: string, body: UpdateTaskRe
|
|
|
1891
1892
|
declare function deleteTask(arbi: ArbiClient, taskId: string): Promise<void>;
|
|
1892
1893
|
/** Fire a task immediately without advancing its schedule. */
|
|
1893
1894
|
declare function runTask(arbi: ArbiClient, taskId: string): Promise<TaskResponse>;
|
|
1895
|
+
/** A task's run history, newest first. Each run links to its conversation. */
|
|
1896
|
+
declare function listTaskRuns(arbi: ArbiClient, taskId: string): Promise<TaskRunResponse[]>;
|
|
1894
1897
|
|
|
1895
1898
|
type tasks_CreateTaskRequest = CreateTaskRequest;
|
|
1896
1899
|
type tasks_TaskResponse = TaskResponse;
|
|
1900
|
+
type tasks_TaskRunResponse = TaskRunResponse;
|
|
1897
1901
|
type tasks_UpdateTaskRequest = UpdateTaskRequest;
|
|
1898
1902
|
declare const tasks_createTask: typeof createTask;
|
|
1899
1903
|
declare const tasks_deleteTask: typeof deleteTask;
|
|
1900
1904
|
declare const tasks_getTask: typeof getTask;
|
|
1905
|
+
declare const tasks_listTaskRuns: typeof listTaskRuns;
|
|
1901
1906
|
declare const tasks_listTasks: typeof listTasks;
|
|
1902
1907
|
declare const tasks_runTask: typeof runTask;
|
|
1903
1908
|
declare const tasks_updateTask: typeof updateTask;
|
|
1904
1909
|
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 };
|
|
1910
|
+
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
1911
|
}
|
|
1907
1912
|
|
|
1908
1913
|
/**
|
|
@@ -2068,6 +2073,8 @@ declare class Arbi {
|
|
|
2068
2073
|
* Useful for session recovery without re-entering the password.
|
|
2069
2074
|
*/
|
|
2070
2075
|
loginWithKey(email: string, signingPrivateKeyBase64: string): Promise<void>;
|
|
2076
|
+
/** A workspace's key, sealed to the caller's own session (what `/open` and `POST /workspace/users` take). */
|
|
2077
|
+
private sealWorkspaceKey;
|
|
2071
2078
|
/**
|
|
2072
2079
|
* Select a workspace by ID. Fetches the workspace list, finds the matching
|
|
2073
2080
|
* workspace, decrypts the wrapped key, and sets up auth headers.
|
|
@@ -2418,6 +2425,63 @@ declare class Arbi {
|
|
|
2418
2425
|
agent_ext_id?: string | null | undefined;
|
|
2419
2426
|
is_temporary: boolean;
|
|
2420
2427
|
}[]>;
|
|
2428
|
+
/**
|
|
2429
|
+
* Grant users a temporary key scoped to ONE session (identified by its public key), for
|
|
2430
|
+
* example an agent's run session minted by `agents.authorize()`. Nothing standing is created:
|
|
2431
|
+
* the grant expires with that session. Works for any workspace the caller holds a key for;
|
|
2432
|
+
* it does not need to be the open one.
|
|
2433
|
+
*/
|
|
2434
|
+
grantTemporaryAccess: (params: {
|
|
2435
|
+
workspaceId: string;
|
|
2436
|
+
emails: string[];
|
|
2437
|
+
sessionPubkeyB64: string;
|
|
2438
|
+
role?: "owner" | "collaborator" | "guest";
|
|
2439
|
+
}) => Promise<{
|
|
2440
|
+
user: {
|
|
2441
|
+
external_id: string;
|
|
2442
|
+
parent_ext_id?: string | null | undefined;
|
|
2443
|
+
email: string;
|
|
2444
|
+
given_name: string;
|
|
2445
|
+
family_name?: string | null | undefined;
|
|
2446
|
+
picture?: string | null | undefined;
|
|
2447
|
+
encryption_public_key: string;
|
|
2448
|
+
is_sso: boolean;
|
|
2449
|
+
};
|
|
2450
|
+
role: components["schemas"]["WorkspaceRole"];
|
|
2451
|
+
joined_at: string;
|
|
2452
|
+
conversation_count: number;
|
|
2453
|
+
document_count: number;
|
|
2454
|
+
files_mb: number;
|
|
2455
|
+
agent_ext_id?: string | null | undefined;
|
|
2456
|
+
is_temporary: boolean;
|
|
2457
|
+
}[]>;
|
|
2458
|
+
/**
|
|
2459
|
+
* Add users (standing, permanent membership) to ANY workspace the caller holds a key for,
|
|
2460
|
+
* without opening it. `addUsers` does the same for the currently open workspace.
|
|
2461
|
+
*/
|
|
2462
|
+
grantAccess: (params: {
|
|
2463
|
+
workspaceId: string;
|
|
2464
|
+
emails: string[];
|
|
2465
|
+
role?: "owner" | "collaborator" | "guest";
|
|
2466
|
+
}) => Promise<{
|
|
2467
|
+
user: {
|
|
2468
|
+
external_id: string;
|
|
2469
|
+
parent_ext_id?: string | null | undefined;
|
|
2470
|
+
email: string;
|
|
2471
|
+
given_name: string;
|
|
2472
|
+
family_name?: string | null | undefined;
|
|
2473
|
+
picture?: string | null | undefined;
|
|
2474
|
+
encryption_public_key: string;
|
|
2475
|
+
is_sso: boolean;
|
|
2476
|
+
};
|
|
2477
|
+
role: components["schemas"]["WorkspaceRole"];
|
|
2478
|
+
joined_at: string;
|
|
2479
|
+
conversation_count: number;
|
|
2480
|
+
document_count: number;
|
|
2481
|
+
files_mb: number;
|
|
2482
|
+
agent_ext_id?: string | null | undefined;
|
|
2483
|
+
is_temporary: boolean;
|
|
2484
|
+
}[]>;
|
|
2421
2485
|
removeUsers: (userIds: string[]) => Promise<void>;
|
|
2422
2486
|
setUserRole: (userIds: string[], role: "owner" | "collaborator" | "guest") => Promise<{
|
|
2423
2487
|
user: {
|
|
@@ -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
|
/**
|
|
@@ -1881,6 +1881,7 @@ declare namespace files {
|
|
|
1881
1881
|
type TaskResponse = components['schemas']['TaskResponse'];
|
|
1882
1882
|
type CreateTaskRequest = components['schemas']['CreateTaskRequest'];
|
|
1883
1883
|
type UpdateTaskRequest = components['schemas']['UpdateTaskRequest'];
|
|
1884
|
+
type TaskRunResponse = components['schemas']['TaskRunResponse'];
|
|
1884
1885
|
/** List the caller's scheduled tasks (newest first). */
|
|
1885
1886
|
declare function listTasks(arbi: ArbiClient): Promise<TaskResponse[]>;
|
|
1886
1887
|
/** Create a scheduled task. `name` is required; supply trigger + action fields. */
|
|
@@ -1891,18 +1892,22 @@ declare function updateTask(arbi: ArbiClient, taskId: string, body: UpdateTaskRe
|
|
|
1891
1892
|
declare function deleteTask(arbi: ArbiClient, taskId: string): Promise<void>;
|
|
1892
1893
|
/** Fire a task immediately without advancing its schedule. */
|
|
1893
1894
|
declare function runTask(arbi: ArbiClient, taskId: string): Promise<TaskResponse>;
|
|
1895
|
+
/** A task's run history, newest first. Each run links to its conversation. */
|
|
1896
|
+
declare function listTaskRuns(arbi: ArbiClient, taskId: string): Promise<TaskRunResponse[]>;
|
|
1894
1897
|
|
|
1895
1898
|
type tasks_CreateTaskRequest = CreateTaskRequest;
|
|
1896
1899
|
type tasks_TaskResponse = TaskResponse;
|
|
1900
|
+
type tasks_TaskRunResponse = TaskRunResponse;
|
|
1897
1901
|
type tasks_UpdateTaskRequest = UpdateTaskRequest;
|
|
1898
1902
|
declare const tasks_createTask: typeof createTask;
|
|
1899
1903
|
declare const tasks_deleteTask: typeof deleteTask;
|
|
1900
1904
|
declare const tasks_getTask: typeof getTask;
|
|
1905
|
+
declare const tasks_listTaskRuns: typeof listTaskRuns;
|
|
1901
1906
|
declare const tasks_listTasks: typeof listTasks;
|
|
1902
1907
|
declare const tasks_runTask: typeof runTask;
|
|
1903
1908
|
declare const tasks_updateTask: typeof updateTask;
|
|
1904
1909
|
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 };
|
|
1910
|
+
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
1911
|
}
|
|
1907
1912
|
|
|
1908
1913
|
/**
|
|
@@ -2068,6 +2073,8 @@ declare class Arbi {
|
|
|
2068
2073
|
* Useful for session recovery without re-entering the password.
|
|
2069
2074
|
*/
|
|
2070
2075
|
loginWithKey(email: string, signingPrivateKeyBase64: string): Promise<void>;
|
|
2076
|
+
/** A workspace's key, sealed to the caller's own session (what `/open` and `POST /workspace/users` take). */
|
|
2077
|
+
private sealWorkspaceKey;
|
|
2071
2078
|
/**
|
|
2072
2079
|
* Select a workspace by ID. Fetches the workspace list, finds the matching
|
|
2073
2080
|
* workspace, decrypts the wrapped key, and sets up auth headers.
|
|
@@ -2418,6 +2425,63 @@ declare class Arbi {
|
|
|
2418
2425
|
agent_ext_id?: string | null | undefined;
|
|
2419
2426
|
is_temporary: boolean;
|
|
2420
2427
|
}[]>;
|
|
2428
|
+
/**
|
|
2429
|
+
* Grant users a temporary key scoped to ONE session (identified by its public key), for
|
|
2430
|
+
* example an agent's run session minted by `agents.authorize()`. Nothing standing is created:
|
|
2431
|
+
* the grant expires with that session. Works for any workspace the caller holds a key for;
|
|
2432
|
+
* it does not need to be the open one.
|
|
2433
|
+
*/
|
|
2434
|
+
grantTemporaryAccess: (params: {
|
|
2435
|
+
workspaceId: string;
|
|
2436
|
+
emails: string[];
|
|
2437
|
+
sessionPubkeyB64: string;
|
|
2438
|
+
role?: "owner" | "collaborator" | "guest";
|
|
2439
|
+
}) => Promise<{
|
|
2440
|
+
user: {
|
|
2441
|
+
external_id: string;
|
|
2442
|
+
parent_ext_id?: string | null | undefined;
|
|
2443
|
+
email: string;
|
|
2444
|
+
given_name: string;
|
|
2445
|
+
family_name?: string | null | undefined;
|
|
2446
|
+
picture?: string | null | undefined;
|
|
2447
|
+
encryption_public_key: string;
|
|
2448
|
+
is_sso: boolean;
|
|
2449
|
+
};
|
|
2450
|
+
role: components["schemas"]["WorkspaceRole"];
|
|
2451
|
+
joined_at: string;
|
|
2452
|
+
conversation_count: number;
|
|
2453
|
+
document_count: number;
|
|
2454
|
+
files_mb: number;
|
|
2455
|
+
agent_ext_id?: string | null | undefined;
|
|
2456
|
+
is_temporary: boolean;
|
|
2457
|
+
}[]>;
|
|
2458
|
+
/**
|
|
2459
|
+
* Add users (standing, permanent membership) to ANY workspace the caller holds a key for,
|
|
2460
|
+
* without opening it. `addUsers` does the same for the currently open workspace.
|
|
2461
|
+
*/
|
|
2462
|
+
grantAccess: (params: {
|
|
2463
|
+
workspaceId: string;
|
|
2464
|
+
emails: string[];
|
|
2465
|
+
role?: "owner" | "collaborator" | "guest";
|
|
2466
|
+
}) => Promise<{
|
|
2467
|
+
user: {
|
|
2468
|
+
external_id: string;
|
|
2469
|
+
parent_ext_id?: string | null | undefined;
|
|
2470
|
+
email: string;
|
|
2471
|
+
given_name: string;
|
|
2472
|
+
family_name?: string | null | undefined;
|
|
2473
|
+
picture?: string | null | undefined;
|
|
2474
|
+
encryption_public_key: string;
|
|
2475
|
+
is_sso: boolean;
|
|
2476
|
+
};
|
|
2477
|
+
role: components["schemas"]["WorkspaceRole"];
|
|
2478
|
+
joined_at: string;
|
|
2479
|
+
conversation_count: number;
|
|
2480
|
+
document_count: number;
|
|
2481
|
+
files_mb: number;
|
|
2482
|
+
agent_ext_id?: string | null | undefined;
|
|
2483
|
+
is_temporary: boolean;
|
|
2484
|
+
}[]>;
|
|
2421
2485
|
removeUsers: (userIds: string[]) => Promise<void>;
|
|
2422
2486
|
setUserRole: (userIds: string[], role: "owner" | "collaborator" | "guest") => Promise<{
|
|
2423
2487
|
user: {
|
|
@@ -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
|
/**
|