@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
|
@@ -0,0 +1,985 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { evidenceTopLevelArguments, executableRejectionAssertions } from "./acceptance-executable-evidence.js";
|
|
3
|
+
|
|
4
|
+
const INTEGER_TARGET_STOPWORDS = new Set([
|
|
5
|
+
"and", "basis", "cents", "input", "inputs", "items", "money", "number", "numbers", "or", "points", "typeerror", "value", "values"
|
|
6
|
+
]);
|
|
7
|
+
|
|
8
|
+
function normalizedText(value) {
|
|
9
|
+
return String(value ?? "")
|
|
10
|
+
.normalize("NFD")
|
|
11
|
+
.replace(/[\u0300-\u036f]/g, "")
|
|
12
|
+
.toLowerCase();
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function erasedLexeme(value) {
|
|
16
|
+
return String(value ?? "").replace(/[^\r\n]/g, " ");
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function stringLiteralSentinel(value) {
|
|
20
|
+
if (value.length === 0) return "__pi_empty_string_literal__";
|
|
21
|
+
if (/^(?:\s|\\[nrtvf0])+$/u.test(value)) return "__pi_whitespace_string_literal__";
|
|
22
|
+
if (["assert", "assert/strict", "node:assert", "node:assert/strict"].includes(value.trim().toLowerCase())) {
|
|
23
|
+
return "__pi_node_assert_module_literal__";
|
|
24
|
+
}
|
|
25
|
+
if (["node:vm", "vm"].includes(value.trim().toLowerCase())) return "__pi_code_generation_module_literal__";
|
|
26
|
+
if (["module", "node:module"].includes(value.trim().toLowerCase())) return "__pi_module_loader_module_literal__";
|
|
27
|
+
const errorName = value.trim().toLowerCase().match(/^(typeerror|rangeerror|syntaxerror|referenceerror|urierror|evalerror|aggregateerror|error)$/)?.[1];
|
|
28
|
+
if (errorName) return `__pi_error_name_${errorName}_literal__`;
|
|
29
|
+
return "__pi_string_literal__";
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function regexCanStart(source, offset) {
|
|
33
|
+
const prefix = source.slice(0, offset).replace(/\s+$/u, "");
|
|
34
|
+
if (!prefix) return true;
|
|
35
|
+
const previous = prefix.at(-1);
|
|
36
|
+
if (/[([{,:;=!?&|+*%^~<>-]/u.test(previous)) return true;
|
|
37
|
+
return /\b(?:await|case|delete|do|else|in|instanceof|new|of|return|throw|typeof|void|yield)$/u.test(prefix);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Return a bounded lexical evidence view of JavaScript/TypeScript source.
|
|
42
|
+
*
|
|
43
|
+
* Comments and regular-expression payloads are erased. String/template
|
|
44
|
+
* payloads are replaced by a closed set of literal-category sentinels, so a
|
|
45
|
+
* quoted fragment such as "assert.throws(..., TypeError)" can never become
|
|
46
|
+
* executable evidence while empty/whitespace string partitions remain
|
|
47
|
+
* observable. This is deliberately a lexer, not a parser: malformed or
|
|
48
|
+
* ambiguous input loses evidence and therefore fails closed.
|
|
49
|
+
*/
|
|
50
|
+
function lexJavaScriptEvidence(value, bindStrings = false) {
|
|
51
|
+
const source = String(value ?? "");
|
|
52
|
+
const output = [];
|
|
53
|
+
const strings = [];
|
|
54
|
+
let index = 0;
|
|
55
|
+
while (index < source.length) {
|
|
56
|
+
const current = source[index];
|
|
57
|
+
const next = source[index + 1];
|
|
58
|
+
|
|
59
|
+
if (current === "/" && next === "/") {
|
|
60
|
+
let end = index + 2;
|
|
61
|
+
while (end < source.length && source[end] !== "\n" && source[end] !== "\r") end += 1;
|
|
62
|
+
output.push(erasedLexeme(source.slice(index, end)));
|
|
63
|
+
index = end;
|
|
64
|
+
continue;
|
|
65
|
+
}
|
|
66
|
+
if (current === "/" && next === "*") {
|
|
67
|
+
const closing = source.indexOf("*/", index + 2);
|
|
68
|
+
const end = closing === -1 ? source.length : closing + 2;
|
|
69
|
+
output.push(erasedLexeme(source.slice(index, end)));
|
|
70
|
+
index = end;
|
|
71
|
+
continue;
|
|
72
|
+
}
|
|
73
|
+
if (current === "'" || current === '"') {
|
|
74
|
+
const quote = current;
|
|
75
|
+
let end = index + 1;
|
|
76
|
+
let payload = "";
|
|
77
|
+
let closed = false;
|
|
78
|
+
while (end < source.length) {
|
|
79
|
+
const character = source[end];
|
|
80
|
+
if (character === "\\") {
|
|
81
|
+
payload += source.slice(end, Math.min(source.length, end + 2));
|
|
82
|
+
end += 2;
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
if (character === quote) {
|
|
86
|
+
end += 1;
|
|
87
|
+
closed = true;
|
|
88
|
+
break;
|
|
89
|
+
}
|
|
90
|
+
payload += character;
|
|
91
|
+
end += 1;
|
|
92
|
+
}
|
|
93
|
+
if (!closed) output.push(erasedLexeme(source.slice(index, end)));
|
|
94
|
+
else if (bindStrings) {
|
|
95
|
+
output.push(`__pi_bound_string_${strings.length}__`);
|
|
96
|
+
strings.push(payload);
|
|
97
|
+
} else output.push(stringLiteralSentinel(payload));
|
|
98
|
+
index = end;
|
|
99
|
+
continue;
|
|
100
|
+
}
|
|
101
|
+
if (current === "`") {
|
|
102
|
+
let end = index + 1;
|
|
103
|
+
let closed = false;
|
|
104
|
+
while (end < source.length) {
|
|
105
|
+
if (source[end] === "\\") {
|
|
106
|
+
end += 2;
|
|
107
|
+
continue;
|
|
108
|
+
}
|
|
109
|
+
if (source[end] === "`") {
|
|
110
|
+
end += 1;
|
|
111
|
+
closed = true;
|
|
112
|
+
break;
|
|
113
|
+
}
|
|
114
|
+
end += 1;
|
|
115
|
+
}
|
|
116
|
+
output.push(closed ? "__pi_template_literal__" : erasedLexeme(source.slice(index, end)));
|
|
117
|
+
index = end;
|
|
118
|
+
continue;
|
|
119
|
+
}
|
|
120
|
+
if (current === "/" && next !== "=" && regexCanStart(source, index)) {
|
|
121
|
+
let end = index + 1;
|
|
122
|
+
let inClass = false;
|
|
123
|
+
let closed = false;
|
|
124
|
+
while (end < source.length) {
|
|
125
|
+
const character = source[end];
|
|
126
|
+
if (character === "\\") {
|
|
127
|
+
end += 2;
|
|
128
|
+
continue;
|
|
129
|
+
}
|
|
130
|
+
if (character === "[") inClass = true;
|
|
131
|
+
else if (character === "]") inClass = false;
|
|
132
|
+
else if (character === "/" && !inClass) {
|
|
133
|
+
end += 1;
|
|
134
|
+
while (/[a-z]/iu.test(source[end] ?? "")) end += 1;
|
|
135
|
+
closed = true;
|
|
136
|
+
break;
|
|
137
|
+
} else if (character === "\n" || character === "\r") {
|
|
138
|
+
break;
|
|
139
|
+
}
|
|
140
|
+
end += 1;
|
|
141
|
+
}
|
|
142
|
+
if (closed) {
|
|
143
|
+
output.push("__pi_regex_literal__");
|
|
144
|
+
index = end;
|
|
145
|
+
continue;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
output.push(current);
|
|
149
|
+
index += 1;
|
|
150
|
+
}
|
|
151
|
+
const code = output.join("");
|
|
152
|
+
return bindStrings ? { code, strings } : code;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export function sanitizeJavaScriptEvidence(value) {
|
|
156
|
+
return lexJavaScriptEvidence(value, false);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
function uniqueStrings(values) {
|
|
160
|
+
return [...new Set((Array.isArray(values) ? values : []).filter((item) => typeof item === "string" && item.trim()).map((item) => item.trim()))];
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
function escapeRegex(value) {
|
|
164
|
+
return String(value ?? "").replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
function integerGuardHelpers(sourceText) {
|
|
168
|
+
const helpers = [];
|
|
169
|
+
const declarations = /function\s+([a-z_$][a-z0-9_$]*)\s*\(([^)]*)\)\s*\{([\s\S]{0,800}?)\}/gi;
|
|
170
|
+
for (const match of String(sourceText ?? "").matchAll(declarations)) {
|
|
171
|
+
const parameter = match[2].split(",")[0]?.trim().match(/^([a-z_$][a-z0-9_$]*)/i)?.[1];
|
|
172
|
+
if (!parameter) continue;
|
|
173
|
+
const escaped = escapeRegex(parameter);
|
|
174
|
+
if (new RegExp(`number\\.is(?:safe)?integer\\s*\\(\\s*${escaped}\\b`, "i").test(match[3])) helpers.push(match[1].toLowerCase());
|
|
175
|
+
}
|
|
176
|
+
return uniqueStrings(helpers).slice(0, 12);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
function integerConstraintTargets(text, sourceText = "") {
|
|
180
|
+
const value = normalizedText(text);
|
|
181
|
+
const source = normalizedText(sourceText);
|
|
182
|
+
const candidates = [];
|
|
183
|
+
for (const match of value.matchAll(/\b(?:an?\s+)?(?:non-negative\s+|positive\s+)?integer\s+([a-z_$][a-z0-9_$]*)\b/g)) candidates.push(match[1]);
|
|
184
|
+
for (const match of value.matchAll(/`([a-z_$][a-z0-9_$]*)`[^.\n]{0,120}\b(?:is|must be|must remain)\s+(?:an?\s+)?(?:non-negative\s+|positive\s+)?(?:safe\s+)?integer\b/g)) candidates.push(match[1]);
|
|
185
|
+
return uniqueStrings(candidates)
|
|
186
|
+
.map((item) => item.toLowerCase())
|
|
187
|
+
.filter((item) => !INTEGER_TARGET_STOPWORDS.has(item))
|
|
188
|
+
.filter((item) => !source || new RegExp(`\\b${escapeRegex(item)}\\b`).test(source));
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
function onlyUndefinedContract(text) {
|
|
192
|
+
const value = normalizedText(text);
|
|
193
|
+
return /\babsent\s+only\s+when[^.\n]{0,80}\bundefined\b/.test(value)
|
|
194
|
+
|| /\bonly\s+when[^.\n]{0,80}\bundefined\b/.test(value)
|
|
195
|
+
|| /\bvalid values?[^.\n]{0,120}\bnull\b[^.\n]{0,120}\bmust not fall through\b/.test(value);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
function nullRejectingDefaultTargets(text, sourceText = "") {
|
|
199
|
+
const value = normalizedText(text);
|
|
200
|
+
const targets = [];
|
|
201
|
+
for (const match of value.matchAll(/`([a-z_$][a-z0-9_$]*)`[^.\n]{0,160}\bdefaults?\s+to\b[^.\n]{0,160}\bmust be\s+(?:an?\s+)?(?:non-negative\s+|positive\s+)?(?:safe\s+)?integer\b/g)) targets.push(match[1]);
|
|
202
|
+
for (const match of value.matchAll(/\bomitted\s+`?([a-z_$][a-z0-9_$]*)`?[^.\n]{0,120}\bdefaults?\b[^.\n]{0,160}\bwhen supplied\b[^.\n]{0,160}\bnon-null\b/g)) targets.push(match[1]);
|
|
203
|
+
const source = normalizedText(sourceText);
|
|
204
|
+
const uniqueTargets = uniqueStrings(targets);
|
|
205
|
+
if (!source) return uniqueTargets;
|
|
206
|
+
return uniqueTargets.filter((target) => new RegExp(`(?:\\.${escapeRegex(target)}\\b|\\b${escapeRegex(target)}\\b)\\s*\\?\\?`, "i").test(source));
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
const ERROR_CONSTRUCTORS = ["typeerror", "rangeerror", "syntaxerror", "referenceerror", "urierror", "evalerror", "aggregateerror", "error"];
|
|
210
|
+
|
|
211
|
+
function evidenceBalancedEnd(text, openIndex, opening = "(", closing = ")", ceiling = 8_000) {
|
|
212
|
+
if (text[openIndex] !== opening) return -1;
|
|
213
|
+
let depth = 0;
|
|
214
|
+
for (let index = openIndex; index < Math.min(text.length, openIndex + ceiling); index += 1) {
|
|
215
|
+
if (text[index] === opening) depth += 1;
|
|
216
|
+
else if (text[index] === closing && --depth === 0) return index + 1;
|
|
217
|
+
}
|
|
218
|
+
return -1;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
function requestedErrorClasses(text) {
|
|
222
|
+
const value = normalizedText(text);
|
|
223
|
+
const specific = ERROR_CONSTRUCTORS.slice(0, -1).filter((name) => new RegExp(`\\b${name}\\b`).test(value));
|
|
224
|
+
if (specific.length > 0) return specific;
|
|
225
|
+
return /\b(?:throw(?:s|ing)?|reject(?:s|ed|ion)?)\b[^.\n]{0,80}\berror\b/.test(value) ? ["error"] : [];
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
function simpleConstantValue(raw) {
|
|
229
|
+
let value = String(raw ?? "").trim();
|
|
230
|
+
while (value.startsWith("(") && evidenceBalancedEnd(value, 0) === value.length) value = value.slice(1, -1).trim();
|
|
231
|
+
const primitive = (token) => {
|
|
232
|
+
const item = token.trim();
|
|
233
|
+
if (item === "true") return { known: true, value: true };
|
|
234
|
+
if (item === "false") return { known: true, value: false };
|
|
235
|
+
if (item === "null") return { known: true, value: null };
|
|
236
|
+
if (item === "undefined") return { known: true, value: undefined };
|
|
237
|
+
if (/^-?(?:\d+(?:\.\d+)?|\.\d+)$/.test(item)) return { known: true, value: Number(item) };
|
|
238
|
+
return { known: false, value: undefined };
|
|
239
|
+
};
|
|
240
|
+
const direct = primitive(value);
|
|
241
|
+
if (direct.known) return Boolean(direct.value);
|
|
242
|
+
if (value.startsWith("!")) {
|
|
243
|
+
const nested = simpleConstantValue(value.slice(1));
|
|
244
|
+
return nested === undefined ? undefined : !nested;
|
|
245
|
+
}
|
|
246
|
+
const comparison = value.match(/^(.+?)\s*(===|!==|==|!=|<=|>=|<|>)\s*(.+)$/);
|
|
247
|
+
if (!comparison) return undefined;
|
|
248
|
+
const left = primitive(comparison[1]);
|
|
249
|
+
const right = primitive(comparison[3]);
|
|
250
|
+
if (!left.known || !right.known) return undefined;
|
|
251
|
+
switch (comparison[2]) {
|
|
252
|
+
case "===": return left.value === right.value;
|
|
253
|
+
case "!==": return left.value !== right.value;
|
|
254
|
+
case "==": return left.value == right.value; // bounded literal comparison mirrors JS test reachability
|
|
255
|
+
case "!=": return left.value != right.value;
|
|
256
|
+
case "<=": return left.value <= right.value;
|
|
257
|
+
case ">=": return left.value >= right.value;
|
|
258
|
+
case "<": return left.value < right.value;
|
|
259
|
+
case ">": return left.value > right.value;
|
|
260
|
+
default: return undefined;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
function entryPath(value) {
|
|
265
|
+
return path.posix.normalize(String(value ?? "").replace(/\\/g, "/").replace(/^\.\//, ""));
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
function sourceExports(entry) {
|
|
269
|
+
const code = normalizedText(sanitizeJavaScriptEvidence(entry?.text ?? entry?.evidenceText));
|
|
270
|
+
const exports = [];
|
|
271
|
+
for (const match of code.matchAll(/\bexport\s+(?:async\s+)?function\s+([a-z_$][a-z0-9_$]*)\b/g)) exports.push({ contractName: match[1], exportName: match[1], sourceName: match[1] });
|
|
272
|
+
for (const match of code.matchAll(/\bexport\s+(?:const|let|var|class)\s+([a-z_$][a-z0-9_$]*)\b/g)) exports.push({ contractName: match[1], exportName: match[1], sourceName: match[1] });
|
|
273
|
+
for (const match of code.matchAll(/\bexport\s+default\s+(?:async\s+)?function\s+([a-z_$][a-z0-9_$]*)\b/g)) exports.push({ contractName: match[1], exportName: "default", sourceName: match[1] });
|
|
274
|
+
for (const match of code.matchAll(/\bexport\s*\{([^}]{1,800})\}/g)) {
|
|
275
|
+
for (const item of match[1].split(",")) {
|
|
276
|
+
const binding = item.trim().match(/^([a-z_$][a-z0-9_$]*)(?:\s+as\s+([a-z_$][a-z0-9_$]*))?$/);
|
|
277
|
+
if (binding) exports.push({ contractName: binding[2] ?? binding[1], exportName: binding[2] ?? binding[1], sourceName: binding[1] });
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
for (const match of code.matchAll(/\bmodule\.exports\s*=\s*\{([^}]{1,800})\}/g)) {
|
|
281
|
+
for (const item of match[1].split(",")) {
|
|
282
|
+
const binding = item.trim().match(/^([a-z_$][a-z0-9_$]*)(?:\s*:\s*([a-z_$][a-z0-9_$]*))?$/);
|
|
283
|
+
if (binding) exports.push({ contractName: binding[1], exportName: binding[1], sourceName: binding[2] ?? binding[1] });
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
for (const match of code.matchAll(/\b(?:module\.)?exports\.([a-z_$][a-z0-9_$]*)\s*=\s*([a-z_$][a-z0-9_$]*)\b/g)) {
|
|
287
|
+
exports.push({ contractName: match[1], exportName: match[1], sourceName: match[2] });
|
|
288
|
+
}
|
|
289
|
+
for (const match of code.matchAll(/\bmodule\.exports\s*=\s*([a-z_$][a-z0-9_$]*)\b/g)) {
|
|
290
|
+
exports.push({ contractName: match[1], exportName: "default", sourceName: match[1] });
|
|
291
|
+
}
|
|
292
|
+
const sourcePath = entryPath(entry?.path);
|
|
293
|
+
return [...new Map(exports.map((item) => [`${item.contractName}:${item.exportName}:${item.sourceName}`, { ...item, sourcePath }])).values()];
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
function importClauseBindings(clause, moduleSpecifier, testPath) {
|
|
297
|
+
const bindings = [];
|
|
298
|
+
const value = clause.trim();
|
|
299
|
+
const namespace = value.match(/\*\s+as\s+([a-z_$][a-z0-9_$]*)/i);
|
|
300
|
+
if (namespace) bindings.push({ importName: "*", localName: namespace[1].toLowerCase() });
|
|
301
|
+
const named = value.match(/\{([^}]*)\}/);
|
|
302
|
+
if (named) {
|
|
303
|
+
for (const item of named[1].split(",")) {
|
|
304
|
+
const binding = item.trim().match(/^([a-z_$][a-z0-9_$]*)(?:\s+as\s+([a-z_$][a-z0-9_$]*))?$/i);
|
|
305
|
+
if (binding) bindings.push({ importName: binding[1].toLowerCase(), localName: (binding[2] ?? binding[1]).toLowerCase() });
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
const defaultBinding = value.replace(/\{[^}]*\}|\*\s+as\s+[a-z_$][a-z0-9_$]*/gi, "").split(",")[0].trim();
|
|
309
|
+
if (/^[a-z_$][a-z0-9_$]*$/i.test(defaultBinding)) bindings.push({ importName: "default", localName: defaultBinding.toLowerCase() });
|
|
310
|
+
return bindings.map((item) => ({ ...item, moduleSpecifier, testPath: entryPath(testPath) }));
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
function destructuredModuleBindings(clause, moduleSpecifier, testPath) {
|
|
314
|
+
const bindings = [];
|
|
315
|
+
for (const item of clause.split(",")) {
|
|
316
|
+
const binding = item.trim().match(/^([a-z_$][a-z0-9_$]*)(?:\s*:\s*([a-z_$][a-z0-9_$]*))?$/i);
|
|
317
|
+
if (binding) bindings.push({ importName: binding[1].toLowerCase(), localName: (binding[2] ?? binding[1]).toLowerCase(), moduleSpecifier, testPath: entryPath(testPath) });
|
|
318
|
+
}
|
|
319
|
+
return bindings;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
function staticModuleBindings(entry) {
|
|
323
|
+
const lexical = lexJavaScriptEvidence(entry?.text ?? "", true);
|
|
324
|
+
const bindings = [];
|
|
325
|
+
for (const match of lexical.code.matchAll(/\bimport\s+([\s\S]{1,800}?)\s+from\s+__pi_bound_string_(\d+)__/g)) {
|
|
326
|
+
const moduleSpecifier = lexical.strings[Number(match[2])];
|
|
327
|
+
if (typeof moduleSpecifier === "string" && !moduleSpecifier.includes("\\")) bindings.push(...importClauseBindings(match[1], moduleSpecifier, entry?.path));
|
|
328
|
+
}
|
|
329
|
+
const moduleCall = "(?:require\\s*\\(\\s*__pi_bound_string_(\\d+)__\\s*\\)|(?:await\\s+)?import\\s*\\(\\s*__pi_bound_string_(\\d+)__\\s*\\))";
|
|
330
|
+
for (const match of lexical.code.matchAll(new RegExp(`\\bconst\\s*\\{([^}]{1,800})\\}\\s*=\\s*${moduleCall}`, "gi"))) {
|
|
331
|
+
const index = Number(match[2] ?? match[3]);
|
|
332
|
+
const moduleSpecifier = lexical.strings[index];
|
|
333
|
+
if (typeof moduleSpecifier === "string" && !moduleSpecifier.includes("\\")) bindings.push(...destructuredModuleBindings(match[1], moduleSpecifier, entry?.path));
|
|
334
|
+
}
|
|
335
|
+
for (const match of lexical.code.matchAll(new RegExp(`\\bconst\\s+([a-z_$][a-z0-9_$]*)\\s*=\\s*${moduleCall}\\s*\\.\\s*([a-z_$][a-z0-9_$]*)`, "gi"))) {
|
|
336
|
+
const index = Number(match[2] ?? match[3]);
|
|
337
|
+
const moduleSpecifier = lexical.strings[index];
|
|
338
|
+
if (typeof moduleSpecifier === "string" && !moduleSpecifier.includes("\\")) bindings.push({ importName: match[4].toLowerCase(), localName: match[1].toLowerCase(), moduleSpecifier, testPath: entryPath(entry?.path) });
|
|
339
|
+
}
|
|
340
|
+
for (const match of lexical.code.matchAll(new RegExp(`\\bconst\\s+([a-z_$][a-z0-9_$]*)\\s*=\\s*${moduleCall}`, "gi"))) {
|
|
341
|
+
const index = Number(match[2] ?? match[3]);
|
|
342
|
+
const moduleSpecifier = lexical.strings[index];
|
|
343
|
+
if (typeof moduleSpecifier !== "string" || moduleSpecifier.includes("\\")) continue;
|
|
344
|
+
bindings.push({ importName: "default", localName: match[1].toLowerCase(), moduleSpecifier, testPath: entryPath(entry?.path) });
|
|
345
|
+
bindings.push({ importName: "*", localName: match[1].toLowerCase(), moduleSpecifier, testPath: entryPath(entry?.path) });
|
|
346
|
+
}
|
|
347
|
+
return bindings;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
function importResolvesTo(binding, sourcePath) {
|
|
351
|
+
if (!binding.moduleSpecifier.startsWith(".")) return false;
|
|
352
|
+
const resolved = entryPath(path.posix.join(path.posix.dirname(binding.testPath), binding.moduleSpecifier));
|
|
353
|
+
if (resolved === sourcePath) return true;
|
|
354
|
+
if (!path.posix.extname(resolved) && [".js", ".mjs", ".cjs", ".ts", ".mts", ".cts", ".tsx", ".jsx"].some((extension) => `${resolved}${extension}` === sourcePath)) return true;
|
|
355
|
+
return ["index.js", "index.mjs", "index.cjs", "index.ts", "index.mts", "index.cts", "index.tsx", "index.jsx"].some((name) => entryPath(path.posix.join(resolved, name)) === sourcePath);
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
function bindingWrittenOutsideDeclaration(code, name) {
|
|
359
|
+
const escaped = escapeRegex(name);
|
|
360
|
+
for (const mutation of code.matchAll(new RegExp(`(?<![.$a-z0-9_])${escaped}\\b\\s*(?:(?<![=!<>])=(?!=|>)|\\+\\+|--|[+*/%&|^-]=|(?:&&|\\|\\||\\?\\?)=)`, "gi"))) {
|
|
361
|
+
const prefix = code.slice(Math.max(0, mutation.index - 16), mutation.index);
|
|
362
|
+
const declaration = code.slice(mutation.index).match(new RegExp(`^${escaped}\\s*=\\s*(?:async\\s*)?(?:\\([^)]*\\)|[a-z_$][a-z0-9_$]*)\\s*=>`, "i"));
|
|
363
|
+
if (/\b(?:const|let|var)\s*$/i.test(prefix) && declaration) continue;
|
|
364
|
+
return true;
|
|
365
|
+
}
|
|
366
|
+
return new RegExp(`(?:\\+\\+|--)\\s*\\b${escaped}\\b|(?:\\{[^}\\n]{0,500}\\b${escaped}\\b[^}\\n]{0,500}\\}|\\[[^\\]\\n]{0,500}\\b${escaped}\\b[^\\]\\n]{0,500}\\])\\s*=|\\bfor(?:\\s+await)?\\s*\\(\\s*(?:${escaped}|\\{[^}\\n]{0,500}\\b${escaped}\\b[^}\\n]{0,500}\\}|\\[[^\\]\\n]{0,500}\\b${escaped}\\b[^\\]\\n]{0,500}\\])\\s+(?:of|in)\\b`, "i").test(code);
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
function sourceCallableBindingIsStable(entry, name) {
|
|
370
|
+
const code = normalizedText(sanitizeJavaScriptEvidence(entry?.text ?? entry?.evidenceText));
|
|
371
|
+
const escaped = escapeRegex(name);
|
|
372
|
+
const declarations = [
|
|
373
|
+
...code.matchAll(new RegExp(`\\b(?:async\\s+)?function\\s+${escaped}\\s*\\(`, "gi")),
|
|
374
|
+
...code.matchAll(new RegExp(`\\b(?:const|let|var)\\s+${escaped}\\s*=\\s*(?:async\\s*)?(?:\\([^)]*\\)|[a-z_$][a-z0-9_$]*)\\s*=>`, "gi"))
|
|
375
|
+
];
|
|
376
|
+
return declarations.length === 1
|
|
377
|
+
&& sourceBraceDepthAt(code, declarations[0].index) === 0
|
|
378
|
+
&& !bindingWrittenOutsideDeclaration(code, name)
|
|
379
|
+
&& !new RegExp(`\\bimport\\b[^;\\n]{0,500}\\b${escaped}\\b`, "i").test(code)
|
|
380
|
+
&& !/\b(?:eval|with)\s*\(|\bnew\s+function\s*\(/i.test(code);
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
function intrinsicErrorBindingsUntampered(code, errorNames) {
|
|
384
|
+
return errorNames.every((name) => {
|
|
385
|
+
const escaped = escapeRegex(name);
|
|
386
|
+
const literal = `__pi_error_name_${escaped}_literal__`;
|
|
387
|
+
if (/\b(?:globalthis|global)\b/i.test(code)) return false;
|
|
388
|
+
if (new RegExp(`\\b(?:function|class)\\s+${escaped}\\b|\\b(?:const|let|var)\\s+(?:${escaped}\\b|\\{[^}\\n]{0,500}\\b${escaped}\\b|\\[[^\\]\\n]{0,500}\\b${escaped}\\b)|\\bimport\\b[^;\\n]{0,500}\\b${escaped}\\b`, "i").test(code)) return false;
|
|
389
|
+
if (new RegExp(`\\bfunction\\b[^({]{0,200}\\([^)]*\\b${escaped}\\b|\\bcatch\\s*\\([^)]*\\b${escaped}\\b|(?:\\([^)]*\\b${escaped}\\b[^)]*\\)|\\b${escaped})\\s*=>`, "i").test(code)) return false;
|
|
390
|
+
if (bindingWrittenOutsideDeclaration(code, name)) return false;
|
|
391
|
+
if (new RegExp(`(?:\\{[^}\\n]{0,500}\\b${escaped}\\b[^}\\n]{0,500}\\}|\\[[^\\]\\n]{0,500}\\b${escaped}\\b[^\\]\\n]{0,500}\\])\\s*=`, "i").test(code)) return false;
|
|
392
|
+
return !new RegExp(`\\b(?:object\\s*\\.\\s*(?:assign|definepropert(?:y|ies))|reflect\\s*\\.\\s*(?:set|defineproperty))\\s*\\([^;\\n]{0,800}(?:\\b${escaped}\\b|${literal})`, "i").test(code);
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
function lexicalEvidenceIsNonReflective(code) {
|
|
397
|
+
return !/\\|__pi_(?:code_generation|module_loader)_module_literal__|\b(?:eval|createrequire)\b|\b(?:process|globalthis|global|window|self|this)\b|\.\s*constructor\b|\bfunction\s*\(|(?:=|[,([])\s*function\b(?!\s+[a-z_$][a-z0-9_$]*\s*\()/i.test(code);
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
function resolvedExportTestBindings(sourceEntries, testEntries) {
|
|
401
|
+
const entries = new Map(testEntries.map((entry) => [entryPath(entry?.path), entry]));
|
|
402
|
+
const imports = testEntries.flatMap(staticModuleBindings);
|
|
403
|
+
const resolved = [];
|
|
404
|
+
for (const sourceEntry of sourceEntries) {
|
|
405
|
+
for (const exported of sourceExports(sourceEntry)) {
|
|
406
|
+
if (!sourceCallableBindingIsStable(sourceEntry, exported.sourceName)) continue;
|
|
407
|
+
for (const binding of imports.filter((item) => importResolvesTo(item, exported.sourcePath)
|
|
408
|
+
&& (item.importName === exported.exportName || item.importName === "*"))) {
|
|
409
|
+
const testName = binding.importName === "*" ? `${binding.localName}.${exported.exportName}` : binding.localName;
|
|
410
|
+
if (importedBindingIsShadowed(entries.get(binding.testPath), testName)) continue;
|
|
411
|
+
resolved.push({ ...exported, testName, testPath: binding.testPath });
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
return resolved;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
function namedTargetBindings(sourceEntries, testEntries, namedTargets) {
|
|
419
|
+
const exports = sourceEntries.flatMap(sourceExports);
|
|
420
|
+
const imports = testEntries.flatMap(staticModuleBindings);
|
|
421
|
+
const entries = new Map(testEntries.map((entry) => [entryPath(entry.path), entry]));
|
|
422
|
+
return namedTargets.map((target) => {
|
|
423
|
+
const matches = exports.filter((item) => item.contractName === target
|
|
424
|
+
&& sourceCallableBindingIsStable(sourceEntries.find((entry) => entryPath(entry?.path) === item.sourcePath), item.sourceName));
|
|
425
|
+
if (matches.length !== 1) return { target, sourcePath: null, sourceName: null, testNames: [] };
|
|
426
|
+
const exported = matches[0];
|
|
427
|
+
const testNames = [];
|
|
428
|
+
for (const binding of imports.filter((item) => importResolvesTo(item, exported.sourcePath))) {
|
|
429
|
+
const testName = binding.importName === "*" ? `${binding.localName}.${exported.exportName}` : binding.localName;
|
|
430
|
+
if ((binding.importName === exported.exportName || binding.importName === "*")
|
|
431
|
+
&& !importedBindingIsShadowed(entries.get(binding.testPath), testName)) testNames.push(testName);
|
|
432
|
+
}
|
|
433
|
+
return { target, sourcePath: exported.sourcePath, sourceName: exported.sourceName, testNames: uniqueStrings(testNames) };
|
|
434
|
+
});
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
function formalParameterNames(parameters) {
|
|
438
|
+
const wrapped = `(${String(parameters ?? "")})`;
|
|
439
|
+
const names = [];
|
|
440
|
+
for (const raw of evidenceTopLevelArguments(wrapped, 0, wrapped.length)) {
|
|
441
|
+
const value = raw.trim().replace(/^(?:public|private|protected|readonly)\s+/, "").replace(/^\.\.\./, "");
|
|
442
|
+
const direct = value.match(/^([a-z_$][a-z0-9_$]*)\s*(?:[?:=]|$)/i);
|
|
443
|
+
if (direct) {
|
|
444
|
+
names.push(direct[1]);
|
|
445
|
+
continue;
|
|
446
|
+
}
|
|
447
|
+
const object = value.match(/^\{([^}]*)\}/)?.[1];
|
|
448
|
+
if (object) {
|
|
449
|
+
for (const item of object.split(",")) {
|
|
450
|
+
const binding = item.trim().match(/^(?:[a-z_$][a-z0-9_$]*\s*:\s*)?([a-z_$][a-z0-9_$]*)/i);
|
|
451
|
+
if (binding) names.push(binding[1]);
|
|
452
|
+
}
|
|
453
|
+
continue;
|
|
454
|
+
}
|
|
455
|
+
const array = value.match(/^\[([^\]]*)\]/)?.[1];
|
|
456
|
+
if (array) names.push(...(array.match(/[a-z_$][a-z0-9_$]*/gi) ?? []));
|
|
457
|
+
}
|
|
458
|
+
return uniqueStrings(names).map((item) => item.toLowerCase()).slice(0, 16);
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
function callableBodies(code) {
|
|
462
|
+
const bodies = new Map();
|
|
463
|
+
const addBraced = (name, parameters, open) => {
|
|
464
|
+
const end = evidenceBalancedEnd(code, open, "{", "}");
|
|
465
|
+
if (end !== -1 && !bodies.has(name)) bodies.set(name, {
|
|
466
|
+
body: code.slice(open + 1, end - 1),
|
|
467
|
+
parameters: formalParameterNames(parameters),
|
|
468
|
+
sourceCode: code
|
|
469
|
+
});
|
|
470
|
+
};
|
|
471
|
+
for (const match of code.matchAll(/\bfunction\s+([a-z_$][a-z0-9_$]*)\s*\(([^)]*)\)\s*\{/gi)) addBraced(match[1].toLowerCase(), match[2], match.index + match[0].lastIndexOf("{"));
|
|
472
|
+
for (const match of code.matchAll(/^\s*(?:async\s+)?([a-z_$][a-z0-9_$]*)\s*\(([^)]*)\)\s*\{/gim)) {
|
|
473
|
+
if (!["catch", "for", "if", "switch", "while", "with"].includes(match[1].toLowerCase())) addBraced(match[1].toLowerCase(), match[2], match.index + match[0].lastIndexOf("{"));
|
|
474
|
+
}
|
|
475
|
+
for (const match of code.matchAll(/\b(?:const|let|var)\s+([a-z_$][a-z0-9_$]*)\s*=\s*(?:async\s*)?(?:\(([^)]*)\)|([a-z_$][a-z0-9_$]*))\s*=>\s*/gi)) {
|
|
476
|
+
const start = match.index + match[0].length;
|
|
477
|
+
if (code[start] === "{") addBraced(match[1].toLowerCase(), match[2] ?? match[3], start);
|
|
478
|
+
else bodies.set(match[1].toLowerCase(), {
|
|
479
|
+
body: code.slice(start, [code.indexOf(";", start), code.indexOf("\n", start)].filter((item) => item >= 0).sort((a, b) => a - b)[0] ?? code.length),
|
|
480
|
+
parameters: formalParameterNames(match[2] ?? match[3]),
|
|
481
|
+
sourceCode: code
|
|
482
|
+
});
|
|
483
|
+
}
|
|
484
|
+
return bodies;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
function inputDerivedNames(callable) {
|
|
488
|
+
const derived = new Set(callable.parameters);
|
|
489
|
+
const declarations = [...callable.body.matchAll(/\bconst\s+([a-z_$][a-z0-9_$]*|\{[^}\n]{1,300}\}|\[[^\]\n]{1,300}\])\s*=\s*([^;\n]{1,1000})/gi)];
|
|
490
|
+
for (let pass = 0; pass < 4; pass += 1) {
|
|
491
|
+
let changed = false;
|
|
492
|
+
for (const match of declarations) {
|
|
493
|
+
const initializer = match[2];
|
|
494
|
+
if (/\b(?:process|globalthis)\b|\bimport\.meta\b|\bdate\.now\s*\(|\bmath\.random\s*\(/.test(initializer)) continue;
|
|
495
|
+
if (![...derived].some((name) => new RegExp(`\\b${escapeRegex(name)}\\b`).test(initializer))) continue;
|
|
496
|
+
const bindings = match[1].startsWith("{")
|
|
497
|
+
? match[1].slice(1, -1).split(",").map((item) => item.trim().match(/^(?:[a-z_$][a-z0-9_$]*\s*:\s*)?([a-z_$][a-z0-9_$]*)/i)?.[1])
|
|
498
|
+
: match[1].startsWith("[")
|
|
499
|
+
? (match[1].match(/[a-z_$][a-z0-9_$]*/gi) ?? [])
|
|
500
|
+
: [match[1]];
|
|
501
|
+
for (const binding of bindings.filter(Boolean)) {
|
|
502
|
+
const normalized = binding.toLowerCase();
|
|
503
|
+
if (!derived.has(normalized)) {
|
|
504
|
+
derived.add(normalized);
|
|
505
|
+
changed = true;
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
if (!changed) break;
|
|
510
|
+
}
|
|
511
|
+
return [...derived].slice(0, 24);
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
function mergeValidationProof(target, candidate) {
|
|
515
|
+
target.generic ||= candidate.generic;
|
|
516
|
+
for (const partition of candidate.partitions) target.partitions.add(partition);
|
|
517
|
+
return target;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
function positiveValidationConditionProof(condition, names, bodies, visited = new Set()) {
|
|
521
|
+
const proof = { generic: false, partitions: new Set() };
|
|
522
|
+
if (simpleConstantValue(condition) !== undefined
|
|
523
|
+
|| /\b(?:process|globalthis)\b|\bimport\.meta\b/.test(condition)) return proof;
|
|
524
|
+
for (const name of names) {
|
|
525
|
+
const escaped = escapeRegex(name);
|
|
526
|
+
if (!new RegExp(`\\b${escaped}\\b`).test(condition)) continue;
|
|
527
|
+
const integer = new RegExp(`number\\.is(integer|safeinteger)\\s*\\(\\s*${escaped}\\b`).exec(condition);
|
|
528
|
+
if (integer) {
|
|
529
|
+
proof.generic = true;
|
|
530
|
+
proof.partitions.add("fractional");
|
|
531
|
+
proof.partitions.add("non-finite");
|
|
532
|
+
if (integer[1] === "safeinteger") proof.partitions.add("unsafe-integer");
|
|
533
|
+
}
|
|
534
|
+
if (new RegExp(`number\\.isfinite\\s*\\(\\s*${escaped}\\b`).test(condition)) {
|
|
535
|
+
proof.generic = true;
|
|
536
|
+
proof.partitions.add("non-finite");
|
|
537
|
+
}
|
|
538
|
+
if (new RegExp(`array\\.isarray\\s*\\(\\s*${escaped}\\b`).test(condition)) {
|
|
539
|
+
proof.generic = true;
|
|
540
|
+
proof.partitions.add("non-array");
|
|
541
|
+
}
|
|
542
|
+
if (new RegExp(`\\b${escaped}\\b\\s*(?:>=|>)\\s*0|0\\s*(?:<=|<)\\s*\\b${escaped}\\b`).test(condition)) {
|
|
543
|
+
proof.generic = true;
|
|
544
|
+
proof.partitions.add("negative");
|
|
545
|
+
if (new RegExp(`\\b${escaped}\\b\\s*>\\s*0|0\\s*<\\s*\\b${escaped}\\b`).test(condition)) proof.partitions.add("zero");
|
|
546
|
+
}
|
|
547
|
+
if (new RegExp(`\\b${escaped}\\b\\s*!={1,2}\\s*null|null\\s*!={1,2}\\s*\\b${escaped}\\b`).test(condition)) {
|
|
548
|
+
proof.generic = true;
|
|
549
|
+
proof.partitions.add("null");
|
|
550
|
+
}
|
|
551
|
+
if (new RegExp(`\\b${escaped}\\b\\s*!={1,2}\\s*undefined|typeof\\s+${escaped}\\b\\s*!={1,2}`).test(condition)) {
|
|
552
|
+
proof.generic = true;
|
|
553
|
+
proof.partitions.add("missing");
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
for (const match of condition.matchAll(/\b([a-z_$][a-z0-9_$]*)\s*\(/gi)) {
|
|
557
|
+
const helper = match[1].toLowerCase();
|
|
558
|
+
if (!bodies.has(helper) || visited.has(helper)) continue;
|
|
559
|
+
const open = condition.indexOf("(", match.index);
|
|
560
|
+
const end = evidenceBalancedEnd(condition, open);
|
|
561
|
+
const argumentsText = end === -1 ? "" : condition.slice(open + 1, end - 1);
|
|
562
|
+
if (!names.some((name) => new RegExp(`\\b${escapeRegex(name)}\\b`).test(argumentsText))) continue;
|
|
563
|
+
mergeValidationProof(proof, predicateCallableProof(bodies, helper, new Set(visited).add(helper)));
|
|
564
|
+
}
|
|
565
|
+
return proof;
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
function predicateCallableProof(bodies, name, visited = new Set()) {
|
|
569
|
+
const callable = bodies.get(name);
|
|
570
|
+
if (!callable || visited.size > 12 || /\b(?:throw|process|globalthis)\b|\bimport\.meta\b/.test(callable.body)) {
|
|
571
|
+
return { generic: false, partitions: new Set() };
|
|
572
|
+
}
|
|
573
|
+
const returns = [...callable.body.matchAll(/\breturn\s+([^;\n]{1,1000})/gi)].map((match) => match[1]);
|
|
574
|
+
const expression = returns.length === 1
|
|
575
|
+
? returns[0]
|
|
576
|
+
: returns.length === 0 && !/[;{}]/.test(callable.body) ? callable.body.trim() : "";
|
|
577
|
+
if (!expression) return { generic: false, partitions: new Set() };
|
|
578
|
+
return positiveValidationConditionProof(expression, callable.parameters, bodies, visited);
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
function outerNegatedCondition(condition) {
|
|
582
|
+
const value = condition.trim();
|
|
583
|
+
if (!value.startsWith("!")) return "";
|
|
584
|
+
const rest = value.slice(1).trim();
|
|
585
|
+
if (rest.startsWith("(") && evidenceBalancedEnd(rest, 0) === rest.length) return rest.slice(1, -1);
|
|
586
|
+
return /^[a-z_$][a-z0-9_$]*\s*\([^)]{0,800}\)$/i.test(rest) ? rest : "";
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
function validationConditionProof(condition, names, bodies) {
|
|
590
|
+
const proof = { generic: false, partitions: new Set() };
|
|
591
|
+
if (simpleConstantValue(condition) === false
|
|
592
|
+
|| /\b(?:process|globalthis)\b|\bimport\.meta\b/.test(condition)
|
|
593
|
+
|| /(?:^|[({;&|])\s*(?:false|0|null|undefined)\s*&&/.test(condition)) return proof;
|
|
594
|
+
const positiveInner = outerNegatedCondition(condition);
|
|
595
|
+
if (positiveInner) mergeValidationProof(proof, positiveValidationConditionProof(positiveInner, names, bodies));
|
|
596
|
+
for (const name of names) {
|
|
597
|
+
const escaped = escapeRegex(name);
|
|
598
|
+
if (!new RegExp(`\\b${escaped}\\b`).test(condition)) continue;
|
|
599
|
+
const numberGuard = new RegExp(`number\\.(?:isfinite|isinteger|issafeinteger|isnan)\\s*\\(\\s*${escaped}\\b`);
|
|
600
|
+
const arrayGuard = new RegExp(`array\\.isarray\\s*\\(\\s*${escaped}\\b`);
|
|
601
|
+
const comparison = new RegExp(`(?:\\b${escaped}\\b\\s*(?:===|!==|==|!=|<=|>=|<|>)|(?:<=|>=|<|>)\\s*\\b${escaped}\\b)`);
|
|
602
|
+
const validationShape = numberGuard.test(condition)
|
|
603
|
+
|| arrayGuard.test(condition)
|
|
604
|
+
|| new RegExp(`typeof\\s+${escaped}\\b|\\b${escaped}\\b\\s+instanceof\\b|!\\s*${escaped}\\b|\\b${escaped}\\.(?:length|trim|startswith|endswith|includes|match|search)\\b|\\bstring\\s*\\(\\s*${escaped}\\s*\\)\\s*\\.(?:startswith|endswith|includes|match|search)\\b`).test(condition)
|
|
605
|
+
|| comparison.test(condition);
|
|
606
|
+
if (!validationShape) continue;
|
|
607
|
+
proof.generic = true;
|
|
608
|
+
if (new RegExp(`!\\s*number\\.is(?:safe)?integer\\s*\\(\\s*${escaped}\\b|number\\.is(?:safe)?integer\\s*\\(\\s*${escaped}[^)]*\\)\\s*(?:===|==)\\s*false|\\b${escaped}\\b\\s*%\\s*1`).test(condition)) {
|
|
609
|
+
proof.partitions.add("fractional");
|
|
610
|
+
proof.partitions.add("non-finite");
|
|
611
|
+
}
|
|
612
|
+
if (new RegExp(`!\\s*number\\.issafeinteger\\s*\\(\\s*${escaped}\\b`).test(condition)) proof.partitions.add("unsafe-integer");
|
|
613
|
+
if (new RegExp(`!\\s*number\\.isfinite\\s*\\(\\s*${escaped}\\b`).test(condition)) proof.partitions.add("non-finite");
|
|
614
|
+
if (new RegExp(`\\b${escaped}\\b\\s*(?:<\\s*[01]|<=\\s*0)|0\\s*>\\s*\\b${escaped}\\b|\\b${escaped}\\b\\s*<=\\s*-\\d|!\\s*\\(?\\s*\\b${escaped}\\b\\s*>=\\s*0`).test(condition)) proof.partitions.add("negative");
|
|
615
|
+
if (new RegExp(`\\b${escaped}\\b\\s*(?:===|==|<=)\\s*0|\\b${escaped}\\b\\s*<\\s*1|!\\s*\\b${escaped}\\b`).test(condition)) proof.partitions.add("zero");
|
|
616
|
+
if (new RegExp(`\\b${escaped}\\b\\s*(?:===|==)\\s*null|null\\s*(?:===|==)\\s*\\b${escaped}\\b|!\\s*\\b${escaped}\\b`).test(condition)) proof.partitions.add("null");
|
|
617
|
+
if (new RegExp(`\\b${escaped}\\b\\s*(?:===|==)\\s*undefined|typeof\\s+${escaped}\\b\\s*(?:===|==)|!\\s*\\b${escaped}\\b`).test(condition)) proof.partitions.add("missing");
|
|
618
|
+
if (arrayGuard.test(condition) && !new RegExp(`!\\s*array\\.isarray\\s*\\(\\s*${escaped}`).test(condition)) proof.partitions.add("array");
|
|
619
|
+
if (new RegExp(`!\\s*array\\.isarray\\s*\\(\\s*${escaped}`).test(condition)) proof.partitions.add("non-array");
|
|
620
|
+
if (new RegExp(`!\\s*\\b${escaped}\\b|\\b${escaped}\\.length\\s*(?:===|==|<=)\\s*0`).test(condition)) proof.partitions.add("empty-string");
|
|
621
|
+
if (new RegExp(`!\\s*\\b${escaped}\\.trim\\s*\\(`).test(condition)) proof.partitions.add("whitespace-string");
|
|
622
|
+
}
|
|
623
|
+
return proof;
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
function rejectionStatementProves(text, requestedErrors) {
|
|
627
|
+
return requestedErrors.length === 0
|
|
628
|
+
? /^\s*throw\s+(?:new\s+)?[a-z_$][a-z0-9_$]*(?:\s*\(|\b)/.test(text)
|
|
629
|
+
: requestedErrors.some((name) => new RegExp(`^\\s*throw\\s+(?:new\\s+)?${escapeRegex(name)}\\s*\\(`).test(text));
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
function exactHelperCall(text) {
|
|
633
|
+
let value = String(text ?? "").trim();
|
|
634
|
+
if (value.startsWith("{") && evidenceBalancedEnd(value, 0, "{", "}") === value.length) {
|
|
635
|
+
value = value.slice(1, -1).trim();
|
|
636
|
+
}
|
|
637
|
+
return value.match(/^([a-z_$][a-z0-9_$]*)\s*\(\s*\)\s*;?$/i)?.[1]?.toLowerCase();
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
function exactThrowingHelperProves(bodies, name, requestedErrors) {
|
|
641
|
+
const callable = bodies.get(name);
|
|
642
|
+
if (!callable || callable.parameters.length !== 0) return false;
|
|
643
|
+
const escaped = escapeRegex(name);
|
|
644
|
+
const declarations = [
|
|
645
|
+
...callable.sourceCode.matchAll(new RegExp(`\\b(?:async\\s+)?function\\s+${escaped}\\s*\\(`, "gi")),
|
|
646
|
+
...callable.sourceCode.matchAll(new RegExp(`\\bconst\\s+${escaped}\\s*=\\s*(?:async\\s*)?(?:\\(\\s*\\)|[a-z_$][a-z0-9_$]*)\\s*=>`, "gi"))
|
|
647
|
+
];
|
|
648
|
+
if (declarations.length !== 1 || /\basync\b/i.test(declarations[0][0])
|
|
649
|
+
|| sourceBraceDepthAt(callable.sourceCode, declarations[0].index) !== 0
|
|
650
|
+
|| new RegExp(`\\bimport\\b[^;\\n]{0,500}\\b${escaped}\\b`, "i").test(callable.sourceCode)
|
|
651
|
+
|| /\bprocess\s*\.\s*(?:exit|abort)\s*\(/i.test(callable.sourceCode)
|
|
652
|
+
|| bindingWrittenOutsideDeclaration(callable.sourceCode, name)) return false;
|
|
653
|
+
for (const mutation of callable.sourceCode.matchAll(new RegExp(`\\b${escaped}\\b\\s*(?:(?<![=!<>])=(?!=|>)|\\+\\+|--|[+*/%&|^-]=|(?:&&|\\|\\||\\?\\?)=)`, "gi"))) {
|
|
654
|
+
const prefix = callable.sourceCode.slice(Math.max(0, mutation.index - 12), mutation.index);
|
|
655
|
+
const declaration = callable.sourceCode.slice(mutation.index).match(new RegExp(`^${escaped}\\s*=\\s*(?:async\\s*)?(?:\\(\\s*\\)|[a-z_$][a-z0-9_$]*)\\s*=>`, "i"));
|
|
656
|
+
if (/\bconst\s*$/i.test(prefix) && declaration) continue;
|
|
657
|
+
return false;
|
|
658
|
+
}
|
|
659
|
+
if (new RegExp(`\\b(?:const|let|var)\\s+[a-z_$][a-z0-9_$]*\\s*=\\s*${escaped}\\b`, "i").test(callable.sourceCode)) return false;
|
|
660
|
+
|
|
661
|
+
const body = callable.body.trim();
|
|
662
|
+
const thrown = body.match(/^throw\s+(?:new\s+)?([a-z_$][a-z0-9_$]*)\s*\(\s*((?:__pi_(?:empty_string_literal|whitespace_string_literal|string_literal|error_name_[a-z]+_literal)__)?\s*)\)\s*;?$/i);
|
|
663
|
+
if (!thrown) return false;
|
|
664
|
+
const errorClass = thrown[1].toLowerCase();
|
|
665
|
+
if (new RegExp(`\\b(?:function|class|const|let|var)\\s+${escapeRegex(errorClass)}\\b|\\bimport\\b[^;\\n]{0,500}\\b${escapeRegex(errorClass)}\\b`, "i").test(callable.sourceCode)) return false;
|
|
666
|
+
if (new RegExp(`(?:\\b|\\.)${escapeRegex(errorClass)}\\b\\s*(?:(?<![=!<>])=(?!=|>)|\\+\\+|--|[+*/%&|^-]=|(?:&&|\\|\\||\\?\\?)=)`, "i").test(callable.sourceCode)) return false;
|
|
667
|
+
if (!intrinsicErrorBindingsUntampered(callable.sourceCode, [errorClass])) return false;
|
|
668
|
+
return requestedErrors.length === 0 ? ERROR_CONSTRUCTORS.includes(errorClass) : requestedErrors.includes(errorClass);
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
function helperBindingIsShadowedInCallable(callable, name) {
|
|
672
|
+
if (callable.parameters.includes(name)) return true;
|
|
673
|
+
const escaped = escapeRegex(name);
|
|
674
|
+
return new RegExp(`\\b(?:function|class|const|let|var)\\s+${escaped}\\b|\\bcatch\\s*\\([^)]*\\b${escaped}\\b`, "i").test(callable.body);
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
function exactHelperGuardProof(condition, names, bodies) {
|
|
678
|
+
// An unknown conjunct, conditional branch, comma expression, or bitwise
|
|
679
|
+
// operand can suppress a rejection even when another token looks like a
|
|
680
|
+
// valid input guard. Keep the accepted helper-call grammar deliberately
|
|
681
|
+
// narrower than arbitrary JavaScript control flow.
|
|
682
|
+
if (/&&|\?|,|(?<!\|)\|(?!\|)|(?<!&)\&(?!&)/.test(condition)) {
|
|
683
|
+
return { generic: false, partitions: new Set() };
|
|
684
|
+
}
|
|
685
|
+
return validationConditionProof(condition, names, bodies);
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
function sourceBraceDepthAt(text, offset) {
|
|
689
|
+
let depth = 0;
|
|
690
|
+
for (let index = 0; index < offset; index += 1) {
|
|
691
|
+
if (text[index] === "{") depth += 1;
|
|
692
|
+
else if (text[index] === "}") depth = Math.max(0, depth - 1);
|
|
693
|
+
}
|
|
694
|
+
return depth;
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
function priorUnconditionalExit(text, offset) {
|
|
698
|
+
for (const match of text.slice(0, offset).matchAll(/\b(?:return|throw)\b/g)) {
|
|
699
|
+
if (sourceBraceDepthAt(text, match.index) !== 0) continue;
|
|
700
|
+
const statementStart = Math.max(text.lastIndexOf(";", match.index - 1), text.lastIndexOf("}", match.index - 1)) + 1;
|
|
701
|
+
if (!text.slice(statementStart, match.index).trim()) return true;
|
|
702
|
+
}
|
|
703
|
+
return false;
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
function directSourceCall(text, offset) {
|
|
707
|
+
if (sourceBraceDepthAt(text, offset) !== 0 || priorUnconditionalExit(text, offset)) return false;
|
|
708
|
+
const statementStart = Math.max(text.lastIndexOf(";", offset - 1), text.lastIndexOf("}", offset - 1)) + 1;
|
|
709
|
+
return /^(?:await\s+)?$/.test(text.slice(statementStart, offset).trim());
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
function inputNameWrittenBefore(callable, name, offset) {
|
|
713
|
+
const prefix = callable.body.slice(0, offset);
|
|
714
|
+
const escaped = escapeRegex(name);
|
|
715
|
+
for (const match of prefix.matchAll(new RegExp(`\\b${escaped}\\b(?:\\s*(?:\\.[a-z_$][a-z0-9_$]*|\\[[^\\]]+\\]))?\\s*(?:(?<![=!<>])=(?!=|>)|\\+\\+|--|[+*/%&|^-]=)`, "gi"))) {
|
|
716
|
+
const declarationPrefix = prefix.slice(Math.max(0, match.index - 12), match.index);
|
|
717
|
+
if (/\bconst\s*$/i.test(declarationPrefix) && !/[.[]/.test(match[0].slice(name.length))) continue;
|
|
718
|
+
return true;
|
|
719
|
+
}
|
|
720
|
+
return new RegExp(`(?:\\+\\+|--)\\s*\\b${escaped}\\b`, "i").test(prefix);
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
function conditionalRejection(callable, requestedErrors, bodies) {
|
|
724
|
+
const proof = { generic: false, partitions: new Set() };
|
|
725
|
+
const names = inputDerivedNames(callable);
|
|
726
|
+
for (const match of callable.body.matchAll(/\bif\s*\(/g)) {
|
|
727
|
+
if (sourceBraceDepthAt(callable.body, match.index) !== 0 || priorUnconditionalExit(callable.body, match.index)) continue;
|
|
728
|
+
const conditionOpen = callable.body.indexOf("(", match.index);
|
|
729
|
+
const conditionEnd = evidenceBalancedEnd(callable.body, conditionOpen);
|
|
730
|
+
if (conditionEnd === -1) continue;
|
|
731
|
+
let consequentStart = conditionEnd;
|
|
732
|
+
while (/\s/.test(callable.body[consequentStart] ?? "")) consequentStart += 1;
|
|
733
|
+
const consequentEnd = callable.body[consequentStart] === "{"
|
|
734
|
+
? evidenceBalancedEnd(callable.body, consequentStart, "{", "}")
|
|
735
|
+
: (callable.body.indexOf(";", consequentStart) + 1 || callable.body.length);
|
|
736
|
+
const consequent = callable.body.slice(consequentStart, consequentEnd === -1 ? callable.body.length : consequentEnd);
|
|
737
|
+
const condition = callable.body.slice(conditionOpen + 1, conditionEnd - 1);
|
|
738
|
+
const liveNames = names.filter((name) => !inputNameWrittenBefore(callable, name, match.index));
|
|
739
|
+
if (rejectionStatementProves(consequent.replace(/^\s*\{/, ""), requestedErrors)) {
|
|
740
|
+
mergeValidationProof(proof, validationConditionProof(condition, liveNames, bodies));
|
|
741
|
+
continue;
|
|
742
|
+
}
|
|
743
|
+
const throwingHelper = exactHelperCall(consequent);
|
|
744
|
+
if (throwingHelper && !helperBindingIsShadowedInCallable(callable, throwingHelper)
|
|
745
|
+
&& exactThrowingHelperProves(bodies, throwingHelper, requestedErrors)) {
|
|
746
|
+
mergeValidationProof(proof, exactHelperGuardProof(condition, liveNames, bodies));
|
|
747
|
+
continue;
|
|
748
|
+
}
|
|
749
|
+
if (!/^\s*\{?\s*return\b/.test(consequent)) continue;
|
|
750
|
+
const following = callable.body.slice(consequentEnd === -1 ? callable.body.length : consequentEnd);
|
|
751
|
+
if (rejectionStatementProves(following, requestedErrors)) {
|
|
752
|
+
mergeValidationProof(proof, positiveValidationConditionProof(condition, liveNames, bodies));
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
return { ...proof, names };
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
function sourceCallableProof(bodies, name, requestedErrors, visited = new Set()) {
|
|
759
|
+
if (visited.has(name) || visited.size >= 12) return { generic: false, partitions: new Set() };
|
|
760
|
+
const callable = bodies.get(name);
|
|
761
|
+
if (!callable) return { generic: false, partitions: new Set() };
|
|
762
|
+
const proof = conditionalRejection(callable, requestedErrors, bodies);
|
|
763
|
+
const nextVisited = new Set(visited).add(name);
|
|
764
|
+
for (const match of callable.body.matchAll(/\b([a-z_$][a-z0-9_$]*)\s*\(/gi)) {
|
|
765
|
+
const helper = match[1].toLowerCase();
|
|
766
|
+
if (!bodies.has(helper) || !directSourceCall(callable.body, match.index)) continue;
|
|
767
|
+
const open = callable.body.indexOf("(", match.index);
|
|
768
|
+
const end = evidenceBalancedEnd(callable.body, open);
|
|
769
|
+
const argumentsText = end === -1 ? "" : callable.body.slice(open + 1, end - 1);
|
|
770
|
+
if (!proof.names.some((candidate) => !inputNameWrittenBefore(callable, candidate, match.index)
|
|
771
|
+
&& new RegExp(`\\b${escapeRegex(candidate)}\\b`).test(argumentsText))) continue;
|
|
772
|
+
const helperProof = sourceCallableProof(bodies, helper, requestedErrors, nextVisited);
|
|
773
|
+
proof.generic ||= helperProof.generic;
|
|
774
|
+
for (const partition of helperProof.partitions) proof.partitions.add(partition);
|
|
775
|
+
}
|
|
776
|
+
return proof;
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
function sourceCallableProves(bodies, name, requestedErrors, requestedPartitions) {
|
|
780
|
+
const proof = sourceCallableProof(bodies, name, requestedErrors);
|
|
781
|
+
return proof.generic && requestedPartitions.every((partition) => partitionCovered(partition, proof.partitions));
|
|
782
|
+
}
|
|
783
|
+
function evidenceCallableNames(sourceText) {
|
|
784
|
+
const names = new Set();
|
|
785
|
+
const ignored = new Set(["catch", "for", "if", "switch", "while", "with"]);
|
|
786
|
+
for (const match of sourceText.matchAll(/\bfunction\s+([a-z_$][a-z0-9_$]*)\s*\(/gi)) names.add(match[1].toLowerCase());
|
|
787
|
+
for (const match of sourceText.matchAll(/^\s*(?:async\s+)?([a-z_$][a-z0-9_$]*)\s*\([^)]*\)\s*\{/gim)) {
|
|
788
|
+
if (!ignored.has(match[1].toLowerCase())) names.add(match[1].toLowerCase());
|
|
789
|
+
}
|
|
790
|
+
for (const match of sourceText.matchAll(/\b(?:const|let|var)\s+([a-z_$][a-z0-9_$]*)\s*=\s*(?:async\s*)?(?:\([^)]*\)|[a-z_$][a-z0-9_$]*)\s*=>/gi)) names.add(match[1].toLowerCase());
|
|
791
|
+
return names;
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
function requestedInvalidPartitions(text) {
|
|
795
|
+
const invalid = normalizedText(text)
|
|
796
|
+
.split(/(?<=[.!?;])\s+|\n+/)
|
|
797
|
+
.filter((clause) => /\b(?:invalid|malformed|reject(?:s|ed|ion)?|throw(?:s|ing)?|typeerror|rangeerror|syntaxerror)\b/.test(clause))
|
|
798
|
+
.join("\n");
|
|
799
|
+
const partitions = new Set();
|
|
800
|
+
if (/\bnegative\b/.test(invalid)) partitions.add("negative");
|
|
801
|
+
if (/\bfractional\b/.test(invalid)) partitions.add("fractional");
|
|
802
|
+
if (/\bzero\b/.test(invalid)) partitions.add("zero");
|
|
803
|
+
if (/\bnull\b/.test(invalid)) partitions.add("null");
|
|
804
|
+
if (/\b(?:empty[- ]string|whitespace-only|string[^.\n]{0,80}non-whitespace)\b/.test(invalid)) partitions.add("empty-string");
|
|
805
|
+
if (/\bwhitespace-only\b/.test(invalid)) partitions.add("whitespace-string");
|
|
806
|
+
if (/\bnon-finite\b/.test(invalid)) partitions.add("non-finite");
|
|
807
|
+
if (/\bunsafe[- ]integer\b/.test(invalid)) partitions.add("unsafe-integer");
|
|
808
|
+
if (/\b(?:missing|undefined)\b/.test(invalid)) partitions.add("missing");
|
|
809
|
+
if (/\bnon-array\b/.test(invalid)) partitions.add("non-array");
|
|
810
|
+
if (/\bnon-string\b/.test(invalid)) partitions.add("non-string");
|
|
811
|
+
if (/\breject(?:s|ed|ing)?\s+(?:an?\s+)?arrays?\b|\barrays?\s+(?:values?\s+)?(?:are|is|must be)\s+(?:invalid|rejected|disallowed|not allowed)\b/.test(invalid)) partitions.add("array");
|
|
812
|
+
if (/\breject(?:s|ed|ing)?\s+(?:an?\s+)?plain[- ]objects?\b|\bplain[- ]objects?\s+(?:values?\s+)?(?:are|is|must be)\s+(?:invalid|rejected|disallowed|not allowed)\b/.test(invalid)) partitions.add("plain-object");
|
|
813
|
+
if (/\breject(?:s|ed|ing)?\s+(?:an?\s+)?primitives?\b|\bprimitives?\s+(?:values?\s+)?(?:are|is|must be)\s+(?:invalid|rejected|disallowed|not allowed)\b/.test(invalid)) partitions.add("primitive");
|
|
814
|
+
return [...partitions];
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
function moduleBindingFreeCode(entry) {
|
|
818
|
+
return normalizedText(sanitizeJavaScriptEvidence(entry?.text ?? ""))
|
|
819
|
+
.replace(/\bimport\s+[\s\S]{1,800}?\s+from\s+__pi_(?:string|node_assert_module|code_generation_module|module_loader_module)_literal__\s*;?/g, " ")
|
|
820
|
+
.replace(/\b(?:const|let|var)\s+[\s\S]{1,800}?=\s*(?:require|import)\s*\(\s*__pi_(?:string|node_assert_module|code_generation_module|module_loader_module)_literal__\s*\)(?:\s*\.\s*[a-z_$][a-z0-9_$]*)?\s*;?/g, " ");
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
function importedBindingIsShadowed(testEntry, testName) {
|
|
824
|
+
const localName = String(testName ?? "").split(".")[0];
|
|
825
|
+
if (!localName) return true;
|
|
826
|
+
const code = moduleBindingFreeCode(testEntry);
|
|
827
|
+
const escaped = escapeRegex(localName);
|
|
828
|
+
const member = String(testName).split(".")[1];
|
|
829
|
+
const reassigned = member
|
|
830
|
+
? new RegExp(`\\b${escaped}\\s*\\.\\s*${escapeRegex(member)}\\s*(?:=|\\+\\+|--|[+*/%&|^-]=)|\\bobject\\.(?:defineproperty|assign)\\s*\\(\\s*${escaped}\\b`, "i").test(code)
|
|
831
|
+
: new RegExp(`\\b${escaped}\\s*(?:=|\\+\\+|--|[+*/%&|^-]=)`, "i").test(code);
|
|
832
|
+
return reassigned || new RegExp(`\\b(?:function|class)\\s+${escaped}\\b|\\b(?:const|let|var)\\s+${escaped}\\b|\\b(?:function|catch)\\s*[^({]*\\([^)]*\\b${escaped}\\b|(?:\\(|,)\\s*${escaped}\\s*(?:[,)=:]|=>)`, "i").test(code);
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
/**
|
|
836
|
+
* Link one changed source/test pair through an exported callable, a literal
|
|
837
|
+
* static module binding, and a live rejection assertion. This pure projection
|
|
838
|
+
* is shared with repair authorization so it cannot fall back to name-only
|
|
839
|
+
* related-test matching. Ambiguous, unresolved, shadowed, skipped, or dead
|
|
840
|
+
* evidence is deliberately omitted.
|
|
841
|
+
*/
|
|
842
|
+
export function acceptanceExecutableTestBinding(input = {}) {
|
|
843
|
+
const sourceEntry = input.sourceEntry;
|
|
844
|
+
const testEntry = input.testEntry;
|
|
845
|
+
if (!sourceEntry || !testEntry || typeof sourceEntry.path !== "string" || typeof sourceEntry.text !== "string"
|
|
846
|
+
|| typeof testEntry.path !== "string" || typeof testEntry.text !== "string") {
|
|
847
|
+
return { linked: false, sourceNames: [], testNames: [] };
|
|
848
|
+
}
|
|
849
|
+
const sourceCode = normalizedText(sanitizeJavaScriptEvidence(sourceEntry.text));
|
|
850
|
+
const testCode = normalizedText(sanitizeJavaScriptEvidence(testEntry.text));
|
|
851
|
+
const bodies = callableBodies(sourceCode);
|
|
852
|
+
const imports = staticModuleBindings(testEntry);
|
|
853
|
+
const linkedSourceNames = [];
|
|
854
|
+
const linkedTestNames = [];
|
|
855
|
+
for (const exported of sourceExports(sourceEntry)) {
|
|
856
|
+
if (!bodies.has(exported.sourceName)) continue;
|
|
857
|
+
const testNames = uniqueStrings(imports
|
|
858
|
+
.filter((binding) => importResolvesTo(binding, exported.sourcePath)
|
|
859
|
+
&& (binding.importName === exported.exportName || binding.importName === "*"))
|
|
860
|
+
.map((binding) => binding.importName === "*" ? `${binding.localName}.${exported.exportName}` : binding.localName)
|
|
861
|
+
.filter((testName) => !importedBindingIsShadowed(testEntry, testName)));
|
|
862
|
+
if (testNames.length === 0) continue;
|
|
863
|
+
const assertions = executableRejectionAssertions(testCode, new Set(testNames));
|
|
864
|
+
const liveNames = testNames.filter((testName) => assertions.some((assertion) => assertion.targets.includes(testName)));
|
|
865
|
+
if (liveNames.length === 0) continue;
|
|
866
|
+
linkedSourceNames.push(exported.sourceName);
|
|
867
|
+
linkedTestNames.push(...liveNames);
|
|
868
|
+
}
|
|
869
|
+
return {
|
|
870
|
+
linked: linkedSourceNames.length > 0,
|
|
871
|
+
sourceNames: uniqueStrings(linkedSourceNames),
|
|
872
|
+
testNames: uniqueStrings(linkedTestNames)
|
|
873
|
+
};
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
function partitionCovered(partition, observed) {
|
|
877
|
+
if (observed.has(partition)) return true;
|
|
878
|
+
if (partition === "non-array") return ["null", "plain-object", "primitive"].some((item) => observed.has(item));
|
|
879
|
+
if (partition === "non-string") return ["null", "array", "plain-object", "primitive"].some((item) => observed.has(item));
|
|
880
|
+
return false;
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
/**
|
|
884
|
+
* Decide whether final-tree JS/TS evidence contains an executable rejection
|
|
885
|
+
* and executable focused assertions. The caller supplies task-derived named
|
|
886
|
+
* entrypoints; no scenario identity or verifier output text is trusted.
|
|
887
|
+
*/
|
|
888
|
+
export function acceptanceInvalidInputEvidence(input = {}) {
|
|
889
|
+
const taskText = String(input.taskText ?? "");
|
|
890
|
+
const sourceText = normalizedText(sanitizeJavaScriptEvidence(input.sourceText));
|
|
891
|
+
const testText = normalizedText(sanitizeJavaScriptEvidence(input.testText));
|
|
892
|
+
const requestedErrors = requestedErrorClasses(taskText);
|
|
893
|
+
const requestedPartitions = requestedInvalidPartitions(taskText);
|
|
894
|
+
const namedTargets = uniqueStrings(input.namedTargets).map((item) => item.toLowerCase());
|
|
895
|
+
const provenanceTargets = new Set(uniqueStrings(input.provenanceTargets).map((item) => item.toLowerCase()));
|
|
896
|
+
const sourceEntries = (Array.isArray(input.sourceEntries) ? input.sourceEntries : [])
|
|
897
|
+
.filter((entry) => entry && typeof entry.path === "string" && typeof entry.text === "string");
|
|
898
|
+
const testEntries = (Array.isArray(input.testEntries) ? input.testEntries : [])
|
|
899
|
+
.filter((entry) => entry && typeof entry.path === "string" && typeof entry.text === "string");
|
|
900
|
+
const bodyMaps = new Map(sourceEntries.map((entry) => [entryPath(entry.path), callableBodies(normalizedText(sanitizeJavaScriptEvidence(entry.text)))]));
|
|
901
|
+
if (sourceEntries.length === 0) bodyMaps.set("", callableBodies(sourceText));
|
|
902
|
+
const sourceLexicalOk = sourceEntries.length > 0 ? sourceEntries.every((entry) => lexicalEvidenceIsNonReflective(normalizedText(sanitizeJavaScriptEvidence(entry.text)))) : lexicalEvidenceIsNonReflective(sourceText);
|
|
903
|
+
const testLexicalOk = testEntries.length > 0 ? testEntries.every((entry) => lexicalEvidenceIsNonReflective(normalizedText(sanitizeJavaScriptEvidence(entry.text)))) : lexicalEvidenceIsNonReflective(testText);
|
|
904
|
+
const sourceConstructorOk = requestedErrors.length === 0 || (sourceEntries.length > 0
|
|
905
|
+
? sourceEntries.every((entry) => intrinsicErrorBindingsUntampered(normalizedText(sanitizeJavaScriptEvidence(entry.text)), requestedErrors))
|
|
906
|
+
: intrinsicErrorBindingsUntampered(sourceText, requestedErrors));
|
|
907
|
+
const testConstructorOk = requestedErrors.length === 0 || (testEntries.length > 0
|
|
908
|
+
? testEntries.every((entry) => intrinsicErrorBindingsUntampered(normalizedText(sanitizeJavaScriptEvidence(entry.text)), requestedErrors))
|
|
909
|
+
: intrinsicErrorBindingsUntampered(testText, requestedErrors));
|
|
910
|
+
|
|
911
|
+
const strictTargets = namedTargets.filter((target) => provenanceTargets.has(target));
|
|
912
|
+
const structuralTargets = namedTargets.filter((target) => !provenanceTargets.has(target));
|
|
913
|
+
const bindings = strictTargets.length > 0 ? namedTargetBindings(sourceEntries, testEntries, strictTargets) : [];
|
|
914
|
+
const inferred = namedTargets.length === 0 ? resolvedExportTestBindings(sourceEntries, testEntries) : [];
|
|
915
|
+
const inferredAssertions = inferred.flatMap((binding) => {
|
|
916
|
+
const entry = testEntries.find((candidate) => entryPath(candidate?.path) === binding.testPath);
|
|
917
|
+
if (!entry) return [];
|
|
918
|
+
const code = normalizedText(sanitizeJavaScriptEvidence(entry.text));
|
|
919
|
+
return executableRejectionAssertions(code, new Set([binding.testName]))
|
|
920
|
+
.filter((assertion) => assertion.targets.includes(binding.testName)
|
|
921
|
+
&& (requestedErrors.length === 0 || requestedErrors.some((name) => assertion.errorClasses.includes(name))))
|
|
922
|
+
.map((assertion) => ({ assertion, binding }));
|
|
923
|
+
});
|
|
924
|
+
const testCallables = new Set([...bindings.flatMap((binding) => binding.testNames), ...structuralTargets.map((target) => `*.${target}`)]);
|
|
925
|
+
const namedAssertions = namedTargets.length > 0
|
|
926
|
+
? executableRejectionAssertions(testText, testCallables).filter((assertion) => (
|
|
927
|
+
requestedErrors.length === 0 || requestedErrors.some((name) => assertion.errorClasses.includes(name))
|
|
928
|
+
))
|
|
929
|
+
: [];
|
|
930
|
+
const assertions = namedTargets.length > 0 ? namedAssertions : inferredAssertions.map((item) => item.assertion);
|
|
931
|
+
const targetOk = assertions.length > 0 && (namedTargets.length === 0 || (
|
|
932
|
+
bindings.every((binding) => binding.testNames.length > 0 && binding.testNames.some((name) => assertions.some((assertion) => assertion.targets.includes(name))))
|
|
933
|
+
&& structuralTargets.every((target) => assertions.some((assertion) => assertion.targets.includes(`*.${target}`)))
|
|
934
|
+
));
|
|
935
|
+
const sourceOk = sourceLexicalOk && sourceConstructorOk && (namedTargets.length > 0
|
|
936
|
+
? bindings.length === strictTargets.length
|
|
937
|
+
&& bindings.every((binding) => Boolean(binding.sourcePath) && Boolean(binding.sourceName) && sourceCallableProves(bodyMaps.get(binding.sourcePath) ?? new Map(), binding.sourceName, requestedErrors, requestedPartitions))
|
|
938
|
+
&& structuralTargets.every((target) => [...bodyMaps.values()].filter((bodies) => bodies.has(target)).length === 1
|
|
939
|
+
&& [...bodyMaps.values()].some((bodies) => sourceCallableProves(bodies, target, requestedErrors, requestedPartitions)))
|
|
940
|
+
: inferredAssertions.length > 0 && inferredAssertions.every(({ binding }) => (
|
|
941
|
+
sourceCallableProves(bodyMaps.get(binding.sourcePath) ?? new Map(), binding.sourceName, requestedErrors, requestedPartitions)
|
|
942
|
+
)));
|
|
943
|
+
const partitions = new Set(assertions.flatMap((assertion) => [...assertion.partitions]));
|
|
944
|
+
const partitionOk = requestedPartitions.every((partition) => partitionCovered(partition, partitions));
|
|
945
|
+
return { sourceOk, testOk: testLexicalOk && testConstructorOk && targetOk && partitionOk };
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
export function acceptanceContractProofGuidance(raw) {
|
|
949
|
+
const value = normalizedText(raw);
|
|
950
|
+
const guidance = [];
|
|
951
|
+
if (onlyUndefinedContract(raw)) guidance.push("Prove undefined falls through while null, false, 0, and empty string are each preserved at the highest-precedence position.");
|
|
952
|
+
if (/\btypeerror\b/.test(value)) guidance.push("Assert TypeError for every rejected partition named by the request; a different error class is not equivalent.");
|
|
953
|
+
const integerTargets = integerConstraintTargets(raw);
|
|
954
|
+
if (integerTargets.length > 0) guidance.push(`Reject fractional values for every integer-constrained argument (${integerTargets.join(", ")}).`);
|
|
955
|
+
const nullRejectingTargets = nullRejectingDefaultTargets(raw);
|
|
956
|
+
if (nullRejectingTargets.length > 0) guidance.push(`Prove omitted or undefined defaults separately from supplied null for: ${nullRejectingTargets.join(", ")}.`);
|
|
957
|
+
if (/\bpositive integer\b/.test(value)) guidance.push("Exercise zero and a negative value for every positive-integer constraint.");
|
|
958
|
+
if (/\bnon-negative\b/.test(value)) guidance.push("Exercise zero as valid and a negative value as invalid for every non-negative constraint.");
|
|
959
|
+
if (/\binclusive\b|\bthrough\b|\bfrom\b[^.\n]{0,80}\bto\b/.test(value)) guidance.push("Exercise both inclusive endpoints and the nearest value outside each endpoint.");
|
|
960
|
+
if (/\bround(?:ing)?\b|\bceil(?:ing)?\b|\bclamp\b/.test(value)) guidance.push("Exercise zero, exact, partial/rounding, below-minimum, and above-maximum behavior where applicable.");
|
|
961
|
+
return uniqueStrings(guidance).slice(0, 6);
|
|
962
|
+
}
|
|
963
|
+
|
|
964
|
+
export function acceptanceContractSemanticConflicts(obligation, taskText, sourceText) {
|
|
965
|
+
const normalizedTask = normalizedText(taskText);
|
|
966
|
+
const source = normalizedText(sanitizeJavaScriptEvidence(sourceText));
|
|
967
|
+
const conflicts = [];
|
|
968
|
+
if (obligation === "boundary-case" && onlyUndefinedContract(taskText) && /\?\?/.test(source)) conflicts.push("nullish-coalescing-conflicts-with-undefined-only-precedence");
|
|
969
|
+
if (source && ["boundary-case", "invalid-input-rejection"].includes(obligation)) {
|
|
970
|
+
for (const target of nullRejectingDefaultTargets(taskText, source)) conflicts.push(`nullish-default-conflicts-with-invalid-null:${target}`);
|
|
971
|
+
}
|
|
972
|
+
if (obligation === "invalid-input-rejection" && /\btypeerror\b/.test(normalizedTask) && !/\brangeerror\b/.test(normalizedTask) && /\brangeerror\b/.test(source)) {
|
|
973
|
+
conflicts.push("rangeerror-conflicts-with-requested-typeerror");
|
|
974
|
+
}
|
|
975
|
+
if (obligation === "invalid-input-rejection") {
|
|
976
|
+
const guardHelpers = integerGuardHelpers(source);
|
|
977
|
+
for (const target of integerConstraintTargets(taskText, source)) {
|
|
978
|
+
const escaped = escapeRegex(target);
|
|
979
|
+
const guardedDirectly = new RegExp(`number\\.is(?:safe)?integer\\s*\\(\\s*${escaped}\\b`).test(source);
|
|
980
|
+
const guardedByHelper = guardHelpers.some((helper) => new RegExp(`\\b${escapeRegex(helper)}\\s*\\(\\s*${escaped}\\b`).test(source));
|
|
981
|
+
if (!guardedDirectly && !guardedByHelper) conflicts.push(`missing-integer-guard:${target}`);
|
|
982
|
+
}
|
|
983
|
+
}
|
|
984
|
+
return conflicts;
|
|
985
|
+
}
|