@lambdacurry/arbor 0.5.0 → 0.6.0

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 +33 -3
  2. package/package.json +1 -1
package/dist/arbor.js CHANGED
@@ -1446,8 +1446,16 @@ var initiatives = sqliteTable("initiatives", {
1446
1446
  ownerProfileId: text("owner_profile_id").notNull().references(() => profiles.id),
1447
1447
  priority: text("priority").$type().notNull().default("normal"),
1448
1448
  status: text("status").$type().notNull().default("active"),
1449
+ homeSpaceId: text("home_space_id").references(() => spaces.id),
1449
1450
  createdAt: ts("created_at").notNull()
1450
1451
  }, (t) => ({ orgIdx: index("initiatives_org_idx").on(t.orgId) }));
1452
+ var initiativeSpaces = sqliteTable("initiative_spaces", {
1453
+ initiativeId: text("initiative_id").notNull().references(() => initiatives.id),
1454
+ spaceId: text("space_id").notNull().references(() => spaces.id)
1455
+ }, (t) => ({
1456
+ pk: primaryKey({ columns: [t.initiativeId, t.spaceId] }),
1457
+ spaceIdx: index("initiative_spaces_space_idx").on(t.spaceId)
1458
+ }));
1451
1459
  var threads = sqliteTable("threads", {
1452
1460
  id: text("id").primaryKey(),
1453
1461
  topicId: text("topic_id").notNull().references(() => topics.id),
@@ -16455,9 +16463,9 @@ var ACTIONS = [
16455
16463
  {
16456
16464
  name: "create_goal",
16457
16465
  title: "Create a goal",
16458
- description: "Create an org-scoped GOAL (initiative) — the widest unit of work, the 'why' that threads serve toward. Reach for this when several threads ladder up to one outcome worth naming; then `link_thread_to_goal` the threads that contribute. Optionally seed it from a space's threads at creation. Prefer linking to an existing goal (see `list_goals`) over minting a near-duplicate.",
16466
+ description: "Create a GOAL (initiative) — the widest unit of work, the 'why' that threads serve toward. The space you create it from becomes its HOME (AD-180): the goal surfaces there immediately, and that space's threads can bind to it. To surface it in MORE spaces, `attach_goal_to_space`. Reach for this when several threads ladder up to one outcome worth naming; prefer linking to an existing goal (see `list_goals`) over minting a near-duplicate.",
16459
16467
  inputSchema: {
16460
- spaceId: exports_external.string().describe("the space you're creating it from, spc_… (gates access)"),
16468
+ spaceId: exports_external.string().describe("the space it's created in — becomes its HOME space, spc_…"),
16461
16469
  title: exports_external.string().min(1).describe("the goal's name — an outcome, not a task"),
16462
16470
  purpose: exports_external.string().optional().describe("one or two lines on what reaching it means"),
16463
16471
  threadIds: exports_external.array(exports_external.string()).optional().describe("optional threads IN THIS SPACE to link at creation (others are ignored)")
@@ -16465,6 +16473,28 @@ var ACTIONS = [
16465
16473
  surfaces: ["mcp", "cli"],
16466
16474
  run: forward("initiative.create")
16467
16475
  },
16476
+ {
16477
+ name: "attach_goal_to_space",
16478
+ title: "Attach a goal to a space",
16479
+ description: "Surface a goal in an ADDITIONAL space (AD-180) — visibility, not custody: it appears on that space's goal strip and its threads can then `link_thread_to_goal` to it. You must be a member of the target space. Use for a genuinely cross-space goal (a launch spanning product + marketing); a goal already surfaces in its home space without this. Idempotent.",
16480
+ inputSchema: {
16481
+ initiativeId: exports_external.string().describe("the goal to attach, ini_…"),
16482
+ spaceId: exports_external.string().describe("the space to surface it in, spc_… (you must be a member)")
16483
+ },
16484
+ surfaces: ["mcp", "cli"],
16485
+ run: forward("initiative.attachSpace")
16486
+ },
16487
+ {
16488
+ name: "detach_goal_from_space",
16489
+ title: "Detach a goal from a space",
16490
+ description: "Stop surfacing a goal in a space (the deliberate inverse of `attach_goal_to_space`). A goal can NOT be detached from its HOME space — archive it instead. Existing thread links are untouched; only where the goal surfaces changes.",
16491
+ inputSchema: {
16492
+ initiativeId: exports_external.string().describe("the goal to detach, ini_…"),
16493
+ spaceId: exports_external.string().describe("the space to stop surfacing it in, spc_…")
16494
+ },
16495
+ surfaces: ["mcp", "cli"],
16496
+ run: forward("initiative.detachSpace")
16497
+ },
16468
16498
  {
16469
16499
  name: "link_thread_to_goal",
16470
16500
  title: "Link a thread to a goal",
@@ -16490,7 +16520,7 @@ var ACTIONS = [
16490
16520
  {
16491
16521
  name: "list_goals",
16492
16522
  title: "List a thread's goals",
16493
- description: "For a thread, list the goals it already contributes to PLUS the org's goals you could link it to (the pick list). Reach for this before `link_thread_to_goal` to find the right goal id and avoid creating a duplicate; archived goals are omitted.",
16523
+ 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.",
16494
16524
  inputSchema: {
16495
16525
  threadId: exports_external.string().describe("the thread to read goals for, thr_…")
16496
16526
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lambdacurry/arbor",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
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",