@arbidocs/sdk 0.3.115 → 0.3.116
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-B5b3SDW6.d.cts → browser-BS_k043E.d.cts} +257 -3
- package/dist/{browser-B5b3SDW6.d.ts → browser-BS_k043E.d.ts} +257 -3
- package/dist/browser.cjs +77 -2
- 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 +77 -3
- package/dist/browser.js.map +1 -1
- package/dist/index.cjs +70 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -108
- package/dist/index.d.ts +3 -108
- package/dist/index.js +70 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -1769,6 +1769,40 @@ declare class Arbi {
|
|
|
1769
1769
|
cancel_at_period_end?: boolean | null | undefined;
|
|
1770
1770
|
portal_url?: string | null | undefined;
|
|
1771
1771
|
}>;
|
|
1772
|
+
/** AI usage + spend breakdown for a project's billing period. */
|
|
1773
|
+
usage: (projectExtId: string, monthsBack?: number) => Promise<{
|
|
1774
|
+
project_ext_id: string;
|
|
1775
|
+
period_start: string;
|
|
1776
|
+
period_end: string;
|
|
1777
|
+
total_spend: number;
|
|
1778
|
+
total_tokens: number;
|
|
1779
|
+
total_requests: number;
|
|
1780
|
+
daily: components["schemas"]["DailyUsage"][];
|
|
1781
|
+
model_groups: {
|
|
1782
|
+
[key: string]: components["schemas"]["ModelGroupUsage"];
|
|
1783
|
+
};
|
|
1784
|
+
by_workspace: {
|
|
1785
|
+
[key: string]: components["schemas"]["TagBreakdown"];
|
|
1786
|
+
};
|
|
1787
|
+
by_user: {
|
|
1788
|
+
[key: string]: components["schemas"]["TagBreakdown"];
|
|
1789
|
+
};
|
|
1790
|
+
by_feature: {
|
|
1791
|
+
[key: string]: components["schemas"]["TagBreakdown"];
|
|
1792
|
+
};
|
|
1793
|
+
invoice_pdf?: string | null;
|
|
1794
|
+
}>;
|
|
1795
|
+
/** Stripe invoices for a project's subscription. */
|
|
1796
|
+
invoices: (projectExtId: string) => Promise<{
|
|
1797
|
+
project_ext_id: string;
|
|
1798
|
+
invoices: components["schemas"]["ProjectInvoice"][];
|
|
1799
|
+
}>;
|
|
1800
|
+
};
|
|
1801
|
+
readonly user: {
|
|
1802
|
+
/** Today's deployment-wide credit spend for the current user. */
|
|
1803
|
+
usageToday: () => Promise<{
|
|
1804
|
+
credits_used: number;
|
|
1805
|
+
}>;
|
|
1772
1806
|
};
|
|
1773
1807
|
readonly workspaces: {
|
|
1774
1808
|
list: () => Promise<{
|
|
@@ -2003,6 +2037,17 @@ declare class Arbi {
|
|
|
2003
2037
|
error?: string | null | undefined;
|
|
2004
2038
|
}[];
|
|
2005
2039
|
}>;
|
|
2040
|
+
/**
|
|
2041
|
+
* The last-generated document-derived chronology (key case events / dates).
|
|
2042
|
+
* Defaults to the currently open workspace when no id is passed.
|
|
2043
|
+
*/
|
|
2044
|
+
chronology: (workspaceId?: string) => Promise<{
|
|
2045
|
+
events?: {
|
|
2046
|
+
[key: string]: unknown;
|
|
2047
|
+
}[] | null;
|
|
2048
|
+
generated_at?: string | null;
|
|
2049
|
+
doc_count?: number | null;
|
|
2050
|
+
}>;
|
|
2006
2051
|
};
|
|
2007
2052
|
readonly documents: {
|
|
2008
2053
|
list: () => Promise<{
|
|
@@ -2824,6 +2869,39 @@ declare class Arbi {
|
|
|
2824
2869
|
updated_at: string;
|
|
2825
2870
|
}[]>;
|
|
2826
2871
|
delete: (messageIds: string[]) => Promise<void>;
|
|
2872
|
+
/** List the current user's durable activity feed (never unread; excluded from DMs). */
|
|
2873
|
+
listActivity: (options?: {
|
|
2874
|
+
limit?: number;
|
|
2875
|
+
offset?: number;
|
|
2876
|
+
}) => Promise<{
|
|
2877
|
+
type: components["schemas"]["NotificationType"];
|
|
2878
|
+
external_id: string;
|
|
2879
|
+
sender: {
|
|
2880
|
+
external_id: string;
|
|
2881
|
+
parent_ext_id?: string | null | undefined;
|
|
2882
|
+
email: string;
|
|
2883
|
+
given_name: string;
|
|
2884
|
+
family_name?: string | null | undefined;
|
|
2885
|
+
picture?: string | null | undefined;
|
|
2886
|
+
encryption_public_key: string;
|
|
2887
|
+
is_sso: boolean;
|
|
2888
|
+
};
|
|
2889
|
+
recipient: {
|
|
2890
|
+
external_id: string;
|
|
2891
|
+
parent_ext_id?: string | null | undefined;
|
|
2892
|
+
email: string;
|
|
2893
|
+
given_name: string;
|
|
2894
|
+
family_name?: string | null | undefined;
|
|
2895
|
+
picture?: string | null | undefined;
|
|
2896
|
+
encryption_public_key: string;
|
|
2897
|
+
is_sso: boolean;
|
|
2898
|
+
};
|
|
2899
|
+
workspace_ext_id?: string | null | undefined;
|
|
2900
|
+
content?: string | null | undefined;
|
|
2901
|
+
read: boolean;
|
|
2902
|
+
created_at: string;
|
|
2903
|
+
updated_at: string;
|
|
2904
|
+
}[]>;
|
|
2827
2905
|
};
|
|
2828
2906
|
readonly settings: {
|
|
2829
2907
|
get: () => Promise<{
|
|
@@ -3811,6 +3889,7 @@ declare class Arbi {
|
|
|
3811
3889
|
*/
|
|
3812
3890
|
|
|
3813
3891
|
type WorkspaceUpdateRequest = components['schemas']['WorkspaceUpdateRequest'];
|
|
3892
|
+
type WorkspaceChronologyOut = components['schemas']['WorkspaceChronologyOut'];
|
|
3814
3893
|
declare function listWorkspaces(arbi: ArbiClient): Promise<{
|
|
3815
3894
|
external_id: string;
|
|
3816
3895
|
name: string;
|
|
@@ -4000,6 +4079,11 @@ declare function setUserRole(arbi: ArbiClient, userIds: string[], role: 'owner'
|
|
|
4000
4079
|
agent_ext_id?: string | null | undefined;
|
|
4001
4080
|
is_temporary: boolean;
|
|
4002
4081
|
}[]>;
|
|
4082
|
+
/**
|
|
4083
|
+
* Return the last-generated document-derived chronology (key case events /
|
|
4084
|
+
* dates) for a workspace. Fields are all-null when none has been generated yet.
|
|
4085
|
+
*/
|
|
4086
|
+
declare function getWorkspaceChronology(arbi: ArbiClient, workspaceId: string): Promise<WorkspaceChronologyOut>;
|
|
4003
4087
|
declare function copyDocuments(arbi: ArbiClient, targetWorkspaceId: string, docIds: string[], targetWorkspaceKey: string): Promise<{
|
|
4004
4088
|
detail: string;
|
|
4005
4089
|
documents_copied: number;
|
|
@@ -4011,17 +4095,19 @@ declare function copyDocuments(arbi: ArbiClient, targetWorkspaceId: string, docI
|
|
|
4011
4095
|
}[];
|
|
4012
4096
|
}>;
|
|
4013
4097
|
|
|
4098
|
+
type workspaces_WorkspaceChronologyOut = WorkspaceChronologyOut;
|
|
4014
4099
|
declare const workspaces_addWorkspaceUsers: typeof addWorkspaceUsers;
|
|
4015
4100
|
declare const workspaces_copyDocuments: typeof copyDocuments;
|
|
4016
4101
|
declare const workspaces_createWorkspace: typeof createWorkspace;
|
|
4017
4102
|
declare const workspaces_deleteWorkspaces: typeof deleteWorkspaces;
|
|
4103
|
+
declare const workspaces_getWorkspaceChronology: typeof getWorkspaceChronology;
|
|
4018
4104
|
declare const workspaces_listWorkspaceUsers: typeof listWorkspaceUsers;
|
|
4019
4105
|
declare const workspaces_listWorkspaces: typeof listWorkspaces;
|
|
4020
4106
|
declare const workspaces_removeWorkspaceUsers: typeof removeWorkspaceUsers;
|
|
4021
4107
|
declare const workspaces_setUserRole: typeof setUserRole;
|
|
4022
4108
|
declare const workspaces_updateWorkspace: typeof updateWorkspace;
|
|
4023
4109
|
declare namespace workspaces {
|
|
4024
|
-
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 };
|
|
4110
|
+
export { type workspaces_WorkspaceChronologyOut as WorkspaceChronologyOut, workspaces_addWorkspaceUsers as addWorkspaceUsers, workspaces_copyDocuments as copyDocuments, workspaces_createWorkspace as createWorkspace, workspaces_deleteWorkspaces as deleteWorkspaces, workspaces_getWorkspaceChronology as getWorkspaceChronology, workspaces_listWorkspaceUsers as listWorkspaceUsers, workspaces_listWorkspaces as listWorkspaces, workspaces_removeWorkspaceUsers as removeWorkspaceUsers, workspaces_setUserRole as setUserRole, workspaces_updateWorkspace as updateWorkspace };
|
|
4025
4111
|
}
|
|
4026
4112
|
|
|
4027
4113
|
/**
|
|
@@ -4606,6 +4692,46 @@ declare function listDecryptedDMs(arbi: ArbiClient, crypto: DmCryptoContext): Pr
|
|
|
4606
4692
|
created_at: string;
|
|
4607
4693
|
updated_at: string;
|
|
4608
4694
|
}[]>;
|
|
4695
|
+
/**
|
|
4696
|
+
* List the current user's durable activity feed, newest first.
|
|
4697
|
+
*
|
|
4698
|
+
* Activity notifications are backend-originated, to-self log lines (recipient ==
|
|
4699
|
+
* sender == the acting user) that are always read — they never appear in the
|
|
4700
|
+
* normal DM/notification feed or the unread badge. Reading them requires the
|
|
4701
|
+
* explicit `type=activity` filter, which this helper always sets.
|
|
4702
|
+
*/
|
|
4703
|
+
declare function listActivity(arbi: ArbiClient, options?: {
|
|
4704
|
+
limit?: number;
|
|
4705
|
+
offset?: number;
|
|
4706
|
+
}): Promise<{
|
|
4707
|
+
type: components["schemas"]["NotificationType"];
|
|
4708
|
+
external_id: string;
|
|
4709
|
+
sender: {
|
|
4710
|
+
external_id: string;
|
|
4711
|
+
parent_ext_id?: string | null | undefined;
|
|
4712
|
+
email: string;
|
|
4713
|
+
given_name: string;
|
|
4714
|
+
family_name?: string | null | undefined;
|
|
4715
|
+
picture?: string | null | undefined;
|
|
4716
|
+
encryption_public_key: string;
|
|
4717
|
+
is_sso: boolean;
|
|
4718
|
+
};
|
|
4719
|
+
recipient: {
|
|
4720
|
+
external_id: string;
|
|
4721
|
+
parent_ext_id?: string | null | undefined;
|
|
4722
|
+
email: string;
|
|
4723
|
+
given_name: string;
|
|
4724
|
+
family_name?: string | null | undefined;
|
|
4725
|
+
picture?: string | null | undefined;
|
|
4726
|
+
encryption_public_key: string;
|
|
4727
|
+
is_sso: boolean;
|
|
4728
|
+
};
|
|
4729
|
+
workspace_ext_id?: string | null | undefined;
|
|
4730
|
+
content?: string | null | undefined;
|
|
4731
|
+
read: boolean;
|
|
4732
|
+
created_at: string;
|
|
4733
|
+
updated_at: string;
|
|
4734
|
+
}[]>;
|
|
4609
4735
|
/**
|
|
4610
4736
|
* Send an E2E encrypted DM.
|
|
4611
4737
|
*
|
|
@@ -4770,6 +4896,7 @@ declare const dm_decryptDmBatch: typeof decryptDmBatch;
|
|
|
4770
4896
|
declare const dm_decryptDmContent: typeof decryptDmContent;
|
|
4771
4897
|
declare const dm_deleteDMs: typeof deleteDMs;
|
|
4772
4898
|
declare const dm_encryptDmContent: typeof encryptDmContent;
|
|
4899
|
+
declare const dm_listActivity: typeof listActivity;
|
|
4773
4900
|
declare const dm_listDMs: typeof listDMs;
|
|
4774
4901
|
declare const dm_listDecryptedDMs: typeof listDecryptedDMs;
|
|
4775
4902
|
declare const dm_markRead: typeof markRead;
|
|
@@ -4777,7 +4904,7 @@ declare const dm_requestWorkspaceAccess: typeof requestWorkspaceAccess;
|
|
|
4777
4904
|
declare const dm_sendDM: typeof sendDM;
|
|
4778
4905
|
declare const dm_sendEncryptedDM: typeof sendEncryptedDM;
|
|
4779
4906
|
declare namespace dm {
|
|
4780
|
-
export { type dm_DmCryptoContext as DmCryptoContext, dm_createDmCryptoContext as createDmCryptoContext, dm_decryptDmBatch as decryptDmBatch, dm_decryptDmContent as decryptDmContent, dm_deleteDMs as deleteDMs, dm_encryptDmContent as encryptDmContent, dm_listDMs as listDMs, dm_listDecryptedDMs as listDecryptedDMs, dm_markRead as markRead, dm_requestWorkspaceAccess as requestWorkspaceAccess, dm_sendDM as sendDM, dm_sendEncryptedDM as sendEncryptedDM };
|
|
4907
|
+
export { type dm_DmCryptoContext as DmCryptoContext, dm_createDmCryptoContext as createDmCryptoContext, dm_decryptDmBatch as decryptDmBatch, dm_decryptDmContent as decryptDmContent, dm_deleteDMs as deleteDMs, dm_encryptDmContent as encryptDmContent, dm_listActivity as listActivity, dm_listDMs as listDMs, dm_listDecryptedDMs as listDecryptedDMs, dm_markRead as markRead, dm_requestWorkspaceAccess as requestWorkspaceAccess, dm_sendDM as sendDM, dm_sendEncryptedDM as sendEncryptedDM };
|
|
4781
4908
|
}
|
|
4782
4909
|
|
|
4783
4910
|
/**
|
|
@@ -5280,4 +5407,131 @@ declare namespace responses {
|
|
|
5280
5407
|
export { type responses_SubmitBackgroundQueryOptions as SubmitBackgroundQueryOptions, responses_extractResponseText as extractResponseText, responses_getResponse as getResponse, responses_submitBackgroundQuery as submitBackgroundQuery };
|
|
5281
5408
|
}
|
|
5282
5409
|
|
|
5283
|
-
|
|
5410
|
+
/**
|
|
5411
|
+
* Project operations — list, create, update, delete, checkout, refresh, usage.
|
|
5412
|
+
*/
|
|
5413
|
+
|
|
5414
|
+
type ProjectUsageResponse = components['schemas']['ProjectUsageResponse'];
|
|
5415
|
+
type ProjectInvoicesResponse = components['schemas']['ProjectInvoicesResponse'];
|
|
5416
|
+
type UserDailyUsageResponse = components['schemas']['UserDailyUsageResponse'];
|
|
5417
|
+
declare function listProjects(arbi: ArbiClient): Promise<{
|
|
5418
|
+
external_id: string;
|
|
5419
|
+
name: string;
|
|
5420
|
+
created_by: string;
|
|
5421
|
+
packs: number;
|
|
5422
|
+
subscription: string;
|
|
5423
|
+
created_at: string;
|
|
5424
|
+
quotas: {
|
|
5425
|
+
storage_gb: {
|
|
5426
|
+
used: number;
|
|
5427
|
+
limit: number;
|
|
5428
|
+
};
|
|
5429
|
+
ai_credits: {
|
|
5430
|
+
used: number;
|
|
5431
|
+
limit: number;
|
|
5432
|
+
};
|
|
5433
|
+
collaborators: {
|
|
5434
|
+
used: number;
|
|
5435
|
+
limit: number;
|
|
5436
|
+
};
|
|
5437
|
+
budget_reset_at?: number | null | undefined;
|
|
5438
|
+
};
|
|
5439
|
+
daily_cap_per_user?: number | null | undefined;
|
|
5440
|
+
price_id?: string | null | undefined;
|
|
5441
|
+
plan?: string | null | undefined;
|
|
5442
|
+
amount?: number | null | undefined;
|
|
5443
|
+
currency?: string | null | undefined;
|
|
5444
|
+
current_period_end?: number | null | undefined;
|
|
5445
|
+
cancel_at_period_end?: boolean | null | undefined;
|
|
5446
|
+
portal_url?: string | null | undefined;
|
|
5447
|
+
}[]>;
|
|
5448
|
+
declare function createProject(arbi: ArbiClient, name: string): Promise<{
|
|
5449
|
+
external_id: string;
|
|
5450
|
+
name: string;
|
|
5451
|
+
created_by: string;
|
|
5452
|
+
packs: number;
|
|
5453
|
+
subscription: string;
|
|
5454
|
+
created_at: string;
|
|
5455
|
+
quotas: {
|
|
5456
|
+
storage_gb: {
|
|
5457
|
+
used: number;
|
|
5458
|
+
limit: number;
|
|
5459
|
+
};
|
|
5460
|
+
ai_credits: {
|
|
5461
|
+
used: number;
|
|
5462
|
+
limit: number;
|
|
5463
|
+
};
|
|
5464
|
+
collaborators: {
|
|
5465
|
+
used: number;
|
|
5466
|
+
limit: number;
|
|
5467
|
+
};
|
|
5468
|
+
budget_reset_at?: number | null | undefined;
|
|
5469
|
+
};
|
|
5470
|
+
daily_cap_per_user?: number | null | undefined;
|
|
5471
|
+
price_id?: string | null | undefined;
|
|
5472
|
+
plan?: string | null | undefined;
|
|
5473
|
+
amount?: number | null | undefined;
|
|
5474
|
+
currency?: string | null | undefined;
|
|
5475
|
+
current_period_end?: number | null | undefined;
|
|
5476
|
+
cancel_at_period_end?: boolean | null | undefined;
|
|
5477
|
+
portal_url?: string | null | undefined;
|
|
5478
|
+
}>;
|
|
5479
|
+
declare function refreshProject(arbi: ArbiClient, projectExtId: string): Promise<{
|
|
5480
|
+
external_id: string;
|
|
5481
|
+
name: string;
|
|
5482
|
+
created_by: string;
|
|
5483
|
+
packs: number;
|
|
5484
|
+
subscription: string;
|
|
5485
|
+
created_at: string;
|
|
5486
|
+
quotas: {
|
|
5487
|
+
storage_gb: {
|
|
5488
|
+
used: number;
|
|
5489
|
+
limit: number;
|
|
5490
|
+
};
|
|
5491
|
+
ai_credits: {
|
|
5492
|
+
used: number;
|
|
5493
|
+
limit: number;
|
|
5494
|
+
};
|
|
5495
|
+
collaborators: {
|
|
5496
|
+
used: number;
|
|
5497
|
+
limit: number;
|
|
5498
|
+
};
|
|
5499
|
+
budget_reset_at?: number | null | undefined;
|
|
5500
|
+
};
|
|
5501
|
+
daily_cap_per_user?: number | null | undefined;
|
|
5502
|
+
price_id?: string | null | undefined;
|
|
5503
|
+
plan?: string | null | undefined;
|
|
5504
|
+
amount?: number | null | undefined;
|
|
5505
|
+
currency?: string | null | undefined;
|
|
5506
|
+
current_period_end?: number | null | undefined;
|
|
5507
|
+
cancel_at_period_end?: boolean | null | undefined;
|
|
5508
|
+
portal_url?: string | null | undefined;
|
|
5509
|
+
}>;
|
|
5510
|
+
/**
|
|
5511
|
+
* AI usage + spend breakdown for a project's billing period. `monthsBack`
|
|
5512
|
+
* selects the period: 0 (default) = current, 1 = previous month, etc.
|
|
5513
|
+
*/
|
|
5514
|
+
declare function getProjectUsage(arbi: ArbiClient, projectExtId: string, monthsBack?: number): Promise<ProjectUsageResponse>;
|
|
5515
|
+
/** List the Stripe invoices for a project's subscription. */
|
|
5516
|
+
declare function getProjectInvoices(arbi: ArbiClient, projectExtId: string): Promise<ProjectInvoicesResponse>;
|
|
5517
|
+
/**
|
|
5518
|
+
* Today's deployment-wide credit spend for the current user — the number the
|
|
5519
|
+
* per-user daily cap is enforced against. Pair with a project's
|
|
5520
|
+
* `daily_cap_per_user` to render a "credits today" indicator.
|
|
5521
|
+
*/
|
|
5522
|
+
declare function getUserUsageToday(arbi: ArbiClient): Promise<UserDailyUsageResponse>;
|
|
5523
|
+
|
|
5524
|
+
type projects_ProjectInvoicesResponse = ProjectInvoicesResponse;
|
|
5525
|
+
type projects_ProjectUsageResponse = ProjectUsageResponse;
|
|
5526
|
+
type projects_UserDailyUsageResponse = UserDailyUsageResponse;
|
|
5527
|
+
declare const projects_createProject: typeof createProject;
|
|
5528
|
+
declare const projects_getProjectInvoices: typeof getProjectInvoices;
|
|
5529
|
+
declare const projects_getProjectUsage: typeof getProjectUsage;
|
|
5530
|
+
declare const projects_getUserUsageToday: typeof getUserUsageToday;
|
|
5531
|
+
declare const projects_listProjects: typeof listProjects;
|
|
5532
|
+
declare const projects_refreshProject: typeof refreshProject;
|
|
5533
|
+
declare namespace projects {
|
|
5534
|
+
export { type projects_ProjectInvoicesResponse as ProjectInvoicesResponse, type projects_ProjectUsageResponse as ProjectUsageResponse, type projects_UserDailyUsageResponse as UserDailyUsageResponse, projects_createProject as createProject, projects_getProjectInvoices as getProjectInvoices, projects_getProjectUsage as getProjectUsage, projects_getUserUsageToday as getUserUsageToday, projects_listProjects as listProjects, projects_refreshProject as refreshProject };
|
|
5535
|
+
}
|
|
5536
|
+
|
|
5537
|
+
export { type SSEEvent as $, type AgentStepDeltaEvent as A, type MemorySearchResponse as B, type ChatSession as C, DOC_TERMINAL_STATUSES as D, type MessageLevel as E, type FormattedWsMessage as F, type MessageMetadataPayload$1 as G, type MessageQueuedEvent as H, type ProjectInvoicesResponse as I, type ProjectUsageResponse as J, type ReconnectableWsConnection as K, type ListAllOptions as L, type MemoryResponse as M, type ResolvedCitation as N, type OutputTokensDetails as O, type ParsedSlashCommand as P, type QueryOptions as Q, type ReconnectOptions as R, type ResponseCompletedEvent as S, type ResponseContentPartAddedEvent as T, type ResponseCreatedEvent as U, type ResponseFailedEvent as V, type ResponseOutputItemAddedEvent as W, type ResponseOutputItemDoneEvent as X, type ResponseOutputTextDeltaEvent as Y, type ResponseOutputTextDoneEvent as Z, type ResponseUsage as _, type AgentStepEvent as a, resolveAuth as a$, type SSEStreamCallbacks as a0, type SSEStreamResult as a1, type SSEStreamStartData as a2, SUPPORTED_EXTENSIONS as a3, type SkillSummary as a4, type SkippedFile as a5, type TaskResponse as a6, type UpdateMemoryRequest as a7, type UpdateTaskRequest as a8, type UploadBatchResult as a9, dm as aA, doctags as aB, documents as aC, files as aD, filterSkills as aE, formatAgentStepLabel as aF, formatFileSize as aG, formatStreamSummary as aH, formatUserName as aI, formatWorkspaceChoices as aJ, formatWsMessage as aK, generateEncryptedWorkspaceKey as aL, generateNewWorkspaceKey as aM, getErrorCode as aN, getErrorMessage as aO, getRawWorkspaceKey as aP, health as aQ, memory as aR, parseSSEEvents as aS, parseSlashCommand as aT, parseSlashTokenInProgress as aU, performPasswordLogin as aV, performSigningKeyLogin as aW, performSsoDeviceFlowLogin as aX, projects as aY, requireData as aZ, requireOk as a_, type UploadDirectOptions as aa, type UploadDirectResult as ab, type UploadOptions as ac, type UploadResult as ad, type UserDailyUsageResponse as ae, type UserInfo as af, type UserInputRequestEvent as ag, type UserMessageEvent as ah, WebSocketAuthError as ai, type WorkspaceChronologyOut as aj, type WorkspaceContext as ak, type WsConnection as al, agentconfig as am, assistant as an, authenticatedFetch as ao, buildRetrievalChunkTool as ap, buildRetrievalFullContextTool as aq, buildRetrievalTocTool as ar, connectWebSocket as as, connectWithReconnect as at, consumeSSEStream as au, contacts as av, conversations as aw, countCitations as ax, createAuthenticatedClient as ay, createDocumentWaiter as az, Arbi as b, resolveCitations as b0, resolveWorkspace as b1, responses as b2, selectWorkspace as b3, selectWorkspaceById as b4, settings as b5, streamSSE as b6, stripCitationMarkdown as b7, summarizeCitations as b8, tags as b9, tasks as ba, workspaces as bb, ArbiApiError as c, ArbiError as d, type ArbiErrorEvent as e, type ArbiOptions as f, type ArtifactEvent as g, type AuthContext as h, type AuthHeaders as i, type AuthenticatedClient as j, type CitationSummary as k, type CliConfig as l, type CliCredentials as m, type CommandDescriptor as n, type ConfigStore as o, type ConnectOptions as p, type CreateMemoryRequest as q, type CreateTaskRequest as r, type DmCryptoContext as s, type DocNameMap as t, type DocumentListFields as u, type DocumentListOrder as v, type DocumentWaiter as w, type DocumentWaiterOptions as x, type ListPaginatedOptions as y, type MemorySearchRequest as z };
|
package/dist/browser.cjs
CHANGED
|
@@ -4642,6 +4642,7 @@ __export(workspaces_exports, {
|
|
|
4642
4642
|
copyDocuments: () => copyDocuments,
|
|
4643
4643
|
createWorkspace: () => createWorkspace,
|
|
4644
4644
|
deleteWorkspaces: () => deleteWorkspaces,
|
|
4645
|
+
getWorkspaceChronology: () => getWorkspaceChronology,
|
|
4645
4646
|
listWorkspaceUsers: () => listWorkspaceUsers,
|
|
4646
4647
|
listWorkspaces: () => listWorkspaces,
|
|
4647
4648
|
removeWorkspaceUsers: () => removeWorkspaceUsers,
|
|
@@ -4706,6 +4707,14 @@ async function setUserRole(arbi, userIds, role) {
|
|
|
4706
4707
|
"Failed to update roles"
|
|
4707
4708
|
);
|
|
4708
4709
|
}
|
|
4710
|
+
async function getWorkspaceChronology(arbi, workspaceId) {
|
|
4711
|
+
return requireData(
|
|
4712
|
+
await arbi.fetch.GET("/v1/workspace/{workspace_ext_id}/chronology", {
|
|
4713
|
+
params: { path: { workspace_ext_id: workspaceId } }
|
|
4714
|
+
}),
|
|
4715
|
+
"Failed to fetch workspace chronology"
|
|
4716
|
+
);
|
|
4717
|
+
}
|
|
4709
4718
|
async function copyDocuments(arbi, targetWorkspaceId, docIds, targetWorkspaceKey) {
|
|
4710
4719
|
return requireData(
|
|
4711
4720
|
await arbi.fetch.POST("/v1/workspace/copy", {
|
|
@@ -5070,6 +5079,7 @@ __export(dm_exports, {
|
|
|
5070
5079
|
decryptDmContent: () => decryptDmContent,
|
|
5071
5080
|
deleteDMs: () => deleteDMs,
|
|
5072
5081
|
encryptDmContent: () => encryptDmContent,
|
|
5082
|
+
listActivity: () => listActivity,
|
|
5073
5083
|
listDMs: () => listDMs,
|
|
5074
5084
|
listDecryptedDMs: () => listDecryptedDMs,
|
|
5075
5085
|
markRead: () => markRead,
|
|
@@ -5125,6 +5135,20 @@ async function listDecryptedDMs(arbi, crypto) {
|
|
|
5125
5135
|
const raw = await listDMs(arbi);
|
|
5126
5136
|
return decryptDmBatch(arbi, raw, crypto);
|
|
5127
5137
|
}
|
|
5138
|
+
async function listActivity(arbi, options) {
|
|
5139
|
+
return requireData(
|
|
5140
|
+
await arbi.fetch.GET("/v1/notifications/", {
|
|
5141
|
+
params: {
|
|
5142
|
+
query: {
|
|
5143
|
+
type: "activity",
|
|
5144
|
+
...options?.limit != null ? { limit: options.limit } : {},
|
|
5145
|
+
...options?.offset != null ? { offset: options.offset } : {}
|
|
5146
|
+
}
|
|
5147
|
+
}
|
|
5148
|
+
}),
|
|
5149
|
+
"Failed to fetch activity"
|
|
5150
|
+
);
|
|
5151
|
+
}
|
|
5128
5152
|
async function sendEncryptedDM(arbi, messages, crypto) {
|
|
5129
5153
|
const encrypted = await Promise.all(
|
|
5130
5154
|
messages.map(async (msg) => ({
|
|
@@ -5360,6 +5384,15 @@ async function listSessions(arbi) {
|
|
|
5360
5384
|
}
|
|
5361
5385
|
|
|
5362
5386
|
// src/operations/projects.ts
|
|
5387
|
+
var projects_exports = {};
|
|
5388
|
+
__export(projects_exports, {
|
|
5389
|
+
createProject: () => createProject,
|
|
5390
|
+
getProjectInvoices: () => getProjectInvoices,
|
|
5391
|
+
getProjectUsage: () => getProjectUsage,
|
|
5392
|
+
getUserUsageToday: () => getUserUsageToday,
|
|
5393
|
+
listProjects: () => listProjects,
|
|
5394
|
+
refreshProject: () => refreshProject
|
|
5395
|
+
});
|
|
5363
5396
|
async function listProjects(arbi) {
|
|
5364
5397
|
return requireData(await arbi.fetch.GET("/v1/user/projects/"), "Failed to fetch projects");
|
|
5365
5398
|
}
|
|
@@ -5379,6 +5412,28 @@ async function refreshProject(arbi, projectExtId) {
|
|
|
5379
5412
|
"Failed to refresh project"
|
|
5380
5413
|
);
|
|
5381
5414
|
}
|
|
5415
|
+
async function getProjectUsage(arbi, projectExtId, monthsBack) {
|
|
5416
|
+
return requireData(
|
|
5417
|
+
await arbi.fetch.GET("/v1/user/projects/{project_ext_id}/usage", {
|
|
5418
|
+
params: {
|
|
5419
|
+
path: { project_ext_id: projectExtId },
|
|
5420
|
+
query: monthsBack === void 0 ? void 0 : { months_back: monthsBack }
|
|
5421
|
+
}
|
|
5422
|
+
}),
|
|
5423
|
+
"Failed to fetch project usage"
|
|
5424
|
+
);
|
|
5425
|
+
}
|
|
5426
|
+
async function getProjectInvoices(arbi, projectExtId) {
|
|
5427
|
+
return requireData(
|
|
5428
|
+
await arbi.fetch.GET("/v1/user/projects/{project_ext_id}/invoices", {
|
|
5429
|
+
params: { path: { project_ext_id: projectExtId } }
|
|
5430
|
+
}),
|
|
5431
|
+
"Failed to fetch project invoices"
|
|
5432
|
+
);
|
|
5433
|
+
}
|
|
5434
|
+
async function getUserUsageToday(arbi) {
|
|
5435
|
+
return requireData(await arbi.fetch.GET("/v1/user/me/usage/today"), "Failed to fetch today usage");
|
|
5436
|
+
}
|
|
5382
5437
|
|
|
5383
5438
|
// src/operations/tasks.ts
|
|
5384
5439
|
var tasks_exports = {};
|
|
@@ -5604,7 +5659,16 @@ var Arbi = class {
|
|
|
5604
5659
|
projects = {
|
|
5605
5660
|
list: () => listProjects(this.requireClient()),
|
|
5606
5661
|
create: (name) => createProject(this.requireClient(), name),
|
|
5607
|
-
refresh: (projectExtId) => refreshProject(this.requireClient(), projectExtId)
|
|
5662
|
+
refresh: (projectExtId) => refreshProject(this.requireClient(), projectExtId),
|
|
5663
|
+
/** AI usage + spend breakdown for a project's billing period. */
|
|
5664
|
+
usage: (projectExtId, monthsBack) => getProjectUsage(this.requireClient(), projectExtId, monthsBack),
|
|
5665
|
+
/** Stripe invoices for a project's subscription. */
|
|
5666
|
+
invoices: (projectExtId) => getProjectInvoices(this.requireClient(), projectExtId)
|
|
5667
|
+
};
|
|
5668
|
+
// ── User (account-scoped usage) ───────────────────────────────────────
|
|
5669
|
+
user = {
|
|
5670
|
+
/** Today's deployment-wide credit spend for the current user. */
|
|
5671
|
+
usageToday: () => getUserUsageToday(this.requireClient())
|
|
5608
5672
|
};
|
|
5609
5673
|
// ── Workspaces ────────────────────────────────────────────────────────
|
|
5610
5674
|
workspaces = {
|
|
@@ -5652,6 +5716,14 @@ var Arbi = class {
|
|
|
5652
5716
|
targetWorkspaceId,
|
|
5653
5717
|
docIds,
|
|
5654
5718
|
targetWorkspaceKey
|
|
5719
|
+
),
|
|
5720
|
+
/**
|
|
5721
|
+
* The last-generated document-derived chronology (key case events / dates).
|
|
5722
|
+
* Defaults to the currently open workspace when no id is passed.
|
|
5723
|
+
*/
|
|
5724
|
+
chronology: (workspaceId) => getWorkspaceChronology(
|
|
5725
|
+
this.requireClient(),
|
|
5726
|
+
workspaceId ?? this.requireWorkspace()
|
|
5655
5727
|
)
|
|
5656
5728
|
};
|
|
5657
5729
|
// ── Documents ─────────────────────────────────────────────────────────
|
|
@@ -5782,7 +5854,9 @@ var Arbi = class {
|
|
|
5782
5854
|
list: () => listDMs(this.requireClient()),
|
|
5783
5855
|
send: (messages) => sendDM(this.requireClient(), messages),
|
|
5784
5856
|
markRead: (messageIds) => markRead(this.requireClient(), messageIds),
|
|
5785
|
-
delete: (messageIds) => deleteDMs(this.requireClient(), messageIds)
|
|
5857
|
+
delete: (messageIds) => deleteDMs(this.requireClient(), messageIds),
|
|
5858
|
+
/** List the current user's durable activity feed (never unread; excluded from DMs). */
|
|
5859
|
+
listActivity: (options) => listActivity(this.requireClient(), options)
|
|
5786
5860
|
};
|
|
5787
5861
|
// ── Settings ──────────────────────────────────────────────────────────
|
|
5788
5862
|
settings = {
|
|
@@ -5960,6 +6034,7 @@ exports.parseSSEEvents = parseSSEEvents;
|
|
|
5960
6034
|
exports.parseSlashCommand = parseSlashCommand;
|
|
5961
6035
|
exports.parseSlashTokenInProgress = parseSlashTokenInProgress;
|
|
5962
6036
|
exports.performPasswordLogin = performPasswordLogin;
|
|
6037
|
+
exports.projects = projects_exports;
|
|
5963
6038
|
exports.requireData = requireData;
|
|
5964
6039
|
exports.requireOk = requireOk;
|
|
5965
6040
|
exports.resolveAuth = resolveAuth;
|