@arbidocs/sdk 0.3.115 → 0.3.116
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-B5b3SDW6.d.cts → browser-BS_k043E.d.cts} +257 -3
- package/dist/{browser-B5b3SDW6.d.ts → browser-BS_k043E.d.ts} +257 -3
- package/dist/browser.cjs +77 -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 +77 -3
- package/dist/browser.js.map +1 -1
- package/dist/index.cjs +70 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -108
- package/dist/index.d.ts +3 -108
- package/dist/index.js +70 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/browser.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { A as AgentStepDeltaEvent, a as AgentStepEvent, b as Arbi, c as ArbiApiError, d as ArbiError, e as ArbiErrorEvent, f as ArbiOptions, g as ArtifactEvent, h as AuthContext, i as AuthHeaders, j as AuthenticatedClient, C as ChatSession, k as CitationSummary, l as CliConfig, m as CliCredentials, n as CommandDescriptor, o as ConfigStore, p as ConnectOptions, q as CreateMemoryRequest, r as CreateTaskRequest, M as MemoryResponse, z as MemorySearchRequest, B as MemorySearchResponse, G as MessageMetadataPayload, H as MessageQueuedEvent, O as OutputTokensDetails, P as ParsedSlashCommand, Q as QueryOptions, R as ReconnectOptions,
|
|
1
|
+
export { A as AgentStepDeltaEvent, a as AgentStepEvent, b as Arbi, c as ArbiApiError, d as ArbiError, e as ArbiErrorEvent, f as ArbiOptions, g as ArtifactEvent, h as AuthContext, i as AuthHeaders, j as AuthenticatedClient, C as ChatSession, k as CitationSummary, l as CliConfig, m as CliCredentials, n as CommandDescriptor, o as ConfigStore, p as ConnectOptions, q as CreateMemoryRequest, r as CreateTaskRequest, M as MemoryResponse, z as MemorySearchRequest, B as MemorySearchResponse, G as MessageMetadataPayload, H as MessageQueuedEvent, O as OutputTokensDetails, P as ParsedSlashCommand, I as ProjectInvoicesResponse, J as ProjectUsageResponse, Q as QueryOptions, R as ReconnectOptions, K as ReconnectableWsConnection, N as ResolvedCitation, S as ResponseCompletedEvent, T as ResponseContentPartAddedEvent, U as ResponseCreatedEvent, V as ResponseFailedEvent, W as ResponseOutputItemAddedEvent, X as ResponseOutputItemDoneEvent, Y as ResponseOutputTextDeltaEvent, Z as ResponseOutputTextDoneEvent, _ as ResponseUsage, $ as SSEEvent, a0 as SSEStreamCallbacks, a1 as SSEStreamResult, a2 as SSEStreamStartData, a4 as SkillSummary, a6 as TaskResponse, a7 as UpdateMemoryRequest, a8 as UpdateTaskRequest, ae as UserDailyUsageResponse, af as UserInfo, ag as UserInputRequestEvent, ah as UserMessageEvent, ai as WebSocketAuthError, aj as WorkspaceChronologyOut, ak as WorkspaceContext, al as WsConnection, am as agentconfig, an as assistant, ao as authenticatedFetch, ap as buildRetrievalChunkTool, aq as buildRetrievalFullContextTool, ar as buildRetrievalTocTool, as as connectWebSocket, at as connectWithReconnect, au as consumeSSEStream, av as contacts, aw as conversations, ax as countCitations, ay as createAuthenticatedClient, aA as dm, aB as doctags, aC as documents, aD as files, aE as filterSkills, aF as formatAgentStepLabel, aG as formatFileSize, aI as formatUserName, aJ as formatWorkspaceChoices, aO as getErrorMessage, aP as getRawWorkspaceKey, aQ as health, aR as memory, aS as parseSSEEvents, aT as parseSlashCommand, aU as parseSlashTokenInProgress, aV as performPasswordLogin, aY as projects, aZ as requireData, a_ as requireOk, a$ as resolveAuth, b0 as resolveCitations, b1 as resolveWorkspace, b2 as responses, b3 as selectWorkspace, b4 as selectWorkspaceById, b5 as settings, b6 as streamSSE, b7 as stripCitationMarkdown, b8 as summarizeCitations, b9 as tags, ba as tasks, bb as workspaces } from './browser-BS_k043E.cjs';
|
|
2
2
|
import '@arbidocs/client';
|
package/dist/browser.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { A as AgentStepDeltaEvent, a as AgentStepEvent, b as Arbi, c as ArbiApiError, d as ArbiError, e as ArbiErrorEvent, f as ArbiOptions, g as ArtifactEvent, h as AuthContext, i as AuthHeaders, j as AuthenticatedClient, C as ChatSession, k as CitationSummary, l as CliConfig, m as CliCredentials, n as CommandDescriptor, o as ConfigStore, p as ConnectOptions, q as CreateMemoryRequest, r as CreateTaskRequest, M as MemoryResponse, z as MemorySearchRequest, B as MemorySearchResponse, G as MessageMetadataPayload, H as MessageQueuedEvent, O as OutputTokensDetails, P as ParsedSlashCommand, Q as QueryOptions, R as ReconnectOptions,
|
|
1
|
+
export { A as AgentStepDeltaEvent, a as AgentStepEvent, b as Arbi, c as ArbiApiError, d as ArbiError, e as ArbiErrorEvent, f as ArbiOptions, g as ArtifactEvent, h as AuthContext, i as AuthHeaders, j as AuthenticatedClient, C as ChatSession, k as CitationSummary, l as CliConfig, m as CliCredentials, n as CommandDescriptor, o as ConfigStore, p as ConnectOptions, q as CreateMemoryRequest, r as CreateTaskRequest, M as MemoryResponse, z as MemorySearchRequest, B as MemorySearchResponse, G as MessageMetadataPayload, H as MessageQueuedEvent, O as OutputTokensDetails, P as ParsedSlashCommand, I as ProjectInvoicesResponse, J as ProjectUsageResponse, Q as QueryOptions, R as ReconnectOptions, K as ReconnectableWsConnection, N as ResolvedCitation, S as ResponseCompletedEvent, T as ResponseContentPartAddedEvent, U as ResponseCreatedEvent, V as ResponseFailedEvent, W as ResponseOutputItemAddedEvent, X as ResponseOutputItemDoneEvent, Y as ResponseOutputTextDeltaEvent, Z as ResponseOutputTextDoneEvent, _ as ResponseUsage, $ as SSEEvent, a0 as SSEStreamCallbacks, a1 as SSEStreamResult, a2 as SSEStreamStartData, a4 as SkillSummary, a6 as TaskResponse, a7 as UpdateMemoryRequest, a8 as UpdateTaskRequest, ae as UserDailyUsageResponse, af as UserInfo, ag as UserInputRequestEvent, ah as UserMessageEvent, ai as WebSocketAuthError, aj as WorkspaceChronologyOut, ak as WorkspaceContext, al as WsConnection, am as agentconfig, an as assistant, ao as authenticatedFetch, ap as buildRetrievalChunkTool, aq as buildRetrievalFullContextTool, ar as buildRetrievalTocTool, as as connectWebSocket, at as connectWithReconnect, au as consumeSSEStream, av as contacts, aw as conversations, ax as countCitations, ay as createAuthenticatedClient, aA as dm, aB as doctags, aC as documents, aD as files, aE as filterSkills, aF as formatAgentStepLabel, aG as formatFileSize, aI as formatUserName, aJ as formatWorkspaceChoices, aO as getErrorMessage, aP as getRawWorkspaceKey, aQ as health, aR as memory, aS as parseSSEEvents, aT as parseSlashCommand, aU as parseSlashTokenInProgress, aV as performPasswordLogin, aY as projects, aZ as requireData, a_ as requireOk, a$ as resolveAuth, b0 as resolveCitations, b1 as resolveWorkspace, b2 as responses, b3 as selectWorkspace, b4 as selectWorkspaceById, b5 as settings, b6 as streamSSE, b7 as stripCitationMarkdown, b8 as summarizeCitations, b9 as tags, ba as tasks, bb as workspaces } from './browser-BS_k043E.js';
|
|
2
2
|
import '@arbidocs/client';
|
package/dist/browser.js
CHANGED
|
@@ -4639,6 +4639,7 @@ __export(workspaces_exports, {
|
|
|
4639
4639
|
copyDocuments: () => copyDocuments,
|
|
4640
4640
|
createWorkspace: () => createWorkspace,
|
|
4641
4641
|
deleteWorkspaces: () => deleteWorkspaces,
|
|
4642
|
+
getWorkspaceChronology: () => getWorkspaceChronology,
|
|
4642
4643
|
listWorkspaceUsers: () => listWorkspaceUsers,
|
|
4643
4644
|
listWorkspaces: () => listWorkspaces,
|
|
4644
4645
|
removeWorkspaceUsers: () => removeWorkspaceUsers,
|
|
@@ -4703,6 +4704,14 @@ async function setUserRole(arbi, userIds, role) {
|
|
|
4703
4704
|
"Failed to update roles"
|
|
4704
4705
|
);
|
|
4705
4706
|
}
|
|
4707
|
+
async function getWorkspaceChronology(arbi, workspaceId) {
|
|
4708
|
+
return requireData(
|
|
4709
|
+
await arbi.fetch.GET("/v1/workspace/{workspace_ext_id}/chronology", {
|
|
4710
|
+
params: { path: { workspace_ext_id: workspaceId } }
|
|
4711
|
+
}),
|
|
4712
|
+
"Failed to fetch workspace chronology"
|
|
4713
|
+
);
|
|
4714
|
+
}
|
|
4706
4715
|
async function copyDocuments(arbi, targetWorkspaceId, docIds, targetWorkspaceKey) {
|
|
4707
4716
|
return requireData(
|
|
4708
4717
|
await arbi.fetch.POST("/v1/workspace/copy", {
|
|
@@ -5067,6 +5076,7 @@ __export(dm_exports, {
|
|
|
5067
5076
|
decryptDmContent: () => decryptDmContent,
|
|
5068
5077
|
deleteDMs: () => deleteDMs,
|
|
5069
5078
|
encryptDmContent: () => encryptDmContent,
|
|
5079
|
+
listActivity: () => listActivity,
|
|
5070
5080
|
listDMs: () => listDMs,
|
|
5071
5081
|
listDecryptedDMs: () => listDecryptedDMs,
|
|
5072
5082
|
markRead: () => markRead,
|
|
@@ -5122,6 +5132,20 @@ async function listDecryptedDMs(arbi, crypto) {
|
|
|
5122
5132
|
const raw = await listDMs(arbi);
|
|
5123
5133
|
return decryptDmBatch(arbi, raw, crypto);
|
|
5124
5134
|
}
|
|
5135
|
+
async function listActivity(arbi, options) {
|
|
5136
|
+
return requireData(
|
|
5137
|
+
await arbi.fetch.GET("/v1/notifications/", {
|
|
5138
|
+
params: {
|
|
5139
|
+
query: {
|
|
5140
|
+
type: "activity",
|
|
5141
|
+
...options?.limit != null ? { limit: options.limit } : {},
|
|
5142
|
+
...options?.offset != null ? { offset: options.offset } : {}
|
|
5143
|
+
}
|
|
5144
|
+
}
|
|
5145
|
+
}),
|
|
5146
|
+
"Failed to fetch activity"
|
|
5147
|
+
);
|
|
5148
|
+
}
|
|
5125
5149
|
async function sendEncryptedDM(arbi, messages, crypto) {
|
|
5126
5150
|
const encrypted = await Promise.all(
|
|
5127
5151
|
messages.map(async (msg) => ({
|
|
@@ -5357,6 +5381,15 @@ async function listSessions(arbi) {
|
|
|
5357
5381
|
}
|
|
5358
5382
|
|
|
5359
5383
|
// src/operations/projects.ts
|
|
5384
|
+
var projects_exports = {};
|
|
5385
|
+
__export(projects_exports, {
|
|
5386
|
+
createProject: () => createProject,
|
|
5387
|
+
getProjectInvoices: () => getProjectInvoices,
|
|
5388
|
+
getProjectUsage: () => getProjectUsage,
|
|
5389
|
+
getUserUsageToday: () => getUserUsageToday,
|
|
5390
|
+
listProjects: () => listProjects,
|
|
5391
|
+
refreshProject: () => refreshProject
|
|
5392
|
+
});
|
|
5360
5393
|
async function listProjects(arbi) {
|
|
5361
5394
|
return requireData(await arbi.fetch.GET("/v1/user/projects/"), "Failed to fetch projects");
|
|
5362
5395
|
}
|
|
@@ -5376,6 +5409,28 @@ async function refreshProject(arbi, projectExtId) {
|
|
|
5376
5409
|
"Failed to refresh project"
|
|
5377
5410
|
);
|
|
5378
5411
|
}
|
|
5412
|
+
async function getProjectUsage(arbi, projectExtId, monthsBack) {
|
|
5413
|
+
return requireData(
|
|
5414
|
+
await arbi.fetch.GET("/v1/user/projects/{project_ext_id}/usage", {
|
|
5415
|
+
params: {
|
|
5416
|
+
path: { project_ext_id: projectExtId },
|
|
5417
|
+
query: monthsBack === void 0 ? void 0 : { months_back: monthsBack }
|
|
5418
|
+
}
|
|
5419
|
+
}),
|
|
5420
|
+
"Failed to fetch project usage"
|
|
5421
|
+
);
|
|
5422
|
+
}
|
|
5423
|
+
async function getProjectInvoices(arbi, projectExtId) {
|
|
5424
|
+
return requireData(
|
|
5425
|
+
await arbi.fetch.GET("/v1/user/projects/{project_ext_id}/invoices", {
|
|
5426
|
+
params: { path: { project_ext_id: projectExtId } }
|
|
5427
|
+
}),
|
|
5428
|
+
"Failed to fetch project invoices"
|
|
5429
|
+
);
|
|
5430
|
+
}
|
|
5431
|
+
async function getUserUsageToday(arbi) {
|
|
5432
|
+
return requireData(await arbi.fetch.GET("/v1/user/me/usage/today"), "Failed to fetch today usage");
|
|
5433
|
+
}
|
|
5379
5434
|
|
|
5380
5435
|
// src/operations/tasks.ts
|
|
5381
5436
|
var tasks_exports = {};
|
|
@@ -5601,7 +5656,16 @@ var Arbi = class {
|
|
|
5601
5656
|
projects = {
|
|
5602
5657
|
list: () => listProjects(this.requireClient()),
|
|
5603
5658
|
create: (name) => createProject(this.requireClient(), name),
|
|
5604
|
-
refresh: (projectExtId) => refreshProject(this.requireClient(), projectExtId)
|
|
5659
|
+
refresh: (projectExtId) => refreshProject(this.requireClient(), projectExtId),
|
|
5660
|
+
/** AI usage + spend breakdown for a project's billing period. */
|
|
5661
|
+
usage: (projectExtId, monthsBack) => getProjectUsage(this.requireClient(), projectExtId, monthsBack),
|
|
5662
|
+
/** Stripe invoices for a project's subscription. */
|
|
5663
|
+
invoices: (projectExtId) => getProjectInvoices(this.requireClient(), projectExtId)
|
|
5664
|
+
};
|
|
5665
|
+
// ── User (account-scoped usage) ───────────────────────────────────────
|
|
5666
|
+
user = {
|
|
5667
|
+
/** Today's deployment-wide credit spend for the current user. */
|
|
5668
|
+
usageToday: () => getUserUsageToday(this.requireClient())
|
|
5605
5669
|
};
|
|
5606
5670
|
// ── Workspaces ────────────────────────────────────────────────────────
|
|
5607
5671
|
workspaces = {
|
|
@@ -5649,6 +5713,14 @@ var Arbi = class {
|
|
|
5649
5713
|
targetWorkspaceId,
|
|
5650
5714
|
docIds,
|
|
5651
5715
|
targetWorkspaceKey
|
|
5716
|
+
),
|
|
5717
|
+
/**
|
|
5718
|
+
* The last-generated document-derived chronology (key case events / dates).
|
|
5719
|
+
* Defaults to the currently open workspace when no id is passed.
|
|
5720
|
+
*/
|
|
5721
|
+
chronology: (workspaceId) => getWorkspaceChronology(
|
|
5722
|
+
this.requireClient(),
|
|
5723
|
+
workspaceId ?? this.requireWorkspace()
|
|
5652
5724
|
)
|
|
5653
5725
|
};
|
|
5654
5726
|
// ── Documents ─────────────────────────────────────────────────────────
|
|
@@ -5779,7 +5851,9 @@ var Arbi = class {
|
|
|
5779
5851
|
list: () => listDMs(this.requireClient()),
|
|
5780
5852
|
send: (messages) => sendDM(this.requireClient(), messages),
|
|
5781
5853
|
markRead: (messageIds) => markRead(this.requireClient(), messageIds),
|
|
5782
|
-
delete: (messageIds) => deleteDMs(this.requireClient(), messageIds)
|
|
5854
|
+
delete: (messageIds) => deleteDMs(this.requireClient(), messageIds),
|
|
5855
|
+
/** List the current user's durable activity feed (never unread; excluded from DMs). */
|
|
5856
|
+
listActivity: (options) => listActivity(this.requireClient(), options)
|
|
5783
5857
|
};
|
|
5784
5858
|
// ── Settings ──────────────────────────────────────────────────────────
|
|
5785
5859
|
settings = {
|
|
@@ -5923,6 +5997,6 @@ function extractResponseText(response) {
|
|
|
5923
5997
|
return parts.join("");
|
|
5924
5998
|
}
|
|
5925
5999
|
|
|
5926
|
-
export { Arbi, ArbiApiError, ArbiError, WebSocketAuthError, agentconfig_exports as agentconfig, assistant_exports as assistant, authenticatedFetch, buildRetrievalChunkTool, buildRetrievalFullContextTool, buildRetrievalTocTool, connectWebSocket, connectWithReconnect, consumeSSEStream, contacts_exports as contacts, conversations_exports as conversations, countCitations, createAuthenticatedClient, dm_exports as dm, doctags_exports as doctags, documents_exports as documents, files_exports as files, filterSkills, formatAgentStepLabel, formatFileSize, formatUserName, formatWorkspaceChoices, getErrorMessage, getRawWorkspaceKey, health_exports as health, memory_exports as memory, parseSSEEvents, parseSlashCommand, parseSlashTokenInProgress, performPasswordLogin, requireData, requireOk, resolveAuth, resolveCitations, resolveWorkspace, responses_exports as responses, selectWorkspace, selectWorkspaceById, settings_exports as settings, streamSSE, stripCitationMarkdown, summarizeCitations, tags_exports as tags, tasks_exports as tasks, workspaces_exports as workspaces };
|
|
6000
|
+
export { Arbi, ArbiApiError, ArbiError, WebSocketAuthError, agentconfig_exports as agentconfig, assistant_exports as assistant, authenticatedFetch, buildRetrievalChunkTool, buildRetrievalFullContextTool, buildRetrievalTocTool, connectWebSocket, connectWithReconnect, consumeSSEStream, contacts_exports as contacts, conversations_exports as conversations, countCitations, createAuthenticatedClient, dm_exports as dm, doctags_exports as doctags, documents_exports as documents, files_exports as files, filterSkills, formatAgentStepLabel, formatFileSize, formatUserName, formatWorkspaceChoices, getErrorMessage, getRawWorkspaceKey, health_exports as health, memory_exports as memory, parseSSEEvents, parseSlashCommand, parseSlashTokenInProgress, performPasswordLogin, projects_exports as projects, requireData, requireOk, resolveAuth, resolveCitations, resolveWorkspace, responses_exports as responses, selectWorkspace, selectWorkspaceById, settings_exports as settings, streamSSE, stripCitationMarkdown, summarizeCitations, tags_exports as tags, tasks_exports as tasks, workspaces_exports as workspaces };
|
|
5927
6001
|
//# sourceMappingURL=browser.js.map
|
|
5928
6002
|
//# sourceMappingURL=browser.js.map
|