@arbidocs/sdk 0.3.66 → 0.3.67
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-6H2O896Y.d.cts → browser-B5xRfc7b.d.cts} +88 -2
- package/dist/{browser-6H2O896Y.d.ts → browser-B5xRfc7b.d.ts} +88 -2
- package/dist/browser.cjs +40 -0
- 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 +40 -0
- package/dist/browser.js.map +1 -1
- package/dist/index.cjs +43 -0
- 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 +41 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -580,6 +580,7 @@ declare function formatUserName(user: UserInfo | null | undefined): string;
|
|
|
580
580
|
type MessageMetadataPayload = components['schemas']['MessageMetadataPayload'];
|
|
581
581
|
type CitationData$2 = components['schemas']['CitationData'];
|
|
582
582
|
type Chunk$1 = components['schemas']['Chunk'];
|
|
583
|
+
|
|
583
584
|
/** A fully resolved citation with its source chunks. */
|
|
584
585
|
interface ResolvedCitation {
|
|
585
586
|
/** Citation number as a string (e.g. "1", "2") */
|
|
@@ -721,6 +722,11 @@ declare function sanitizeFolderPath(folderPath: string): string;
|
|
|
721
722
|
interface UploadOptions {
|
|
722
723
|
folder?: string;
|
|
723
724
|
configExtId?: string;
|
|
725
|
+
/** Work-product type for the uploaded doc — ``source`` (default),
|
|
726
|
+
* ``skill``, ``memory``, ``artifact``. Skills must be uploaded with
|
|
727
|
+
* ``wp_type='skill'`` AND in a ``skills/<slug>`` folder so the
|
|
728
|
+
* backend's ``SkillManager`` recognises them. */
|
|
729
|
+
wpType?: 'source' | 'skill' | 'memory' | 'artifact' | 'webpage';
|
|
724
730
|
}
|
|
725
731
|
interface SkippedFile {
|
|
726
732
|
file_name: string;
|
|
@@ -1171,20 +1177,100 @@ declare function queryAssistant(options: AssistantQueryOptions): Promise<Respons
|
|
|
1171
1177
|
* The assistant_message_ext_id identifies which agent message to answer.
|
|
1172
1178
|
*/
|
|
1173
1179
|
declare function respondToAgent(arbi: ArbiClient, assistantMessageExtId: string, answer: string): Promise<unknown>;
|
|
1180
|
+
/** A single user-invocable skill as exposed by ``GET /v1/assistant/skills``.
|
|
1181
|
+
* Re-exported with the schema-generated shape so callers don't have to
|
|
1182
|
+
* reach into ``components['schemas']`` themselves. */
|
|
1183
|
+
type SkillSummary = components['schemas']['SkillSummaryResponse'];
|
|
1184
|
+
/**
|
|
1185
|
+
* List the skills the caller can invoke in the active workspace.
|
|
1186
|
+
*
|
|
1187
|
+
* Powers slash-command autocomplete in the TUI, CLI, and React UI.
|
|
1188
|
+
* Returns lightweight metadata only (name, description, args hint) —
|
|
1189
|
+
* never the SKILL.md body. To read the body, fetch the document via
|
|
1190
|
+
* ``getParsedContent(authHeaders, doc_ext_id, 'content')``.
|
|
1191
|
+
*
|
|
1192
|
+
* Scoped to the workspace the caller has open (the backend uses the
|
|
1193
|
+
* session's ``active_workspace``); cross-workspace listing isn't
|
|
1194
|
+
* supported because each workspace has its own encryption key.
|
|
1195
|
+
*
|
|
1196
|
+
* @param includeHidden When ``true``, returns skills with
|
|
1197
|
+
* ``user-invocable: false`` in their frontmatter. Off by default —
|
|
1198
|
+
* those are typically agent-only or in-progress skills that
|
|
1199
|
+
* shouldn't surface in slash menus.
|
|
1200
|
+
*/
|
|
1201
|
+
declare function listSkills(arbi: ArbiClient, options?: {
|
|
1202
|
+
includeHidden?: boolean;
|
|
1203
|
+
}): Promise<SkillSummary[]>;
|
|
1204
|
+
/** Parsed slash-command shape, regardless of frontend. */
|
|
1205
|
+
interface ParsedSlashCommand {
|
|
1206
|
+
/** The lowercased token immediately after ``/``. */
|
|
1207
|
+
slug: string;
|
|
1208
|
+
/** Everything after the first whitespace, untrimmed. ``""`` when the
|
|
1209
|
+
* user hasn't typed any arguments yet. */
|
|
1210
|
+
args: string;
|
|
1211
|
+
}
|
|
1212
|
+
/**
|
|
1213
|
+
* Parse a *submitted* slash command (or anything that walks like one).
|
|
1214
|
+
*
|
|
1215
|
+
* Permissive about whitespace: leading whitespace is tolerated so
|
|
1216
|
+
* pasted snippets like `` /summarize foo`` still parse. The slug
|
|
1217
|
+
* grammar matches the backend's ``SkillManager._slug`` output (alnum
|
|
1218
|
+
* + underscore + dash), which is also what the autocomplete menus
|
|
1219
|
+
* surface, so there's exactly one definition of "valid slug."
|
|
1220
|
+
*
|
|
1221
|
+
* Returns ``null`` if the input doesn't start with ``/<slug>``.
|
|
1222
|
+
*
|
|
1223
|
+
* Use this in **dispatchers** (TUI command-registry) and **pre-flight
|
|
1224
|
+
* hint** paths where you want to react to any in-progress or
|
|
1225
|
+
* submitted slash command. For the narrower "user is typing a slug
|
|
1226
|
+
* with no args yet" UX, use ``parseSlashTokenInProgress``.
|
|
1227
|
+
*/
|
|
1228
|
+
declare function parseSlashCommand(input: string): ParsedSlashCommand | null;
|
|
1229
|
+
/**
|
|
1230
|
+
* Parse a slash-command **in progress** — the buffer is just
|
|
1231
|
+
* ``/<token>`` with no committed arguments yet (no space after the
|
|
1232
|
+
* slug). This is the trigger condition for the autocomplete menu:
|
|
1233
|
+
* the moment the user types a space, the slug is "committed" and the
|
|
1234
|
+
* menu should hide so further keystrokes form the arguments.
|
|
1235
|
+
*
|
|
1236
|
+
* Empty token is allowed (a bare ``/``) so the menu opens immediately
|
|
1237
|
+
* and lists everything — same UX as Slack/Discord.
|
|
1238
|
+
*/
|
|
1239
|
+
declare function parseSlashTokenInProgress(buffer: string): string | null;
|
|
1240
|
+
/**
|
|
1241
|
+
* Filter a list of skill summaries by a typed query and sort by
|
|
1242
|
+
* relevance: prefix matches first, then substring matches, alphabetic
|
|
1243
|
+
* within each bucket. Pinned slugs (the user's favourites — surfaced
|
|
1244
|
+
* by the React library modal) float to the very top.
|
|
1245
|
+
*
|
|
1246
|
+
* Pure function — same logic used by the React popover, the TUI
|
|
1247
|
+
* autocomplete, and the CLI. Pulling it out of the React component
|
|
1248
|
+
* means a change to the matching rules lands in one place.
|
|
1249
|
+
*/
|
|
1250
|
+
declare function filterSkills<T extends {
|
|
1251
|
+
slug?: string;
|
|
1252
|
+
name: string;
|
|
1253
|
+
}>(items: ReadonlyArray<T>, query: string, pinned?: ReadonlyArray<string>): T[];
|
|
1174
1254
|
|
|
1175
1255
|
type assistant_AssistantQueryOptions = AssistantQueryOptions;
|
|
1176
1256
|
type assistant_Chunk = Chunk;
|
|
1177
1257
|
type assistant_ChunkMetadata = ChunkMetadata;
|
|
1258
|
+
type assistant_ParsedSlashCommand = ParsedSlashCommand;
|
|
1178
1259
|
type assistant_RetrieveOptions = RetrieveOptions;
|
|
1179
1260
|
type assistant_RetrieveResult = RetrieveResult;
|
|
1261
|
+
type assistant_SkillSummary = SkillSummary;
|
|
1180
1262
|
declare const assistant_buildRetrievalChunkTool: typeof buildRetrievalChunkTool;
|
|
1181
1263
|
declare const assistant_buildRetrievalFullContextTool: typeof buildRetrievalFullContextTool;
|
|
1182
1264
|
declare const assistant_buildRetrievalTocTool: typeof buildRetrievalTocTool;
|
|
1265
|
+
declare const assistant_filterSkills: typeof filterSkills;
|
|
1266
|
+
declare const assistant_listSkills: typeof listSkills;
|
|
1267
|
+
declare const assistant_parseSlashCommand: typeof parseSlashCommand;
|
|
1268
|
+
declare const assistant_parseSlashTokenInProgress: typeof parseSlashTokenInProgress;
|
|
1183
1269
|
declare const assistant_queryAssistant: typeof queryAssistant;
|
|
1184
1270
|
declare const assistant_respondToAgent: typeof respondToAgent;
|
|
1185
1271
|
declare const assistant_retrieve: typeof retrieve;
|
|
1186
1272
|
declare namespace assistant {
|
|
1187
|
-
export { type assistant_AssistantQueryOptions as AssistantQueryOptions, type assistant_Chunk as Chunk, type assistant_ChunkMetadata as ChunkMetadata, type assistant_RetrieveOptions as RetrieveOptions, type assistant_RetrieveResult as RetrieveResult, assistant_buildRetrievalChunkTool as buildRetrievalChunkTool, assistant_buildRetrievalFullContextTool as buildRetrievalFullContextTool, assistant_buildRetrievalTocTool as buildRetrievalTocTool, assistant_queryAssistant as queryAssistant, assistant_respondToAgent as respondToAgent, assistant_retrieve as retrieve };
|
|
1273
|
+
export { type assistant_AssistantQueryOptions as AssistantQueryOptions, type assistant_Chunk as Chunk, type assistant_ChunkMetadata as ChunkMetadata, type assistant_ParsedSlashCommand as ParsedSlashCommand, type assistant_RetrieveOptions as RetrieveOptions, type assistant_RetrieveResult as RetrieveResult, type assistant_SkillSummary as SkillSummary, assistant_buildRetrievalChunkTool as buildRetrievalChunkTool, assistant_buildRetrievalFullContextTool as buildRetrievalFullContextTool, assistant_buildRetrievalTocTool as buildRetrievalTocTool, assistant_filterSkills as filterSkills, assistant_listSkills as listSkills, assistant_parseSlashCommand as parseSlashCommand, assistant_parseSlashTokenInProgress as parseSlashTokenInProgress, assistant_queryAssistant as queryAssistant, assistant_respondToAgent as respondToAgent, assistant_retrieve as retrieve };
|
|
1188
1274
|
}
|
|
1189
1275
|
|
|
1190
1276
|
/**
|
|
@@ -4260,4 +4346,4 @@ declare namespace responses {
|
|
|
4260
4346
|
export { type responses_SubmitBackgroundQueryOptions as SubmitBackgroundQueryOptions, responses_extractResponseText as extractResponseText, responses_getResponse as getResponse, responses_submitBackgroundQuery as submitBackgroundQuery };
|
|
4261
4347
|
}
|
|
4262
4348
|
|
|
4263
|
-
export { type
|
|
4349
|
+
export { type SkillSummary as $, type AuthHeaders as A, type ReconnectableWsConnection as B, type ConfigStore as C, type DmCryptoContext as D, type ResolvedCitation as E, type FormattedWsMessage as F, type ResponseCompletedEvent as G, type ResponseContentPartAddedEvent as H, type ResponseCreatedEvent as I, type ResponseFailedEvent as J, type ResponseOutputItemAddedEvent as K, type ListAllOptions as L, type MessageLevel as M, type ResponseOutputItemDoneEvent as N, type OutputTokensDetails as O, type ParsedSlashCommand as P, type QueryOptions as Q, type ReconnectOptions as R, type SkippedFile as S, type ResponseOutputTextDeltaEvent as T, type UploadResult as U, type ResponseOutputTextDoneEvent as V, type ResponseUsage as W, type SSEEvent as X, type SSEStreamCallbacks as Y, type SSEStreamResult as Z, type SSEStreamStartData as _, type CliConfig as a, type UserInfo as a0, type UserInputRequestEvent as a1, type UserMessageEvent as a2, type WorkspaceContext as a3, type WsConnection as a4, agentconfig as a5, assistant as a6, authenticatedFetch as a7, buildRetrievalChunkTool as a8, buildRetrievalFullContextTool as a9, parseSSEEvents as aA, parseSlashCommand as aB, parseSlashTokenInProgress as aC, performPasswordLogin as aD, performSigningKeyLogin as aE, performSsoDeviceFlowLogin as aF, requireData as aG, requireOk as aH, resolveAuth as aI, resolveCitations as aJ, resolveWorkspace as aK, responses as aL, selectWorkspace as aM, selectWorkspaceById as aN, settings as aO, streamSSE as aP, stripCitationMarkdown as aQ, summarizeCitations as aR, tags as aS, workspaces as aT, type ArbiErrorEvent as aU, buildRetrievalTocTool as aa, connectWebSocket as ab, connectWithReconnect as ac, consumeSSEStream as ad, contacts as ae, conversations as af, countCitations as ag, createAuthenticatedClient as ah, createDocumentWaiter as ai, dm as aj, doctags as ak, documents as al, files as am, filterSkills as an, formatAgentStepLabel as ao, formatFileSize as ap, formatStreamSummary as aq, formatUserName as ar, formatWorkspaceChoices as as, formatWsMessage as at, generateEncryptedWorkspaceKey as au, generateNewWorkspaceKey as av, getErrorCode as aw, getErrorMessage as ax, getRawWorkspaceKey as ay, health as az, type CliCredentials as b, type ChatSession as c, type UploadBatchResult as d, type UploadOptions as e, type UploadDirectOptions as f, type UploadDirectResult as g, SUPPORTED_EXTENSIONS as h, type AgentStepEvent as i, Arbi as j, ArbiApiError as k, ArbiError as l, type ArbiOptions as m, type ArtifactEvent as n, type AuthContext as o, type AuthenticatedClient as p, type CitationSummary as q, type ConnectOptions as r, DOC_TERMINAL_STATUSES as s, type DocumentListFields as t, type DocumentListOrder as u, type DocumentWaiter as v, type DocumentWaiterOptions as w, type ListPaginatedOptions as x, type MessageMetadataPayload$1 as y, type MessageQueuedEvent as z };
|
|
@@ -580,6 +580,7 @@ declare function formatUserName(user: UserInfo | null | undefined): string;
|
|
|
580
580
|
type MessageMetadataPayload = components['schemas']['MessageMetadataPayload'];
|
|
581
581
|
type CitationData$2 = components['schemas']['CitationData'];
|
|
582
582
|
type Chunk$1 = components['schemas']['Chunk'];
|
|
583
|
+
|
|
583
584
|
/** A fully resolved citation with its source chunks. */
|
|
584
585
|
interface ResolvedCitation {
|
|
585
586
|
/** Citation number as a string (e.g. "1", "2") */
|
|
@@ -721,6 +722,11 @@ declare function sanitizeFolderPath(folderPath: string): string;
|
|
|
721
722
|
interface UploadOptions {
|
|
722
723
|
folder?: string;
|
|
723
724
|
configExtId?: string;
|
|
725
|
+
/** Work-product type for the uploaded doc — ``source`` (default),
|
|
726
|
+
* ``skill``, ``memory``, ``artifact``. Skills must be uploaded with
|
|
727
|
+
* ``wp_type='skill'`` AND in a ``skills/<slug>`` folder so the
|
|
728
|
+
* backend's ``SkillManager`` recognises them. */
|
|
729
|
+
wpType?: 'source' | 'skill' | 'memory' | 'artifact' | 'webpage';
|
|
724
730
|
}
|
|
725
731
|
interface SkippedFile {
|
|
726
732
|
file_name: string;
|
|
@@ -1171,20 +1177,100 @@ declare function queryAssistant(options: AssistantQueryOptions): Promise<Respons
|
|
|
1171
1177
|
* The assistant_message_ext_id identifies which agent message to answer.
|
|
1172
1178
|
*/
|
|
1173
1179
|
declare function respondToAgent(arbi: ArbiClient, assistantMessageExtId: string, answer: string): Promise<unknown>;
|
|
1180
|
+
/** A single user-invocable skill as exposed by ``GET /v1/assistant/skills``.
|
|
1181
|
+
* Re-exported with the schema-generated shape so callers don't have to
|
|
1182
|
+
* reach into ``components['schemas']`` themselves. */
|
|
1183
|
+
type SkillSummary = components['schemas']['SkillSummaryResponse'];
|
|
1184
|
+
/**
|
|
1185
|
+
* List the skills the caller can invoke in the active workspace.
|
|
1186
|
+
*
|
|
1187
|
+
* Powers slash-command autocomplete in the TUI, CLI, and React UI.
|
|
1188
|
+
* Returns lightweight metadata only (name, description, args hint) —
|
|
1189
|
+
* never the SKILL.md body. To read the body, fetch the document via
|
|
1190
|
+
* ``getParsedContent(authHeaders, doc_ext_id, 'content')``.
|
|
1191
|
+
*
|
|
1192
|
+
* Scoped to the workspace the caller has open (the backend uses the
|
|
1193
|
+
* session's ``active_workspace``); cross-workspace listing isn't
|
|
1194
|
+
* supported because each workspace has its own encryption key.
|
|
1195
|
+
*
|
|
1196
|
+
* @param includeHidden When ``true``, returns skills with
|
|
1197
|
+
* ``user-invocable: false`` in their frontmatter. Off by default —
|
|
1198
|
+
* those are typically agent-only or in-progress skills that
|
|
1199
|
+
* shouldn't surface in slash menus.
|
|
1200
|
+
*/
|
|
1201
|
+
declare function listSkills(arbi: ArbiClient, options?: {
|
|
1202
|
+
includeHidden?: boolean;
|
|
1203
|
+
}): Promise<SkillSummary[]>;
|
|
1204
|
+
/** Parsed slash-command shape, regardless of frontend. */
|
|
1205
|
+
interface ParsedSlashCommand {
|
|
1206
|
+
/** The lowercased token immediately after ``/``. */
|
|
1207
|
+
slug: string;
|
|
1208
|
+
/** Everything after the first whitespace, untrimmed. ``""`` when the
|
|
1209
|
+
* user hasn't typed any arguments yet. */
|
|
1210
|
+
args: string;
|
|
1211
|
+
}
|
|
1212
|
+
/**
|
|
1213
|
+
* Parse a *submitted* slash command (or anything that walks like one).
|
|
1214
|
+
*
|
|
1215
|
+
* Permissive about whitespace: leading whitespace is tolerated so
|
|
1216
|
+
* pasted snippets like `` /summarize foo`` still parse. The slug
|
|
1217
|
+
* grammar matches the backend's ``SkillManager._slug`` output (alnum
|
|
1218
|
+
* + underscore + dash), which is also what the autocomplete menus
|
|
1219
|
+
* surface, so there's exactly one definition of "valid slug."
|
|
1220
|
+
*
|
|
1221
|
+
* Returns ``null`` if the input doesn't start with ``/<slug>``.
|
|
1222
|
+
*
|
|
1223
|
+
* Use this in **dispatchers** (TUI command-registry) and **pre-flight
|
|
1224
|
+
* hint** paths where you want to react to any in-progress or
|
|
1225
|
+
* submitted slash command. For the narrower "user is typing a slug
|
|
1226
|
+
* with no args yet" UX, use ``parseSlashTokenInProgress``.
|
|
1227
|
+
*/
|
|
1228
|
+
declare function parseSlashCommand(input: string): ParsedSlashCommand | null;
|
|
1229
|
+
/**
|
|
1230
|
+
* Parse a slash-command **in progress** — the buffer is just
|
|
1231
|
+
* ``/<token>`` with no committed arguments yet (no space after the
|
|
1232
|
+
* slug). This is the trigger condition for the autocomplete menu:
|
|
1233
|
+
* the moment the user types a space, the slug is "committed" and the
|
|
1234
|
+
* menu should hide so further keystrokes form the arguments.
|
|
1235
|
+
*
|
|
1236
|
+
* Empty token is allowed (a bare ``/``) so the menu opens immediately
|
|
1237
|
+
* and lists everything — same UX as Slack/Discord.
|
|
1238
|
+
*/
|
|
1239
|
+
declare function parseSlashTokenInProgress(buffer: string): string | null;
|
|
1240
|
+
/**
|
|
1241
|
+
* Filter a list of skill summaries by a typed query and sort by
|
|
1242
|
+
* relevance: prefix matches first, then substring matches, alphabetic
|
|
1243
|
+
* within each bucket. Pinned slugs (the user's favourites — surfaced
|
|
1244
|
+
* by the React library modal) float to the very top.
|
|
1245
|
+
*
|
|
1246
|
+
* Pure function — same logic used by the React popover, the TUI
|
|
1247
|
+
* autocomplete, and the CLI. Pulling it out of the React component
|
|
1248
|
+
* means a change to the matching rules lands in one place.
|
|
1249
|
+
*/
|
|
1250
|
+
declare function filterSkills<T extends {
|
|
1251
|
+
slug?: string;
|
|
1252
|
+
name: string;
|
|
1253
|
+
}>(items: ReadonlyArray<T>, query: string, pinned?: ReadonlyArray<string>): T[];
|
|
1174
1254
|
|
|
1175
1255
|
type assistant_AssistantQueryOptions = AssistantQueryOptions;
|
|
1176
1256
|
type assistant_Chunk = Chunk;
|
|
1177
1257
|
type assistant_ChunkMetadata = ChunkMetadata;
|
|
1258
|
+
type assistant_ParsedSlashCommand = ParsedSlashCommand;
|
|
1178
1259
|
type assistant_RetrieveOptions = RetrieveOptions;
|
|
1179
1260
|
type assistant_RetrieveResult = RetrieveResult;
|
|
1261
|
+
type assistant_SkillSummary = SkillSummary;
|
|
1180
1262
|
declare const assistant_buildRetrievalChunkTool: typeof buildRetrievalChunkTool;
|
|
1181
1263
|
declare const assistant_buildRetrievalFullContextTool: typeof buildRetrievalFullContextTool;
|
|
1182
1264
|
declare const assistant_buildRetrievalTocTool: typeof buildRetrievalTocTool;
|
|
1265
|
+
declare const assistant_filterSkills: typeof filterSkills;
|
|
1266
|
+
declare const assistant_listSkills: typeof listSkills;
|
|
1267
|
+
declare const assistant_parseSlashCommand: typeof parseSlashCommand;
|
|
1268
|
+
declare const assistant_parseSlashTokenInProgress: typeof parseSlashTokenInProgress;
|
|
1183
1269
|
declare const assistant_queryAssistant: typeof queryAssistant;
|
|
1184
1270
|
declare const assistant_respondToAgent: typeof respondToAgent;
|
|
1185
1271
|
declare const assistant_retrieve: typeof retrieve;
|
|
1186
1272
|
declare namespace assistant {
|
|
1187
|
-
export { type assistant_AssistantQueryOptions as AssistantQueryOptions, type assistant_Chunk as Chunk, type assistant_ChunkMetadata as ChunkMetadata, type assistant_RetrieveOptions as RetrieveOptions, type assistant_RetrieveResult as RetrieveResult, assistant_buildRetrievalChunkTool as buildRetrievalChunkTool, assistant_buildRetrievalFullContextTool as buildRetrievalFullContextTool, assistant_buildRetrievalTocTool as buildRetrievalTocTool, assistant_queryAssistant as queryAssistant, assistant_respondToAgent as respondToAgent, assistant_retrieve as retrieve };
|
|
1273
|
+
export { type assistant_AssistantQueryOptions as AssistantQueryOptions, type assistant_Chunk as Chunk, type assistant_ChunkMetadata as ChunkMetadata, type assistant_ParsedSlashCommand as ParsedSlashCommand, type assistant_RetrieveOptions as RetrieveOptions, type assistant_RetrieveResult as RetrieveResult, type assistant_SkillSummary as SkillSummary, assistant_buildRetrievalChunkTool as buildRetrievalChunkTool, assistant_buildRetrievalFullContextTool as buildRetrievalFullContextTool, assistant_buildRetrievalTocTool as buildRetrievalTocTool, assistant_filterSkills as filterSkills, assistant_listSkills as listSkills, assistant_parseSlashCommand as parseSlashCommand, assistant_parseSlashTokenInProgress as parseSlashTokenInProgress, assistant_queryAssistant as queryAssistant, assistant_respondToAgent as respondToAgent, assistant_retrieve as retrieve };
|
|
1188
1274
|
}
|
|
1189
1275
|
|
|
1190
1276
|
/**
|
|
@@ -4260,4 +4346,4 @@ declare namespace responses {
|
|
|
4260
4346
|
export { type responses_SubmitBackgroundQueryOptions as SubmitBackgroundQueryOptions, responses_extractResponseText as extractResponseText, responses_getResponse as getResponse, responses_submitBackgroundQuery as submitBackgroundQuery };
|
|
4261
4347
|
}
|
|
4262
4348
|
|
|
4263
|
-
export { type
|
|
4349
|
+
export { type SkillSummary as $, type AuthHeaders as A, type ReconnectableWsConnection as B, type ConfigStore as C, type DmCryptoContext as D, type ResolvedCitation as E, type FormattedWsMessage as F, type ResponseCompletedEvent as G, type ResponseContentPartAddedEvent as H, type ResponseCreatedEvent as I, type ResponseFailedEvent as J, type ResponseOutputItemAddedEvent as K, type ListAllOptions as L, type MessageLevel as M, type ResponseOutputItemDoneEvent as N, type OutputTokensDetails as O, type ParsedSlashCommand as P, type QueryOptions as Q, type ReconnectOptions as R, type SkippedFile as S, type ResponseOutputTextDeltaEvent as T, type UploadResult as U, type ResponseOutputTextDoneEvent as V, type ResponseUsage as W, type SSEEvent as X, type SSEStreamCallbacks as Y, type SSEStreamResult as Z, type SSEStreamStartData as _, type CliConfig as a, type UserInfo as a0, type UserInputRequestEvent as a1, type UserMessageEvent as a2, type WorkspaceContext as a3, type WsConnection as a4, agentconfig as a5, assistant as a6, authenticatedFetch as a7, buildRetrievalChunkTool as a8, buildRetrievalFullContextTool as a9, parseSSEEvents as aA, parseSlashCommand as aB, parseSlashTokenInProgress as aC, performPasswordLogin as aD, performSigningKeyLogin as aE, performSsoDeviceFlowLogin as aF, requireData as aG, requireOk as aH, resolveAuth as aI, resolveCitations as aJ, resolveWorkspace as aK, responses as aL, selectWorkspace as aM, selectWorkspaceById as aN, settings as aO, streamSSE as aP, stripCitationMarkdown as aQ, summarizeCitations as aR, tags as aS, workspaces as aT, type ArbiErrorEvent as aU, buildRetrievalTocTool as aa, connectWebSocket as ab, connectWithReconnect as ac, consumeSSEStream as ad, contacts as ae, conversations as af, countCitations as ag, createAuthenticatedClient as ah, createDocumentWaiter as ai, dm as aj, doctags as ak, documents as al, files as am, filterSkills as an, formatAgentStepLabel as ao, formatFileSize as ap, formatStreamSummary as aq, formatUserName as ar, formatWorkspaceChoices as as, formatWsMessage as at, generateEncryptedWorkspaceKey as au, generateNewWorkspaceKey as av, getErrorCode as aw, getErrorMessage as ax, getRawWorkspaceKey as ay, health as az, type CliCredentials as b, type ChatSession as c, type UploadBatchResult as d, type UploadOptions as e, type UploadDirectOptions as f, type UploadDirectResult as g, SUPPORTED_EXTENSIONS as h, type AgentStepEvent as i, Arbi as j, ArbiApiError as k, ArbiError as l, type ArbiOptions as m, type ArtifactEvent as n, type AuthContext as o, type AuthenticatedClient as p, type CitationSummary as q, type ConnectOptions as r, DOC_TERMINAL_STATUSES as s, type DocumentListFields as t, type DocumentListOrder as u, type DocumentWaiter as v, type DocumentWaiterOptions as w, type ListPaginatedOptions as x, type MessageMetadataPayload$1 as y, type MessageQueuedEvent as z };
|
package/dist/browser.cjs
CHANGED
|
@@ -4346,6 +4346,7 @@ async function uploadFile(auth, fileData, fileName, options) {
|
|
|
4346
4346
|
const params = new URLSearchParams();
|
|
4347
4347
|
if (options?.folder) params.set("folder", sanitizeFolderPath(options.folder));
|
|
4348
4348
|
if (options?.configExtId) params.set("config_ext_id", options.configExtId);
|
|
4349
|
+
if (options?.wpType) params.set("wp_type", options.wpType);
|
|
4349
4350
|
const qs = params.toString();
|
|
4350
4351
|
const res = await authenticatedFetch({
|
|
4351
4352
|
...auth,
|
|
@@ -4361,6 +4362,7 @@ async function uploadFiles(auth, files, options) {
|
|
|
4361
4362
|
const params = new URLSearchParams();
|
|
4362
4363
|
if (options?.folder) params.set("folder", sanitizeFolderPath(options.folder));
|
|
4363
4364
|
if (options?.configExtId) params.set("config_ext_id", options.configExtId);
|
|
4365
|
+
if (options?.wpType) params.set("wp_type", options.wpType);
|
|
4364
4366
|
const qs = params.toString();
|
|
4365
4367
|
const res = await authenticatedFetch({
|
|
4366
4368
|
...auth,
|
|
@@ -4686,6 +4688,10 @@ __export(assistant_exports, {
|
|
|
4686
4688
|
buildRetrievalChunkTool: () => buildRetrievalChunkTool,
|
|
4687
4689
|
buildRetrievalFullContextTool: () => buildRetrievalFullContextTool,
|
|
4688
4690
|
buildRetrievalTocTool: () => buildRetrievalTocTool,
|
|
4691
|
+
filterSkills: () => filterSkills,
|
|
4692
|
+
listSkills: () => listSkills,
|
|
4693
|
+
parseSlashCommand: () => parseSlashCommand,
|
|
4694
|
+
parseSlashTokenInProgress: () => parseSlashTokenInProgress,
|
|
4689
4695
|
queryAssistant: () => queryAssistant,
|
|
4690
4696
|
respondToAgent: () => respondToAgent,
|
|
4691
4697
|
retrieve: () => retrieve
|
|
@@ -4781,6 +4787,40 @@ async function respondToAgent(arbi, assistantMessageExtId, answer) {
|
|
|
4781
4787
|
"Failed to respond to agent"
|
|
4782
4788
|
);
|
|
4783
4789
|
}
|
|
4790
|
+
async function listSkills(arbi, options) {
|
|
4791
|
+
const result = requireData(
|
|
4792
|
+
await arbi.fetch.GET("/v1/assistant/skills", {
|
|
4793
|
+
params: { query: { include_hidden: options?.includeHidden ?? false } }
|
|
4794
|
+
}),
|
|
4795
|
+
"Failed to list skills"
|
|
4796
|
+
);
|
|
4797
|
+
return result.skills;
|
|
4798
|
+
}
|
|
4799
|
+
function parseSlashCommand(input) {
|
|
4800
|
+
const m2 = /^\s*\/([a-zA-Z0-9_-]+)(?:\s+([\s\S]*))?$/.exec(input);
|
|
4801
|
+
if (!m2) return null;
|
|
4802
|
+
return { slug: m2[1].toLowerCase(), args: m2[2] ?? "" };
|
|
4803
|
+
}
|
|
4804
|
+
function parseSlashTokenInProgress(buffer) {
|
|
4805
|
+
const m2 = /^\s*\/([a-zA-Z0-9_-]*)$/.exec(buffer);
|
|
4806
|
+
return m2 ? m2[1].toLowerCase() : null;
|
|
4807
|
+
}
|
|
4808
|
+
function filterSkills(items, query, pinned = []) {
|
|
4809
|
+
const q2 = query.toLowerCase();
|
|
4810
|
+
const pinnedSet = new Set(pinned);
|
|
4811
|
+
const key = (s2) => (s2.slug ?? s2.name).toLowerCase();
|
|
4812
|
+
const matched = q2 ? items.filter((s2) => key(s2).includes(q2)) : items.slice();
|
|
4813
|
+
matched.sort((a2, b2) => {
|
|
4814
|
+
const aPinned = pinnedSet.has(key(a2)) ? 0 : 1;
|
|
4815
|
+
const bPinned = pinnedSet.has(key(b2)) ? 0 : 1;
|
|
4816
|
+
if (aPinned !== bPinned) return aPinned - bPinned;
|
|
4817
|
+
const aPrefix = key(a2).startsWith(q2) ? 0 : 1;
|
|
4818
|
+
const bPrefix = key(b2).startsWith(q2) ? 0 : 1;
|
|
4819
|
+
if (aPrefix !== bPrefix) return aPrefix - bPrefix;
|
|
4820
|
+
return key(a2).localeCompare(key(b2));
|
|
4821
|
+
});
|
|
4822
|
+
return matched;
|
|
4823
|
+
}
|
|
4784
4824
|
|
|
4785
4825
|
// src/operations/tags.ts
|
|
4786
4826
|
var tags_exports = {};
|