blun-king-cli 9.1.643 → 9.1.645

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 (268) hide show
  1. package/CHANGELOG.md +19 -123
  2. package/LIESMICH.txt +17 -45
  3. package/README.md +15 -76
  4. package/RELEASE-9.1.645.md +29 -0
  5. package/bin/blun.js +3 -3
  6. package/bin/king.js +3 -3
  7. package/bin/launcher-mode.js +125 -126
  8. package/bin/launcher-runtime.js +603 -616
  9. package/bin/plugin-bootstrap.js +339 -405
  10. package/bin/rename-private-staging.cjs +2 -2
  11. package/bin/retired-bundled-plugins.cjs +84 -0
  12. package/bin/startup-security-host.cjs +105 -0
  13. package/bin/startup-security.cjs +9 -105
  14. package/bin/startup-warning-policy.cjs +22 -0
  15. package/bin/update-lease-installer.cjs +125 -0
  16. package/bin/update-lease-sockets.cjs +228 -0
  17. package/bin/update-lease.js +22 -327
  18. package/bin/verify-bundled-agent-sources.cjs +2 -4
  19. package/blun.mjs +77 -180
  20. package/bundled-agent-sources.json +1 -552
  21. package/package.json +3 -6
  22. package/tool-liveness642/receipt.json +1 -1
  23. package/worker-host.mjs +62 -120
  24. package/agent-spine-plugin/.claude-plugin/marketplace.json +0 -20
  25. package/agent-spine-plugin/.claude-plugin/plugin.json +0 -14
  26. package/agent-spine-plugin/.codex-plugin/plugin.json +0 -47
  27. package/agent-spine-plugin/.mcp.json +0 -8
  28. package/agent-spine-plugin/CHANGELOG.md +0 -1614
  29. package/agent-spine-plugin/LICENSE +0 -186
  30. package/agent-spine-plugin/README.md +0 -432
  31. package/agent-spine-plugin/assets/agentspine-banner.svg +0 -32
  32. package/agent-spine-plugin/bin/agentspine-mcp.js +0 -4
  33. package/agent-spine-plugin/bin/agentspine.js +0 -7
  34. package/agent-spine-plugin/blun.plugin.json +0 -68
  35. package/agent-spine-plugin/docs/acceptance.md +0 -61
  36. package/agent-spine-plugin/docs/artifact-evaluation.md +0 -93
  37. package/agent-spine-plugin/docs/host-integration.md +0 -193
  38. package/agent-spine-plugin/docs/preflight-recall.md +0 -71
  39. package/agent-spine-plugin/docs/preservation-contract.md +0 -53
  40. package/agent-spine-plugin/docs/quality-gates.md +0 -50
  41. package/agent-spine-plugin/docs/session-timeline.md +0 -112
  42. package/agent-spine-plugin/docs/source-roots.md +0 -113
  43. package/agent-spine-plugin/docs/world-model.md +0 -119
  44. package/agent-spine-plugin/hooks/codex.json +0 -47
  45. package/agent-spine-plugin/hooks/hooks.json +0 -106
  46. package/agent-spine-plugin/hooks/version.json +0 -5
  47. package/agent-spine-plugin/package.json +0 -77
  48. package/agent-spine-plugin/scripts/check-codex-install.js +0 -226
  49. package/agent-spine-plugin/scripts/check-hosts.js +0 -208
  50. package/agent-spine-plugin/scripts/check-install-hook.js +0 -227
  51. package/agent-spine-plugin/scripts/check-install-selfstarter.js +0 -154
  52. package/agent-spine-plugin/scripts/check-install.js +0 -478
  53. package/agent-spine-plugin/scripts/check-line-budget.js +0 -58
  54. package/agent-spine-plugin/scripts/check-syntax.js +0 -29
  55. package/agent-spine-plugin/scripts/github-actions.js +0 -11
  56. package/agent-spine-plugin/scripts/hermetic-process.js +0 -191
  57. package/agent-spine-plugin/scripts/release-check.js +0 -150
  58. package/agent-spine-plugin/scripts/run-acceptance.js +0 -19
  59. package/agent-spine-plugin/scripts/run-checks.js +0 -50
  60. package/agent-spine-plugin/scripts/run-tests-hermetic.js +0 -112
  61. package/agent-spine-plugin/skills/agent-spine/SKILL.md +0 -99
  62. package/agent-spine-plugin/spine-example/1-identity.md +0 -12
  63. package/agent-spine-plugin/spine-example/2-voice.md +0 -6
  64. package/agent-spine-plugin/spine-example/3-conduct.md +0 -8
  65. package/agent-spine-plugin/spine-example/4-history.md +0 -4
  66. package/agent-spine-plugin/src/cli-agent.js +0 -315
  67. package/agent-spine-plugin/src/cli-attention.js +0 -95
  68. package/agent-spine-plugin/src/cli-autonomy.js +0 -36
  69. package/agent-spine-plugin/src/cli-common.js +0 -71
  70. package/agent-spine-plugin/src/cli-continuity.js +0 -116
  71. package/agent-spine-plugin/src/cli-core.js +0 -128
  72. package/agent-spine-plugin/src/cli-diagnostics.js +0 -291
  73. package/agent-spine-plugin/src/cli-host.js +0 -21
  74. package/agent-spine-plugin/src/cli-learning.js +0 -320
  75. package/agent-spine-plugin/src/cli-premortem.js +0 -16
  76. package/agent-spine-plugin/src/cli-sharing.js +0 -230
  77. package/agent-spine-plugin/src/cli.js +0 -181
  78. package/agent-spine-plugin/src/codex-reader-launcher.js +0 -182
  79. package/agent-spine-plugin/src/hook.js +0 -500
  80. package/agent-spine-plugin/src/index.js +0 -108
  81. package/agent-spine-plugin/src/lib/acceptance.js +0 -435
  82. package/agent-spine-plugin/src/lib/action-lesson-recall.js +0 -118
  83. package/agent-spine-plugin/src/lib/attention-context.js +0 -167
  84. package/agent-spine-plugin/src/lib/attention-events.js +0 -113
  85. package/agent-spine-plugin/src/lib/attention-privacy.js +0 -72
  86. package/agent-spine-plugin/src/lib/attention-schema.js +0 -164
  87. package/agent-spine-plugin/src/lib/attention-storage.js +0 -93
  88. package/agent-spine-plugin/src/lib/attention.js +0 -164
  89. package/agent-spine-plugin/src/lib/audit-premortem.js +0 -223
  90. package/agent-spine-plugin/src/lib/audit.js +0 -401
  91. package/agent-spine-plugin/src/lib/authentication.js +0 -515
  92. package/agent-spine-plugin/src/lib/autonomy-policy.js +0 -110
  93. package/agent-spine-plugin/src/lib/autonomy-store.js +0 -202
  94. package/agent-spine-plugin/src/lib/autonomy.js +0 -8
  95. package/agent-spine-plugin/src/lib/briefing.js +0 -493
  96. package/agent-spine-plugin/src/lib/catalog-document-read.js +0 -51
  97. package/agent-spine-plugin/src/lib/catalog.js +0 -167
  98. package/agent-spine-plugin/src/lib/channel-continuity.js +0 -19
  99. package/agent-spine-plugin/src/lib/channel-runtime.js +0 -665
  100. package/agent-spine-plugin/src/lib/codex-installation.js +0 -231
  101. package/agent-spine-plugin/src/lib/codex-skill-installation.js +0 -211
  102. package/agent-spine-plugin/src/lib/context.js +0 -156
  103. package/agent-spine-plugin/src/lib/continuity.js +0 -338
  104. package/agent-spine-plugin/src/lib/coordination.js +0 -577
  105. package/agent-spine-plugin/src/lib/delivery-agent-usage.js +0 -231
  106. package/agent-spine-plugin/src/lib/delivery-assignment.js +0 -220
  107. package/agent-spine-plugin/src/lib/delivery-command-actions.js +0 -462
  108. package/agent-spine-plugin/src/lib/delivery-knowledge.js +0 -78
  109. package/agent-spine-plugin/src/lib/delivery-premortem-binding.js +0 -107
  110. package/agent-spine-plugin/src/lib/delivery-premortem-closure.js +0 -171
  111. package/agent-spine-plugin/src/lib/delivery-premortem-codec.js +0 -45
  112. package/agent-spine-plugin/src/lib/delivery-premortem-correction.js +0 -101
  113. package/agent-spine-plugin/src/lib/delivery-premortem-file.js +0 -21
  114. package/agent-spine-plugin/src/lib/delivery-premortem-index.js +0 -493
  115. package/agent-spine-plugin/src/lib/delivery-premortem-inspection.js +0 -37
  116. package/agent-spine-plugin/src/lib/delivery-premortem-recovery.js +0 -120
  117. package/agent-spine-plugin/src/lib/delivery-premortem-rejection.js +0 -65
  118. package/agent-spine-plugin/src/lib/delivery-premortem-results.js +0 -28
  119. package/agent-spine-plugin/src/lib/delivery-premortem-session-guard.js +0 -46
  120. package/agent-spine-plugin/src/lib/delivery-premortem-write-ledger.js +0 -285
  121. package/agent-spine-plugin/src/lib/delivery-premortem.js +0 -499
  122. package/agent-spine-plugin/src/lib/delivery-shell-heredoc.js +0 -115
  123. package/agent-spine-plugin/src/lib/delivery-shell-substitutions.js +0 -111
  124. package/agent-spine-plugin/src/lib/delivery-shell-wrapper.js +0 -64
  125. package/agent-spine-plugin/src/lib/delivery-target.js +0 -73
  126. package/agent-spine-plugin/src/lib/delivery-verification.js +0 -445
  127. package/agent-spine-plugin/src/lib/documents.js +0 -239
  128. package/agent-spine-plugin/src/lib/feed-transport.js +0 -499
  129. package/agent-spine-plugin/src/lib/filesystem-retry.js +0 -34
  130. package/agent-spine-plugin/src/lib/gateway-common.js +0 -68
  131. package/agent-spine-plugin/src/lib/gateway-control.js +0 -370
  132. package/agent-spine-plugin/src/lib/gateway-delivery.js +0 -103
  133. package/agent-spine-plugin/src/lib/gateway-execution.js +0 -350
  134. package/agent-spine-plugin/src/lib/gateway-group-response.js +0 -128
  135. package/agent-spine-plugin/src/lib/gateway-host-fencing.js +0 -92
  136. package/agent-spine-plugin/src/lib/gateway-host-lifecycle.js +0 -193
  137. package/agent-spine-plugin/src/lib/gateway-inspection.js +0 -85
  138. package/agent-spine-plugin/src/lib/gateway-knowledge.js +0 -129
  139. package/agent-spine-plugin/src/lib/gateway-policy-provenance.js +0 -197
  140. package/agent-spine-plugin/src/lib/gateway-premortem-disposition.js +0 -82
  141. package/agent-spine-plugin/src/lib/gateway-premortem.js +0 -363
  142. package/agent-spine-plugin/src/lib/gateway-prepared-host.js +0 -28
  143. package/agent-spine-plugin/src/lib/gateway-runs.js +0 -345
  144. package/agent-spine-plugin/src/lib/gateway-runtime-identity.js +0 -31
  145. package/agent-spine-plugin/src/lib/gateway-runtime-records.js +0 -21
  146. package/agent-spine-plugin/src/lib/gateway-runtime.js +0 -18
  147. package/agent-spine-plugin/src/lib/gateway-state-transaction.js +0 -356
  148. package/agent-spine-plugin/src/lib/gateway-state.js +0 -344
  149. package/agent-spine-plugin/src/lib/graph.js +0 -337
  150. package/agent-spine-plugin/src/lib/hook-artifact-guards.js +0 -356
  151. package/agent-spine-plugin/src/lib/hook-audit.js +0 -43
  152. package/agent-spine-plugin/src/lib/hook-briefing-use.js +0 -78
  153. package/agent-spine-plugin/src/lib/hook-context.js +0 -441
  154. package/agent-spine-plugin/src/lib/hook-final-message.js +0 -26
  155. package/agent-spine-plugin/src/lib/hook-input.js +0 -27
  156. package/agent-spine-plugin/src/lib/hook-output.js +0 -284
  157. package/agent-spine-plugin/src/lib/hook-premortem.js +0 -257
  158. package/agent-spine-plugin/src/lib/hook-process-advisory.js +0 -36
  159. package/agent-spine-plugin/src/lib/hook-protection.js +0 -95
  160. package/agent-spine-plugin/src/lib/hook-stop-verification.js +0 -84
  161. package/agent-spine-plugin/src/lib/hook-timeline.js +0 -102
  162. package/agent-spine-plugin/src/lib/host-instruction-budget.js +0 -11
  163. package/agent-spine-plugin/src/lib/https-transport.js +0 -392
  164. package/agent-spine-plugin/src/lib/identifier-analysis.js +0 -446
  165. package/agent-spine-plugin/src/lib/indexed-memory-offline.js +0 -40
  166. package/agent-spine-plugin/src/lib/indexed-memory.js +0 -298
  167. package/agent-spine-plugin/src/lib/knowledge-evidence.js +0 -431
  168. package/agent-spine-plugin/src/lib/learning-applications.js +0 -441
  169. package/agent-spine-plugin/src/lib/learning-artifact-evaluator.js +0 -114
  170. package/agent-spine-plugin/src/lib/learning-candidates.js +0 -274
  171. package/agent-spine-plugin/src/lib/learning-context.js +0 -137
  172. package/agent-spine-plugin/src/lib/learning-delivery-contracts.js +0 -310
  173. package/agent-spine-plugin/src/lib/learning-evaluation-contracts.js +0 -350
  174. package/agent-spine-plugin/src/lib/learning-evaluation-registration.js +0 -372
  175. package/agent-spine-plugin/src/lib/learning-evaluation-revocation.js +0 -292
  176. package/agent-spine-plugin/src/lib/learning-evidence-contracts.js +0 -321
  177. package/agent-spine-plugin/src/lib/learning-findings.js +0 -458
  178. package/agent-spine-plugin/src/lib/learning-measurement-contracts.js +0 -285
  179. package/agent-spine-plugin/src/lib/learning-measurements.js +0 -265
  180. package/agent-spine-plugin/src/lib/learning-outcome-contracts.js +0 -165
  181. package/agent-spine-plugin/src/lib/learning-outcomes.js +0 -343
  182. package/agent-spine-plugin/src/lib/learning-reconciliation.js +0 -290
  183. package/agent-spine-plugin/src/lib/learning-retry-contracts.js +0 -188
  184. package/agent-spine-plugin/src/lib/learning-schema.js +0 -229
  185. package/agent-spine-plugin/src/lib/learning-scope-targets.js +0 -424
  186. package/agent-spine-plugin/src/lib/learning-state-upgrade.js +0 -477
  187. package/agent-spine-plugin/src/lib/learning-status-configuration.js +0 -476
  188. package/agent-spine-plugin/src/lib/learning-storage.js +0 -203
  189. package/agent-spine-plugin/src/lib/learning-trial-recovery.js +0 -218
  190. package/agent-spine-plugin/src/lib/learning-validation-contracts.js +0 -375
  191. package/agent-spine-plugin/src/lib/learning-validation-renewal.js +0 -298
  192. package/agent-spine-plugin/src/lib/learning-validation-runtime.js +0 -234
  193. package/agent-spine-plugin/src/lib/learning.js +0 -36
  194. package/agent-spine-plugin/src/lib/lesson-recall-session.js +0 -172
  195. package/agent-spine-plugin/src/lib/mcp-autonomy-tools.js +0 -37
  196. package/agent-spine-plugin/src/lib/mcp-delivery-completion.js +0 -124
  197. package/agent-spine-plugin/src/lib/mcp-delivery-tools.js +0 -45
  198. package/agent-spine-plugin/src/lib/mcp-premortem.js +0 -68
  199. package/agent-spine-plugin/src/lib/mcp-runtime.js +0 -355
  200. package/agent-spine-plugin/src/lib/mcp-source-context.js +0 -61
  201. package/agent-spine-plugin/src/lib/mcp-timeline-tools.js +0 -240
  202. package/agent-spine-plugin/src/lib/mcp-world-tools.js +0 -52
  203. package/agent-spine-plugin/src/lib/object-transport.js +0 -206
  204. package/agent-spine-plugin/src/lib/owned-file-lock.js +0 -182
  205. package/agent-spine-plugin/src/lib/paths.js +0 -109
  206. package/agent-spine-plugin/src/lib/peer-transport.js +0 -283
  207. package/agent-spine-plugin/src/lib/persona-runtime.js +0 -581
  208. package/agent-spine-plugin/src/lib/pre-answer-timeline-recall.js +0 -104
  209. package/agent-spine-plugin/src/lib/preflight-delivery-id.js +0 -27
  210. package/agent-spine-plugin/src/lib/preflight.js +0 -688
  211. package/agent-spine-plugin/src/lib/project-portfolio.js +0 -176
  212. package/agent-spine-plugin/src/lib/runtime.js +0 -13
  213. package/agent-spine-plugin/src/lib/selfstarter-core.js +0 -382
  214. package/agent-spine-plugin/src/lib/selfstarter-jobs.js +0 -149
  215. package/agent-spine-plugin/src/lib/selfstarter-lease.js +0 -204
  216. package/agent-spine-plugin/src/lib/selfstarter-policy.js +0 -90
  217. package/agent-spine-plugin/src/lib/selfstarter-workspace.js +0 -111
  218. package/agent-spine-plugin/src/lib/selfstarter.js +0 -11
  219. package/agent-spine-plugin/src/lib/session-timeline-auth.js +0 -316
  220. package/agent-spine-plugin/src/lib/session-timeline-codex.js +0 -69
  221. package/agent-spine-plugin/src/lib/session-timeline-contract.js +0 -56
  222. package/agent-spine-plugin/src/lib/session-timeline-enrollment-source.js +0 -38
  223. package/agent-spine-plugin/src/lib/session-timeline-enrollment-storage.js +0 -128
  224. package/agent-spine-plugin/src/lib/session-timeline-enrollment-transport.js +0 -15
  225. package/agent-spine-plugin/src/lib/session-timeline-enrollment.js +0 -478
  226. package/agent-spine-plugin/src/lib/session-timeline-event-extract.js +0 -186
  227. package/agent-spine-plugin/src/lib/session-timeline-host-origin.js +0 -73
  228. package/agent-spine-plugin/src/lib/session-timeline-host-receipt.js +0 -117
  229. package/agent-spine-plugin/src/lib/session-timeline-invocation.js +0 -201
  230. package/agent-spine-plugin/src/lib/session-timeline-king.js +0 -93
  231. package/agent-spine-plugin/src/lib/session-timeline-prior.js +0 -57
  232. package/agent-spine-plugin/src/lib/session-timeline-provider.js +0 -36
  233. package/agent-spine-plugin/src/lib/session-timeline-query.js +0 -56
  234. package/agent-spine-plugin/src/lib/session-timeline-results.js +0 -56
  235. package/agent-spine-plugin/src/lib/session-timeline-root.js +0 -11
  236. package/agent-spine-plugin/src/lib/session-timeline-search.js +0 -82
  237. package/agent-spine-plugin/src/lib/session-timeline-sid-acl.js +0 -213
  238. package/agent-spine-plugin/src/lib/session-timeline-source-open.js +0 -30
  239. package/agent-spine-plugin/src/lib/session-timeline-source.js +0 -80
  240. package/agent-spine-plugin/src/lib/session-timeline-state.js +0 -45
  241. package/agent-spine-plugin/src/lib/session-timeline-transport.js +0 -42
  242. package/agent-spine-plugin/src/lib/session-timeline-windows-acl.js +0 -145
  243. package/agent-spine-plugin/src/lib/session-timeline.js +0 -462
  244. package/agent-spine-plugin/src/lib/sharing.js +0 -969
  245. package/agent-spine-plugin/src/lib/source-roots.js +0 -475
  246. package/agent-spine-plugin/src/lib/source-tree-scan.js +0 -178
  247. package/agent-spine-plugin/src/lib/sqlite-transport.js +0 -501
  248. package/agent-spine-plugin/src/lib/task-knowledge-context.js +0 -99
  249. package/agent-spine-plugin/src/lib/telegram-adapter.js +0 -119
  250. package/agent-spine-plugin/src/lib/timeline-continuation-update.js +0 -100
  251. package/agent-spine-plugin/src/lib/timeline-tool-guard.js +0 -225
  252. package/agent-spine-plugin/src/lib/timeline-user-feedback.js +0 -216
  253. package/agent-spine-plugin/src/lib/timeline-world-capture.js +0 -233
  254. package/agent-spine-plugin/src/lib/voice-runtime.js +0 -39
  255. package/agent-spine-plugin/src/lib/world-knowledge.js +0 -306
  256. package/agent-spine-plugin/src/lib/world-model.js +0 -333
  257. package/agent-spine-plugin/src/mcp.js +0 -456
  258. package/agent-spine-plugin/src/version.js +0 -1
  259. package/agent-spine-plugin/src/worker.js +0 -257
  260. package/bin/agentspine-king-goal-inbox.mjs +0 -127
  261. package/bin/agentspine-king-goal-intake.mjs +0 -106
  262. package/bin/agentspine-king-host-runner.mjs +0 -109
  263. package/bin/agentspine-king-snapshot-policy.cjs +0 -80
  264. package/bin/agentspine-king-status-policy.mjs +0 -226
  265. package/bin/agentspine-king-worker-host.mjs +0 -160
  266. package/bin/managed-plugin-selection.cjs +0 -141
  267. package/bin/verify-agent-behavior.cjs +0 -122
  268. package/bin/verify-agent-components.cjs +0 -104
@@ -1,456 +0,0 @@
1
- import { VERSION } from "./version.js";
2
- import { isMainModule } from "./lib/runtime.js";
3
- import { deliveryPremortemRecoveryTool, deliveryPremortemTool } from "./lib/mcp-premortem.js";
4
- import { deliveryKnowledgeTool, sessionBriefingTool } from "./lib/mcp-delivery-tools.js";
5
- import { worldModelTools } from "./lib/mcp-world-tools.js";
6
- import { sessionTimelineTools } from "./lib/mcp-timeline-tools.js";
7
- import { startMcpProtocol } from "./lib/mcp-runtime.js";
8
- import { deliveryCompletionTool } from "./lib/mcp-delivery-completion.js";
9
- import { autonomyTools } from "./lib/mcp-autonomy-tools.js";
10
-
11
- const tools = [
12
- {
13
- name: "scan",
14
- description: "Discover and fingerprint Markdown identity, rules, memory, soul, and reference files without modifying them.",
15
- inputSchema: { type: "object", properties: { root: { type: "string" } } }
16
- },
17
- {
18
- name: "resolve_context",
19
- description: "Resolve the relevant constitution, soul, memory index, and linked facts for a host and working directory.",
20
- inputSchema: {
21
- type: "object",
22
- properties: {
23
- root: { type: "string" }, cwd: { type: "string" },
24
- host: { type: "string", enum: ["codex", "claude", "generic"] },
25
- maxBytes: { type: "integer", minimum: 0 }, includeContent: { type: "boolean" }
26
- }
27
- }
28
- },
29
- sessionBriefingTool,
30
- deliveryKnowledgeTool,
31
- ...worldModelTools,
32
- ...sessionTimelineTools,
33
- ...autonomyTools,
34
- {
35
- name: "read_document",
36
- description: "Read a bounded host-indexed Markdown source byte range with verified SHA-256 provenance; no broad home scan.",
37
- inputSchema: {
38
- type: "object", required: ["path"],
39
- properties: {
40
- root: { type: "string" }, path: { type: "string" },
41
- host: { type: "string", enum: ["codex", "claude", "generic"] },
42
- offset: { type: "integer", minimum: 0 }, length: { type: "integer", minimum: 1, maximum: 1048576 }
43
- }
44
- }
45
- },
46
- {
47
- name: "verify",
48
- description: "Compare current Markdown files with the last saved catalog and report additions, removals, or byte changes.",
49
- inputSchema: { type: "object", properties: { root: { type: "string" } } }
50
- },
51
- {
52
- name: "link_documents",
53
- description: "Record an agent-inferred relationship between two indexed documents in the external context graph. This never edits either document and never grants authority.",
54
- inputSchema: {
55
- type: "object", required: ["from", "to", "relation"],
56
- properties: {
57
- root: { type: "string" }, from: { type: "string" }, to: { type: "string" },
58
- relation: { type: "string", enum: ["loads", "belongs-to", "explains", "supports", "related", "contradicts", "supersedes-in-relevance"] },
59
- reason: { type: "string" }, confidence: { type: "number", minimum: 0, maximum: 1 }
60
- }
61
- }
62
- },
63
- {
64
- name: "annotate_document",
65
- description: "Store the agent's semantic classification of an indexed document as a reversible overlay annotation, never as a source rewrite.",
66
- inputSchema: {
67
- type: "object", required: ["path", "layer"],
68
- properties: {
69
- root: { type: "string" }, path: { type: "string" },
70
- layer: { type: "string", enum: ["soul", "memory-index", "memory-fact", "reference", "project-reference", "identity", "voice", "conduct", "history"] },
71
- reason: { type: "string" }, confidence: { type: "number", minimum: 0, maximum: 1 }
72
- }
73
- }
74
- },
75
- {
76
- name: "upsert_entity",
77
- description: "Create or update a person, agent, group, channel, or project in the local relationship graph. Authority fields are rejected.",
78
- inputSchema: {
79
- type: "object", required: ["id", "kind"],
80
- properties: {
81
- root: { type: "string" }, id: { type: "string" },
82
- kind: { type: "string", enum: ["person", "agent", "group", "channel", "project"] },
83
- displayName: { type: "string" }, aliases: { type: "array", items: { type: "string" } },
84
- attributes: { type: "object" }, sourceDocument: { anyOf: [{ type: "string" }, { type: "null" }] },
85
- confidence: { type: "number", minimum: 0, maximum: 1 },
86
- privacy: { type: "string", enum: ["private", "shared", "group"] }
87
- }
88
- }
89
- },
90
- {
91
- name: "link_entities",
92
- description: "Record a contextual relationship between known entities. Relationships never grant permissions or delegation authority.",
93
- inputSchema: {
94
- type: "object", required: ["from", "to", "relation"],
95
- properties: {
96
- root: { type: "string" }, from: { type: "string" }, to: { type: "string" },
97
- relation: { type: "string", enum: ["knows", "works-with", "member-of", "communicates-via", "responsible-for", "reports-to", "related"] },
98
- reason: { type: "string" }, confidence: { type: "number", minimum: 0, maximum: 1 },
99
- privacy: { type: "string", enum: ["private", "shared", "group"] }
100
- }
101
- }
102
- },
103
- {
104
- name: "relationship_context",
105
- description: "Return the privacy-filtered local relationship neighborhood for one entity. Private data is excluded unless explicitly requested.",
106
- inputSchema: {
107
- type: "object", required: ["entityId"],
108
- properties: {
109
- root: { type: "string" }, entityId: { type: "string" }, includePrivate: { type: "boolean" },
110
- groupId: { anyOf: [{ type: "string" }, { type: "null" }] }
111
- }
112
- }
113
- },
114
- {
115
- name: "upsert_attention",
116
- description: "Create or update a local attention cue for an unanswered question, promise, check-in, or meaningful change. Cues are context-only and never send messages.",
117
- inputSchema: {
118
- type: "object", required: ["kind", "summary"],
119
- properties: {
120
- root: { type: "string" }, id: { type: "string" },
121
- kind: { type: "string", enum: ["unanswered-question", "promise", "check-in", "meaningful-change"] },
122
- summary: { type: "string", maxLength: 500 }, entityId: { anyOf: [{ type: "string" }, { type: "null" }] },
123
- dueAt: { anyOf: [{ type: "string" }, { type: "null" }] }, priority: { type: "number", minimum: 0, maximum: 100 },
124
- privacy: { type: "string", enum: ["private", "shared", "group"] },
125
- groupId: { anyOf: [{ type: "string" }, { type: "null" }] },
126
- sourceDocument: { anyOf: [{ type: "string" }, { type: "null" }] },
127
- confidence: { type: "number", minimum: 0, maximum: 1 }
128
- }
129
- }
130
- },
131
- {
132
- name: "record_activity",
133
- description: "Record a minimal interaction timestamp for a known entity so check-in suggestions reflect recent contact without storing conversation content.",
134
- inputSchema: {
135
- type: "object", required: ["entityId"],
136
- properties: {
137
- root: { type: "string" }, entityId: { type: "string" },
138
- kind: { type: "string", enum: ["message", "interaction", "task", "check-in"] },
139
- at: { type: "string" }, privacy: { type: "string", enum: ["private", "shared", "group"] },
140
- groupId: { anyOf: [{ type: "string" }, { type: "null" }] }
141
- }
142
- }
143
- },
144
- {
145
- name: "attention_context",
146
- description: "Return a sparse, privacy-filtered list of due attention suggestions. Focus mode, quiet hours, and presentation throttling can suppress all output.",
147
- inputSchema: {
148
- type: "object",
149
- properties: {
150
- root: { type: "string" }, includePrivate: { type: "boolean" }, focusActive: { type: "boolean" },
151
- markPresented: { type: "boolean" }, maxItems: { type: "integer", minimum: 0, maximum: 20 },
152
- entityId: { anyOf: [{ type: "string" }, { type: "null" }] },
153
- groupId: { anyOf: [{ type: "string" }, { type: "null" }] },
154
- projectId: { anyOf: [{ type: "string" }, { type: "null" }] },
155
- currentTaskId: { anyOf: [{ type: "string" }, { type: "null" }] }, now: { type: "string" }
156
- }
157
- }
158
- },
159
- {
160
- name: "resolve_attention",
161
- description: "Mark an attention cue open, completed, or dismissed while retaining its previous state in private history.",
162
- inputSchema: {
163
- type: "object", required: ["id"],
164
- properties: {
165
- root: { type: "string" }, id: { type: "string" },
166
- status: { type: "string", enum: ["open", "completed", "dismissed"] }
167
- }
168
- }
169
- },
170
- {
171
- name: "configure_attention",
172
- description: "Configure local attention limits, silence threshold, quiet hours, or the global on/off switch.",
173
- inputSchema: {
174
- type: "object", required: ["config"],
175
- properties: {
176
- root: { type: "string" },
177
- config: {
178
- type: "object", additionalProperties: false,
179
- properties: {
180
- enabled: { type: "boolean" }, minIntervalHours: { type: "number", minimum: 1, maximum: 720 },
181
- entitySilenceDays: { type: "number", minimum: 1, maximum: 3650 },
182
- heartbeatStaleMinutes: { type: "integer", minimum: 1, maximum: 10080 },
183
- maxItems: { type: "integer", minimum: 1, maximum: 20 },
184
- quietHours: {
185
- anyOf: [
186
- { type: "null" },
187
- {
188
- type: "object", required: ["start", "end"], additionalProperties: false,
189
- properties: {
190
- start: { type: "integer", minimum: 0, maximum: 23 }, end: { type: "integer", minimum: 0, maximum: 23 },
191
- utcOffsetMinutes: { type: "integer", minimum: -720, maximum: 840 }
192
- }
193
- }
194
- ]
195
- }
196
- }
197
- }
198
- }
199
- }
200
- },
201
- {
202
- name: "delete_attention",
203
- description: "Permanently delete one cue, one lifecycle event, or all attention data for one entity, including retained history, receipts, and presentation timestamps.",
204
- inputSchema: {
205
- type: "object",
206
- properties: {
207
- root: { type: "string" }, signalId: { type: "string" }, eventId: { type: "string" }, entityId: { type: "string" }
208
- },
209
- oneOf: [{ required: ["signalId"] }, { required: ["eventId"] }, { required: ["entityId"] }]
210
- }
211
- },
212
- {
213
- name: "propose_learning",
214
- description: "Create an evidence-backed learning candidate in external state. Candidates are invisible to learned context until explicitly accepted or safely auto-promoted.",
215
- inputSchema: {
216
- type: "object", required: ["kind", "claim", "evidence"],
217
- properties: {
218
- root: { type: "string" }, id: { type: "string" },
219
- kind: { type: "string", enum: ["preference", "no-go", "goal", "correction", "personal-fact", "project-fact", "reference", "behavior"] },
220
- claim: { type: "string", maxLength: 1000 }, subjectId: { anyOf: [{ type: "string" }, { type: "null" }] },
221
- privacy: { type: "string", enum: ["private", "shared", "group"] },
222
- groupId: { anyOf: [{ type: "string" }, { type: "null" }] },
223
- scope: {
224
- type: "object", additionalProperties: false,
225
- properties: {
226
- personaId: { anyOf: [{ type: "string" }, { type: "null" }] }, userId: { anyOf: [{ type: "string" }, { type: "null" }] },
227
- tenantId: { anyOf: [{ type: "string" }, { type: "null" }] }, projectId: { anyOf: [{ type: "string" }, { type: "null" }] },
228
- groupId: { anyOf: [{ type: "string" }, { type: "null" }] }, taskId: { anyOf: [{ type: "string" }, { type: "null" }] }
229
- }
230
- },
231
- supersedesId: { anyOf: [{ type: "string" }, { type: "null" }] },
232
- evidence: { "$ref": "#/$defs/evidence" }
233
- },
234
- "$defs": {
235
- evidence: {
236
- type: "object", required: ["summary"], additionalProperties: false,
237
- properties: {
238
- id: { type: "string" }, type: { type: "string", enum: ["user-statement", "document", "interaction", "test"] },
239
- summary: { type: "string", maxLength: 500 }, sourceDocument: { anyOf: [{ type: "string" }, { type: "null" }] },
240
- confidence: { type: "number", minimum: 0, maximum: 1 }, observedAt: { type: "string" }
241
- }
242
- }
243
- }
244
- }
245
- },
246
- {
247
- name: "add_learning_evidence",
248
- description: "Append distinct evidence to an unreviewed learning candidate while retaining the previous candidate version in history.",
249
- inputSchema: {
250
- type: "object", required: ["id", "evidence"],
251
- properties: {
252
- root: { type: "string" }, id: { type: "string" },
253
- evidence: {
254
- type: "object", required: ["summary"], additionalProperties: false,
255
- properties: {
256
- id: { type: "string" }, type: { type: "string", enum: ["user-statement", "document", "interaction", "test"] },
257
- summary: { type: "string", maxLength: 500 }, sourceDocument: { anyOf: [{ type: "string" }, { type: "null" }] },
258
- confidence: { type: "number", minimum: 0, maximum: 1 }, observedAt: { type: "string" }
259
- }
260
- }
261
- }
262
- }
263
- },
264
- {
265
- name: "review_learning",
266
- description: "Accept or reject one candidate. Acceptance requires an explicit user-confirmation marker and never grants authority.",
267
- inputSchema: {
268
- type: "object", required: ["id", "decision", "reason"],
269
- properties: {
270
- root: { type: "string" }, id: { type: "string" },
271
- decision: { type: "string", enum: ["accept", "reject"] }, reason: { type: "string", maxLength: 500 },
272
- confirmedByUser: { type: "boolean" }
273
- }
274
- }
275
- },
276
- {
277
- name: "learning_context",
278
- description: "Return accepted learning only, filtered by privacy, exact group audience, kind, subject, and context limit.",
279
- inputSchema: {
280
- type: "object",
281
- properties: {
282
- root: { type: "string" }, includePrivate: { type: "boolean" },
283
- groupId: { anyOf: [{ type: "string" }, { type: "null" }] },
284
- scope: {
285
- type: "object", additionalProperties: false,
286
- properties: {
287
- personaId: { anyOf: [{ type: "string" }, { type: "null" }] }, userId: { anyOf: [{ type: "string" }, { type: "null" }] },
288
- tenantId: { anyOf: [{ type: "string" }, { type: "null" }] }, projectId: { anyOf: [{ type: "string" }, { type: "null" }] },
289
- groupId: { anyOf: [{ type: "string" }, { type: "null" }] }, taskId: { anyOf: [{ type: "string" }, { type: "null" }] }
290
- }
291
- },
292
- kinds: { type: "array", items: { type: "string", enum: ["preference", "no-go", "goal", "correction", "personal-fact", "project-fact", "reference", "behavior"] } },
293
- subjectIds: { type: "array", items: { type: "string" } }, maxItems: { type: "integer", minimum: 0, maximum: 50 }
294
- }
295
- }
296
- },
297
- {
298
- name: "learning_outcome_status",
299
- description: "Read outcome receipt counts, contradiction state, and canary health for learned context. This read-only view is context-only and cannot record evidence, promote learning, or grant authority.",
300
- inputSchema: {
301
- type: "object",
302
- properties: {
303
- root: { type: "string" },
304
- scope: {
305
- type: "object", additionalProperties: false,
306
- properties: {
307
- personaId: { anyOf: [{ type: "string" }, { type: "null" }] },
308
- userId: { anyOf: [{ type: "string" }, { type: "null" }] },
309
- tenantId: { anyOf: [{ type: "string" }, { type: "null" }] },
310
- projectId: { anyOf: [{ type: "string" }, { type: "null" }] },
311
- groupId: { anyOf: [{ type: "string" }, { type: "null" }] },
312
- taskId: { anyOf: [{ type: "string" }, { type: "null" }] }
313
- }
314
- }
315
- }
316
- }
317
- },
318
- {
319
- name: "evaluate_learning",
320
- description: "Evaluate pending candidates against the opt-in low-risk auto-promotion policy. Auto-promotion is disabled by default and limited to project facts and references.",
321
- inputSchema: { type: "object", properties: { root: { type: "string" } } }
322
- },
323
- {
324
- name: "rollback_learning",
325
- description: "Roll back an accepted learning and restore the accepted fact it superseded, without deleting history.",
326
- inputSchema: {
327
- type: "object", required: ["id", "reason"],
328
- properties: { root: { type: "string" }, id: { type: "string" }, reason: { type: "string", maxLength: 500 } }
329
- }
330
- },
331
- {
332
- name: "configure_learning",
333
- description: "Configure the local learning context limit and the default-off, low-risk auto-promotion evidence thresholds.",
334
- inputSchema: {
335
- type: "object", required: ["config"],
336
- properties: {
337
- root: { type: "string" },
338
- config: {
339
- type: "object", additionalProperties: false,
340
- properties: {
341
- autoPromote: { type: "boolean" }, minConfidence: { type: "number", minimum: 0.5, maximum: 1 },
342
- minEvidence: { type: "integer", minimum: 1, maximum: 10 }, maxContextItems: { type: "integer", minimum: 1, maximum: 50 },
343
- minOutcomeReceipts: { type: "integer", minimum: 2, maximum: 10 },
344
- minImprovement: { type: "number", minimum: 0, maximum: 1 },
345
- regressionTolerance: { type: "number", minimum: 0, maximum: 1 },
346
- outcomeMaxAgeDays: { type: "integer", minimum: 1, maximum: 365 },
347
- canaryReceipts: { type: "integer", minimum: 1, maximum: 10 },
348
- canaryTtlDays: { type: "integer", minimum: 1, maximum: 90 }
349
- }
350
- }
351
- }
352
- }
353
- },
354
- {
355
- name: "delete_learning",
356
- description: "Permanently delete one candidate and its retained learning history. Superseding active facts must be rolled back first.",
357
- inputSchema: {
358
- type: "object", required: ["id"],
359
- properties: { root: { type: "string" }, id: { type: "string" } }
360
- }
361
- },
362
- {
363
- name: "check_delegation",
364
- description: "Check the dedicated default-deny local policy before coordinating work for another person or agent. Relationships, memory, learning, and Markdown never affect this decision or grant host permissions.",
365
- inputSchema: {
366
- type: "object", required: ["actorId", "action"], additionalProperties: false,
367
- properties: {
368
- root: { type: "string" }, actorId: { type: "string" },
369
- action: { type: "string", enum: ["assign", "reassign", "manage", "complete", "cancel"] },
370
- targetId: { anyOf: [{ type: "string" }, { type: "null" }] }
371
- }
372
- }
373
- },
374
- {
375
- name: "create_task",
376
- description: "Create a context-only task, open thread, or handoff. Cross-entity assignment fails closed unless a separate explicit local delegation policy allows it.",
377
- inputSchema: {
378
- type: "object", required: ["actorId", "title"], additionalProperties: false,
379
- properties: {
380
- root: { type: "string" }, id: { type: "string" }, actorId: { type: "string" },
381
- assigneeId: { anyOf: [{ type: "string" }, { type: "null" }] },
382
- kind: { type: "string", enum: ["task", "open-thread", "handoff"] },
383
- title: { type: "string", maxLength: 200 }, summary: { anyOf: [{ type: "string", maxLength: 1000 }, { type: "null" }] },
384
- projectId: { anyOf: [{ type: "string" }, { type: "null" }] },
385
- privacy: { type: "string", enum: ["private", "shared", "group"] },
386
- groupId: { anyOf: [{ type: "string" }, { type: "null" }] },
387
- priority: { type: "number", minimum: 0, maximum: 100 },
388
- dueAt: { anyOf: [{ type: "string" }, { type: "null" }] }
389
- }
390
- }
391
- },
392
- {
393
- name: "update_task",
394
- description: "Update a coordination task with append-only prior history. Reassignment and third-party management are checked against the separate default-deny policy.",
395
- inputSchema: {
396
- type: "object", required: ["id", "actorId", "patch"], additionalProperties: false,
397
- properties: {
398
- root: { type: "string" }, id: { type: "string" }, actorId: { type: "string" },
399
- patch: {
400
- type: "object", minProperties: 1, additionalProperties: false,
401
- properties: {
402
- status: { type: "string", enum: ["open", "in-progress", "blocked", "completed", "cancelled"] },
403
- assigneeId: { anyOf: [{ type: "string" }, { type: "null" }] },
404
- title: { type: "string", maxLength: 200 }, summary: { anyOf: [{ type: "string", maxLength: 1000 }, { type: "null" }] },
405
- priority: { type: "number", minimum: 0, maximum: 100 }, dueAt: { anyOf: [{ type: "string" }, { type: "null" }] },
406
- note: { anyOf: [{ type: "string", maxLength: 1000 }, { type: "null" }] }
407
- }
408
- }
409
- }
410
- }
411
- },
412
- {
413
- name: "task_context",
414
- description: "Return privacy-filtered coordination context without delegation snapshots. Tasks describe work only and never grant host, tool, file, network, production, or spending rights.",
415
- inputSchema: {
416
- type: "object", additionalProperties: false,
417
- properties: {
418
- root: { type: "string" }, includePrivate: { type: "boolean" },
419
- groupId: { anyOf: [{ type: "string" }, { type: "null" }] },
420
- actorId: { anyOf: [{ type: "string" }, { type: "null" }] },
421
- assigneeId: { anyOf: [{ type: "string" }, { type: "null" }] },
422
- projectId: { anyOf: [{ type: "string" }, { type: "null" }] }, includeClosed: { type: "boolean" },
423
- maxItems: { type: "integer", minimum: 0, maximum: 100 }
424
- }
425
- }
426
- },
427
- {
428
- name: "shared_context",
429
- description: "Return locally reviewed, privacy-filtered shared memory. This tool cannot connect adapters, import, publish, review, or grant authority.",
430
- inputSchema: {
431
- type: "object", additionalProperties: false,
432
- properties: {
433
- root: { type: "string" }, scopeId: { anyOf: [{ type: "string" }, { type: "null" }] },
434
- groupId: { anyOf: [{ type: "string" }, { type: "null" }] }, includePrivate: { type: "boolean" },
435
- kinds: { type: "array", items: { type: "string", enum: ["preference", "no-go", "goal", "correction", "personal-fact", "project-fact", "reference"] } },
436
- subjectIds: { type: "array", items: { type: "string" } }, maxItems: { type: "integer", minimum: 0, maximum: 50 }
437
- }
438
- }
439
- },
440
- {
441
- name: "audit",
442
- description: "Run AgentSpine's ten deterministic quality gates for discovery, hierarchy, links, authority, privacy, budget, and source preservation.",
443
- inputSchema: { type: "object", properties: { root: { type: "string" } } }
444
- },
445
- deliveryPremortemTool,
446
- deliveryCompletionTool,
447
- deliveryPremortemRecoveryTool
448
- ];
449
-
450
- export function startMcpServer(input = process.stdin, output = process.stdout, { environment = process.env } = {}) {
451
- return startMcpProtocol({ input, output, tools, version: VERSION, environment });
452
- }
453
-
454
- if (isMainModule(import.meta.url)) {
455
- startMcpServer();
456
- }
@@ -1 +0,0 @@
1
- export const VERSION = "0.73.0";