blun-king-cli 9.1.643 → 9.1.644

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 (266) hide show
  1. package/LIESMICH.txt +18 -0
  2. package/README.md +20 -6
  3. package/bin/blun.js +3 -3
  4. package/bin/king.js +3 -3
  5. package/bin/launcher-mode.js +125 -126
  6. package/bin/launcher-runtime.js +603 -616
  7. package/bin/plugin-bootstrap.js +339 -405
  8. package/bin/rename-private-staging.cjs +2 -2
  9. package/bin/retired-bundled-plugins.cjs +84 -0
  10. package/bin/startup-security-host.cjs +105 -0
  11. package/bin/startup-security.cjs +9 -105
  12. package/bin/startup-warning-policy.cjs +22 -0
  13. package/bin/update-lease-installer.cjs +125 -0
  14. package/bin/update-lease-sockets.cjs +228 -0
  15. package/bin/update-lease.js +22 -327
  16. package/bin/verify-bundled-agent-sources.cjs +2 -4
  17. package/blun.mjs +18 -179
  18. package/bundled-agent-sources.json +1 -552
  19. package/package.json +1 -5
  20. package/tool-liveness642/receipt.json +1 -1
  21. package/worker-host.mjs +3 -119
  22. package/agent-spine-plugin/.claude-plugin/marketplace.json +0 -20
  23. package/agent-spine-plugin/.claude-plugin/plugin.json +0 -14
  24. package/agent-spine-plugin/.codex-plugin/plugin.json +0 -47
  25. package/agent-spine-plugin/.mcp.json +0 -8
  26. package/agent-spine-plugin/CHANGELOG.md +0 -1614
  27. package/agent-spine-plugin/LICENSE +0 -186
  28. package/agent-spine-plugin/README.md +0 -432
  29. package/agent-spine-plugin/assets/agentspine-banner.svg +0 -32
  30. package/agent-spine-plugin/bin/agentspine-mcp.js +0 -4
  31. package/agent-spine-plugin/bin/agentspine.js +0 -7
  32. package/agent-spine-plugin/blun.plugin.json +0 -68
  33. package/agent-spine-plugin/docs/acceptance.md +0 -61
  34. package/agent-spine-plugin/docs/artifact-evaluation.md +0 -93
  35. package/agent-spine-plugin/docs/host-integration.md +0 -193
  36. package/agent-spine-plugin/docs/preflight-recall.md +0 -71
  37. package/agent-spine-plugin/docs/preservation-contract.md +0 -53
  38. package/agent-spine-plugin/docs/quality-gates.md +0 -50
  39. package/agent-spine-plugin/docs/session-timeline.md +0 -112
  40. package/agent-spine-plugin/docs/source-roots.md +0 -113
  41. package/agent-spine-plugin/docs/world-model.md +0 -119
  42. package/agent-spine-plugin/hooks/codex.json +0 -47
  43. package/agent-spine-plugin/hooks/hooks.json +0 -106
  44. package/agent-spine-plugin/hooks/version.json +0 -5
  45. package/agent-spine-plugin/package.json +0 -77
  46. package/agent-spine-plugin/scripts/check-codex-install.js +0 -226
  47. package/agent-spine-plugin/scripts/check-hosts.js +0 -208
  48. package/agent-spine-plugin/scripts/check-install-hook.js +0 -227
  49. package/agent-spine-plugin/scripts/check-install-selfstarter.js +0 -154
  50. package/agent-spine-plugin/scripts/check-install.js +0 -478
  51. package/agent-spine-plugin/scripts/check-line-budget.js +0 -58
  52. package/agent-spine-plugin/scripts/check-syntax.js +0 -29
  53. package/agent-spine-plugin/scripts/github-actions.js +0 -11
  54. package/agent-spine-plugin/scripts/hermetic-process.js +0 -191
  55. package/agent-spine-plugin/scripts/release-check.js +0 -150
  56. package/agent-spine-plugin/scripts/run-acceptance.js +0 -19
  57. package/agent-spine-plugin/scripts/run-checks.js +0 -50
  58. package/agent-spine-plugin/scripts/run-tests-hermetic.js +0 -112
  59. package/agent-spine-plugin/skills/agent-spine/SKILL.md +0 -99
  60. package/agent-spine-plugin/spine-example/1-identity.md +0 -12
  61. package/agent-spine-plugin/spine-example/2-voice.md +0 -6
  62. package/agent-spine-plugin/spine-example/3-conduct.md +0 -8
  63. package/agent-spine-plugin/spine-example/4-history.md +0 -4
  64. package/agent-spine-plugin/src/cli-agent.js +0 -315
  65. package/agent-spine-plugin/src/cli-attention.js +0 -95
  66. package/agent-spine-plugin/src/cli-autonomy.js +0 -36
  67. package/agent-spine-plugin/src/cli-common.js +0 -71
  68. package/agent-spine-plugin/src/cli-continuity.js +0 -116
  69. package/agent-spine-plugin/src/cli-core.js +0 -128
  70. package/agent-spine-plugin/src/cli-diagnostics.js +0 -291
  71. package/agent-spine-plugin/src/cli-host.js +0 -21
  72. package/agent-spine-plugin/src/cli-learning.js +0 -320
  73. package/agent-spine-plugin/src/cli-premortem.js +0 -16
  74. package/agent-spine-plugin/src/cli-sharing.js +0 -230
  75. package/agent-spine-plugin/src/cli.js +0 -181
  76. package/agent-spine-plugin/src/codex-reader-launcher.js +0 -182
  77. package/agent-spine-plugin/src/hook.js +0 -500
  78. package/agent-spine-plugin/src/index.js +0 -108
  79. package/agent-spine-plugin/src/lib/acceptance.js +0 -435
  80. package/agent-spine-plugin/src/lib/action-lesson-recall.js +0 -118
  81. package/agent-spine-plugin/src/lib/attention-context.js +0 -167
  82. package/agent-spine-plugin/src/lib/attention-events.js +0 -113
  83. package/agent-spine-plugin/src/lib/attention-privacy.js +0 -72
  84. package/agent-spine-plugin/src/lib/attention-schema.js +0 -164
  85. package/agent-spine-plugin/src/lib/attention-storage.js +0 -93
  86. package/agent-spine-plugin/src/lib/attention.js +0 -164
  87. package/agent-spine-plugin/src/lib/audit-premortem.js +0 -223
  88. package/agent-spine-plugin/src/lib/audit.js +0 -401
  89. package/agent-spine-plugin/src/lib/authentication.js +0 -515
  90. package/agent-spine-plugin/src/lib/autonomy-policy.js +0 -110
  91. package/agent-spine-plugin/src/lib/autonomy-store.js +0 -202
  92. package/agent-spine-plugin/src/lib/autonomy.js +0 -8
  93. package/agent-spine-plugin/src/lib/briefing.js +0 -493
  94. package/agent-spine-plugin/src/lib/catalog-document-read.js +0 -51
  95. package/agent-spine-plugin/src/lib/catalog.js +0 -167
  96. package/agent-spine-plugin/src/lib/channel-continuity.js +0 -19
  97. package/agent-spine-plugin/src/lib/channel-runtime.js +0 -665
  98. package/agent-spine-plugin/src/lib/codex-installation.js +0 -231
  99. package/agent-spine-plugin/src/lib/codex-skill-installation.js +0 -211
  100. package/agent-spine-plugin/src/lib/context.js +0 -156
  101. package/agent-spine-plugin/src/lib/continuity.js +0 -338
  102. package/agent-spine-plugin/src/lib/coordination.js +0 -577
  103. package/agent-spine-plugin/src/lib/delivery-agent-usage.js +0 -231
  104. package/agent-spine-plugin/src/lib/delivery-assignment.js +0 -220
  105. package/agent-spine-plugin/src/lib/delivery-command-actions.js +0 -462
  106. package/agent-spine-plugin/src/lib/delivery-knowledge.js +0 -78
  107. package/agent-spine-plugin/src/lib/delivery-premortem-binding.js +0 -107
  108. package/agent-spine-plugin/src/lib/delivery-premortem-closure.js +0 -171
  109. package/agent-spine-plugin/src/lib/delivery-premortem-codec.js +0 -45
  110. package/agent-spine-plugin/src/lib/delivery-premortem-correction.js +0 -101
  111. package/agent-spine-plugin/src/lib/delivery-premortem-file.js +0 -21
  112. package/agent-spine-plugin/src/lib/delivery-premortem-index.js +0 -493
  113. package/agent-spine-plugin/src/lib/delivery-premortem-inspection.js +0 -37
  114. package/agent-spine-plugin/src/lib/delivery-premortem-recovery.js +0 -120
  115. package/agent-spine-plugin/src/lib/delivery-premortem-rejection.js +0 -65
  116. package/agent-spine-plugin/src/lib/delivery-premortem-results.js +0 -28
  117. package/agent-spine-plugin/src/lib/delivery-premortem-session-guard.js +0 -46
  118. package/agent-spine-plugin/src/lib/delivery-premortem-write-ledger.js +0 -285
  119. package/agent-spine-plugin/src/lib/delivery-premortem.js +0 -499
  120. package/agent-spine-plugin/src/lib/delivery-shell-heredoc.js +0 -115
  121. package/agent-spine-plugin/src/lib/delivery-shell-substitutions.js +0 -111
  122. package/agent-spine-plugin/src/lib/delivery-shell-wrapper.js +0 -64
  123. package/agent-spine-plugin/src/lib/delivery-target.js +0 -73
  124. package/agent-spine-plugin/src/lib/delivery-verification.js +0 -445
  125. package/agent-spine-plugin/src/lib/documents.js +0 -239
  126. package/agent-spine-plugin/src/lib/feed-transport.js +0 -499
  127. package/agent-spine-plugin/src/lib/filesystem-retry.js +0 -34
  128. package/agent-spine-plugin/src/lib/gateway-common.js +0 -68
  129. package/agent-spine-plugin/src/lib/gateway-control.js +0 -370
  130. package/agent-spine-plugin/src/lib/gateway-delivery.js +0 -103
  131. package/agent-spine-plugin/src/lib/gateway-execution.js +0 -350
  132. package/agent-spine-plugin/src/lib/gateway-group-response.js +0 -128
  133. package/agent-spine-plugin/src/lib/gateway-host-fencing.js +0 -92
  134. package/agent-spine-plugin/src/lib/gateway-host-lifecycle.js +0 -193
  135. package/agent-spine-plugin/src/lib/gateway-inspection.js +0 -85
  136. package/agent-spine-plugin/src/lib/gateway-knowledge.js +0 -129
  137. package/agent-spine-plugin/src/lib/gateway-policy-provenance.js +0 -197
  138. package/agent-spine-plugin/src/lib/gateway-premortem-disposition.js +0 -82
  139. package/agent-spine-plugin/src/lib/gateway-premortem.js +0 -363
  140. package/agent-spine-plugin/src/lib/gateway-prepared-host.js +0 -28
  141. package/agent-spine-plugin/src/lib/gateway-runs.js +0 -345
  142. package/agent-spine-plugin/src/lib/gateway-runtime-identity.js +0 -31
  143. package/agent-spine-plugin/src/lib/gateway-runtime-records.js +0 -21
  144. package/agent-spine-plugin/src/lib/gateway-runtime.js +0 -18
  145. package/agent-spine-plugin/src/lib/gateway-state-transaction.js +0 -356
  146. package/agent-spine-plugin/src/lib/gateway-state.js +0 -344
  147. package/agent-spine-plugin/src/lib/graph.js +0 -337
  148. package/agent-spine-plugin/src/lib/hook-artifact-guards.js +0 -356
  149. package/agent-spine-plugin/src/lib/hook-audit.js +0 -43
  150. package/agent-spine-plugin/src/lib/hook-briefing-use.js +0 -78
  151. package/agent-spine-plugin/src/lib/hook-context.js +0 -441
  152. package/agent-spine-plugin/src/lib/hook-final-message.js +0 -26
  153. package/agent-spine-plugin/src/lib/hook-input.js +0 -27
  154. package/agent-spine-plugin/src/lib/hook-output.js +0 -284
  155. package/agent-spine-plugin/src/lib/hook-premortem.js +0 -257
  156. package/agent-spine-plugin/src/lib/hook-process-advisory.js +0 -36
  157. package/agent-spine-plugin/src/lib/hook-protection.js +0 -95
  158. package/agent-spine-plugin/src/lib/hook-stop-verification.js +0 -84
  159. package/agent-spine-plugin/src/lib/hook-timeline.js +0 -102
  160. package/agent-spine-plugin/src/lib/host-instruction-budget.js +0 -11
  161. package/agent-spine-plugin/src/lib/https-transport.js +0 -392
  162. package/agent-spine-plugin/src/lib/identifier-analysis.js +0 -446
  163. package/agent-spine-plugin/src/lib/indexed-memory-offline.js +0 -40
  164. package/agent-spine-plugin/src/lib/indexed-memory.js +0 -298
  165. package/agent-spine-plugin/src/lib/knowledge-evidence.js +0 -431
  166. package/agent-spine-plugin/src/lib/learning-applications.js +0 -441
  167. package/agent-spine-plugin/src/lib/learning-artifact-evaluator.js +0 -114
  168. package/agent-spine-plugin/src/lib/learning-candidates.js +0 -274
  169. package/agent-spine-plugin/src/lib/learning-context.js +0 -137
  170. package/agent-spine-plugin/src/lib/learning-delivery-contracts.js +0 -310
  171. package/agent-spine-plugin/src/lib/learning-evaluation-contracts.js +0 -350
  172. package/agent-spine-plugin/src/lib/learning-evaluation-registration.js +0 -372
  173. package/agent-spine-plugin/src/lib/learning-evaluation-revocation.js +0 -292
  174. package/agent-spine-plugin/src/lib/learning-evidence-contracts.js +0 -321
  175. package/agent-spine-plugin/src/lib/learning-findings.js +0 -458
  176. package/agent-spine-plugin/src/lib/learning-measurement-contracts.js +0 -285
  177. package/agent-spine-plugin/src/lib/learning-measurements.js +0 -265
  178. package/agent-spine-plugin/src/lib/learning-outcome-contracts.js +0 -165
  179. package/agent-spine-plugin/src/lib/learning-outcomes.js +0 -343
  180. package/agent-spine-plugin/src/lib/learning-reconciliation.js +0 -290
  181. package/agent-spine-plugin/src/lib/learning-retry-contracts.js +0 -188
  182. package/agent-spine-plugin/src/lib/learning-schema.js +0 -229
  183. package/agent-spine-plugin/src/lib/learning-scope-targets.js +0 -424
  184. package/agent-spine-plugin/src/lib/learning-state-upgrade.js +0 -477
  185. package/agent-spine-plugin/src/lib/learning-status-configuration.js +0 -476
  186. package/agent-spine-plugin/src/lib/learning-storage.js +0 -203
  187. package/agent-spine-plugin/src/lib/learning-trial-recovery.js +0 -218
  188. package/agent-spine-plugin/src/lib/learning-validation-contracts.js +0 -375
  189. package/agent-spine-plugin/src/lib/learning-validation-renewal.js +0 -298
  190. package/agent-spine-plugin/src/lib/learning-validation-runtime.js +0 -234
  191. package/agent-spine-plugin/src/lib/learning.js +0 -36
  192. package/agent-spine-plugin/src/lib/lesson-recall-session.js +0 -172
  193. package/agent-spine-plugin/src/lib/mcp-autonomy-tools.js +0 -37
  194. package/agent-spine-plugin/src/lib/mcp-delivery-completion.js +0 -124
  195. package/agent-spine-plugin/src/lib/mcp-delivery-tools.js +0 -45
  196. package/agent-spine-plugin/src/lib/mcp-premortem.js +0 -68
  197. package/agent-spine-plugin/src/lib/mcp-runtime.js +0 -355
  198. package/agent-spine-plugin/src/lib/mcp-source-context.js +0 -61
  199. package/agent-spine-plugin/src/lib/mcp-timeline-tools.js +0 -240
  200. package/agent-spine-plugin/src/lib/mcp-world-tools.js +0 -52
  201. package/agent-spine-plugin/src/lib/object-transport.js +0 -206
  202. package/agent-spine-plugin/src/lib/owned-file-lock.js +0 -182
  203. package/agent-spine-plugin/src/lib/paths.js +0 -109
  204. package/agent-spine-plugin/src/lib/peer-transport.js +0 -283
  205. package/agent-spine-plugin/src/lib/persona-runtime.js +0 -581
  206. package/agent-spine-plugin/src/lib/pre-answer-timeline-recall.js +0 -104
  207. package/agent-spine-plugin/src/lib/preflight-delivery-id.js +0 -27
  208. package/agent-spine-plugin/src/lib/preflight.js +0 -688
  209. package/agent-spine-plugin/src/lib/project-portfolio.js +0 -176
  210. package/agent-spine-plugin/src/lib/runtime.js +0 -13
  211. package/agent-spine-plugin/src/lib/selfstarter-core.js +0 -382
  212. package/agent-spine-plugin/src/lib/selfstarter-jobs.js +0 -149
  213. package/agent-spine-plugin/src/lib/selfstarter-lease.js +0 -204
  214. package/agent-spine-plugin/src/lib/selfstarter-policy.js +0 -90
  215. package/agent-spine-plugin/src/lib/selfstarter-workspace.js +0 -111
  216. package/agent-spine-plugin/src/lib/selfstarter.js +0 -11
  217. package/agent-spine-plugin/src/lib/session-timeline-auth.js +0 -316
  218. package/agent-spine-plugin/src/lib/session-timeline-codex.js +0 -69
  219. package/agent-spine-plugin/src/lib/session-timeline-contract.js +0 -56
  220. package/agent-spine-plugin/src/lib/session-timeline-enrollment-source.js +0 -38
  221. package/agent-spine-plugin/src/lib/session-timeline-enrollment-storage.js +0 -128
  222. package/agent-spine-plugin/src/lib/session-timeline-enrollment-transport.js +0 -15
  223. package/agent-spine-plugin/src/lib/session-timeline-enrollment.js +0 -478
  224. package/agent-spine-plugin/src/lib/session-timeline-event-extract.js +0 -186
  225. package/agent-spine-plugin/src/lib/session-timeline-host-origin.js +0 -73
  226. package/agent-spine-plugin/src/lib/session-timeline-host-receipt.js +0 -117
  227. package/agent-spine-plugin/src/lib/session-timeline-invocation.js +0 -201
  228. package/agent-spine-plugin/src/lib/session-timeline-king.js +0 -93
  229. package/agent-spine-plugin/src/lib/session-timeline-prior.js +0 -57
  230. package/agent-spine-plugin/src/lib/session-timeline-provider.js +0 -36
  231. package/agent-spine-plugin/src/lib/session-timeline-query.js +0 -56
  232. package/agent-spine-plugin/src/lib/session-timeline-results.js +0 -56
  233. package/agent-spine-plugin/src/lib/session-timeline-root.js +0 -11
  234. package/agent-spine-plugin/src/lib/session-timeline-search.js +0 -82
  235. package/agent-spine-plugin/src/lib/session-timeline-sid-acl.js +0 -213
  236. package/agent-spine-plugin/src/lib/session-timeline-source-open.js +0 -30
  237. package/agent-spine-plugin/src/lib/session-timeline-source.js +0 -80
  238. package/agent-spine-plugin/src/lib/session-timeline-state.js +0 -45
  239. package/agent-spine-plugin/src/lib/session-timeline-transport.js +0 -42
  240. package/agent-spine-plugin/src/lib/session-timeline-windows-acl.js +0 -145
  241. package/agent-spine-plugin/src/lib/session-timeline.js +0 -462
  242. package/agent-spine-plugin/src/lib/sharing.js +0 -969
  243. package/agent-spine-plugin/src/lib/source-roots.js +0 -475
  244. package/agent-spine-plugin/src/lib/source-tree-scan.js +0 -178
  245. package/agent-spine-plugin/src/lib/sqlite-transport.js +0 -501
  246. package/agent-spine-plugin/src/lib/task-knowledge-context.js +0 -99
  247. package/agent-spine-plugin/src/lib/telegram-adapter.js +0 -119
  248. package/agent-spine-plugin/src/lib/timeline-continuation-update.js +0 -100
  249. package/agent-spine-plugin/src/lib/timeline-tool-guard.js +0 -225
  250. package/agent-spine-plugin/src/lib/timeline-user-feedback.js +0 -216
  251. package/agent-spine-plugin/src/lib/timeline-world-capture.js +0 -233
  252. package/agent-spine-plugin/src/lib/voice-runtime.js +0 -39
  253. package/agent-spine-plugin/src/lib/world-knowledge.js +0 -306
  254. package/agent-spine-plugin/src/lib/world-model.js +0 -333
  255. package/agent-spine-plugin/src/mcp.js +0 -456
  256. package/agent-spine-plugin/src/version.js +0 -1
  257. package/agent-spine-plugin/src/worker.js +0 -257
  258. package/bin/agentspine-king-goal-inbox.mjs +0 -127
  259. package/bin/agentspine-king-goal-intake.mjs +0 -106
  260. package/bin/agentspine-king-host-runner.mjs +0 -109
  261. package/bin/agentspine-king-snapshot-policy.cjs +0 -80
  262. package/bin/agentspine-king-status-policy.mjs +0 -226
  263. package/bin/agentspine-king-worker-host.mjs +0 -160
  264. package/bin/managed-plugin-selection.cjs +0 -141
  265. package/bin/verify-agent-behavior.cjs +0 -122
  266. package/bin/verify-agent-components.cjs +0 -104
package/blun.mjs CHANGED
@@ -21506,14 +21506,6 @@ var init_registry$4 = __esmMin((() => {
21506
21506
  default: false,
21507
21507
  surface: "core"
21508
21508
  },
21509
- {
21510
- id: "agent_spine_timeline",
21511
- title: "AgentSpine session transport",
21512
- description: "Pass the current native record source to the enabled AgentSpine plugin.",
21513
- env: "BLUN_EXPERIMENTAL_AGENT_SPINE_TIMELINE",
21514
- default: false,
21515
- surface: "core"
21516
- },
21517
21509
  {
21518
21510
  id: "vision_reader",
21519
21511
  title: "Vision reader",
@@ -301939,73 +301931,6 @@ var init_mcp$2 = __esmMin((() => {
301939
301931
  init_tool_naming();
301940
301932
  init_types$7();
301941
301933
  }));
301942
- /** AgentSpine reads prompt text; binary media stays in the original model input. */
301943
- function projectAgentSpinePrompt(input) {
301944
- if (typeof input["hook_event_name"] !== "string" || !PROMPT_EVENTS.has(input["hook_event_name"]) || !Array.isArray(input["prompt"])) return input;
301945
- let changed = false;
301946
- const prompt = input["prompt"].map((part) => {
301947
- if (!isRecord$19(part)) return part;
301948
- const field = part["type"] === "image_url" ? "imageUrl" : part["type"] === "audio_url" ? "audioUrl" : part["type"] === "video_url" ? "videoUrl" : void 0;
301949
- if (field === void 0 || !isRecord$19(part[field]) || typeof part[field]["url"] !== "string") return part;
301950
- const serialized = JSON.stringify(part);
301951
- changed = true;
301952
- return {
301953
- type: "media_reference",
301954
- media_type: part["type"],
301955
- sha256: createHash("sha256").update(serialized).digest("hex"),
301956
- original_bytes: Buffer.byteLength(serialized)
301957
- };
301958
- });
301959
- return changed ? {
301960
- ...input,
301961
- prompt
301962
- } : input;
301963
- }
301964
- function isRecord$19(value) {
301965
- return typeof value === "object" && value !== null && !Array.isArray(value);
301966
- }
301967
- var PROMPT_EVENTS, EMPTY_RUNTIME, AgentSpineSessionRuntime;
301968
- var init_agent_spine_runtime = __esmMin((() => {
301969
- PROMPT_EVENTS = new Set([
301970
- "UserPromptSubmit",
301971
- "TurnStart",
301972
- "SubagentStart"
301973
- ]);
301974
- EMPTY_RUNTIME = Object.freeze({
301975
- AGENTSPINE_KING_TIMELINE_SOURCE: "",
301976
- AGENTSPINE_KING_WIRE_PROTOCOL_VERSION: "",
301977
- AGENTSPINE_TIMELINE_TRANSPORT_SESSION_ID: "",
301978
- AGENTSPINE_TIMELINE_SESSION_CAPABILITY: ""
301979
- });
301980
- AgentSpineSessionRuntime = class {
301981
- #env = EMPTY_RUNTIME;
301982
- #hooks;
301983
- #servers;
301984
- constructor(recipients) {
301985
- this.#hooks = new Set(recipients?.hooks);
301986
- this.#servers = new Map(Object.entries(recipients?.mcpServers ?? {}));
301987
- }
301988
- get hasRecipients() {
301989
- return this.#hooks.size > 0 || this.#servers.size > 0;
301990
- }
301991
- bind(sessionId, source) {
301992
- this.#env = EMPTY_RUNTIME;
301993
- if (!sessionId || !/^[A-Za-z0-9][A-Za-z0-9:_.@/-]{0,127}$/.test(sessionId) || !source) return;
301994
- this.#env = Object.freeze({
301995
- AGENTSPINE_KING_TIMELINE_SOURCE: source.path,
301996
- AGENTSPINE_KING_WIRE_PROTOCOL_VERSION: source.protocolVersion,
301997
- AGENTSPINE_TIMELINE_TRANSPORT_SESSION_ID: sessionId,
301998
- AGENTSPINE_TIMELINE_SESSION_CAPABILITY: `astc_${randomBytes(32).toString("base64url")}`
301999
- });
302000
- }
302001
- forHook(hook) {
302002
- return this.#hooks.has(hook) ? this.#env : EMPTY_RUNTIME;
302003
- }
302004
- forMcp(name, config) {
302005
- return config.transport === "stdio" && this.#servers.get(name) === config ? this.#env : EMPTY_RUNTIME;
302006
- }
302007
- };
302008
- }));
302009
301934
  /**
302010
301935
  * Detects the complete retired file-memory instruction signature. The embedded
302011
301936
  * MEMORY.md content is untrusted, so callers must re-render the current profile
@@ -302796,7 +302721,6 @@ var init_session$3 = __esmMin((() => {
302796
302721
  init_config$7();
302797
302722
  init_mcp$2();
302798
302723
  init_public_display();
302799
- init_agent_spine_runtime();
302800
302724
  init_profile();
302801
302725
  init_legacy_memory();
302802
302726
  init_provider_manager();
@@ -302853,7 +302777,6 @@ var init_session$3 = __esmMin((() => {
302853
302777
  writeMetadataPromise = Promise.resolve();
302854
302778
  agentsMdWarning;
302855
302779
  accountMemoryContext = "";
302856
- agentSpineRuntime;
302857
302780
  mcpLoadStarted = false;
302858
302781
  workAdmissionClosed = false;
302859
302782
  agentOperations = new ExecutionLedger();
@@ -302883,9 +302806,7 @@ var init_session$3 = __esmMin((() => {
302883
302806
  });
302884
302807
  };
302885
302808
  } });
302886
- this.agentSpineRuntime = this.experimentalFlags.enabled("agent_spine_timeline") ? new AgentSpineSessionRuntime(options.agentSpineRuntime) : void 0;
302887
302809
  this.visionReader = (this.experimentalFlags.enabled("vision_reader") ? createVisionReader(options.config?.services?.visionReader) : void 0) ?? createManagedMediaVisionReader(options.toolServices?.media);
302888
- const agentSpineHooks = new Set(options.agentSpineRuntime?.hooks);
302889
302810
  this.hookEngine = new HookEngine(options.hooks, {
302890
302811
  onHookSettled: (hook, outcome) => {
302891
302812
  if (!this.experimentalFlags.enabled("session_trace") || this.metadata.custom["blunTrace"] !== true) return;
@@ -302908,15 +302829,7 @@ var init_session$3 = __esmMin((() => {
302908
302829
  },
302909
302830
  cwd: options.kaos.getcwd(),
302910
302831
  sessionId: options.id,
302911
- runtimeInput: (hook, input) => agentSpineHooks.has(hook) ? projectAgentSpinePrompt(input) : input,
302912
- runtimeEnv: (hook) => {
302913
- const hostEnv = options.hookRuntimeEnv?.(hook);
302914
- const timelineEnv = this.agentSpineRuntime?.forHook(hook);
302915
- return timelineEnv === void 0 ? hostEnv : {
302916
- ...hostEnv,
302917
- ...timelineEnv
302918
- };
302919
- }
302832
+ runtimeEnv: (hook) => options.hookRuntimeEnv?.(hook)
302920
302833
  });
302921
302834
  this.telemetry = options.telemetry ?? noopTelemetryClient;
302922
302835
  this.toolKaos = options.kaos;
@@ -302929,14 +302842,7 @@ var init_session$3 = __esmMin((() => {
302929
302842
  oauthService: new McpOAuthService({ blunHomeDir: options.blunHomeDir }),
302930
302843
  log: this.log,
302931
302844
  stdioCwd: options.kaos.getcwd(),
302932
- stdioRuntimeEnv: (name, config) => {
302933
- const hostEnv = options.mcpRuntimeEnv?.(name, config);
302934
- const timelineEnv = this.agentSpineRuntime?.forMcp(name, config);
302935
- return timelineEnv === void 0 ? hostEnv : {
302936
- ...hostEnv,
302937
- ...timelineEnv
302938
- };
302939
- }
302845
+ stdioRuntimeEnv: (name, config) => options.mcpRuntimeEnv?.(name, config)
302940
302846
  });
302941
302847
  this.lsp = options.lspServers === void 0 || Object.keys(options.lspServers).length === 0 ? void 0 : new LspManager({
302942
302848
  cwd: options.kaos.getcwd(),
@@ -302950,7 +302856,7 @@ var init_session$3 = __esmMin((() => {
302950
302856
  }).then(() => {
302951
302857
  this.refreshAgentBuiltinTools();
302952
302858
  });
302953
- if (!this.agentSpineRuntime?.hasRecipients) this.startMcpServers();
302859
+ this.startMcpServers();
302954
302860
  }
302955
302861
  setToolKaos(kaos) {
302956
302862
  this.toolKaos = kaos;
@@ -303832,16 +303738,6 @@ var init_session$3 = __esmMin((() => {
303832
303738
  return agent;
303833
303739
  }
303834
303740
  async triggerSessionStart(source) {
303835
- if (this.agentSpineRuntime?.hasRecipients && !this.mcpLoadStarted) {
303836
- try {
303837
- const main = this.getReadyAgent("main");
303838
- await main?.records.flush();
303839
- this.agentSpineRuntime.bind(this.options.id, main?.records.fileSource);
303840
- } catch {
303841
- this.log.warn("Native session record source is unavailable.");
303842
- }
303843
- this.startMcpServers();
303844
- }
303845
303741
  await this.hookEngine.trigger("SessionStart", {
303846
303742
  matcherValue: source,
303847
303743
  inputData: { source }
@@ -337949,7 +337845,6 @@ var init_core_impl = __esmMin((() => {
337949
337845
  background: config.background,
337950
337846
  hooks: [...config.hooks ?? [], ...pluginHooks],
337951
337847
  hookPluginId: (hook) => this.plugins.pluginForHook(hook),
337952
- agentSpineRuntime: this.agentSpineRuntimeRecipients(pluginHooks, mcpConfig),
337953
337848
  permissionRules: config.permission?.rules,
337954
337849
  skills: this.resolveSessionSkillConfig(config),
337955
337850
  mcpConfig,
@@ -338100,7 +337995,6 @@ var init_core_impl = __esmMin((() => {
338100
337995
  background: config.background,
338101
337996
  hooks: [...config.hooks ?? [], ...pluginHooks],
338102
337997
  hookPluginId: (hook) => this.plugins.pluginForHook(hook),
338103
- agentSpineRuntime: this.agentSpineRuntimeRecipients(pluginHooks, mcpConfig),
338104
337998
  permissionRules: config.permission?.rules,
338105
337999
  skills: this.resolveSessionSkillConfig(config),
338106
338000
  mcpConfig,
@@ -338605,19 +338499,6 @@ var init_core_impl = __esmMin((() => {
338605
338499
  }
338606
338500
  };
338607
338501
  }
338608
- agentSpineRuntimeRecipients(pluginHooks, mcpConfig) {
338609
- const plugin = this.plugins.get("agent-spine");
338610
- if (plugin?.state !== "ok" || !plugin.enabled) return void 0;
338611
- const hooks = pluginHooks.filter((hook) => hook.env?.["BLUN_PLUGIN_ROOT"] === plugin.root);
338612
- const mcpServers = Object.fromEntries(Object.entries(mcpConfig?.servers ?? {}).filter(([name, config]) => {
338613
- const origin = mcpConfig?.origins?.[name];
338614
- return origin?.source === "plugin" && origin.pluginId === plugin.id && origin.pluginEnabled && config.transport === "stdio" && config.enabled !== false;
338615
- }));
338616
- return hooks.length > 0 || Object.keys(mcpServers).length > 0 ? {
338617
- hooks,
338618
- mcpServers
338619
- } : void 0;
338620
- }
338621
338502
  async resolveCurrentMcpConfig(session) {
338622
338503
  const snapshot = session.mcpConfigSnapshot();
338623
338504
  const callerServers = Object.fromEntries(Object.entries(snapshot?.servers ?? {}).filter(([name]) => snapshot?.origins?.[name]?.source === "session"));
@@ -493056,7 +492937,7 @@ var init_choice_picker = __esmMin((() => {
493056
492937
  this.list = new SearchableList({
493057
492938
  items: opts.options,
493058
492939
  toSearchText: (o) => `${o.label} ${o.description ?? ""}`,
493059
- pageSize: opts.pageSize,
492940
+ pageSize: opts.pageSize ?? 5,
493060
492941
  initialIndex: Math.max(currentIdx, 0),
493061
492942
  searchable: opts.searchable === true
493062
492943
  });
@@ -493122,7 +493003,15 @@ var init_choice_picker = __esmMin((() => {
493122
493003
  lines.push("");
493123
493004
  if (searchable && view.query.length > 0) lines.push(currentTheme.fg("primary", ` ${uiText("common.search")}: `) + currentTheme.fg("text", view.query));
493124
493005
  if (options.length === 0) lines.push(currentTheme.fg("textMuted", ` ${uiText("common.noMatches")}`));
493006
+ const selected = this.list.selected();
493007
+ if (selected?.description !== void 0 && selected.description.length > 0) {
493008
+ for (const detail of wrapDescription(selected.description, Math.max(1, width - 4))) {
493009
+ lines.push(currentTheme.fg(selected.descriptionTone ?? "textMuted", ` ${detail}`));
493010
+ }
493011
+ lines.push("");
493012
+ }
493125
493013
  for (let i = view.page.start; i < view.page.end; i++) {
493014
+ if (i > view.page.start) lines.push("");
493126
493015
  const opt = options[i];
493127
493016
  const isSelected = i === view.selectedIndex;
493128
493017
  const isCurrent = opt.value === this.opts.currentValue;
@@ -493132,11 +493021,6 @@ var init_choice_picker = __esmMin((() => {
493132
493021
  line += labelStyle(opt.label);
493133
493022
  if (isCurrent) line += " " + currentTheme.fg("success", currentMark());
493134
493023
  lines.push(line);
493135
- if (opt.description !== void 0 && opt.description.length > 0) {
493136
- const descriptionWidth = Math.max(1, width - 4);
493137
- const descriptionColor = isSelected && opt.descriptionTone !== void 0 ? opt.descriptionTone : "textMuted";
493138
- for (const descLine of wrapDescription(opt.description, descriptionWidth)) lines.push(currentTheme.fg(descriptionColor, ` ${descLine}`));
493139
- }
493140
493024
  }
493141
493025
  lines.push("");
493142
493026
  if (view.page.pageCount > 1) lines.push(currentTheme.fg("textMuted", ` ${uiText("common.pageCount", {
@@ -504509,13 +504393,6 @@ var init_registry$1 = __esmMin((() => {
504509
504393
  priority: 60,
504510
504394
  availability: "always"
504511
504395
  },
504512
- {
504513
- name: "agent-spine",
504514
- aliases: [],
504515
- descriptionKey: "command.plugins.description",
504516
- priority: 61,
504517
- availability: "idle-only"
504518
- },
504519
504396
  {
504520
504397
  name: "telegram-access",
504521
504398
  aliases: ["telegram-acces"],
@@ -507633,30 +507510,6 @@ var init_plugins = __esmMin((() => {
507633
507510
  init_plugin_source_label();
507634
507511
  init_plugin_marketplace();
507635
507512
  }));
507636
- function agentSpinePluginCommand(plugins) {
507637
- const installed = plugins.find((plugin) => plugin.id === AGENT_SPINE_PLUGIN_ID);
507638
- if (installed === void 0) return `install ${AGENT_SPINE_PLUGIN_SOURCE}`;
507639
- if (!installed.enabled) return `enable ${AGENT_SPINE_PLUGIN_ID}`;
507640
- return AGENT_SPINE_PLUGIN_ID;
507641
- }
507642
- async function handleAgentSpineCommand(host) {
507643
- try {
507644
- await handlePluginsCommand(host, agentSpinePluginCommand(await host.requireSession().listPlugins()));
507645
- } catch (error) {
507646
- host.showError(uiText("plugins.error.actionFailed", {
507647
- command: "/agent-spine",
507648
- error: formatErrorMessage$2(error)
507649
- }));
507650
- }
507651
- }
507652
- var AGENT_SPINE_PLUGIN_ID, AGENT_SPINE_PLUGIN_SOURCE;
507653
- var init_agent_spine = __esmMin((() => {
507654
- init_i18n();
507655
- init_event_payload();
507656
- init_plugins();
507657
- AGENT_SPINE_PLUGIN_ID = "agent-spine";
507658
- AGENT_SPINE_PLUGIN_SOURCE = "https://github.com/Maykbiletti/AgentSpine";
507659
- }));
507660
507513
  /** Local host authentication only; request text never supplies credentials or endpoints. */
507661
507514
  async function handleLocalAuthCommand(host, args) {
507662
507515
  if (!isExperimentalFlagEnabled("local_auth") || host.session?.connectionKind === "gateway" || host.getChannelCommandContext?.()) {
@@ -526236,9 +526089,6 @@ async function handleBuiltInSlashCommand(host, name, args, invokedName = name) {
526236
526089
  case "plugins":
526237
526090
  await handlePluginsCommand(host, args);
526238
526091
  return;
526239
- case "agent-spine":
526240
- await handleAgentSpineCommand(host);
526241
- return;
526242
526092
  case "telegram-access":
526243
526093
  handleTelegramAccessCommand(host);
526244
526094
  return;
@@ -526407,7 +526257,6 @@ var init_dispatch = __esmMin((() => {
526407
526257
  init_blun_tui$1();
526408
526258
  init_dance();
526409
526259
  init_event_payload();
526410
- init_agent_spine();
526411
526260
  init_auth();
526412
526261
  init_btw();
526413
526262
  init_copy();
@@ -526450,7 +526299,6 @@ var init_commands = __esmMin((() => {
526450
526299
  init_types$2();
526451
526300
  init_dispatch();
526452
526301
  init_auth();
526453
- init_agent_spine();
526454
526302
  init_btw();
526455
526303
  init_config$1();
526456
526304
  init_swarm();
@@ -544384,11 +544232,11 @@ function promptStartupWorkspaceChoice(host, currentPath, copy) {
544384
544232
  };
544385
544233
  host.mountEditorReplacement(new ChoicePickerComponent({
544386
544234
  title: copy.choiceTitle,
544235
+ notice: currentPath,
544387
544236
  options: [
544388
544237
  {
544389
544238
  value: "use",
544390
- label: copy.useCurrent,
544391
- description: currentPath
544239
+ label: copy.useCurrent
544392
544240
  },
544393
544241
  {
544394
544242
  value: "change",
@@ -545194,7 +545042,6 @@ BlunTUI = class {
545194
545042
  pluginCommandMap = /* @__PURE__ */ new Map();
545195
545043
  imageStore = new ImageAttachmentStore();
545196
545044
  fdPath = detectFdPath();
545197
- fdDownloadStarted = false;
545198
545045
  mentionFileSearch = createRipgrepMentionSearch(detectMentionSearchPath());
545199
545046
  sessionEventUnsubscribe;
545200
545047
  cancelInFlight;
@@ -545483,13 +545330,12 @@ activeApprovalPanel;
545483
545330
  }
545484
545331
  async start() {
545485
545332
  this.registerSignalHandlers();
545486
- this.startupWorkspaceSelectionPending = this.gatewayStartup === void 0;
545333
+ this.startupWorkspaceSelectionPending = this.gatewayStartup === void 0 && this.options.startup.sessionFlag === void 0 && !this.options.startup.continueLast;
545487
545334
  try {
545488
545335
  const shouldReplayHistory = await this.initMainTui();
545489
545336
  this.startEventLoop();
545490
545337
  try {
545491
545338
  await this.finishStartup(shouldReplayHistory);
545492
- if (this.session !== void 0 || this.state.startupState === "picker") this.startBackgroundFdAutocomplete();
545493
545339
  } catch (error) {
545494
545340
  this.disposeTerminalTracking();
545495
545341
  this.state.ui.stop();
@@ -545577,16 +545423,6 @@ activeApprovalPanel;
545577
545423
  });
545578
545424
  this.clipboardImageHintController.start();
545579
545425
  }
545580
- startBackgroundFdAutocomplete() {
545581
- if (this.gatewayStartup) return;
545582
- if (this.fdPath !== null || this.fdDownloadStarted) return;
545583
- this.fdDownloadStarted = true;
545584
- ensureFdPath().then((fdPath) => {
545585
- if (fdPath === null) return;
545586
- this.fdPath = fdPath;
545587
- this.setupAutocomplete();
545588
- }).catch(() => {});
545589
- }
545590
545426
  async refreshProviderModelsInBackground() {
545591
545427
  try {
545592
545428
  const result = await this.authFlow.refreshProviderModels();
@@ -561109,6 +560945,9 @@ function createProgram(version, onMain, onPluginNodeRunner = () => {}, onUpgrade
561109
560945
  registerVisCommand(program);
561110
560946
  registerSetupCommand(program, version);
561111
560947
  registerBundledDocsCommand(program, version);
560948
+ program.command("fd-download").action(async () => {
560949
+ if (await ensureFdPath() === null) process.exitCode = 1;
560950
+ });
561112
560951
  program.command("upgrade").alias("update").description("Upgrade BLUN to the latest version.").action(async () => {
561113
560952
  await onUpgrade();
561114
560953
  });