@piagent/platform 1.5.5 → 1.6.0

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 (227) hide show
  1. package/CHANGELOG.md +117 -0
  2. package/README.md +9 -8
  3. package/README.vi.md +9 -5
  4. package/adapters/web-frontend/profile.json +2 -4
  5. package/architecture/layers.json +18 -3
  6. package/benchmarks/deep-logic-v1/SPECIALIST_PROTOCOL.vi.md +122 -0
  7. package/benchmarks/deep-logic-v1/grade.mjs +272 -10
  8. package/benchmarks/deep-logic-v1/project/apps/admin/src/billing-summary.js +3 -0
  9. package/benchmarks/deep-logic-v1/project/benchmark-contract/public-smoke.test.js +166 -0
  10. package/benchmarks/deep-logic-v1/project/package.json +1 -1
  11. package/benchmarks/deep-logic-v1/project/packages/billing/src/close-period.js +3 -0
  12. package/benchmarks/deep-logic-v1/project/packages/billing/src/plan-timeline.js +3 -0
  13. package/benchmarks/deep-logic-v1/project/test/smoke.test.js +7 -1
  14. package/benchmarks/deep-logic-v1/prompts/budgeted-context-graph.md +2 -0
  15. package/benchmarks/deep-logic-v1/prompts/fair-dependency-scheduler.md +2 -0
  16. package/benchmarks/deep-logic-v1/prompts/layered-policy-resolution.md +2 -0
  17. package/benchmarks/deep-logic-v1/prompts/resumable-stream-assembly.md +3 -1
  18. package/benchmarks/deep-logic-v1/prompts/revision-event-reconciliation.md +2 -0
  19. package/benchmarks/deep-logic-v1/prompts/temporal-usage-billing-close.md +123 -0
  20. package/benchmarks/deep-logic-v1/prompts/transactional-config-merge.md +2 -0
  21. package/benchmarks/deep-logic-v1/suite.json +51 -3
  22. package/benchmarks/deep-logic-v1/variant.mjs +22 -1
  23. package/benchmarks/production-v1/spend-control.v1.json +68 -0
  24. package/benchmarks/production-v1/suite.json +42 -3
  25. package/catalog/capabilities.json +6 -6
  26. package/docs/command-reference-vietnamese.md +6 -6
  27. package/docs/context-engine.md +7 -1
  28. package/docs/distribution-standard.md +7 -7
  29. package/docs/en/architecture.md +1 -0
  30. package/docs/languages.json +4 -4
  31. package/docs/model-options.md +8 -5
  32. package/docs/operator-manual-vietnamese.md +13 -11
  33. package/docs/project-adapters.md +2 -2
  34. package/docs/publishing-for-teams.md +5 -0
  35. package/docs/quality-benchmark.md +271 -62
  36. package/docs/release-install-policy.md +10 -9
  37. package/docs/runtime-policy-design.md +4 -4
  38. package/docs/runtime-quality-baseline.md +13 -6
  39. package/docs/security-threat-model.md +2 -2
  40. package/docs/task-lifecycle-vietnamese.md +2 -2
  41. package/docs/team-onboarding.md +2 -2
  42. package/docs/usage-observability.md +7 -2
  43. package/docs/vi/architecture.md +1 -0
  44. package/docs-site/architecture.html +1 -1
  45. package/docs-site/benchmark.html +1 -1
  46. package/docs-site/commands.html +1 -1
  47. package/docs-site/context-engine.html +1 -1
  48. package/docs-site/en/architecture.html +1 -1
  49. package/docs-site/en/benchmark.html +1 -1
  50. package/docs-site/en/commands.html +1 -1
  51. package/docs-site/en/context-engine.html +1 -1
  52. package/docs-site/en/index.html +1 -1
  53. package/docs-site/en/mcp-approval.html +1 -1
  54. package/docs-site/en/mcp-auth.html +1 -1
  55. package/docs-site/en/mcp-servers.html +1 -1
  56. package/docs-site/en/mcp.html +1 -1
  57. package/docs-site/en/permissions.html +1 -1
  58. package/docs-site/en/profiles.html +1 -1
  59. package/docs-site/en/quickstart.html +1 -1
  60. package/docs-site/en/runtime.html +1 -1
  61. package/docs-site/en/scope.html +1 -1
  62. package/docs-site/en/security.html +1 -1
  63. package/docs-site/en/team.html +1 -1
  64. package/docs-site/en/whats-new.html +1 -1
  65. package/docs-site/en/workflows.html +1 -1
  66. package/docs-site/index.html +1 -1
  67. package/docs-site/mcp-approval.html +1 -1
  68. package/docs-site/mcp-auth.html +1 -1
  69. package/docs-site/mcp-servers.html +1 -1
  70. package/docs-site/mcp.html +1 -1
  71. package/docs-site/permissions.html +1 -1
  72. package/docs-site/profiles.html +1 -1
  73. package/docs-site/quickstart.html +1 -1
  74. package/docs-site/runtime.html +1 -1
  75. package/docs-site/scope.html +1 -1
  76. package/docs-site/security.html +1 -1
  77. package/docs-site/team.html +1 -1
  78. package/docs-site/whats-new.html +1 -1
  79. package/docs-site/workflows.html +1 -1
  80. package/evals/fixtures/benchmark-assurance-evidence.invalid.json +1 -1
  81. package/evals/fixtures/benchmark-assurance-evidence.valid.json +1 -1
  82. package/evals/fixtures/piagent-webui/session-live-state-v1.invalid.json +18 -0
  83. package/evals/fixtures/piagent-webui/session-live-state-v1.valid.json +27 -0
  84. package/evals/fs4-readiness-matrix.v1.json +2 -2
  85. package/evals/fs5-causal-arm.v1.json +2 -2
  86. package/evals/fs5-pilot-protocol.v1.json +2 -2
  87. package/evals/fs5-pilot-protocol.v4.json +6 -5
  88. package/evals/fs5-pilot-protocol.v5.json +7 -6
  89. package/evals/private-holdout-v1/public-exposure.v1.json +1 -1
  90. package/package.json +3 -1
  91. package/packages/piagent-core/benchmark/benchmark-assurance.js +4 -1
  92. package/packages/piagent-core/benchmark/benchmark-bootstrap.js +91 -9
  93. package/packages/piagent-core/benchmark/benchmark-claim-restrictions.js +38 -7
  94. package/packages/piagent-core/benchmark/benchmark-cli.js +7 -7
  95. package/packages/piagent-core/benchmark/benchmark-codex.js +3 -1
  96. package/packages/piagent-core/benchmark/benchmark-comparison.js +271 -2
  97. package/packages/piagent-core/benchmark/benchmark-core.js +732 -661
  98. package/packages/piagent-core/benchmark/benchmark-execution-guard.js +7 -5
  99. package/packages/piagent-core/benchmark/benchmark-forensics.js +439 -4
  100. package/packages/piagent-core/benchmark/benchmark-host-readiness.js +639 -0
  101. package/packages/piagent-core/benchmark/benchmark-matrix.js +22 -4
  102. package/packages/piagent-core/benchmark/benchmark-normalized-cost.js +317 -0
  103. package/packages/piagent-core/benchmark/benchmark-preflight.js +3 -1
  104. package/packages/piagent-core/benchmark/benchmark-process.js +6 -5
  105. package/packages/piagent-core/benchmark/benchmark-provider-wire.js +126 -0
  106. package/packages/piagent-core/benchmark/benchmark-record-validation.js +183 -0
  107. package/packages/piagent-core/benchmark/benchmark-report.js +116 -12
  108. package/packages/piagent-core/benchmark/benchmark-resume-recovery.js +14 -0
  109. package/packages/piagent-core/benchmark/benchmark-runner-policy.js +26 -0
  110. package/packages/piagent-core/benchmark/benchmark-stage-diagnostic.js +782 -0
  111. package/packages/piagent-core/benchmark/benchmark-statistics.js +64 -0
  112. package/packages/piagent-core/benchmark/benchmark-stop-policy.js +8 -5
  113. package/packages/piagent-core/benchmark/benchmark-suite-identity.js +31 -0
  114. package/packages/piagent-core/benchmark/benchmark-suite-runtime.js +13 -9
  115. package/packages/piagent-core/benchmark/benchmark-suite.js +128 -2
  116. package/packages/piagent-core/benchmark/benchmark-summary-support.js +376 -0
  117. package/packages/piagent-core/benchmark/benchmark-timing-diagnostics.js +971 -0
  118. package/packages/piagent-core/benchmark/benchmark-usage.js +311 -0
  119. package/packages/piagent-core/benchmark/benchmark-workflow.js +166 -0
  120. package/packages/piagent-core/docs/context-efficiency-improvement-plan.md +1080 -0
  121. package/packages/piagent-core/extensions/acceptance-contract-semantics.js +83 -69
  122. package/packages/piagent-core/extensions/acceptance-error-classes.js +160 -0
  123. package/packages/piagent-core/extensions/acceptance-executable-evidence.js +12 -9
  124. package/packages/piagent-core/extensions/acceptance-receipt.js +34 -11
  125. package/packages/piagent-core/extensions/acceptance-state-machine-evidence.js +518 -0
  126. package/packages/piagent-core/extensions/acceptance-test-binding-evidence.js +60 -0
  127. package/packages/piagent-core/extensions/context-efficiency-metrics.js +302 -0
  128. package/packages/piagent-core/extensions/context-efficiency-report.js +167 -0
  129. package/packages/piagent-core/extensions/context-engine.js +148 -145
  130. package/packages/piagent-core/extensions/context-evidence.js +48 -0
  131. package/packages/piagent-core/extensions/context-import-links.js +296 -0
  132. package/packages/piagent-core/extensions/context-telemetry-integrity.js +65 -0
  133. package/packages/piagent-core/extensions/criterion-context-pack.js +422 -7
  134. package/packages/piagent-core/extensions/criterion-graph.js +78 -8
  135. package/packages/piagent-core/extensions/guard-types.ts +2 -0
  136. package/packages/piagent-core/extensions/javascript-regex-evidence.js +32 -0
  137. package/packages/piagent-core/extensions/piagent-guard.ts +233 -41
  138. package/packages/piagent-core/extensions/task-contract-view.js +17 -3
  139. package/packages/piagent-core/extensions/task-lifecycle.js +7 -2
  140. package/packages/piagent-core/extensions/task-state.js +40 -134
  141. package/packages/piagent-core/extensions/verification-intelligence.js +3 -1
  142. package/packages/piagent-core/extensions/workspace-evidence-roots.js +157 -0
  143. package/packages/piagent-core/package.json +1 -1
  144. package/packages/piagent-core/policies/base-policy.json +2 -0
  145. package/packages/piagent-core/runtime/context/context-delivery.ts +103 -0
  146. package/packages/piagent-core/runtime/context/context-delta-shadow.ts +53 -0
  147. package/packages/piagent-core/runtime/context/context-efficiency-format.ts +47 -0
  148. package/packages/piagent-core/runtime/context/context-evidence-qualification.ts +32 -0
  149. package/packages/piagent-core/runtime/context/prefix-telemetry.ts +47 -0
  150. package/packages/piagent-core/runtime/context/repository-memory-hints.ts +27 -0
  151. package/packages/piagent-core/runtime/hooks/agent-prompt-telemetry.ts +56 -0
  152. package/packages/piagent-core/runtime/hooks/agent-start-hook.ts +162 -102
  153. package/packages/piagent-core/runtime/hooks/completion-hook.ts +5 -6
  154. package/packages/piagent-core/runtime/hooks/input-hook.ts +11 -1
  155. package/packages/piagent-core/runtime/hooks/session-hooks.ts +22 -2
  156. package/packages/piagent-core/runtime/hooks/session-start-hook.ts +7 -2
  157. package/packages/piagent-core/runtime/hooks/tool-result-content-guards.ts +95 -0
  158. package/packages/piagent-core/runtime/hooks/tool-result-hook.ts +84 -102
  159. package/packages/piagent-core/runtime/inspection/activity-event-adapter.ts +4 -2
  160. package/packages/piagent-core/runtime/inspection/activity-recovery.ts +104 -0
  161. package/packages/piagent-core/runtime/inspection/task-compaction-history.ts +1 -1
  162. package/packages/piagent-core/runtime/inspection/task-handoff-history.ts +1 -1
  163. package/packages/piagent-core/runtime/inspection/tool-failure-classification.ts +53 -0
  164. package/packages/piagent-core/runtime/inspection/webui-snapshot.ts +34 -6
  165. package/packages/piagent-core/runtime/model/authenticated-catalog.ts +17 -9
  166. package/packages/piagent-core/runtime/model/openai-codex-reasoning.ts +83 -0
  167. package/packages/piagent-core/runtime/model/provider-wire-fingerprint.ts +238 -0
  168. package/packages/piagent-core/runtime/orchestration/role-policy.ts +1 -1
  169. package/packages/piagent-core/runtime/product/activity-inspector.ts +7 -2
  170. package/packages/piagent-core/runtime/product/efficiency-metrics.ts +4 -2
  171. package/packages/piagent-core/runtime/quality/exact-output-contract.ts +2 -1
  172. package/packages/piagent-core/runtime/quality/performance-assurance-signals.ts +23 -0
  173. package/packages/piagent-core/runtime/quality/performance-assurance.ts +6 -2
  174. package/packages/piagent-core/runtime/recovery/edit-recovery-context.ts +113 -0
  175. package/packages/piagent-core/runtime/recovery/edit-recovery-delivery.ts +42 -0
  176. package/packages/piagent-core/runtime/recovery/semantic-repair-handshake.ts +55 -2
  177. package/packages/piagent-core/runtime/recovery/semantic-repair-runtime.ts +55 -2
  178. package/packages/piagent-core/runtime/registration/context-commands.ts +66 -5
  179. package/packages/piagent-core/runtime/registration/policy-tools.ts +46 -11
  180. package/packages/piagent-core/runtime/registration/task-completion-tools.ts +49 -16
  181. package/packages/piagent-core/runtime/registration/task-start-guidance.ts +163 -0
  182. package/packages/piagent-core/runtime/registration/task-start-retry-helpers.ts +37 -0
  183. package/packages/piagent-core/runtime/registration/task-start-tool.ts +67 -62
  184. package/packages/piagent-core/runtime/session/runtime-state.ts +154 -2
  185. package/packages/piagent-core/runtime/session/system-prompt.ts +4 -4
  186. package/packages/piagent-core/runtime/tools/apply-patch-tool.ts +500 -0
  187. package/packages/piagent-core/runtime/trajectory/trajectory-runtime.ts +2 -1
  188. package/packages/piagent-core/runtime/workflows/task-intake.ts +43 -2
  189. package/packages/piagent-core/security/sensitive-data.js +13 -218
  190. package/packages/piagent-core/security/sensitive-project-file.js +42 -0
  191. package/packages/piagent-core/security/sensitive-source-expression.js +330 -0
  192. package/packages/piagent-core/security/sensitive-source-formats.js +394 -0
  193. package/packages/piagent-core/security/sensitive-text.js +234 -0
  194. package/packages/piagent-core/subagents/piagent-worker.md +1 -1
  195. package/packages/piagent-webui/dist/client/assets/{MarkdownMessage-rD9WJKxs.js → MarkdownMessage-CxeZqTte.js} +1 -1
  196. package/packages/piagent-webui/dist/client/assets/index-DynIMe8I.js +176 -0
  197. package/packages/piagent-webui/dist/client/index.html +1 -1
  198. package/packages/piagent-webui/gateway/gateway-events.ts +109 -5
  199. package/packages/piagent-webui/gateway/gateway-service.ts +3 -0
  200. package/packages/piagent-webui/gateway/gateway-session-stream.ts +93 -7
  201. package/packages/piagent-webui/gateway/session-command-controller.ts +18 -3
  202. package/packages/piagent-webui/gateway/session-effective-options.ts +47 -0
  203. package/packages/piagent-webui/gateway/session-live-state.ts +21 -0
  204. package/packages/piagent-webui/gateway/session-operation-start.ts +5 -1
  205. package/packages/piagent-webui/gateway/session-operation-watchdog.ts +158 -0
  206. package/packages/piagent-webui/gateway/session-runtime-factory.ts +45 -0
  207. package/packages/piagent-webui/gateway/session-runtime-supervisor.ts +139 -124
  208. package/packages/piagent-webui/server/loopback-server.ts +8 -0
  209. package/packages/piagent-webui/server/transcript-projection.ts +22 -4
  210. package/packages/piagent-webui/shared/text-visibility.ts +10 -0
  211. package/schemas/piagent-webui/catalog-v1.json +9 -0
  212. package/schemas/piagent-webui/gateway-protocol-v1.schema.json +53 -3
  213. package/schemas/piagent-webui/session-live-state-v1.schema.json +76 -0
  214. package/schemas/task-contract.schema.json +12 -1
  215. package/scripts/benchmark-runner-core.mjs +355 -359
  216. package/scripts/benchmark-runner-finalization.mjs +309 -0
  217. package/scripts/benchmark-runner-host-readiness.mjs +94 -0
  218. package/scripts/benchmark-runner-support.mjs +200 -0
  219. package/scripts/benchmark-session.mjs +95 -41
  220. package/scripts/configure-model-scope.sh +4 -3
  221. package/scripts/helper-evaluation.mjs +1 -1
  222. package/scripts/install-global.sh +2 -2
  223. package/scripts/pi-usage-history.mjs +37 -10
  224. package/scripts/setup.sh +2 -2
  225. package/scripts/verify-local.sh +5 -1
  226. package/templates/global/settings.json +2 -1
  227. package/packages/piagent-webui/dist/client/assets/index-BZRFw1u6.js +0 -174
@@ -1,5 +1,6 @@
1
1
  import crypto from "node:crypto";
2
2
  import fs from "node:fs";
3
+ import os from "node:os";
3
4
  import path from "node:path";
4
5
 
5
6
  import {
@@ -16,6 +17,7 @@ import {
16
17
  } from "../packages/piagent-core/benchmark/benchmark-runtime.js";
17
18
  import {
18
19
  acceptedTaskStartTraceCount,
20
+ benchmarkCausalContextReceipt,
19
21
  benchmarkOperationalEvidence,
20
22
  classifyPreUsageFailure,
21
23
  failureReason,
@@ -24,10 +26,12 @@ import {
24
26
  writePrivate,
25
27
  writePrivateAtomic
26
28
  } from "../packages/piagent-core/benchmark/benchmark-forensics.js";
27
- import { readContextTelemetry } from "../packages/piagent-core/extensions/context-engine.js";
29
+ import { inspectContextTelemetry } from "../packages/piagent-core/extensions/context-engine.js";
28
30
  import { matchesAnyPath } from "../packages/piagent-core/extensions/policy-core.js";
29
31
  import { listTaskContracts, workingTreeFiles, workingTreeSnapshot } from "../packages/piagent-core/extensions/task-state.js";
30
32
  import { benchmarkTreeIdentity } from "../packages/piagent-core/benchmark/benchmark-tree-identity.js";
33
+ import { buildBenchmarkProviderWireEvidence } from "../packages/piagent-core/benchmark/benchmark-provider-wire.js";
34
+ import { createDeferredBenchmarkTimingCollector } from "../packages/piagent-core/benchmark/benchmark-timing-diagnostics.js";
31
35
  import { summarizeSession, walkJsonl } from "./pi-usage-history.mjs";
32
36
 
33
37
  const coldStartRuntimeManagedPaths = [
@@ -49,6 +53,12 @@ function privateDirectory(target) {
49
53
  return target;
50
54
  }
51
55
 
56
+ function privateTemporaryDirectory(prefix) {
57
+ const target = fs.mkdtempSync(path.join(os.tmpdir(), prefix));
58
+ try { fs.chmodSync(target, 0o700); } catch { /* Non-POSIX filesystem. */ }
59
+ return target;
60
+ }
61
+
52
62
  function makeFixtureWritable(root) {
53
63
  const pending = [root];
54
64
  while (pending.length > 0) {
@@ -122,28 +132,33 @@ function generatedStringArray(value, field) {
122
132
  return [...new Set(value)];
123
133
  }
124
134
 
125
- async function generateVariant({ runCommand, nodeCommand, generator, workspace, oraclePath, seed, scenario, timeoutSeconds }) {
126
- const result = await runCommand(nodeCommand, [generator, workspace, oraclePath, seed, scenario.id], {
127
- cwd: path.dirname(generator), timeoutMs: Math.min(timeoutSeconds, 120) * 1_000, env: graderEnvironment(scenario.id)
128
- });
129
- if (result.timedOut) fail(`Benchmark variant generator timed out for ${scenario.id}`);
130
- if (result.code !== 0) fail(`Benchmark variant generator failed for ${scenario.id}: ${result.stderr.trim() || result.stdout.trim()}`);
131
- let oracle;
132
- try { oracle = JSON.parse(fs.readFileSync(oraclePath, "utf8")); }
133
- catch (error) { fail(`Benchmark variant generator did not write a valid oracle for ${scenario.id}: ${error.message}`); }
134
- if (!oracle || typeof oracle !== "object" || Array.isArray(oracle) || oracle.schemaVersion !== 1 || !oracle.graderData || typeof oracle.graderData !== "object" || Array.isArray(oracle.graderData)) {
135
- fail(`Benchmark variant oracle is invalid for ${scenario.id}`);
135
+ async function generateVariant({ runCommand, nodeCommand, generator, workspace, seed, scenario, timeoutSeconds }) {
136
+ const temporaryRoot = privateTemporaryDirectory("piagent-benchmark-oracle-input-");
137
+ const oraclePath = path.join(temporaryRoot, "oracle.json");
138
+ try {
139
+ const result = await runCommand(nodeCommand, [generator, workspace, oraclePath, seed, scenario.id], {
140
+ cwd: path.dirname(generator), timeoutMs: Math.min(timeoutSeconds, 120) * 1_000, env: graderEnvironment(scenario.id)
141
+ });
142
+ if (result.timedOut) fail(`Benchmark variant generator timed out for ${scenario.id}`);
143
+ if (result.code !== 0) fail(`Benchmark variant generator failed for ${scenario.id}: ${result.stderr.trim() || result.stdout.trim()}`);
144
+ let oracle;
145
+ try { oracle = JSON.parse(fs.readFileSync(oraclePath, "utf8")); }
146
+ catch (error) { fail(`Benchmark variant generator did not write a valid oracle for ${scenario.id}: ${error.message}`); }
147
+ if (!oracle || typeof oracle !== "object" || Array.isArray(oracle) || oracle.schemaVersion !== 1 || !oracle.graderData || typeof oracle.graderData !== "object" || Array.isArray(oracle.graderData)) {
148
+ fail(`Benchmark variant oracle is invalid for ${scenario.id}`);
149
+ }
150
+ const serialized = JSON.stringify(oracle);
151
+ if (Buffer.byteLength(serialized) > 100_000) fail(`Benchmark variant oracle is too large for ${scenario.id}`);
152
+ return {
153
+ oracleSerialized: `${serialized}\n`,
154
+ oracleDigest: crypto.createHash("sha256").update(serialized).digest("hex"),
155
+ seedDigest: crypto.createHash("sha256").update(seed).digest("hex"),
156
+ requiredOutputSubstrings: generatedStringArray(oracle.requiredOutputSubstrings, "requiredOutputSubstrings"),
157
+ forbiddenOutputSubstrings: generatedStringArray(oracle.forbiddenOutputSubstrings, "forbiddenOutputSubstrings")
158
+ };
159
+ } finally {
160
+ fs.rmSync(temporaryRoot, { recursive: true, force: true });
136
161
  }
137
- const serialized = JSON.stringify(oracle);
138
- if (Buffer.byteLength(serialized) > 100_000) fail(`Benchmark variant oracle is too large for ${scenario.id}`);
139
- writePrivate(oraclePath, `${JSON.stringify(oracle)}\n`);
140
- return {
141
- oraclePath,
142
- oracleDigest: crypto.createHash("sha256").update(serialized).digest("hex"),
143
- seedDigest: crypto.createHash("sha256").update(seed).digest("hex"),
144
- requiredOutputSubstrings: generatedStringArray(oracle.requiredOutputSubstrings, "requiredOutputSubstrings"),
145
- forbiddenOutputSubstrings: generatedStringArray(oracle.forbiddenOutputSubstrings, "forbiddenOutputSubstrings")
146
- };
147
162
  }
148
163
 
149
164
  function writableCopyEnvironment(workspace) {
@@ -276,17 +291,24 @@ function parseGraderResult(stdout) {
276
291
  };
277
292
  }
278
293
 
279
- async function gradeWorkspace(runCommand, nodeCommand, grader, workspace, scenario, timeoutSeconds, oraclePath) {
280
- const result = await runCommand(nodeCommand, oraclePath ? [grader, workspace, oraclePath] : [grader, workspace], {
281
- cwd: path.dirname(grader), timeoutMs: Math.min(timeoutSeconds, 120) * 1_000, env: graderEnvironment(scenario.id)
282
- });
283
- if (result.timedOut) return { passed: false, score: 0, checks: [], error: "grader-timeout" };
284
- if (result.code !== 0) return { passed: false, score: 0, checks: [], error: `grader-exit-${result.code}` };
285
- try { return parseGraderResult(result.stdout); } catch (error) { return { passed: false, score: 0, checks: [], error: error.message }; }
294
+ async function gradeWorkspace(runCommand, nodeCommand, grader, workspace, scenario, timeoutSeconds, oracleSerialized) {
295
+ const temporaryRoot = oracleSerialized ? privateTemporaryDirectory("piagent-benchmark-oracle-grader-") : null;
296
+ try {
297
+ const oraclePath = temporaryRoot ? path.join(temporaryRoot, "oracle.json") : null;
298
+ if (oraclePath) writePrivate(oraclePath, oracleSerialized);
299
+ const result = await runCommand(nodeCommand, oraclePath ? [grader, workspace, oraclePath] : [grader, workspace], {
300
+ cwd: path.dirname(grader), timeoutMs: Math.min(timeoutSeconds, 120) * 1_000, env: graderEnvironment(scenario.id)
301
+ });
302
+ if (result.timedOut) return { passed: false, score: 0, checks: [], error: "grader-timeout" };
303
+ if (result.code !== 0) return { passed: false, score: 0, checks: [], error: `grader-exit-${result.code}` };
304
+ try { return parseGraderResult(result.stdout); } catch (error) { return { passed: false, score: 0, checks: [], error: error.message }; }
305
+ } finally {
306
+ if (temporaryRoot) fs.rmSync(temporaryRoot, { recursive: true, force: true });
307
+ }
286
308
  }
287
309
 
288
310
  function sessionSummaries(sessionDir) {
289
- return walkJsonl(sessionDir).map((file) => summarizeSession(file, {})).filter(Boolean);
311
+ return walkJsonl(sessionDir).map((file) => summarizeSession(file, { strictUsage: true })).filter(Boolean);
290
312
  }
291
313
 
292
314
  export async function runBenchmarkSession({ packageRoot, runCommand, resolveSuiteEntry, interrupted, persistCompletedRecord, suite, suiteRoot, scenario, surface, repeat, orderIndex, infrastructureAttempt = 1, runId, runRoot, options, piCommand, codexCommand, codexDisabledFeatures, codexRuntime, piRuntimeHome, systemCommands, suiteDigest, configurationDigest, rootSeed }) {
@@ -301,11 +323,11 @@ export async function runBenchmarkSession({ packageRoot, runCommand, resolveSuit
301
323
  applySetupFiles(workspace, scenario.setupFiles);
302
324
  const profile = scenario.profile ?? suite.profile;
303
325
  const lifecycle = scenario.lifecycle ?? "steady-state";
304
- let variant = { oraclePath: null, oracleDigest: null, seedDigest: null, requiredOutputSubstrings: [], forbiddenOutputSubstrings: [] };
326
+ let variant = { oracleSerialized: null, oracleDigest: null, seedDigest: null, requiredOutputSubstrings: [], forbiddenOutputSubstrings: [] };
305
327
  if (scenario.variantGenerator) {
306
328
  variant = await generateVariant({
307
329
  runCommand, nodeCommand: systemCommands.node, generator: resolveSuiteEntry(suiteRoot, scenario.variantGenerator, "variant generator"), workspace,
308
- oraclePath: path.join(workspaceRoot, "oracle.json"), seed: variantSeed(rootSeed, suiteDigest, scenario.id, repeat),
330
+ seed: variantSeed(rootSeed, suiteDigest, scenario.id, repeat),
309
331
  scenario, timeoutSeconds: options.timeoutSeconds
310
332
  });
311
333
  }
@@ -337,6 +359,7 @@ export async function runBenchmarkSession({ packageRoot, runCommand, resolveSuit
337
359
  const args = surface === "codex-cli" ? codexExecArgs({ workspace, options, disabledFeatures: codexDisabledFeatures }) : piArgs;
338
360
  const codexForbiddenHits = new Set();
339
361
  const codexCollector = surface === "codex-cli" ? createCodexExecJsonlCollector({ model: options.model, thinkingLevel: options.thinking, onEvent: (event) => inspectForbiddenValue(event, forbiddenOutputSubstrings, codexForbiddenHits) }) : undefined;
362
+ const timingCollector = createDeferredBenchmarkTimingCollector({ surface });
340
363
  const environment = {
341
364
  PIAGENT_NO_UPDATE_CHECK: "1", PIAGENT_BENCHMARK_RUN_ID: runId, PIAGENT_BENCHMARK_SCENARIO: scenario.id,
342
365
  PIAGENT_BENCHMARK_SURFACE: surface, PIAGENT_BENCHMARK_SESSION_ID: sessionId, PIAGENT_BENCHMARK_PROFILE: profile,
@@ -344,12 +367,22 @@ export async function runBenchmarkSession({ packageRoot, runCommand, resolveSuit
344
367
  };
345
368
  const inflightPath = path.join(workspaceRoot, "inflight.json");
346
369
  writePrivateAtomic(inflightPath, `${JSON.stringify({ schemaVersion: 1, runId, attemptId, orderIndex, scenarioId: scenario.id, surface, repeat, infrastructureAttempt, stage: "provider-may-start", recordedAt: new Date().toISOString() }, null, 2)}\n`);
347
- const agent = await runCommand(command, args, {
348
- cwd: workspace, input: surface === "codex-cli" ? prompt : undefined, timeoutMs: options.timeoutSeconds * 1_000,
349
- forbiddenSubstrings: forbiddenOutputSubstrings, requiredSubstrings: requiredOutputSubstrings,
350
- onStdoutChunk: codexCollector ? (chunk) => codexCollector.write(chunk) : undefined,
351
- env: surface === "codex-cli" ? codexProcessEnvironment(codexRuntime, environment) : surface === "piagent" ? piagentProcessEnvironment(options.piagentTreatment, { ...environment, PI_CODING_AGENT_DIR: piRuntimeHome.path }) : benchmarkEnvironment({ ...environment, PI_CODING_AGENT_DIR: piRuntimeHome.path })
352
- });
370
+ let agent;
371
+ try {
372
+ agent = await runCommand(command, args, {
373
+ cwd: workspace, input: surface === "codex-cli" ? prompt : undefined, timeoutMs: options.timeoutSeconds * 1_000,
374
+ forbiddenSubstrings: forbiddenOutputSubstrings, requiredSubstrings: requiredOutputSubstrings,
375
+ onStdoutChunk: (chunk, observation) => {
376
+ timingCollector.write(chunk, observation?.observedAtSeconds);
377
+ codexCollector?.write(chunk);
378
+ },
379
+ env: surface === "codex-cli" ? codexProcessEnvironment(codexRuntime, environment) : surface === "piagent" ? piagentProcessEnvironment(options.piagentTreatment, { ...environment, PI_CODING_AGENT_DIR: piRuntimeHome.path }) : benchmarkEnvironment({ ...environment, PI_CODING_AGENT_DIR: piRuntimeHome.path })
380
+ });
381
+ } catch (error) {
382
+ timingCollector.discard();
383
+ throw error;
384
+ }
385
+ const timingDiagnostics = timingCollector.finish(agent.durationSeconds);
353
386
  const sessionFiles = surface === "codex-cli" ? [] : walkJsonl(sessions);
354
387
  let usage;
355
388
  let codexDiagnostics = [];
@@ -372,11 +405,31 @@ export async function runBenchmarkSession({ packageRoot, runCommand, resolveSuit
372
405
  const runtimeManagedChanges = surface === "piagent" && lifecycle === "cold-start" ? allChangedFiles.filter((file) => matchesAnyPath(file, coldStartRuntimeManagedPaths)) : [];
373
406
  const runtimeManagedSet = new Set(runtimeManagedChanges);
374
407
  const changedFiles = allChangedFiles.filter((file) => !runtimeManagedSet.has(file));
408
+ const telemetryLimit = 50_000;
409
+ const contextTelemetryInspection = surface === "piagent"
410
+ ? inspectContextTelemetry(workspace, { limit: telemetryLimit })
411
+ : { records: [], exists: false, integrityFailures: 0, recoverableTailBytes: 0, inputTruncated: false };
412
+ const contextTelemetry = contextTelemetryInspection.records;
413
+ const causalContextReceipt = benchmarkCausalContextReceipt(contextTelemetry, {
414
+ surface,
415
+ sessionId,
416
+ criterionExpected: scenario.kind !== "safety-refusal",
417
+ telemetryExists: contextTelemetryInspection.exists,
418
+ telemetryTruncated: contextTelemetryInspection.inputTruncated,
419
+ telemetryIntegrityFailures: contextTelemetryInspection.integrityFailures,
420
+ recoverableTailBytes: contextTelemetryInspection.recoverableTailBytes
421
+ });
422
+ const providerWireEvidence = surface === "piagent" ? buildBenchmarkProviderWireEvidence({
423
+ events: contextTelemetry,
424
+ requestedModel: options.model,
425
+ requestedThinking: options.thinking,
426
+ telemetryTruncated: contextTelemetryInspection.inputTruncated
427
+ }) : null;
375
428
  let workflow = null;
376
429
  if (surface === "piagent" && scenario.kind !== "safety-refusal") {
377
430
  const task = listTaskContracts(workspace).find((item) => item.sessionId === sessionId);
378
431
  workflow = evaluateWorkflowEvidence(task, changedFiles, usage.toolNames, { scenarioKind: scenario.kind, acceptedTaskStartCount: acceptedTaskStartTraceCount(sessionFiles, sessionId) });
379
- workflow.operational = benchmarkOperationalEvidence(readContextTelemetry(workspace, { limit: 5_000 }));
432
+ workflow.operational = benchmarkOperationalEvidence(contextTelemetry);
380
433
  }
381
434
  const beforeGrade = workingTreeSnapshot(workspace);
382
435
  const outsideScope = changedFiles.filter((file) => !matchesAnyPath(file, scenario.allowedChanges));
@@ -384,7 +437,7 @@ export async function runBenchmarkSession({ packageRoot, runCommand, resolveSuit
384
437
  ? { passed: false, score: 0, checks: [], error: preUsageFailure.failure }
385
438
  : interrupted()
386
439
  ? { passed: false, score: 0, checks: [], error: "interrupted-after-provider-start" }
387
- : await gradeWorkspace(runCommand, systemCommands.node, graderPath, workspace, scenario, options.timeoutSeconds, variant.oraclePath);
440
+ : await gradeWorkspace(runCommand, systemCommands.node, graderPath, workspace, scenario, options.timeoutSeconds, variant.oracleSerialized);
388
441
  const graderIntegrity = { passed: JSON.stringify(beforeGrade) === JSON.stringify(workingTreeSnapshot(workspace)) };
389
442
  const scope = { passed: outsideScope.length === 0, changedFiles, outsideScope, allChangedFiles, runtimeManagedChanges };
390
443
  const outputSafety = { passed: forbiddenHits.length === 0, forbiddenHits: forbiddenHits.map((value) => crypto.createHash("sha256").update(value).digest("hex")) };
@@ -402,7 +455,8 @@ export async function runBenchmarkSession({ packageRoot, runCommand, resolveSuit
402
455
  infrastructureDiagnosticSource: abortSuite ? (codexDiagnostics.length > 0 ? "codex-error-events" : piTerminalError ? "pi-terminal-error-event" : "process-output-tail") : undefined,
403
456
  resolved, failure: preUsageFailure?.failure ?? failureReason({ agent, grade, graderIntegrity, outsideScope, forbiddenHits, missingRequired }),
404
457
  agent: { exitCode: agent.code, signal: agent.signal, timedOut: agent.timedOut, stdoutHash: agent.stdoutHash ?? crypto.createHash("sha256").update(agent.stdout).digest("hex"), stderrHash: crypto.createHash("sha256").update(agent.stderr ?? "").digest("hex") },
405
- grade, graderIntegrity, scope, outputSafety, outputEvidence, workflow, usage, durationSeconds: agent.durationSeconds,
458
+ grade, graderIntegrity, scope, outputSafety, outputEvidence, workflow, providerWireEvidence, causalContextReceipt, usage,
459
+ durationSeconds: agent.durationSeconds, timingDiagnostics,
406
460
  promptHash: crypto.createHash("sha256").update(prompt).digest("hex"),
407
461
  variant: scenario.variantGenerator ? { generated: true, seedDigest: variant.seedDigest, oracleDigest: variant.oracleDigest, fixtureDigest } : { generated: false, fixtureDigest }
408
462
  };
@@ -9,7 +9,7 @@ Usage:
9
9
  Options:
10
10
  --preset <full|codex|claude> Model families to enable (default: full = both)
11
11
  --default-model <provider/model[:thinking]>
12
- Default model (default: openai-codex/gpt-5.5:high)
12
+ Default model (default: openai-codex/gpt-5.6-sol:high)
13
13
  --settings <path> Pi settings file (default: ~/.pi/agent/settings.json)
14
14
  --dry-run Print resulting settings JSON without writing
15
15
  -h, --help
@@ -30,7 +30,7 @@ USAGE
30
30
  }
31
31
 
32
32
  PRESET="full"
33
- DEFAULT_MODEL="openai-codex/gpt-5.5:high"
33
+ DEFAULT_MODEL="openai-codex/gpt-5.6-sol:high"
34
34
  SETTINGS_PATH="${PI_CODING_AGENT_DIR:-"${HOME}/.pi/agent"}/settings.json"
35
35
  DRY_RUN=false
36
36
 
@@ -102,7 +102,8 @@ const codexModels = [
102
102
  "openai-codex/gpt-5.5:high",
103
103
  "openai-codex/gpt-5.6-luna:medium",
104
104
  "openai-codex/gpt-5.6-terra:high",
105
- "openai-codex/gpt-5.6-sol:high"
105
+ "openai-codex/gpt-5.6-sol:high",
106
+ "openai-codex/*"
106
107
  ];
107
108
 
108
109
  const claudeModels = [
@@ -32,7 +32,7 @@ function helperRequest(role, objective, run) {
32
32
  return createHelperRequest({
33
33
  policy, objective, taskId: "helper-evaluation", taskRunId: run, sessionId: "private-helper-session",
34
34
  parentReadScope: ["src/**"], parentWriteScope: ["src/**"],
35
- parentAllowedTools: ["read", "grep", "find", "ls", "bash", "edit", "write", "contact_supervisor"],
35
+ parentAllowedTools: ["read", "grep", "find", "ls", "bash", "edit", "write", "apply_patch", "contact_supervisor"],
36
36
  requestedWriteScope: role === "worker" ? ["src/**"] : [], singleWriterOwnership: role === "worker" ? "evaluation-writer" : null
37
37
  });
38
38
  }
@@ -28,7 +28,7 @@ Options:
28
28
  --no-model-scope Leave the user's enabledModels untouched.
29
29
  --default-model <provider/model[:thinking]>
30
30
  Default model written to Pi settings
31
- (default: openai-codex/gpt-5.5:high).
31
+ (default: openai-codex/gpt-5.6-sol:high).
32
32
  -h, --help Print this help and exit.
33
33
 
34
34
  Purpose:
@@ -91,7 +91,7 @@ WITH_WEB_ACCESS=true
91
91
  WITH_HERDR=false
92
92
  CONFIGURE_MODEL_SCOPE=true
93
93
  MODEL_SCOPE_PRESET="full"
94
- DEFAULT_MODEL="openai-codex/gpt-5.5:high"
94
+ DEFAULT_MODEL="openai-codex/gpt-5.6-sol:high"
95
95
  DRY_RUN=false
96
96
  FLOATING_PACKAGE_SOURCE=false
97
97
  RESOLVED_CHANNEL_LABEL="custom"
@@ -202,14 +202,29 @@ function emptyTotals() {
202
202
  };
203
203
  }
204
204
 
205
- function addTotals(target, usage) {
206
- target.input += numberValue(usage.input);
207
- target.output += numberValue(usage.output);
208
- target.cacheRead += numberValue(usage.cacheRead);
209
- target.cacheWrite += numberValue(usage.cacheWrite);
210
- target.reasoning += numberValue(usage.reasoning);
211
- target.total += numberValue(usage.totalTokens)
212
- || numberValue(usage.input) + numberValue(usage.output) + numberValue(usage.cacheRead) + numberValue(usage.cacheWrite);
205
+ function exactToken(raw, label) {
206
+ if (!Number.isSafeInteger(raw) || raw < 0) throw new Error(`${label} must be a non-negative safe integer`);
207
+ return raw;
208
+ }
209
+
210
+ function addTotals(target, usage, { strict = false, label = "usage" } = {}) {
211
+ const values = strict ? {
212
+ input: exactToken(usage?.input, `${label}.input`),
213
+ output: exactToken(usage?.output, `${label}.output`),
214
+ cacheRead: exactToken(usage?.cacheRead, `${label}.cacheRead`),
215
+ cacheWrite: exactToken(usage?.cacheWrite, `${label}.cacheWrite`),
216
+ reasoning: exactToken(usage?.reasoning, `${label}.reasoning`),
217
+ total: exactToken(usage?.totalTokens, `${label}.totalTokens`)
218
+ } : {
219
+ input: numberValue(usage.input), output: numberValue(usage.output), cacheRead: numberValue(usage.cacheRead),
220
+ cacheWrite: numberValue(usage.cacheWrite), reasoning: numberValue(usage.reasoning),
221
+ total: numberValue(usage.totalTokens) || numberValue(usage.input) + numberValue(usage.output) + numberValue(usage.cacheRead) + numberValue(usage.cacheWrite)
222
+ };
223
+ if (strict && values.total !== values.input + values.output + values.cacheRead + values.cacheWrite) {
224
+ throw new Error(`${label}.totalTokens does not equal the reported token categories`);
225
+ }
226
+ if (strict && values.reasoning > values.output) throw new Error(`${label}.reasoning exceeds output`);
227
+ for (const field of ["input", "output", "cacheRead", "cacheWrite", "reasoning", "total"]) target[field] += values[field];
213
228
  const cost = usage.cost;
214
229
  target.cost += typeof cost === "object" && cost !== null
215
230
  ? numberValue(cost.total)
@@ -254,6 +269,7 @@ function summarizeSession(file, options) {
254
269
  messages: { user: 0, assistant: 0, toolCalls: 0, toolResults: 0, total: 0 },
255
270
  promptChars: 0,
256
271
  tokens: emptyTotals(),
272
+ usageIntegrity: { exact: options.strictUsage === true, source: "pi-session-jsonl", assistantMessages: 0, usageMessages: 0 },
257
273
  toolNames: {},
258
274
  sizeBytes: stat.size,
259
275
  mtime: stat.mtime
@@ -261,12 +277,13 @@ function summarizeSession(file, options) {
261
277
 
262
278
  let hasCountedActivity = false;
263
279
  const lines = fs.readFileSync(file, "utf8").split(/\n/);
264
- for (const line of lines) {
280
+ for (const [lineIndex, line] of lines.entries()) {
265
281
  if (!line) continue;
266
282
  let entry;
267
283
  try {
268
284
  entry = JSON.parse(line);
269
285
  } catch {
286
+ if (options.strictUsage) throw new Error(`Pi session JSONL line ${lineIndex + 1} is not valid JSON`);
270
287
  continue;
271
288
  }
272
289
 
@@ -311,9 +328,16 @@ function summarizeSession(file, options) {
311
328
  summary.promptChars += extractTextLength(message.content);
312
329
  } else if (role === "assistant") {
313
330
  summary.messages.assistant += 1;
331
+ summary.usageIntegrity.assistantMessages += 1;
314
332
  if (message.provider && !summary.provider) summary.provider = String(message.provider);
315
333
  if (message.model && !summary.modelId) summary.modelId = String(message.model);
316
- if (message.usage) addTotals(summary.tokens, message.usage);
334
+ if (options.strictUsage && (!message.usage || typeof message.usage !== "object" || Array.isArray(message.usage))) {
335
+ throw new Error(`Pi assistant message at line ${lineIndex + 1} is missing usage`);
336
+ }
337
+ if (message.usage) {
338
+ addTotals(summary.tokens, message.usage, { strict: options.strictUsage === true, label: `Pi session JSONL line ${lineIndex + 1} usage` });
339
+ summary.usageIntegrity.usageMessages += 1;
340
+ }
317
341
  if (Array.isArray(message.content)) {
318
342
  for (const block of message.content) {
319
343
  if (block?.type !== "toolCall") continue;
@@ -336,6 +360,9 @@ function summarizeSession(file, options) {
336
360
  if (!summary.countedLastTimestamp) summary.countedLastTimestamp = summary.lastTimestamp;
337
361
 
338
362
  if (!hasCountedActivity && (options.since || options.until)) return undefined;
363
+ if (options.strictUsage && summary.usageIntegrity.assistantMessages !== summary.usageIntegrity.usageMessages) {
364
+ throw new Error("Pi session JSONL usage coverage is incomplete");
365
+ }
339
366
  return summary;
340
367
  }
341
368
 
package/scripts/setup.sh CHANGED
@@ -36,7 +36,7 @@ Options:
36
36
  --model-scope <full|codex|claude> model families to enable
37
37
  Configure Pi enabledModels for selector/cycling (default: full)
38
38
  --default-model <provider/model[:thinking]>
39
- Configure default provider/model/thinking (default: openai-codex/gpt-5.5:high)
39
+ Configure default provider/model/thinking (default: openai-codex/gpt-5.6-sol:high)
40
40
  --no-model-scope Skip global model-scope configuration
41
41
  --install-pi / --no-install-pi Install/skip Pi CLI with npm if `pi` is missing (default: install)
42
42
  --force-profile Replace existing project .pi/piagent-profile.json
@@ -78,7 +78,7 @@ WITH_WEB_ACCESS=true
78
78
  WITH_HERDR=true
79
79
  CONFIGURE_MODEL_SCOPE=true
80
80
  MODEL_SCOPE_PRESET="full"
81
- DEFAULT_MODEL="openai-codex/gpt-5.5:high"
81
+ DEFAULT_MODEL="openai-codex/gpt-5.6-sol:high"
82
82
  AUTO_INSTALL_PI=true
83
83
  FORCE_PROFILE=false
84
84
  FORCE_SETTINGS=false
@@ -211,6 +211,7 @@ required_files=(
211
211
  "$ROOT/schemas/piagent-webui/approval-v1.schema.json"
212
212
  "$ROOT/schemas/piagent-webui/capabilities-v1.schema.json"
213
213
  "$ROOT/schemas/piagent-webui/session-catalog-v1.schema.json"
214
+ "$ROOT/schemas/piagent-webui/session-live-state-v1.schema.json"
214
215
  "$ROOT/schemas/piagent-webui/session-command-v1.schema.json"
215
216
  "$ROOT/schemas/piagent-webui/gateway-capabilities-v1.schema.json"
216
217
  "$ROOT/schemas/piagent-webui/gateway-protocol-v1.schema.json"
@@ -235,6 +236,7 @@ required_files=(
235
236
  "$ROOT/packages/piagent-webui/contracts/generated/attachment-v1.ts"
236
237
  "$ROOT/packages/piagent-webui/contracts/generated/document-workspace-v1.ts"
237
238
  "$ROOT/packages/piagent-webui/contracts/generated/session-catalog-v1.ts"
239
+ "$ROOT/packages/piagent-webui/contracts/generated/session-live-state-v1.ts"
238
240
  "$ROOT/packages/piagent-webui/contracts/generated/session-command-v1.ts"
239
241
  "$ROOT/packages/piagent-webui/contracts/generated/gateway-capabilities-v1.ts"
240
242
  "$ROOT/packages/piagent-webui/contracts/generated/gateway-protocol-v1.ts"
@@ -303,6 +305,7 @@ required_files=(
303
305
  "$ROOT/packages/piagent-webui/gateway/session-command-store.ts"
304
306
  "$ROOT/packages/piagent-webui/gateway/session-lease-store.ts"
305
307
  "$ROOT/packages/piagent-webui/gateway/session-metadata-store.ts"
308
+ "$ROOT/packages/piagent-webui/gateway/session-operation-watchdog.ts"
306
309
  "$ROOT/packages/piagent-webui/gateway/session-runtime-supervisor.ts"
307
310
  "$ROOT/packages/piagent-webui/server/gateway-websocket.ts"
308
311
  "$ROOT/packages/piagent-webui/extension/piagent-webui.ts"
@@ -590,6 +593,7 @@ const jsonFiles = [
590
593
  "schemas/piagent-webui/approval-v1.schema.json",
591
594
  "schemas/piagent-webui/capabilities-v1.schema.json",
592
595
  "schemas/piagent-webui/session-catalog-v1.schema.json",
596
+ "schemas/piagent-webui/session-live-state-v1.schema.json",
593
597
  "schemas/piagent-webui/session-command-v1.schema.json",
594
598
  "schemas/piagent-webui/gateway-capabilities-v1.schema.json",
595
599
  "schemas/piagent-webui/gateway-protocol-v1.schema.json",
@@ -959,7 +963,7 @@ if [[ "$OFFLINE" == true || "${PIAGENT_VERIFY_OFFLINE:-}" == "1" || "${CI:-}" ==
959
963
  else
960
964
  bash "$ROOT/scripts/pi-model-catalog.sh" --json >/dev/null
961
965
  fi
962
- bash "$ROOT/scripts/configure-model-scope.sh" --dry-run --preset full --default-model openai-codex/gpt-5.5:high >/dev/null
966
+ bash "$ROOT/scripts/configure-model-scope.sh" --dry-run --preset full --default-model openai-codex/gpt-5.6-sol:high >/dev/null
963
967
  node "$ROOT/scripts/mcp-manage.mjs" --list >/dev/null
964
968
  node "$ROOT/scripts/mcp-manage.mjs" --dry-run --preset popular --scope project --project "$ROOT" >/dev/null
965
969
  node --input-type=module - "$ROOT" <<'NODE'
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "defaultProjectTrust": "ask",
3
3
  "defaultProvider": "openai-codex",
4
- "defaultModel": "gpt-5.5",
4
+ "defaultModel": "gpt-5.6-sol",
5
5
  "defaultThinkingLevel": "high",
6
6
  "showCacheMissNotices": true,
7
7
  "enabledModels": [
@@ -12,6 +12,7 @@
12
12
  "openai-codex/gpt-5.6-luna:medium",
13
13
  "openai-codex/gpt-5.6-terra:high",
14
14
  "openai-codex/gpt-5.6-sol:high",
15
+ "openai-codex/*",
15
16
  "anthropic/claude-haiku-4-5:low",
16
17
  "anthropic/claude-sonnet-4-5:high",
17
18
  "anthropic/claude-sonnet-4-6:max",