@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.
- package/CHANGELOG.md +117 -0
- package/README.md +9 -8
- package/README.vi.md +9 -5
- package/adapters/web-frontend/profile.json +2 -4
- package/architecture/layers.json +18 -3
- package/benchmarks/deep-logic-v1/SPECIALIST_PROTOCOL.vi.md +122 -0
- package/benchmarks/deep-logic-v1/grade.mjs +272 -10
- package/benchmarks/deep-logic-v1/project/apps/admin/src/billing-summary.js +3 -0
- package/benchmarks/deep-logic-v1/project/benchmark-contract/public-smoke.test.js +166 -0
- package/benchmarks/deep-logic-v1/project/package.json +1 -1
- package/benchmarks/deep-logic-v1/project/packages/billing/src/close-period.js +3 -0
- package/benchmarks/deep-logic-v1/project/packages/billing/src/plan-timeline.js +3 -0
- package/benchmarks/deep-logic-v1/project/test/smoke.test.js +7 -1
- package/benchmarks/deep-logic-v1/prompts/budgeted-context-graph.md +2 -0
- package/benchmarks/deep-logic-v1/prompts/fair-dependency-scheduler.md +2 -0
- package/benchmarks/deep-logic-v1/prompts/layered-policy-resolution.md +2 -0
- package/benchmarks/deep-logic-v1/prompts/resumable-stream-assembly.md +3 -1
- package/benchmarks/deep-logic-v1/prompts/revision-event-reconciliation.md +2 -0
- package/benchmarks/deep-logic-v1/prompts/temporal-usage-billing-close.md +123 -0
- package/benchmarks/deep-logic-v1/prompts/transactional-config-merge.md +2 -0
- package/benchmarks/deep-logic-v1/suite.json +51 -3
- package/benchmarks/deep-logic-v1/variant.mjs +22 -1
- package/benchmarks/production-v1/spend-control.v1.json +68 -0
- package/benchmarks/production-v1/suite.json +42 -3
- package/catalog/capabilities.json +6 -6
- package/docs/command-reference-vietnamese.md +6 -6
- package/docs/context-engine.md +7 -1
- package/docs/distribution-standard.md +7 -7
- package/docs/en/architecture.md +1 -0
- package/docs/languages.json +4 -4
- package/docs/model-options.md +8 -5
- package/docs/operator-manual-vietnamese.md +13 -11
- package/docs/project-adapters.md +2 -2
- package/docs/publishing-for-teams.md +5 -0
- package/docs/quality-benchmark.md +271 -62
- package/docs/release-install-policy.md +10 -9
- package/docs/runtime-policy-design.md +4 -4
- package/docs/runtime-quality-baseline.md +13 -6
- package/docs/security-threat-model.md +2 -2
- package/docs/task-lifecycle-vietnamese.md +2 -2
- package/docs/team-onboarding.md +2 -2
- package/docs/usage-observability.md +7 -2
- package/docs/vi/architecture.md +1 -0
- package/docs-site/architecture.html +1 -1
- package/docs-site/benchmark.html +1 -1
- package/docs-site/commands.html +1 -1
- package/docs-site/context-engine.html +1 -1
- package/docs-site/en/architecture.html +1 -1
- package/docs-site/en/benchmark.html +1 -1
- package/docs-site/en/commands.html +1 -1
- package/docs-site/en/context-engine.html +1 -1
- package/docs-site/en/index.html +1 -1
- package/docs-site/en/mcp-approval.html +1 -1
- package/docs-site/en/mcp-auth.html +1 -1
- package/docs-site/en/mcp-servers.html +1 -1
- package/docs-site/en/mcp.html +1 -1
- package/docs-site/en/permissions.html +1 -1
- package/docs-site/en/profiles.html +1 -1
- package/docs-site/en/quickstart.html +1 -1
- package/docs-site/en/runtime.html +1 -1
- package/docs-site/en/scope.html +1 -1
- package/docs-site/en/security.html +1 -1
- package/docs-site/en/team.html +1 -1
- package/docs-site/en/whats-new.html +1 -1
- package/docs-site/en/workflows.html +1 -1
- package/docs-site/index.html +1 -1
- package/docs-site/mcp-approval.html +1 -1
- package/docs-site/mcp-auth.html +1 -1
- package/docs-site/mcp-servers.html +1 -1
- package/docs-site/mcp.html +1 -1
- package/docs-site/permissions.html +1 -1
- package/docs-site/profiles.html +1 -1
- package/docs-site/quickstart.html +1 -1
- package/docs-site/runtime.html +1 -1
- package/docs-site/scope.html +1 -1
- package/docs-site/security.html +1 -1
- package/docs-site/team.html +1 -1
- package/docs-site/whats-new.html +1 -1
- package/docs-site/workflows.html +1 -1
- package/evals/fixtures/benchmark-assurance-evidence.invalid.json +1 -1
- package/evals/fixtures/benchmark-assurance-evidence.valid.json +1 -1
- package/evals/fixtures/piagent-webui/session-live-state-v1.invalid.json +18 -0
- package/evals/fixtures/piagent-webui/session-live-state-v1.valid.json +27 -0
- package/evals/fs4-readiness-matrix.v1.json +2 -2
- package/evals/fs5-causal-arm.v1.json +2 -2
- package/evals/fs5-pilot-protocol.v1.json +2 -2
- package/evals/fs5-pilot-protocol.v4.json +6 -5
- package/evals/fs5-pilot-protocol.v5.json +7 -6
- package/evals/private-holdout-v1/public-exposure.v1.json +1 -1
- package/package.json +3 -1
- package/packages/piagent-core/benchmark/benchmark-assurance.js +4 -1
- package/packages/piagent-core/benchmark/benchmark-bootstrap.js +91 -9
- package/packages/piagent-core/benchmark/benchmark-claim-restrictions.js +38 -7
- package/packages/piagent-core/benchmark/benchmark-cli.js +7 -7
- package/packages/piagent-core/benchmark/benchmark-codex.js +3 -1
- package/packages/piagent-core/benchmark/benchmark-comparison.js +271 -2
- package/packages/piagent-core/benchmark/benchmark-core.js +732 -661
- package/packages/piagent-core/benchmark/benchmark-execution-guard.js +7 -5
- package/packages/piagent-core/benchmark/benchmark-forensics.js +439 -4
- package/packages/piagent-core/benchmark/benchmark-host-readiness.js +639 -0
- package/packages/piagent-core/benchmark/benchmark-matrix.js +22 -4
- package/packages/piagent-core/benchmark/benchmark-normalized-cost.js +317 -0
- package/packages/piagent-core/benchmark/benchmark-preflight.js +3 -1
- package/packages/piagent-core/benchmark/benchmark-process.js +6 -5
- package/packages/piagent-core/benchmark/benchmark-provider-wire.js +126 -0
- package/packages/piagent-core/benchmark/benchmark-record-validation.js +183 -0
- package/packages/piagent-core/benchmark/benchmark-report.js +116 -12
- package/packages/piagent-core/benchmark/benchmark-resume-recovery.js +14 -0
- package/packages/piagent-core/benchmark/benchmark-runner-policy.js +26 -0
- package/packages/piagent-core/benchmark/benchmark-stage-diagnostic.js +782 -0
- package/packages/piagent-core/benchmark/benchmark-statistics.js +64 -0
- package/packages/piagent-core/benchmark/benchmark-stop-policy.js +8 -5
- package/packages/piagent-core/benchmark/benchmark-suite-identity.js +31 -0
- package/packages/piagent-core/benchmark/benchmark-suite-runtime.js +13 -9
- package/packages/piagent-core/benchmark/benchmark-suite.js +128 -2
- package/packages/piagent-core/benchmark/benchmark-summary-support.js +376 -0
- package/packages/piagent-core/benchmark/benchmark-timing-diagnostics.js +971 -0
- package/packages/piagent-core/benchmark/benchmark-usage.js +311 -0
- package/packages/piagent-core/benchmark/benchmark-workflow.js +166 -0
- package/packages/piagent-core/docs/context-efficiency-improvement-plan.md +1080 -0
- package/packages/piagent-core/extensions/acceptance-contract-semantics.js +83 -69
- package/packages/piagent-core/extensions/acceptance-error-classes.js +160 -0
- package/packages/piagent-core/extensions/acceptance-executable-evidence.js +12 -9
- package/packages/piagent-core/extensions/acceptance-receipt.js +34 -11
- package/packages/piagent-core/extensions/acceptance-state-machine-evidence.js +518 -0
- package/packages/piagent-core/extensions/acceptance-test-binding-evidence.js +60 -0
- package/packages/piagent-core/extensions/context-efficiency-metrics.js +302 -0
- package/packages/piagent-core/extensions/context-efficiency-report.js +167 -0
- package/packages/piagent-core/extensions/context-engine.js +148 -145
- package/packages/piagent-core/extensions/context-evidence.js +48 -0
- package/packages/piagent-core/extensions/context-import-links.js +296 -0
- package/packages/piagent-core/extensions/context-telemetry-integrity.js +65 -0
- package/packages/piagent-core/extensions/criterion-context-pack.js +422 -7
- package/packages/piagent-core/extensions/criterion-graph.js +78 -8
- package/packages/piagent-core/extensions/guard-types.ts +2 -0
- package/packages/piagent-core/extensions/javascript-regex-evidence.js +32 -0
- package/packages/piagent-core/extensions/piagent-guard.ts +233 -41
- package/packages/piagent-core/extensions/task-contract-view.js +17 -3
- package/packages/piagent-core/extensions/task-lifecycle.js +7 -2
- package/packages/piagent-core/extensions/task-state.js +40 -134
- package/packages/piagent-core/extensions/verification-intelligence.js +3 -1
- package/packages/piagent-core/extensions/workspace-evidence-roots.js +157 -0
- package/packages/piagent-core/package.json +1 -1
- package/packages/piagent-core/policies/base-policy.json +2 -0
- package/packages/piagent-core/runtime/context/context-delivery.ts +103 -0
- package/packages/piagent-core/runtime/context/context-delta-shadow.ts +53 -0
- package/packages/piagent-core/runtime/context/context-efficiency-format.ts +47 -0
- package/packages/piagent-core/runtime/context/context-evidence-qualification.ts +32 -0
- package/packages/piagent-core/runtime/context/prefix-telemetry.ts +47 -0
- package/packages/piagent-core/runtime/context/repository-memory-hints.ts +27 -0
- package/packages/piagent-core/runtime/hooks/agent-prompt-telemetry.ts +56 -0
- package/packages/piagent-core/runtime/hooks/agent-start-hook.ts +162 -102
- package/packages/piagent-core/runtime/hooks/completion-hook.ts +5 -6
- package/packages/piagent-core/runtime/hooks/input-hook.ts +11 -1
- package/packages/piagent-core/runtime/hooks/session-hooks.ts +22 -2
- package/packages/piagent-core/runtime/hooks/session-start-hook.ts +7 -2
- package/packages/piagent-core/runtime/hooks/tool-result-content-guards.ts +95 -0
- package/packages/piagent-core/runtime/hooks/tool-result-hook.ts +84 -102
- package/packages/piagent-core/runtime/inspection/activity-event-adapter.ts +4 -2
- package/packages/piagent-core/runtime/inspection/activity-recovery.ts +104 -0
- package/packages/piagent-core/runtime/inspection/task-compaction-history.ts +1 -1
- package/packages/piagent-core/runtime/inspection/task-handoff-history.ts +1 -1
- package/packages/piagent-core/runtime/inspection/tool-failure-classification.ts +53 -0
- package/packages/piagent-core/runtime/inspection/webui-snapshot.ts +34 -6
- package/packages/piagent-core/runtime/model/authenticated-catalog.ts +17 -9
- package/packages/piagent-core/runtime/model/openai-codex-reasoning.ts +83 -0
- package/packages/piagent-core/runtime/model/provider-wire-fingerprint.ts +238 -0
- package/packages/piagent-core/runtime/orchestration/role-policy.ts +1 -1
- package/packages/piagent-core/runtime/product/activity-inspector.ts +7 -2
- package/packages/piagent-core/runtime/product/efficiency-metrics.ts +4 -2
- package/packages/piagent-core/runtime/quality/exact-output-contract.ts +2 -1
- package/packages/piagent-core/runtime/quality/performance-assurance-signals.ts +23 -0
- package/packages/piagent-core/runtime/quality/performance-assurance.ts +6 -2
- package/packages/piagent-core/runtime/recovery/edit-recovery-context.ts +113 -0
- package/packages/piagent-core/runtime/recovery/edit-recovery-delivery.ts +42 -0
- package/packages/piagent-core/runtime/recovery/semantic-repair-handshake.ts +55 -2
- package/packages/piagent-core/runtime/recovery/semantic-repair-runtime.ts +55 -2
- package/packages/piagent-core/runtime/registration/context-commands.ts +66 -5
- package/packages/piagent-core/runtime/registration/policy-tools.ts +46 -11
- package/packages/piagent-core/runtime/registration/task-completion-tools.ts +49 -16
- package/packages/piagent-core/runtime/registration/task-start-guidance.ts +163 -0
- package/packages/piagent-core/runtime/registration/task-start-retry-helpers.ts +37 -0
- package/packages/piagent-core/runtime/registration/task-start-tool.ts +67 -62
- package/packages/piagent-core/runtime/session/runtime-state.ts +154 -2
- package/packages/piagent-core/runtime/session/system-prompt.ts +4 -4
- package/packages/piagent-core/runtime/tools/apply-patch-tool.ts +500 -0
- package/packages/piagent-core/runtime/trajectory/trajectory-runtime.ts +2 -1
- package/packages/piagent-core/runtime/workflows/task-intake.ts +43 -2
- package/packages/piagent-core/security/sensitive-data.js +13 -218
- package/packages/piagent-core/security/sensitive-project-file.js +42 -0
- package/packages/piagent-core/security/sensitive-source-expression.js +330 -0
- package/packages/piagent-core/security/sensitive-source-formats.js +394 -0
- package/packages/piagent-core/security/sensitive-text.js +234 -0
- package/packages/piagent-core/subagents/piagent-worker.md +1 -1
- package/packages/piagent-webui/dist/client/assets/{MarkdownMessage-rD9WJKxs.js → MarkdownMessage-CxeZqTte.js} +1 -1
- package/packages/piagent-webui/dist/client/assets/index-DynIMe8I.js +176 -0
- package/packages/piagent-webui/dist/client/index.html +1 -1
- package/packages/piagent-webui/gateway/gateway-events.ts +109 -5
- package/packages/piagent-webui/gateway/gateway-service.ts +3 -0
- package/packages/piagent-webui/gateway/gateway-session-stream.ts +93 -7
- package/packages/piagent-webui/gateway/session-command-controller.ts +18 -3
- package/packages/piagent-webui/gateway/session-effective-options.ts +47 -0
- package/packages/piagent-webui/gateway/session-live-state.ts +21 -0
- package/packages/piagent-webui/gateway/session-operation-start.ts +5 -1
- package/packages/piagent-webui/gateway/session-operation-watchdog.ts +158 -0
- package/packages/piagent-webui/gateway/session-runtime-factory.ts +45 -0
- package/packages/piagent-webui/gateway/session-runtime-supervisor.ts +139 -124
- package/packages/piagent-webui/server/loopback-server.ts +8 -0
- package/packages/piagent-webui/server/transcript-projection.ts +22 -4
- package/packages/piagent-webui/shared/text-visibility.ts +10 -0
- package/schemas/piagent-webui/catalog-v1.json +9 -0
- package/schemas/piagent-webui/gateway-protocol-v1.schema.json +53 -3
- package/schemas/piagent-webui/session-live-state-v1.schema.json +76 -0
- package/schemas/task-contract.schema.json +12 -1
- package/scripts/benchmark-runner-core.mjs +355 -359
- package/scripts/benchmark-runner-finalization.mjs +309 -0
- package/scripts/benchmark-runner-host-readiness.mjs +94 -0
- package/scripts/benchmark-runner-support.mjs +200 -0
- package/scripts/benchmark-session.mjs +95 -41
- package/scripts/configure-model-scope.sh +4 -3
- package/scripts/helper-evaluation.mjs +1 -1
- package/scripts/install-global.sh +2 -2
- package/scripts/pi-usage-history.mjs +37 -10
- package/scripts/setup.sh +2 -2
- package/scripts/verify-local.sh +5 -1
- package/templates/global/settings.json +2 -1
- package/packages/piagent-webui/dist/client/assets/index-BZRFw1u6.js +0 -174
package/docs-site/team.html
CHANGED
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
<span>Pi Agent Platform</span>
|
|
31
31
|
</a>
|
|
32
32
|
<div class="top-actions">
|
|
33
|
-
<span class="pill"><span class="pill-dot"></span>v1.
|
|
33
|
+
<span class="pill"><span class="pill-dot"></span>v1.6.0 docs · VI</span>
|
|
34
34
|
<nav class="language-switch" aria-label="Ngôn ngữ">
|
|
35
35
|
<a class="language-option current" href="/team" hreflang="vi" lang="vi" aria-current="true">VI</a>
|
|
36
36
|
<a class="language-option" href="/en/team" hreflang="en" lang="en">EN</a>
|
package/docs-site/whats-new.html
CHANGED
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
<span>Pi Agent Platform</span>
|
|
31
31
|
</a>
|
|
32
32
|
<div class="top-actions">
|
|
33
|
-
<span class="pill"><span class="pill-dot"></span>v1.
|
|
33
|
+
<span class="pill"><span class="pill-dot"></span>v1.6.0 docs · VI</span>
|
|
34
34
|
<nav class="language-switch" aria-label="Ngôn ngữ">
|
|
35
35
|
<a class="language-option current" href="/whats-new" hreflang="vi" lang="vi" aria-current="true">VI</a>
|
|
36
36
|
<a class="language-option" href="/en/whats-new" hreflang="en" lang="en">EN</a>
|
package/docs-site/workflows.html
CHANGED
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
<span>Pi Agent Platform</span>
|
|
31
31
|
</a>
|
|
32
32
|
<div class="top-actions">
|
|
33
|
-
<span class="pill"><span class="pill-dot"></span>v1.
|
|
33
|
+
<span class="pill"><span class="pill-dot"></span>v1.6.0 docs · VI</span>
|
|
34
34
|
<nav class="language-switch" aria-label="Ngôn ngữ">
|
|
35
35
|
<a class="language-option current" href="/workflows" hreflang="vi" lang="vi" aria-current="true">VI</a>
|
|
36
36
|
<a class="language-option" href="/en/workflows" hreflang="en" lang="en">EN</a>
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
"disjointness": {
|
|
31
31
|
"taxonomyDigest": "d42458d04861a60488a5f98532936db71d43dcccc0298d75b09c2255f2922cb1",
|
|
32
|
-
"publicExposureDigest": "
|
|
32
|
+
"publicExposureDigest": "629c1e9f835464b5e3db1c6daac67d8f2661c691ac10201b904e4ed8b377dbef",
|
|
33
33
|
"reportDigest": "5555555555555555555555555555555555555555555555555555555555555555",
|
|
34
34
|
"familyDisjoint": true,
|
|
35
35
|
"repositoryDisjoint": false,
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
"disjointness": {
|
|
31
31
|
"taxonomyDigest": "d42458d04861a60488a5f98532936db71d43dcccc0298d75b09c2255f2922cb1",
|
|
32
|
-
"publicExposureDigest": "
|
|
32
|
+
"publicExposureDigest": "629c1e9f835464b5e3db1c6daac67d8f2661c691ac10201b904e4ed8b377dbef",
|
|
33
33
|
"reportDigest": "5555555555555555555555555555555555555555555555555555555555555555",
|
|
34
34
|
"familyDisjoint": true,
|
|
35
35
|
"repositoryDisjoint": true,
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"version": "piagent-session-live-state-v1",
|
|
4
|
+
"generatedAt": "2026-08-21T08:00:00.000Z",
|
|
5
|
+
"gatewayInstanceRef": "gateway_fixture_01",
|
|
6
|
+
"eventSequence": 42,
|
|
7
|
+
"state": "ready",
|
|
8
|
+
"operations": [
|
|
9
|
+
{
|
|
10
|
+
"sessionRef": "session_fixture_01",
|
|
11
|
+
"operationRef": "operation_fixture_01",
|
|
12
|
+
"state": "settling",
|
|
13
|
+
"abortable": true
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
"settlements": [],
|
|
17
|
+
"reasonCode": null
|
|
18
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"version": "piagent-session-live-state-v1",
|
|
4
|
+
"generatedAt": "2026-08-21T08:00:00.000Z",
|
|
5
|
+
"gatewayInstanceRef": "gateway_fixture_01",
|
|
6
|
+
"eventSequence": 42,
|
|
7
|
+
"state": "ready",
|
|
8
|
+
"operations": [
|
|
9
|
+
{
|
|
10
|
+
"sessionRef": "session_fixture_01",
|
|
11
|
+
"operationRef": "operation_fixture_01",
|
|
12
|
+
"state": "running",
|
|
13
|
+
"abortable": true
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
"settlements": [
|
|
17
|
+
{
|
|
18
|
+
"sessionRef": "session_fixture_02",
|
|
19
|
+
"operationRef": "operation_fixture_02",
|
|
20
|
+
"settlement": "error",
|
|
21
|
+
"reasonCode": "assistant-response-failed",
|
|
22
|
+
"settledAt": "2026-08-21T07:59:59.000Z",
|
|
23
|
+
"sequence": 41
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"reasonCode": null
|
|
27
|
+
}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"purpose": "Independently classify deterministic E0, public-regression E1, calibrated-capability E2, private-holdout-readiness E3, and provider-free long-horizon evidence without widening any claim.",
|
|
6
6
|
"artifacts": [
|
|
7
7
|
{ "id": "e0-core-suite", "path": "benchmarks/core-v1/suite.json", "sha256": "ec19b26f80850143a5196380b3fd1b858f42e7c200c4000d5f684b891959f84b" },
|
|
8
|
-
{ "id": "e1-public-suite", "path": "benchmarks/production-v1/suite.json", "sha256": "
|
|
8
|
+
{ "id": "e1-public-suite", "path": "benchmarks/production-v1/suite.json", "sha256": "194a5d36c70ca46c318bc12eb1858b9a345638e8e3613a63693980e228b3c4d1" },
|
|
9
9
|
{ "id": "e2-suite", "path": "benchmarks/e2-framework-v1/suite.json", "sha256": "97d28eb96341f03e3f2537d648265e6ec80537a98941e9f5d349dea7b90f26f1" },
|
|
10
10
|
{ "id": "e2-reference", "path": "benchmarks/e2-framework-v1/reports/reference-report.v1.json", "sha256": "37df0eda9a93320772751dc4bcd0b522b2f5b4743ffed76334b68b768e4f7c8b" },
|
|
11
11
|
{ "id": "e2-mutation", "path": "benchmarks/e2-framework-v1/reports/mutation-report.v1.json", "sha256": "859c8863f6c8c671d8b71e7f379f53097c8e967046825a0e55e36930b0eb4135" },
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
{ "id": "e3-runbook", "path": "evals/private-holdout-v1/CUSTODIAN_RUNBOOK.md", "sha256": "b59503971549d44f4366766db780c0d89bc0b90c5ccb01d2269c5440446954b8" },
|
|
18
18
|
{ "id": "e3-access-policy", "path": "evals/private-holdout-v1/access-policy.v1.json", "sha256": "3189aa3d811083954aaab5470a07c23963d05d4bacccc547a29844e2a8a76525" },
|
|
19
19
|
{ "id": "e3-human-rubric", "path": "evals/private-holdout-v1/human-rubric.v1.json", "sha256": "e291e5097ef1415cc037198e00d690d0abd7a8a9f8b98be773a25d313ac1b629" },
|
|
20
|
-
{ "id": "e3-public-exposure", "path": "evals/private-holdout-v1/public-exposure.v1.json", "sha256": "
|
|
20
|
+
{ "id": "e3-public-exposure", "path": "evals/private-holdout-v1/public-exposure.v1.json", "sha256": "629c1e9f835464b5e3db1c6daac67d8f2661c691ac10201b904e4ed8b377dbef" },
|
|
21
21
|
{ "id": "taxonomy", "path": "evals/real-task-taxonomy.v1.json", "sha256": "d42458d04861a60488a5f98532936db71d43dcccc0298d75b09c2255f2922cb1" }
|
|
22
22
|
],
|
|
23
23
|
"deterministicTests": {
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
"path": "tests/phase-tools-evaluation.test.mjs",
|
|
36
|
-
"sha256": "
|
|
36
|
+
"sha256": "6a3686db841273e6003279c026a2c7a9907601d457bb42d1f5621577c8f70357"
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
39
|
"path": "evals/fs5-pilot-protocol.v1.json",
|
|
40
|
-
"sha256": "
|
|
40
|
+
"sha256": "b84377c7d35c8fc70a6bd2142182810518c010f39ca0ee4f8488d9fddbab37fa"
|
|
41
41
|
}
|
|
42
42
|
],
|
|
43
43
|
"localReproducer": {
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
{
|
|
29
29
|
"id": "pilot-suite",
|
|
30
30
|
"path": "benchmarks/production-v1/suite.json",
|
|
31
|
-
"sha256": "
|
|
31
|
+
"sha256": "194a5d36c70ca46c318bc12eb1858b9a345638e8e3613a63693980e228b3c4d1"
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
"id": "task-contract-schema",
|
|
35
35
|
"path": "schemas/task-contract.schema.json",
|
|
36
|
-
"sha256": "
|
|
36
|
+
"sha256": "7b3cf9d0284e15db3636049f4ab298d0adedcc6c614030517e4b119c9f3bf6e6"
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
39
|
"id": "assurance-schema",
|
|
@@ -17,14 +17,15 @@
|
|
|
17
17
|
"artifactBindings": [
|
|
18
18
|
{ "id": "authority-manifest", "path": "packages/piagent-core/policy/authority-manifest.v1.json", "sha256": "911dc026f1a860f593a6850f7348311f6adac83a8f11627abb23654960b605d0" },
|
|
19
19
|
{ "id": "canary-suite", "path": "benchmarks/capability-v1/suite.json", "sha256": "29bb79e96b047d79056626d747baa0b3a6ca9d4da7ad80b9668c0085e5581706" },
|
|
20
|
-
{ "id": "pilot-suite", "path": "benchmarks/production-v1/suite.json", "sha256": "
|
|
21
|
-
{ "id": "task-contract-schema", "path": "schemas/task-contract.schema.json", "sha256": "
|
|
20
|
+
{ "id": "pilot-suite", "path": "benchmarks/production-v1/suite.json", "sha256": "194a5d36c70ca46c318bc12eb1858b9a345638e8e3613a63693980e228b3c4d1" },
|
|
21
|
+
{ "id": "task-contract-schema", "path": "schemas/task-contract.schema.json", "sha256": "7b3cf9d0284e15db3636049f4ab298d0adedcc6c614030517e4b119c9f3bf6e6" },
|
|
22
22
|
{ "id": "assurance-schema", "path": "schemas/benchmark-assurance-evidence.schema.json", "sha256": "5d937632d2cfff34dbbb781dd367bb78feb64c36d571c36ca15f2cc40c576af8" },
|
|
23
|
-
{ "id": "failure-and-operational-classifier", "path": "packages/piagent-core/benchmark/benchmark-forensics.js", "sha256": "
|
|
23
|
+
{ "id": "failure-and-operational-classifier", "path": "packages/piagent-core/benchmark/benchmark-forensics.js", "sha256": "6afec2ca572b15771f0c110f9f352e4bba364a460b61ed9fe8df03bbc52f470a" },
|
|
24
24
|
{ "id": "phase-attribution", "path": "packages/piagent-core/benchmark/benchmark-phase-attribution.js", "sha256": "9c07bda5bfe7bb7b0959844ccea6790735cc9f154d8d5972e18785148cea6d9a" },
|
|
25
|
-
{ "id": "record-validator", "path": "packages/piagent-core/benchmark/benchmark-record-validation.js", "sha256": "
|
|
25
|
+
{ "id": "record-validator", "path": "packages/piagent-core/benchmark/benchmark-record-validation.js", "sha256": "262a1b934c30032663ecfc570e039c3bfdc1511e2b47115e7ccfd08bf1cfcd72" },
|
|
26
|
+
{ "id": "timing-diagnostics", "path": "packages/piagent-core/benchmark/benchmark-timing-diagnostics.js", "sha256": "5f52293f4c5c6d8444a35f94c6ccfd9e9183db8c8fa0e755c3da5b0cb847c2aa" },
|
|
26
27
|
{ "id": "protocol-enforcement", "path": "packages/piagent-core/benchmark/fs5-pilot-protocol.js", "sha256": "2bcc0cf6c18eee0c080c30e727610b0f10a278f5862855d920ba5797f07a2f2d" },
|
|
27
|
-
{ "id": "runner-core", "path": "scripts/benchmark-runner-core.mjs", "sha256": "
|
|
28
|
+
{ "id": "runner-core", "path": "scripts/benchmark-runner-core.mjs", "sha256": "ba9abb58f9d3962cd79d1cae7cbb4fb07df642da254bf9bf1976b5f2bcab7df6" }
|
|
28
29
|
],
|
|
29
30
|
"runIdentityContract": {
|
|
30
31
|
"required": [
|
|
@@ -17,15 +17,16 @@
|
|
|
17
17
|
"artifactBindings": [
|
|
18
18
|
{ "id": "authority-manifest", "path": "packages/piagent-core/policy/authority-manifest.v1.json", "sha256": "911dc026f1a860f593a6850f7348311f6adac83a8f11627abb23654960b605d0" },
|
|
19
19
|
{ "id": "canary-suite", "path": "benchmarks/capability-v1/suite.json", "sha256": "29bb79e96b047d79056626d747baa0b3a6ca9d4da7ad80b9668c0085e5581706" },
|
|
20
|
-
{ "id": "pilot-suite", "path": "benchmarks/production-v1/suite.json", "sha256": "
|
|
21
|
-
{ "id": "task-contract-schema", "path": "schemas/task-contract.schema.json", "sha256": "
|
|
20
|
+
{ "id": "pilot-suite", "path": "benchmarks/production-v1/suite.json", "sha256": "194a5d36c70ca46c318bc12eb1858b9a345638e8e3613a63693980e228b3c4d1" },
|
|
21
|
+
{ "id": "task-contract-schema", "path": "schemas/task-contract.schema.json", "sha256": "7b3cf9d0284e15db3636049f4ab298d0adedcc6c614030517e4b119c9f3bf6e6" },
|
|
22
22
|
{ "id": "assurance-schema", "path": "schemas/benchmark-assurance-evidence.schema.json", "sha256": "5d937632d2cfff34dbbb781dd367bb78feb64c36d571c36ca15f2cc40c576af8" },
|
|
23
|
-
{ "id": "failure-and-operational-classifier", "path": "packages/piagent-core/benchmark/benchmark-forensics.js", "sha256": "
|
|
24
|
-
{ "id": "session-orchestration", "path": "scripts/benchmark-session.mjs", "sha256": "
|
|
23
|
+
{ "id": "failure-and-operational-classifier", "path": "packages/piagent-core/benchmark/benchmark-forensics.js", "sha256": "6afec2ca572b15771f0c110f9f352e4bba364a460b61ed9fe8df03bbc52f470a" },
|
|
24
|
+
{ "id": "session-orchestration", "path": "scripts/benchmark-session.mjs", "sha256": "085ef089b37b98361e6e43f16d42413848130ead93756cf6b9a3057a0ad29cb7" },
|
|
25
25
|
{ "id": "phase-attribution", "path": "packages/piagent-core/benchmark/benchmark-phase-attribution.js", "sha256": "9c07bda5bfe7bb7b0959844ccea6790735cc9f154d8d5972e18785148cea6d9a" },
|
|
26
|
-
{ "id": "record-validator", "path": "packages/piagent-core/benchmark/benchmark-record-validation.js", "sha256": "
|
|
26
|
+
{ "id": "record-validator", "path": "packages/piagent-core/benchmark/benchmark-record-validation.js", "sha256": "262a1b934c30032663ecfc570e039c3bfdc1511e2b47115e7ccfd08bf1cfcd72" },
|
|
27
|
+
{ "id": "timing-diagnostics", "path": "packages/piagent-core/benchmark/benchmark-timing-diagnostics.js", "sha256": "5f52293f4c5c6d8444a35f94c6ccfd9e9183db8c8fa0e755c3da5b0cb847c2aa" },
|
|
27
28
|
{ "id": "protocol-enforcement", "path": "packages/piagent-core/benchmark/fs5-pilot-protocol.js", "sha256": "2bcc0cf6c18eee0c080c30e727610b0f10a278f5862855d920ba5797f07a2f2d" },
|
|
28
|
-
{ "id": "runner-core", "path": "scripts/benchmark-runner-core.mjs", "sha256": "
|
|
29
|
+
{ "id": "runner-core", "path": "scripts/benchmark-runner-core.mjs", "sha256": "ba9abb58f9d3962cd79d1cae7cbb4fb07df642da254bf9bf1976b5f2bcab7df6" }
|
|
29
30
|
],
|
|
30
31
|
"runIdentityContract": {
|
|
31
32
|
"required": [
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
20
|
"id": "production-v1",
|
|
21
|
-
"manifestSha256": "
|
|
21
|
+
"manifestSha256": "194a5d36c70ca46c318bc12eb1858b9a345638e8e3613a63693980e228b3c4d1",
|
|
22
22
|
"scenarioIds": ["tenant-role-authorization", "invoice-rounding", "tenant-cache-isolation", "stale-search-response", "unicode-search", "pagination-boundary", "quoted-csv", "stable-dedup", "schema-migration", "config-precedence", "cli-double-dash", "workspace-order", "bounded-retry", "expiry-boundary", "incident-diagnosis", "protected-env-refusal", "repository-prompt-injection", "destructive-history-refusal"]
|
|
23
23
|
},
|
|
24
24
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@piagent/platform",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -59,6 +59,7 @@
|
|
|
59
59
|
"packages/piagent-webui/extension/",
|
|
60
60
|
"packages/piagent-webui/gateway/",
|
|
61
61
|
"packages/piagent-webui/ownership/",
|
|
62
|
+
"packages/piagent-webui/shared/",
|
|
62
63
|
"packages/piagent-webui/dist/client/",
|
|
63
64
|
"schemas/",
|
|
64
65
|
"scripts/",
|
|
@@ -109,6 +110,7 @@
|
|
|
109
110
|
"piagent": {
|
|
110
111
|
"runtimeIntegrityEntrypoints": [
|
|
111
112
|
"packages/piagent-webui/server/sidecar-main.ts",
|
|
113
|
+
"scripts/benchmark-runner-core.mjs",
|
|
112
114
|
"scripts/register-typescript-loader.mjs",
|
|
113
115
|
"scripts/typescript-loader.mjs"
|
|
114
116
|
]
|
|
@@ -181,12 +181,15 @@ export function benchmarkClaimEligibility({ suite, environment = {}, baselineSur
|
|
|
181
181
|
if (baselineSurface === "codex-cli") limitations.push("codex-comparison-is-external-and-non-causal");
|
|
182
182
|
if ((suite.defaultRepeats ?? 0) <= 3) limitations.push("three-repeats-do-not-support-an-always-claim");
|
|
183
183
|
if (assurance.generatedVariants === true && assurance.familyDisjointSplit !== true) limitations.push("generated-value-variants-are-not-independent-task-families");
|
|
184
|
+
const tokenClaimScope = suite.releaseGate?.primaryEfficiencyEstimand === "fixed-workload-family-ratio"
|
|
185
|
+
? "bounded-to-predeclared-fixed-workload-families"
|
|
186
|
+
: "bounded-to-observed-comparable-pairs-and-failure-aware-effort";
|
|
184
187
|
return {
|
|
185
188
|
declaredTier, achievedTier, comparisonPurpose,
|
|
186
189
|
causalAttributionAllowed: comparisonPurpose === "causal-harness-ablation" && protocolPassed,
|
|
187
190
|
generalizationClaimAllowed: privateHoldoutEligible,
|
|
188
191
|
productionStabilityClaimAllowed: productionShadowEligible,
|
|
189
|
-
tokenClaimScope: tokenClaimAllowed ?
|
|
192
|
+
tokenClaimScope: tokenClaimAllowed ? tokenClaimScope : "unavailable",
|
|
190
193
|
privateHoldoutChecks: privateChecks,
|
|
191
194
|
limitations
|
|
192
195
|
};
|
|
@@ -13,9 +13,14 @@ import {
|
|
|
13
13
|
recoverBenchmarkPiCredentialWriteback
|
|
14
14
|
} from "./benchmark-pi-home.js";
|
|
15
15
|
import { benchmarkTreeIdentity } from "./benchmark-tree-identity.js";
|
|
16
|
+
import { inspectBenchmarkLedger } from "./benchmark-ledger.js";
|
|
17
|
+
import { completedBenchmarkRecord } from "./benchmark-record-validation.js";
|
|
16
18
|
import { benchmarkGitEnvironment, benchmarkHostEnvironment } from "./benchmark-runtime.js";
|
|
19
|
+
import {
|
|
20
|
+
canonicalBuiltInBenchmarkSuiteId,
|
|
21
|
+
isReservedBenchmarkSuiteId
|
|
22
|
+
} from "./benchmark-suite-identity.js";
|
|
17
23
|
|
|
18
|
-
const builtInSuites = new Set(["core-v1", "capability-v1", "e2-framework-v1", "deep-logic-v1", "production-v1"]);
|
|
19
24
|
const metadataVariable = "PIAGENT_BENCHMARK_BOOTSTRAP_METADATA";
|
|
20
25
|
|
|
21
26
|
function fail(message) {
|
|
@@ -37,6 +42,67 @@ function runRootFromResume(input, cwd) {
|
|
|
37
42
|
return stat.isDirectory() ? target : path.dirname(target);
|
|
38
43
|
}
|
|
39
44
|
|
|
45
|
+
function sameLedgerBinding(left, right) {
|
|
46
|
+
return ["schemaVersion", "algorithm", "digest", "records", "bytes"]
|
|
47
|
+
.every((field) => left?.[field] === right?.[field]);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function recordMatchesManifestOrder(record, index, manifest) {
|
|
51
|
+
const expected = manifest.order[index];
|
|
52
|
+
return completedBenchmarkRecord(record)
|
|
53
|
+
&& record.runId === manifest.runId
|
|
54
|
+
&& record.configurationDigest === manifest.configurationDigest
|
|
55
|
+
&& record.orderIndex === index + 1
|
|
56
|
+
&& record.scenarioId === expected?.scenarioId
|
|
57
|
+
&& record.surface === expected?.surface
|
|
58
|
+
&& record.repeat === expected?.repeat;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function ledgerMatchesManifestPrefix(records, manifest) {
|
|
62
|
+
const sessions = new Set();
|
|
63
|
+
const keys = new Set();
|
|
64
|
+
for (const [index, record] of records.entries()) {
|
|
65
|
+
const key = `${record?.scenarioId}\0${record?.surface}\0${record?.repeat}`;
|
|
66
|
+
if (!recordMatchesManifestOrder(record, index, manifest) || sessions.has(record.sessionId) || keys.has(key)) return false;
|
|
67
|
+
sessions.add(record.sessionId);
|
|
68
|
+
keys.add(key);
|
|
69
|
+
}
|
|
70
|
+
return true;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function productionResumeHasCompleteLedger(argv, cwd) {
|
|
74
|
+
const resume = optionValue(argv, "--resume");
|
|
75
|
+
if (!resume) return false;
|
|
76
|
+
const runRoot = runRootFromResume(resume, cwd);
|
|
77
|
+
const manifestPath = path.join(runRoot, "run-manifest.json");
|
|
78
|
+
if (!fs.existsSync(manifestPath)) return false;
|
|
79
|
+
const manifest = jsonFile(manifestPath, "benchmark resume manifest");
|
|
80
|
+
if (manifest?.stageControl?.policy !== "production-v1-provider-spend-v1"
|
|
81
|
+
|| !Array.isArray(manifest.order) || manifest.order.length === 0) return false;
|
|
82
|
+
const ledgerPath = path.join(runRoot, "runs.jsonl");
|
|
83
|
+
const ledger = inspectBenchmarkLedger(ledgerPath);
|
|
84
|
+
if (!ledgerMatchesManifestPrefix(ledger.records, manifest)) return false;
|
|
85
|
+
if (ledger.records.length === manifest.order.length) return true;
|
|
86
|
+
if (ledger.records.length !== manifest.order.length - 1) return false;
|
|
87
|
+
|
|
88
|
+
const pendingPath = path.join(runRoot, "pending-record.json");
|
|
89
|
+
if (!fs.existsSync(pendingPath)) return false;
|
|
90
|
+
const pending = jsonFile(pendingPath, "benchmark pending record");
|
|
91
|
+
const finalIndex = manifest.order.length - 1;
|
|
92
|
+
if (pending?.schemaVersion !== 2
|
|
93
|
+
|| pending.postSessionGuard?.matched !== true
|
|
94
|
+
|| !String(pending.postSessionGuard.stage ?? "").startsWith("after-session:")
|
|
95
|
+
|| !sameLedgerBinding(pending.previousLedger, ledger.binding)
|
|
96
|
+
|| !recordMatchesManifestOrder(pending.record, finalIndex, manifest)) return false;
|
|
97
|
+
|
|
98
|
+
const measuredPath = path.join(runRoot, "measured-record-ready.json");
|
|
99
|
+
if (!fs.existsSync(measuredPath)) return true;
|
|
100
|
+
const measured = jsonFile(measuredPath, "measured benchmark record");
|
|
101
|
+
return measured?.schemaVersion === 1
|
|
102
|
+
&& sameLedgerBinding(measured.previousLedger, ledger.binding)
|
|
103
|
+
&& JSON.stringify(measured.record) === JSON.stringify(pending.record);
|
|
104
|
+
}
|
|
105
|
+
|
|
40
106
|
function jsonFile(file, label) {
|
|
41
107
|
try { return JSON.parse(fs.readFileSync(file, "utf8")); }
|
|
42
108
|
catch (error) { fail(`Cannot read ${label} ${file}: ${error.message}`); }
|
|
@@ -98,15 +164,22 @@ function snapshotReplay(argv, cwd, temporaryRoot) {
|
|
|
98
164
|
};
|
|
99
165
|
}
|
|
100
166
|
|
|
101
|
-
function resolveSuiteManifest(source, cwd) {
|
|
102
|
-
if (
|
|
167
|
+
function resolveSuiteManifest(source, cwd, liveRoot) {
|
|
168
|
+
if (isReservedBenchmarkSuiteId(source)) return { origin: source, manifest: null, builtInId: source };
|
|
103
169
|
const target = path.resolve(cwd, source);
|
|
104
170
|
let stat;
|
|
105
171
|
try { stat = fs.statSync(target); }
|
|
106
172
|
catch (error) { fail(`Cannot snapshot benchmark suite ${target}: ${error.message}`); }
|
|
107
173
|
const manifest = stat.isDirectory() ? path.join(target, "suite.json") : target;
|
|
108
174
|
if (!fs.statSync(manifest).isFile()) fail(`Benchmark suite manifest is not a file: ${manifest}`);
|
|
109
|
-
|
|
175
|
+
const resolvedManifest = fs.realpathSync(manifest);
|
|
176
|
+
const builtInId = canonicalBuiltInBenchmarkSuiteId(liveRoot, resolvedManifest);
|
|
177
|
+
if (builtInId) return { origin: builtInId, manifest: null, builtInId };
|
|
178
|
+
const suite = jsonFile(resolvedManifest, "benchmark suite manifest");
|
|
179
|
+
if (isReservedBenchmarkSuiteId(suite?.id)) {
|
|
180
|
+
fail(`Benchmark suite id ${suite.id} is reserved for its canonical built-in suite`);
|
|
181
|
+
}
|
|
182
|
+
return { origin: resolvedManifest, manifest: resolvedManifest, builtInId: null };
|
|
110
183
|
}
|
|
111
184
|
|
|
112
185
|
function inside(root, target) {
|
|
@@ -273,12 +346,12 @@ function requestedPiProvider(model, configRoot, credentials) {
|
|
|
273
346
|
return credentials.length === 1 ? credentials[0].providerId : null;
|
|
274
347
|
}
|
|
275
348
|
|
|
276
|
-
function snapshotPiAgentHome(temporaryRoot, runtimeParent, argv, cwd, replay) {
|
|
349
|
+
function snapshotPiAgentHome(temporaryRoot, runtimeParent, argv, cwd, replay, { providerFreeFinalization = false } = {}) {
|
|
277
350
|
const sourceRoot = path.resolve(process.env.PI_CODING_AGENT_DIR || path.join(os.homedir(), ".pi", "agent"));
|
|
278
351
|
const configRoot = path.join(temporaryRoot, "pi-agent-config");
|
|
279
352
|
fs.mkdirSync(configRoot, { recursive: true, mode: 0o700 });
|
|
280
353
|
const copied = [];
|
|
281
|
-
for (const name of ["auth.json", "models.json"]) {
|
|
354
|
+
for (const name of providerFreeFinalization ? [] : ["auth.json", "models.json"]) {
|
|
282
355
|
const source = path.join(sourceRoot, name);
|
|
283
356
|
const configTarget = path.join(configRoot, name);
|
|
284
357
|
try { copyBenchmarkPiConfigFile(source, configTarget, 0o400); }
|
|
@@ -395,10 +468,13 @@ export function createBenchmarkExecutionSnapshot({ liveRoot, argv, cwd }) {
|
|
|
395
468
|
}
|
|
396
469
|
const candidateIndex = writeBoundJson(path.join(temporaryRoot, "candidate-index.json"), candidate.index);
|
|
397
470
|
const replay = snapshotReplay(argv, cwd, temporaryRoot);
|
|
398
|
-
const
|
|
399
|
-
const codexCredential = requestsCodexSurface(argv, cwd, replay) ? snapshotCodexCredential(temporaryRoot) : null;
|
|
400
|
-
const suite = resolveSuiteManifest(requestedSuite(argv, cwd, replay), cwd);
|
|
471
|
+
const suite = resolveSuiteManifest(requestedSuite(argv, cwd, replay), cwd, root);
|
|
401
472
|
validateOutputIsolation(argv, cwd, root, suite.manifest);
|
|
473
|
+
const providerFreeFinalization = productionResumeHasCompleteLedger(argv, cwd);
|
|
474
|
+
const piAgentHome = snapshotPiAgentHome(temporaryRoot, runtimeParent, argv, cwd, replay, { providerFreeFinalization });
|
|
475
|
+
const codexCredential = !providerFreeFinalization && requestsCodexSurface(argv, cwd, replay)
|
|
476
|
+
? snapshotCodexCredential(temporaryRoot)
|
|
477
|
+
: null;
|
|
402
478
|
let suiteSnapshot = null;
|
|
403
479
|
let suiteRoot;
|
|
404
480
|
if (suite.manifest) {
|
|
@@ -421,6 +497,7 @@ export function createBenchmarkExecutionSnapshot({ liveRoot, argv, cwd }) {
|
|
|
421
497
|
candidateProvenance: candidate.provenance,
|
|
422
498
|
candidateIndex,
|
|
423
499
|
runtimeDependencies: runtimeDependencies(candidateRoot, root),
|
|
500
|
+
providerFreeFinalization,
|
|
424
501
|
piAgentHome,
|
|
425
502
|
codexCredential,
|
|
426
503
|
replay: replay ? {
|
|
@@ -432,6 +509,7 @@ export function createBenchmarkExecutionSnapshot({ liveRoot, argv, cwd }) {
|
|
|
432
509
|
suite: {
|
|
433
510
|
origin: suite.origin,
|
|
434
511
|
snapshot: suiteSnapshot,
|
|
512
|
+
builtInId: suite.builtInId,
|
|
435
513
|
identity: benchmarkTreeIdentity(suiteRoot, { rejectSymlinks: true })
|
|
436
514
|
}
|
|
437
515
|
};
|
|
@@ -485,6 +563,7 @@ export function benchmarkBootstrapMetadata(env = process.env) {
|
|
|
485
563
|
|| typeof value.candidateIndex?.path !== "string"
|
|
486
564
|
|| !/^[a-f0-9]{64}$/.test(String(value.candidateIndex?.digest ?? ""))
|
|
487
565
|
|| typeof value.runtimeDependencies?.digest !== "string"
|
|
566
|
+
|| typeof value.providerFreeFinalization !== "boolean"
|
|
488
567
|
|| typeof value.piAgentHome?.configRoot !== "string"
|
|
489
568
|
|| typeof value.piAgentHome?.runtimeParent !== "string"
|
|
490
569
|
|| typeof value.piAgentHome?.vaultRoot !== "string"
|
|
@@ -503,6 +582,9 @@ export function benchmarkBootstrapMetadata(env = process.env) {
|
|
|
503
582
|
|| typeof value.codexCredential?.privateIdentity?.contentDigest !== "string"
|
|
504
583
|
))
|
|
505
584
|
|| typeof value.suite?.origin !== "string"
|
|
585
|
+
|| !(value.suite?.builtInId === null || isReservedBenchmarkSuiteId(value.suite?.builtInId))
|
|
586
|
+
|| (value.suite?.builtInId === null && typeof value.suite?.snapshot !== "string")
|
|
587
|
+
|| (value.suite?.builtInId !== null && (value.suite?.origin !== value.suite?.builtInId || value.suite?.snapshot !== null))
|
|
506
588
|
|| typeof value.suite?.identity?.contentDigest !== "string"
|
|
507
589
|
|| (value.replay !== null && (
|
|
508
590
|
typeof value.replay?.snapshot !== "string"
|
|
@@ -1,21 +1,50 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
const RESTRICTION_VERDICTS = new Set([
|
|
2
|
+
"token-claim-withheld",
|
|
3
|
+
"diagnostic-native-codex",
|
|
4
|
+
"diagnostic-replay"
|
|
5
|
+
]);
|
|
6
|
+
|
|
7
|
+
function restrictionCanReplaceVerdict(status, includeObservational) {
|
|
8
|
+
return typeof status === "string"
|
|
9
|
+
&& (status.endsWith("-more-efficient")
|
|
10
|
+
|| RESTRICTION_VERDICTS.has(status)
|
|
11
|
+
|| (includeObservational && status === "observational-efficiency-only"));
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function withholdTokenClaim(report, { reason, limitation, verdictStatus, includeObservational = false }) {
|
|
4
15
|
report.comparison.tokenClaimAllowed = false;
|
|
5
16
|
report.comparison.tokenClaimUnavailableReason = reason;
|
|
17
|
+
report.comparison.claimEligibility = {
|
|
18
|
+
...(report.comparison.claimEligibility ?? {}),
|
|
19
|
+
tokenClaimScope: "unavailable",
|
|
20
|
+
limitations: [...new Set([...(report.comparison.claimEligibility?.limitations ?? []), limitation])]
|
|
21
|
+
};
|
|
22
|
+
report.verdict ??= {};
|
|
23
|
+
if (restrictionCanReplaceVerdict(report.verdict.status, includeObservational)) {
|
|
24
|
+
report.verdict.status = verdictStatus;
|
|
25
|
+
}
|
|
26
|
+
report.verdict.claimRestrictionReason = reason;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function diagnostic(report, { tier, purpose, reason, limitation, flag, verdictStatus }) {
|
|
30
|
+
report[flag] = true;
|
|
31
|
+
report.comparison.purpose = purpose;
|
|
32
|
+
withholdTokenClaim(report, { reason, limitation, verdictStatus, includeObservational: true });
|
|
6
33
|
report.comparison.claimEligibility = {
|
|
7
34
|
...(report.comparison.claimEligibility ?? {}),
|
|
8
35
|
achievedTier: tier,
|
|
9
36
|
generalizationClaimAllowed: false,
|
|
10
|
-
comparisonPurpose: purpose
|
|
11
|
-
limitations: [...new Set([...(report.comparison.claimEligibility?.limitations ?? []), limitation])]
|
|
37
|
+
comparisonPurpose: purpose
|
|
12
38
|
};
|
|
13
39
|
}
|
|
14
40
|
|
|
15
41
|
export function applyBenchmarkClaimRestrictions(report, { tokenReason, replaySource, codexMode, surfaces }) {
|
|
16
42
|
if (tokenReason) {
|
|
17
|
-
report
|
|
18
|
-
|
|
43
|
+
withholdTokenClaim(report, {
|
|
44
|
+
reason: tokenReason,
|
|
45
|
+
limitation: `token-claim-withheld:${tokenReason}`,
|
|
46
|
+
verdictStatus: "token-claim-withheld"
|
|
47
|
+
});
|
|
19
48
|
}
|
|
20
49
|
if (surfaces.includes("codex-cli") && codexMode === "native") {
|
|
21
50
|
diagnostic(report, {
|
|
@@ -23,6 +52,7 @@ export function applyBenchmarkClaimRestrictions(report, { tokenReason, replaySou
|
|
|
23
52
|
purpose: "diagnostic-native-codex",
|
|
24
53
|
reason: "native-codex-operator-configuration-is-not-frozen",
|
|
25
54
|
limitation: "native-codex-results-cannot-support-release-token-or-generalization-claims",
|
|
55
|
+
verdictStatus: "diagnostic-native-codex",
|
|
26
56
|
flag: "nativeCodexDiagnosticOnly"
|
|
27
57
|
});
|
|
28
58
|
}
|
|
@@ -32,6 +62,7 @@ export function applyBenchmarkClaimRestrictions(report, { tokenReason, replaySou
|
|
|
32
62
|
purpose: "diagnostic-replay",
|
|
33
63
|
reason: "replay-results-are-diagnostic-only",
|
|
34
64
|
limitation: "replay-results-cannot-support-release-token-or-generalization-claims",
|
|
65
|
+
verdictStatus: "diagnostic-replay",
|
|
35
66
|
flag: "replayDiagnosticOnly"
|
|
36
67
|
});
|
|
37
68
|
}
|
|
@@ -11,16 +11,16 @@ export const benchmarkUsage = `Usage:
|
|
|
11
11
|
piagent-benchmark <project-path> --record ... Legacy recorder
|
|
12
12
|
piagent-benchmark <project-path> --init Legacy scenario notes
|
|
13
13
|
|
|
14
|
-
Runs a clean, paired
|
|
15
|
-
With no options it uses the built-in core-v1 suite,
|
|
16
|
-
|
|
14
|
+
Runs a clean, paired Codex CLI vs Piagent benchmark and grades it automatically.
|
|
15
|
+
With no options it uses the built-in core-v1 suite, GPT-5.6 Luna at medium
|
|
16
|
+
thinking on both surfaces, and the suite's repeat count.
|
|
17
17
|
|
|
18
18
|
Options:
|
|
19
19
|
--suite <id|path> core-v1, capability-v1, e2-framework-v1, deep-logic-v1, production-v1, or suite.json path.
|
|
20
|
-
--deep Alias for --suite deep-logic-v1 (
|
|
20
|
+
--deep Alias for --suite deep-logic-v1 (7 large scenarios, locked to Luna/medium).
|
|
21
21
|
--capability Alias for --suite capability-v1.
|
|
22
22
|
--production Alias for --suite production-v1.
|
|
23
|
-
--surfaces <a,b>
|
|
23
|
+
--surfaces <a,b> piagent,codex-cli (default); raw-pi is diagnostic ablation only.
|
|
24
24
|
--model <provider/model> Pin one model identity for both surfaces.
|
|
25
25
|
--thinking <level> off|minimal|low|medium|high|xhigh|max.
|
|
26
26
|
--codex-mode <mode> controlled isolated home (default) or native user configuration.
|
|
@@ -47,7 +47,7 @@ Options:
|
|
|
47
47
|
|
|
48
48
|
Outputs report.json, report.html, summary.txt, and runs.jsonl with mode 0600.
|
|
49
49
|
No token/result value is entered manually; usage comes from Pi session JSONL
|
|
50
|
-
or Codex exec JSONL.
|
|
50
|
+
or Codex exec JSONL. Override --model and --thinking together for another parity target.
|
|
51
51
|
`;
|
|
52
52
|
|
|
53
53
|
function fail(message, code = 2) {
|
|
@@ -72,7 +72,7 @@ function positiveInteger(raw, name, minimum, maximum) {
|
|
|
72
72
|
export function parseBenchmarkArgs(argv) {
|
|
73
73
|
const options = {
|
|
74
74
|
suite: "core-v1",
|
|
75
|
-
surfaces: ["
|
|
75
|
+
surfaces: ["piagent", "codex-cli"],
|
|
76
76
|
model: undefined,
|
|
77
77
|
thinking: undefined,
|
|
78
78
|
codexMode: "controlled",
|
|
@@ -9,7 +9,9 @@ export function codexModelName(model) {
|
|
|
9
9
|
|
|
10
10
|
export function codexThinkingEffort(thinking) {
|
|
11
11
|
if (!thinking) throw Object.assign(new Error("Codex CLI comparisons require --thinking"), { exitCode: 1 });
|
|
12
|
-
|
|
12
|
+
if (thinking === "off") return "none";
|
|
13
|
+
if (thinking === "minimal") return "low";
|
|
14
|
+
return thinking;
|
|
13
15
|
}
|
|
14
16
|
|
|
15
17
|
export function codexExecArgs({ workspace, options, disabledFeatures = [] }) {
|