@arbidocs/sdk 0.3.139 → 0.3.141
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-CygvmtPQ.d.cts → browser-D239JHwL.d.cts} +90 -17
- package/dist/{browser-CygvmtPQ.d.ts → browser-D239JHwL.d.ts} +90 -17
- package/dist/browser.cjs +28 -2
- 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 +28 -2
- package/dist/browser.js.map +1 -1
- package/dist/index.cjs +40 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +40 -3
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as ConfigStore, m as CliConfig, n as CliCredentials, C as ChatSession, a9 as SkippedFile,
|
|
2
|
-
export { b as AgentStepEvent, c as Arbi, d as ArbiApiError, e as ArbiError, g as ArbiOptions, h as ArtifactEvent, i as AuthContext, k as AuthenticatedClient, l as CitationSummary, o as CommandDescriptor, q as ConnectOptions, D as DOC_TERMINAL_STATUSES, v as DocNameMap, w as DocumentListFields, x as DocumentListOrder, y as DocumentWaiter, z as DocumentWaiterOptions, F as FormattedWsMessage, L as ListAllOptions, B as ListPaginatedOptions, M as MessageLevel, E as MessageMetadataPayload, G as MessageQueuedEvent, O as OutputTokensDetails, P as ParsedSlashCommand, K as ProjectInvoicesResponse, Q as ProjectUsageResponse, R as QueryOptions, S as ReconnectOptions, T as ReconnectableWsConnection, U as ResolvedCitation, V as ResolvedRecipient, W as ResponseCompletedEvent, X as ResponseContentPartAddedEvent, Y as ResponseCreatedEvent, Z as ResponseFailedEvent, _ as ResponseOutputItemAddedEvent, $ as ResponseOutputItemDoneEvent, a0 as ResponseOutputTextDeltaEvent, a1 as ResponseOutputTextDoneEvent, a2 as ResponseUsage, a3 as SSEEvent, a4 as SSEStreamCallbacks, a5 as SSEStreamResult, a6 as SSEStreamStartData, a8 as SkillSummary,
|
|
1
|
+
import { p as ConfigStore, m as CliConfig, n as CliCredentials, C as ChatSession, a9 as SkippedFile, ai as UploadResult, j as AuthHeaders, ae as UploadBatchResult, ah as UploadOptions, af as UploadDirectOptions, ag as UploadDirectResult, a7 as SUPPORTED_EXTENSIONS, u as DmCryptoContext } from './browser-D239JHwL.cjs';
|
|
2
|
+
export { b as AgentStepEvent, c as Arbi, d as ArbiApiError, e as ArbiError, g as ArbiOptions, h as ArtifactEvent, i as AuthContext, k as AuthenticatedClient, l as CitationSummary, o as CommandDescriptor, q as ConnectOptions, D as DOC_TERMINAL_STATUSES, v as DocNameMap, w as DocumentListFields, x as DocumentListOrder, y as DocumentWaiter, z as DocumentWaiterOptions, F as FormattedWsMessage, L as ListAllOptions, B as ListPaginatedOptions, M as MessageLevel, E as MessageMetadataPayload, G as MessageQueuedEvent, O as OutputTokensDetails, P as ParsedSlashCommand, K as ProjectInvoicesResponse, Q as ProjectUsageResponse, R as QueryOptions, S as ReconnectOptions, T as ReconnectableWsConnection, U as ResolvedCitation, V as ResolvedRecipient, W as ResponseCompletedEvent, X as ResponseContentPartAddedEvent, Y as ResponseCreatedEvent, Z as ResponseFailedEvent, _ as ResponseOutputItemAddedEvent, $ as ResponseOutputItemDoneEvent, a0 as ResponseOutputTextDeltaEvent, a1 as ResponseOutputTextDoneEvent, a2 as ResponseUsage, a3 as SSEEvent, a4 as SSEStreamCallbacks, a5 as SSEStreamResult, a6 as SSEStreamStartData, a8 as SkillSummary, ab as TokenBudgetContext, aj as UserDailyUsageResponse, ak as UserInfo, al as UserInputRequestEvent, am as UserMessageEvent, an as WebSocketAuthError, ao as WorkspaceChronologyOut, ap as WorkspaceContext, aq as WsConnection, ar as agentconfig, as as assistant, at as authenticatedFetch, au as buildDocNameMap, av as buildRetrievalChunkTool, aw as buildRetrievalFullContextTool, ax as buildRetrievalTocTool, ay as connectWebSocket, az as connectWithReconnect, aA as consumeSSEStream, aB as contacts, aC as conversations, aD as countCitations, aE as createAuthenticatedClient, aF as createDocumentWaiter, aG as dm, aH as doctags, aI as documents, aJ as files, aK as filterSkills, aL as formatAgentStepLabel, aM as formatFileSize, aN as formatItemLabel, aO as formatStreamSummary, aP as formatUserName, aQ as formatWorkspaceChoices, aR as formatWsMessage, aS as generateEncryptedWorkspaceKey, aT as generateNewWorkspaceKey, aU as getErrorCode, aV as getErrorMessage, aW as getRawWorkspaceKey, aX as health, aY as notes, aZ as parseSSEEvents, a_ as parseSlashCommand, a$ as parseSlashTokenInProgress, b0 as performPasswordLogin, b1 as performSigningKeyLogin, b2 as performSsoDeviceFlowLogin, b3 as projects, b4 as requireData, b5 as requireOk, b6 as resolveAuth, b7 as resolveCitations, b8 as resolveWorkspace, b9 as responses, ba as selectWorkspace, bb as selectWorkspaceById, bc as settings, bd as streamSSE, be as stripCitationMarkdown, bf as summarizeCitations, bg as tags, bh as tasks, bi as workspaces } from './browser-D239JHwL.cjs';
|
|
3
3
|
import { SessionStorageProvider, ArbiClient, components } from '@arbidocs/client';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -421,6 +421,7 @@ declare function getAgentConfig(arbi: ArbiClient, agentExtId: string): Promise<{
|
|
|
421
421
|
ENABLE_THINKING: boolean;
|
|
422
422
|
AGENT_STRICT_TOOL_CALLS: boolean;
|
|
423
423
|
AGENT_MAX_ITERATIONS: number;
|
|
424
|
+
AGENT_TURN_CREDIT_BUDGET: number;
|
|
424
425
|
AGENT_MAX_PARALLEL_TOOL_CALLS: number;
|
|
425
426
|
AGENT_HISTORY_CHAR_THRESHOLD: number;
|
|
426
427
|
AGENT_SYSTEM_PROMPT: string;
|
|
@@ -544,7 +545,6 @@ declare function getAgentConfig(arbi: ArbiClient, agentExtId: string): Promise<{
|
|
|
544
545
|
SYSTEM_INSTRUCTION: string;
|
|
545
546
|
TEMPERATURE: number;
|
|
546
547
|
MAX_TOKENS: number;
|
|
547
|
-
MAX_ITERATIONS: number;
|
|
548
548
|
};
|
|
549
549
|
ModelCitation: {
|
|
550
550
|
SIM_THREASHOLD: number;
|
|
@@ -649,6 +649,7 @@ declare function getAgentConfig(arbi: ArbiClient, agentExtId: string): Promise<{
|
|
|
649
649
|
AGENT_MODEL_NAME: string;
|
|
650
650
|
ENABLE_THINKING: boolean;
|
|
651
651
|
AGENT_MAX_ITERATIONS: number;
|
|
652
|
+
AGENT_TURN_CREDIT_BUDGET: number;
|
|
652
653
|
};
|
|
653
654
|
DoctagLLM: {
|
|
654
655
|
AUTO_RENAME: boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as ConfigStore, m as CliConfig, n as CliCredentials, C as ChatSession, a9 as SkippedFile,
|
|
2
|
-
export { b as AgentStepEvent, c as Arbi, d as ArbiApiError, e as ArbiError, g as ArbiOptions, h as ArtifactEvent, i as AuthContext, k as AuthenticatedClient, l as CitationSummary, o as CommandDescriptor, q as ConnectOptions, D as DOC_TERMINAL_STATUSES, v as DocNameMap, w as DocumentListFields, x as DocumentListOrder, y as DocumentWaiter, z as DocumentWaiterOptions, F as FormattedWsMessage, L as ListAllOptions, B as ListPaginatedOptions, M as MessageLevel, E as MessageMetadataPayload, G as MessageQueuedEvent, O as OutputTokensDetails, P as ParsedSlashCommand, K as ProjectInvoicesResponse, Q as ProjectUsageResponse, R as QueryOptions, S as ReconnectOptions, T as ReconnectableWsConnection, U as ResolvedCitation, V as ResolvedRecipient, W as ResponseCompletedEvent, X as ResponseContentPartAddedEvent, Y as ResponseCreatedEvent, Z as ResponseFailedEvent, _ as ResponseOutputItemAddedEvent, $ as ResponseOutputItemDoneEvent, a0 as ResponseOutputTextDeltaEvent, a1 as ResponseOutputTextDoneEvent, a2 as ResponseUsage, a3 as SSEEvent, a4 as SSEStreamCallbacks, a5 as SSEStreamResult, a6 as SSEStreamStartData, a8 as SkillSummary,
|
|
1
|
+
import { p as ConfigStore, m as CliConfig, n as CliCredentials, C as ChatSession, a9 as SkippedFile, ai as UploadResult, j as AuthHeaders, ae as UploadBatchResult, ah as UploadOptions, af as UploadDirectOptions, ag as UploadDirectResult, a7 as SUPPORTED_EXTENSIONS, u as DmCryptoContext } from './browser-D239JHwL.js';
|
|
2
|
+
export { b as AgentStepEvent, c as Arbi, d as ArbiApiError, e as ArbiError, g as ArbiOptions, h as ArtifactEvent, i as AuthContext, k as AuthenticatedClient, l as CitationSummary, o as CommandDescriptor, q as ConnectOptions, D as DOC_TERMINAL_STATUSES, v as DocNameMap, w as DocumentListFields, x as DocumentListOrder, y as DocumentWaiter, z as DocumentWaiterOptions, F as FormattedWsMessage, L as ListAllOptions, B as ListPaginatedOptions, M as MessageLevel, E as MessageMetadataPayload, G as MessageQueuedEvent, O as OutputTokensDetails, P as ParsedSlashCommand, K as ProjectInvoicesResponse, Q as ProjectUsageResponse, R as QueryOptions, S as ReconnectOptions, T as ReconnectableWsConnection, U as ResolvedCitation, V as ResolvedRecipient, W as ResponseCompletedEvent, X as ResponseContentPartAddedEvent, Y as ResponseCreatedEvent, Z as ResponseFailedEvent, _ as ResponseOutputItemAddedEvent, $ as ResponseOutputItemDoneEvent, a0 as ResponseOutputTextDeltaEvent, a1 as ResponseOutputTextDoneEvent, a2 as ResponseUsage, a3 as SSEEvent, a4 as SSEStreamCallbacks, a5 as SSEStreamResult, a6 as SSEStreamStartData, a8 as SkillSummary, ab as TokenBudgetContext, aj as UserDailyUsageResponse, ak as UserInfo, al as UserInputRequestEvent, am as UserMessageEvent, an as WebSocketAuthError, ao as WorkspaceChronologyOut, ap as WorkspaceContext, aq as WsConnection, ar as agentconfig, as as assistant, at as authenticatedFetch, au as buildDocNameMap, av as buildRetrievalChunkTool, aw as buildRetrievalFullContextTool, ax as buildRetrievalTocTool, ay as connectWebSocket, az as connectWithReconnect, aA as consumeSSEStream, aB as contacts, aC as conversations, aD as countCitations, aE as createAuthenticatedClient, aF as createDocumentWaiter, aG as dm, aH as doctags, aI as documents, aJ as files, aK as filterSkills, aL as formatAgentStepLabel, aM as formatFileSize, aN as formatItemLabel, aO as formatStreamSummary, aP as formatUserName, aQ as formatWorkspaceChoices, aR as formatWsMessage, aS as generateEncryptedWorkspaceKey, aT as generateNewWorkspaceKey, aU as getErrorCode, aV as getErrorMessage, aW as getRawWorkspaceKey, aX as health, aY as notes, aZ as parseSSEEvents, a_ as parseSlashCommand, a$ as parseSlashTokenInProgress, b0 as performPasswordLogin, b1 as performSigningKeyLogin, b2 as performSsoDeviceFlowLogin, b3 as projects, b4 as requireData, b5 as requireOk, b6 as resolveAuth, b7 as resolveCitations, b8 as resolveWorkspace, b9 as responses, ba as selectWorkspace, bb as selectWorkspaceById, bc as settings, bd as streamSSE, be as stripCitationMarkdown, bf as summarizeCitations, bg as tags, bh as tasks, bi as workspaces } from './browser-D239JHwL.js';
|
|
3
3
|
import { SessionStorageProvider, ArbiClient, components } from '@arbidocs/client';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -421,6 +421,7 @@ declare function getAgentConfig(arbi: ArbiClient, agentExtId: string): Promise<{
|
|
|
421
421
|
ENABLE_THINKING: boolean;
|
|
422
422
|
AGENT_STRICT_TOOL_CALLS: boolean;
|
|
423
423
|
AGENT_MAX_ITERATIONS: number;
|
|
424
|
+
AGENT_TURN_CREDIT_BUDGET: number;
|
|
424
425
|
AGENT_MAX_PARALLEL_TOOL_CALLS: number;
|
|
425
426
|
AGENT_HISTORY_CHAR_THRESHOLD: number;
|
|
426
427
|
AGENT_SYSTEM_PROMPT: string;
|
|
@@ -544,7 +545,6 @@ declare function getAgentConfig(arbi: ArbiClient, agentExtId: string): Promise<{
|
|
|
544
545
|
SYSTEM_INSTRUCTION: string;
|
|
545
546
|
TEMPERATURE: number;
|
|
546
547
|
MAX_TOKENS: number;
|
|
547
|
-
MAX_ITERATIONS: number;
|
|
548
548
|
};
|
|
549
549
|
ModelCitation: {
|
|
550
550
|
SIM_THREASHOLD: number;
|
|
@@ -649,6 +649,7 @@ declare function getAgentConfig(arbi: ArbiClient, agentExtId: string): Promise<{
|
|
|
649
649
|
AGENT_MODEL_NAME: string;
|
|
650
650
|
ENABLE_THINKING: boolean;
|
|
651
651
|
AGENT_MAX_ITERATIONS: number;
|
|
652
|
+
AGENT_TURN_CREDIT_BUDGET: number;
|
|
652
653
|
};
|
|
653
654
|
DoctagLLM: {
|
|
654
655
|
AUTO_RENAME: boolean;
|
package/dist/index.js
CHANGED
|
@@ -4354,6 +4354,7 @@ async function streamSSE(response, callbacks = {}) {
|
|
|
4354
4354
|
}
|
|
4355
4355
|
if (data.context) {
|
|
4356
4356
|
context = data.context;
|
|
4357
|
+
callbacks.onContextUpdate?.(data.context);
|
|
4357
4358
|
}
|
|
4358
4359
|
if (data.t != null) callbacks.onElapsedTime?.(data.t);
|
|
4359
4360
|
callbacks.onComplete?.();
|
|
@@ -4469,6 +4470,9 @@ function formatStreamSummary(result, elapsedTime) {
|
|
|
4469
4470
|
const used = result.context.all_llm_calls?.last_input_tokens ?? result.context.total_input;
|
|
4470
4471
|
parts.push(`${used.toLocaleString()}/${result.context.context_window.toLocaleString()} context`);
|
|
4471
4472
|
}
|
|
4473
|
+
if (result.context?.credits_spent != null && result.context.credit_budget != null) {
|
|
4474
|
+
parts.push(`${result.context.credits_spent.toFixed(2)}/${result.context.credit_budget} credits`);
|
|
4475
|
+
}
|
|
4472
4476
|
if (elapsedTime != null) {
|
|
4473
4477
|
parts.push(`${elapsedTime.toFixed(1)}s`);
|
|
4474
4478
|
}
|
|
@@ -6118,13 +6122,29 @@ async function runTask(arbi, taskId) {
|
|
|
6118
6122
|
}
|
|
6119
6123
|
|
|
6120
6124
|
// src/operations/notes.ts
|
|
6125
|
+
var notes_exports = {};
|
|
6126
|
+
__export(notes_exports, {
|
|
6127
|
+
createNote: () => createNote,
|
|
6128
|
+
deleteNote: () => deleteNote,
|
|
6129
|
+
listNotes: () => listNotes,
|
|
6130
|
+
remindNote: () => remindNote,
|
|
6131
|
+
searchNotes: () => searchNotes,
|
|
6132
|
+
updateNote: () => updateNote
|
|
6133
|
+
});
|
|
6121
6134
|
async function createNote(arbi, body) {
|
|
6122
6135
|
return requireData(await arbi.fetch.POST("/v1/notes/", { body }), "Failed to create note");
|
|
6123
6136
|
}
|
|
6124
6137
|
async function listNotes(arbi, options) {
|
|
6125
6138
|
return requireData(
|
|
6126
6139
|
await arbi.fetch.GET("/v1/notes/list", {
|
|
6127
|
-
params: {
|
|
6140
|
+
params: {
|
|
6141
|
+
query: {
|
|
6142
|
+
pinned_only: options?.pinnedOnly ?? false,
|
|
6143
|
+
date_from: options?.from,
|
|
6144
|
+
date_to: options?.to,
|
|
6145
|
+
dated_only: options?.datedOnly
|
|
6146
|
+
}
|
|
6147
|
+
}
|
|
6128
6148
|
}),
|
|
6129
6149
|
"Failed to list notes"
|
|
6130
6150
|
);
|
|
@@ -6147,6 +6167,18 @@ async function deleteNote(arbi, memoryId) {
|
|
|
6147
6167
|
});
|
|
6148
6168
|
if (error) throw new Error("Failed to delete note");
|
|
6149
6169
|
}
|
|
6170
|
+
async function remindNote(arbi, noteId, options = {}) {
|
|
6171
|
+
return requireData(
|
|
6172
|
+
await arbi.fetch.POST("/v1/notes/{note_ext_id}/remind", {
|
|
6173
|
+
params: { path: { note_ext_id: noteId } },
|
|
6174
|
+
body: {
|
|
6175
|
+
remind_at: options.remindAt ?? null,
|
|
6176
|
+
lead_minutes: options.leadMinutes ?? null
|
|
6177
|
+
}
|
|
6178
|
+
}),
|
|
6179
|
+
"Failed to set reminder"
|
|
6180
|
+
);
|
|
6181
|
+
}
|
|
6150
6182
|
|
|
6151
6183
|
// src/arbi.ts
|
|
6152
6184
|
var Arbi = class {
|
|
@@ -6627,10 +6659,15 @@ var Arbi = class {
|
|
|
6627
6659
|
// ── Workspace notes ─────────────────────────────────────────────────
|
|
6628
6660
|
notes = {
|
|
6629
6661
|
create: (body) => createNote(this.requireClient(), body),
|
|
6662
|
+
/** Pass `from`/`to`/`datedOnly` for the timeline view — dated notes only,
|
|
6663
|
+
* ordered by when they happened. */
|
|
6630
6664
|
list: (options) => listNotes(this.requireClient(), options),
|
|
6631
6665
|
search: (body) => searchNotes(this.requireClient(), body),
|
|
6632
6666
|
update: (noteId, body) => updateNote(this.requireClient(), noteId, body),
|
|
6633
|
-
delete: (noteId) => deleteNote(this.requireClient(), noteId)
|
|
6667
|
+
delete: (noteId) => deleteNote(this.requireClient(), noteId),
|
|
6668
|
+
/** One-off reminder on a dated note: an explicit `remindAt`, or
|
|
6669
|
+
* `leadMinutes` before its date. */
|
|
6670
|
+
remind: (noteId, options = {}) => remindNote(this.requireClient(), noteId, options)
|
|
6634
6671
|
};
|
|
6635
6672
|
// ── Sessions ────────────────────────────────────────────────────────
|
|
6636
6673
|
sessions = {
|
|
@@ -7779,6 +7816,6 @@ async function startDmListener(options) {
|
|
|
7779
7816
|
};
|
|
7780
7817
|
}
|
|
7781
7818
|
|
|
7782
|
-
export { Arbi, ArbiApiError, ArbiError, ClaudeOrchestrator, DOC_TERMINAL_STATUSES, FileConfigStore, OpenClawOrchestrator, WebSocketAuthError, agentconfig_exports as agentconfig, agents_exports as agents, assistant_exports as assistant, authenticatedFetch, buildDocNameMap, 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, 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, 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, tasks_exports as tasks, workspaces_exports as workspaces };
|
|
7819
|
+
export { Arbi, ArbiApiError, ArbiError, ClaudeOrchestrator, DOC_TERMINAL_STATUSES, FileConfigStore, OpenClawOrchestrator, WebSocketAuthError, agentconfig_exports as agentconfig, agents_exports as agents, assistant_exports as assistant, authenticatedFetch, buildDocNameMap, 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, 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, notes_exports as notes, 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, tasks_exports as tasks, workspaces_exports as workspaces };
|
|
7783
7820
|
//# sourceMappingURL=index.js.map
|
|
7784
7821
|
//# sourceMappingURL=index.js.map
|