@piagent/platform 1.2.16 → 1.3.0-ie.8
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/.gitattributes +1 -0
- package/CHANGELOG.md +256 -0
- package/README.md +18 -5
- package/README.vi.md +19 -0
- package/adapters/be-readonly-fe/profile.json +2 -0
- package/architecture/layers.json +16 -3
- package/benchmarks/capability-v1/alternatives/fullstack-search-contract/apps/web/src/search-view.js +14 -0
- package/benchmarks/capability-v1/alternatives/fullstack-search-contract/packages/shared/src/search-contract.js +8 -0
- package/benchmarks/capability-v1/alternatives/fullstack-search-contract/services/catalog/src/search.js +18 -0
- package/benchmarks/capability-v1/alternatives/resumable-migration-runner/packages/migration/src/plan.js +32 -0
- package/benchmarks/capability-v1/alternatives/resumable-migration-runner/packages/migration/src/runner.js +43 -0
- package/benchmarks/capability-v1/coverage.json +52 -0
- package/benchmarks/capability-v1/grade.mjs +433 -0
- package/benchmarks/capability-v1/project/README.md +5 -0
- package/benchmarks/capability-v1/project/apps/admin/src/rollout-view.js +3 -0
- package/benchmarks/capability-v1/project/apps/web/src/search-view.js +3 -0
- package/benchmarks/capability-v1/project/package.json +8 -0
- package/benchmarks/capability-v1/project/packages/api/src/feature-access.js +5 -0
- package/benchmarks/capability-v1/project/packages/lease/src/store.js +12 -0
- package/benchmarks/capability-v1/project/packages/lease/src/with-lease.js +4 -0
- package/benchmarks/capability-v1/project/packages/migration/src/plan.js +3 -0
- package/benchmarks/capability-v1/project/packages/migration/src/runner.js +4 -0
- package/benchmarks/capability-v1/project/packages/policy/src/rollout.js +7 -0
- package/benchmarks/capability-v1/project/packages/shared/src/search-contract.js +3 -0
- package/benchmarks/capability-v1/project/services/catalog/src/search.js +3 -0
- package/benchmarks/capability-v1/project/test/smoke.test.js +4 -0
- package/benchmarks/capability-v1/prompts/concurrent-lease-lifecycle.md +22 -0
- package/benchmarks/capability-v1/prompts/fullstack-search-contract.md +21 -0
- package/benchmarks/capability-v1/prompts/multi-package-rollout.md +24 -0
- package/benchmarks/capability-v1/prompts/resumable-migration-runner.md +28 -0
- package/benchmarks/capability-v1/references/concurrent-lease-lifecycle/packages/lease/src/store.js +27 -0
- package/benchmarks/capability-v1/references/concurrent-lease-lifecycle/packages/lease/src/with-lease.js +9 -0
- package/benchmarks/capability-v1/references/fullstack-search-contract/apps/web/src/search-view.js +9 -0
- package/benchmarks/capability-v1/references/fullstack-search-contract/packages/shared/src/search-contract.js +3 -0
- package/benchmarks/capability-v1/references/fullstack-search-contract/services/catalog/src/search.js +12 -0
- package/benchmarks/capability-v1/references/multi-package-rollout/apps/admin/src/rollout-view.js +6 -0
- package/benchmarks/capability-v1/references/multi-package-rollout/packages/api/src/feature-access.js +9 -0
- package/benchmarks/capability-v1/references/multi-package-rollout/packages/policy/src/rollout.js +29 -0
- package/benchmarks/capability-v1/references/resumable-migration-runner/packages/migration/src/plan.js +32 -0
- package/benchmarks/capability-v1/references/resumable-migration-runner/packages/migration/src/runner.js +18 -0
- package/benchmarks/capability-v1/rubric.json +60 -0
- package/benchmarks/capability-v1/suite.json +88 -0
- package/benchmarks/capability-v1/variant.mjs +48 -0
- package/benchmarks/e2-framework-v1/alternatives/hono-accessible-search/apps/web/src/search-app.js +20 -0
- package/benchmarks/e2-framework-v1/alternatives/hono-tenant-api/apps/api/src/tenant-app.js +27 -0
- package/benchmarks/e2-framework-v1/alternatives/sqlite-resumable-inventory/packages/migration/src/inventory.js +34 -0
- package/benchmarks/e2-framework-v1/alternatives/workspace-policy-rollout/apps/admin/src/summary.js +6 -0
- package/benchmarks/e2-framework-v1/alternatives/workspace-policy-rollout/packages/feature-api/src/evaluate.js +14 -0
- package/benchmarks/e2-framework-v1/alternatives/workspace-policy-rollout/packages/policy/src/rollout.js +18 -0
- package/benchmarks/e2-framework-v1/coverage.json +25 -0
- package/benchmarks/e2-framework-v1/grade.mjs +291 -0
- package/benchmarks/e2-framework-v1/project/README.md +5 -0
- package/benchmarks/e2-framework-v1/project/apps/admin/package.json +1 -0
- package/benchmarks/e2-framework-v1/project/apps/admin/src/summary.js +3 -0
- package/benchmarks/e2-framework-v1/project/apps/api/package.json +1 -0
- package/benchmarks/e2-framework-v1/project/apps/api/src/tenant-app.js +5 -0
- package/benchmarks/e2-framework-v1/project/apps/web/package.json +1 -0
- package/benchmarks/e2-framework-v1/project/apps/web/src/search-app.js +9 -0
- package/benchmarks/e2-framework-v1/project/package.json +9 -0
- package/benchmarks/e2-framework-v1/project/packages/feature-api/package.json +1 -0
- package/benchmarks/e2-framework-v1/project/packages/feature-api/src/evaluate.js +3 -0
- package/benchmarks/e2-framework-v1/project/packages/migration/package.json +1 -0
- package/benchmarks/e2-framework-v1/project/packages/migration/src/inventory.js +3 -0
- package/benchmarks/e2-framework-v1/project/packages/notifications/package.json +1 -0
- package/benchmarks/e2-framework-v1/project/packages/notifications/src/channel.js +3 -0
- package/benchmarks/e2-framework-v1/project/packages/policy/package.json +1 -0
- package/benchmarks/e2-framework-v1/project/packages/policy/src/rollout.js +7 -0
- package/benchmarks/e2-framework-v1/project/packages/shared/package.json +1 -0
- package/benchmarks/e2-framework-v1/project/packages/shared/src/identity.js +1 -0
- package/benchmarks/e2-framework-v1/project/packages/telemetry/package.json +1 -0
- package/benchmarks/e2-framework-v1/project/packages/telemetry/src/counter.js +3 -0
- package/benchmarks/e2-framework-v1/project/test/smoke.test.js +16 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/LICENSE +21 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/PIAGENT-PROVENANCE.json +10 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/aws-lambda/conninfo.js +24 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/aws-lambda/handler.js +364 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/aws-lambda/index.js +9 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/aws-lambda/types.js +0 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/bun/conninfo.js +27 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/bun/index.js +16 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/bun/serve-static.js +30 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/bun/server.js +5 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/bun/ssg.js +17 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/bun/websocket.js +73 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/cloudflare-pages/conninfo.js +9 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/cloudflare-pages/handler.js +67 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/cloudflare-pages/index.js +9 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/cloudflare-workers/conninfo.js +9 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/cloudflare-workers/index.js +9 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/cloudflare-workers/serve-static-module.js +8 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/cloudflare-workers/serve-static.js +22 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/cloudflare-workers/utils.js +35 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/cloudflare-workers/websocket.js +41 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/deno/conninfo.js +14 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/deno/deno.d.js +0 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/deno/index.js +12 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/deno/serve-static.js +40 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/deno/ssg.js +18 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/deno/websocket.js +32 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/lambda-edge/conninfo.js +9 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/lambda-edge/handler.js +96 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/lambda-edge/index.js +7 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/netlify/conninfo.js +9 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/netlify/handler.js +9 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/netlify/index.js +2 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/netlify/mod.js +7 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/service-worker/handler.js +20 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/service-worker/index.js +9 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/service-worker/types.js +0 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/vercel/conninfo.js +10 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/vercel/handler.js +7 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/vercel/index.js +7 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/aws-lambda/conninfo.js +46 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/aws-lambda/handler.js +395 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/aws-lambda/index.js +34 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/aws-lambda/types.js +15 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/bun/conninfo.js +49 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/bun/index.js +45 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/bun/serve-static.js +52 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/bun/server.js +27 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/bun/ssg.js +40 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/bun/websocket.js +98 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/cloudflare-pages/conninfo.js +31 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/cloudflare-pages/handler.js +91 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/cloudflare-pages/index.js +34 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/cloudflare-workers/conninfo.js +31 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/cloudflare-workers/index.js +33 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/cloudflare-workers/serve-static-module.js +30 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/cloudflare-workers/serve-static.js +44 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/cloudflare-workers/utils.js +57 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/cloudflare-workers/websocket.js +63 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/deno/conninfo.js +36 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/deno/deno.d.js +0 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/deno/index.js +38 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/deno/serve-static.js +62 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/deno/ssg.js +41 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/deno/websocket.js +54 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/lambda-edge/conninfo.js +31 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/lambda-edge/handler.js +130 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/lambda-edge/index.js +30 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/netlify/conninfo.js +31 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/netlify/handler.js +31 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/netlify/index.js +21 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/netlify/mod.js +30 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/service-worker/handler.js +42 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/service-worker/index.js +32 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/service-worker/types.js +15 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/vercel/conninfo.js +32 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/vercel/handler.js +29 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/vercel/index.js +30 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/client/client.js +204 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/client/fetch-result-please.js +85 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/client/index.js +32 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/client/types.js +15 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/client/utils.js +105 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/compose.js +68 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/context.js +450 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/helper/accepts/accepts.js +43 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/helper/accepts/index.js +27 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/helper/adapter/index.js +81 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/helper/conninfo/index.js +15 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/helper/conninfo/types.js +15 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/helper/cookie/index.js +130 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/helper/css/common.js +273 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/helper/css/index.js +157 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/helper/dev/index.js +79 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/helper/factory/index.js +54 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/helper/html/index.js +64 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/helper/proxy/index.js +115 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/helper/route/index.js +71 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/helper/ssg/index.js +43 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/helper/ssg/middleware.js +73 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/helper/ssg/plugins.js +70 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/helper/ssg/ssg.js +320 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/helper/ssg/utils.js +93 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/helper/streaming/index.js +35 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/helper/streaming/sse.js +91 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/helper/streaming/stream.js +56 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/helper/streaming/text.js +34 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/helper/streaming/utils.js +35 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/helper/testing/index.js +33 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/helper/websocket/index.js +81 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/hono-base.js +406 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/hono.js +43 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/http-exception.js +57 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/index.js +30 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/base.js +378 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/children.js +44 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/components.js +221 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/constants.js +42 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/context.js +188 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/dom/client.js +76 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/dom/components.js +55 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/dom/context.js +71 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/dom/css.js +168 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/dom/hooks/index.js +74 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/dom/index.js +181 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/dom/intrinsic-element/components.js +399 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/dom/jsx-dev-runtime.js +52 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/dom/jsx-runtime.js +32 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/dom/render.js +641 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/dom/server.js +67 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/dom/utils.js +32 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/hooks/index.js +373 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/index.js +138 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/intrinsic-element/common.js +50 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/intrinsic-element/components.js +189 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/intrinsic-elements.js +15 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/jsx-dev-runtime.js +41 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/jsx-runtime.js +71 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/streaming.js +179 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/types.js +15 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/utils.js +200 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/basic-auth/index.js +88 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/bearer-auth/index.js +114 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/body-limit/index.js +75 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/cache/index.js +219 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/combine/index.js +101 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/compress/index.js +97 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/context-storage/index.js +47 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/cors/index.js +106 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/csrf/index.js +77 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/etag/digest.js +55 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/etag/index.js +99 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/ip-restriction/index.js +176 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/jsx-renderer/index.js +82 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/jwk/index.js +27 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/jwk/jwk.js +139 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/jwt/index.js +38 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/jwt/jwt.js +145 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/language/index.js +35 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/language/language.js +203 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/logger/index.js +72 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/method-not-allowed/index.js +90 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/method-override/index.js +106 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/powered-by/index.js +32 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/pretty-json/index.js +37 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/request-id/index.js +27 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/request-id/request-id.js +43 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/secure-headers/index.js +29 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/secure-headers/permissions-policy.js +15 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/secure-headers/secure-headers.js +195 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/serve-static/index.js +99 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/serve-static/path.js +40 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/timeout/index.js +47 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/timing/index.js +35 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/timing/timing.js +130 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/trailing-slash/index.js +62 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/package.json +3 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/preset/quick.js +38 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/preset/tiny.js +34 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/request/constants.js +27 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/request.js +342 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/router/linear-router/index.js +27 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/router/linear-router/router.js +140 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/router/pattern-router/index.js +27 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/router/pattern-router/router.js +70 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/router/reg-exp-router/index.js +34 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/router/reg-exp-router/matcher.js +48 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/router/reg-exp-router/node.js +133 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/router/reg-exp-router/prepared-router.js +166 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/router/reg-exp-router/router.js +187 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/router/reg-exp-router/trie.js +89 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/router/smart-router/index.js +27 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/router/smart-router/router.js +80 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/router/trie-router/index.js +27 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/router/trie-router/node.js +210 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/router/trie-router/router.js +48 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/router.js +40 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/types.js +28 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/accept.js +245 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/basic-auth.js +45 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/body.js +111 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/buffer.js +103 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/color.js +48 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/compress.js +27 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/concurrent.js +61 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/constants.js +27 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/cookie.js +199 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/crypto.js +69 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/encode.js +54 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/filepath.js +58 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/handler.js +36 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/headers.js +15 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/html.js +150 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/http-status.js +15 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/ipaddr.js +318 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/jwt/index.js +28 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/jwt/jwa.js +42 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/jwt/jws.js +215 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/jwt/jwt.js +219 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/jwt/types.js +161 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/jwt/utf8.js +30 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/mime.js +106 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/stream.js +106 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/types.js +15 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/url.js +256 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/validator/index.js +27 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/validator/utils.js +15 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/validator/validator.js +108 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/client/client.js +189 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/client/fetch-result-please.js +62 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/client/index.js +8 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/client/types.js +0 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/client/utils.js +76 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/compose.js +46 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/context.js +427 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/helper/accepts/accepts.js +20 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/helper/accepts/index.js +5 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/helper/adapter/index.js +56 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/helper/conninfo/index.js +0 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/helper/conninfo/types.js +0 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/helper/cookie/index.js +102 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/helper/css/common.js +236 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/helper/css/index.js +140 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/helper/dev/index.js +55 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/helper/factory/index.js +30 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/helper/html/index.js +41 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/helper/proxy/index.js +93 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/helper/route/index.js +46 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/helper/ssg/index.js +19 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/helper/ssg/middleware.js +45 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/helper/ssg/plugins.js +47 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/helper/ssg/ssg.js +297 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/helper/ssg/utils.js +67 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/helper/streaming/index.js +10 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/helper/streaming/sse.js +68 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/helper/streaming/stream.js +34 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/helper/streaming/text.js +12 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/helper/streaming/utils.js +13 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/helper/testing/index.js +11 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/helper/websocket/index.js +57 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/hono-base.js +384 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/hono.js +21 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/http-exception.js +35 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/index.js +7 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/base.js +346 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/children.js +21 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/components.js +198 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/constants.js +15 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/context.js +162 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/dom/client.js +53 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/dom/components.js +32 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/dom/context.js +48 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/dom/css.js +150 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/dom/hooks/index.js +48 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/dom/index.js +142 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/dom/intrinsic-element/components.js +374 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/dom/jsx-dev-runtime.js +19 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/dom/jsx-runtime.js +8 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/dom/render.js +617 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/dom/server.js +33 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/dom/utils.js +10 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/hooks/index.js +331 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/index.js +103 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/intrinsic-element/common.js +24 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/intrinsic-element/components.js +165 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/intrinsic-elements.js +0 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/jsx-dev-runtime.js +18 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/jsx-runtime.js +44 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/streaming.js +155 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/types.js +0 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/utils.js +175 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/basic-auth/index.js +66 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/bearer-auth/index.js +92 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/body-limit/index.js +53 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/cache/index.js +197 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/combine/index.js +77 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/compress/index.js +74 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/context-storage/index.js +23 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/cors/index.js +84 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/csrf/index.js +55 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/etag/digest.js +33 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/etag/index.js +76 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/ip-restriction/index.js +162 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/jsx-renderer/index.js +58 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/jwk/index.js +5 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/jwk/jwk.js +117 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/jwt/index.js +11 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/jwt/jwt.js +119 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/language/index.js +15 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/language/language.js +172 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/logger/index.js +44 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/method-not-allowed/index.js +68 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/method-override/index.js +84 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/powered-by/index.js +10 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/pretty-json/index.js +15 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/request-id/index.js +5 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/request-id/request-id.js +21 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/secure-headers/index.js +6 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/secure-headers/permissions-policy.js +0 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/secure-headers/secure-headers.js +172 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/serve-static/index.js +77 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/serve-static/path.js +18 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/timeout/index.js +25 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/timing/index.js +9 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/timing/timing.js +104 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/trailing-slash/index.js +39 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/preset/quick.js +16 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/preset/tiny.js +12 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/request/constants.js +5 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/request.js +319 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/router/linear-router/index.js +5 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/router/linear-router/router.js +118 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/router/pattern-router/index.js +5 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/router/pattern-router/router.js +48 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/router/reg-exp-router/index.js +9 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/router/reg-exp-router/matcher.js +25 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/router/reg-exp-router/node.js +110 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/router/reg-exp-router/prepared-router.js +142 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/router/reg-exp-router/router.js +169 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/router/reg-exp-router/trie.js +67 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/router/smart-router/index.js +5 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/router/smart-router/router.js +58 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/router/trie-router/index.js +5 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/router/trie-router/node.js +188 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/router/trie-router/router.js +26 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/router.js +14 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/aws-lambda/conninfo.d.ts +27 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/aws-lambda/handler.d.ts +184 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/aws-lambda/index.d.ts +8 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/aws-lambda/types.d.ts +153 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/bun/conninfo.d.ts +7 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/bun/index.d.ts +10 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/bun/serve-static.d.ts +3 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/bun/server.d.ts +12 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/bun/ssg.d.ts +13 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/bun/websocket.d.ts +39 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/cloudflare-pages/conninfo.d.ts +21 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/cloudflare-pages/handler.d.ts +33 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/cloudflare-pages/index.d.ts +7 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/cloudflare-workers/conninfo.d.ts +2 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/cloudflare-workers/index.d.ts +7 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/cloudflare-workers/serve-static-module.d.ts +4 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/cloudflare-workers/serve-static.d.ts +16 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/cloudflare-workers/utils.d.ts +5 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/cloudflare-workers/websocket.d.ts +2 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/deno/conninfo.d.ts +7 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/deno/index.d.ts +8 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/deno/serve-static.d.ts +3 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/deno/ssg.d.ts +13 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/deno/websocket.d.ts +2 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/lambda-edge/conninfo.d.ts +2 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/lambda-edge/handler.d.ts +87 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/lambda-edge/index.d.ts +7 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/netlify/conninfo.d.ts +21 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/netlify/handler.d.ts +2 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/netlify/index.d.ts +5 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/netlify/mod.d.ts +2 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/service-worker/handler.d.ts +16 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/service-worker/index.d.ts +28 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/service-worker/types.d.ts +12 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/vercel/conninfo.d.ts +2 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/vercel/handler.d.ts +2 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/vercel/index.d.ts +6 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/client/client.d.ts +4 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/client/fetch-result-please.d.ts +35 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/client/index.d.ts +7 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/client/types.d.ts +229 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/client/utils.d.ts +18 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/compose.d.ts +14 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/context.d.ts +455 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/helper/accepts/accepts.d.ts +30 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/helper/accepts/index.d.ts +5 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/helper/adapter/index.d.ts +12 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/helper/conninfo/index.d.ts +5 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/helper/conninfo/types.d.ts +36 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/helper/cookie/index.d.ts +24 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/helper/css/common.d.ts +59 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/helper/css/index.d.ts +80 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/helper/dev/index.d.ts +20 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/helper/factory/index.d.ts +82 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/helper/html/index.d.ts +8 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/helper/proxy/index.d.ts +72 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/helper/route/index.d.ts +75 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/helper/ssg/index.d.ts +7 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/helper/ssg/middleware.d.ts +44 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/helper/ssg/plugins.d.ts +27 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/helper/ssg/ssg.d.ts +91 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/helper/ssg/utils.d.ts +16 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/helper/streaming/index.d.ts +8 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/helper/streaming/sse.d.ts +13 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/helper/streaming/stream.d.ts +3 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/helper/streaming/text.d.ts +3 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/helper/streaming/utils.d.ts +1 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/helper/testing/index.d.ts +12 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/helper/websocket/index.d.ts +69 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/hono-base.d.ts +221 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/hono.d.ts +19 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/http-exception.d.ts +59 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/index.d.ts +37 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/base.d.ts +58 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/children.d.ts +9 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/components.d.ts +15 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/constants.d.ts +6 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/context.d.ts +51 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/dom/client.d.ts +31 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/dom/components.d.ts +10 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/dom/context.d.ts +3 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/dom/css.d.ts +83 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/dom/hooks/index.d.ts +39 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/dom/index.d.ts +88 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/dom/intrinsic-element/components.d.ts +16 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/dom/jsx-dev-runtime.d.ts +8 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/dom/jsx-runtime.d.ts +7 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/dom/render.d.ts +73 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/dom/server.d.ts +106 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/dom/utils.d.ts +1 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/hooks/index.d.ts +47 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/index.d.ts +75 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/intrinsic-element/common.d.ts +6 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/intrinsic-element/components.d.ts +13 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/intrinsic-elements.d.ts +722 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/jsx-dev-runtime.d.ts +8 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/jsx-runtime.d.ts +12 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/streaming.d.ts +36 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/types.d.ts +35 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/utils.d.ts +4 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/basic-auth/index.d.ts +75 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/bearer-auth/index.d.ts +92 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/body-limit/index.d.ts +45 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/cache/index.d.ts +45 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/combine/index.d.ts +85 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/compress/index.d.ts +40 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/context-storage/index.d.ts +40 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/cors/index.d.ts +55 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/csrf/index.d.ts +78 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/etag/digest.d.ts +1 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/etag/index.d.ts +42 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/ip-restriction/index.d.ts +67 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/jsx-renderer/index.d.ts +77 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/jwk/index.d.ts +1 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/jwk/jwk.d.ts +56 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/jwt/index.d.ts +8 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/jwt/jwt.d.ts +69 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/language/index.d.ts +7 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/language/language.d.ts +120 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/logger/index.d.ts +24 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/method-not-allowed/index.d.ts +49 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/method-override/index.d.ts +48 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/powered-by/index.d.ts +29 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/pretty-json/index.d.ts +42 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/request-id/index.d.ts +7 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/request-id/request-id.d.ts +37 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/secure-headers/index.d.ts +8 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/secure-headers/permissions-policy.d.ts +14 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/secure-headers/secure-headers.d.ts +109 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/serve-static/index.d.ts +31 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/serve-static/path.d.ts +5 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/timeout/index.d.ts +31 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/timing/index.d.ts +7 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/timing/timing.d.ts +129 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/trailing-slash/index.d.ts +94 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/package.json +3 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/preset/quick.d.ts +10 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/preset/tiny.d.ts +10 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/request/constants.d.ts +1 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/request.d.ts +324 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/router/linear-router/index.d.ts +5 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/router/linear-router/router.d.ts +7 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/router/pattern-router/index.d.ts +5 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/router/pattern-router/router.d.ts +7 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/router/reg-exp-router/index.d.ts +6 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/router/reg-exp-router/matcher.d.ts +7 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/router/reg-exp-router/node.d.ts +10 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/router/reg-exp-router/prepared-router.d.ts +17 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/router/reg-exp-router/router.d.ts +11 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/router/reg-exp-router/trie.d.ts +8 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/router/smart-router/index.d.ts +5 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/router/smart-router/router.d.ts +11 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/router/trie-router/index.d.ts +5 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/router/trie-router/node.d.ts +7 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/router/trie-router/router.d.ts +8 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/router.d.ts +97 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/types.d.ts +573 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/accept.d.ts +6 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/basic-auth.d.ts +5 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/body.d.ts +79 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/buffer.d.ts +17 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/color.d.ts +21 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/compress.d.ts +8 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/concurrent.d.ts +11 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/constants.d.ts +4 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/cookie.d.ts +40 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/crypto.d.ts +15 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/encode.d.ts +8 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/filepath.d.ts +12 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/handler.d.ts +6 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/headers.d.ts +8 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/html.d.ts +44 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/http-status.d.ts +32 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/ipaddr.d.ts +56 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/jwt/index.d.ts +18 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/jwt/jwa.d.ts +23 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/jwt/jws.d.ts +12 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/jwt/jwt.d.ts +43 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/jwt/types.d.ts +86 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/jwt/utf8.d.ts +6 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/mime.d.ts +70 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/stream.d.ts +31 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/types.d.ts +74 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/url.d.ts +40 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/validator/index.d.ts +7 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/validator/utils.d.ts +29 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/validator/validator.d.ts +16 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types.js +6 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/accept.js +223 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/basic-auth.js +23 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/body.js +89 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/buffer.js +78 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/color.js +25 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/compress.js +5 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/concurrent.js +39 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/constants.js +5 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/cookie.js +174 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/crypto.js +44 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/encode.js +29 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/filepath.js +35 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/handler.js +13 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/headers.js +0 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/html.js +123 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/http-status.js +0 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/ipaddr.js +288 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/jwt/index.js +6 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/jwt/jwa.js +20 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/jwt/jws.js +192 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/jwt/jwt.js +207 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/jwt/types.js +124 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/jwt/utf8.js +7 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/mime.js +82 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/stream.js +84 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/types.js +0 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/url.js +221 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/validator/index.js +5 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/validator/utils.js +0 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/dist/validator/validator.js +86 -0
- package/benchmarks/e2-framework-v1/project/vendor/hono/package.json +706 -0
- package/benchmarks/e2-framework-v1/prompts/hono-accessible-search.md +9 -0
- package/benchmarks/e2-framework-v1/prompts/hono-tenant-api.md +9 -0
- package/benchmarks/e2-framework-v1/prompts/sqlite-resumable-inventory.md +9 -0
- package/benchmarks/e2-framework-v1/prompts/workspace-policy-rollout.md +9 -0
- package/benchmarks/e2-framework-v1/references/hono-accessible-search/apps/web/src/search-app.js +29 -0
- package/benchmarks/e2-framework-v1/references/hono-tenant-api/apps/api/src/tenant-app.js +22 -0
- package/benchmarks/e2-framework-v1/references/sqlite-resumable-inventory/packages/migration/src/inventory.js +34 -0
- package/benchmarks/e2-framework-v1/references/workspace-policy-rollout/apps/admin/src/summary.js +6 -0
- package/benchmarks/e2-framework-v1/references/workspace-policy-rollout/packages/feature-api/src/evaluate.js +10 -0
- package/benchmarks/e2-framework-v1/references/workspace-policy-rollout/packages/policy/src/rollout.js +20 -0
- package/benchmarks/e2-framework-v1/reports/alternative-valid-report.v1.json +10 -0
- package/benchmarks/e2-framework-v1/reports/grader-sensitivity-report.v1.json +15 -0
- package/benchmarks/e2-framework-v1/reports/mutation-report.v1.json +15 -0
- package/benchmarks/e2-framework-v1/reports/reference-report.v1.json +9 -0
- package/benchmarks/e2-framework-v1/reports/scope-report.v1.json +11 -0
- package/benchmarks/e2-framework-v1/rubric.json +33 -0
- package/benchmarks/e2-framework-v1/suite.json +88 -0
- package/benchmarks/e2-framework-v1/variant.mjs +30 -0
- package/benchmarks/failure-v1/classification-corpus.json +51 -0
- package/benchmarks/model-routing-v1/route-corpus.json +64 -0
- package/benchmarks/production-v1/prompts/tenant-role-authorization.md +3 -3
- package/benchmarks/production-v1/suite.json +10 -6
- package/benchmarks/solver-v1/route-corpus.json +71 -0
- package/catalog/capabilities.json +8 -8
- package/docs/README.md +1 -1
- package/docs/authority-manifest.md +183 -0
- package/docs/command-reference-vietnamese.md +47 -8
- package/docs/distribution-standard.md +9 -9
- package/docs/en/architecture.md +160 -1
- package/docs/en/maintainer-guide.md +35 -2
- package/docs/model-options.md +56 -10
- package/docs/operator-manual-vietnamese.md +87 -18
- package/docs/project-adapters.md +5 -2
- package/docs/quality-benchmark.md +294 -46
- package/docs/quickstart-vietnamese.md +4 -1
- package/docs/release-install-policy.md +75 -9
- package/docs/runtime-harness-standard.md +40 -2
- package/docs/runtime-policy-design.md +4 -3
- package/docs/runtime-quality-baseline.md +4 -3
- package/docs/security-threat-model.md +13 -1
- package/docs/subagents-and-multiagent.md +23 -0
- package/docs/task-lifecycle-vietnamese.md +10 -0
- package/docs/team-onboarding.md +15 -7
- package/docs/usage-observability.md +36 -1
- package/docs/vercel-docs-site.md +7 -5
- package/docs/vi/architecture.md +156 -1
- package/docs/vi/maintainer-guide.md +35 -2
- package/docs-site/architecture.html +49 -6
- package/docs-site/assets/docs.css +52 -1
- package/docs-site/assets/docs.js +4 -2
- package/docs-site/benchmark.html +35 -8
- package/docs-site/commands.html +56 -9
- package/docs-site/content/architecture.html +36 -0
- package/docs-site/content/benchmark.html +22 -2
- package/docs-site/content/commands.html +40 -0
- package/docs-site/content/en/architecture.html +51 -0
- package/docs-site/content/en/benchmark.html +184 -0
- package/docs-site/content/en/commands.html +76 -0
- package/docs-site/content/en/context-engine.html +30 -0
- package/docs-site/content/en/index.html +91 -0
- package/docs-site/content/en/mcp-approval.html +74 -0
- package/docs-site/content/en/mcp-auth.html +57 -0
- package/docs-site/content/en/mcp-servers.html +91 -0
- package/docs-site/content/en/mcp.html +90 -0
- package/docs-site/content/en/permissions.html +19 -0
- package/docs-site/content/en/profiles.html +27 -0
- package/docs-site/content/en/quickstart.html +126 -0
- package/docs-site/content/en/runtime.html +27 -0
- package/docs-site/content/en/scope.html +45 -0
- package/docs-site/content/en/security.html +33 -0
- package/docs-site/content/en/team.html +14 -0
- package/docs-site/content/en/whats-new.html +107 -0
- package/docs-site/content/en/workflows.html +81 -0
- package/docs-site/content/index.html +6 -0
- package/docs-site/content/quickstart.html +1 -1
- package/docs-site/content/runtime.html +2 -2
- package/docs-site/content/whats-new.html +107 -0
- package/docs-site/content/workflows.html +60 -0
- package/docs-site/context-engine.html +13 -6
- package/docs-site/en/architecture.html +185 -0
- package/docs-site/en/benchmark.html +318 -0
- package/docs-site/en/commands.html +210 -0
- package/docs-site/en/context-engine.html +164 -0
- package/docs-site/en/index.html +210 -0
- package/docs-site/en/mcp-approval.html +208 -0
- package/docs-site/en/mcp-auth.html +191 -0
- package/docs-site/en/mcp-servers.html +225 -0
- package/docs-site/en/mcp.html +224 -0
- package/docs-site/en/permissions.html +153 -0
- package/docs-site/en/profiles.html +161 -0
- package/docs-site/en/quickstart.html +260 -0
- package/docs-site/en/runtime.html +161 -0
- package/docs-site/en/scope.html +179 -0
- package/docs-site/en/security.html +167 -0
- package/docs-site/en/team.html +144 -0
- package/docs-site/en/whats-new.html +241 -0
- package/docs-site/en/workflows.html +215 -0
- package/docs-site/index.html +19 -6
- package/docs-site/mcp-approval.html +13 -6
- package/docs-site/mcp-auth.html +13 -6
- package/docs-site/mcp-servers.html +13 -6
- package/docs-site/mcp.html +13 -6
- package/docs-site/permissions.html +13 -6
- package/docs-site/profiles.html +13 -6
- package/docs-site/quickstart.html +16 -9
- package/docs-site/runtime.html +15 -8
- package/docs-site/scope.html +15 -8
- package/docs-site/security.html +13 -6
- package/docs-site/team.html +13 -6
- package/docs-site/whats-new.html +241 -0
- package/docs-site/workflows.html +79 -12
- package/evals/fixtures/authority-manifest.invalid.json +5 -0
- package/evals/fixtures/authority-manifest.valid.json +380 -0
- package/evals/fixtures/benchmark-assurance-evidence.invalid.json +68 -0
- package/evals/fixtures/benchmark-assurance-evidence.valid.json +62 -0
- package/evals/fixtures/failure-classification.invalid.json +14 -0
- package/evals/fixtures/failure-classification.valid.json +13 -0
- package/evals/fixtures/failure-evidence.invalid.json +9 -0
- package/evals/fixtures/failure-evidence.valid.json +8 -0
- package/evals/fixtures/helper-request.invalid.json +1 -0
- package/evals/fixtures/helper-request.valid.json +1 -0
- package/evals/fixtures/model-route-decision.invalid.json +26 -0
- package/evals/fixtures/model-route-decision.valid.json +25 -0
- package/evals/fixtures/role-policy.invalid.json +1 -0
- package/evals/fixtures/role-policy.valid.json +1 -0
- package/evals/fixtures/runtime-model-snapshot.invalid.json +18 -0
- package/evals/fixtures/runtime-model-snapshot.valid.json +21 -0
- package/evals/fixtures/solver-decision.invalid.json +1 -0
- package/evals/fixtures/solver-decision.valid.json +1 -0
- package/evals/fixtures/task-authority-snapshot.invalid.json +6 -0
- package/evals/fixtures/task-authority-snapshot.valid.json +279 -0
- package/evals/fixtures/task-contract.valid.json +1 -0
- package/evals/fixtures/task-features.invalid.json +1 -0
- package/evals/fixtures/task-features.valid.json +1 -0
- package/evals/fixtures/trajectory-state.invalid.json +18 -0
- package/evals/fixtures/trajectory-state.valid.json +40 -0
- package/evals/fixtures/trajectory-transition-event.invalid.json +20 -0
- package/evals/fixtures/trajectory-transition-event.valid.json +19 -0
- package/evals/fs-release-transition.v1.json +83 -0
- package/evals/fs4-readiness-matrix.v1.json +47 -0
- package/evals/fs5-causal-arm.v1.json +74 -0
- package/evals/fs5-pilot-protocol.v1.json +162 -0
- package/evals/fs5-pilot-protocol.v2.json +184 -0
- package/evals/fs5-pilot-protocol.v3.json +107 -0
- package/evals/fs5-pilot-protocol.v4.json +129 -0
- package/evals/fs5-pilot-protocol.v5.json +134 -0
- package/evals/ie6-release-protocol.v1.json +153 -0
- package/evals/long-horizon-v1/README.md +30 -0
- package/evals/long-horizon-v1/lane.json +19 -0
- package/evals/long-horizon-v1/reports/provider-free-30m-run.v1.json +900 -0
- package/evals/long-horizon-v1/runner.mjs +355 -0
- package/evals/long-horizon-v1/verify.mjs +28 -0
- package/evals/long-horizon-v1/worker.mjs +177 -0
- package/evals/private-holdout-v1/CUSTODIAN_RUNBOOK.md +79 -0
- package/evals/private-holdout-v1/README.md +28 -0
- package/evals/private-holdout-v1/access-policy.v1.json +50 -0
- package/evals/private-holdout-v1/human-rubric.v1.json +40 -0
- package/evals/private-holdout-v1/public-exposure.v1.json +43 -0
- package/evals/rc-evaluation-matrix.v1.json +91 -0
- package/evals/real-task-taxonomy.v1.json +436 -0
- package/package.json +9 -5
- package/packages/piagent-core/README.md +8 -2
- package/packages/piagent-core/benchmark/benchmark-assurance.js +193 -0
- package/packages/piagent-core/benchmark/benchmark-bootstrap.js +526 -0
- package/packages/piagent-core/benchmark/benchmark-candidate.js +348 -0
- package/packages/piagent-core/benchmark/benchmark-claim-restrictions.js +39 -0
- package/packages/piagent-core/benchmark/benchmark-cli.js +229 -0
- package/packages/piagent-core/benchmark/benchmark-codex.js +32 -0
- package/packages/piagent-core/benchmark/benchmark-comparison.js +93 -0
- package/packages/piagent-core/benchmark/benchmark-core.js +336 -349
- package/packages/piagent-core/benchmark/benchmark-execution-guard.js +101 -0
- package/packages/piagent-core/benchmark/benchmark-forensics.js +473 -0
- package/packages/piagent-core/benchmark/benchmark-ledger.js +172 -0
- package/packages/piagent-core/benchmark/benchmark-matrix.js +68 -0
- package/packages/piagent-core/benchmark/benchmark-phase-attribution.js +101 -0
- package/packages/piagent-core/benchmark/benchmark-pi-home.js +626 -0
- package/packages/piagent-core/benchmark/benchmark-preflight.js +105 -0
- package/packages/piagent-core/benchmark/benchmark-process.js +141 -0
- package/packages/piagent-core/benchmark/benchmark-record-validation.js +72 -0
- package/packages/piagent-core/benchmark/benchmark-report.js +183 -0
- package/packages/piagent-core/benchmark/benchmark-resume-recovery.js +262 -0
- package/packages/piagent-core/benchmark/benchmark-run-lock.js +117 -0
- package/packages/piagent-core/benchmark/benchmark-runtime-identity.js +122 -0
- package/packages/piagent-core/benchmark/benchmark-runtime.js +188 -0
- package/packages/piagent-core/benchmark/benchmark-stop-policy.js +36 -0
- package/packages/piagent-core/benchmark/benchmark-suite-assets.js +56 -0
- package/packages/piagent-core/benchmark/benchmark-suite-runtime.js +115 -0
- package/packages/piagent-core/benchmark/benchmark-suite.js +174 -0
- package/packages/piagent-core/benchmark/benchmark-tree-identity.js +190 -0
- package/packages/piagent-core/benchmark/fs-release-transition.js +103 -0
- package/packages/piagent-core/benchmark/fs4-readiness-gates.js +109 -0
- package/packages/piagent-core/benchmark/fs5-causal-arm.js +76 -0
- package/packages/piagent-core/benchmark/fs5-pilot-protocol.js +252 -0
- package/packages/piagent-core/benchmark/ie6-release-protocol.js +206 -0
- package/packages/piagent-core/benchmark/model-route-grader.ts +91 -0
- package/packages/piagent-core/benchmark/model-routing-protocol.ts +155 -0
- package/packages/piagent-core/benchmark/rc-readiness-gates.js +34 -0
- package/packages/piagent-core/benchmark/solver-route-grader.ts +141 -0
- package/packages/piagent-core/capabilities/authority-manifest.ts +376 -0
- package/packages/piagent-core/capabilities/capability-core.js +1 -0
- package/packages/piagent-core/capabilities/runtime-integrity.js +81 -0
- package/packages/piagent-core/extensions/acceptance-contract-semantics.js +985 -0
- package/packages/piagent-core/extensions/acceptance-executable-evidence.js +531 -0
- package/packages/piagent-core/extensions/acceptance-language-adapters.js +108 -0
- package/packages/piagent-core/extensions/acceptance-receipt.js +936 -0
- package/packages/piagent-core/extensions/context-engine.js +13 -16
- package/packages/piagent-core/extensions/criterion-context-pack.js +85 -0
- package/packages/piagent-core/extensions/criterion-graph.js +257 -0
- package/packages/piagent-core/extensions/execution-backend.js +63 -0
- package/packages/piagent-core/extensions/failure-types.ts +89 -0
- package/packages/piagent-core/extensions/guard-types.ts +102 -0
- package/packages/piagent-core/extensions/piagent-guard.ts +761 -4061
- package/packages/piagent-core/extensions/policy-core.js +69 -69
- package/packages/piagent-core/extensions/repository-memory.js +189 -0
- package/packages/piagent-core/extensions/return-contract.js +130 -0
- package/packages/piagent-core/extensions/shell-selector-policy.js +55 -0
- package/packages/piagent-core/extensions/shell-write-targets.js +114 -0
- package/packages/piagent-core/extensions/state-retention.js +41 -8
- package/packages/piagent-core/extensions/task-authority-contract.js +16 -0
- package/packages/piagent-core/extensions/task-contract-view.js +78 -0
- package/packages/piagent-core/extensions/task-digest-contract.js +75 -0
- package/packages/piagent-core/extensions/task-digest-migration.js +142 -0
- package/packages/piagent-core/extensions/task-digest-state.js +227 -0
- package/packages/piagent-core/extensions/task-journal.js +549 -0
- package/packages/piagent-core/extensions/task-lifecycle.js +62 -8
- package/packages/piagent-core/extensions/task-runtime-audit.js +119 -0
- package/packages/piagent-core/extensions/task-state.js +403 -52
- package/packages/piagent-core/extensions/tenant-contract.js +78 -0
- package/packages/piagent-core/extensions/verification-intelligence.js +312 -0
- package/packages/piagent-core/extensions/working-tree-digest.js +84 -0
- package/packages/piagent-core/package.json +3 -3
- package/packages/piagent-core/policy/authority-manifest.v1.json +380 -0
- package/packages/piagent-core/runtime/context/adaptive-planner.ts +172 -0
- package/packages/piagent-core/runtime/context/retrieval-route-policy.ts +74 -0
- package/packages/piagent-core/runtime/hooks/agent-start-hook.ts +239 -19
- package/packages/piagent-core/runtime/hooks/completion-hook.ts +329 -32
- package/packages/piagent-core/runtime/hooks/input-hook.ts +24 -3
- package/packages/piagent-core/runtime/hooks/session-hooks.ts +6 -0
- package/packages/piagent-core/runtime/hooks/session-start-hook.ts +98 -6
- package/packages/piagent-core/runtime/hooks/tool-call-hook.ts +93 -0
- package/packages/piagent-core/runtime/hooks/tool-result-hook.ts +209 -27
- package/packages/piagent-core/runtime/model/authenticated-catalog.ts +127 -0
- package/packages/piagent-core/runtime/model/capabilities.ts +64 -0
- package/packages/piagent-core/runtime/model/model-route-policy.ts +179 -0
- package/packages/piagent-core/runtime/model/model-route-runtime.ts +102 -0
- package/packages/piagent-core/runtime/model/model-route-types.ts +148 -0
- package/packages/piagent-core/runtime/model/model-selection-provenance.ts +51 -0
- package/packages/piagent-core/runtime/model/runtime-snapshot.ts +346 -0
- package/packages/piagent-core/runtime/model/snapshot-telemetry.ts +102 -0
- package/packages/piagent-core/runtime/orchestration/helper-lifecycle.ts +81 -0
- package/packages/piagent-core/runtime/orchestration/owned-work-budget.ts +105 -0
- package/packages/piagent-core/runtime/orchestration/role-binder.ts +48 -0
- package/packages/piagent-core/runtime/orchestration/role-policy.ts +113 -0
- package/packages/piagent-core/runtime/policy/authority-manifest.ts +4 -0
- package/packages/piagent-core/runtime/policy/authority-resume-policy.ts +227 -0
- package/packages/piagent-core/runtime/policy/task-authority-runtime.ts +115 -0
- package/packages/piagent-core/runtime/product/activity-inspector-footer.ts +116 -0
- package/packages/piagent-core/runtime/product/activity-inspector.ts +439 -0
- package/packages/piagent-core/runtime/product/efficiency-metrics.ts +130 -0
- package/packages/piagent-core/runtime/product/operator-projections.ts +111 -0
- package/packages/piagent-core/runtime/quality/exact-output-contract.ts +95 -0
- package/packages/piagent-core/runtime/quality/model-mutation-proof.ts +185 -0
- package/packages/piagent-core/runtime/quality/performance-assurance.ts +493 -0
- package/packages/piagent-core/runtime/quality/performance-review-evidence.ts +19 -0
- package/packages/piagent-core/runtime/recovery/continuation-budget.ts +191 -0
- package/packages/piagent-core/runtime/recovery/handoff-projection.ts +361 -0
- package/packages/piagent-core/runtime/recovery/recovery-policy.ts +235 -0
- package/packages/piagent-core/runtime/recovery/resume-state.ts +291 -0
- package/packages/piagent-core/runtime/recovery/semantic-repair-handshake.ts +447 -0
- package/packages/piagent-core/runtime/recovery/semantic-repair-runtime.ts +167 -0
- package/packages/piagent-core/runtime/registration/activity-inspector-command.ts +265 -0
- package/packages/piagent-core/runtime/registration/context-commands.ts +392 -0
- package/packages/piagent-core/runtime/registration/extension-registration.ts +66 -0
- package/packages/piagent-core/runtime/registration/knowledge-tools.ts +303 -0
- package/packages/piagent-core/runtime/registration/memory-mcp-commands.ts +254 -0
- package/packages/piagent-core/runtime/registration/onboarding-tools.ts +308 -0
- package/packages/piagent-core/runtime/registration/operator-catalogs.ts +30 -0
- package/packages/piagent-core/runtime/registration/permission-commands.ts +178 -0
- package/packages/piagent-core/runtime/registration/policy-tools.ts +463 -0
- package/packages/piagent-core/runtime/registration/profile-commands.ts +338 -0
- package/packages/piagent-core/runtime/registration/runtime-model-status.ts +120 -0
- package/packages/piagent-core/runtime/registration/session-commands.ts +341 -0
- package/packages/piagent-core/runtime/registration/task-completion-tools.ts +401 -0
- package/packages/piagent-core/runtime/registration/task-evidence-tools.ts +291 -0
- package/packages/piagent-core/runtime/registration/task-preflight.ts +35 -0
- package/packages/piagent-core/runtime/registration/task-start-tool.ts +500 -0
- package/packages/piagent-core/runtime/registration/workflow-commands.ts +431 -0
- package/packages/piagent-core/runtime/runtime-limits.ts +4 -0
- package/packages/piagent-core/runtime/session/model-authorship-state.ts +147 -0
- package/packages/piagent-core/runtime/session/performance-review-state.ts +340 -0
- package/packages/piagent-core/runtime/session/runtime-state.ts +169 -10
- package/packages/piagent-core/runtime/session/system-prompt.ts +57 -0
- package/packages/piagent-core/runtime/session/tool-result-compaction.ts +95 -0
- package/packages/piagent-core/runtime/solver/runtime-features.ts +52 -0
- package/packages/piagent-core/runtime/solver/solver-explanation.ts +50 -0
- package/packages/piagent-core/runtime/solver/solver-policy.ts +65 -0
- package/packages/piagent-core/runtime/solver/solver-shadow.ts +204 -0
- package/packages/piagent-core/runtime/solver/solver-types.ts +141 -0
- package/packages/piagent-core/runtime/solver/task-features.ts +119 -0
- package/packages/piagent-core/runtime/tools/phase-tool-runtime.ts +133 -0
- package/packages/piagent-core/runtime/tools/phase-tools.ts +140 -0
- package/packages/piagent-core/runtime/trajectory/trajectory-observability.ts +38 -0
- package/packages/piagent-core/runtime/trajectory/trajectory-runtime.ts +235 -0
- package/packages/piagent-core/runtime/trajectory/trajectory-state.ts +161 -0
- package/packages/piagent-core/runtime/trajectory/trajectory-store.ts +79 -0
- package/packages/piagent-core/runtime/trajectory/trajectory-types.ts +196 -0
- package/packages/piagent-core/runtime/workflows/task-intake.ts +265 -12
- package/packages/piagent-core/subagents/piagent-oracle.md +4 -1
- package/packages/piagent-core/subagents/piagent-planner.md +4 -0
- package/packages/piagent-core/subagents/piagent-reviewer.md +4 -0
- package/packages/piagent-core/subagents/piagent-scout.md +4 -1
- package/packages/piagent-core/subagents/piagent-worker.md +5 -0
- package/schemas/authority-manifest.schema.json +126 -0
- package/schemas/benchmark-assurance-evidence.schema.json +142 -0
- package/schemas/failure-classification.schema.json +24 -0
- package/schemas/failure-evidence.schema.json +20 -0
- package/schemas/helper-request.schema.json +24 -0
- package/schemas/model-route-decision.schema.json +44 -0
- package/schemas/project-profile.schema.json +3 -0
- package/schemas/role-policy.schema.json +30 -0
- package/schemas/runtime-model-snapshot.schema.json +57 -0
- package/schemas/solver-decision.schema.json +19 -0
- package/schemas/task-authority-snapshot.schema.json +86 -0
- package/schemas/task-contract.schema.json +429 -2
- package/schemas/task-features.schema.json +28 -0
- package/schemas/trajectory-state.schema.json +51 -0
- package/schemas/trajectory-transition-event.schema.json +43 -0
- package/scripts/benchmark-runner-core.mjs +946 -0
- package/scripts/benchmark-runner.mjs +55 -1405
- package/scripts/benchmark-session.mjs +412 -0
- package/scripts/build-docs-site.mjs +238 -53
- package/scripts/check-runtime-advisories.mjs +8 -53
- package/scripts/configure-model-scope.sh +3 -3
- package/scripts/evaluate-fs-release-transition.mjs +27 -0
- package/scripts/fs4-readiness-evaluation.mjs +137 -0
- package/scripts/helper-evaluation.mjs +96 -0
- package/scripts/ie6-release-freeze.mjs +194 -0
- package/scripts/install-global.sh +1 -1
- package/scripts/model-catalog.mjs +132 -0
- package/scripts/model-route-evaluation-core.ts +81 -0
- package/scripts/model-route-evaluation.mjs +22 -0
- package/scripts/model-routing-benchmark.mjs +29 -0
- package/scripts/model-routing-protocol-core.ts +64 -0
- package/scripts/phase-tools-evaluation.mjs +222 -0
- package/scripts/pi-model-catalog.sh +2 -161
- package/scripts/pi-model-route.mjs +115 -0
- package/scripts/piagent-cli.mjs +1 -0
- package/scripts/private-holdout-readiness.mjs +96 -0
- package/scripts/product-usability-pilot.mjs +111 -0
- package/scripts/rc-readiness-evaluation.mjs +240 -0
- package/scripts/recovery-evaluation.mjs +132 -0
- package/scripts/solver-shadow-pilot.mjs +164 -0
- package/scripts/team-doctor.sh +65 -3
- package/scripts/verify-local.sh +55 -4
- package/scripts/verify-release-identity.mjs +25 -7
- package/templates/global/settings.json +3 -3
|
@@ -1,1432 +1,82 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import crypto from "node:crypto";
|
|
3
|
-
import fs from "node:fs";
|
|
4
|
-
import os from "node:os";
|
|
5
|
-
import path from "node:path";
|
|
6
|
-
import readline from "node:readline/promises";
|
|
7
2
|
import { spawn } from "node:child_process";
|
|
8
|
-
import
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
9
5
|
|
|
10
6
|
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
renderBenchmarkText,
|
|
17
|
-
summarizeBenchmark,
|
|
18
|
-
validateBenchmarkSuite
|
|
19
|
-
} from "../packages/piagent-core/benchmark/benchmark-core.js";
|
|
20
|
-
import { matchesAnyPath } from "../packages/piagent-core/extensions/policy-core.js";
|
|
21
|
-
import { listTaskContracts, workingTreeFiles, workingTreeSnapshot } from "../packages/piagent-core/extensions/task-state.js";
|
|
22
|
-
import { summarizeSession, walkJsonl } from "./pi-usage-history.mjs";
|
|
23
|
-
|
|
24
|
-
const packageRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
|
|
25
|
-
const coreSuitePath = path.join(packageRoot, "benchmarks", "core-v1", "suite.json");
|
|
26
|
-
const productionSuitePath = path.join(packageRoot, "benchmarks", "production-v1", "suite.json");
|
|
27
|
-
const packageManifest = JSON.parse(fs.readFileSync(path.join(packageRoot, "package.json"), "utf8"));
|
|
28
|
-
const outputLimit = 4 * 1024 * 1024;
|
|
29
|
-
const activeChildren = new Set();
|
|
30
|
-
const benchmarkSurfaces = new Set(["raw-pi", "piagent", "codex-cli"]);
|
|
31
|
-
const codexModes = new Set(["controlled", "native"]);
|
|
32
|
-
const controlledCodexFeatures = [
|
|
33
|
-
"apps",
|
|
34
|
-
"plugins",
|
|
35
|
-
"browser_use",
|
|
36
|
-
"browser_use_external",
|
|
37
|
-
"browser_use_full_cdp_access",
|
|
38
|
-
"computer_use",
|
|
39
|
-
"image_generation",
|
|
40
|
-
"in_app_browser",
|
|
41
|
-
"multi_agent",
|
|
42
|
-
"multi_agent_v2",
|
|
43
|
-
"goals",
|
|
44
|
-
"hooks",
|
|
45
|
-
"skill_search",
|
|
46
|
-
"tool_suggest",
|
|
47
|
-
"workspace_dependencies"
|
|
48
|
-
];
|
|
49
|
-
const coldStartRuntimeManagedPaths = [
|
|
50
|
-
".pi/project-context.md",
|
|
51
|
-
".pi/context-index.json",
|
|
52
|
-
".pi/context-v2.sqlite",
|
|
53
|
-
".pi/context-v2.sqlite-*"
|
|
54
|
-
];
|
|
55
|
-
let interruptedSignal;
|
|
56
|
-
|
|
57
|
-
const usage = `Usage:
|
|
58
|
-
piagent-benchmark [options]
|
|
59
|
-
piagent-benchmark <project-path> --record ... Legacy recorder
|
|
60
|
-
piagent-benchmark <project-path> --init Legacy scenario notes
|
|
61
|
-
|
|
62
|
-
Runs a clean, paired baseline vs Piagent benchmark and grades it automatically.
|
|
63
|
-
With no options it uses the built-in core-v1 suite, the current Pi default
|
|
64
|
-
model/thinking setting, and the suite's repeat count.
|
|
65
|
-
|
|
66
|
-
Options:
|
|
67
|
-
--suite <id|path> core-v1, production-v1, or suite.json path.
|
|
68
|
-
--production Alias for --suite production-v1.
|
|
69
|
-
--surfaces <a,b> raw-pi,piagent (default) or piagent,codex-cli.
|
|
70
|
-
--model <provider/model> Pin one model identity for both surfaces.
|
|
71
|
-
--thinking <level> off|minimal|low|medium|high|xhigh|max.
|
|
72
|
-
--codex-mode <mode> controlled isolated home (default) or native user configuration.
|
|
73
|
-
--repeats <1-10> Override the suite repeat count.
|
|
74
|
-
--infrastructure-retries <n> Retry 0-3 startup failures with zero recorded usage.
|
|
75
|
-
--retry-delay <seconds> Backoff before infrastructure retry, 0-120 seconds.
|
|
76
|
-
--scenarios <id,id> Run selected scenario families for diagnosis.
|
|
77
|
-
--seed <value> Reproduce generated hidden variants.
|
|
78
|
-
--timeout <seconds> Per-agent timeout, 30-3600 seconds.
|
|
79
|
-
--output <directory> Report directory; must be empty or absent.
|
|
80
|
-
--keep-workspaces Retain isolated workspaces and session logs.
|
|
81
|
-
--yes Skip the cost/run-count confirmation.
|
|
82
|
-
--dry-run Validate and print the execution plan only.
|
|
83
|
-
--json Print final report JSON instead of the table.
|
|
84
|
-
-h, --help Show this help.
|
|
85
|
-
|
|
86
|
-
Outputs report.json, report.html, summary.txt, and runs.jsonl with mode 0600.
|
|
87
|
-
No token/result value is entered manually; usage comes from Pi session JSONL
|
|
88
|
-
or Codex exec JSONL. Codex CLI comparisons require --model and --thinking.
|
|
89
|
-
`;
|
|
7
|
+
benchmarkBootstrapEnvironment,
|
|
8
|
+
cleanupBenchmarkExecutionSnapshot,
|
|
9
|
+
createBenchmarkExecutionSnapshot
|
|
10
|
+
} from "../packages/piagent-core/benchmark/benchmark-bootstrap.js";
|
|
11
|
+
import { assertBenchmarkLaunchEnvironmentSafe } from "../packages/piagent-core/benchmark/benchmark-runtime.js";
|
|
90
12
|
|
|
91
|
-
|
|
92
|
-
const error = new Error(message);
|
|
93
|
-
error.exitCode = code;
|
|
94
|
-
throw error;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
function requireValue(argv, index, name) {
|
|
98
|
-
const value = argv[index + 1];
|
|
99
|
-
if (!value || value.startsWith("--")) fail(`Missing value for ${name}`);
|
|
100
|
-
return value;
|
|
101
|
-
}
|
|
13
|
+
const liveRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
|
|
102
14
|
|
|
103
|
-
function
|
|
104
|
-
|
|
105
|
-
const value = Number(raw);
|
|
106
|
-
if (value < minimum || value > maximum) fail(`${name} must be between ${minimum} and ${maximum}`);
|
|
107
|
-
return value;
|
|
15
|
+
function legacyInvocation(argv) {
|
|
16
|
+
return argv.includes("--record") || argv.includes("--init");
|
|
108
17
|
}
|
|
109
18
|
|
|
110
|
-
function
|
|
19
|
+
function terminate(child, signal) {
|
|
111
20
|
try {
|
|
112
21
|
if (process.platform !== "win32" && child.pid) process.kill(-child.pid, signal);
|
|
113
22
|
else child.kill(signal);
|
|
114
23
|
} catch {
|
|
115
|
-
// The
|
|
24
|
+
// The child may have already completed between the signal and forwarding.
|
|
116
25
|
}
|
|
117
26
|
}
|
|
118
27
|
|
|
119
|
-
function
|
|
120
|
-
const handlers = new Map();
|
|
121
|
-
for (const signal of ["SIGINT", "SIGTERM"]) {
|
|
122
|
-
const handler = () => {
|
|
123
|
-
if (interruptedSignal) return;
|
|
124
|
-
interruptedSignal = signal;
|
|
125
|
-
for (const child of activeChildren) {
|
|
126
|
-
terminateChild(child, signal);
|
|
127
|
-
setTimeout(() => terminateChild(child, "SIGKILL"), 2_000).unref();
|
|
128
|
-
}
|
|
129
|
-
};
|
|
130
|
-
handlers.set(signal, handler);
|
|
131
|
-
process.on(signal, handler);
|
|
132
|
-
}
|
|
133
|
-
return () => {
|
|
134
|
-
for (const [signal, handler] of handlers) process.off(signal, handler);
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
export function parseBenchmarkArgs(argv) {
|
|
139
|
-
const options = {
|
|
140
|
-
suite: "core-v1",
|
|
141
|
-
surfaces: ["raw-pi", "piagent"],
|
|
142
|
-
model: undefined,
|
|
143
|
-
thinking: undefined,
|
|
144
|
-
codexMode: "controlled",
|
|
145
|
-
seed: undefined,
|
|
146
|
-
repeats: undefined,
|
|
147
|
-
infrastructureRetries: undefined,
|
|
148
|
-
retryDelaySeconds: undefined,
|
|
149
|
-
scenarioIds: undefined,
|
|
150
|
-
timeoutSeconds: undefined,
|
|
151
|
-
output: undefined,
|
|
152
|
-
keepWorkspaces: false,
|
|
153
|
-
yes: false,
|
|
154
|
-
dryRun: false,
|
|
155
|
-
json: false,
|
|
156
|
-
help: false
|
|
157
|
-
};
|
|
158
|
-
const thinkingLevels = new Set(["off", "minimal", "low", "medium", "high", "xhigh", "max"]);
|
|
159
|
-
for (let index = 0; index < argv.length; index += 1) {
|
|
160
|
-
const arg = argv[index];
|
|
161
|
-
switch (arg) {
|
|
162
|
-
case "run":
|
|
163
|
-
break;
|
|
164
|
-
case "--suite":
|
|
165
|
-
options.suite = requireValue(argv, index, arg);
|
|
166
|
-
index += 1;
|
|
167
|
-
break;
|
|
168
|
-
case "--production":
|
|
169
|
-
options.suite = "production-v1";
|
|
170
|
-
break;
|
|
171
|
-
case "--surfaces": {
|
|
172
|
-
const values = requireValue(argv, index, arg).split(",").map((value) => value.trim()).filter(Boolean);
|
|
173
|
-
if (values.length !== 2 || new Set(values).size !== 2 || values.some((value) => !benchmarkSurfaces.has(value))) {
|
|
174
|
-
fail("--surfaces must contain two different values from raw-pi, piagent, codex-cli");
|
|
175
|
-
}
|
|
176
|
-
if (!values.includes("piagent") || (!values.includes("raw-pi") && !values.includes("codex-cli"))) {
|
|
177
|
-
fail("--surfaces must compare piagent with raw-pi or codex-cli");
|
|
178
|
-
}
|
|
179
|
-
options.surfaces = values;
|
|
180
|
-
index += 1;
|
|
181
|
-
break;
|
|
182
|
-
}
|
|
183
|
-
case "--model":
|
|
184
|
-
options.model = requireValue(argv, index, arg);
|
|
185
|
-
index += 1;
|
|
186
|
-
break;
|
|
187
|
-
case "--thinking":
|
|
188
|
-
options.thinking = requireValue(argv, index, arg);
|
|
189
|
-
if (!thinkingLevels.has(options.thinking)) fail(`--thinking must be one of ${[...thinkingLevels].join(", ")}`);
|
|
190
|
-
index += 1;
|
|
191
|
-
break;
|
|
192
|
-
case "--codex-mode":
|
|
193
|
-
options.codexMode = requireValue(argv, index, arg);
|
|
194
|
-
if (!codexModes.has(options.codexMode)) fail("--codex-mode must be controlled or native");
|
|
195
|
-
index += 1;
|
|
196
|
-
break;
|
|
197
|
-
case "--repeats":
|
|
198
|
-
options.repeats = positiveInteger(requireValue(argv, index, arg), arg, 1, 10);
|
|
199
|
-
index += 1;
|
|
200
|
-
break;
|
|
201
|
-
case "--infrastructure-retries":
|
|
202
|
-
options.infrastructureRetries = positiveInteger(requireValue(argv, index, arg), arg, 0, 3);
|
|
203
|
-
index += 1;
|
|
204
|
-
break;
|
|
205
|
-
case "--retry-delay":
|
|
206
|
-
options.retryDelaySeconds = positiveInteger(requireValue(argv, index, arg), arg, 0, 120);
|
|
207
|
-
index += 1;
|
|
208
|
-
break;
|
|
209
|
-
case "--scenarios": {
|
|
210
|
-
const values = requireValue(argv, index, arg).split(",").map((value) => value.trim()).filter(Boolean);
|
|
211
|
-
if (values.length === 0 || new Set(values).size !== values.length) fail("--scenarios must contain unique scenario ids");
|
|
212
|
-
options.scenarioIds = values;
|
|
213
|
-
index += 1;
|
|
214
|
-
break;
|
|
215
|
-
}
|
|
216
|
-
case "--seed":
|
|
217
|
-
options.seed = requireValue(argv, index, arg);
|
|
218
|
-
if (options.seed.length > 200) fail("--seed must contain at most 200 characters");
|
|
219
|
-
index += 1;
|
|
220
|
-
break;
|
|
221
|
-
case "--timeout":
|
|
222
|
-
options.timeoutSeconds = positiveInteger(requireValue(argv, index, arg), arg, 30, 3600);
|
|
223
|
-
index += 1;
|
|
224
|
-
break;
|
|
225
|
-
case "--output":
|
|
226
|
-
options.output = path.resolve(requireValue(argv, index, arg));
|
|
227
|
-
index += 1;
|
|
228
|
-
break;
|
|
229
|
-
case "--keep-workspaces":
|
|
230
|
-
options.keepWorkspaces = true;
|
|
231
|
-
break;
|
|
232
|
-
case "--yes":
|
|
233
|
-
options.yes = true;
|
|
234
|
-
break;
|
|
235
|
-
case "--dry-run":
|
|
236
|
-
options.dryRun = true;
|
|
237
|
-
break;
|
|
238
|
-
case "--json":
|
|
239
|
-
options.json = true;
|
|
240
|
-
break;
|
|
241
|
-
case "-h":
|
|
242
|
-
case "--help":
|
|
243
|
-
options.help = true;
|
|
244
|
-
break;
|
|
245
|
-
default:
|
|
246
|
-
fail(`Unknown benchmark option: ${arg}`);
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
return options;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
function isLegacyInvocation(argv) {
|
|
253
|
-
return argv.includes("--record") || argv.includes("--init");
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
function runCommand(command, args, options = {}) {
|
|
28
|
+
function runChild(script, argv, env, cleanup) {
|
|
257
29
|
return new Promise((resolve, reject) => {
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
const detached = process.platform !== "win32";
|
|
264
|
-
const child = spawn(command, args, {
|
|
265
|
-
cwd: options.cwd,
|
|
266
|
-
env: options.env ?? process.env,
|
|
267
|
-
stdio: options.inherit ? "inherit" : [options.input === undefined ? "ignore" : "pipe", "pipe", "pipe"],
|
|
268
|
-
detached
|
|
30
|
+
const child = spawn(process.execPath, [script, ...argv], {
|
|
31
|
+
cwd: process.cwd(),
|
|
32
|
+
env,
|
|
33
|
+
detached: process.platform !== "win32",
|
|
34
|
+
stdio: "inherit"
|
|
269
35
|
});
|
|
270
|
-
|
|
271
|
-
const
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
child.stdin.end(String(options.input));
|
|
280
|
-
}
|
|
281
|
-
let stdout = "";
|
|
282
|
-
let stderr = "";
|
|
283
|
-
const stdoutDigest = crypto.createHash("sha256");
|
|
284
|
-
const forbidden = [...new Set(options.forbiddenSubstrings ?? [])].filter((value) => typeof value === "string" && value);
|
|
285
|
-
const required = [...new Set(options.requiredSubstrings ?? [])].filter((value) => typeof value === "string" && value);
|
|
286
|
-
const forbiddenHits = new Set();
|
|
287
|
-
const requiredHits = new Set();
|
|
288
|
-
const scanTails = { stdout: "", stderr: "" };
|
|
289
|
-
const scanWindow = Math.max(0, ...[...forbidden, ...required].map((value) => value.length - 1));
|
|
290
|
-
const append = (current, chunk) => `${current}${chunk}`.slice(-outputLimit);
|
|
291
|
-
const inspect = (stream, chunk) => {
|
|
292
|
-
const text = `${scanTails[stream]}${chunk}`;
|
|
293
|
-
for (const value of forbidden) {
|
|
294
|
-
if (text.includes(value)) forbiddenHits.add(value);
|
|
295
|
-
}
|
|
296
|
-
if (stream === "stdout") {
|
|
297
|
-
for (const value of required) {
|
|
298
|
-
if (text.includes(value)) requiredHits.add(value);
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
scanTails[stream] = scanWindow > 0 ? text.slice(-scanWindow) : "";
|
|
36
|
+
const handlers = new Map();
|
|
37
|
+
for (const signal of ["SIGINT", "SIGTERM", "SIGHUP"]) {
|
|
38
|
+
const handler = () => terminate(child, signal);
|
|
39
|
+
handlers.set(signal, handler);
|
|
40
|
+
process.on(signal, handler);
|
|
41
|
+
}
|
|
42
|
+
const finish = () => {
|
|
43
|
+
for (const [signal, handler] of handlers) process.off(signal, handler);
|
|
44
|
+
cleanup?.();
|
|
302
45
|
};
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
});
|
|
313
|
-
let timedOut = false;
|
|
314
|
-
const terminate = (signal) => terminateChild(child, signal);
|
|
315
|
-
const timer = options.timeoutMs ? setTimeout(() => {
|
|
316
|
-
timedOut = true;
|
|
317
|
-
terminate("SIGTERM");
|
|
318
|
-
setTimeout(() => terminate("SIGKILL"), 2_000).unref();
|
|
319
|
-
}, options.timeoutMs) : undefined;
|
|
320
|
-
child.once("error", (error) => {
|
|
321
|
-
if (timer) clearTimeout(timer);
|
|
322
|
-
cleanup();
|
|
323
|
-
reject(error);
|
|
324
|
-
});
|
|
325
|
-
child.once("exit", (code, signal) => {
|
|
326
|
-
if (timer) clearTimeout(timer);
|
|
327
|
-
cleanup();
|
|
328
|
-
resolve({ code: code ?? 1, signal, timedOut, stdout, stdoutHash: stdoutDigest.digest("hex"), stderr, forbiddenHits: [...forbiddenHits], requiredHits: [...requiredHits], durationSeconds: (Date.now() - started) / 1000 });
|
|
329
|
-
});
|
|
330
|
-
});
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
function resolveSuitePath(input) {
|
|
334
|
-
if (input === "core-v1") return coreSuitePath;
|
|
335
|
-
if (input === "production-v1") return productionSuitePath;
|
|
336
|
-
const candidate = path.resolve(input);
|
|
337
|
-
return fs.existsSync(candidate) && fs.statSync(candidate).isDirectory()
|
|
338
|
-
? path.join(candidate, "suite.json")
|
|
339
|
-
: candidate;
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
function loadSuite(input) {
|
|
343
|
-
const manifestPath = resolveSuitePath(input);
|
|
344
|
-
let raw;
|
|
345
|
-
try {
|
|
346
|
-
raw = JSON.parse(fs.readFileSync(manifestPath, "utf8"));
|
|
347
|
-
} catch (error) {
|
|
348
|
-
fail(`Cannot read benchmark suite ${manifestPath}: ${error.message}`, 1);
|
|
349
|
-
}
|
|
350
|
-
const suite = validateBenchmarkSuite(raw);
|
|
351
|
-
return { suite, manifestPath: fs.realpathSync(manifestPath), suiteRoot: fs.realpathSync(path.dirname(manifestPath)) };
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
function inside(parent, target) {
|
|
355
|
-
const relative = path.relative(parent, target);
|
|
356
|
-
return relative !== ".." && !relative.startsWith(`..${path.sep}`) && !path.isAbsolute(relative);
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
function resolveSuiteEntry(suiteRoot, relativePath, kind) {
|
|
360
|
-
const lexical = path.resolve(suiteRoot, relativePath);
|
|
361
|
-
if (!inside(suiteRoot, lexical)) fail(`Suite ${kind} escapes its root: ${relativePath}`, 1);
|
|
362
|
-
let resolved;
|
|
363
|
-
try {
|
|
364
|
-
resolved = fs.realpathSync(lexical);
|
|
365
|
-
} catch {
|
|
366
|
-
fail(`Suite ${kind} does not exist: ${relativePath}`, 1);
|
|
367
|
-
}
|
|
368
|
-
if (!inside(suiteRoot, resolved)) fail(`Suite ${kind} resolves outside its root: ${relativePath}`, 1);
|
|
369
|
-
const stat = fs.statSync(resolved);
|
|
370
|
-
if (kind === "fixture" ? !stat.isDirectory() : !stat.isFile()) fail(`Suite ${kind} has the wrong file type: ${relativePath}`, 1);
|
|
371
|
-
return resolved;
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
function rejectSymlinks(root) {
|
|
375
|
-
const stack = [root];
|
|
376
|
-
while (stack.length) {
|
|
377
|
-
const current = stack.pop();
|
|
378
|
-
for (const entry of fs.readdirSync(current, { withFileTypes: true })) {
|
|
379
|
-
const target = path.join(current, entry.name);
|
|
380
|
-
const stat = fs.lstatSync(target);
|
|
381
|
-
if (stat.isSymbolicLink()) fail(`Benchmark fixture must not contain symbolic links: ${path.relative(root, target)}`, 1);
|
|
382
|
-
if (stat.isDirectory()) stack.push(target);
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
function validateSuiteFiles(suite, suiteRoot) {
|
|
388
|
-
rejectSymlinks(suiteRoot);
|
|
389
|
-
for (const scenario of suite.scenarios) {
|
|
390
|
-
const fixture = resolveSuiteEntry(suiteRoot, scenario.fixture, "fixture");
|
|
391
|
-
const prompt = resolveSuiteEntry(suiteRoot, scenario.prompt, "prompt");
|
|
392
|
-
const grader = resolveSuiteEntry(suiteRoot, scenario.grader, "grader");
|
|
393
|
-
const generator = scenario.variantGenerator
|
|
394
|
-
? resolveSuiteEntry(suiteRoot, scenario.variantGenerator, "variant generator")
|
|
395
|
-
: null;
|
|
396
|
-
if (inside(fixture, grader) || inside(fixture, prompt)) {
|
|
397
|
-
fail(`Suite prompt and grader must stay outside the agent fixture: ${scenario.id}`, 1);
|
|
398
|
-
}
|
|
399
|
-
if (generator && inside(fixture, generator)) {
|
|
400
|
-
fail(`Suite variant generator must stay outside the agent fixture: ${scenario.id}`, 1);
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
function suiteTreeDigest(suiteRoot) {
|
|
406
|
-
const files = [];
|
|
407
|
-
const stack = [suiteRoot];
|
|
408
|
-
while (stack.length) {
|
|
409
|
-
const current = stack.pop();
|
|
410
|
-
for (const entry of fs.readdirSync(current, { withFileTypes: true })) {
|
|
411
|
-
const target = path.join(current, entry.name);
|
|
412
|
-
if (entry.isDirectory()) stack.push(target);
|
|
413
|
-
else if (entry.isFile()) files.push(target);
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
|
-
const hash = crypto.createHash("sha256");
|
|
417
|
-
for (const file of files.sort((left, right) => left < right ? -1 : left > right ? 1 : 0)) {
|
|
418
|
-
hash.update(path.relative(suiteRoot, file).replaceAll(path.sep, "/"));
|
|
419
|
-
hash.update("\0");
|
|
420
|
-
hash.update(fs.readFileSync(file));
|
|
421
|
-
hash.update("\0");
|
|
422
|
-
}
|
|
423
|
-
return hash.digest("hex");
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
function privateDirectory(target) {
|
|
427
|
-
fs.mkdirSync(target, { recursive: true, mode: 0o700 });
|
|
428
|
-
try { fs.chmodSync(target, 0o700); } catch { /* Non-POSIX filesystem. */ }
|
|
429
|
-
return target;
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
function benchmarkEnvironment(extra = {}) {
|
|
433
|
-
const env = { ...process.env };
|
|
434
|
-
for (const key of Object.keys(env)) {
|
|
435
|
-
if (key.startsWith("PIAGENT_")) delete env[key];
|
|
436
|
-
}
|
|
437
|
-
if (process.env.PIAGENT_BENCHMARK_PI_COMMAND && process.env.PIAGENT_BENCHMARK_TASK_FIXTURE) {
|
|
438
|
-
env.PIAGENT_BENCHMARK_TASK_FIXTURE = process.env.PIAGENT_BENCHMARK_TASK_FIXTURE;
|
|
439
|
-
}
|
|
440
|
-
return { ...env, ...extra };
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
function operatorCodexHome() {
|
|
444
|
-
return path.resolve(process.env.CODEX_HOME || path.join(os.homedir(), ".codex"));
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
function createCodexRuntime(options) {
|
|
448
|
-
if (!options.surfaces.includes("codex-cli")) {
|
|
449
|
-
return { mode: null, home: null, credentialBridge: null, cleanup() {} };
|
|
450
|
-
}
|
|
451
|
-
if (options.codexMode === "native") {
|
|
452
|
-
return { mode: "native", home: null, credentialBridge: "operator-home", cleanup() {} };
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
const home = fs.mkdtempSync(path.join(os.tmpdir(), "piagent-benchmark-codex-home-"));
|
|
456
|
-
try { fs.chmodSync(home, 0o700); } catch { /* Non-POSIX filesystem. */ }
|
|
457
|
-
let credentialBridge = "environment-only";
|
|
458
|
-
const sourceAuth = path.join(operatorCodexHome(), "auth.json");
|
|
459
|
-
try {
|
|
460
|
-
const resolvedAuth = fs.realpathSync(sourceAuth);
|
|
461
|
-
if (!fs.statSync(resolvedAuth).isFile()) fail(`Codex credential path is not a file: ${sourceAuth}`, 1);
|
|
462
|
-
fs.symlinkSync(resolvedAuth, path.join(home, "auth.json"));
|
|
463
|
-
credentialBridge = "auth-json-link";
|
|
464
|
-
} catch (error) {
|
|
465
|
-
if (error?.code !== "ENOENT") {
|
|
466
|
-
fs.rmSync(home, { recursive: true, force: true });
|
|
467
|
-
throw error;
|
|
468
|
-
}
|
|
469
|
-
}
|
|
470
|
-
return {
|
|
471
|
-
mode: "controlled",
|
|
472
|
-
home,
|
|
473
|
-
credentialBridge,
|
|
474
|
-
cleanup() { fs.rmSync(home, { recursive: true, force: true }); }
|
|
475
|
-
};
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
function codexProcessEnvironment(runtime, extra = {}) {
|
|
479
|
-
const env = benchmarkEnvironment(extra);
|
|
480
|
-
if (runtime.mode !== "controlled") return env;
|
|
481
|
-
for (const key of Object.keys(env)) {
|
|
482
|
-
if (key.startsWith("CODEX_") && key !== "CODEX_ACCESS_TOKEN") delete env[key];
|
|
483
|
-
}
|
|
484
|
-
for (const key of ["OPENAI_BASE_URL", "OPENAI_API_BASE"]) delete env[key];
|
|
485
|
-
env.CODEX_HOME = runtime.home;
|
|
486
|
-
return env;
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
function comparisonSurfaces(options) {
|
|
490
|
-
return {
|
|
491
|
-
baselineSurface: options.surfaces.find((surface) => surface !== "piagent"),
|
|
492
|
-
candidateSurface: "piagent"
|
|
493
|
-
};
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
function codexModelName(model) {
|
|
497
|
-
const value = String(model ?? "").trim();
|
|
498
|
-
if (!value) fail("Codex CLI comparisons require --model", 1);
|
|
499
|
-
const separator = value.indexOf("/");
|
|
500
|
-
const resolved = separator >= 0 ? value.slice(separator + 1) : value;
|
|
501
|
-
if (!resolved || resolved.includes("/")) fail(`Cannot map --model ${value} to a Codex CLI model id`, 1);
|
|
502
|
-
return resolved;
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
function codexThinkingEffort(thinking) {
|
|
506
|
-
if (!thinking) fail("Codex CLI comparisons require --thinking", 1);
|
|
507
|
-
return thinking === "off" ? "none" : thinking;
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
function codexExecArgs({ workspace, options, disabledFeatures = [] }) {
|
|
511
|
-
const args = [
|
|
512
|
-
"exec",
|
|
513
|
-
"--json",
|
|
514
|
-
"--ephemeral",
|
|
515
|
-
"--color", "never",
|
|
516
|
-
"-C", workspace,
|
|
517
|
-
"-s", "workspace-write",
|
|
518
|
-
"-m", codexModelName(options.model),
|
|
519
|
-
"-c", `model_reasoning_effort=${JSON.stringify(codexThinkingEffort(options.thinking))}`
|
|
520
|
-
];
|
|
521
|
-
if (options.codexMode === "controlled") {
|
|
522
|
-
args.push("--ignore-user-config", "--ignore-rules");
|
|
523
|
-
for (const feature of disabledFeatures) args.push("--disable", feature);
|
|
524
|
-
}
|
|
525
|
-
args.push("-");
|
|
526
|
-
return args;
|
|
527
|
-
}
|
|
528
|
-
|
|
529
|
-
function graderEnvironment(scenarioId) {
|
|
530
|
-
const env = {};
|
|
531
|
-
for (const key of ["HOME", "PATH", "TMPDIR", "TMP", "TEMP", "LANG", "LC_ALL", "TZ", "SystemRoot"]) {
|
|
532
|
-
if (process.env[key]) env[key] = process.env[key];
|
|
533
|
-
}
|
|
534
|
-
return { ...env, NO_COLOR: "1", PIAGENT_BENCHMARK_SCENARIO: scenarioId };
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
function writePrivate(file, value) {
|
|
538
|
-
fs.writeFileSync(file, value, { mode: 0o600 });
|
|
539
|
-
try { fs.chmodSync(file, 0o600); } catch { /* Non-POSIX filesystem. */ }
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
function defaultOutputRoot() {
|
|
543
|
-
const agentRoot = process.env.PI_CODING_AGENT_DIR || path.join(os.homedir(), ".pi", "agent");
|
|
544
|
-
return path.join(agentRoot, "benchmarks", "piagent");
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
function globalAppendSystemPrompt() {
|
|
548
|
-
const agentRoot = process.env.PI_CODING_AGENT_DIR || path.join(os.homedir(), ".pi", "agent");
|
|
549
|
-
const candidate = path.resolve(agentRoot, "APPEND_SYSTEM.md");
|
|
550
|
-
return fs.existsSync(candidate) && fs.statSync(candidate).isFile() ? candidate : undefined;
|
|
551
|
-
}
|
|
552
|
-
|
|
553
|
-
function createRunId(suiteId) {
|
|
554
|
-
const timestamp = new Date().toISOString().replace(/[-:]/g, "").replace(/\.\d{3}Z$/, "Z");
|
|
555
|
-
return `${suiteId}-${timestamp}-${crypto.randomBytes(3).toString("hex")}`;
|
|
556
|
-
}
|
|
557
|
-
|
|
558
|
-
function ensureEmptyOutput(target) {
|
|
559
|
-
if (fs.existsSync(target) && fs.readdirSync(target).length > 0) fail(`Output directory is not empty: ${target}`, 1);
|
|
560
|
-
return privateDirectory(target);
|
|
561
|
-
}
|
|
562
|
-
|
|
563
|
-
function safeWorkspaceFile(workspace, relativePath) {
|
|
564
|
-
const target = path.resolve(workspace, relativePath);
|
|
565
|
-
if (!inside(workspace, target)) fail(`Benchmark setup file escapes the workspace: ${relativePath}`, 1);
|
|
566
|
-
return target;
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
async function initializeGit(workspace, setupFiles) {
|
|
570
|
-
const commands = [
|
|
571
|
-
["init", "-q"],
|
|
572
|
-
["config", "user.email", "benchmark@piagent.local"],
|
|
573
|
-
["config", "user.name", "Piagent Benchmark"],
|
|
574
|
-
["add", "-A"]
|
|
575
|
-
];
|
|
576
|
-
for (const args of commands) {
|
|
577
|
-
const result = await runCommand("git", args, { cwd: workspace, timeoutMs: 30_000 });
|
|
578
|
-
if (result.code !== 0) fail(`Git fixture setup failed: git ${args.join(" ")}`, 1);
|
|
579
|
-
}
|
|
580
|
-
for (const file of Object.keys(setupFiles ?? {})) {
|
|
581
|
-
const result = await runCommand("git", ["add", "-f", "--", file], { cwd: workspace, timeoutMs: 30_000 });
|
|
582
|
-
if (result.code !== 0) fail(`Git could not track benchmark setup file ${file}`, 1);
|
|
583
|
-
}
|
|
584
|
-
const commit = await runCommand("git", ["commit", "-qm", "benchmark fixture"], { cwd: workspace, timeoutMs: 30_000 });
|
|
585
|
-
if (commit.code !== 0) fail("Git could not commit the benchmark fixture", 1);
|
|
586
|
-
}
|
|
587
|
-
|
|
588
|
-
function applySetupFiles(workspace, setupFiles) {
|
|
589
|
-
for (const [relativePath, content] of Object.entries(setupFiles ?? {})) {
|
|
590
|
-
const target = safeWorkspaceFile(workspace, relativePath);
|
|
591
|
-
privateDirectory(path.dirname(target));
|
|
592
|
-
writePrivate(target, content);
|
|
593
|
-
}
|
|
594
|
-
}
|
|
595
|
-
|
|
596
|
-
function variantSeed(rootSeed, suiteDigest, scenarioId, repeat) {
|
|
597
|
-
return crypto.createHmac("sha256", rootSeed)
|
|
598
|
-
.update(`${suiteDigest}\0${scenarioId}\0${repeat}`)
|
|
599
|
-
.digest("hex");
|
|
600
|
-
}
|
|
601
|
-
|
|
602
|
-
function generatedStringArray(value, field) {
|
|
603
|
-
if (value === undefined) return [];
|
|
604
|
-
if (!Array.isArray(value) || value.length > 20 || value.some((item) => typeof item !== "string" || !item || item.length > 1_000)) {
|
|
605
|
-
fail(`Benchmark variant ${field} must contain at most 20 non-empty strings of at most 1000 characters`, 1);
|
|
606
|
-
}
|
|
607
|
-
return [...new Set(value)];
|
|
608
|
-
}
|
|
609
|
-
|
|
610
|
-
async function generateVariant({ generator, workspace, oraclePath, seed, scenario, timeoutSeconds }) {
|
|
611
|
-
const result = await runCommand(process.execPath, [generator, workspace, oraclePath, seed, scenario.id], {
|
|
612
|
-
cwd: path.dirname(generator),
|
|
613
|
-
timeoutMs: Math.min(timeoutSeconds, 120) * 1_000,
|
|
614
|
-
env: graderEnvironment(scenario.id)
|
|
615
|
-
});
|
|
616
|
-
if (result.timedOut) fail(`Benchmark variant generator timed out for ${scenario.id}`, 1);
|
|
617
|
-
if (result.code !== 0) fail(`Benchmark variant generator failed for ${scenario.id}: ${result.stderr.trim() || result.stdout.trim()}`, 1);
|
|
618
|
-
let oracle;
|
|
619
|
-
try { oracle = JSON.parse(fs.readFileSync(oraclePath, "utf8")); }
|
|
620
|
-
catch (error) { fail(`Benchmark variant generator did not write a valid oracle for ${scenario.id}: ${error.message}`, 1); }
|
|
621
|
-
if (!oracle || typeof oracle !== "object" || Array.isArray(oracle) || oracle.schemaVersion !== 1 || !oracle.graderData || typeof oracle.graderData !== "object" || Array.isArray(oracle.graderData)) {
|
|
622
|
-
fail(`Benchmark variant oracle is invalid for ${scenario.id}`, 1);
|
|
623
|
-
}
|
|
624
|
-
const serialized = JSON.stringify(oracle);
|
|
625
|
-
if (Buffer.byteLength(serialized) > 100_000) fail(`Benchmark variant oracle is too large for ${scenario.id}`, 1);
|
|
626
|
-
writePrivate(oraclePath, `${JSON.stringify(oracle)}\n`);
|
|
627
|
-
return {
|
|
628
|
-
oraclePath,
|
|
629
|
-
oracleDigest: crypto.createHash("sha256").update(serialized).digest("hex"),
|
|
630
|
-
seedDigest: crypto.createHash("sha256").update(seed).digest("hex"),
|
|
631
|
-
requiredOutputSubstrings: generatedStringArray(oracle.requiredOutputSubstrings, "requiredOutputSubstrings"),
|
|
632
|
-
forbiddenOutputSubstrings: generatedStringArray(oracle.forbiddenOutputSubstrings, "forbiddenOutputSubstrings")
|
|
633
|
-
};
|
|
634
|
-
}
|
|
635
|
-
|
|
636
|
-
async function initializeTreatment(workspace, profile) {
|
|
637
|
-
const result = await runCommand("bash", [
|
|
638
|
-
path.join(packageRoot, "scripts", "init-project.sh"),
|
|
639
|
-
workspace,
|
|
640
|
-
"--profile", profile,
|
|
641
|
-
"--package-source", packageRoot
|
|
642
|
-
], {
|
|
643
|
-
cwd: packageRoot,
|
|
644
|
-
timeoutMs: 60_000,
|
|
645
|
-
env: benchmarkEnvironment({ PIAGENT_NO_UPDATE_CHECK: "1" })
|
|
646
|
-
});
|
|
647
|
-
if (result.code !== 0) fail(`Piagent fixture initialization failed: ${result.stderr.trim() || result.stdout.trim()}`, 1);
|
|
648
|
-
}
|
|
649
|
-
|
|
650
|
-
function prepareTreatmentBaseline(workspace, profileName, scenario) {
|
|
651
|
-
const profilePath = path.join(workspace, ".pi", "piagent-profile.json");
|
|
652
|
-
const contextPath = path.join(workspace, ".pi", "project-context.md");
|
|
653
|
-
const indexPath = path.join(workspace, ".pi", "context-index.json");
|
|
654
|
-
let profile;
|
|
655
|
-
let existingIndex;
|
|
656
|
-
try {
|
|
657
|
-
profile = JSON.parse(fs.readFileSync(profilePath, "utf8"));
|
|
658
|
-
existingIndex = JSON.parse(fs.readFileSync(indexPath, "utf8"));
|
|
659
|
-
} catch (error) {
|
|
660
|
-
fail(`Piagent benchmark baseline could not read initialized context: ${error.message}`, 1);
|
|
661
|
-
}
|
|
662
|
-
|
|
663
|
-
const recordedAt = new Date().toISOString();
|
|
664
|
-
const projectId = typeof profile.projectId === "string" && profile.projectId.trim()
|
|
665
|
-
? profile.projectId.trim()
|
|
666
|
-
: "piagent-benchmark-project";
|
|
667
|
-
const profileMode = typeof profile.mode === "string" && profile.mode.trim()
|
|
668
|
-
? profile.mode.trim()
|
|
669
|
-
: profileName;
|
|
670
|
-
const sourceScope = (scenario.allowedChanges ?? []).join(", ") || "read-only";
|
|
671
|
-
const summary = `Pre-onboarded synthetic benchmark fixture for ${scenario.id}.`;
|
|
672
|
-
const markdown = [
|
|
673
|
-
"# Project Context",
|
|
674
|
-
"",
|
|
675
|
-
"## Status",
|
|
676
|
-
"",
|
|
677
|
-
`- Generated: ${recordedAt}`,
|
|
678
|
-
`- Profile: ${profileMode}`,
|
|
679
|
-
"- Source: deterministic benchmark baseline",
|
|
680
|
-
"- Verification: use the configured source verifier",
|
|
681
|
-
`- Task scope: ${sourceScope}`,
|
|
682
|
-
"",
|
|
683
|
-
"## Project",
|
|
684
|
-
"",
|
|
685
|
-
"- Small synthetic Node.js fixture used to compare Raw Pi and Piagent.",
|
|
686
|
-
"- Source files and focused tests are authoritative.",
|
|
687
|
-
"- Keep implementation changes within the task scope supplied by the user.",
|
|
688
|
-
""
|
|
689
|
-
].join("\n");
|
|
690
|
-
fs.writeFileSync(contextPath, markdown);
|
|
691
|
-
|
|
692
|
-
const profileNode = `profile:${profileMode}`;
|
|
693
|
-
const contextNode = "context:.pi/project-context.md";
|
|
694
|
-
const index = {
|
|
695
|
-
schemaVersion: 1,
|
|
696
|
-
projectId,
|
|
697
|
-
profileMode,
|
|
698
|
-
source: "onboarding-record",
|
|
699
|
-
summary,
|
|
700
|
-
generatedAt: recordedAt,
|
|
701
|
-
updatedAt: recordedAt,
|
|
702
|
-
policy: { ...(existingIndex.policy ?? {}), ...(profile.contextIndex ?? {}) },
|
|
703
|
-
nodes: [
|
|
704
|
-
{
|
|
705
|
-
id: profileNode,
|
|
706
|
-
kind: "profile",
|
|
707
|
-
label: profileMode,
|
|
708
|
-
summary: "Active benchmark profile.",
|
|
709
|
-
path: ".pi/piagent-profile.json",
|
|
710
|
-
tags: ["profile", "benchmark"],
|
|
711
|
-
citations: [{ path: ".pi/piagent-profile.json", reason: "Active benchmark profile" }],
|
|
712
|
-
updatedAt: recordedAt
|
|
713
|
-
},
|
|
714
|
-
{
|
|
715
|
-
id: contextNode,
|
|
716
|
-
kind: "context",
|
|
717
|
-
label: ".pi/project-context.md",
|
|
718
|
-
summary,
|
|
719
|
-
path: ".pi/project-context.md",
|
|
720
|
-
tags: ["snapshot", "benchmark"],
|
|
721
|
-
citations: [{ path: "package.json", reason: "Synthetic project manifest" }],
|
|
722
|
-
updatedAt: recordedAt
|
|
46
|
+
let spawnError;
|
|
47
|
+
child.once("error", (error) => { spawnError = error; });
|
|
48
|
+
child.once("close", (code, signal) => {
|
|
49
|
+
try { finish(); }
|
|
50
|
+
catch (error) { reject(error); return; }
|
|
51
|
+
if (spawnError) { reject(spawnError); return; }
|
|
52
|
+
if (signal) {
|
|
53
|
+
process.kill(process.pid, signal);
|
|
54
|
+
return;
|
|
723
55
|
}
|
|
724
|
-
|
|
725
|
-
edges: [{ from: profileNode, to: contextNode, kind: "documented_by", reason: "Benchmark profile uses the prepared context." }],
|
|
726
|
-
citations: [{ path: "package.json", reason: "Synthetic project manifest" }],
|
|
727
|
-
warnings: []
|
|
728
|
-
};
|
|
729
|
-
fs.writeFileSync(indexPath, `${JSON.stringify(index, null, 2)}\n`);
|
|
730
|
-
|
|
731
|
-
const stateRoot = privateDirectory(path.join(workspace, ".pi", "piagent-state"));
|
|
732
|
-
writePrivate(path.join(stateRoot, "project-onboarding.json"), `${JSON.stringify({
|
|
733
|
-
schemaVersion: 1,
|
|
734
|
-
projectId,
|
|
735
|
-
profileMode,
|
|
736
|
-
contextFile: ".pi/project-context.md",
|
|
737
|
-
summary,
|
|
738
|
-
model: "benchmark-setup",
|
|
739
|
-
sourceFiles: [{ path: "package.json", reason: "Synthetic project manifest" }],
|
|
740
|
-
updateTriggers: ["fixture source or benchmark profile changes"],
|
|
741
|
-
notes: "Prepared outside measured model execution so task runs represent steady-state usage.",
|
|
742
|
-
recordedAt
|
|
743
|
-
}, null, 2)}\n`);
|
|
744
|
-
}
|
|
745
|
-
|
|
746
|
-
async function prepareTreatmentContextEngine(workspace) {
|
|
747
|
-
const result = await runCommand(process.execPath, [
|
|
748
|
-
path.join(packageRoot, "scripts", "context-engine.mjs"),
|
|
749
|
-
"rebuild",
|
|
750
|
-
"--project", workspace,
|
|
751
|
-
"--json"
|
|
752
|
-
], {
|
|
753
|
-
cwd: packageRoot,
|
|
754
|
-
timeoutMs: 60_000,
|
|
755
|
-
env: benchmarkEnvironment({ PIAGENT_NO_UPDATE_CHECK: "1" })
|
|
756
|
-
});
|
|
757
|
-
if (result.code !== 0) fail(`Piagent benchmark context preparation failed: ${result.stderr.trim() || result.stdout.trim()}`, 1);
|
|
758
|
-
}
|
|
759
|
-
|
|
760
|
-
function forbiddenSessionHits(sessionFiles, candidates) {
|
|
761
|
-
const hits = new Set();
|
|
762
|
-
for (const file of sessionFiles) {
|
|
763
|
-
for (const line of fs.readFileSync(file, "utf8").split("\n")) {
|
|
764
|
-
if (!line) continue;
|
|
765
|
-
let entry;
|
|
766
|
-
try { entry = JSON.parse(line); } catch { continue; }
|
|
767
|
-
if (entry.type !== "message" || !entry.message) continue;
|
|
768
|
-
const content = entry.message.content;
|
|
769
|
-
if (typeof content === "string") {
|
|
770
|
-
for (const value of candidates) {
|
|
771
|
-
if (content.includes(value)) hits.add(value);
|
|
772
|
-
}
|
|
773
|
-
continue;
|
|
774
|
-
}
|
|
775
|
-
if (!Array.isArray(content)) continue;
|
|
776
|
-
for (const block of content) {
|
|
777
|
-
if (block?.type !== "text" || typeof block.text !== "string") continue;
|
|
778
|
-
for (const value of candidates) {
|
|
779
|
-
if (block.text.includes(value)) hits.add(value);
|
|
780
|
-
}
|
|
781
|
-
}
|
|
782
|
-
}
|
|
783
|
-
}
|
|
784
|
-
return [...hits];
|
|
785
|
-
}
|
|
786
|
-
|
|
787
|
-
function inspectForbiddenValue(value, candidates, hits) {
|
|
788
|
-
if (typeof value === "string") {
|
|
789
|
-
for (const candidate of candidates) {
|
|
790
|
-
if (value.includes(candidate)) hits.add(candidate);
|
|
791
|
-
}
|
|
792
|
-
return;
|
|
793
|
-
}
|
|
794
|
-
if (Array.isArray(value)) {
|
|
795
|
-
for (const item of value) inspectForbiddenValue(item, candidates, hits);
|
|
796
|
-
return;
|
|
797
|
-
}
|
|
798
|
-
if (value && typeof value === "object") {
|
|
799
|
-
for (const item of Object.values(value)) inspectForbiddenValue(item, candidates, hits);
|
|
800
|
-
}
|
|
801
|
-
}
|
|
802
|
-
|
|
803
|
-
function parseGraderResult(stdout) {
|
|
804
|
-
const lines = stdout.trim().split("\n").filter(Boolean);
|
|
805
|
-
let value;
|
|
806
|
-
try { value = JSON.parse(lines.at(-1) ?? ""); } catch { fail("Benchmark grader did not return a JSON object", 1); }
|
|
807
|
-
if (!value || typeof value !== "object" || Array.isArray(value) || typeof value.passed !== "boolean" || !Array.isArray(value.checks)) {
|
|
808
|
-
fail("Benchmark grader result must contain passed and checks", 1);
|
|
809
|
-
}
|
|
810
|
-
for (const check of value.checks) {
|
|
811
|
-
if (!check || typeof check.id !== "string" || typeof check.passed !== "boolean") fail("Benchmark grader returned an invalid check", 1);
|
|
812
|
-
}
|
|
813
|
-
return {
|
|
814
|
-
passed: value.passed,
|
|
815
|
-
score: Number.isFinite(value.score) ? Math.max(0, Math.min(10, value.score)) : value.passed ? 10 : 0,
|
|
816
|
-
checks: value.checks.map((check) => ({ id: check.id, passed: check.passed, detail: typeof check.detail === "string" ? check.detail.slice(0, 500) : undefined }))
|
|
817
|
-
};
|
|
818
|
-
}
|
|
819
|
-
|
|
820
|
-
async function gradeWorkspace(grader, workspace, scenario, timeoutSeconds, oraclePath) {
|
|
821
|
-
const args = oraclePath ? [grader, workspace, oraclePath] : [grader, workspace];
|
|
822
|
-
const result = await runCommand(process.execPath, args, {
|
|
823
|
-
cwd: path.dirname(grader),
|
|
824
|
-
timeoutMs: Math.min(timeoutSeconds, 120) * 1_000,
|
|
825
|
-
env: graderEnvironment(scenario.id)
|
|
826
|
-
});
|
|
827
|
-
if (result.timedOut) return { passed: false, score: 0, checks: [], error: "grader-timeout" };
|
|
828
|
-
if (result.code !== 0) return { passed: false, score: 0, checks: [], error: `grader-exit-${result.code}` };
|
|
829
|
-
try { return parseGraderResult(result.stdout); } catch (error) { return { passed: false, score: 0, checks: [], error: error.message }; }
|
|
830
|
-
}
|
|
831
|
-
|
|
832
|
-
function sessionSummaries(sessionDir) {
|
|
833
|
-
return walkJsonl(sessionDir).map((file) => summarizeSession(file, {})).filter(Boolean);
|
|
834
|
-
}
|
|
835
|
-
|
|
836
|
-
function failureReason({ agent, grade, graderIntegrity, outsideScope, forbiddenHits, missingRequired }) {
|
|
837
|
-
const failures = [];
|
|
838
|
-
if (agent.timedOut) failures.push("agent-timeout");
|
|
839
|
-
else if (agent.code !== 0) failures.push(`agent-exit-${agent.code}`);
|
|
840
|
-
if (!grade.passed) failures.push(grade.error ?? "hidden-grader-failed");
|
|
841
|
-
if (!graderIntegrity.passed) failures.push("grader-mutated-workspace");
|
|
842
|
-
if (outsideScope.length) failures.push(`outside-scope:${outsideScope.join(",")}`);
|
|
843
|
-
if (forbiddenHits.length) failures.push("forbidden-output");
|
|
844
|
-
if (missingRequired.length) failures.push("required-output-missing");
|
|
845
|
-
return failures.join("; ") || undefined;
|
|
846
|
-
}
|
|
847
|
-
|
|
848
|
-
function safeInfrastructureDiagnostic(value, forbiddenValues) {
|
|
849
|
-
let diagnostic = String(value ?? "");
|
|
850
|
-
for (const forbidden of forbiddenValues) {
|
|
851
|
-
if (forbidden) diagnostic = diagnostic.replaceAll(forbidden, "[REDACTED]");
|
|
852
|
-
}
|
|
853
|
-
return diagnostic
|
|
854
|
-
.replace(/\u001b\[[0-?]*[ -/]*[@-~]/g, "")
|
|
855
|
-
.replace(/[\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]/g, " ")
|
|
856
|
-
.trim()
|
|
857
|
-
.slice(-4_000);
|
|
858
|
-
}
|
|
859
|
-
|
|
860
|
-
async function runOne({
|
|
861
|
-
suite,
|
|
862
|
-
suiteRoot,
|
|
863
|
-
scenario,
|
|
864
|
-
surface,
|
|
865
|
-
repeat,
|
|
866
|
-
infrastructureAttempt = 1,
|
|
867
|
-
runId,
|
|
868
|
-
runRoot,
|
|
869
|
-
options,
|
|
870
|
-
piCommand,
|
|
871
|
-
codexCommand,
|
|
872
|
-
codexDisabledFeatures,
|
|
873
|
-
codexRuntime,
|
|
874
|
-
suiteDigest,
|
|
875
|
-
rootSeed
|
|
876
|
-
}) {
|
|
877
|
-
const attemptSuffix = infrastructureAttempt > 1 ? `-infra-${infrastructureAttempt}` : "";
|
|
878
|
-
const key = `${String(repeat).padStart(2, "0")}-${scenario.id}-${surface}${attemptSuffix}`;
|
|
879
|
-
const workspaceRoot = privateDirectory(path.join(runRoot, "workspaces", key));
|
|
880
|
-
const workspace = path.join(workspaceRoot, "project");
|
|
881
|
-
const sessions = privateDirectory(path.join(workspaceRoot, "sessions"));
|
|
882
|
-
const fixture = resolveSuiteEntry(suiteRoot, scenario.fixture, "fixture");
|
|
883
|
-
fs.cpSync(fixture, workspace, { recursive: true, errorOnExist: true });
|
|
884
|
-
applySetupFiles(workspace, scenario.setupFiles);
|
|
885
|
-
const profile = scenario.profile ?? suite.profile;
|
|
886
|
-
const lifecycle = scenario.lifecycle ?? "steady-state";
|
|
887
|
-
let variant = {
|
|
888
|
-
oraclePath: null,
|
|
889
|
-
oracleDigest: null,
|
|
890
|
-
seedDigest: null,
|
|
891
|
-
requiredOutputSubstrings: [],
|
|
892
|
-
forbiddenOutputSubstrings: []
|
|
893
|
-
};
|
|
894
|
-
if (scenario.variantGenerator) {
|
|
895
|
-
const generator = resolveSuiteEntry(suiteRoot, scenario.variantGenerator, "variant generator");
|
|
896
|
-
variant = await generateVariant({
|
|
897
|
-
generator,
|
|
898
|
-
workspace,
|
|
899
|
-
oraclePath: path.join(workspaceRoot, "oracle.json"),
|
|
900
|
-
seed: variantSeed(rootSeed, suiteDigest, scenario.id, repeat),
|
|
901
|
-
scenario,
|
|
902
|
-
timeoutSeconds: options.timeoutSeconds
|
|
56
|
+
resolve(code ?? 1);
|
|
903
57
|
});
|
|
904
|
-
}
|
|
905
|
-
const forbiddenOutputSubstrings = [...new Set([
|
|
906
|
-
...(scenario.forbiddenOutputSubstrings ?? []),
|
|
907
|
-
...variant.forbiddenOutputSubstrings
|
|
908
|
-
])];
|
|
909
|
-
const requiredOutputSubstrings = [...new Set([
|
|
910
|
-
...(scenario.requiredOutputSubstrings ?? []),
|
|
911
|
-
...variant.requiredOutputSubstrings
|
|
912
|
-
])];
|
|
913
|
-
if (surface === "piagent") {
|
|
914
|
-
await initializeTreatment(workspace, profile);
|
|
915
|
-
if (lifecycle === "steady-state") {
|
|
916
|
-
prepareTreatmentBaseline(workspace, profile, scenario);
|
|
917
|
-
await prepareTreatmentContextEngine(workspace);
|
|
918
|
-
}
|
|
919
|
-
}
|
|
920
|
-
await initializeGit(workspace, scenario.setupFiles);
|
|
921
|
-
|
|
922
|
-
const promptPath = resolveSuiteEntry(suiteRoot, scenario.prompt, "prompt");
|
|
923
|
-
const graderPath = resolveSuiteEntry(suiteRoot, scenario.grader, "grader");
|
|
924
|
-
const prompt = fs.readFileSync(promptPath, "utf8").trim();
|
|
925
|
-
const sessionId = crypto.randomUUID();
|
|
926
|
-
const piArgs = [
|
|
927
|
-
"--print", "--mode", "json",
|
|
928
|
-
"--session-dir", sessions,
|
|
929
|
-
"--session-id", sessionId,
|
|
930
|
-
"--name", `BENCH ${scenario.id} ${surface} r${repeat}`,
|
|
931
|
-
"--approve",
|
|
932
|
-
"--no-skills",
|
|
933
|
-
"--no-prompt-templates",
|
|
934
|
-
"--no-extensions",
|
|
935
|
-
"--no-context-files"
|
|
936
|
-
];
|
|
937
|
-
const controlledCrossCli = options.surfaces.includes("codex-cli") && options.codexMode === "controlled";
|
|
938
|
-
const globalAppend = controlledCrossCli ? undefined : globalAppendSystemPrompt();
|
|
939
|
-
if (globalAppend) piArgs.push("--append-system-prompt", globalAppend);
|
|
940
|
-
if (surface === "piagent") {
|
|
941
|
-
const projectInstructions = path.join(workspace, "AGENTS.md");
|
|
942
|
-
if (!fs.existsSync(projectInstructions)) fail("Piagent fixture initialization did not create AGENTS.md", 1);
|
|
943
|
-
piArgs.push(
|
|
944
|
-
"--append-system-prompt", projectInstructions,
|
|
945
|
-
"--extension", path.join(packageRoot, "packages", "piagent-core", "extensions", "piagent-guard.ts"),
|
|
946
|
-
"--skill", path.join(packageRoot, "packages", "piagent-core", "skills")
|
|
947
|
-
);
|
|
948
|
-
}
|
|
949
|
-
if (options.model) piArgs.push("--model", options.model);
|
|
950
|
-
if (options.thinking) piArgs.push("--thinking", options.thinking);
|
|
951
|
-
piArgs.push(prompt);
|
|
952
|
-
|
|
953
|
-
const command = surface === "codex-cli" ? codexCommand : piCommand;
|
|
954
|
-
const args = surface === "codex-cli"
|
|
955
|
-
? codexExecArgs({ workspace, options, disabledFeatures: codexDisabledFeatures })
|
|
956
|
-
: piArgs;
|
|
957
|
-
const codexForbiddenHits = new Set();
|
|
958
|
-
const codexCollector = surface === "codex-cli" ? createCodexExecJsonlCollector({
|
|
959
|
-
model: options.model,
|
|
960
|
-
thinkingLevel: options.thinking,
|
|
961
|
-
onEvent: (event) => inspectForbiddenValue(event, forbiddenOutputSubstrings, codexForbiddenHits)
|
|
962
|
-
}) : undefined;
|
|
963
|
-
|
|
964
|
-
const agent = await runCommand(command, args, {
|
|
965
|
-
cwd: workspace,
|
|
966
|
-
input: surface === "codex-cli" ? prompt : undefined,
|
|
967
|
-
timeoutMs: options.timeoutSeconds * 1_000,
|
|
968
|
-
forbiddenSubstrings: forbiddenOutputSubstrings,
|
|
969
|
-
requiredSubstrings: requiredOutputSubstrings,
|
|
970
|
-
onStdoutChunk: codexCollector ? (chunk) => codexCollector.write(chunk) : undefined,
|
|
971
|
-
env: surface === "codex-cli" ? codexProcessEnvironment(codexRuntime, {
|
|
972
|
-
PIAGENT_NO_UPDATE_CHECK: "1",
|
|
973
|
-
PIAGENT_BENCHMARK_RUN_ID: runId,
|
|
974
|
-
PIAGENT_BENCHMARK_SCENARIO: scenario.id,
|
|
975
|
-
PIAGENT_BENCHMARK_SURFACE: surface,
|
|
976
|
-
PIAGENT_BENCHMARK_SESSION_ID: sessionId,
|
|
977
|
-
PIAGENT_BENCHMARK_PROFILE: profile,
|
|
978
|
-
PIAGENT_BENCHMARK_LIFECYCLE: lifecycle,
|
|
979
|
-
NO_COLOR: "1"
|
|
980
|
-
}) : benchmarkEnvironment({
|
|
981
|
-
PIAGENT_NO_UPDATE_CHECK: "1",
|
|
982
|
-
PIAGENT_BENCHMARK_RUN_ID: runId,
|
|
983
|
-
PIAGENT_BENCHMARK_SCENARIO: scenario.id,
|
|
984
|
-
PIAGENT_BENCHMARK_SURFACE: surface,
|
|
985
|
-
PIAGENT_BENCHMARK_SESSION_ID: sessionId,
|
|
986
|
-
PIAGENT_BENCHMARK_PROFILE: profile,
|
|
987
|
-
PIAGENT_BENCHMARK_LIFECYCLE: lifecycle,
|
|
988
|
-
NO_COLOR: "1"
|
|
989
|
-
})
|
|
990
58
|
});
|
|
991
|
-
const sessionFiles = surface === "codex-cli" ? [] : walkJsonl(sessions);
|
|
992
|
-
let usage;
|
|
993
|
-
let codexDiagnostics = [];
|
|
994
|
-
if (surface === "codex-cli") {
|
|
995
|
-
try {
|
|
996
|
-
usage = codexCollector.finish();
|
|
997
|
-
} catch (error) {
|
|
998
|
-
if (agent.code === 0 && !agent.timedOut) throw error;
|
|
999
|
-
usage = aggregateSessionUsage([]);
|
|
1000
|
-
}
|
|
1001
|
-
codexDiagnostics = codexCollector.diagnostics();
|
|
1002
|
-
} else {
|
|
1003
|
-
usage = aggregateSessionUsage(sessionSummaries(sessions));
|
|
1004
|
-
}
|
|
1005
|
-
const forbiddenHits = [...new Set([
|
|
1006
|
-
...(agent.forbiddenHits ?? []),
|
|
1007
|
-
...(surface === "codex-cli"
|
|
1008
|
-
? [...codexForbiddenHits]
|
|
1009
|
-
: forbiddenSessionHits(sessionFiles, forbiddenOutputSubstrings))
|
|
1010
|
-
])];
|
|
1011
|
-
const requiredHits = new Set(agent.requiredHits ?? []);
|
|
1012
|
-
if (surface !== "codex-cli") {
|
|
1013
|
-
for (const value of forbiddenSessionHits(sessionFiles, requiredOutputSubstrings)) requiredHits.add(value);
|
|
1014
|
-
}
|
|
1015
|
-
const missingRequired = requiredOutputSubstrings.filter((value) => !requiredHits.has(value));
|
|
1016
|
-
const allChangedFiles = workingTreeFiles(workspace);
|
|
1017
|
-
const runtimeManagedChanges = surface === "piagent" && lifecycle === "cold-start"
|
|
1018
|
-
? allChangedFiles.filter((file) => matchesAnyPath(file, coldStartRuntimeManagedPaths))
|
|
1019
|
-
: [];
|
|
1020
|
-
const runtimeManagedSet = new Set(runtimeManagedChanges);
|
|
1021
|
-
const changedFiles = allChangedFiles.filter((file) => !runtimeManagedSet.has(file));
|
|
1022
|
-
const beforeGrade = workingTreeSnapshot(workspace);
|
|
1023
|
-
const outsideScope = changedFiles.filter((file) => !matchesAnyPath(file, scenario.allowedChanges));
|
|
1024
|
-
const grade = await gradeWorkspace(graderPath, workspace, scenario, options.timeoutSeconds, variant.oraclePath);
|
|
1025
|
-
const afterGrade = workingTreeSnapshot(workspace);
|
|
1026
|
-
const graderIntegrity = { passed: JSON.stringify(beforeGrade) === JSON.stringify(afterGrade) };
|
|
1027
|
-
let workflow = null;
|
|
1028
|
-
if (surface === "piagent" && scenario.kind !== "safety-refusal") {
|
|
1029
|
-
const task = listTaskContracts(workspace).find((item) => item.sessionId === sessionId);
|
|
1030
|
-
workflow = evaluateWorkflowEvidence(task, changedFiles, usage.toolNames, { scenarioKind: scenario.kind });
|
|
1031
|
-
}
|
|
1032
|
-
const scope = { passed: outsideScope.length === 0, changedFiles, outsideScope, allChangedFiles, runtimeManagedChanges };
|
|
1033
|
-
const outputSafety = { passed: forbiddenHits.length === 0, forbiddenHits: forbiddenHits.map((value) => crypto.createHash("sha256").update(value).digest("hex")) };
|
|
1034
|
-
const outputEvidence = {
|
|
1035
|
-
passed: missingRequired.length === 0,
|
|
1036
|
-
requiredCount: requiredOutputSubstrings.length,
|
|
1037
|
-
observedCount: requiredOutputSubstrings.length - missingRequired.length,
|
|
1038
|
-
missingHashes: missingRequired.map((value) => crypto.createHash("sha256").update(value).digest("hex"))
|
|
1039
|
-
};
|
|
1040
|
-
// A timed-out agent is measured reliability evidence. Only an early process
|
|
1041
|
-
// failure with no provider usage is infrastructure and eligible for retry.
|
|
1042
|
-
const abortSuite = !agent.timedOut && agent.code !== 0 && usage.fresh <= 0;
|
|
1043
|
-
const diagnosticInput = codexDiagnostics.length > 0
|
|
1044
|
-
? JSON.stringify(codexDiagnostics)
|
|
1045
|
-
: `${agent.stderr ?? ""}\n${agent.stdout ?? ""}`;
|
|
1046
|
-
const resolved = agent.code === 0 && !agent.timedOut && grade.passed && graderIntegrity.passed && scope.passed && outputSafety.passed && outputEvidence.passed;
|
|
1047
|
-
const record = {
|
|
1048
|
-
schemaVersion: 1,
|
|
1049
|
-
scenarioId: scenario.id,
|
|
1050
|
-
scenarioTitle: scenario.title,
|
|
1051
|
-
scenarioKind: scenario.kind,
|
|
1052
|
-
category: scenario.category ?? "unspecified",
|
|
1053
|
-
difficulty: scenario.difficulty ?? "unspecified",
|
|
1054
|
-
profile,
|
|
1055
|
-
lifecycle,
|
|
1056
|
-
surface,
|
|
1057
|
-
repeat,
|
|
1058
|
-
infrastructureAttempt,
|
|
1059
|
-
sessionId,
|
|
1060
|
-
providerSessionId: usage.providerSessionId ?? null,
|
|
1061
|
-
abortSuite,
|
|
1062
|
-
infrastructureFailure: abortSuite ? `agent-exit-${agent.code}-before-usage` : undefined,
|
|
1063
|
-
infrastructureDiagnostic: abortSuite ? safeInfrastructureDiagnostic(diagnosticInput, forbiddenOutputSubstrings) : undefined,
|
|
1064
|
-
infrastructureDiagnosticSource: abortSuite ? (codexDiagnostics.length > 0 ? "codex-error-events" : "process-output-tail") : undefined,
|
|
1065
|
-
resolved,
|
|
1066
|
-
failure: failureReason({ agent, grade, graderIntegrity, outsideScope, forbiddenHits, missingRequired }),
|
|
1067
|
-
agent: {
|
|
1068
|
-
exitCode: agent.code,
|
|
1069
|
-
signal: agent.signal,
|
|
1070
|
-
timedOut: agent.timedOut,
|
|
1071
|
-
stdoutHash: agent.stdoutHash ?? crypto.createHash("sha256").update(agent.stdout).digest("hex"),
|
|
1072
|
-
stderrHash: crypto.createHash("sha256").update(agent.stderr ?? "").digest("hex")
|
|
1073
|
-
},
|
|
1074
|
-
grade,
|
|
1075
|
-
graderIntegrity,
|
|
1076
|
-
scope,
|
|
1077
|
-
outputSafety,
|
|
1078
|
-
outputEvidence,
|
|
1079
|
-
workflow,
|
|
1080
|
-
usage,
|
|
1081
|
-
durationSeconds: agent.durationSeconds,
|
|
1082
|
-
promptHash: crypto.createHash("sha256").update(prompt).digest("hex"),
|
|
1083
|
-
variant: scenario.variantGenerator ? {
|
|
1084
|
-
generated: true,
|
|
1085
|
-
seedDigest: variant.seedDigest,
|
|
1086
|
-
oracleDigest: variant.oracleDigest
|
|
1087
|
-
} : { generated: false }
|
|
1088
|
-
};
|
|
1089
|
-
if (!options.keepWorkspaces) fs.rmSync(workspaceRoot, { recursive: true, force: true });
|
|
1090
|
-
return record;
|
|
1091
|
-
}
|
|
1092
|
-
|
|
1093
|
-
function executionOrder(suite, repeats, surfaces, rootSeed) {
|
|
1094
|
-
const order = [];
|
|
1095
|
-
for (let repeat = 1; repeat <= repeats; repeat += 1) {
|
|
1096
|
-
const scenarios = suite.schemaVersion === 2
|
|
1097
|
-
? [...suite.scenarios].sort((left, right) => {
|
|
1098
|
-
const rank = (scenario) => crypto.createHmac("sha256", rootSeed).update(`order\0${repeat}\0${scenario.id}`).digest("hex");
|
|
1099
|
-
return rank(left).localeCompare(rank(right));
|
|
1100
|
-
})
|
|
1101
|
-
: suite.scenarios;
|
|
1102
|
-
for (const [index, scenario] of scenarios.entries()) {
|
|
1103
|
-
const reverse = suite.schemaVersion === 2
|
|
1104
|
-
? (crypto.createHmac("sha256", rootSeed).update(`surface\0${repeat}\0${scenario.id}`).digest()[0] & 1) === 1
|
|
1105
|
-
: (repeat + index) % 2 !== 0;
|
|
1106
|
-
const ordered = reverse ? [...surfaces].reverse() : surfaces;
|
|
1107
|
-
for (const surface of ordered) order.push({ scenario, surface, repeat });
|
|
1108
|
-
}
|
|
1109
|
-
}
|
|
1110
|
-
return order;
|
|
1111
|
-
}
|
|
1112
|
-
|
|
1113
|
-
async function confirmPlan(message) {
|
|
1114
|
-
if (!process.stdin.isTTY || !process.stdout.isTTY) fail("Refusing to start billed model runs without --yes in a non-interactive terminal", 1);
|
|
1115
|
-
const terminal = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
1116
|
-
try {
|
|
1117
|
-
const answer = await terminal.question(`${message}\nContinue? [y/N] `);
|
|
1118
|
-
return /^(?:y|yes)$/i.test(answer.trim());
|
|
1119
|
-
} finally {
|
|
1120
|
-
terminal.close();
|
|
1121
|
-
}
|
|
1122
|
-
}
|
|
1123
|
-
|
|
1124
|
-
async function checkedVersion(command, args, label, env = process.env) {
|
|
1125
|
-
let result;
|
|
1126
|
-
try { result = await runCommand(command, args, { cwd: packageRoot, timeoutMs: 15_000, env }); }
|
|
1127
|
-
catch (error) { fail(`Required command is unavailable: ${label} (${error.message})`, 1); }
|
|
1128
|
-
if (result.code !== 0) fail(`Required command failed preflight: ${label}`, 1);
|
|
1129
|
-
return result.stdout.trim();
|
|
1130
|
-
}
|
|
1131
|
-
|
|
1132
|
-
async function preflight({ piCommand, codexCommand, surfaces, codexMode, codexRuntime }) {
|
|
1133
|
-
const gitVersion = await checkedVersion("git", ["--version"], "git");
|
|
1134
|
-
const piVersion = await checkedVersion(piCommand, ["--version"], "pi");
|
|
1135
|
-
let codexVersion;
|
|
1136
|
-
let codexAuth;
|
|
1137
|
-
let codexDisabledFeatures = [];
|
|
1138
|
-
if (surfaces.includes("codex-cli")) {
|
|
1139
|
-
const codexEnv = codexProcessEnvironment(codexRuntime);
|
|
1140
|
-
codexVersion = await checkedVersion(codexCommand, ["--version"], "codex", codexEnv);
|
|
1141
|
-
let result;
|
|
1142
|
-
try { result = await runCommand(codexCommand, ["login", "status"], { cwd: packageRoot, timeoutMs: 15_000, env: codexEnv }); }
|
|
1143
|
-
catch (error) { fail(`Codex authentication preflight failed: ${error.message}`, 1); }
|
|
1144
|
-
if (result.code === 0) codexAuth = "login-status";
|
|
1145
|
-
else if (process.env.OPENAI_API_KEY || process.env.CODEX_ACCESS_TOKEN) codexAuth = "environment-credential";
|
|
1146
|
-
else fail("Codex CLI is not authenticated; run codex login before this benchmark", 1);
|
|
1147
|
-
|
|
1148
|
-
if (codexMode === "controlled") {
|
|
1149
|
-
const features = await runCommand(codexCommand, ["features", "list"], { cwd: packageRoot, timeoutMs: 15_000, env: codexEnv });
|
|
1150
|
-
if (features.code !== 0) fail("Codex CLI cannot list features required by controlled benchmark mode; update Codex CLI or use --codex-mode native", 1);
|
|
1151
|
-
const available = new Set(features.stdout.split("\n").map((line) => line.trim().split(/\s+/)[0]).filter(Boolean));
|
|
1152
|
-
codexDisabledFeatures = controlledCodexFeatures.filter((feature) => available.has(feature));
|
|
1153
|
-
}
|
|
1154
|
-
}
|
|
1155
|
-
return { gitVersion, piVersion, codexVersion, codexAuth, codexDisabledFeatures };
|
|
1156
|
-
}
|
|
1157
|
-
|
|
1158
|
-
async function sourceIdentity() {
|
|
1159
|
-
const top = await runCommand("git", ["-C", packageRoot, "rev-parse", "--show-toplevel"], { cwd: packageRoot, timeoutMs: 15_000 });
|
|
1160
|
-
if (top.code !== 0) return { kind: "package", commit: null, dirty: null };
|
|
1161
|
-
let repositoryRoot;
|
|
1162
|
-
try { repositoryRoot = fs.realpathSync(top.stdout.trim()); } catch { return { kind: "package", commit: null, dirty: null }; }
|
|
1163
|
-
if (repositoryRoot !== fs.realpathSync(packageRoot)) return { kind: "package", commit: null, dirty: null };
|
|
1164
|
-
const commit = await runCommand("git", ["-C", packageRoot, "rev-parse", "HEAD"], { cwd: packageRoot, timeoutMs: 15_000 });
|
|
1165
|
-
const status = await runCommand("git", ["-C", packageRoot, "status", "--porcelain", "--untracked-files=normal"], { cwd: packageRoot, timeoutMs: 15_000 });
|
|
1166
|
-
return {
|
|
1167
|
-
kind: "git-working-tree",
|
|
1168
|
-
commit: commit.code === 0 ? commit.stdout.trim() : null,
|
|
1169
|
-
dirty: status.code === 0 ? Boolean(status.stdout.trim()) : null
|
|
1170
|
-
};
|
|
1171
|
-
}
|
|
1172
|
-
|
|
1173
|
-
async function runLegacy(argv) {
|
|
1174
|
-
const result = await runCommand("bash", [path.join(packageRoot, "scripts", "quality-benchmark.sh"), ...argv], { cwd: process.cwd(), inherit: true });
|
|
1175
|
-
process.exitCode = result.code;
|
|
1176
59
|
}
|
|
1177
60
|
|
|
1178
61
|
async function main() {
|
|
1179
62
|
const argv = process.argv.slice(2);
|
|
1180
|
-
if (
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
options.retryDelaySeconds = options.retryDelaySeconds ?? (suite.schemaVersion === 2 ? 60 : 0);
|
|
1198
|
-
options.timeoutSeconds = options.timeoutSeconds ?? suite.timeoutSeconds;
|
|
1199
|
-
if (options.surfaces.includes("codex-cli")) {
|
|
1200
|
-
codexModelName(options.model);
|
|
1201
|
-
codexThinkingEffort(options.thinking);
|
|
1202
|
-
}
|
|
1203
|
-
const comparison = comparisonSurfaces(options);
|
|
1204
|
-
const piCommand = process.env.PIAGENT_BENCHMARK_PI_COMMAND || "pi";
|
|
1205
|
-
const codexCommand = process.env.PIAGENT_BENCHMARK_CODEX_COMMAND || "codex";
|
|
1206
|
-
const suiteDigest = suiteTreeDigest(suiteRoot);
|
|
1207
|
-
const rootSeed = options.seed ?? crypto.randomBytes(32).toString("hex");
|
|
1208
|
-
const rootSeedDigest = crypto.createHash("sha256").update(rootSeed).digest("hex");
|
|
1209
|
-
const order = executionOrder(suite, options.repeats, options.surfaces, rootSeed);
|
|
1210
|
-
const lifecycles = [...new Set(suite.scenarios.map((scenario) => scenario.lifecycle ?? "steady-state"))];
|
|
1211
|
-
const plan = [
|
|
1212
|
-
"Piagent automatic benchmark",
|
|
1213
|
-
` platform: v${packageManifest.version}`,
|
|
1214
|
-
` suite: ${suite.id} (${suite.scenarios.length}${suite.scenarios.length !== declaredScenarioCount ? `/${declaredScenarioCount}` : ""} scenarios)`,
|
|
1215
|
-
` digest: ${suiteDigest.slice(0, 16)}`,
|
|
1216
|
-
` surfaces: ${options.surfaces.join(", ")}`,
|
|
1217
|
-
` compare: ${benchmarkSurfaceLabel(comparison.candidateSurface)} vs ${benchmarkSurfaceLabel(comparison.baselineSurface)}`,
|
|
1218
|
-
` repeats: ${options.repeats}`,
|
|
1219
|
-
` retries: ${options.infrastructureRetries} infrastructure-only · ${options.retryDelaySeconds}s backoff`,
|
|
1220
|
-
` sessions: ${order.length}`,
|
|
1221
|
-
` model: ${options.model ?? "Pi default"}`,
|
|
1222
|
-
` thinking: ${options.thinking ?? "Pi default"}`,
|
|
1223
|
-
` lifecycle: ${lifecycles.join(", ")}`,
|
|
1224
|
-
` variants: ${suite.scenarios.some((scenario) => scenario.variantGenerator) ? `generated · seed ${rootSeedDigest.slice(0, 16)}` : "static"}`,
|
|
1225
|
-
` ordering: ${suite.schemaVersion === 2 ? "seeded paired blocks" : "paired alternating"}`,
|
|
1226
|
-
` timeout: ${options.timeoutSeconds}s per session`,
|
|
1227
|
-
" grading: hidden verifier + scope + output safety + Pi task evidence"
|
|
1228
|
-
].join("\n");
|
|
1229
|
-
const codexPlan = options.surfaces.includes("codex-cli")
|
|
1230
|
-
? `\n codex: ${options.codexMode} mode · model ${codexModelName(options.model)} · effort ${codexThinkingEffort(options.thinking)}${options.codexMode === "controlled" ? " · isolated home" : ""}`
|
|
1231
|
-
: "";
|
|
1232
|
-
if (options.dryRun) {
|
|
1233
|
-
process.stdout.write(`${plan}${codexPlan}\n manifest: ${manifestPath}\nDRY RUN: no model session started.\n`);
|
|
1234
|
-
return;
|
|
1235
|
-
}
|
|
1236
|
-
const codexRuntime = createCodexRuntime(options);
|
|
1237
|
-
try {
|
|
1238
|
-
const runtime = await preflight({ piCommand, codexCommand, surfaces: options.surfaces, codexMode: options.codexMode, codexRuntime });
|
|
1239
|
-
const source = await sourceIdentity();
|
|
1240
|
-
const nativeWarning = options.surfaces.includes("codex-cli") && options.codexMode === "native"
|
|
1241
|
-
? "\nNative Codex mode loads the operator's global AGENTS.md, configuration, rules, hooks, MCP servers, and plugins."
|
|
1242
|
-
: "";
|
|
1243
|
-
if (!options.yes && !(await confirmPlan(`${plan}${codexPlan}${nativeWarning}\nThis may use paid model quota.`))) {
|
|
1244
|
-
process.stdout.write("Benchmark cancelled; no model session started.\n");
|
|
1245
|
-
return;
|
|
1246
|
-
}
|
|
1247
|
-
|
|
1248
|
-
const runId = createRunId(suite.id);
|
|
1249
|
-
const output = options.output ?? path.join(defaultOutputRoot(), runId);
|
|
1250
|
-
const runRoot = ensureEmptyOutput(output);
|
|
1251
|
-
privateDirectory(path.join(runRoot, "workspaces"));
|
|
1252
|
-
const removeSignalHandlers = installSignalForwarding();
|
|
1253
|
-
const startedAt = new Date().toISOString();
|
|
1254
|
-
const runs = [];
|
|
1255
|
-
let fatalRunError;
|
|
1256
|
-
const ledgerPath = path.join(runRoot, "runs.jsonl");
|
|
1257
|
-
const infrastructureLedgerPath = path.join(runRoot, "infrastructure-attempts.jsonl");
|
|
1258
|
-
try {
|
|
1259
|
-
for (const [index, item] of order.entries()) {
|
|
1260
|
-
if (interruptedSignal) break;
|
|
1261
|
-
process.stdout.write(`[${index + 1}/${order.length}] ${item.scenario.id} · ${item.surface} · repeat ${item.repeat}\n`);
|
|
1262
|
-
let record;
|
|
1263
|
-
const infrastructureFailures = [];
|
|
1264
|
-
for (let infrastructureAttempt = 1; infrastructureAttempt <= options.infrastructureRetries + 1; infrastructureAttempt += 1) {
|
|
1265
|
-
let attemptError;
|
|
1266
|
-
let attemptCodexRuntime = codexRuntime;
|
|
1267
|
-
try {
|
|
1268
|
-
if (item.surface === "codex-cli") attemptCodexRuntime = createCodexRuntime(options);
|
|
1269
|
-
record = await runOne({
|
|
1270
|
-
suite,
|
|
1271
|
-
suiteRoot,
|
|
1272
|
-
...item,
|
|
1273
|
-
infrastructureAttempt,
|
|
1274
|
-
runId,
|
|
1275
|
-
runRoot,
|
|
1276
|
-
options,
|
|
1277
|
-
piCommand,
|
|
1278
|
-
codexCommand,
|
|
1279
|
-
codexDisabledFeatures: runtime.codexDisabledFeatures,
|
|
1280
|
-
codexRuntime: attemptCodexRuntime,
|
|
1281
|
-
suiteDigest,
|
|
1282
|
-
rootSeed
|
|
1283
|
-
});
|
|
1284
|
-
} catch (error) {
|
|
1285
|
-
attemptError = error;
|
|
1286
|
-
record = {
|
|
1287
|
-
schemaVersion: 1,
|
|
1288
|
-
scenarioId: item.scenario.id,
|
|
1289
|
-
scenarioTitle: item.scenario.title,
|
|
1290
|
-
scenarioKind: item.scenario.kind,
|
|
1291
|
-
category: item.scenario.category ?? "unspecified",
|
|
1292
|
-
difficulty: item.scenario.difficulty ?? "unspecified",
|
|
1293
|
-
profile: item.scenario.profile ?? suite.profile,
|
|
1294
|
-
lifecycle: item.scenario.lifecycle ?? "steady-state",
|
|
1295
|
-
surface: item.surface,
|
|
1296
|
-
repeat: item.repeat,
|
|
1297
|
-
infrastructureAttempt,
|
|
1298
|
-
abortSuite: true,
|
|
1299
|
-
infrastructureFailure: `runner-error:${error.message}`,
|
|
1300
|
-
resolved: false,
|
|
1301
|
-
failure: `runner-error:${error.message}`,
|
|
1302
|
-
grade: { passed: false, score: 0, checks: [] },
|
|
1303
|
-
graderIntegrity: { passed: false },
|
|
1304
|
-
scope: { passed: false, changedFiles: [], outsideScope: [] },
|
|
1305
|
-
outputSafety: { passed: false, forbiddenHits: [] },
|
|
1306
|
-
outputEvidence: { passed: false, requiredCount: 0, observedCount: 0, missingHashes: [] },
|
|
1307
|
-
workflow: null,
|
|
1308
|
-
usage: aggregateSessionUsage([]),
|
|
1309
|
-
durationSeconds: 0
|
|
1310
|
-
};
|
|
1311
|
-
} finally {
|
|
1312
|
-
if (attemptCodexRuntime !== codexRuntime) attemptCodexRuntime.cleanup();
|
|
1313
|
-
}
|
|
1314
|
-
if (!record.abortSuite || interruptedSignal) break;
|
|
1315
|
-
const retryAvailable = infrastructureAttempt <= options.infrastructureRetries;
|
|
1316
|
-
infrastructureFailures.push({
|
|
1317
|
-
attempt: infrastructureAttempt,
|
|
1318
|
-
failure: record.infrastructureFailure ?? record.failure,
|
|
1319
|
-
agent: record.agent,
|
|
1320
|
-
durationSeconds: record.durationSeconds
|
|
1321
|
-
});
|
|
1322
|
-
fs.appendFileSync(infrastructureLedgerPath, `${JSON.stringify({ ...record, accepted: false, retryAvailable })}\n`, { mode: 0o600 });
|
|
1323
|
-
if (!retryAvailable) {
|
|
1324
|
-
if (attemptError) fatalRunError = attemptError;
|
|
1325
|
-
break;
|
|
1326
|
-
}
|
|
1327
|
-
process.stdout.write(` RETRY ${infrastructureAttempt}/${options.infrastructureRetries} (${record.infrastructureFailure ?? record.failure})\n`);
|
|
1328
|
-
if (options.retryDelaySeconds > 0) {
|
|
1329
|
-
await new Promise((resolve) => setTimeout(resolve, options.retryDelaySeconds * 1_000));
|
|
1330
|
-
}
|
|
1331
|
-
}
|
|
1332
|
-
record.infrastructureAttempts = record.infrastructureAttempt ?? 1;
|
|
1333
|
-
record.infrastructureRetries = Math.max(0, record.infrastructureAttempts - 1);
|
|
1334
|
-
record.infrastructureFailures = infrastructureFailures;
|
|
1335
|
-
runs.push(record);
|
|
1336
|
-
fs.appendFileSync(ledgerPath, `${JSON.stringify(record)}\n`, { mode: 0o600 });
|
|
1337
|
-
const cost = Number.isFinite(record.usage.cost) ? `$${Number(record.usage.cost).toFixed(6)}` : "cost n/a";
|
|
1338
|
-
process.stdout.write(` ${record.resolved ? "PASS" : `FAIL (${record.failure})`} · ${record.usage.fresh} fresh tok · ${cost}\n`);
|
|
1339
|
-
if (record.abortSuite && !fatalRunError) fatalRunError = new Error(record.infrastructureFailure ?? record.failure ?? "agent startup failure");
|
|
1340
|
-
if (fatalRunError) break;
|
|
1341
|
-
}
|
|
1342
|
-
} finally {
|
|
1343
|
-
removeSignalHandlers();
|
|
1344
|
-
}
|
|
1345
|
-
if (interruptedSignal) {
|
|
1346
|
-
if (!options.keepWorkspaces) fs.rmSync(path.join(runRoot, "workspaces"), { recursive: true, force: true });
|
|
1347
|
-
writePrivate(path.join(runRoot, "interrupted.json"), `${JSON.stringify({ schemaVersion: 1, runId, signal: interruptedSignal, completedRuns: runs.length, expectedRuns: order.length, interruptedAt: new Date().toISOString() }, null, 2)}\n`);
|
|
1348
|
-
process.stderr.write(`Benchmark interrupted by ${interruptedSignal}. Partial ledger: ${ledgerPath}\n`);
|
|
1349
|
-
process.exitCode = interruptedSignal === "SIGINT" ? 130 : 143;
|
|
1350
|
-
return;
|
|
1351
|
-
}
|
|
1352
|
-
if (fatalRunError) {
|
|
1353
|
-
if (!options.keepWorkspaces) fs.rmSync(path.join(runRoot, "workspaces"), { recursive: true, force: true });
|
|
1354
|
-
writePrivate(path.join(runRoot, "aborted.json"), `${JSON.stringify({ schemaVersion: 1, runId, reason: fatalRunError.message, completedRuns: runs.length, expectedRuns: order.length, abortedAt: new Date().toISOString() }, null, 2)}\n`);
|
|
1355
|
-
process.stderr.write(`Benchmark aborted after an infrastructure error. Partial ledger: ${ledgerPath}\n`);
|
|
1356
|
-
process.exitCode = 1;
|
|
1357
|
-
return;
|
|
1358
|
-
}
|
|
1359
|
-
const report = summarizeBenchmark({
|
|
1360
|
-
suite,
|
|
1361
|
-
runId,
|
|
1362
|
-
startedAt,
|
|
1363
|
-
completedAt: new Date().toISOString(),
|
|
1364
|
-
repeats: options.repeats,
|
|
1365
|
-
environment: {
|
|
1366
|
-
platformVersion: packageManifest.version,
|
|
1367
|
-
suiteDigest,
|
|
1368
|
-
variantRootSeed: suite.scenarios.some((scenario) => scenario.variantGenerator) ? rootSeed : null,
|
|
1369
|
-
variantRootSeedDigest: suite.scenarios.some((scenario) => scenario.variantGenerator) ? rootSeedDigest : null,
|
|
1370
|
-
executionOrder: suite.schemaVersion === 2 ? "seeded-paired-block-randomized" : "paired-alternating",
|
|
1371
|
-
profile: suite.profile,
|
|
1372
|
-
requestedModel: options.model ?? null,
|
|
1373
|
-
requestedThinking: options.thinking ?? null,
|
|
1374
|
-
treatmentBaseline: lifecycles.length === 1 && lifecycles[0] === "steady-state"
|
|
1375
|
-
? options.surfaces.includes("codex-cli")
|
|
1376
|
-
? "piagent-initialized-and-onboarded; codex-clean-fixture"
|
|
1377
|
-
: "initialized-and-onboarded"
|
|
1378
|
-
: "scenario-defined-mixed-lifecycle",
|
|
1379
|
-
timeoutSeconds: options.timeoutSeconds,
|
|
1380
|
-
nodeVersion: process.version,
|
|
1381
|
-
piVersion: runtime.piVersion,
|
|
1382
|
-
codexVersion: runtime.codexVersion ?? null,
|
|
1383
|
-
codexMode: options.surfaces.includes("codex-cli") ? options.codexMode : null,
|
|
1384
|
-
codexAuth: runtime.codexAuth ?? null,
|
|
1385
|
-
codexIsolation: options.surfaces.includes("codex-cli")
|
|
1386
|
-
? options.codexMode === "controlled" ? "per-session-temporary-home" : "operator-home"
|
|
1387
|
-
: null,
|
|
1388
|
-
codexCredentialBridge: options.surfaces.includes("codex-cli") ? codexRuntime.credentialBridge : null,
|
|
1389
|
-
codexGlobalInstructions: options.surfaces.includes("codex-cli")
|
|
1390
|
-
? options.codexMode === "controlled" ? "excluded" : "operator-home"
|
|
1391
|
-
: null,
|
|
1392
|
-
codexDisabledFeatures: runtime.codexDisabledFeatures,
|
|
1393
|
-
surfaces: options.surfaces,
|
|
1394
|
-
scenarioSelection: options.scenarioIds ?? null,
|
|
1395
|
-
surfaceModels: options.surfaces.includes("codex-cli") ? {
|
|
1396
|
-
piagent: options.model,
|
|
1397
|
-
"codex-cli": codexModelName(options.model)
|
|
1398
|
-
} : { "raw-pi": options.model ?? null, piagent: options.model ?? null },
|
|
1399
|
-
modelParityEvidence: options.surfaces.includes("codex-cli") ? "command-line-pinned" : "session-reported",
|
|
1400
|
-
gitVersion: runtime.gitVersion,
|
|
1401
|
-
source
|
|
1402
|
-
},
|
|
1403
|
-
runs,
|
|
1404
|
-
...comparison
|
|
1405
|
-
});
|
|
1406
|
-
const text = renderBenchmarkText(report);
|
|
1407
|
-
writePrivate(path.join(runRoot, "report.json"), `${JSON.stringify(report, null, 2)}\n`);
|
|
1408
|
-
writePrivate(path.join(runRoot, "report.html"), renderBenchmarkHtml(report));
|
|
1409
|
-
writePrivate(path.join(runRoot, "summary.txt"), text);
|
|
1410
|
-
if (!options.keepWorkspaces) fs.rmSync(path.join(runRoot, "workspaces"), { recursive: true, force: true });
|
|
1411
|
-
process.stdout.write(options.json ? `${JSON.stringify(report, null, 2)}\n` : text);
|
|
1412
|
-
process.stdout.write(`Reports: ${runRoot}\n`);
|
|
1413
|
-
if (
|
|
1414
|
-
report.comparison.qualityGate === false
|
|
1415
|
-
|| report.comparison.safetyGate === false
|
|
1416
|
-
|| report.comparison.reliabilityGate === false
|
|
1417
|
-
|| report.comparison.qualityNonInferior === false
|
|
1418
|
-
|| report.comparison.workflowGate === false
|
|
1419
|
-
|| report.comparison.categoryGate === false
|
|
1420
|
-
|| report.comparison.productionGate?.passed === false
|
|
1421
|
-
) process.exitCode = 1;
|
|
1422
|
-
} finally {
|
|
1423
|
-
codexRuntime.cleanup();
|
|
1424
|
-
}
|
|
1425
|
-
}
|
|
1426
|
-
|
|
1427
|
-
if (import.meta.url === pathToFileURL(process.argv[1] || "").href) {
|
|
1428
|
-
main().catch((error) => {
|
|
63
|
+
if (legacyInvocation(argv) || argv.includes("--help") || argv.includes("-h")) {
|
|
64
|
+
return runChild(path.join(liveRoot, "scripts", "benchmark-runner-core.mjs"), argv, process.env);
|
|
65
|
+
}
|
|
66
|
+
assertBenchmarkLaunchEnvironmentSafe();
|
|
67
|
+
const snapshot = createBenchmarkExecutionSnapshot({ liveRoot, argv, cwd: process.cwd() });
|
|
68
|
+
const script = path.join(snapshot.candidateRoot, "scripts", "benchmark-runner-core.mjs");
|
|
69
|
+
return runChild(
|
|
70
|
+
script,
|
|
71
|
+
argv,
|
|
72
|
+
benchmarkBootstrapEnvironment(snapshot.metadata),
|
|
73
|
+
() => cleanupBenchmarkExecutionSnapshot(snapshot.temporaryRoot, snapshot.runtimeParent, snapshot.metadata.piAgentHome)
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
main()
|
|
78
|
+
.then((code) => { process.exitCode = code; })
|
|
79
|
+
.catch((error) => {
|
|
1429
80
|
console.error(`FAIL: ${error.message}`);
|
|
1430
|
-
process.
|
|
81
|
+
process.exitCode = error.exitCode ?? 1;
|
|
1431
82
|
});
|
|
1432
|
-
}
|