create-principles-disciple 1.144.26 → 1.145.0

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 (343) hide show
  1. package/_release/product-identity.json +2 -2
  2. package/codex-adapter/dist/codex-evidence-recorder.js +8 -2
  3. package/codex-adapter/dist/index.d.ts +2 -2
  4. package/codex-adapter/dist/index.js +1 -1
  5. package/codex-adapter/dist/ingestion/admission.js +16 -0
  6. package/codex-adapter/dist/ingestion/codex-version.d.ts +10 -4
  7. package/codex-adapter/dist/ingestion/codex-version.js +10 -4
  8. package/codex-adapter/dist/ingestion/explicit-owner-statement.d.ts +48 -0
  9. package/codex-adapter/dist/ingestion/explicit-owner-statement.js +123 -0
  10. package/codex-adapter/dist/ingestion/ingestion.js +50 -1
  11. package/codex-adapter/dist/pd-hook.js +66 -3
  12. package/codex-adapter/dist/worker/workspace-worker.d.ts +14 -0
  13. package/codex-adapter/dist/worker/workspace-worker.js +194 -11
  14. package/codex-adapter/package.json +2 -2
  15. package/console/dist/server/models/ApprovalsConsoleModel.d.ts +2 -2
  16. package/console/dist/server/models/ApprovalsConsoleModel.js +1 -1
  17. package/console/dist/server/models/ApprovalsGroupedConsoleModel.js +1 -1
  18. package/console/dist/server/models/PrinciplesConsoleModel.d.ts +26 -1
  19. package/console/dist/server/models/PrinciplesConsoleModel.js +18 -1
  20. package/console/dist/server/routes/activations.js +4 -4
  21. package/console/dist/server/routes/approvals.js +2 -2
  22. package/console/dist/server/routes/failed-tasks.d.ts +9 -0
  23. package/console/dist/server/routes/failed-tasks.js +116 -7
  24. package/console/dist/server/routes/principles.js +73 -1
  25. package/console/dist/shared/prompt-injection-contract.d.ts +1 -1
  26. package/console/dist/ui/api.d.ts +5 -5
  27. package/console/dist/ui/i18n/en.json +13 -2
  28. package/console/dist/ui/i18n/zh-CN.json +13 -2
  29. package/console/dist/ui/pages/activation/ActivationPage.js +2 -1
  30. package/console/dist/ui/pages/failed-tasks/FailedTasksPage.js +42 -4
  31. package/console/dist/ui/pages/focus/FocusPage.js +3 -3
  32. package/console/dist/ui/pages/principles/PrinciplesPage.js +7 -2
  33. package/console/dist/ui/utils/validators.d.ts +6 -2
  34. package/console/dist/ui/utils/validators.js +19 -4
  35. package/console/dist/web/assets/app.css +26 -0
  36. package/console/dist/web/assets/app.js +24 -24
  37. package/console/package.json +4 -4
  38. package/core/dist/host/host-installer.d.ts +3 -1
  39. package/core/dist/host/host-installer.d.ts.map +1 -1
  40. package/core/dist/host/host-installer.js.map +1 -1
  41. package/core/dist/runtime-v2/admission-gate.d.ts +8 -0
  42. package/core/dist/runtime-v2/admission-gate.d.ts.map +1 -1
  43. package/core/dist/runtime-v2/admission-gate.js +3 -2
  44. package/core/dist/runtime-v2/admission-gate.js.map +1 -1
  45. package/core/dist/runtime-v2/config/pd-config-defaults.d.ts.map +1 -1
  46. package/core/dist/runtime-v2/config/pd-config-defaults.js +16 -1
  47. package/core/dist/runtime-v2/config/pd-config-defaults.js.map +1 -1
  48. package/core/dist/runtime-v2/context-payload.d.ts +43 -3
  49. package/core/dist/runtime-v2/context-payload.d.ts.map +1 -1
  50. package/core/dist/runtime-v2/context-payload.js +15 -1
  51. package/core/dist/runtime-v2/context-payload.js.map +1 -1
  52. package/core/dist/runtime-v2/evidence-guards.d.ts +6 -0
  53. package/core/dist/runtime-v2/evidence-guards.d.ts.map +1 -1
  54. package/core/dist/runtime-v2/evidence-guards.js +11 -0
  55. package/core/dist/runtime-v2/evidence-guards.js.map +1 -1
  56. package/core/dist/runtime-v2/evolution/evolution-types.d.ts +4 -4
  57. package/core/dist/runtime-v2/evolution/evolution-types.d.ts.map +1 -1
  58. package/core/dist/runtime-v2/evolution/evolution-types.js +1 -1
  59. package/core/dist/runtime-v2/evolution/evolution-types.js.map +1 -1
  60. package/core/dist/runtime-v2/feature-flags/feature-flag-contract.d.ts.map +1 -1
  61. package/core/dist/runtime-v2/feature-flags/feature-flag-contract.js +6 -0
  62. package/core/dist/runtime-v2/feature-flags/feature-flag-contract.js.map +1 -1
  63. package/core/dist/runtime-v2/feature-flags/feature-flag-lifecycle.d.ts.map +1 -1
  64. package/core/dist/runtime-v2/feature-flags/feature-flag-lifecycle.js +8 -0
  65. package/core/dist/runtime-v2/feature-flags/feature-flag-lifecycle.js.map +1 -1
  66. package/core/dist/runtime-v2/index.d.ts +5 -2
  67. package/core/dist/runtime-v2/index.d.ts.map +1 -1
  68. package/core/dist/runtime-v2/index.js +3 -1
  69. package/core/dist/runtime-v2/index.js.map +1 -1
  70. package/core/dist/runtime-v2/internalization/adversarial-feedback.d.ts +3 -1
  71. package/core/dist/runtime-v2/internalization/adversarial-feedback.d.ts.map +1 -1
  72. package/core/dist/runtime-v2/internalization/adversarial-feedback.js +10 -1
  73. package/core/dist/runtime-v2/internalization/adversarial-feedback.js.map +1 -1
  74. package/core/dist/runtime-v2/internalization/evaluator-output.d.ts +11 -0
  75. package/core/dist/runtime-v2/internalization/evaluator-output.d.ts.map +1 -1
  76. package/core/dist/runtime-v2/internalization/evaluator-output.js +10 -0
  77. package/core/dist/runtime-v2/internalization/evaluator-output.js.map +1 -1
  78. package/core/dist/runtime-v2/internalization/evaluator-prompt-builder.d.ts +3 -3
  79. package/core/dist/runtime-v2/internalization/evaluator-prompt-builder.d.ts.map +1 -1
  80. package/core/dist/runtime-v2/internalization/evaluator-prompt-builder.js +49 -5
  81. package/core/dist/runtime-v2/internalization/evaluator-prompt-builder.js.map +1 -1
  82. package/core/dist/runtime-v2/internalization/evaluator-runner.d.ts.map +1 -1
  83. package/core/dist/runtime-v2/internalization/evaluator-runner.js +13 -16
  84. package/core/dist/runtime-v2/internalization/evaluator-runner.js.map +1 -1
  85. package/core/dist/runtime-v2/internalization/owner-decision-review.d.ts.map +1 -1
  86. package/core/dist/runtime-v2/internalization/owner-decision-review.js +5 -1
  87. package/core/dist/runtime-v2/internalization/owner-decision-review.js.map +1 -1
  88. package/core/dist/runtime-v2/internalization/owner-review.d.ts +2 -2
  89. package/core/dist/runtime-v2/internalization/owner-review.js +2 -2
  90. package/core/dist/runtime-v2/internalization/scribe-output.d.ts +12 -0
  91. package/core/dist/runtime-v2/internalization/scribe-output.d.ts.map +1 -1
  92. package/core/dist/runtime-v2/internalization/scribe-output.js +20 -0
  93. package/core/dist/runtime-v2/internalization/scribe-output.js.map +1 -1
  94. package/core/dist/runtime-v2/internalization/scribe-prompt-builder.d.ts +32 -1
  95. package/core/dist/runtime-v2/internalization/scribe-prompt-builder.d.ts.map +1 -1
  96. package/core/dist/runtime-v2/internalization/scribe-prompt-builder.js +38 -1
  97. package/core/dist/runtime-v2/internalization/scribe-prompt-builder.js.map +1 -1
  98. package/core/dist/runtime-v2/internalization-queue-read-model.d.ts +6 -0
  99. package/core/dist/runtime-v2/internalization-queue-read-model.d.ts.map +1 -1
  100. package/core/dist/runtime-v2/internalization-queue-read-model.js +8 -1
  101. package/core/dist/runtime-v2/internalization-queue-read-model.js.map +1 -1
  102. package/core/dist/runtime-v2/intervention-evidence-normalizer.d.ts.map +1 -1
  103. package/core/dist/runtime-v2/intervention-evidence-normalizer.js +10 -3
  104. package/core/dist/runtime-v2/intervention-evidence-normalizer.js.map +1 -1
  105. package/core/dist/runtime-v2/pain-ingress.d.ts +1 -1
  106. package/core/dist/runtime-v2/pain-ingress.d.ts.map +1 -1
  107. package/core/dist/runtime-v2/pain-signal-bridge.d.ts +68 -2
  108. package/core/dist/runtime-v2/pain-signal-bridge.d.ts.map +1 -1
  109. package/core/dist/runtime-v2/pain-signal-bridge.js +541 -18
  110. package/core/dist/runtime-v2/pain-signal-bridge.js.map +1 -1
  111. package/core/dist/runtime-v2/pain-signal-runtime-factory.d.ts.map +1 -1
  112. package/core/dist/runtime-v2/pain-signal-runtime-factory.js +4 -0
  113. package/core/dist/runtime-v2/pain-signal-runtime-factory.js.map +1 -1
  114. package/core/dist/runtime-v2/product-telemetry/snapshot-contract.d.ts +2 -2
  115. package/core/dist/runtime-v2/product-telemetry/snapshot-contract.d.ts.map +1 -1
  116. package/core/dist/runtime-v2/product-telemetry/snapshot-contract.js +2 -2
  117. package/core/dist/runtime-v2/product-telemetry/snapshot-contract.js.map +1 -1
  118. package/core/dist/runtime-v2/store/candidate/admission-document.d.ts +90 -0
  119. package/core/dist/runtime-v2/store/candidate/admission-document.d.ts.map +1 -0
  120. package/core/dist/runtime-v2/store/candidate/admission-document.js +142 -0
  121. package/core/dist/runtime-v2/store/candidate/admission-document.js.map +1 -0
  122. package/core/dist/runtime-v2/store/candidate/candidate-store.d.ts +53 -0
  123. package/core/dist/runtime-v2/store/candidate/candidate-store.d.ts.map +1 -1
  124. package/core/dist/runtime-v2/store/candidate/memory-candidate-store.d.ts +35 -0
  125. package/core/dist/runtime-v2/store/candidate/memory-candidate-store.d.ts.map +1 -1
  126. package/core/dist/runtime-v2/store/candidate/memory-candidate-store.js +48 -0
  127. package/core/dist/runtime-v2/store/candidate/memory-candidate-store.js.map +1 -1
  128. package/core/dist/runtime-v2/store/candidate/sqlite-candidate-store.d.ts +44 -0
  129. package/core/dist/runtime-v2/store/candidate/sqlite-candidate-store.d.ts.map +1 -1
  130. package/core/dist/runtime-v2/store/candidate/sqlite-candidate-store.js +136 -0
  131. package/core/dist/runtime-v2/store/candidate/sqlite-candidate-store.js.map +1 -1
  132. package/core/dist/runtime-v2/store/context/sqlite-context-assembler.js.map +1 -1
  133. package/core/dist/runtime-v2/store/intervention-evidence-schema.js +1 -1
  134. package/core/dist/runtime-v2/store/runtime-state-manager.d.ts +65 -0
  135. package/core/dist/runtime-v2/store/runtime-state-manager.d.ts.map +1 -1
  136. package/core/dist/runtime-v2/store/runtime-state-manager.js +46 -0
  137. package/core/dist/runtime-v2/store/runtime-state-manager.js.map +1 -1
  138. package/core/dist/runtime-v2/store/sqlite-connection.d.ts.map +1 -1
  139. package/core/dist/runtime-v2/store/sqlite-connection.js +42 -0
  140. package/core/dist/runtime-v2/store/sqlite-connection.js.map +1 -1
  141. package/core/dist/runtime-v2/store/sqlite-intervention-evidence-store.d.ts +1 -1
  142. package/core/dist/runtime-v2/store/sqlite-intervention-evidence-store.d.ts.map +1 -1
  143. package/core/dist/runtime-v2/store/sqlite-intervention-evidence-store.js.map +1 -1
  144. package/core/dist/runtime-v2/store/task/sqlite-family-reopen.d.ts +19 -0
  145. package/core/dist/runtime-v2/store/task/sqlite-family-reopen.d.ts.map +1 -0
  146. package/core/dist/runtime-v2/store/task/sqlite-family-reopen.js +36 -0
  147. package/core/dist/runtime-v2/store/task/sqlite-family-reopen.js.map +1 -0
  148. package/core/dist/runtime-v2/store/task/sqlite-task-store.d.ts +23 -0
  149. package/core/dist/runtime-v2/store/task/sqlite-task-store.d.ts.map +1 -1
  150. package/core/dist/runtime-v2/store/task/sqlite-task-store.js +50 -0
  151. package/core/dist/runtime-v2/store/task/sqlite-task-store.js.map +1 -1
  152. package/core/dist/runtime-v2/task-status.d.ts +3 -1
  153. package/core/dist/runtime-v2/task-status.d.ts.map +1 -1
  154. package/core/dist/runtime-v2/task-status.js +1 -1
  155. package/core/dist/runtime-v2/task-status.js.map +1 -1
  156. package/core/dist/runtime-v2/trajectory-schema.d.ts.map +1 -1
  157. package/core/dist/runtime-v2/trajectory-schema.js +11 -0
  158. package/core/dist/runtime-v2/trajectory-schema.js.map +1 -1
  159. package/core/dist/runtime-v2/types/event-types.d.ts +2 -2
  160. package/core/dist/runtime-v2/types/event-types.d.ts.map +1 -1
  161. package/core/dist/runtime-v2/types/event-types.js +1 -1
  162. package/core/dist/runtime-v2/types/event-types.js.map +1 -1
  163. package/core/dist/runtime-v2/types/evidence-chain-contract.d.ts +1 -1
  164. package/core/dist/runtime-v2/types/evidence-chain-contract.d.ts.map +1 -1
  165. package/core/dist/runtime-v2/types/evidence-chain-contract.js +2 -2
  166. package/core/dist/runtime-v2/types/evidence-chain-contract.js.map +1 -1
  167. package/core/dist/runtime-v2/types/intervention-evidence-contract.d.ts +3 -3
  168. package/core/dist/runtime-v2/types/intervention-evidence-contract.d.ts.map +1 -1
  169. package/core/dist/runtime-v2/types/intervention-evidence-contract.js +1 -0
  170. package/core/dist/runtime-v2/types/intervention-evidence-contract.js.map +1 -1
  171. package/core/dist/telemetry-event.d.ts +2 -2
  172. package/core/dist/telemetry-event.d.ts.map +1 -1
  173. package/core/dist/telemetry-event.js +4 -0
  174. package/core/dist/telemetry-event.js.map +1 -1
  175. package/core/dist/trajectory-types.d.ts +2 -2
  176. package/core/dist/trajectory-types.d.ts.map +1 -1
  177. package/core/package.json +3 -3
  178. package/dist/index.d.ts.map +1 -1
  179. package/dist/index.js +84 -8
  180. package/dist/index.js.map +1 -1
  181. package/dist/installer.d.ts +42 -11
  182. package/dist/installer.d.ts.map +1 -1
  183. package/dist/installer.js +140 -36
  184. package/dist/installer.js.map +1 -1
  185. package/dist/installers/index.d.ts +18 -7
  186. package/dist/installers/index.d.ts.map +1 -1
  187. package/dist/installers/index.js +13 -4
  188. package/dist/installers/index.js.map +1 -1
  189. package/dist/installers/workbuddy-host-installer.d.ts +246 -0
  190. package/dist/installers/workbuddy-host-installer.d.ts.map +1 -0
  191. package/dist/installers/workbuddy-host-installer.js +1419 -0
  192. package/dist/installers/workbuddy-host-installer.js.map +1 -0
  193. package/dist/mvp-config.d.ts +24 -0
  194. package/dist/mvp-config.d.ts.map +1 -1
  195. package/dist/mvp-config.js +36 -0
  196. package/dist/mvp-config.js.map +1 -1
  197. package/dist/prompts.d.ts +13 -0
  198. package/dist/prompts.d.ts.map +1 -1
  199. package/dist/prompts.js +45 -8
  200. package/dist/prompts.js.map +1 -1
  201. package/dist/uninstaller.d.ts +1 -1
  202. package/dist/uninstaller.d.ts.map +1 -1
  203. package/dist/uninstaller.js +29 -4
  204. package/dist/uninstaller.js.map +1 -1
  205. package/host-runtime/dist/governance-signal-admission.d.ts +63 -0
  206. package/host-runtime/dist/governance-signal-admission.js +322 -53
  207. package/host-runtime/dist/host-liveness-contract.js +7 -1
  208. package/host-runtime/dist/index.d.ts +1 -0
  209. package/host-runtime/dist/index.js +5 -1
  210. package/host-runtime/dist/internalization-consumer-cycle.d.ts +12 -0
  211. package/host-runtime/dist/internalization-consumer-cycle.js +43 -1
  212. package/host-runtime/dist/intervention-evidence-ingress.d.ts +1 -1
  213. package/host-runtime/dist/product-telemetry/service.js +1 -1
  214. package/host-runtime/dist/production-pain-evidence.d.ts +59 -1
  215. package/host-runtime/dist/production-pain-evidence.js +200 -17
  216. package/host-runtime/dist/prompt-activation-deliverability.js +5 -4
  217. package/host-runtime/dist/prompt-injection-event-evidence.d.ts +1 -1
  218. package/host-runtime/dist/prompt-injection-event-evidence.js +5 -1
  219. package/host-runtime/dist/prompt-injection-projection.d.ts +14 -5
  220. package/host-runtime/dist/prompt-injection-projection.js +30 -16
  221. package/host-runtime/dist/workbuddy-worker-status.d.ts +24 -0
  222. package/host-runtime/dist/workbuddy-worker-status.js +52 -0
  223. package/host-runtime/package.json +3 -3
  224. package/install-layout/dist/index.d.ts +18 -1
  225. package/install-layout/dist/index.js +15 -2
  226. package/install-layout/package.json +1 -1
  227. package/package.json +6 -5
  228. package/pd-cli/dist/commands/candidate.d.ts.map +1 -1
  229. package/pd-cli/dist/commands/candidate.js +44 -4
  230. package/pd-cli/dist/commands/candidate.js.map +1 -1
  231. package/pd-cli/dist/commands/codex-worker.d.ts.map +1 -1
  232. package/pd-cli/dist/commands/codex-worker.js +30 -1
  233. package/pd-cli/dist/commands/codex-worker.js.map +1 -1
  234. package/pd-cli/dist/commands/config-doctor.d.ts.map +1 -1
  235. package/pd-cli/dist/commands/config-doctor.js +19 -4
  236. package/pd-cli/dist/commands/config-doctor.js.map +1 -1
  237. package/pd-cli/dist/commands/diagnose.d.ts.map +1 -1
  238. package/pd-cli/dist/commands/diagnose.js +4 -1
  239. package/pd-cli/dist/commands/diagnose.js.map +1 -1
  240. package/pd-cli/dist/commands/health-codex-install.d.ts +85 -0
  241. package/pd-cli/dist/commands/health-codex-install.d.ts.map +1 -0
  242. package/pd-cli/dist/commands/health-codex-install.js +207 -0
  243. package/pd-cli/dist/commands/health-codex-install.js.map +1 -0
  244. package/pd-cli/dist/commands/health-codex.d.ts.map +1 -1
  245. package/pd-cli/dist/commands/health-codex.js +78 -0
  246. package/pd-cli/dist/commands/health-codex.js.map +1 -1
  247. package/pd-cli/dist/commands/pain-list.d.ts +3 -2
  248. package/pd-cli/dist/commands/pain-list.d.ts.map +1 -1
  249. package/pd-cli/dist/commands/pain-list.js +10 -10
  250. package/pd-cli/dist/commands/pain-list.js.map +1 -1
  251. package/pd-cli/dist/commands/pain-record.d.ts +2 -0
  252. package/pd-cli/dist/commands/pain-record.d.ts.map +1 -1
  253. package/pd-cli/dist/commands/pain-record.js +36 -0
  254. package/pd-cli/dist/commands/pain-record.js.map +1 -1
  255. package/pd-cli/dist/commands/pain-retry.d.ts +6 -0
  256. package/pd-cli/dist/commands/pain-retry.d.ts.map +1 -1
  257. package/pd-cli/dist/commands/pain-retry.js +152 -5
  258. package/pd-cli/dist/commands/pain-retry.js.map +1 -1
  259. package/pd-cli/dist/commands/runtime-activation.d.ts +1 -1
  260. package/pd-cli/dist/commands/runtime-activation.d.ts.map +1 -1
  261. package/pd-cli/dist/commands/runtime-activation.js +3 -3
  262. package/pd-cli/dist/commands/runtime-activation.js.map +1 -1
  263. package/pd-cli/dist/commands/workbuddy-worker.d.ts +19 -0
  264. package/pd-cli/dist/commands/workbuddy-worker.d.ts.map +1 -0
  265. package/pd-cli/dist/commands/workbuddy-worker.js +168 -0
  266. package/pd-cli/dist/commands/workbuddy-worker.js.map +1 -0
  267. package/pd-cli/dist/index.js +29 -1
  268. package/pd-cli/dist/index.js.map +1 -1
  269. package/pd-cli/dist/resolve-workspace.d.ts +14 -2
  270. package/pd-cli/dist/resolve-workspace.d.ts.map +1 -1
  271. package/pd-cli/dist/resolve-workspace.js +88 -21
  272. package/pd-cli/dist/resolve-workspace.js.map +1 -1
  273. package/pd-cli/dist/services/admission-write-gate.d.ts +24 -0
  274. package/pd-cli/dist/services/admission-write-gate.d.ts.map +1 -0
  275. package/pd-cli/dist/services/admission-write-gate.js +41 -0
  276. package/pd-cli/dist/services/admission-write-gate.js.map +1 -0
  277. package/pd-cli/dist/services/pd-config-loader.d.ts +39 -7
  278. package/pd-cli/dist/services/pd-config-loader.d.ts.map +1 -1
  279. package/pd-cli/dist/services/pd-config-loader.js +111 -18
  280. package/pd-cli/dist/services/pd-config-loader.js.map +1 -1
  281. package/pd-cli/dist/services/rulehost-pipeline-runner.d.ts +10 -0
  282. package/pd-cli/dist/services/rulehost-pipeline-runner.d.ts.map +1 -1
  283. package/pd-cli/dist/services/rulehost-pipeline-runner.js +59 -4
  284. package/pd-cli/dist/services/rulehost-pipeline-runner.js.map +1 -1
  285. package/pd-cli/package.json +4 -3
  286. package/plugin/dist/bundle.js +564 -509
  287. package/plugin/dist/governance-audit.js +1 -1
  288. package/plugin/dist/openclaw.plugin.json +1 -1
  289. package/plugin/dist/rulehost-evidence.js +1 -1
  290. package/plugin/openclaw.plugin.json +1 -1
  291. package/plugin/package.json +3 -3
  292. package/release-manager/dist/index.d.ts.map +1 -1
  293. package/release-manager/dist/index.js +84 -8
  294. package/release-manager/dist/index.js.map +1 -1
  295. package/release-manager/dist/installer.d.ts +42 -11
  296. package/release-manager/dist/installer.d.ts.map +1 -1
  297. package/release-manager/dist/installer.js +140 -36
  298. package/release-manager/dist/installer.js.map +1 -1
  299. package/release-manager/dist/installers/index.d.ts +18 -7
  300. package/release-manager/dist/installers/index.d.ts.map +1 -1
  301. package/release-manager/dist/installers/index.js +13 -4
  302. package/release-manager/dist/installers/index.js.map +1 -1
  303. package/release-manager/dist/installers/workbuddy-host-installer.d.ts +246 -0
  304. package/release-manager/dist/installers/workbuddy-host-installer.d.ts.map +1 -0
  305. package/release-manager/dist/installers/workbuddy-host-installer.js +1419 -0
  306. package/release-manager/dist/installers/workbuddy-host-installer.js.map +1 -0
  307. package/release-manager/dist/mvp-config.d.ts +24 -0
  308. package/release-manager/dist/mvp-config.d.ts.map +1 -1
  309. package/release-manager/dist/mvp-config.js +36 -0
  310. package/release-manager/dist/mvp-config.js.map +1 -1
  311. package/release-manager/dist/prompts.d.ts +13 -0
  312. package/release-manager/dist/prompts.d.ts.map +1 -1
  313. package/release-manager/dist/prompts.js +45 -8
  314. package/release-manager/dist/prompts.js.map +1 -1
  315. package/release-manager/dist/uninstaller.d.ts +1 -1
  316. package/release-manager/dist/uninstaller.d.ts.map +1 -1
  317. package/release-manager/dist/uninstaller.js +29 -4
  318. package/release-manager/dist/uninstaller.js.map +1 -1
  319. package/release-manager/package.json +5 -4
  320. package/workbuddy-adapter/dist/codec/index.d.ts +2 -0
  321. package/workbuddy-adapter/dist/codec/index.js +2 -0
  322. package/workbuddy-adapter/dist/codec/input-decoder.d.ts +30 -0
  323. package/workbuddy-adapter/dist/codec/input-decoder.js +232 -0
  324. package/workbuddy-adapter/dist/codec/output-encoder.d.ts +62 -0
  325. package/workbuddy-adapter/dist/codec/output-encoder.js +75 -0
  326. package/workbuddy-adapter/dist/host-adapter.d.ts +33 -0
  327. package/workbuddy-adapter/dist/host-adapter.js +23 -0
  328. package/workbuddy-adapter/dist/index.d.ts +16 -0
  329. package/workbuddy-adapter/dist/index.js +16 -0
  330. package/workbuddy-adapter/dist/pd-hook.d.ts +17 -0
  331. package/workbuddy-adapter/dist/pd-hook.js +505 -0
  332. package/workbuddy-adapter/dist/tool-semantics.d.ts +22 -0
  333. package/workbuddy-adapter/dist/tool-semantics.js +33 -0
  334. package/workbuddy-adapter/dist/workbuddy-evidence-recorder.d.ts +50 -0
  335. package/workbuddy-adapter/dist/workbuddy-evidence-recorder.js +238 -0
  336. package/workbuddy-adapter/dist/worker/workspace-worker.d.ts +41 -0
  337. package/workbuddy-adapter/dist/worker/workspace-worker.js +219 -0
  338. package/workbuddy-adapter/dist/workspace-resolution.d.ts +15 -0
  339. package/workbuddy-adapter/dist/workspace-resolution.js +53 -0
  340. package/workbuddy-adapter/package.json +62 -0
  341. package/workbuddy-adapter/plugin/.codebuddy-plugin/plugin.json +6 -0
  342. package/workbuddy-adapter/plugin/hooks/hooks.json +62 -0
  343. package/workbuddy-adapter/plugin/scripts/wrapper.cjs +79 -0
@@ -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);