@lambdacurry/arbor 0.21.18 → 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 +56 -26
  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({
@@ -18975,11 +18988,28 @@ function forward(operation) {
18975
18988
  run.operation = operation;
18976
18989
  return run;
18977
18990
  }
18978
- function forwardedOperation(run) {
18979
- if (!("operation" in run))
18980
- return;
18981
- const value = run.operation;
18982
- 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;
18983
19013
  }
18984
19014
  function dispatch(map2, reshape) {
18985
19015
  return (ex, input) => {
@@ -20457,10 +20487,11 @@ var ACTION_DEFINITIONS = [
20457
20487
  },
20458
20488
  {
20459
20489
  name: "get_goal",
20460
- title: "Read one goal fully",
20461
- 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.",
20462
20492
  inputSchema: {
20463
- id: exports_external.string().describe("the goal, ini_…")
20493
+ id: exports_external.string().describe("the goal, ini_…"),
20494
+ ...PAGINATION_INPUT
20464
20495
  },
20465
20496
  surfaces: ["cli"],
20466
20497
  toolset: "goals",
@@ -20468,14 +20499,16 @@ var ACTION_DEFINITIONS = [
20468
20499
  },
20469
20500
  {
20470
20501
  name: "list_goals",
20471
- title: "List a thread's goals",
20472
- 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.",
20473
20504
  inputSchema: {
20474
- 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
20475
20508
  },
20476
20509
  surfaces: ["cli"],
20477
20510
  toolset: "goals",
20478
- 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)")
20479
20512
  },
20480
20513
  {
20481
20514
  name: "update_goal",
@@ -20657,8 +20690,8 @@ var ACTION_DEFINITIONS = [
20657
20690
  {
20658
20691
  name: "goal_get",
20659
20692
  title: "Read one goal",
20660
- 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.",
20661
- 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 },
20662
20695
  surfaces: ["mcp"],
20663
20696
  toolset: "goals",
20664
20697
  run: forward("initiative.get")
@@ -20666,20 +20699,15 @@ var ACTION_DEFINITIONS = [
20666
20699
  {
20667
20700
  name: "goal_list",
20668
20701
  title: "List goals",
20669
- 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.",
20670
20703
  inputSchema: {
20671
20704
  spaceId: exports_external.string().optional().describe("a Space whose attached goals to list, spc_…"),
20672
- 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
20673
20707
  },
20674
20708
  surfaces: ["mcp"],
20675
20709
  toolset: "goals",
20676
- run: (ex, input) => {
20677
- if (typeof input.spaceId === "string")
20678
- return ex.call("initiative.listForSpace", { spaceId: input.spaceId });
20679
- if (typeof input.threadId === "string")
20680
- return ex.call("initiative.forThread", { threadId: input.threadId });
20681
- return Promise.reject(new Error("goal_list requires a spaceId (a Space's goals) or a threadId (a Thread's goals)"));
20682
- }
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)")
20683
20711
  },
20684
20712
  {
20685
20713
  name: "goal",
@@ -21404,7 +21432,9 @@ var ACTIONS = ACTION_DEFINITIONS.map((action) => {
21404
21432
  throw new Error(`${action.name}: requiresCapability is an MCP catalog gate`);
21405
21433
  }
21406
21434
  const externalReadDefaults = action.inputSchema.limit === PAGINATION_INPUT.limit ? { ...action.externalReadDefaults, limit: EXTERNAL_DEFAULT_PAGE_SIZE } : action.externalReadDefaults;
21407
- recordExternalReadDefaults(forwardedOperation(action.run), externalReadDefaults);
21435
+ for (const operation of forwardedOperations(action.run)) {
21436
+ recordExternalReadDefaults(operation, externalReadDefaults);
21437
+ }
21408
21438
  if (!action.surfaces.some((surface) => surface === "mcp" || surface === "computer-mcp")) {
21409
21439
  return externalReadDefaults ? { ...action, externalReadDefaults } : action;
21410
21440
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lambdacurry/arbor",
3
- "version": "0.21.18",
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",