@b00dea/cockpit 0.0.0-stage → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +474 -0
- package/LICENSE +21 -0
- package/README.md +25 -2
- package/bin/cockpit.mjs +33 -0
- package/cockpit.schema.json +2644 -0
- package/dist/autonomy.d.ts +45 -0
- package/dist/autonomy.js +173 -0
- package/dist/bounded-read.d.ts +14 -0
- package/dist/bounded-read.js +42 -0
- package/dist/browser/commands.d.ts +117 -0
- package/dist/browser/commands.js +453 -0
- package/dist/browser/package-paths.d.ts +1 -0
- package/dist/browser/package-paths.js +6 -0
- package/dist/browser/proxy.d.ts +22 -0
- package/dist/browser/proxy.js +37 -0
- package/dist/browser/runtime.d.ts +118 -0
- package/dist/browser/runtime.js +186 -0
- package/dist/browser/surfaces.d.ts +141 -0
- package/dist/browser/surfaces.js +561 -0
- package/dist/browser/ui-gate.d.ts +15 -0
- package/dist/browser/ui-gate.js +18 -0
- package/dist/canonical-json.d.ts +2 -0
- package/dist/canonical-json.js +5 -0
- package/dist/cli-guard.d.ts +5 -0
- package/dist/cli-guard.js +71 -0
- package/dist/cli-main.d.ts +176 -0
- package/dist/cli-main.js +1584 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.js +16 -0
- package/dist/command-table.d.ts +121 -0
- package/dist/command-table.js +664 -0
- package/dist/config/load.d.ts +183 -0
- package/dist/config/load.js +367 -0
- package/dist/config/sibling-toml.d.ts +48 -0
- package/dist/config/sibling-toml.js +160 -0
- package/dist/config/surface-tools-toml.d.ts +9 -0
- package/dist/config/surface-tools-toml.js +37 -0
- package/dist/config/unconfirmed-toml.d.ts +9 -0
- package/dist/config/unconfirmed-toml.js +29 -0
- package/dist/config/verified-write.d.ts +43 -0
- package/dist/config/verified-write.js +89 -0
- package/dist/diagnostics.d.ts +26 -0
- package/dist/diagnostics.js +344 -0
- package/dist/docs/check.d.ts +16 -0
- package/dist/docs/check.js +197 -0
- package/dist/docs/decision-record.d.ts +34 -0
- package/dist/docs/decision-record.js +135 -0
- package/dist/docs/decisions.d.ts +16 -0
- package/dist/docs/decisions.js +103 -0
- package/dist/docs/markdown.d.ts +36 -0
- package/dist/docs/markdown.js +88 -0
- package/dist/docs/references.d.ts +32 -0
- package/dist/docs/references.js +148 -0
- package/dist/emit.d.ts +22 -0
- package/dist/emit.js +43 -0
- package/dist/entrypoint-kinds.d.ts +3 -0
- package/dist/entrypoint-kinds.js +11 -0
- package/dist/environment/application/confirm.d.ts +35 -0
- package/dist/environment/application/confirm.js +122 -0
- package/dist/environment/application/destructive.d.ts +6 -0
- package/dist/environment/application/destructive.js +429 -0
- package/dist/environment/application/doctor.d.ts +94 -0
- package/dist/environment/application/doctor.js +247 -0
- package/dist/environment/application/guard.d.ts +49 -0
- package/dist/environment/application/guard.js +677 -0
- package/dist/environment/application/health.d.ts +143 -0
- package/dist/environment/application/health.js +385 -0
- package/dist/environment/application/lifecycle-context.d.ts +235 -0
- package/dist/environment/application/lifecycle-context.js +154 -0
- package/dist/environment/application/lifecycle-state.d.ts +25 -0
- package/dist/environment/application/lifecycle-state.js +202 -0
- package/dist/environment/application/lifecycle.d.ts +18 -0
- package/dist/environment/application/lifecycle.js +737 -0
- package/dist/environment/application/logs.d.ts +45 -0
- package/dist/environment/application/logs.js +127 -0
- package/dist/environment/application/services.d.ts +60 -0
- package/dist/environment/application/services.js +89 -0
- package/dist/environment/application/setup.d.ts +129 -0
- package/dist/environment/application/setup.js +741 -0
- package/dist/environment/application/shared.d.ts +11 -0
- package/dist/environment/application/shared.js +61 -0
- package/dist/environment/application/siblings.d.ts +43 -0
- package/dist/environment/application/siblings.js +269 -0
- package/dist/environment/claims.d.ts +389 -0
- package/dist/environment/claims.js +1701 -0
- package/dist/environment/codex-hook-trust.d.ts +11 -0
- package/dist/environment/codex-hook-trust.js +185 -0
- package/dist/environment/compose-environment.d.ts +1 -0
- package/dist/environment/compose-environment.js +6 -0
- package/dist/environment/compose-ownership.d.ts +21 -0
- package/dist/environment/compose-ownership.js +117 -0
- package/dist/environment/compose-topology.d.ts +125 -0
- package/dist/environment/compose-topology.js +490 -0
- package/dist/environment/contract.d.ts +522 -0
- package/dist/environment/contract.js +794 -0
- package/dist/environment/declaration.d.ts +14 -0
- package/dist/environment/declaration.js +39 -0
- package/dist/environment/destructive-composition.d.ts +29 -0
- package/dist/environment/destructive-composition.js +333 -0
- package/dist/environment/docker-daemon.d.ts +30 -0
- package/dist/environment/docker-daemon.js +78 -0
- package/dist/environment/docker-endpoint.d.ts +10 -0
- package/dist/environment/docker-endpoint.js +19 -0
- package/dist/environment/env-schema-observation.d.ts +46 -0
- package/dist/environment/env-schema-observation.js +241 -0
- package/dist/environment/evidence.d.ts +136 -0
- package/dist/environment/evidence.js +437 -0
- package/dist/environment/executable.d.ts +38 -0
- package/dist/environment/executable.js +190 -0
- package/dist/environment/generated-application/authorities.d.ts +5 -0
- package/dist/environment/generated-application/authorities.js +61 -0
- package/dist/environment/generated-application/bootstrap-skill.d.ts +16 -0
- package/dist/environment/generated-application/bootstrap-skill.js +328 -0
- package/dist/environment/generated-application/check.d.ts +13 -0
- package/dist/environment/generated-application/check.js +191 -0
- package/dist/environment/generated-application/custom-surface.d.ts +26 -0
- package/dist/environment/generated-application/custom-surface.js +289 -0
- package/dist/environment/generated-application/prepare.d.ts +29 -0
- package/dist/environment/generated-application/prepare.js +278 -0
- package/dist/environment/generated-application/publication.d.ts +33 -0
- package/dist/environment/generated-application/publication.js +547 -0
- package/dist/environment/generated-application/shared.d.ts +492 -0
- package/dist/environment/generated-application/shared.js +354 -0
- package/dist/environment/generated-application/surface-observation.d.ts +4 -0
- package/dist/environment/generated-application/surface-observation.js +69 -0
- package/dist/environment/generated-application/surface-outputs.d.ts +71 -0
- package/dist/environment/generated-application/surface-outputs.js +400 -0
- package/dist/environment/generated-application/surfaces.d.ts +3 -0
- package/dist/environment/generated-application/surfaces.js +704 -0
- package/dist/environment/generated-application/sync.d.ts +6 -0
- package/dist/environment/generated-application/sync.js +124 -0
- package/dist/environment/git-observation.d.ts +202 -0
- package/dist/environment/git-observation.js +553 -0
- package/dist/environment/health-composition.d.ts +12 -0
- package/dist/environment/health-composition.js +645 -0
- package/dist/environment/host-observation.d.ts +56 -0
- package/dist/environment/host-observation.js +52 -0
- package/dist/environment/identity.d.ts +48 -0
- package/dist/environment/identity.js +85 -0
- package/dist/environment/init-application.d.ts +333 -0
- package/dist/environment/init-application.js +726 -0
- package/dist/environment/install-policy-observation.d.ts +71 -0
- package/dist/environment/install-policy-observation.js +284 -0
- package/dist/environment/install-policy.d.ts +48 -0
- package/dist/environment/install-policy.js +96 -0
- package/dist/environment/instance.d.ts +33 -0
- package/dist/environment/instance.js +122 -0
- package/dist/environment/instruction-pointer.d.ts +19 -0
- package/dist/environment/instruction-pointer.js +144 -0
- package/dist/environment/lifecycle-composition.d.ts +31 -0
- package/dist/environment/lifecycle-composition.js +742 -0
- package/dist/environment/lifecycle-stage.d.ts +120 -0
- package/dist/environment/lifecycle-stage.js +408 -0
- package/dist/environment/lifecycle.d.ts +75 -0
- package/dist/environment/lifecycle.js +354 -0
- package/dist/environment/logs.d.ts +132 -0
- package/dist/environment/logs.js +519 -0
- package/dist/environment/map-limit.d.ts +2 -0
- package/dist/environment/map-limit.js +13 -0
- package/dist/environment/mcp-observation.d.ts +9 -0
- package/dist/environment/mcp-observation.js +46 -0
- package/dist/environment/observations.d.ts +46 -0
- package/dist/environment/observations.js +346 -0
- package/dist/environment/operator-application.d.ts +79 -0
- package/dist/environment/operator-application.js +197 -0
- package/dist/environment/ports.d.ts +182 -0
- package/dist/environment/ports.js +1205 -0
- package/dist/environment/posture-observation.d.ts +68 -0
- package/dist/environment/posture-observation.js +253 -0
- package/dist/environment/presence.d.ts +4 -0
- package/dist/environment/presence.js +26 -0
- package/dist/environment/read-composition.d.ts +32 -0
- package/dist/environment/read-composition.js +397 -0
- package/dist/environment/readiness-composition.d.ts +57 -0
- package/dist/environment/readiness-composition.js +151 -0
- package/dist/environment/reclaim.d.ts +370 -0
- package/dist/environment/reclaim.js +1940 -0
- package/dist/environment/repository-identity.d.ts +13 -0
- package/dist/environment/repository-identity.js +108 -0
- package/dist/environment/runtime-measurement-record.d.ts +38 -0
- package/dist/environment/runtime-measurement-record.js +111 -0
- package/dist/environment/runtime-measurement.d.ts +27 -0
- package/dist/environment/runtime-measurement.js +224 -0
- package/dist/environment/runtime-probe-residue.d.ts +43 -0
- package/dist/environment/runtime-probe-residue.js +148 -0
- package/dist/environment/runtime-probe.d.ts +72 -0
- package/dist/environment/runtime-probe.js +725 -0
- package/dist/environment/runtime.d.ts +551 -0
- package/dist/environment/runtime.js +2405 -0
- package/dist/environment/seed.d.ts +16 -0
- package/dist/environment/seed.js +43 -0
- package/dist/environment/selftest-application.d.ts +86 -0
- package/dist/environment/selftest-application.js +713 -0
- package/dist/environment/sensitive.d.ts +3 -0
- package/dist/environment/sensitive.js +48 -0
- package/dist/environment/served-checkout-grants.d.ts +53 -0
- package/dist/environment/served-checkout-grants.js +182 -0
- package/dist/environment/setup-observation.d.ts +62 -0
- package/dist/environment/setup-observation.js +1473 -0
- package/dist/environment/setup.d.ts +43 -0
- package/dist/environment/setup.js +176 -0
- package/dist/environment/sibling-checkouts.d.ts +119 -0
- package/dist/environment/sibling-checkouts.js +254 -0
- package/dist/environment/sibling-instructions.d.ts +33 -0
- package/dist/environment/sibling-instructions.js +224 -0
- package/dist/environment/sibling-observation.d.ts +27 -0
- package/dist/environment/sibling-observation.js +45 -0
- package/dist/environment/sibling-pull.d.ts +23 -0
- package/dist/environment/sibling-pull.js +95 -0
- package/dist/environment/sibling-registration.d.ts +45 -0
- package/dist/environment/sibling-registration.js +538 -0
- package/dist/environment/stack-inputs.d.ts +18 -0
- package/dist/environment/stack-inputs.js +210 -0
- package/dist/environment/stack-inventory-prune.d.ts +31 -0
- package/dist/environment/stack-inventory-prune.js +129 -0
- package/dist/environment/stack-inventory-report.d.ts +44 -0
- package/dist/environment/stack-inventory-report.js +78 -0
- package/dist/environment/stack-inventory.d.ts +94 -0
- package/dist/environment/stack-inventory.js +418 -0
- package/dist/environment/state.d.ts +410 -0
- package/dist/environment/state.js +2153 -0
- package/dist/environment/templates.d.ts +140 -0
- package/dist/environment/templates.js +685 -0
- package/dist/environment/tool-registration.d.ts +9 -0
- package/dist/environment/tool-registration.js +92 -0
- package/dist/environment/upgrade-application.d.ts +19 -0
- package/dist/environment/upgrade-application.js +175 -0
- package/dist/environment-exec/execute.d.ts +105 -0
- package/dist/environment-exec/execute.js +1179 -0
- package/dist/environment-exec/libexec-program.d.ts +6 -0
- package/dist/environment-exec/libexec-program.js +22 -0
- package/dist/environment-exec/verified-digest.d.ts +4 -0
- package/dist/environment-exec/verified-digest.js +16 -0
- package/dist/exact-keys.d.ts +7 -0
- package/dist/exact-keys.js +15 -0
- package/dist/fix-catalogue.d.ts +32 -0
- package/dist/fix-catalogue.js +60 -0
- package/dist/freshness.d.ts +29 -0
- package/dist/freshness.js +75 -0
- package/dist/generated-environment/adopt.d.ts +16 -0
- package/dist/generated-environment/adopt.js +271 -0
- package/dist/generated-environment/command.d.ts +47 -0
- package/dist/generated-environment/command.js +75 -0
- package/dist/generated-environment/transaction.d.ts +186 -0
- package/dist/generated-environment/transaction.js +1770 -0
- package/dist/grading/evaluate.d.ts +71 -0
- package/dist/grading/evaluate.js +403 -0
- package/dist/grading/grade.d.ts +33 -0
- package/dist/grading/grade.js +57 -0
- package/dist/guards/answer-confirmation.d.ts +41 -0
- package/dist/guards/answer-confirmation.js +109 -0
- package/dist/guards/evaluator.d.ts +130 -0
- package/dist/guards/evaluator.js +1258 -0
- package/dist/guards/harness-adapter.d.ts +17 -0
- package/dist/guards/harness-adapter.js +57 -0
- package/dist/guards/host.d.ts +8 -0
- package/dist/guards/host.js +10 -0
- package/dist/guards/invocation-parser.d.ts +66 -0
- package/dist/guards/invocation-parser.js +595 -0
- package/dist/guards/local-identity.d.ts +44 -0
- package/dist/guards/local-identity.js +129 -0
- package/dist/guards/policy-change.d.ts +43 -0
- package/dist/guards/policy-change.js +159 -0
- package/dist/guards/policy-pin.d.ts +13 -0
- package/dist/guards/policy-pin.js +177 -0
- package/dist/guards/protected-locations.d.ts +62 -0
- package/dist/guards/protected-locations.js +461 -0
- package/dist/guards/read-only.d.ts +37 -0
- package/dist/guards/read-only.js +315 -0
- package/dist/init/command.d.ts +41 -0
- package/dist/init/command.js +330 -0
- package/dist/init/derive.d.ts +53 -0
- package/dist/init/derive.js +819 -0
- package/dist/init/draft.d.ts +140 -0
- package/dist/init/draft.js +1228 -0
- package/dist/init/render.d.ts +47 -0
- package/dist/init/render.js +104 -0
- package/dist/init/scaffold.d.ts +53 -0
- package/dist/init/scaffold.js +121 -0
- package/dist/invocation.d.ts +13 -0
- package/dist/invocation.js +20 -0
- package/dist/package-metadata.d.ts +9 -0
- package/dist/package-metadata.js +19 -0
- package/dist/readiness.d.ts +53 -0
- package/dist/readiness.js +88 -0
- package/dist/references/named.d.ts +24 -0
- package/dist/references/named.js +27 -0
- package/dist/refusal.d.ts +15 -0
- package/dist/refusal.js +7 -0
- package/dist/registry-derivation.d.ts +31 -0
- package/dist/registry-derivation.js +32 -0
- package/dist/registry-resolve/command.d.ts +47 -0
- package/dist/registry-resolve/command.js +226 -0
- package/dist/registry-resolve/registry.d.ts +68 -0
- package/dist/registry-resolve/registry.js +292 -0
- package/dist/registry-resolve/render-shell.d.ts +18 -0
- package/dist/registry-resolve/render-shell.js +36 -0
- package/dist/repair.d.ts +29 -0
- package/dist/repair.js +8 -0
- package/dist/repository-path.d.ts +9 -0
- package/dist/repository-path.js +16 -0
- package/dist/schema-json.d.ts +1 -0
- package/dist/schema-json.js +177 -0
- package/dist/schema.d.ts +1289 -0
- package/dist/schema.js +985 -0
- package/dist/setup/command.d.ts +4 -0
- package/dist/setup/command.js +4 -0
- package/dist/sha256.d.ts +1 -0
- package/dist/sha256.js +4 -0
- package/dist/surfaces/adoption.d.ts +41 -0
- package/dist/surfaces/adoption.js +217 -0
- package/dist/surfaces/consumer-instructions.d.ts +20 -0
- package/dist/surfaces/consumer-instructions.js +43 -0
- package/dist/surfaces/contract.d.ts +42 -0
- package/dist/surfaces/contract.js +169 -0
- package/dist/surfaces/core-declarations.d.ts +24 -0
- package/dist/surfaces/core-declarations.js +79 -0
- package/dist/surfaces/development-markers.d.ts +1 -0
- package/dist/surfaces/development-markers.js +18 -0
- package/dist/surfaces/generator-adapter.d.ts +71 -0
- package/dist/surfaces/generator-adapter.js +809 -0
- package/dist/surfaces/harness-registry.d.ts +260 -0
- package/dist/surfaces/harness-registry.js +146 -0
- package/dist/surfaces/mcp.d.ts +145 -0
- package/dist/surfaces/mcp.js +349 -0
- package/dist/surfaces/merge.d.ts +30 -0
- package/dist/surfaces/merge.js +105 -0
- package/dist/surfaces/ownership.d.ts +190 -0
- package/dist/surfaces/ownership.js +795 -0
- package/dist/surfaces/projection.d.ts +136 -0
- package/dist/surfaces/projection.js +716 -0
- package/dist/surfaces/render.d.ts +79 -0
- package/dist/surfaces/render.js +636 -0
- package/dist/surfaces/restrictions.d.ts +130 -0
- package/dist/surfaces/restrictions.js +447 -0
- package/dist/surfaces/selftest.d.ts +162 -0
- package/dist/surfaces/selftest.js +393 -0
- package/dist/surfaces/skill-contract.d.ts +85 -0
- package/dist/surfaces/skill-contract.js +449 -0
- package/dist/surfaces/sync.d.ts +57 -0
- package/dist/surfaces/sync.js +164 -0
- package/dist/team-metadata.d.ts +41 -0
- package/dist/team-metadata.js +513 -0
- package/dist/testing/gates.d.ts +91 -0
- package/dist/testing/gates.js +182 -0
- package/dist/testing/hooks.d.ts +59 -0
- package/dist/testing/hooks.js +139 -0
- package/dist/testing/test-protection.d.ts +34 -0
- package/dist/testing/test-protection.js +137 -0
- package/dist/testing/verdict.d.ts +29 -0
- package/dist/testing/verdict.js +62 -0
- package/dist/testing/weakening.d.ts +15 -0
- package/dist/testing/weakening.js +30 -0
- package/dist/work-orders/application-closure.d.ts +7 -0
- package/dist/work-orders/application-closure.js +76 -0
- package/dist/work-orders/application-context.d.ts +162 -0
- package/dist/work-orders/application-context.js +137 -0
- package/dist/work-orders/application-decisions.d.ts +27 -0
- package/dist/work-orders/application-decisions.js +121 -0
- package/dist/work-orders/application-grading.d.ts +11 -0
- package/dist/work-orders/application-grading.js +212 -0
- package/dist/work-orders/application.d.ts +6 -0
- package/dist/work-orders/application.js +223 -0
- package/dist/work-orders/composition.d.ts +101 -0
- package/dist/work-orders/composition.js +1202 -0
- package/dist/work-orders/contract.d.ts +77 -0
- package/dist/work-orders/contract.js +140 -0
- package/dist/work-orders/decisions.d.ts +23 -0
- package/dist/work-orders/decisions.js +55 -0
- package/dist/work-orders/store.d.ts +207 -0
- package/dist/work-orders/store.js +291 -0
- package/docs/README.md +68 -0
- package/docs/architecture.md +136 -0
- package/docs/capability-matrix.md +58 -0
- package/docs/cli-reference.md +807 -0
- package/docs/command-list.md +62 -0
- package/docs/compose-patterns.md +99 -0
- package/docs/concepts.md +173 -0
- package/docs/configuration-essentials.md +177 -0
- package/docs/configuration-reference.md +636 -0
- package/docs/docs-check.md +76 -0
- package/docs/environment.md +948 -0
- package/docs/extending.md +43 -0
- package/docs/faq.md +113 -0
- package/docs/getting-started.md +692 -0
- package/docs/harness-surfaces.md +500 -0
- package/docs/joining-a-team.md +76 -0
- package/docs/release-policy.md +49 -0
- package/docs/safety-and-autonomy.md +463 -0
- package/docs/troubleshooting.md +382 -0
- package/docs/tutorial.md +171 -0
- package/docs/work-and-browser.md +420 -0
- package/libexec/browser-operation.cjs +270 -0
- package/libexec/fence-marker.cjs +101 -0
- package/libexec/fence-marker.d.cts +24 -0
- package/libexec/fenced-group-runner.cjs +77 -0
- package/libexec/fenced-supervisor.cjs +137 -0
- package/libexec/generated-filesystem.cjs +731 -0
- package/libexec/install-filesystem.cjs +225 -0
- package/libexec/rulesync-generator.NOTICE.md +1112 -0
- package/libexec/rulesync-generator.cjs +743 -0
- package/libexec/surface-generator-worker.cjs +266 -0
- package/libexec/surface-output-reader.cjs +99 -0
- package/libexec/surface-scratch-cleanup.cjs +14 -0
- package/libexec/validate-harness-evidence.d.mts +183 -0
- package/libexec/validate-harness-evidence.mjs +1312 -0
- package/package.json +74 -4
- package/surfaces/README.md +33 -0
- package/surfaces/agents/evaluator.agent.md +76 -0
- package/surfaces/guards/bash-guard.sh +48 -0
- package/surfaces/guards/claude.adapter.json +25 -0
- package/surfaces/guards/codex.adapter.json +24 -0
- package/surfaces/guards/opencode.adapter.json +25 -0
- package/surfaces/references/browser.md +63 -0
- package/surfaces/references/test-data-and-personas.md +84 -0
- package/surfaces/references/testing-tiers.md +11 -0
- package/surfaces/skills/cockpit-browser.skill.md +59 -0
- package/surfaces/skills/cockpit-explain.skill.md +32 -0
- package/surfaces/skills/cockpit-fix.skill.md +37 -0
- package/surfaces/skills/cockpit-setup.skill.md +39 -0
- package/surfaces/skills/cockpit-work.skill.md +34 -0
- package/surfaces/skills/collection.json +5 -0
- package/surfaces/skills/procedures/explain.md +66 -0
- package/surfaces/skills/procedures/fix.md +95 -0
- package/surfaces/skills/procedures/setup.md +452 -0
- package/surfaces/skills/procedures/work.md +134 -0
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
export declare const HARNESS_REGISTRY: readonly [Readonly<{
|
|
2
|
+
target: "claudecode";
|
|
3
|
+
type: 'agent';
|
|
4
|
+
displayName: "Claude Code";
|
|
5
|
+
rulesyncTarget: "claudecode";
|
|
6
|
+
rulesyncFeatures: readonly ["rules", "mcp", "subagents", "skills", "hooks", "permissions"];
|
|
7
|
+
outputs: Readonly<{
|
|
8
|
+
instruction: "CLAUDE.md";
|
|
9
|
+
skills: ".claude/skills";
|
|
10
|
+
mcp: ".mcp.json";
|
|
11
|
+
permissions: readonly string[];
|
|
12
|
+
}>;
|
|
13
|
+
guard: Readonly<{
|
|
14
|
+
capability: 'instructed';
|
|
15
|
+
firing: Readonly<{
|
|
16
|
+
state: 'enforced';
|
|
17
|
+
evidence: 'not_applicable';
|
|
18
|
+
measuredOn: "2026-11-01";
|
|
19
|
+
measuredVersion: "2.1.316";
|
|
20
|
+
provenance: "with the exact push pre-allowed by permissions, the hook refused git push to a protected branch and the remote stayed empty while git status ran; the same checkout without the hook pushed";
|
|
21
|
+
}>;
|
|
22
|
+
}>;
|
|
23
|
+
native: Readonly<{
|
|
24
|
+
state: 'instructed';
|
|
25
|
+
reason: "a person has not yet reviewed whether the tool loads and triggers them as written";
|
|
26
|
+
}>;
|
|
27
|
+
sessionStart: Readonly<{
|
|
28
|
+
state: 'instructed';
|
|
29
|
+
evidence: 'not_applicable';
|
|
30
|
+
measuredOn: "2026-11-03";
|
|
31
|
+
measuredVersion: "2.1.317";
|
|
32
|
+
provenance: "a SessionStart hook in .claude/settings.json ran under claude -p and the agent quoted its stdout back, while a hook under a misspelled event name never ran and Claude Code named it as ignored";
|
|
33
|
+
}>;
|
|
34
|
+
remoteMcp: Readonly<{
|
|
35
|
+
evidence: 'not_applicable' | 'human_needed';
|
|
36
|
+
measuredVersion: string;
|
|
37
|
+
helper: boolean;
|
|
38
|
+
provenance: string;
|
|
39
|
+
state: 'instructed';
|
|
40
|
+
headers: true;
|
|
41
|
+
measuredOn: "2026-11-04";
|
|
42
|
+
}>;
|
|
43
|
+
servedCheckoutGrant: Readonly<{
|
|
44
|
+
state: 'enforced' | 'unavailable';
|
|
45
|
+
evidence: 'not_applicable' | 'human_needed';
|
|
46
|
+
measuredVersion: string | null;
|
|
47
|
+
provenance: string;
|
|
48
|
+
measuredOn: "2026-11-04";
|
|
49
|
+
}>;
|
|
50
|
+
}>, Readonly<{
|
|
51
|
+
target: "codexcli";
|
|
52
|
+
type: 'agent';
|
|
53
|
+
displayName: "Codex";
|
|
54
|
+
rulesyncTarget: "codexcli";
|
|
55
|
+
rulesyncFeatures: readonly ["rules", "mcp", "subagents", "skills", "hooks", "permissions"];
|
|
56
|
+
outputs: Readonly<{
|
|
57
|
+
instruction: "AGENTS.md";
|
|
58
|
+
skills: ".agents/skills";
|
|
59
|
+
mcp: ".codex/config.toml";
|
|
60
|
+
permissions: readonly string[];
|
|
61
|
+
}>;
|
|
62
|
+
guard: Readonly<{
|
|
63
|
+
capability: 'instructed';
|
|
64
|
+
firing: Readonly<{
|
|
65
|
+
state: 'enforced';
|
|
66
|
+
evidence: 'human_needed';
|
|
67
|
+
measuredOn: "2026-11-01";
|
|
68
|
+
measuredVersion: "0.165.0";
|
|
69
|
+
provenance: "only after a person trusts the hook: untrusted, Codex skipped it and git push ran; trusted (forced with --dangerously-bypass-hook-trust), it refused the push. Trust is per machine and cockpit doctor warns until it is given";
|
|
70
|
+
}>;
|
|
71
|
+
}>;
|
|
72
|
+
native: Readonly<{
|
|
73
|
+
state: 'instructed';
|
|
74
|
+
reason: "a person has not yet reviewed whether the tool loads and triggers them as written";
|
|
75
|
+
}>;
|
|
76
|
+
sessionStart: Readonly<{
|
|
77
|
+
state: 'instructed';
|
|
78
|
+
evidence: 'human_needed';
|
|
79
|
+
measuredOn: "2026-11-03";
|
|
80
|
+
measuredVersion: "0.166.0";
|
|
81
|
+
provenance: "only after a person trusts the hook, as for the guard: a trusted SessionStart hook in .codex/hooks.json ran under codex exec and the agent quoted its stdout back, while a hook under a misspelled event name never ran";
|
|
82
|
+
}>;
|
|
83
|
+
remoteMcp: Readonly<{
|
|
84
|
+
evidence: 'not_applicable' | 'human_needed';
|
|
85
|
+
measuredVersion: string;
|
|
86
|
+
helper: boolean;
|
|
87
|
+
provenance: string;
|
|
88
|
+
state: 'instructed';
|
|
89
|
+
headers: true;
|
|
90
|
+
measuredOn: "2026-11-04";
|
|
91
|
+
}>;
|
|
92
|
+
servedCheckoutGrant: Readonly<{
|
|
93
|
+
state: 'enforced' | 'unavailable';
|
|
94
|
+
evidence: 'not_applicable' | 'human_needed';
|
|
95
|
+
measuredVersion: string | null;
|
|
96
|
+
provenance: string;
|
|
97
|
+
measuredOn: "2026-11-04";
|
|
98
|
+
}>;
|
|
99
|
+
}>, Readonly<{
|
|
100
|
+
target: "opencode";
|
|
101
|
+
type: 'agent';
|
|
102
|
+
displayName: "OpenCode";
|
|
103
|
+
rulesyncTarget: "opencodev1";
|
|
104
|
+
rulesyncFeatures: readonly ["rules", "mcp", "subagents", "skills", "hooks"];
|
|
105
|
+
outputs: Readonly<{
|
|
106
|
+
instruction: "AGENTS.md";
|
|
107
|
+
skills: ".opencode/skills";
|
|
108
|
+
mcp: "opencode.jsonc";
|
|
109
|
+
permissions: readonly string[];
|
|
110
|
+
}>;
|
|
111
|
+
guard: Readonly<{
|
|
112
|
+
capability: 'instructed';
|
|
113
|
+
firing: Readonly<{
|
|
114
|
+
state: 'enforced';
|
|
115
|
+
evidence: 'not_applicable';
|
|
116
|
+
measuredOn: "2026-11-01";
|
|
117
|
+
measuredVersion: "1.19.4";
|
|
118
|
+
provenance: "the plugin refused git push and a native read of a secrets file while an unprotected read stayed allowed; before read was routed through the guard, the same read returned the file";
|
|
119
|
+
}>;
|
|
120
|
+
}>;
|
|
121
|
+
native: Readonly<{
|
|
122
|
+
state: 'instructed';
|
|
123
|
+
reason: "a person has not yet reviewed whether the tool loads and triggers them as written";
|
|
124
|
+
}>;
|
|
125
|
+
sessionStart: {
|
|
126
|
+
state: 'unavailable';
|
|
127
|
+
evidence: 'not_applicable';
|
|
128
|
+
measuredOn: string;
|
|
129
|
+
measuredVersion: null;
|
|
130
|
+
provenance: string;
|
|
131
|
+
};
|
|
132
|
+
remoteMcp: Readonly<{
|
|
133
|
+
evidence: 'not_applicable' | 'human_needed';
|
|
134
|
+
measuredVersion: string;
|
|
135
|
+
helper: boolean;
|
|
136
|
+
provenance: string;
|
|
137
|
+
state: 'instructed';
|
|
138
|
+
headers: true;
|
|
139
|
+
measuredOn: "2026-11-04";
|
|
140
|
+
}>;
|
|
141
|
+
servedCheckoutGrant: Readonly<{
|
|
142
|
+
state: 'enforced' | 'unavailable';
|
|
143
|
+
evidence: 'not_applicable' | 'human_needed';
|
|
144
|
+
measuredVersion: string | null;
|
|
145
|
+
provenance: string;
|
|
146
|
+
measuredOn: "2026-11-04";
|
|
147
|
+
}>;
|
|
148
|
+
}>, Readonly<{
|
|
149
|
+
target: "cursor";
|
|
150
|
+
type: 'agent';
|
|
151
|
+
displayName: "Cursor";
|
|
152
|
+
rulesyncTarget: "cursor";
|
|
153
|
+
rulesyncFeatures: readonly ["rules", "mcp", "subagents", "skills", "hooks", "permissions"];
|
|
154
|
+
outputs: Readonly<{
|
|
155
|
+
instruction: ".cursor/rules";
|
|
156
|
+
skills: ".cursor/skills";
|
|
157
|
+
mcp: ".cursor/mcp.json";
|
|
158
|
+
permissions: readonly string[];
|
|
159
|
+
}>;
|
|
160
|
+
guard: Readonly<{
|
|
161
|
+
capability: 'unavailable';
|
|
162
|
+
measuredOn: "2026-10-28";
|
|
163
|
+
reason: "no guard adapter is checked in, so cockpit generates no guard hook";
|
|
164
|
+
}>;
|
|
165
|
+
native: Readonly<{
|
|
166
|
+
state: 'generated';
|
|
167
|
+
measuredOn: "2026-10-28";
|
|
168
|
+
reason: "cockpit writes the files, but no run of the tool beside a broken control has shown that it loads them";
|
|
169
|
+
}>;
|
|
170
|
+
sessionStart: {
|
|
171
|
+
state: 'unavailable';
|
|
172
|
+
evidence: 'not_applicable';
|
|
173
|
+
measuredOn: string;
|
|
174
|
+
measuredVersion: null;
|
|
175
|
+
provenance: string;
|
|
176
|
+
};
|
|
177
|
+
remoteMcp: Readonly<{
|
|
178
|
+
state: 'unavailable';
|
|
179
|
+
evidence: 'not_applicable';
|
|
180
|
+
headers: false;
|
|
181
|
+
helper: false;
|
|
182
|
+
measuredOn: "2026-11-04";
|
|
183
|
+
measuredVersion: null;
|
|
184
|
+
provenance: "cockpit writes no remote MCP server for this tool: its remote transport and header spelling have not been checked";
|
|
185
|
+
}>;
|
|
186
|
+
servedCheckoutGrant: Readonly<{
|
|
187
|
+
state: 'enforced' | 'unavailable';
|
|
188
|
+
evidence: 'not_applicable' | 'human_needed';
|
|
189
|
+
measuredVersion: string | null;
|
|
190
|
+
provenance: string;
|
|
191
|
+
measuredOn: "2026-11-04";
|
|
192
|
+
}>;
|
|
193
|
+
}>, Readonly<{
|
|
194
|
+
target: "grokcli";
|
|
195
|
+
type: 'agent';
|
|
196
|
+
displayName: "Grok Build";
|
|
197
|
+
rulesyncTarget: "grokcli";
|
|
198
|
+
rulesyncFeatures: readonly ["rules", "mcp", "subagents", "skills", "hooks", "permissions"];
|
|
199
|
+
outputs: Readonly<{
|
|
200
|
+
instruction: "AGENTS.md";
|
|
201
|
+
skills: ".grok/skills";
|
|
202
|
+
mcp: ".grok/config.toml";
|
|
203
|
+
permissions: readonly string[];
|
|
204
|
+
}>;
|
|
205
|
+
guard: Readonly<{
|
|
206
|
+
capability: 'unavailable';
|
|
207
|
+
measuredOn: "2026-10-28";
|
|
208
|
+
reason: "no guard adapter is checked in, so cockpit generates no guard hook";
|
|
209
|
+
}>;
|
|
210
|
+
native: Readonly<{
|
|
211
|
+
state: 'generated';
|
|
212
|
+
measuredOn: "2026-10-28";
|
|
213
|
+
reason: "cockpit writes the files, but no run of the tool beside a broken control has shown that it loads them";
|
|
214
|
+
}>;
|
|
215
|
+
sessionStart: {
|
|
216
|
+
state: 'unavailable';
|
|
217
|
+
evidence: 'not_applicable';
|
|
218
|
+
measuredOn: string;
|
|
219
|
+
measuredVersion: null;
|
|
220
|
+
provenance: string;
|
|
221
|
+
};
|
|
222
|
+
remoteMcp: Readonly<{
|
|
223
|
+
state: 'unavailable';
|
|
224
|
+
evidence: 'not_applicable';
|
|
225
|
+
headers: false;
|
|
226
|
+
helper: false;
|
|
227
|
+
measuredOn: "2026-11-04";
|
|
228
|
+
measuredVersion: null;
|
|
229
|
+
provenance: "cockpit writes no remote MCP server for this tool: its remote transport and header spelling have not been checked";
|
|
230
|
+
}>;
|
|
231
|
+
servedCheckoutGrant: Readonly<{
|
|
232
|
+
state: 'enforced' | 'unavailable';
|
|
233
|
+
evidence: 'not_applicable' | 'human_needed';
|
|
234
|
+
measuredVersion: string | null;
|
|
235
|
+
provenance: string;
|
|
236
|
+
measuredOn: "2026-11-04";
|
|
237
|
+
}>;
|
|
238
|
+
}>];
|
|
239
|
+
export type HarnessRegistryRow = typeof HARNESS_REGISTRY[number];
|
|
240
|
+
export type SurfaceTarget = HarnessRegistryRow['target'];
|
|
241
|
+
export type GuardSurfaceTarget = Extract<HarnessRegistryRow, {
|
|
242
|
+
readonly guard: {
|
|
243
|
+
readonly capability: 'instructed';
|
|
244
|
+
};
|
|
245
|
+
}>['target'];
|
|
246
|
+
export declare const SURFACE_TARGETS: readonly SurfaceTarget[];
|
|
247
|
+
export declare const GUARD_SURFACE_TARGETS: readonly GuardSurfaceTarget[];
|
|
248
|
+
export declare const DEFAULT_SURFACE_TOOLS: readonly ("claudecode" | "codexcli" | "opencode")[];
|
|
249
|
+
/** The listed tools in registry order, so rendering and drift do not depend on how the list is spelled. */
|
|
250
|
+
export declare function listedSurfaceTargets(tools: readonly string[]): readonly SurfaceTarget[];
|
|
251
|
+
export declare const SURFACE_EXECUTION_CONTROL_PATHS: readonly string[];
|
|
252
|
+
export declare const SURFACE_PUBLICATION_ANCHORS: readonly string[];
|
|
253
|
+
export declare function isGuardSurfaceTarget(value: unknown): value is GuardSurfaceTarget;
|
|
254
|
+
/**
|
|
255
|
+
* A date a capability was measured on: a real calendar day, written YYYY-MM-DD, that is not still
|
|
256
|
+
* to come. Re-measuring a tool changes its date here and in the rows that quote it; the shape is
|
|
257
|
+
* checked rather than pinned to one literal, so a new run does not mean editing a type and a guard.
|
|
258
|
+
*/
|
|
259
|
+
export declare function isMeasurementDate(value: unknown, today?: Date): value is string;
|
|
260
|
+
export declare function harnessFact(target: SurfaceTarget): HarnessRegistryRow;
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
// Guard firing and instruction loading for these harnesses are dated runs (the firing records below
|
|
2
|
+
// and the projection's instruction capabilities), so this record claims no pending measurement for
|
|
3
|
+
// them; what stays open is a person's review of the rendered skills.
|
|
4
|
+
const reviewedNative = Object.freeze({
|
|
5
|
+
state: 'instructed',
|
|
6
|
+
reason: 'a person has not yet reviewed whether the tool loads and triggers them as written',
|
|
7
|
+
});
|
|
8
|
+
// Cockpit writes rules, skills, MCP and permission files for these harnesses through the
|
|
9
|
+
// generator, so `unavailable` (nothing emitted) would be false; nothing yet shows the tool reads them.
|
|
10
|
+
const generatedNative = Object.freeze({
|
|
11
|
+
state: 'generated',
|
|
12
|
+
measuredOn: '2026-10-28',
|
|
13
|
+
reason: 'cockpit writes the files, but no run of the tool beside a broken control has shown that it loads them',
|
|
14
|
+
});
|
|
15
|
+
const noGuardAdapter = Object.freeze({
|
|
16
|
+
capability: 'unavailable',
|
|
17
|
+
measuredOn: '2026-10-28',
|
|
18
|
+
reason: 'no guard adapter is checked in, so cockpit generates no guard hook',
|
|
19
|
+
});
|
|
20
|
+
// A dated run of the real tool against the generated guard. It replaces the adapter's own record in
|
|
21
|
+
// the capability matrix only while that adapter stays native; the adapter keeps recording the
|
|
22
|
+
// transport shape it was written against.
|
|
23
|
+
const claudeFiring = Object.freeze({
|
|
24
|
+
state: 'enforced', evidence: 'not_applicable', measuredOn: '2026-11-01', measuredVersion: '2.1.316',
|
|
25
|
+
provenance: 'with the exact push pre-allowed by permissions, the hook refused git push to a protected branch and the remote stayed empty while git status ran; the same checkout without the hook pushed',
|
|
26
|
+
});
|
|
27
|
+
const codexFiring = Object.freeze({
|
|
28
|
+
state: 'enforced', evidence: 'human_needed', measuredOn: '2026-11-01', measuredVersion: '0.165.0',
|
|
29
|
+
provenance: 'only after a person trusts the hook: untrusted, Codex skipped it and git push ran; trusted (forced with --dangerously-bypass-hook-trust), it refused the push. Trust is per machine and cockpit doctor warns until it is given',
|
|
30
|
+
});
|
|
31
|
+
const openCodeFiring = Object.freeze({
|
|
32
|
+
state: 'enforced', evidence: 'not_applicable', measuredOn: '2026-11-01', measuredVersion: '1.19.4',
|
|
33
|
+
provenance: 'the plugin refused git push and a native read of a secrets file while an unprotected read stayed allowed; before read was routed through the guard, the same read returned the file',
|
|
34
|
+
});
|
|
35
|
+
// The session-start drift check is guidance: the tool runs `cockpit check` as a session starts and
|
|
36
|
+
// shows its report to the agent, which nothing makes act on it. Each run below put a marker line from
|
|
37
|
+
// the hook into the agent's context, beside a misspelled event that never ran.
|
|
38
|
+
const claudeSessionStart = Object.freeze({
|
|
39
|
+
state: 'instructed', evidence: 'not_applicable', measuredOn: '2026-11-03', measuredVersion: '2.1.317',
|
|
40
|
+
provenance: 'a SessionStart hook in .claude/settings.json ran under claude -p and the agent quoted its stdout back, while a hook under a misspelled event name never ran and Claude Code named it as ignored',
|
|
41
|
+
});
|
|
42
|
+
const codexSessionStart = Object.freeze({
|
|
43
|
+
state: 'instructed', evidence: 'human_needed', measuredOn: '2026-11-03', measuredVersion: '0.166.0',
|
|
44
|
+
provenance: 'only after a person trusts the hook, as for the guard: a trusted SessionStart hook in .codex/hooks.json ran under codex exec and the agent quoted its stdout back, while a hook under a misspelled event name never ran',
|
|
45
|
+
});
|
|
46
|
+
const noSessionStart = (reason) => ({ state: 'unavailable', evidence: 'not_applicable', measuredOn: '2026-11-03', measuredVersion: null, provenance: reason });
|
|
47
|
+
// What each tool's native MCP file can say for a remote (streamable HTTP) server. A header must come
|
|
48
|
+
// from an environment reference or a headers helper, never a literal; a tool that cannot express a
|
|
49
|
+
// server's credential gets nothing for that server, because a server written without it would start,
|
|
50
|
+
// fail to authenticate and read as configured. Each run connected the tool to a loopback server that
|
|
51
|
+
// recorded the request headers, beside a control spelled the way the tool does not read.
|
|
52
|
+
const remoteMcpMeasured = (fact) => Object.freeze({ state: 'instructed', headers: true, measuredOn: '2026-11-04', ...fact });
|
|
53
|
+
const noRemoteMcp = Object.freeze({ state: 'unavailable', evidence: 'not_applicable', headers: false, helper: false,
|
|
54
|
+
measuredOn: '2026-11-04', measuredVersion: null,
|
|
55
|
+
provenance: 'cockpit writes no remote MCP server for this tool: its remote transport and header spelling have not been checked' });
|
|
56
|
+
// Whether `cockpit use` can grant a checkout served from outside the declared one through a
|
|
57
|
+
// machine-local file the tool reads. Each run wrote into the granted directory and into an
|
|
58
|
+
// ungranted control beside it.
|
|
59
|
+
const servedGrant = (fact) => Object.freeze({ measuredOn: '2026-11-04', ...fact });
|
|
60
|
+
const noServedGrant = servedGrant({ state: 'unavailable', evidence: 'not_applicable', measuredVersion: null,
|
|
61
|
+
provenance: 'the tool was not installed where this was measured, so cockpit use writes nothing for it' });
|
|
62
|
+
const completeRulesyncFeatures = Object.freeze(['rules', 'mcp', 'subagents', 'skills', 'hooks', 'permissions']);
|
|
63
|
+
const nonPermissionRulesyncFeatures = Object.freeze(['rules', 'mcp', 'subagents', 'skills', 'hooks']);
|
|
64
|
+
export const HARNESS_REGISTRY = Object.freeze([
|
|
65
|
+
Object.freeze({
|
|
66
|
+
target: 'claudecode', type: 'agent', displayName: 'Claude Code', rulesyncTarget: 'claudecode',
|
|
67
|
+
rulesyncFeatures: completeRulesyncFeatures,
|
|
68
|
+
outputs: Object.freeze({ instruction: 'CLAUDE.md', skills: '.claude/skills', mcp: '.mcp.json', permissions: Object.freeze(['.claude/settings.json']) }),
|
|
69
|
+
guard: Object.freeze({ capability: 'instructed', firing: claudeFiring }), native: reviewedNative, sessionStart: claudeSessionStart,
|
|
70
|
+
remoteMcp: remoteMcpMeasured({ evidence: 'human_needed', measuredVersion: '2.1.318', helper: true,
|
|
71
|
+
provenance: 'from a project .mcp.json, Claude Code sent the Authorization header a ${NAME} reference named while a $NAME control went out literally; it ran a headersHelper given with --mcp-config, but refused to run one from the project file until a person trusts the workspace, and a misspelled headerHelper sent nothing' }),
|
|
72
|
+
servedCheckoutGrant: servedGrant({ state: 'enforced', evidence: 'human_needed', measuredVersion: '2.1.318',
|
|
73
|
+
provenance: 'a directory in .claude/settings.local.json permissions.additionalDirectories was written and the control refused, and a malformed twin granted nothing; measured in an untrusted workspace, so whether it combines with the committed list once a person trusts the workspace is unmeasured' }),
|
|
74
|
+
}),
|
|
75
|
+
Object.freeze({
|
|
76
|
+
target: 'codexcli', type: 'agent', displayName: 'Codex', rulesyncTarget: 'codexcli',
|
|
77
|
+
rulesyncFeatures: completeRulesyncFeatures,
|
|
78
|
+
outputs: Object.freeze({ instruction: 'AGENTS.md', skills: '.agents/skills', mcp: '.codex/config.toml', permissions: Object.freeze(['.codex/config.toml']) }),
|
|
79
|
+
guard: Object.freeze({ capability: 'instructed', firing: codexFiring }), native: reviewedNative, sessionStart: codexSessionStart,
|
|
80
|
+
remoteMcp: remoteMcpMeasured({ evidence: 'not_applicable', measuredVersion: '0.166.0', helper: true,
|
|
81
|
+
provenance: 'from a project .codex/config.toml in a directory Codex had not been told to trust, codex exec sent the bearer_token_env_var and env_http_headers values and the http_headers_helper output, named a misspelled http_header_helper as ignored, and sent a ${NAME} written in http_headers literally' }),
|
|
82
|
+
servedCheckoutGrant: servedGrant({ state: 'unavailable', evidence: 'not_applicable', measuredVersion: '0.166.0',
|
|
83
|
+
provenance: 'Codex reads no machine-local project file; --add-dir at start made the worktree writable and without it the write was refused, so cockpit use prints that flag and writes nothing' }),
|
|
84
|
+
}),
|
|
85
|
+
Object.freeze({
|
|
86
|
+
target: 'opencode', type: 'agent', displayName: 'OpenCode', rulesyncTarget: 'opencodev1',
|
|
87
|
+
rulesyncFeatures: nonPermissionRulesyncFeatures,
|
|
88
|
+
outputs: Object.freeze({ instruction: 'AGENTS.md', skills: '.opencode/skills', mcp: 'opencode.jsonc', permissions: Object.freeze(['opencode.jsonc']) }),
|
|
89
|
+
guard: Object.freeze({ capability: 'instructed', firing: openCodeFiring }), native: reviewedNative,
|
|
90
|
+
// OpenCode 1.19.5 delivered session.created to a project plugin beside a misspelled hook that
|
|
91
|
+
// never ran, but its model call failed, so no plugin hook was shown to put text in the agent's context.
|
|
92
|
+
sessionStart: noSessionStart('OpenCode 1.19.5 delivers session.created to a plugin, but no run has shown a plugin putting text in the agent\'s context, so cockpit generates no session-start check'),
|
|
93
|
+
remoteMcp: remoteMcpMeasured({ evidence: 'not_applicable', measuredVersion: '1.19.5', helper: false,
|
|
94
|
+
provenance: 'opencode mcp list sent headers expanded from {env:NAME} in a project opencode.jsonc while a ${NAME} control went out literally; its remote server schema has no headers helper, so a server that declares one is not written for it' }),
|
|
95
|
+
servedCheckoutGrant: servedGrant({ state: 'enforced', evidence: 'not_applicable', measuredVersion: '1.19.5',
|
|
96
|
+
provenance: 'the machine-local grant file holding the worktree path allowed the write and the control was denied, and a pattern naming a missing grant file stopped OpenCode at start, naming the file' }),
|
|
97
|
+
}),
|
|
98
|
+
Object.freeze({
|
|
99
|
+
target: 'cursor', type: 'agent', displayName: 'Cursor', rulesyncTarget: 'cursor',
|
|
100
|
+
rulesyncFeatures: completeRulesyncFeatures,
|
|
101
|
+
// Rules overlays only: cockpit's own instructions reach Cursor through the root AGENTS.md.
|
|
102
|
+
outputs: Object.freeze({ instruction: '.cursor/rules', skills: '.cursor/skills', mcp: '.cursor/mcp.json', permissions: Object.freeze(['.cursor/cli.json']) }),
|
|
103
|
+
guard: noGuardAdapter, native: generatedNative, sessionStart: noSessionStart('cockpit generates no hook for this tool'),
|
|
104
|
+
remoteMcp: noRemoteMcp, servedCheckoutGrant: noServedGrant,
|
|
105
|
+
}),
|
|
106
|
+
Object.freeze({
|
|
107
|
+
target: 'grokcli', type: 'agent', displayName: 'Grok Build', rulesyncTarget: 'grokcli',
|
|
108
|
+
rulesyncFeatures: completeRulesyncFeatures,
|
|
109
|
+
outputs: Object.freeze({ instruction: 'AGENTS.md', skills: '.grok/skills', mcp: '.grok/config.toml', permissions: Object.freeze(['.grok/config.toml']) }),
|
|
110
|
+
guard: noGuardAdapter, native: generatedNative, sessionStart: noSessionStart('cockpit generates no hook for this tool'),
|
|
111
|
+
remoteMcp: noRemoteMcp, servedCheckoutGrant: noServedGrant,
|
|
112
|
+
}),
|
|
113
|
+
]);
|
|
114
|
+
export const SURFACE_TARGETS = Object.freeze(HARNESS_REGISTRY.map(row => row.target));
|
|
115
|
+
export const GUARD_SURFACE_TARGETS = Object.freeze(HARNESS_REGISTRY
|
|
116
|
+
.filter((row) => row.guard.capability === 'instructed')
|
|
117
|
+
.map(row => row.target));
|
|
118
|
+
// The tools a cockpit renders when cockpit.toml lists none: the ones whose guard firing is a dated run
|
|
119
|
+
// of the real tool. A tool the matrix has not measured is rendered only when a team lists it.
|
|
120
|
+
export const DEFAULT_SURFACE_TOOLS = GUARD_SURFACE_TARGETS;
|
|
121
|
+
/** The listed tools in registry order, so rendering and drift do not depend on how the list is spelled. */
|
|
122
|
+
export function listedSurfaceTargets(tools) {
|
|
123
|
+
return SURFACE_TARGETS.filter(target => tools.includes(target));
|
|
124
|
+
}
|
|
125
|
+
// Native MCP and permission outputs can select executable programs or relax harness authority.
|
|
126
|
+
// The guard derives its protected files from this owner so a new harness cannot omit the boundary.
|
|
127
|
+
export const SURFACE_EXECUTION_CONTROL_PATHS = Object.freeze([...new Set(HARNESS_REGISTRY.flatMap(row => [row.outputs.mcp, ...row.outputs.permissions]))].sort());
|
|
128
|
+
export const SURFACE_PUBLICATION_ANCHORS = Object.freeze([...new Set(HARNESS_REGISTRY.flatMap(row => [row.outputs.instruction, row.outputs.skills, row.outputs.mcp, ...row.outputs.permissions]
|
|
129
|
+
.filter(path => path.includes('/')).map(path => path.split('/')[0]).filter(path => path.startsWith('.'))))].sort());
|
|
130
|
+
export function isGuardSurfaceTarget(value) {
|
|
131
|
+
return typeof value === 'string' && GUARD_SURFACE_TARGETS.some(target => target === value);
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* A date a capability was measured on: a real calendar day, written YYYY-MM-DD, that is not still
|
|
135
|
+
* to come. Re-measuring a tool changes its date here and in the rows that quote it; the shape is
|
|
136
|
+
* checked rather than pinned to one literal, so a new run does not mean editing a type and a guard.
|
|
137
|
+
*/
|
|
138
|
+
export function isMeasurementDate(value, today = new Date()) {
|
|
139
|
+
if (typeof value !== 'string' || !/^\d{4}-\d{2}-\d{2}$/.test(value))
|
|
140
|
+
return false;
|
|
141
|
+
const parsed = new Date(`${value}T00:00:00.000Z`);
|
|
142
|
+
return !Number.isNaN(parsed.valueOf()) && parsed.toISOString().slice(0, 10) === value && value <= today.toISOString().slice(0, 10);
|
|
143
|
+
}
|
|
144
|
+
export function harnessFact(target) {
|
|
145
|
+
return HARNESS_REGISTRY.find(row => row.target === target);
|
|
146
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { type SurfaceSourceFile, type SurfaceTarget } from './contract.js';
|
|
3
|
+
declare const Source: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4
|
+
kind: z.ZodLiteral<"core">;
|
|
5
|
+
path: z.ZodString;
|
|
6
|
+
sha256: z.ZodString;
|
|
7
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
8
|
+
kind: z.ZodLiteral<"overlay">;
|
|
9
|
+
path: z.ZodString;
|
|
10
|
+
sha256: z.ZodString;
|
|
11
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
12
|
+
kind: z.ZodLiteral<"sibling">;
|
|
13
|
+
path: z.ZodString;
|
|
14
|
+
sha256: z.ZodString;
|
|
15
|
+
slug: z.ZodString;
|
|
16
|
+
}, z.core.$strict>], "kind">;
|
|
17
|
+
declare const StdioDeclaration: z.ZodObject<{
|
|
18
|
+
name: z.ZodString;
|
|
19
|
+
command: z.ZodString;
|
|
20
|
+
args: z.ZodArray<z.ZodString>;
|
|
21
|
+
cwd: z.ZodString;
|
|
22
|
+
envNames: z.ZodArray<z.ZodString>;
|
|
23
|
+
source: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
24
|
+
kind: z.ZodLiteral<"core">;
|
|
25
|
+
path: z.ZodString;
|
|
26
|
+
sha256: z.ZodString;
|
|
27
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
28
|
+
kind: z.ZodLiteral<"overlay">;
|
|
29
|
+
path: z.ZodString;
|
|
30
|
+
sha256: z.ZodString;
|
|
31
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
32
|
+
kind: z.ZodLiteral<"sibling">;
|
|
33
|
+
path: z.ZodString;
|
|
34
|
+
sha256: z.ZodString;
|
|
35
|
+
slug: z.ZodString;
|
|
36
|
+
}, z.core.$strict>], "kind">;
|
|
37
|
+
}, z.core.$strict>;
|
|
38
|
+
declare const HttpDeclaration: z.ZodObject<{
|
|
39
|
+
name: z.ZodString;
|
|
40
|
+
transport: z.ZodLiteral<"http">;
|
|
41
|
+
url: z.ZodString;
|
|
42
|
+
headers: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
43
|
+
helper: z.ZodNullable<z.ZodObject<{
|
|
44
|
+
command: z.ZodString;
|
|
45
|
+
args: z.ZodArray<z.ZodString>;
|
|
46
|
+
cwd: z.ZodString;
|
|
47
|
+
}, z.core.$strict>>;
|
|
48
|
+
source: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
49
|
+
kind: z.ZodLiteral<"core">;
|
|
50
|
+
path: z.ZodString;
|
|
51
|
+
sha256: z.ZodString;
|
|
52
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
53
|
+
kind: z.ZodLiteral<"overlay">;
|
|
54
|
+
path: z.ZodString;
|
|
55
|
+
sha256: z.ZodString;
|
|
56
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
57
|
+
kind: z.ZodLiteral<"sibling">;
|
|
58
|
+
path: z.ZodString;
|
|
59
|
+
sha256: z.ZodString;
|
|
60
|
+
slug: z.ZodString;
|
|
61
|
+
}, z.core.$strict>], "kind">;
|
|
62
|
+
}, z.core.$strict>;
|
|
63
|
+
type McpSource = z.infer<typeof Source>;
|
|
64
|
+
export type McpStdioDeclaration = z.infer<typeof StdioDeclaration>;
|
|
65
|
+
export type McpHttpDeclaration = z.infer<typeof HttpDeclaration>;
|
|
66
|
+
type McpDeclaration = McpStdioDeclaration | McpHttpDeclaration;
|
|
67
|
+
export interface McpDiagnostic {
|
|
68
|
+
readonly code: 'MCP_INPUT_INVALID' | 'MCP_DECLARATION_INVALID' | 'MCP_COMMAND_CONFLICT' | 'MCP_NOT_APPROVED' | 'MCP_APPROVAL_UNKNOWN' | 'MCP_TRANSPORT_UNAVAILABLE';
|
|
69
|
+
readonly message: string;
|
|
70
|
+
readonly server?: string;
|
|
71
|
+
readonly sources?: readonly McpSource[];
|
|
72
|
+
/** The approval digest of the server's current declaration, on MCP_NOT_APPROVED. */
|
|
73
|
+
readonly sha256?: string;
|
|
74
|
+
/** The tools a server is not written for, on MCP_TRANSPORT_UNAVAILABLE. */
|
|
75
|
+
readonly targets?: readonly SurfaceTarget[];
|
|
76
|
+
}
|
|
77
|
+
interface McpLaunch {
|
|
78
|
+
readonly command: string;
|
|
79
|
+
readonly args: readonly string[];
|
|
80
|
+
readonly cwd: string;
|
|
81
|
+
}
|
|
82
|
+
export type McpServer = Readonly<{
|
|
83
|
+
name: string;
|
|
84
|
+
command: string;
|
|
85
|
+
args: readonly string[];
|
|
86
|
+
cwd: string;
|
|
87
|
+
envNames: readonly string[];
|
|
88
|
+
enabled: boolean;
|
|
89
|
+
sources: readonly McpSource[];
|
|
90
|
+
}> | Readonly<{
|
|
91
|
+
name: string;
|
|
92
|
+
transport: 'http';
|
|
93
|
+
url: string;
|
|
94
|
+
headers: Readonly<Record<string, string>>;
|
|
95
|
+
helper: McpLaunch | null;
|
|
96
|
+
envNames: readonly string[];
|
|
97
|
+
enabled: boolean;
|
|
98
|
+
sources: readonly McpSource[];
|
|
99
|
+
}>;
|
|
100
|
+
export type McpHarnessServer = Readonly<{
|
|
101
|
+
name: string;
|
|
102
|
+
command: string;
|
|
103
|
+
args: readonly string[];
|
|
104
|
+
enabled: boolean;
|
|
105
|
+
}> | Readonly<{
|
|
106
|
+
name: string;
|
|
107
|
+
url: string;
|
|
108
|
+
headers: Readonly<Record<string, string>>;
|
|
109
|
+
headersHelper: string | null;
|
|
110
|
+
enabled: boolean;
|
|
111
|
+
}>;
|
|
112
|
+
export interface McpCollection {
|
|
113
|
+
readonly servers: readonly McpServer[];
|
|
114
|
+
readonly wrappers: readonly {
|
|
115
|
+
readonly path: string;
|
|
116
|
+
readonly bytes: string;
|
|
117
|
+
readonly sha256: string;
|
|
118
|
+
}[];
|
|
119
|
+
readonly harnesses: readonly {
|
|
120
|
+
readonly target: SurfaceTarget;
|
|
121
|
+
readonly servers: readonly McpHarnessServer[];
|
|
122
|
+
}[];
|
|
123
|
+
}
|
|
124
|
+
export type McpCollectionOutcome = Readonly<{
|
|
125
|
+
kind: 'complete';
|
|
126
|
+
result: McpCollection;
|
|
127
|
+
diagnostics: readonly McpDiagnostic[];
|
|
128
|
+
}> | Readonly<{
|
|
129
|
+
kind: 'refusal';
|
|
130
|
+
diagnostic: McpDiagnostic;
|
|
131
|
+
}>;
|
|
132
|
+
type McpParseOutcome = Readonly<{
|
|
133
|
+
kind: 'complete';
|
|
134
|
+
declarations: readonly McpDeclaration[];
|
|
135
|
+
}> | Readonly<{
|
|
136
|
+
kind: 'refusal';
|
|
137
|
+
diagnostic: McpDiagnostic;
|
|
138
|
+
}>;
|
|
139
|
+
type McpIdentity = Pick<McpStdioDeclaration, 'command' | 'args' | 'cwd' | 'envNames'> | Pick<McpHttpDeclaration, 'transport' | 'url' | 'headers' | 'helper'>;
|
|
140
|
+
/** The digest `[mcp.approved]` records for a server, so a changed declaration is no longer approved. */
|
|
141
|
+
export declare function mcpApprovalDigest(declaration: McpIdentity, cockpitDirectory: string): string;
|
|
142
|
+
export declare function collectMcpDeclarations(input: unknown): McpCollectionOutcome;
|
|
143
|
+
export declare function hasTargetMcpServers(sources: readonly SurfaceSourceFile[], target: SurfaceTarget): boolean;
|
|
144
|
+
export declare function parseMcpDeclarationFile(input: unknown): McpParseOutcome;
|
|
145
|
+
export {};
|