create-principles-disciple 1.144.27 → 1.145.1

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 (347) hide show
  1. package/LICENSE +73 -21
  2. package/NOTICE +2 -0
  3. package/README.md +1 -1
  4. package/_release/product-identity.json +2 -2
  5. package/codex-adapter/dist/index.d.ts +2 -2
  6. package/codex-adapter/dist/index.js +1 -1
  7. package/codex-adapter/dist/ingestion/admission.js +16 -0
  8. package/codex-adapter/dist/ingestion/codex-version.d.ts +10 -4
  9. package/codex-adapter/dist/ingestion/codex-version.js +10 -4
  10. package/codex-adapter/dist/ingestion/explicit-owner-statement.d.ts +48 -0
  11. package/codex-adapter/dist/ingestion/explicit-owner-statement.js +123 -0
  12. package/codex-adapter/dist/ingestion/ingestion.js +50 -1
  13. package/codex-adapter/dist/pd-hook.js +66 -3
  14. package/codex-adapter/dist/worker/workspace-worker.d.ts +14 -0
  15. package/codex-adapter/dist/worker/workspace-worker.js +194 -11
  16. package/codex-adapter/package.json +6 -4
  17. package/console/dist/server/models/ApprovalsConsoleModel.d.ts +2 -2
  18. package/console/dist/server/models/ApprovalsConsoleModel.js +1 -1
  19. package/console/dist/server/models/ApprovalsGroupedConsoleModel.js +1 -1
  20. package/console/dist/server/models/PrinciplesConsoleModel.d.ts +26 -1
  21. package/console/dist/server/models/PrinciplesConsoleModel.js +18 -1
  22. package/console/dist/server/routes/activations.js +4 -4
  23. package/console/dist/server/routes/approvals.js +2 -2
  24. package/console/dist/server/routes/failed-tasks.d.ts +9 -0
  25. package/console/dist/server/routes/failed-tasks.js +116 -7
  26. package/console/dist/server/routes/principles.js +73 -1
  27. package/console/dist/shared/prompt-injection-contract.d.ts +1 -1
  28. package/console/dist/ui/api.d.ts +5 -5
  29. package/console/dist/ui/i18n/en.json +13 -2
  30. package/console/dist/ui/i18n/zh-CN.json +13 -2
  31. package/console/dist/ui/pages/activation/ActivationPage.js +2 -1
  32. package/console/dist/ui/pages/failed-tasks/FailedTasksPage.js +42 -4
  33. package/console/dist/ui/pages/focus/FocusPage.js +3 -3
  34. package/console/dist/ui/pages/principles/PrinciplesPage.js +7 -2
  35. package/console/dist/ui/utils/validators.d.ts +6 -2
  36. package/console/dist/ui/utils/validators.js +19 -4
  37. package/console/dist/web/assets/app.css +26 -0
  38. package/console/dist/web/assets/app.js +24 -24
  39. package/console/package.json +6 -5
  40. package/core/dist/host/host-installer.d.ts +3 -1
  41. package/core/dist/host/host-installer.d.ts.map +1 -1
  42. package/core/dist/host/host-installer.js.map +1 -1
  43. package/core/dist/runtime-v2/admission-gate.d.ts +8 -0
  44. package/core/dist/runtime-v2/admission-gate.d.ts.map +1 -1
  45. package/core/dist/runtime-v2/admission-gate.js +3 -2
  46. package/core/dist/runtime-v2/admission-gate.js.map +1 -1
  47. package/core/dist/runtime-v2/config/pd-config-defaults.d.ts.map +1 -1
  48. package/core/dist/runtime-v2/config/pd-config-defaults.js +16 -1
  49. package/core/dist/runtime-v2/config/pd-config-defaults.js.map +1 -1
  50. package/core/dist/runtime-v2/context-payload.d.ts +43 -3
  51. package/core/dist/runtime-v2/context-payload.d.ts.map +1 -1
  52. package/core/dist/runtime-v2/context-payload.js +15 -1
  53. package/core/dist/runtime-v2/context-payload.js.map +1 -1
  54. package/core/dist/runtime-v2/evidence-guards.d.ts +6 -0
  55. package/core/dist/runtime-v2/evidence-guards.d.ts.map +1 -1
  56. package/core/dist/runtime-v2/evidence-guards.js +11 -0
  57. package/core/dist/runtime-v2/evidence-guards.js.map +1 -1
  58. package/core/dist/runtime-v2/evolution/evolution-types.d.ts +4 -4
  59. package/core/dist/runtime-v2/evolution/evolution-types.d.ts.map +1 -1
  60. package/core/dist/runtime-v2/evolution/evolution-types.js +1 -1
  61. package/core/dist/runtime-v2/evolution/evolution-types.js.map +1 -1
  62. package/core/dist/runtime-v2/feature-flags/feature-flag-contract.d.ts.map +1 -1
  63. package/core/dist/runtime-v2/feature-flags/feature-flag-contract.js +6 -0
  64. package/core/dist/runtime-v2/feature-flags/feature-flag-contract.js.map +1 -1
  65. package/core/dist/runtime-v2/feature-flags/feature-flag-lifecycle.d.ts.map +1 -1
  66. package/core/dist/runtime-v2/feature-flags/feature-flag-lifecycle.js +8 -0
  67. package/core/dist/runtime-v2/feature-flags/feature-flag-lifecycle.js.map +1 -1
  68. package/core/dist/runtime-v2/index.d.ts +5 -2
  69. package/core/dist/runtime-v2/index.d.ts.map +1 -1
  70. package/core/dist/runtime-v2/index.js +3 -1
  71. package/core/dist/runtime-v2/index.js.map +1 -1
  72. package/core/dist/runtime-v2/internalization/evaluator-output.d.ts +11 -0
  73. package/core/dist/runtime-v2/internalization/evaluator-output.d.ts.map +1 -1
  74. package/core/dist/runtime-v2/internalization/evaluator-output.js +10 -0
  75. package/core/dist/runtime-v2/internalization/evaluator-output.js.map +1 -1
  76. package/core/dist/runtime-v2/internalization/evaluator-prompt-builder.d.ts +3 -3
  77. package/core/dist/runtime-v2/internalization/evaluator-prompt-builder.d.ts.map +1 -1
  78. package/core/dist/runtime-v2/internalization/evaluator-prompt-builder.js +49 -5
  79. package/core/dist/runtime-v2/internalization/evaluator-prompt-builder.js.map +1 -1
  80. package/core/dist/runtime-v2/internalization/evaluator-runner.d.ts.map +1 -1
  81. package/core/dist/runtime-v2/internalization/evaluator-runner.js +13 -16
  82. package/core/dist/runtime-v2/internalization/evaluator-runner.js.map +1 -1
  83. package/core/dist/runtime-v2/internalization/owner-decision-review.d.ts.map +1 -1
  84. package/core/dist/runtime-v2/internalization/owner-decision-review.js +5 -1
  85. package/core/dist/runtime-v2/internalization/owner-decision-review.js.map +1 -1
  86. package/core/dist/runtime-v2/internalization/owner-review.d.ts +2 -2
  87. package/core/dist/runtime-v2/internalization/owner-review.js +2 -2
  88. package/core/dist/runtime-v2/internalization/scribe-output.d.ts +12 -0
  89. package/core/dist/runtime-v2/internalization/scribe-output.d.ts.map +1 -1
  90. package/core/dist/runtime-v2/internalization/scribe-output.js +20 -0
  91. package/core/dist/runtime-v2/internalization/scribe-output.js.map +1 -1
  92. package/core/dist/runtime-v2/internalization/scribe-prompt-builder.d.ts +32 -1
  93. package/core/dist/runtime-v2/internalization/scribe-prompt-builder.d.ts.map +1 -1
  94. package/core/dist/runtime-v2/internalization/scribe-prompt-builder.js +38 -1
  95. package/core/dist/runtime-v2/internalization/scribe-prompt-builder.js.map +1 -1
  96. package/core/dist/runtime-v2/internalization-queue-read-model.d.ts +6 -0
  97. package/core/dist/runtime-v2/internalization-queue-read-model.d.ts.map +1 -1
  98. package/core/dist/runtime-v2/internalization-queue-read-model.js +8 -1
  99. package/core/dist/runtime-v2/internalization-queue-read-model.js.map +1 -1
  100. package/core/dist/runtime-v2/intervention-evidence-normalizer.d.ts.map +1 -1
  101. package/core/dist/runtime-v2/intervention-evidence-normalizer.js +10 -3
  102. package/core/dist/runtime-v2/intervention-evidence-normalizer.js.map +1 -1
  103. package/core/dist/runtime-v2/pain-ingress.d.ts +1 -1
  104. package/core/dist/runtime-v2/pain-ingress.d.ts.map +1 -1
  105. package/core/dist/runtime-v2/pain-signal-bridge.d.ts +68 -2
  106. package/core/dist/runtime-v2/pain-signal-bridge.d.ts.map +1 -1
  107. package/core/dist/runtime-v2/pain-signal-bridge.js +541 -18
  108. package/core/dist/runtime-v2/pain-signal-bridge.js.map +1 -1
  109. package/core/dist/runtime-v2/pain-signal-runtime-factory.d.ts.map +1 -1
  110. package/core/dist/runtime-v2/pain-signal-runtime-factory.js +4 -0
  111. package/core/dist/runtime-v2/pain-signal-runtime-factory.js.map +1 -1
  112. package/core/dist/runtime-v2/product-telemetry/snapshot-contract.d.ts +2 -2
  113. package/core/dist/runtime-v2/product-telemetry/snapshot-contract.d.ts.map +1 -1
  114. package/core/dist/runtime-v2/product-telemetry/snapshot-contract.js +2 -2
  115. package/core/dist/runtime-v2/product-telemetry/snapshot-contract.js.map +1 -1
  116. package/core/dist/runtime-v2/store/candidate/admission-document.d.ts +90 -0
  117. package/core/dist/runtime-v2/store/candidate/admission-document.d.ts.map +1 -0
  118. package/core/dist/runtime-v2/store/candidate/admission-document.js +142 -0
  119. package/core/dist/runtime-v2/store/candidate/admission-document.js.map +1 -0
  120. package/core/dist/runtime-v2/store/candidate/candidate-store.d.ts +53 -0
  121. package/core/dist/runtime-v2/store/candidate/candidate-store.d.ts.map +1 -1
  122. package/core/dist/runtime-v2/store/candidate/memory-candidate-store.d.ts +35 -0
  123. package/core/dist/runtime-v2/store/candidate/memory-candidate-store.d.ts.map +1 -1
  124. package/core/dist/runtime-v2/store/candidate/memory-candidate-store.js +48 -0
  125. package/core/dist/runtime-v2/store/candidate/memory-candidate-store.js.map +1 -1
  126. package/core/dist/runtime-v2/store/candidate/sqlite-candidate-store.d.ts +44 -0
  127. package/core/dist/runtime-v2/store/candidate/sqlite-candidate-store.d.ts.map +1 -1
  128. package/core/dist/runtime-v2/store/candidate/sqlite-candidate-store.js +136 -0
  129. package/core/dist/runtime-v2/store/candidate/sqlite-candidate-store.js.map +1 -1
  130. package/core/dist/runtime-v2/store/context/sqlite-context-assembler.js.map +1 -1
  131. package/core/dist/runtime-v2/store/intervention-evidence-schema.js +1 -1
  132. package/core/dist/runtime-v2/store/runtime-state-manager.d.ts +65 -0
  133. package/core/dist/runtime-v2/store/runtime-state-manager.d.ts.map +1 -1
  134. package/core/dist/runtime-v2/store/runtime-state-manager.js +46 -0
  135. package/core/dist/runtime-v2/store/runtime-state-manager.js.map +1 -1
  136. package/core/dist/runtime-v2/store/sqlite-connection.d.ts.map +1 -1
  137. package/core/dist/runtime-v2/store/sqlite-connection.js +42 -0
  138. package/core/dist/runtime-v2/store/sqlite-connection.js.map +1 -1
  139. package/core/dist/runtime-v2/store/sqlite-intervention-evidence-store.d.ts +1 -1
  140. package/core/dist/runtime-v2/store/sqlite-intervention-evidence-store.d.ts.map +1 -1
  141. package/core/dist/runtime-v2/store/sqlite-intervention-evidence-store.js.map +1 -1
  142. package/core/dist/runtime-v2/store/task/sqlite-family-reopen.d.ts +19 -0
  143. package/core/dist/runtime-v2/store/task/sqlite-family-reopen.d.ts.map +1 -0
  144. package/core/dist/runtime-v2/store/task/sqlite-family-reopen.js +36 -0
  145. package/core/dist/runtime-v2/store/task/sqlite-family-reopen.js.map +1 -0
  146. package/core/dist/runtime-v2/store/task/sqlite-task-store.d.ts +23 -0
  147. package/core/dist/runtime-v2/store/task/sqlite-task-store.d.ts.map +1 -1
  148. package/core/dist/runtime-v2/store/task/sqlite-task-store.js +50 -0
  149. package/core/dist/runtime-v2/store/task/sqlite-task-store.js.map +1 -1
  150. package/core/dist/runtime-v2/task-status.d.ts +3 -1
  151. package/core/dist/runtime-v2/task-status.d.ts.map +1 -1
  152. package/core/dist/runtime-v2/task-status.js +1 -1
  153. package/core/dist/runtime-v2/task-status.js.map +1 -1
  154. package/core/dist/runtime-v2/trajectory-schema.d.ts.map +1 -1
  155. package/core/dist/runtime-v2/trajectory-schema.js +11 -0
  156. package/core/dist/runtime-v2/trajectory-schema.js.map +1 -1
  157. package/core/dist/runtime-v2/types/event-types.d.ts +2 -2
  158. package/core/dist/runtime-v2/types/event-types.d.ts.map +1 -1
  159. package/core/dist/runtime-v2/types/event-types.js +1 -1
  160. package/core/dist/runtime-v2/types/event-types.js.map +1 -1
  161. package/core/dist/runtime-v2/types/evidence-chain-contract.d.ts +1 -1
  162. package/core/dist/runtime-v2/types/evidence-chain-contract.d.ts.map +1 -1
  163. package/core/dist/runtime-v2/types/evidence-chain-contract.js +2 -2
  164. package/core/dist/runtime-v2/types/evidence-chain-contract.js.map +1 -1
  165. package/core/dist/runtime-v2/types/intervention-evidence-contract.d.ts +3 -3
  166. package/core/dist/runtime-v2/types/intervention-evidence-contract.d.ts.map +1 -1
  167. package/core/dist/runtime-v2/types/intervention-evidence-contract.js +1 -0
  168. package/core/dist/runtime-v2/types/intervention-evidence-contract.js.map +1 -1
  169. package/core/dist/telemetry-event.d.ts +2 -2
  170. package/core/dist/telemetry-event.d.ts.map +1 -1
  171. package/core/dist/telemetry-event.js +4 -0
  172. package/core/dist/telemetry-event.js.map +1 -1
  173. package/core/dist/trajectory-types.d.ts +2 -2
  174. package/core/dist/trajectory-types.d.ts.map +1 -1
  175. package/core/package.json +7 -5
  176. package/dist/index.d.ts.map +1 -1
  177. package/dist/index.js +84 -8
  178. package/dist/index.js.map +1 -1
  179. package/dist/installer.d.ts +42 -11
  180. package/dist/installer.d.ts.map +1 -1
  181. package/dist/installer.js +140 -36
  182. package/dist/installer.js.map +1 -1
  183. package/dist/installers/index.d.ts +18 -7
  184. package/dist/installers/index.d.ts.map +1 -1
  185. package/dist/installers/index.js +13 -4
  186. package/dist/installers/index.js.map +1 -1
  187. package/dist/installers/workbuddy-host-installer.d.ts +246 -0
  188. package/dist/installers/workbuddy-host-installer.d.ts.map +1 -0
  189. package/dist/installers/workbuddy-host-installer.js +1419 -0
  190. package/dist/installers/workbuddy-host-installer.js.map +1 -0
  191. package/dist/mvp-config.d.ts +24 -0
  192. package/dist/mvp-config.d.ts.map +1 -1
  193. package/dist/mvp-config.js +36 -0
  194. package/dist/mvp-config.js.map +1 -1
  195. package/dist/prompts.d.ts +13 -0
  196. package/dist/prompts.d.ts.map +1 -1
  197. package/dist/prompts.js +45 -8
  198. package/dist/prompts.js.map +1 -1
  199. package/dist/uninstaller.d.ts +1 -1
  200. package/dist/uninstaller.d.ts.map +1 -1
  201. package/dist/uninstaller.js +29 -4
  202. package/dist/uninstaller.js.map +1 -1
  203. package/host-runtime/dist/governance-signal-admission.d.ts +63 -0
  204. package/host-runtime/dist/governance-signal-admission.js +322 -53
  205. package/host-runtime/dist/host-liveness-contract.js +7 -1
  206. package/host-runtime/dist/index.d.ts +1 -0
  207. package/host-runtime/dist/index.js +5 -1
  208. package/host-runtime/dist/internalization-consumer-cycle.d.ts +12 -0
  209. package/host-runtime/dist/internalization-consumer-cycle.js +43 -1
  210. package/host-runtime/dist/intervention-evidence-ingress.d.ts +1 -1
  211. package/host-runtime/dist/product-telemetry/service.js +1 -1
  212. package/host-runtime/dist/production-pain-evidence.d.ts +59 -1
  213. package/host-runtime/dist/production-pain-evidence.js +200 -17
  214. package/host-runtime/dist/prompt-activation-deliverability.js +5 -4
  215. package/host-runtime/dist/prompt-injection-event-evidence.d.ts +1 -1
  216. package/host-runtime/dist/prompt-injection-event-evidence.js +5 -1
  217. package/host-runtime/dist/prompt-injection-projection.d.ts +14 -5
  218. package/host-runtime/dist/prompt-injection-projection.js +30 -16
  219. package/host-runtime/dist/workbuddy-worker-status.d.ts +24 -0
  220. package/host-runtime/dist/workbuddy-worker-status.js +52 -0
  221. package/host-runtime/package.json +7 -5
  222. package/install-layout/dist/index.d.ts +18 -1
  223. package/install-layout/dist/index.js +15 -2
  224. package/install-layout/package.json +5 -3
  225. package/package.json +9 -7
  226. package/pd-cli/dist/commands/candidate.d.ts.map +1 -1
  227. package/pd-cli/dist/commands/candidate.js +44 -4
  228. package/pd-cli/dist/commands/candidate.js.map +1 -1
  229. package/pd-cli/dist/commands/codex-worker.d.ts.map +1 -1
  230. package/pd-cli/dist/commands/codex-worker.js +30 -1
  231. package/pd-cli/dist/commands/codex-worker.js.map +1 -1
  232. package/pd-cli/dist/commands/config-doctor.d.ts.map +1 -1
  233. package/pd-cli/dist/commands/config-doctor.js +19 -4
  234. package/pd-cli/dist/commands/config-doctor.js.map +1 -1
  235. package/pd-cli/dist/commands/diagnose.d.ts.map +1 -1
  236. package/pd-cli/dist/commands/diagnose.js +4 -1
  237. package/pd-cli/dist/commands/diagnose.js.map +1 -1
  238. package/pd-cli/dist/commands/health-codex-install.d.ts +85 -0
  239. package/pd-cli/dist/commands/health-codex-install.d.ts.map +1 -0
  240. package/pd-cli/dist/commands/health-codex-install.js +207 -0
  241. package/pd-cli/dist/commands/health-codex-install.js.map +1 -0
  242. package/pd-cli/dist/commands/health-codex.d.ts.map +1 -1
  243. package/pd-cli/dist/commands/health-codex.js +78 -0
  244. package/pd-cli/dist/commands/health-codex.js.map +1 -1
  245. package/pd-cli/dist/commands/pain-list.d.ts +3 -2
  246. package/pd-cli/dist/commands/pain-list.d.ts.map +1 -1
  247. package/pd-cli/dist/commands/pain-list.js +10 -10
  248. package/pd-cli/dist/commands/pain-list.js.map +1 -1
  249. package/pd-cli/dist/commands/pain-record.d.ts +2 -0
  250. package/pd-cli/dist/commands/pain-record.d.ts.map +1 -1
  251. package/pd-cli/dist/commands/pain-record.js +36 -0
  252. package/pd-cli/dist/commands/pain-record.js.map +1 -1
  253. package/pd-cli/dist/commands/pain-retry.d.ts +6 -0
  254. package/pd-cli/dist/commands/pain-retry.d.ts.map +1 -1
  255. package/pd-cli/dist/commands/pain-retry.js +152 -5
  256. package/pd-cli/dist/commands/pain-retry.js.map +1 -1
  257. package/pd-cli/dist/commands/runtime-activation.d.ts +1 -1
  258. package/pd-cli/dist/commands/runtime-activation.d.ts.map +1 -1
  259. package/pd-cli/dist/commands/runtime-activation.js +3 -3
  260. package/pd-cli/dist/commands/runtime-activation.js.map +1 -1
  261. package/pd-cli/dist/commands/workbuddy-worker.d.ts +19 -0
  262. package/pd-cli/dist/commands/workbuddy-worker.d.ts.map +1 -0
  263. package/pd-cli/dist/commands/workbuddy-worker.js +168 -0
  264. package/pd-cli/dist/commands/workbuddy-worker.js.map +1 -0
  265. package/pd-cli/dist/index.js +29 -1
  266. package/pd-cli/dist/index.js.map +1 -1
  267. package/pd-cli/dist/resolve-workspace.d.ts +14 -2
  268. package/pd-cli/dist/resolve-workspace.d.ts.map +1 -1
  269. package/pd-cli/dist/resolve-workspace.js +88 -21
  270. package/pd-cli/dist/resolve-workspace.js.map +1 -1
  271. package/pd-cli/dist/services/admission-write-gate.d.ts +24 -0
  272. package/pd-cli/dist/services/admission-write-gate.d.ts.map +1 -0
  273. package/pd-cli/dist/services/admission-write-gate.js +41 -0
  274. package/pd-cli/dist/services/admission-write-gate.js.map +1 -0
  275. package/pd-cli/dist/services/pd-config-loader.d.ts +39 -7
  276. package/pd-cli/dist/services/pd-config-loader.d.ts.map +1 -1
  277. package/pd-cli/dist/services/pd-config-loader.js +111 -18
  278. package/pd-cli/dist/services/pd-config-loader.js.map +1 -1
  279. package/pd-cli/dist/services/rulehost-pipeline-runner.d.ts +10 -0
  280. package/pd-cli/dist/services/rulehost-pipeline-runner.d.ts.map +1 -1
  281. package/pd-cli/dist/services/rulehost-pipeline-runner.js +59 -4
  282. package/pd-cli/dist/services/rulehost-pipeline-runner.js.map +1 -1
  283. package/pd-cli/package.json +8 -5
  284. package/plugin/dist/bundle.js +564 -509
  285. package/plugin/dist/governance-audit.js +1 -1
  286. package/plugin/dist/openclaw.plugin.json +1 -1
  287. package/plugin/dist/rulehost-evidence.js +1 -1
  288. package/plugin/openclaw.plugin.json +1 -1
  289. package/plugin/package.json +7 -5
  290. package/release-manager/dist/index.d.ts.map +1 -1
  291. package/release-manager/dist/index.js +84 -8
  292. package/release-manager/dist/index.js.map +1 -1
  293. package/release-manager/dist/installer.d.ts +42 -11
  294. package/release-manager/dist/installer.d.ts.map +1 -1
  295. package/release-manager/dist/installer.js +140 -36
  296. package/release-manager/dist/installer.js.map +1 -1
  297. package/release-manager/dist/installers/index.d.ts +18 -7
  298. package/release-manager/dist/installers/index.d.ts.map +1 -1
  299. package/release-manager/dist/installers/index.js +13 -4
  300. package/release-manager/dist/installers/index.js.map +1 -1
  301. package/release-manager/dist/installers/workbuddy-host-installer.d.ts +246 -0
  302. package/release-manager/dist/installers/workbuddy-host-installer.d.ts.map +1 -0
  303. package/release-manager/dist/installers/workbuddy-host-installer.js +1419 -0
  304. package/release-manager/dist/installers/workbuddy-host-installer.js.map +1 -0
  305. package/release-manager/dist/mvp-config.d.ts +24 -0
  306. package/release-manager/dist/mvp-config.d.ts.map +1 -1
  307. package/release-manager/dist/mvp-config.js +36 -0
  308. package/release-manager/dist/mvp-config.js.map +1 -1
  309. package/release-manager/dist/prompts.d.ts +13 -0
  310. package/release-manager/dist/prompts.d.ts.map +1 -1
  311. package/release-manager/dist/prompts.js +45 -8
  312. package/release-manager/dist/prompts.js.map +1 -1
  313. package/release-manager/dist/uninstaller.d.ts +1 -1
  314. package/release-manager/dist/uninstaller.d.ts.map +1 -1
  315. package/release-manager/dist/uninstaller.js +29 -4
  316. package/release-manager/dist/uninstaller.js.map +1 -1
  317. package/release-manager/package.json +8 -6
  318. package/workbuddy-adapter/dist/codec/index.d.ts +2 -0
  319. package/workbuddy-adapter/dist/codec/index.js +2 -0
  320. package/workbuddy-adapter/dist/codec/input-decoder.d.ts +30 -0
  321. package/workbuddy-adapter/dist/codec/input-decoder.js +232 -0
  322. package/workbuddy-adapter/dist/codec/output-encoder.d.ts +62 -0
  323. package/workbuddy-adapter/dist/codec/output-encoder.js +75 -0
  324. package/workbuddy-adapter/dist/host-adapter.d.ts +33 -0
  325. package/workbuddy-adapter/dist/host-adapter.js +23 -0
  326. package/workbuddy-adapter/dist/index.d.ts +16 -0
  327. package/workbuddy-adapter/dist/index.js +16 -0
  328. package/workbuddy-adapter/dist/pd-hook.d.ts +17 -0
  329. package/workbuddy-adapter/dist/pd-hook.js +505 -0
  330. package/workbuddy-adapter/dist/tool-semantics.d.ts +22 -0
  331. package/workbuddy-adapter/dist/tool-semantics.js +33 -0
  332. package/workbuddy-adapter/dist/workbuddy-evidence-recorder.d.ts +50 -0
  333. package/workbuddy-adapter/dist/workbuddy-evidence-recorder.js +238 -0
  334. package/workbuddy-adapter/dist/worker/workspace-worker.d.ts +41 -0
  335. package/workbuddy-adapter/dist/worker/workspace-worker.js +219 -0
  336. package/workbuddy-adapter/dist/workspace-resolution.d.ts +15 -0
  337. package/workbuddy-adapter/dist/workspace-resolution.js +53 -0
  338. package/workbuddy-adapter/package.json +64 -0
  339. package/workbuddy-adapter/plugin/.codebuddy-plugin/plugin.json +6 -0
  340. package/workbuddy-adapter/plugin/hooks/hooks.json +62 -0
  341. package/workbuddy-adapter/plugin/scripts/wrapper.cjs +79 -0
  342. package/console/dist/ui/utils/navigation.d.ts +0 -9
  343. package/console/dist/ui/utils/navigation.js +0 -7
  344. package/core/dist/runtime-v2/internalization/dimension-coverage-policy.d.ts +0 -54
  345. package/core/dist/runtime-v2/internalization/dimension-coverage-policy.d.ts.map +0 -1
  346. package/core/dist/runtime-v2/internalization/dimension-coverage-policy.js +0 -70
  347. package/core/dist/runtime-v2/internalization/dimension-coverage-policy.js.map +0 -1
@@ -0,0 +1,62 @@
1
+ {
2
+ "hooks": {
3
+ "PreToolUse": [
4
+ {
5
+ "matcher": "*",
6
+ "hooks": [
7
+ {
8
+ "type": "command",
9
+ "command": "node \"${CODEBUDDY_PLUGIN_ROOT}/scripts/wrapper.cjs\" PreToolUse",
10
+ "timeout": 30
11
+ }
12
+ ]
13
+ }
14
+ ],
15
+ "PostToolUse": [
16
+ {
17
+ "matcher": "*",
18
+ "hooks": [
19
+ {
20
+ "type": "command",
21
+ "command": "node \"${CODEBUDDY_PLUGIN_ROOT}/scripts/wrapper.cjs\" PostToolUse",
22
+ "timeout": 30
23
+ }
24
+ ]
25
+ }
26
+ ],
27
+ "PostToolUseFailure": [
28
+ {
29
+ "matcher": "*",
30
+ "hooks": [
31
+ {
32
+ "type": "command",
33
+ "command": "node \"${CODEBUDDY_PLUGIN_ROOT}/scripts/wrapper.cjs\" PostToolUseFailure",
34
+ "timeout": 30
35
+ }
36
+ ]
37
+ }
38
+ ],
39
+ "UserPromptSubmit": [
40
+ {
41
+ "hooks": [
42
+ {
43
+ "type": "command",
44
+ "command": "node \"${CODEBUDDY_PLUGIN_ROOT}/scripts/wrapper.cjs\" UserPromptSubmit",
45
+ "timeout": 30
46
+ }
47
+ ]
48
+ }
49
+ ],
50
+ "SessionStart": [
51
+ {
52
+ "hooks": [
53
+ {
54
+ "type": "command",
55
+ "command": "node \"${CODEBUDDY_PLUGIN_ROOT}/scripts/wrapper.cjs\" SessionStart",
56
+ "timeout": 30
57
+ }
58
+ ]
59
+ }
60
+ ]
61
+ }
62
+ }
@@ -0,0 +1,79 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+ /**
4
+ * PD WorkBuddy plugin hook wrapper.
5
+ *
6
+ * WorkBuddy executes plugin hook commands via Git Bash (probe P05, verified
7
+ * with spaces AND Chinese characters in both the plugin root and the project
8
+ * cwd). This wrapper is deliberately DUMB TRANSPORT: forward stdin, stdout,
9
+ * stderr and the exit code to the real adapter entry, nothing else. All
10
+ * governance decisions (including WHICH failures may block via exit 2) live
11
+ * in the adapter entry — never here.
12
+ *
13
+ * Entry resolution order:
14
+ * 1. PD_WORKBUDDY_ADAPTER_ENTRY (absolute path) — development and test
15
+ * override;
16
+ * 2. the installer-managed canonical runtime adapter dir, matching
17
+ * @principles/install-layout getInstallLayoutPaths(homeDir)
18
+ * .workbuddyAdapterDir (= <home>/.pd/runtime/workbuddy-adapter) with the
19
+ * built entry at dist/pd-hook.js. The literal path here is LOCKED to the
20
+ * install-layout SSoT by tests/plugin-skeleton.test.ts.
21
+ *
22
+ * On a wrapper-level failure (entry missing / spawn failure) the wrapper exits
23
+ * 1 with a bounded stderr diagnostic: probe P02 established exit 1 is
24
+ * non-blocking on WorkBuddy, and the SPEC §4.4 startup-failure row forbids
25
+ * claiming self-blocking the wrapper cannot guarantee.
26
+ */
27
+ const { spawnSync } = require('node:child_process');
28
+ const fs = require('node:fs');
29
+ const path = require('node:path');
30
+
31
+ const eventName = process.argv[2];
32
+
33
+ function fail(message) {
34
+ try {
35
+ process.stderr.write(`[PD] status=degraded reason=workbuddy_wrapper:${message} nextAction=Reinstall PD (npx create-principles-disciple) or set PD_WORKBUDDY_ADAPTER_ENTRY to the built adapter entry.\n`);
36
+ } catch (_) { /* no channel left */ }
37
+ process.exit(1);
38
+ }
39
+
40
+ function resolveEntry() {
41
+ const override = process.env.PD_WORKBUDDY_ADAPTER_ENTRY;
42
+ if (override && override.trim().length > 0) {
43
+ return override.trim();
44
+ }
45
+ const homeDir = process.env.USERPROFILE || process.env.HOME;
46
+ if (!homeDir) fail('no_home_dir');
47
+ // Mirrors @principles/install-layout getInstallLayoutPaths().workbuddyAdapterDir.
48
+ const adapterDir = path.join(homeDir, '.pd', 'runtime', 'workbuddy-adapter');
49
+ return path.join(adapterDir, 'dist', 'pd-hook.js');
50
+ }
51
+
52
+ if (!eventName || eventName.trim().length === 0) {
53
+ fail('missing_event_argument');
54
+ }
55
+
56
+ const entry = resolveEntry();
57
+ // Pre-check existence: spawning a missing script surfaces as node's own
58
+ // MODULE_NOT_FOUND (exit 1, unstructured) — the wrapper owns a BOUNDED,
59
+ // actionable diagnostic instead (P02 startup-failure boundary).
60
+ try {
61
+ if (!fs.statSync(entry).isFile()) fail('entry_not_found: not a regular file');
62
+ } catch (_) {
63
+ fail('entry_not_found:' + entry.slice(0, 120));
64
+ }
65
+ const child = spawnSync(process.execPath, [entry, eventName], {
66
+ stdio: ['inherit', 'inherit', 'inherit'],
67
+ windowsHide: true,
68
+ });
69
+
70
+ if (child.error) {
71
+ const code = child.error.code === 'ENOENT' ? 'entry_not_found' : 'spawn_failed';
72
+ fail(`${code}:${child.error.message.slice(0, 120)}`);
73
+ }
74
+ if (child.status === null) {
75
+ // Killed by signal (e.g. host timeout): mirror as a non-blocking exit 1
76
+ // with the observable reason; P02 timeout semantics are host-managed.
77
+ fail(`entry_killed_signal:${String(child.signal).slice(0, 30)}`);
78
+ }
79
+ process.exit(child.status);
@@ -1,9 +0,0 @@
1
- import type { Flame } from "lucide-react";
2
- export interface NavItem {
3
- id: string;
4
- label: string;
5
- icon: typeof Flame;
6
- href: string;
7
- alsoActive?: string[];
8
- }
9
- export declare function isNavActive(href: string, pathname: string, alsoActive?: string[]): boolean;
@@ -1,7 +0,0 @@
1
- export function isNavActive(href, pathname, alsoActive) {
2
- if (href === "/")
3
- return pathname === "/";
4
- if (alsoActive && alsoActive.some(alt => alt === pathname))
5
- return true;
6
- return pathname === href || pathname.startsWith(href + "/");
7
- }
@@ -1,54 +0,0 @@
1
- /**
2
- * Dreamer dimension coverage policy (design §6.5.1).
3
- *
4
- * The **single source of truth** for how the dreamer's five decision
5
- * dimensions map to fidelity-judgement coverage classes. Both Layer 1
6
- * (context-manifest well-formedness, INV-MANIFEST-CRITERION) and Layer 2 / PR 4
7
- * (the progressive evaluator's flagged criteria) read this table — neither
8
- * inlines a dimension-name array.
9
- *
10
- * rc-5 / ERR-013: dimension lookups must NOT use plain object indexing on an
11
- * untrusted string (`table['__proto__']` would hit `Object.prototype`). This
12
- * module only ever looks up dimensions it defines itself, so a typed record is
13
- * safe here — but consumers that look up an LLM-supplied string must guard with
14
- * `Object.hasOwn` or a `Map`.
15
- */
16
- /** The five dimensions a dreamer candidate carries (design §6.1 dreamer fields). */
17
- export type DreamerDimension = 'badDecision' | 'betterDecision' | 'rationale' | 'riskLevel' | 'strategicPerspective';
18
- /** How a dimension participates in compression-fidelity judgement. */
19
- export type DimensionCoverageClass = 'required' | 'optional' | 'excluded';
20
- /**
21
- * The coverage policy table (design §6.5.1).
22
- *
23
- * required normative content: must have a semantically-equivalent
24
- * expression in the principle text; absence counts as a defect
25
- * and enters `missingDimensions` + the flag path.
26
- * optional counted as covered when present in `antiPatterns`; absence is
27
- * NOT a defect, only recorded in `optionalUncovered` for diagnosis.
28
- * Never enters `missingDimensions` and never flags.
29
- * excluded an evaluation-lens label, not normative content; the criteria
30
- * must NOT draw a conclusion about it, and it is never injected
31
- * into the adjudicating manifest (§6.6.1).
32
- */
33
- export declare const DIMENSION_COVERAGE_POLICY: Readonly<Record<DreamerDimension, DimensionCoverageClass>>;
34
- /**
35
- * The required dimensions, derived from the policy table (order stable for
36
- * deterministic output). Consumers read this instead of inlining a string
37
- * array.
38
- */
39
- export declare const REQUIRED_FIDELITY_DIMENSIONS: readonly DreamerDimension[];
40
- /** All five dimension names (order stable). */
41
- export declare const ALL_DREAMER_DIMENSIONS: readonly DreamerDimension[];
42
- /**
43
- * rc-5-safe policy lookup for an untrusted (LLM-supplied) string. Returns the
44
- * class only when `dim` is genuinely one of the five declared dimensions;
45
- * `undefined` otherwise (so callers can ignore unknown / optional / excluded
46
- * values the model may have stuffed into `missingDimensions`).
47
- */
48
- export declare function lookupDimensionPolicy(dim: string): DimensionCoverageClass | undefined;
49
- /**
50
- * True iff `dim` is a required dimension (used by the flagged-criteria filter,
51
- * §6.5.3). Accepts an untrusted string.
52
- */
53
- export declare function isRequiredDimension(dim: string): boolean;
54
- //# sourceMappingURL=dimension-coverage-policy.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dimension-coverage-policy.d.ts","sourceRoot":"","sources":["../../../src/runtime-v2/internalization/dimension-coverage-policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,oFAAoF;AACpF,MAAM,MAAM,gBAAgB,GACxB,aAAa,GACb,gBAAgB,GAChB,WAAW,GACX,WAAW,GACX,sBAAsB,CAAC;AAE3B,sEAAsE;AACtE,MAAM,MAAM,sBAAsB,GAAG,UAAU,GAAG,UAAU,GAAG,UAAU,CAAC;AAE1E;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,MAAM,CAAC,gBAAgB,EAAE,sBAAsB,CAAC,CAMvF,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,EAAE,SAAS,gBAAgB,EAI9C,CAAC;AAEvB,+CAA+C;AAC/C,eAAO,MAAM,sBAAsB,EAAE,SAAS,gBAAgB,EAM7D,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,sBAAsB,GAAG,SAAS,CAGrF;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAExD"}
@@ -1,70 +0,0 @@
1
- /**
2
- * Dreamer dimension coverage policy (design §6.5.1).
3
- *
4
- * The **single source of truth** for how the dreamer's five decision
5
- * dimensions map to fidelity-judgement coverage classes. Both Layer 1
6
- * (context-manifest well-formedness, INV-MANIFEST-CRITERION) and Layer 2 / PR 4
7
- * (the progressive evaluator's flagged criteria) read this table — neither
8
- * inlines a dimension-name array.
9
- *
10
- * rc-5 / ERR-013: dimension lookups must NOT use plain object indexing on an
11
- * untrusted string (`table['__proto__']` would hit `Object.prototype`). This
12
- * module only ever looks up dimensions it defines itself, so a typed record is
13
- * safe here — but consumers that look up an LLM-supplied string must guard with
14
- * `Object.hasOwn` or a `Map`.
15
- */
16
- /**
17
- * The coverage policy table (design §6.5.1).
18
- *
19
- * required normative content: must have a semantically-equivalent
20
- * expression in the principle text; absence counts as a defect
21
- * and enters `missingDimensions` + the flag path.
22
- * optional counted as covered when present in `antiPatterns`; absence is
23
- * NOT a defect, only recorded in `optionalUncovered` for diagnosis.
24
- * Never enters `missingDimensions` and never flags.
25
- * excluded an evaluation-lens label, not normative content; the criteria
26
- * must NOT draw a conclusion about it, and it is never injected
27
- * into the adjudicating manifest (§6.6.1).
28
- */
29
- export const DIMENSION_COVERAGE_POLICY = {
30
- betterDecision: 'required',
31
- rationale: 'required',
32
- riskLevel: 'required',
33
- badDecision: 'optional',
34
- strategicPerspective: 'excluded',
35
- };
36
- /**
37
- * The required dimensions, derived from the policy table (order stable for
38
- * deterministic output). Consumers read this instead of inlining a string
39
- * array.
40
- */
41
- export const REQUIRED_FIDELITY_DIMENSIONS = Object.entries(DIMENSION_COVERAGE_POLICY)
42
- .filter(([, cls]) => cls === 'required')
43
- .map(([dim]) => dim);
44
- /** All five dimension names (order stable). */
45
- export const ALL_DREAMER_DIMENSIONS = [
46
- 'badDecision',
47
- 'betterDecision',
48
- 'rationale',
49
- 'riskLevel',
50
- 'strategicPerspective',
51
- ];
52
- /**
53
- * rc-5-safe policy lookup for an untrusted (LLM-supplied) string. Returns the
54
- * class only when `dim` is genuinely one of the five declared dimensions;
55
- * `undefined` otherwise (so callers can ignore unknown / optional / excluded
56
- * values the model may have stuffed into `missingDimensions`).
57
- */
58
- export function lookupDimensionPolicy(dim) {
59
- if (!Object.hasOwn(DIMENSION_COVERAGE_POLICY, dim))
60
- return undefined;
61
- return DIMENSION_COVERAGE_POLICY[dim];
62
- }
63
- /**
64
- * True iff `dim` is a required dimension (used by the flagged-criteria filter,
65
- * §6.5.3). Accepts an untrusted string.
66
- */
67
- export function isRequiredDimension(dim) {
68
- return lookupDimensionPolicy(dim) === 'required';
69
- }
70
- //# sourceMappingURL=dimension-coverage-policy.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dimension-coverage-policy.js","sourceRoot":"","sources":["../../../src/runtime-v2/internalization/dimension-coverage-policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAaH;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAA+D;IACnG,cAAc,EAAE,UAAU;IAC1B,SAAS,EAAE,UAAU;IACrB,SAAS,EAAE,UAAU;IACrB,WAAW,EAAE,UAAU;IACvB,oBAAoB,EAAE,UAAU;CACxB,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,4BAA4B,GACvC,MAAM,CAAC,OAAO,CAAC,yBAAyB,CACzC;KACE,MAAM,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,GAAG,KAAK,UAAU,CAAC;KACvC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC;AAEvB,+CAA+C;AAC/C,MAAM,CAAC,MAAM,sBAAsB,GAAgC;IACjE,aAAa;IACb,gBAAgB;IAChB,WAAW;IACX,WAAW;IACX,sBAAsB;CACvB,CAAC;AAEF;;;;;GAKG;AACH,MAAM,UAAU,qBAAqB,CAAC,GAAW;IAC/C,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,yBAAyB,EAAE,GAAG,CAAC;QAAE,OAAO,SAAS,CAAC;IACrE,OAAO,yBAAyB,CAAC,GAAuB,CAAC,CAAC;AAC5D,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAAC,GAAW;IAC7C,OAAO,qBAAqB,CAAC,GAAG,CAAC,KAAK,UAAU,CAAC;AACnD,CAAC"}