@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
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { type LocalProcessIdentity } from '../infra/process-identity.js';
2
3
  export declare const DOCUMENT_SCHEMA = "pappra/document/1";
3
4
  export declare const DOCUMENT_CATALOG_SCHEMA = "pappra/document-catalog/1";
4
5
  export declare const DOCUMENT_WRITE_PROPOSAL_SCHEMA = "pappra/document-write-proposal/1";
@@ -115,6 +116,65 @@ export declare const documentRecordSchema: z.ZodObject<{
115
116
  }>;
116
117
  }, z.core.$strict>;
117
118
  export type DocumentRecord = z.infer<typeof documentRecordSchema>;
119
+ export declare const documentRecordFileSchema: z.ZodObject<{
120
+ schema: z.ZodLiteral<"pappra/document-record-file/1">;
121
+ workspaceId: z.ZodUUID;
122
+ record: z.ZodObject<{
123
+ schema: z.ZodLiteral<"pappra/document/1">;
124
+ documentId: z.ZodUUID;
125
+ location: z.ZodDiscriminatedUnion<[z.ZodObject<{
126
+ kind: z.ZodLiteral<"workspace">;
127
+ path: z.ZodString;
128
+ }, z.core.$strict>, z.ZodObject<{
129
+ kind: z.ZodLiteral<"source">;
130
+ sourceId: z.ZodString;
131
+ path: z.ZodString;
132
+ }, z.core.$strict>], "kind">;
133
+ kind: z.ZodEnum<{
134
+ architecture: "architecture";
135
+ checkpoint: "checkpoint";
136
+ decision: "decision";
137
+ delivery: "delivery";
138
+ generated: "generated";
139
+ plan: "plan";
140
+ research: "research";
141
+ review: "review";
142
+ rule: "rule";
143
+ }>;
144
+ lifecycle: z.ZodEnum<{
145
+ active: "active";
146
+ archived: "archived";
147
+ superseded: "superseded";
148
+ }>;
149
+ maturity: z.ZodEnum<{
150
+ draft: "draft";
151
+ reviewed: "reviewed";
152
+ }>;
153
+ taskId: z.ZodNullable<z.ZodString>;
154
+ owner: z.ZodEnum<{
155
+ agent: "agent";
156
+ generator: "generator";
157
+ human: "human";
158
+ }>;
159
+ digest: z.ZodString;
160
+ sources: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
161
+ kind: z.ZodLiteral<"document">;
162
+ documentId: z.ZodUUID;
163
+ digest: z.ZodString;
164
+ }, z.core.$strict>, z.ZodObject<{
165
+ kind: z.ZodLiteral<"code">;
166
+ repositoryId: z.ZodString;
167
+ path: z.ZodString;
168
+ version: z.ZodString;
169
+ }, z.core.$strict>], "kind">>;
170
+ supersededBy: z.ZodNullable<z.ZodUUID>;
171
+ lastReviewedAt: z.ZodNullable<z.ZodISODateTime>;
172
+ visibility: z.ZodEnum<{
173
+ private: "private";
174
+ shareable: "shareable";
175
+ }>;
176
+ }, z.core.$strict>;
177
+ }, z.core.$strict>;
118
178
  export declare const documentCatalogSchema: z.ZodObject<{
119
179
  schema: z.ZodLiteral<"pappra/document-catalog/1">;
120
180
  workspaceId: z.ZodUUID;
@@ -335,6 +395,7 @@ export declare const knowledgeLockSchema: z.ZodObject<{
335
395
  "write-document": "write-document";
336
396
  }>;
337
397
  pid: z.ZodNumber;
398
+ process_identity: z.ZodOptional<z.ZodCustom<LocalProcessIdentity, LocalProcessIdentity>>;
338
399
  createdAt: z.ZodISODateTime;
339
400
  }, z.core.$strict>;
340
401
  export type KnowledgeLock = z.infer<typeof knowledgeLockSchema>;
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { isLocalProcessIdentity, } from '../infra/process-identity.js';
2
3
  import { isPortableRelativePath, normalizePortableRelativePath, } from './paths.js';
3
4
  export const DOCUMENT_SCHEMA = 'pappra/document/1';
4
5
  export const DOCUMENT_CATALOG_SCHEMA = 'pappra/document-catalog/1';
@@ -102,6 +103,11 @@ export const documentRecordSchema = documentRecordBaseSchema.superRefine((record
102
103
  });
103
104
  }
104
105
  });
106
+ export const documentRecordFileSchema = z.strictObject({
107
+ schema: z.literal('pappra/document-record-file/1'),
108
+ workspaceId: z.uuid(),
109
+ record: documentRecordSchema,
110
+ });
105
111
  export const documentCatalogSchema = z.strictObject({
106
112
  schema: z.literal(DOCUMENT_CATALOG_SCHEMA),
107
113
  workspaceId: z.uuid(),
@@ -202,6 +208,9 @@ export const knowledgeLockSchema = z.strictObject({
202
208
  token: z.uuid(),
203
209
  operation: knowledgeOperationSchema,
204
210
  pid: z.number().int().positive(),
211
+ process_identity: z
212
+ .custom(isLocalProcessIdentity)
213
+ .optional(),
205
214
  createdAt: z.iso.datetime({ offset: true }),
206
215
  });
207
216
  export const knowledgeJournalSchema = z.strictObject({
@@ -29,6 +29,7 @@ export declare const diagnosticCodes: {
29
29
  readonly initApplyFailed: 'init_apply_failed';
30
30
  readonly initApplyResidual: 'init_apply_residual';
31
31
  readonly initRuntimeSourceRequired: 'init_runtime_source_required';
32
+ readonly runtimeStateIncompatible: 'runtime_state_incompatible';
32
33
  readonly initCancelled: 'init_cancelled';
33
34
  readonly fileInvalidEncoding: 'file_invalid_encoding';
34
35
  readonly configMissing: 'config_missing';
@@ -29,6 +29,7 @@ export const diagnosticCodes = {
29
29
  initApplyFailed: 'init_apply_failed',
30
30
  initApplyResidual: 'init_apply_residual',
31
31
  initRuntimeSourceRequired: 'init_runtime_source_required',
32
+ runtimeStateIncompatible: 'runtime_state_incompatible',
32
33
  initCancelled: 'init_cancelled',
33
34
  fileInvalidEncoding: 'file_invalid_encoding',
34
35
  configMissing: 'config_missing',
@@ -434,3 +434,27 @@ export declare const hostInstallManifestSchema: z.ZodObject<{
434
434
  trustRequired: z.ZodBoolean;
435
435
  }, z.core.$strict>;
436
436
  export type HostInstallManifest = z.infer<typeof hostInstallManifestSchema>;
437
+ export declare const hostUninstallResultSchema: z.ZodObject<{
438
+ schema: z.ZodLiteral<"pappra/host-uninstall/1">;
439
+ host: z.ZodEnum<{
440
+ claude: "claude";
441
+ codex: "codex";
442
+ pi: "pi";
443
+ }>;
444
+ hostRoot: z.ZodString;
445
+ ok: z.ZodBoolean;
446
+ status: z.ZodEnum<{
447
+ conflict: "conflict";
448
+ failed: "failed";
449
+ partial: "partial";
450
+ planned: "planned";
451
+ removed: "removed";
452
+ unchanged: "unchanged";
453
+ }>;
454
+ plannedFiles: z.ZodArray<z.ZodString>;
455
+ removedFiles: z.ZodArray<z.ZodString>;
456
+ retainedPaths: z.ZodArray<z.ZodString>;
457
+ quarantinedLocks: z.ZodArray<z.ZodString>;
458
+ diagnostics: z.ZodArray<z.ZodUnknown>;
459
+ }, z.core.$strict>;
460
+ export type HostUninstallResult = z.infer<typeof hostUninstallResultSchema>;
@@ -201,3 +201,22 @@ export const hostInstallManifestSchema = z.strictObject({
201
201
  reloadRequired: z.boolean(),
202
202
  trustRequired: z.boolean(),
203
203
  });
204
+ export const hostUninstallResultSchema = z.strictObject({
205
+ schema: z.literal('pappra/host-uninstall/1'),
206
+ host: hostNameSchema,
207
+ hostRoot: absolutePathSchema,
208
+ ok: z.boolean(),
209
+ status: z.enum([
210
+ 'planned',
211
+ 'removed',
212
+ 'unchanged',
213
+ 'partial',
214
+ 'conflict',
215
+ 'failed',
216
+ ]),
217
+ plannedFiles: z.array(z.string().min(1).max(2048)).max(512),
218
+ removedFiles: z.array(z.string().min(1).max(2048)).max(512),
219
+ retainedPaths: z.array(absolutePathSchema).max(512),
220
+ quarantinedLocks: z.array(absolutePathSchema).max(32),
221
+ diagnostics: z.array(z.unknown()).max(32),
222
+ });
@@ -1,5 +1,7 @@
1
1
  import { z } from 'zod';
2
- export declare const RUNTIME_MANIFEST_SCHEMA = "pappra/runtime-manifest/1";
2
+ import { type LocalProcessIdentity } from '../infra/process-identity.js';
3
+ export declare const RUNTIME_MANIFEST_SCHEMA = "pappra/runtime-manifest/3";
4
+ export declare const RUNTIME_DIGEST_SCHEME = "sha256-utf8-byte-order-v1";
3
5
  export declare const WORKSPACE_MANIFEST_SCHEMA = "pappra/install-manifest/1";
4
6
  export declare const INSTALL_JOURNAL_SCHEMA = "pappra/install-journal/1";
5
7
  export declare const LOCK_SCHEMA = "pappra/install-lock/1";
@@ -15,11 +17,13 @@ export declare const installLockSchema: z.ZodObject<{
15
17
  "install-runtime": "install-runtime";
16
18
  "remove-runtime": "remove-runtime";
17
19
  "rollback-workspace-files": "rollback-workspace-files";
20
+ "set-auto-resume": "set-auto-resume";
18
21
  "uninstall-workspace-files": "uninstall-workspace-files";
19
22
  "update-machine-runtime": "update-machine-runtime";
20
23
  }>;
21
24
  target: z.ZodString;
22
25
  pid: z.ZodNumber;
26
+ process_identity: z.ZodOptional<z.ZodCustom<LocalProcessIdentity, LocalProcessIdentity>>;
23
27
  createdAt: z.ZodISODateTime;
24
28
  }, z.core.$strict>;
25
29
  export type InstallLock = z.infer<typeof installLockSchema>;
@@ -44,7 +48,7 @@ export declare const runtimeSourceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
44
48
  }, z.core.$strict>], "kind">;
45
49
  export type RuntimeSource = z.infer<typeof runtimeSourceSchema>;
46
50
  export declare const runtimeManifestSchema: z.ZodObject<{
47
- schema: z.ZodLiteral<"pappra/runtime-manifest/1">;
51
+ schema: z.ZodLiteral<"pappra/runtime-manifest/3">;
48
52
  installId: z.ZodUUID;
49
53
  packageName: z.ZodString;
50
54
  runtimeVersion: z.ZodString;
@@ -70,6 +74,8 @@ export declare const runtimeManifestSchema: z.ZodObject<{
70
74
  digest: z.ZodString;
71
75
  }, z.core.$strict>], "kind">;
72
76
  packageDigest: z.ZodString;
77
+ digestScheme: z.ZodLiteral<"sha256-utf8-byte-order-v1">;
78
+ sourceFingerprint: z.ZodString;
73
79
  smoke: z.ZodObject<{
74
80
  argv: z.ZodArray<z.ZodString>;
75
81
  exitCode: z.ZodNumber;
@@ -1,5 +1,7 @@
1
1
  import { z } from 'zod';
2
- export const RUNTIME_MANIFEST_SCHEMA = 'pappra/runtime-manifest/1';
2
+ import { isLocalProcessIdentity, } from '../infra/process-identity.js';
3
+ export const RUNTIME_MANIFEST_SCHEMA = 'pappra/runtime-manifest/3';
4
+ export const RUNTIME_DIGEST_SCHEME = 'sha256-utf8-byte-order-v1';
3
5
  export const WORKSPACE_MANIFEST_SCHEMA = 'pappra/install-manifest/1';
4
6
  export const INSTALL_JOURNAL_SCHEMA = 'pappra/install-journal/1';
5
7
  export const LOCK_SCHEMA = 'pappra/install-lock/1';
@@ -24,9 +26,15 @@ export const installLockSchema = z.strictObject({
24
26
  'uninstall-workspace-files',
25
27
  'remove-runtime',
26
28
  'update-machine-runtime',
29
+ // Private hook preference toggle guarded by the workspace lock; shared
30
+ // configuration is never rewritten by this operation.
31
+ 'set-auto-resume',
27
32
  ]),
28
33
  target: z.string().min(1).max(4096),
29
34
  pid: z.number().int().positive(),
35
+ process_identity: z
36
+ .custom(isLocalProcessIdentity)
37
+ .optional(),
30
38
  createdAt: z.iso.datetime({ offset: true }),
31
39
  });
32
40
  export const runtimeSourceSchema = z.discriminatedUnion('kind', [
@@ -61,6 +69,8 @@ export const runtimeManifestSchema = z.strictObject({
61
69
  executable: pathSchema,
62
70
  source: runtimeSourceSchema,
63
71
  packageDigest: digestSchema,
72
+ digestScheme: z.literal(RUNTIME_DIGEST_SCHEME),
73
+ sourceFingerprint: digestSchema,
64
74
  smoke: z.strictObject({
65
75
  argv: z.array(z.string().max(4096)).max(16),
66
76
  exitCode: z.number().int(),
@@ -0,0 +1,16 @@
1
+ /** Persisted execution pins shared by orchestration and native host adapters. */
2
+ export declare const MANAGED_PI_EXECUTION_SCOPE_SCHEMA = "pappra/managed-pi-execution-scope/1";
3
+ export interface ManagedPiExecutionScope {
4
+ readonly schema: typeof MANAGED_PI_EXECUTION_SCOPE_SCHEMA;
5
+ readonly task_id: string;
6
+ readonly task_root: string;
7
+ readonly session_id: string;
8
+ readonly cwd: string;
9
+ readonly subtask_id: string;
10
+ readonly attempt: number;
11
+ readonly owner_epoch: number;
12
+ readonly claim_epochs: readonly {
13
+ readonly claim_id: string;
14
+ readonly resource_epoch: number;
15
+ }[];
16
+ }
@@ -0,0 +1,2 @@
1
+ /** Persisted execution pins shared by orchestration and native host adapters. */
2
+ export const MANAGED_PI_EXECUTION_SCOPE_SCHEMA = 'pappra/managed-pi-execution-scope/1';
@@ -1,15 +1,19 @@
1
1
  import type { DiagnosticCode } from './errors.js';
2
2
  /** Expected rejection; unexpected exceptions are converted at application boundaries. */
3
- export type Outcome<T> = {
4
- readonly ok: true;
5
- readonly value: T;
6
- } | {
3
+ export interface ExpectedFailure {
7
4
  readonly ok: false;
8
5
  readonly code: DiagnosticCode;
9
6
  readonly message: string;
10
7
  readonly retryable: boolean;
11
8
  readonly nextAction: string | null;
12
- };
9
+ }
10
+ /** Value-bearing boundaries share one shape; protocol-specific failures retain their typed fields. */
11
+ export type Outcome<T, Rejection extends {
12
+ readonly ok: false;
13
+ } = ExpectedFailure> = {
14
+ readonly ok: true;
15
+ readonly value: T;
16
+ } | Rejection;
13
17
  export interface FailureOptions {
14
18
  readonly retryable?: boolean;
15
19
  readonly nextAction?: string | null;
@@ -1,3 +1,4 @@
1
+ import { object as isRecord } from '../infra/validation.js';
1
2
  import { join, resolve } from 'node:path';
2
3
  import { createDiagnostic, hasErrors, pointer, } from '../schemas/diagnostics.js';
3
4
  import { diagnosticCodes } from '../schemas/errors.js';
@@ -35,9 +36,6 @@ function issueDiagnostics(issues, source) {
35
36
  }
36
37
  return diagnostics;
37
38
  }
38
- function isRecord(value) {
39
- return typeof value === 'object' && value !== null && !Array.isArray(value);
40
- }
41
39
  /**
42
40
  * Reads, decodes, validates, and semantically checks one strict JSON
43
41
  * configuration file. Missing configuration is reported instead of defaulted.
@@ -250,6 +250,16 @@ export async function discoverDocuments(input) {
250
250
  if (entry.isDirectory()) {
251
251
  if (depth < depthLimit)
252
252
  await visit(child, depth + 1);
253
+ else {
254
+ truncated = true;
255
+ diagnostics.push(createDiagnostic({
256
+ code: diagnosticCodes.discoveryLimitReached,
257
+ severity: 'warning',
258
+ message: `Document directory depth limit reached: ${child}`,
259
+ source: child,
260
+ hint: 'Increase the explicit discovery depth or narrow the knowledge source.',
261
+ }));
262
+ }
253
263
  continue;
254
264
  }
255
265
  if (!entry.isFile() || !isMarkdown(child))
@@ -294,7 +304,7 @@ export async function discoverDocuments(input) {
294
304
  const docs = join(directory, 'docs');
295
305
  const docsObservation = await observePath(docs);
296
306
  if (docsObservation.kind === 'directory') {
297
- await scanDirectory(docs, 3, repository === null ? 'directory-scan' : 'repository-scan', `${declaredPrefix}:docs`, containmentRoot, null);
307
+ await scanDirectory(docs, Math.max(3, options.scanDepth), repository === null ? 'directory-scan' : 'repository-scan', `${declaredPrefix}:docs`, containmentRoot, null);
298
308
  }
299
309
  };
300
310
  if (config !== null) {
@@ -342,7 +352,7 @@ export async function discoverDocuments(input) {
342
352
  await addDocument(real, 'workspace-config', declaredBy, root);
343
353
  }
344
354
  else if (resolvedObservation.kind === 'directory') {
345
- await scanDirectory(real, 3, 'workspace-config', declaredBy, root, null);
355
+ await scanDirectory(real, Math.max(3, options.scanDepth), 'workspace-config', declaredBy, root, null);
346
356
  }
347
357
  }
348
358
  }
@@ -1,6 +1,7 @@
1
1
  import type { Diagnostic } from '../schemas/diagnostics.js';
2
2
  import { type WorkspaceConfig } from '../schemas/workspace.js';
3
3
  import type { MachineConfig } from '../schemas/machine.js';
4
+ import { type GitObservationScope } from '../infra/git.js';
4
5
  import type { DiscoveredRepository, NormalizedDiscoveryOptions, UnresolvedRepository } from './types.js';
5
6
  export interface RepositoryDiscoveryInput {
6
7
  readonly root: string;
@@ -8,6 +9,12 @@ export interface RepositoryDiscoveryInput {
8
9
  readonly machine: MachineConfig | null;
9
10
  readonly configPath: string;
10
11
  readonly options: NormalizedDiscoveryOptions;
12
+ /**
13
+ * One operation's Git probe scope. Discovery and a later identity probe of the
14
+ * same checkout must share it, otherwise identical repository probes are
15
+ * spawned twice. Callers that omit it get a scope scoped to this discovery.
16
+ */
17
+ readonly observations?: GitObservationScope;
11
18
  }
12
19
  export interface RepositoryDiscoveryOutput {
13
20
  readonly repositories: readonly DiscoveredRepository[];
@@ -4,9 +4,12 @@ import { createDiagnostic, pointer } from '../schemas/diagnostics.js';
4
4
  import { diagnosticCodes } from '../schemas/errors.js';
5
5
  import { externalRepositoryId, isExternalRepositoryPath, isPathInside, resolvePortableRelativePath, samePath, toWorkspaceRelativePath, } from '../schemas/paths.js';
6
6
  import { normalizedExcludes, } from '../schemas/workspace.js';
7
- import { inspectGitRepository, } from '../infra/git.js';
7
+ import { createGitObservationScope, } from '../infra/git.js';
8
8
  import { observePath, resolveRealpath } from '../infra/fs.js';
9
9
  import { isExcludedPath, isHiddenSegment } from './ignore.js';
10
+ function probeScope(input) {
11
+ return input.observations ?? createGitObservationScope();
12
+ }
10
13
  function failureDiagnostic(failure, source, location) {
11
14
  return createDiagnostic({
12
15
  code: failure.code,
@@ -185,7 +188,7 @@ async function resolveConfiguredRepository(input, repositoryIndex) {
185
188
  }));
186
189
  return { repository: null, unresolved: unresolved(), diagnostics };
187
190
  }
188
- const inspected = await inspectGitRepository(candidateRoot, {
191
+ const inspected = await probeScope(input).repository(candidateRoot, {
189
192
  timeoutMs: options.gitTimeoutMs,
190
193
  });
191
194
  if (!inspected.ok) {
@@ -231,6 +234,12 @@ function scanRepository(input, git) {
231
234
  */
232
235
  export async function discoverRepositories(input) {
233
236
  const { config, configPath, options, root } = input;
237
+ // One scope per discovery: explicit declarations, the root probe and any scan
238
+ // share the same immutable repository observations.
239
+ const decorated = {
240
+ ...input,
241
+ observations: input.observations ?? createGitObservationScope(),
242
+ };
234
243
  const diagnostics = [];
235
244
  const repositories = [];
236
245
  const unresolved = [];
@@ -260,7 +269,7 @@ export async function discoverRepositories(input) {
260
269
  };
261
270
  if (config !== null) {
262
271
  for (const index of config.repositories.keys()) {
263
- const resolved = await resolveConfiguredRepository(input, index);
272
+ const resolved = await resolveConfiguredRepository(decorated, index);
264
273
  diagnostics.push(...resolved.diagnostics);
265
274
  if (resolved.repository !== null)
266
275
  addRepository(resolved.repository);
@@ -271,7 +280,7 @@ export async function discoverRepositories(input) {
271
280
  const rootGitEntry = await observePath(join(root, '.git'));
272
281
  if (rootGitEntry.kind === 'directory' || rootGitEntry.kind === 'file') {
273
282
  stopsAtRepositories = true;
274
- const inspected = await inspectGitRepository(root, {
283
+ const inspected = await probeScope(decorated).repository(root, {
275
284
  timeoutMs: options.gitTimeoutMs,
276
285
  });
277
286
  if (inspected.ok) {
@@ -324,7 +333,7 @@ export async function discoverRepositories(input) {
324
333
  }
325
334
  const gitEntry = await observePath(join(directory, '.git'));
326
335
  if (gitEntry.kind === 'directory' || gitEntry.kind === 'file') {
327
- const inspected = await inspectGitRepository(directory, {
336
+ const inspected = await probeScope(decorated).repository(directory, {
328
337
  timeoutMs: options.gitTimeoutMs,
329
338
  });
330
339
  if (inspected.ok) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@phyzess/pappra",
3
- "version": "0.1.0-beta.13",
4
- "description": "Portable workspace knowledge and continuity for coding agents.",
3
+ "version": "0.1.0-beta.18",
4
+ "description": "Portable coding-agent workspaces with knowledge, continuity, code navigation and optional collaboration.",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -19,33 +19,13 @@
19
19
  "types": "./dist/index.d.ts",
20
20
  "import": "./dist/index.js"
21
21
  },
22
- "./collab": {
23
- "types": "./dist/collab/index.d.ts",
24
- "import": "./dist/collab/index.js"
25
- },
26
- "./collab/admission": {
27
- "types": "./dist/collab/admission.d.ts",
28
- "import": "./dist/collab/admission.js"
29
- },
30
- "./hosts": {
31
- "types": "./dist/hosts/index.d.ts",
32
- "import": "./dist/hosts/index.js"
33
- },
34
- "./doctor": {
35
- "types": "./dist/app/doctor.d.ts",
36
- "import": "./dist/app/doctor.js"
37
- },
38
- "./init": {
39
- "types": "./dist/app/init.d.ts",
40
- "import": "./dist/app/init.js"
41
- },
42
- "./collaboration": {
43
- "types": "./dist/app/collaboration.d.ts",
44
- "import": "./dist/app/collaboration.js"
22
+ "./workspace": {
23
+ "types": "./dist/workspace/index.d.ts",
24
+ "import": "./dist/workspace/index.js"
45
25
  },
46
- "./install": {
47
- "types": "./dist/install/index.d.ts",
48
- "import": "./dist/install/index.js"
26
+ "./knowledge": {
27
+ "types": "./dist/knowledge/index.d.ts",
28
+ "import": "./dist/knowledge/index.js"
49
29
  },
50
30
  "./continuity": {
51
31
  "types": "./dist/continuity/index.d.ts",
@@ -55,17 +35,37 @@
55
35
  "types": "./dist/code/index.d.ts",
56
36
  "import": "./dist/code/index.js"
57
37
  },
58
- "./knowledge": {
59
- "types": "./dist/knowledge/index.d.ts",
60
- "import": "./dist/knowledge/index.js"
61
- },
62
38
  "./schemas": {
63
39
  "types": "./dist/schemas/index.d.ts",
64
40
  "import": "./dist/schemas/index.js"
65
41
  },
66
- "./workspace": {
67
- "types": "./dist/workspace/index.d.ts",
68
- "import": "./dist/workspace/index.js"
42
+ "./install": {
43
+ "types": "./dist/install/index.d.ts",
44
+ "import": "./dist/install/index.js"
45
+ },
46
+ "./hosts": {
47
+ "types": "./dist/hosts/index.d.ts",
48
+ "import": "./dist/hosts/index.js"
49
+ },
50
+ "./init": {
51
+ "types": "./dist/init.d.ts",
52
+ "import": "./dist/init.js"
53
+ },
54
+ "./doctor": {
55
+ "types": "./dist/doctor.d.ts",
56
+ "import": "./dist/doctor.js"
57
+ },
58
+ "./collab": {
59
+ "types": "./dist/collab/index.d.ts",
60
+ "import": "./dist/collab/index.js"
61
+ },
62
+ "./experimental": {
63
+ "types": "./dist/experimental/index.d.ts",
64
+ "import": "./dist/experimental/index.js"
65
+ },
66
+ "./experimental/pi": {
67
+ "types": "./dist/experimental/pi.d.ts",
68
+ "import": "./dist/experimental/pi.js"
69
69
  },
70
70
  "./package.json": "./package.json"
71
71
  },
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: pappra
3
- description: Use Pappra workspace knowledge, checkpoint/resume, and selected-repository code intelligence from any supported coding agent. Use when a task needs durable handoff context, workspace documents, or bounded code navigation.
3
+ description: Use Pappra workspace knowledge, checkpoint/resume, selected-repository code intelligence, and task-scoped cross-harness collaboration from any supported coding agent. Use when a task needs durable handoff context, workspace documents, bounded code navigation, or a visible/direct multi-agent collaboration workflow.
4
4
  ---
5
5
 
6
6
  # Pappra
@@ -20,15 +20,28 @@ index, or new writer.
20
20
  the workspace selected by the current root. Never infer a workspace from an
21
21
  unrelated session. `pappra docs scan --apply` registers discovered documents;
22
22
  `pappra runtime install --apply` keeps a durable copy of this package.
23
- 5. For a new bounded collaboration request, build an explicit
24
- `pappra/collaboration-goal/1` from the user's objective and named choices,
25
- run `pappra collab prepare --goal <file> --domain-root <dir>`, admit against a fresh capability
26
- card, then use `pappra collab run` with the reviewed controller. `--controller
27
- pi-rpc` launches a real owned Pi session and is verified for Pi 1.3.0. Never
28
- turn prose into identity, approval, or capability claims.
23
+ 5. For task-scoped collaboration, read `references/environment.md` first to
24
+ choose direct versus visible Herdr operation, bootstrap or reuse the
25
+ receiving instance, and bind its routing identity. Then read
26
+ `references/collaboration.md` and build the shared strict
27
+ `pappra/collaboration-goal/1` from explicit choices. The installed CLI accepts
28
+ `pappra collab prepare --goal <file> --domain-root <dir>`; it has no preview
29
+ mode, so it mutates task state, claims resources and registers the initial
30
+ ASSIGN once authorized. MCP `collab_prepare` accepts `{ domainRoot, goal }`
31
+ and rejects the retired flat objective form. Neither prepares a capability
32
+ card; derive and preflight actual runtime evidence separately, and notify the
33
+ already-registered ASSIGN rather than sending a duplicate. Visible peers are
34
+ the default collaboration channel; the owned Pi `pi-rpc` run remains a
35
+ separate explicit option, and fixtures are explicit only. Never turn prose
36
+ into identity, approval, or capability claims.
29
37
 
30
38
  ## One-request collaboration
31
39
 
40
+ Visible collaboration uses `references/environment.md` plus the persisted
41
+ message/notify loop in `references/collaboration.md`. The owned `collab run`
42
+ flow described here is the separate Pi RPC option, not a substitute for a
43
+ visible participant.
44
+
32
45
  `pappra collab prepare --goal <file> --domain-root <dir>` requires an explicit
33
46
  shared domain. It validates the canonical domain/tasks/task/private namespace
34
47
  before writing any task metadata and again around each write, so a task-root or
@@ -61,6 +74,14 @@ No approval is auto-answered, no cancel is inferred from an acknowledgement, and
61
74
  arbitrary PID is adopted. Do not launch a model or real user session without
62
75
  the task's explicit authorization.
63
76
 
77
+ ## Recovery and parallel work
78
+
79
+ Use `pappra collab work-run --request <abs-request.json>` for a read-only plan and add `--apply` only when the existing assignments, current capability cards, coordinator authority, resource claims and visible participant binding are ready. Work-run notifies only registered participants; it does not create sessions, merge, accept reports, or replay ambiguous delivery.
80
+
81
+ Use `pappra collab recovery-run --request <abs-request.json>` to inspect one guarded recovery action; add `--apply` only with exact current session/cwd/harness/pane and a digest-pinned task-local binding. Recovery is a bounded single wake, not generic outage recovery: there is no reconnect trigger, hidden worker, approval automation, or replay after an unknown effect.
82
+
83
+ For an explicitly selected Pi package, `pappra host bundle --host pi --out <new-private-dir> --recovery-config <abs-private-config.json>` exports the recovery extension and its private sibling config. Add `--transition-extension` to export the separate `/collab-transition` command extension. Exports do not install, trust, enable, load, launch, or transfer anything; review and install packages explicitly. Native quiescence and interactive Pi session takeover remain unsupported, and task retirement is not native session archive.
84
+
64
85
  ## Boundaries
65
86
 
66
87
  - Hooks are local and bounded. They do not read transcripts, run commands,