@arbidocs/sdk 0.4.108 → 0.4.110
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-yXZhW9gn.d.cts → browser-ig67Srk0.d.cts} +687 -519
- package/dist/{browser-yXZhW9gn.d.ts → browser-ig67Srk0.d.ts} +687 -519
- package/dist/browser.cjs +508 -248
- 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 +508 -249
- package/dist/browser.js.map +1 -1
- package/dist/index.cjs +572 -292
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +69 -16
- package/dist/index.d.ts +69 -16
- package/dist/index.js +571 -293
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
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
|
|
3
|
-
import { SessionStorageProvider, ArbiClient } from '@arbidocs/client';
|
|
1
|
+
import { E as ConfigStore, z as CliConfig, B as CliCredentials, x as ChatSession, aS as SkippedFile, bm as UploadResult, m as AuthHeaders, bi as UploadBatchResult, bl as UploadOptions, bj as UploadDirectOptions, bk as UploadDirectResult, aP as SUPPORTED_EXTENSIONS, a8 as MailAttachment, q as ChatCryptoContext } from './browser-ig67Srk0.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, C as ChatAttachmentFile, p as ChatAttachmentInput, r as ChatKeyRing, s as ChatKind, t as ChatMemberKey, u as ChatMemberResponse, v as ChatMessageResponse, w as ChatResponse, y as CitationSummary, D as CommandDescriptor, F as ConnectOptions, G as ConversationResponse, H as ConversationUsageResponse, K as CreateWorkRequest, L as CreateWorkflowRequest, M as DEFAULT_AI_USD_PER_GBP, N as DOC_TERMINAL_STATUSES, O as DecryptedChat, P as DecryptedChatMessage, R as DocNameMap, S as DocumentAutomationAction, T as DocumentListFields, U as DocumentListOrder, V as DocumentSelector, W as DocumentWaiter, X as DocumentWaiterOptions, $ as FormattedWsMessage, a0 as IdentityErrorCode, a1 as IdentityPurchase, a2 as IdentityState, a3 as IdentityStatus, a4 as LinkedRun, a5 as ListAllOptions, a7 as ListPaginatedOptions, a9 as MailDraftSSEEvent, aa as MessageLevel, ab as MessageMetadataPayload, ac as MessageQueuedEvent, ad as OutputTokensDetails, ae as ParsedSlashCommand, af as PendingAuthResponse, ag as PlanStepsError, ah as PlanWorkRequest, aj as ProjectBudget, ak as ProjectConversationUsageResponse, al as ProjectDetails, am as ProjectEventKind, an as ProjectEventResponse, ao as ProjectInvoicesResponse, ap as ProjectResponse, aq as ProjectUpdateRequest, ar as ProjectUsageResponse, as as QueryOptions, at as RaisedSignal, au as ReconnectOptions, av as ReconnectableWsConnection, aw as ResolvedCitation, ax as ResolvedRecipient, ay as ResponseCompletedEvent, az as ResponseContentPartAddedEvent, aA as ResponseCreatedEvent, aB as ResponseFailedEvent, aC as ResponseOutputItemAddedEvent, aD as ResponseOutputItemDoneEvent, aE as ResponseOutputTextDeltaEvent, aF as ResponseOutputTextDoneEvent, aG as ResponseUsage, aH as RunProgress, aI as RunStep, aJ as RunWaitingOn, aK as SSEEvent, aL as SSEStreamCallbacks, aM as SSEStreamResult, aN as SSEStreamStartData, aO as STEP_FIELD_OPTION_TONES, aQ as SendBack, aR as SkillSummary, aT as StepActionRequest, aU as StepActivityEvent, aV as StepAssignee, aW as StepField, aX as StepFieldOption, aY as StepFieldOptionTone, aZ as StepKind, a_ as StepPhase, a$ as StepSignal, b0 as StepSignalWhen, b1 as StepState, b2 as StepStatus, b3 as SubmitBackgroundQueryOptions, b4 as TagChange, b5 as TagFieldDefinition, b6 as TagKind, b7 as TagKindField, b8 as TagKindSchema, b9 as TagLinks, ba as TagListQuery, bb as TagResponse, bc as TaskPlan, bd as TaskPlanStep, be as TokenBudgetContext, bf as UpdateConversationRequest, bh as UpdateWorkflowRequest, bn as UsageBreakdown, bo as UserDailyUsageResponse, bp as UserInfo, bq as UserInputRequestEvent, br as UserMessageEvent, bs as WebSocketAuthError, bt as WorkStatus, bu as WorkflowAuthMode, bv as WorkflowResponse, bw as WorkflowRunHistoryResponse, bx as WorkflowRunResponse, by as WorkspaceContext, bz as WsConnection, bA as account, bB as agentconfig, bC as agents, bD as assistant, bE as authenticatedFetch, bF as buildDocNameMap, bG as buildFactsContextTool, bH as buildRetrievalChunkTool, bI as buildRetrievalFullContextTool, bJ as buildRetrievalTocTool, bK as chats, bL as connectWebSocket, bM as connectWithReconnect, bN as consumeSSEStream, bO as contacts, bP as conversations, bQ as countCitations, bR as createAuthenticatedClient, bS as createDocumentWaiter, bT as doctags, bU as documents, bV as facts, bW as files, bX as filterSkills, bY as formatAgentStepLabel, bZ as formatFileSize, b_ as formatGbp, b$ as formatGbpPerMillionTokens, c0 as formatItemLabel, c1 as formatStreamSummary, c2 as formatUserName, c3 as formatWorkspaceChoices, c4 as formatWsMessage, c5 as generateEncryptedWorkspaceKey, c6 as generateNewWorkspaceKey, c7 as getErrorCode, c8 as getErrorMessage, c9 as getRawWorkspaceKey, ca as health, cc as identityErrorCode, cb as identityVerification, cd as mail, ce as notifications, cf as parseSSEEvents, cg as parseSlashCommand, ch as parseSlashTokenInProgress, ci as performPasswordLogin, cj as performSigningKeyLogin, ck as performSsoDeviceFlowLogin, cl as profile, cm as projects, cn as requireData, co as requireOk, cp as resolveAuth, cq as resolveCitations, cr as resolveWorkspace, cs as responses, ct as selectWorkspace, cu as selectWorkspaceById, cv as sessions, cw as settings, cx as signatureRequests, cy as streamSSE, cz as stripCitationMarkdown, cA as summarizeCitations, cB as tags, cC as usdToGbp, cD as work, cE as workflowSteps, cF as workflows, cG as workspaces } from './browser-ig67Srk0.cjs';
|
|
3
|
+
import { SessionStorageProvider, ArbiClient, components } from '@arbidocs/client';
|
|
4
4
|
export { LoginProfile } from '@arbidocs/client';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -387,6 +387,59 @@ declare namespace mailNode {
|
|
|
387
387
|
export { mailNode_attachmentFromFile as attachmentFromFile };
|
|
388
388
|
}
|
|
389
389
|
|
|
390
|
+
/**
|
|
391
|
+
* Firm operations — the deployment's pooled monthly £ of AI usage (Box deployments).
|
|
392
|
+
*/
|
|
393
|
+
|
|
394
|
+
type FirmPoolResponse = components['schemas']['FirmPoolResponse'];
|
|
395
|
+
/**
|
|
396
|
+
* The firm's AI usage pool this month (£): licence, add-ons, used of total, auto add-ons, and whether
|
|
397
|
+
* the caller may top up. `has_pool` is false where the deployment has no pooled budget. Readable by
|
|
398
|
+
* firm members and Box admins; anyone else gets a 403.
|
|
399
|
+
*/
|
|
400
|
+
declare function getFirmPool(arbi: ArbiClient): Promise<FirmPoolResponse>;
|
|
401
|
+
/**
|
|
402
|
+
* Buy `aiAddons` renewing add-ons (+£10 of AI usage a month each) for the whole firm. Box admins only. Returns the
|
|
403
|
+
* updated pool and, when the payment needs the customer, the invoice to open.
|
|
404
|
+
*/
|
|
405
|
+
declare function topUpFirmPool(arbi: ArbiClient, aiAddons: number): Promise<{
|
|
406
|
+
pool: {
|
|
407
|
+
has_pool: boolean;
|
|
408
|
+
month?: string | null | undefined;
|
|
409
|
+
resets_at?: string | null | undefined;
|
|
410
|
+
licence_status?: string | null | undefined;
|
|
411
|
+
expires_at?: string | null | undefined;
|
|
412
|
+
premium_only: boolean;
|
|
413
|
+
box_seats?: number | null | undefined;
|
|
414
|
+
plus_seats?: number | null | undefined;
|
|
415
|
+
ai_addons?: number | null | undefined;
|
|
416
|
+
addon_gbp?: number | null | undefined;
|
|
417
|
+
base_gbp?: number | null | undefined;
|
|
418
|
+
auto_addons?: number | null | undefined;
|
|
419
|
+
auto_addon_gbp?: number | null | undefined;
|
|
420
|
+
auto_addon_price_pence?: number | null | undefined;
|
|
421
|
+
auto_addon_spent_pence?: number | null | undefined;
|
|
422
|
+
auto_addon_limit_pence?: number | null | undefined;
|
|
423
|
+
total_gbp?: number | null | undefined;
|
|
424
|
+
used_gbp?: number | null | undefined;
|
|
425
|
+
remaining_gbp?: number | null | undefined;
|
|
426
|
+
people_this_month?: number | null | undefined;
|
|
427
|
+
report_computed_at?: string | null | undefined;
|
|
428
|
+
subscription_status?: string | null | undefined;
|
|
429
|
+
cancel_at_period_end?: boolean | null | undefined;
|
|
430
|
+
period_end?: string | null | undefined;
|
|
431
|
+
can_top_up: boolean;
|
|
432
|
+
};
|
|
433
|
+
invoice_url?: string | null | undefined;
|
|
434
|
+
}>;
|
|
435
|
+
|
|
436
|
+
type firm_FirmPoolResponse = FirmPoolResponse;
|
|
437
|
+
declare const firm_getFirmPool: typeof getFirmPool;
|
|
438
|
+
declare const firm_topUpFirmPool: typeof topUpFirmPool;
|
|
439
|
+
declare namespace firm {
|
|
440
|
+
export { type firm_FirmPoolResponse as FirmPoolResponse, firm_getFirmPool as getFirmPool, firm_topUpFirmPool as topUpFirmPool };
|
|
441
|
+
}
|
|
442
|
+
|
|
390
443
|
/**
|
|
391
444
|
* Orchestrator interface for `arbi listen`.
|
|
392
445
|
*
|
|
@@ -504,12 +557,13 @@ declare class OpenClawOrchestrator implements Orchestrator {
|
|
|
504
557
|
}
|
|
505
558
|
|
|
506
559
|
/**
|
|
507
|
-
*
|
|
560
|
+
* PA chat listener loop.
|
|
508
561
|
*
|
|
509
|
-
* Connects to the WebSocket, listens for
|
|
510
|
-
* routes to an orchestrator,
|
|
562
|
+
* Connects to the WebSocket, listens for new messages in the agent's direct chat with its owner,
|
|
563
|
+
* decrypts them, routes them to an orchestrator, and posts the encrypted reply back to that chat.
|
|
511
564
|
*
|
|
512
|
-
* Only
|
|
565
|
+
* Only the owner (parent user) is answered: a personal agent is only ever a member of a direct
|
|
566
|
+
* chat with its owner, so any other sender is ignored.
|
|
513
567
|
*/
|
|
514
568
|
|
|
515
569
|
interface DmListenerOptions {
|
|
@@ -518,8 +572,8 @@ interface DmListenerOptions {
|
|
|
518
572
|
arbi: ArbiClient;
|
|
519
573
|
/** Base URL of the ARBI server */
|
|
520
574
|
baseUrl: string;
|
|
521
|
-
/**
|
|
522
|
-
crypto:
|
|
575
|
+
/** Chat crypto context (the agent's own keys) */
|
|
576
|
+
crypto: ChatCryptoContext;
|
|
523
577
|
/** Orchestrator to route prompts to */
|
|
524
578
|
orchestrator: Orchestrator;
|
|
525
579
|
/** Parent user ext_id — only process messages from this sender */
|
|
@@ -534,14 +588,13 @@ interface DmListener {
|
|
|
534
588
|
close(): void;
|
|
535
589
|
}
|
|
536
590
|
/**
|
|
537
|
-
* Start listening for
|
|
591
|
+
* Start listening for the owner's messages and routing them to the orchestrator.
|
|
538
592
|
*
|
|
539
|
-
* Connects via WebSocket with auto-reconnect. For each
|
|
540
|
-
* 1. Filters to parent user only
|
|
541
|
-
* 2. Decrypts the
|
|
593
|
+
* Connects via WebSocket with auto-reconnect. For each new `chat.message` in a direct chat:
|
|
594
|
+
* 1. Filters to the parent user only (and skips context-only notes)
|
|
595
|
+
* 2. Decrypts it with the direct-chat key
|
|
542
596
|
* 3. Sends plaintext to orchestrator.prompt()
|
|
543
|
-
* 4.
|
|
544
|
-
* 5. Sends encrypted reply via DM
|
|
597
|
+
* 4. Posts the encrypted reply to the same chat and moves the read watermark
|
|
545
598
|
*/
|
|
546
599
|
declare function startDmListener(options: DmListenerOptions): Promise<DmListener>;
|
|
547
600
|
|
|
@@ -564,4 +617,4 @@ declare namespace index {
|
|
|
564
617
|
export { index_ClaudeOrchestrator as ClaudeOrchestrator, type index_ClaudeOrchestratorOptions as ClaudeOrchestratorOptions, type index_DmListener as DmListener, type index_DmListenerOptions as DmListenerOptions, index_OpenClawOrchestrator as OpenClawOrchestrator, type index_OpenClawOrchestratorOptions as OpenClawOrchestratorOptions, type index_Orchestrator as Orchestrator, type index_PromptContext as PromptContext, index_startDmListener as startDmListener };
|
|
565
618
|
}
|
|
566
619
|
|
|
567
|
-
export { AuthHeaders, ChatSession, ClaudeOrchestrator, type ClaudeOrchestratorOptions, CliConfig, CliCredentials, ConfigStore,
|
|
620
|
+
export { AuthHeaders, ChatCryptoContext, ChatSession, ClaudeOrchestrator, type ClaudeOrchestratorOptions, CliConfig, CliCredentials, ConfigStore, type DmListener, type DmListenerOptions, FileConfigStore, type FirmPoolResponse, OpenClawOrchestrator, type OpenClawOrchestratorOptions, type Orchestrator, type PromptContext, deviceFlow, documentsNode, firm, index as listen, mailNode, startDmListener };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
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
|
|
3
|
-
import { SessionStorageProvider, ArbiClient } from '@arbidocs/client';
|
|
1
|
+
import { E as ConfigStore, z as CliConfig, B as CliCredentials, x as ChatSession, aS as SkippedFile, bm as UploadResult, m as AuthHeaders, bi as UploadBatchResult, bl as UploadOptions, bj as UploadDirectOptions, bk as UploadDirectResult, aP as SUPPORTED_EXTENSIONS, a8 as MailAttachment, q as ChatCryptoContext } from './browser-ig67Srk0.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, C as ChatAttachmentFile, p as ChatAttachmentInput, r as ChatKeyRing, s as ChatKind, t as ChatMemberKey, u as ChatMemberResponse, v as ChatMessageResponse, w as ChatResponse, y as CitationSummary, D as CommandDescriptor, F as ConnectOptions, G as ConversationResponse, H as ConversationUsageResponse, K as CreateWorkRequest, L as CreateWorkflowRequest, M as DEFAULT_AI_USD_PER_GBP, N as DOC_TERMINAL_STATUSES, O as DecryptedChat, P as DecryptedChatMessage, R as DocNameMap, S as DocumentAutomationAction, T as DocumentListFields, U as DocumentListOrder, V as DocumentSelector, W as DocumentWaiter, X as DocumentWaiterOptions, $ as FormattedWsMessage, a0 as IdentityErrorCode, a1 as IdentityPurchase, a2 as IdentityState, a3 as IdentityStatus, a4 as LinkedRun, a5 as ListAllOptions, a7 as ListPaginatedOptions, a9 as MailDraftSSEEvent, aa as MessageLevel, ab as MessageMetadataPayload, ac as MessageQueuedEvent, ad as OutputTokensDetails, ae as ParsedSlashCommand, af as PendingAuthResponse, ag as PlanStepsError, ah as PlanWorkRequest, aj as ProjectBudget, ak as ProjectConversationUsageResponse, al as ProjectDetails, am as ProjectEventKind, an as ProjectEventResponse, ao as ProjectInvoicesResponse, ap as ProjectResponse, aq as ProjectUpdateRequest, ar as ProjectUsageResponse, as as QueryOptions, at as RaisedSignal, au as ReconnectOptions, av as ReconnectableWsConnection, aw as ResolvedCitation, ax as ResolvedRecipient, ay as ResponseCompletedEvent, az as ResponseContentPartAddedEvent, aA as ResponseCreatedEvent, aB as ResponseFailedEvent, aC as ResponseOutputItemAddedEvent, aD as ResponseOutputItemDoneEvent, aE as ResponseOutputTextDeltaEvent, aF as ResponseOutputTextDoneEvent, aG as ResponseUsage, aH as RunProgress, aI as RunStep, aJ as RunWaitingOn, aK as SSEEvent, aL as SSEStreamCallbacks, aM as SSEStreamResult, aN as SSEStreamStartData, aO as STEP_FIELD_OPTION_TONES, aQ as SendBack, aR as SkillSummary, aT as StepActionRequest, aU as StepActivityEvent, aV as StepAssignee, aW as StepField, aX as StepFieldOption, aY as StepFieldOptionTone, aZ as StepKind, a_ as StepPhase, a$ as StepSignal, b0 as StepSignalWhen, b1 as StepState, b2 as StepStatus, b3 as SubmitBackgroundQueryOptions, b4 as TagChange, b5 as TagFieldDefinition, b6 as TagKind, b7 as TagKindField, b8 as TagKindSchema, b9 as TagLinks, ba as TagListQuery, bb as TagResponse, bc as TaskPlan, bd as TaskPlanStep, be as TokenBudgetContext, bf as UpdateConversationRequest, bh as UpdateWorkflowRequest, bn as UsageBreakdown, bo as UserDailyUsageResponse, bp as UserInfo, bq as UserInputRequestEvent, br as UserMessageEvent, bs as WebSocketAuthError, bt as WorkStatus, bu as WorkflowAuthMode, bv as WorkflowResponse, bw as WorkflowRunHistoryResponse, bx as WorkflowRunResponse, by as WorkspaceContext, bz as WsConnection, bA as account, bB as agentconfig, bC as agents, bD as assistant, bE as authenticatedFetch, bF as buildDocNameMap, bG as buildFactsContextTool, bH as buildRetrievalChunkTool, bI as buildRetrievalFullContextTool, bJ as buildRetrievalTocTool, bK as chats, bL as connectWebSocket, bM as connectWithReconnect, bN as consumeSSEStream, bO as contacts, bP as conversations, bQ as countCitations, bR as createAuthenticatedClient, bS as createDocumentWaiter, bT as doctags, bU as documents, bV as facts, bW as files, bX as filterSkills, bY as formatAgentStepLabel, bZ as formatFileSize, b_ as formatGbp, b$ as formatGbpPerMillionTokens, c0 as formatItemLabel, c1 as formatStreamSummary, c2 as formatUserName, c3 as formatWorkspaceChoices, c4 as formatWsMessage, c5 as generateEncryptedWorkspaceKey, c6 as generateNewWorkspaceKey, c7 as getErrorCode, c8 as getErrorMessage, c9 as getRawWorkspaceKey, ca as health, cc as identityErrorCode, cb as identityVerification, cd as mail, ce as notifications, cf as parseSSEEvents, cg as parseSlashCommand, ch as parseSlashTokenInProgress, ci as performPasswordLogin, cj as performSigningKeyLogin, ck as performSsoDeviceFlowLogin, cl as profile, cm as projects, cn as requireData, co as requireOk, cp as resolveAuth, cq as resolveCitations, cr as resolveWorkspace, cs as responses, ct as selectWorkspace, cu as selectWorkspaceById, cv as sessions, cw as settings, cx as signatureRequests, cy as streamSSE, cz as stripCitationMarkdown, cA as summarizeCitations, cB as tags, cC as usdToGbp, cD as work, cE as workflowSteps, cF as workflows, cG as workspaces } from './browser-ig67Srk0.js';
|
|
3
|
+
import { SessionStorageProvider, ArbiClient, components } from '@arbidocs/client';
|
|
4
4
|
export { LoginProfile } from '@arbidocs/client';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -387,6 +387,59 @@ declare namespace mailNode {
|
|
|
387
387
|
export { mailNode_attachmentFromFile as attachmentFromFile };
|
|
388
388
|
}
|
|
389
389
|
|
|
390
|
+
/**
|
|
391
|
+
* Firm operations — the deployment's pooled monthly £ of AI usage (Box deployments).
|
|
392
|
+
*/
|
|
393
|
+
|
|
394
|
+
type FirmPoolResponse = components['schemas']['FirmPoolResponse'];
|
|
395
|
+
/**
|
|
396
|
+
* The firm's AI usage pool this month (£): licence, add-ons, used of total, auto add-ons, and whether
|
|
397
|
+
* the caller may top up. `has_pool` is false where the deployment has no pooled budget. Readable by
|
|
398
|
+
* firm members and Box admins; anyone else gets a 403.
|
|
399
|
+
*/
|
|
400
|
+
declare function getFirmPool(arbi: ArbiClient): Promise<FirmPoolResponse>;
|
|
401
|
+
/**
|
|
402
|
+
* Buy `aiAddons` renewing add-ons (+£10 of AI usage a month each) for the whole firm. Box admins only. Returns the
|
|
403
|
+
* updated pool and, when the payment needs the customer, the invoice to open.
|
|
404
|
+
*/
|
|
405
|
+
declare function topUpFirmPool(arbi: ArbiClient, aiAddons: number): Promise<{
|
|
406
|
+
pool: {
|
|
407
|
+
has_pool: boolean;
|
|
408
|
+
month?: string | null | undefined;
|
|
409
|
+
resets_at?: string | null | undefined;
|
|
410
|
+
licence_status?: string | null | undefined;
|
|
411
|
+
expires_at?: string | null | undefined;
|
|
412
|
+
premium_only: boolean;
|
|
413
|
+
box_seats?: number | null | undefined;
|
|
414
|
+
plus_seats?: number | null | undefined;
|
|
415
|
+
ai_addons?: number | null | undefined;
|
|
416
|
+
addon_gbp?: number | null | undefined;
|
|
417
|
+
base_gbp?: number | null | undefined;
|
|
418
|
+
auto_addons?: number | null | undefined;
|
|
419
|
+
auto_addon_gbp?: number | null | undefined;
|
|
420
|
+
auto_addon_price_pence?: number | null | undefined;
|
|
421
|
+
auto_addon_spent_pence?: number | null | undefined;
|
|
422
|
+
auto_addon_limit_pence?: number | null | undefined;
|
|
423
|
+
total_gbp?: number | null | undefined;
|
|
424
|
+
used_gbp?: number | null | undefined;
|
|
425
|
+
remaining_gbp?: number | null | undefined;
|
|
426
|
+
people_this_month?: number | null | undefined;
|
|
427
|
+
report_computed_at?: string | null | undefined;
|
|
428
|
+
subscription_status?: string | null | undefined;
|
|
429
|
+
cancel_at_period_end?: boolean | null | undefined;
|
|
430
|
+
period_end?: string | null | undefined;
|
|
431
|
+
can_top_up: boolean;
|
|
432
|
+
};
|
|
433
|
+
invoice_url?: string | null | undefined;
|
|
434
|
+
}>;
|
|
435
|
+
|
|
436
|
+
type firm_FirmPoolResponse = FirmPoolResponse;
|
|
437
|
+
declare const firm_getFirmPool: typeof getFirmPool;
|
|
438
|
+
declare const firm_topUpFirmPool: typeof topUpFirmPool;
|
|
439
|
+
declare namespace firm {
|
|
440
|
+
export { type firm_FirmPoolResponse as FirmPoolResponse, firm_getFirmPool as getFirmPool, firm_topUpFirmPool as topUpFirmPool };
|
|
441
|
+
}
|
|
442
|
+
|
|
390
443
|
/**
|
|
391
444
|
* Orchestrator interface for `arbi listen`.
|
|
392
445
|
*
|
|
@@ -504,12 +557,13 @@ declare class OpenClawOrchestrator implements Orchestrator {
|
|
|
504
557
|
}
|
|
505
558
|
|
|
506
559
|
/**
|
|
507
|
-
*
|
|
560
|
+
* PA chat listener loop.
|
|
508
561
|
*
|
|
509
|
-
* Connects to the WebSocket, listens for
|
|
510
|
-
* routes to an orchestrator,
|
|
562
|
+
* Connects to the WebSocket, listens for new messages in the agent's direct chat with its owner,
|
|
563
|
+
* decrypts them, routes them to an orchestrator, and posts the encrypted reply back to that chat.
|
|
511
564
|
*
|
|
512
|
-
* Only
|
|
565
|
+
* Only the owner (parent user) is answered: a personal agent is only ever a member of a direct
|
|
566
|
+
* chat with its owner, so any other sender is ignored.
|
|
513
567
|
*/
|
|
514
568
|
|
|
515
569
|
interface DmListenerOptions {
|
|
@@ -518,8 +572,8 @@ interface DmListenerOptions {
|
|
|
518
572
|
arbi: ArbiClient;
|
|
519
573
|
/** Base URL of the ARBI server */
|
|
520
574
|
baseUrl: string;
|
|
521
|
-
/**
|
|
522
|
-
crypto:
|
|
575
|
+
/** Chat crypto context (the agent's own keys) */
|
|
576
|
+
crypto: ChatCryptoContext;
|
|
523
577
|
/** Orchestrator to route prompts to */
|
|
524
578
|
orchestrator: Orchestrator;
|
|
525
579
|
/** Parent user ext_id — only process messages from this sender */
|
|
@@ -534,14 +588,13 @@ interface DmListener {
|
|
|
534
588
|
close(): void;
|
|
535
589
|
}
|
|
536
590
|
/**
|
|
537
|
-
* Start listening for
|
|
591
|
+
* Start listening for the owner's messages and routing them to the orchestrator.
|
|
538
592
|
*
|
|
539
|
-
* Connects via WebSocket with auto-reconnect. For each
|
|
540
|
-
* 1. Filters to parent user only
|
|
541
|
-
* 2. Decrypts the
|
|
593
|
+
* Connects via WebSocket with auto-reconnect. For each new `chat.message` in a direct chat:
|
|
594
|
+
* 1. Filters to the parent user only (and skips context-only notes)
|
|
595
|
+
* 2. Decrypts it with the direct-chat key
|
|
542
596
|
* 3. Sends plaintext to orchestrator.prompt()
|
|
543
|
-
* 4.
|
|
544
|
-
* 5. Sends encrypted reply via DM
|
|
597
|
+
* 4. Posts the encrypted reply to the same chat and moves the read watermark
|
|
545
598
|
*/
|
|
546
599
|
declare function startDmListener(options: DmListenerOptions): Promise<DmListener>;
|
|
547
600
|
|
|
@@ -564,4 +617,4 @@ declare namespace index {
|
|
|
564
617
|
export { index_ClaudeOrchestrator as ClaudeOrchestrator, type index_ClaudeOrchestratorOptions as ClaudeOrchestratorOptions, type index_DmListener as DmListener, type index_DmListenerOptions as DmListenerOptions, index_OpenClawOrchestrator as OpenClawOrchestrator, type index_OpenClawOrchestratorOptions as OpenClawOrchestratorOptions, type index_Orchestrator as Orchestrator, type index_PromptContext as PromptContext, index_startDmListener as startDmListener };
|
|
565
618
|
}
|
|
566
619
|
|
|
567
|
-
export { AuthHeaders, ChatSession, ClaudeOrchestrator, type ClaudeOrchestratorOptions, CliConfig, CliCredentials, ConfigStore,
|
|
620
|
+
export { AuthHeaders, ChatCryptoContext, ChatSession, ClaudeOrchestrator, type ClaudeOrchestratorOptions, CliConfig, CliCredentials, ConfigStore, type DmListener, type DmListenerOptions, FileConfigStore, type FirmPoolResponse, OpenClawOrchestrator, type OpenClawOrchestratorOptions, type Orchestrator, type PromptContext, deviceFlow, documentsNode, firm, index as listen, mailNode, startDmListener };
|