@arbidocs/sdk 0.3.138 → 0.3.140

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.cjs CHANGED
@@ -3953,6 +3953,7 @@ async function streamSSE(response, callbacks = {}) {
3953
3953
  }
3954
3954
  if (data.context) {
3955
3955
  context = data.context;
3956
+ callbacks.onContextUpdate?.(data.context);
3956
3957
  }
3957
3958
  if (data.t != null) callbacks.onElapsedTime?.(data.t);
3958
3959
  callbacks.onComplete?.();
@@ -5560,46 +5561,43 @@ async function runTask(arbi, taskId) {
5560
5561
  );
5561
5562
  }
5562
5563
 
5563
- // src/operations/memory.ts
5564
- var memory_exports = {};
5565
- __export(memory_exports, {
5566
- createMemory: () => createMemory,
5567
- deleteMemory: () => deleteMemory,
5568
- listMemories: () => listMemories,
5569
- searchMemories: () => searchMemories,
5570
- updateMemory: () => updateMemory
5564
+ // src/operations/notes.ts
5565
+ var notes_exports = {};
5566
+ __export(notes_exports, {
5567
+ createNote: () => createNote,
5568
+ deleteNote: () => deleteNote,
5569
+ listNotes: () => listNotes,
5570
+ searchNotes: () => searchNotes,
5571
+ updateNote: () => updateNote
5571
5572
  });
5572
- async function createMemory(arbi, body) {
5573
- return requireData(await arbi.fetch.POST("/v1/memory/", { body }), "Failed to create memory");
5573
+ async function createNote(arbi, body) {
5574
+ return requireData(await arbi.fetch.POST("/v1/notes/", { body }), "Failed to create note");
5574
5575
  }
5575
- async function listMemories(arbi, options) {
5576
+ async function listNotes(arbi, options) {
5576
5577
  return requireData(
5577
- await arbi.fetch.GET("/v1/memory/list", {
5578
+ await arbi.fetch.GET("/v1/notes/list", {
5578
5579
  params: { query: { pinned_only: options?.pinnedOnly ?? false } }
5579
5580
  }),
5580
- "Failed to list memories"
5581
+ "Failed to list notes"
5581
5582
  );
5582
5583
  }
5583
- async function searchMemories(arbi, body) {
5584
- return requireData(
5585
- await arbi.fetch.POST("/v1/memory/search", { body }),
5586
- "Failed to search memories"
5587
- );
5584
+ async function searchNotes(arbi, body) {
5585
+ return requireData(await arbi.fetch.POST("/v1/notes/search", { body }), "Failed to search notes");
5588
5586
  }
5589
- async function updateMemory(arbi, memoryId, body) {
5587
+ async function updateNote(arbi, memoryId, body) {
5590
5588
  return requireData(
5591
- await arbi.fetch.PATCH("/v1/memory/{memory_ext_id}", {
5592
- params: { path: { memory_ext_id: memoryId } },
5589
+ await arbi.fetch.PATCH("/v1/notes/{note_ext_id}", {
5590
+ params: { path: { note_ext_id: memoryId } },
5593
5591
  body
5594
5592
  }),
5595
- "Failed to update memory"
5593
+ "Failed to update note"
5596
5594
  );
5597
5595
  }
5598
- async function deleteMemory(arbi, memoryId) {
5599
- const { error } = await arbi.fetch.DELETE("/v1/memory/{memory_ext_id}", {
5600
- params: { path: { memory_ext_id: memoryId } }
5596
+ async function deleteNote(arbi, memoryId) {
5597
+ const { error } = await arbi.fetch.DELETE("/v1/notes/{note_ext_id}", {
5598
+ params: { path: { note_ext_id: memoryId } }
5601
5599
  });
5602
- if (error) throw new Error("Failed to delete memory");
5600
+ if (error) throw new Error("Failed to delete note");
5603
5601
  }
5604
5602
 
5605
5603
  // src/arbi.ts
@@ -6078,13 +6076,13 @@ var Arbi = class {
6078
6076
  delete: (taskId) => deleteTask(this.requireClient(), taskId),
6079
6077
  run: (taskId) => runTask(this.requireClient(), taskId)
6080
6078
  };
6081
- // ── Workspace memory ──────────────────────────────────────────────────
6082
- memory = {
6083
- create: (body) => createMemory(this.requireClient(), body),
6084
- list: (options) => listMemories(this.requireClient(), options),
6085
- search: (body) => searchMemories(this.requireClient(), body),
6086
- update: (memoryId, body) => updateMemory(this.requireClient(), memoryId, body),
6087
- delete: (memoryId) => deleteMemory(this.requireClient(), memoryId)
6079
+ // ── Workspace notes ─────────────────────────────────────────────────
6080
+ notes = {
6081
+ create: (body) => createNote(this.requireClient(), body),
6082
+ list: (options) => listNotes(this.requireClient(), options),
6083
+ search: (body) => searchNotes(this.requireClient(), body),
6084
+ update: (noteId, body) => updateNote(this.requireClient(), noteId, body),
6085
+ delete: (noteId) => deleteNote(this.requireClient(), noteId)
6088
6086
  };
6089
6087
  // ── Sessions ────────────────────────────────────────────────────────
6090
6088
  sessions = {
@@ -6204,7 +6202,7 @@ exports.formatWorkspaceChoices = formatWorkspaceChoices;
6204
6202
  exports.getErrorMessage = getErrorMessage;
6205
6203
  exports.getRawWorkspaceKey = getRawWorkspaceKey;
6206
6204
  exports.health = health_exports;
6207
- exports.memory = memory_exports;
6205
+ exports.notes = notes_exports;
6208
6206
  exports.parseSSEEvents = parseSSEEvents;
6209
6207
  exports.parseSlashCommand = parseSlashCommand;
6210
6208
  exports.parseSlashTokenInProgress = parseSlashTokenInProgress;