@piagent/platform 1.6.0 → 1.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (213) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/README.md +17 -14
  3. package/README.vi.md +26 -1
  4. package/benchmarks/production-v1/spend-control.v1.json +27 -3
  5. package/benchmarks/production-v1/suite.json +5 -1
  6. package/catalog/capabilities.json +16 -16
  7. package/docs/authority-manifest.md +1 -1
  8. package/docs/auto-delegation-policy.md +38 -73
  9. package/docs/command-reference-vietnamese.md +23 -31
  10. package/docs/context-engine.md +5 -3
  11. package/docs/context-window-policy.md +37 -1
  12. package/docs/distribution-standard.md +7 -7
  13. package/docs/en/architecture.md +26 -13
  14. package/docs/languages.json +4 -4
  15. package/docs/operator-manual-vietnamese.md +21 -41
  16. package/docs/publishing-for-teams.md +5 -0
  17. package/docs/quality-benchmark.md +179 -23
  18. package/docs/release-install-policy.md +6 -6
  19. package/docs/runtime-harness-standard.md +3 -3
  20. package/docs/security-threat-model.md +1 -1
  21. package/docs/subagent-orchestration-capabilities.md +19 -51
  22. package/docs/subagents-and-multiagent.md +21 -47
  23. package/docs/task-implementation-contract.md +3 -3
  24. package/docs/task-lifecycle-vietnamese.md +1 -1
  25. package/docs/team-onboarding.md +2 -2
  26. package/docs/vi/architecture.md +26 -13
  27. package/docs-site/architecture.html +1 -1
  28. package/docs-site/benchmark.html +89 -95
  29. package/docs-site/commands.html +1 -1
  30. package/docs-site/content/benchmark.html +88 -94
  31. package/docs-site/content/en/benchmark.html +134 -90
  32. package/docs-site/content/en/index.html +19 -19
  33. package/docs-site/content/en/runtime.html +4 -4
  34. package/docs-site/content/en/whats-new.html +12 -1
  35. package/docs-site/content/en/workflows.html +2 -2
  36. package/docs-site/content/index.html +19 -19
  37. package/docs-site/content/runtime.html +4 -4
  38. package/docs-site/content/whats-new.html +12 -1
  39. package/docs-site/content/workflows.html +2 -2
  40. package/docs-site/context-engine.html +1 -1
  41. package/docs-site/en/architecture.html +1 -1
  42. package/docs-site/en/benchmark.html +135 -91
  43. package/docs-site/en/commands.html +1 -1
  44. package/docs-site/en/context-engine.html +1 -1
  45. package/docs-site/en/index.html +20 -20
  46. package/docs-site/en/mcp-approval.html +1 -1
  47. package/docs-site/en/mcp-auth.html +1 -1
  48. package/docs-site/en/mcp-servers.html +1 -1
  49. package/docs-site/en/mcp.html +1 -1
  50. package/docs-site/en/permissions.html +1 -1
  51. package/docs-site/en/profiles.html +1 -1
  52. package/docs-site/en/quickstart.html +1 -1
  53. package/docs-site/en/runtime.html +5 -5
  54. package/docs-site/en/scope.html +1 -1
  55. package/docs-site/en/security.html +1 -1
  56. package/docs-site/en/team.html +1 -1
  57. package/docs-site/en/whats-new.html +13 -2
  58. package/docs-site/en/workflows.html +3 -3
  59. package/docs-site/index.html +20 -20
  60. package/docs-site/mcp-approval.html +1 -1
  61. package/docs-site/mcp-auth.html +1 -1
  62. package/docs-site/mcp-servers.html +1 -1
  63. package/docs-site/mcp.html +1 -1
  64. package/docs-site/permissions.html +1 -1
  65. package/docs-site/profiles.html +1 -1
  66. package/docs-site/quickstart.html +1 -1
  67. package/docs-site/runtime.html +5 -5
  68. package/docs-site/scope.html +1 -1
  69. package/docs-site/security.html +1 -1
  70. package/docs-site/team.html +1 -1
  71. package/docs-site/whats-new.html +13 -2
  72. package/docs-site/workflows.html +3 -3
  73. package/evals/fixtures/benchmark-assurance-evidence.invalid.json +1 -1
  74. package/evals/fixtures/benchmark-assurance-evidence.valid.json +1 -1
  75. package/evals/fixtures/codex-relative-efficiency-v1.invalid.json +4 -0
  76. package/evals/fixtures/codex-relative-efficiency-v1.valid.json +94 -0
  77. package/evals/fixtures/helper-request.invalid.json +1 -1
  78. package/evals/fixtures/helper-request.valid.json +1 -1
  79. package/evals/fixtures/piagent-webui/subagent-tree-v1.valid.json +7 -0
  80. package/evals/fixtures/task-authority-snapshot.valid.json +4 -4
  81. package/evals/fs4-readiness-matrix.v1.json +2 -2
  82. package/evals/fs5-causal-arm.v1.json +2 -2
  83. package/evals/fs5-pilot-protocol.v1.json +3 -3
  84. package/evals/fs5-pilot-protocol.v2.json +8 -8
  85. package/evals/fs5-pilot-protocol.v3.json +8 -8
  86. package/evals/fs5-pilot-protocol.v4.json +6 -6
  87. package/evals/fs5-pilot-protocol.v5.json +7 -6
  88. package/evals/private-holdout-v1/public-exposure.v1.json +1 -1
  89. package/evals/runtime-conformance-v1/README.md +43 -0
  90. package/evals/runtime-conformance-v1/evaluate-paid-canary.mjs +198 -0
  91. package/evals/runtime-conformance-v1/lane.json +57 -0
  92. package/evals/runtime-conformance-v1/paid-canary.json +31 -0
  93. package/evals/runtime-conformance-v1/runner.mjs +456 -0
  94. package/package.json +1 -1
  95. package/packages/piagent-core/README.md +13 -4
  96. package/packages/piagent-core/benchmark/benchmark-codex-relative-efficiency.js +698 -0
  97. package/packages/piagent-core/benchmark/benchmark-core.js +4 -3
  98. package/packages/piagent-core/benchmark/benchmark-forensics.js +4 -2
  99. package/packages/piagent-core/benchmark/benchmark-preflight.js +3 -1
  100. package/packages/piagent-core/benchmark/benchmark-provider-free-evidence.js +345 -0
  101. package/packages/piagent-core/benchmark/benchmark-record-validation.js +74 -5
  102. package/packages/piagent-core/benchmark/benchmark-report.js +15 -1
  103. package/packages/piagent-core/benchmark/benchmark-runtime-causal.js +244 -0
  104. package/packages/piagent-core/benchmark/benchmark-stage-diagnostic.js +201 -4
  105. package/packages/piagent-core/benchmark/benchmark-suite.js +22 -1
  106. package/packages/piagent-core/benchmark/benchmark-summary-support.js +4 -0
  107. package/packages/piagent-core/benchmark/benchmark-usage.js +15 -4
  108. package/packages/piagent-core/capabilities/runtime-integrity.js +3 -0
  109. package/packages/piagent-core/extensions/acceptance-behavior-proof.js +806 -0
  110. package/packages/piagent-core/extensions/acceptance-receipt.js +89 -48
  111. package/packages/piagent-core/extensions/context-engine.js +1 -11
  112. package/packages/piagent-core/extensions/context-index-policy.js +4 -0
  113. package/packages/piagent-core/extensions/context-query-paths.js +57 -0
  114. package/packages/piagent-core/extensions/criterion-context-pack.js +16 -3
  115. package/packages/piagent-core/extensions/criterion-graph.js +4 -1
  116. package/packages/piagent-core/extensions/fallback-base-policy.ts +101 -0
  117. package/packages/piagent-core/extensions/guard-types.ts +4 -0
  118. package/packages/piagent-core/extensions/piagent-guard.ts +194 -226
  119. package/packages/piagent-core/extensions/task-lifecycle.js +32 -0
  120. package/packages/piagent-core/extensions/task-state.js +69 -8
  121. package/packages/piagent-core/extensions/verification-intelligence.js +49 -12
  122. package/packages/piagent-core/extensions/workspace-evidence-roots.js +52 -16
  123. package/packages/piagent-core/package.json +1 -1
  124. package/packages/piagent-core/policies/base-policy.json +42 -2
  125. package/packages/piagent-core/policy/authority-manifest.v1.json +3 -3
  126. package/packages/piagent-core/prompts/be-to-fe.md +2 -8
  127. package/packages/piagent-core/prompts/plan.md +1 -1
  128. package/packages/piagent-core/prompts/platform-improve.md +2 -6
  129. package/packages/piagent-core/prompts/review.md +2 -7
  130. package/packages/piagent-core/prompts/scout.md +1 -1
  131. package/packages/piagent-core/prompts/task.md +4 -3
  132. package/packages/piagent-core/runtime/hooks/completion-hook.ts +7 -6
  133. package/packages/piagent-core/runtime/hooks/input-hook.ts +6 -0
  134. package/packages/piagent-core/runtime/hooks/session-start-hook.ts +100 -1
  135. package/packages/piagent-core/runtime/hooks/tool-result-hook.ts +58 -72
  136. package/packages/piagent-core/runtime/hooks/tool-result-value-helpers.ts +66 -0
  137. package/packages/piagent-core/runtime/inspection/bounded-emission-guard.ts +286 -0
  138. package/packages/piagent-core/runtime/inspection/runtime-event-store.ts +37 -7
  139. package/packages/piagent-core/runtime/inspection/task-subagent-tree.ts +27 -4
  140. package/packages/piagent-core/runtime/inspection/tool-failure-classification.ts +20 -3
  141. package/packages/piagent-core/runtime/inspection/webui-snapshot.ts +47 -11
  142. package/packages/piagent-core/runtime/orchestration/helper-lifecycle.ts +16 -12
  143. package/packages/piagent-core/runtime/orchestration/minimal-delegation-policy.ts +71 -0
  144. package/packages/piagent-core/runtime/orchestration/owned-work-budget.ts +28 -20
  145. package/packages/piagent-core/runtime/orchestration/role-policy.ts +27 -9
  146. package/packages/piagent-core/runtime/orchestration/subagent-tool-policy.ts +329 -0
  147. package/packages/piagent-core/runtime/policy/block-remedy.ts +0 -4
  148. package/packages/piagent-core/runtime/product/efficiency-metrics.ts +3 -0
  149. package/packages/piagent-core/runtime/quality/edit-freshness-guard.ts +102 -0
  150. package/packages/piagent-core/runtime/quality/exact-output-contract.ts +20 -10
  151. package/packages/piagent-core/runtime/quality/performance-assurance.ts +3 -3
  152. package/packages/piagent-core/runtime/recovery/continuation-budget.ts +1 -1
  153. package/packages/piagent-core/runtime/recovery/handoff-projection.ts +4 -1
  154. package/packages/piagent-core/runtime/recovery/pristine-task-policy-refresh.ts +91 -0
  155. package/packages/piagent-core/runtime/recovery/recovery-policy.ts +7 -4
  156. package/packages/piagent-core/runtime/recovery/resume-state.ts +112 -14
  157. package/packages/piagent-core/runtime/recovery/semantic-repair-handshake.ts +7 -13
  158. package/packages/piagent-core/runtime/recovery/task-evidence-coverage-refresh.ts +217 -0
  159. package/packages/piagent-core/runtime/registration/context-commands.ts +16 -2
  160. package/packages/piagent-core/runtime/registration/knowledge-tools.ts +9 -5
  161. package/packages/piagent-core/runtime/registration/operator-request-intake.ts +49 -0
  162. package/packages/piagent-core/runtime/registration/policy-tools.ts +4 -4
  163. package/packages/piagent-core/runtime/registration/session-commands.ts +1 -1
  164. package/packages/piagent-core/runtime/registration/task-completion-tools.ts +12 -9
  165. package/packages/piagent-core/runtime/registration/task-evidence-tools.ts +21 -12
  166. package/packages/piagent-core/runtime/registration/task-start-guidance.ts +19 -13
  167. package/packages/piagent-core/runtime/registration/task-start-manifest.ts +54 -0
  168. package/packages/piagent-core/runtime/registration/task-start-tool.ts +57 -57
  169. package/packages/piagent-core/runtime/runtime-limits.ts +16 -2
  170. package/packages/piagent-core/runtime/session/adaptive-context-analysis.ts +461 -0
  171. package/packages/piagent-core/runtime/session/adaptive-context-governor.ts +464 -0
  172. package/packages/piagent-core/runtime/session/adaptive-context-ledger.ts +265 -0
  173. package/packages/piagent-core/runtime/session/message-signals.ts +7 -3
  174. package/packages/piagent-core/runtime/session/operator-request-carry.ts +44 -0
  175. package/packages/piagent-core/runtime/session/runtime-state.ts +11 -7
  176. package/packages/piagent-core/runtime/session/source-checkout-read-grants.ts +35 -0
  177. package/packages/piagent-core/runtime/session/system-prompt.ts +76 -14
  178. package/packages/piagent-core/runtime/session/task-contract-presentation.ts +39 -0
  179. package/packages/piagent-core/runtime/tools/phase-tools.ts +8 -8
  180. package/packages/piagent-core/runtime/tools/tool-groups.ts +12 -2
  181. package/packages/piagent-core/runtime/verification/exact-verifier-reuse.ts +101 -0
  182. package/packages/piagent-core/runtime/workflows/runtime-intake-compaction.ts +164 -0
  183. package/packages/piagent-core/runtime/workflows/task-intake.ts +167 -39
  184. package/packages/piagent-core/subagents/piagent-oracle.md +5 -3
  185. package/packages/piagent-core/subagents/piagent-planner.md +6 -4
  186. package/packages/piagent-core/subagents/piagent-reviewer.md +5 -3
  187. package/packages/piagent-core/subagents/piagent-scout.md +4 -2
  188. package/packages/piagent-core/subagents/piagent-worker.md +6 -4
  189. package/packages/piagent-webui/dist/client/assets/{MarkdownMessage-CxeZqTte.js → MarkdownMessage-B4XehTCU.js} +1 -1
  190. package/packages/piagent-webui/dist/client/assets/{index-DynIMe8I.js → index-CgOEyRPG.js} +4 -4
  191. package/packages/piagent-webui/dist/client/index.html +1 -1
  192. package/packages/piagent-webui/extension/piagent-webui.ts +3 -1
  193. package/packages/piagent-webui/extension/same-session-bridge.ts +1 -1
  194. package/packages/piagent-webui/extension/session-stream-adapter.ts +33 -10
  195. package/packages/piagent-webui/gateway/gateway-session-stream.ts +37 -21
  196. package/packages/piagent-webui/gateway/session-operation-lifecycle.ts +237 -0
  197. package/packages/piagent-webui/gateway/session-operation-retry-control.ts +38 -0
  198. package/packages/piagent-webui/gateway/session-operation-watchdog.ts +9 -2
  199. package/packages/piagent-webui/gateway/session-runtime-supervisor.ts +8 -7
  200. package/packages/piagent-webui/ownership/session-lease-store.ts +5 -2
  201. package/packages/piagent-webui/server/core-inspection-provider.ts +2 -1
  202. package/packages/piagent-webui/server/transcript-projection.ts +91 -5
  203. package/schemas/codex-relative-efficiency-v1.schema.json +155 -0
  204. package/schemas/piagent-webui/runtime-event-v2.schema.json +15 -5
  205. package/schemas/piagent-webui/subagent-tree-v1.schema.json +11 -1
  206. package/schemas/project-profile.schema.json +1 -1
  207. package/schemas/task-contract.schema.json +15 -0
  208. package/scripts/benchmark-runner-core.mjs +14 -6
  209. package/scripts/benchmark-runner-finalization.mjs +4 -0
  210. package/scripts/configure-subagents.sh +42 -34
  211. package/scripts/helper-evaluation.mjs +1 -1
  212. package/scripts/team-doctor.sh +1 -1
  213. package/scripts/verify-local.sh +5 -0
@@ -7,7 +7,7 @@ Usage:
7
7
  scripts/configure-subagents.sh [options]
8
8
 
9
9
  Purpose:
10
- Configure pi-subagents with a safe, token-conscious baseline.
10
+ Configure pi-subagents with Piagent's parent-direct, one-read-only-helper ceiling.
11
11
 
12
12
  Options:
13
13
  --preset <minimal|safe|async|parallel>
@@ -27,7 +27,7 @@ After installing/configuring:
27
27
  pi
28
28
  /subagents-doctor
29
29
  /subagents-models
30
- /run scout "Map the auth flow"
30
+ # Piagent stays parent-direct unless runtime evidence proves >=30% net token saving.
31
31
  USAGE
32
32
  }
33
33
 
@@ -103,16 +103,16 @@ const presets = {
103
103
  asyncByDefault: false,
104
104
  asyncWidget: true,
105
105
  forceTopLevelAsync: false,
106
- waitTool: { enabled: true },
107
- intercomBridge: { mode: "always" },
108
- globalConcurrencyLimit: 4,
109
- maxSubagentSpawnsPerSession: 16,
106
+ waitTool: { enabled: false },
107
+ intercomBridge: { mode: "off", resultDelivery: false },
108
+ globalConcurrencyLimit: 1,
109
+ maxSubagentSpawnsPerSession: 1,
110
110
  maxSubagentDepth: 1,
111
111
  defaultSessionDir: "~/.pi/agent/sessions/subagent",
112
112
  singleRunOutputBaseDir: "~/.pi/agent/subagent-outputs",
113
113
  worktreeBaseDir: "~/.pi/agent/worktrees/pi-subagents",
114
- scheduledRuns: { enabled: false, maxPending: 20, maxLatenessMs: 300000 },
115
- parallel: { maxTasks: 4, concurrency: 2 },
114
+ scheduledRuns: { enabled: false, maxPending: 1, maxLatenessMs: 300000 },
115
+ parallel: { maxTasks: 1, concurrency: 1 },
116
116
  completionBatch: { enabled: true, debounceMs: 150, maxWaitMs: 1000 }
117
117
  },
118
118
  safe: {
@@ -120,33 +120,33 @@ const presets = {
120
120
  asyncByDefault: false,
121
121
  asyncWidget: true,
122
122
  forceTopLevelAsync: false,
123
- waitTool: { enabled: true },
124
- intercomBridge: { mode: "always" },
125
- globalConcurrencyLimit: 8,
126
- maxSubagentSpawnsPerSession: 32,
123
+ waitTool: { enabled: false },
124
+ intercomBridge: { mode: "off", resultDelivery: false },
125
+ globalConcurrencyLimit: 1,
126
+ maxSubagentSpawnsPerSession: 1,
127
127
  maxSubagentDepth: 1,
128
128
  defaultSessionDir: "~/.pi/agent/sessions/subagent",
129
129
  singleRunOutputBaseDir: "~/.pi/agent/subagent-outputs",
130
130
  worktreeBaseDir: "~/.pi/agent/worktrees/pi-subagents",
131
- scheduledRuns: { enabled: false, maxPending: 20, maxLatenessMs: 300000 },
132
- parallel: { maxTasks: 6, concurrency: 3 },
131
+ scheduledRuns: { enabled: false, maxPending: 1, maxLatenessMs: 300000 },
132
+ parallel: { maxTasks: 1, concurrency: 1 },
133
133
  completionBatch: { enabled: true, debounceMs: 150, maxWaitMs: 1000, stragglerDebounceMs: 75, stragglerMaxWaitMs: 400, stragglerWindowMs: 2000 }
134
134
  },
135
135
  async: {
136
136
  toolDescriptionMode: "compact",
137
- asyncByDefault: true,
137
+ asyncByDefault: false,
138
138
  asyncWidget: true,
139
139
  forceTopLevelAsync: false,
140
- waitTool: { enabled: true },
141
- intercomBridge: { mode: "always" },
142
- globalConcurrencyLimit: 8,
143
- maxSubagentSpawnsPerSession: 32,
140
+ waitTool: { enabled: false },
141
+ intercomBridge: { mode: "off", resultDelivery: false },
142
+ globalConcurrencyLimit: 1,
143
+ maxSubagentSpawnsPerSession: 1,
144
144
  maxSubagentDepth: 1,
145
145
  defaultSessionDir: "~/.pi/agent/sessions/subagent",
146
146
  singleRunOutputBaseDir: "~/.pi/agent/subagent-outputs",
147
147
  worktreeBaseDir: "~/.pi/agent/worktrees/pi-subagents",
148
- scheduledRuns: { enabled: false, maxPending: 20, maxLatenessMs: 300000 },
149
- parallel: { maxTasks: 6, concurrency: 3 },
148
+ scheduledRuns: { enabled: false, maxPending: 1, maxLatenessMs: 300000 },
149
+ parallel: { maxTasks: 1, concurrency: 1 },
150
150
  completionBatch: { enabled: true, debounceMs: 150, maxWaitMs: 1000, stragglerDebounceMs: 75, stragglerMaxWaitMs: 400, stragglerWindowMs: 2000 }
151
151
  },
152
152
  parallel: {
@@ -154,16 +154,16 @@ const presets = {
154
154
  asyncByDefault: false,
155
155
  asyncWidget: true,
156
156
  forceTopLevelAsync: false,
157
- waitTool: { enabled: true },
158
- intercomBridge: { mode: "always" },
159
- globalConcurrencyLimit: 12,
160
- maxSubagentSpawnsPerSession: 64,
157
+ waitTool: { enabled: false },
158
+ intercomBridge: { mode: "off", resultDelivery: false },
159
+ globalConcurrencyLimit: 1,
160
+ maxSubagentSpawnsPerSession: 1,
161
161
  maxSubagentDepth: 1,
162
162
  defaultSessionDir: "~/.pi/agent/sessions/subagent",
163
163
  singleRunOutputBaseDir: "~/.pi/agent/subagent-outputs",
164
164
  worktreeBaseDir: "~/.pi/agent/worktrees/pi-subagents",
165
- scheduledRuns: { enabled: false, maxPending: 20, maxLatenessMs: 300000 },
166
- parallel: { maxTasks: 10, concurrency: 5 },
165
+ scheduledRuns: { enabled: false, maxPending: 1, maxLatenessMs: 300000 },
166
+ parallel: { maxTasks: 1, concurrency: 1 },
167
167
  completionBatch: { enabled: true, debounceMs: 150, maxWaitMs: 1000, stragglerDebounceMs: 75, stragglerMaxWaitMs: 400, stragglerWindowMs: 2000 }
168
168
  }
169
169
  };
@@ -223,10 +223,20 @@ const mergedConfig = mergeObject(existingConfig && typeof existingConfig === "ob
223
223
 
224
224
  const existingSettings = readJson(settingsPath, {});
225
225
  const mergedSettings = existingSettings && typeof existingSettings === "object" && !Array.isArray(existingSettings) ? existingSettings : {};
226
+ mergedSettings.subagents = mergedSettings.subagents && typeof mergedSettings.subagents === "object" && !Array.isArray(mergedSettings.subagents)
227
+ ? mergedSettings.subagents
228
+ : {};
229
+ mergedSettings.subagents.disableBuiltins = true;
230
+ mergedSettings.subagents.agentOverrides = mergeObject(
231
+ mergedSettings.subagents.agentOverrides && typeof mergedSettings.subagents.agentOverrides === "object" && !Array.isArray(mergedSettings.subagents.agentOverrides)
232
+ ? mergedSettings.subagents.agentOverrides
233
+ : {},
234
+ {
235
+ worker: { disabled: true },
236
+ "piagent-worker": { disabled: true }
237
+ }
238
+ );
226
239
  if (modelScopes[modelScopeName]) {
227
- mergedSettings.subagents = mergedSettings.subagents && typeof mergedSettings.subagents === "object" && !Array.isArray(mergedSettings.subagents)
228
- ? mergedSettings.subagents
229
- : {};
230
240
  mergedSettings.subagents.modelScope = modelScopes[modelScopeName];
231
241
  }
232
242
 
@@ -245,10 +255,8 @@ if (dryRun) {
245
255
  } else {
246
256
  fs.mkdirSync(path.dirname(configPath), { recursive: true });
247
257
  fs.writeFileSync(configPath, `${JSON.stringify(mergedConfig, null, 2)}\n`);
248
- if (modelScopes[modelScopeName]) {
249
- fs.mkdirSync(path.dirname(settingsPath), { recursive: true });
250
- fs.writeFileSync(settingsPath, `${JSON.stringify(mergedSettings, null, 2)}\n`);
251
- }
258
+ fs.mkdirSync(path.dirname(settingsPath), { recursive: true });
259
+ fs.writeFileSync(settingsPath, `${JSON.stringify(mergedSettings, null, 2)}\n`);
252
260
  console.log(JSON.stringify(report, null, 2));
253
261
  }
254
262
  NODE
@@ -62,7 +62,7 @@ async function lifecycleProbes() {
62
62
  return {
63
63
  duplicateWork: duplicate.decision === "duplicate" ? 0 : 1,
64
64
  budgetViolations: overBudget.disposition === "budget-exceeded" && overBudget.outputDigest === null ? 0 : 1,
65
- writerInvariantViolations: firstWriter.decision === "reserved" && secondWriter.decision === "blocked" ? 0 : 1,
65
+ writerInvariantViolations: firstWriter.decision === "blocked" && secondWriter.decision === "blocked" ? 0 : 1,
66
66
  automaticWorkerDelegations: defaultRolePolicy("worker").enabledByDefault ? 1 : 0,
67
67
  cancellationLatencyMs: Number((performance.now() - cancelStarted).toFixed(3)),
68
68
  timeoutCovered: timedOut.disposition === "timeout" && timedOut.outputDigest === null,
@@ -506,7 +506,7 @@ const productReadiness = {
506
506
  subagents: { packageAvailable: piHasSubagents, roleDefinitions: rootPackage.pi?.subagents?.agents ?? [] },
507
507
  executionBackend: projectProfile?.executionBackend?.type ?? "host",
508
508
  executionBoundary: "host execution is not a sandbox",
509
- featureModes: { solver: process.env.PIAGENT_SOLVER_MODE ?? "shadow", phaseTools: process.env.PIAGENT_PHASE_TOOLS ?? "shadow", recovery: process.env.PIAGENT_AUTO_RECOVERY ?? "on", helpers: process.env.PIAGENT_HELPERS_MODE ?? "recommend" },
509
+ featureModes: { solver: process.env.PIAGENT_SOLVER_MODE ?? "shadow", phaseTools: process.env.PIAGENT_PHASE_TOOLS ?? "shadow", recovery: process.env.PIAGENT_AUTO_RECOVERY ?? "on", helpers: process.env.PIAGENT_HELPERS_MODE ?? "off" },
510
510
  migrationRecovery: { taskStateExists: fs.existsSync(path.join(stateRoot, "tasks")), handoffStateExists: fs.existsSync(path.join(stateRoot, "handoffs")), action: "run piagent-doctor --json and inspect /piagent-status before deleting state" },
511
511
  supportedPlatform: runtime.status,
512
512
  rollbackTarget: { packageVersion: rootPackage.version ?? null, instruction: "reinstall the last known-good exact version after operator confirmation; project state is preserved" }
@@ -186,6 +186,7 @@ required_files=(
186
186
  "$ROOT/schemas/capability-recipe.schema.json"
187
187
  "$ROOT/schemas/eval-scenario.schema.json"
188
188
  "$ROOT/schemas/action-proposal.schema.json"
189
+ "$ROOT/schemas/codex-relative-efficiency-v1.schema.json"
189
190
  "$ROOT/schemas/piagent-webui/catalog-v1.json"
190
191
  "$ROOT/schemas/piagent-webui/common-v1.schema.json"
191
192
  "$ROOT/schemas/piagent-webui/snapshot-v1.schema.json"
@@ -466,6 +467,7 @@ required_files=(
466
467
  "$ROOT/tests/runtime-evidence.test.mjs"
467
468
  "$ROOT/tests/golden-enforcement.test.mjs"
468
469
  "$ROOT/packages/piagent-core/benchmark/benchmark-core.js"
470
+ "$ROOT/packages/piagent-core/benchmark/benchmark-codex-relative-efficiency.js"
469
471
  "$ROOT/packages/piagent-core/benchmark/benchmark-assurance.js"
470
472
  "$ROOT/packages/piagent-core/benchmark/benchmark-comparison.js"
471
473
  "$ROOT/packages/piagent-core/benchmark/benchmark-report.js"
@@ -482,6 +484,7 @@ required_files=(
482
484
  "$ROOT/tests/fs5-causal-arm.test.mjs"
483
485
  "$ROOT/tests/fs-release-transition.test.mjs"
484
486
  "$ROOT/schemas/benchmark-assurance-evidence.schema.json"
487
+ "$ROOT/schemas/codex-relative-efficiency-v1.schema.json"
485
488
  "$ROOT/evals/private-holdout-v1/access-policy.v1.json"
486
489
  "$ROOT/evals/private-holdout-v1/human-rubric.v1.json"
487
490
  "$ROOT/evals/private-holdout-v1/public-exposure.v1.json"
@@ -568,6 +571,7 @@ const jsonFiles = [
568
571
  "schemas/eval-scenario.schema.json",
569
572
  "schemas/action-proposal.schema.json",
570
573
  "schemas/benchmark-assurance-evidence.schema.json",
574
+ "schemas/codex-relative-efficiency-v1.schema.json",
571
575
  "schemas/piagent-webui/catalog-v1.json",
572
576
  "schemas/piagent-webui/common-v1.schema.json",
573
577
  "schemas/piagent-webui/snapshot-v1.schema.json",
@@ -910,6 +914,7 @@ node --check "$ROOT/packages/piagent-core/extensions/runtime-evidence.js" >/dev/
910
914
  node --check "$ROOT/packages/piagent-core/extensions/state-retention.js" >/dev/null
911
915
  node --check "$ROOT/packages/piagent-core/extensions/task-state.js" >/dev/null
912
916
  node --check "$ROOT/packages/piagent-core/benchmark/benchmark-core.js" >/dev/null
917
+ node --check "$ROOT/packages/piagent-core/benchmark/benchmark-codex-relative-efficiency.js" >/dev/null
913
918
  node --check "$ROOT/packages/piagent-core/benchmark/benchmark-assurance.js" >/dev/null
914
919
  node --check "$ROOT/packages/piagent-core/benchmark/benchmark-comparison.js" >/dev/null
915
920
  node --check "$ROOT/packages/piagent-core/benchmark/benchmark-report.js" >/dev/null