@phyzess/pappra 0.1.0-beta.13 → 0.1.0-beta.18

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 (357) hide show
  1. package/README.md +134 -15
  2. package/assets/integrations/skills/pappra/SKILL.md +28 -7
  3. package/assets/integrations/skills/pappra/references/collaboration.md +633 -0
  4. package/assets/integrations/skills/pappra/references/environment.md +360 -0
  5. package/assets/integrations/skills/pappra/references/hosts.md +20 -0
  6. package/assets/integrations/skills/pappra/references/operations.md +36 -5
  7. package/dist/adapters/pi/recovery-extension.d.ts +65 -0
  8. package/dist/adapters/pi/recovery-extension.js +238 -0
  9. package/dist/adapters/pi/session-transition-extension.d.ts +30 -0
  10. package/dist/adapters/pi/session-transition-extension.js +265 -0
  11. package/dist/app/automatic-handoff-events.d.ts +26 -0
  12. package/dist/app/automatic-handoff-events.js +134 -0
  13. package/dist/app/bounded-file.d.ts +2 -0
  14. package/dist/app/bounded-file.js +2 -0
  15. package/dist/app/capability-evidence/claude.d.ts +37 -0
  16. package/dist/app/capability-evidence/claude.js +206 -0
  17. package/dist/app/capability-evidence/codex.d.ts +35 -0
  18. package/dist/app/capability-evidence/codex.js +193 -0
  19. package/dist/app/capability-evidence/index.d.ts +33 -0
  20. package/dist/app/capability-evidence/index.js +117 -0
  21. package/dist/app/capability-evidence/pi.d.ts +73 -0
  22. package/dist/app/capability-evidence/pi.js +669 -0
  23. package/dist/app/capability-evidence/shared.d.ts +69 -0
  24. package/dist/app/capability-evidence/shared.js +195 -0
  25. package/dist/app/collab-auto-handoff.d.ts +55 -0
  26. package/dist/app/collab-auto-handoff.js +384 -0
  27. package/dist/app/collab-bindings.d.ts +57 -0
  28. package/dist/app/collab-bindings.js +1006 -0
  29. package/dist/app/collab-bootstrap-transport.d.ts +163 -0
  30. package/dist/app/collab-bootstrap-transport.js +769 -0
  31. package/dist/app/collab-bootstrap.d.ts +137 -0
  32. package/dist/app/collab-bootstrap.js +3455 -0
  33. package/dist/app/collab-handoff.d.ts +12 -0
  34. package/dist/app/collab-handoff.js +511 -0
  35. package/dist/app/collab-messages.d.ts +2 -0
  36. package/dist/app/collab-messages.js +2 -0
  37. package/dist/app/collab-notify.d.ts +156 -0
  38. package/dist/app/collab-notify.js +1208 -0
  39. package/dist/app/collab-preflight.d.ts +34 -0
  40. package/dist/app/collab-preflight.js +96 -0
  41. package/dist/app/collab-recovery-executor.d.ts +161 -0
  42. package/dist/app/collab-recovery-executor.js +1153 -0
  43. package/dist/app/collab-recovery-projection.d.ts +103 -0
  44. package/dist/app/collab-recovery-projection.js +659 -0
  45. package/dist/app/collab-recovery.d.ts +25 -0
  46. package/dist/app/collab-recovery.js +429 -0
  47. package/dist/app/collab-resources.d.ts +16 -0
  48. package/dist/app/collab-resources.js +278 -0
  49. package/dist/app/collab-role-events.d.ts +22 -0
  50. package/dist/app/collab-role-events.js +329 -0
  51. package/dist/app/collab-role-orchestration.d.ts +53 -0
  52. package/dist/app/collab-role-orchestration.js +601 -0
  53. package/dist/app/collab-role-plan.d.ts +81 -0
  54. package/dist/app/collab-role-plan.js +504 -0
  55. package/dist/app/collab-role-repair.d.ts +109 -0
  56. package/dist/app/collab-role-repair.js +821 -0
  57. package/dist/app/collab-rollover.d.ts +263 -0
  58. package/dist/app/collab-rollover.js +1112 -0
  59. package/dist/app/collab-route.d.ts +64 -0
  60. package/dist/app/collab-route.js +240 -0
  61. package/dist/app/collab-session-transition.d.ts +221 -0
  62. package/dist/app/collab-session-transition.js +3334 -0
  63. package/dist/app/collab-state.d.ts +7 -0
  64. package/dist/app/collab-state.js +162 -0
  65. package/dist/app/collab-task-store.d.ts +22 -0
  66. package/dist/app/collab-task-store.js +204 -0
  67. package/dist/app/collab-work-execution.d.ts +127 -0
  68. package/dist/app/collab-work-execution.js +1027 -0
  69. package/dist/app/collab-work-plan.d.ts +87 -0
  70. package/dist/app/collab-work-plan.js +437 -0
  71. package/dist/app/collaboration.d.ts +8 -2
  72. package/dist/app/collaboration.js +101 -12
  73. package/dist/app/doctor.js +108 -5
  74. package/dist/app/host-mcp.js +34 -8
  75. package/dist/app/host-probe.js +4 -4
  76. package/dist/app/init.d.ts +58 -4
  77. package/dist/app/init.js +768 -155
  78. package/dist/app/managed-pi-bootstrap-admission.d.ts +14 -0
  79. package/dist/app/managed-pi-bootstrap-admission.js +104 -0
  80. package/dist/app/managed-pi-bootstrap-refresh.d.ts +10 -0
  81. package/dist/app/managed-pi-bootstrap-refresh.js +78 -0
  82. package/dist/app/managed-pi-delivery.d.ts +8 -0
  83. package/dist/app/managed-pi-delivery.js +110 -0
  84. package/dist/app/managed-pi-handoff-receiver.d.ts +15 -0
  85. package/dist/app/managed-pi-handoff-receiver.js +263 -0
  86. package/dist/app/managed-pi-handoff-reference.d.ts +3 -0
  87. package/dist/app/managed-pi-handoff-reference.js +60 -0
  88. package/dist/app/managed-pi-herdr.d.ts +21 -0
  89. package/dist/app/managed-pi-herdr.js +185 -0
  90. package/dist/app/managed-pi-initial-admission.d.ts +28 -0
  91. package/dist/app/managed-pi-initial-admission.js +416 -0
  92. package/dist/app/managed-pi-initial-launch.d.ts +5 -0
  93. package/dist/app/managed-pi-initial-launch.js +61 -0
  94. package/dist/app/managed-pi-native-observation.d.ts +36 -0
  95. package/dist/app/managed-pi-native-observation.js +191 -0
  96. package/dist/app/managed-pi-readiness.d.ts +29 -0
  97. package/dist/app/managed-pi-readiness.js +288 -0
  98. package/dist/app/managed-pi-repair-stop.d.ts +21 -0
  99. package/dist/app/managed-pi-repair-stop.js +371 -0
  100. package/dist/app/managed-pi-resume-admission.d.ts +32 -0
  101. package/dist/app/managed-pi-resume-admission.js +618 -0
  102. package/dist/app/managed-pi-retirement.d.ts +28 -0
  103. package/dist/app/managed-pi-retirement.js +112 -0
  104. package/dist/app/managed-pi-sdk-control.d.ts +7 -0
  105. package/dist/app/managed-pi-sdk-control.js +169 -0
  106. package/dist/app/managed-pi-sdk-runtime.d.ts +3 -0
  107. package/dist/app/managed-pi-sdk-runtime.js +483 -0
  108. package/dist/app/managed-pi-source-admission.d.ts +14 -0
  109. package/dist/app/managed-pi-source-admission.js +323 -0
  110. package/dist/app/managed-pi-transition-host.d.ts +36 -0
  111. package/dist/app/managed-pi-transition-host.js +292 -0
  112. package/dist/app/managed-pi.d.ts +54 -0
  113. package/dist/app/managed-pi.js +248 -0
  114. package/dist/app/shell-readiness.d.ts +66 -0
  115. package/dist/app/shell-readiness.js +368 -0
  116. package/dist/app/task-pin.d.ts +2 -23
  117. package/dist/app/task-pin.js +2 -113
  118. package/dist/cli/commands/collaboration-binding.d.ts +13 -0
  119. package/dist/cli/commands/collaboration-binding.js +118 -0
  120. package/dist/cli/commands/collaboration-bootstrap.d.ts +10 -0
  121. package/dist/cli/commands/collaboration-bootstrap.js +84 -0
  122. package/dist/cli/commands/collaboration-capabilities.d.ts +13 -0
  123. package/dist/cli/commands/collaboration-capabilities.js +127 -0
  124. package/dist/cli/commands/collaboration-handoff.d.ts +13 -0
  125. package/dist/cli/commands/collaboration-handoff.js +102 -0
  126. package/dist/cli/commands/collaboration-message.d.ts +17 -0
  127. package/dist/cli/commands/collaboration-message.js +177 -0
  128. package/dist/cli/commands/collaboration-plan.d.ts +8 -0
  129. package/dist/cli/commands/collaboration-plan.js +108 -0
  130. package/dist/cli/commands/collaboration-preflight.d.ts +10 -0
  131. package/dist/cli/commands/collaboration-preflight.js +167 -0
  132. package/dist/cli/commands/collaboration-recovery-run.d.ts +46 -0
  133. package/dist/cli/commands/collaboration-recovery-run.js +224 -0
  134. package/dist/cli/commands/collaboration-recovery.d.ts +11 -0
  135. package/dist/cli/commands/collaboration-recovery.js +104 -0
  136. package/dist/cli/commands/collaboration-resources.d.ts +11 -0
  137. package/dist/cli/commands/collaboration-resources.js +96 -0
  138. package/dist/cli/commands/collaboration-role-plan.d.ts +9 -0
  139. package/dist/cli/commands/collaboration-role-plan.js +69 -0
  140. package/dist/cli/commands/collaboration-role-run.d.ts +11 -0
  141. package/dist/cli/commands/collaboration-role-run.js +128 -0
  142. package/dist/cli/commands/collaboration-rollover.d.ts +10 -0
  143. package/dist/cli/commands/collaboration-rollover.js +103 -0
  144. package/dist/cli/commands/collaboration-state.d.ts +10 -0
  145. package/dist/cli/commands/collaboration-state.js +96 -0
  146. package/dist/cli/commands/collaboration-transition.d.ts +10 -0
  147. package/dist/cli/commands/collaboration-transition.js +75 -0
  148. package/dist/cli/commands/collaboration-work-run.d.ts +34 -0
  149. package/dist/cli/commands/collaboration-work-run.js +178 -0
  150. package/dist/cli/commands/collaboration.d.ts +4 -0
  151. package/dist/cli/commands/collaboration.js +39 -4
  152. package/dist/cli/commands/continuity.js +2 -6
  153. package/dist/cli/commands/docs.d.ts +2 -0
  154. package/dist/cli/commands/docs.js +89 -15
  155. package/dist/cli/commands/host.d.ts +7 -1
  156. package/dist/cli/commands/host.js +122 -7
  157. package/dist/cli/commands/init.d.ts +20 -3
  158. package/dist/cli/commands/init.js +897 -232
  159. package/dist/cli/commands/mcp.d.ts +1 -0
  160. package/dist/cli/commands/mcp.js +11 -5
  161. package/dist/cli/commands/repair.d.ts +12 -0
  162. package/dist/cli/commands/repair.js +41 -0
  163. package/dist/cli/commands/runtime.d.ts +1 -1
  164. package/dist/cli/commands/runtime.js +139 -38
  165. package/dist/cli/commands/session.d.ts +7 -0
  166. package/dist/cli/commands/session.js +82 -0
  167. package/dist/cli/commands/task.js +19 -5
  168. package/dist/cli/run.js +866 -24
  169. package/dist/code/identity.d.ts +7 -0
  170. package/dist/code/identity.js +7 -3
  171. package/dist/code/registration.js +7 -0
  172. package/dist/code/service.d.ts +9 -0
  173. package/dist/code/service.js +16 -3
  174. package/dist/code/text.js +19 -7
  175. package/dist/collab/admission.d.ts +91 -66
  176. package/dist/collab/admission.js +21 -6
  177. package/dist/collab/canonical.d.ts +1 -1
  178. package/dist/collab/canonical.js +44 -3
  179. package/dist/collab/envelope.d.ts +2 -2
  180. package/dist/collab/envelope.js +12 -12
  181. package/dist/collab/first-work.d.ts +3 -0
  182. package/dist/collab/first-work.js +15 -0
  183. package/dist/collab/handoff.d.ts +16 -0
  184. package/dist/collab/handoff.js +39 -5
  185. package/dist/collab/index.d.ts +97 -1
  186. package/dist/collab/index.js +9 -1
  187. package/dist/collab/messages.js +126 -3
  188. package/dist/collab/persisted-messages.d.ts +123 -0
  189. package/dist/collab/persisted-messages.js +496 -0
  190. package/dist/collab/preflight.d.ts +1 -1
  191. package/dist/collab/resources.d.ts +13 -3
  192. package/dist/collab/resources.js +37 -6
  193. package/dist/collab/rollover.d.ts +311 -0
  194. package/dist/collab/rollover.js +1024 -0
  195. package/dist/collab/store.d.ts +1 -0
  196. package/dist/collab/store.js +1 -4
  197. package/dist/collab/types.d.ts +2 -354
  198. package/dist/collab/validation.d.ts +2 -10
  199. package/dist/collab/validation.js +2 -303
  200. package/dist/collab/work-plan.d.ts +105 -0
  201. package/dist/collab/work-plan.js +843 -0
  202. package/dist/continuity/context.d.ts +11 -2
  203. package/dist/continuity/context.js +100 -13
  204. package/dist/continuity/handoff-bundle.d.ts +296 -0
  205. package/dist/continuity/handoff-bundle.js +477 -0
  206. package/dist/continuity/index.d.ts +2 -0
  207. package/dist/continuity/index.js +1 -0
  208. package/dist/continuity/paths.js +10 -2
  209. package/dist/continuity/service.js +91 -15
  210. package/dist/continuity/task-pin.d.ts +24 -0
  211. package/dist/continuity/task-pin.js +590 -0
  212. package/dist/doctor.d.ts +1 -0
  213. package/dist/doctor.js +6 -0
  214. package/dist/experimental/index.d.ts +13 -0
  215. package/dist/experimental/index.js +25 -0
  216. package/dist/experimental/pi.d.ts +4 -0
  217. package/dist/experimental/pi.js +12 -0
  218. package/dist/hosts/claude/native.js +1 -1
  219. package/dist/hosts/codex/native.js +1 -1
  220. package/dist/hosts/codex/protocol.js +1 -1
  221. package/dist/hosts/integration/bootstrap-config.d.ts +58 -0
  222. package/dist/hosts/integration/bootstrap-config.js +254 -0
  223. package/dist/hosts/integration/bundle-export.d.ts +44 -0
  224. package/dist/hosts/integration/bundle-export.js +366 -3
  225. package/dist/hosts/integration/bundle.js +3 -0
  226. package/dist/hosts/integration/hook.js +36 -9
  227. package/dist/hosts/integration/pappra-bootstrap-extension.mjs +80 -0
  228. package/dist/hosts/integration/pappra-extension-runtime.mjs +59 -24631
  229. package/dist/hosts/integration/pappra-hook.mjs +61 -24749
  230. package/dist/hosts/integration/pappra-recovery-extension.mjs +259 -0
  231. package/dist/hosts/integration/pappra-session-transition-extension.mjs +276 -0
  232. package/dist/hosts/integration/pi-bootstrap-extension.d.ts +36 -0
  233. package/dist/hosts/integration/pi-bootstrap-extension.js +101 -0
  234. package/dist/hosts/integration/pi-bootstrap-guard.d.ts +125 -0
  235. package/dist/hosts/integration/pi-bootstrap-guard.js +438 -0
  236. package/dist/hosts/integration/pi-bootstrap-runtime.d.ts +63 -0
  237. package/dist/hosts/integration/pi-bootstrap-runtime.js +223 -0
  238. package/dist/hosts/integration/pi-native-events.d.ts +112 -0
  239. package/dist/hosts/integration/pi-native-events.js +348 -0
  240. package/dist/hosts/integration/pi-rollover-extension.d.ts +166 -0
  241. package/dist/hosts/integration/pi-rollover-extension.js +431 -0
  242. package/dist/hosts/integration/recovery-config.d.ts +48 -0
  243. package/dist/hosts/integration/recovery-config.js +117 -0
  244. package/dist/hosts/integration/service.d.ts +6 -1
  245. package/dist/hosts/integration/service.js +485 -35
  246. package/dist/hosts/integration/support.d.ts +7 -0
  247. package/dist/hosts/integration/support.js +9 -1
  248. package/dist/hosts/integration/templates.d.ts +3 -0
  249. package/dist/hosts/integration/templates.js +26 -3
  250. package/dist/hosts/pi/managed-host-identity.d.ts +2 -0
  251. package/dist/hosts/pi/managed-host-identity.js +40 -0
  252. package/dist/hosts/pi/managed-provider-diagnostics.d.ts +6 -0
  253. package/dist/hosts/pi/managed-provider-diagnostics.js +184 -0
  254. package/dist/hosts/pi/managed-sdk-session.d.ts +335 -0
  255. package/dist/hosts/pi/managed-sdk-session.js +1639 -0
  256. package/dist/hosts/pi/managed-session-extension.d.ts +20 -0
  257. package/dist/hosts/pi/managed-session-extension.js +84 -0
  258. package/dist/hosts/pi/managed-session.d.ts +177 -0
  259. package/dist/hosts/pi/managed-session.js +1557 -0
  260. package/dist/hosts/pi/protocol.js +1 -1
  261. package/dist/hosts/pi/query-result.js +1 -1
  262. package/dist/hosts/pi/resume-capability.d.ts +41 -0
  263. package/dist/hosts/pi/resume-capability.js +33 -0
  264. package/dist/hosts/pi/rpc.d.ts +182 -134
  265. package/dist/hosts/pi/rpc.js +230 -37
  266. package/dist/hosts/pilot.d.ts +97 -74
  267. package/dist/hosts/pilot.js +5 -1
  268. package/dist/hosts/version.d.ts +3 -0
  269. package/dist/hosts/version.js +18 -0
  270. package/dist/index.d.ts +0 -1
  271. package/dist/index.js +0 -1
  272. package/dist/infra/bounded-file.d.ts +19 -0
  273. package/dist/infra/bounded-file.js +66 -0
  274. package/dist/infra/fs.js +10 -2
  275. package/dist/infra/git.d.ts +29 -0
  276. package/dist/infra/git.js +45 -9
  277. package/dist/infra/json-property.d.ts +2 -0
  278. package/dist/infra/json-property.js +69 -0
  279. package/dist/infra/json.d.ts +4 -0
  280. package/dist/infra/json.js +24 -0
  281. package/dist/infra/owned-process-group.js +1 -1
  282. package/dist/infra/private-lock.d.ts +16 -0
  283. package/dist/infra/private-lock.js +148 -0
  284. package/dist/infra/private-state.d.ts +7 -0
  285. package/dist/infra/private-state.js +146 -0
  286. package/dist/infra/process-identity.d.ts +12 -0
  287. package/dist/infra/process-identity.js +142 -0
  288. package/dist/infra/validation.d.ts +5 -0
  289. package/dist/infra/validation.js +15 -0
  290. package/dist/init.d.ts +1 -0
  291. package/dist/init.js +6 -0
  292. package/dist/install/apply.d.ts +9 -1
  293. package/dist/install/apply.js +176 -12
  294. package/dist/install/dependencies.d.ts +38 -0
  295. package/dist/install/dependencies.js +282 -0
  296. package/dist/install/ownership.js +30 -1
  297. package/dist/install/references.d.ts +31 -0
  298. package/dist/install/references.js +208 -0
  299. package/dist/install/repair.d.ts +37 -0
  300. package/dist/install/repair.js +798 -0
  301. package/dist/install/reset-local.d.ts +16 -0
  302. package/dist/install/reset-local.js +304 -0
  303. package/dist/install/rollback.d.ts +3 -0
  304. package/dist/install/rollback.js +9 -3
  305. package/dist/install/runtime.d.ts +10 -6
  306. package/dist/install/runtime.js +299 -59
  307. package/dist/install/source-fingerprint.d.ts +2 -0
  308. package/dist/install/source-fingerprint.js +103 -0
  309. package/dist/knowledge/catalog.d.ts +1 -0
  310. package/dist/knowledge/catalog.js +143 -10
  311. package/dist/knowledge/journal.js +17 -7
  312. package/dist/knowledge/paths.js +2 -1
  313. package/dist/knowledge/refs.js +4 -0
  314. package/dist/knowledge/register-batch.d.ts +4 -0
  315. package/dist/knowledge/register-batch.js +225 -0
  316. package/dist/knowledge/relocate.d.ts +5 -0
  317. package/dist/knowledge/relocate.js +92 -0
  318. package/dist/knowledge/scan.js +103 -47
  319. package/dist/knowledge/service.d.ts +3 -0
  320. package/dist/knowledge/service.js +33 -1
  321. package/dist/knowledge/write.d.ts +4 -1
  322. package/dist/knowledge/write.js +1 -1
  323. package/dist/mcp/server.d.ts +4 -2
  324. package/dist/mcp/server.js +87 -136
  325. package/dist/schemas/collaboration-state-validation.d.ts +6 -0
  326. package/dist/schemas/collaboration-state-validation.js +342 -0
  327. package/dist/schemas/collaboration-state.d.ts +436 -0
  328. package/dist/schemas/collaboration-state.js +1 -0
  329. package/dist/schemas/collaboration.d.ts +335 -0
  330. package/dist/schemas/collaboration.js +272 -0
  331. package/dist/schemas/continuity.d.ts +8 -0
  332. package/dist/schemas/continuity.js +13 -3
  333. package/dist/schemas/doctor.d.ts +1 -0
  334. package/dist/schemas/doctor.js +1 -0
  335. package/dist/schemas/document.d.ts +61 -0
  336. package/dist/schemas/document.js +9 -0
  337. package/dist/schemas/errors.d.ts +1 -0
  338. package/dist/schemas/errors.js +1 -0
  339. package/dist/schemas/host.d.ts +24 -0
  340. package/dist/schemas/host.js +19 -0
  341. package/dist/schemas/install.d.ts +8 -2
  342. package/dist/schemas/install.js +11 -1
  343. package/dist/schemas/managed-pi-execution.d.ts +16 -0
  344. package/dist/schemas/managed-pi-execution.js +2 -0
  345. package/dist/schemas/outcome.d.ts +9 -5
  346. package/dist/workspace/config-file.js +1 -3
  347. package/dist/workspace/documents.js +12 -2
  348. package/dist/workspace/repositories.d.ts +7 -0
  349. package/dist/workspace/repositories.js +14 -5
  350. package/package.json +35 -35
  351. package/skills/pappra/SKILL.md +28 -7
  352. package/skills/pappra/references/collaboration.md +633 -0
  353. package/skills/pappra/references/environment.md +360 -0
  354. package/skills/pappra/references/hosts.md +20 -0
  355. package/skills/pappra/references/operations.md +36 -5
  356. package/dist/app/collab-from.d.ts +0 -35
  357. package/dist/app/collab-from.js +0 -84
@@ -0,0 +1,360 @@
1
+ # Visible collaboration workflow
2
+
3
+ Choose the collaboration channel before preparing a task, and keep the two
4
+ environment choices distinct from the work itself: a channel decides where a
5
+ participant runs and how messages reach it. It never grants permissions,
6
+ capabilities, ownership, or task success. Existing guidance starts after
7
+ participants exist; this reference covers the entry path from a new authorized
8
+ request to a bound, ready receiving instance.
9
+
10
+ ## 1. Detect the environment, not the installed tools
11
+
12
+ Inspect only the non-sensitive Herdr markers and caller IDs, for example:
13
+
14
+ ```nu
15
+ $env.HERDR_ENV? == '1'
16
+ ```
17
+
18
+ - **False or absent** — use **direct mode**: keep the current session as
19
+ coordinator and use the host's own supported tools. Do not query a Herdr
20
+ server, inspect its focus, split panes, or open a terminal merely because a
21
+ `herdr` binary is installed. A binary, an open window, or an old pane ID in a
22
+ task record proves no caller affiliation. Do not print the process
23
+ environment.
24
+ - **True** — you are inside a Herdr caller. Read that installation's own
25
+ `herdr --skill` and the relevant `--help` before acting (pane ids and flags
26
+ are version-sensitive), then resolve the current caller, for example
27
+ `herdr pane current --current`. If the claim cannot be resolved
28
+ unambiguously, record **herdr unavailable** with the reason and fall back to
29
+ direct mode only when the user's instructions allow it.
30
+ - The UI-focused pane is never a fallback. Do not spoof `HERDR_*` values.
31
+ - If the task requires visible delivery and it is unavailable, report the
32
+ blocker. Do not start a hidden duplicate of the required participant.
33
+
34
+ A failed inherited `pane current --current` lookup is not enough to conclude
35
+ that native collaboration is unavailable. For a moved pane or a persistent
36
+ app-server with stale inherited context, inspect the current task's known
37
+ caller binding and the named live agent metadata. An unambiguous task-bound
38
+ caller can use `pane current --pane <id>` and Pappra's `--caller-pane` route.
39
+ Compare the actual harness, cwd and reported session where available; never
40
+ choose a pane merely because it is focused. If identity remains ambiguous,
41
+ report that exact gap and do not dispatch. Route evidence is not process proof.
42
+
43
+ `pappra collab message notify` supports two caller routes. The default requires
44
+ the inherited Herdr context; `--caller-pane <id>` names the sender pane
45
+ explicitly for hosted or stale inherited contexts. Either way the pane is
46
+ routing evidence, not process authentication, and recorded delivery evidence
47
+ stays `process_affiliation: "not-established"`.
48
+
49
+ ## 2. Decide participants and bootstrap the receiving instance
50
+
51
+ Pick participants, roles, harness, and configuration from the task rather than a
52
+ fixed agent count. Everyone can implement, review, or verify; assign by need.
53
+
54
+ Reuse an existing peer only when all of the following match what the task will
55
+ bind: current agent name, pane, harness, cwd, native session (where the host
56
+ reports one), and the capabilities the assignment will require. Otherwise, when
57
+ a new visible participant is authorized, create a **sibling** shell pane with
58
+ the task's cwd and the installed layout/`--no-focus` options you verified above,
59
+ start the intended interactive agent there, and keep the user's focus unchanged.
60
+ Do not add worktrees, workspaces, or tabs just to get a pane, and never take over
61
+ an arbitrary idle pane.
62
+
63
+ ### One-time bounded discovery contact
64
+
65
+ A newly started interactive instance has not told you its identity yet. Before
66
+ any task preparation that depends on it, make exactly **one** bounded,
67
+ read-only discovery contact through the installed visible tool (for example the
68
+ installed `herdr agent prompt` command; confirm its syntax from
69
+ `herdr --help`/`--skill`). Ask only for:
70
+
71
+ - the agent/host name and harness actually running;
72
+ - the exact native session identity the host accepts (or an explicit "unknown"
73
+ when the host cannot report one);
74
+ - the actual cwd and configuration/model in use;
75
+ - where the instance can leave a bounded native evidence file (for example a Pi
76
+ session JSONL path) if that evidence route exists.
77
+
78
+ State explicitly in that contact that it is a read-only identity handshake: do
79
+ not start implementation, do not answer approvals, do not change settings, and
80
+ reply with the identity packet only. This contact is **bootstrap**, not a
81
+ product notification and not an ASSIGN. It must be clearly separate from normal
82
+ `COLLAB_MESSAGE` delivery, which needs a binding that does not exist yet.
83
+
84
+ If that first contact route is unavailable (direct mode without a visible
85
+ channel, missing host capability, refused prompt), report the concrete blocker.
86
+ Do not fabricate a runtime card, assume a session identity, or launch an owned
87
+ child as a stand-in for the visible participant.
88
+
89
+ Starting and contacting the interactive instance is not a readiness check and
90
+ not permission to dispatch source work. Do not send an implementation prompt at
91
+ this point, and do not substitute the isolated pilot launcher or bypass host
92
+ approvals. Preserve the daily native model, tools, MCP, hooks, and permission
93
+ settings.
94
+
95
+ ## 3. Bind routing metadata
96
+
97
+ Record the observed routing identity in the existing task-local binding
98
+ `pappra/collab-binding/1`. Use the discovered values; use JSON `null` (not a
99
+ quoted string) only when the host genuinely cannot report a native session. A
100
+ null/unknown worker session can be recorded for routing, but it cannot be bound
101
+ to an admitted work assignment: the goal schema requires an exact assignee
102
+ session, so report the identity blocker instead of preparing work for an
103
+ unknown instance.
104
+
105
+ ```json
106
+ {
107
+ "schema": "pappra/collab-binding/1",
108
+ "task_id": "<task-id>",
109
+ "task_root": "/absolute/domain/tasks/<task-id>",
110
+ "channel": "herdr",
111
+ "participants": [
112
+ {
113
+ "agent_id": "<coordinator-agent>",
114
+ "harness": "<codex|pi|claude>",
115
+ "cwd": "/absolute/coordinator/cwd",
116
+ "herdr_agent": "<named-coordinator-agent>",
117
+ "pane_id": "<wN:pN>",
118
+ "native_session_id": "<exact-coordinator-session>"
119
+ },
120
+ {
121
+ "agent_id": "<worker-agent>",
122
+ "harness": "<codex|pi|claude>",
123
+ "cwd": "/absolute/receiving/cwd",
124
+ "herdr_agent": "<named-worker-agent>",
125
+ "pane_id": "<wN:pN>",
126
+ "native_session_id": "<exact-worker-session-or-null>"
127
+ }
128
+ ]
129
+ }
130
+ ```
131
+
132
+ Placeholders such as `<task-id>` and `<exact-worker-session>` are literal
133
+ substitution points, not values. A pane ID is not a native session ID, and this
134
+ binding is routing metadata, not a second ownership store and not proof that a
135
+ native session exists. Revalidate it before later sends, resume, or handoff.
136
+
137
+ ## 4. Prepare the task and admit the new assignment
138
+
139
+ `pappra collab prepare` is **not** a preview command: it has no plan/apply mode.
140
+ With explicit operator/agent authorization it writes the private task record and
141
+ prepared files, claims the listed resources, and registers the initial
142
+ `ASSIGN`. Do not run it expecting a dry run, and do not treat the message-level
143
+ `send`/`notify` plan behavior as applying to preparation. Resource, message,
144
+ binding, handoff, and recovery commands are the ones with plan/apply modes; see
145
+ `references/collaboration.md`.
146
+
147
+ ```sh
148
+ # Mutates task/prepared state and claims. Requires explicit authorization.
149
+ pappra collab prepare \
150
+ --goal /abs/example/goal.json \
151
+ --domain-root /abs/example/domain
152
+ ```
153
+
154
+ Preparation creates no declared capability template or card. If you need a
155
+ derivation template, write one yourself from the assignment's expected
156
+ capabilities and mark it clearly as declared, for example:
157
+
158
+ ```json
159
+ {
160
+ "schema": "harness-collab/capabilities/1",
161
+ "agent_id": "<worker-agent>",
162
+ "session_id": "<exact-worker-session-or-null>",
163
+ "harness": "<pi|codex|claude>",
164
+ "surface": "cli",
165
+ "configuration_id": "<observed-configuration>",
166
+ "cwd": "/absolute/receiving/cwd",
167
+ "observed_at": "<ISO time from actual evidence>",
168
+ "evidence_level": "declared",
169
+ "skills": [],
170
+ "tools": [{ "id": "<expected-tool>", "state": "declared" }]
171
+ }
172
+ ```
173
+
174
+ A declared template is not evidence and cannot authorize a launch. Derive a
175
+ runtime card from evidence the receiving instance actually produced (native
176
+ session/events), and save only the returned `card`; derivation prints a result
177
+ wrapper and writes nothing:
178
+
179
+ ```nu
180
+ # Literal example values: substitute the real harness and absolute paths.
181
+ let harness = "pi"
182
+ let assignment = "/abs/example/assignment.json"
183
+ let template = "/abs/example/card.declared.json"
184
+ let execution = "/abs/example/execution.json"
185
+ let session = "/abs/example/pi-session.jsonl"
186
+ let deriveArgs = [
187
+ 'collab' 'capabilities' 'derive'
188
+ '--harness' $harness
189
+ '--assignment' $assignment
190
+ '--template' $template
191
+ '--execution' $execution
192
+ '--session' $session
193
+ '--json'
194
+ ]
195
+ let derived = (^pappra ...$deriveArgs | from json)
196
+ if $derived.status != 'derived' { error make {msg: $"derive refused: ($derived.status)"} }
197
+ $derived.card | to json | save --raw /abs/example/card.runtime.json
198
+ ```
199
+
200
+ For Codex or Claude replace the session flag with the events flag accepted by
201
+ the installed command (`pappra collab capabilities derive --help`), and set
202
+ `--harness` to the participant's actual harness. `save --raw` refuses to
203
+ overwrite, so use a new path. Observation time and
204
+ freshness come from the native evidence; replaying old artifacts does not
205
+ refresh them. If the evidence route does not exist, record the blocker instead
206
+ of inventing a card, then check reported readiness:
207
+
208
+ ```sh
209
+ pappra collab preflight \
210
+ --assignment /abs/example/assignment.json \
211
+ --capabilities /abs/example/card.runtime.json --json
212
+ ```
213
+
214
+ Ready is not authorization, locking, or dispatch. A declared, stale,
215
+ mismatched, or missing-evidence card stays refused; fix the evidence or report
216
+ the gap.
217
+
218
+ ## 5. Dispatch once and return a correlated result
219
+
220
+ Preparation already persisted the initial `ASSIGN`. Do not send a second ASSIGN
221
+ for the same attempt. Locate the exact registered message by its own fields
222
+ (current `task_id`, `subtask_id`, `attempt`, `owner_epoch`, recipient, and input
223
+ revision) and read it back through the product:
224
+
225
+ ```nu
226
+ # Literal example paths: replace them with the actual prepared file and values.
227
+ let prepared = (open /abs/example-domain/tasks/example-task/p10/prepared.json)
228
+ let record = (open ($prepared.task_root + "/task.json"))
229
+ let assignEntries = ($record.messages | where { |m| $m.type == "ASSIGN" and $m.subtask_id == $prepared.subtask_id and $m.attempt == $prepared.attempt and $m.to.agent_id == "worker-agent" and $m.to.session_id == "worker-session" })
230
+ if ($assignEntries | length) != 1 { error make {msg: "expected exactly one prepared ASSIGN for this attempt"} }
231
+ let registered = (pappra collab message read --task-root $prepared.task_root --message-id $assignEntries.0.message_id --json | from json)
232
+ if $registered.message.body.input_revision != $prepared.prompt_digest { error make {msg: "prepared ASSIGN input mismatch"} }
233
+ if $registered.message.body.assignment_digest != $prepared.assignment_digest { error make {msg: "prepared ASSIGN digest mismatch"} }
234
+ ```
235
+
236
+ `message read` returns the full envelope and its recorded/applied state. Send
237
+ additional `message send --apply` envelopes only for a genuinely new bounded
238
+ assignment (for example a later attempt) or a message that is not already
239
+ persisted. Then send exactly one pointer-only notification for that registered
240
+ message:
241
+
242
+ ```sh
243
+ # Literal example values: substitute the real task root, message id, binding and pane.
244
+ pappra collab message notify --task-root /abs/example/domain/tasks/example-task \
245
+ --message-id msg-example-assign \
246
+ --binding /abs/example/binding.json --caller-pane w9:p1 --apply
247
+ ```
248
+
249
+ Never loop notifications, never use `--wait`, and never treat `submitted` as
250
+ consumption or acceptance.
251
+
252
+ The receiving instance verifies the pointer digest and **its own** exact
253
+ identity before working: its `to.agent_id`/`to.session_id` must match the
254
+ envelope, and the task/subtask/attempt/owner epoch/input revision must match its
255
+ prepared state. It then records a correlated `ACK` (one envelope, registered
256
+ with `--apply`), does admitted work, and persists one `REPORT`, `BLOCK`, or
257
+ `STATUS` followed by one product notification to the coordinator.
258
+
259
+ Minimal correlated envelopes (placeholders are substitution points; keep
260
+ `content_digest: null` — registration records the real digest):
261
+
262
+ ```json
263
+ {
264
+ "schema": "harness-collab/message/1",
265
+ "message_id": "msg-<unique>-ack",
266
+ "type": "ACK",
267
+ "task_id": "<task-id>",
268
+ "from": {
269
+ "agent_id": "<worker-agent>",
270
+ "session_id": "<exact-worker-session>",
271
+ "harness": "<harness>"
272
+ },
273
+ "to": {
274
+ "agent_id": "<coordinator-agent>",
275
+ "session_id": "<exact-coordinator-session>",
276
+ "harness": "<harness>"
277
+ },
278
+ "reply_to": "<assign-message-id>",
279
+ "subtask_id": "<subtask-id>",
280
+ "attempt": 1,
281
+ "owner_epoch": 1,
282
+ "created_at": "<ISO-8601>",
283
+ "content_digest": null,
284
+ "body": {}
285
+ }
286
+ ```
287
+
288
+ ```json
289
+ {
290
+ "schema": "harness-collab/message/1",
291
+ "message_id": "msg-<unique>-report",
292
+ "type": "REPORT",
293
+ "task_id": "<task-id>",
294
+ "from": {
295
+ "agent_id": "<worker-agent>",
296
+ "session_id": "<exact-worker-session>",
297
+ "harness": "<harness>"
298
+ },
299
+ "to": {
300
+ "agent_id": "<coordinator-agent>",
301
+ "session_id": "<exact-coordinator-session>",
302
+ "harness": "<harness>"
303
+ },
304
+ "reply_to": "<assign-message-id>",
305
+ "subtask_id": "<subtask-id>",
306
+ "attempt": 1,
307
+ "owner_epoch": 1,
308
+ "created_at": "<ISO-8601>",
309
+ "content_digest": null,
310
+ "body": {
311
+ "status": "completed",
312
+ "outputs": [],
313
+ "native_ref": null,
314
+ "evidence_ref": "/absolute/evidence/report.json"
315
+ }
316
+ }
317
+ ```
318
+
319
+ The worker registers each envelope (`message send --apply`) and reads it back.
320
+ Registration may report `accepted`, `duplicate`, or a classification such as
321
+ `rejected`; check the actual status rather than assuming acceptance, and do not
322
+ resend a rejected REPORT with a new id unless the underlying evidence changed.
323
+ The worker then notifies the coordinator once with the same task-local binding
324
+ and its own `--caller-pane` where needed. The coordinator verifies the
325
+ artifacts, the exact correlation and the pinned input before deciding business
326
+ acceptance; protocol application and acceptance remain separate facts.
327
+
328
+ The owned `pappra collab run --controller pi-rpc` path remains a separate,
329
+ explicit option for an owned Pi RPC child with its own admission and evidence
330
+ limits. Do not present it as the default collaboration channel, and do not use
331
+ it to imitate a visible participant.
332
+
333
+ ## 6. Yield, then verify
334
+
335
+ After sending the notification, yield. Independent work continues in the
336
+ receiving session; do not poll panes, status endpoints, or logs, do not install
337
+ completion timers, and do not re-wake yourself. An idle or finished pane is not
338
+ a result, a stopped process, or acceptance.
339
+
340
+ When the coordinator's next turn arrives, verify the reported artifacts and
341
+ inputs yourself. If a delivery or execution outcome is uncertain, inspect the
342
+ original evidence through the existing recovery surface
343
+ (`pappra collab recovery inspect`) before any explicit retry or handoff. A
344
+ fresh history client cannot adopt native control of an unknown execution, and
345
+ claimed resources stay held until the protocol permits release.
346
+
347
+ ## Known limits
348
+
349
+ - `notify` does not create, start, or discover a participant. Bootstrap contact
350
+ remains a one-time, read-only operator/agent action inside the authorized
351
+ visible environment, separate from product notifications.
352
+ - A pane is a visibility aid: it is not authentication, native identity, or
353
+ stop proof. Live ownership of an existing native session cannot be rebuilt
354
+ from stored pointers.
355
+ - Herdr command shapes change between versions. Treat the examples here as
356
+ product-side routing patterns and confirm the actual flags with the installed
357
+ `herdr --help`/`--skill` at use time.
358
+ - Without a working visible channel, persisted messaging and the owned Pi RPC
359
+ run may still be available, but they do not satisfy a visible-delivery
360
+ requirement.
@@ -9,6 +9,26 @@ entry imports `./runtime.mjs` next to it, so the package survives a moved
9
9
  checkout. Pi 1.3.0 was verified in a real session through the packaged extension
10
10
  (`pi install <dir> -l -a` + `pi -p -a`).
11
11
 
12
+ `pappra host bundle --host pi --bootstrap-config <abs-file>` is the opt-in successor
13
+ variant: the destination must be new, the private config binds one canonical task root
14
+ and guard pin, and the generated entry installs a default-deny tool gate before any
15
+ config/reader/lifecycle work. Its read-only `bootstrap-status` reports registration,
16
+ never write permission; export does not install, trust, load or transfer.
17
+
18
+ The bootstrap export relies on a trusted local parent directory with no concurrent
19
+ namespace mutation. It exclusively claims a new destination (existing empty, populated,
20
+ file or symlink targets are left untouched), assembles the payload in a private staging
21
+ directory with identity checks, and on a failure before publication removes only the empty
22
+ claim and stage it created. This is not an OS filesystem fence: portable Node has no
23
+ anchored directory writes or no-replace directory rename, so a same-user process changing
24
+ a path between a check and its use can redirect a write or affect publication/cleanup. The
25
+ private binding is written last, which reduces but does not prevent that check/use race.
26
+
27
+ Publication is a rename followed by a final inode check, not a transaction: a failure
28
+ during or after publication can return an error after the output directory is visible. A
29
+ non-zero export exit is not proof that no files exist; inspect the destination, never
30
+ blindly delete it, and do not install or trust the output from a failed export.
31
+
12
32
  ## Codex
13
33
 
14
34
  Codex 0.163.0 loads command hooks only from its user configuration directory.
@@ -5,10 +5,32 @@
5
5
  to the person.
6
6
  - `pappra init` plans or applies workspace configuration. `--yes` derives
7
7
  selections from discovery, `--print-choices` prints that document without
8
- writing, `--reconfigure` rebuilds an existing valid `workspace.json`, and
9
- `--no-runtime` leaves the durable runtime action pending.
8
+ writing, `--config` reads a `pappra/init-choices/1` document, and
9
+ `--reconfigure` is the explicit opt-in that rewrites an existing valid
10
+ `workspace.json` from the current selections while keeping its identity,
11
+ extensions, continuity, custom validation bindings and local machine
12
+ settings. Without `--reconfigure` an existing valid configuration is reused
13
+ and only missing local state is requested. With that existing workspace,
14
+ `--yes --reconfigure` keeps the current represented choices instead of
15
+ deriving new ones and `--print-choices --reconfigure` prints them.
16
+ A plain `--apply` verifies/reuses a runtime for the workspace target or
17
+ installs the current package and binds it. `--no-runtime` suppresses runtime
18
+ verification, installation and binding: when an action is still required the
19
+ result is `status:"external-actions-pending"` with exit 0 for configuration-only work, while an
20
+ already bound matching runtime with no file changes yields apply status
21
+ `no-changes` and exit 0 with `initComplete:false`.
22
+ A TTY wizard opens only when selections are needed; `--config` without
23
+ `--apply` stays preview-only, an empty plan asks nothing, and the single
24
+ apply confirmation belongs to the interactive no-`--apply` flow that plans
25
+ configuration writes. `--apply` itself never prompts.
26
+ `knowledge.sources` are existing documents registered later by
27
+ `docs scan --apply`, while `knowledge.newDocuments` is only the destination
28
+ for future authored documents and is not created by init.
10
29
  - `pappra runtime <install|status|verify|remove>` manages the durable runtime
11
30
  copy. `install --apply` defaults to `--from self`; writes require `--apply`.
31
+ - `pappra repair` previews interrupted install journals; `--apply` explicitly recovers
32
+ proven workspace effects or a selected `--runtime-version`. Live/unknown owners and
33
+ changed files remain protected.
12
34
  - `pappra doctor` is passive: it does not install hooks, start hosts, or fix
13
35
  state. `runtime verify` is the active runtime check.
14
36
  - `pappra checkpoint` writes a task checkpoint; `pappra resume` reads a stored
@@ -23,9 +45,18 @@
23
45
  directory without registering it, and `install --mode plugin` fails closed.
24
46
  - `pappra mcp` starts the stdio MCP server; `pappra host mcp install --host <name> --apply`
25
47
  registers it. `pappra task pin <id> --auto-resume` controls hook resume injection.
26
- - `pappra collab <prepare|run|query>` runs one bounded collaboration request.
27
- `run` requires `--controller fixture|pi-rpc`; `pi-rpc` launches a real Pi RPC
28
- session.
48
+ - `pappra collab prepare --goal <file> --domain-root <dir>` and MCP
49
+ `collab_prepare` share the strict explicit goal; MCP accepts only
50
+ `{domainRoot, goal}`, not the retired flat objective fields, and synthesizes no card.
51
+ Preparation maps `pi`/`codex`/`claude` to `pi-cli`/`codex-exec`/`claude-cli`;
52
+ real controllers remain `fixture|pi-rpc` with `pi-rpc` only for Pi. `collab_start`
53
+ returns `cli_required` and never launches, even with `confirm:true`. The user must
54
+ launch through the CLI with runtime evidence. MCP `runtime_install` only copies the
55
+ running package; tarball and registry sources require the CLI.
56
+ - `pappra collab message <send|list|read|notify> --task-root <dir>` persists
57
+ protocol messages, reads them back, and sends one explicit pointer-only Herdr
58
+ notification. `send` and `notify` are plan-only without `--apply`; notification
59
+ is not consumption or acceptance. See `references/collaboration.md`.
29
60
 
30
61
  Preserve user bytes. If an operation reports a conflict or residual path,
31
62
  inspect that path and resolve ownership before retrying. Never delete an
@@ -0,0 +1,65 @@
1
+ import type { ExtensionAPI } from '@earendil-works/pi-coding-agent';
2
+ import { executeRecovery, type RecoveryController, type RecoveryExecutionMode, type RecoveryExecutionResult } from '../../app/collab-recovery-executor.js';
3
+ import { type PiRecoveryConfig } from '../../hosts/integration/recovery-config.js';
4
+ export { PI_RECOVERY_CONFIG_SCHEMA, readPiRecoveryConfig, type PiRecoveryConfig, type PiRecoveryConfigLoad, type PiRecoveryExpected, } from '../../hosts/integration/recovery-config.js';
5
+ export declare const PI_RECOVERY_STATUS_SCHEMA: 'pappra/pi-recovery-status/1';
6
+ export type RecoveryTrigger = 'session_start' | 'agent_settled' | 'manual';
7
+ /** Genuine host facts observed at a supported event/manual boundary; never fabricated. */
8
+ export interface RecoveryHostFacts {
9
+ readonly session_id: string;
10
+ readonly cwd: string | null;
11
+ }
12
+ export type ReconcileOutcome = {
13
+ readonly trigger: RecoveryTrigger;
14
+ readonly skipped: true;
15
+ readonly reason: string;
16
+ } | {
17
+ readonly trigger: RecoveryTrigger;
18
+ readonly skipped: false;
19
+ readonly result: RecoveryExecutionResult;
20
+ };
21
+ export interface PiRecoveryStatus {
22
+ readonly schema: typeof PI_RECOVERY_STATUS_SCHEMA;
23
+ readonly registered: boolean;
24
+ readonly mode: RecoveryExecutionMode | null;
25
+ readonly task_root: string | null;
26
+ readonly config_digest: string | null;
27
+ readonly reconcile_count: number;
28
+ readonly issued_causes: readonly string[];
29
+ readonly last: ReconcileOutcome | null;
30
+ readonly limitations: readonly string[];
31
+ }
32
+ export interface RecoveryReconcilerDeps {
33
+ readonly controller: RecoveryController;
34
+ readonly now?: () => number;
35
+ readonly sleep?: (ms: number) => Promise<void>;
36
+ /** Injectable executor for tests; defaults to the real durable executor. */
37
+ readonly execute?: typeof executeRecovery;
38
+ }
39
+ export interface RecoveryReconciler {
40
+ reconcile(trigger: RecoveryTrigger, hostFacts: RecoveryHostFacts | null): Promise<ReconcileOutcome>;
41
+ status(): PiRecoveryStatus;
42
+ }
43
+ /**
44
+ * Build a single-flight reconciler. Every supported trigger may run; a reconcile never overlaps another.
45
+ * The ACTUAL observed host session must match the configured expected session before any work — a config
46
+ * loaded in a foreign session is skipped. Re-issuing the same cause is prevented durably by the executor's
47
+ * canonical-cause reservation, so a later new cause can still progress while recovery's own settled event
48
+ * cannot repeatedly wake itself.
49
+ */
50
+ export declare function createRecoveryReconciler(config: PiRecoveryConfig, deps: RecoveryReconcilerDeps, configDigest?: string | null): RecoveryReconciler;
51
+ /**
52
+ * Observe genuine host facts from the supported installed Pi context
53
+ * (`ctx.sessionManager.getSessionId()` and `ctx.cwd`). Returns null when no actual session can be read, so
54
+ * a missing observation stays explicit and is never synthesized.
55
+ */
56
+ export declare function observeHostFacts(event: unknown, context: unknown): RecoveryHostFacts | null;
57
+ /**
58
+ * Opt-in extension entry. Loads the sibling `recovery.json`, builds a live-target-verifying Herdr
59
+ * controller for `apply` mode (a no-op controller for `plan` mode, which never issues an effect), and
60
+ * installs startup/settled triggers plus a manual `pappra-recovery` command. Each trigger observes the
61
+ * ACTUAL host session and reconciles through the durable, cause-deduplicated executor. A load or validation
62
+ * failure disables reconciliation and reports it through the status command; it never throws into the
63
+ * loader and never substitutes a hidden fresh Pi process for the visible workflow.
64
+ */
65
+ export default function recoveryExtension(pi: ExtensionAPI): void;