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
@@ -6,7 +6,11 @@
6
6
  * MVP hosts:
7
7
  * - 'openclaw' (default) — OpenClawHostInstaller writes ~/.openclaw/openclaw.json.
8
8
  * - 'codex' — CodexHostInstaller writes ~/.codex/hooks.json.
9
- * - 'all' — both installers run (for operators using multiple hosts).
9
+ * - 'workbuddy' — WorkBuddyHostInstaller registers the PD plugin into
10
+ * WorkBuddy's marketplace/plugin system (quiet, opt-in:
11
+ * 'all' deliberately does NOT include it — SPEC
12
+ * workbuddy-host-adapter §6 install≠enable).
13
+ * - 'all' — openclaw + codex (both legacy install flows).
10
14
  *
11
15
  * Runtime Contract Rules:
12
16
  * - rc-1-treat-as-unknown: --host CLI value is `unknown` until validated here.
@@ -16,11 +20,13 @@
16
20
  import type { HostInstaller } from '@principles/core/host';
17
21
  export { OpenClawHostInstaller } from './openclaw-host-installer.js';
18
22
  export { CodexHostInstaller } from './codex-host-installer.js';
23
+ export { WorkBuddyHostInstaller } from './workbuddy-host-installer.js';
19
24
  /**
20
- * Host target selector. 'all' runs every registered installer.
21
- * Add new host IDs here when new HostInstaller implementations land.
25
+ * Host target selector. 'all' runs openclaw + codex. WorkBuddy is an explicit,
26
+ * separate target: installing it is an opt-in decision (OD-03/OD-04), so 'all'
27
+ * must not silently register a third host.
22
28
  */
23
- export type HostTarget = 'openclaw' | 'codex' | 'all';
29
+ export type HostTarget = 'openclaw' | 'codex' | 'workbuddy' | 'all';
24
30
  export declare const HOST_TARGETS: readonly HostTarget[];
25
31
  /**
26
32
  * Validate a CLI --host value. rc-1/rc-3: treat input as unknown, fail loud.
@@ -29,9 +35,14 @@ export declare function isHostTarget(value: unknown): value is HostTarget;
29
35
  /**
30
36
  * Factory: return the concrete HostInstaller instances for a given target.
31
37
  *
32
- * - 'openclaw' → [OpenClawHostInstaller]
33
- * - 'codex' → [CodexHostInstaller]
34
- * - 'all' → [OpenClawHostInstaller, CodexHostInstaller]
38
+ * - 'openclaw' → [OpenClawHostInstaller]
39
+ * - 'codex' → [CodexHostInstaller]
40
+ * - 'workbuddy' → [WorkBuddyHostInstaller]
41
+ * - 'all' → [OpenClawHostInstaller, CodexHostInstaller]
42
+ *
43
+ * Note: uninstall flows that need "every host PD ever registered with" (the
44
+ * uninstall --host all contract) widen the list at their call site to include
45
+ * WorkBuddyHostInstaller — uninstalling a registration is cleanup, not opt-in.
35
46
  *
36
47
  * Callers iterate the returned array and call install()/uninstall()/detect()
37
48
  * on each. This keeps the CLI install/uninstall flow host-agnostic.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/installers/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAI3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,OAAO,GAAG,KAAK,CAAC;AAEtD,eAAO,MAAM,YAAY,EAAE,SAAS,UAAU,EAAiC,CAAC;AAEhF;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAEhE;AAED;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,UAAU,GAAG,aAAa,EAAE,CAYrE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/installers/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAK3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAEvE;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,OAAO,GAAG,WAAW,GAAG,KAAK,CAAC;AAEpE,eAAO,MAAM,YAAY,EAAE,SAAS,UAAU,EAA8C,CAAC;AAE7F;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAEhE;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,UAAU,GAAG,aAAa,EAAE,CAcrE"}
@@ -1,8 +1,10 @@
1
1
  import { OpenClawHostInstaller } from './openclaw-host-installer.js';
2
2
  import { CodexHostInstaller } from './codex-host-installer.js';
3
+ import { WorkBuddyHostInstaller } from './workbuddy-host-installer.js';
3
4
  export { OpenClawHostInstaller } from './openclaw-host-installer.js';
4
5
  export { CodexHostInstaller } from './codex-host-installer.js';
5
- export const HOST_TARGETS = ['openclaw', 'codex', 'all'];
6
+ export { WorkBuddyHostInstaller } from './workbuddy-host-installer.js';
7
+ export const HOST_TARGETS = ['openclaw', 'codex', 'workbuddy', 'all'];
6
8
  /**
7
9
  * Validate a CLI --host value. rc-1/rc-3: treat input as unknown, fail loud.
8
10
  */
@@ -12,9 +14,14 @@ export function isHostTarget(value) {
12
14
  /**
13
15
  * Factory: return the concrete HostInstaller instances for a given target.
14
16
  *
15
- * - 'openclaw' → [OpenClawHostInstaller]
16
- * - 'codex' → [CodexHostInstaller]
17
- * - 'all' → [OpenClawHostInstaller, CodexHostInstaller]
17
+ * - 'openclaw' → [OpenClawHostInstaller]
18
+ * - 'codex' → [CodexHostInstaller]
19
+ * - 'workbuddy' → [WorkBuddyHostInstaller]
20
+ * - 'all' → [OpenClawHostInstaller, CodexHostInstaller]
21
+ *
22
+ * Note: uninstall flows that need "every host PD ever registered with" (the
23
+ * uninstall --host all contract) widen the list at their call site to include
24
+ * WorkBuddyHostInstaller — uninstalling a registration is cleanup, not opt-in.
18
25
  *
19
26
  * Callers iterate the returned array and call install()/uninstall()/detect()
20
27
  * on each. This keeps the CLI install/uninstall flow host-agnostic.
@@ -28,6 +35,8 @@ export function getHostInstallers(target) {
28
35
  return [new OpenClawHostInstaller()];
29
36
  case 'codex':
30
37
  return [new CodexHostInstaller()];
38
+ case 'workbuddy':
39
+ return [new WorkBuddyHostInstaller()];
31
40
  case 'all':
32
41
  return [new OpenClawHostInstaller(), new CodexHostInstaller()];
33
42
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/installers/index.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAQ/D,MAAM,CAAC,MAAM,YAAY,GAA0B,CAAC,UAAU,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;AAEhF;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,KAAc;IACzC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAK,YAAkC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC1F,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAAkB;IAClD,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE,CAAC;QAC1B,MAAM,IAAI,KAAK,CAAC,wBAAwB,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,YAAY,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACvG,CAAC;IACD,QAAQ,MAAM,EAAE,CAAC;QACf,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AE,CAAC,CAAC;QACvC,KAAK,OAAO;YACV,OAAO,CAAC,IAAI,kBAAkB,EAAE,CAAC,CAAC;QACpC,KAAK,WAAW;YACd,OAAO,CAAC,IAAI,sBAAsB,EAAE,CAAC,CAAC;QACxC,KAAK,KAAK;YACR,OAAO,CAAC,IAAI,qBAAqB,EAAE,EAAE,IAAI,kBAAkB,EAAE,CAAC,CAAC;IACnE,CAAC;AACH,CAAC"}
@@ -0,0 +1,246 @@
1
+ import type { HostInstaller, HostInstallContext, HostInstallResult, HostUninstallContext, HostUninstallResult, HostDetectResult } from '@principles/core/host';
2
+ /** Plugin name inside the PD-owned marketplace (kebab-case per plugin.json contract). */
3
+ export declare const WORKBUDDY_PLUGIN_NAME = "principles-disciple";
4
+ /** PD-owned local marketplace name. enabledPlugins keys use "plugin@marketplace". */
5
+ export declare const WORKBUDDY_MARKETPLACE_NAME = "principles-disciple-market";
6
+ /** Registry/settings key: "principles-disciple@principles-disciple-market". */
7
+ export declare const WORKBUDDY_PLUGIN_KEY = "principles-disciple@principles-disciple-market";
8
+ export interface WorkbuddyCommandResult {
9
+ status: number | null;
10
+ stdout: string;
11
+ stderr: string;
12
+ error?: string;
13
+ }
14
+ export interface WorkbuddyCommandOptions {
15
+ timeoutMs?: number;
16
+ /**
17
+ * Extra environment for the engine child (merged over process.env).
18
+ * S2 (review 2026-10-13): the REAL engine resolves its config root from
19
+ * CODEBUDDY_CONFIG_DIR first (Phase 0 P0 isolation recipe) — without an
20
+ * explicit override it registers into ~/.codebuddy or a pre-existing
21
+ * CodeBuddy root while the installer verifies the declared WorkBuddy root.
22
+ */
23
+ env?: Record<string, string>;
24
+ }
25
+ export interface WorkbuddyHostInstallerDeps {
26
+ /** Home directory resolver (tests inject a temp dir; default: getHomeDir()). */
27
+ homeDir?: () => string;
28
+ /** Engine path resolver (default: env override + Program Files probe). */
29
+ enginePath?: () => string | undefined;
30
+ /**
31
+ * pd-cli runtime entry resolver (default: the installed runtime pd-cli under
32
+ * install-layout's pdCliDir). Its `runtime init` is the SHARED initializer
33
+ * that creates the governance workspace's .pd/config.yaml (core defaults),
34
+ * .pd/state.db and the canonical .state/trajectory.db schema — the same
35
+ * entry the main installer runs for the generic workspace (review R1).
36
+ */
37
+ pdCliEntry?: () => string | undefined;
38
+ /** Command runner (default: spawnSync). Tests inject a fake engine boundary. */
39
+ runCommand?: (file: string, args: readonly string[], opts?: WorkbuddyCommandOptions) => WorkbuddyCommandResult;
40
+ }
41
+ /** All WorkBuddy paths PD may touch, derived from install-layout (never hand-joined ad hoc). */
42
+ export interface WorkbuddyPaths {
43
+ homeDir: string;
44
+ /** Host config dir (engine honors WORKBUDDY_CONFIG_DIR when set). */
45
+ configDir: string;
46
+ settingsPath: string;
47
+ registryPath: string;
48
+ /** <config>/plugins/cache/<marketplace>/<plugin> — our versioned cache subtree root. */
49
+ cachePluginRoot: string;
50
+ /** PD-owned marketplace root: ~/.pd/workbuddy-marketplace. */
51
+ marketplaceRoot: string;
52
+ /** ~/.workbuddy/pd-workspace (OD-07 governance workspace). */
53
+ governanceDir: string;
54
+ /** ~/.pd/runtime/workbuddy-adapter (frozen install-layout path). */
55
+ runtimeAdapterDir: string;
56
+ /** ~/.pd/install.json. */
57
+ installManifestPath: string;
58
+ }
59
+ export declare function resolveWorkbuddyPaths(homeDir: string): WorkbuddyPaths;
60
+ /**
61
+ * Resolve the WorkBuddy engine CLI path.
62
+ *
63
+ * Order: PD_WORKBUDDY_ENGINE / WB_ENGINE env override (probe convention) →
64
+ * the Desktop install location under Program Files (frozen by probe P01).
65
+ * The engine is NOT exposed on PATH — absence is a detectable, reportable
66
+ * fact, never a guess.
67
+ */
68
+ export declare function resolveWorkbuddyEnginePath(): string | undefined;
69
+ export type JsonFileRead = {
70
+ ok: true;
71
+ value: Record<string, unknown>;
72
+ existed: true;
73
+ } | {
74
+ ok: true;
75
+ value: undefined;
76
+ existed: false;
77
+ } | {
78
+ ok: false;
79
+ reason: string;
80
+ nextAction: string;
81
+ path: string;
82
+ };
83
+ /** Read + validate a host JSON file. Malformed content is a HARD STOP (rc-3). */
84
+ export declare function readHostJsonFile(filePath: string): JsonFileRead;
85
+ /**
86
+ * Atomic, backup-protected JSON write for host config files.
87
+ *
88
+ * Discipline (SPEC §6): parse-failure callers never reach this function; the
89
+ * write itself backs up the previous bytes, replaces atomically (temp file +
90
+ * rename), and restores the backup when the replacement fails.
91
+ */
92
+ export declare function writeHostJsonFileProtected(filePath: string, content: string): {
93
+ ok: true;
94
+ } | {
95
+ ok: false;
96
+ reason: string;
97
+ nextAction: string;
98
+ };
99
+ /**
100
+ * Locate the WorkBuddy plugin skeleton shipped by @principles/workbuddy-adapter.
101
+ *
102
+ * Contract with the adapter package (SPEC §4.1 — the adapter owns decoder,
103
+ * encoder, entries AND the plugin skeleton): the bundled payload contains
104
+ * `plugin/` with `.codebuddy-plugin/plugin.json` (name === principles-disciple)
105
+ * and `hooks/hooks.json` at the plugin ROOT (frozen manifest-facts layout).
106
+ * Lookup order: the installer payload being deployed (ctx.pluginDir), then the
107
+ * installed runtime copy (~/.pd/runtime/workbuddy-adapter) for re-runs.
108
+ */
109
+ export interface WorkbuddyPluginPayload {
110
+ pluginDir: string;
111
+ version: string;
112
+ }
113
+ export declare function findWorkbuddyPluginPayload(pluginDir: string, runtimeAdapterDir: string): {
114
+ payload?: WorkbuddyPluginPayload;
115
+ reason?: string;
116
+ };
117
+ /**
118
+ * Merge 'workbuddy' + the governance workspace into ~/.pd/install.json.
119
+ *
120
+ * Set-union semantics: existing hosts (codex/openclaw) and workspaces are
121
+ * always preserved; unknown top-level keys (the update side owns
122
+ * channel/autoCheck/releaseMetadataUrl — PRI-709 P0-1) are carried through.
123
+ * Malformed existing manifest → hard stop, zero modification.
124
+ */
125
+ export declare function mergeWorkbuddyIntoInstallManifest(manifestPath: string, governanceDir: string): {
126
+ ok: true;
127
+ } | {
128
+ ok: false;
129
+ reason: string;
130
+ nextAction: string;
131
+ };
132
+ export type FlagOverrideResult = {
133
+ ok: true;
134
+ configPath: string;
135
+ enabled: boolean;
136
+ } | {
137
+ ok: false;
138
+ reason: string;
139
+ nextAction: string;
140
+ };
141
+ /**
142
+ * Enable/disable `features.host.workbuddy.enabled` in the GOVERNANCE
143
+ * workspace's .pd/config.yaml with a line-targeted edit (comments and unknown
144
+ * keys preserved), creating a loader-valid config from the installer template
145
+ * when absent. Atomic write; round-trip verified.
146
+ */
147
+ export declare function setWorkbuddyGovernanceFlag(governanceDir: string, enabled: boolean): FlagOverrideResult;
148
+ /** Read the explicit host.workbuddy override state (null = no explicit override → registry default OFF). */
149
+ export declare function readWorkbuddyGovernanceFlagOverride(governanceDir: string): boolean | null;
150
+ export interface WorkbuddyDetectDetails extends HostDetectResult {
151
+ /** WorkBuddy host discovered (config dir exists). */
152
+ hostFound: boolean;
153
+ /** Engine CLI binary located. */
154
+ engineFound: boolean;
155
+ /** Resolved engine path when found. */
156
+ enginePath?: string;
157
+ /** installed_plugins.json v2 carries our registration. */
158
+ registered: boolean;
159
+ /** settings.json enabledPlugins[key] === true. */
160
+ pluginEnabled: boolean;
161
+ /** Explicit host.workbuddy override in the governance config (null = default OFF). */
162
+ flagOverride: boolean | null;
163
+ /** ~/.pd/runtime/workbuddy-adapter present (package.json + dist). */
164
+ runtimeReachable: boolean;
165
+ /** Governance workspace dir created (OD-07 initialized). */
166
+ governanceInitialized: boolean;
167
+ /** settings.json exists AND parsed (false also when unparsable — install fails loud there). */
168
+ settingsExisted: boolean;
169
+ }
170
+ export declare class WorkBuddyHostInstaller implements HostInstaller {
171
+ readonly hostId = "workbuddy";
172
+ private readonly deps;
173
+ constructor(deps?: WorkbuddyHostInstallerDeps);
174
+ private paths;
175
+ /**
176
+ * Run `node <engine> <args>`; returns undefined when the invocation itself
177
+ * failed.
178
+ *
179
+ * S2 (review 2026-10-13): every engine command is pinned to the DECLARED
180
+ * config root by injecting BOTH isolation variables (the Phase 0 P0
181
+ * recipe). The real engine prefers CODEBUDDY_CONFIG_DIR; without the
182
+ * injection it registered into ~/.codebuddy / a pre-existing CodeBuddy root
183
+ * while this installer verified the declared WorkBuddy root — command
184
+ * success and target registration diverged. WORKBUDDY_CONFIG_DIR is
185
+ * injected as well so engine versions that honor the WorkBuddy-scoped
186
+ * variable stay on the same root.
187
+ */
188
+ private runEngine;
189
+ /** Hooks run via `node` on PATH through Git Bash (frozen hook-runtime-contract shellAndRuntime). */
190
+ private preflightRuntime;
191
+ install(ctx: HostInstallContext): Promise<HostInstallResult>;
192
+ /**
193
+ * Initialize the OD-07 governance workspace with the FULL state the
194
+ * hook/console/worker chain reads (review 2026-10-13 R1).
195
+ *
196
+ * Preferred path: the SHARED initializer — `pd-cli runtime init --confirm
197
+ * --workspace <governanceDir>` — the exact entry the main installer runs for
198
+ * the generic workspace. It generates .pd/config.yaml from the core default
199
+ * config authority, .pd/state.db, and .state/trajectory.db with the
200
+ * canonical schema (idempotent; an existing config.yaml is never
201
+ * overwritten). Failure is a LOUD install failure — a registration without
202
+ * working governance state is exactly the R1 defect.
203
+ *
204
+ * Degraded path (pd-cli entry not resolvable — standalone host-installer
205
+ * use): the installer lays down the loader-valid default config from its own
206
+ * authority (generateConfigYamlContent, the same content the main installer
207
+ * writes for other hosts) so the hook CONFIG chain works, and reports the
208
+ * database initialization as an observable skip with an explicit next
209
+ * action — never a silent mkdir-only "success".
210
+ */
211
+ private initializeGovernanceWorkspace;
212
+ private registerPlugin;
213
+ /**
214
+ * Set enabledPlugins[OUR_KEY]=true in settings.json, preserving every other
215
+ * key (same protected write discipline as the direct-write registration).
216
+ * Converges the engine install path (which honors the payload manifest's
217
+ * defaultEnabled) onto the installer's frozen installed ⇒ enabled contract.
218
+ */
219
+ private enableRegisteredPlugin;
220
+ /**
221
+ * Direct-write registration for engine-unreachable machines, aligned with the
222
+ * frozen P01 formats: enabledPlugins[key]=true in settings.json (other keys
223
+ * and other plugins preserved), installed_plugins.json v2 entry
224
+ * {scope:'user', installPath, version, installedAt}, and the versioned cache
225
+ * copy under plugins/cache/<marketplace>/<plugin>/<version>/.
226
+ */
227
+ private directWriteRegistration;
228
+ /** Human-readable preview of exactly what enabling will change (shown BEFORE any write). */
229
+ describeGovernanceEnable(): {
230
+ flag: 'host.workbuddy';
231
+ configPath: string;
232
+ value: boolean;
233
+ takesEffect: string;
234
+ };
235
+ /** Explicit enable of PD governance (install never calls this). */
236
+ enableGovernance(): FlagOverrideResult;
237
+ /** Explicit disable of PD governance (reversible rollback path). */
238
+ disableGovernance(): FlagOverrideResult;
239
+ uninstall(_ctx: HostUninstallContext): Promise<HostUninstallResult>;
240
+ /** Remove only OUR entries from settings.json + installed_plugins.json (frozen formats). */
241
+ private directWriteRemoval;
242
+ detect(): HostDetectResult;
243
+ /** Detailed detect: install presence vs host discovery vs registration vs enablement vs runtime reachability. */
244
+ detectDetails(): WorkbuddyDetectDetails;
245
+ }
246
+ //# sourceMappingURL=workbuddy-host-installer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workbuddy-host-installer.d.ts","sourceRoot":"","sources":["../../src/installers/workbuddy-host-installer.ts"],"names":[],"mappings":"AAyDA,OAAO,KAAK,EACV,aAAa,EACb,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,gBAAgB,EACjB,MAAM,uBAAuB,CAAC;AAM/B,yFAAyF;AACzF,eAAO,MAAM,qBAAqB,wBAAwB,CAAC;AAC3D,qFAAqF;AACrF,eAAO,MAAM,0BAA0B,+BAA+B,CAAC;AACvE,+EAA+E;AAC/E,eAAO,MAAM,oBAAoB,mDAA2D,CAAC;AAoB7F,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,uBAAuB;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;OAMG;IACH,GAAG,CAAC,EAAE,M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