@arbidocs/sdk 0.4.70 → 0.4.72

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/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { t as ConfigStore, q as CliConfig, r as CliCredentials, C as ChatSession, ap as SkippedFile, aA as UploadResult, m as AuthHeaders, aw as UploadBatchResult, az as UploadOptions, ax as UploadDirectOptions, ay as UploadDirectResult, an as SUPPORTED_EXTENSIONS, W as MailAttachment, H as DmCryptoContext } from './browser-Dhk899kq.cjs';
2
- export { A as ActivityKind, a as ActivityResponse, d as AgentStepEvent, e as Arbi, f as ArbiApiError, g as ArbiError, i as ArbiOptions, j as ArbiSessionExpiredError, k as ArtifactEvent, l as AuthContext, n as AuthMode, o as AuthenticatedClient, p as CitationSummary, s as CommandDescriptor, u as ConnectOptions, v as ConversationResponse, y as CreateWorkRequest, z as CreateWorkflowRequest, D as DOC_TERMINAL_STATUSES, B as DecryptedDmNotification, F as DmAttachmentFile, G as DmAttachmentInput, I as DocNameMap, J as DocumentAutomationAction, K as DocumentListFields, L as DocumentListOrder, M as DocumentSelector, N as DocumentWaiter, O as DocumentWaiterOptions, S as FormattedWsMessage, T as ListAllOptions, V as ListPaginatedOptions, X as MessageLevel, Y as MessageMetadataPayload, Z as MessageQueuedEvent, _ as OutputTokensDetails, $ as ParsedSlashCommand, a0 as PendingAuthResponse, a1 as PlanWorkRequest, a3 as ProjectInvoicesResponse, a4 as ProjectUsageResponse, a5 as QueryOptions, a6 as ReconnectOptions, a7 as ReconnectableWsConnection, a8 as ResolvedCitation, a9 as ResolvedRecipient, aa as ResponseCompletedEvent, ab as ResponseContentPartAddedEvent, ac as ResponseCreatedEvent, ad as ResponseFailedEvent, ae as ResponseOutputItemAddedEvent, af as ResponseOutputItemDoneEvent, ag as ResponseOutputTextDeltaEvent, ah as ResponseOutputTextDoneEvent, ai as ResponseUsage, aj as SSEEvent, ak as SSEStreamCallbacks, al as SSEStreamResult, am as SSEStreamStartData, ao as SkillSummary, aq as SubmitBackgroundQueryOptions, ar as TaskPlan, as as TokenBudgetContext, at as UpdateConversationRequest, av as UpdateWorkflowRequest, aB as UserDailyUsageResponse, aC as UserInfo, aD as UserInputRequestEvent, aE as UserMessageEvent, aF as WebSocketAuthError, aG as WorkStatus, aH as WorkflowAuthMode, aI as WorkflowResponse, aJ as WorkflowRunHistoryResponse, aK as WorkflowRunResponse, aL as WorkspaceContext, aM as WsConnection, aN as account, aO as agentconfig, aP as agents, aQ as assistant, aR as authenticatedFetch, aS as buildDocNameMap, aT as buildFactsContextTool, aU as buildRetrievalChunkTool, aV as buildRetrievalFullContextTool, aW as buildRetrievalTocTool, aX as connectWebSocket, aY as connectWithReconnect, aZ as consumeSSEStream, a_ as contacts, a$ as conversations, b0 as countCitations, b1 as createAuthenticatedClient, b2 as createDocumentWaiter, b3 as dm, b4 as doctags, b5 as documents, b6 as facts, b7 as files, b8 as filterSkills, b9 as formatAgentStepLabel, ba as formatFileSize, bb as formatItemLabel, bc as formatStreamSummary, bd as formatUserName, be as formatWorkspaceChoices, bf as formatWsMessage, bg as generateEncryptedWorkspaceKey, bh as generateNewWorkspaceKey, bi as getErrorCode, bj as getErrorMessage, bk as getRawWorkspaceKey, bl as health, bm as mail, bn as parseSSEEvents, bo as parseSlashCommand, bp as parseSlashTokenInProgress, bq as performPasswordLogin, br as performSigningKeyLogin, bs as performSsoDeviceFlowLogin, bt as profile, bu as projects, bv as requireData, bw as requireOk, bx as resolveAuth, by as resolveCitations, bz as resolveWorkspace, bA as responses, bB as selectWorkspace, bC as selectWorkspaceById, bD as sessions, bE as settings, bF as streamSSE, bG as stripCitationMarkdown, bH as summarizeCitations, bI as tags, bJ as work, bK as workflows, bL as workspaces } from './browser-Dhk899kq.cjs';
1
+ import { t as ConfigStore, q as CliConfig, r as CliCredentials, C as ChatSession, at as SkippedFile, aE as UploadResult, m as AuthHeaders, aA as UploadBatchResult, aD as UploadOptions, aB as UploadDirectOptions, aC as UploadDirectResult, ar as SUPPORTED_EXTENSIONS, _ as MailAttachment, H as DmCryptoContext } from './browser-BWUCi_v2.cjs';
2
+ export { A as ActivityKind, a as ActivityResponse, d as AgentStepEvent, e as Arbi, f as ArbiApiError, g as ArbiError, i as ArbiOptions, j as ArbiSessionExpiredError, k as ArtifactEvent, l as AuthContext, n as AuthMode, o as AuthenticatedClient, p as CitationSummary, s as CommandDescriptor, u as ConnectOptions, v as ConversationResponse, y as CreateWorkRequest, z as CreateWorkflowRequest, D as DOC_TERMINAL_STATUSES, B as DecryptedDmNotification, F as DmAttachmentFile, G as DmAttachmentInput, I as DocNameMap, J as DocumentAutomationAction, K as DocumentListFields, L as DocumentListOrder, M as DocumentSelector, N as DocumentWaiter, O as DocumentWaiterOptions, S as FormattedWsMessage, T as IdentityErrorCode, U as IdentityPurchase, V as IdentityState, W as IdentityStatus, X as ListAllOptions, Z as ListPaginatedOptions, $ as MessageLevel, a0 as MessageMetadataPayload, a1 as MessageQueuedEvent, a2 as OutputTokensDetails, a3 as ParsedSlashCommand, a4 as PendingAuthResponse, a5 as PlanWorkRequest, a7 as ProjectInvoicesResponse, a8 as ProjectUsageResponse, a9 as QueryOptions, aa as ReconnectOptions, ab as ReconnectableWsConnection, ac as ResolvedCitation, ad as ResolvedRecipient, ae as ResponseCompletedEvent, af as ResponseContentPartAddedEvent, ag as ResponseCreatedEvent, ah as ResponseFailedEvent, ai as ResponseOutputItemAddedEvent, aj as ResponseOutputItemDoneEvent, ak as ResponseOutputTextDeltaEvent, al as ResponseOutputTextDoneEvent, am as ResponseUsage, an as SSEEvent, ao as SSEStreamCallbacks, ap as SSEStreamResult, aq as SSEStreamStartData, as as SkillSummary, au as SubmitBackgroundQueryOptions, av as TaskPlan, aw as TokenBudgetContext, ax as UpdateConversationRequest, az as UpdateWorkflowRequest, aF as UserDailyUsageResponse, aG as UserInfo, aH as UserInputRequestEvent, aI as UserMessageEvent, aJ as WebSocketAuthError, aK as WorkStatus, aL as WorkflowAuthMode, aM as WorkflowResponse, aN as WorkflowRunHistoryResponse, aO as WorkflowRunResponse, aP as WorkspaceContext, aQ as WsConnection, aR as account, aS as agentconfig, aT as agents, aU as assistant, aV as authenticatedFetch, aW as buildDocNameMap, aX as buildFactsContextTool, aY as buildRetrievalChunkTool, aZ as buildRetrievalFullContextTool, a_ as buildRetrievalTocTool, a$ as connectWebSocket, b0 as connectWithReconnect, b1 as consumeSSEStream, b2 as contacts, b3 as conversations, b4 as countCitations, b5 as createAuthenticatedClient, b6 as createDocumentWaiter, b7 as dm, b8 as doctags, b9 as documents, ba as facts, bb as files, bc as filterSkills, bd as formatAgentStepLabel, be as formatFileSize, bf as formatItemLabel, bg as formatStreamSummary, bh as formatUserName, bi as formatWorkspaceChoices, bj as formatWsMessage, bk as generateEncryptedWorkspaceKey, bl as generateNewWorkspaceKey, bm as getErrorCode, bn as getErrorMessage, bo as getRawWorkspaceKey, bp as health, br as identityErrorCode, bq as identityVerification, bs as mail, bt as parseSSEEvents, bu as parseSlashCommand, bv as parseSlashTokenInProgress, bw as performPasswordLogin, bx as performSigningKeyLogin, by as performSsoDeviceFlowLogin, bz as profile, bA as projects, bB as requireData, bC as requireOk, bD as resolveAuth, bE as resolveCitations, bF as resolveWorkspace, bG as responses, bH as selectWorkspace, bI as selectWorkspaceById, bJ as sessions, bK as settings, bL as streamSSE, bM as stripCitationMarkdown, bN as summarizeCitations, bO as tags, bP as work, bQ as workflows, bR as workspaces } from './browser-BWUCi_v2.cjs';
3
3
  import { SessionStorageProvider, ArbiClient } from '@arbidocs/client';
4
4
  export { LoginProfile } from '@arbidocs/client';
5
5
 
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { t as ConfigStore, q as CliConfig, r as CliCredentials, C as ChatSession, ap as SkippedFile, aA as UploadResult, m as AuthHeaders, aw as UploadBatchResult, az as UploadOptions, ax as UploadDirectOptions, ay as UploadDirectResult, an as SUPPORTED_EXTENSIONS, W as MailAttachment, H as DmCryptoContext } from './browser-Dhk899kq.js';
2
- export { A as ActivityKind, a as ActivityResponse, d as AgentStepEvent, e as Arbi, f as ArbiApiError, g as ArbiError, i as ArbiOptions, j as ArbiSessionExpiredError, k as ArtifactEvent, l as AuthContext, n as AuthMode, o as AuthenticatedClient, p as CitationSummary, s as CommandDescriptor, u as ConnectOptions, v as ConversationResponse, y as CreateWorkRequest, z as CreateWorkflowRequest, D as DOC_TERMINAL_STATUSES, B as DecryptedDmNotification, F as DmAttachmentFile, G as DmAttachmentInput, I as DocNameMap, J as DocumentAutomationAction, K as DocumentListFields, L as DocumentListOrder, M as DocumentSelector, N as DocumentWaiter, O as DocumentWaiterOptions, S as FormattedWsMessage, T as ListAllOptions, V as ListPaginatedOptions, X as MessageLevel, Y as MessageMetadataPayload, Z as MessageQueuedEvent, _ as OutputTokensDetails, $ as ParsedSlashCommand, a0 as PendingAuthResponse, a1 as PlanWorkRequest, a3 as ProjectInvoicesResponse, a4 as ProjectUsageResponse, a5 as QueryOptions, a6 as ReconnectOptions, a7 as ReconnectableWsConnection, a8 as ResolvedCitation, a9 as ResolvedRecipient, aa as ResponseCompletedEvent, ab as ResponseContentPartAddedEvent, ac as ResponseCreatedEvent, ad as ResponseFailedEvent, ae as ResponseOutputItemAddedEvent, af as ResponseOutputItemDoneEvent, ag as ResponseOutputTextDeltaEvent, ah as ResponseOutputTextDoneEvent, ai as ResponseUsage, aj as SSEEvent, ak as SSEStreamCallbacks, al as SSEStreamResult, am as SSEStreamStartData, ao as SkillSummary, aq as SubmitBackgroundQueryOptions, ar as TaskPlan, as as TokenBudgetContext, at as UpdateConversationRequest, av as UpdateWorkflowRequest, aB as UserDailyUsageResponse, aC as UserInfo, aD as UserInputRequestEvent, aE as UserMessageEvent, aF as WebSocketAuthError, aG as WorkStatus, aH as WorkflowAuthMode, aI as WorkflowResponse, aJ as WorkflowRunHistoryResponse, aK as WorkflowRunResponse, aL as WorkspaceContext, aM as WsConnection, aN as account, aO as agentconfig, aP as agents, aQ as assistant, aR as authenticatedFetch, aS as buildDocNameMap, aT as buildFactsContextTool, aU as buildRetrievalChunkTool, aV as buildRetrievalFullContextTool, aW as buildRetrievalTocTool, aX as connectWebSocket, aY as connectWithReconnect, aZ as consumeSSEStream, a_ as contacts, a$ as conversations, b0 as countCitations, b1 as createAuthenticatedClient, b2 as createDocumentWaiter, b3 as dm, b4 as doctags, b5 as documents, b6 as facts, b7 as files, b8 as filterSkills, b9 as formatAgentStepLabel, ba as formatFileSize, bb as formatItemLabel, bc as formatStreamSummary, bd as formatUserName, be as formatWorkspaceChoices, bf as formatWsMessage, bg as generateEncryptedWorkspaceKey, bh as generateNewWorkspaceKey, bi as getErrorCode, bj as getErrorMessage, bk as getRawWorkspaceKey, bl as health, bm as mail, bn as parseSSEEvents, bo as parseSlashCommand, bp as parseSlashTokenInProgress, bq as performPasswordLogin, br as performSigningKeyLogin, bs as performSsoDeviceFlowLogin, bt as profile, bu as projects, bv as requireData, bw as requireOk, bx as resolveAuth, by as resolveCitations, bz as resolveWorkspace, bA as responses, bB as selectWorkspace, bC as selectWorkspaceById, bD as sessions, bE as settings, bF as streamSSE, bG as stripCitationMarkdown, bH as summarizeCitations, bI as tags, bJ as work, bK as workflows, bL as workspaces } from './browser-Dhk899kq.js';
1
+ import { t as ConfigStore, q as CliConfig, r as CliCredentials, C as ChatSession, at as SkippedFile, aE as UploadResult, m as AuthHeaders, aA as UploadBatchResult, aD as UploadOptions, aB as UploadDirectOptions, aC as UploadDirectResult, ar as SUPPORTED_EXTENSIONS, _ as MailAttachment, H as DmCryptoContext } from './browser-BWUCi_v2.js';
2
+ export { A as ActivityKind, a as ActivityResponse, d as AgentStepEvent, e as Arbi, f as ArbiApiError, g as ArbiError, i as ArbiOptions, j as ArbiSessionExpiredError, k as ArtifactEvent, l as AuthContext, n as AuthMode, o as AuthenticatedClient, p as CitationSummary, s as CommandDescriptor, u as ConnectOptions, v as ConversationResponse, y as CreateWorkRequest, z as CreateWorkflowRequest, D as DOC_TERMINAL_STATUSES, B as DecryptedDmNotification, F as DmAttachmentFile, G as DmAttachmentInput, I as DocNameMap, J as DocumentAutomationAction, K as DocumentListFields, L as DocumentListOrder, M as DocumentSelector, N as DocumentWaiter, O as DocumentWaiterOptions, S as FormattedWsMessage, T as IdentityErrorCode, U as IdentityPurchase, V as IdentityState, W as IdentityStatus, X as ListAllOptions, Z as ListPaginatedOptions, $ as MessageLevel, a0 as MessageMetadataPayload, a1 as MessageQueuedEvent, a2 as OutputTokensDetails, a3 as ParsedSlashCommand, a4 as PendingAuthResponse, a5 as PlanWorkRequest, a7 as ProjectInvoicesResponse, a8 as ProjectUsageResponse, a9 as QueryOptions, aa as ReconnectOptions, ab as ReconnectableWsConnection, ac as ResolvedCitation, ad as ResolvedRecipient, ae as ResponseCompletedEvent, af as ResponseContentPartAddedEvent, ag as ResponseCreatedEvent, ah as ResponseFailedEvent, ai as ResponseOutputItemAddedEvent, aj as ResponseOutputItemDoneEvent, ak as ResponseOutputTextDeltaEvent, al as ResponseOutputTextDoneEvent, am as ResponseUsage, an as SSEEvent, ao as SSEStreamCallbacks, ap as SSEStreamResult, aq as SSEStreamStartData, as as SkillSummary, au as SubmitBackgroundQueryOptions, av as TaskPlan, aw as TokenBudgetContext, ax as UpdateConversationRequest, az as UpdateWorkflowRequest, aF as UserDailyUsageResponse, aG as UserInfo, aH as UserInputRequestEvent, aI as UserMessageEvent, aJ as WebSocketAuthError, aK as WorkStatus, aL as WorkflowAuthMode, aM as WorkflowResponse, aN as WorkflowRunHistoryResponse, aO as WorkflowRunResponse, aP as WorkspaceContext, aQ as WsConnection, aR as account, aS as agentconfig, aT as agents, aU as assistant, aV as authenticatedFetch, aW as buildDocNameMap, aX as buildFactsContextTool, aY as buildRetrievalChunkTool, aZ as buildRetrievalFullContextTool, a_ as buildRetrievalTocTool, a$ as connectWebSocket, b0 as connectWithReconnect, b1 as consumeSSEStream, b2 as contacts, b3 as conversations, b4 as countCitations, b5 as createAuthenticatedClient, b6 as createDocumentWaiter, b7 as dm, b8 as doctags, b9 as documents, ba as facts, bb as files, bc as filterSkills, bd as formatAgentStepLabel, be as formatFileSize, bf as formatItemLabel, bg as formatStreamSummary, bh as formatUserName, bi as formatWorkspaceChoices, bj as formatWsMessage, bk as generateEncryptedWorkspaceKey, bl as generateNewWorkspaceKey, bm as getErrorCode, bn as getErrorMessage, bo as getRawWorkspaceKey, bp as health, br as identityErrorCode, bq as identityVerification, bs as mail, bt as parseSSEEvents, bu as parseSlashCommand, bv as parseSlashTokenInProgress, bw as performPasswordLogin, bx as performSigningKeyLogin, by as performSsoDeviceFlowLogin, bz as profile, bA as projects, bB as requireData, bC as requireOk, bD as resolveAuth, bE as resolveCitations, bF as resolveWorkspace, bG as responses, bH as selectWorkspace, bI as selectWorkspaceById, bJ as sessions, bK as settings, bL as streamSSE, bM as stripCitationMarkdown, bN as summarizeCitations, bO as tags, bP as work, bQ as workflows, bR as workspaces } from './browser-BWUCi_v2.js';
3
3
  import { SessionStorageProvider, ArbiClient } from '@arbidocs/client';
4
4
  export { LoginProfile } from '@arbidocs/client';
5
5
 
package/dist/index.js CHANGED
@@ -6470,6 +6470,76 @@ async function requestDeletion(arbi) {
6470
6470
  return requireData(await arbi.fetch.POST("/v1/user/request-deletion"), "Failed to delete account");
6471
6471
  }
6472
6472
 
6473
+ // src/operations/identity.ts
6474
+ var identity_exports = {};
6475
+ __export(identity_exports, {
6476
+ acceptName: () => acceptName,
6477
+ getStatus: () => getStatus,
6478
+ identityErrorCode: () => identityErrorCode,
6479
+ purchase: () => purchase,
6480
+ refresh: () => refresh,
6481
+ remove: () => remove,
6482
+ startSession: () => startSession
6483
+ });
6484
+ function refusal(apiError) {
6485
+ const detail = apiError?.detail;
6486
+ if (typeof detail === "string") return { message: detail };
6487
+ if (detail && typeof detail === "object" && !Array.isArray(detail)) {
6488
+ const { code, message } = detail;
6489
+ return {
6490
+ code: typeof code === "string" ? code : void 0,
6491
+ message: typeof message === "string" ? message : void 0
6492
+ };
6493
+ }
6494
+ return {};
6495
+ }
6496
+ function identityErrorCode(error) {
6497
+ return error instanceof ArbiApiError ? refusal(error.apiError).code : void 0;
6498
+ }
6499
+ function unwrap(result, fallback) {
6500
+ if (result.error || result.data === void 0) {
6501
+ throw new ArbiApiError(
6502
+ refusal(result.error).message ?? fallback,
6503
+ result.error,
6504
+ result.response?.status
6505
+ );
6506
+ }
6507
+ return result.data;
6508
+ }
6509
+ async function getStatus(arbi) {
6510
+ return unwrap(await arbi.fetch.GET("/v1/user/identity"), "Failed to load identity verification");
6511
+ }
6512
+ async function purchase(arbi, projectExtId) {
6513
+ return unwrap(
6514
+ await arbi.fetch.POST("/v1/user/identity/purchase", {
6515
+ body: projectExtId ? { project_ext_id: projectExtId } : {}
6516
+ }),
6517
+ "Payment could not be completed"
6518
+ );
6519
+ }
6520
+ async function startSession(arbi) {
6521
+ const data = unwrap(
6522
+ await arbi.fetch.POST("/v1/user/identity/session"),
6523
+ "Could not start identity verification"
6524
+ );
6525
+ return data.url;
6526
+ }
6527
+ async function refresh(arbi) {
6528
+ return unwrap(
6529
+ await arbi.fetch.POST("/v1/user/identity/refresh"),
6530
+ "Could not read the verification result"
6531
+ );
6532
+ }
6533
+ async function acceptName(arbi) {
6534
+ return unwrap(
6535
+ await arbi.fetch.POST("/v1/user/identity/accept-name"),
6536
+ "Could not change your name"
6537
+ );
6538
+ }
6539
+ async function remove(arbi) {
6540
+ return unwrap(await arbi.fetch.DELETE("/v1/user/identity"), "Could not remove the verification");
6541
+ }
6542
+
6473
6543
  // src/operations/projects.ts
6474
6544
  var projects_exports = {};
6475
6545
  __export(projects_exports, {
@@ -6486,10 +6556,10 @@ __export(projects_exports, {
6486
6556
  async function listProjects(arbi) {
6487
6557
  return requireData(await arbi.fetch.GET("/v1/user/projects/"), "Failed to fetch projects");
6488
6558
  }
6489
- async function createProject(arbi, name) {
6559
+ async function createProject(arbi, name, plan = "free") {
6490
6560
  return requireData(
6491
6561
  await arbi.fetch.POST("/v1/user/projects/", {
6492
- body: { name }
6562
+ body: { name, plan }
6493
6563
  }),
6494
6564
  "Failed to create project"
6495
6565
  );
@@ -6741,10 +6811,18 @@ var Arbi = class {
6741
6811
  this.options = options;
6742
6812
  }
6743
6813
  // ── Lifecycle ───────────────────────────────────────────────────────────
6814
+ /**
6815
+ * The deployment domain the user's keys are derived for: `deploymentDomain` when given,
6816
+ * otherwise the hostname of `url`. Signing and password changes re-derive keys with it, so a
6817
+ * host that needs it (the document tools' e-signing) reads it here rather than recomputing it.
6818
+ */
6819
+ getDeploymentDomain() {
6820
+ return this.options.deploymentDomain ?? new URL(this.options.url).hostname;
6821
+ }
6744
6822
  /** Initialize the SDK client and sodium crypto. Called automatically by login(). */
6745
6823
  async init() {
6746
6824
  if (this.client) return this.client;
6747
- const domain = this.options.deploymentDomain ?? new URL(this.options.url).hostname;
6825
+ const domain = this.getDeploymentDomain();
6748
6826
  this.client = createArbiClient({
6749
6827
  baseUrl: this.options.url,
6750
6828
  deploymentDomain: domain,
@@ -7007,7 +7085,8 @@ var Arbi = class {
7007
7085
  ...this.userProfile,
7008
7086
  givenName: updated.given_name ?? this.userProfile.givenName,
7009
7087
  familyName: updated.family_name ?? null,
7010
- picture: updated.picture ?? null
7088
+ picture: updated.picture ?? null,
7089
+ isIdentityVerified: updated.is_identity_verified ?? false
7011
7090
  });
7012
7091
  }
7013
7092
  return updated;
@@ -7039,7 +7118,7 @@ var Arbi = class {
7039
7118
  { ...params, email, userExtId: lr2.userExtId },
7040
7119
  {
7041
7120
  fetchClient: client.fetch,
7042
- deploymentDomain: this.options.deploymentDomain ?? new URL(this.options.url).hostname
7121
+ deploymentDomain: this.getDeploymentDomain()
7043
7122
  }
7044
7123
  );
7045
7124
  this.loginResult = { ...lr2, signingPrivateKey: result.newSigningPrivateKey };
@@ -7052,6 +7131,49 @@ var Arbi = class {
7052
7131
  return result;
7053
7132
  }
7054
7133
  };
7134
+ // ── Identity verification ─────────────────────────────────────────────
7135
+ identity = {
7136
+ /** Whether the ID check is offered (Pro plans), its price, and where the user's check stands. */
7137
+ status: () => getStatus(this.requireClient()),
7138
+ /** Charge the one-time fee to an own Pro project; `requires_action` carries a payment URL. */
7139
+ purchase: (projectExtId) => purchase(this.requireClient(), projectExtId),
7140
+ /** The Didit session URL to run the web SDK on. */
7141
+ startSession: () => startSession(this.requireClient()),
7142
+ /** Read the decision of the open check; the profile follows a granted tick. */
7143
+ refresh: async () => {
7144
+ const status = await refresh(this.requireClient());
7145
+ this.syncIdentity(status);
7146
+ return status;
7147
+ },
7148
+ /** Take the name on the document as the account name; the profile follows. */
7149
+ acceptName: async () => {
7150
+ const client = this.requireClient();
7151
+ const offered = await getStatus(client);
7152
+ const status = await acceptName(client);
7153
+ if (this.userProfile && offered.document_given_name) {
7154
+ this.setUserProfile({
7155
+ ...this.userProfile,
7156
+ givenName: offered.document_given_name,
7157
+ familyName: offered.document_family_name ?? null,
7158
+ isIdentityVerified: status.verified
7159
+ });
7160
+ } else {
7161
+ this.syncIdentity(status);
7162
+ }
7163
+ return status;
7164
+ },
7165
+ /** Remove the tick and erase any open check. */
7166
+ remove: async () => {
7167
+ const status = await remove(this.requireClient());
7168
+ this.syncIdentity(status);
7169
+ return status;
7170
+ }
7171
+ };
7172
+ syncIdentity(status) {
7173
+ if (this.userProfile && this.userProfile.isIdentityVerified !== status.verified) {
7174
+ this.setUserProfile({ ...this.userProfile, isIdentityVerified: status.verified });
7175
+ }
7176
+ }
7055
7177
  // ── Workspaces ────────────────────────────────────────────────────────
7056
7178
  workspaces = {
7057
7179
  list: () => listWorkspaces(this.requireClient()),
@@ -8746,6 +8868,6 @@ async function startDmListener(options) {
8746
8868
  };
8747
8869
  }
8748
8870
 
8749
- export { Arbi, ArbiApiError, ArbiError, ArbiSessionExpiredError, ClaudeOrchestrator, DOC_TERMINAL_STATUSES, FileConfigStore, OpenClawOrchestrator, WebSocketAuthError, account_exports as account, agentconfig_exports as agentconfig, agents_exports as agents, assistant_exports as assistant, authenticatedFetch, buildDocNameMap, buildFactsContextTool, buildRetrievalChunkTool, buildRetrievalFullContextTool, buildRetrievalTocTool, connectWebSocket, connectWithReconnect, consumeSSEStream, contacts_exports as contacts, conversations_exports as conversations, countCitations, createAuthenticatedClient, createDocumentWaiter, device_flow_exports as deviceFlow, dm_exports as dm, doctags_exports as doctags, documents_exports as documents, documents_node_exports as documentsNode, facts_exports as facts, files_exports as files, filterSkills, formatAgentStepLabel, formatFileSize, formatItemLabel, formatStreamSummary, formatUserName, formatWorkspaceChoices, formatWsMessage, generateEncryptedWorkspaceKey, generateNewWorkspaceKey, getErrorCode, getErrorMessage, getRawWorkspaceKey, health_exports as health, listen_exports as listen, mail_exports as mail, mail_node_exports as mailNode, parseSSEEvents, parseSlashCommand, parseSlashTokenInProgress, performPasswordLogin, performSigningKeyLogin, performSsoDeviceFlowLogin, 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, startDmListener, streamSSE, stripCitationMarkdown, summarizeCitations, tags_exports as tags, work_exports as work, workflows_exports as workflows, workspaces_exports as workspaces };
8871
+ export { Arbi, ArbiApiError, ArbiError, ArbiSessionExpiredError, ClaudeOrchestrator, DOC_TERMINAL_STATUSES, FileConfigStore, OpenClawOrchestrator, WebSocketAuthError, account_exports as account, agentconfig_exports as agentconfig, agents_exports as agents, assistant_exports as assistant, authenticatedFetch, buildDocNameMap, buildFactsContextTool, buildRetrievalChunkTool, buildRetrievalFullContextTool, buildRetrievalTocTool, connectWebSocket, connectWithReconnect, consumeSSEStream, contacts_exports as contacts, conversations_exports as conversations, countCitations, createAuthenticatedClient, createDocumentWaiter, device_flow_exports as deviceFlow, dm_exports as dm, doctags_exports as doctags, documents_exports as documents, documents_node_exports as documentsNode, facts_exports as facts, files_exports as files, filterSkills, formatAgentStepLabel, formatFileSize, formatItemLabel, formatStreamSummary, formatUserName, formatWorkspaceChoices, formatWsMessage, generateEncryptedWorkspaceKey, generateNewWorkspaceKey, getErrorCode, getErrorMessage, getRawWorkspaceKey, health_exports as health, identityErrorCode, identity_exports as identityVerification, listen_exports as listen, mail_exports as mail, mail_node_exports as mailNode, parseSSEEvents, parseSlashCommand, parseSlashTokenInProgress, performPasswordLogin, performSigningKeyLogin, performSsoDeviceFlowLogin, 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, startDmListener, streamSSE, stripCitationMarkdown, summarizeCitations, tags_exports as tags, work_exports as work, workflows_exports as workflows, workspaces_exports as workspaces };
8750
8872
  //# sourceMappingURL=index.js.map
8751
8873
  //# sourceMappingURL=index.js.map