@lambdacurry/arbor 0.21.17 → 0.21.19

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.
Files changed (2) hide show
  1. package/dist/arbor.js +62 -30
  2. package/package.json +1 -1
package/dist/arbor.js CHANGED
@@ -17744,10 +17744,21 @@ var artifact4 = exports_external.looseObject({
17744
17744
  version: exports_external.number().optional(),
17745
17745
  url: exports_external.string().optional()
17746
17746
  });
17747
+ var initiativeThreadRef = exports_external.looseObject({
17748
+ id,
17749
+ title: exports_external.string(),
17750
+ spaceId: id
17751
+ });
17747
17752
  var initiative3 = exports_external.looseObject({
17748
17753
  id,
17749
17754
  title: exports_external.string(),
17750
17755
  status: exports_external.string(),
17756
+ purpose: exports_external.string().optional(),
17757
+ priority: exports_external.string().optional(),
17758
+ ownerProfileId: id.optional(),
17759
+ threadCount: exports_external.number().int().min(0).optional(),
17760
+ relatedThreads: exports_external.array(initiativeThreadRef).optional(),
17761
+ createdAt: timestamp.optional(),
17751
17762
  spaceId: id.optional()
17752
17763
  });
17753
17764
  var app2 = exports_external.looseObject({
@@ -18060,11 +18071,13 @@ var MCP_OUTPUT_SCHEMAS = {
18060
18071
  all: exports_external.array(initiative3).optional(),
18061
18072
  ok: exports_external.boolean().optional()
18062
18073
  }),
18063
- goal_get: exports_external.looseObject({ initiative: initiative3 }),
18074
+ goal_get: exports_external.looseObject({ initiative: initiative3, nextCursor: exports_external.string().optional() }),
18064
18075
  goal_list: exports_external.looseObject({
18065
18076
  initiatives: exports_external.array(initiative3).optional(),
18066
18077
  linked: exports_external.array(initiative3).optional(),
18067
- all: exports_external.array(initiative3).optional()
18078
+ all: exports_external.array(initiative3).optional(),
18079
+ total: exports_external.number().int().min(0),
18080
+ nextCursor: exports_external.string().optional()
18068
18081
  }),
18069
18082
  goal_delete: exports_external.looseObject({ ok: exports_external.boolean() }),
18070
18083
  membership: exports_external.looseObject({
@@ -18404,6 +18417,7 @@ var MCP_OUTPUT_SCHEMAS = {
18404
18417
  nextAction: exports_external.literal("computer_process_read").optional()
18405
18418
  }),
18406
18419
  computer_process_read: exports_external.looseObject({
18420
+ processId: exports_external.string(),
18407
18421
  status: exports_external.string(),
18408
18422
  endedAt: timestamp.nullable().optional(),
18409
18423
  durationMs: exports_external.number().int().min(0).nullable().optional(),
@@ -18421,10 +18435,10 @@ var MCP_OUTPUT_SCHEMAS = {
18421
18435
  reasonCode: exports_external.string()
18422
18436
  }).optional(),
18423
18437
  recovery: exports_external.looseObject({
18424
- state: exports_external.enum(["provider-timeout", "provider-lost", "unknown"]),
18438
+ state: exports_external.enum(["not-routed", "provider-timeout", "provider-lost", "unknown"]),
18425
18439
  reasonCode: exports_external.string(),
18426
- mutationRetrySafety: exports_external.enum(["unsafe", "unknown"]),
18427
- nextAction: exports_external.enum(["computer_process_read", "computer_run_receipt"])
18440
+ mutationRetrySafety: exports_external.enum(["safe", "unsafe", "unknown"]),
18441
+ nextAction: exports_external.enum(["computer_exec", "computer_process_read", "computer_run_receipt"])
18428
18442
  }).optional()
18429
18443
  }),
18430
18444
  computer_process_terminate: exports_external.looseObject({
@@ -18722,6 +18736,7 @@ var OUTPUT_SHAPERS = {
18722
18736
  ["cwd", input.cwd === undefined ? result.cwd : undefined]
18723
18737
  ]),
18724
18738
  computer_process_read: (result) => defined([
18739
+ ["processId", result.processId],
18725
18740
  ["status", result.status],
18726
18741
  ["stdout", result.stdout],
18727
18742
  ["stderr", result.stderr],
@@ -18973,11 +18988,28 @@ function forward(operation) {
18973
18988
  run.operation = operation;
18974
18989
  return run;
18975
18990
  }
18976
- function forwardedOperation(run) {
18977
- if (!("operation" in run))
18978
- return;
18979
- const value = run.operation;
18980
- return typeof value === "string" ? value : undefined;
18991
+ function forwardedOperations(run) {
18992
+ const tagged = run;
18993
+ if (typeof tagged.operation === "string")
18994
+ return [tagged.operation];
18995
+ if (Array.isArray(tagged.operations)) {
18996
+ return tagged.operations.filter((value) => typeof value === "string");
18997
+ }
18998
+ return [];
18999
+ }
19000
+ function forwardByFirstPresent(routes, missingMessage) {
19001
+ const selectorFields = new Set(Object.keys(routes));
19002
+ const run = (ex, input) => {
19003
+ for (const [field, operation] of Object.entries(routes)) {
19004
+ if (typeof input[field] !== "string")
19005
+ continue;
19006
+ const rest = Object.fromEntries(Object.entries(input).filter(([key]) => !selectorFields.has(key)));
19007
+ return ex.call(operation, { [field]: input[field], ...rest });
19008
+ }
19009
+ return Promise.reject(new Error(missingMessage));
19010
+ };
19011
+ run.operations = Object.values(routes);
19012
+ return run;
18981
19013
  }
18982
19014
  function dispatch(map2, reshape) {
18983
19015
  return (ex, input) => {
@@ -19700,7 +19732,7 @@ var ACTION_DEFINITIONS = [
19700
19732
  {
19701
19733
  name: "computer_process_read",
19702
19734
  title: "Read a background process",
19703
- description: "Read a provider-owned process from computer_exec, including a foreground operation recovered from a Run receipt, and use nextCursor for incremental output. Returns compact activity or recovery state plus the final exit result when observable.",
19735
+ description: "Read one exact provider-owned process from computer_exec, including a foreground operation recovered from a Run receipt, and use nextCursor for incremental output. Returns the same processId plus compact activity, terminal result, or durable not-routed proof; only that proof makes a fresh computer_exec safe.",
19704
19736
  inputSchema: {
19705
19737
  computerSessionId: exports_external.string().optional().describe("the computerSessionId returned by computer_open, cms_…; required unless runId is supplied"),
19706
19738
  runId: exports_external.string().optional().describe("the Run that owns this process, if it was started inside a Run"),
@@ -20455,10 +20487,11 @@ var ACTION_DEFINITIONS = [
20455
20487
  },
20456
20488
  {
20457
20489
  name: "get_goal",
20458
- title: "Read one goal fully",
20459
- description: "Read ONE goal (initiative) fully — purpose, lifecycle status, and the related threads you can see. Works for ANY status including archived (retired goals stay inspectable); use `list_goals` for a thread's pick list instead.",
20490
+ title: "Read one goal",
20491
+ description: "Read ONE goal (initiative) — purpose, lifecycle status, and the related threads you can see, including archived goals. Related Threads are paged with threadCount as the visible total; use --limit/--cursor or --all.",
20460
20492
  inputSchema: {
20461
- id: exports_external.string().describe("the goal, ini_…")
20493
+ id: exports_external.string().describe("the goal, ini_…"),
20494
+ ...PAGINATION_INPUT
20462
20495
  },
20463
20496
  surfaces: ["cli"],
20464
20497
  toolset: "goals",
@@ -20466,14 +20499,16 @@ var ACTION_DEFINITIONS = [
20466
20499
  },
20467
20500
  {
20468
20501
  name: "list_goals",
20469
- title: "List a thread's goals",
20470
- description: "For a thread, list the goals it already contributes to PLUS the pick list of goals attached to ITS space (AD-180 — a thread binds only to goals that surface where it lives; `attach_goal_to_space` widens a goal's reach). Reach for this before `link_thread_to_goal` to find the right goal id and avoid creating a duplicate; archived goals are omitted.",
20502
+ title: "List goals",
20503
+ description: "List compact goals attached to one Space, or a Thread's linked goals plus its available pick list. Space lists are compact cards; Thread lists page only the available `all` list and keep `linked` complete. Archived goals are omitted.",
20471
20504
  inputSchema: {
20472
- threadId: exports_external.string().describe("the thread to read goals for, thr_…")
20505
+ spaceId: exports_external.string().optional().describe("a Space whose attached goals to list, spc_…"),
20506
+ threadId: exports_external.string().optional().describe("a Thread whose linked and available goals to list, thr_…"),
20507
+ ...PAGINATION_INPUT
20473
20508
  },
20474
20509
  surfaces: ["cli"],
20475
20510
  toolset: "goals",
20476
- run: forward("initiative.forThread")
20511
+ run: forwardByFirstPresent({ spaceId: "initiative.listForSpace", threadId: "initiative.forThread" }, "list_goals requires a spaceId (a Space's goals) or a threadId (a Thread's goals)")
20477
20512
  },
20478
20513
  {
20479
20514
  name: "update_goal",
@@ -20655,8 +20690,8 @@ var ACTION_DEFINITIONS = [
20655
20690
  {
20656
20691
  name: "goal_get",
20657
20692
  title: "Read one goal",
20658
- description: "Read one goal fully, including its purpose, lifecycle, attached Spaces, and related Threads visible to you. It cannot create, update, link, archive, or delete a goal.",
20659
- inputSchema: { id: exports_external.string().describe("the goal, ini_…") },
20693
+ description: "Read one goal, including its purpose, lifecycle, attached Spaces, and related Threads visible to you; it cannot mutate the goal. Related Threads are paged: threadCount is the visible total, nextCursor continues the page, and all=true returns every visible related Thread.",
20694
+ inputSchema: { id: exports_external.string().describe("the goal, ini_…"), ...PAGINATION_INPUT },
20660
20695
  surfaces: ["mcp"],
20661
20696
  toolset: "goals",
20662
20697
  run: forward("initiative.get")
@@ -20664,20 +20699,15 @@ var ACTION_DEFINITIONS = [
20664
20699
  {
20665
20700
  name: "goal_list",
20666
20701
  title: "List goals",
20667
- description: "List the goals attached to one Space, or the linked and available goals for one Thread. It cannot create, update, link, archive, or delete a goal.",
20702
+ description: "List compact goals attached to one Space, or the linked and available goals for one Thread. Space pages omit relatedThreads; Thread pages keep linked complete and page only the available `all` list; it cannot mutate a goal.",
20668
20703
  inputSchema: {
20669
20704
  spaceId: exports_external.string().optional().describe("a Space whose attached goals to list, spc_…"),
20670
- threadId: exports_external.string().optional().describe("a Thread whose linked and available goals to list, thr_…")
20705
+ threadId: exports_external.string().optional().describe("a Thread whose linked and available goals to list, thr_…"),
20706
+ ...PAGINATION_INPUT
20671
20707
  },
20672
20708
  surfaces: ["mcp"],
20673
20709
  toolset: "goals",
20674
- run: (ex, input) => {
20675
- if (typeof input.spaceId === "string")
20676
- return ex.call("initiative.listForSpace", { spaceId: input.spaceId });
20677
- if (typeof input.threadId === "string")
20678
- return ex.call("initiative.forThread", { threadId: input.threadId });
20679
- return Promise.reject(new Error("goal_list requires a spaceId (a Space's goals) or a threadId (a Thread's goals)"));
20680
- }
20710
+ run: forwardByFirstPresent({ spaceId: "initiative.listForSpace", threadId: "initiative.forThread" }, "goal_list requires a spaceId (a Space's goals) or a threadId (a Thread's goals)")
20681
20711
  },
20682
20712
  {
20683
20713
  name: "goal",
@@ -21402,7 +21432,9 @@ var ACTIONS = ACTION_DEFINITIONS.map((action) => {
21402
21432
  throw new Error(`${action.name}: requiresCapability is an MCP catalog gate`);
21403
21433
  }
21404
21434
  const externalReadDefaults = action.inputSchema.limit === PAGINATION_INPUT.limit ? { ...action.externalReadDefaults, limit: EXTERNAL_DEFAULT_PAGE_SIZE } : action.externalReadDefaults;
21405
- recordExternalReadDefaults(forwardedOperation(action.run), externalReadDefaults);
21435
+ for (const operation of forwardedOperations(action.run)) {
21436
+ recordExternalReadDefaults(operation, externalReadDefaults);
21437
+ }
21406
21438
  if (!action.surfaces.some((surface) => surface === "mcp" || surface === "computer-mcp")) {
21407
21439
  return externalReadDefaults ? { ...action, externalReadDefaults } : action;
21408
21440
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lambdacurry/arbor",
3
- "version": "0.21.17",
3
+ "version": "0.21.19",
4
4
  "description": "The Arbor CLI — a shared workspace for people and agents. The human + headless-agent write path over Arbor's guarded operation surface.",
5
5
  "keywords": [
6
6
  "agents",