blun-king-cli 9.1.587 → 9.1.588

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 (436) hide show
  1. package/CHANGELOG.md +11 -185
  2. package/LIESMICH.txt +51 -13
  3. package/README.md +44 -47
  4. package/agent-spine-plugin/.codex-plugin/plugin.json +16 -4
  5. package/agent-spine-plugin/CHANGELOG.md +37 -5
  6. package/agent-spine-plugin/README.md +3 -3
  7. package/agent-spine-plugin/blun.plugin.json +45 -10
  8. package/agent-spine-plugin/docs/artifact-evaluation.md +93 -0
  9. package/agent-spine-plugin/docs/host-integration.md +42 -27
  10. package/agent-spine-plugin/docs/preflight-recall.md +4 -2
  11. package/agent-spine-plugin/docs/session-timeline.md +97 -236
  12. package/agent-spine-plugin/docs/world-model.md +25 -0
  13. package/agent-spine-plugin/hooks/codex.json +1 -1
  14. package/agent-spine-plugin/hooks/hooks.json +1 -1
  15. package/agent-spine-plugin/package.json +1 -3
  16. package/agent-spine-plugin/scripts/check-hosts.js +3 -3
  17. package/agent-spine-plugin/scripts/release-check.js +10 -5
  18. package/agent-spine-plugin/scripts/run-checks.js +4 -1
  19. package/agent-spine-plugin/scripts/run-tests-hermetic.js +32 -6
  20. package/agent-spine-plugin/src/cli-learning.js +15 -0
  21. package/agent-spine-plugin/src/cli.js +2 -0
  22. package/agent-spine-plugin/src/hook.js +32 -32
  23. package/agent-spine-plugin/src/lib/action-lesson-recall.js +73 -8
  24. package/agent-spine-plugin/src/lib/briefing.js +146 -36
  25. package/agent-spine-plugin/src/lib/channel-continuity.js +19 -0
  26. package/agent-spine-plugin/src/lib/delivery-agent-usage.js +14 -7
  27. package/agent-spine-plugin/src/lib/gateway-group-response.js +128 -0
  28. package/agent-spine-plugin/src/lib/gateway-runs.js +24 -15
  29. package/agent-spine-plugin/src/lib/hook-briefing-use.js +13 -3
  30. package/agent-spine-plugin/src/lib/hook-context.js +16 -3
  31. package/agent-spine-plugin/src/lib/hook-output.js +129 -5
  32. package/agent-spine-plugin/src/lib/hook-timeline.js +5 -3
  33. package/agent-spine-plugin/src/lib/indexed-memory.js +2 -2
  34. package/agent-spine-plugin/src/lib/learning-artifact-evaluator.js +114 -0
  35. package/agent-spine-plugin/src/lib/learning-context.js +11 -4
  36. package/agent-spine-plugin/src/lib/learning-measurements.js +2 -2
  37. package/agent-spine-plugin/src/lib/mcp-runtime.js +89 -3
  38. package/agent-spine-plugin/src/lib/mcp-source-context.js +12 -2
  39. package/agent-spine-plugin/src/lib/mcp-timeline-tools.js +91 -8
  40. package/agent-spine-plugin/src/lib/mcp-world-tools.js +2 -2
  41. package/agent-spine-plugin/src/lib/owned-file-lock.js +20 -1
  42. package/agent-spine-plugin/src/lib/persona-runtime.js +2 -2
  43. package/agent-spine-plugin/src/lib/preflight-delivery-id.js +27 -0
  44. package/agent-spine-plugin/src/lib/preflight.js +4 -4
  45. package/agent-spine-plugin/src/lib/session-timeline-codex.js +15 -0
  46. package/agent-spine-plugin/src/lib/session-timeline-contract.js +12 -4
  47. package/agent-spine-plugin/src/lib/session-timeline-event-extract.js +36 -7
  48. package/agent-spine-plugin/src/lib/session-timeline-host-origin.js +13 -10
  49. package/agent-spine-plugin/src/lib/session-timeline-invocation.js +1 -1
  50. package/agent-spine-plugin/src/lib/session-timeline-king.js +14 -0
  51. package/agent-spine-plugin/src/lib/session-timeline-prior.js +18 -12
  52. package/agent-spine-plugin/src/lib/session-timeline-provider.js +5 -0
  53. package/agent-spine-plugin/src/lib/session-timeline-query.js +2 -0
  54. package/agent-spine-plugin/src/lib/session-timeline-results.js +35 -10
  55. package/agent-spine-plugin/src/lib/session-timeline-source-open.js +30 -0
  56. package/agent-spine-plugin/src/lib/session-timeline.js +122 -75
  57. package/agent-spine-plugin/src/lib/source-roots.js +3 -2
  58. package/agent-spine-plugin/src/lib/task-knowledge-context.js +22 -1
  59. package/agent-spine-plugin/src/lib/timeline-continuation-update.js +100 -0
  60. package/agent-spine-plugin/src/lib/timeline-tool-guard.js +30 -7
  61. package/agent-spine-plugin/src/lib/timeline-user-feedback.js +217 -0
  62. package/agent-spine-plugin/src/lib/timeline-world-capture.js +233 -0
  63. package/agent-spine-plugin/src/lib/world-knowledge.js +59 -2
  64. package/agent-spine-plugin/src/lib/world-model.js +64 -9
  65. package/agent-spine-plugin/src/worker.js +13 -1
  66. package/bin/blun.js +43 -28
  67. package/bin/core-bootstrap.js +5 -4
  68. package/bin/king.js +43 -28
  69. package/bin/launcher-mode.js +1 -10
  70. package/bin/launcher-runtime.js +128 -295
  71. package/bin/managed-node.js +0 -0
  72. package/bin/managed-plugin-selection.cjs +0 -1
  73. package/bin/native-module-repair.js +0 -0
  74. package/bin/node-runtime.js +0 -0
  75. package/bin/node-version.js +0 -0
  76. package/bin/plugin-bootstrap.js +56 -120
  77. package/bin/private-paths.js +11 -34
  78. package/bin/standard-tools-bootstrap.js +34 -114
  79. package/bin/turn-thinking-policy.cjs +3 -11
  80. package/bin/update-copy.js +200 -0
  81. package/bin/update-lease.js +0 -0
  82. package/bin/update-notice.js +136 -289
  83. package/bin/verify-agent-behavior.cjs +122 -0
  84. package/bin/verify-agent-components.cjs +104 -0
  85. package/bin/verify-bundled-agent-sources.cjs +57 -0
  86. package/blun.mjs +143076 -135288
  87. package/bundled-agent-sources.json +701 -0
  88. package/package.json +12 -15
  89. package/standard-skills/translate-native/README.md +1293 -0
  90. package/standard-skills/translate-native/SKILL.md +172 -22
  91. package/standard-skills/translate-native/VERSION +1 -1
  92. package/standard-skills/translate-native/agents/openai.yaml +18 -0
  93. package/standard-skills/translate-native/assets/icon.svg +8 -0
  94. package/standard-skills/translate-native/docs/BLUN_CODE_INTEGRATION.md +76 -0
  95. package/standard-skills/translate-native/docs/PREMORTEM.md +489 -0
  96. package/standard-skills/translate-native/docs/WEBSITE_LOCALIZATION.md +2035 -0
  97. package/standard-skills/translate-native/docs/WEBSITE_LOCALIZATION_API.md +1302 -0
  98. package/standard-skills/translate-native/docs/WEBSITE_LOCALIZATION_EVIDENCE_HTTP.md +136 -0
  99. package/standard-skills/translate-native/docs/WEBSITE_LOCALIZATION_HEALTH_HTTP.md +130 -0
  100. package/standard-skills/translate-native/docs/WEBSITE_LOCALIZATION_HTTP_PROVIDER.md +175 -0
  101. package/standard-skills/translate-native/docs/WEBSITE_LOCALIZATION_RECEIPT_VERIFIER_HTTP.md +86 -0
  102. package/standard-skills/translate-native/integrations/AGENT_RULES.md +32 -0
  103. package/standard-skills/translate-native/integrations/adapters/blun-code-language-guard.js +514 -0
  104. package/standard-skills/translate-native/integrations/adapters/node-language-guard.js +230 -0
  105. package/standard-skills/translate-native/integrations/audit_log.py +327 -0
  106. package/standard-skills/translate-native/integrations/claude_language_hook.js +1536 -0
  107. package/standard-skills/translate-native/integrations/commercial_localization_profile.py +42 -0
  108. package/standard-skills/translate-native/integrations/delivery-policy.example.json +28 -0
  109. package/standard-skills/translate-native/integrations/enforced_delivery.py +543 -0
  110. package/standard-skills/translate-native/integrations/guard_service.py +435 -0
  111. package/standard-skills/translate-native/integrations/language_gateway.py +67 -0
  112. package/standard-skills/translate-native/integrations/mcp_auth_headers.py +198 -0
  113. package/standard-skills/translate-native/integrations/mcp_http_gateway.py +429 -0
  114. package/standard-skills/translate-native/integrations/non_language_html_entities.js +1485 -0
  115. package/standard-skills/translate-native/integrations/pre_output_guard.py +65 -0
  116. package/standard-skills/translate-native/integrations/task_router.py +101 -0
  117. package/standard-skills/translate-native/integrations/website_localization.py +401 -0
  118. package/standard-skills/translate-native/integrations/website_localization_api.py +581 -0
  119. package/standard-skills/translate-native/integrations/website_localization_benchmark.py +1885 -0
  120. package/standard-skills/translate-native/integrations/website_localization_benchmark_campaign.py +1772 -0
  121. package/standard-skills/translate-native/integrations/website_localization_benchmark_candidate.py +506 -0
  122. package/standard-skills/translate-native/integrations/website_localization_benchmark_http.py +400 -0
  123. package/standard-skills/translate-native/integrations/website_localization_benchmark_review_store.py +781 -0
  124. package/standard-skills/translate-native/integrations/website_localization_benchmark_reviewer_http.py +500 -0
  125. package/standard-skills/translate-native/integrations/website_localization_benchmark_runtime.py +1107 -0
  126. package/standard-skills/translate-native/integrations/website_localization_benchmark_suite.py +463 -0
  127. package/standard-skills/translate-native/integrations/website_localization_cms.py +2835 -0
  128. package/standard-skills/translate-native/integrations/website_localization_cms_client.py +875 -0
  129. package/standard-skills/translate-native/integrations/website_localization_cms_dispatch.py +805 -0
  130. package/standard-skills/translate-native/integrations/website_localization_cms_http.py +588 -0
  131. package/standard-skills/translate-native/integrations/website_localization_cms_lifecycle_monitor.py +991 -0
  132. package/standard-skills/translate-native/integrations/website_localization_cms_receiver.py +1441 -0
  133. package/standard-skills/translate-native/integrations/website_localization_cms_receiver_runtime.py +414 -0
  134. package/standard-skills/translate-native/integrations/website_localization_cms_receiver_store.py +1073 -0
  135. package/standard-skills/translate-native/integrations/website_localization_cms_removal_dispatch.py +865 -0
  136. package/standard-skills/translate-native/integrations/website_localization_cms_source_client.py +583 -0
  137. package/standard-skills/translate-native/integrations/website_localization_cms_source_delivery.py +964 -0
  138. package/standard-skills/translate-native/integrations/website_localization_cms_source_delivery_runtime.py +665 -0
  139. package/standard-skills/translate-native/integrations/website_localization_cms_source_http.py +1153 -0
  140. package/standard-skills/translate-native/integrations/website_localization_cms_source_runtime.py +675 -0
  141. package/standard-skills/translate-native/integrations/website_localization_cms_source_service.py +1125 -0
  142. package/standard-skills/translate-native/integrations/website_localization_cms_terminal_notification.py +674 -0
  143. package/standard-skills/translate-native/integrations/website_localization_cms_terminal_notification_http.py +444 -0
  144. package/standard-skills/translate-native/integrations/website_localization_cms_terminal_notification_receiver.py +1469 -0
  145. package/standard-skills/translate-native/integrations/website_localization_cms_terminal_notification_receiver_runtime.py +1142 -0
  146. package/standard-skills/translate-native/integrations/website_localization_cms_terminal_processing_monitor.py +634 -0
  147. package/standard-skills/translate-native/integrations/website_localization_cms_terminal_receiver_client.py +804 -0
  148. package/standard-skills/translate-native/integrations/website_localization_deepl_baseline.py +922 -0
  149. package/standard-skills/translate-native/integrations/website_localization_evidence_http.py +482 -0
  150. package/standard-skills/translate-native/integrations/website_localization_health.py +1541 -0
  151. package/standard-skills/translate-native/integrations/website_localization_health_http.py +372 -0
  152. package/standard-skills/translate-native/integrations/website_localization_http_provider.py +297 -0
  153. package/standard-skills/translate-native/integrations/website_localization_native_reference_http.py +479 -0
  154. package/standard-skills/translate-native/integrations/website_localization_native_reference_intake.py +363 -0
  155. package/standard-skills/translate-native/integrations/website_localization_native_reference_queue.py +1449 -0
  156. package/standard-skills/translate-native/integrations/website_localization_native_reference_store.py +420 -0
  157. package/standard-skills/translate-native/integrations/website_localization_quality_profiles.py +235 -0
  158. package/standard-skills/translate-native/integrations/website_localization_queue.py +671 -0
  159. package/standard-skills/translate-native/integrations/website_localization_receipt_verifier_http.py +516 -0
  160. package/standard-skills/translate-native/integrations/website_localization_release.py +928 -0
  161. package/standard-skills/translate-native/integrations/website_localization_release_coordinator.py +1008 -0
  162. package/standard-skills/translate-native/integrations/website_localization_runner.py +276 -0
  163. package/standard-skills/translate-native/integrations/website_localization_runtime.py +862 -0
  164. package/standard-skills/translate-native/integrations/website_localization_service.py +350 -0
  165. package/standard-skills/translate-native/integrations/website_localization_supervisor.py +511 -0
  166. package/standard-skills/translate-native/integrations/website_localization_worker.py +663 -0
  167. package/standard-skills/translate-native/provenance.json +3 -4
  168. package/standard-skills/translate-native/references/commercial-localization.md +177 -0
  169. package/standard-skills/translate-native/scripts/blun_language_guard.py +7 -1
  170. package/standard-skills/translate-native/scripts/check_commercial_review.py +80 -0
  171. package/standard-skills/translate-native/scripts/commercial_localization_profile.py +333 -0
  172. package/standard-tools/language-guard/LICENSE +21 -0
  173. package/standard-tools/language-guard/VERSION +1 -0
  174. package/standard-tools/language-guard/blun_language_guard.py +7 -1
  175. package/standard-tools/language-guard/check_commercial_review.py +80 -0
  176. package/standard-tools/language-guard/commercial_localization_profile.py +333 -0
  177. package/standard-tools/language-guard/language_gateway.py +62 -0
  178. package/standard-tools/language-guard/pre_output_guard.py +64 -0
  179. package/standard-tools/language-guard/provenance.json +4 -11
  180. package/standard-tools/manifest.json +34 -11
  181. package/telegram-plugin/commands/access.md +2 -10
  182. package/telegram-plugin/dist/bridge.mjs +64041 -687
  183. package/telegram-plugin/dist/mcp-server.mjs +72810 -9027
  184. package/telegram-plugin/dist/noise.mjs +28 -63511
  185. package/agent-spine-plugin/CONTRIBUTING.md +0 -52
  186. package/agent-spine-plugin/SECURITY.md +0 -47
  187. package/agent-spine-plugin/docs/assignment-continuation.md +0 -48
  188. package/agent-spine-plugin/docs/releasing.md +0 -85
  189. package/agent-spine-plugin/docs/structured-completion.md +0 -67
  190. package/bin/abort-listener-policy.cjs +0 -43
  191. package/bin/active-steer-priority-policy.cjs +0 -24
  192. package/bin/agent-api-http-adapter.mjs +0 -446
  193. package/bin/agent-api-private-http-server.mjs +0 -288
  194. package/bin/agent-api-runtime.mjs +0 -252
  195. package/bin/agent-api-service-environment.mjs +0 -236
  196. package/bin/agent-api-service-host.mjs +0 -209
  197. package/bin/agent-api-service-process.mjs +0 -171
  198. package/bin/agent-api-session-registry.mjs +0 -428
  199. package/bin/agent-api-tool-broker.cjs +0 -248
  200. package/bin/agent-api-turn-controller.mjs +0 -461
  201. package/bin/agent-api-usage-journal.cjs +0 -259
  202. package/bin/agent-resume-snapshot.cjs +0 -241
  203. package/bin/agentspine-king-goal-inbox.mjs +0 -111
  204. package/bin/agentspine-king-goal-intake.mjs +0 -106
  205. package/bin/approval-rejection-stop.cjs +0 -15
  206. package/bin/assistant-message-offload-policy.cjs +0 -284
  207. package/bin/baseline-skill-performance-policy.cjs +0 -39
  208. package/bin/bash-search-scope-policy.cjs +0 -49
  209. package/bin/codebase-search-runtime.cjs +0 -23
  210. package/bin/cognitive-action-checkpoint.cjs +0 -1104
  211. package/bin/cognitive-attention-delivery.cjs +0 -76
  212. package/bin/cognitive-attention-policy.cjs +0 -143
  213. package/bin/cognitive-attention-runtime.cjs +0 -91
  214. package/bin/cognitive-context-projection.cjs +0 -73
  215. package/bin/cognitive-cross-portal-acceptance.cjs +0 -443
  216. package/bin/cognitive-effective-view.cjs +0 -77
  217. package/bin/cognitive-focus-projection.cjs +0 -206
  218. package/bin/cognitive-focus-scope.cjs +0 -37
  219. package/bin/cognitive-goal-autostart-policy.cjs +0 -72
  220. package/bin/cognitive-goal-time-trigger-controller.cjs +0 -146
  221. package/bin/cognitive-memory-adapter.cjs +0 -282
  222. package/bin/cognitive-memory-command.cjs +0 -293
  223. package/bin/cognitive-memory-provider.cjs +0 -92
  224. package/bin/cognitive-salience-policy.cjs +0 -159
  225. package/bin/cognitive-state-store.cjs +0 -508
  226. package/bin/cognitive-turn-lifecycle.cjs +0 -624
  227. package/bin/cognitive-work-focus.cjs +0 -180
  228. package/bin/compaction-history-archive.cjs +0 -166
  229. package/bin/compaction-history-startup.cjs +0 -50
  230. package/bin/compaction-model-policy.cjs +0 -31
  231. package/bin/compaction-stage-policy.cjs +0 -21
  232. package/bin/compaction-transaction-policy.cjs +0 -122
  233. package/bin/config-write-dedup-policy.cjs +0 -27
  234. package/bin/context-budget-ledger.cjs +0 -31
  235. package/bin/context-doctor-policy.cjs +0 -70
  236. package/bin/context-insight-policy.cjs +0 -36
  237. package/bin/context-performance-policy.cjs +0 -19
  238. package/bin/context-pressure-policy.cjs +0 -20
  239. package/bin/cron-run-output.cjs +0 -45
  240. package/bin/cron-run-store.cjs +0 -145
  241. package/bin/curiosity-scout-policy.cjs +0 -49
  242. package/bin/default-model-output-budget-policy.cjs +0 -28
  243. package/bin/durable-task-resume-policy.cjs +0 -130
  244. package/bin/durable-task-resume-runtime.cjs +0 -117
  245. package/bin/durable-task-resume-store.cjs +0 -88
  246. package/bin/editable-tool-approval-policy.cjs +0 -540
  247. package/bin/editable-tool-approval-runtime.cjs +0 -99
  248. package/bin/effective-system-prompt-cache-policy.cjs +0 -33
  249. package/bin/error-memory-performance-policy.cjs +0 -113
  250. package/bin/file-observation-policy.cjs +0 -133
  251. package/bin/foreground-output-capture-policy.cjs +0 -41
  252. package/bin/generated-source-health.cjs +0 -142
  253. package/bin/glob-pattern-policy.cjs +0 -13
  254. package/bin/goal-completion-evidence-policy.cjs +0 -120
  255. package/bin/grep-output-limit-policy.cjs +0 -39
  256. package/bin/historical-media-projection-policy.cjs +0 -48
  257. package/bin/history-offload-pressure-policy.cjs +0 -33
  258. package/bin/html-to-research-markdown.cjs +0 -147
  259. package/bin/identity-context-policy.cjs +0 -764
  260. package/bin/identity-journal-policy.cjs +0 -107
  261. package/bin/input-draft-persistence.cjs +0 -77
  262. package/bin/king-tui-function-contract.json +0 -33
  263. package/bin/launcher-restart-policy.cjs +0 -150
  264. package/bin/live-response-repetition-guard.cjs +0 -196
  265. package/bin/llm-config-log-dedup-policy.cjs +0 -76
  266. package/bin/loop-event-record-policy.cjs +0 -174
  267. package/bin/managed-context-startup-policy.cjs +0 -27
  268. package/bin/media-activity-layout-policy.cjs +0 -34
  269. package/bin/media-auto-retrieval-policy.cjs +0 -90
  270. package/bin/media-result-policy.cjs +0 -59
  271. package/bin/micro-compaction-policy.cjs +0 -145
  272. package/bin/mistake-relevance-policy.cjs +0 -319
  273. package/bin/model-retry-progress-policy.cjs +0 -46
  274. package/bin/native-large-file-io.cjs +0 -42
  275. package/bin/native-runtime-cache.cjs +0 -76
  276. package/bin/natural-presence-policy.cjs +0 -28
  277. package/bin/noninteractive-shell-env-policy.cjs +0 -19
  278. package/bin/observer-hooks.cjs +0 -14
  279. package/bin/outbound-claim-provenance.cjs +0 -150
  280. package/bin/oversized-context-offload-policy.cjs +0 -86
  281. package/bin/pending-media-policy.cjs +0 -182
  282. package/bin/pending-token-estimate-policy.cjs +0 -41
  283. package/bin/personal-memory-consent-policy.cjs +0 -72
  284. package/bin/personal-memory-performance-policy.cjs +0 -12
  285. package/bin/personality-choice-policy.cjs +0 -101
  286. package/bin/personality-memory-adapter.cjs +0 -379
  287. package/bin/personality-mode.cjs +0 -46
  288. package/bin/personality-setup-policy.cjs +0 -197
  289. package/bin/proactive-compaction-policy.cjs +0 -25
  290. package/bin/profile-identity-resolution.cjs +0 -136
  291. package/bin/profile-runtime.cjs +0 -318
  292. package/bin/profile-tool-exclusion-policy.cjs +0 -37
  293. package/bin/programmatic-context-isolation.cjs +0 -25
  294. package/bin/programmatic-tool-runtime.mjs +0 -627
  295. package/bin/provider-idle-timeout-policy.cjs +0 -14
  296. package/bin/provider-model-refresh-deadline.cjs +0 -53
  297. package/bin/provider-model-refresh-policy.cjs +0 -107
  298. package/bin/rate-limit-recovery-policy.cjs +0 -47
  299. package/bin/read-batch-policy.cjs +0 -32
  300. package/bin/read-continuation-policy.cjs +0 -59
  301. package/bin/recurring-cron-history-policy.cjs +0 -124
  302. package/bin/relationship-continuity-policy.cjs +0 -143
  303. package/bin/relationship-curiosity-policy.cjs +0 -107
  304. package/bin/relationship-learning-policy.cjs +0 -168
  305. package/bin/release-artifact-freeze-policy.cjs +0 -30
  306. package/bin/reload-plugin-bootstrap.cjs +0 -18
  307. package/bin/reload-queue-policy.cjs +0 -38
  308. package/bin/repeated-assistant-response-policy.cjs +0 -232
  309. package/bin/repeated-injection-projection.cjs +0 -107
  310. package/bin/repeated-user-message-projection.cjs +0 -8
  311. package/bin/research-page-result.cjs +0 -74
  312. package/bin/retry-checkpoint-policy.cjs +0 -13
  313. package/bin/runtime-exit-ledger.cjs +0 -144
  314. package/bin/scoped-cron-run-policy.cjs +0 -358
  315. package/bin/session-checkpoint-policy.cjs +0 -25
  316. package/bin/session-compaction-policy.cjs +0 -84
  317. package/bin/session-replay-policy.cjs +0 -20
  318. package/bin/session-replay-window-policy.cjs +0 -40
  319. package/bin/session-resume-checkpoint.cjs +0 -254
  320. package/bin/session-scrollback-archive.cjs +0 -229
  321. package/bin/skill-activation-performance-policy.cjs +0 -69
  322. package/bin/skill-listing-performance-policy.cjs +0 -92
  323. package/bin/soul-organization-policy.cjs +0 -78
  324. package/bin/soul-preservation-policy.cjs +0 -20
  325. package/bin/startup-preferences.cjs +0 -131
  326. package/bin/streaming-flush-performance-policy.cjs +0 -28
  327. package/bin/structured-agent-swarm-output.cjs +0 -325
  328. package/bin/structured-subagent-output.cjs +0 -252
  329. package/bin/subagent-context-fork-policy.cjs +0 -155
  330. package/bin/subagent-max-tokens-handoff-policy.cjs +0 -69
  331. package/bin/subagent-parent-responsiveness.cjs +0 -19
  332. package/bin/subagent-skill-policy.cjs +0 -206
  333. package/bin/subagent-timeout-policy.cjs +0 -182
  334. package/bin/subagent-tool-policy.cjs +0 -60
  335. package/bin/subagent-usage-rollup-policy.cjs +0 -29
  336. package/bin/system-prompt-context-policy.cjs +0 -124
  337. package/bin/system-prompt-token-cache-policy.cjs +0 -60
  338. package/bin/telegram-addressed-focus.cjs +0 -55
  339. package/bin/telegram-addressed-priority.cjs +0 -12
  340. package/bin/telegram-approval-relay.cjs +0 -290
  341. package/bin/telegram-bot-priority.cjs +0 -17
  342. package/bin/telegram-console-status-policy.cjs +0 -174
  343. package/bin/telegram-context-projection-policy.cjs +0 -141
  344. package/bin/telegram-delivery-lifecycle.cjs +0 -125
  345. package/bin/telegram-direct-focus-policy.cjs +0 -273
  346. package/bin/telegram-mcp-compatibility.cjs +0 -49
  347. package/bin/telegram-media-delivery-policy.cjs +0 -42
  348. package/bin/telegram-private-conversation-policy.cjs +0 -185
  349. package/bin/telegram-queue-handoff-policy.cjs +0 -73
  350. package/bin/telegram-remote-status-policy.cjs +0 -120
  351. package/bin/telegram-session-queue-runtime.mjs +0 -306
  352. package/bin/telegram-text-chunk-policy.cjs +0 -63
  353. package/bin/telegram-truncated-reply-policy.cjs +0 -37
  354. package/bin/telegram-urgent-policy.cjs +0 -45
  355. package/bin/telemetry-spool-policy.cjs +0 -57
  356. package/bin/thinking-activity-status-policy.cjs +0 -132
  357. package/bin/thinking-only-guard.cjs +0 -80
  358. package/bin/todo-list-turn-policy.cjs +0 -131
  359. package/bin/tool-call-loop-policy.cjs +0 -51
  360. package/bin/tool-file-persistence.cjs +0 -141
  361. package/bin/tool-result-offload-policy.cjs +0 -359
  362. package/bin/tool-result-offload-telemetry.cjs +0 -12
  363. package/bin/tool-schema-token-cache-policy.cjs +0 -41
  364. package/bin/tool-stream-preview-policy.cjs +0 -9
  365. package/bin/tui-functional-contract.cjs +0 -55
  366. package/bin/turn-tool-performance-policy.cjs +0 -486
  367. package/bin/usage-cache-efficiency-policy.cjs +0 -26
  368. package/bin/user-home-path-policy.cjs +0 -13
  369. package/bin/user-message-offload-policy.cjs +0 -103
  370. package/bin/user-prompt-hook-origin-policy.cjs +0 -34
  371. package/bin/user-tool-record-policy.cjs +0 -7
  372. package/bin/validated-learning-insight-policy.cjs +0 -58
  373. package/bin/validated-learning-outcome-trace.cjs +0 -107
  374. package/bin/validated-learning-performance-policy.cjs +0 -53
  375. package/bin/validated-learning-signal.cjs +0 -463
  376. package/bin/windows-bash-dialect-policy.cjs +0 -25
  377. package/bin/windows-node-crash-dump.cjs +0 -110
  378. package/bin/write-continuation-policy.cjs +0 -69
  379. package/codebase-index/README.md +0 -82
  380. package/codebase-index/codebase_index.py +0 -470
  381. package/standard-skills/agent-browser/SKILL.md +0 -19
  382. package/standard-skills/agent-browser/references/runtime.md +0 -8
  383. package/standard-skills/blun-session-inspector/SKILL.md +0 -41
  384. package/standard-skills/blun-session-inspector/scripts/inspect-session.cjs +0 -437
  385. package/standard-skills/design-taste-frontend/SKILL.md +0 -1206
  386. package/standard-skills/full-output-enforcement/SKILL.md +0 -49
  387. package/standard-skills/high-end-visual-design/SKILL.md +0 -98
  388. package/standard-skills/image-to-code/SKILL.md +0 -1228
  389. package/standard-skills/industrial-brutalist-ui/SKILL.md +0 -92
  390. package/standard-skills/minimalist-ui/SKILL.md +0 -85
  391. package/standard-skills/motion-design-taste/SKILL.md +0 -74
  392. package/standard-skills/playwright-testing/SKILL.md +0 -19
  393. package/standard-skills/playwright-testing/references/runtime.md +0 -7
  394. package/standard-skills/premortem/SKILL.md +0 -148
  395. package/standard-skills/redesign-existing-projects/SKILL.md +0 -178
  396. package/standard-skills/research-evidence/SKILL.md +0 -39
  397. package/standard-skills/research-evidence/references/evidence-format.md +0 -104
  398. package/standard-skills/research-evidence/scripts/evidence-collection.cjs +0 -260
  399. package/standard-skills/research-evidence/scripts/score-report.cjs +0 -130
  400. package/standard-skills/screenshot-lesen/SKILL.md +0 -52
  401. package/standard-skills/stitch-design-taste/DESIGN.md +0 -121
  402. package/standard-skills/stitch-design-taste/SKILL.md +0 -184
  403. package/standard-skills/telegram-channel/SKILL.md +0 -18
  404. package/standard-skills/telegram-channel/references/runtime.md +0 -7
  405. package/standard-skills/venture-flywheel/SKILL.md +0 -32
  406. package/standard-skills/venture-flywheel/identity/project-identity.cjs +0 -146
  407. package/standard-skills/venture-flywheel/policy/capability-engine.cjs +0 -114
  408. package/standard-skills/venture-flywheel/policy/repository-trust.cjs +0 -229
  409. package/standard-skills/venture-flywheel/references/BEISPIELE-phase0.md +0 -146
  410. package/standard-skills/venture-flywheel/references/CAPABILITY-MAP.md +0 -34
  411. package/standard-skills/venture-flywheel/references/SPEC-phase0-identity-trust.md +0 -77
  412. package/standard-skills/venture-flywheel/references/SPEC-phase0-state-events.md +0 -93
  413. package/standard-skills/venture-flywheel/schemas/capability-decision.schema.json +0 -13
  414. package/standard-skills/venture-flywheel/schemas/execution-event.schema.json +0 -44
  415. package/standard-skills/venture-flywheel/schemas/project-identity.schema.json +0 -32
  416. package/standard-skills/venture-flywheel/schemas/repository-trust.schema.json +0 -57
  417. package/standard-skills/venture-flywheel/schemas/run-transition.schema.json +0 -59
  418. package/standard-skills/venture-flywheel/state/execution-event.cjs +0 -191
  419. package/standard-skills/venture-flywheel/state/task-state-machine.cjs +0 -190
  420. package/standard-skills/web-lesen/SKILL.md +0 -73
  421. package/standard-skills/web-lesen/scripts/crawl_public.py +0 -379
  422. package/standard-skills/windows-mcp/SKILL.md +0 -19
  423. package/standard-skills/windows-mcp/references/runtime.md +0 -9
  424. package/telegram-plugin/DELIVERY.md +0 -36
  425. package/telegram-plugin/bin/telegram-approval-relay.cjs +0 -290
  426. package/telegram-plugin/bin/telegram-console-status-policy.cjs +0 -175
  427. package/telegram-plugin/bin/telegram-delivery-lifecycle.cjs +0 -125
  428. package/telegram-plugin/bin/telegram-direct-reply-policy.cjs +0 -48
  429. package/telegram-plugin/bin/telegram-launcher-status-queue.cjs +0 -122
  430. package/telegram-plugin/bin/telegram-private-conversation-policy.cjs +0 -186
  431. package/telegram-plugin/bin/telegram-remote-status-policy.cjs +0 -121
  432. package/telegram-plugin/bin/telegram-reply-parts.cjs +0 -149
  433. package/telegram-plugin/bin/telegram-text-chunk-policy.cjs +0 -63
  434. package/telegram-plugin/bin/telegram-typing-keepalive.cjs +0 -89
  435. package/telegram-plugin/compat/mcp-server-fa511cd1.mjs +0 -73825
  436. /package/{bin → scripts}/fix-node-pty-perms.js +0 -0
@@ -3,62 +3,18 @@
3
3
  const { randomUUID } = require('node:crypto');
4
4
  const fs = require('node:fs');
5
5
  const path = require('node:path');
6
- const { snapshotPluginTree, digestPluginEntries, selectedAgentSpineRoot } = require('./managed-plugin-selection.cjs');
6
+ const { selectedAgentSpineRoot, describeAgentSpineSelection, copySelectedAgentSpinePlugin } = require('./managed-plugin-selection.cjs');
7
7
 
8
8
  const {
9
9
  ensurePrivateDirectory,
10
10
  securePrivateFile,
11
- securePrivateTree,
12
11
  writePrivateFile,
13
12
  } = require('./private-paths');
14
13
 
15
- const managedPluginSourceSnapshots = new Map();
16
-
17
14
  function isObject(value) {
18
15
  return typeof value === 'object' && value !== null && !Array.isArray(value);
19
16
  }
20
17
 
21
- function snapshotManagedPluginSource(root) {
22
- const resolvedRoot = path.resolve(root);
23
- const cacheKey = process.platform === 'win32' ? resolvedRoot.toLowerCase() : resolvedRoot;
24
- if (!managedPluginSourceSnapshots.has(cacheKey)) {
25
- managedPluginSourceSnapshots.set(cacheKey, snapshotPluginTree(resolvedRoot));
26
- }
27
- return managedPluginSourceSnapshots.get(cacheKey);
28
- }
29
-
30
- function pluginTreesAreIdentical(sourceRoot, pluginRoot) {
31
- try {
32
- const source = snapshotManagedPluginSource(sourceRoot);
33
- const installed = snapshotPluginTree(pluginRoot);
34
- if (source === null || installed === null || source.length !== installed.length) return false;
35
- return source.every((entry, index) => {
36
- const other = installed[index];
37
- return entry.kind === other.kind
38
- && entry.path === other.path
39
- && (entry.kind !== 'file' || entry.content.equals(other.content));
40
- });
41
- } catch {
42
- return false;
43
- }
44
- }
45
-
46
- function pluginTreeDigest(root) {
47
- const entries = snapshotManagedPluginSource(root);
48
- if (entries === null) throw new Error(`Invalid managed plugin tree: ${root}`);
49
- return digestPluginEntries(entries);
50
- }
51
-
52
- function hasCurrentPluginRecord(installed, pluginRoot, pluginId, mcpServerName) {
53
- const records = installed.plugins.filter((plugin) => plugin.id === pluginId);
54
- if (records.length !== 1) return false;
55
- const [plugin] = records;
56
- return plugin.root === pluginRoot
57
- && plugin.source === 'local-path'
58
- && plugin.enabled === true
59
- && plugin.capabilities?.mcpServers?.[mcpServerName]?.enabled === true;
60
- }
61
-
62
18
  function readInstalledPlugins(filePath) {
63
19
  if (!fs.existsSync(filePath)) return { version: 1, plugins: [] };
64
20
 
@@ -70,14 +26,14 @@ function readInstalledPlugins(filePath) {
70
26
  return parsed;
71
27
  }
72
28
 
73
- function updatedInstalledPlugins(installed, pluginRoot, now, pluginId, mcpServerName) {
29
+ function updatedInstalledPlugins(installed, pluginRoot, now, pluginId = 'telegram') {
74
30
  const previous = installed.plugins.find((plugin) => plugin.id === pluginId);
75
31
  const previousCapabilities = isObject(previous?.capabilities) ? previous.capabilities : {};
76
32
  const previousMcpServers = isObject(previousCapabilities.mcpServers)
77
33
  ? previousCapabilities.mcpServers : {};
78
- const previousMcp = isObject(previousMcpServers[mcpServerName])
79
- ? previousMcpServers[mcpServerName] : {};
80
- const updatedPlugin = {
34
+ const previousTelegramMcp = isObject(previousMcpServers[pluginId])
35
+ ? previousMcpServers[pluginId] : {};
36
+ const telegram = {
81
37
  ...previous,
82
38
  id: pluginId,
83
39
  root: pluginRoot,
@@ -90,7 +46,7 @@ function updatedInstalledPlugins(installed, pluginRoot, now, pluginId, mcpServer
90
46
  ...previousCapabilities,
91
47
  mcpServers: {
92
48
  ...previousMcpServers,
93
- [mcpServerName]: { ...previousMcp, enabled: true },
49
+ [pluginId]: { ...previousTelegramMcp, enabled: previousTelegramMcp.enabled === false && pluginId === 'agent-spine' ? false : true },
94
50
  },
95
51
  },
96
52
  };
@@ -101,11 +57,11 @@ function updatedInstalledPlugins(installed, pluginRoot, now, pluginId, mcpServer
101
57
  if (plugin.id !== pluginId) {
102
58
  plugins.push(plugin);
103
59
  } else if (!replaced) {
104
- plugins.push(updatedPlugin);
60
+ plugins.push(telegram);
105
61
  replaced = true;
106
62
  }
107
63
  }
108
- if (!replaced) plugins.push(updatedPlugin);
64
+ if (!replaced) plugins.push(telegram);
109
65
  return { ...installed, version: 1, plugins };
110
66
  }
111
67
 
@@ -123,100 +79,80 @@ function writeInstalledPlugins(filePath, installed) {
123
79
  }
124
80
  }
125
81
 
126
- function installManagedPlugin({
127
- packageRoot,
128
- blunDir,
129
- now = new Date().toISOString(),
130
- pluginId,
131
- sourceDirectory,
132
- mcpServerName,
133
- displayName,
134
- }) {
135
- const sourceRoot = path.join(packageRoot, sourceDirectory);
82
+ function installManagedTelegramPlugin({ packageRoot, blunDir, now = new Date().toISOString() }) {
83
+ const sourceRoot = path.join(packageRoot, 'telegram-plugin');
136
84
  const pluginsDir = path.join(blunDir, 'plugins');
137
85
  const managedDir = path.join(pluginsDir, 'managed');
138
- const legacyPluginRoot = path.join(managedDir, pluginId);
86
+ const pluginRoot = path.join(managedDir, 'telegram');
139
87
  const installedFile = path.join(pluginsDir, 'installed.json');
140
88
 
141
89
  ensurePrivateDirectory(pluginsDir);
142
90
  if (fs.existsSync(installedFile)) securePrivateFile(installedFile);
143
91
  const installed = readInstalledPlugins(installedFile);
92
+ const updatedInstalled = updatedInstalledPlugins(installed, pluginRoot, now);
144
93
  ensurePrivateDirectory(managedDir);
145
- if (pluginId === 'agent-spine') {
146
- const selected = selectedAgentSpineRoot({ installed, blunDir });
147
- if (selected) return { installedFile, pluginRoot: selected, reused: true, selected: true };
148
- }
149
- if (fs.existsSync(legacyPluginRoot)
150
- && pluginTreesAreIdentical(sourceRoot, legacyPluginRoot)) {
151
- if (!hasCurrentPluginRecord(installed, legacyPluginRoot, pluginId, mcpServerName)) {
152
- const updatedInstalled = updatedInstalledPlugins(
153
- installed,
154
- legacyPluginRoot,
155
- now,
156
- pluginId,
157
- mcpServerName,
158
- );
159
- writeInstalledPlugins(installedFile, updatedInstalled);
160
- }
161
- return { installedFile, pluginRoot: legacyPluginRoot, reused: true };
162
- }
163
- const sourceDigest = pluginTreeDigest(sourceRoot);
164
- const pluginRoot = path.join(managedDir, `${pluginId}-${sourceDigest}`);
165
- const updatedInstalled = updatedInstalledPlugins(
166
- installed,
167
- pluginRoot,
168
- now,
169
- pluginId,
170
- mcpServerName,
171
- );
172
- if (fs.existsSync(pluginRoot)) {
173
- if (!pluginTreesAreIdentical(sourceRoot, pluginRoot)) {
174
- throw new Error(`Managed ${displayName} plugin digest mismatch: ${pluginRoot}`);
175
- }
176
- if (!hasCurrentPluginRecord(installed, pluginRoot, pluginId, mcpServerName)) {
177
- writeInstalledPlugins(installedFile, updatedInstalled);
178
- }
179
- return { installedFile, pluginRoot, reused: true };
180
- }
181
94
  const nonce = `${process.pid}-${randomUUID()}`;
182
- const stagingRoot = path.join(managedDir, `.${pluginId}-${nonce}.tmp`);
95
+ const stagingRoot = path.join(managedDir, `.telegram-${nonce}.tmp`);
96
+ const backupRoot = path.join(managedDir, `.telegram-${nonce}.bak`);
97
+ let hadPreviousPlugin = false;
183
98
  let installedNewPlugin = false;
184
99
  try {
100
+ if (fs.existsSync(pluginRoot)) {
101
+ ensurePrivateDirectory(pluginRoot);
102
+ hadPreviousPlugin = true;
103
+ }
185
104
  fs.cpSync(sourceRoot, stagingRoot, { recursive: true, force: true });
186
- securePrivateTree(stagingRoot);
105
+ if (hadPreviousPlugin) fs.renameSync(pluginRoot, backupRoot);
187
106
  try {
188
107
  fs.renameSync(stagingRoot, pluginRoot);
189
108
  installedNewPlugin = true;
190
109
  writeInstalledPlugins(installedFile, updatedInstalled);
191
110
  } catch (error) {
192
111
  if (installedNewPlugin) fs.rmSync(pluginRoot, { recursive: true, force: true });
112
+ if (hadPreviousPlugin && fs.existsSync(backupRoot)) {
113
+ fs.renameSync(backupRoot, pluginRoot);
114
+ }
193
115
  throw error;
194
116
  }
117
+ if (hadPreviousPlugin) fs.rmSync(backupRoot, { recursive: true, force: true });
195
118
  } finally {
196
119
  fs.rmSync(stagingRoot, { recursive: true, force: true });
197
120
  }
198
121
 
199
- return { installedFile, pluginRoot, reused: false };
200
- }
201
-
202
- function installManagedTelegramPlugin(options) {
203
- return installManagedPlugin({
204
- ...options,
205
- pluginId: 'telegram',
206
- sourceDirectory: 'telegram-plugin',
207
- mcpServerName: 'telegram',
208
- displayName: 'Telegram',
209
- });
122
+ return { installedFile, pluginRoot };
210
123
  }
211
124
 
212
- function installManagedAgentSpinePlugin(options) {
213
- return installManagedPlugin({
214
- ...options,
215
- pluginId: 'agent-spine',
216
- sourceDirectory: 'agent-spine-plugin',
217
- mcpServerName: 'agent-spine',
218
- displayName: 'AgentSpine',
219
- });
125
+ function installManagedAgentSpinePlugin({ packageRoot, blunDir, now = new Date().toISOString() }) {
126
+ const installedFile = path.join(blunDir, 'plugins', 'installed.json');
127
+ ensurePrivateDirectory(path.dirname(installedFile));
128
+ if (fs.existsSync(installedFile)) securePrivateFile(installedFile);
129
+ const installed = readInstalledPlugins(installedFile);
130
+ const records = installed.plugins.filter(plugin => plugin.id === 'agent-spine');
131
+ if (records.length > 1) throw new Error('Ambiguous AgentSpine registration');
132
+ const selected = selectedAgentSpineRoot({ installed, blunDir });
133
+ if (selected) return { installedFile, pluginRoot: selected, reused: true, selected: true };
134
+ if (records[0]?.enabled === false) {
135
+ return { installedFile, pluginRoot: records[0].root, reused: true, disabled: true };
136
+ }
137
+ if (records[0]) {
138
+ const currentRoot = records[0].root;
139
+ if (typeof currentRoot !== 'string' || !path.isAbsolute(currentRoot)) {
140
+ throw new Error('Invalid AgentSpine registration root');
141
+ }
142
+ const managed = path.resolve(blunDir, 'plugins', 'managed');
143
+ const sameDirectory = (left, right) => process.platform === 'win32'
144
+ ? left.toLowerCase() === right.toLowerCase() : left === right;
145
+ if (!sameDirectory(path.dirname(path.resolve(currentRoot)), managed)
146
+ || !/^agent-spine-[a-f0-9]{64}$/.test(path.basename(currentRoot))) {
147
+ return { installedFile, pluginRoot: currentRoot, reused: true, custom: true };
148
+ }
149
+ // An upgrade must not conceal changes to the previous immutable default.
150
+ describeAgentSpineSelection({ blunDir, pluginRoot: currentRoot });
151
+ }
152
+ const pluginRoot = copySelectedAgentSpinePlugin({ blunDir, sourceRoot: path.join(packageRoot, 'agent-spine-plugin') });
153
+ if (records[0]?.root === pluginRoot) return { installedFile, pluginRoot, reused: true };
154
+ writeInstalledPlugins(installedFile, updatedInstalledPlugins(installed, pluginRoot, now, 'agent-spine'));
155
+ return { installedFile, pluginRoot, reused: false };
220
156
  }
221
157
 
222
158
  module.exports = {
@@ -11,7 +11,6 @@ const PRIVATE_TREE_MAX_DEPTH = 64;
11
11
  const PRIVATE_TREE_MAX_ENTRIES = 4096;
12
12
  const PRIVATE_TREE_MAX_PATH_LENGTH = 4096;
13
13
  const WINDOWS_ACL_OK_SENTINEL = 'BLUN_PRIVATE_ACL_OK_V1';
14
- const WINDOWS_ACL_ERROR_SENTINEL = 'BLUN_PRIVATE_ACL_ERROR_V1';
15
14
  const WINDOWS_SID_PATTERN = /S-\d-\d+(?:-\d+)+/gi;
16
15
  const WINDOWS_LOCAL_DOS_PATH_PATTERN = /^[A-Za-z]:\\/u;
17
16
  const WINDOWS_RESERVED_PATH_SEGMENT = /^(?:CON|PRN|AUX|NUL|CONIN\$|CONOUT\$|COM[1-9]|LPT[1-9])(?:\..*)?$/iu;
@@ -34,9 +33,6 @@ public static class BlunPrivateAclNative
34
33
  private const uint READ_CONTROL = 0x00020000;
35
34
  private const uint WRITE_DAC = 0x00040000;
36
35
  private const uint SYNCHRONIZE = 0x00100000;
37
- private const uint FILE_SHARE_READ = 0x00000001;
38
- private const uint FILE_SHARE_WRITE = 0x00000002;
39
- private const uint FILE_SHARE_DELETE = 0x00000004;
40
36
  private const uint CREATE_NEW = 1;
41
37
  private const uint OPEN_EXISTING = 3;
42
38
  private const uint FILE_ATTRIBUTE_NORMAL = 0x00000080;
@@ -611,7 +607,7 @@ public static class BlunPrivateAclNative
611
607
  out ioStatus,
612
608
  IntPtr.Zero,
613
609
  0,
614
- FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
610
+ 0,
615
611
  FILE_OPEN_IF,
616
612
  FILE_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT | FILE_OPEN_REPARSE_POINT,
617
613
  IntPtr.Zero,
@@ -1112,7 +1108,7 @@ const WINDOWS_ACL_SCRIPT = [
1112
1108
  "[Console]::Out.Write('BLUN_PRIVATE_ACL_OK_V1')",
1113
1109
  'exit 0',
1114
1110
  '} catch {',
1115
- "[Console]::Error.Write('BLUN_PRIVATE_ACL_ERROR_V1|' + $_.Exception.GetType().FullName + '|' + $_.Exception.Message)",
1111
+ "[Console]::Error.Write('BLUN_PRIVATE_ACL_ERROR_V1')",
1116
1112
  'exit 1',
1117
1113
  '}',
1118
1114
  ].join('\n');
@@ -1131,18 +1127,9 @@ function windowsSystemDirectory(options) {
1131
1127
  return path.win32.normalize(directory);
1132
1128
  }
1133
1129
 
1134
- function windowsHostEnvironment(systemDirectory, env = process.env) {
1130
+ function windowsHostEnvironment(systemDirectory) {
1135
1131
  const systemRoot = path.win32.dirname(systemDirectory);
1136
- const temporaryDirectory = env.TEMP || env.TMP;
1137
- if (!temporaryDirectory) {
1138
- throw new Error('Windows private ACL temporary directory is unavailable.');
1139
- }
1140
- return {
1141
- SystemRoot: systemRoot,
1142
- WINDIR: systemRoot,
1143
- TEMP: temporaryDirectory,
1144
- TMP: env.TMP || temporaryDirectory,
1145
- };
1132
+ return { SystemRoot: systemRoot, WINDIR: systemRoot };
1146
1133
  }
1147
1134
 
1148
1135
  function runWindowsCommand(executable, args, options, env, input) {
@@ -1203,14 +1190,14 @@ function resolveWindowsPrivateTarget(targetPath) {
1203
1190
  throw new Error('Invalid Windows private path.');
1204
1191
  }
1205
1192
  return absoluteTarget;
1206
- } catch (error) {
1207
- throw new Error('Windows private path validation failed.', { cause: error });
1193
+ } catch {
1194
+ throw new Error('Windows private ACL hardening or verification failed.');
1208
1195
  }
1209
1196
  }
1210
1197
 
1211
1198
  function windowsAclController(options) {
1212
1199
  const systemDirectory = windowsSystemDirectory(options);
1213
- const hostEnvironment = windowsHostEnvironment(systemDirectory, options.env || process.env);
1200
+ const hostEnvironment = windowsHostEnvironment(systemDirectory);
1214
1201
  const whoami = path.win32.join(systemDirectory, 'whoami.exe');
1215
1202
  const powershell = path.win32.join(
1216
1203
  systemDirectory,
@@ -1248,7 +1235,7 @@ function windowsAclController(options) {
1248
1235
  if (!path.isAbsolute(absoluteTarget)
1249
1236
  || root.toLowerCase() === absoluteTarget.toLowerCase()
1250
1237
  || !['directory', 'file', 'file-write', 'tree'].includes(kind)) {
1251
- throw new Error('Windows private ACL target validation failed.');
1238
+ throw new Error('Windows private ACL hardening or verification failed.');
1252
1239
  }
1253
1240
  const env = {
1254
1241
  ...hostEnvironment,
@@ -1266,21 +1253,11 @@ function windowsAclController(options) {
1266
1253
  env,
1267
1254
  input,
1268
1255
  );
1269
- } catch (error) {
1270
- const stderr = typeof error?.stderr === 'string'
1271
- ? error.stderr : Buffer.isBuffer(error?.stderr) ? error.stderr.toString('utf8') : '';
1272
- const marker = `${WINDOWS_ACL_ERROR_SENTINEL}|`;
1273
- const rawDetail = stderr.startsWith(marker) ? stderr.slice(marker.length) : '';
1274
- const detail = rawDetail.replace(/[\u0000-\u001f\u007f]+/gu, ' ').trim().slice(0, 500);
1275
- throw new Error(
1276
- detail.length > 0
1277
- ? `Windows private ACL operation failed for ${kind} target "${absoluteTarget}": ${detail}`
1278
- : `Windows private ACL operation failed for ${kind} target "${absoluteTarget}".`,
1279
- { cause: error },
1280
- );
1256
+ } catch {
1257
+ throw new Error('Windows private ACL hardening or verification failed.');
1281
1258
  }
1282
1259
  if (output !== WINDOWS_ACL_OK_SENTINEL) {
1283
- throw new Error('Windows private ACL verification returned an unexpected response.');
1260
+ throw new Error('Windows private ACL hardening or verification failed.');
1284
1261
  }
1285
1262
  } finally {
1286
1263
  input?.fill(0);
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const { createHash, randomUUID } = require('node:crypto');
3
+ const { randomUUID } = require('node:crypto');
4
4
  const fs = require('node:fs');
5
5
  const path = require('node:path');
6
6
 
@@ -31,9 +31,6 @@ function readCatalogue(packageRoot) {
31
31
  || !tool.platforms.every((platform) => platform === 'darwin' || platform === 'win32'))) {
32
32
  throw new Error(`Ungueltige Standard-Tool-Plattform: ${name}`);
33
33
  }
34
- if (tool.autoEnable !== undefined && typeof tool.autoEnable !== 'boolean') {
35
- throw new Error(`Ungueltiger Standard-Tool-Autostart: ${name}`);
36
- }
37
34
  if (tool.owner === 'user-mcp'
38
35
  && (!isObject(tool.config) || typeof tool.config.enabled !== 'boolean')) {
39
36
  throw new Error(`Standard-Tool braucht einen Aktivierungszustand: ${name}`);
@@ -98,24 +95,10 @@ function recognizedBundledServer(name, current, expected) {
98
95
  && /^@upstash\/context7-mcp(?:@[^\s]+)?$/u.test(current.args[1] ?? '');
99
96
  }
100
97
 
101
- function migrateBundledTimeouts(name, current, expected) {
98
+ function migrateBundledTool(name, current, expected) {
102
99
  if (!recognizedBundledServer(name, current, expected)) return false;
103
100
  let changed = false;
104
- if (name === 'context7') {
105
- if (expected.blunExplicitlyEnabled === true) {
106
- if (current.enabled !== true) {
107
- current.enabled = true;
108
- changed = true;
109
- }
110
- if (current.blunExplicitlyEnabled !== true) {
111
- current.blunExplicitlyEnabled = true;
112
- changed = true;
113
- }
114
- } else if (current.blunExplicitlyEnabled !== true && current.enabled !== false) {
115
- current.enabled = false;
116
- changed = true;
117
- }
118
- } else if (current.enabled === false) {
101
+ if (current.enabled === false && name !== 'blun-language-guard') {
119
102
  current.enabled = true;
120
103
  changed = true;
121
104
  }
@@ -151,16 +134,9 @@ function writeMcpDocument(configPath, document) {
151
134
  }
152
135
  }
153
136
 
154
- function bundledToolConfig(name, tool, {
155
- packageRoot,
156
- blunDir,
157
- platform,
158
- env,
159
- forceEnable,
160
- }) {
137
+ function bundledToolConfig(name, tool, { packageRoot, blunDir, platform, env }) {
161
138
  const config = structuredClone(tool.config);
162
- config.enabled = forceEnable || tool.autoEnable !== false;
163
- if (forceEnable && tool.autoEnable === false) config.blunExplicitlyEnabled = true;
139
+ config.enabled = true;
164
140
  if (name === 'blun-language-guard') {
165
141
  config.command = platform === 'win32' ? 'python' : 'python3';
166
142
  config.args = [
@@ -209,7 +185,6 @@ function seedStandardTools({
209
185
  names,
210
186
  platform = process.platform,
211
187
  env = process.env,
212
- forceEnable = false,
213
188
  }) {
214
189
  const catalogue = readCatalogue(packageRoot);
215
190
  if (!Array.isArray(names) || names.length === 0) {
@@ -240,10 +215,9 @@ function seedStandardTools({
240
215
  blunDir,
241
216
  platform,
242
217
  env,
243
- forceEnable,
244
218
  });
245
219
  if (Object.hasOwn(servers, name)) {
246
- if (migrateBundledTimeouts(name, servers[name], expected)) updated.push(name);
220
+ if (migrateBundledTool(name, servers[name], expected)) updated.push(name);
247
221
  continue;
248
222
  }
249
223
  if (hasEquivalentServer(servers, name, tool)) continue;
@@ -251,102 +225,48 @@ function seedStandardTools({
251
225
  added.push(name);
252
226
  }
253
227
 
254
- if (added.length > 0 || updated.length > 0) writeMcpDocument(configPath, { ...document, mcpServers: servers });
228
+ if (added.length > 0 || updated.length > 0) {
229
+ writeMcpDocument(configPath, { ...document, mcpServers: servers });
230
+ }
255
231
  return { added, updated, configPath };
256
232
  }
257
233
 
258
-
259
-
260
- function seedStandardSkills({ packageRoot, blunDir }) {
261
- const sourceRoot = path.join(packageRoot, 'standard-skills');
262
- const sourceRootStat = fs.lstatSync(sourceRoot);
263
- if (!sourceRootStat.isDirectory() || sourceRootStat.isSymbolicLink()) {
264
- throw new Error(`Ungueltiges BLUN-Standard-Skill-Verzeichnis: ${sourceRoot}`);
234
+ function seedStandardDesignSkill({ packageRoot, blunDir }) {
235
+ const sourcePath = path.join(
236
+ packageRoot,
237
+ 'standard-skills',
238
+ 'blun-app-design-system',
239
+ );
240
+ const sourceStat = fs.lstatSync(sourcePath);
241
+ if (!sourceStat.isDirectory() || sourceStat.isSymbolicLink()) {
242
+ throw new Error(`Ungueltiger BLUN-Standard-Skill: ${sourcePath}`);
265
243
  }
244
+
266
245
  const skillsDir = path.join(blunDir, 'skills');
267
246
  ensurePrivateDirectory(skillsDir);
268
- const markerPath = path.join(skillsDir, '.blun-standard-skills.json');
269
- const installed = [];
270
- const updated = [];
271
- const destinationPaths = [];
272
-
273
- const entries = fs.readdirSync(sourceRoot, { withFileTypes: true })
274
- .filter((entry) => entry.isDirectory() && !entry.isSymbolicLink())
275
- .sort((left, right) => left.name.localeCompare(right.name));
276
- const fingerprint = createHash('sha256');
277
- const visit = (directory, relative = '') => {
278
- for (const entry of fs.readdirSync(directory, { withFileTypes: true })
279
- .sort((left, right) => left.name.localeCompare(right.name))) {
280
- const sourcePath = path.join(directory, entry.name);
281
- const relativePath = path.join(relative, entry.name).replaceAll('\\', '/');
282
- if (entry.isSymbolicLink()) throw new Error(`Symlink im BLUN-Standard-Skill: ${sourcePath}`);
283
- fingerprint.update(relativePath);
284
- if (entry.isDirectory()) visit(sourcePath, relativePath);
285
- else if (entry.isFile()) fingerprint.update(fs.readFileSync(sourcePath));
286
- else throw new Error(`Ungueltiger Eintrag im BLUN-Standard-Skill: ${sourcePath}`);
287
- }
288
- };
289
- visit(sourceRoot);
290
- const sourceFingerprint = fingerprint.digest('hex');
291
- let marker = null;
292
- try {
293
- marker = JSON.parse(fs.readFileSync(markerPath, 'utf8'));
294
- } catch {
295
- marker = null;
296
- }
297
- const allDestinationsExist = entries.every((entry) => {
298
- const destinationPath = path.join(skillsDir, entry.name);
299
- destinationPaths.push(destinationPath);
300
- if (!fs.existsSync(destinationPath)) return false;
301
- const stat = fs.lstatSync(destinationPath);
302
- return stat.isDirectory() && !stat.isSymbolicLink();
303
- });
304
- if (marker?.fingerprint === sourceFingerprint && allDestinationsExist) {
305
- return { installed, updated, destinationPaths, unchanged: true };
306
- }
307
- destinationPaths.length = 0;
308
-
309
- for (const entry of entries) {
310
- const sourcePath = path.join(sourceRoot, entry.name);
311
- const destinationPath = path.join(skillsDir, entry.name);
312
- const isInstalled = !fs.existsSync(destinationPath);
313
- if (!isInstalled) {
314
- const destinationStat = fs.lstatSync(destinationPath);
315
- if (!destinationStat.isDirectory() || destinationStat.isSymbolicLink()) {
316
- throw new Error(`Ungueltiges Ziel fuer BLUN-Standard-Skill: ${destinationPath}`);
317
- }
318
- } else {
319
- fs.mkdirSync(destinationPath, { mode: 0o700 });
247
+ const destinationPath = path.join(skillsDir, 'blun-app-design-system');
248
+ const installed = !fs.existsSync(destinationPath);
249
+ if (!installed) {
250
+ const destinationStat = fs.lstatSync(destinationPath);
251
+ if (!destinationStat.isDirectory() || destinationStat.isSymbolicLink()) {
252
+ throw new Error(`Ungueltiges Ziel fuer BLUN-Standard-Skill: ${destinationPath}`);
320
253
  }
321
-
322
- fs.cpSync(sourcePath, destinationPath, {
323
- recursive: true,
324
- force: true,
325
- errorOnExist: false,
326
- });
327
- (isInstalled ? installed : updated).push(entry.name);
328
- destinationPaths.push(destinationPath);
254
+ } else {
255
+ ensurePrivateDirectory(destinationPath);
329
256
  }
330
257
 
331
- fs.writeFileSync(markerPath, `${JSON.stringify({ fingerprint: sourceFingerprint, skills: entries.map((entry) => entry.name) }, null, 2)}\n`, 'utf8');
332
- if (process.platform !== 'win32') securePrivateTree(skillsDir);
333
- return { installed, updated, destinationPaths, unchanged: false };
334
- }
335
-
336
- function seedStandardDesignSkill(options) {
337
- const result = seedStandardSkills(options);
338
- const name = 'blun-app-design-system';
339
- return {
340
- installed: result.installed.includes(name),
341
- updated: result.updated.includes(name),
342
- destinationPath: path.join(options.blunDir, 'skills', name),
343
- };
258
+ fs.cpSync(sourcePath, destinationPath, {
259
+ recursive: true,
260
+ force: true,
261
+ errorOnExist: false,
262
+ });
263
+ securePrivateTree(destinationPath);
264
+ return { installed, updated: !installed, destinationPath };
344
265
  }
345
266
 
346
267
  module.exports = {
347
268
  availableStandardToolNames,
348
269
  readCatalogue,
349
270
  seedStandardDesignSkill,
350
- seedStandardSkills,
351
271
  seedStandardTools,
352
272
  };
@@ -36,17 +36,9 @@ function classifyThinkingEffortForTurn(text, originKind) {
36
36
  const lower = normalized.toLowerCase();
37
37
  if (IDENTITY_CHAT.test(lower) || BOSNIAN_STANDALONE_CHAT.test(lower)) return "off";
38
38
  if (STANDALONE_CHAT.test(lower)) return "low";
39
- if (
40
- STATUS_ONLY_CHECK_IN.test(normalized)
41
- && !STATUS_FOLLOW_UP_ACTION.test(normalized)
42
- && !EXPLICIT_THINKING_INTENT.test(normalized)
43
- ) return "low";
44
- if (normalized.length > 180 || String(text ?? "").split(/\r?\n/u).length > 2) return undefined;
45
- if (ACTIONABLE_PROMPT.test(normalized) || EXPLICIT_THINKING_INTENT.test(normalized)) return undefined;
46
-
47
- const shortQuestion = /[?]\s*$/u.test(normalized)
48
- || /^(?:was|wer|wie|warum|wieso|weshalb|wo|wann|welche?r?s?|what|who|how|why|where|when|which|can you|kannst du)\b/iu.test(normalized);
49
- return shortQuestion ? "low" : undefined;
39
+ // Fast chat drops project context and tools. Brevity or a status question
40
+ // cannot establish that this evidence is unnecessary.
41
+ return undefined;
50
42
  }
51
43
 
52
44
  function selectThinkingEffortForTurn(text, originKind, profileEffort) {