@arbidocs/sdk 0.4.131 → 0.4.132

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.
@@ -4155,6 +4155,13 @@ declare function listAgentWorkspaces(arbi: ArbiClient, agentExtId: string): Prom
4155
4155
  declare function deleteAgents(arbi: ArbiClient, agentExtIds: string[]): Promise<{
4156
4156
  [x: string]: unknown;
4157
4157
  }>;
4158
+ /**
4159
+ * Generate an avatar for an owned agent from a prompt (usually composed from its persona) and set
4160
+ * it as the agent's picture. Resolves with the agent, `picture` set (a small square WebP data URL).
4161
+ */
4162
+ declare function generateAgentAvatar(arbi: ArbiClient, agentExtId: string, prompt: string): Promise<{
4163
+ picture: string;
4164
+ }>;
4158
4165
  /**
4159
4166
  * Mint a fresh, TTL'd run session for the caller's own agent
4160
4167
  * (`POST /v1/agents/{id}/authorize`). The response carries the session's public key; deposit a
@@ -4199,6 +4206,7 @@ declare const agents_authorizeAgent: typeof authorizeAgent;
4199
4206
  declare const agents_closeAgentSession: typeof closeAgentSession;
4200
4207
  declare const agents_createAgent: typeof createAgent;
4201
4208
  declare const agents_deleteAgents: typeof deleteAgents;
4209
+ declare const agents_generateAgentAvatar: typeof generateAgentAvatar;
4202
4210
  declare const agents_getAgentConfig: typeof getAgentConfig;
4203
4211
  declare const agents_getAgentSession: typeof getAgentSession;
4204
4212
  declare const agents_getAuthorizeLimits: typeof getAuthorizeLimits;
@@ -4208,7 +4216,7 @@ declare const agents_listAgents: typeof listAgents;
4208
4216
  declare const agents_stageAgentFile: typeof stageAgentFile;
4209
4217
  declare const agents_startAgentSession: typeof startAgentSession;
4210
4218
  declare namespace agents {
4211
- export { type agents_AuthorizeAgentResponse as AuthorizeAgentResponse, type agents_AuthorizeLimitsResponse as AuthorizeLimitsResponse, type agents_StagedAgentFile as StagedAgentFile, agents_authorizeAgent as authorizeAgent, agents_closeAgentSession as closeAgentSession, agents_createAgent as createAgent, agents_deleteAgents as deleteAgents, agents_getAgentConfig as getAgentConfig, agents_getAgentSession as getAgentSession, agents_getAuthorizeLimits as getAuthorizeLimits, agents_listAgentChats as listAgentChats, agents_listAgentWorkspaces as listAgentWorkspaces, agents_listAgents as listAgents, agents_stageAgentFile as stageAgentFile, agents_startAgentSession as startAgentSession };
4219
+ export { type agents_AuthorizeAgentResponse as AuthorizeAgentResponse, type agents_AuthorizeLimitsResponse as AuthorizeLimitsResponse, type agents_StagedAgentFile as StagedAgentFile, agents_authorizeAgent as authorizeAgent, agents_closeAgentSession as closeAgentSession, agents_createAgent as createAgent, agents_deleteAgents as deleteAgents, agents_generateAgentAvatar as generateAgentAvatar, agents_getAgentConfig as getAgentConfig, agents_getAgentSession as getAgentSession, agents_getAuthorizeLimits as getAuthorizeLimits, agents_listAgentChats as listAgentChats, agents_listAgentWorkspaces as listAgentWorkspaces, agents_listAgents as listAgents, agents_stageAgentFile as stageAgentFile, agents_startAgentSession as startAgentSession };
4212
4220
  }
4213
4221
 
4214
4222
  /**
@@ -5482,6 +5490,21 @@ interface ArbiOptions {
5482
5490
  deploymentDomain?: string;
5483
5491
  /** Include credentials (cookies) in requests. Default: 'omit' for SDK consumers. */
5484
5492
  credentials?: 'include' | 'omit' | 'same-origin';
5493
+ /**
5494
+ * A session the host app already holds. The instance runs on it instead of logging in: every
5495
+ * call goes over the host's client (its transport carries the token and the one re-login) with
5496
+ * the host's login and open workspace. A new host session or workspace is a new instance.
5497
+ */
5498
+ session?: ArbiHostSession;
5499
+ }
5500
+ /** The host's signed-in session, for an `Arbi` that runs on it (`ArbiOptions.session`). */
5501
+ interface ArbiHostSession {
5502
+ /** The host's client, usually `createArbiClient({ transport })` over the host's own transport. */
5503
+ client: ArbiClient;
5504
+ /** The login the host holds: the keys, the server session key and the profile. */
5505
+ login: LoginResult;
5506
+ /** The workspace the host has opened on the server, if any. */
5507
+ workspaceId?: string | null;
5485
5508
  }
5486
5509
  interface QueryOptions {
5487
5510
  /** Run through this owned agent and its independent login. */
@@ -9723,6 +9746,10 @@ declare class Arbi {
9723
9746
  delete: (agentExtIds: string[]) => Promise<{
9724
9747
  [x: string]: unknown;
9725
9748
  }>;
9749
+ /** Generate an avatar from `prompt` and set it as the agent's picture. */
9750
+ generateAvatar: (agentExtId: string, prompt: string) => Promise<{
9751
+ picture: string;
9752
+ }>;
9726
9753
  /** Mint a TTL'd run session for an agent; see `grantTemporaryAccess` to also deposit a key. */
9727
9754
  authorize: (agentExtId: string, workspaceId: string, ttlSeconds?: number) => Promise<{
9728
9755
  session_pubkey_b64: string;
@@ -11110,4 +11137,4 @@ declare namespace identity {
11110
11137
  export { type identity_IdentityErrorCode as IdentityErrorCode, type identity_IdentityPurchase as IdentityPurchase, type identity_IdentityState as IdentityState, type identity_IdentityStatus as IdentityStatus, identity_acceptName as acceptName, identity_getStatus as getStatus, identity_identityErrorCode as identityErrorCode, identity_purchase as purchase, identity_refresh as refresh, identity_remove as remove, identity_startSession as startSession };
11111
11138
  }
11112
11139
 
11113
- export { type FactSearchRequest as $, type ActivityKind as A, type CliConfig as B, type ChatAttachmentFile as C, type CliCredentials as D, type CommandDescriptor as E, type ConfigStore as F, type ConnectOptions as G, type ConversationResponse as H, type ConversationUsageResponse as I, type CreateFactRequest as J, type CreateFactsRequest as K, type CreateWorkRequest as L, type CreateWorkflowRequest as M, DEFAULT_AI_USD_PER_GBP as N, DOC_TERMINAL_STATUSES as O, type DecryptedChat as P, type DecryptedChatMessage as Q, type DeferredInterjectionEvent as R, type DocNameMap as S, type DocumentAutomationAction as T, type DocumentListFields as U, type DocumentListOrder as V, type DocumentSelector as W, type DocumentWaiter as X, type DocumentWaiterOptions as Y, FLAT_TAG_KINDS as Z, type FactResponse as _, type ActivityResponse as a, type StepKind as a$, type FactSearchResponse as a0, type FormattedWsMessage as a1, type IdentityErrorCode as a2, type IdentityPurchase as a3, type IdentityState as a4, type IdentityStatus as a5, type LinkedRun as a6, type ListAllOptions as a7, type ListFactsOptions as a8, type ListPaginatedOptions as a9, type ResponseCompletedEvent as aA, type ResponseContentPartAddedEvent as aB, type ResponseCreatedEvent as aC, type ResponseFailedEvent as aD, type ResponseOutputItemAddedEvent as aE, type ResponseOutputItemDoneEvent as aF, type ResponseOutputTextDeltaEvent as aG, type ResponseOutputTextDoneEvent as aH, type ResponseUsage as aI, type RunProgress as aJ, type RunStep as aK, type RunWaitingOn as aL, type SSEEvent as aM, type SSEStreamCallbacks as aN, type SSEStreamResult as aO, type SSEStreamStartData as aP, STEP_FIELD_OPTION_TONES as aQ, SUPPORTED_EXTENSIONS as aR, type SendBack as aS, type SkillSummary as aT, type SkippedFile as aU, type StepActionRequest as aV, type StepActivityEvent as aW, type StepAssignee as aX, type StepField as aY, type StepFieldOption as aZ, type StepFieldOptionTone as a_, type MailAttachment as aa, type MailDraftSSEEvent as ab, type MessageLevel as ac, type MessageMetadataPayload$1 as ad, type MessageQueuedEvent as ae, type OutputTokensDetails as af, type ParsedSlashCommand as ag, type PendingAuthResponse as ah, PlanStepsError as ai, type PlanWorkRequest as aj, type ProbeAnswerEvent as ak, type ProjectBudget as al, type ProjectConversationUsageResponse as am, type ProjectDetails as an, type ProjectEventKind as ao, type ProjectEventResponse as ap, type ProjectInvoicesResponse as aq, type ProjectResponse as ar, type ProjectUpdateRequest as as, type ProjectUsageResponse as at, type QueryOptions as au, type RaisedSignal as av, type ReconnectOptions as aw, type ReconnectableWsConnection as ax, type ResolvedCitation as ay, type ResolvedRecipient as az, type AgentControlStateEvent as b, filterSkills as b$, type StepPhase as b0, type StepSignal as b1, type StepSignalWhen as b2, type StepState as b3, type StepStatus as b4, type SubmitBackgroundQueryOptions as b5, TAG_KINDS as b6, type TagChange as b7, type TagFieldDefinition as b8, type TagKind as b9, type WorkflowRunResponse as bA, type WorkspaceContext as bB, type WsConnection as bC, account as bD, agentconfig as bE, agents as bF, assistant as bG, authenticatedFetch as bH, buildCitationChunkData as bI, buildDocNameMap as bJ, buildFactsContextTool as bK, buildRetrievalChunkTool as bL, buildRetrievalFullContextTool as bM, buildRetrievalTocTool as bN, chats as bO, connectWebSocket as bP, connectWithReconnect as bQ, consumeSSEStream as bR, contacts as bS, conversations as bT, countCitations as bU, createAuthenticatedClient as bV, createDocumentWaiter as bW, doctags as bX, documents as bY, facts as bZ, files as b_, type TagKindField as ba, type TagKindSchema as bb, type TagLinks as bc, type TagListQuery as bd, type TagResponse as be, type TaskPlan as bf, type TaskPlanStep as bg, type TokenBudgetContext as bh, type UpdateConversationRequest as bi, type UpdateFactRequest as bj, type UpdateWorkflowRequest as bk, type UploadBatchResult as bl, type UploadDirectOptions as bm, type UploadDirectResult as bn, type UploadOptions as bo, type UploadResult as bp, type UsageBreakdown as bq, type UserDailyUsageResponse as br, type UserInfo as bs, type UserInputRequestEvent as bt, type UserMessageEvent as bu, WebSocketAuthError as bv, type WorkStatus as bw, type WorkflowAuthMode as bx, type WorkflowResponse as by, type WorkflowRunHistoryResponse as bz, type AgentStepDeltaEvent as c, formatAgentStepLabel as c0, formatFileSize as c1, formatGbp as c2, formatGbpPerMillionTokens as c3, formatItemLabel as c4, formatStreamSummary as c5, formatUserName as c6, formatWorkspaceChoices as c7, formatWsMessage as c8, generateEncryptedWorkspaceKey as c9, settings as cA, signatureRequests as cB, streamSSE as cC, stripCitationMarkdown as cD, summarizeCitations as cE, tags as cF, usdToGbp as cG, work as cH, workflowSteps as cI, workflows as cJ, workspaces as cK, generateNewWorkspaceKey as ca, getErrorCode as cb, getErrorMessage as cc, getRawWorkspaceKey as cd, health as ce, identity as cf, identityErrorCode as cg, mail as ch, notifications as ci, parseSSEEvents as cj, parseSlashCommand as ck, parseSlashTokenInProgress as cl, performPasswordLogin as cm, performSigningKeyLogin as cn, performSsoDeviceFlowLogin as co, profile as cp, projects as cq, requireData as cr, requireOk as cs, resolveAuth as ct, resolveCitations as cu, resolveWorkspace as cv, responses as cw, selectWorkspace as cx, selectWorkspaceById as cy, sessions as cz, type AgentStepEvent as d, Arbi as e, ArbiApiError as f, ArbiError as g, type ArbiErrorEvent as h, type ArbiOptions as i, ArbiSessionExpiredError as j, type ArtifactEvent as k, type AuthContext as l, type AuthHeaders as m, type AuthMode as n, type AuthenticatedClient as o, type ChatAttachmentInput as p, type ChatCryptoContext as q, type ChatKeyRing as r, type ChatKind as s, type ChatMemberKey as t, type ChatMemberResponse as u, type ChatMessageResponse as v, type ChatResponse as w, type ChatSession as x, type CitationSummary as y, type CitationToolSources as z };
11140
+ export { type FactResponse as $, type ActivityKind as A, type CitationToolSources as B, type ChatAttachmentFile as C, type CliConfig as D, type CliCredentials as E, type CommandDescriptor as F, type ConfigStore as G, type ConnectOptions as H, type ConversationResponse as I, type ConversationUsageResponse as J, type CreateFactRequest as K, type CreateFactsRequest as L, type CreateWorkRequest as M, type CreateWorkflowRequest as N, DEFAULT_AI_USD_PER_GBP as O, DOC_TERMINAL_STATUSES as P, type DecryptedChat as Q, type DecryptedChatMessage as R, type DeferredInterjectionEvent as S, type DocNameMap as T, type DocumentAutomationAction as U, type DocumentListFields as V, type DocumentListOrder as W, type DocumentSelector as X, type DocumentWaiter as Y, type DocumentWaiterOptions as Z, FLAT_TAG_KINDS as _, type ActivityResponse as a, type StepFieldOptionTone as a$, type FactSearchRequest as a0, type FactSearchResponse as a1, type FormattedWsMessage as a2, type IdentityErrorCode as a3, type IdentityPurchase as a4, type IdentityState as a5, type IdentityStatus as a6, type LinkedRun as a7, type ListAllOptions as a8, type ListFactsOptions as a9, type ResolvedRecipient as aA, type ResponseCompletedEvent as aB, type ResponseContentPartAddedEvent as aC, type ResponseCreatedEvent as aD, type ResponseFailedEvent as aE, type ResponseOutputItemAddedEvent as aF, type ResponseOutputItemDoneEvent as aG, type ResponseOutputTextDeltaEvent as aH, type ResponseOutputTextDoneEvent as aI, type ResponseUsage as aJ, type RunProgress as aK, type RunStep as aL, type RunWaitingOn as aM, type SSEEvent as aN, type SSEStreamCallbacks as aO, type SSEStreamResult as aP, type SSEStreamStartData as aQ, STEP_FIELD_OPTION_TONES as aR, SUPPORTED_EXTENSIONS as aS, type SendBack as aT, type SkillSummary as aU, type SkippedFile as aV, type StepActionRequest as aW, type StepActivityEvent as aX, type StepAssignee as aY, type StepField as aZ, type StepFieldOption as a_, type ListPaginatedOptions as aa, type MailAttachment as ab, type MailDraftSSEEvent as ac, type MessageLevel as ad, type MessageMetadataPayload$1 as ae, type MessageQueuedEvent as af, type OutputTokensDetails as ag, type ParsedSlashCommand as ah, type PendingAuthResponse as ai, PlanStepsError as aj, type PlanWorkRequest as ak, type ProbeAnswerEvent as al, type ProjectBudget as am, type ProjectConversationUsageResponse as an, type ProjectDetails as ao, type ProjectEventKind as ap, type ProjectEventResponse as aq, type ProjectInvoicesResponse as ar, type ProjectResponse as as, type ProjectUpdateRequest as at, type ProjectUsageResponse as au, type QueryOptions as av, type RaisedSignal as aw, type ReconnectOptions as ax, type ReconnectableWsConnection as ay, type ResolvedCitation as az, type AgentControlStateEvent as b, files as b$, type StepKind as b0, type StepPhase as b1, type StepSignal as b2, type StepSignalWhen as b3, type StepState as b4, type StepStatus as b5, type SubmitBackgroundQueryOptions as b6, TAG_KINDS as b7, type TagChange as b8, type TagFieldDefinition as b9, type WorkflowRunHistoryResponse as bA, type WorkflowRunResponse as bB, type WorkspaceContext as bC, type WsConnection as bD, account as bE, agentconfig as bF, agents as bG, assistant as bH, authenticatedFetch as bI, buildCitationChunkData as bJ, buildDocNameMap as bK, buildFactsContextTool as bL, buildRetrievalChunkTool as bM, buildRetrievalFullContextTool as bN, buildRetrievalTocTool as bO, chats as bP, connectWebSocket as bQ, connectWithReconnect as bR, consumeSSEStream as bS, contacts as bT, conversations as bU, countCitations as bV, createAuthenticatedClient as bW, createDocumentWaiter as bX, doctags as bY, documents as bZ, facts as b_, type TagKind as ba, type TagKindField as bb, type TagKindSchema as bc, type TagLinks as bd, type TagListQuery as be, type TagResponse as bf, type TaskPlan as bg, type TaskPlanStep as bh, type TokenBudgetContext as bi, type UpdateConversationRequest as bj, type UpdateFactRequest as bk, type UpdateWorkflowRequest as bl, type UploadBatchResult as bm, type UploadDirectOptions as bn, type UploadDirectResult as bo, type UploadOptions as bp, type UploadResult as bq, type UsageBreakdown as br, type UserDailyUsageResponse as bs, type UserInfo as bt, type UserInputRequestEvent as bu, type UserMessageEvent as bv, WebSocketAuthError as bw, type WorkStatus as bx, type WorkflowAuthMode as by, type WorkflowResponse as bz, type AgentStepDeltaEvent as c, filterSkills as c0, formatAgentStepLabel as c1, formatFileSize as c2, formatGbp as c3, formatGbpPerMillionTokens as c4, formatItemLabel as c5, formatStreamSummary as c6, formatUserName as c7, formatWorkspaceChoices as c8, formatWsMessage as c9, sessions as cA, settings as cB, signatureRequests as cC, streamSSE as cD, stripCitationMarkdown as cE, summarizeCitations as cF, tags as cG, usdToGbp as cH, work as cI, workflowSteps as cJ, workflows as cK, workspaces as cL, generateEncryptedWorkspaceKey as ca, generateNewWorkspaceKey as cb, getErrorCode as cc, getErrorMessage as cd, getRawWorkspaceKey as ce, health as cf, identity as cg, identityErrorCode as ch, mail as ci, notifications as cj, parseSSEEvents as ck, parseSlashCommand as cl, parseSlashTokenInProgress as cm, performPasswordLogin as cn, performSigningKeyLogin as co, performSsoDeviceFlowLogin as cp, profile as cq, projects as cr, requireData as cs, requireOk as ct, resolveAuth as cu, resolveCitations as cv, resolveWorkspace as cw, responses as cx, selectWorkspace as cy, selectWorkspaceById as cz, type AgentStepEvent as d, Arbi as e, ArbiApiError as f, ArbiError as g, type ArbiErrorEvent as h, type ArbiHostSession as i, type ArbiOptions as j, ArbiSessionExpiredError as k, type ArtifactEvent as l, type AuthContext as m, type AuthHeaders as n, type AuthMode as o, type AuthenticatedClient as p, type ChatAttachmentInput as q, type ChatCryptoContext as r, type ChatKeyRing as s, type ChatKind as t, type ChatMemberKey as u, type ChatMemberResponse as v, type ChatMessageResponse as w, type ChatResponse as x, type ChatSession as y, type CitationSummary as z };
@@ -4155,6 +4155,13 @@ declare function listAgentWorkspaces(arbi: ArbiClient, agentExtId: string): Prom
4155
4155
  declare function deleteAgents(arbi: ArbiClient, agentExtIds: string[]): Promise<{
4156
4156
  [x: string]: unknown;
4157
4157
  }>;
4158
+ /**
4159
+ * Generate an avatar for an owned agent from a prompt (usually composed from its persona) and set
4160
+ * it as the agent's picture. Resolves with the agent, `picture` set (a small square WebP data URL).
4161
+ */
4162
+ declare function generateAgentAvatar(arbi: ArbiClient, agentExtId: string, prompt: string): Promise<{
4163
+ picture: string;
4164
+ }>;
4158
4165
  /**
4159
4166
  * Mint a fresh, TTL'd run session for the caller's own agent
4160
4167
  * (`POST /v1/agents/{id}/authorize`). The response carries the session's public key; deposit a
@@ -4199,6 +4206,7 @@ declare const agents_authorizeAgent: typeof authorizeAgent;
4199
4206
  declare const agents_closeAgentSession: typeof closeAgentSession;
4200
4207
  declare const agents_createAgent: typeof createAgent;
4201
4208
  declare const agents_deleteAgents: typeof deleteAgents;
4209
+ declare const agents_generateAgentAvatar: typeof generateAgentAvatar;
4202
4210
  declare const agents_getAgentConfig: typeof getAgentConfig;
4203
4211
  declare const agents_getAgentSession: typeof getAgentSession;
4204
4212
  declare const agents_getAuthorizeLimits: typeof getAuthorizeLimits;
@@ -4208,7 +4216,7 @@ declare const agents_listAgents: typeof listAgents;
4208
4216
  declare const agents_stageAgentFile: typeof stageAgentFile;
4209
4217
  declare const agents_startAgentSession: typeof startAgentSession;
4210
4218
  declare namespace agents {
4211
- export { type agents_AuthorizeAgentResponse as AuthorizeAgentResponse, type agents_AuthorizeLimitsResponse as AuthorizeLimitsResponse, type agents_StagedAgentFile as StagedAgentFile, agents_authorizeAgent as authorizeAgent, agents_closeAgentSession as closeAgentSession, agents_createAgent as createAgent, agents_deleteAgents as deleteAgents, agents_getAgentConfig as getAgentConfig, agents_getAgentSession as getAgentSession, agents_getAuthorizeLimits as getAuthorizeLimits, agents_listAgentChats as listAgentChats, agents_listAgentWorkspaces as listAgentWorkspaces, agents_listAgents as listAgents, agents_stageAgentFile as stageAgentFile, agents_startAgentSession as startAgentSession };
4219
+ export { type agents_AuthorizeAgentResponse as AuthorizeAgentResponse, type agents_AuthorizeLimitsResponse as AuthorizeLimitsResponse, type agents_StagedAgentFile as StagedAgentFile, agents_authorizeAgent as authorizeAgent, agents_closeAgentSession as closeAgentSession, agents_createAgent as createAgent, agents_deleteAgents as deleteAgents, agents_generateAgentAvatar as generateAgentAvatar, agents_getAgentConfig as getAgentConfig, agents_getAgentSession as getAgentSession, agents_getAuthorizeLimits as getAuthorizeLimits, agents_listAgentChats as listAgentChats, agents_listAgentWorkspaces as listAgentWorkspaces, agents_listAgents as listAgents, agents_stageAgentFile as stageAgentFile, agents_startAgentSession as startAgentSession };
4212
4220
  }
4213
4221
 
4214
4222
  /**
@@ -5482,6 +5490,21 @@ interface ArbiOptions {
5482
5490
  deploymentDomain?: string;
5483
5491
  /** Include credentials (cookies) in requests. Default: 'omit' for SDK consumers. */
5484
5492
  credentials?: 'include' | 'omit' | 'same-origin';
5493
+ /**
5494
+ * A session the host app already holds. The instance runs on it instead of logging in: every
5495
+ * call goes over the host's client (its transport carries the token and the one re-login) with
5496
+ * the host's login and open workspace. A new host session or workspace is a new instance.
5497
+ */
5498
+ session?: ArbiHostSession;
5499
+ }
5500
+ /** The host's signed-in session, for an `Arbi` that runs on it (`ArbiOptions.session`). */
5501
+ interface ArbiHostSession {
5502
+ /** The host's client, usually `createArbiClient({ transport })` over the host's own transport. */
5503
+ client: ArbiClient;
5504
+ /** The login the host holds: the keys, the server session key and the profile. */
5505
+ login: LoginResult;
5506
+ /** The workspace the host has opened on the server, if any. */
5507
+ workspaceId?: string | null;
5485
5508
  }
5486
5509
  interface QueryOptions {
5487
5510
  /** Run through this owned agent and its independent login. */
@@ -9723,6 +9746,10 @@ declare class Arbi {
9723
9746
  delete: (agentExtIds: string[]) => Promise<{
9724
9747
  [x: string]: unknown;
9725
9748
  }>;
9749
+ /** Generate an avatar from `prompt` and set it as the agent's picture. */
9750
+ generateAvatar: (agentExtId: string, prompt: string) => Promise<{
9751
+ picture: string;
9752
+ }>;
9726
9753
  /** Mint a TTL'd run session for an agent; see `grantTemporaryAccess` to also deposit a key. */
9727
9754
  authorize: (agentExtId: string, workspaceId: string, ttlSeconds?: number) => Promise<{
9728
9755
  session_pubkey_b64: string;
@@ -11110,4 +11137,4 @@ declare namespace identity {
11110
11137
  export { type identity_IdentityErrorCode as IdentityErrorCode, type identity_IdentityPurchase as IdentityPurchase, type identity_IdentityState as IdentityState, type identity_IdentityStatus as IdentityStatus, identity_acceptName as acceptName, identity_getStatus as getStatus, identity_identityErrorCode as identityErrorCode, identity_purchase as purchase, identity_refresh as refresh, identity_remove as remove, identity_startSession as startSession };
11111
11138
  }
11112
11139
 
11113
- export { type FactSearchRequest as $, type ActivityKind as A, type CliConfig as B, type ChatAttachmentFile as C, type CliCredentials as D, type CommandDescriptor as E, type ConfigStore as F, type ConnectOptions as G, type ConversationResponse as H, type ConversationUsageResponse as I, type CreateFactRequest as J, type CreateFactsRequest as K, type CreateWorkRequest as L, type CreateWorkflowRequest as M, DEFAULT_AI_USD_PER_GBP as N, DOC_TERMINAL_STATUSES as O, type DecryptedChat as P, type DecryptedChatMessage as Q, type DeferredInterjectionEvent as R, type DocNameMap as S, type DocumentAutomationAction as T, type DocumentListFields as U, type DocumentListOrder as V, type DocumentSelector as W, type DocumentWaiter as X, type DocumentWaiterOptions as Y, FLAT_TAG_KINDS as Z, type FactResponse as _, type ActivityResponse as a, type StepKind as a$, type FactSearchResponse as a0, type FormattedWsMessage as a1, type IdentityErrorCode as a2, type IdentityPurchase as a3, type IdentityState as a4, type IdentityStatus as a5, type LinkedRun as a6, type ListAllOptions as a7, type ListFactsOptions as a8, type ListPaginatedOptions as a9, type ResponseCompletedEvent as aA, type ResponseContentPartAddedEvent as aB, type ResponseCreatedEvent as aC, type ResponseFailedEvent as aD, type ResponseOutputItemAddedEvent as aE, type ResponseOutputItemDoneEvent as aF, type ResponseOutputTextDeltaEvent as aG, type ResponseOutputTextDoneEvent as aH, type ResponseUsage as aI, type RunProgress as aJ, type RunStep as aK, type RunWaitingOn as aL, type SSEEvent as aM, type SSEStreamCallbacks as aN, type SSEStreamResult as aO, type SSEStreamStartData as aP, STEP_FIELD_OPTION_TONES as aQ, SUPPORTED_EXTENSIONS as aR, type SendBack as aS, type SkillSummary as aT, type SkippedFile as aU, type StepActionRequest as aV, type StepActivityEvent as aW, type StepAssignee as aX, type StepField as aY, type StepFieldOption as aZ, type StepFieldOptionTone as a_, type MailAttachment as aa, type MailDraftSSEEvent as ab, type MessageLevel as ac, type MessageMetadataPayload$1 as ad, type MessageQueuedEvent as ae, type OutputTokensDetails as af, type ParsedSlashCommand as ag, type PendingAuthResponse as ah, PlanStepsError as ai, type PlanWorkRequest as aj, type ProbeAnswerEvent as ak, type ProjectBudget as al, type ProjectConversationUsageResponse as am, type ProjectDetails as an, type ProjectEventKind as ao, type ProjectEventResponse as ap, type ProjectInvoicesResponse as aq, type ProjectResponse as ar, type ProjectUpdateRequest as as, type ProjectUsageResponse as at, type QueryOptions as au, type RaisedSignal as av, type ReconnectOptions as aw, type ReconnectableWsConnection as ax, type ResolvedCitation as ay, type ResolvedRecipient as az, type AgentControlStateEvent as b, filterSkills as b$, type StepPhase as b0, type StepSignal as b1, type StepSignalWhen as b2, type StepState as b3, type StepStatus as b4, type SubmitBackgroundQueryOptions as b5, TAG_KINDS as b6, type TagChange as b7, type TagFieldDefinition as b8, type TagKind as b9, type WorkflowRunResponse as bA, type WorkspaceContext as bB, type WsConnection as bC, account as bD, agentconfig as bE, agents as bF, assistant as bG, authenticatedFetch as bH, buildCitationChunkData as bI, buildDocNameMap as bJ, buildFactsContextTool as bK, buildRetrievalChunkTool as bL, buildRetrievalFullContextTool as bM, buildRetrievalTocTool as bN, chats as bO, connectWebSocket as bP, connectWithReconnect as bQ, consumeSSEStream as bR, contacts as bS, conversations as bT, countCitations as bU, createAuthenticatedClient as bV, createDocumentWaiter as bW, doctags as bX, documents as bY, facts as bZ, files as b_, type TagKindField as ba, type TagKindSchema as bb, type TagLinks as bc, type TagListQuery as bd, type TagResponse as be, type TaskPlan as bf, type TaskPlanStep as bg, type TokenBudgetContext as bh, type UpdateConversationRequest as bi, type UpdateFactRequest as bj, type UpdateWorkflowRequest as bk, type UploadBatchResult as bl, type UploadDirectOptions as bm, type UploadDirectResult as bn, type UploadOptions as bo, type UploadResult as bp, type UsageBreakdown as bq, type UserDailyUsageResponse as br, type UserInfo as bs, type UserInputRequestEvent as bt, type UserMessageEvent as bu, WebSocketAuthError as bv, type WorkStatus as bw, type WorkflowAuthMode as bx, type WorkflowResponse as by, type WorkflowRunHistoryResponse as bz, type AgentStepDeltaEvent as c, formatAgentStepLabel as c0, formatFileSize as c1, formatGbp as c2, formatGbpPerMillionTokens as c3, formatItemLabel as c4, formatStreamSummary as c5, formatUserName as c6, formatWorkspaceChoices as c7, formatWsMessage as c8, generateEncryptedWorkspaceKey as c9, settings as cA, signatureRequests as cB, streamSSE as cC, stripCitationMarkdown as cD, summarizeCitations as cE, tags as cF, usdToGbp as cG, work as cH, workflowSteps as cI, workflows as cJ, workspaces as cK, generateNewWorkspaceKey as ca, getErrorCode as cb, getErrorMessage as cc, getRawWorkspaceKey as cd, health as ce, identity as cf, identityErrorCode as cg, mail as ch, notifications as ci, parseSSEEvents as cj, parseSlashCommand as ck, parseSlashTokenInProgress as cl, performPasswordLogin as cm, performSigningKeyLogin as cn, performSsoDeviceFlowLogin as co, profile as cp, projects as cq, requireData as cr, requireOk as cs, resolveAuth as ct, resolveCitations as cu, resolveWorkspace as cv, responses as cw, selectWorkspace as cx, selectWorkspaceById as cy, sessions as cz, type AgentStepEvent as d, Arbi as e, ArbiApiError as f, ArbiError as g, type ArbiErrorEvent as h, type ArbiOptions as i, ArbiSessionExpiredError as j, type ArtifactEvent as k, type AuthContext as l, type AuthHeaders as m, type AuthMode as n, type AuthenticatedClient as o, type ChatAttachmentInput as p, type ChatCryptoContext as q, type ChatKeyRing as r, type ChatKind as s, type ChatMemberKey as t, type ChatMemberResponse as u, type ChatMessageResponse as v, type ChatResponse as w, type ChatSession as x, type CitationSummary as y, type CitationToolSources as z };
11140
+ export { type FactResponse as $, type ActivityKind as A, type CitationToolSources as B, type ChatAttachmentFile as C, type CliConfig as D, type CliCredentials as E, type CommandDescriptor as F, type ConfigStore as G, type ConnectOptions as H, type ConversationResponse as I, type ConversationUsageResponse as J, type CreateFactRequest as K, type CreateFactsRequest as L, type CreateWorkRequest as M, type CreateWorkflowRequest as N, DEFAULT_AI_USD_PER_GBP as O, DOC_TERMINAL_STATUSES as P, type DecryptedChat as Q, type DecryptedChatMessage as R, type DeferredInterjectionEvent as S, type DocNameMap as T, type DocumentAutomationAction as U, type DocumentListFields as V, type DocumentListOrder as W, type DocumentSelector as X, type DocumentWaiter as Y, type DocumentWaiterOptions as Z, FLAT_TAG_KINDS as _, type ActivityResponse as a, type StepFieldOptionTone as a$, type FactSearchRequest as a0, type FactSearchResponse as a1, type FormattedWsMessage as a2, type IdentityErrorCode as a3, type IdentityPurchase as a4, type IdentityState as a5, type IdentityStatus as a6, type LinkedRun as a7, type ListAllOptions as a8, type ListFactsOptions as a9, type ResolvedRecipient as aA, type ResponseCompletedEvent as aB, type ResponseContentPartAddedEvent as aC, type ResponseCreatedEvent as aD, type ResponseFailedEvent as aE, type ResponseOutputItemAddedEvent as aF, type ResponseOutputItemDoneEvent as aG, type ResponseOutputTextDeltaEvent as aH, type ResponseOutputTextDoneEvent as aI, type ResponseUsage as aJ, type RunProgress as aK, type RunStep as aL, type RunWaitingOn as aM, type SSEEvent as aN, type SSEStreamCallbacks as aO, type SSEStreamResult as aP, type SSEStreamStartData as aQ, STEP_FIELD_OPTION_TONES as aR, SUPPORTED_EXTENSIONS as aS, type SendBack as aT, type SkillSummary as aU, type SkippedFile as aV, type StepActionRequest as aW, type StepActivityEvent as aX, type StepAssignee as aY, type StepField as aZ, type StepFieldOption as a_, type ListPaginatedOptions as aa, type MailAttachment as ab, type MailDraftSSEEvent as ac, type MessageLevel as ad, type MessageMetadataPayload$1 as ae, type MessageQueuedEvent as af, type OutputTokensDetails as ag, type ParsedSlashCommand as ah, type PendingAuthResponse as ai, PlanStepsError as aj, type PlanWorkRequest as ak, type ProbeAnswerEvent as al, type ProjectBudget as am, type ProjectConversationUsageResponse as an, type ProjectDetails as ao, type ProjectEventKind as ap, type ProjectEventResponse as aq, type ProjectInvoicesResponse as ar, type ProjectResponse as as, type ProjectUpdateRequest as at, type ProjectUsageResponse as au, type QueryOptions as av, type RaisedSignal as aw, type ReconnectOptions as ax, type ReconnectableWsConnection as ay, type ResolvedCitation as az, type AgentControlStateEvent as b, files as b$, type StepKind as b0, type StepPhase as b1, type StepSignal as b2, type StepSignalWhen as b3, type StepState as b4, type StepStatus as b5, type SubmitBackgroundQueryOptions as b6, TAG_KINDS as b7, type TagChange as b8, type TagFieldDefinition as b9, type WorkflowRunHistoryResponse as bA, type WorkflowRunResponse as bB, type WorkspaceContext as bC, type WsConnection as bD, account as bE, agentconfig as bF, agents as bG, assistant as bH, authenticatedFetch as bI, buildCitationChunkData as bJ, buildDocNameMap as bK, buildFactsContextTool as bL, buildRetrievalChunkTool as bM, buildRetrievalFullContextTool as bN, buildRetrievalTocTool as bO, chats as bP, connectWebSocket as bQ, connectWithReconnect as bR, consumeSSEStream as bS, contacts as bT, conversations as bU, countCitations as bV, createAuthenticatedClient as bW, createDocumentWaiter as bX, doctags as bY, documents as bZ, facts as b_, type TagKind as ba, type TagKindField as bb, type TagKindSchema as bc, type TagLinks as bd, type TagListQuery as be, type TagResponse as bf, type TaskPlan as bg, type TaskPlanStep as bh, type TokenBudgetContext as bi, type UpdateConversationRequest as bj, type UpdateFactRequest as bk, type UpdateWorkflowRequest as bl, type UploadBatchResult as bm, type UploadDirectOptions as bn, type UploadDirectResult as bo, type UploadOptions as bp, type UploadResult as bq, type UsageBreakdown as br, type UserDailyUsageResponse as bs, type UserInfo as bt, type UserInputRequestEvent as bu, type UserMessageEvent as bv, WebSocketAuthError as bw, type WorkStatus as bx, type WorkflowAuthMode as by, type WorkflowResponse as bz, type AgentStepDeltaEvent as c, filterSkills as c0, formatAgentStepLabel as c1, formatFileSize as c2, formatGbp as c3, formatGbpPerMillionTokens as c4, formatItemLabel as c5, formatStreamSummary as c6, formatUserName as c7, formatWorkspaceChoices as c8, formatWsMessage as c9, sessions as cA, settings as cB, signatureRequests as cC, streamSSE as cD, stripCitationMarkdown as cE, summarizeCitations as cF, tags as cG, usdToGbp as cH, work as cI, workflowSteps as cJ, workflows as cK, workspaces as cL, generateEncryptedWorkspaceKey as ca, generateNewWorkspaceKey as cb, getErrorCode as cc, getErrorMessage as cd, getRawWorkspaceKey as ce, health as cf, identity as cg, identityErrorCode as ch, mail as ci, notifications as cj, parseSSEEvents as ck, parseSlashCommand as cl, parseSlashTokenInProgress as cm, performPasswordLogin as cn, performSigningKeyLogin as co, performSsoDeviceFlowLogin as cp, profile as cq, projects as cr, requireData as cs, requireOk as ct, resolveAuth as cu, resolveCitations as cv, resolveWorkspace as cw, responses as cx, selectWorkspace as cy, selectWorkspaceById as cz, type AgentStepEvent as d, Arbi as e, ArbiApiError as f, ArbiError as g, type ArbiErrorEvent as h, type ArbiHostSession as i, type ArbiOptions as j, ArbiSessionExpiredError as k, type ArtifactEvent as l, type AuthContext as m, type AuthHeaders as n, type AuthMode as o, type AuthenticatedClient as p, type ChatAttachmentInput as q, type ChatCryptoContext as r, type ChatKeyRing as s, type ChatKind as t, type ChatMemberKey as u, type ChatMemberResponse as v, type ChatMessageResponse as w, type ChatResponse as x, type ChatSession as y, type CitationSummary as z };
package/dist/browser.cjs CHANGED
@@ -5599,6 +5599,15 @@ async function deleteAgents(arbi, agentExtIds) {
5599
5599
  "Failed to delete agents"
5600
5600
  );
5601
5601
  }
5602
+ async function generateAgentAvatar(arbi, agentExtId, prompt) {
5603
+ return requireData(
5604
+ await arbi.fetch.POST("/v1/agents/{agent_ext_id}/avatar", {
5605
+ params: { path: { agent_ext_id: agentExtId } },
5606
+ body: { prompt }
5607
+ }),
5608
+ "Failed to generate the agent avatar"
5609
+ );
5610
+ }
5602
5611
  async function authorizeAgent(arbi, agentExtId, workspaceExtId, ttlSeconds) {
5603
5612
  return requireData(
5604
5613
  await arbi.fetch.POST("/v1/agents/{agent_ext_id}/authorize", {
@@ -7732,6 +7741,12 @@ var Arbi = class {
7732
7741
  options;
7733
7742
  constructor(options) {
7734
7743
  this.options = options;
7744
+ if (options.session) {
7745
+ this.client = options.session.client;
7746
+ this.loginResult = options.session.login;
7747
+ this.userProfile = options.session.login.profile ?? null;
7748
+ this.currentWorkspaceId = options.session.workspaceId ?? null;
7749
+ }
7735
7750
  }
7736
7751
  // ── Lifecycle ───────────────────────────────────────────────────────────
7737
7752
  /**
@@ -8674,6 +8689,8 @@ var Arbi = class {
8674
8689
  getConfig: (agentExtId) => getAgentConfig(this.requireClient(), agentExtId),
8675
8690
  listWorkspaces: (agentExtId) => listAgentWorkspaces(this.requireClient(), agentExtId),
8676
8691
  delete: (agentExtIds) => deleteAgents(this.requireClient(), agentExtIds),
8692
+ /** Generate an avatar from `prompt` and set it as the agent's picture. */
8693
+ generateAvatar: (agentExtId, prompt) => generateAgentAvatar(this.requireClient(), agentExtId, prompt),
8677
8694
  /** Mint a TTL'd run session for an agent; see `grantTemporaryAccess` to also deposit a key. */
8678
8695
  authorize: (agentExtId, workspaceId, ttlSeconds) => authorizeAgent(this.requireClient(), agentExtId, workspaceId, ttlSeconds),
8679
8696
  authorizeLimits: () => getAuthorizeLimits(this.requireClient()),