@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.cjs
CHANGED
|
@@ -4363,6 +4363,7 @@ async function streamSSE(response, callbacks = {}) {
|
|
|
4363
4363
|
}
|
|
4364
4364
|
if (data.context) {
|
|
4365
4365
|
context = data.context;
|
|
4366
|
+
callbacks.onContextUpdate?.(data.context);
|
|
4366
4367
|
}
|
|
4367
4368
|
if (data.t != null) callbacks.onElapsedTime?.(data.t);
|
|
4368
4369
|
callbacks.onComplete?.();
|
|
@@ -4478,6 +4479,9 @@ function formatStreamSummary(result, elapsedTime) {
|
|
|
4478
4479
|
const used = result.context.all_llm_calls?.last_input_tokens ?? result.context.total_input;
|
|
4479
4480
|
parts.push(`${used.toLocaleString()}/${result.context.context_window.toLocaleString()} context`);
|
|
4480
4481
|
}
|
|
4482
|
+
if (result.context?.credits_spent != null && result.context.credit_budget != null) {
|
|
4483
|
+
parts.push(`${result.context.credits_spent.toFixed(2)}/${result.context.credit_budget} credits`);
|
|
4484
|
+
}
|
|
4481
4485
|
if (elapsedTime != null) {
|
|
4482
4486
|
parts.push(`${elapsedTime.toFixed(1)}s`);
|
|
4483
4487
|
}
|
|
@@ -6127,13 +6131,29 @@ async function runTask(arbi, taskId) {
|
|
|
6127
6131
|
}
|
|
6128
6132
|
|
|
6129
6133
|
// src/operations/notes.ts
|
|
6134
|
+
var notes_exports = {};
|
|
6135
|
+
__export(notes_exports, {
|
|
6136
|
+
createNote: () => createNote,
|
|
6137
|
+
deleteNote: () => deleteNote,
|
|
6138
|
+
listNotes: () => listNotes,
|
|
6139
|
+
remindNote: () => remindNote,
|
|
6140
|
+
searchNotes: () => searchNotes,
|
|
6141
|
+
updateNote: () => updateNote
|
|
6142
|
+
});
|
|
6130
6143
|
async function createNote(arbi, body) {
|
|
6131
6144
|
return requireData(await arbi.fetch.POST("/v1/notes/", { body }), "Failed to create note");
|
|
6132
6145
|
}
|
|
6133
6146
|
async function listNotes(arbi, options) {
|
|
6134
6147
|
return requireData(
|
|
6135
6148
|
await arbi.fetch.GET("/v1/notes/list", {
|
|
6136
|
-
params: {
|
|
6149
|
+
params: {
|
|
6150
|
+
query: {
|
|
6151
|
+
pinned_only: options?.pinnedOnly ?? false,
|
|
6152
|
+
date_from: options?.from,
|
|
6153
|
+
date_to: options?.to,
|
|
6154
|
+
dated_only: options?.datedOnly
|
|
6155
|
+
}
|
|
6156
|
+
}
|
|
6137
6157
|
}),
|
|
6138
6158
|
"Failed to list notes"
|
|
6139
6159
|
);
|
|
@@ -6156,6 +6176,18 @@ async function deleteNote(arbi, memoryId) {
|
|
|
6156
6176
|
});
|
|
6157
6177
|
if (error) throw new Error("Failed to delete note");
|
|
6158
6178
|
}
|
|
6179
|
+
async function remindNote(arbi, noteId, options = {}) {
|
|
6180
|
+
return requireData(
|
|
6181
|
+
await arbi.fetch.POST("/v1/notes/{note_ext_id}/remind", {
|
|
6182
|
+
params: { path: { note_ext_id: noteId } },
|
|
6183
|
+
body: {
|
|
6184
|
+
remind_at: options.remindAt ?? null,
|
|
6185
|
+
lead_minutes: options.leadMinutes ?? null
|
|
6186
|
+
}
|
|
6187
|
+
}),
|
|
6188
|
+
"Failed to set reminder"
|
|
6189
|
+
);
|
|
6190
|
+
}
|
|
6159
6191
|
|
|
6160
6192
|
// src/arbi.ts
|
|
6161
6193
|
var Arbi = class {
|
|
@@ -6636,10 +6668,15 @@ var Arbi = class {
|
|
|
6636
6668
|
// ── Workspace notes ─────────────────────────────────────────────────
|
|
6637
6669
|
notes = {
|
|
6638
6670
|
create: (body) => createNote(this.requireClient(), body),
|
|
6671
|
+
/** Pass `from`/`to`/`datedOnly` for the timeline view — dated notes only,
|
|
6672
|
+
* ordered by when they happened. */
|
|
6639
6673
|
list: (options) => listNotes(this.requireClient(), options),
|
|
6640
6674
|
search: (body) => searchNotes(this.requireClient(), body),
|
|
6641
6675
|
update: (noteId, body) => updateNote(this.requireClient(), noteId, body),
|
|
6642
|
-
delete: (noteId) => deleteNote(this.requireClient(), noteId)
|
|
6676
|
+
delete: (noteId) => deleteNote(this.requireClient(), noteId),
|
|
6677
|
+
/** One-off reminder on a dated note: an explicit `remindAt`, or
|
|
6678
|
+
* `leadMinutes` before its date. */
|
|
6679
|
+
remind: (noteId, options = {}) => remindNote(this.requireClient(), noteId, options)
|
|
6643
6680
|
};
|
|
6644
6681
|
// ── Sessions ────────────────────────────────────────────────────────
|
|
6645
6682
|
sessions = {
|
|
@@ -7833,6 +7870,7 @@ exports.getErrorMessage = getErrorMessage;
|
|
|
7833
7870
|
exports.getRawWorkspaceKey = getRawWorkspaceKey;
|
|
7834
7871
|
exports.health = health_exports;
|
|
7835
7872
|
exports.listen = listen_exports;
|
|
7873
|
+
exports.notes = notes_exports;
|
|
7836
7874
|
exports.parseSSEEvents = parseSSEEvents;
|
|
7837
7875
|
exports.parseSlashCommand = parseSlashCommand;
|
|
7838
7876
|
exports.parseSlashTokenInProgress = parseSlashTokenInProgress;
|