@arbidocs/sdk 0.4.103 → 0.4.105
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-9CxXW_cZ.d.cts → browser-CxWTmtEq.d.cts} +223 -165
- package/dist/{browser-9CxXW_cZ.d.ts → browser-CxWTmtEq.d.ts} +223 -165
- package/dist/browser.cjs +39 -16
- 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 +36 -17
- package/dist/browser.js.map +1 -1
- package/dist/index.cjs +43 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +40 -19
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/browser.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { A as ActivityKind, a as ActivityResponse, b as AgentControlStateEvent, c as AgentStepDeltaEvent, d as AgentStepEvent, e as Arbi, f as ArbiApiError, g as ArbiError, h as ArbiErrorEvent, i as ArbiOptions, k as ArtifactEvent, l as AuthContext, m as AuthHeaders, n as AuthMode, o as AuthenticatedClient, C as ChatSession, p as CitationSummary, q as CliConfig, r as CliCredentials, s as CommandDescriptor, t as ConfigStore, u as ConnectOptions, v as ConversationResponse, w as ConversationUsageResponse, x as CreateFactRequest, y as CreateFactsRequest, z as CreateWorkRequest, B as CreateWorkflowRequest,
|
|
1
|
+
export { A as ActivityKind, a as ActivityResponse, b as AgentControlStateEvent, c as AgentStepDeltaEvent, d as AgentStepEvent, e as Arbi, f as ArbiApiError, g as ArbiError, h as ArbiErrorEvent, i as ArbiOptions, k as ArtifactEvent, l as AuthContext, m as AuthHeaders, n as AuthMode, o as AuthenticatedClient, C as ChatSession, p as CitationSummary, q as CliConfig, r as CliCredentials, s as CommandDescriptor, t as ConfigStore, u as ConnectOptions, v as ConversationResponse, w as ConversationUsageResponse, x as CreateFactRequest, y as CreateFactsRequest, z as CreateWorkRequest, B as CreateWorkflowRequest, D as DEFAULT_AI_USD_PER_GBP, F as DecryptedDmNotification, G as DeferredInterjectionEvent, H as DmAttachmentFile, I as DmAttachmentInput, L as DocumentAutomationAction, O as DocumentSelector, R as FactResponse, S as FactSearchRequest, T as FactSearchResponse, V as IdentityErrorCode, W as IdentityPurchase, X as IdentityState, Y as IdentityStatus, Z as LinkedRun, $ as ListFactsOptions, a3 as MessageMetadataPayload, a4 as MessageQueuedEvent, a5 as OutputTokensDetails, a6 as ParsedSlashCommand, a7 as PendingAuthResponse, a8 as PlanStepsError, a9 as PlanWorkRequest, aa as ProbeAnswerEvent, ab as ProjectBudget, ac as ProjectConversationUsageResponse, ad as ProjectDetails, ae as ProjectEventKind, af as ProjectEventResponse, ag as ProjectInvoicesResponse, ah as ProjectResponse, ai as ProjectUpdateRequest, aj as ProjectUsageResponse, ak as QueryOptions, al as RaisedSignal, am as ReconnectOptions, an as ReconnectableWsConnection, ao as ResolvedCitation, aq as ResponseCompletedEvent, ar as ResponseContentPartAddedEvent, as as ResponseCreatedEvent, at as ResponseFailedEvent, au as ResponseOutputItemAddedEvent, av as ResponseOutputItemDoneEvent, aw as ResponseOutputTextDeltaEvent, ax as ResponseOutputTextDoneEvent, ay as ResponseUsage, az as RunProgress, aA as RunStep, aB as RunWaitingOn, aC as SSEEvent, aD as SSEStreamCallbacks, aE as SSEStreamResult, aF as SSEStreamStartData, aI as SendBack, aJ as SkillSummary, aL as StepActionRequest, aM as StepActivityEvent, aN as StepAssignee, aO as StepField, aR as StepKind, aS as StepPhase, aT as StepSignal, aU as StepSignalWhen, aV as StepState, aW as StepStatus, aX as SubmitBackgroundQueryOptions, aY as TagChange, aZ as TagFieldDefinition, a_ as TagKind, a$ as TagKindField, b0 as TagKindSchema, b1 as TagLinks, b2 as TagListQuery, b3 as TagResponse, b4 as TaskPlan, b5 as TaskPlanStep, b6 as TokenBudgetContext, b7 as UpdateConversationRequest, b8 as UpdateFactRequest, b9 as UpdateWorkflowRequest, bf as UsageBreakdown, bg as UserDailyUsageResponse, bh as UserInfo, bi as UserInputRequestEvent, bj as UserMessageEvent, bk as WebSocketAuthError, bl as WorkStatus, bm as WorkflowAuthMode, bn as WorkflowResponse, bo as WorkflowRunHistoryResponse, bp as WorkflowRunResponse, bq as WorkspaceContext, br as WsConnection, bs as account, bt as agentconfig, bv as assistant, bw as authenticatedFetch, by as buildFactsContextTool, bz as buildRetrievalChunkTool, bA as buildRetrievalFullContextTool, bB as buildRetrievalTocTool, bC as connectWebSocket, bD as connectWithReconnect, bE as consumeSSEStream, bF as contacts, bG as conversations, bH as countCitations, bI as createAuthenticatedClient, bK as dm, bL as doctags, bM as documents, bN as facts, bO as files, bP as filterSkills, bQ as formatAgentStepLabel, bR as formatFileSize, bS as formatGbp, bT as formatGbpPerMillionTokens, bU as formatItemLabel, bW as formatUserName, bX as formatWorkspaceChoices, c0 as getErrorMessage, c1 as getRawWorkspaceKey, c2 as health, c4 as identityErrorCode, c3 as identityVerification, c5 as mail, c6 as parseSSEEvents, c7 as parseSlashCommand, c8 as parseSlashTokenInProgress, c9 as performPasswordLogin, cc as profile, cd as projects, ce as requireData, cf as requireOk, cg as resolveAuth, ch as resolveCitations, ci as resolveWorkspace, cj as responses, ck as selectWorkspace, cl as selectWorkspaceById, cm as sessions, cn as settings, cp as streamSSE, cq as stripCitationMarkdown, cr as summarizeCitations, cs as tags, ct as usdToGbp, cu as work, cv as workflowSteps, cw as workflows, cx as workspaces } from './browser-CxWTmtEq.cjs';
|
|
2
2
|
export { LoginProfile } from '@arbidocs/client';
|
package/dist/browser.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { A as ActivityKind, a as ActivityResponse, b as AgentControlStateEvent, c as AgentStepDeltaEvent, d as AgentStepEvent, e as Arbi, f as ArbiApiError, g as ArbiError, h as ArbiErrorEvent, i as ArbiOptions, k as ArtifactEvent, l as AuthContext, m as AuthHeaders, n as AuthMode, o as AuthenticatedClient, C as ChatSession, p as CitationSummary, q as CliConfig, r as CliCredentials, s as CommandDescriptor, t as ConfigStore, u as ConnectOptions, v as ConversationResponse, w as ConversationUsageResponse, x as CreateFactRequest, y as CreateFactsRequest, z as CreateWorkRequest, B as CreateWorkflowRequest,
|
|
1
|
+
export { A as ActivityKind, a as ActivityResponse, b as AgentControlStateEvent, c as AgentStepDeltaEvent, d as AgentStepEvent, e as Arbi, f as ArbiApiError, g as ArbiError, h as ArbiErrorEvent, i as ArbiOptions, k as ArtifactEvent, l as AuthContext, m as AuthHeaders, n as AuthMode, o as AuthenticatedClient, C as ChatSession, p as CitationSummary, q as CliConfig, r as CliCredentials, s as CommandDescriptor, t as ConfigStore, u as ConnectOptions, v as ConversationResponse, w as ConversationUsageResponse, x as CreateFactRequest, y as CreateFactsRequest, z as CreateWorkRequest, B as CreateWorkflowRequest, D as DEFAULT_AI_USD_PER_GBP, F as DecryptedDmNotification, G as DeferredInterjectionEvent, H as DmAttachmentFile, I as DmAttachmentInput, L as DocumentAutomationAction, O as DocumentSelector, R as FactResponse, S as FactSearchRequest, T as FactSearchResponse, V as IdentityErrorCode, W as IdentityPurchase, X as IdentityState, Y as IdentityStatus, Z as LinkedRun, $ as ListFactsOptions, a3 as MessageMetadataPayload, a4 as MessageQueuedEvent, a5 as OutputTokensDetails, a6 as ParsedSlashCommand, a7 as PendingAuthResponse, a8 as PlanStepsError, a9 as PlanWorkRequest, aa as ProbeAnswerEvent, ab as ProjectBudget, ac as ProjectConversationUsageResponse, ad as ProjectDetails, ae as ProjectEventKind, af as ProjectEventResponse, ag as ProjectInvoicesResponse, ah as ProjectResponse, ai as ProjectUpdateRequest, aj as ProjectUsageResponse, ak as QueryOptions, al as RaisedSignal, am as ReconnectOptions, an as ReconnectableWsConnection, ao as ResolvedCitation, aq as ResponseCompletedEvent, ar as ResponseContentPartAddedEvent, as as ResponseCreatedEvent, at as ResponseFailedEvent, au as ResponseOutputItemAddedEvent, av as ResponseOutputItemDoneEvent, aw as ResponseOutputTextDeltaEvent, ax as ResponseOutputTextDoneEvent, ay as ResponseUsage, az as RunProgress, aA as RunStep, aB as RunWaitingOn, aC as SSEEvent, aD as SSEStreamCallbacks, aE as SSEStreamResult, aF as SSEStreamStartData, aI as SendBack, aJ as SkillSummary, aL as StepActionRequest, aM as StepActivityEvent, aN as StepAssignee, aO as StepField, aR as StepKind, aS as StepPhase, aT as StepSignal, aU as StepSignalWhen, aV as StepState, aW as StepStatus, aX as SubmitBackgroundQueryOptions, aY as TagChange, aZ as TagFieldDefinition, a_ as TagKind, a$ as TagKindField, b0 as TagKindSchema, b1 as TagLinks, b2 as TagListQuery, b3 as TagResponse, b4 as TaskPlan, b5 as TaskPlanStep, b6 as TokenBudgetContext, b7 as UpdateConversationRequest, b8 as UpdateFactRequest, b9 as UpdateWorkflowRequest, bf as UsageBreakdown, bg as UserDailyUsageResponse, bh as UserInfo, bi as UserInputRequestEvent, bj as UserMessageEvent, bk as WebSocketAuthError, bl as WorkStatus, bm as WorkflowAuthMode, bn as WorkflowResponse, bo as WorkflowRunHistoryResponse, bp as WorkflowRunResponse, bq as WorkspaceContext, br as WsConnection, bs as account, bt as agentconfig, bv as assistant, bw as authenticatedFetch, by as buildFactsContextTool, bz as buildRetrievalChunkTool, bA as buildRetrievalFullContextTool, bB as buildRetrievalTocTool, bC as connectWebSocket, bD as connectWithReconnect, bE as consumeSSEStream, bF as contacts, bG as conversations, bH as countCitations, bI as createAuthenticatedClient, bK as dm, bL as doctags, bM as documents, bN as facts, bO as files, bP as filterSkills, bQ as formatAgentStepLabel, bR as formatFileSize, bS as formatGbp, bT as formatGbpPerMillionTokens, bU as formatItemLabel, bW as formatUserName, bX as formatWorkspaceChoices, c0 as getErrorMessage, c1 as getRawWorkspaceKey, c2 as health, c4 as identityErrorCode, c3 as identityVerification, c5 as mail, c6 as parseSSEEvents, c7 as parseSlashCommand, c8 as parseSlashTokenInProgress, c9 as performPasswordLogin, cc as profile, cd as projects, ce as requireData, cf as requireOk, cg as resolveAuth, ch as resolveCitations, ci as resolveWorkspace, cj as responses, ck as selectWorkspace, cl as selectWorkspaceById, cm as sessions, cn as settings, cp as streamSSE, cq as stripCitationMarkdown, cr as summarizeCitations, cs as tags, ct as usdToGbp, cu as work, cv as workflowSteps, cw as workflows, cx as workspaces } from './browser-CxWTmtEq.js';
|
|
2
2
|
export { LoginProfile } from '@arbidocs/client';
|
package/dist/browser.js
CHANGED
|
@@ -3834,6 +3834,38 @@ async function resolveWorkspace(store, workspaceOpt) {
|
|
|
3834
3834
|
};
|
|
3835
3835
|
}
|
|
3836
3836
|
|
|
3837
|
+
// src/format.ts
|
|
3838
|
+
function formatFileSize(bytes, fallback = "N/A") {
|
|
3839
|
+
if (bytes === null || bytes === void 0) return fallback;
|
|
3840
|
+
if (bytes < 1024) return `${bytes} B`;
|
|
3841
|
+
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
|
|
3842
|
+
if (bytes < 1024 * 1024 * 1024) return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
|
|
3843
|
+
return `${(bytes / (1024 * 1024 * 1024)).toFixed(1)} GB`;
|
|
3844
|
+
}
|
|
3845
|
+
function formatUserName(user) {
|
|
3846
|
+
if (!user) return "";
|
|
3847
|
+
return [user.given_name, user.family_name].filter(Boolean).join(" ");
|
|
3848
|
+
}
|
|
3849
|
+
function formatGbp(gbp) {
|
|
3850
|
+
const safe = typeof gbp === "number" && Number.isFinite(gbp) ? gbp : 0;
|
|
3851
|
+
if (safe > 0 && safe < 5e-3) return "<\xA30.01";
|
|
3852
|
+
const rounded = Math.round(safe * 100) / 100;
|
|
3853
|
+
const whole = Number.isInteger(rounded);
|
|
3854
|
+
const digits = Math.abs(rounded).toLocaleString("en-GB", {
|
|
3855
|
+
minimumFractionDigits: whole ? 0 : 2,
|
|
3856
|
+
maximumFractionDigits: whole ? 0 : 2
|
|
3857
|
+
});
|
|
3858
|
+
return `${rounded < 0 ? "-" : ""}\xA3${digits}`;
|
|
3859
|
+
}
|
|
3860
|
+
var DEFAULT_AI_USD_PER_GBP = 1;
|
|
3861
|
+
function usdToGbp(usd, usdPerGbp = DEFAULT_AI_USD_PER_GBP) {
|
|
3862
|
+
return usd / usdPerGbp;
|
|
3863
|
+
}
|
|
3864
|
+
function formatGbpPerMillionTokens(costPerToken) {
|
|
3865
|
+
if (!costPerToken) return null;
|
|
3866
|
+
return formatGbp(usdToGbp(costPerToken * 1e6));
|
|
3867
|
+
}
|
|
3868
|
+
|
|
3837
3869
|
// src/sse.ts
|
|
3838
3870
|
function humanizeStep(identifier) {
|
|
3839
3871
|
const spaced = identifier.replace(/[_-]+/g, " ").trim();
|
|
@@ -4247,19 +4279,6 @@ async function connectWithReconnect(options) {
|
|
|
4247
4279
|
};
|
|
4248
4280
|
}
|
|
4249
4281
|
|
|
4250
|
-
// src/format.ts
|
|
4251
|
-
function formatFileSize(bytes, fallback = "N/A") {
|
|
4252
|
-
if (bytes === null || bytes === void 0) return fallback;
|
|
4253
|
-
if (bytes < 1024) return `${bytes} B`;
|
|
4254
|
-
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
|
|
4255
|
-
if (bytes < 1024 * 1024 * 1024) return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
|
|
4256
|
-
return `${(bytes / (1024 * 1024 * 1024)).toFixed(1)} GB`;
|
|
4257
|
-
}
|
|
4258
|
-
function formatUserName(user) {
|
|
4259
|
-
if (!user) return "";
|
|
4260
|
-
return [user.given_name, user.family_name].filter(Boolean).join(" ");
|
|
4261
|
-
}
|
|
4262
|
-
|
|
4263
4282
|
// src/citations.ts
|
|
4264
4283
|
function resolveCitations(metadata) {
|
|
4265
4284
|
if (!metadata?.tools) return [];
|
|
@@ -7652,7 +7671,7 @@ var Arbi = class {
|
|
|
7652
7671
|
update: (projectExtId, body) => updateProject(this.requireClient(), projectExtId, body),
|
|
7653
7672
|
/** The project's stage and budget changes, newest first. */
|
|
7654
7673
|
events: (projectExtId, options) => listProjectEvents(this.requireClient(), projectExtId, options),
|
|
7655
|
-
/** The project's spend by conversation in a billing period (
|
|
7674
|
+
/** The project's spend by conversation in a billing period (£). */
|
|
7656
7675
|
usageByConversation: (projectExtId, monthsBack) => getProjectConversationUsage(this.requireClient(), projectExtId, monthsBack),
|
|
7657
7676
|
refresh: (projectExtId) => refreshProject(this.requireClient(), projectExtId),
|
|
7658
7677
|
/** AI usage + spend breakdown for a project's billing period. */
|
|
@@ -7690,7 +7709,7 @@ var Arbi = class {
|
|
|
7690
7709
|
this.profileListeners.add(listener);
|
|
7691
7710
|
return () => this.profileListeners.delete(listener);
|
|
7692
7711
|
},
|
|
7693
|
-
/** Today's deployment-wide
|
|
7712
|
+
/** Today's deployment-wide AI usage (£) for the current user. */
|
|
7694
7713
|
usageToday: () => getUserUsageToday(this.requireClient()),
|
|
7695
7714
|
/**
|
|
7696
7715
|
* The signed-in user from the server, with `can_create_projects`: false on deployments where
|
|
@@ -7948,7 +7967,7 @@ var Arbi = class {
|
|
|
7948
7967
|
sendBackStep: (conversationId, step, options) => sendBackStep(this.requireClient(), conversationId, step, options),
|
|
7949
7968
|
/** A stepped run's steps, signals, linked runs and send-backs, and what it waits for. */
|
|
7950
7969
|
runProgress: (conversationId) => getRunProgress(this.requireClient(), conversationId),
|
|
7951
|
-
/** What the conversation's AI work cost: by step, run, model, agent and feature (
|
|
7970
|
+
/** What the conversation's AI work cost: by step, run, model, agent and feature (£). */
|
|
7952
7971
|
usage: (conversationId) => getConversationUsage(this.requireClient(), conversationId),
|
|
7953
7972
|
/** Notify people about a conversation (each gets a notification); resolves with who was. */
|
|
7954
7973
|
notify: (conversationId, userIds) => notifyConversation(this.requireClient(), conversationId, userIds),
|
|
@@ -8382,6 +8401,6 @@ var Arbi = class {
|
|
|
8382
8401
|
}
|
|
8383
8402
|
};
|
|
8384
8403
|
|
|
8385
|
-
export { Arbi, ArbiApiError, ArbiError, PlanStepsError, WebSocketAuthError, account_exports as account, agentconfig_exports as agentconfig, assistant_exports as assistant, authenticatedFetch, buildFactsContextTool, buildRetrievalChunkTool, buildRetrievalFullContextTool, buildRetrievalTocTool, connectWebSocket, connectWithReconnect, consumeSSEStream, contacts_exports as contacts, conversations_exports as conversations, countCitations, createAuthenticatedClient, dm_exports as dm, doctags_exports as doctags, documents_exports as documents, facts_exports as facts, files_exports as files, filterSkills, formatAgentStepLabel, formatFileSize, formatItemLabel, formatUserName, formatWorkspaceChoices, getErrorMessage, getRawWorkspaceKey, health_exports as health, identityErrorCode, identity_exports as identityVerification, mail_exports as mail, parseSSEEvents, parseSlashCommand, parseSlashTokenInProgress, performPasswordLogin, profile_exports as profile, projects_exports as projects, requireData, requireOk, resolveAuth, resolveCitations, resolveWorkspace, responses_exports as responses, selectWorkspace, selectWorkspaceById, sessions_exports as sessions, settings_exports as settings, streamSSE, stripCitationMarkdown, summarizeCitations, tags_exports as tags, work_exports as work, workflow_steps_exports as workflowSteps, workflows_exports as workflows, workspaces_exports as workspaces };
|
|
8404
|
+
export { Arbi, ArbiApiError, ArbiError, DEFAULT_AI_USD_PER_GBP, PlanStepsError, WebSocketAuthError, account_exports as account, agentconfig_exports as agentconfig, assistant_exports as assistant, authenticatedFetch, buildFactsContextTool, buildRetrievalChunkTool, buildRetrievalFullContextTool, buildRetrievalTocTool, connectWebSocket, connectWithReconnect, consumeSSEStream, contacts_exports as contacts, conversations_exports as conversations, countCitations, createAuthenticatedClient, dm_exports as dm, doctags_exports as doctags, documents_exports as documents, facts_exports as facts, files_exports as files, filterSkills, formatAgentStepLabel, formatFileSize, formatGbp, formatGbpPerMillionTokens, formatItemLabel, formatUserName, formatWorkspaceChoices, getErrorMessage, getRawWorkspaceKey, health_exports as health, identityErrorCode, identity_exports as identityVerification, mail_exports as mail, parseSSEEvents, parseSlashCommand, parseSlashTokenInProgress, performPasswordLogin, profile_exports as profile, projects_exports as projects, requireData, requireOk, resolveAuth, resolveCitations, resolveWorkspace, responses_exports as responses, selectWorkspace, selectWorkspaceById, sessions_exports as sessions, settings_exports as settings, streamSSE, stripCitationMarkdown, summarizeCitations, tags_exports as tags, usdToGbp, work_exports as work, workflow_steps_exports as workflowSteps, workflows_exports as workflows, workspaces_exports as workspaces };
|
|
8386
8405
|
//# sourceMappingURL=browser.js.map
|
|
8387
8406
|
//# sourceMappingURL=browser.js.map
|