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

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.
@@ -26,11 +26,8 @@ export declare function readClaudeSessionId(file: string): string | null;
26
26
  export declare function readPiSessionId(file: string): string | null;
27
27
  export declare function runNativePilot({ harness, profile, cwd, promptFile, evidenceDir, sessionId, resume, timeoutMs, maxBudgetUsd, outputName, phase, trustProject, extraDirs, clock, assignmentFile, capabilitiesFile, taskRoot, maxAgeMinutes, launchKind, discovery, }: PilotOptions): Promise<{
28
28
  reservation?: never;
29
- settlement?: never;
30
- reservation_id?: never;
31
29
  refused: boolean;
32
30
  admission: {
33
- detail?: never;
34
31
  state?: never;
35
32
  state_revision?: never;
36
33
  ok: false;
@@ -52,8 +49,8 @@ export declare function runNativePilot({ harness, profile, cwd, promptFile, evid
52
49
  assignment_digest?: never;
53
50
  input_revision?: never;
54
51
  owner_epoch?: never;
55
- } | {
56
52
  detail?: never;
53
+ } | {
57
54
  expected?: never;
58
55
  state?: never;
59
56
  state_revision?: never;
@@ -75,6 +72,7 @@ export declare function runNativePilot({ harness, profile, cwd, promptFile, evid
75
72
  assignment_digest?: never;
76
73
  input_revision?: never;
77
74
  owner_epoch?: never;
75
+ detail?: never;
78
76
  } | {
79
77
  expected?: never;
80
78
  actual?: never;
@@ -99,7 +97,6 @@ export declare function runNativePilot({ harness, profile, cwd, promptFile, evid
99
97
  input_revision?: never;
100
98
  owner_epoch?: never;
101
99
  } | {
102
- detail?: never;
103
100
  expected?: never;
104
101
  actual?: never;
105
102
  state?: never;
@@ -121,8 +118,8 @@ export declare function runNativePilot({ harness, profile, cwd, promptFile, evid
121
118
  assignment_digest?: never;
122
119
  input_revision?: never;
123
120
  owner_epoch?: never;
124
- } | {
125
121
  detail?: never;
122
+ } | {
126
123
  state?: never;
127
124
  state_revision?: never;
128
125
  ok: false;
@@ -144,8 +141,8 @@ export declare function runNativePilot({ harness, profile, cwd, promptFile, evid
144
141
  assignment_digest?: never;
145
142
  input_revision?: never;
146
143
  owner_epoch?: never;
147
- } | {
148
144
  detail?: never;
145
+ } | {
149
146
  state?: never;
150
147
  state_revision?: never;
151
148
  ok: false;
@@ -172,6 +169,7 @@ export declare function runNativePilot({ harness, profile, cwd, promptFile, evid
172
169
  assignment_digest?: never;
173
170
  input_revision?: never;
174
171
  owner_epoch?: never;
172
+ detail?: never;
175
173
  } | {
176
174
  state?: never;
177
175
  state_revision?: never;
@@ -196,7 +194,6 @@ export declare function runNativePilot({ harness, profile, cwd, promptFile, evid
196
194
  input_revision?: never;
197
195
  owner_epoch?: never;
198
196
  } | {
199
- detail?: never;
200
197
  expected?: never;
201
198
  actual?: never;
202
199
  state?: never;
@@ -218,8 +215,8 @@ export declare function runNativePilot({ harness, profile, cwd, promptFile, evid
218
215
  assignment_digest?: never;
219
216
  input_revision?: never;
220
217
  owner_epoch?: never;
221
- } | {
222
218
  detail?: never;
219
+ } | {
223
220
  expected?: never;
224
221
  actual?: never;
225
222
  state?: never;
@@ -261,8 +258,8 @@ export declare function runNativePilot({ harness, profile, cwd, promptFile, evid
261
258
  assignment_digest?: never;
262
259
  input_revision?: never;
263
260
  owner_epoch?: never;
264
- } | {
265
261
  detail?: never;
262
+ } | {
266
263
  expected?: never;
267
264
  actual?: never;
268
265
  state_revision?: never;
@@ -284,8 +281,8 @@ export declare function runNativePilot({ harness, profile, cwd, promptFile, evid
284
281
  assignment_digest?: never;
285
282
  input_revision?: never;
286
283
  owner_epoch?: never;
287
- } | {
288
284
  detail?: never;
285
+ } | {
289
286
  state?: never;
290
287
  state_revision?: never;
291
288
  required_skills?: never;
@@ -307,6 +304,7 @@ export declare function runNativePilot({ harness, profile, cwd, promptFile, evid
307
304
  assignment_digest?: never;
308
305
  input_revision?: never;
309
306
  owner_epoch?: never;
307
+ detail?: never;
310
308
  } | {
311
309
  expected?: never;
312
310
  actual?: never;
@@ -331,7 +329,6 @@ export declare function runNativePilot({ harness, profile, cwd, promptFile, evid
331
329
  input_revision?: never;
332
330
  owner_epoch?: never;
333
331
  } | {
334
- detail?: never;
335
332
  state?: never;
336
333
  state_revision?: never;
337
334
  required_skills?: never;
@@ -353,8 +350,8 @@ export declare function runNativePilot({ harness, profile, cwd, promptFile, evid
353
350
  assignment_digest?: never;
354
351
  input_revision?: never;
355
352
  owner_epoch?: never;
356
- } | {
357
353
  detail?: never;
354
+ } | {
358
355
  expected?: never;
359
356
  actual?: never;
360
357
  state?: never;
@@ -376,6 +373,7 @@ export declare function runNativePilot({ harness, profile, cwd, promptFile, evid
376
373
  assignment_digest?: never;
377
374
  input_revision?: never;
378
375
  owner_epoch?: never;
376
+ detail?: never;
379
377
  };
380
378
  reason: string;
381
379
  process?: never;
@@ -386,12 +384,11 @@ export declare function runNativePilot({ harness, profile, cwd, promptFile, evid
386
384
  stdoutFile?: never;
387
385
  stderrFile?: never;
388
386
  nativeEvidence?: never;
389
- } | {
390
- settlement?: never;
391
387
  reservation_id?: never;
388
+ settlement?: never;
389
+ } | {
392
390
  refused: boolean;
393
391
  admission: {
394
- detail?: never;
395
392
  expected?: never;
396
393
  actual?: never;
397
394
  state?: never;
@@ -413,6 +410,7 @@ export declare function runNativePilot({ harness, profile, cwd, promptFile, evid
413
410
  capability_evidence: string;
414
411
  assignment_digest: string;
415
412
  input_revision: string | null;
413
+ detail?: never;
416
414
  };
417
415
  reason: string;
418
416
  reservation: {
@@ -428,12 +426,13 @@ export declare function runNativePilot({ harness, profile, cwd, promptFile, evid
428
426
  stdoutFile?: never;
429
427
  stderrFile?: never;
430
428
  nativeEvidence?: never;
429
+ reservation_id?: never;
430
+ settlement?: never;
431
431
  } | {
432
432
  reason?: never;
433
433
  reservation?: never;
434
- admission?: never;
435
434
  refused?: never;
436
- reservation_id?: never;
435
+ admission?: never;
437
436
  execution: null;
438
437
  evidenceError: string;
439
438
  settlement: {
@@ -459,12 +458,12 @@ export declare function runNativePilot({ harness, profile, cwd, promptFile, evid
459
458
  stdoutFile?: never;
460
459
  stderrFile?: never;
461
460
  nativeEvidence?: never;
461
+ reservation_id?: never;
462
462
  } | {
463
463
  reason?: never;
464
464
  reservation?: never;
465
- admission?: never;
466
465
  refused?: never;
467
- reservation_id?: never;
466
+ admission?: never;
468
467
  process?: never;
469
468
  execution: Record<string, unknown> | null;
470
469
  evidenceError: string;
@@ -482,11 +481,12 @@ export declare function runNativePilot({ harness, profile, cwd, promptFile, evid
482
481
  stdoutFile?: never;
483
482
  stderrFile?: never;
484
483
  nativeEvidence?: never;
484
+ reservation_id?: never;
485
485
  } | {
486
486
  reason?: never;
487
487
  reservation?: never;
488
- admission?: never;
489
488
  refused?: never;
489
+ admission?: never;
490
490
  process?: never;
491
491
  evidenceError?: never;
492
492
  execution: Record<string, unknown>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phyzess/pappra",
3
- "version": "0.1.0-beta.18",
3
+ "version": "0.1.0-beta.19",
4
4
  "description": "Portable coding-agent workspaces with knowledge, continuity, code navigation and optional collaboration.",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -79,6 +79,8 @@
79
79
  "scripts": {
80
80
  "build:scripts": "tsc -p tsconfig.scripts.json",
81
81
  "build": "tsc -p tsconfig.scripts.json && node .build/scripts/scripts/clean-build.js && tsc -p tsconfig.build.json && node .build/scripts/scripts/build-assets.js",
82
+ "dev:check": "node scripts/self-host.ts --check",
83
+ "dev:setup": "node scripts/self-host.ts --apply",
82
84
  "typecheck": "tsc -p tsconfig.build.json --noEmit && tsc -p tsconfig.test.json --noEmit && tsc -p tsconfig.scripts.json --noEmit",
83
85
  "pretest": "pnpm build && tsc -p tsconfig.test.json",
84
86
  "test": "node .build/test/scripts/run-tests.js",
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: pappra
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.
3
+ description: Use Pappra workspace knowledge, checkpoint/resume, selected-repository code intelligence, and task-scoped cross-harness collaboration from any supported coding agent. Use before nontrivial repository work to reach the project's own skill and CodeGraph entry, when a task needs durable handoff context, workspace documents, or bounded code navigation, and when independent parallel implementation or independent review would reduce risk even if the user never names collaboration.
4
4
  ---
5
5
 
6
6
  # Pappra
@@ -74,6 +74,34 @@ No approval is auto-answered, no cancel is inferred from an acknowledgement, and
74
74
  arbitrary PID is adopted. Do not launch a model or real user session without
75
75
  the task's explicit authorization.
76
76
 
77
+ ## Role plans and host-agent role selection
78
+
79
+ Choosing whether work needs independent implementation or an independent reviewer
80
+ is the host agent's judgment from the user's objective and the actual change
81
+ surface: complexity, dependency blast radius, disjoint write scopes, and risk.
82
+ There is no backend role inferencer, no fixed participant count, and no repeated
83
+ permission prompt once the user authorized the work.
84
+
85
+ Use the installed commands in this order; roles never grant authority:
86
+
87
+ - `pappra collab role-plan expand --request <abs role-plan.json> --json` expands
88
+ explicit participants, assignments and disjoint writer scopes into the existing
89
+ work-plan format. Save the returned `plan`.
90
+ - `pappra collab plan --task-root <abs> --config <abs expanded-plan.json>` and
91
+ `pappra collab work-run --request <abs work-execution.json> [--apply]` keep
92
+ their existing admission, capability and dispatch requirements.
93
+ - `pappra collab role-run --request <abs role-orchestration.json> [--apply]`
94
+ reads authoritative role/dependency state; `--apply` handles one bounded event
95
+ tick and reserves before dispatch. Neither infers acceptance.
96
+ - `pappra collab role-plan aggregate --request <abs role-plan.json>` with
97
+ `--task-root <abs> --config <abs expanded-plan.json>` aggregates authoritative
98
+ results.
99
+
100
+ Roles describe responsibility and scope only: they approve nothing and never
101
+ synthesize a participant identity or capability card. Hooks record lifecycle
102
+ observations only and never select roles or launch a model. Keep the manual path:
103
+ a simple, reversible, local change needs no role plan.
104
+
77
105
  ## Recovery and parallel work
78
106
 
79
107
  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.
@@ -200,6 +200,19 @@ evidence through the work-plan inspector. Rejected, unknown, missing and pending
200
200
  outcomes remain visible. A delivery acknowledgement never becomes acceptance.
201
201
  Neither command launches a model, claims resources or creates an assignment.
202
202
 
203
+ `pappra collab role-run --request <abs role-orchestration.json> [--apply]
204
+ [--watch] --json` advances the plan's recorded role/dependency events. Plan mode
205
+ reads authoritative state with no effects; `--apply` handles one bounded event
206
+ tick, reserves before dispatch and never infers acceptance; `--watch` requires
207
+ `--apply`. Repeated or ambiguous effects are reconciled, and rejected work needs an
208
+ authorized repair attempt. It notifies registered participants only and creates no
209
+ session, assignment or claim of its own.
210
+
211
+ Which roles exist, and how many writers or reviewers run, is the host agent's
212
+ judgment of the actual objective and change surface, not a product default.
213
+ Nothing here infers semantic roles: hooks record bounded lifecycle observations,
214
+ the backend resolves protocol state, and no command launches a model from prose.
215
+
203
216
  ## Native capability evidence
204
217
 
205
218
  `pappra collab capabilities derive --harness <pi|codex|claude> --assignment <abs assignment.json> --template <abs card.declared.json> --execution <abs execution.json> [--session <abs pi-session.jsonl> | --events <abs events.jsonl>] [--json]`
@@ -51,6 +51,13 @@ stays `process_affiliation: "not-established"`.
51
51
  Pick participants, roles, harness, and configuration from the task rather than a
52
52
  fixed agent count. Everyone can implement, review, or verify; assign by need.
53
53
 
54
+ Which roles and how many participants are needed follows the real work split, and
55
+ that choice belongs to the host agent reading the objective and change surface;
56
+ neither the backend nor the hooks infer responsibilities or launch anyone.
57
+ Authorization the user already gave for the task persists, so do not re-request the
58
+ same delegation at every step, and never fabricate a participant identity,
59
+ capability or claim to fill a role.
60
+
54
61
  Reuse an existing peer only when all of the following match what the task will
55
62
  bind: current agent name, pane, harness, cwd, native session (where the host
56
63
  reports one), and the capabilities the assignment will require. Otherwise, when