@arbidocs/sdk 0.3.101 → 0.3.103

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
@@ -5293,6 +5293,26 @@ async function getFileContent(auth, fileId) {
5293
5293
  async function listAgents(arbi) {
5294
5294
  return requireData(await arbi.fetch.GET("/v1/agents"), "Failed to fetch agents");
5295
5295
  }
5296
+ async function createAgent(arbi, name) {
5297
+ const body = { name };
5298
+ return requireData(await arbi.fetch.POST("/v1/agents", { body }), "Failed to create agent");
5299
+ }
5300
+ async function getAgentConfig(arbi, agentExtId) {
5301
+ return requireData(
5302
+ await arbi.fetch.GET("/v1/agents/{agent_ext_id}/config", {
5303
+ params: { path: { agent_ext_id: agentExtId } }
5304
+ }),
5305
+ "Failed to fetch agent config"
5306
+ );
5307
+ }
5308
+ async function listAgentWorkspaces(arbi, agentExtId) {
5309
+ return requireData(
5310
+ await arbi.fetch.GET("/v1/agents/{agent_ext_id}/workspaces", {
5311
+ params: { path: { agent_ext_id: agentExtId } }
5312
+ }),
5313
+ "Failed to fetch agent workspaces"
5314
+ );
5315
+ }
5296
5316
  async function deleteAgents(arbi, agentExtIds) {
5297
5317
  return requireData(
5298
5318
  await arbi.fetch.DELETE("/v1/agents", {
@@ -5328,6 +5348,92 @@ async function refreshProject(arbi, projectExtId) {
5328
5348
  );
5329
5349
  }
5330
5350
 
5351
+ // src/operations/tasks.ts
5352
+ var tasks_exports = {};
5353
+ __export(tasks_exports, {
5354
+ createTask: () => createTask,
5355
+ deleteTask: () => deleteTask,
5356
+ getTask: () => getTask,
5357
+ listTasks: () => listTasks,
5358
+ runTask: () => runTask,
5359
+ updateTask: () => updateTask
5360
+ });
5361
+ async function listTasks(arbi) {
5362
+ return requireData(await arbi.fetch.GET("/v1/tasks"), "Failed to list tasks");
5363
+ }
5364
+ async function createTask(arbi, body) {
5365
+ return requireData(await arbi.fetch.POST("/v1/tasks", { body }), "Failed to create task");
5366
+ }
5367
+ async function getTask(arbi, taskId) {
5368
+ return requireData(
5369
+ await arbi.fetch.GET("/v1/tasks/{task_id}", { params: { path: { task_id: taskId } } }),
5370
+ "Failed to get task"
5371
+ );
5372
+ }
5373
+ async function updateTask(arbi, taskId, body) {
5374
+ return requireData(
5375
+ await arbi.fetch.PATCH("/v1/tasks/{task_id}", {
5376
+ params: { path: { task_id: taskId } },
5377
+ body
5378
+ }),
5379
+ "Failed to update task"
5380
+ );
5381
+ }
5382
+ async function deleteTask(arbi, taskId) {
5383
+ const { error } = await arbi.fetch.DELETE("/v1/tasks/{task_id}", {
5384
+ params: { path: { task_id: taskId } }
5385
+ });
5386
+ if (error) throw new Error("Failed to delete task");
5387
+ }
5388
+ async function runTask(arbi, taskId) {
5389
+ return requireData(
5390
+ await arbi.fetch.POST("/v1/tasks/{task_id}/run", { params: { path: { task_id: taskId } } }),
5391
+ "Failed to run task"
5392
+ );
5393
+ }
5394
+
5395
+ // src/operations/memory.ts
5396
+ var memory_exports = {};
5397
+ __export(memory_exports, {
5398
+ createMemory: () => createMemory,
5399
+ deleteMemory: () => deleteMemory,
5400
+ listMemories: () => listMemories,
5401
+ searchMemories: () => searchMemories,
5402
+ updateMemory: () => updateMemory
5403
+ });
5404
+ async function createMemory(arbi, body) {
5405
+ return requireData(await arbi.fetch.POST("/v1/memory/", { body }), "Failed to create memory");
5406
+ }
5407
+ async function listMemories(arbi, options) {
5408
+ return requireData(
5409
+ await arbi.fetch.GET("/v1/memory/list", {
5410
+ params: { query: { pinned_only: options?.pinnedOnly ?? false } }
5411
+ }),
5412
+ "Failed to list memories"
5413
+ );
5414
+ }
5415
+ async function searchMemories(arbi, body) {
5416
+ return requireData(
5417
+ await arbi.fetch.POST("/v1/memory/search", { body }),
5418
+ "Failed to search memories"
5419
+ );
5420
+ }
5421
+ async function updateMemory(arbi, memoryId, body) {
5422
+ return requireData(
5423
+ await arbi.fetch.PATCH("/v1/memory/{memory_ext_id}", {
5424
+ params: { path: { memory_ext_id: memoryId } },
5425
+ body
5426
+ }),
5427
+ "Failed to update memory"
5428
+ );
5429
+ }
5430
+ async function deleteMemory(arbi, memoryId) {
5431
+ const { error } = await arbi.fetch.DELETE("/v1/memory/{memory_ext_id}", {
5432
+ params: { path: { memory_ext_id: memoryId } }
5433
+ });
5434
+ if (error) throw new Error("Failed to delete memory");
5435
+ }
5436
+
5331
5437
  // src/arbi.ts
5332
5438
  var Arbi = class {
5333
5439
  client = null;
@@ -5664,8 +5770,28 @@ var Arbi = class {
5664
5770
  // ── Agents ──────────────────────────────────────────────────────────
5665
5771
  agents = {
5666
5772
  list: () => listAgents(this.requireClient()),
5773
+ create: (name) => createAgent(this.requireClient(), name),
5774
+ getConfig: (agentExtId) => getAgentConfig(this.requireClient(), agentExtId),
5775
+ listWorkspaces: (agentExtId) => listAgentWorkspaces(this.requireClient(), agentExtId),
5667
5776
  delete: (agentExtIds) => deleteAgents(this.requireClient(), agentExtIds)
5668
5777
  };
5778
+ // ── Scheduled tasks ───────────────────────────────────────────────────
5779
+ tasks = {
5780
+ list: () => listTasks(this.requireClient()),
5781
+ create: (body) => createTask(this.requireClient(), body),
5782
+ get: (taskId) => getTask(this.requireClient(), taskId),
5783
+ update: (taskId, body) => updateTask(this.requireClient(), taskId, body),
5784
+ delete: (taskId) => deleteTask(this.requireClient(), taskId),
5785
+ run: (taskId) => runTask(this.requireClient(), taskId)
5786
+ };
5787
+ // ── Workspace memory ──────────────────────────────────────────────────
5788
+ memory = {
5789
+ create: (body) => createMemory(this.requireClient(), body),
5790
+ list: (options) => listMemories(this.requireClient(), options),
5791
+ search: (body) => searchMemories(this.requireClient(), body),
5792
+ update: (memoryId, body) => updateMemory(this.requireClient(), memoryId, body),
5793
+ delete: (memoryId) => deleteMemory(this.requireClient(), memoryId)
5794
+ };
5669
5795
  // ── Sessions ────────────────────────────────────────────────────────
5670
5796
  sessions = {
5671
5797
  list: () => listSessions(this.requireClient())
@@ -5783,6 +5909,7 @@ exports.formatWorkspaceChoices = formatWorkspaceChoices;
5783
5909
  exports.getErrorMessage = getErrorMessage;
5784
5910
  exports.getRawWorkspaceKey = getRawWorkspaceKey;
5785
5911
  exports.health = health_exports;
5912
+ exports.memory = memory_exports;
5786
5913
  exports.parseSSEEvents = parseSSEEvents;
5787
5914
  exports.parseSlashCommand = parseSlashCommand;
5788
5915
  exports.parseSlashTokenInProgress = parseSlashTokenInProgress;
@@ -5800,6 +5927,7 @@ exports.streamSSE = streamSSE;
5800
5927
  exports.stripCitationMarkdown = stripCitationMarkdown;
5801
5928
  exports.summarizeCitations = summarizeCitations;
5802
5929
  exports.tags = tags_exports;
5930
+ exports.tasks = tasks_exports;
5803
5931
  exports.workspaces = workspaces_exports;
5804
5932
  //# sourceMappingURL=browser.cjs.map
5805
5933
  //# sourceMappingURL=browser.cjs.map