@piagent/platform 1.6.1 → 1.8.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 +71 -0
- package/README.md +8 -2
- package/README.vi.md +11 -2
- package/adapters/common/assurance-producers.json +109 -0
- package/adapters/common/structured-assurance-facts.mjs +153 -0
- package/adapters/node-typescript/contract-families.json +2811 -0
- package/adapters/node-typescript/contract-families.md +90 -0
- package/benchmarks/production-v1/grade.mjs +20 -0
- package/benchmarks/production-v1/spend-control.v1.json +3 -3
- package/benchmarks/production-v2/grade.mjs +892 -0
- package/benchmarks/production-v2/project/README.md +7 -0
- package/benchmarks/production-v2/project/config/service.json +4 -0
- package/benchmarks/production-v2/project/data/audit-ledger.jsonl +1 -0
- package/benchmarks/production-v2/project/docs/ops.md +3 -0
- package/benchmarks/production-v2/project/logs/incident.log +2 -0
- package/benchmarks/production-v2/project/package.json +11 -0
- package/benchmarks/production-v2/project/scripts/check.mjs +21 -0
- package/benchmarks/production-v2/project/src/backend/auth.js +3 -0
- package/benchmarks/production-v2/project/src/backend/billing-window.js +4 -0
- package/benchmarks/production-v2/project/src/backend/cache.js +15 -0
- package/benchmarks/production-v2/project/src/backend/invoice.js +4 -0
- package/benchmarks/production-v2/project/src/backend/revocation-cache.js +3 -0
- package/benchmarks/production-v2/project/src/data/csv.js +3 -0
- package/benchmarks/production-v2/project/src/data/dedup.js +5 -0
- package/benchmarks/production-v2/project/src/data/migration.js +9 -0
- package/benchmarks/production-v2/project/src/data/ndjson-stream.js +5 -0
- package/benchmarks/production-v2/project/src/data/versioned-replay.js +8 -0
- package/benchmarks/production-v2/project/src/frontend/chat-events.js +7 -0
- package/benchmarks/production-v2/project/src/frontend/pagination.js +8 -0
- package/benchmarks/production-v2/project/src/frontend/request-lifecycle.js +15 -0
- package/benchmarks/production-v2/project/src/frontend/search-state.js +8 -0
- package/benchmarks/production-v2/project/src/frontend/unicode-search.js +7 -0
- package/benchmarks/production-v2/project/src/fullstack/contract-sync.js +10 -0
- package/benchmarks/production-v2/project/src/platform/args.js +10 -0
- package/benchmarks/production-v2/project/src/platform/config.js +7 -0
- package/benchmarks/production-v2/project/src/platform/workflow-session.js +9 -0
- package/benchmarks/production-v2/project/src/platform/workspace.js +13 -0
- package/benchmarks/production-v2/project/src/reliability/checkpoint.js +5 -0
- package/benchmarks/production-v2/project/src/reliability/expiry.js +5 -0
- package/benchmarks/production-v2/project/src/reliability/retry.js +15 -0
- package/benchmarks/production-v2/project/test/smoke.test.js +21 -0
- package/benchmarks/production-v2/project/vendor/README.md +1 -0
- package/benchmarks/production-v2/prompts/abort-reconnect-supersession.md +11 -0
- package/benchmarks/production-v2/prompts/backend-frontend-contract-sync.md +12 -0
- package/benchmarks/production-v2/prompts/billing-cutoff-clock-skew.md +11 -0
- package/benchmarks/production-v2/prompts/bounded-retry.md +7 -0
- package/benchmarks/production-v2/prompts/chunked-record-boundary.md +9 -0
- package/benchmarks/production-v2/prompts/cli-double-dash.md +7 -0
- package/benchmarks/production-v2/prompts/config-precedence.md +6 -0
- package/benchmarks/production-v2/prompts/destructive-history-refusal.md +3 -0
- package/benchmarks/production-v2/prompts/expiry-boundary.md +7 -0
- package/benchmarks/production-v2/prompts/idempotent-replay-conflict.md +11 -0
- package/benchmarks/production-v2/prompts/incident-diagnosis.md +4 -0
- package/benchmarks/production-v2/prompts/invoice-rounding.md +9 -0
- package/benchmarks/production-v2/prompts/journeys/config-precedence-scout.md +3 -0
- package/benchmarks/production-v2/prompts/journeys/expiry-boundary-scout.md +3 -0
- package/benchmarks/production-v2/prompts/journeys/quoted-csv-scout.md +3 -0
- package/benchmarks/production-v2/prompts/journeys/recover-after-uncertain-send.md +4 -0
- package/benchmarks/production-v2/prompts/journeys/repository-prompt-injection-scout.md +4 -0
- package/benchmarks/production-v2/prompts/journeys/resumable-checkpoint-partial-failure-scout.md +4 -0
- package/benchmarks/production-v2/prompts/journeys/stable-dedup-scout.md +3 -0
- package/benchmarks/production-v2/prompts/journeys/stale-search-response-scout.md +3 -0
- package/benchmarks/production-v2/prompts/journeys/tenant-cache-isolation-scout.md +4 -0
- package/benchmarks/production-v2/prompts/journeys/verify-current-contract.md +4 -0
- package/benchmarks/production-v2/prompts/journeys/workflow-switch-same-session-scout.md +4 -0
- package/benchmarks/production-v2/prompts/pagination-boundary.md +7 -0
- package/benchmarks/production-v2/prompts/protected-env-refusal.md +2 -0
- package/benchmarks/production-v2/prompts/quoted-csv.md +6 -0
- package/benchmarks/production-v2/prompts/reconnect-chat-event-order.md +19 -0
- package/benchmarks/production-v2/prompts/repository-prompt-injection.md +5 -0
- package/benchmarks/production-v2/prompts/resumable-checkpoint-partial-failure.md +11 -0
- package/benchmarks/production-v2/prompts/revoked-session-cache.md +10 -0
- package/benchmarks/production-v2/prompts/schema-migration.md +6 -0
- package/benchmarks/production-v2/prompts/stable-dedup.md +6 -0
- package/benchmarks/production-v2/prompts/stale-search-response.md +6 -0
- package/benchmarks/production-v2/prompts/tenant-cache-isolation.md +6 -0
- package/benchmarks/production-v2/prompts/tenant-role-authorization.md +6 -0
- package/benchmarks/production-v2/prompts/unicode-search.md +6 -0
- package/benchmarks/production-v2/prompts/workflow-switch-same-session.md +30 -0
- package/benchmarks/production-v2/prompts/workspace-order.md +7 -0
- package/benchmarks/production-v2/spend-control.v1.json +115 -0
- package/benchmarks/production-v2/suite.json +1009 -0
- package/benchmarks/production-v2/variant.mjs +169 -0
- package/benchmarks/production-v3/CONTRACT-REVISION-20260922.md +31 -0
- package/benchmarks/production-v3/calibration/corpus.v1.json +63 -0
- package/benchmarks/production-v3/calibration/human-review-rubric.v1.json +36 -0
- package/benchmarks/production-v3/grade.mjs +1017 -0
- package/benchmarks/production-v3/project/README.md +7 -0
- package/benchmarks/production-v3/project/config/service.json +4 -0
- package/benchmarks/production-v3/project/data/audit-ledger.jsonl +1 -0
- package/benchmarks/production-v3/project/docs/ops.md +3 -0
- package/benchmarks/production-v3/project/logs/incident.log +2 -0
- package/benchmarks/production-v3/project/package.json +11 -0
- package/benchmarks/production-v3/project/scripts/check.mjs +21 -0
- package/benchmarks/production-v3/project/src/backend/auth.js +3 -0
- package/benchmarks/production-v3/project/src/backend/billing-window.js +4 -0
- package/benchmarks/production-v3/project/src/backend/cache.js +15 -0
- package/benchmarks/production-v3/project/src/backend/invoice.js +4 -0
- package/benchmarks/production-v3/project/src/backend/revocation-cache.js +12 -0
- package/benchmarks/production-v3/project/src/data/csv.js +3 -0
- package/benchmarks/production-v3/project/src/data/dedup.js +5 -0
- package/benchmarks/production-v3/project/src/data/migration.js +9 -0
- package/benchmarks/production-v3/project/src/data/ndjson-stream.js +5 -0
- package/benchmarks/production-v3/project/src/data/versioned-replay.js +8 -0
- package/benchmarks/production-v3/project/src/frontend/chat-events.js +7 -0
- package/benchmarks/production-v3/project/src/frontend/pagination.js +8 -0
- package/benchmarks/production-v3/project/src/frontend/request-lifecycle.js +23 -0
- package/benchmarks/production-v3/project/src/frontend/search-state.js +8 -0
- package/benchmarks/production-v3/project/src/frontend/unicode-search.js +7 -0
- package/benchmarks/production-v3/project/src/fullstack/contract-sync.js +10 -0
- package/benchmarks/production-v3/project/src/platform/args.js +10 -0
- package/benchmarks/production-v3/project/src/platform/config.js +7 -0
- package/benchmarks/production-v3/project/src/platform/workflow-session.js +9 -0
- package/benchmarks/production-v3/project/src/platform/workspace.js +13 -0
- package/benchmarks/production-v3/project/src/reliability/checkpoint.js +5 -0
- package/benchmarks/production-v3/project/src/reliability/expiry.js +14 -0
- package/benchmarks/production-v3/project/src/reliability/retry.js +15 -0
- package/benchmarks/production-v3/project/test/smoke.test.js +21 -0
- package/benchmarks/production-v3/project/vendor/README.md +1 -0
- package/benchmarks/production-v3/prompts/abort-reconnect-supersession.md +11 -0
- package/benchmarks/production-v3/prompts/backend-frontend-contract-sync.md +20 -0
- package/benchmarks/production-v3/prompts/billing-cutoff-clock-skew.md +11 -0
- package/benchmarks/production-v3/prompts/bounded-retry.md +7 -0
- package/benchmarks/production-v3/prompts/chunked-record-boundary.md +11 -0
- package/benchmarks/production-v3/prompts/cli-double-dash.md +7 -0
- package/benchmarks/production-v3/prompts/config-precedence.md +6 -0
- package/benchmarks/production-v3/prompts/destructive-history-refusal.md +9 -0
- package/benchmarks/production-v3/prompts/expiry-boundary.md +14 -0
- package/benchmarks/production-v3/prompts/idempotent-replay-conflict.md +13 -0
- package/benchmarks/production-v3/prompts/incident-diagnosis.md +4 -0
- package/benchmarks/production-v3/prompts/invoice-rounding.md +9 -0
- package/benchmarks/production-v3/prompts/journeys/config-precedence-scout.md +3 -0
- package/benchmarks/production-v3/prompts/journeys/expiry-boundary-scout.md +3 -0
- package/benchmarks/production-v3/prompts/journeys/quoted-csv-scout.md +3 -0
- package/benchmarks/production-v3/prompts/journeys/recover-after-uncertain-send.md +4 -0
- package/benchmarks/production-v3/prompts/journeys/repository-prompt-injection-scout.md +4 -0
- package/benchmarks/production-v3/prompts/journeys/resumable-checkpoint-partial-failure-scout.md +4 -0
- package/benchmarks/production-v3/prompts/journeys/stable-dedup-scout.md +3 -0
- package/benchmarks/production-v3/prompts/journeys/stale-search-response-scout.md +3 -0
- package/benchmarks/production-v3/prompts/journeys/tenant-cache-isolation-scout.md +4 -0
- package/benchmarks/production-v3/prompts/journeys/verify-current-contract.md +4 -0
- package/benchmarks/production-v3/prompts/journeys/workflow-switch-same-session-scout.md +4 -0
- package/benchmarks/production-v3/prompts/pagination-boundary.md +9 -0
- package/benchmarks/production-v3/prompts/protected-env-refusal.md +8 -0
- package/benchmarks/production-v3/prompts/quoted-csv.md +6 -0
- package/benchmarks/production-v3/prompts/reconnect-chat-event-order.md +20 -0
- package/benchmarks/production-v3/prompts/repository-prompt-injection.md +5 -0
- package/benchmarks/production-v3/prompts/resumable-checkpoint-partial-failure.md +15 -0
- package/benchmarks/production-v3/prompts/revoked-session-cache.md +10 -0
- package/benchmarks/production-v3/prompts/schema-migration.md +6 -0
- package/benchmarks/production-v3/prompts/stable-dedup.md +6 -0
- package/benchmarks/production-v3/prompts/stale-search-response.md +6 -0
- package/benchmarks/production-v3/prompts/tenant-cache-isolation.md +6 -0
- package/benchmarks/production-v3/prompts/tenant-role-authorization.md +6 -0
- package/benchmarks/production-v3/prompts/unicode-search.md +6 -0
- package/benchmarks/production-v3/prompts/workflow-switch-same-session.md +30 -0
- package/benchmarks/production-v3/prompts/workspace-order.md +7 -0
- package/benchmarks/production-v3/public-checks/abort-reconnect-supersession.js +34 -0
- package/benchmarks/production-v3/public-checks/expiry-boundary.js +29 -0
- package/benchmarks/production-v3/public-checks/revoked-session-cache.js +20 -0
- package/benchmarks/production-v3/spend-control.v1.json +121 -0
- package/benchmarks/production-v3/suite.json +1010 -0
- package/benchmarks/production-v3/variant.mjs +178 -0
- package/catalog/capabilities.json +2 -2
- package/docs/benchmark-codex-mcp-metadata-contract-v1.md +159 -0
- package/docs/benchmark-codex-mcp-metadata-contract-v2.md +182 -0
- package/docs/benchmark-codex-mcp-metadata-contract-v3.md +194 -0
- package/docs/benchmark-public-contract-addendum-v2.md +85 -0
- package/docs/benchmark-public-contract-addendum-v3.md +116 -0
- package/docs/command-reference-vietnamese.md +10 -7
- package/docs/context-window-policy.md +3 -3
- package/docs/distribution-standard.md +9 -9
- package/docs/languages.json +2 -2
- package/docs/model-options.md +20 -15
- package/docs/operator-manual-vietnamese.md +12 -12
- package/docs/piagent-codex-benchmark-recovery-plan.md +1817 -0
- package/docs/piagent-core-evaluation-specs-2026-09-06.json +706 -0
- package/docs/piagent-core-improvement-plan.md +528 -0
- package/docs/piagent-core-offline-implementation-2026-09-06.md +219 -0
- package/docs/piagent-core-plan-checkpoint-2026-09-06.json +69 -0
- package/docs/piagent-core-reasoning-research-2026-09-06.md +225 -0
- package/docs/piagent-core-research-sources-2026-09-06.json +416 -0
- package/docs/piagent-open-session-wait.md +19 -0
- package/docs/piagent-runtime-benchmark-execution-plan.md +685 -0
- package/docs/publishing-for-teams.md +3 -0
- package/docs/quality-benchmark.md +128 -8
- package/docs/quickstart-vietnamese.md +2 -2
- package/docs/release-install-policy.md +38 -11
- package/docs/research/harness-next-evidence-review.md +113 -0
- package/docs/team-onboarding.md +7 -7
- package/docs/third-party-neutrality.md +7 -0
- package/docs/usage-observability.md +1 -1
- package/docs-site/architecture.html +1 -1
- package/docs-site/benchmark.html +1 -1
- package/docs-site/commands.html +1 -1
- package/docs-site/content/en/runtime.html +1 -1
- package/docs-site/content/en/whats-new.html +23 -0
- package/docs-site/content/runtime.html +2 -2
- package/docs-site/content/whats-new.html +23 -0
- 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 +2 -2
- 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 +24 -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 +3 -3
- 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 +24 -1
- package/docs-site/workflows.html +1 -1
- package/evals/architecture-conformance-v1/lane.json +18 -0
- package/evals/architecture-conformance-v1/runner.mjs +77 -0
- package/evals/fixtures/approved-host-contracts.invalid.json +43 -0
- package/evals/fixtures/approved-host-contracts.valid.json +43 -0
- package/evals/fixtures/benchmark-attempt-outcome.invalid.json +42 -0
- package/evals/fixtures/benchmark-attempt-outcome.valid.json +42 -0
- package/evals/fixtures/benchmark-independent-verification-plan.invalid.json +7 -0
- package/evals/fixtures/benchmark-independent-verification-plan.valid.json +21 -0
- package/evals/fixtures/composite-criterion.invalid.json +10 -0
- package/evals/fixtures/composite-criterion.valid.json +33 -0
- package/evals/fixtures/contract-family-library.invalid.json +42 -0
- package/evals/fixtures/contract-family-library.valid.json +41 -0
- package/evals/fixtures/contract-selection-recipe.invalid.json +29 -0
- package/evals/fixtures/contract-selection-recipe.valid.json +29 -0
- package/evals/fixtures/host-contract-plan.invalid.json +42 -0
- package/evals/fixtures/host-contract-plan.valid.json +41 -0
- package/evals/fixtures/scoped-project-verification-receipt-v2.invalid.json +42 -0
- package/evals/fixtures/scoped-project-verification-receipt-v2.valid.json +42 -0
- package/evals/fixtures/scoped-project-verification-receipt-v3.invalid.json +57 -0
- package/evals/fixtures/scoped-project-verification-receipt-v3.valid.json +57 -0
- package/evals/fixtures/scoped-verification-receipt-v1.invalid.json +40 -0
- package/evals/fixtures/scoped-verification-receipt-v1.valid.json +40 -0
- package/evals/fs5-artifact-archive/README.md +32 -0
- package/evals/fs5-artifact-archive/manifest.json +148 -0
- package/evals/fs5-artifact-archive/sha256/1f073f6d42c093a3182685e0e096144c8b3befd87594aeea1af05ce17653860c.txt +380 -0
- package/evals/fs5-artifact-archive/sha256/1ff46984c5ff668647dfad94248cd9dcfb72384a8aa529279345582f90d7486a.txt +331 -0
- package/evals/fs5-artifact-archive/sha256/20a5e1ef1cab3234a888b876b3cec52e702a05bc5ac000b691f94c651beed9ca.txt +800 -0
- package/evals/fs5-artifact-archive/sha256/29bb79e96b047d79056626d747baa0b3a6ca9d4da7ad80b9668c0085e5581706.txt +116 -0
- package/evals/fs5-artifact-archive/sha256/2bcc0cf6c18eee0c080c30e727610b0f10a278f5862855d920ba5797f07a2f2d.txt +252 -0
- package/evals/fs5-artifact-archive/sha256/37ecc65febe2c5947ac9288ad958bc149e0f08c6beda137edb1c660908853832.txt +324 -0
- package/evals/fs5-artifact-archive/sha256/5d937632d2cfff34dbbb781dd367bb78feb64c36d571c36ca15f2cc40c576af8.txt +142 -0
- package/evals/fs5-artifact-archive/sha256/6057c7bf2f40f8e3db7e293f08d745133c05293b75e9f363fb4e2e53bd09a76a.txt +244 -0
- package/evals/fs5-artifact-archive/sha256/62ea354afb6816b148ae9bd95ffb1ee5e29580eb4a22473e1ae19dbb471ec36b.txt +930 -0
- package/evals/fs5-artifact-archive/sha256/8987775b742f3b3650d75cce84e6d58fcdd3dfb835d03dac4c2bfe6d9eea3a2e.txt +903 -0
- package/evals/fs5-artifact-archive/sha256/902e886d0920b66811f54d0d1d933d70f8fab8704813b46d578bee6af1f21eef.txt +942 -0
- package/evals/fs5-artifact-archive/sha256/976a9908adfd765ee7be0655616f39a44fff64824f5e8535d726082e550b02eb.txt +910 -0
- package/evals/fs5-artifact-archive/sha256/9c07bda5bfe7bb7b0959844ccea6790735cc9f154d8d5972e18785148cea6d9a.txt +101 -0
- package/evals/fs5-artifact-archive/sha256/b936a604db87a697bf69581c33d753e26d9e5e2ccce40bf9c9b2070948f49919.txt +931 -0
- package/evals/fs5-artifact-archive/sha256/bf91f69473f48fc3de7c7c55e7ce893ba0511074c4ec930d9f3bcb9615d8e9d5.txt +950 -0
- package/evals/fs5-artifact-archive/sha256/ce4ed1b4a033f2a8cb4632d1336b0867edb3454ce1380f0642c4055149e6ac59.txt +784 -0
- package/evals/fs5-artifact-archive/sha256/db97f444db8ba604512daf0aa26b3fe1e2a120ace2b21d4730db5b18aa0c528f.txt +950 -0
- package/evals/fs5-causal-arm.v1.json +9 -5
- package/evals/fs5-pilot-protocol.v1.json +1 -1
- package/evals/fs5-pilot-protocol.v4.json +4 -4
- package/evals/fs5-pilot-protocol.v5.json +6 -5
- package/evals/harness-next/development-corpus.mjs +106 -0
- package/evals/harness-next/resource-budget-probe.mjs +38 -0
- package/evals/harness-next/run-calibration.mjs +83 -0
- package/evals/harness-next/run-resource-probe.mjs +55 -0
- package/evals/harness-next/selected-development-corpus.mjs +27 -0
- package/evals/harness-next.v1.json +51 -0
- package/evals/long-horizon-v1/README.md +19 -0
- package/evals/long-horizon-v1/runner.mjs +116 -48
- package/evals/long-horizon-v1/worker.mjs +77 -30
- package/evals/private-holdout-v1/CURRENT_BOUNDARY.md +53 -0
- package/evals/private-holdout-v1/README.md +5 -2
- package/evals/private-holdout-v1/public-exposure.v2.json +273 -0
- package/package.json +9 -4
- package/packages/piagent-core/README.md +2 -2
- package/packages/piagent-core/benchmark/benchmark-all-attempt-efficiency.js +55 -0
- package/packages/piagent-core/benchmark/benchmark-artifact-binding.js +49 -0
- package/packages/piagent-core/benchmark/benchmark-bootstrap.js +265 -14
- package/packages/piagent-core/benchmark/benchmark-budget-governor.js +271 -0
- package/packages/piagent-core/benchmark/benchmark-campaign.js +592 -0
- package/packages/piagent-core/benchmark/benchmark-candidate.js +8 -3
- package/packages/piagent-core/benchmark/benchmark-checkpoint.js +67 -0
- package/packages/piagent-core/benchmark/benchmark-claim-restrictions.js +269 -2
- package/packages/piagent-core/benchmark/benchmark-cli.js +120 -3
- package/packages/piagent-core/benchmark/benchmark-codex-events.js +235 -0
- package/packages/piagent-core/benchmark/benchmark-codex-outcome.js +20 -0
- package/packages/piagent-core/benchmark/benchmark-codex-relative-efficiency.js +2 -1
- package/packages/piagent-core/benchmark/benchmark-codex-rollout.js +521 -0
- package/packages/piagent-core/benchmark/benchmark-codex.js +104 -8
- package/packages/piagent-core/benchmark/benchmark-comparison.js +284 -1
- package/packages/piagent-core/benchmark/benchmark-core.js +107 -107
- package/packages/piagent-core/benchmark/benchmark-diagnostic-source-evidence.js +40 -0
- package/packages/piagent-core/benchmark/benchmark-diagnostic-treatment.js +104 -0
- package/packages/piagent-core/benchmark/benchmark-evaluator-v3.js +226 -0
- package/packages/piagent-core/benchmark/benchmark-execution-guard.js +23 -1
- package/packages/piagent-core/benchmark/benchmark-forensics.js +63 -50
- package/packages/piagent-core/benchmark/benchmark-goal-assessment.js +193 -0
- package/packages/piagent-core/benchmark/benchmark-goal-report.js +87 -0
- package/packages/piagent-core/benchmark/benchmark-independent-verification-observation.js +64 -0
- package/packages/piagent-core/benchmark/benchmark-matrix-summary.js +141 -0
- package/packages/piagent-core/benchmark/benchmark-matrix.js +1 -0
- package/packages/piagent-core/benchmark/benchmark-normalized-cost.js +62 -0
- package/packages/piagent-core/benchmark/benchmark-pi-home.js +1 -0
- package/packages/piagent-core/benchmark/benchmark-preflight.js +69 -8
- package/packages/piagent-core/benchmark/benchmark-process.js +23 -9
- package/packages/piagent-core/benchmark/benchmark-production-completion.js +84 -0
- package/packages/piagent-core/benchmark/benchmark-production-stage-validation.js +209 -0
- package/packages/piagent-core/benchmark/benchmark-provider-free-evidence.js +162 -45
- package/packages/piagent-core/benchmark/benchmark-provider-free-owner.js +24 -0
- package/packages/piagent-core/benchmark/benchmark-provider-wire.js +378 -0
- package/packages/piagent-core/benchmark/benchmark-record-validation.d.ts +2 -0
- package/packages/piagent-core/benchmark/benchmark-record-validation.js +269 -3
- package/packages/piagent-core/benchmark/benchmark-release-claim-controls.js +132 -0
- package/packages/piagent-core/benchmark/benchmark-report.js +79 -4
- package/packages/piagent-core/benchmark/benchmark-resume-recovery.js +280 -10
- package/packages/piagent-core/benchmark/benchmark-runner-policy.js +88 -1
- package/packages/piagent-core/benchmark/benchmark-runtime-identity.js +50 -1
- package/packages/piagent-core/benchmark/benchmark-runtime.js +102 -10
- package/packages/piagent-core/benchmark/benchmark-safety-evidence.js +74 -0
- package/packages/piagent-core/benchmark/benchmark-service-tier.js +189 -0
- package/packages/piagent-core/benchmark/benchmark-stage-diagnostic.js +144 -128
- package/packages/piagent-core/benchmark/benchmark-suite-identity.js +264 -1
- package/packages/piagent-core/benchmark/benchmark-suite-runtime.js +4 -0
- package/packages/piagent-core/benchmark/benchmark-suite.js +211 -4
- package/packages/piagent-core/benchmark/benchmark-summary-support.js +30 -2
- package/packages/piagent-core/benchmark/benchmark-timing-contract.js +189 -0
- package/packages/piagent-core/benchmark/benchmark-timing-diagnostics.js +110 -139
- package/packages/piagent-core/benchmark/benchmark-transport-evidence.js +203 -0
- package/packages/piagent-core/benchmark/benchmark-transport-observation.js +147 -0
- package/packages/piagent-core/benchmark/benchmark-tree-identity.js +2 -1
- package/packages/piagent-core/benchmark/benchmark-usage.js +395 -33
- package/packages/piagent-core/benchmark/benchmark-workflow.js +136 -38
- package/packages/piagent-core/benchmark/fs5-pilot-protocol.js +21 -2
- package/packages/piagent-core/capabilities/runtime-integrity.js +3 -0
- package/packages/piagent-core/extensions/acceptance-api-baseline.js +24 -0
- package/packages/piagent-core/extensions/acceptance-assessment.js +153 -0
- package/packages/piagent-core/extensions/acceptance-authenticated-admission.d.ts +41 -0
- package/packages/piagent-core/extensions/acceptance-authenticated-admission.js +120 -0
- package/packages/piagent-core/extensions/acceptance-behavior-proof.js +264 -70
- package/packages/piagent-core/extensions/acceptance-boundary-binding.js +31 -0
- package/packages/piagent-core/extensions/acceptance-boundary-guidance.js +214 -0
- package/packages/piagent-core/extensions/acceptance-callable-scanner.js +244 -0
- package/packages/piagent-core/extensions/acceptance-clause-group.js +45 -0
- package/packages/piagent-core/extensions/acceptance-composite-contract.js +334 -0
- package/packages/piagent-core/extensions/acceptance-contract-conjunction.js +78 -0
- package/packages/piagent-core/extensions/acceptance-contract-selection.js +161 -0
- package/packages/piagent-core/extensions/acceptance-contract-semantics.js +211 -211
- package/packages/piagent-core/extensions/acceptance-declared-api.js +126 -0
- package/packages/piagent-core/extensions/acceptance-diagnostic-policy.ts +14 -0
- package/packages/piagent-core/extensions/acceptance-document-content.js +73 -0
- package/packages/piagent-core/extensions/acceptance-durable-execution.d.ts +59 -0
- package/packages/piagent-core/extensions/acceptance-durable-execution.js +139 -0
- package/packages/piagent-core/extensions/acceptance-error-classes.js +1 -1
- package/packages/piagent-core/extensions/acceptance-evidence-store.js +223 -0
- package/packages/piagent-core/extensions/acceptance-executable-evidence.js +490 -88
- package/packages/piagent-core/extensions/acceptance-execution-diagnostics.js +34 -0
- package/packages/piagent-core/extensions/acceptance-execution-snapshot.js +174 -0
- package/packages/piagent-core/extensions/acceptance-executor/.dockerignore +21 -0
- package/packages/piagent-core/extensions/acceptance-executor/Dockerfile +5 -0
- package/packages/piagent-core/extensions/acceptance-executor/README.md +103 -0
- package/packages/piagent-core/extensions/acceptance-executor/budget.mjs +54 -0
- package/packages/piagent-core/extensions/acceptance-executor/callback-intrinsics.mjs +126 -0
- package/packages/piagent-core/extensions/acceptance-executor/capabilities.mjs +127 -0
- package/packages/piagent-core/extensions/acceptance-executor/guest.mjs +285 -0
- package/packages/piagent-core/extensions/acceptance-executor/intrinsics.mjs +133 -0
- package/packages/piagent-core/extensions/acceptance-executor/invocation.mjs +39 -0
- package/packages/piagent-core/extensions/acceptance-executor/jobs.mjs +29 -0
- package/packages/piagent-core/extensions/acceptance-executor/module-graph.mjs +70 -0
- package/packages/piagent-core/extensions/acceptance-executor/node-profile.mjs +398 -0
- package/packages/piagent-core/extensions/acceptance-executor/package-lock.json +40 -0
- package/packages/piagent-core/extensions/acceptance-executor/package.json +10 -0
- package/packages/piagent-core/extensions/acceptance-executor/protocol.mjs +248 -0
- package/packages/piagent-core/extensions/acceptance-executor/reference-identity.mjs +61 -0
- package/packages/piagent-core/extensions/acceptance-executor/references.mjs +14 -0
- package/packages/piagent-core/extensions/acceptance-executor/structured-clone.mjs +53 -0
- package/packages/piagent-core/extensions/acceptance-executor/values.mjs +97 -0
- package/packages/piagent-core/extensions/acceptance-executor/worker.mjs +75 -0
- package/packages/piagent-core/extensions/acceptance-expiry-calendar-proof.js +162 -0
- package/packages/piagent-core/extensions/acceptance-expression-parser.js +155 -0
- package/packages/piagent-core/extensions/acceptance-focused-verification.js +40 -0
- package/packages/piagent-core/extensions/acceptance-host-configuration.js +337 -0
- package/packages/piagent-core/extensions/acceptance-identifier-criteria.js +25 -0
- package/packages/piagent-core/extensions/acceptance-independent-contract.js +209 -0
- package/packages/piagent-core/extensions/acceptance-independent-registry.js +106 -0
- package/packages/piagent-core/extensions/acceptance-input-provenance.js +40 -0
- package/packages/piagent-core/extensions/acceptance-integer-domains.js +322 -0
- package/packages/piagent-core/extensions/acceptance-invalid-input-receipt.js +20 -0
- package/packages/piagent-core/extensions/acceptance-invalid-partitions.js +26 -0
- package/packages/piagent-core/extensions/acceptance-invalid-sentinel-proof.js +477 -0
- package/packages/piagent-core/extensions/acceptance-isolated-executor.js +254 -0
- package/packages/piagent-core/extensions/acceptance-lexical-sentinels.js +130 -0
- package/packages/piagent-core/extensions/acceptance-literal-dataflow.js +735 -0
- package/packages/piagent-core/extensions/acceptance-local-binding.js +106 -0
- package/packages/piagent-core/extensions/acceptance-normalizer-evidence.js +719 -0
- package/packages/piagent-core/extensions/acceptance-obligations.js +75 -0
- package/packages/piagent-core/extensions/acceptance-parameter-contract.js +756 -0
- package/packages/piagent-core/extensions/acceptance-precedence-contract.js +572 -0
- package/packages/piagent-core/extensions/acceptance-proof-capability.js +26 -0
- package/packages/piagent-core/extensions/acceptance-receipt.js +139 -152
- package/packages/piagent-core/extensions/acceptance-result-contract-evidence.js +159 -0
- package/packages/piagent-core/extensions/acceptance-source-origin.js +214 -0
- package/packages/piagent-core/extensions/acceptance-state-machine-evidence.js +64 -8
- package/packages/piagent-core/extensions/acceptance-tagged-event-evidence.js +685 -0
- package/packages/piagent-core/extensions/acceptance-temporal-contract.js +756 -0
- package/packages/piagent-core/extensions/acceptance-temporal-dataflow-proof.js +618 -0
- package/packages/piagent-core/extensions/acceptance-test-binding-evidence.js +20 -2
- package/packages/piagent-core/extensions/acceptance-test-bindings.js +86 -0
- package/packages/piagent-core/extensions/acceptance-tuple-shapes.js +12 -0
- package/packages/piagent-core/extensions/context-engine.js +11 -6
- package/packages/piagent-core/extensions/criterion-context-pack.js +96 -4
- package/packages/piagent-core/extensions/failure-types.ts +2 -2
- package/packages/piagent-core/extensions/guard-types.ts +5 -1
- package/packages/piagent-core/extensions/piagent-guard.ts +197 -155
- package/packages/piagent-core/extensions/readonly-inline-inspection.ts +378 -0
- package/packages/piagent-core/extensions/recovery-decision-validation.ts +92 -0
- package/packages/piagent-core/extensions/shell-write-targets.js +15 -14
- package/packages/piagent-core/extensions/task-contract-view.js +4 -4
- package/packages/piagent-core/extensions/task-digest-migration.js +2 -2
- package/packages/piagent-core/extensions/task-journal.js +48 -3
- package/packages/piagent-core/extensions/task-runtime-audit.js +8 -2
- package/packages/piagent-core/extensions/task-state.js +74 -38
- package/packages/piagent-core/extensions/task-terminal-disposition.js +10 -0
- package/packages/piagent-core/extensions/trajectory-contract.ts +5 -0
- package/packages/piagent-core/extensions/verification-intelligence.js +60 -8
- package/packages/piagent-core/extensions/workflow-catalog.ts +98 -0
- package/packages/piagent-core/extensions/workspace-revision.js +48 -0
- package/packages/piagent-core/extensions/workspace-verification-snapshot.js +13 -0
- package/packages/piagent-core/package.json +3 -3
- package/packages/piagent-core/policies/base-policy.json +1 -0
- package/packages/piagent-core/runtime/context/adaptive-planner.ts +7 -3
- package/packages/piagent-core/runtime/hooks/agent-start-hook.ts +60 -59
- package/packages/piagent-core/runtime/hooks/agent-start-types.ts +48 -0
- package/packages/piagent-core/runtime/hooks/completion-hook.ts +76 -83
- package/packages/piagent-core/runtime/hooks/input-hook.ts +92 -7
- package/packages/piagent-core/runtime/hooks/protected-refusal-completion.ts +86 -0
- package/packages/piagent-core/runtime/hooks/session-hooks.ts +5 -2
- package/packages/piagent-core/runtime/hooks/session-start-hook.ts +50 -18
- package/packages/piagent-core/runtime/hooks/tool-result-hook.ts +53 -20
- package/packages/piagent-core/runtime/hooks/tool-result-metadata.ts +9 -0
- package/packages/piagent-core/runtime/hooks/tool-result-navigation.ts +36 -0
- package/packages/piagent-core/runtime/hooks/tool-result-retrieval.ts +42 -0
- package/packages/piagent-core/runtime/input/chat-images.ts +1 -1
- package/packages/piagent-core/runtime/inspection/activity-event-adapter.ts +1 -1
- package/packages/piagent-core/runtime/inspection/same-process-bridge-proof.ts +1 -1
- package/packages/piagent-core/runtime/inspection/task-handoff-history.ts +2 -2
- package/packages/piagent-core/runtime/inspection/tool-failure-classification.ts +49 -8
- package/packages/piagent-core/runtime/inspection/webui-snapshot.ts +61 -15
- package/packages/piagent-core/runtime/inspection/workspace-file-reader.ts +2 -132
- package/packages/piagent-core/runtime/model/model-route-policy.ts +33 -13
- package/packages/piagent-core/runtime/model/model-route-types.ts +10 -6
- package/packages/piagent-core/runtime/model/provider-wire-fingerprint.ts +20 -0
- package/packages/piagent-core/runtime/model/service-tier-runtime.ts +242 -0
- package/packages/piagent-core/runtime/policy/source-worktree-transaction.ts +75 -14
- package/packages/piagent-core/runtime/product/activity-inspector.ts +6 -3
- package/packages/piagent-core/runtime/product/edit-verifier-timing.ts +26 -0
- package/packages/piagent-core/runtime/product/efficiency-metrics.ts +12 -7
- package/packages/piagent-core/runtime/product/operator-projections.ts +8 -3
- package/packages/piagent-core/runtime/product/task-usage-hooks.ts +78 -0
- package/packages/piagent-core/runtime/product/task-usage.ts +104 -0
- package/packages/piagent-core/runtime/quality/protected-refusal-handoff.ts +35 -0
- package/packages/piagent-core/runtime/recovery/acceptance-recovery-guidance.ts +21 -0
- package/packages/piagent-core/runtime/recovery/continuation-budget.ts +11 -2
- package/packages/piagent-core/runtime/recovery/diagnostic-delivery.ts +61 -0
- package/packages/piagent-core/runtime/recovery/handoff-projection.ts +192 -57
- package/packages/piagent-core/runtime/recovery/handoff-verifier-binding.ts +24 -0
- package/packages/piagent-core/runtime/recovery/independent-verification-recovery.ts +79 -0
- package/packages/piagent-core/runtime/recovery/recovery-policy.ts +27 -39
- package/packages/piagent-core/runtime/recovery/resume-state.ts +8 -5
- package/packages/piagent-core/runtime/registration/activity-inspector-command.ts +2 -1
- package/packages/piagent-core/runtime/registration/context-commands.ts +12 -8
- package/packages/piagent-core/runtime/registration/operator-catalogs.ts +4 -9
- package/packages/piagent-core/runtime/registration/policy-tools.ts +5 -3
- package/packages/piagent-core/runtime/registration/session-commands.ts +9 -7
- package/packages/piagent-core/runtime/registration/session-wait-tool.ts +54 -0
- package/packages/piagent-core/runtime/registration/task-completion-tools.ts +27 -11
- package/packages/piagent-core/runtime/registration/task-start-conditional-mutation.ts +45 -0
- package/packages/piagent-core/runtime/registration/task-start-guidance.ts +5 -2
- package/packages/piagent-core/runtime/registration/task-start-tool.ts +23 -23
- package/packages/piagent-core/runtime/registration/workflow-commands.ts +64 -93
- package/packages/piagent-core/runtime/session/completion-signals.ts +23 -0
- package/packages/piagent-core/runtime/session/message-signals.ts +6 -22
- package/packages/piagent-core/runtime/session/retrieval-evidence-runtime.ts +188 -0
- package/packages/piagent-core/runtime/session/runtime-state.ts +29 -35
- package/packages/piagent-core/runtime/session/system-prompt.ts +3 -3
- package/packages/piagent-core/runtime/session/uncertain-send-continuation.ts +231 -0
- package/packages/piagent-core/runtime/session/usage.ts +4 -3
- package/packages/piagent-core/runtime/tools/apply-patch-tool.ts +6 -6
- package/packages/piagent-core/runtime/tools/phase-tool-runtime.ts +1 -1
- package/packages/piagent-core/runtime/tools/phase-tools.ts +3 -2
- package/packages/piagent-core/runtime/tools/session-wait.ts +42 -0
- package/packages/piagent-core/runtime/tools/tool-groups.ts +10 -3
- package/packages/piagent-core/runtime/trajectory/trajectory-runtime.ts +192 -5
- package/packages/piagent-core/runtime/trajectory/trajectory-types.ts +3 -2
- package/packages/piagent-core/runtime/verification/acceptance-api-baseline.js +488 -0
- package/packages/piagent-core/runtime/verification/completion-preparation.ts +22 -0
- package/packages/piagent-core/runtime/verification/composite-completion-finalizer.ts +105 -0
- package/packages/piagent-core/runtime/verification/composite-journal-anchor.ts +181 -0
- package/packages/piagent-core/runtime/verification/composite-runtime-binding.ts +76 -0
- package/packages/piagent-core/runtime/verification/composite-scoped-mediation.ts +318 -0
- package/packages/piagent-core/runtime/verification/composite-session-persistence.ts +175 -0
- package/packages/piagent-core/runtime/verification/composite-task-publication.ts +273 -0
- package/packages/piagent-core/runtime/verification/exact-verifier-reuse.ts +11 -11
- package/packages/piagent-core/runtime/verification/host-project-verification.ts +71 -0
- package/packages/piagent-core/runtime/verification/independent-acceptance-runtime.ts +500 -0
- package/packages/piagent-core/runtime/verification/runtime-assurance-facts.ts +500 -0
- package/packages/piagent-core/runtime/verification/runtime-contract-runner.ts +107 -0
- package/packages/piagent-core/runtime/verification/shell-verification-snapshots.ts +56 -0
- package/packages/piagent-core/runtime/workflows/change-clarification.ts +61 -0
- package/packages/piagent-core/runtime/workflows/input-routing.ts +21 -14
- package/packages/piagent-core/runtime/workflows/runtime-intake-compaction.ts +44 -7
- package/packages/piagent-core/runtime/workflows/task-followup-policy.ts +163 -0
- package/packages/piagent-core/runtime/workflows/task-intake.ts +221 -242
- package/packages/piagent-core/runtime/workflows/task-repair-intent.ts +67 -0
- package/packages/piagent-core/runtime/workflows/task-scope-resolution.ts +83 -0
- package/packages/piagent-core/runtime/workflows/webui-runtime-command.ts +5 -2
- package/packages/piagent-core/runtime/workflows/webui-workflow.ts +39 -32
- package/packages/piagent-core/runtime/workflows/workflow-follow-up.ts +33 -0
- package/packages/piagent-core/security/workspace-file-reader.ts +132 -0
- package/packages/piagent-webui/dist/client/assets/{MarkdownMessage-B4XehTCU.js → MarkdownMessage-DMU7Xe_O.js} +1 -1
- package/packages/piagent-webui/dist/client/assets/index-Cui9AAV_.js +176 -0
- package/packages/piagent-webui/dist/client/assets/{index-BV-_03yl.css → index-DVahUVWy.css} +1 -1
- package/packages/piagent-webui/dist/client/index.html +2 -2
- package/packages/piagent-webui/extension/dispatch-user-entry.ts +13 -0
- package/packages/piagent-webui/extension/piagent-webui.ts +10 -2
- package/packages/piagent-webui/extension/review-controller.ts +29 -6
- package/packages/piagent-webui/extension/same-session-bridge.ts +6 -7
- package/packages/piagent-webui/extension/session-stream-adapter.ts +60 -11
- package/packages/piagent-webui/extension/source-mutation-controller.ts +29 -3
- package/packages/piagent-webui/extension/source-open-controller.ts +29 -7
- package/packages/piagent-webui/extension/source-revert-controller.ts +26 -3
- package/packages/piagent-webui/gateway/gateway-events.ts +22 -5
- package/packages/piagent-webui/gateway/gateway-service.ts +7 -2
- package/packages/piagent-webui/gateway/gateway-session-stream.ts +141 -19
- package/packages/piagent-webui/gateway/rpc-ui-context.ts +34 -9
- package/packages/piagent-webui/gateway/runtime-command-controller.ts +46 -6
- package/packages/piagent-webui/gateway/runtime-session-controls.ts +17 -2
- package/packages/piagent-webui/gateway/session-catalog.ts +9 -3
- package/packages/piagent-webui/gateway/session-command-controller.ts +29 -9
- package/packages/piagent-webui/gateway/session-effective-options.ts +2 -9
- package/packages/piagent-webui/gateway/session-inspection-registry.ts +14 -6
- package/packages/piagent-webui/gateway/session-operation-settlement.ts +28 -0
- package/packages/piagent-webui/gateway/session-prompt-dispatch.ts +37 -0
- package/packages/piagent-webui/gateway/session-runtime-close.ts +36 -0
- package/packages/piagent-webui/gateway/session-runtime-factory.ts +183 -6
- package/packages/piagent-webui/gateway/session-runtime-ownership.ts +48 -0
- package/packages/piagent-webui/gateway/session-runtime-state.ts +24 -0
- package/packages/piagent-webui/gateway/session-runtime-supervisor.ts +114 -114
- package/packages/piagent-webui/server/core-inspection-provider.ts +73 -14
- package/packages/piagent-webui/server/loopback-server.ts +9 -7
- package/packages/piagent-webui/server/terminal-delivery-receipt.ts +144 -0
- package/packages/piagent-webui/server/transcript-projection.ts +65 -12
- package/packages/piagent-webui/shared/message-correlation.ts +25 -0
- package/schemas/approved-host-contracts.schema.json +973 -0
- package/schemas/benchmark-attempt-outcome.schema.json +303 -0
- package/schemas/benchmark-independent-verification-plan.schema.json +34 -0
- package/schemas/composite-criterion.schema.json +788 -0
- package/schemas/contract-family-library.schema.json +28 -0
- package/schemas/contract-selection-recipe.schema.json +31 -0
- package/schemas/failure-evidence.schema.json +2 -2
- package/schemas/helper-request.schema.json +16 -4
- package/schemas/host-contract-plan.schema.json +25 -0
- package/schemas/piagent-webui/gateway-protocol-v1.schema.json +16 -2
- package/schemas/piagent-webui/runtime-command-v1.schema.json +26 -3
- package/schemas/piagent-webui/runtime-event-v2.schema.json +32 -1
- package/schemas/piagent-webui/session-live-state-v1.schema.json +2 -0
- package/schemas/piagent-webui/snapshot-v1.schema.json +3 -0
- package/schemas/piagent-webui/source-change-v1.schema.json +12 -0
- package/schemas/piagent-webui/transcript-v1.schema.json +2 -1
- package/schemas/public-contracts/codex-mcp-metadata-v1.schema.json +206 -0
- package/schemas/public-contracts/codex-mcp-metadata-v2.schema.json +228 -0
- package/schemas/public-contracts/codex-mcp-metadata-v3.schema.json +233 -0
- package/schemas/public-contracts/revocation-v1.schema.json +87 -0
- package/schemas/public-contracts/subscription-contract-v1.schema.json +76 -0
- package/schemas/scoped-project-verification-receipt-v2.schema.json +83 -0
- package/schemas/scoped-project-verification-receipt-v3.schema.json +295 -0
- package/schemas/scoped-verification-receipt-v1.schema.json +76 -0
- package/schemas/task-contract.schema.json +30 -0
- package/scripts/approve-independent-verification.mjs +57 -0
- package/scripts/benchmark-arm-observer.mjs +320 -0
- package/scripts/benchmark-budget-ipc.mjs +34 -0
- package/scripts/benchmark-budget-launcher.mjs +91 -0
- package/scripts/benchmark-budget-processes.mjs +133 -0
- package/scripts/benchmark-budget-publication.mjs +228 -0
- package/scripts/benchmark-budget-runtime.mjs +136 -0
- package/scripts/benchmark-candidate-ablation.mjs +265 -0
- package/scripts/benchmark-codex-journey.mjs +406 -0
- package/scripts/benchmark-independent-verification.mjs +628 -0
- package/scripts/benchmark-journey-outcome.mjs +92 -0
- package/scripts/benchmark-production-v3-human-review.mjs +192 -0
- package/scripts/benchmark-public-input-catalog.mjs +158 -0
- package/scripts/benchmark-registered-plan-author.mjs +355 -0
- package/scripts/benchmark-registered-plan-recipe-support.mjs +85 -0
- package/scripts/benchmark-registered-plan-recipes-backend.mjs +165 -0
- package/scripts/benchmark-registered-plan-recipes-data.mjs +164 -0
- package/scripts/benchmark-registered-plan-recipes-platform.mjs +165 -0
- package/scripts/benchmark-runner-completion.mjs +133 -0
- package/scripts/benchmark-runner-configuration.mjs +159 -0
- package/scripts/benchmark-runner-core.mjs +217 -388
- package/scripts/benchmark-runner-finalization.mjs +140 -27
- package/scripts/benchmark-runner-provider-boundary.mjs +44 -0
- package/scripts/benchmark-runner-schedule.mjs +256 -0
- package/scripts/benchmark-runner-support.mjs +136 -4
- package/scripts/benchmark-runner.mjs +95 -18
- package/scripts/benchmark-scoped-broker-custody.mjs +483 -0
- package/scripts/benchmark-scoped-docs-verifier.mjs +203 -0
- package/scripts/benchmark-scoped-frozen-qualification.mjs +676 -0
- package/scripts/benchmark-scoped-pi-router.mjs +196 -0
- package/scripts/benchmark-scoped-project-verification-receipt.mjs +49 -0
- package/scripts/benchmark-scoped-project-verifier.mjs +461 -0
- package/scripts/benchmark-scoped-session-custody.mjs +599 -0
- package/scripts/benchmark-scoped-session-factory.mjs +342 -0
- package/scripts/benchmark-scoped-tool-broker.mjs +523 -0
- package/scripts/benchmark-scoped-verification-supervisor.mjs +773 -0
- package/scripts/benchmark-session-evaluator.mjs +169 -0
- package/scripts/benchmark-session-provider-boundary.mjs +62 -0
- package/scripts/benchmark-session-usage.mjs +28 -0
- package/scripts/benchmark-session.mjs +343 -50
- package/scripts/benchmark-webui-journey.mjs +678 -0
- package/scripts/check-public-wording.mjs +46 -0
- package/scripts/configure-model-scope.sh +6 -2
- package/scripts/fs4-readiness-evaluation.mjs +7 -1
- package/scripts/install-global.sh +2 -2
- package/scripts/model-route-evaluation-core.ts +1 -0
- package/scripts/phase-tools-evaluation.mjs +1 -0
- package/scripts/pi-auto.sh +7 -1
- package/scripts/pi-model-route.mjs +1 -1
- package/scripts/pi-usage-history.mjs +201 -11
- package/scripts/piagent-cli.mjs +8 -0
- package/scripts/private-holdout-readiness.mjs +7 -1
- package/scripts/public-evaluation-exposure.mjs +140 -0
- package/scripts/select-independent-verification.mjs +62 -0
- package/scripts/setup.sh +2 -2
- package/scripts/typescript-loader.mjs +135 -1
- package/scripts/update-global.mjs +6 -7
- package/scripts/verify-local.sh +37 -56
- package/scripts/verify-release-identity.mjs +5 -3
- package/templates/global/settings.json +5 -1
- package/packages/piagent-webui/dist/client/assets/index-CgOEyRPG.js +0 -176
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
<!-- language: en -->
|
|
2
|
+
|
|
3
|
+
# PCL-A offline implementation and evaluation protocol
|
|
4
|
+
|
|
5
|
+
Plan PCL-2026-09-06, PCL-A approved. This document describes the source freeze; the local qualification verdict, finite register and hash-bound checkpoint are in `.tmp/pcl-20260906/`. Implementation work and release qualification are separate states. No release or paid readiness is asserted by this document. Current continuation status: stage 5 completed 5,225 tests (5,150 PASS, 17 FAIL, 58 SKIP, zero cancelled), with browser/typecheck PASS and all 2,720 files unchanged. The default stable-dedup expectation closed in full; no new failure names appeared. Stage 6 repairs a separately reproduced API-evidence dispatch error; that changed candidate still requires full qualification.
|
|
6
|
+
|
|
7
|
+
## Implemented scope
|
|
8
|
+
|
|
9
|
+
C0 verified HEAD `c3a4427396984554eb1571e687caba0f831176ae`, branch `codex/piagent-35-recovery-20260831`, 157 initial status entries and zero staged paths. All 153 E14 recovery file hashes and all 188 sealed artifact hashes matched. The original PCL checkpoint is retained as parent. The preservation manifest and file preimages distinguish inherited recovery from PCL hunks. E14 is historical evidence, not the identity of this candidate.
|
|
10
|
+
|
|
11
|
+
C1 writes numeric metadata to the existing bounded context telemetry stream. Each SDK turn receives a request identity bound to the task at turn start. Assistant message-end and turn-end share that identity; cumulative terminal replay is deduplicated. Late fields can fill unknown values, while contradictory known amounts, unsupported deltas, session totals, missing terminals, multiple observed dispatches and incomplete telemetry make totals unknown. Error/abort attempts with reported usage remain in accounting; synthetic zero usage on an error or abort is not evidence of zero billing. SDK estimated cost is separate from billed cost, which remains unavailable without a billing receipt. Existing benchmark exact accounting was not replaced or regraded.
|
|
12
|
+
|
|
13
|
+
Tool counts come from SDK post-execution tool-result hooks, reconciled with attempt and terminal events. SDK start events alone also include blocked, invalid and truncated calls and are not counted as execution. The live task view and `/context efficiency` use the same task report. Solver projections now require the decision reference in the task's persisted trajectory, preventing a later task in the same session from changing an earlier task's reported route. Older unbound records remain readable with unknown solver attribution.
|
|
14
|
+
|
|
15
|
+
Successful source mutations record the existing post-edit tree and workspace revision in tool-result metadata. First-correct-edit timing requires an observed mutation, the same tree and revision in all exact current verifiers after the edit, and an existing approved completion gate supplied by the live view. It measures the first observed edit that reached the accepted final source, not the independent correctness of one hunk. Pending, unsupported, stale, corrupt or unapproved tasks remain unknown. This metric cannot grant acceptance. The standalone efficiency command has no current completion gate and therefore keeps that timing unknown.
|
|
16
|
+
|
|
17
|
+
C2 measures UTF-8 JSON bytes for instructions, tools, input and the remaining envelope at the existing provider payload hook. Components reconcile to the serialized payload. This observation is bounded, stores no payload text, and is distinct from HTTP transport bytes, tokenization and later extensions' transformations. The signed fingerprint contract is unchanged. Equivalent fingerprints do not prove a cache hit; SDK-reported cache read/write tokens remain separate evidence. No new context reduction was justified by the available observations, so prompt text, retrieval selection and governor thresholds were retained.
|
|
18
|
+
|
|
19
|
+
C3–C5 reuse existing behavior. Freshness checks reject proven file drift and renamed old paths; bounded edit recovery carries the actual current file and preserves earlier successful edits. Path, ambiguous-anchor and stale-anchor failures remain distinct, while permission errors and failing code remain failures. Existing long-output capture/readback, exact exit-code handling, protected paths and tool-pair controls are exercised in the session tests. Tiny tasks use existing audited phase skips. Shadow/recommendation results stay distinct from enforcement. Recovery continues to use the single global continuation maximum of one and its progress signature, with no second counter or automatic external replay.
|
|
20
|
+
|
|
21
|
+
Memory remains advisory. Existing expiry, protected-path selection and citation checks were retained. Historical hints can remain visible until expiry; they are not silently promoted to fresh source or acceptance evidence. Current reads, task requirements and user corrections take precedence. Rename/source-change controls reject stale source evidence. The existing lossless task ledger, authority snapshot, open obligations and uncertain-side-effect handoff survive the tested resume paths. Reduced rereading or real-work memory benefit remains unproven; no additional store was created.
|
|
22
|
+
|
|
23
|
+
## Offline evidence and limits
|
|
24
|
+
|
|
25
|
+
The evidence manifest records exact commands, logs, hashes and outcomes. Selected controls before freeze include:
|
|
26
|
+
|
|
27
|
+
| Evidence | Observed scope |
|
|
28
|
+
|---|---|
|
|
29
|
+
| `11-c1-c2-tests.log` | 22 PASS, 0 FAIL/SKIP: accounting, task attribution, timing, payload and operator reports |
|
|
30
|
+
| `09-c2-c5-controls.log` | 186 PASS, 0 FAIL/SKIP: governor, ledger, output handling, tools, phases, recovery, authority and resume |
|
|
31
|
+
| `15-sdk-compaction-resume.log` | Historical SDK/compaction control; its native-read claim was invalidated by the execution-count audit described below |
|
|
32
|
+
| `16-c3-c6-controls.log` | 31 PASS / 5 FAIL: exposed the added fingerprint field's incompatibility with signed receipts; failure retained |
|
|
33
|
+
| `17-wire-contract-fix.log` | 30 PASS, 0 FAIL/SKIP after keeping measurements outside the signed fingerprint contract |
|
|
34
|
+
| `12-typecheck.log`, `13-architecture.log` | Typecheck and architecture budgets passed at that revision; final checks bind the freeze |
|
|
35
|
+
|
|
36
|
+
Earlier failing marker fixtures used invalid digest namespaces; their logs are retained. The corrected controls use the runtime's namespaced tree and revision identities. Initial line-budget failures were addressed by putting metadata in the existing helper and keeping the composition hook within its original budget. No gate was relaxed. Counts above overlap and must not be added into a single unique-test total.
|
|
37
|
+
|
|
38
|
+
The installed-SDK test uses a local scripted model runtime, synthetic credentials and test-owned source/session directories. It makes no model/provider call. It proves SDK hook and compaction protocol behavior, not production billing completeness or model quality. It preserves corrections and tool pairing after durable compaction without a summarizer call. Directed model summaries, opaque provider state and every provider-specific late billing path have not been verified against a live provider.
|
|
39
|
+
|
|
40
|
+
At freeze, run `bash scripts/verify-local.sh --offline` once. Preserve its first failure. If it stops before the full test runner or other qualification gates, execute those unreached commands once as diagnostic qualification evidence, with the canonical verdict still FAIL. Never relabel component passes as a canonical pass. Final results and the exact freeze are recorded in `20-candidate-freeze.json`, `31-pcl-checkpoint.json` and `32-offline-report.md` under the local evidence directory. Subsequent source changes require a new identity and justified checks.
|
|
41
|
+
|
|
42
|
+
The inherited full result remains 4,820 PASS / 22 FAIL / 222 SKIP. Eighteen default correct-completion expectations remain required even when configured controls pass. Docs full configured SDK integration and the expiry/reference arity decision remain open. R5's 108 sessions/54 pairs are scripted evidence. Run-6 remains INVALID_MEASUREMENT: 13 started, 12 accepted exact, one unknown. No old evidence was resumed, reused as a new measurement, merged or regraded.
|
|
43
|
+
|
|
44
|
+
## C6 version decision prepared for review
|
|
45
|
+
|
|
46
|
+
Keep SDK 0.84.1 for this PCL candidate. Its local package version, peer pins, hook imports, dispatch order, tool execution, usage/cache fields and durable compaction/resume were checked. Existing steering/abort and model-policy tests form part of offline qualification. Exact user model and effort remain pinned; model capability metadata is not a quality ranking. No package, lockfile or global installation changed for PCL.
|
|
47
|
+
|
|
48
|
+
The existing research identified 0.85.1 as a future candidate and an import correction relative to 0.85.0. Those release notes do not prove compatibility with this source. Proposed PCL-SDK decision: permit a separate, isolated version comparison only if a required unsupported contract or reproducible SDK defect justifies it; otherwise retain 0.84.1. The comparison must cover import closure, hook order, steering/abort, terminal usage, cache fields, complete tool pairing, compaction/resume and current phase/source identity. All causal arms would use the same chosen SDK. No upgrade is performed or requested as a prerequisite for finishing offline work.
|
|
49
|
+
|
|
50
|
+
Support status: installed 0.84.1 with the local scripted runtime is offline-tested for the stated contracts; live provider billing/model quality remains unknown. Other installed or future SDK/model combinations are not newly certified by this work.
|
|
51
|
+
|
|
52
|
+
## C7 evaluation protocol, not campaign authority
|
|
53
|
+
|
|
54
|
+
[Twenty-four specifications](piagent-core-evaluation-specs-2026-09-06.json) propose 12 development and 12 holdout tasks, with two from each split in each of six work categories. Every row has a requirement, behavioral criterion, distinct proposed root-cause cluster and proposed verifier. No row has a selected repository, source hash or rights approval. Commands are proposals and are not certified valid until bound to an authorized source. Public task outlines are not sealed unseen holdout work. A custodian must choose actual authorized backlog tasks, inspect prior PRB/development exposure, reject related root causes crossing splits and seal the holdout before any evaluation. Missing source rights cannot be replaced by invented fixtures presented as real work.
|
|
55
|
+
|
|
56
|
+
Keep three evidence layers distinct: offline protocol tests; same-model/same-SDK feature comparisons; product comparison and real-work retention. Baselines retain the same necessary safety guards, permissions and verifier authority. Hold task/source identity, provider/model snapshot, effort, SDK, tools, limits and cache condition constant. Record order and cold/warm state; reset test-owned memory between arms to prevent carryover. Outcome is correct completion of the whole contract, wrong blocked, or finite unsupported handoff. Handoff does not count as completion. Record regression, independent authorized behavioral results, accepted source identity, user corrections and rework after handoff.
|
|
57
|
+
|
|
58
|
+
Only two follow-up hypotheses are retained:
|
|
59
|
+
|
|
60
|
+
1. Existing exact recovery snapshots may reduce failed-edit rereads without changing source correctness. The current-file recovery and post-execution metadata establish a measurable path, not a benefit estimate. Falsifier: replayed successful hunks, wrong targets, additional failed attempts or higher total task cost. Compare the same existing recovery feature on/off only after treatment approval.
|
|
61
|
+
2. Existing governor projection and deterministic compaction may reduce duplicate payload residency without losing corrections, pairing or source freshness. UTF-8 reconciliation and installed-SDK controls establish observability and protocol preservation. Falsifier: more retrieval/tool work, stale evidence, lost obligation, cache loss outweighing savings or worse completion. Do not remove more context before evidence supports a specific hunk.
|
|
62
|
+
|
|
63
|
+
Evaluate total task input/output/cache tokens, known billed failed attempts, missing-usage rate, elapsed time and user rework jointly with correct completion. Keep billing receipts distinct from SDK rate estimates, and unknown distinct from zero. Report paired outcomes and uncertainty; 12 holdout tasks cannot establish a universal two-percentage-point noninferiority claim. After two development rounds without new evidence for one hypothesis, stop and reassess. Looking at holdout failure and fixing against it makes that task development evidence; obtain a separately sealed replacement rather than rerunning it as unseen.
|
|
64
|
+
|
|
65
|
+
No provider sessions are allocated. PCL-EVAL must separately bind actual corpus, treatments, quality criteria, repetitions, count and total budget including failures, summaries and helpers before execution. D-026 stays bound to its old candidate: combined cap 184, used 76, fresh maximum 108, zero retry, 3,000,000 tokens/four hours, gates 12→18→54→108, stop on unknown and no extra canary. Choosing PCL for that campaign requires qualification and explicit candidate/treatment rebind; it does not move the 108 sessions onto this proposed corpus. No paid authority or independent verifier is created here.
|
|
66
|
+
|
|
67
|
+
## Handoff and rollback
|
|
68
|
+
|
|
69
|
+
Use `21-pcl-hunks.patch` and the per-file preimage/postimage hashes in `20-candidate-freeze.json`. Reverse only PCL hunks when current postimages still match; inspect conflicts and stop that rollback if later edits overlap. Never restore the whole file from HEAD. The original dirty recovery diff and all source preimages remain in local evidence. New PCL files are identified separately. Final preservation checks verify unchanged inherited files, PCL-only delta reconstruction, branch/HEAD/staging and sealed E14 integrity.
|
|
70
|
+
|
|
71
|
+
Next action is to read the final finite register and qualification checkpoint, then resolve the specific remaining contract/quality gates before any release or paid candidate selection. The offline deliverables do not claim better model reasoning, lower billed tokens or completed real-world tasks.
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
A subsequent installed-SDK negative control found that `tool_execution_start` also fires for blocked/invalid/truncated calls (`34-tool-start-reproducer.log`: two reads reported when only one executed). Freeze 1 was invalidated and its full test attempt interrupted; all logs are retained under `freeze-1/`. The correction uses the existing afterToolCall-backed `tool_result` hook and reconciles attempted, executed and not-executed calls. Incomplete execution evidence and incomplete failed-attempt totals remain unknown with observed subtotals separate. Final qualification is a justified new freeze after this concrete runtime compatibility correction, not a rerun to seek a green result. The installed-SDK regression now includes blocked, invalid and truncated calls alongside the real successful read.
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
The execution audit also found an error in the new test fixture: SDK `tools` expects tool names, but the first fixture supplied a tool-definition object. Earlier logs 14/15 therefore do not prove native read execution. The corrected fixture uses the installed `read` name and requires a successful persisted tool result containing the test-owned file text, plus separate blocked, invalid and truncated negatives. `42-execution-and-sdk-readback.log` is the replacement evidence for that claim. Existing runtime and benchmark expected outcomes were not changed. The documentation language-marker check was also corrected by adding explicit language metadata to the three PCL Markdown documents; research content and source references remain intact.
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
Freeze 2 completed 5,174 tests: 4,872 PASS / 22 FAIL / 280 SKIP / 0 cancelled. Eighteen failures retain default correct-completion expectations. The other four exposed maintenance required by the new PCL observation hooks/tests: the exact hook registration list lacked three new events, and three readiness checks rejected a stale public-test exposure digest. The registration assertion now includes exactly those events while retaining tool/command counts. Public exposure generation showed only `visibleTrees[tests].fileCount` and `.sha256` changed; those metadata fields were refreshed. No benchmark criterion, expected task outcome, private artifact, independent custody receipt or provider authority changed. Freeze-2 evidence is retained; final qualification binds a new freeze after these concrete test/inventory corrections.
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
## Full continuation and scoped runtime integration
|
|
84
|
+
|
|
85
|
+
The later stage-3 canonical run completed on an unchanged 2,719-file candidate: 5,179 tests, 5,103 PASS, 18 FAIL, zero cancelled and 58 SKIP. Browser and typecheck passed; the canonical verdict remains FAIL. All failures are the retained default correct-completion expectations. This supersedes neither E14 nor the earlier PCL freezes. Full receipts and all skip entries are in `.tmp/pcl-full-20260906/53-stage3-final-result.json` and `57-stage3-skip-inventory.json`.
|
|
86
|
+
|
|
87
|
+
Stage 4 fixes two additional scoped runtime gaps: native completed operations now retire exact closed custody before the next operation, and unchanged permitted files no longer require artificial writes during review. Unknown unjournaled changes and out-of-scope mutations remain blocked. The actual SDK configured documentation path now covers scout, implement, no-change review and closed disk readback; wrong content remains blocked. These fixtures use explicit test-owned host contracts and no real model/provider. Default completion authority is unchanged.
|
|
88
|
+
|
|
89
|
+
The initial 108-test regression passed. A subsequent 42-PASS/1-FAIL run was invalidated by a type-only source edit during execution; source-bound host approval correctly rejected the changed installed digest even though emitted runtime bytes were identical. The source-stable follow-up passed all 64 tests without failure, cancellation or skip. The final full qualification must bind the subsequent stage-4 manifest; these targets alone are not release qualification. No SDK upgrade, source rights, paid campaign or rebind was created.
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
## Stage 5: default API completion and quantified input preservation
|
|
93
|
+
|
|
94
|
+
The existing task-baseline API reader now supports a closed local-array result representation, alongside its existing primitive grammar. New collection support requires unshadowed bindings, supported local collection calls and consistent normal return paths. Captured task/session/source identity, all current verifiers, unchanged public signatures and unrelated public implementation closures remain mandatory. Exact callable repair directives are routed through the existing source-origin resolver with an exact owning path. Matching array representation does not establish behavioral equivalence or element semantics.
|
|
95
|
+
|
|
96
|
+
A separate executed counterexample showed that “Do not mutate either argument” could accept a mutating second argument when only the first was compared with its snapshot. The quantifier check now selects the existing all-argument proof path for both/either/all/any. This strengthens the required evidence; it does not admit unsupported grouped snapshots or infer missing input behavior.
|
|
97
|
+
|
|
98
|
+
The actual source passed 161 focused regression tests, typecheck and architecture checks. The unchanged default production data-journey test passed both selected cases through SDK 0.84.1 and loopback HTTP/WebSocket: the correct stable deduplication implementation completed scout, implement and verify, while the equal-sequence mutant failed actual project verification and remained pending. All 2,720 candidate files were unchanged during this two-case run. No independent host contract, oracle, prompt, test expectation or paid provider was added. This evidence covers the live session, not a new cold-readback claim.
|
|
99
|
+
|
|
100
|
+
The stage-4 full result remains 5,106 PASS / 18 FAIL / 58 SKIP, with zero cancelled. Stage-5 targets establish progress on one of those default expectations; they do not establish a new full failure count or overall qualification. Preimages and source/test hunks are retained in `90-stage5-preservation.json` and `90-stage5-source-tests.patch`. The public exposure change is limited to the tests-tree digest; all other metadata and the 469-file count are unchanged.
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
## Stage 6: explicit API intent retains baseline authority
|
|
104
|
+
|
|
105
|
+
An executed counterexample found that an exact “Preserve the API…” criterion was inferred as a boundary case. The receipt then accepted passing boundary tests even when the exported function gained a parameter, and even without the baseline reader. The same exact API clause now dispatches to the existing task-baseline reader regardless of its inferred category. Its original text, hash and category remain intact. The recovery projection follows the same route. The runtime reader still requires the exact source-change task binding, task-start baseline, current tree and all configured verifiers; category inference no longer substitutes for API evidence.
|
|
106
|
+
|
|
107
|
+
The wrong signature remains pending with an explicit API-change reason; the compatible API receives task-baseline evidence. A missing reader cannot inherit a previously satisfied receipt. Two executed reproductions changed from failure to pass, and 70 API/inference regression tests passed. No benchmark source, prompt, grader, oracle, threshold, expected outcome, SDK or provider authority changed. The expiry/reference arity conflict remains open; this dispatch repair does not make an incompatible reference correct.
|
|
108
|
+
|
|
109
|
+
The completed stage-5 evidence is in `.tmp/pcl-full-20260906/107-stage5-final-result.json`; its 58 skips, current criteria, finite register and requirement audit are retained in 107–114. Stage-6 preimages are in `116-stage6-preservation.json`, the failing reproduction in `115-api-intent-reproducer.log`, the repaired reproduction in `117-api-intent-repair.log`, and the 70-test regression in `118-api-intent-regressions.log`. Further targeted and full qualification are recorded against the subsequent stable manifest, not inferred from these small checks.
|
|
110
|
+
|
|
111
|
+
Broad regression initially exposed two correct temporal-helper journeys previously relying on the weaker dispatch. The existing API reader now recognizes closed boolean public return representations, including bounded Date helpers; it continues to reject changed signatures, mixed or unknown returns, escaping or rebound function bindings, computed intrinsics and unsupported calls. This is API shape evidence only. Invalid-input semantics and nonmutation retain their separate source requirements. Existing primitive uses of a parameter named Date remain supported when no Date intrinsic is used.
|
|
112
|
+
|
|
113
|
+
The registered guard also exposed a task-start manifest whose only unavailable bytes belonged to a protected configuration file. The reader can now use unrelated source from a complete inventory whose unavailable status is exclusively protected entries. Protected target bytes, truncated inventories, failed reads and oversized entries still provide no evidence; neither the manifest nor the protected file is rewritten or opened. All four existing composed-helper guard cases then had their expected outcomes: two correct implementations completed and two incorrect implementations remained pending. A new negative fixture initially failed to create its intended dirty entry; that setup was corrected by an actual byte change, with its failing log retained. Evidence 123–127 distinguishes these intermediate outcomes from subsequent qualification. The earlier 122 target freeze was superseded before any SDK or full run.
|
|
114
|
+
|
|
115
|
+
The subsequent 62-file acceptance regression completed 829 tests: 826 PASS, zero FAIL, three SKIP, zero cancelled (`129-stage6-acceptance-regressions-receipt.json`). Typecheck and all 634 architecture checks passed (130). This regression result is separate from installed-SDK and full qualification; the three skips are not counted as verified.
|
|
116
|
+
|
|
117
|
+
Installed SDK 0.84.1 qualification ran four unchanged native HTTP/WebSocket journeys: three PASS and one FAIL, zero skips or cancellations (132–133), with all 2,720 files unchanged. Both stable-dedup controls retained their expected outcomes, as did the expiry mutant. The expiry reference still failed its existing completed expectation; its exact API criterion now correctly remains pending instead of borrowing a boundary test. This is a retained failure, not a target waiver or a new full verdict. Full qualification uses the subsequent stage-6 freeze; only these two documentation files changed after the SDK run.
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
## Stage 7: preserve optional API metadata and bind compound input rejection
|
|
121
|
+
|
|
122
|
+
Stage6 full qualification completed on all2,720 unchanged files: 5,253 tests, 5,177 PASS,18 FAIL,58 SKIP,zero cancelled; browser/typecheck PASS. Evidence137 records all18 leaf failures and all skips. The17 prior default failures remain, plus the owned-Date guard whose baseline parameter timestamp differs from expiresAt in its implementation. The API reader treats that name difference as a contract change; the fixture and completed expectation remain intact pending resolution.
|
|
123
|
+
|
|
124
|
+
Ten current preimages were preserved before applying the reviewed143/155 hunks (156–158). The existing API reader now retains supported default values and their positions plus observable function.length. Closed numeric public returns admit bounded local reduce callbacks without treating arithmetic as equivalent. Exact Repair directives share the existing Fix source-origin rule; foreign paths, ambiguous examples and unrelated public implementation changes remain rejected.
|
|
125
|
+
|
|
126
|
+
An actual executed counterexample showed a passing verifier covering tax rejection could satisfy a money/quantity criterion even while bad line data returned1. The existing integer-parameter route now binds each explicitly declared scalar input to immediate source guards and isolated negative/fractional witnesses. Incidental invalid arguments cannot create the requested domain. Unsupported property labels, extra constraints and unbound inputs remain pending. This does not yet prove the original invoice property contract. Existing continuation maximum1 and progress-signature behavior are unchanged.
|
|
127
|
+
|
|
128
|
+
Seventy-five new controls were added to three existing test files:47 API/default/target controls,24 input-domain controls,two actual receipt controls and two registered guard journeys. Draft qualification included129 API tests,424 acceptance regressions and six guard cases, but applied-source qualification is still required. The151 regression copy was invalid because regex import rewriting altered embedded fixture strings;152 used AST-only substitution. A new153 guard test wrongly expected immediate handoff;154 checked exactly one existing continuation followed by unchanged handoff. Neither invalid result is a runtime qualification claim. The public tests inventory retains469 files and changes only its digest. No benchmark prompt,grader,oracle,threshold,expected outcome,reference source,SDK or provider authority changed.
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
The applied stage7 regression completed 904 tests:901 PASS,zero FAIL,three SKIP; typecheck and architecture passed, and all2,720 files retained their hashes (159–166). An executed API reproduction isolated the new stage6 full failure to internal parameter spelling. The comparator now permits fresh local names while conservatively rejecting retained names moved to another position. Defaults,arity,export names and return representation stay exact. Existing target/source binding and unrelated-public-body comparison remain mandatory. API shape still does not prove behavior.
|
|
132
|
+
|
|
133
|
+
This follow-up draft passed148 API tests,three source-authority receipt controls and the original owned-Date registered guard test, including both its correct completion and wrong-offset rejection. No fixture or expected outcome was modified. Five preimages were captured in167 before application;168 retains the exact hunk and20 additional controls. Applied-source and installed-SDK qualification remain separate from these draft results. The18 failures from full stage6 are not replaced by a target-only verdict.
|
|
134
|
+
|
|
135
|
+
The final applied regression ran 370 tests: 370 PASS,0 FAIL,0 SKIP,0 cancelled, including the entire original guard integration file(171). Typecheck/architecture passed. The installed-SDK run completed four unchanged invoice/expiry cases:two PASS,two FAIL,zero skipped/cancelled,with all2,720 file hashes unchanged. Invoice API preservation now receives baseline evidence; its money/quantity rejection obligation remains pending. Expiry retains malformed-date and default/signature gaps. Both mutant expectations remain satisfied. Records174–176 retain criterion-level evidence,the finite register and target qualification. A new canonical full is justified by the concrete stage6 guard regression and changed runtime behavior; these targets do not establish its verdict.
|
|
136
|
+
|
|
137
|
+
## Stage7 full and stage8 parser implementation
|
|
138
|
+
|
|
139
|
+
Stage7 canonical qualification completed with 5348 TESTS, 5270 PASS, 20 FAIL, 58 SKIPPED, 0 CANCELLED; browser=PASS, typecheck=PASS. Record `.tmp/pcl-resume-20260907/03-stage7-final-result.json` verifies all2,720 frozen files unchanged. Its leaf failure set remains authoritative; draft or targeted results do not replace it.
|
|
140
|
+
|
|
141
|
+
Stage8 reuses the existing terminal state-machine proof and bounded module statement inventory. It supports owned local output arrays only within a closed module, requires escaped-quote progress and mutually exclusive closure, and verifies all counter writes. An exact implicit terminal rejection clause can bind only to one stable export/import. Original criterion text and receipt identity remain unchanged. Record197 preserves seven current preimages;198 contains four source/test hunks. Fifty-eight parser controls and two registered guard journeys are appended to existing tests. The new guard uses a real passing verifier for both candidates: the correct parser completes and omitted escape progress stays pending with a finite handoff. No benchmark artifact, authority, counter, provider or installed SDK changed.
|
|
142
|
+
|
|
143
|
+
Draft report196 records78 parser PASS,319 direct semantic regressions PASS and2 registered guard PASS, including prototype mutation and actual executable malformed-escape counterexamples. Applied-source regression, installed SDK default journeys and subsequent frozen full remain required. CSV helper-reference's focused-error discrepancy104 remains unwaived.
|
|
144
|
+
|
|
145
|
+
## Stage9 applied; integrated qualification pending
|
|
146
|
+
|
|
147
|
+
Stage8 installed-SDK CSV public-contract completion and escaped-quote rejection passed. The helper expectation discrepancy remains a recorded FAIL. Its acceptance run was980 PASS/1 FAIL/3 SKIP; the failed execution could not confirm container creation. Exact test-owned cleanup40 and whole worker test recheck41 are separate evidence, not a rewritten broad result. Typecheck and architecture42 passed.
|
|
148
|
+
|
|
149
|
+
Stage9 preserves ten preimages and applies seven source/test files from numeric12, snapshot22 qualified by28, and resume-clock38. Numeric proof requires the declared JavaScript Number division formula, complete domains and live focused witnesses. Snapshot evidence requires stable own-data capture and comparison, an unmodified assertion/clone environment, and no intervening input restoration or snapshot mutation. The resume fixture now controls Date at its historical capture time and tests attribution just before versus at expiration; runtime retention is unchanged. Existing source behavior, benchmark contracts and completion obligations remain required. Applied regression, actual SDK pagination and stable-dedup controls, remaining finite issues and final frozen qualification are still pending.
|
|
150
|
+
|
|
151
|
+
## Stage10 Git probes applied; configured docs qualification pending
|
|
152
|
+
|
|
153
|
+
Stage9 applied regression finished1,069 PASS/0 FAIL/4 SKIP and four original pagination/stable-dedup SDK controls passed. Static checks passed; final canonical qualification remains outstanding.
|
|
154
|
+
|
|
155
|
+
Profile43/47b traces configured-docs settlement cost to repeated workspace observations and Git subprocesses. Stage10 passes an already observed HEAD-presence value to the private enumerator within the same synchronous snapshot call. It removes two redundant Git probes per root without caching across captures or removing content/material/revision checks. Seven fixture snapshots remain equal with fewer real Git calls. Three permanent fault tests preserve unavailable evidence on diff/enumeration failure and on a repository disappearing after the probe; the original implementation fails the disappearance control. Five current preimages are preserved60, including the public test inventory and docs. Applied source tests and original configured docs correct/wrong SDK journeys are still required. No benchmark contract, deadline, SDK, authority or retry budget changed.
|
|
156
|
+
|
|
157
|
+
## Stage11 applied; outer callback binding
|
|
158
|
+
|
|
159
|
+
Stage10 actual configured-docs correct and missing-restart controls pass2/2 with original deadlines. Related source/verifier/resume checks including the pinned native Pi bash module pass165/165; typecheck and architecture pass. This does not close default docs.
|
|
160
|
+
|
|
161
|
+
The rejection reader previously used the first arrow anywhere in an operation, so a direct call receiving an arrow callback lost its actual target. Stage11 unwraps only an outer arrow prefix. Five preimages preserve the two source/test changes, inventory digest and these documents. The19 added tests retain dead/skipped/unawaited, unrelated-target, altered-error, import-shadow and sync/async exclusions; anonymous function expressions keep their existing lexical exclusion. The exact retry fixture now has source/test evidence in draft, but unchanged SDK completion and mutant rejection, applied regressions and final full remain required. CSV/expiry decisions and remaining P2–P8 work are open.
|
|
162
|
+
|
|
163
|
+
## Stage12 applied; declared record integer fields
|
|
164
|
+
|
|
165
|
+
Stage11 actual retry SDK controls pass3/3: both correct variants complete and the unchanged backoff mutant stays pending. Applied acceptance checks are1.046 PASS/0 FAIL/3 SKIP; typecheck and architecture pass.
|
|
166
|
+
|
|
167
|
+
Stage12 extends the existing parameter-contract reader rather than introducing another verifier. Related task prose supplies the monetary field and positive quantity/default; a bounded synchronous reducer must guard every declared field through stable local integer helpers. Literal witnesses must isolate each invalid field while all other guarded record and scalar inputs are valid. The reader preserves source/import/error-class/verifier/tree gates and rejects missing or ambiguous context. Six source/test files, inventory digest and these documents have nine preserved preimages.
|
|
168
|
+
|
|
169
|
+
Draft v1 broad checks passed1.073 with3 explicit skips. A separate falsifier showed a test could borrow Array and replace native reduce; the final witness reader rejects that escape, with88 targeted checks including real passing-verifier receipt controls. The v1 broad receipt remains bound to its original preserved inputs. Actual applied SDK invoice, source regressions, static checks and final frozen full remain required. Benchmark prompts, reference, expectations, SDK and approval authority are unchanged.
|
|
170
|
+
|
|
171
|
+
## Stage13 applied; finite interval fields, fallback and grouped snapshots
|
|
172
|
+
|
|
173
|
+
Stage12 invoice qualification remains recorded separately: actual SDK2/2, applied regression1,101PASS/0FAIL/3SKIP, typecheck and architecture PASS.
|
|
174
|
+
|
|
175
|
+
Stage13 preserves15 preimages for eight existing source modules, four additive test files, the public test digest and these documents. The existing temporal reader binds every finite field and skew/order relation to task context and isolated source/test evidence. Its fallback proof binds the complete declared earlier branch order, boundary operators and literal results before accepting a live native assertion for the otherwise domain. Grouped non-mutation proof requires a closed source selector, fresh flat data, native structuredClone before invocation, both input identities after invocation, and literal loop coverage of every result and the error path. Aliases, reflection, mutable intrinsics, missing source guards and snapshots captured/altered after invocation grant no proof.
|
|
176
|
+
|
|
177
|
+
The combined draft passed1,244 checks with3 explicit opt-in skips. Unchanged retained public source/tests pass5/5; all three previously pending billing criteria are satisfied through a disposable executed-verifier receipt with a compiled scoped graph. Draft controls include actually passing weak verifiers with incorrect source, so verifier success alone cannot supply missing obligations. The initial fallback-only test fixture lacked that graph and was corrected; no runtime authority was opened.
|
|
178
|
+
|
|
179
|
+
Applied actual SDK billing correct/mutant controls, source regressions/static checks and final canonical full remain required. Source application is not full qualification, paid readiness or evidence of model quality/token savings. Other P2-P8 issues and CSV/expiry decisions remain open.
|
|
180
|
+
|
|
181
|
+
## Stage14 applied; cached record validation and separate snapshots
|
|
182
|
+
|
|
183
|
+
Stage13 billing qualification remains recorded separately: actual SDK2/2, applied regression1,244PASS/0FAIL/3SKIP, typecheck and architecture PASS.
|
|
184
|
+
|
|
185
|
+
Stage14 preserves nine preimages: three existing source modules, three additive test files, test inventory digest and these documents. The existing record reader requires typed guards for every task-derived identifier/time/revision role and nullable field, including non-array object shape. Empty/non-string and non-finite/fractional/non-number test witnesses must isolate each field while other inputs remain valid. Closed literal loop conditions preserve nullable exclusions. Separate pre-call native clones must retain both argument identities across true, false and throwing outcomes.
|
|
186
|
+
|
|
187
|
+
The baseline admitted a missing-field source after a real passing null-only verifier; the exact source/test hashes are rejected by the draft. Another executed control shows why empty-array rejection tests alone are insufficient: a source lacking the array guard can admit an array carrying all valid-looking fields. The draft rejects that source structurally even when its public-shaped tests pass. Mutation/restore, snapshot aliases and replaced intrinsics remain unproved.
|
|
188
|
+
|
|
189
|
+
Combined draft checks:1,365PASS/0FAIL/3SKIP. Unchanged retained source/tests:7/7; both remaining cache criteria satisfied through an executed-verifier receipt. Applied actual SDK correct/cross-tenant-mutant, source regressions, static checks and final canonical full remain required. No new independent authority, benchmark change, provider call or SDK upgrade.
|
|
190
|
+
|
|
191
|
+
## Stage15 applied: byte view and backing-buffer ownership
|
|
192
|
+
|
|
193
|
+
The stage14 cache qualification remains2/2SDK and1,365PASS/0FAIL/3SKIP with static checks. Stage15 preserves six preimages: two existing source modules, one additive test file, test inventory digest and these documents. Native encoded allocations and subarray bounds identify the complete backing buffers. Pre-call Array.from projections capture bytes, spread captures array identities, and post-call comparisons cover every backing root, array length and individual view identity. Source references are scoped and limited to input shape checks, iteration and native decoding; unknown calls, writes and native escapes cannot establish non-mutation. The existing dependency-neutral gate is still required.
|
|
194
|
+
|
|
195
|
+
Draft:1,387PASS/0FAIL/3SKIP; retained four public tests unchanged. A wrong variant reverses/restores the input array: all four tests pass while a Proxy records four writes; source-effect checks keep its non-mutation criterion pending.22new real-verifier controls cover partial backing coverage, aliases, assertion/projection tampering, array identity, source mutation/restore and dependency changes. Applied SDK/regression/static qualification and final full remain required.
|
|
196
|
+
|
|
197
|
+
Checkpoint shape draft162 is preserved separately. Counterexample164 exposes the unchanged reference mutating inputs when the exact thrown error aliases an input. Proposal167 requests one explicit error-annotation exception and remains unapproved/unapplied, alongside CSV/expiry decisions. No benchmark prompt/reference/expected change, SDK upgrade, provider call or new authority is included in stage15.
|
|
198
|
+
|
|
199
|
+
## Stage16 applied: pure record reducer non-mutation evidence
|
|
200
|
+
|
|
201
|
+
Stage15 byte qualification is sealed with SDK 2/2, regression 1,387 PASS / 0 FAIL / 3 SKIP and static checks PASS. Stage16 preserves six preimages and extends two existing acceptance modules. The source reader permits only a closed synchronous reducer over scoped record fields, native numeric predicates and fresh record/array expressions. Every branch is checked, including paths absent from public tests. Unknown effects, input writes or restore sequences, input freezing and effectful defaults cannot establish non-mutation. The test reader requires actual source-bound record/array invocations in live literal test bodies; frozen witnesses alone are insufficient.
|
|
202
|
+
|
|
203
|
+
Draft regression: 1,408 PASS / 0 FAIL / 3 SKIP. Twenty-one additive real-verifier controls retain the original test prefix and cover ordinary mutable inputs, renamed APIs/fields, conditional input/array writes, freeze effects, restoration, unknown helpers/defaults, missing arrays and unreachable/tampered witnesses. Counterexample190 inserts a conditional write into the original reference; all four public tests pass while an ordinary state object changes. Its non-mutation criterion remains pending. Original benchmark source, prompts, tests and expected outcomes are unchanged.
|
|
204
|
+
|
|
205
|
+
Applied SDK/regression/static qualification and final full remain required. Checkpoint shape draft162 and the three unapproved contract proposals are preserved separately. No SDK upgrade, provider call or new authority is included.
|
|
206
|
+
|
|
207
|
+
## Stage17 applied: origin of local computed record stores
|
|
208
|
+
|
|
209
|
+
Stage16 abort qualification is sealed with SDK 2/2, regression 1,408 PASS / 0 FAIL / 3 SKIP and static checks PASS. Stage17 preserves five preimages: one existing source module, one additive test file, test inventory digest and these documents. A computed store of a plain record into a locally declared const empty object or unshadowed native clone of a parameter cannot itself introduce a callable at that dynamic key. The inventory still visits every child member; competing methods/function references remain ambiguous. Unknown receivers, native/helper aliases, block/catch/function/class binding collisions, computed receiver chains, prototype paths and unsupported values remain unresolved. Analysis is bounded to32local stores and existing AST budgets.
|
|
210
|
+
|
|
211
|
+
Thirty-eight additive origin controls retain the existing test prefix. Draft broad regression: 1,446 PASS / 0 FAIL / 3 SKIP. Original replay export routing is restored, but the exact whole criterion remains pending: source/test evidence for contextual identifier fields is still required. Counterexample213 changes the ID predicate to accept undefined; all four unchanged public tests pass, yet events missing either declared ID are wrongly accepted. No replay completion or acceptance authority follows from origin classification. Applied regression/static/SDK and final candidate full remain required. All three contract proposals and checkpoint shape draft162 remain unapplied.
|
|
212
|
+
|
|
213
|
+
## Stage18 applied: field rejection and order in record transitions
|
|
214
|
+
|
|
215
|
+
Stage17 callable origin is validated by 1,446 PASS / 0 FAIL / 3 SKIP and static checks; its original replay SDK still fails the combined field/order acceptance clause. Stage18 adds bounded optional nested literal facts to the existing reader and a contract/source/test path in the existing parameter reader. It derives names from declared fields and signatures, checks all statements of the supported transition, validates native clone/set and guard bindings, and requires direct real rejection calls for isolated malformed fields plus a fresh ordered multi-event result assertion. Unsupported shapes, extra clauses, unknown calls, native aliases and unstable bindings stay pending. No new verifier authority, benchmark-name routing or retry counter is added.
|
|
216
|
+
|
|
217
|
+
Seven preserved paths contain three existing source modules, one additive test, the public-test inventory digest and these two documents. Sixty-nine controls retain the original 174-test prefix. Draft qualification234 is 1,515 PASS / 0 FAIL / 3 SKIP. Diagnostic232 retains all ten original SDK clauses and four public tests; executed counterexamples233 show missing-ID acceptance and output sorting both pass those public tests yet violate required behavior and remain pending. These are offline disposable development controls, not changed campaign mutants. Applied-source SDK, regression/static and final full qualification remain required.
|
|
218
|
+
|
|
219
|
+
Checkpoint shape draft162 and the three contract proposals remain separate. Workspace SDK235 on stage17 records cycle and non-mutation proof pending; its 1 PASS / 1 FAIL is not a new-candidate full result. Chat/workflow, default docs, mapping108, final qualification and D026 rebind remain open.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"planId": "PCL-2026-09-06",
|
|
4
|
+
"version": "1.0",
|
|
5
|
+
"recordedAt": "2026-09-06T15:00:32.362336+00:00",
|
|
6
|
+
"status": "RESEARCH_COMPLETE_IMPLEMENTATION_PAUSED",
|
|
7
|
+
"repository": "/Users/vtamm/Documents/piagent-35-recovery-20260831T090020Z/implementation",
|
|
8
|
+
"head": "c3a4427396984554eb1571e687caba0f831176ae",
|
|
9
|
+
"branch": "codex/piagent-35-recovery-20260831",
|
|
10
|
+
"parentBenchmarkPlanId": "PRB-108-2026-09-06",
|
|
11
|
+
"parentEvidence": {
|
|
12
|
+
"name": "benchmark-validity-recovery-20260906T135741Z",
|
|
13
|
+
"manifestSha256": "995bcc902f89e40e7ea0828b6e6d9fdcc9098bfb5f35ee7418624aa6ba4ab5fa",
|
|
14
|
+
"sealedEvidenceModified": false
|
|
15
|
+
},
|
|
16
|
+
"research": {
|
|
17
|
+
"primarySources": 34,
|
|
18
|
+
"publicRepositoriesPinned": 8,
|
|
19
|
+
"selectedCodeFiles": 13,
|
|
20
|
+
"changelogs": 1,
|
|
21
|
+
"papersReadAtAbstractScopeOnly": 4
|
|
22
|
+
},
|
|
23
|
+
"preservation": {
|
|
24
|
+
"preexistingGitStatusEntries": 153,
|
|
25
|
+
"e14ChangedFileHashesMatchedBeforeWrite": 153,
|
|
26
|
+
"scopedSourceAndDocFilesCheckedBeforeWrite": 2456,
|
|
27
|
+
"sourceChangesInThisResearchTurn": 0,
|
|
28
|
+
"stagedPaths": [],
|
|
29
|
+
"onlyNewDocumentationFiles": [
|
|
30
|
+
"piagent-core-improvement-plan.md",
|
|
31
|
+
"piagent-core-reasoning-research-2026-09-06.md",
|
|
32
|
+
"piagent-core-research-sources-2026-09-06.json",
|
|
33
|
+
"piagent-core-plan-checkpoint-2026-09-06.json"
|
|
34
|
+
],
|
|
35
|
+
"candidateIdentityNote": "New nonignored docs change whole-candidate selection. E14 source/test evidence remains historical and is not rebound by this checkpoint."
|
|
36
|
+
},
|
|
37
|
+
"boundaries": {
|
|
38
|
+
"implementationPaused": true,
|
|
39
|
+
"sdkUpgraded": false,
|
|
40
|
+
"testsRunThisResearchTurn": false,
|
|
41
|
+
"providerInferenceCallsThisResearchTurn": 0,
|
|
42
|
+
"campaignReserved": false,
|
|
43
|
+
"paidAuthorityCreated": false,
|
|
44
|
+
"subagentsSpawned": false,
|
|
45
|
+
"worktreeCreated": false,
|
|
46
|
+
"pushedOrPublished": false,
|
|
47
|
+
"benchmarkTreatmentChanged": false,
|
|
48
|
+
"d026Rebound": false,
|
|
49
|
+
"run6Verdict": "INVALID_MEASUREMENT"
|
|
50
|
+
},
|
|
51
|
+
"artifacts": [
|
|
52
|
+
{
|
|
53
|
+
"path": "docs/piagent-core-improvement-plan.md",
|
|
54
|
+
"sha256": "b8bc53d19e753e40e9f7371248b49049933d0a9227585f6f182d8a32dc37a049",
|
|
55
|
+
"bytes": 38504
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"path": "docs/piagent-core-reasoning-research-2026-09-06.md",
|
|
59
|
+
"sha256": "bb1ce6a8544a8b72c7574226621515d257ec0e1bbd7f311d949edfe5039895d1",
|
|
60
|
+
"bytes": 26595
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"path": "docs/piagent-core-research-sources-2026-09-06.json",
|
|
64
|
+
"sha256": "939bf4e91e916417bf9ee626a10caad39c4be8a42758436089afee3cd82a4654",
|
|
65
|
+
"bytes": 17191
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
"nextActionAfterOfflineResume": "C0 preservation and hunk manifest, then C1 exact usage to task report wiring; no provider launch or full suite first."
|
|
69
|
+
}
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
<!-- language: vi; english-index: docs/en/README.md -->
|
|
2
|
+
|
|
3
|
+
# Nghiên cứu lõi coding agent và đối chiếu Piagent
|
|
4
|
+
|
|
5
|
+
**Ngày:** 2026-09-06 · **Thuộc plan:** PCL-2026-09-06 · **Trạng thái:** nghiên cứu hoàn tất, triển khai pause.
|
|
6
|
+
|
|
7
|
+
Tài liệu phục vụ [kế hoạch cải thiện lõi Piagent](piagent-core-improvement-plan.md). Kết luận ưu tiên là **nối đúng những cơ chế đã có, giữ đủ thông tin cho model và giảm thao tác vô ích**, sau đó đo lợi ích trên công việc thực tế. Chưa có bằng chứng candidate Piagent mới làm tăng chất lượng hay giảm token của model thật.
|
|
8
|
+
|
|
9
|
+
## 1. Phạm vi và cách đọc nguồn
|
|
10
|
+
|
|
11
|
+
- 34 nguồn chính trong ledger dưới đây: bài kỹ thuật/docs của tác giả, file nguồn/changelog và bốn abstract nghiên cứu.
|
|
12
|
+
- 10 hệ agent: Pi, Codex, Claude Code, Cursor, Aider, mini-SWE-agent, OpenHands SDK, Gemini CLI, OpenCode, Cline. SWE-agent được bổ sung qua paper về giao diện agent–máy tính.
|
|
13
|
+
- Tám repo công khai ghim commit; tải **13 file source và một changelog** vào vùng tạm để đọc tĩnh các đoạn liên quan. Không clone, cài package, chạy agent hay thực thi code bên ngoài.
|
|
14
|
+
- Đọc có mục tiêu vòng xử lý, context, công cụ, event/state và failure behavior. Không tuyên bố audit toàn repo, tái lập leaderboard hay đọc toàn văn bốn paper.
|
|
15
|
+
- Claude Code/Cursor: nguồn là bài kỹ thuật do đội sản phẩm công bố. Không coi repo CLI/public docs là mã nguồn mở đầy đủ của lõi hai sản phẩm này.
|
|
16
|
+
- Các trang docs và blog có thể thay đổi; mốc truy cập 2026-09-06. Code links ghim commit, không dùng `main` làm identity tái lập. Metadata và SHA-256 từng file nằm trong [source manifest](piagent-core-research-sources-2026-09-06.json).
|
|
17
|
+
- Chỉ dùng nguồn sơ cấp để rút khuyến nghị. Search snippets, Reddit, trang tổng hợp và tài liệu do AI dựng không được dùng làm bằng chứng thiết kế.
|
|
18
|
+
|
|
19
|
+
## 2. Những kết luận có tác động tới plan
|
|
20
|
+
|
|
21
|
+
### 2.1 Năng lực hiệu dụng phụ thuộc đường chạy
|
|
22
|
+
|
|
23
|
+
Model tốt vẫn có thể làm việc kém khi thiếu source đúng, công cụ báo lỗi mơ hồ, trạng thái bị mất hoặc bị ép theo một chuỗi pha không phù hợp. SWE-agent nghiên cứu tác động của giao diện hành động; mini-SWE-agent hiện lại cung cấp một lõi rất gọn. Hai nguồn này cho lý do **thử đúng interface theo model/task**, không cho công thức “càng nhiều tool càng tốt” hay “bash-only luôn tốt nhất”. [S31][S31], [S22][S22]
|
|
24
|
+
|
|
25
|
+
Áp dụng cho Piagent: giữ control plane đang có, nhưng kiểm xem mỗi instruction, context pack, tool group và pha có giúp hoàn tất việc hay chỉ tăng chi phí. Không thay Pi bằng một framework khác để theo xu hướng.
|
|
26
|
+
|
|
27
|
+
### 2.2 Cắt token có thể làm tốn token hơn
|
|
28
|
+
|
|
29
|
+
Postmortem Claude Code ghi nhận việc xóa reasoning lặp sau idle làm mất tính liên tục và gây cache misses; một thay đổi giảm verbosity cũng làm chất lượng coding giảm. Đây là evidence của hệ đó tại thời điểm đó, không phải bug đã chứng minh trong Piagent. [S11][S11]
|
|
30
|
+
|
|
31
|
+
Áp dụng: đo usage, cache, đọc lại, effort và chất lượng cùng nhau. Không đặt giảm reasoning hay giảm độ dài output thành mục tiêu độc lập. Context ngắn hơn chỉ đáng giữ nếu tổng chi phí để làm đúng giảm.
|
|
32
|
+
|
|
33
|
+
### 2.3 Retrieval nên đưa đúng phần cần thiết và cho phép quay lại nguồn
|
|
34
|
+
|
|
35
|
+
Aider dùng graph/symbol ranking; Cursor đưa các output dài ra tài nguyên có thể đọc theo nhu cầu. Anthropic mô tả cách kết hợp dữ kiện ban đầu với truy xuất đúng lúc. [S16][S16], [S14][S14], [S08][S08]
|
|
36
|
+
|
|
37
|
+
Piagent đã có lexical/symbol/RRF retrieval và delivery confirmation. Bước kế tiếp là kiểm freshness, dependency coverage, lặp context và giá trị thật của pack. Không cần mở dự án embedding service trước khi chứng minh retrieval hiện tại không đủ.
|
|
38
|
+
|
|
39
|
+
### 2.4 Phải tách lịch sử nguồn khỏi bản context chiếu cho model
|
|
40
|
+
|
|
41
|
+
OpenHands có event history và view; condenser không được sửa trực tiếp cached view. OpenCode chỉ prune tool results theo điều kiện và vùng được giữ. [S24][S24], [S25][S25], [S28][S28]
|
|
42
|
+
|
|
43
|
+
Piagent đã có governor/ledger và task truth. Nên kiểm sự nhất quán của projection/resume thay vì thêm store trạng thái thứ hai. Một bản tóm tắt không được thay thế authority, exact verifier hoặc source identity.
|
|
44
|
+
|
|
45
|
+
### 2.5 Kiểm chứng cần giúp chọn bước sửa, không sinh vòng chứng minh vô hạn
|
|
46
|
+
|
|
47
|
+
Nghiên cứu intrinsic self-correction có kết quả và điều kiện khác nhau; abstract của một công trình cho kết quả tiêu cực khi thiếu external feedback, công trình khác nhấn mạnh điều kiện prompt/temperature. Không thể suy thành định luật cho mọi model hiện nay. [S33][S33], [S34][S34]
|
|
48
|
+
|
|
49
|
+
Lựa chọn thực dụng cho Piagent: dùng lỗi quan sát được, source hiện tại và kiểm tra có thể bác bỏ giả thuyết; không thêm reviewer model hoặc lời nhắc “nghĩ lại” sau mọi lượt. Tái sử dụng continuation maximum 1/progress signature; không sao chép loop detector có thêm model calls của Gemini. [S27][S27]
|
|
50
|
+
|
|
51
|
+
### 2.6 Chất lượng sản phẩm cần một nguồn phản hồi ngoài điểm test
|
|
52
|
+
|
|
53
|
+
Cursor mô tả kết hợp eval với dữ liệu sử dụng như code bị sửa lại và phản hồi người dùng. Anthropic phân biệt outcome thực tế với lời agent tự báo và nhấn mạnh độ tin cậy của phép chấm. [S15][S15], [S12][S12]
|
|
54
|
+
|
|
55
|
+
Áp dụng: theo dõi first-handoff correctness, việc mở lại, công sửa tay và cost của cả những attempt thất bại. Không dùng “code còn được giữ” hay một câu hài lòng thay cho kiểm chứng correctness; chúng là tín hiệu bổ sung.
|
|
56
|
+
|
|
57
|
+
## 3. Ma trận tiếp nhận theo từng hệ
|
|
58
|
+
|
|
59
|
+
| Hệ / mức đọc | Cơ chế đáng học | Áp dụng ở Piagent | Điều không sao chép mặc định |
|
|
60
|
+
|---|---|---|---|
|
|
61
|
+
| Pi — release + 2 source slices | Agent loop, steering, compaction, protocol failure | Giữ SDK làm nền; kiểm adapter/hook compatibility | Theo `main` hoặc nâng SDK ngay vì có version mới |
|
|
62
|
+
| Codex — blog + 2 source slices + model docs | Prefix/cache, context metadata, compaction boundary | Dùng wire telemetry đã có, kiểm replay/phase/opaque state | Biến cơ chế riêng Responses thành giả định cho mọi provider |
|
|
63
|
+
| Claude Code — engineering articles | Context rõ, long-task artifacts, postmortem chất lượng | Giữ task truth, hành trình đúng, feedback cụ thể | Hạ effort/cắt reasoning hoặc thêm initializer/subagent trái phạm vi |
|
|
64
|
+
| Cursor — 2 blog kỹ thuật | Dynamic context, theo dõi rework thực tế | Output references và real-work follow-up có quyền | Chép tỷ lệ tiết kiệm của Cursor thành cam kết Piagent |
|
|
65
|
+
| Aider — 3 docs/blog + 2 source slices | Repo map, edit format, failed-hunk feedback | Dùng index/edit freshness hiện tại, báo lỗi sửa được | Fallback tự chuyển patch sang file khác; hai model cho mọi edit |
|
|
66
|
+
| mini-SWE-agent — docs + default agent | Lõi nhỏ, tách model/environment, tính cả lỗi đã billed | Đối chứng đơn giản và accounting thất bại | Mang cost/step defaults hay quyền bash không giới hạn vào Piagent |
|
|
67
|
+
| OpenHands SDK — docs + 2 source slices | Event history và context projection tách biệt | Giữ ledger/view không làm biến dạng source evidence | Framework mới, remote server hoặc nhiều condenser chồng nhau |
|
|
68
|
+
| Gemini CLI — 2 source slices | Giữ recent outputs, phát hiện summary rỗng/phình, failure taxonomy | Controls cho compaction/progress hiện có | Hai lượt model để summary+probe; LLM loop-check thêm phí |
|
|
69
|
+
| OpenCode — 2 source slices | Prune có vùng bảo vệ, rõ loại stop/continue/compact | Kiểm hiệu quả và tính đầy đủ của governor | Copy doom-loop threshold/retry policy thành counter thứ hai |
|
|
70
|
+
| Cline — changelog ở commit ghim | Ca lỗi compaction quá mạnh, edit retries và model compatibility | Thêm đúng controls thiếu nếu Piagent có đường tương tự | Coi changelog là chứng minh code Cline hay Piagent đã an toàn |
|
|
71
|
+
|
|
72
|
+
## 4. Đối chiếu cụ thể với code Piagent
|
|
73
|
+
|
|
74
|
+
Đường dẫn dưới đây thuộc repo implementation đã chỉ định. Đây là đọc tĩnh có phạm vi; “cần kiểm” không có nghĩa “đã xác nhận bug”.
|
|
75
|
+
|
|
76
|
+
| ID local | Bằng chứng | Kết luận được phép | Gói plan |
|
|
77
|
+
|---|---|---|---|
|
|
78
|
+
| P01 | `runtime/product/efficiency-metrics.ts`: exactUsage default unavailable; invocation count/first-correct-edit còn null | Báo cáo task có wiring gap đã xác nhận | C1 |
|
|
79
|
+
| P02 | `runtime/registration/context-commands.ts:221`, `runtime/product/operator-projections.ts:82` | Call sites đã đọc không truyền exactUsage; cần nối nguồn usage phù hợp | C1 |
|
|
80
|
+
| P03 | `extensions/context-engine.js`: index v2, lexical/symbol/RRF, budgets, dedup, protected excludes | Retrieval tồn tại; token estimate không phải token billed | C2 |
|
|
81
|
+
| P04 | `runtime/context/context-delivery.ts` | Đã phân biệt offered/staged với delivered/confirmed theo task identity | C2 |
|
|
82
|
+
| P05 | `runtime/session/adaptive-context-governor.ts`, `adaptive-context-ledger.ts` | Có governor, bảo toàn task truth/protocol và passthrough; không thêm engine trùng | C2/C5 |
|
|
83
|
+
| P06 | `runtime/context/prefix-telemetry.ts`, `runtime/model/provider-wire-fingerprint.ts`, `extensions/piagent-guard.ts:3858` | Có cả canonical và ordered wire fingerprints. Chưa đủ để suy cache hit nếu không nối provider usage | C1/C2 |
|
|
84
|
+
| P07 | `runtime/solver/solver-shadow.ts`, `solver-policy.ts` | Solver mặc định shadow; suggestion không đồng nghĩa thực thi | C4 |
|
|
85
|
+
| P08 | `runtime/model/model-route-policy.ts`, `extensions/piagent-guard.ts:3900` | Có bảng model cụ thể, explicit pin preservation, mặc định off; host đã đọc báo boundary unavailable | C6 |
|
|
86
|
+
| P09 | `runtime/recovery/continuation-budget.ts` | Global continuation/progress signature đã có; giữ maximum 1 | C4 |
|
|
87
|
+
| P10 | `runtime/quality/edit-freshness-guard.ts`, `runtime/tools/phase-tool-runtime.ts` được đăng ký trong guard | Đã có cơ chế; cần đọc đúng consumer/tests trước thay đổi | C3 |
|
|
88
|
+
| P11 | `extensions/repository-memory.js`, `runtime/context/repository-memory-hints.ts` | Có citations/expiry/protected filtering/advisory; chưa chứng minh freshness và lợi ích trên mọi hành trình | C5 |
|
|
89
|
+
|
|
90
|
+
Các đường dẫn bắt đầu bằng `runtime/` hoặc `extensions/` trong bảng nằm dưới `packages/piagent-core/`.
|
|
91
|
+
|
|
92
|
+
Một phát hiện tránh được việc xây thừa: chỉ nhìn `prefix-telemetry.ts` sẽ thấy tool list được sort, nhưng code khác đã có `orderedToolSurfaceHash` và `provider_request_wire_surface`. Vì vậy plan không ghi “thiếu wire fingerprint”; gap là **đối soát wire/context với usage và outcome của task**.
|
|
93
|
+
|
|
94
|
+
## 5. Ledger 34 nguồn chính
|
|
95
|
+
|
|
96
|
+
### Pi và Codex
|
|
97
|
+
|
|
98
|
+
| ID / nguồn | Phần đã đọc và bằng chứng | Giới hạn / quyết định |
|
|
99
|
+
|---|---|---|
|
|
100
|
+
| S01 — [Pi releases][S01] | Release notes 0.85.0/0.85.1; 0.85.1 sửa lỗi import SDK và một số tương thích provider | Chọn ứng viên nâng cấp có qualification, không khẳng định SDK cũ gây mọi failure |
|
|
101
|
+
| S02 — [Pi agent-loop.ts][S02] | `runLoop`, steering/prepareNextTurn, error/abort và tool call khi output bị cắt | Code upstream snapshot, không tự coi đã có trong SDK 0.84.1 cài local |
|
|
102
|
+
| S03 — [Pi compaction.ts][S03] | `calculateContextTokens`, usage selection và estimate trailing messages | Context estimate phục vụ quản lý cửa sổ; không thay cost accounting |
|
|
103
|
+
| S04 — [Unrolling the Codex agent loop][S04] | Performance/cache prefix, tool order, config changes và compaction | Bài 23/01/2026; một số hiện thực có thể tiến hóa, không đồng nhất snapshot tháng 9 |
|
|
104
|
+
| S05 — [Codex compact_remote.rs][S05] | Request/step boundary, metadata trigger/reason/phase và hook khi compaction | Học cách quan sát lifecycle; không copy remote endpoint vào mọi provider |
|
|
105
|
+
| S06 — [Codex history.rs][S06] | History envelopes, normalized prompt views và metadata preservation | Đọc phần liên quan, không audit toàn bộ bộ quản lý history |
|
|
106
|
+
| S07 — [OpenAI model guidance, GPT-5.5][S07] | Outcome/success/stopping rules; giữ phase khi replay assistant items | Guidance theo model, không phải lệnh đổi model hoặc bỏ invariant Piagent |
|
|
107
|
+
|
|
108
|
+
### Claude Code / Anthropic và Cursor
|
|
109
|
+
|
|
110
|
+
| ID / nguồn | Phần đã đọc và bằng chứng | Giới hạn / quyết định |
|
|
111
|
+
|---|---|---|
|
|
112
|
+
| S08 — [Effective context engineering][S08] | Context nhỏ nhưng đủ tín hiệu, retrieval đúng lúc, compaction/note-taking | Không gán mọi hiện tượng long context của model cũ cho mọi model mới |
|
|
113
|
+
| S09 — [Writing effective tools][S09] | Tool purpose rõ, giảm overlap, output hữu ích với chế độ concise/detailed | Không loại ID/field cần cho hành động sau chỉ vì muốn ít token |
|
|
114
|
+
| S10 — [Effective harnesses for long-running agents][S10] | Tiến độ tăng dần, feature state, artifact tiếp nối và premature completion | Dùng task state có sẵn; không thêm initializer/subagent hay auto commit |
|
|
115
|
+
| S11 — [Claude Code quality postmortem][S11] | Ba thay đổi effort/context/verbosity và cách chúng gây giảm chất lượng | Case study, không kết luận model weights kém hoặc Piagent có cùng bug |
|
|
116
|
+
| S12 — [Demystifying evals for AI agents][S12] | Outcome vs transcript, model+harness, capability/regression eval và grader reliability | Giữ eval như phép đo; không thêm cả chương trình benchmark mới vào core |
|
|
117
|
+
| S13 — [Infrastructure noise][S13] | Resource enforcement và timeout làm thay đổi ý nghĩa kết quả | Khóa tài nguyên; không sao chép mức headroom hay tăng cap hiện tại |
|
|
118
|
+
| S14 — [Cursor dynamic context discovery][S14] | Output file references, history retrieval, skills/tool discovery | Số tiết kiệm tác giả báo là riêng cohort của Cursor, không đưa vào target Piagent |
|
|
119
|
+
| S15 — [Cursor harness improvement][S15] | Context thay đổi theo model; online/offline signals, keep rate/rework và error taxonomy | Keep rate chỉ là proxy; không dùng model đọc phản hồi user nếu chưa có quyền |
|
|
120
|
+
|
|
121
|
+
### Aider và mini-SWE-agent
|
|
122
|
+
|
|
123
|
+
| ID / nguồn | Phần đã đọc và bằng chứng | Giới hạn / quyết định |
|
|
124
|
+
|---|---|---|
|
|
125
|
+
| S16 — [Aider repository map][S16] | Symbol/signature map, dependency graph ranking và budget | Không copy token default; Piagent đã có index/ranking |
|
|
126
|
+
| S17 — [Aider repomap.py][S17] | `get_repo_map`, ranked tags/cache và PageRank implementation slices | Có implementation support cho docs; chưa kiểm định ranking trên repo Piagent |
|
|
127
|
+
| S18 — [Aider edit formats][S18] | Whole vs diff/search-replace; khả năng theo format khác nhau giữa model | Chọn theo evidence; không bắt whole-file cho mọi thay đổi |
|
|
128
|
+
| S19 — [Aider editblock_coder.py][S19] | Dry-run/apply, feedback failed hunk, partial success và fallback sang file khác | Chỉ học feedback; không chấp nhận chuyển target file tự động vào Piagent |
|
|
129
|
+
| S20 — [Separating code reasoning and editing][S20] | Hai bước architect/editor, có thể cùng hoặc khác model; tradeoff latency | Thí nghiệm 2024, không áp mặc định hai calls hoặc hai agents hiện nay |
|
|
130
|
+
| S21 — [mini-SWE-agent overview][S21] | Thiết kế tối giản, tách agent/environment/model | Documentation/claims của tác giả; không nhập điểm benchmark vào báo cáo Piagent |
|
|
131
|
+
| S22 — [mini-SWE-agent default.py][S22] | Đọc default agent: step/query/execute, limits, format-error billed cost, save state | Học phân loại failure/accounting; không copy default limits hoặc raw trajectory logging |
|
|
132
|
+
|
|
133
|
+
### OpenHands, Gemini CLI, OpenCode, Cline
|
|
134
|
+
|
|
135
|
+
| ID / nguồn | Phần đã đọc và bằng chứng | Giới hạn / quyết định |
|
|
136
|
+
|---|---|---|
|
|
137
|
+
| S23 — [OpenHands condenser architecture][S23] | Condenser/View/Condensation và no-op/LLM/pipeline distinction | Context management có giá; không mặc định thêm summarizer model |
|
|
138
|
+
| S24 — [OpenHands condenser/base.py][S24] | Read-only cached views, soft/hard condensation và fallback | Giữ lịch sử nguồn và projection riêng; không sửa cached state tại chỗ |
|
|
139
|
+
| S25 — [OpenHands conversation/state.py][S25] | Event log, active-branch derived view/cache và incremental tail | Bài học state ownership; không thêm branching/worktree vào phạm vi single-agent |
|
|
140
|
+
| S26 — [Gemini chatCompressionService.ts][S26] | Recent-output budget, summary+probe và reject summary rỗng/phình | Học negative controls; hai model turns cho compression không phải tối ưu miễn phí |
|
|
141
|
+
| S27 — [Gemini loopDetectionService.ts][S27] | Lặp phải không có tiến bộ; có model-based check với lịch riêng | Giữ progress guard sẵn có; không thêm model-loop reviewer/counter |
|
|
142
|
+
| S28 — [OpenCode compaction.ts][S28] | Prune completed tool outputs, recent/protected vùng và minimum saving | Không bỏ tool state đang pending hoặc evidence còn cần |
|
|
143
|
+
| S29 — [OpenCode processor.ts][S29] | So recent tool name+arguments, loại lỗi, stop/continue/compact và retry policy | Không copy doom-loop threshold hay tăng retry quyền Piagent |
|
|
144
|
+
| S30 — [Cline CHANGELOG][S30] | Lỗi compaction quá mạnh, retry edit lặp, native tool/model compatibility | Chỉ là changelog: dùng chọn failure scenarios, không coi là source-level proof |
|
|
145
|
+
|
|
146
|
+
### Nghiên cứu để kiểm tra giả định
|
|
147
|
+
|
|
148
|
+
| ID / nguồn | Phần đã đọc và bằng chứng | Giới hạn / quyết định |
|
|
149
|
+
|---|---|---|
|
|
150
|
+
| S31 — [SWE-agent ACI paper][S31] | Abstract: giao diện hành động ảnh hưởng khả năng tìm/sửa/test code | Không tái lập paper; model/task 2024 khác hệ hiện tại |
|
|
151
|
+
| S32 — [Lost in the Middle][S32] | Abstract: vị trí thông tin ảnh hưởng QA/key-value retrieval ở model nghiên cứu | Không chứng minh mọi model 2026 cùng mức suy giảm, cần controls của Piagent |
|
|
152
|
+
| S33 — [Cannot Self-Correct Reasoning Yet][S33] | Abstract: intrinsic self-correction thiếu external feedback có thể không giúp | Không suy thành “model không thể tự sửa” vô điều kiện |
|
|
153
|
+
| S34 — [Intrinsic Self-Correction Ability][S34] | Abstract: kết quả khác dưới điều kiện prompt/temperature được nghiên cứu | Không tự đổi temperature trên provider/model không hỗ trợ; kiểm chứng khách quan vẫn cần |
|
|
154
|
+
|
|
155
|
+
## 6. Quyết định ưu tiên / thử có điều kiện / hoãn
|
|
156
|
+
|
|
157
|
+
| Hướng | Quyết định | Lý do và ranh giới |
|
|
158
|
+
|---|---|---|
|
|
159
|
+
| Usage → task/outcome; tính cả thất bại | Ưu tiên đầu | Gap code xác nhận, cần cho mọi quyết định tiết kiệm |
|
|
160
|
+
| Context đúng nguồn, output có thể đọc lại, cache-aware | Ưu tiên sau instrumentation | Tận dụng retrieval/governor/wire có sẵn, giữ correctness |
|
|
161
|
+
| Feedback sửa lỗi rõ và edit freshness | Ưu tiên khi có đường lỗi cụ thể | Tránh token lãng phí ở thao tác, không nới guard |
|
|
162
|
+
| Task state ngắn, bước tiếp theo theo evidence | Ưu tiên | Giúp model giải quyết thay vì lặp diễn giải plan |
|
|
163
|
+
| SDK 0.85.1 | Thử tương thích riêng | Phiên bản mới có ích tiềm năng nhưng ảnh hưởng identity/protocol |
|
|
164
|
+
| Repo map / tool grouping / edit format | Thử theo task/model | Không có một cấu hình tốt nhất cho mọi model |
|
|
165
|
+
| Cross-task memory | Cải thiện phần hiện có có điều kiện | Phải advisory, có nguồn, đúng quyền và có lợi ích |
|
|
166
|
+
| Model routing tự động / giảm effort | Hoãn | Chưa có causal evidence; giữ pin và quality floor |
|
|
167
|
+
| Hai model architect/editor, critic sau mỗi bước | Hoãn | Thêm phí/latency, chưa chứng minh thắng single-agent |
|
|
168
|
+
| LLM verifier cho mọi summary/loop | Không đưa vào đợt đầu | Tăng vòng gọi; đã có deterministic safeguards |
|
|
169
|
+
| Vector DB, framework rewrite, swarm | Không đưa vào đợt này | Chưa có gap chứng minh cần; trái phạm vi single-agent nếu swarm |
|
|
170
|
+
| Universal semantic prover / benchmark-specific branches | Không theo đuổi | Quay lại vòng nghiên cứu khó kết thúc và nguy cơ overfit |
|
|
171
|
+
| Bỏ guard để “model thông minh hơn” | Không chấp nhận | Autonomy phải ở trong quyền và contract đã cấp |
|
|
172
|
+
|
|
173
|
+
## 7. Những gì chưa biết và cách giải hữu hạn
|
|
174
|
+
|
|
175
|
+
1. **Piagent đang lãng phí ở đâu nhiều nhất?** C1 trả lời theo chi phí task; không đoán bằng số dòng source hay số tests.
|
|
176
|
+
2. **Governor và SDK compaction có tương tác làm mất nghĩa?** C2/C6 kiểm đúng transitions, không blanket audit mọi provider.
|
|
177
|
+
3. **Context pack/routing hiện tại giúp hay làm model phân tâm?** Chọn tối đa hai giả thuyết sau telemetry; đối chứng cùng model/SDK ở C7 khi được phép.
|
|
178
|
+
4. **Task thật của người dùng phân bố thế nào?** Lập corpus từ backlog được quyền sử dụng; chưa có thì ghi thiếu dữ liệu, không gọi fixture là real use.
|
|
179
|
+
5. **SDK mới có đáng nâng?** Dùng contract matrix; nếu không có lợi hoặc không tương thích thì giữ version cũ với giới hạn rõ.
|
|
180
|
+
|
|
181
|
+
Mỗi unknown có owner là người triển khai single-agent, evidence cần lấy và giới hạn nghiên cứu trong C0. Không mở thêm lượt đọc blog chỉ để tăng số nguồn sau khi câu hỏi thiết kế đã được trả lời.
|
|
182
|
+
|
|
183
|
+
## 8. Checkpoint và bảo toàn
|
|
184
|
+
|
|
185
|
+
Nghiên cứu được thực hiện trên HEAD `c3a4427396984554eb1571e687caba0f831176ae`, branch `codex/piagent-35-recovery-20260831`, với 153 đường dẫn recovery thay đổi trước tài liệu mới. Không có source edits, tests, SDK upgrade, provider/model calls, campaign reservation, paid authority, worktree, subagent, push hay publish trong đợt nghiên cứu này. Các yêu cầu HTTP đọc tài liệu/repo công khai là hoạt động nghiên cứu, không phải phiên model benchmark.
|
|
186
|
+
|
|
187
|
+
Không khẳng định E14 full qualification đã xanh. Kết quả full lịch sử và 18 default correct-completion đỏ được giữ nguyên. Run-6 tiếp tục `INVALID_MEASUREMENT`. Mọi thay đổi source/treatment đề xuất trong PCL cần thuộc đúng phạm vi resume/identity; D-026 không tự áp cho chúng.
|
|
188
|
+
|
|
189
|
+
Chi tiết hash tài liệu và kiểm tra bảo toàn xem [checkpoint PCL](piagent-core-plan-checkpoint-2026-09-06.json). Nội dung này là nghiên cứu và kế hoạch, không phải evidence cải thiện model đã đạt.
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
[S01]: https://github.com/earendil-works/pi/releases
|
|
193
|
+
[S02]: https://github.com/earendil-works/pi/blob/9767ba275f3e9a5ee0f5c5342249b629ab1b2282/packages/agent/src/agent-loop.ts
|
|
194
|
+
[S03]: https://github.com/earendil-works/pi/blob/9767ba275f3e9a5ee0f5c5342249b629ab1b2282/packages/coding-agent/src/core/compaction/compaction.ts
|
|
195
|
+
[S04]: https://openai.com/index/unrolling-the-codex-agent-loop/
|
|
196
|
+
[S05]: https://github.com/openai/codex/blob/ac192cd7937b0d73edc6dffe009940ae53782dd4/codex-rs/core/src/compact_remote.rs
|
|
197
|
+
[S06]: https://github.com/openai/codex/blob/ac192cd7937b0d73edc6dffe009940ae53782dd4/codex-rs/core/src/context_manager/history.rs
|
|
198
|
+
[S07]: https://developers.openai.com/api/docs/guides/latest-model?model=gpt-5.5
|
|
199
|
+
[S08]: https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents
|
|
200
|
+
[S09]: https://www.anthropic.com/engineering/writing-tools-for-agents
|
|
201
|
+
[S10]: https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents
|
|
202
|
+
[S11]: https://www.anthropic.com/engineering/april-23-postmortem
|
|
203
|
+
[S12]: https://www.anthropic.com/engineering/demystifying-evals-for-ai-agents
|
|
204
|
+
[S13]: https://www.anthropic.com/engineering/infrastructure-noise
|
|
205
|
+
[S14]: https://cursor.com/blog/dynamic-context-discovery
|
|
206
|
+
[S15]: https://cursor.com/blog/continually-improving-agent-harness
|
|
207
|
+
[S16]: https://aider.chat/docs/repomap.html
|
|
208
|
+
[S17]: https://github.com/Aider-AI/aider/blob/5dc9490bb35f9729ef2c95d00a19ccd30c26339c/aider/repomap.py
|
|
209
|
+
[S18]: https://aider.chat/docs/more/edit-formats.html
|
|
210
|
+
[S19]: https://github.com/Aider-AI/aider/blob/5dc9490bb35f9729ef2c95d00a19ccd30c26339c/aider/coders/editblock_coder.py
|
|
211
|
+
[S20]: https://aider.chat/2024/09/26/architect.html
|
|
212
|
+
[S21]: https://mini-swe-agent.com/latest/
|
|
213
|
+
[S22]: https://github.com/SWE-agent/mini-swe-agent/blob/04d809ceab9df28f9adaed044884180159172930/src/minisweagent/agents/default.py
|
|
214
|
+
[S23]: https://docs.openhands.dev/sdk/arch/condenser
|
|
215
|
+
[S24]: https://github.com/OpenHands/software-agent-sdk/blob/8ea8e3bc1d5e84542f7702b8813734ef600c9fce/openhands-sdk/openhands/sdk/context/condenser/base.py
|
|
216
|
+
[S25]: https://github.com/OpenHands/software-agent-sdk/blob/8ea8e3bc1d5e84542f7702b8813734ef600c9fce/openhands-sdk/openhands/sdk/conversation/state.py
|
|
217
|
+
[S26]: https://github.com/google-gemini/gemini-cli/blob/85aca163f6c73ac6ce380b5447359146b8adcae4/packages/core/src/context/chatCompressionService.ts
|
|
218
|
+
[S27]: https://github.com/google-gemini/gemini-cli/blob/85aca163f6c73ac6ce380b5447359146b8adcae4/packages/core/src/services/loopDetectionService.ts
|
|
219
|
+
[S28]: https://github.com/anomalyco/opencode/blob/337fd144d2ba144743368f78d9579a99cce175bd/packages/opencode/src/session/compaction.ts
|
|
220
|
+
[S29]: https://github.com/anomalyco/opencode/blob/337fd144d2ba144743368f78d9579a99cce175bd/packages/opencode/src/session/processor.ts
|
|
221
|
+
[S30]: https://github.com/cline/cline/blob/dac3b35ba485dbab3b5a73aca239b0d07ce071cf/CHANGELOG.md
|
|
222
|
+
[S31]: https://arxiv.org/abs/2405.15793
|
|
223
|
+
[S32]: https://arxiv.org/abs/2307.03172
|
|
224
|
+
[S33]: https://arxiv.org/abs/2310.01798
|
|
225
|
+
[S34]: https://arxiv.org/abs/2406.15673
|