@b00dea/cockpit 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +375 -0
- package/LICENSE +21 -0
- package/README.md +22 -2
- package/bin/cockpit.mjs +33 -0
- package/cockpit.schema.json +2574 -0
- package/dist/autonomy.d.ts +44 -0
- package/dist/autonomy.js +156 -0
- package/dist/bounded-read.d.ts +14 -0
- package/dist/bounded-read.js +42 -0
- package/dist/browser/commands.d.ts +62 -0
- package/dist/browser/commands.js +349 -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 +117 -0
- package/dist/browser/runtime.js +183 -0
- package/dist/browser/surfaces.d.ts +141 -0
- package/dist/browser/surfaces.js +556 -0
- package/dist/browser/ui-gate.d.ts +15 -0
- package/dist/browser/ui-gate.js +18 -0
- package/dist/cli-guard.d.ts +5 -0
- package/dist/cli-guard.js +71 -0
- package/dist/cli-main.d.ts +139 -0
- package/dist/cli-main.js +1405 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.js +16 -0
- package/dist/command-table.d.ts +113 -0
- package/dist/command-table.js +512 -0
- package/dist/config/load.d.ts +171 -0
- package/dist/config/load.js +345 -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/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 +335 -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/destructive.d.ts +6 -0
- package/dist/environment/application/destructive.js +425 -0
- package/dist/environment/application/doctor.d.ts +89 -0
- package/dist/environment/application/doctor.js +235 -0
- package/dist/environment/application/guard.d.ts +43 -0
- package/dist/environment/application/guard.js +622 -0
- package/dist/environment/application/health.d.ts +134 -0
- package/dist/environment/application/health.js +379 -0
- package/dist/environment/application/lifecycle-context.d.ts +228 -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 +201 -0
- package/dist/environment/application/lifecycle.d.ts +17 -0
- package/dist/environment/application/lifecycle.js +729 -0
- package/dist/environment/application/logs.d.ts +45 -0
- package/dist/environment/application/logs.js +127 -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/claims.d.ts +389 -0
- package/dist/environment/claims.js +1709 -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 +117 -0
- package/dist/environment/compose-topology.js +413 -0
- package/dist/environment/contract.d.ts +489 -0
- package/dist/environment/contract.js +761 -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 +26 -0
- package/dist/environment/executable.js +167 -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 +189 -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 +276 -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 +484 -0
- package/dist/environment/generated-application/shared.js +349 -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 +389 -0
- package/dist/environment/generated-application/surfaces.d.ts +3 -0
- package/dist/environment/generated-application/surfaces.js +699 -0
- package/dist/environment/generated-application/sync.d.ts +6 -0
- package/dist/environment/generated-application/sync.js +109 -0
- package/dist/environment/git-observation.d.ts +183 -0
- package/dist/environment/git-observation.js +544 -0
- package/dist/environment/health-composition.d.ts +11 -0
- package/dist/environment/health-composition.js +628 -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 +308 -0
- package/dist/environment/init-application.js +697 -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 +29 -0
- package/dist/environment/lifecycle-composition.js +675 -0
- package/dist/environment/lifecycle-stage.d.ts +115 -0
- package/dist/environment/lifecycle-stage.js +398 -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/observations.d.ts +46 -0
- package/dist/environment/observations.js +344 -0
- package/dist/environment/operator-application.d.ts +50 -0
- package/dist/environment/operator-application.js +155 -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/read-composition.d.ts +27 -0
- package/dist/environment/read-composition.js +352 -0
- package/dist/environment/readiness-composition.d.ts +38 -0
- package/dist/environment/readiness-composition.js +130 -0
- package/dist/environment/reclaim.d.ts +333 -0
- package/dist/environment/reclaim.js +1835 -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 +505 -0
- package/dist/environment/runtime.js +2335 -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/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-instructions.d.ts +33 -0
- package/dist/environment/sibling-instructions.js +224 -0
- package/dist/environment/sibling-registration.d.ts +45 -0
- package/dist/environment/sibling-registration.js +538 -0
- package/dist/environment/state.d.ts +371 -0
- package/dist/environment/state.js +2013 -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 +96 -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 +102 -0
- package/dist/environment-exec/execute.js +1175 -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 +275 -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/evaluator.d.ts +113 -0
- package/dist/guards/evaluator.js +1226 -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 +40 -0
- package/dist/guards/local-identity.js +123 -0
- package/dist/guards/policy-pin.d.ts +13 -0
- package/dist/guards/policy-pin.js +175 -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 +40 -0
- package/dist/init/command.js +310 -0
- package/dist/init/derive.d.ts +51 -0
- package/dist/init/derive.js +715 -0
- package/dist/init/draft.d.ts +138 -0
- package/dist/init/draft.js +1205 -0
- package/dist/init/render.d.ts +35 -0
- package/dist/init/render.js +82 -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/schema-json.d.ts +1 -0
- package/dist/schema-json.js +177 -0
- package/dist/schema.d.ts +1322 -0
- package/dist/schema.js +934 -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 +180 -0
- package/dist/surfaces/harness-registry.js +117 -0
- package/dist/surfaces/mcp.d.ts +95 -0
- package/dist/surfaces/mcp.js +186 -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 +681 -0
- package/dist/surfaces/render.d.ts +118 -0
- package/dist/surfaces/render.js +633 -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 +512 -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/verdict.d.ts +29 -0
- package/dist/testing/verdict.js +62 -0
- package/dist/work-orders/application.d.ts +99 -0
- package/dist/work-orders/application.js +383 -0
- package/dist/work-orders/composition.d.ts +124 -0
- package/dist/work-orders/composition.js +1010 -0
- package/dist/work-orders/contract.d.ts +61 -0
- package/dist/work-orders/contract.js +122 -0
- package/dist/work-orders/store.d.ts +158 -0
- package/dist/work-orders/store.js +197 -0
- package/docs/README.md +65 -0
- package/docs/architecture.md +136 -0
- package/docs/capability-matrix.md +50 -0
- package/docs/cli-reference.md +599 -0
- package/docs/command-list.md +51 -0
- package/docs/compose-patterns.md +99 -0
- package/docs/concepts.md +171 -0
- package/docs/configuration-essentials.md +172 -0
- package/docs/configuration-reference.md +621 -0
- package/docs/environment.md +760 -0
- package/docs/extending.md +43 -0
- package/docs/faq.md +111 -0
- package/docs/getting-started.md +608 -0
- package/docs/harness-surfaces.md +433 -0
- package/docs/joining-a-team.md +76 -0
- package/docs/release-policy.md +49 -0
- package/docs/safety-and-autonomy.md +419 -0
- package/docs/troubleshooting.md +361 -0
- package/docs/tutorial.md +170 -0
- package/docs/work-and-browser.md +254 -0
- package/libexec/browser-operation.cjs +186 -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 +54 -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 +61 -0
- package/surfaces/skills/procedures/fix.md +81 -0
- package/surfaces/skills/procedures/setup.md +379 -0
- package/surfaces/skills/procedures/work.md +105 -0
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
# Troubleshooting
|
|
2
|
+
|
|
3
|
+
This page is for anyone holding a cockpit diagnostic code: what it means and what to do. Every
|
|
4
|
+
diagnostic message names what failed and how to fix it; the sections below cover the codes that
|
|
5
|
+
need more than that, and [Codes with a fixed remedy](#codes-with-a-fixed-remedy) at the end lists
|
|
6
|
+
every code whose remedy never changes.
|
|
7
|
+
|
|
8
|
+
Human output spells common refusals as **What failed**, **Why it matters** and **Fix**. Use
|
|
9
|
+
`--json` only when a program needs the machine-readable envelope. Each command's flags are in its
|
|
10
|
+
help, for example `cockpit sync --help`.
|
|
11
|
+
|
|
12
|
+
## Common refusal guidance
|
|
13
|
+
|
|
14
|
+
| Diagnostic | Why it stops | Fix |
|
|
15
|
+
| --- | --- | --- |
|
|
16
|
+
| `INIT_CANONICAL_OWNERSHIP_MISSING` | The saved bootstrap stage and generated ownership disagree. | Restore the committed ownership metadata, then rerun the same `npx --no cockpit init . --target <tool>` command. |
|
|
17
|
+
| `SURFACE_SOURCE_UNAVAILABLE` | A declared sibling source cannot be read or checked. | Restore the named checkout at its declared path, then rerun `npx --no cockpit sync --config cockpit.toml`. |
|
|
18
|
+
| `SURFACE_OWNERSHIP_INVALID` | Cockpit cannot tell which settings it may replace. | Restore the last committed ownership metadata, then rerun `npx --no cockpit sync --config cockpit.toml`. |
|
|
19
|
+
| `SURFACE_STATE_CONFLICT` | Sync would overwrite a hand edit or a file cockpit has no record of writing. | Move a hand edit into `cockpit.toml` or a surface overlay and ask a person before discarding it; for a team's own settings file, have a person approve `npx --no cockpit sync --adopt <path> --config cockpit.toml`. |
|
|
20
|
+
| `GENERATED_ARTIFACT_DRIFT` | Generated files no longer match the canonical configuration. | Review the diff, run `npx --no cockpit sync --config cockpit.toml`, then retry. |
|
|
21
|
+
| `GENERATED_OWNERSHIP_INVALID` | Cockpit has no trustworthy record of which files it owns. | Restore the committed ownership metadata, then rerun `npx --no cockpit sync --config cockpit.toml`. |
|
|
22
|
+
| `GUARD_AUTHORITY_UNAVAILABLE` | The guard cannot read the current policy it needs to decide safely. | Restore `cockpit.toml` and generated guard files, then have a human run `npx --no cockpit sync --config cockpit.toml`. |
|
|
23
|
+
| `GUARD_REFUSED` | The command is outside the current guard policy. | Follow the named reason, or ask a human to update `cockpit.toml` and run `npx --no cockpit sync --config cockpit.toml`. |
|
|
24
|
+
| `RUNTIME_UNAVAILABLE` | The container runtime cannot be reached or identified. | Start it and verify `docker info`; if the message names a Docker or Compose version with no X.Y.Z core, install a release that prints one. Then retry. |
|
|
25
|
+
| `RUNTIME_UNMEASURED` | This machine has no passing measurement for the current runtime and engine version. | Run `npx --no cockpit runtime measure --config cockpit.toml --image <local-image>`, which records the result for this machine only, then retry. |
|
|
26
|
+
| `CLAIM_CO_TENANT` | Another [holder](concepts.md#holder) is using the stack. | After a failed `up`, run `npx --no cockpit up --config cockpit.toml` to resume or `npx --no cockpit down --config cockpit.toml` to release. Otherwise, have every session that holds the stack run `npx --no cockpit sleep --config cockpit.toml`, then retry. |
|
|
27
|
+
| `PORT_FAMILY_COLLISION` | A selected host port is already in use. | Stop the named listener or release the inactive stack, then retry. |
|
|
28
|
+
| `PORT_LEASE_EXHAUSTED` | Every declared port family is leased or occupied. | Release an inactive stack or extend `ports.count` after checking host capacity. |
|
|
29
|
+
| `SETUP_MANUAL_MISSING` | A manually managed sibling checkout is absent. | Create it at the declared path, then rerun `npx --no cockpit setup --config cockpit.toml`. |
|
|
30
|
+
| `SETUP_REMOTE_MISMATCH` | The checkout remote and declaration name different sources. | Correct the remote or declaration, then rerun `npx --no cockpit setup --config cockpit.toml`. |
|
|
31
|
+
|
|
32
|
+
## GENERATED_ARTIFACT_DRIFT
|
|
33
|
+
|
|
34
|
+
**Cause.** An owned whole file, symlink target or shared region differs from what the environment
|
|
35
|
+
and surface declarations and their sources now produce. As
|
|
36
|
+
[Check and sync](environment.md#check-and-sync) describes, `check` reports the mismatch without
|
|
37
|
+
changing any owned file.
|
|
38
|
+
|
|
39
|
+
**Remedy.** Inspect the target named in the diagnostic, then run:
|
|
40
|
+
|
|
41
|
+
```sh
|
|
42
|
+
npx --no cockpit check --config ./cockpit.toml
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Review the declaration and source change. If the new bytes are intended, publish the complete
|
|
46
|
+
owned manifest:
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
npx --no cockpit sync --config ./cockpit.toml
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Do not edit the ownership manifest or lifecycle state. If changed bytes belong to a formerly
|
|
53
|
+
owned path, preserve them until the declaration and ownership transition are understood.
|
|
54
|
+
|
|
55
|
+
## Harness surface failures
|
|
56
|
+
|
|
57
|
+
1. Read the target and message in the diagnostic.
|
|
58
|
+
2. Run `cockpit sync --config ./cockpit.toml --dry-run`; it prepares everything without changing
|
|
59
|
+
the checkout.
|
|
60
|
+
3. Correct the named declaration or source, and repeat the preview.
|
|
61
|
+
4. Apply `sync`, then confirm the installed state with `check`.
|
|
62
|
+
|
|
63
|
+
Never edit the ownership manifest, a generated shared region or the selftest results to make a
|
|
64
|
+
diagnostic disappear.
|
|
65
|
+
|
|
66
|
+
`REGISTRY_INPUT_INVALID` means a declared sibling row cannot produce one valid registry. Correct
|
|
67
|
+
the named row or its derived MCP source, then retry the preview.
|
|
68
|
+
|
|
69
|
+
### Merge, ownership, and generation
|
|
70
|
+
|
|
71
|
+
`SURFACE_INPUT_INVALID`, `SURFACE_BOUNDS`, `SURFACE_NAME_DUPLICATE`,
|
|
72
|
+
`SURFACE_KIND_AMBIGUOUS`, `SURFACE_OVERRIDE_INVALID`, `SURFACE_PATH_CONFLICT`, and
|
|
73
|
+
`SURFACE_OWNERSHIP_INVALID` mean the declarations, overlay identity, output paths or captured
|
|
74
|
+
output failed validation. Correct the named target. For an override, compare it with the current
|
|
75
|
+
core declaration and update
|
|
76
|
+
<!-- cockpit:ref schema=surfaces.overlays[].replaces.sha256 --> `surfaces.overlays[].replaces.sha256` only after reviewing the
|
|
77
|
+
new original. For a path conflict, change the declarations so only one produces the path; do not
|
|
78
|
+
delete the existing path as a workaround.
|
|
79
|
+
|
|
80
|
+
`SURFACE_STATE_CONFLICT` means a shared region, stale entry, symlink, or prior ownership record no
|
|
81
|
+
longer matches the bytes cockpit wrote. Keep the current bytes: a hand edit belongs in
|
|
82
|
+
`cockpit.toml` or a surface overlay, and discarding it, or deleting a file cockpit has no record of
|
|
83
|
+
writing, is the person's decision. For a team's own `.claude/settings.json`, `.codex/config.toml` or
|
|
84
|
+
`.codex/hooks.json`, the fix names the `sync --adopt` command that keeps it; see
|
|
85
|
+
[Adopt existing agent settings](getting-started.md#adopt-existing-agent-settings).
|
|
86
|
+
`SURFACE_ADOPTION_REFUSED` names the adopted key that would switch off or bypass the guard, or that
|
|
87
|
+
cockpit writes with a different value; remove it from the named file and sync again.
|
|
88
|
+
`SURFACE_SOURCE_UNAVAILABLE` means a declared source or active sibling could not be read or checked. Restore that source at its declared root and retry the dry run.
|
|
89
|
+
`SURFACE_CUSTOM_REFUSED` means the named custom harness module did not return a complete result
|
|
90
|
+
bound to its declaration and source digest, or an `enforced` row's evidence file was missing or
|
|
91
|
+
did not match its declared SHA-256. Inspect the module, the evidence file reference, and the broken control.
|
|
92
|
+
|
|
93
|
+
`GENERATED_STALE_APPROVAL_REQUIRED` means a dry run found stale entries but the apply has no
|
|
94
|
+
approval for their exact digest. Run `sync --interactive` from a terminal outside CI, review the
|
|
95
|
+
listed entries, and type the displayed digest only if every removal is intended.
|
|
96
|
+
`GENERATED_STALE_APPROVAL_INVALID` means the request could not be bound safely; inspect the
|
|
97
|
+
reported path and current ownership before retrying. Neither code permits deleting the path by
|
|
98
|
+
hand.
|
|
99
|
+
|
|
100
|
+
`SURFACE_NODE_UNAVAILABLE`, `SURFACE_PACKAGE_UNAVAILABLE`, and
|
|
101
|
+
`SURFACE_SCRATCH_UNAVAILABLE` identify a missing Node executable, a missing or changed copy of
|
|
102
|
+
the checked-in Rulesync generator bundle, or no safe staging directory. Restore the exact cockpit
|
|
103
|
+
package or the named local path. `SURFACE_STAGING_FAILED`, `SURFACE_WORKER_TIMEOUT`,
|
|
104
|
+
`SURFACE_WORKER_SIGNAL`, `SURFACE_WORKER_NONZERO`, `SURFACE_WORKER_STDERR`,
|
|
105
|
+
`SURFACE_WORKER_OUTPUT`, `SURFACE_OUTPUT_COVERAGE`, `SURFACE_FEATURE_COVERAGE`,
|
|
106
|
+
`SURFACE_STAGE_VARIANCE`, `SURFACE_ARTIFACT_INVALID`, and `SURFACE_CLEANUP_FAILED` identify the
|
|
107
|
+
generator stage that failed. Use the captured target and stderr; do not run a second generator
|
|
108
|
+
and treat its output as cockpit's result. The outer `SURFACE_GENERATION_FAILED` carries that cause
|
|
109
|
+
at the generated-environment boundary.
|
|
110
|
+
|
|
111
|
+
`EXECUTION_TERMINATION_UNCONFIRMED` means cockpit could not confirm that a surface worker
|
|
112
|
+
stopped, so it keeps the private staging path the diagnostic names. Stop the remaining workers
|
|
113
|
+
before removing that directory, then retry.
|
|
114
|
+
|
|
115
|
+
`SURFACE_GENERATOR_TRUST_WARNING` is a warning from a `sync` that writes `.claude/settings.json`
|
|
116
|
+
granting something: the sibling directories Claude Code may edit, the MCP servers it approves, and
|
|
117
|
+
the command patterns it runs without asking. It names each grant; review them before applying the
|
|
118
|
+
sync. A sync that leaves the file unchanged, and `check`, do not repeat it. A warning does not mean
|
|
119
|
+
the harness enforces anything.
|
|
120
|
+
|
|
121
|
+
### MCP and restrictions
|
|
122
|
+
|
|
123
|
+
For `MCP_INPUT_INVALID` or `MCP_DECLARATION_INVALID`, correct the declaration, digest,
|
|
124
|
+
same-name environment reference, or confined working directory named by the message.
|
|
125
|
+
`MCP_COMMAND_CONFLICT` means two sources give one server name different commands; make them agree or give them distinct names. `MCP_NOT_APPROVED` leaves a declared
|
|
126
|
+
server disabled because `[mcp.approved]` has no entry for it, or its declaration changed since it
|
|
127
|
+
was approved; a person, only after reviewing its command, arguments, working directory, environment
|
|
128
|
+
names and sources, sets its name to the sha256 in the message under `[mcp.approved]` and runs `sync`.
|
|
129
|
+
While `[autonomy] mcp_approve` is `person`, the default, the guard refuses an agent's edit of `[mcp]`. `MCP_APPROVAL_UNKNOWN` means the allowlist names no
|
|
130
|
+
declaration. `MCP_EXECUTABLE_UNAVAILABLE` comes from the generated wrapper when its declared
|
|
131
|
+
executable is absent or not executable; restore that executable rather than changing the wrapper.
|
|
132
|
+
|
|
133
|
+
For `RESTRICTION_INPUT_INVALID`, `RESTRICTION_ADAPTER_INVALID`, `RESTRICTION_EVENT_UNADAPTED`,
|
|
134
|
+
`RESTRICTION_TEMPLATE_INVALID` or `RESTRICTION_OUTPUT_LIMIT`, correct the named guard policy,
|
|
135
|
+
adapter, template or output. An unadapted event stays unavailable; do not replace it with an
|
|
136
|
+
instruction and call it enforced.
|
|
137
|
+
|
|
138
|
+
### Sibling projection and skills
|
|
139
|
+
|
|
140
|
+
`PROJECTION_INPUT_INVALID` and `PROJECTION_RESULT_BOUNDS` mean the projection request or result
|
|
141
|
+
is not valid, size-limited data. `PROJECTION_ROOT_AMBIGUOUS`, `PROJECTION_MOUNT_MISMATCH`, and
|
|
142
|
+
`PROJECTION_GRANT_MISMATCH` require the main checkout, active mount, and directory grant
|
|
143
|
+
to agree. `PROJECTION_GUIDE_UNAVAILABLE`, `PROJECTION_GUIDE_ESCAPE`,
|
|
144
|
+
`PROJECTION_GUIDE_READ_FAILED`, and `PROJECTION_GUIDE_CLOSE_FAILED` identify the named guide or
|
|
145
|
+
its confined read. Restore a regular declared guide and safe root. `PROJECTION_GUIDE_CHANGED`
|
|
146
|
+
means the guide changed after observation; stop the concurrent edit and retry from a fresh read.
|
|
147
|
+
A sibling guide holding one of cockpit's own `<!-- cockpit:instructions:` or `<!-- cockpit:owner:`
|
|
148
|
+
markers is refused as `PROJECTION_INPUT_INVALID`, because its copy would end or split cockpit's
|
|
149
|
+
region of the root **AGENTS.md**; remove the marker from the guide.
|
|
150
|
+
|
|
151
|
+
For `SKILL_INPUT_INVALID`, `SKILL_FRONTMATTER_INVALID`, `SKILL_CONTRACT_INVALID`,
|
|
152
|
+
`SKILL_IDENTITY_INVALID`, `SKILL_NAME_DUPLICATE`, `SKILL_TOOL_EQUIVALENCE_MISSING`,
|
|
153
|
+
`SKILL_PROCEDURE_MISSING`, `SKILL_COMMAND_UNDECLARED`, `SKILL_ENTRY_POINT_EXCEEDED`, or
|
|
154
|
+
`SKILL_DECISION_LOGIC_EMBEDDED`, correct the shipped skill entry point or shared procedure named
|
|
155
|
+
by the diagnostic. `SKILL_RENDER_INVALID` and `SKILL_RENDER_INVENTORY_INVALID` mean generated
|
|
156
|
+
files do not match the skill contract. `SKILL_STANDING_COST_EXCEEDED` means the always-loaded
|
|
157
|
+
skill entry points are too large. Shrink them; moving decision logic into another always-loaded
|
|
158
|
+
file is not a repair.
|
|
159
|
+
|
|
160
|
+
### Selftest and override inspection
|
|
161
|
+
|
|
162
|
+
`SELFTEST_SOURCE_INVALID` means the generated check, resolved probe-specification path, source
|
|
163
|
+
digest, generated-manifest digest or specification size failed its check, or the file still has a
|
|
164
|
+
`null` where a probe belongs. For a missing file, write a fresh one with
|
|
165
|
+
`npx --no cockpit selftest --config <path> --write-probe-specifications <new file>` and fill in its
|
|
166
|
+
`null` fields; for a stale one, add `--probe-specifications <stale file>` to that command so the
|
|
167
|
+
rows you filled for unchanged cells are kept. Do not edit the stored digests. For a `null`, fill in the rows the message lists.
|
|
168
|
+
[Skills and selftest evidence](harness-surfaces.md#skills-and-selftest-evidence) describes each
|
|
169
|
+
field.
|
|
170
|
+
|
|
171
|
+
`SELFTEST_EXECUTION_INVALID` has two causes:
|
|
172
|
+
|
|
173
|
+
- An unapproved or mismatched probe file, refused before any command in it runs. Inspect its
|
|
174
|
+
displayed whole-file digest and exact command vectors.
|
|
175
|
+
- A candidate, deliberately broken control, version/help event, transcript or final result bundle
|
|
176
|
+
did not give the expected result. Inspect the named harness and the retained output.
|
|
177
|
+
|
|
178
|
+
A missing executable, a sign-in requirement, missing process isolation or a pending enforcement
|
|
179
|
+
probe stays `human_needed` until the manual action in the record is done. Run
|
|
180
|
+
`selftest --interactive` at a terminal outside CI; approve the full file digest and commands
|
|
181
|
+
first, then each executable path and SHA-256. Approval lasts only for that run.
|
|
182
|
+
|
|
183
|
+
`SURFACE_OVERRIDE_INSPECTION_UNAVAILABLE`, `SURFACE_OVERRIDE_INSPECTION_REFUSED`,
|
|
184
|
+
`SURFACE_OVERRIDE_INSPECTION_INVALID`, and `SURFACE_OVERRIDE_INSPECTION_PATH_MISMATCH` mean
|
|
185
|
+
`doctor` could not produce its read-only override view. They do not mean there are no overrides;
|
|
186
|
+
inspect the named generated source or configuration path before relying on that view.
|
|
187
|
+
|
|
188
|
+
## Clear cockpit state
|
|
189
|
+
|
|
190
|
+
cockpit keeps machine-local runtime state outside the repository: which sessions hold each stack,
|
|
191
|
+
its port lease, and how far `up` got. Each user has one state root:
|
|
192
|
+
|
|
193
|
+
| Host | State root |
|
|
194
|
+
| --- | --- |
|
|
195
|
+
| macOS | `~/Library/Application Support/cockpit/state/v1` |
|
|
196
|
+
| Linux, `XDG_STATE_HOME` set | `$XDG_STATE_HOME/cockpit/v1` |
|
|
197
|
+
| Linux, otherwise | `~/.local/state/cockpit/v1` |
|
|
198
|
+
|
|
199
|
+
Under it, `cockpits/cockpit_<name>_<hash>/` holds one cockpit's state, where `<name>` is
|
|
200
|
+
`cockpit.name` and `<hash>` identifies the cockpit's main checkout; `checkouts/` holds `init`
|
|
201
|
+
progress per checkout. A state diagnostic's target names the exact directory.
|
|
202
|
+
|
|
203
|
+
These records are how cockpit knows which containers and ports a stack owns. Do not edit them by
|
|
204
|
+
hand, and do not delete them while the stack runs: its containers would keep running with nothing
|
|
205
|
+
that knows about them. To clear one cockpit's state:
|
|
206
|
+
|
|
207
|
+
1. Stop the stack and release its claims from the cockpit directory:
|
|
208
|
+
`./node_modules/.bin/cockpit down --config cockpit.toml`.
|
|
209
|
+
2. If `down` refuses because the state cannot be read, stop the stack with Docker instead: find
|
|
210
|
+
its project with `docker compose ls`, then run `docker compose -p <project> down`.
|
|
211
|
+
3. Delete the directory the diagnostic names, for example
|
|
212
|
+
`rm -rf "$HOME/Library/Application Support/cockpit/state/v1/cockpits/cockpit_duo_<hash>"`.
|
|
213
|
+
|
|
214
|
+
When this cockpit's own state cannot be read, runtime commands refuse with
|
|
215
|
+
`STATE_RECORD_MALFORMED` or `STATE_FORMAT_UNSUPPORTED` until you clear it. Unreadable state of
|
|
216
|
+
another cockpit, such as a directory left by an earlier cockpit build, does not stop you: `up` and
|
|
217
|
+
`sleep` ignore its port leases, and only `doctor` warns with `STATE_RECORD_MALFORMED`, naming that
|
|
218
|
+
directory and the `rm -rf` command. Remove it with the same steps once no cockpit uses it.
|
|
219
|
+
|
|
220
|
+
<!-- cockpit:diagnostic-index:begin -->
|
|
221
|
+
## Codes with a fixed remedy
|
|
222
|
+
|
|
223
|
+
Every diagnostic message names what failed and how to fix it. These codes always have the same remedy, or a section above that covers them; for any other code, follow its message.
|
|
224
|
+
|
|
225
|
+
| Diagnostic | What to do |
|
|
226
|
+
| --- | --- |
|
|
227
|
+
| `AUTONOMY_CI_ONLY` | push the change and let the CI job run the command, or have a person change the field in cockpit.toml and accept the change at sync |
|
|
228
|
+
| `AUTONOMY_PERSON_REQUIRED` | a person runs the same command with --interactive in a terminal outside CI, or a person changes the field in cockpit.toml and accepts the change at sync |
|
|
229
|
+
| `CLAIM_CO_TENANT` | [see above](#common-refusal-guidance) |
|
|
230
|
+
| `COCKPIT_LAUNCHER_UNPROVEN` | run cockpit as ./node_modules/.bin/cockpit <command> --config <your cockpit.toml> from the cockpit root, or remove what stops npx from proving it: a .npmrc in the cockpit root, a bin or directories.bin in its package.json, or a node_modules/.bin/cockpit that npm install did not link to the installed package |
|
|
231
|
+
| `COCKPIT_REVISION_UNSTAMPED` | install a released @b00dea/cockpit when the resolved data must name the exact cockpit source commit |
|
|
232
|
+
| `CODEX_HOOK_UNTRUSTED` | if you use Codex in this cockpit, a person runs codex -C <cockpit root> in a terminal (not codex exec), trusts the folder if asked, and chooses "Trust all and continue" when Codex shows "Hooks need review" (or enables and trusts the hook in its /hooks view); then run npx --no cockpit doctor --config <your cockpit.toml> |
|
|
233
|
+
| `COMPOSE_FILE_UNREADABLE` | make environment.compose_files name a readable Compose file inside the cockpit root, then run npx --no cockpit check --config <your cockpit.toml> |
|
|
234
|
+
| `CONFIG_ENCODING_INVALID` | save the configuration as UTF-8, then retry |
|
|
235
|
+
| `DATA_SEED_UNAVAILABLE` | make sure the Docker daemon this stack runs on answers docker volume ls, then rerun npx --no cockpit up --config <your cockpit.toml> |
|
|
236
|
+
| `DECLARATION_UNCONFIRMED` | confirm each value with whoever owns the product and correct it in cockpit.toml if it is wrong, delete each confirmed entry from unconfirmed, then run npx --no cockpit sync --config <your cockpit.toml> |
|
|
237
|
+
| `DOCUMENT_ESTATE_TOPOLOGY_MISMATCH` | declare one sibling for each repository the message says init observed, with that slug and dir, and no other; add any other repository after init with npx --no cockpit sibling add <slug> --config <your cockpit.toml> |
|
|
238
|
+
| `DOCUMENT_GUARD_HOSTS_NONE` | list the hosts in guards.hosted_db_hosts and guards.vendor_endpoint_hosts and run npx --no cockpit sync --config <your cockpit.toml> once a non-local environment exists |
|
|
239
|
+
| `DOCUMENT_RUNTIME_NOT_DECLARED` | once a product runs, declare environment.compose_files and run npx --no cockpit sync --config <your cockpit.toml> |
|
|
240
|
+
| `ENVIRONMENT_NOT_DECLARED` | declare environment.compose_files = ["compose.yml"] to run your Compose file (for a small app with none, npx --no cockpit init <cockpit root> --scaffold-compose <app dir> --port <port> writes a starting one), then run npx --no cockpit sync --config <your cockpit.toml> |
|
|
241
|
+
| `EVALUATOR_FELL_BACK_TO_RUNNING_TOOL` | install and sign in to the passed-over tool so another tool grades the work, or name the grader you accept with --evaluator <tool> |
|
|
242
|
+
| `EXECUTION_TERMINATION_UNCONFIRMED` | [see above](#merge-ownership-and-generation) |
|
|
243
|
+
| `GENERATED_ARTIFACT_DRIFT` | [see above](#generated_artifact_drift) |
|
|
244
|
+
| `GENERATED_ARTIFACT_MISSING` | run npx --no cockpit sync --config <your cockpit.toml> |
|
|
245
|
+
| `GENERATED_BROWSER_ENDPOINT_UNPUBLISHED` | publish the endpoint port from exactly one service in environment.compose_files as "127.0.0.1:${VAR}:<container port>" with VAR under [ports.bases] set to the endpoint port, or remove browser.endpoint to drive a local browser, then run npx --no cockpit sync --config <your cockpit.toml> |
|
|
246
|
+
| `GENERATED_OWNERSHIP_DRIFT` | run npx --no cockpit sync --config <your cockpit.toml> |
|
|
247
|
+
| `GENERATED_OWNERSHIP_INVALID` | [see above](#common-refusal-guidance) |
|
|
248
|
+
| `GENERATED_STALE_APPROVAL_INVALID` | [see above](#merge-ownership-and-generation) |
|
|
249
|
+
| `GENERATED_STALE_APPROVAL_REQUIRED` | [see above](#merge-ownership-and-generation) |
|
|
250
|
+
| `GENERATED_STALE_ARTIFACT` | a person runs npx --no cockpit sync --config <your cockpit.toml> --interactive in a terminal and approves the stale-removal digest it shows |
|
|
251
|
+
| `GUARD_AUTHORITY_UNAVAILABLE` | [see above](#common-refusal-guidance) |
|
|
252
|
+
| `GUARD_HOSTS_UNDECLARED` | list the database and live vendor API hosts of every non-local environment (production, staging, shared) under [guards] in cockpit.toml, then run npx --no cockpit sync --config <your cockpit.toml>; if no such environment exists, record that by writing hosted_db_hosts = [] and vendor_endpoint_hosts = [] under [guards] |
|
|
253
|
+
| `GUARD_REFUSED` | [see above](#common-refusal-guidance) |
|
|
254
|
+
| `GUARD_SEARCH_PATH_RELATIVE` | remove every relative or empty entry from PATH where the shell profile or launcher that starts the agent harness sets it, then restart the harness |
|
|
255
|
+
| `INIT_CANONICAL_OWNERSHIP_MISSING` | [see above](#common-refusal-guidance) |
|
|
256
|
+
| `INIT_SCAFFOLD_COMPOSE_EXISTS` | run npx --no cockpit init <cockpit root> --target <tool>, which proposes the existing Compose file for environment.compose_files |
|
|
257
|
+
| `LOGS_TRUNCATED` | lower --tail to the number of recent records you need, or read the older records from the container runtime directly |
|
|
258
|
+
| `MCP_APPROVAL_UNKNOWN` | [see above](#mcp-and-restrictions) |
|
|
259
|
+
| `MCP_COMMAND_CONFLICT` | [see above](#mcp-and-restrictions) |
|
|
260
|
+
| `MCP_DECLARATION_INVALID` | [see above](#mcp-and-restrictions) |
|
|
261
|
+
| `MCP_INPUT_INVALID` | [see above](#mcp-and-restrictions) |
|
|
262
|
+
| `MCP_NOT_APPROVED` | [see above](#mcp-and-restrictions) |
|
|
263
|
+
| `OUTPUT_EXISTS` | choose a new path; replacement requires a future explicit option |
|
|
264
|
+
| `PORT_FAMILY_COLLISION` | [see above](#common-refusal-guidance) |
|
|
265
|
+
| `PORT_LEASE_EXHAUSTED` | [see above](#common-refusal-guidance) |
|
|
266
|
+
| `PROJECTION_GRANT_MISMATCH` | [see above](#sibling-projection-and-skills) |
|
|
267
|
+
| `PROJECTION_GUIDE_CHANGED` | [see above](#sibling-projection-and-skills) |
|
|
268
|
+
| `PROJECTION_GUIDE_CLOSE_FAILED` | [see above](#sibling-projection-and-skills) |
|
|
269
|
+
| `PROJECTION_GUIDE_ESCAPE` | [see above](#sibling-projection-and-skills) |
|
|
270
|
+
| `PROJECTION_GUIDE_READ_FAILED` | [see above](#sibling-projection-and-skills) |
|
|
271
|
+
| `PROJECTION_GUIDE_UNAVAILABLE` | [see above](#sibling-projection-and-skills) |
|
|
272
|
+
| `PROJECTION_INPUT_INVALID` | [see above](#sibling-projection-and-skills) |
|
|
273
|
+
| `PROJECTION_MOUNT_MISMATCH` | [see above](#sibling-projection-and-skills) |
|
|
274
|
+
| `PROJECTION_RESULT_BOUNDS` | [see above](#sibling-projection-and-skills) |
|
|
275
|
+
| `PROJECTION_ROOT_AMBIGUOUS` | [see above](#sibling-projection-and-skills) |
|
|
276
|
+
| `REGISTRY_INPUT_INVALID` | [see above](#harness-surface-failures) |
|
|
277
|
+
| `RESTRICTION_ADAPTER_INVALID` | [see above](#mcp-and-restrictions) |
|
|
278
|
+
| `RESTRICTION_EVENT_UNADAPTED` | [see above](#mcp-and-restrictions) |
|
|
279
|
+
| `RESTRICTION_INPUT_INVALID` | [see above](#mcp-and-restrictions) |
|
|
280
|
+
| `RESTRICTION_OUTPUT_LIMIT` | [see above](#mcp-and-restrictions) |
|
|
281
|
+
| `RESTRICTION_TEMPLATE_INVALID` | [see above](#mcp-and-restrictions) |
|
|
282
|
+
| `RUNTIME_IMAGE_UNAVAILABLE` | pull or build it first (docker pull <image>), then run npx --no cockpit runtime measure --config <your cockpit.toml> --image <image> again |
|
|
283
|
+
| `RUNTIME_UNAVAILABLE` | [see above](#common-refusal-guidance) |
|
|
284
|
+
| `RUNTIME_UNMEASURED` | [see above](#common-refusal-guidance) |
|
|
285
|
+
| `SECRET_FILE_TRACKED` | a person decides with the repository owner: stop tracking each file with git rm --cached <file>, add it to .gitignore, commit, and rotate any credential it held; commit a .env.example with the variable names instead |
|
|
286
|
+
| `SELFTEST_CUSTOM_PROBE_UNSUPPORTED` | measure the custom harness capability by hand with a candidate and a deliberately broken control, then record what you saw as its state and measured_on in cockpit.toml (enforced needs an evidence file); do not add a row for it |
|
|
287
|
+
| `SELFTEST_EXECUTION_INVALID` | [see above](#selftest-and-override-inspection) |
|
|
288
|
+
| `SELFTEST_SOURCE_INVALID` | [see above](#selftest-and-override-inspection) |
|
|
289
|
+
| `SERVICE_NOT_DECLARED` | rerun with --service set to one of the declared services |
|
|
290
|
+
| `SESSION_STACK_RETAINED` | run npx --no cockpit sleep --config <your cockpit.toml> to release this checkout's remaining hold |
|
|
291
|
+
| `SETUP_CLONE_FAILED` | check that this machine can reach the remote (git ls-remote <remote>) and that the sibling remote in cockpit.toml is right, or clone it into the named directory yourself; then run npx --no cockpit setup --config <your cockpit.toml> again |
|
|
292
|
+
| `SETUP_INSTRUCTION_FILES_OFFERED` | review the proposed change with a person, then run npx --no cockpit setup --config <your cockpit.toml> --write-instruction-files |
|
|
293
|
+
| `SETUP_INSTRUCTION_POINTER_OFFERED` | review the proposed AGENTS.md block, then run npx --no cockpit setup --config <your cockpit.toml> --write-instruction-pointers |
|
|
294
|
+
| `SETUP_MANUAL_MISSING` | create the checkout, then run npx --no cockpit setup --config <your cockpit.toml> again; [see above](#common-refusal-guidance) |
|
|
295
|
+
| `SETUP_REMOTE_MISMATCH` | [see above](#common-refusal-guidance) |
|
|
296
|
+
| `SETUP_REMOTE_UNRESOLVABLE` | make the remote path readable, or declare the remote as a URL or an absolute path to an existing repository, then run npx --no cockpit setup --config <your cockpit.toml> again |
|
|
297
|
+
| `SIBLING_GUIDE_MISSING` | correct or remove the guide name in that sibling's guides list in cockpit.toml, then run npx --no cockpit sync --config <your cockpit.toml> |
|
|
298
|
+
| `SIBLING_INSTRUCTIONS_AGENTS_ONLY` | run npx --no cockpit setup --config <your cockpit.toml> to see the CLAUDE.md it proposes (one line, @AGENTS.md); once a person approves it, run npx --no cockpit setup --config <your cockpit.toml> --write-instruction-files |
|
|
299
|
+
| `SIBLING_INSTRUCTIONS_CLAUDE_ONLY` | run npx --no cockpit setup --config <your cockpit.toml> to see the move it proposes (CLAUDE.md copied byte for byte to AGENTS.md, CLAUDE.md replaced by @AGENTS.md) and, once a person approves it, rerun it with --write-instruction-files; when CLAUDE.md imports other files with @, setup proposes nothing and a person moves the shared instructions into AGENTS.md by hand |
|
|
300
|
+
| `SIBLING_INSTRUCTIONS_MISSING` | a person writes AGENTS.md with what an agent must know to work in the repository, then runs npx --no cockpit setup --config <your cockpit.toml> --write-instruction-files to add the CLAUDE.md that imports it |
|
|
301
|
+
| `SIBLING_INSTRUCTIONS_TOOL_ONLY` | a person moves the instructions every tool needs from those files into AGENTS.md, and keeps only settings specific to one tool where they are |
|
|
302
|
+
| `SIBLING_INSTRUCTIONS_UNLINKED` | a person merges the instructions every tool needs into AGENTS.md, then makes CLAUDE.md a line reading @AGENTS.md followed only by instructions that apply to Claude Code alone |
|
|
303
|
+
| `SKILL_COMMAND_UNDECLARED` | [see above](#sibling-projection-and-skills) |
|
|
304
|
+
| `SKILL_CONTRACT_INVALID` | [see above](#sibling-projection-and-skills) |
|
|
305
|
+
| `SKILL_DECISION_LOGIC_EMBEDDED` | [see above](#sibling-projection-and-skills) |
|
|
306
|
+
| `SKILL_ENTRY_POINT_EXCEEDED` | [see above](#sibling-projection-and-skills) |
|
|
307
|
+
| `SKILL_FRONTMATTER_INVALID` | [see above](#sibling-projection-and-skills) |
|
|
308
|
+
| `SKILL_IDENTITY_INVALID` | [see above](#sibling-projection-and-skills) |
|
|
309
|
+
| `SKILL_INPUT_INVALID` | [see above](#sibling-projection-and-skills) |
|
|
310
|
+
| `SKILL_NAME_DUPLICATE` | [see above](#sibling-projection-and-skills) |
|
|
311
|
+
| `SKILL_PROCEDURE_MISSING` | [see above](#sibling-projection-and-skills) |
|
|
312
|
+
| `SKILL_RENDER_INVALID` | [see above](#sibling-projection-and-skills) |
|
|
313
|
+
| `SKILL_RENDER_INVENTORY_INVALID` | [see above](#sibling-projection-and-skills) |
|
|
314
|
+
| `SKILL_STANDING_COST_EXCEEDED` | [see above](#sibling-projection-and-skills) |
|
|
315
|
+
| `SKILL_TOOL_EQUIVALENCE_MISSING` | [see above](#sibling-projection-and-skills) |
|
|
316
|
+
| `STATE_FORMAT_UNSUPPORTED` | [see above](#clear-cockpit-state) |
|
|
317
|
+
| `STATE_RECORD_MALFORMED` | [see above](#clear-cockpit-state) |
|
|
318
|
+
| `SURFACE_ADOPTION_REFUSED` | [see above](#merge-ownership-and-generation) |
|
|
319
|
+
| `SURFACE_ARTIFACT_INVALID` | [see above](#merge-ownership-and-generation) |
|
|
320
|
+
| `SURFACE_BOUNDS` | [see above](#merge-ownership-and-generation) |
|
|
321
|
+
| `SURFACE_CLEANUP_FAILED` | [see above](#merge-ownership-and-generation) |
|
|
322
|
+
| `SURFACE_CUSTOM_REFUSED` | [see above](#merge-ownership-and-generation) |
|
|
323
|
+
| `SURFACE_FEATURE_COVERAGE` | [see above](#merge-ownership-and-generation) |
|
|
324
|
+
| `SURFACE_GENERATION_FAILED` | [see above](#merge-ownership-and-generation) |
|
|
325
|
+
| `SURFACE_GENERATOR_TRUST_WARNING` | [see above](#merge-ownership-and-generation) |
|
|
326
|
+
| `SURFACE_INPUT_INVALID` | [see above](#merge-ownership-and-generation) |
|
|
327
|
+
| `SURFACE_KIND_AMBIGUOUS` | [see above](#merge-ownership-and-generation) |
|
|
328
|
+
| `SURFACE_NAME_DUPLICATE` | [see above](#merge-ownership-and-generation) |
|
|
329
|
+
| `SURFACE_NODE_UNAVAILABLE` | [see above](#merge-ownership-and-generation) |
|
|
330
|
+
| `SURFACE_OUTPUT_COVERAGE` | [see above](#merge-ownership-and-generation) |
|
|
331
|
+
| `SURFACE_OVERRIDE_INSPECTION_INVALID` | [see above](#selftest-and-override-inspection) |
|
|
332
|
+
| `SURFACE_OVERRIDE_INSPECTION_PATH_MISMATCH` | [see above](#selftest-and-override-inspection) |
|
|
333
|
+
| `SURFACE_OVERRIDE_INSPECTION_REFUSED` | [see above](#selftest-and-override-inspection) |
|
|
334
|
+
| `SURFACE_OVERRIDE_INSPECTION_UNAVAILABLE` | [see above](#selftest-and-override-inspection) |
|
|
335
|
+
| `SURFACE_OVERRIDE_INVALID` | [see above](#merge-ownership-and-generation) |
|
|
336
|
+
| `SURFACE_OWNERSHIP_INVALID` | [see above](#common-refusal-guidance) |
|
|
337
|
+
| `SURFACE_PACKAGE_UNAVAILABLE` | [see above](#merge-ownership-and-generation) |
|
|
338
|
+
| `SURFACE_PATH_CONFLICT` | [see above](#merge-ownership-and-generation) |
|
|
339
|
+
| `SURFACE_RULE_SCOPE_UNSUPPORTED` | remove `globs` from the rule frontmatter, or narrow the rule text itself to the files it is about, then run npx --no cockpit sync --config <your cockpit.toml> |
|
|
340
|
+
| `SURFACE_SCRATCH_UNAVAILABLE` | [see above](#merge-ownership-and-generation) |
|
|
341
|
+
| `SURFACE_SOURCE_UNAVAILABLE` | [see above](#common-refusal-guidance) |
|
|
342
|
+
| `SURFACE_STAGE_VARIANCE` | [see above](#merge-ownership-and-generation) |
|
|
343
|
+
| `SURFACE_STAGING_FAILED` | [see above](#merge-ownership-and-generation) |
|
|
344
|
+
| `SURFACE_STATE_CONFLICT` | [see above](#common-refusal-guidance) |
|
|
345
|
+
| `SURFACE_WORKER_NONZERO` | [see above](#merge-ownership-and-generation) |
|
|
346
|
+
| `SURFACE_WORKER_OUTPUT` | [see above](#merge-ownership-and-generation) |
|
|
347
|
+
| `SURFACE_WORKER_SIGNAL` | [see above](#merge-ownership-and-generation) |
|
|
348
|
+
| `SURFACE_WORKER_STDERR` | [see above](#merge-ownership-and-generation) |
|
|
349
|
+
| `SURFACE_WORKER_TIMEOUT` | [see above](#merge-ownership-and-generation) |
|
|
350
|
+
| `TESTING_GATE_UNDECLARED` | declare the product test commands as [testing] stages with a targeted and a full gate in cockpit.toml, then run npx --no cockpit sync --config <your cockpit.toml> |
|
|
351
|
+
| `TEST_GATE_UNSATISFIED` | the message gives the verdict and its reasons. FAIL: a check a stage ran failed, so fix the product. DEGRADED: start the stack with npx --no cockpit up --config <your cockpit.toml> for a stage that needs it, make a stage command that could not start runnable from the cockpit root, raise testing.stages[].timeout_seconds for a stage that timed out, or declare testing.stages[].select.<kind> for a --select a stage lacks. VOID: stop changing the checkouts and run the gate again. PARTIAL: only the complete gate can PASS, so run it without --select or --mode staged |
|
|
352
|
+
| `UPGRADE_ALREADY_CURRENT` | nothing to upgrade; to move to another version name it: npx --no cockpit upgrade --config <your cockpit.toml> <version> |
|
|
353
|
+
| `UPGRADE_INSTALL_FAILED` | fix what the package manager reported (is the version published?), then run npx --no cockpit upgrade --config <your cockpit.toml> <version> |
|
|
354
|
+
| `UPGRADE_PACKAGE_MANAGER_UNKNOWN` | keep exactly one of package-lock.json, pnpm-lock.yaml or yarn.lock at the cockpit root and put its package manager (npm, pnpm or yarn) on PATH, then run npx --no cockpit upgrade --config <your cockpit.toml> |
|
|
355
|
+
| `UPGRADE_REGISTRY_UNREACHABLE` | check the network, the registry login and that npm is on PATH, or name the version: npx --no cockpit upgrade --config <your cockpit.toml> <version> |
|
|
356
|
+
| `UPGRADE_SYNC_FAILED` | act on what sync reported above or put npx on PATH, then run npx --no cockpit sync --config <your cockpit.toml> |
|
|
357
|
+
| `UPGRADE_VERSION_INVALID` | give a full version such as 1.2.3, not a range or tag |
|
|
358
|
+
| `WORK_CHECK_FAILED` | read result.results: fix the product for a check that failed, make one that did not run runnable from the cockpit root, then rerun npx --no cockpit work check --config <your cockpit.toml> --work-order <id> |
|
|
359
|
+
| `WORK_PERSON_REQUIRED` | stop and ask a person to run the same command with --interactive in a terminal outside CI, read what it shows, and type the digest; never type it for them |
|
|
360
|
+
| `WORK_VERIFY_FAILED` | for an order changed since acceptance, run npx --no cockpit work accept --config <your cockpit.toml> --work-order <id> or revert the change; for a done order without a passing grade, regrade it with work grade |
|
|
361
|
+
<!-- cockpit:diagnostic-index:end -->
|
package/docs/tutorial.md
ADDED
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
# Tutorial: the compose-first example end to end
|
|
2
|
+
|
|
3
|
+
This walkthrough is for anyone evaluating cockpit before pointing it at a real product. It runs
|
|
4
|
+
cockpit on the compose-first example in this repository: you generate agent surfaces, watch a
|
|
5
|
+
drift check catch a hand edit, and optionally bring the two-service stack up. It needs no
|
|
6
|
+
credentials. `check` reads the Compose file through `docker compose config`, so you need the Docker
|
|
7
|
+
CLI with Compose; only the last, optional step starts containers.
|
|
8
|
+
|
|
9
|
+
Outputs below were captured from a real run on macOS; long lines and repeated rows are trimmed
|
|
10
|
+
with `...`, and absolute paths are shortened to `…`.
|
|
11
|
+
|
|
12
|
+
## Install cockpit
|
|
13
|
+
|
|
14
|
+
You need the Node.js and Git prerequisites from [Install cockpit](getting-started.md#install-cockpit).
|
|
15
|
+
The package itself is installed in the next step, inside the demo directory.
|
|
16
|
+
|
|
17
|
+
## Create the demo directory
|
|
18
|
+
|
|
19
|
+
Copy the example outside the cockpit checkout, so its generated files stay out of this repository.
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
rm -rf "${TMPDIR:-/tmp}/cockpit-demo" && cp -R examples/compose-first "${TMPDIR:-/tmp}/cockpit-demo"
|
|
23
|
+
cd "${TMPDIR:-/tmp}/cockpit-demo"
|
|
24
|
+
git init --quiet .
|
|
25
|
+
npm init --yes
|
|
26
|
+
npm install --save-dev --save-exact @b00dea/cockpit
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
The example's **compose.yml** runs two tiny Node services, **api** and **web**, each built from its
|
|
30
|
+
directory and declared in **cockpit.toml** as a sibling that already exists on disk
|
|
31
|
+
(`acquire = "none"`).
|
|
32
|
+
|
|
33
|
+
## Preview the generated files
|
|
34
|
+
|
|
35
|
+
```sh
|
|
36
|
+
./node_modules/.bin/cockpit sync --config cockpit.toml --dry-run
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
```console
|
|
40
|
+
write "package.json"
|
|
41
|
+
write ".gitignore"
|
|
42
|
+
write "AGENTS.md"
|
|
43
|
+
write "CLAUDE.md"
|
|
44
|
+
write "compose.cockpit.yml"
|
|
45
|
+
write "opencode.jsonc"
|
|
46
|
+
write ".agents/skills/cockpit-explain/SKILL.md"
|
|
47
|
+
...
|
|
48
|
+
write ".opencode/plugin/cockpit-guards.js"
|
|
49
|
+
write ".opencode/skills/cockpit-setup/references/test-data-and-personas.md"
|
|
50
|
+
write ".cockpit/generated-environment-ownership.json"
|
|
51
|
+
WARNING SURFACE_GENERATOR_TRUST_WARNING [claudecode:.claude/settings.json]: Claude Code permissions: writing 2 trust-affecting settings to .claude/settings.json; review them as you would a hook because synced agent settings can widen filesystem access, approve project servers or run commands without asking. 'permissions.additionalDirectories' — moves the boundary of what Claude Code may read and edit outside the project: "api", "web"; 'permissions.allow' — lets Claude Code run 46 command patterns without asking; the file lists each one.
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Nothing is written yet. `package.json` and `.gitignore` get the `cockpit:*` scripts and a marked
|
|
55
|
+
ignore block. **compose.cockpit.yml** is the override cockpit owns: it labels every service, network
|
|
56
|
+
and volume of your Compose file so runtime commands can tell what belongs to this stack. The
|
|
57
|
+
warning is deliberate: the generated Claude Code settings grant access to the sibling directories
|
|
58
|
+
and let Claude Code run cockpit's own commands without asking, which deserves the same review as a
|
|
59
|
+
hook. It appears only when a sync writes those settings. Add `--json` to get the result,
|
|
60
|
+
diagnostics and invocation metadata as one JSON document on stdout.
|
|
61
|
+
|
|
62
|
+
## Apply the sync and check it
|
|
63
|
+
|
|
64
|
+
```sh
|
|
65
|
+
./node_modules/.bin/cockpit sync --config cockpit.toml
|
|
66
|
+
./node_modules/.bin/cockpit check --config cockpit.toml
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
`check` recomputes every generated file, compares it with disk, and validates **compose.yml**:
|
|
70
|
+
|
|
71
|
+
```console
|
|
72
|
+
WARNING CODEX_HOOK_UNTRUSTED [.codex/hooks.json]: Codex has not trusted the guard hook in …/cockpit-demo/.codex/hooks.json on this machine, so a Codex session started there skips it and runs tool calls without the guard Guidance: if you use Codex in this cockpit, a person runs codex -C <cockpit root> in a terminal (not codex exec), trusts the folder if asked, and chooses "Trust all and continue" when Codex shows "Hooks need review" ...
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Exit code 0: nothing has drifted. The warning only matters if you use Codex: it names the one-time trust step Codex needs before it runs the guard hook.
|
|
76
|
+
|
|
77
|
+
## Look at what was generated
|
|
78
|
+
|
|
79
|
+
| Generated | What it is |
|
|
80
|
+
|---|---|
|
|
81
|
+
| AGENTS.md, CLAUDE.md | Shared root instructions in AGENTS.md; CLAUDE.md imports them with `@AGENTS.md`. Existing team text stays outside the regions cockpit writes. |
|
|
82
|
+
| .claude/, .codex/, .opencode/, opencode.jsonc, .agents/skills/ | Each listed harness's generated skills, subagents, hooks and supported permissions, in its own spelling (`.cursor/` and `.grok/` too once `[surfaces] tools` lists them) |
|
|
83
|
+
| .cockpit/guards/bash-guard.sh | The shared guard script. cockpit installs its hook for Claude Code, Codex CLI and OpenCode only, not for Cursor or Grok Build |
|
|
84
|
+
| compose.cockpit.yml | The ownership override cockpit adds after your Compose file; it never edits **compose.yml** |
|
|
85
|
+
| .cockpit/generated-environment-ownership.json | The ownership manifest: what cockpit wrote and the bytes it expects |
|
|
86
|
+
| .cockpit/local/guard-identity | This machine's Node and cockpit handler identity for the guard. It ignores itself in Git, so the committed files stay identical on every clone; each clone's `sync` writes its own |
|
|
87
|
+
|
|
88
|
+
Open **.claude/settings.json** to see the guard wired in as a Claude Code PreToolUse hook. The
|
|
89
|
+
Codex and OpenCode files wire the same guard through their own hook mechanisms.
|
|
90
|
+
|
|
91
|
+
## Catch drift
|
|
92
|
+
|
|
93
|
+
Edit a generated file by hand, then check again:
|
|
94
|
+
|
|
95
|
+
```sh
|
|
96
|
+
echo "# edited by hand" >> compose.cockpit.yml
|
|
97
|
+
./node_modules/.bin/cockpit check --config cockpit.toml
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
```console
|
|
101
|
+
ERROR GENERATED_ARTIFACT_DRIFT [compose.cockpit.yml]
|
|
102
|
+
What failed: owned generated artifact differs from canonical bytes
|
|
103
|
+
Why it matters: generated files no longer match the canonical cockpit configuration
|
|
104
|
+
Fix: npx --no cockpit sync --config …/cockpit-demo/cockpit.toml
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
`check` exits 2, names the file and prints the fix; it never repairs anything itself. Run the
|
|
108
|
+
suggested `sync`, which rewrites the file, and `check` passes again. A changed skill file reports
|
|
109
|
+
`SURFACE_STATE_CONFLICT` instead, and `sync` refuses it too, because cockpit will not overwrite a
|
|
110
|
+
hand edit: move the change into `cockpit.toml` or a surface overlay, and ask the person who owns the
|
|
111
|
+
cockpit before you discard it. Your own text outside a cockpit-owned region, such as notes at the
|
|
112
|
+
end of AGENTS.md, is not drift. Neither is an edit to **compose.yml**: that file is yours, and
|
|
113
|
+
`check` validates it rather than comparing it with anything.
|
|
114
|
+
|
|
115
|
+
## Read the configuration
|
|
116
|
+
|
|
117
|
+
Open **cockpit.toml** in the demo directory:
|
|
118
|
+
|
|
119
|
+
```toml
|
|
120
|
+
[cockpit]
|
|
121
|
+
name = "duo" # names this cockpit instance
|
|
122
|
+
siblings_root = "." # where the product's repositories live
|
|
123
|
+
|
|
124
|
+
[[sibling]]
|
|
125
|
+
slug = "api" # stable identifier used everywhere else
|
|
126
|
+
dir = "api" # directory under siblings_root
|
|
127
|
+
mount = "always" # compose.yml must bind-mount it
|
|
128
|
+
acquire = "none" # how it reaches disk: must already exist
|
|
129
|
+
var = "API_DIR" # variable Compose receives with its path
|
|
130
|
+
purpose = "Tiny JSON api"
|
|
131
|
+
|
|
132
|
+
[ports.bases]
|
|
133
|
+
API_HOST_PORT = 4200 # port family base; up leases a free family
|
|
134
|
+
WEB_HOST_PORT = 4300
|
|
135
|
+
|
|
136
|
+
[environment]
|
|
137
|
+
compose_files = ["compose.yml"] # the stack, run as written
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
The rest declares the second sibling, how the product is reached locally (`addressing`,
|
|
141
|
+
`authentication`) and the least the container runtime must offer (`[environment.machine]`). The
|
|
142
|
+
[configuration reference](configuration-reference.md) documents every field; to fill the stack
|
|
143
|
+
with data, add `resettable_volumes` and `seed` as
|
|
144
|
+
[Demo data, test users and roles](environment.md#demo-data-test-users-and-roles) describes.
|
|
145
|
+
|
|
146
|
+
## Bring the stack up
|
|
147
|
+
|
|
148
|
+
With Docker running, measure the runtime once with a local image, then start the stack, run one
|
|
149
|
+
command against it, and remove it:
|
|
150
|
+
|
|
151
|
+
```sh
|
|
152
|
+
docker pull node:22-alpine
|
|
153
|
+
./node_modules/.bin/cockpit runtime measure --config cockpit.toml --image node:22-alpine
|
|
154
|
+
./node_modules/.bin/cockpit up --config cockpit.toml
|
|
155
|
+
./node_modules/.bin/cockpit session --config cockpit.toml -- sh -c 'curl -fsS "http://127.0.0.1:$API_HOST_PORT/health"'
|
|
156
|
+
./node_modules/.bin/cockpit down --config cockpit.toml
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
`up` leases a free port family, so the api answers on the port it prints rather than always on
|
|
160
|
+
4200; `session` hands that port to its command as `API_HOST_PORT`. For everyday work, see
|
|
161
|
+
[Bring the product up](getting-started.md#bring-the-product-up) and
|
|
162
|
+
[Run an agent inside the environment](getting-started.md#run-an-agent-inside-the-environment).
|
|
163
|
+
|
|
164
|
+
## Clean up
|
|
165
|
+
|
|
166
|
+
Run `down` first if the stack is up, then delete the demo directory:
|
|
167
|
+
|
|
168
|
+
```sh
|
|
169
|
+
rm -rf "${TMPDIR:-/tmp}/cockpit-demo"
|
|
170
|
+
```
|