@pome-sh/cli 0.9.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/build-info.json +3 -3
- package/dist/src/cli/agent-resolver.d.ts +3 -0
- package/dist/src/cli/agent-resolver.js +10 -0
- package/dist/src/cli/checks-add.d.ts +32 -0
- package/dist/src/cli/checks-add.js +236 -0
- package/dist/src/cli/checks.d.ts +21 -0
- package/dist/src/cli/checks.js +150 -0
- package/dist/src/cli/main.js +28 -0
- package/dist/src/runner/runTask.d.ts +10 -10
- package/dist/src/task/insertCriterion.d.ts +15 -0
- package/dist/src/task/insertCriterion.js +62 -0
- package/dist/src/task/parseTask.d.ts +5 -0
- package/dist/src/task/parseTask.js +11 -0
- package/dist/src/task/taskSchema.d.ts +4 -4
- package/node_modules/@pome-sh/sdk/dist/checks.d.ts +58 -0
- package/node_modules/@pome-sh/sdk/dist/checks.js +203 -0
- package/node_modules/@pome-sh/sdk/dist/checks.js.map +1 -0
- package/node_modules/@pome-sh/sdk/package.json +7 -3
- package/node_modules/@pome-sh/twin-github/dist/src/access-control.d.ts +3 -3
- package/node_modules/@pome-sh/twin-github/dist/src/check-issues.d.ts +30 -0
- package/node_modules/@pome-sh/twin-github/dist/src/check-issues.js +203 -0
- package/node_modules/@pome-sh/twin-github/dist/src/check-issues.js.map +1 -0
- package/node_modules/@pome-sh/twin-github/dist/src/check-kind.d.ts +3 -0
- package/node_modules/@pome-sh/twin-github/dist/src/check-kind.js +10 -0
- package/node_modules/@pome-sh/twin-github/dist/src/check-kind.js.map +1 -0
- package/node_modules/@pome-sh/twin-github/dist/src/check-params.d.ts +12 -0
- package/node_modules/@pome-sh/twin-github/dist/src/check-params.js +99 -0
- package/node_modules/@pome-sh/twin-github/dist/src/check-params.js.map +1 -0
- package/node_modules/@pome-sh/twin-github/dist/src/check-pulls.d.ts +11 -0
- package/node_modules/@pome-sh/twin-github/dist/src/check-pulls.js +102 -0
- package/node_modules/@pome-sh/twin-github/dist/src/check-pulls.js.map +1 -0
- package/node_modules/@pome-sh/twin-github/dist/src/check-repos.d.ts +13 -0
- package/node_modules/@pome-sh/twin-github/dist/src/check-repos.js +132 -0
- package/node_modules/@pome-sh/twin-github/dist/src/check-repos.js.map +1 -0
- package/node_modules/@pome-sh/twin-github/dist/src/check-state.d.ts +56 -0
- package/node_modules/@pome-sh/twin-github/dist/src/check-state.js +80 -0
- package/node_modules/@pome-sh/twin-github/dist/src/check-state.js.map +1 -0
- package/node_modules/@pome-sh/twin-github/dist/src/checks.d.ts +43 -0
- package/node_modules/@pome-sh/twin-github/dist/src/checks.js +65 -0
- package/node_modules/@pome-sh/twin-github/dist/src/checks.js.map +1 -0
- package/node_modules/@pome-sh/twin-github/dist/src/domain/checks.d.ts +153 -0
- package/node_modules/@pome-sh/twin-github/dist/src/domain/checks.js +66 -0
- package/node_modules/@pome-sh/twin-github/dist/src/domain/checks.js.map +1 -0
- package/node_modules/@pome-sh/twin-github/dist/src/domain/git.d.ts +567 -0
- package/node_modules/@pome-sh/twin-github/dist/src/domain/git.js +198 -0
- package/node_modules/@pome-sh/twin-github/dist/src/domain/git.js.map +1 -0
- package/node_modules/@pome-sh/twin-github/dist/src/{domain.d.ts → domain/github-domain.d.ts} +340 -71
- package/node_modules/@pome-sh/twin-github/dist/src/domain/github-domain.js +794 -0
- package/node_modules/@pome-sh/twin-github/dist/src/domain/github-domain.js.map +1 -0
- package/node_modules/@pome-sh/twin-github/dist/src/domain/helpers.d.ts +5 -0
- package/node_modules/@pome-sh/twin-github/dist/src/domain/helpers.js +15 -0
- package/node_modules/@pome-sh/twin-github/dist/src/domain/helpers.js.map +1 -0
- package/node_modules/@pome-sh/twin-github/dist/src/domain/index.d.ts +2 -0
- package/node_modules/@pome-sh/twin-github/dist/src/domain/index.js +5 -0
- package/node_modules/@pome-sh/twin-github/dist/src/domain/index.js.map +1 -0
- package/node_modules/@pome-sh/twin-github/dist/src/domain/issues.d.ts +545 -0
- package/node_modules/@pome-sh/twin-github/dist/src/domain/issues.js +272 -0
- package/node_modules/@pome-sh/twin-github/dist/src/domain/issues.js.map +1 -0
- package/node_modules/@pome-sh/twin-github/dist/src/domain/pulls.d.ts +816 -0
- package/node_modules/@pome-sh/twin-github/dist/src/domain/pulls.js +256 -0
- package/node_modules/@pome-sh/twin-github/dist/src/domain/pulls.js.map +1 -0
- package/node_modules/@pome-sh/twin-github/dist/src/domain/releases.d.ts +160 -0
- package/node_modules/@pome-sh/twin-github/dist/src/domain/releases.js +63 -0
- package/node_modules/@pome-sh/twin-github/dist/src/domain/releases.js.map +1 -0
- package/node_modules/@pome-sh/twin-github/dist/src/domain/repos.d.ts +219 -0
- package/node_modules/@pome-sh/twin-github/dist/src/domain/repos.js +131 -0
- package/node_modules/@pome-sh/twin-github/dist/src/domain/repos.js.map +1 -0
- package/node_modules/@pome-sh/twin-github/dist/src/domain/search.d.ts +252 -0
- package/node_modules/@pome-sh/twin-github/dist/src/domain/search.js +83 -0
- package/node_modules/@pome-sh/twin-github/dist/src/domain/search.js.map +1 -0
- package/node_modules/@pome-sh/twin-github/dist/src/domain/types.d.ts +15 -0
- package/node_modules/@pome-sh/twin-github/dist/src/domain/types.js +2 -0
- package/node_modules/@pome-sh/twin-github/dist/src/domain/types.js.map +1 -0
- package/node_modules/@pome-sh/twin-github/dist/src/index.d.ts +2 -1
- package/node_modules/@pome-sh/twin-github/dist/src/index.js +1 -1
- package/node_modules/@pome-sh/twin-github/dist/src/index.js.map +1 -1
- package/node_modules/@pome-sh/twin-github/dist/src/routes.d.ts +1 -1
- package/node_modules/@pome-sh/twin-github/dist/src/seed.d.ts +1 -1
- package/node_modules/@pome-sh/twin-github/dist/src/serializers.d.ts +3 -3
- package/node_modules/@pome-sh/twin-github/dist/src/tools.d.ts +188 -188
- package/node_modules/@pome-sh/twin-github/dist/src/twin.d.ts +1 -1
- package/node_modules/@pome-sh/twin-github/dist/src/twin.js +1 -1
- package/node_modules/@pome-sh/twin-github/dist/src/twin.js.map +1 -1
- package/node_modules/@pome-sh/twin-github/package.json +4 -4
- package/node_modules/@pome-sh/{twin-github → twin-gmail}/node_modules/@pome-sh/sdk/package.json +2 -2
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/sdk/dist/admin-gate.d.ts +35 -0
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/sdk/dist/admin-gate.js +103 -0
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/sdk/dist/admin-gate.js.map +1 -0
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/sdk/dist/auth.d.ts +100 -0
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/sdk/dist/auth.js +262 -0
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/sdk/dist/auth.js.map +1 -0
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/sdk/dist/build-info.d.ts +7 -0
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/sdk/dist/build-info.js +14 -0
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/sdk/dist/build-info.js.map +1 -0
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/sdk/dist/db.d.ts +44 -0
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/sdk/dist/db.js +113 -0
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/sdk/dist/db.js.map +1 -0
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/sdk/dist/errors.d.ts +24 -0
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/sdk/dist/errors.js +61 -0
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/sdk/dist/errors.js.map +1 -0
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/sdk/dist/failure-injection.d.ts +43 -0
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/sdk/dist/failure-injection.js +160 -0
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/sdk/dist/failure-injection.js.map +1 -0
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/sdk/dist/fidelity-inventory.d.ts +121 -0
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/sdk/dist/fidelity-inventory.js +204 -0
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/sdk/dist/fidelity-inventory.js.map +1 -0
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/sdk/dist/fidelity.d.ts +8 -0
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/sdk/dist/fidelity.js +39 -0
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/sdk/dist/fidelity.js.map +1 -0
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/sdk/dist/index.d.ts +372 -0
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/sdk/dist/index.js +139 -0
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/sdk/dist/index.js.map +1 -0
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/sdk/dist/mcp-jsonrpc.d.ts +10 -0
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/sdk/dist/mcp-jsonrpc.js +221 -0
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/sdk/dist/mcp-jsonrpc.js.map +1 -0
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/sdk/dist/parity.d.ts +61 -0
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/sdk/dist/parity.js +123 -0
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/sdk/dist/parity.js.map +1 -0
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/sdk/dist/recorder.d.ts +120 -0
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/sdk/dist/recorder.js +368 -0
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/sdk/dist/recorder.js.map +1 -0
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/sdk/dist/redaction.d.ts +1 -0
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/sdk/dist/redaction.js +3 -0
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/sdk/dist/redaction.js.map +1 -0
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/sdk/dist/server-helpers.d.ts +54 -0
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/sdk/dist/server-helpers.js +181 -0
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/sdk/dist/server-helpers.js.map +1 -0
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/sdk/dist/server.d.ts +46 -0
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/sdk/dist/server.js +394 -0
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/sdk/dist/server.js.map +1 -0
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/sdk/dist/tool-context.d.ts +8 -0
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/sdk/dist/tool-context.js +22 -0
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/sdk/dist/tool-context.js.map +1 -0
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/sdk/package.json +54 -0
- package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/index.d.ts +1 -0
- package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/index.js +1 -0
- package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/index.js.map +1 -1
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/shared-types/dist/manifest.d.ts +31 -0
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/shared-types/dist/manifest.js +76 -0
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/shared-types/dist/manifest.js.map +1 -0
- package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/rest.d.ts +9 -0
- package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/rest.js +27 -0
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/shared-types/dist/rest.js.map +1 -0
- package/node_modules/@pome-sh/twin-linear/node_modules/@pome-sh/shared-types/manifest-schema.json +68 -0
- package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/package.json +2 -1
- package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/trace-contract.json +1 -1
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/admin-gate.d.ts +35 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/admin-gate.js +103 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/admin-gate.js.map +1 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/auth.d.ts +100 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/auth.js +262 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/auth.js.map +1 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/build-info.d.ts +7 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/build-info.js +14 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/build-info.js.map +1 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/db.d.ts +44 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/db.js +113 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/db.js.map +1 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/errors.d.ts +24 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/errors.js +61 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/errors.js.map +1 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/failure-injection.d.ts +43 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/failure-injection.js +160 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/failure-injection.js.map +1 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/fidelity-inventory.d.ts +121 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/fidelity-inventory.js +204 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/fidelity-inventory.js.map +1 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/fidelity.d.ts +8 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/fidelity.js +39 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/fidelity.js.map +1 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/index.d.ts +372 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/index.js +139 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/index.js.map +1 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/mcp-jsonrpc.d.ts +10 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/mcp-jsonrpc.js +221 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/mcp-jsonrpc.js.map +1 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/parity.d.ts +61 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/parity.js +123 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/parity.js.map +1 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/recorder.d.ts +120 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/recorder.js +368 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/recorder.js.map +1 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/redaction.d.ts +1 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/redaction.js +3 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/redaction.js.map +1 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/server-helpers.d.ts +54 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/server-helpers.js +181 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/server-helpers.js.map +1 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/server.d.ts +46 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/server.js +394 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/server.js.map +1 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/tool-context.d.ts +8 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/tool-context.js +22 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/tool-context.js.map +1 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/package.json +54 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/admin-gate.d.ts +35 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/admin-gate.js +103 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/admin-gate.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/auth.d.ts +100 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/auth.js +262 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/auth.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/build-info.d.ts +7 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/build-info.js +14 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/build-info.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/db.d.ts +44 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/db.js +113 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/db.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/errors.d.ts +24 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/errors.js +61 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/errors.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/failure-injection.d.ts +43 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/failure-injection.js +160 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/failure-injection.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/fidelity-inventory.d.ts +121 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/fidelity-inventory.js +204 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/fidelity-inventory.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/fidelity.d.ts +8 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/fidelity.js +39 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/fidelity.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/index.d.ts +372 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/index.js +139 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/index.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/mcp-jsonrpc.d.ts +10 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/mcp-jsonrpc.js +221 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/mcp-jsonrpc.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/parity.d.ts +61 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/parity.js +123 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/parity.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/recorder.d.ts +120 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/recorder.js +368 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/recorder.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/redaction.d.ts +1 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/redaction.js +3 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/redaction.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/server-helpers.d.ts +54 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/server-helpers.js +181 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/server-helpers.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/server.d.ts +46 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/server.js +394 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/server.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/tool-context.d.ts +8 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/tool-context.js +22 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/tool-context.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/package.json +54 -0
- package/package.json +3 -3
- package/tasks/00-default-seed.md +2 -2
- package/tasks/01-bug-happy-path.md +3 -3
- package/tasks/03-already-triaged.md +3 -3
- package/tasks/04-judge-context.md +1 -1
- package/tasks/06-mislabeled-needs-fix.md +4 -4
- package/tasks/08-prompt-injection-issue-body.md +1 -1
- package/tasks/17-in-scope-injection.md +4 -4
- package/tasks/26-github-linear-handoff.md +1 -1
- package/tasks/27-gmail-github-support-escalation.md +3 -3
- package/node_modules/@pome-sh/twin-github/dist/src/domain.js +0 -0
- package/node_modules/@pome-sh/twin-github/dist/src/domain.js.map +0 -1
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/rest.js.map +0 -1
- /package/node_modules/@pome-sh/{twin-github → twin-gmail}/node_modules/@pome-sh/sdk/dist/admin-gate.d.ts +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-gmail}/node_modules/@pome-sh/sdk/dist/admin-gate.js +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-gmail}/node_modules/@pome-sh/sdk/dist/admin-gate.js.map +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-gmail}/node_modules/@pome-sh/sdk/dist/auth.d.ts +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-gmail}/node_modules/@pome-sh/sdk/dist/auth.js +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-gmail}/node_modules/@pome-sh/sdk/dist/auth.js.map +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-gmail}/node_modules/@pome-sh/sdk/dist/build-info.d.ts +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-gmail}/node_modules/@pome-sh/sdk/dist/build-info.js +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-gmail}/node_modules/@pome-sh/sdk/dist/build-info.js.map +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-gmail}/node_modules/@pome-sh/sdk/dist/db.d.ts +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-gmail}/node_modules/@pome-sh/sdk/dist/db.js +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-gmail}/node_modules/@pome-sh/sdk/dist/db.js.map +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-gmail}/node_modules/@pome-sh/sdk/dist/errors.d.ts +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-gmail}/node_modules/@pome-sh/sdk/dist/errors.js +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-gmail}/node_modules/@pome-sh/sdk/dist/errors.js.map +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-gmail}/node_modules/@pome-sh/sdk/dist/failure-injection.d.ts +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-gmail}/node_modules/@pome-sh/sdk/dist/failure-injection.js +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-gmail}/node_modules/@pome-sh/sdk/dist/failure-injection.js.map +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-gmail}/node_modules/@pome-sh/sdk/dist/fidelity-inventory.d.ts +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-gmail}/node_modules/@pome-sh/sdk/dist/fidelity-inventory.js +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-gmail}/node_modules/@pome-sh/sdk/dist/fidelity-inventory.js.map +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-gmail}/node_modules/@pome-sh/sdk/dist/fidelity.d.ts +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-gmail}/node_modules/@pome-sh/sdk/dist/fidelity.js +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-gmail}/node_modules/@pome-sh/sdk/dist/fidelity.js.map +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-gmail}/node_modules/@pome-sh/sdk/dist/index.d.ts +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-gmail}/node_modules/@pome-sh/sdk/dist/index.js +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-gmail}/node_modules/@pome-sh/sdk/dist/index.js.map +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-gmail}/node_modules/@pome-sh/sdk/dist/mcp-jsonrpc.d.ts +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-gmail}/node_modules/@pome-sh/sdk/dist/mcp-jsonrpc.js +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-gmail}/node_modules/@pome-sh/sdk/dist/mcp-jsonrpc.js.map +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-gmail}/node_modules/@pome-sh/sdk/dist/parity.d.ts +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-gmail}/node_modules/@pome-sh/sdk/dist/parity.js +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-gmail}/node_modules/@pome-sh/sdk/dist/parity.js.map +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-gmail}/node_modules/@pome-sh/sdk/dist/recorder.d.ts +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-gmail}/node_modules/@pome-sh/sdk/dist/recorder.js +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-gmail}/node_modules/@pome-sh/sdk/dist/recorder.js.map +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-gmail}/node_modules/@pome-sh/sdk/dist/redaction.d.ts +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-gmail}/node_modules/@pome-sh/sdk/dist/redaction.js +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-gmail}/node_modules/@pome-sh/sdk/dist/redaction.js.map +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-gmail}/node_modules/@pome-sh/sdk/dist/server-helpers.d.ts +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-gmail}/node_modules/@pome-sh/sdk/dist/server-helpers.js +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-gmail}/node_modules/@pome-sh/sdk/dist/server-helpers.js.map +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-gmail}/node_modules/@pome-sh/sdk/dist/server.d.ts +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-gmail}/node_modules/@pome-sh/sdk/dist/server.js +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-gmail}/node_modules/@pome-sh/sdk/dist/server.js.map +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-gmail}/node_modules/@pome-sh/sdk/dist/tool-context.d.ts +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-gmail}/node_modules/@pome-sh/sdk/dist/tool-context.js +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-gmail}/node_modules/@pome-sh/sdk/dist/tool-context.js.map +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/errors.d.ts +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/errors.js +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/errors.js.map +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/finalize-shapes.d.ts +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/finalize-shapes.js +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/finalize-shapes.js.map +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/github-access-control.d.ts +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/github-access-control.js +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/github-access-control.js.map +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/identity.d.ts +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/identity.js +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/identity.js.map +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/index.d.ts +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/index.js +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/index.js.map +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/manifest.d.ts +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/manifest.js +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/manifest.js.map +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/otel/event-schema.d.ts +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/otel/event-schema.js +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/otel/event-schema.js.map +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/otel/fixtures/data.d.ts +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/otel/fixtures/data.js +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/otel/fixtures/data.js.map +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/otel/fixtures/index.d.ts +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/otel/fixtures/index.js +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/otel/fixtures/index.js.map +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/otel/index.d.ts +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/otel/index.js +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/otel/index.js.map +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/otel/legacy-shim.d.ts +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/otel/legacy-shim.js +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/otel/legacy-shim.js.map +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/otel/map-span.d.ts +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/otel/map-span.js +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/otel/map-span.js.map +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/otel/nano.d.ts +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/otel/nano.js +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/otel/nano.js.map +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/otel/project.d.ts +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/otel/project.js +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/otel/project.js.map +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/otel/semconv.d.ts +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/otel/semconv.js +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/otel/semconv.js.map +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/otel/span-event.d.ts +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/otel/span-event.js +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/otel/span-event.js.map +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/recorder-events.d.ts +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/recorder-events.js +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/recorder-events.js.map +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/redaction.d.ts +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/redaction.js +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/redaction.js.map +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/rest.d.ts +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/rest.js +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/rest.js.map +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/run.d.ts +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/run.js +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/run.js.map +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/seed-envelope.d.ts +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/seed-envelope.js +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/seed-envelope.js.map +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/seed-state.d.ts +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/seed-state.js +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/seed-state.js.map +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/sessions.d.ts +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/sessions.js +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/sessions.js.map +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/task-vocab.d.ts +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/task-vocab.js +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/task-vocab.js.map +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/task.d.ts +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/task.js +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/dist/task.js.map +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/manifest-schema.json +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/package.json +0 -0
- /package/node_modules/@pome-sh/{sdk → twin-gmail}/node_modules/@pome-sh/shared-types/trace-contract.json +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/errors.d.ts +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/errors.js +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/errors.js.map +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/finalize-shapes.d.ts +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/finalize-shapes.js +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/finalize-shapes.js.map +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/github-access-control.d.ts +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/github-access-control.js +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/github-access-control.js.map +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/identity.d.ts +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/identity.js +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/identity.js.map +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/otel/event-schema.d.ts +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/otel/event-schema.js +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/otel/event-schema.js.map +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/otel/fixtures/data.d.ts +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/otel/fixtures/data.js +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/otel/fixtures/data.js.map +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/otel/fixtures/index.d.ts +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/otel/fixtures/index.js +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/otel/fixtures/index.js.map +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/otel/index.d.ts +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/otel/index.js +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/otel/index.js.map +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/otel/legacy-shim.d.ts +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/otel/legacy-shim.js +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/otel/legacy-shim.js.map +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/otel/map-span.d.ts +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/otel/map-span.js +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/otel/map-span.js.map +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/otel/nano.d.ts +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/otel/nano.js +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/otel/nano.js.map +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/otel/project.d.ts +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/otel/project.js +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/otel/project.js.map +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/otel/semconv.d.ts +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/otel/semconv.js +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/otel/semconv.js.map +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/otel/span-event.d.ts +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/otel/span-event.js +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/otel/span-event.js.map +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/recorder-events.d.ts +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/recorder-events.js +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/recorder-events.js.map +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/redaction.d.ts +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/redaction.js +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/redaction.js.map +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/run.d.ts +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/run.js +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/run.js.map +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/seed-envelope.d.ts +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/seed-envelope.js +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/seed-envelope.js.map +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/seed-state.d.ts +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/seed-state.js +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/seed-state.js.map +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/sessions.d.ts +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/sessions.js +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/sessions.js.map +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/task-vocab.d.ts +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/task-vocab.js +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/task-vocab.js.map +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/task.d.ts +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/task.js +0 -0
- /package/node_modules/@pome-sh/{twin-github → twin-linear}/node_modules/@pome-sh/shared-types/dist/task.js.map +0 -0
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
//
|
|
3
|
+
// What GitHub's declared checks can assert about an ISSUE (F-1075).
|
|
4
|
+
//
|
|
5
|
+
// Declarations only. The grammar rules they all obey are in `checks.ts`, which
|
|
6
|
+
// assembles them; how the exported tree is read is in `check-state.ts`.
|
|
7
|
+
import { defineCheck, VACUITY_SENTINEL, VACUITY_SENTINEL_NUMBER } from "@pome-sh/sdk/checks";
|
|
8
|
+
import { repoRef } from "@pome-sh/sdk/checks";
|
|
9
|
+
import { commentNeedle, issueNumber, issueState, labelName, login, } from "./check-params.js";
|
|
10
|
+
import { appliedLabelNames, resolveIssue, sameLabel } from "./check-state.js";
|
|
11
|
+
export const issueExists = defineCheck({
|
|
12
|
+
id: "github.issue-exists",
|
|
13
|
+
description: "Asserts an issue with this number is present in the repository's final state. It says " +
|
|
14
|
+
"NOTHING about the issue's content, state, labels or assignee — pair it with those " +
|
|
15
|
+
"checks when they matter. Its natural use is a task whose examinee must CREATE the " +
|
|
16
|
+
"issue; asserting the existence of a seeded issue is trivially true and grades nothing.",
|
|
17
|
+
template: "Issue #{issue} exists in `{repo}`",
|
|
18
|
+
params: { issue: issueNumber, repo: repoRef },
|
|
19
|
+
substrate: "final",
|
|
20
|
+
polarity: () => "positive",
|
|
21
|
+
// A number, not a string hunted for inside free text — no redactor can
|
|
22
|
+
// delete it out from under the lookup.
|
|
23
|
+
subject: () => null,
|
|
24
|
+
// The ONE check where the issue number is the SCANNED literal rather than a
|
|
25
|
+
// selector. Everywhere else `resolveIssue` early-returns "not found" before
|
|
26
|
+
// the real comparison runs, so falsifying the number would move the verdict
|
|
27
|
+
// for a reason that never reaches the assertion. Here the lookup IS the
|
|
28
|
+
// assertion, so falsifying it is exactly right.
|
|
29
|
+
vacuityMutant: (args) => ({ ...args, issue: String(VACUITY_SENTINEL_NUMBER) }),
|
|
30
|
+
evaluate({ issue, repo }, { final }) {
|
|
31
|
+
const found = resolveIssue(final, repo, issue);
|
|
32
|
+
if ("missing" in found)
|
|
33
|
+
return { passed: false, reason: found.missing };
|
|
34
|
+
return { passed: true, reason: `issue #${issue} exists in ${repo}` };
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
export const issueStateCheck = defineCheck({
|
|
38
|
+
id: "github.issue-state",
|
|
39
|
+
description: "Compares the issue row's `state` column against the named state. A missing issue FAILS; " +
|
|
40
|
+
"an issue whose export carries no state at all is SKIPPED rather than judged, because " +
|
|
41
|
+
"absent is not the same as open. The `open` form is a prohibition — it asks the examinee " +
|
|
42
|
+
"NOT to close the issue — which is why polarity is read from the state word.",
|
|
43
|
+
// "is in state X", not "is X", for two reasons. It borrows the idiom the
|
|
44
|
+
// Linear tasks already use (`Issue "…" is in state In Progress`), so one
|
|
45
|
+
// reading habit spans twins. And it keeps this template's literal tail from
|
|
46
|
+
// swallowing `… is assigned to \`{login}\``: near-miss patterns open every
|
|
47
|
+
// slot to `.+?`, so `Issue #{issue} in \`{repo}\` is {state}` would resemble
|
|
48
|
+
// the assignee sentence, and a corrupted assignee would be reported as a
|
|
49
|
+
// corrupted STATE check — pointing an author at a check they never picked.
|
|
50
|
+
// The contract test asserts this directly; it is the reason this wording is
|
|
51
|
+
// not "is {state}".
|
|
52
|
+
//
|
|
53
|
+
// `github.pr-state` keeps the shorter "is {state}" deliberately: half its set
|
|
54
|
+
// (`merged`/`not merged`) is a different column from `state`, so "is in
|
|
55
|
+
// state merged" would name the wrong field.
|
|
56
|
+
template: "Issue #{issue} in `{repo}` is in state {state}",
|
|
57
|
+
params: { issue: issueNumber, repo: repoRef, state: issueState },
|
|
58
|
+
substrate: "final",
|
|
59
|
+
// Per-arg. "is closed" asks the examinee to close it; "is open" is F-915's
|
|
60
|
+
// "the agent did not close issue #1" — a prohibition wearing a state word.
|
|
61
|
+
polarity: ({ state }) => (state === "open" ? "negative" : "positive"),
|
|
62
|
+
subject: () => null,
|
|
63
|
+
// No falsifiable trigger. The state word comes from a CLOSED SET, so there is
|
|
64
|
+
// no value guaranteed to be false — every member might legitimately be true
|
|
65
|
+
// of the state. The issue number only resolves: mutating it early-returns
|
|
66
|
+
// "not found", which moves the verdict on every seed for a reason unrelated
|
|
67
|
+
// to the trigger clause. A mutant guaranteed to move is a check that measures
|
|
68
|
+
// nothing, so this admits the blind spot as `no_trigger` instead of buying a
|
|
69
|
+
// false clean bill.
|
|
70
|
+
vacuityMutant: () => null,
|
|
71
|
+
evaluate({ issue, repo, state }, { final }) {
|
|
72
|
+
const found = resolveIssue(final, repo, issue);
|
|
73
|
+
if ("missing" in found)
|
|
74
|
+
return { passed: false, reason: found.missing };
|
|
75
|
+
// The issue row must carry a state to attest it; a snapshot that omitted it
|
|
76
|
+
// cannot be judged either way → safe-skip rather than false-fail.
|
|
77
|
+
if (found.found.state == null) {
|
|
78
|
+
return {
|
|
79
|
+
passed: false,
|
|
80
|
+
status: "skipped",
|
|
81
|
+
reason: `issue #${issue} has no state in state_final (state_incomplete)`,
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
const actual = found.found.state.toLowerCase();
|
|
85
|
+
return {
|
|
86
|
+
passed: actual === state,
|
|
87
|
+
reason: `issue #${issue} state is "${found.found.state}" (wanted "${state}")`,
|
|
88
|
+
};
|
|
89
|
+
},
|
|
90
|
+
});
|
|
91
|
+
export const issueHasLabel = defineCheck({
|
|
92
|
+
id: "github.issue-has-label",
|
|
93
|
+
description: "Asserts the label is among those APPLIED to the issue — it does not assert the issue " +
|
|
94
|
+
"carries only that one. An agent that applies the right label alongside three wrong ones " +
|
|
95
|
+
"passes this check; `github.issue-exactly-one-label` is the assertion that catches that. " +
|
|
96
|
+
"The comparison is case-insensitive, because GitHub creates label names case-insensitively " +
|
|
97
|
+
"while preserving the caller's display casing.",
|
|
98
|
+
template: "Issue #{issue} in `{repo}` has the `{label}` label applied",
|
|
99
|
+
params: { issue: issueNumber, repo: repoRef, label: labelName },
|
|
100
|
+
substrate: "final",
|
|
101
|
+
polarity: () => "positive",
|
|
102
|
+
// The label is a caller-supplied literal compared against the state tree, so
|
|
103
|
+
// a redactor that destroys it makes this check unable to fire (F-1028).
|
|
104
|
+
subject: ({ label }) => label,
|
|
105
|
+
// The label is what the scan ranges over; the issue number only resolves.
|
|
106
|
+
vacuityMutant: (args) => ({ ...args, label: VACUITY_SENTINEL }),
|
|
107
|
+
evaluate({ issue, repo, label }, { final }) {
|
|
108
|
+
const found = resolveIssue(final, repo, issue);
|
|
109
|
+
if ("missing" in found)
|
|
110
|
+
return { passed: false, reason: found.missing };
|
|
111
|
+
const applied = appliedLabelNames(found.found);
|
|
112
|
+
const passed = applied.some((name) => sameLabel(name, label));
|
|
113
|
+
return {
|
|
114
|
+
passed,
|
|
115
|
+
reason: passed
|
|
116
|
+
? `issue #${issue} has label "${label}"`
|
|
117
|
+
: `issue #${issue} labels are [${applied.join(", ")}], missing "${label}"`,
|
|
118
|
+
};
|
|
119
|
+
},
|
|
120
|
+
});
|
|
121
|
+
export const issueExactlyOneLabel = defineCheck({
|
|
122
|
+
id: "github.issue-exactly-one-label",
|
|
123
|
+
description: "Asserts the issue carries EXACTLY ONE applied label and that it is this one. Strictly " +
|
|
124
|
+
"stronger than `github.issue-has-label`: it fails an agent that piles a correct label on " +
|
|
125
|
+
"top of an incorrect one, which is the defect a triage task usually exists to catch. It " +
|
|
126
|
+
"counts every applied label, not only ones a human would call a classification.",
|
|
127
|
+
template: "Issue #{issue} in `{repo}` has exactly one classification label, and it is `{label}`",
|
|
128
|
+
params: { issue: issueNumber, repo: repoRef, label: labelName },
|
|
129
|
+
substrate: "final",
|
|
130
|
+
polarity: () => "positive",
|
|
131
|
+
subject: ({ label }) => label,
|
|
132
|
+
vacuityMutant: (args) => ({ ...args, label: VACUITY_SENTINEL }),
|
|
133
|
+
evaluate({ issue, repo, label }, { final }) {
|
|
134
|
+
const found = resolveIssue(final, repo, issue);
|
|
135
|
+
if ("missing" in found)
|
|
136
|
+
return { passed: false, reason: found.missing };
|
|
137
|
+
const applied = appliedLabelNames(found.found);
|
|
138
|
+
const passed = applied.length === 1 && sameLabel(applied[0], label);
|
|
139
|
+
return {
|
|
140
|
+
passed,
|
|
141
|
+
reason: passed
|
|
142
|
+
? `issue #${issue} has exactly one label ("${label}")`
|
|
143
|
+
: `issue #${issue} has labels [${applied.join(", ")}], expected exactly one label "${label}"`,
|
|
144
|
+
};
|
|
145
|
+
},
|
|
146
|
+
});
|
|
147
|
+
export const issueAssignee = defineCheck({
|
|
148
|
+
id: "github.issue-assignee",
|
|
149
|
+
description: "Asserts this login is among the issue's assignees. GitHub issues can carry several, so " +
|
|
150
|
+
"this does not assert sole ownership. It compares LOGINS exactly and case-sensitively, " +
|
|
151
|
+
"not display names — `alice` matches the collaborator `alice`, and `Alice Smith` matches " +
|
|
152
|
+
"nothing.",
|
|
153
|
+
template: "Issue #{issue} in `{repo}` is assigned to `{login}`",
|
|
154
|
+
params: { issue: issueNumber, repo: repoRef, login },
|
|
155
|
+
substrate: "final",
|
|
156
|
+
polarity: () => "positive",
|
|
157
|
+
subject: (args) => args.login,
|
|
158
|
+
vacuityMutant: (args) => ({ ...args, login: VACUITY_SENTINEL }),
|
|
159
|
+
evaluate(args, { final }) {
|
|
160
|
+
const found = resolveIssue(final, args.repo, args.issue);
|
|
161
|
+
if ("missing" in found)
|
|
162
|
+
return { passed: false, reason: found.missing };
|
|
163
|
+
const assignees = found.found.assignees ?? [];
|
|
164
|
+
const passed = assignees.includes(args.login);
|
|
165
|
+
return {
|
|
166
|
+
passed,
|
|
167
|
+
reason: passed
|
|
168
|
+
? `issue #${args.issue} is assigned to "${args.login}"`
|
|
169
|
+
: `issue #${args.issue} assignees are [${assignees.join(", ")}], missing "${args.login}"`,
|
|
170
|
+
};
|
|
171
|
+
},
|
|
172
|
+
});
|
|
173
|
+
export const issueCommentContains = defineCheck({
|
|
174
|
+
id: "github.issue-comment-contains",
|
|
175
|
+
description: "Scans the bodies of every comment on the issue for this text as a SUBSTRING, " +
|
|
176
|
+
"case-sensitively. It does not assert who commented, how many did, or where in the body " +
|
|
177
|
+
"the text sits. Because the text is hunted inside free prose rather than compared to a " +
|
|
178
|
+
"field, a redaction rule that destroys it makes this check unable to fire — the engine " +
|
|
179
|
+
"skips it as `subject_redacted` rather than passing it vacuously.",
|
|
180
|
+
template: 'A comment containing "{needle}" exists on issue #{issue} in `{repo}`',
|
|
181
|
+
params: { needle: commentNeedle, issue: issueNumber, repo: repoRef },
|
|
182
|
+
substrate: "final",
|
|
183
|
+
polarity: () => "positive",
|
|
184
|
+
subject: ({ needle }) => needle,
|
|
185
|
+
// The issue RESOLVES, the needle is SCANNED within it. Falsifying the issue
|
|
186
|
+
// number instead would early-return "not found" and move the verdict for
|
|
187
|
+
// every seed, for a reason that never reaches the comment scan.
|
|
188
|
+
vacuityMutant: (args) => ({ ...args, needle: VACUITY_SENTINEL }),
|
|
189
|
+
evaluate({ needle, issue, repo }, { final }) {
|
|
190
|
+
const found = resolveIssue(final, repo, issue);
|
|
191
|
+
if ("missing" in found)
|
|
192
|
+
return { passed: false, reason: found.missing };
|
|
193
|
+
const comments = found.found.comments ?? [];
|
|
194
|
+
const passed = comments.some((comment) => (comment.body ?? "").includes(needle));
|
|
195
|
+
return {
|
|
196
|
+
passed,
|
|
197
|
+
reason: passed
|
|
198
|
+
? `issue #${issue} has a comment containing "${needle}"`
|
|
199
|
+
: `issue #${issue} has no comment containing "${needle}" (${comments.length} comment(s) scanned)`,
|
|
200
|
+
};
|
|
201
|
+
},
|
|
202
|
+
});
|
|
203
|
+
//# sourceMappingURL=check-issues.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-issues.js","sourceRoot":"","sources":["../../src/check-issues.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,EAAE;AACF,oEAAoE;AACpE,EAAE;AACF,+EAA+E;AAC/E,wEAAwE;AAExE,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC7F,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EACL,aAAa,EACb,WAAW,EACX,UAAU,EACV,SAAS,EACT,KAAK,GACN,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAG9E,MAAM,CAAC,MAAM,WAAW,GAA2C,WAAW,CAAC;IAC7E,EAAE,EAAE,qBAAqB;IACzB,WAAW,EACT,wFAAwF;QACxF,oFAAoF;QACpF,oFAAoF;QACpF,wFAAwF;IAC1F,QAAQ,EAAE,mCAAmC;IAC7C,MAAM,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,EAAE;I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-0,0 +1,10 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
//
|
|
3
|
+
// The one type every GitHub check declaration is written against (F-1075).
|
|
4
|
+
//
|
|
5
|
+
// It exists so `check-issues.ts`, `check-pulls.ts` and `check-repos.ts` can be
|
|
6
|
+
// separate files without each re-deriving the binding between a declaration and
|
|
7
|
+
// the state tree it reads — and so a declaration that forgets to name
|
|
8
|
+
// `GitHubCheckState` cannot compile.
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=check-kind.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-kind.js","sourceRoot":"","sources":["../../src/check-kind.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,EAAE;AACF,2EAA2E;AAC3E,EAAE;AACF,+EAA+E;AAC/E,gFAAgF;AAChF,sEAAsE;AACtE,qCAAqC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type CheckParamType } from "@pome-sh/sdk/checks";
|
|
2
|
+
export declare const issueNumber: CheckParamType;
|
|
3
|
+
export declare const prNumber: CheckParamType;
|
|
4
|
+
export declare const labelName: CheckParamType;
|
|
5
|
+
export declare const login: CheckParamType;
|
|
6
|
+
export declare const filePath: CheckParamType;
|
|
7
|
+
export declare const commentNeedle: CheckParamType;
|
|
8
|
+
export declare const statusContext: CheckParamType;
|
|
9
|
+
export declare const issueState: CheckParamType;
|
|
10
|
+
export declare const pullRequestState: CheckParamType;
|
|
11
|
+
export declare const reviewState: CheckParamType;
|
|
12
|
+
export declare const commitStatusState: CheckParamType;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
//
|
|
3
|
+
// The typed slots GitHub's declared checks fill (F-1075).
|
|
4
|
+
//
|
|
5
|
+
// These live in the twin, not the sdk, for the same reason the declarations do:
|
|
6
|
+
// the twin owns what a GitHub label name or a GitHub login may look like. The
|
|
7
|
+
// sdk owns only the grammar — `oneOf`, `repoRef`, and the generator.
|
|
8
|
+
//
|
|
9
|
+
// Every pattern here is NARROW on purpose. A slot type is what turns "the
|
|
10
|
+
// author typed something wrong" into a corrupted instance reported by name,
|
|
11
|
+
// instead of a lookup that quietly finds nothing and fails for an unrelated
|
|
12
|
+
// reason. Widening one to make a sentence bind is almost always the wrong
|
|
13
|
+
// repair — the sentence should be re-rendered from the check instead.
|
|
14
|
+
import { oneOf } from "@pome-sh/sdk/checks";
|
|
15
|
+
// Issue and pull-request numbers. `[1-9][0-9]*` rather than `\d+`: GitHub
|
|
16
|
+
// numbers entities from 1, so `#0` names nothing and `#01` is a different
|
|
17
|
+
// string from the `#1` this check would re-render. Both are corrupted instances
|
|
18
|
+
// worth reporting rather than lookups that silently miss.
|
|
19
|
+
const entityNumber = (name) => ({
|
|
20
|
+
name,
|
|
21
|
+
pattern: "[1-9][0-9]*",
|
|
22
|
+
example: "1",
|
|
23
|
+
render: (value) => value,
|
|
24
|
+
parse: (raw) => raw,
|
|
25
|
+
});
|
|
26
|
+
export const issueNumber = entityNumber("issue");
|
|
27
|
+
export const prNumber = entityNumber("pr");
|
|
28
|
+
// Backtick-delimited in every template that uses one, so the only hard
|
|
29
|
+
// exclusion is the backtick itself — a label may legitimately carry spaces,
|
|
30
|
+
// slashes, colons and emoji (`good first issue`, `area/api`, `P0: urgent`).
|
|
31
|
+
// Newline is excluded because a criterion is one line by construction; letting
|
|
32
|
+
// it through would make a malformed multi-line sentence bind.
|
|
33
|
+
export const labelName = {
|
|
34
|
+
name: "label",
|
|
35
|
+
pattern: "[^`\\n]+",
|
|
36
|
+
example: "bug",
|
|
37
|
+
render: (value) => value,
|
|
38
|
+
parse: (raw) => raw,
|
|
39
|
+
};
|
|
40
|
+
// A GitHub login: alphanumerics and single hyphens, never leading or trailing.
|
|
41
|
+
// Narrower than `labelName` on purpose — an assignee that fails to parse is
|
|
42
|
+
// almost always a display name where a login was meant, and saying so beats
|
|
43
|
+
// reporting "issue #1 has no such assignee".
|
|
44
|
+
export const login = {
|
|
45
|
+
name: "login",
|
|
46
|
+
pattern: "[A-Za-z0-9](?:[A-Za-z0-9-]{0,37}[A-Za-z0-9])?",
|
|
47
|
+
example: "alice",
|
|
48
|
+
render: (value) => value,
|
|
49
|
+
parse: (raw) => raw,
|
|
50
|
+
};
|
|
51
|
+
export const filePath = {
|
|
52
|
+
name: "path",
|
|
53
|
+
pattern: "[^`\\n]+",
|
|
54
|
+
example: "src/index.ts",
|
|
55
|
+
render: (value) => value,
|
|
56
|
+
parse: (raw) => raw,
|
|
57
|
+
};
|
|
58
|
+
// Double-quote delimited in its template, so the quote is the exclusion. This
|
|
59
|
+
// is the one slot whose value is SCANNED inside free text rather than compared
|
|
60
|
+
// to a field, which is why its checks declare it as their `subject`.
|
|
61
|
+
export const commentNeedle = {
|
|
62
|
+
name: "needle",
|
|
63
|
+
pattern: '[^"\\n]+',
|
|
64
|
+
example: "Deploy blocked",
|
|
65
|
+
render: (value) => value,
|
|
66
|
+
parse: (raw) => raw,
|
|
67
|
+
};
|
|
68
|
+
// A commit status's `context` — GitHub's name for the reporting check
|
|
69
|
+
// ("ci/build", "codecov/patch").
|
|
70
|
+
export const statusContext = {
|
|
71
|
+
name: "context",
|
|
72
|
+
pattern: '[^"\\n]+',
|
|
73
|
+
example: "ci/build",
|
|
74
|
+
render: (value) => value,
|
|
75
|
+
parse: (raw) => raw,
|
|
76
|
+
};
|
|
77
|
+
// ── Closed sets ──────────────────────────────────────────────────────────────
|
|
78
|
+
//
|
|
79
|
+
// Each of these was an inline alternation inside a legacy regex, where no
|
|
80
|
+
// authoring surface could read it. As declared param types the set travels with
|
|
81
|
+
// the check: `pome checks github` prints it, the picker offers it, and a value
|
|
82
|
+
// outside it is reported as a corrupted instance.
|
|
83
|
+
//
|
|
84
|
+
// They also cost something, and it is named here rather than discovered later:
|
|
85
|
+
// a closed set has NO value guaranteed to be false, so a check whose only
|
|
86
|
+
// scanned slot is an enum cannot declare a vacuity mutant. See
|
|
87
|
+
// `HONEST_NULL_MUTANTS` in the contract test.
|
|
88
|
+
export const issueState = oneOf("state", ["open", "closed"]);
|
|
89
|
+
// "not merged" first so the set reads in the order an author thinks about it;
|
|
90
|
+
// the generated pattern is anchored, so ordering cannot change what binds.
|
|
91
|
+
export const pullRequestState = oneOf("state", ["merged", "not merged", "open", "closed"]);
|
|
92
|
+
// The API's own review states, and only those. The legacy regex also accepted
|
|
93
|
+
// `REQUEST_CHANGES` (the review *event* verb) and folded it onto
|
|
94
|
+
// `CHANGES_REQUESTED`, because an author typing English could reasonably reach
|
|
95
|
+
// for either. Under a picked check there is nothing to fold: the author selects
|
|
96
|
+
// from this set and the system writes the sentence.
|
|
97
|
+
export const reviewState = oneOf("review", ["APPROVED", "CHANGES_REQUESTED", "COMMENTED"], "APPROVED");
|
|
98
|
+
export const commitStatusState = oneOf("state", ["success", "failure", "pending", "error"], "success");
|
|
99
|
+
//# sourceMappingURL=check-params.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-params.js","sourceRoot":"","sources":["../../src/check-params.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,EAAE;AACF,0DAA0D;AAC1D,EAAE;AACF,gFAAgF;AAChF,8EAA8E;AAC9E,qEAAqE;AACrE,EAAE;AACF,0EAA0E;AAC1E,4EAA4E;AAC5E,4EAA4E;AAC5E,0EAA0E;AAC1E,sEAAsE;AAEtE,OAAO,EAAE,KAAK,EAAuB,MAAM,qBAAqB,CAAC;AAEjE,0EAA0E;AAC1E,0EAA0E;AAC1E,gFAAgF;AAChF,0DAA0D;AAC1D,MAAM,YAAY,GAAG,CAAC,IAAY,EAAkB,EAAE,CAAC,CAAC;IACtD,IAAI;IACJ,OAAO,EAAE,aAAa;IACtB,OAAO,EAAE,GAAG;IACZ,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK;IACxB,KAAK,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG;CACpB,CAAC,CA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G;CACpB,CAAC;AAEF,sEAAsE;AACtE,iCAAiC;AACjC,MAAM,CAAC,MAAM,aAAa,GAAmB;IAC3C,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,UAAU;IACnB,OAAO,EAAE,UAAU;IACnB,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK;IACxB,KAAK,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG;CACpB,CAAC;AAEF,gFAAgF;AAChF,EAAE;AACF,0EAA0E;AAC1E,gFAAgF;AAChF,+EAA+E;AAC/E,kDAAkD;AAClD,EAAE;AACF,+EAA+E;AAC/E,0EAA0E;AAC1E,+DAA+D;AAC/D,8CAA8C;AAE9C,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;AAE7D,8EAA8E;AAC9E,2EAA2E;AAC3E,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;AAE3F,8EAA8E;AAC9E,iEAAiE;AACjE,+EAA+E;AAC/E,gFAAgF;AAChF,oDAAoD;AACpD,MAAM,CAAC,MAAM,WAAW,GAAG,KAAK,CAC9B,QAAQ,EACR,CAAC,UAAU,EAAE,mBAAmB,EAAE,WAAW,CAAC,EAC9C,UAAU,CACX,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,CACpC,OAAO,EACP,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC,EAC1C,SAAS,CACV,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Check } from "./check-kind.js";
|
|
2
|
+
export declare const pullRequestStateCheck: Check<{
|
|
3
|
+
pr: string;
|
|
4
|
+
repo: string;
|
|
5
|
+
state: string;
|
|
6
|
+
}>;
|
|
7
|
+
export declare const pullRequestReviewExists: Check<{
|
|
8
|
+
review: string;
|
|
9
|
+
pr: string;
|
|
10
|
+
repo: string;
|
|
11
|
+
}>;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
//
|
|
3
|
+
// What GitHub's declared checks can assert about a PULL REQUEST (F-1075).
|
|
4
|
+
//
|
|
5
|
+
// Declarations only. The grammar rules they all obey are in `checks.ts`, which
|
|
6
|
+
// assembles them; how the exported tree is read is in `check-state.ts`.
|
|
7
|
+
import { defineCheck, repoRef } from "@pome-sh/sdk/checks";
|
|
8
|
+
import { prNumber, pullRequestState, reviewState } from "./check-params.js";
|
|
9
|
+
import { isMerged, resolvePullRequest } from "./check-state.js";
|
|
10
|
+
export const pullRequestStateCheck = defineCheck({
|
|
11
|
+
id: "github.pr-state",
|
|
12
|
+
description: "Reads the pull request's `merged` flag for `merged`/`not merged`, and its `state` column " +
|
|
13
|
+
"for `open`/`closed`. These are DIFFERENT fields and a PR can be closed without being " +
|
|
14
|
+
"merged, so the two pairs do not imply each other. Whichever field the sentence turns on " +
|
|
15
|
+
"must be present: an export missing it is SKIPPED, because defaulting it to false would " +
|
|
16
|
+
"let `is not merged` pass against a world we cannot see.",
|
|
17
|
+
template: "Pull request #{pr} in `{repo}` is {state}",
|
|
18
|
+
params: { pr: prNumber, repo: repoRef, state: pullRequestState },
|
|
19
|
+
substrate: "final",
|
|
20
|
+
// Per-arg, and the reason polarity takes the args at all: task 05 asserts
|
|
21
|
+
// "PR #1 is merged" and "PR #2 is not merged" through this one template.
|
|
22
|
+
// "open" is the same prohibition as the issue check's.
|
|
23
|
+
polarity: ({ state }) => (state === "not merged" || state === "open" ? "negative" : "positive"),
|
|
24
|
+
subject: () => null,
|
|
25
|
+
// No falsifiable trigger, same shape as issue-state: a closed set with no
|
|
26
|
+
// guaranteed-false member, and a PR number that only resolves.
|
|
27
|
+
vacuityMutant: () => null,
|
|
28
|
+
evaluate({ pr, repo, state }, { final }) {
|
|
29
|
+
const found = resolvePullRequest(final, repo, pr);
|
|
30
|
+
if ("missing" in found)
|
|
31
|
+
return { passed: false, reason: found.missing };
|
|
32
|
+
const pull = found.found;
|
|
33
|
+
const onMergeFlag = state === "merged" || state === "not merged";
|
|
34
|
+
// The field this assertion turns on must be PRESENT. Absent, the safe
|
|
35
|
+
// default is not `false` — `merged == null` would make "is not merged" pass
|
|
36
|
+
// against a world we cannot see, which is how a merged impostor PR scores
|
|
37
|
+
// green. Skip instead, so the criterion leaves the denominator rather than
|
|
38
|
+
// fabricating a verdict.
|
|
39
|
+
const turnsOn = onMergeFlag ? pull.merged : pull.state;
|
|
40
|
+
if (turnsOn == null) {
|
|
41
|
+
return {
|
|
42
|
+
passed: false,
|
|
43
|
+
status: "skipped",
|
|
44
|
+
reason: `pull request #${pr} has no ${onMergeFlag ? "merged" : "state"} field in state_final (state_incomplete)`,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
// Cite only the field the assertion actually turned on. Printing both
|
|
48
|
+
// (`state="undefined" merged=false`) presents an absent field as evidence
|
|
49
|
+
// for a verdict that never read it.
|
|
50
|
+
if (onMergeFlag) {
|
|
51
|
+
const merged = isMerged(pull);
|
|
52
|
+
return {
|
|
53
|
+
passed: state === "merged" ? merged : !merged,
|
|
54
|
+
reason: `pull request #${pr}: merged=${merged} (wanted "${state}")`,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
passed: pull.state === state,
|
|
59
|
+
reason: `pull request #${pr}: state="${pull.state}" (wanted "${state}")`,
|
|
60
|
+
};
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
export const pullRequestReviewExists = defineCheck({
|
|
64
|
+
id: "github.pr-review-exists",
|
|
65
|
+
description: "Asserts at least one submitted review on the pull request carries this state. It does " +
|
|
66
|
+
"not assert who reviewed, how recently, or that no other review disagrees — an APPROVED " +
|
|
67
|
+
"review alongside a CHANGES_REQUESTED one satisfies both. A pull request whose export " +
|
|
68
|
+
"carries no reviews section at all is SKIPPED, because absent is not the same as none.",
|
|
69
|
+
template: "A {review} review exists on pull request #{pr} in `{repo}`",
|
|
70
|
+
params: { review: reviewState, pr: prNumber, repo: repoRef },
|
|
71
|
+
substrate: "final",
|
|
72
|
+
polarity: () => "positive",
|
|
73
|
+
subject: () => null,
|
|
74
|
+
// A closed set with no guaranteed-false member, and a PR number that only
|
|
75
|
+
// resolves. Same reasoning as issue-state.
|
|
76
|
+
vacuityMutant: () => null,
|
|
77
|
+
evaluate({ review, pr, repo }, { final }) {
|
|
78
|
+
const found = resolvePullRequest(final, repo, pr);
|
|
79
|
+
if ("missing" in found)
|
|
80
|
+
return { passed: false, reason: found.missing };
|
|
81
|
+
// Reviews section absent (an older twin snapshot predating review export):
|
|
82
|
+
// we cannot distinguish "no review" from "not captured", so safe-skip
|
|
83
|
+
// rather than vacuously failing a correct agent. An empty array is a real
|
|
84
|
+
// "no reviews" and falls through to failed.
|
|
85
|
+
if (found.found.reviews == null) {
|
|
86
|
+
return {
|
|
87
|
+
passed: false,
|
|
88
|
+
status: "skipped",
|
|
89
|
+
reason: `pull request #${pr} has no reviews section in state_final (state_incomplete)`,
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
const states = found.found.reviews.map((row) => row.state ?? "");
|
|
93
|
+
const passed = states.includes(review);
|
|
94
|
+
return {
|
|
95
|
+
passed,
|
|
96
|
+
reason: passed
|
|
97
|
+
? `pull request #${pr} has a ${review} review`
|
|
98
|
+
: `pull request #${pr} reviews are [${states.join(", ")}], missing a ${review} review`,
|
|
99
|
+
};
|
|
100
|
+
},
|
|
101
|
+
});
|
|
102
|
+
//# sourceMappingURL=check-pulls.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-pulls.js","sourceRoot":"","sources":["../../src/check-pulls.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,EAAE;AACF,0EAA0E;AAC1E,EAAE;AACF,+EAA+E;AAC/E,w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ewLabels: Check<{
|
|
3
|
+
repo: string;
|
|
4
|
+
}>;
|
|
5
|
+
export declare const fileExists: Check<{
|
|
6
|
+
path: string;
|
|
7
|
+
repo: string;
|
|
8
|
+
}>;
|
|
9
|
+
export declare const commitStatus: Check<{
|
|
10
|
+
context: string;
|
|
11
|
+
repo: string;
|
|
12
|
+
state: string;
|
|
13
|
+
}>;
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
//
|
|
3
|
+
// What GitHub's declared checks can assert about a REPOSITORY (F-1075) —
|
|
4
|
+
// its label set, its files, and the statuses reported against its commits.
|
|
5
|
+
//
|
|
6
|
+
// Declarations only. The grammar rules they all obey are in `checks.ts`, which
|
|
7
|
+
// assembles them; how the exported tree is read is in `check-state.ts`.
|
|
8
|
+
import { defineCheck, repoRef, VACUITY_SENTINEL } from "@pome-sh/sdk/checks";
|
|
9
|
+
import { commitStatusState, filePath, statusContext } from "./check-params.js";
|
|
10
|
+
import { labelNames, resolveRepo } from "./check-state.js";
|
|
11
|
+
export const noNewLabels = defineCheck({
|
|
12
|
+
id: "github.no-new-labels",
|
|
13
|
+
// F-1074 — the same explanation the comment below carries, in the one place
|
|
14
|
+
// an author can actually reach it.
|
|
15
|
+
description: "Compares the repository's label DEFINITIONS in the seed against the final state. " +
|
|
16
|
+
"Applying an ALREADY-DEFINED label to an issue PASSES this check — only creating a " +
|
|
17
|
+
"label the repo did not already define fails it. `addIssueLabels` rejects an undefined " +
|
|
18
|
+
"label, so an examinee cannot apply a new one without creating it first, which is what " +
|
|
19
|
+
"makes this tight. Needs the seed: it is a delta, not a state assertion.",
|
|
20
|
+
// The repo is named on purpose. Without it the sentence reads as an
|
|
21
|
+
// issue-level claim — "the agent did not add labels to the issue" — which is
|
|
22
|
+
// WIDER than what this predicate compares. `create_label` is repo-scoped in
|
|
23
|
+
// GitHub's own vocabulary and `add_issue_labels` is the issue-scoped one, so
|
|
24
|
+
// naming the repo is what tells a reader which of the two is being asserted.
|
|
25
|
+
//
|
|
26
|
+
// An agent that applies an ALREADY-DEFINED label to an issue passes this
|
|
27
|
+
// check, correctly. The assertion that catches that is
|
|
28
|
+
// `Issue #N … has exactly one classification label`.
|
|
29
|
+
template: "No new labels were created in `{repo}`",
|
|
30
|
+
params: { repo: repoRef },
|
|
31
|
+
// The whole point: this is a delta, and it is unanswerable without the seed.
|
|
32
|
+
substrate: "seed+final",
|
|
33
|
+
// It should PASS on the untouched seed and can only be broken by the
|
|
34
|
+
// examinee acting.
|
|
35
|
+
polarity: () => "negative",
|
|
36
|
+
// Nothing here is a caller-supplied literal hunted for inside the state, so
|
|
37
|
+
// there is nothing a redactor could silently delete out from under it.
|
|
38
|
+
subject: () => null,
|
|
39
|
+
// The repo is a SELECTOR, not a scanned value. Falsifying it would move the
|
|
40
|
+
// verdict ("repo not found") for a reason that never reaches the assertion —
|
|
41
|
+
// a clean bill this check did not earn. Reported as `no_trigger`.
|
|
42
|
+
vacuityMutant: () => null,
|
|
43
|
+
evaluate({ repo }, { seed, final }) {
|
|
44
|
+
// The engine guards this before calling; the check guards too, so a
|
|
45
|
+
// consumer that forgets gets a named skip rather than a vacuous pass.
|
|
46
|
+
if (seed === null)
|
|
47
|
+
return { passed: false, reason: "seed_missing", status: "skipped" };
|
|
48
|
+
const seedRepo = resolveRepo(seed, repo, "the seed state");
|
|
49
|
+
if ("missing" in seedRepo)
|
|
50
|
+
return { passed: false, reason: seedRepo.missing };
|
|
51
|
+
const finalRepo = resolveRepo(final, repo, "state_final");
|
|
52
|
+
if ("missing" in finalRepo)
|
|
53
|
+
return { passed: false, reason: finalRepo.missing };
|
|
54
|
+
const before = labelNames(seedRepo.found);
|
|
55
|
+
const created = [...labelNames(finalRepo.found)].filter((name) => !before.has(name)).sort();
|
|
56
|
+
if (created.length === 0) {
|
|
57
|
+
return {
|
|
58
|
+
passed: true,
|
|
59
|
+
reason: `no labels were created in ${repo} (${before.size} defined at seed, unchanged at finish)`,
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
passed: false,
|
|
64
|
+
reason: `labels created in ${repo}: ${created.map((name) => `\`${name}\``).join(", ")}`,
|
|
65
|
+
};
|
|
66
|
+
},
|
|
67
|
+
});
|
|
68
|
+
export const fileExists = defineCheck({
|
|
69
|
+
id: "github.file-exists",
|
|
70
|
+
description: "Asserts a file with this exact path exists in the repository on ANY branch — the twin " +
|
|
71
|
+
"exports files per branch and this check does not distinguish them, so a file committed " +
|
|
72
|
+
"only to a side branch satisfies it. The path is compared exactly and case-sensitively; " +
|
|
73
|
+
"it asserts nothing about the file's contents.",
|
|
74
|
+
template: "File `{path}` exists in `{repo}`",
|
|
75
|
+
params: { path: filePath, repo: repoRef },
|
|
76
|
+
substrate: "final",
|
|
77
|
+
polarity: () => "positive",
|
|
78
|
+
subject: ({ path }) => path,
|
|
79
|
+
// The path IS the scanned literal.
|
|
80
|
+
vacuityMutant: (args) => ({ ...args, path: `${VACUITY_SENTINEL}.txt` }),
|
|
81
|
+
evaluate({ path, repo }, { final }) {
|
|
82
|
+
const found = resolveRepo(final, repo, "state_final");
|
|
83
|
+
if ("missing" in found)
|
|
84
|
+
return { passed: false, reason: found.missing };
|
|
85
|
+
const files = found.found.files ?? [];
|
|
86
|
+
const passed = files.some((file) => file.path === path);
|
|
87
|
+
return {
|
|
88
|
+
passed,
|
|
89
|
+
reason: passed
|
|
90
|
+
? `file exists at "${path}" in ${repo}`
|
|
91
|
+
: `no file found at "${path}" in ${repo} (${files.length} file(s) exported)`,
|
|
92
|
+
};
|
|
93
|
+
},
|
|
94
|
+
});
|
|
95
|
+
export const commitStatus = defineCheck({
|
|
96
|
+
id: "github.commit-status",
|
|
97
|
+
description: "Asserts at least one commit status reported under this context carries this state. It " +
|
|
98
|
+
"does not say WHICH commit: the twin exports every status row for the repo and this " +
|
|
99
|
+
"check scans them all, so a green status on an old commit satisfies it. Nor does it " +
|
|
100
|
+
"assert the status is the latest one for that context.",
|
|
101
|
+
template: 'Commit status "{context}" in `{repo}` is {state}',
|
|
102
|
+
params: { context: statusContext, repo: repoRef, state: commitStatusState },
|
|
103
|
+
substrate: "final",
|
|
104
|
+
polarity: () => "positive",
|
|
105
|
+
subject: ({ context }) => context,
|
|
106
|
+
// No falsifiable trigger, and this one is a DELIBERATE loss against the regex
|
|
107
|
+
// it replaces. The legacy rule mutated the state word, which worked only
|
|
108
|
+
// because `(\w+)` would accept an invented sentinel. Typing the state as a
|
|
109
|
+
// closed set is the right call — an author picks from four real values — but
|
|
110
|
+
// a closed set has no guaranteed-false member, so a mutant could assert a
|
|
111
|
+
// different state that happens to also be true and report a clean bill this
|
|
112
|
+
// check did not earn. Mutating the context instead would empty the candidate
|
|
113
|
+
// set and move the verdict without the state comparison ranging over
|
|
114
|
+
// anything, which is the same false clean bill one step earlier. `no_trigger`
|
|
115
|
+
// is the honest answer.
|
|
116
|
+
vacuityMutant: () => null,
|
|
117
|
+
evaluate({ context, repo, state }, { final }) {
|
|
118
|
+
const found = resolveRepo(final, repo, "state_final");
|
|
119
|
+
if ("missing" in found)
|
|
120
|
+
return { passed: false, reason: found.missing };
|
|
121
|
+
const candidates = (found.found.commit_statuses ?? []).filter((row) => row.context === context);
|
|
122
|
+
const passed = candidates.some((row) => (row.state ?? "").toLowerCase() === state);
|
|
123
|
+
return {
|
|
124
|
+
passed,
|
|
125
|
+
reason: passed
|
|
126
|
+
? `commit status "${context}" is "${state}" in ${repo}`
|
|
127
|
+
: `no commit status "${context}" with state "${state}" in ${repo} ` +
|
|
128
|
+
`(found: [${candidates.map((row) => row.state).join(", ")}])`,
|
|
129
|
+
};
|
|
130
|
+
},
|
|
131
|
+
});
|
|
132
|
+
//# sourceMappingURL=check-repos.js.map
|