@lambdacurry/arbor 0.13.4 → 0.13.6

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 +576 -163
  2. package/package.json +1 -1
package/dist/arbor.js CHANGED
@@ -16475,6 +16475,21 @@ var computerConfigLayer = exports_external.looseObject({
16475
16475
  version: exports_external.number(),
16476
16476
  updatedAt: timestamp
16477
16477
  });
16478
+ var resolvedComputerConfig = exports_external.looseObject({
16479
+ scope: exports_external.string(),
16480
+ scopeId: id,
16481
+ override: jsonObject.nullable(),
16482
+ effective: exports_external.looseObject({
16483
+ provider: exports_external.string(),
16484
+ backend: exports_external.enum(["worker-shell", "container"]),
16485
+ containerProfile: nullableString,
16486
+ setupScript: nullableString,
16487
+ repositories: exports_external.array(exports_external.string()),
16488
+ configKey: exports_external.string(),
16489
+ layers: exports_external.array(jsonObject)
16490
+ }),
16491
+ topicBase: jsonObject.nullable()
16492
+ });
16478
16493
  var snapshot = exports_external.looseObject({
16479
16494
  id,
16480
16495
  ownerScope: exports_external.enum(["topic-base", "thread-checkpoint"]),
@@ -16508,6 +16523,17 @@ var profile2 = exports_external.looseObject({
16508
16523
  capabilities: exports_external.array(exports_external.string()).optional(),
16509
16524
  notificationPrefs: jsonObject.optional()
16510
16525
  });
16526
+ var profileMutation = exports_external.looseObject({
16527
+ id,
16528
+ kind: exports_external.string().optional(),
16529
+ displayName: exports_external.string().optional(),
16530
+ orgId: id.optional(),
16531
+ orgRole: exports_external.string().optional(),
16532
+ color: nullableString.optional(),
16533
+ emoji: nullableString.optional(),
16534
+ description: nullableString.optional(),
16535
+ capabilities: exports_external.array(exports_external.string()).optional()
16536
+ });
16511
16537
  var member = exports_external.looseObject({
16512
16538
  id: id.optional(),
16513
16539
  profileId: id.optional(),
@@ -16516,11 +16542,21 @@ var member = exports_external.looseObject({
16516
16542
  kind: exports_external.string(),
16517
16543
  role: exports_external.string()
16518
16544
  });
16545
+ var orgMember = exports_external.looseObject({
16546
+ id,
16547
+ displayName: exports_external.string(),
16548
+ kind: exports_external.string(),
16549
+ orgRole: exports_external.string(),
16550
+ emoji: nullableString,
16551
+ color: nullableString,
16552
+ description: nullableString,
16553
+ capabilities: exports_external.array(exports_external.string())
16554
+ });
16519
16555
  var thread3 = exports_external.looseObject({
16520
16556
  id,
16521
16557
  title: exports_external.string(),
16522
16558
  objective: exports_external.string(),
16523
- status: exports_external.string(),
16559
+ status: exports_external.string().optional(),
16524
16560
  url: exports_external.string().optional()
16525
16561
  });
16526
16562
  var topic2 = exports_external.looseObject({
@@ -16537,20 +16573,72 @@ var space3 = exports_external.looseObject({
16537
16573
  stage: exports_external.string().optional(),
16538
16574
  url: exports_external.string().optional()
16539
16575
  });
16540
- var contribution2 = exports_external.looseObject({
16576
+ var threadAuthor = exports_external.looseObject({
16577
+ id,
16578
+ kind: exports_external.string(),
16579
+ displayName: exports_external.string(),
16580
+ color: nullableString,
16581
+ emoji: nullableString
16582
+ });
16583
+ var threadContribution = exports_external.looseObject({
16541
16584
  id,
16542
- threadId: id,
16585
+ computerSessionId: nullableString,
16586
+ source: exports_external.looseObject({ kind: exports_external.string(), name: exports_external.string() }).nullable(),
16543
16587
  type: exports_external.string(),
16544
16588
  body: exports_external.string(),
16589
+ summary: nullableString,
16590
+ aboutType: exports_external.enum(["contribution", "artifact"]).nullable(),
16591
+ aboutId: nullableString,
16592
+ confidence: exports_external.number().nullable(),
16545
16593
  createdAt: timestamp,
16546
- url: exports_external.string().optional()
16594
+ editedAt: nullableString,
16595
+ standout: exports_external.boolean(),
16596
+ deleted: exports_external.boolean(),
16597
+ deletedAt: nullableString,
16598
+ author: threadAuthor.nullable(),
16599
+ stamps: exports_external.array(jsonObject),
16600
+ mentions: exports_external.array(jsonObject),
16601
+ links: exports_external.array(jsonObject),
16602
+ backlinks: exports_external.array(jsonObject),
16603
+ respondsTo: jsonObject.nullable(),
16604
+ attachments: exports_external.array(jsonObject),
16605
+ reactions: exports_external.array(reactionCount),
16606
+ url: exports_external.string()
16547
16607
  });
16548
- var request2 = exports_external.looseObject({
16608
+ var compactThreadContribution = exports_external.looseObject({
16549
16609
  id,
16550
- threadId: id,
16551
- status: exports_external.string(),
16552
- kind: exports_external.string().optional(),
16553
- prompt: exports_external.string().optional()
16610
+ url: exports_external.string(),
16611
+ type: exports_external.string(),
16612
+ text: exports_external.string(),
16613
+ author: threadAuthor.nullable(),
16614
+ createdAt: timestamp,
16615
+ editedAt: nullableString,
16616
+ standout: exports_external.boolean(),
16617
+ stamps: exports_external.array(jsonObject)
16618
+ });
16619
+ var threadOpenRequest = exports_external.looseObject({
16620
+ id,
16621
+ kind: exports_external.string(),
16622
+ requestedAction: nullableString,
16623
+ aboutContributionId: nullableString,
16624
+ requestedBy: threadAuthor.nullable(),
16625
+ createdAt: timestamp,
16626
+ audience: exports_external.string(),
16627
+ targets: exports_external.array(threadAuthor),
16628
+ cardinality: exports_external.string(),
16629
+ respondWith: exports_external.string()
16630
+ });
16631
+ var threadScheduledRequest = exports_external.looseObject({
16632
+ id,
16633
+ kind: exports_external.string(),
16634
+ requestedAction: nullableString,
16635
+ aboutContributionId: nullableString,
16636
+ requestedBy: threadAuthor.nullable(),
16637
+ createdAt: timestamp,
16638
+ opensAt: timestamp,
16639
+ expiresAt: nullableString,
16640
+ audience: exports_external.string(),
16641
+ targets: exports_external.array(threadAuthor)
16554
16642
  });
16555
16643
  var artifact4 = exports_external.looseObject({
16556
16644
  id,
@@ -16691,7 +16779,7 @@ var MCP_OUTPUT_SCHEMAS = {
16691
16779
  requestStatus: exports_external.string(),
16692
16780
  contributionId: id
16693
16781
  }),
16694
- cancel_request: exports_external.looseObject({ requestId: id, status: exports_external.string(), withdrawn: exports_external.boolean() }),
16782
+ cancel_request: exports_external.looseObject({ requestId: id, status: exports_external.string(), withdrawn: exports_external.number() }),
16695
16783
  inbox: paged("items", jsonObject),
16696
16784
  dismiss: exports_external.looseObject({ inboxItemId: id, status: exports_external.literal("dismissed") }),
16697
16785
  whoami: exports_external.looseObject({
@@ -16701,23 +16789,28 @@ var MCP_OUTPUT_SCHEMAS = {
16701
16789
  spaceCharters: exports_external.array(jsonObject).optional(),
16702
16790
  completeness: jsonObject.optional()
16703
16791
  }),
16704
- introduce: profile2,
16792
+ introduce: profileMutation,
16705
16793
  thread_get: exports_external.looseObject({
16794
+ threadId: id.optional(),
16706
16795
  thread: thread3.optional(),
16707
16796
  topic: topic2.optional(),
16708
16797
  space: space3.optional(),
16709
- contributions: exports_external.array(contribution2).optional(),
16710
- recentContributions: exports_external.array(contribution2).optional(),
16798
+ contributions: exports_external.array(threadContribution).optional(),
16799
+ recentContributions: exports_external.array(compactThreadContribution).optional(),
16800
+ contributionPage: exports_external.looseObject({ total: exports_external.number(), nextCursor: nullableString }).optional(),
16711
16801
  contributionCount: exports_external.number().optional(),
16712
- openRequests: exports_external.array(request2).optional(),
16713
- scheduledRequests: exports_external.array(request2).optional(),
16802
+ openRequests: exports_external.array(threadOpenRequest).optional(),
16803
+ scheduledRequests: exports_external.array(threadScheduledRequest).optional(),
16804
+ participants: exports_external.array(threadAuthor).optional(),
16714
16805
  artifacts: exports_external.array(artifact4).optional(),
16715
16806
  initiatives: exports_external.array(initiative3).optional(),
16807
+ distillate: exports_external.array(jsonObject).optional(),
16808
+ watching: exports_external.boolean().optional(),
16716
16809
  cursor: exports_external.string().optional(),
16717
16810
  unchanged: exports_external.boolean().optional()
16718
16811
  }),
16719
16812
  tree: exports_external.looseObject({ spaces: exports_external.array(treeSpace) }),
16720
- members: exports_external.looseObject({ members: exports_external.array(member), total: exports_external.number().optional() }),
16813
+ members: exports_external.looseObject({ members: exports_external.array(orgMember), total: exports_external.number().optional() }),
16721
16814
  space_create: space3,
16722
16815
  space_update: exports_external.looseObject({
16723
16816
  id,
@@ -16730,14 +16823,14 @@ var MCP_OUTPUT_SCHEMAS = {
16730
16823
  space: space3,
16731
16824
  topics: exports_external.array(topic2).optional(),
16732
16825
  members: exports_external.array(member).optional(),
16733
- computerConfig: computerConfig.nullable().optional()
16826
+ computerConfig: resolvedComputerConfig.nullable().optional()
16734
16827
  }),
16735
16828
  topic_get: exports_external.looseObject({
16736
16829
  topic: topic2,
16737
16830
  space: space3,
16738
16831
  threads: exports_external.array(thread3).optional(),
16739
16832
  promotedArtifacts: exports_external.array(artifact4).optional(),
16740
- computerConfig: computerConfig.nullable().optional()
16833
+ computerConfig: resolvedComputerConfig.nullable().optional()
16741
16834
  }),
16742
16835
  goal: exports_external.looseObject({
16743
16836
  id: id.optional(),
@@ -16751,6 +16844,13 @@ var MCP_OUTPUT_SCHEMAS = {
16751
16844
  all: exports_external.array(initiative3).optional(),
16752
16845
  ok: exports_external.boolean().optional()
16753
16846
  }),
16847
+ goal_get: exports_external.looseObject({ initiative: initiative3 }),
16848
+ goal_list: exports_external.looseObject({
16849
+ initiatives: exports_external.array(initiative3).optional(),
16850
+ linked: exports_external.array(initiative3).optional(),
16851
+ all: exports_external.array(initiative3).optional()
16852
+ }),
16853
+ goal_delete: exports_external.looseObject({ ok: exports_external.boolean() }),
16754
16854
  membership: exports_external.looseObject({
16755
16855
  spaceId: id.optional(),
16756
16856
  profileId: id.optional(),
@@ -16766,20 +16866,32 @@ var MCP_OUTPUT_SCHEMAS = {
16766
16866
  nextCursor: exports_external.string().optional(),
16767
16867
  ok: exports_external.boolean().optional()
16768
16868
  }),
16769
- notification: exports_external.looseObject({
16869
+ space_leave: exports_external.looseObject({ spaceId: id, left: exports_external.boolean() }),
16870
+ space_list_open: paged("spaces", space3),
16871
+ space_invitation_list: paged("invitations", jsonObject),
16872
+ notification_list: exports_external.looseObject({
16770
16873
  items: exports_external.array(jsonObject).optional(),
16771
16874
  total: exports_external.number().optional(),
16772
16875
  unseenCount: exports_external.number().optional(),
16773
16876
  lastSeenAt: timestamp.nullable().optional(),
16774
- notificationId: id.optional(),
16775
- read: exports_external.boolean().optional(),
16776
- markedCount: exports_external.number().optional(),
16777
16877
  nextCursor: exports_external.string().optional()
16778
16878
  }),
16879
+ notification_read: exports_external.looseObject({
16880
+ notificationId: id.optional(),
16881
+ read: exports_external.boolean().optional()
16882
+ }),
16883
+ notification_read_all: exports_external.looseObject({
16884
+ markedCount: exports_external.number().optional()
16885
+ }),
16779
16886
  watch: exports_external.looseObject({
16780
16887
  targetType: exports_external.string().optional(),
16781
16888
  targetId: id.optional(),
16782
- watching: exports_external.boolean().optional(),
16889
+ watching: exports_external.boolean().optional()
16890
+ }),
16891
+ watch_get: exports_external.looseObject({
16892
+ watching: exports_external.boolean()
16893
+ }),
16894
+ watch_list: exports_external.looseObject({
16783
16895
  watches: exports_external.array(jsonObject).optional()
16784
16896
  }),
16785
16897
  curation: exports_external.looseObject({
@@ -16807,23 +16919,59 @@ var MCP_OUTPUT_SCHEMAS = {
16807
16919
  versions: exports_external.array(jsonObject).optional(),
16808
16920
  appBundles: exports_external.array(jsonObject).optional()
16809
16921
  }),
16810
- apps: exports_external.looseObject({
16811
- result: exports_external.array(app2).optional(),
16812
- spaceId: id.optional(),
16813
- title: exports_external.string().optional(),
16814
- slug: exports_external.string().optional(),
16815
- access: exports_external.string().optional(),
16816
- stateMode: exports_external.string().optional(),
16817
- app: app2.optional(),
16818
- deployment: deployment.optional(),
16819
- deployments: exports_external.array(jsonObject).optional(),
16820
- bundle: jsonObject.optional(),
16821
- reset: jsonObject.optional(),
16822
- activated: exports_external.boolean().optional(),
16922
+ artifact_get: exports_external.looseObject({
16923
+ id,
16924
+ title: exports_external.string(),
16925
+ kind: exports_external.string(),
16926
+ status: exports_external.string(),
16927
+ content: jsonObject,
16928
+ version: exports_external.number().optional(),
16929
+ versions: exports_external.array(jsonObject).optional(),
16930
+ appBundles: exports_external.array(jsonObject),
16931
+ watching: exports_external.boolean(),
16932
+ url: exports_external.string()
16933
+ }),
16934
+ artifact_transition: exports_external.looseObject({
16935
+ artifactId: id,
16936
+ status: exports_external.string(),
16937
+ retrievalTier: exports_external.string()
16938
+ }),
16939
+ artifact_delete: exports_external.looseObject({
16940
+ artifactId: id,
16941
+ status: exports_external.literal("deleted"),
16942
+ retrievalTier: exports_external.string()
16943
+ }),
16944
+ app_list: exports_external.object({ result: exports_external.array(app2) }),
16945
+ app_get: exports_external.looseObject({
16946
+ app: app2,
16947
+ deployments: exports_external.array(jsonObject),
16948
+ resets: exports_external.array(jsonObject),
16949
+ events: exports_external.array(jsonObject),
16950
+ url: exports_external.string()
16951
+ }),
16952
+ app_deployment_get: exports_external.looseObject({ deployment, bundle: jsonObject }),
16953
+ app_create: app2,
16954
+ app_deploy: exports_external.looseObject({
16955
+ deployment,
16956
+ activated: exports_external.boolean(),
16957
+ url: exports_external.string(),
16958
+ replayed: exports_external.boolean().optional()
16959
+ }),
16960
+ app_activate: exports_external.looseObject({
16961
+ app: app2,
16962
+ deployment,
16823
16963
  replayed: exports_external.boolean().optional(),
16824
- url: exports_external.string().optional(),
16825
- id: id.optional()
16964
+ url: exports_external.string()
16965
+ }),
16966
+ app_rollback: exports_external.looseObject({
16967
+ app: app2,
16968
+ deployment,
16969
+ replayed: exports_external.boolean().optional(),
16970
+ url: exports_external.string()
16826
16971
  }),
16972
+ app_set_access: app2,
16973
+ app_reset_state: exports_external.looseObject({ reset: jsonObject, replayed: exports_external.boolean() }),
16974
+ app_archive: app2,
16827
16975
  charter: exports_external.looseObject({
16828
16976
  ok: exports_external.boolean().optional(),
16829
16977
  space: space3.optional(),
@@ -16897,9 +17045,19 @@ var MCP_OUTPUT_SCHEMAS = {
16897
17045
  head: exports_external.string().optional(),
16898
17046
  refs: exports_external.array(exports_external.string()).optional()
16899
17047
  }),
16900
- computer_sync: exports_external.looseObject({
17048
+ computer_fetch: exports_external.looseObject({
16901
17049
  ok: exports_external.literal(true),
16902
- operation: exports_external.enum(["fetch", "pull", "push"]),
17050
+ operation: exports_external.literal("fetch"),
17051
+ repository: exports_external.string(),
17052
+ dir: exports_external.string(),
17053
+ branch: exports_external.string().optional(),
17054
+ head: exports_external.string().optional(),
17055
+ fetchHead: exports_external.string().optional(),
17056
+ refs: exports_external.array(exports_external.string()).optional()
17057
+ }),
17058
+ computer_pull: exports_external.looseObject({
17059
+ ok: exports_external.literal(true),
17060
+ operation: exports_external.literal("pull"),
16903
17061
  repository: exports_external.string(),
16904
17062
  dir: exports_external.string(),
16905
17063
  branch: exports_external.string().optional(),
@@ -16909,6 +17067,17 @@ var MCP_OUTPUT_SCHEMAS = {
16909
17067
  fetchHead: exports_external.string().optional(),
16910
17068
  refs: exports_external.array(exports_external.string()).optional()
16911
17069
  }),
17070
+ computer_push: exports_external.looseObject({
17071
+ ok: exports_external.literal(true),
17072
+ operation: exports_external.literal("push"),
17073
+ repository: exports_external.string(),
17074
+ dir: exports_external.string(),
17075
+ branch: exports_external.string().optional(),
17076
+ head: exports_external.string().optional(),
17077
+ before: exports_external.string().optional(),
17078
+ after: exports_external.string().optional(),
17079
+ refs: exports_external.array(exports_external.string()).optional()
17080
+ }),
16912
17081
  computer_checkpoint: checkpoint,
16913
17082
  computer_publish_preview: exports_external.looseObject({
16914
17083
  previewId: id,
@@ -16938,6 +17107,141 @@ function outputSchemaFor(actionName) {
16938
17107
  return MCP_OUTPUT_SCHEMAS[actionName];
16939
17108
  }
16940
17109
 
17110
+ // ../actions/src/tool-annotations.ts
17111
+ var readOnly = {
17112
+ readOnlyHint: true,
17113
+ destructiveHint: false,
17114
+ idempotentHint: true,
17115
+ openWorldHint: false
17116
+ };
17117
+ var additive = {
17118
+ readOnlyHint: false,
17119
+ destructiveHint: false,
17120
+ idempotentHint: false,
17121
+ openWorldHint: false
17122
+ };
17123
+ var destructive = {
17124
+ readOnlyHint: false,
17125
+ destructiveHint: true,
17126
+ idempotentHint: false,
17127
+ openWorldHint: false
17128
+ };
17129
+ var idempotent = {
17130
+ readOnlyHint: false,
17131
+ destructiveHint: false,
17132
+ idempotentHint: true,
17133
+ openWorldHint: false
17134
+ };
17135
+ var destructiveIdempotent = {
17136
+ readOnlyHint: false,
17137
+ destructiveHint: true,
17138
+ idempotentHint: true,
17139
+ openWorldHint: false
17140
+ };
17141
+ var openWorld = {
17142
+ readOnlyHint: false,
17143
+ destructiveHint: false,
17144
+ idempotentHint: false,
17145
+ openWorldHint: true
17146
+ };
17147
+ var destructiveOpenWorld = {
17148
+ readOnlyHint: false,
17149
+ destructiveHint: true,
17150
+ idempotentHint: false,
17151
+ openWorldHint: true
17152
+ };
17153
+ var idempotentOpenWorld = {
17154
+ readOnlyHint: false,
17155
+ destructiveHint: false,
17156
+ idempotentHint: true,
17157
+ openWorldHint: true
17158
+ };
17159
+ var MCP_TOOL_ANNOTATIONS = {
17160
+ recall: readOnly,
17161
+ contribute: additive,
17162
+ edit: additive,
17163
+ stamp: additive,
17164
+ react: idempotent,
17165
+ create_topic: additive,
17166
+ topic_update: additive,
17167
+ create_thread: additive,
17168
+ set_organization_computer: additive,
17169
+ set_space_computer: additive,
17170
+ set_topic_computer: additive,
17171
+ set_thread_computer: additive,
17172
+ attach_computer: additive,
17173
+ get_computer: readOnly,
17174
+ publish_topic_computer: additive,
17175
+ checkpoint_computer: additive,
17176
+ transition_thread: additive,
17177
+ request: additive,
17178
+ respond: additive,
17179
+ mark_as_response: idempotent,
17180
+ cancel_request: destructive,
17181
+ inbox: readOnly,
17182
+ dismiss: destructive,
17183
+ whoami: readOnly,
17184
+ introduce: additive,
17185
+ thread_get: readOnly,
17186
+ tree: readOnly,
17187
+ members: readOnly,
17188
+ space_create: additive,
17189
+ space_update: additive,
17190
+ space_get: readOnly,
17191
+ topic_get: readOnly,
17192
+ goal_get: readOnly,
17193
+ goal_list: readOnly,
17194
+ goal: additive,
17195
+ goal_delete: destructive,
17196
+ membership: additive,
17197
+ space_leave: destructive,
17198
+ space_list_open: readOnly,
17199
+ space_invitation_list: readOnly,
17200
+ notification_list: readOnly,
17201
+ notification_read: idempotent,
17202
+ notification_read_all: idempotent,
17203
+ watch: idempotent,
17204
+ watch_get: readOnly,
17205
+ watch_list: readOnly,
17206
+ curation: additive,
17207
+ artifact: additive,
17208
+ artifact_get: readOnly,
17209
+ artifact_transition: additive,
17210
+ artifact_delete: destructive,
17211
+ app_get: readOnly,
17212
+ app_list: readOnly,
17213
+ app_deployment_get: readOnly,
17214
+ app_create: additive,
17215
+ app_deploy: idempotent,
17216
+ app_activate: additive,
17217
+ app_rollback: additive,
17218
+ app_set_access: additive,
17219
+ app_reset_state: destructiveIdempotent,
17220
+ app_archive: additive,
17221
+ charter: destructive,
17222
+ computer_open: additive,
17223
+ computer_exec: destructiveOpenWorld,
17224
+ computer_status: readOnly,
17225
+ computer_verify: openWorld,
17226
+ computer_read: readOnly,
17227
+ computer_export: idempotent,
17228
+ computer_write: destructive,
17229
+ computer_clone: idempotentOpenWorld,
17230
+ computer_fetch: idempotentOpenWorld,
17231
+ computer_pull: destructiveOpenWorld,
17232
+ computer_push: destructiveOpenWorld,
17233
+ computer_checkpoint: additive,
17234
+ computer_publish_preview: idempotent,
17235
+ computer_publish_app_bundle: idempotent,
17236
+ computer_stop: additive
17237
+ };
17238
+ function mcpAnnotationsFor(name) {
17239
+ const annotations = MCP_TOOL_ANNOTATIONS[name];
17240
+ if (!annotations)
17241
+ throw new Error(`${name}: MCP action is missing behavior annotations`);
17242
+ return annotations;
17243
+ }
17244
+
16941
17245
  // ../actions/src/index.ts
16942
17246
  var CONTRIBUTION_ADD_LINK_RELS = [
16943
17247
  "cites",
@@ -16957,7 +17261,7 @@ var ORIENTATION = `Arbor is your team's deliberation room and shared memory —
16957
17261
  6. FIT STRUCTURE TO THE WORK — one thread settles one objective, one topic holds one area — and CLOSE it when done. Before adding to a thread, ask whether your point serves ITS objective or starts a new one: a genuinely new question deserves its own thread (check \`tree\`, name it by its objective, make the first contribution); a distinct area that's accumulating threads deserves its own topic. When a thread reaches its conclusion, \`transition_thread --to resolved\`; opened in the wrong place → \`--to archived\` and reopen where it belongs. A thread DESIGNED to stay open — a journal, ops log, or standing lane — is \`--to standing\` (AD-200): it is never owed a conclusion, and its distillation is PROMOTION (\uD83C\uDF96️ a synthesis), not closure; "close it when done" applies to deliberations, not standing lanes. CLOSING IS MEMBER WORK: any member of the space can resolve a thread whose objective is met — you do not need its author's permission, and you do not need to be the one who did the work. Asking a human to perform the close is not deference; it is an open thread with extra steps. If the objective is met, close it and say why. WHY: structure should mirror the work so each thread settles one findable question — a thread crammed with many objectives is as unreadable as a litter of one-off topics, and open threads no one closes bury the live ones.
16958
17262
  7. ACT, THEN REPORT — escalate by exception (AD-197). Before routing a decision to a human, do the CHEAP CHECK that would let you act yourself — the registry lookup, the live-state read, the policy check; the blocker is usually fictional. Then: recoverable + conclusive evidence → act and say why. Recoverable but uncertain → state your intent WITH a deadline ("resolving Thursday unless someone objects") and act at the deadline. Irreversible, outward-facing, or a genuine taste/priority call → escalate; that's what humans are for. Reversibility is the test you can always answer in the moment — a wrong resolve costs one click to undo (\`resolved\` → \`active\`), while waiting costs days. WHY: a room where every met condition waits for a human keystroke makes the human the bottleneck and the agents decorative at exactly the moments they're most useful.
16959
17263
 
16960
- 8. DURABLE OUTPUT IS AN ARTIFACT, NOT A LONG CONTRIBUTION (AD-201). A contribution is one point in a conversation; an ARTIFACT is a first-class output the room holds and keeps CURRENT — a doc, a table, a diagram, a spec, or an uploaded file. When your point is really a deliverable the team will read or UPDATE later — a table of options, a reference doc, a plan, a rubric — make it an artifact (\`artifact\` create with kind doc/table/diagram/html + \`source\`, or promote a file) instead of pasting it into prose. Text-kind artifacts are LIVING: \`get\` it, then \`edit\` naming the \`baseVersion\` you read — patches apply exact-match and atomically, one version per call, every version attributed. An artifact created FROM a thread is listed on that thread automatically (no link post needed); cite it inline with [label](#art_…) wherever it's relevant. WHY: a thread remembers what was SAID; an artifact holds what is TRUE NOW — a 40-row table pasted into a contribution is frozen the instant it's posted and unreadable the moment it's edited, while the same table as an artifact stays live, diffable, and findable by its content.
17264
+ 8. DURABLE OUTPUT IS AN ARTIFACT, NOT A LONG CONTRIBUTION (AD-201). A contribution is one point in a conversation; an ARTIFACT is a first-class output the room holds and keeps CURRENT — a doc, a table, a diagram, a spec, or an uploaded file. When your point is really a deliverable the team will read or UPDATE later — a table of options, a reference doc, a plan, a rubric — make it an artifact (\`artifact\` verb=create with kind doc/table/diagram/html + \`source\`, or promote a file) instead of pasting it into prose. Text-kind artifacts are LIVING: \`artifact_get\` it, then \`artifact\` verb=edit naming the \`baseVersion\` you read — patches apply exact-match and atomically, one version per call, every version attributed. An artifact created FROM a thread is listed on that thread automatically (no link post needed); cite it inline with [label](#art_…) wherever it's relevant. WHY: a thread remembers what was SAID; an artifact holds what is TRUE NOW — a 40-row table pasted into a contribution is frozen the instant it's posted and unreadable the moment it's edited, while the same table as an artifact stays live, diffable, and findable by its content.
16961
17265
 
16962
17266
  Run \`arbor help\` (or read the MCP tool list) for the exact command/flags — those stay generated from the live action surface, so they're always current.`;
16963
17267
  var PROSE_LISTS = exports_external.registry();
@@ -17368,10 +17672,52 @@ var ACTION_DEFINITIONS = [
17368
17672
  githubToken: exports_external.string().min(1).describe("short-lived GitHub token supplied by the caller"),
17369
17673
  githubUsername: exports_external.string().optional().describe("GitHub username; defaults to x-access-token")
17370
17674
  },
17371
- surfaces: ["computer-mcp", "computer-cli"],
17675
+ surfaces: ["computer-cli"],
17372
17676
  toolset: "loop",
17373
17677
  run: forward("computer_runtime.sync")
17374
17678
  },
17679
+ {
17680
+ name: "computer_fetch",
17681
+ title: "Fetch an allowed repository",
17682
+ description: "Fetch remote refs for a cloned recipe repository without changing its checked-out branch or any remote ref. The collaborator's GitHub token is spent only on this call and is neither stored nor returned.",
17683
+ inputSchema: {
17684
+ computerSessionId: exports_external.string().describe("the computerSessionId returned by computer_open, cms_…"),
17685
+ repository: exports_external.string().describe("allowed owner/repository slug already cloned"),
17686
+ githubToken: exports_external.string().min(1).describe("short-lived GitHub token supplied by the caller"),
17687
+ githubUsername: exports_external.string().optional().describe("GitHub username; defaults to x-access-token")
17688
+ },
17689
+ surfaces: ["computer-mcp"],
17690
+ toolset: "loop",
17691
+ run: (ex, input) => ex.call("computer_runtime.sync", { ...input, operation: "fetch" })
17692
+ },
17693
+ {
17694
+ name: "computer_pull",
17695
+ title: "Fast-forward an allowed repository",
17696
+ description: "Fetch and fast-forward the checked-out branch of a cloned recipe repository; divergent history is rejected. The collaborator's GitHub token is spent only on this call and is neither stored nor returned.",
17697
+ inputSchema: {
17698
+ computerSessionId: exports_external.string().describe("the computerSessionId returned by computer_open, cms_…"),
17699
+ repository: exports_external.string().describe("allowed owner/repository slug already cloned"),
17700
+ githubToken: exports_external.string().min(1).describe("short-lived GitHub token supplied by the caller"),
17701
+ githubUsername: exports_external.string().optional().describe("GitHub username; defaults to x-access-token")
17702
+ },
17703
+ surfaces: ["computer-mcp"],
17704
+ toolset: "loop",
17705
+ run: (ex, input) => ex.call("computer_runtime.sync", { ...input, operation: "pull" })
17706
+ },
17707
+ {
17708
+ name: "computer_push",
17709
+ title: "Push an allowed repository",
17710
+ description: "Push the checked-out branch to its fixed allowlisted GitHub repository without force-pushing or deleting refs. The collaborator's GitHub token is spent only on this call and is neither stored nor returned.",
17711
+ inputSchema: {
17712
+ computerSessionId: exports_external.string().describe("the computerSessionId returned by computer_open, cms_…"),
17713
+ repository: exports_external.string().describe("allowed owner/repository slug already cloned"),
17714
+ githubToken: exports_external.string().min(1).describe("short-lived GitHub token supplied by the caller"),
17715
+ githubUsername: exports_external.string().optional().describe("GitHub username; defaults to x-access-token")
17716
+ },
17717
+ surfaces: ["computer-mcp"],
17718
+ toolset: "loop",
17719
+ run: (ex, input) => ex.call("computer_runtime.sync", { ...input, operation: "push" })
17720
+ },
17375
17721
  {
17376
17722
  name: "computer_checkpoint",
17377
17723
  title: "Checkpoint completed work",
@@ -17400,7 +17746,7 @@ var ACTION_DEFINITIONS = [
17400
17746
  {
17401
17747
  name: "computer_publish_app_bundle",
17402
17748
  title: "Publish an immutable AppBundle",
17403
- description: "After a Bun container build is green, freeze one Worker entry module plus optional static assets from this Thread computer into a content-addressed AppBundle sourced from an ArtifactVersion. Use the returned bundleId with apps verb=deploy (CLI: app_deploy); uploads complete and verify before Arbor publishes the bundle manifest, and retries require the same idempotencyKey.",
17749
+ description: "After a Bun container build is green, freeze one Worker entry module plus optional static assets from this Thread computer into a content-addressed AppBundle sourced from an ArtifactVersion. Use the returned bundleId with app_deploy; uploads complete and verify before Arbor publishes the bundle manifest, and retries require the same idempotencyKey.",
17404
17750
  inputSchema: {
17405
17751
  computerSessionId: exports_external.string().describe("the computerSessionId returned by computer_open, cms_…"),
17406
17752
  artifactVersionId: exports_external.string().describe("the source ArtifactVersion, artv_…"),
@@ -17722,7 +18068,7 @@ var ACTION_DEFINITIONS = [
17722
18068
  inputSchema: {
17723
18069
  notificationId: exports_external.string().describe("the notification id, ntf_…")
17724
18070
  },
17725
- surfaces: ["cli"],
18071
+ surfaces: ["mcp", "cli"],
17726
18072
  toolset: "loop",
17727
18073
  run: forward("notification.markRead")
17728
18074
  },
@@ -17731,7 +18077,7 @@ var ACTION_DEFINITIONS = [
17731
18077
  title: "Mark all notifications read",
17732
18078
  description: "Mark every unread notification in your feed read in one call; returns how many were cleared. Reach for this to zero out your awareness feed after a catch-up.",
17733
18079
  inputSchema: {},
17734
- surfaces: ["cli"],
18080
+ surfaces: ["mcp", "cli"],
17735
18081
  toolset: "loop",
17736
18082
  run: forward("notification.markAllRead")
17737
18083
  },
@@ -18142,63 +18488,84 @@ var ACTION_DEFINITIONS = [
18142
18488
  toolset: "admin",
18143
18489
  run: forward("admin.getThread")
18144
18490
  },
18491
+ {
18492
+ name: "goal_get",
18493
+ title: "Read one goal",
18494
+ 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.",
18495
+ inputSchema: { id: exports_external.string().describe("the goal, ini_…") },
18496
+ surfaces: ["mcp"],
18497
+ toolset: "goals",
18498
+ run: forward("initiative.get")
18499
+ },
18500
+ {
18501
+ name: "goal_list",
18502
+ title: "List goals",
18503
+ 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.",
18504
+ inputSchema: {
18505
+ spaceId: exports_external.string().optional().describe("a Space whose attached goals to list, spc_…"),
18506
+ threadId: exports_external.string().optional().describe("a Thread whose linked and available goals to list, thr_…")
18507
+ },
18508
+ surfaces: ["mcp"],
18509
+ toolset: "goals",
18510
+ run: (ex, input) => {
18511
+ if (typeof input.spaceId === "string")
18512
+ return ex.call("initiative.listForSpace", { spaceId: input.spaceId });
18513
+ if (typeof input.threadId === "string")
18514
+ return ex.call("initiative.forThread", { threadId: input.threadId });
18515
+ return Promise.reject(new Error("goal_list requires a spaceId (a Space's goals) or a threadId (a Thread's goals)"));
18516
+ }
18517
+ },
18145
18518
  {
18146
18519
  name: "goal",
18147
- title: "Work with goals",
18148
- description: "GOALS (initiatives) — the wide 'why' threads serve toward (AD-146/180). verb=get (id — one goal read fully, ANY status incl. archived), create (spaceId+title, optional purpose/threadIds the creating space becomes its HOME), list (spaceId — a space's goals, OR threadId — a thread's linked goals), update (id + title/purpose), set_status (id+status: active|paused|completed|archived completed = reached, archived = retired from pick lists), delete (id), link_thread/unlink_thread (threadId+initiativeId), attach_space/detach_space (initiativeId+spaceId — surface a goal in MORE spaces).",
18520
+ title: "Manage goals",
18521
+ description: "Create, update, change lifecycle, or change the Space/Thread links of a goal (initiative). Hard deletion is isolated in goal_delete; use goal_get or goal_list for inspection.",
18149
18522
  inputSchema: {
18150
18523
  verb: exports_external.enum([
18151
18524
  "create",
18152
- "list",
18153
18525
  "update",
18154
18526
  "set_status",
18155
- "delete",
18156
18527
  "link_thread",
18157
18528
  "unlink_thread",
18158
18529
  "attach_space",
18159
18530
  "detach_space"
18160
18531
  ]).describe("which goal move to make"),
18161
- spaceId: exports_external.string().optional().describe("create: HOME space · list: a space's goals · attach/detach_space: the target space, spc_…"),
18532
+ spaceId: exports_external.string().optional().describe("create: HOME space · attach/detach_space: the target space, spc_…"),
18162
18533
  title: exports_external.string().optional().describe("create/update: the goal's name — an outcome, not a task"),
18163
18534
  purpose: exports_external.string().optional().describe("create/update: one or two lines on what reaching it means"),
18164
18535
  threadIds: exports_external.array(exports_external.string()).optional().describe("create: threads to link at birth"),
18165
- id: exports_external.string().optional().describe("get/update/set_status/delete: the goal, ini_…"),
18536
+ id: exports_external.string().optional().describe("update/set_status: the goal, ini_…"),
18166
18537
  status: exports_external.enum(["active", "paused", "completed", "archived"]).optional().describe("set_status: the new lifecycle state"),
18167
- threadId: exports_external.string().optional().describe("list/link_thread/unlink_thread: the thread, thr_…"),
18538
+ threadId: exports_external.string().optional().describe("link_thread/unlink_thread: the thread, thr_…"),
18168
18539
  initiativeId: exports_external.string().optional().describe("link/unlink/attach/detach: the goal, ini_…")
18169
18540
  },
18170
18541
  surfaces: ["mcp"],
18171
18542
  toolset: "goals",
18172
- run: (ex, input) => {
18173
- const { verb, spaceId, threadId } = input;
18174
- if (verb === "list") {
18175
- if (typeof spaceId === "string")
18176
- return ex.call("initiative.listForSpace", { spaceId });
18177
- if (typeof threadId === "string")
18178
- return ex.call("initiative.forThread", { threadId });
18179
- return Promise.reject(new Error("goal list requires a spaceId (a space's goals) or a threadId (a thread's goals)"));
18180
- }
18181
- return dispatch({
18182
- get: "initiative.get",
18183
- create: "initiative.create",
18184
- list: "initiative.forThread",
18185
- update: "initiative.update",
18186
- set_status: "initiative.setStatus",
18187
- delete: "initiative.delete",
18188
- link_thread: "initiative.linkThread",
18189
- unlink_thread: "initiative.unlinkThread",
18190
- attach_space: "initiative.attachSpace",
18191
- detach_space: "initiative.detachSpace"
18192
- })(ex, input);
18193
- }
18543
+ run: dispatch({
18544
+ create: "initiative.create",
18545
+ update: "initiative.update",
18546
+ set_status: "initiative.setStatus",
18547
+ link_thread: "initiative.linkThread",
18548
+ unlink_thread: "initiative.unlinkThread",
18549
+ attach_space: "initiative.attachSpace",
18550
+ detach_space: "initiative.detachSpace"
18551
+ })
18552
+ },
18553
+ {
18554
+ name: "goal_delete",
18555
+ title: "Permanently delete a goal",
18556
+ description: "Permanently delete a mistaken or duplicate goal and all of its Space/Thread links. This is irreversible; archive a goal through goal instead when its history should remain.",
18557
+ inputSchema: { id: exports_external.string().describe("the goal to permanently delete, ini_…") },
18558
+ surfaces: ["mcp"],
18559
+ toolset: "goals",
18560
+ run: forward("initiative.delete")
18194
18561
  },
18195
18562
  {
18196
18563
  name: "membership",
18197
18564
  title: "Space membership moves",
18198
- description: "Your space membership, in one tool. verb=join (an open space), leave, add_member (spaceId+profileId an agent is added directly, a human gets an invite to accept, AD-177), accept_invite (invitationId), my_invites (your pending invites), list_open (spaces anyone in the org may join).",
18565
+ description: "Join an open Space, add a member, or accept one invitation. Leaving is isolated in space_leave; read available Spaces with space_list_open and pending invitations with space_invitation_list.",
18199
18566
  inputSchema: {
18200
- verb: exports_external.enum(["join", "leave", "add_member", "accept_invite", "my_invites", "list_open"]).describe("which membership move to make"),
18201
- spaceId: exports_external.string().optional().describe("join/leave/add_member: the space, spc_…"),
18567
+ verb: exports_external.enum(["join", "add_member", "accept_invite"]).describe("which membership move to make"),
18568
+ spaceId: exports_external.string().optional().describe("join/add_member: the Space, spc_…"),
18202
18569
  profileId: exports_external.string().optional().describe("add_member: who to add, prof_…"),
18203
18570
  invitationId: exports_external.string().optional().describe("accept_invite: the invitation, sinv_…")
18204
18571
  },
@@ -18206,48 +18573,83 @@ var ACTION_DEFINITIONS = [
18206
18573
  toolset: "spaces",
18207
18574
  run: dispatch({
18208
18575
  join: "space.join",
18209
- leave: "space.leave",
18210
18576
  add_member: "space.addMember",
18211
- accept_invite: "space.acceptInvite",
18212
- my_invites: "space.invites",
18213
- list_open: "space.listOpen"
18577
+ accept_invite: "space.acceptInvite"
18214
18578
  })
18215
18579
  },
18216
18580
  {
18217
- name: "notification",
18218
- title: "Your awareness feed",
18219
- description: "Awareness, never obligation (`inbox` is the only obligation surface). verb=list: activity involving you, newest first, each item carrying a triage `class` (AD-182): settled-context (thread resolved — context, not work) | owed-by-me (an open ask targets you — this row is a POINTER to inbox) | judgment-available (your work engaged in a live thread — an invitation) | closed-loop (your ask completed) | room-motion (safely skippable). verb=read (notificationId) clears one row; verb=read_all clears the feed.",
18220
- inputSchema: {
18221
- verb: exports_external.enum(["list", "read", "read_all"]).describe("list the feed, or clear one/all"),
18222
- notificationId: exports_external.string().optional().describe("read: the notification, ntf_…"),
18223
- ...PAGINATION_INPUT
18224
- },
18581
+ name: "space_leave",
18582
+ title: "Leave a Space",
18583
+ description: "Leave one Space and give up your membership. Rejoining a private Space requires a new invitation, so confirm the Space id before calling this tool.",
18584
+ inputSchema: { spaceId: exports_external.string().describe("the Space to leave, spc_…") },
18585
+ surfaces: ["mcp"],
18586
+ toolset: "spaces",
18587
+ run: forward("space.leave")
18588
+ },
18589
+ {
18590
+ name: "space_list_open",
18591
+ title: "List open Spaces",
18592
+ description: "List open Spaces in your organization and whether you already belong to each one. It cannot join, leave, invite, or otherwise change Space membership.",
18593
+ inputSchema: { ...PAGINATION_INPUT },
18594
+ surfaces: ["mcp"],
18595
+ toolset: "spaces",
18596
+ run: forward("space.listOpen")
18597
+ },
18598
+ {
18599
+ name: "space_invitation_list",
18600
+ title: "List my Space invitations",
18601
+ description: "List the pending Space invitations addressed to you. It cannot accept an invitation or change any Space membership.",
18602
+ inputSchema: { ...PAGINATION_INPUT },
18603
+ surfaces: ["mcp"],
18604
+ toolset: "spaces",
18605
+ run: forward("space.invites")
18606
+ },
18607
+ {
18608
+ name: "notification_list",
18609
+ title: "List your notifications",
18610
+ description: "List your awareness feed newest first, including unseen count and each item's triage class. It cannot mark notifications read or modify inbox obligations.",
18611
+ inputSchema: { ...PAGINATION_INPUT },
18225
18612
  surfaces: ["mcp"],
18226
18613
  toolset: "loop",
18227
- run: dispatch({
18228
- list: "notification.list",
18229
- read: "notification.markRead",
18230
- read_all: "notification.markAllRead"
18231
- })
18614
+ run: forward("notification.list")
18232
18615
  },
18233
18616
  {
18234
18617
  name: "watch",
18235
- title: "Watch for changes",
18236
- description: "CHOSEN attention (AD-202) subscribe to a thread/artifact/topic and get a notification when it changes, even on work you didn't touch (participation already notifies you about threads you're in; watch is for the rest). verb=on: start watching (targetType thread|artifact|topic + targetId). verb=off: stop. verb=status: are you watching this one? verb=list: everything you watch. A watched thread pings on a new contribution, an artifact on a new version, a topic on a new thread — bursts collapse into one row, so watching a busy target is safe. Watching is PRIVATE (nobody sees you watch).",
18618
+ title: "Change a watch",
18619
+ description: "Start or stop your private watch on one Thread, Artifact, or Topic; repeated on/off calls are idempotent. Inspect watches with watch_get or watch_list.",
18237
18620
  inputSchema: {
18238
- verb: exports_external.enum(["on", "off", "status", "list"]).describe("start/stop/check watching, or list"),
18239
- targetType: exports_external.enum(["thread", "artifact", "topic"]).optional().describe("on/off/status: what to watch"),
18240
- targetId: exports_external.string().optional().describe("on/off/status: the id (thr_/art_/top_)")
18621
+ verb: exports_external.enum(["on", "off"]).describe("start or stop watching"),
18622
+ targetType: exports_external.enum(["thread", "artifact", "topic"]).describe("what to watch"),
18623
+ targetId: exports_external.string().describe("the id (thr_/art_/top_)")
18241
18624
  },
18242
18625
  surfaces: ["mcp"],
18243
18626
  toolset: "loop",
18244
18627
  run: dispatch({
18245
18628
  on: "watch.toggle",
18246
- off: "watch.toggle",
18247
- status: "watch.get",
18248
- list: "watch.list"
18629
+ off: "watch.toggle"
18249
18630
  }, (verb, input) => verb === "off" ? { ...input, watching: false } : input)
18250
18631
  },
18632
+ {
18633
+ name: "watch_get",
18634
+ title: "Read one watch status",
18635
+ description: "Check whether you watch one Thread, Artifact, or Topic. It cannot start or stop a watch or change notifications.",
18636
+ inputSchema: {
18637
+ targetType: exports_external.enum(["thread", "artifact", "topic"]).describe("what to check"),
18638
+ targetId: exports_external.string().describe("the id (thr_/art_/top_)")
18639
+ },
18640
+ surfaces: ["mcp"],
18641
+ toolset: "loop",
18642
+ run: forward("watch.get")
18643
+ },
18644
+ {
18645
+ name: "watch_list",
18646
+ title: "List your watches",
18647
+ description: "List every Thread, Artifact, and Topic you currently watch. It cannot start or stop a watch or change notifications.",
18648
+ inputSchema: {},
18649
+ surfaces: ["mcp"],
18650
+ toolset: "loop",
18651
+ run: forward("watch.list")
18652
+ },
18251
18653
  {
18252
18654
  name: "watch_target",
18253
18655
  title: "Watch a thread/artifact/topic",
@@ -18300,10 +18702,10 @@ var ACTION_DEFINITIONS = [
18300
18702
  },
18301
18703
  {
18302
18704
  name: "artifact",
18303
- title: "Durable artifacts",
18304
- description: "Durable, versioned artifacts the team's living documents (AD-201). Kinds: doc (markdown), table (CSV), diagram (Mermaid), html — all versioned text you edit in place — plus file (a contentRef: URL/inline/blob). " + "verb=create (kind+type+title+summary, source for text kinds / contentRef for file; summary is the required one-line skim/retrieval description; a text artifact is born at v1 and is AUTOMATICALLY listed on its sourceThreadId thread — no link post needed). " + "For computer-produced output, create with the computerSessionId returned by attach_computer so the artifact cites the reproducible session. " + "verb=get (artifactId — the current source + version + history; pass version to read an old snapshot). " + "verb=edit — READ FIRST via get, then pass baseVersion (the version you read): either source (full replace) or patches [{old,new},…] (exact-match hunks, applied in order, ATOMIC — all land or none, and one call mints ONE version, so batch related row-edits into one call). A stale baseVersion returns {ok:false, currentSource} — reconcile and retry against the returned source; a failed patch names the culprit index. " + "verb=transition (artifactId + to: active|promoted|needs-review|superseded|deprecated|archived|deleted), promote_attachment (attachmentId lift an uploaded file into an artifact).",
18705
+ title: "Create or edit an Artifact",
18706
+ description: "Create or edit a durable, versioned Artifact, or promote a Thread attachment into one. Read current content and baseVersion with artifact_get; lifecycle changes use artifact_transition and terminal deletion uses artifact_delete. " + "Kinds: doc (markdown), table (CSV), diagram (Mermaid), html — all versioned text you edit in place — plus file (a contentRef: URL/inline/blob). " + "verb=create (kind+type+title+summary, source for text kinds / contentRef for file; summary is the required one-line skim/retrieval description; a text artifact is born at v1 and is AUTOMATICALLY listed on its sourceThreadId thread — no link post needed). " + "For computer-produced output, create with the computerSessionId returned by attach_computer so the artifact cites the reproducible session. " + "verb=edit — READ FIRST via artifact_get, then pass baseVersion: either source (full replace) or patches [{old,new},…] (exact-match hunks, applied in order, ATOMIC — all land or none, and one call mints ONE version). A stale baseVersion returns {ok:false, currentSource}; promote_attachment lifts one uploaded file into an Artifact.",
18305
18707
  inputSchema: {
18306
- verb: exports_external.enum(["create", "get", "edit", "transition", "promote_attachment"]).describe("which artifact move"),
18708
+ verb: exports_external.enum(["create", "edit", "promote_attachment"]).describe("which artifact move"),
18307
18709
  title: exports_external.string().optional().describe("create: the artifact's title"),
18308
18710
  kind: exports_external.enum(["doc", "table", "diagram", "html", "file"]).optional().describe("create: structural kind (default file). doc/table/diagram/html are editable text"),
18309
18711
  type: exports_external.string().optional().describe("create: semantic type, e.g. decision|summary|plan|markdown|table|research-brief"),
@@ -18314,25 +18716,57 @@ var ACTION_DEFINITIONS = [
18314
18716
  sourceThreadId: exports_external.string().optional().describe("create: the thread it came from"),
18315
18717
  computerSessionId: exports_external.string().optional().describe("create: the attached computer session that produced it, cms_…"),
18316
18718
  sourceContributionIds: exports_external.array(exports_external.string()).optional().describe("create: contributions it distills"),
18317
- artifactId: exports_external.string().optional().describe("get/edit/transition: the artifact, art_…"),
18318
- version: exports_external.number().optional().describe("get: read this old snapshot instead of the current"),
18719
+ artifactId: exports_external.string().optional().describe("edit: the Artifact, art_…"),
18319
18720
  baseVersion: exports_external.number().optional().describe("edit: the version you READ (from get/create) — stale base is rejected with the current source"),
18320
18721
  patches: exports_external.array(exports_external.object({ old: exports_external.string(), new: exports_external.string() })).optional().describe("edit: exact-match hunks applied in order, atomically; each old must match exactly once"),
18321
18722
  note: exports_external.string().optional().describe("edit: one-line summary of what changed"),
18322
- to: exports_external.string().optional().describe("transition: the target status"),
18323
- reason: exports_external.string().optional().describe("transition: why"),
18324
18723
  attachmentId: exports_external.string().optional().describe("promote_attachment: the upload, att_…")
18325
18724
  },
18326
18725
  surfaces: ["mcp"],
18327
18726
  toolset: "artifacts",
18328
18727
  run: dispatch({
18329
18728
  create: "artifact.create",
18330
- get: "artifact.get",
18331
18729
  edit: "artifact.edit",
18332
- transition: "artifact.transition",
18333
18730
  promote_attachment: "attachment.promote"
18334
18731
  }, (verb, input) => verb === "edit" ? { ...input, verb: Array.isArray(input.patches) ? "patch" : "replace" } : input)
18335
18732
  },
18733
+ {
18734
+ name: "artifact_get",
18735
+ title: "Read an Artifact",
18736
+ description: "Read an Artifact's current source, version, immutable history, and AppBundle references, or pass version for an older snapshot. It cannot edit content, change lifecycle, promote an attachment, or delete an Artifact.",
18737
+ inputSchema: {
18738
+ artifactId: exports_external.string().describe("the Artifact, art_…"),
18739
+ version: exports_external.number().optional().describe("read this old snapshot instead of the current")
18740
+ },
18741
+ surfaces: ["mcp"],
18742
+ toolset: "artifacts",
18743
+ run: forward("artifact.get")
18744
+ },
18745
+ {
18746
+ name: "artifact_transition",
18747
+ title: "Change an Artifact's lifecycle",
18748
+ description: "Move one Artifact to active, promoted, needs-review, superseded, deprecated, or archived. Terminal deletion is isolated in artifact_delete.",
18749
+ inputSchema: {
18750
+ artifactId: exports_external.string().describe("the Artifact, art_…"),
18751
+ to: exports_external.enum(["active", "promoted", "needs-review", "superseded", "deprecated", "archived"]).describe("the target lifecycle state"),
18752
+ reason: exports_external.string().optional().describe("why the lifecycle changed")
18753
+ },
18754
+ surfaces: ["mcp"],
18755
+ toolset: "artifacts",
18756
+ run: forward("artifact.transition")
18757
+ },
18758
+ {
18759
+ name: "artifact_delete",
18760
+ title: "Permanently delete an Artifact",
18761
+ description: "Move one Artifact into its terminal deleted lifecycle state so it leaves every read and retrieval surface. This cannot be reversed through the Artifact lifecycle.",
18762
+ inputSchema: {
18763
+ artifactId: exports_external.string().describe("the Artifact to permanently delete, art_…"),
18764
+ reason: exports_external.string().optional().describe("why the Artifact must be deleted")
18765
+ },
18766
+ surfaces: ["mcp"],
18767
+ toolset: "artifacts",
18768
+ run: (ex, input) => ex.call("artifact.transition", { ...input, to: "deleted" })
18769
+ },
18336
18770
  {
18337
18771
  name: "apps",
18338
18772
  title: "List visible Apps",
@@ -18345,57 +18779,22 @@ var ACTION_DEFINITIONS = [
18345
18779
  run: forward("app.list")
18346
18780
  },
18347
18781
  {
18348
- name: "apps",
18349
- title: "Publish and manage Apps",
18350
- description: "Manage stable Arbor Apps through one guarded lifecycle (AD-248/249). verb=list shows Apps across the actor's Spaces plus active listed public Apps across the organization; get reads the active release, pending control intent, state generation, and history; create mints the Space-owned identity; deploy health-checks an immutable AppBundle without moving the URL; deployment inspects one candidate; activate and rollback reserve an attributed intent before provider health and compare-and-swap completion; set_access changes Space/public and public discovery immediately; reset_state is the only durable SQLite deletion and resumes partial failure with the same idempotency key; archive stops serving but retains history. Read with get immediately before activate, rollback, access, or reset. Public Apps must be public+(unlisted|listed)+none; durable Apps are space+durable.",
18782
+ name: "app_list",
18783
+ title: "List visible Apps",
18784
+ description: "READ ONLY: List Apps visible to you, including authorized archived Apps when requested. It cannot modify App state, deployment state, access, or durable SQLite.",
18351
18785
  inputSchema: {
18352
- verb: exports_external.enum([
18353
- "list",
18354
- "get",
18355
- "create",
18356
- "deploy",
18357
- "deployment",
18358
- "activate",
18359
- "rollback",
18360
- "set_access",
18361
- "reset_state",
18362
- "archive"
18363
- ]).describe("which App lifecycle operation to perform"),
18364
- includeArchived: exports_external.boolean().optional().describe("list: include authorized archived Apps"),
18365
- appId: exports_external.string().optional().describe("required for every verb except list and create: the App, app_…"),
18366
- spaceId: exports_external.string().optional().describe("create: owning Space, spc_…"),
18367
- title: exports_external.string().min(1).max(160).optional().describe("create: short factual title"),
18368
- slug: exports_external.string().min(1).max(59).optional().describe("create: stable label in app-<slug>.arborthreads.dev"),
18369
- access: exports_external.enum(["space", "public"]).optional().describe("create/set_access: gateway access"),
18370
- discovery: exports_external.enum(["unlisted", "listed"]).nullable().optional().describe("create/set_access: public discovery; Space Apps use null"),
18371
- stateMode: exports_external.enum(["none", "durable"]).optional().describe("create: none or Space-only isolated durable SQLite"),
18372
- bundleId: exports_external.string().optional().describe("deploy: verified immutable AppBundle, bnd_…"),
18373
- deploymentId: exports_external.string().optional().describe("deployment/activate/rollback: deployment, dep_…"),
18374
- expectedActiveDeploymentId: exports_external.string().nullable().optional().describe("activate/rollback: active deployment just read; null only for first activation"),
18375
- expectedGeneration: exports_external.number().int().min(0).optional().describe("reset_state: durable generation just read"),
18376
- idempotencyKey: exports_external.string().min(1).max(200).optional().describe("deploy/reset_state: stable key for this one logical mutation")
18786
+ includeArchived: exports_external.boolean().optional().describe("include archived Apps you are authorized to inspect")
18377
18787
  },
18378
18788
  surfaces: ["mcp"],
18379
18789
  toolset: "apps",
18380
- run: dispatch({
18381
- list: "app.list",
18382
- get: "app.get",
18383
- create: "app.create",
18384
- deploy: "app.deploy",
18385
- deployment: "app.deployment_get",
18386
- activate: "app.activate",
18387
- rollback: "app.rollback",
18388
- set_access: "app.set_access",
18389
- reset_state: "app.reset_state",
18390
- archive: "app.archive"
18391
- })
18790
+ run: forward("app.list")
18392
18791
  },
18393
18792
  {
18394
18793
  name: "app_get",
18395
18794
  title: "Read an App",
18396
- description: "Inspect one App's stable URL, active release, pending control intent, source AppBundle, attributed deployment timeline, last activation health, state identity/generation, and reset history. Read this before deployment, rollback, access, or state changes so compare-and-swap inputs are current.",
18795
+ description: "READ ONLY: Inspect one App's stable URL, active deployment, pending control intent, deployment history, health, and durable state generation. It cannot modify App state, deployment state, access, or durable SQLite; use its activeDeploymentId as app_activate's expectedActiveDeploymentId.",
18397
18796
  inputSchema: { appId: exports_external.string().describe("the App, app_…") },
18398
- surfaces: ["cli"],
18797
+ surfaces: ["mcp", "cli"],
18399
18798
  toolset: "apps",
18400
18799
  run: forward("app.get")
18401
18800
  },
@@ -18411,7 +18810,7 @@ var ACTION_DEFINITIONS = [
18411
18810
  discovery: exports_external.enum(["unlisted", "listed"]).nullable().optional().describe("public Apps only; default unlisted"),
18412
18811
  stateMode: exports_external.enum(["none", "durable"]).describe("durable allocates Space-only isolated facet SQLite; deployment never resets it")
18413
18812
  },
18414
- surfaces: ["cli"],
18813
+ surfaces: ["mcp", "cli"],
18415
18814
  toolset: "apps",
18416
18815
  run: forward("app.create")
18417
18816
  },
@@ -18424,7 +18823,7 @@ var ACTION_DEFINITIONS = [
18424
18823
  bundleId: exports_external.string().describe("verified immutable AppBundle, bnd_…"),
18425
18824
  idempotencyKey: exports_external.string().min(1).max(200).describe("stable key for this one logical deployment attempt")
18426
18825
  },
18427
- surfaces: ["cli"],
18826
+ surfaces: ["mcp", "cli"],
18428
18827
  toolset: "apps",
18429
18828
  run: forward("app.deploy")
18430
18829
  },
@@ -18440,6 +18839,18 @@ var ACTION_DEFINITIONS = [
18440
18839
  toolset: "apps",
18441
18840
  run: forward("app.deployment_get")
18442
18841
  },
18842
+ {
18843
+ name: "app_deployment_get",
18844
+ title: "Inspect an App deployment",
18845
+ description: "READ ONLY: Inspect one deployment's candidate, active, failed, or superseded state, source AppBundle, provider receipt, and redacted health result. It cannot modify App state, deployment state, access, or durable SQLite.",
18846
+ inputSchema: {
18847
+ appId: exports_external.string().describe("owning App, app_…"),
18848
+ deploymentId: exports_external.string().describe("deployment, dep_…")
18849
+ },
18850
+ surfaces: ["mcp"],
18851
+ toolset: "apps",
18852
+ run: forward("app.deployment_get")
18853
+ },
18443
18854
  {
18444
18855
  name: "app_activate",
18445
18856
  title: "Activate a verified deployment",
@@ -18449,20 +18860,20 @@ var ACTION_DEFINITIONS = [
18449
18860
  deploymentId: exports_external.string().describe("verified candidate, dep_…"),
18450
18861
  expectedActiveDeploymentId: exports_external.string().nullable().describe("active deployment from app_get, or null before first activation")
18451
18862
  },
18452
- surfaces: ["cli"],
18863
+ surfaces: ["mcp", "cli"],
18453
18864
  toolset: "apps",
18454
18865
  run: forward("app.activate")
18455
18866
  },
18456
18867
  {
18457
18868
  name: "app_rollback",
18458
18869
  title: "Roll back App code",
18459
- description: "Re-activate a superseded deployment while preserving the App's state identity and SQLite data. Durable rollback is refused when the target bundle cannot read the current state schema; reset is a separate destructive operation.",
18870
+ description: "Re-activate a superseded deployment while preserving the App's state identity and SQLite data. Durable rollback is refused when the target bundle cannot read the current state schema; reset requires a separate app_reset_state call.",
18460
18871
  inputSchema: {
18461
18872
  appId: exports_external.string().describe("target App, app_…"),
18462
18873
  deploymentId: exports_external.string().describe("superseded deployment to restore, dep_…"),
18463
18874
  expectedActiveDeploymentId: exports_external.string().describe("current active deployment from app_get")
18464
18875
  },
18465
- surfaces: ["cli"],
18876
+ surfaces: ["mcp", "cli"],
18466
18877
  toolset: "apps",
18467
18878
  run: forward("app.rollback")
18468
18879
  },
@@ -18475,7 +18886,7 @@ var ACTION_DEFINITIONS = [
18475
18886
  access: exports_external.enum(["space", "public"]).describe("new gateway access"),
18476
18887
  discovery: exports_external.enum(["unlisted", "listed"]).nullable().optional().describe("required concept only for public Apps")
18477
18888
  },
18478
- surfaces: ["cli"],
18889
+ surfaces: ["mcp", "cli"],
18479
18890
  toolset: "apps",
18480
18891
  run: forward("app.set_access")
18481
18892
  },
@@ -18488,16 +18899,16 @@ var ACTION_DEFINITIONS = [
18488
18899
  expectedGeneration: exports_external.number().int().min(0).describe("state generation from app_get"),
18489
18900
  idempotencyKey: exports_external.string().min(1).max(200).describe("stable key for this one deliberate reset")
18490
18901
  },
18491
- surfaces: ["cli"],
18902
+ surfaces: ["mcp", "cli"],
18492
18903
  toolset: "apps",
18493
18904
  run: forward("app.reset_state")
18494
18905
  },
18495
18906
  {
18496
18907
  name: "app_archive",
18497
18908
  title: "Archive an App",
18498
- description: "Remove an App from active serving while retaining its stable identity, deployment timeline, receipts, and durable state for audit/recovery. Archive is lifecycle-only: it neither resets state nor deletes release history.",
18909
+ description: "Remove an App from active serving while retaining its stable identity, deployment timeline, receipts, durable state, and release history for audit and recovery. Archive is a lifecycle-only transition.",
18499
18910
  inputSchema: { appId: exports_external.string().describe("target App, app_…") },
18500
- surfaces: ["cli"],
18911
+ surfaces: ["mcp", "cli"],
18501
18912
  toolset: "apps",
18502
18913
  run: forward("app.archive")
18503
18914
  },
@@ -18542,7 +18953,9 @@ var ACTIONS = ACTION_DEFINITIONS.map((action) => {
18542
18953
  const outputSchema = outputSchemaFor(action.name);
18543
18954
  if (!outputSchema)
18544
18955
  throw new Error(`${action.name}: MCP action is missing an output schema`);
18545
- return { ...action, outputSchema };
18956
+ const annotations = mcpAnnotationsFor(action.name);
18957
+ const description = annotations.readOnlyHint && !action.description.startsWith("READ ONLY") ? `READ ONLY: ${action.description}` : action.description;
18958
+ return { ...action, description, outputSchema, annotations };
18546
18959
  });
18547
18960
 
18548
18961
  // src/config.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lambdacurry/arbor",
3
- "version": "0.13.4",
3
+ "version": "0.13.6",
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",