@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.
Files changed (426) hide show
  1. package/CHANGELOG.md +474 -0
  2. package/LICENSE +21 -0
  3. package/README.md +25 -2
  4. package/bin/cockpit.mjs +33 -0
  5. package/cockpit.schema.json +2644 -0
  6. package/dist/autonomy.d.ts +45 -0
  7. package/dist/autonomy.js +173 -0
  8. package/dist/bounded-read.d.ts +14 -0
  9. package/dist/bounded-read.js +42 -0
  10. package/dist/browser/commands.d.ts +117 -0
  11. package/dist/browser/commands.js +453 -0
  12. package/dist/browser/package-paths.d.ts +1 -0
  13. package/dist/browser/package-paths.js +6 -0
  14. package/dist/browser/proxy.d.ts +22 -0
  15. package/dist/browser/proxy.js +37 -0
  16. package/dist/browser/runtime.d.ts +118 -0
  17. package/dist/browser/runtime.js +186 -0
  18. package/dist/browser/surfaces.d.ts +141 -0
  19. package/dist/browser/surfaces.js +561 -0
  20. package/dist/browser/ui-gate.d.ts +15 -0
  21. package/dist/browser/ui-gate.js +18 -0
  22. package/dist/canonical-json.d.ts +2 -0
  23. package/dist/canonical-json.js +5 -0
  24. package/dist/cli-guard.d.ts +5 -0
  25. package/dist/cli-guard.js +71 -0
  26. package/dist/cli-main.d.ts +176 -0
  27. package/dist/cli-main.js +1584 -0
  28. package/dist/cli.d.ts +3 -0
  29. package/dist/cli.js +16 -0
  30. package/dist/command-table.d.ts +121 -0
  31. package/dist/command-table.js +664 -0
  32. package/dist/config/load.d.ts +183 -0
  33. package/dist/config/load.js +367 -0
  34. package/dist/config/sibling-toml.d.ts +48 -0
  35. package/dist/config/sibling-toml.js +160 -0
  36. package/dist/config/surface-tools-toml.d.ts +9 -0
  37. package/dist/config/surface-tools-toml.js +37 -0
  38. package/dist/config/unconfirmed-toml.d.ts +9 -0
  39. package/dist/config/unconfirmed-toml.js +29 -0
  40. package/dist/config/verified-write.d.ts +43 -0
  41. package/dist/config/verified-write.js +89 -0
  42. package/dist/diagnostics.d.ts +26 -0
  43. package/dist/diagnostics.js +344 -0
  44. package/dist/docs/check.d.ts +16 -0
  45. package/dist/docs/check.js +197 -0
  46. package/dist/docs/decision-record.d.ts +34 -0
  47. package/dist/docs/decision-record.js +135 -0
  48. package/dist/docs/decisions.d.ts +16 -0
  49. package/dist/docs/decisions.js +103 -0
  50. package/dist/docs/markdown.d.ts +36 -0
  51. package/dist/docs/markdown.js +88 -0
  52. package/dist/docs/references.d.ts +32 -0
  53. package/dist/docs/references.js +148 -0
  54. package/dist/emit.d.ts +22 -0
  55. package/dist/emit.js +43 -0
  56. package/dist/entrypoint-kinds.d.ts +3 -0
  57. package/dist/entrypoint-kinds.js +11 -0
  58. package/dist/environment/application/confirm.d.ts +35 -0
  59. package/dist/environment/application/confirm.js +122 -0
  60. package/dist/environment/application/destructive.d.ts +6 -0
  61. package/dist/environment/application/destructive.js +429 -0
  62. package/dist/environment/application/doctor.d.ts +94 -0
  63. package/dist/environment/application/doctor.js +247 -0
  64. package/dist/environment/application/guard.d.ts +49 -0
  65. package/dist/environment/application/guard.js +677 -0
  66. package/dist/environment/application/health.d.ts +143 -0
  67. package/dist/environment/application/health.js +385 -0
  68. package/dist/environment/application/lifecycle-context.d.ts +235 -0
  69. package/dist/environment/application/lifecycle-context.js +154 -0
  70. package/dist/environment/application/lifecycle-state.d.ts +25 -0
  71. package/dist/environment/application/lifecycle-state.js +202 -0
  72. package/dist/environment/application/lifecycle.d.ts +18 -0
  73. package/dist/environment/application/lifecycle.js +737 -0
  74. package/dist/environment/application/logs.d.ts +45 -0
  75. package/dist/environment/application/logs.js +127 -0
  76. package/dist/environment/application/services.d.ts +60 -0
  77. package/dist/environment/application/services.js +89 -0
  78. package/dist/environment/application/setup.d.ts +129 -0
  79. package/dist/environment/application/setup.js +741 -0
  80. package/dist/environment/application/shared.d.ts +11 -0
  81. package/dist/environment/application/shared.js +61 -0
  82. package/dist/environment/application/siblings.d.ts +43 -0
  83. package/dist/environment/application/siblings.js +269 -0
  84. package/dist/environment/claims.d.ts +389 -0
  85. package/dist/environment/claims.js +1701 -0
  86. package/dist/environment/codex-hook-trust.d.ts +11 -0
  87. package/dist/environment/codex-hook-trust.js +185 -0
  88. package/dist/environment/compose-environment.d.ts +1 -0
  89. package/dist/environment/compose-environment.js +6 -0
  90. package/dist/environment/compose-ownership.d.ts +21 -0
  91. package/dist/environment/compose-ownership.js +117 -0
  92. package/dist/environment/compose-topology.d.ts +125 -0
  93. package/dist/environment/compose-topology.js +490 -0
  94. package/dist/environment/contract.d.ts +522 -0
  95. package/dist/environment/contract.js +794 -0
  96. package/dist/environment/declaration.d.ts +14 -0
  97. package/dist/environment/declaration.js +39 -0
  98. package/dist/environment/destructive-composition.d.ts +29 -0
  99. package/dist/environment/destructive-composition.js +333 -0
  100. package/dist/environment/docker-daemon.d.ts +30 -0
  101. package/dist/environment/docker-daemon.js +78 -0
  102. package/dist/environment/docker-endpoint.d.ts +10 -0
  103. package/dist/environment/docker-endpoint.js +19 -0
  104. package/dist/environment/env-schema-observation.d.ts +46 -0
  105. package/dist/environment/env-schema-observation.js +241 -0
  106. package/dist/environment/evidence.d.ts +136 -0
  107. package/dist/environment/evidence.js +437 -0
  108. package/dist/environment/executable.d.ts +38 -0
  109. package/dist/environment/executable.js +190 -0
  110. package/dist/environment/generated-application/authorities.d.ts +5 -0
  111. package/dist/environment/generated-application/authorities.js +61 -0
  112. package/dist/environment/generated-application/bootstrap-skill.d.ts +16 -0
  113. package/dist/environment/generated-application/bootstrap-skill.js +328 -0
  114. package/dist/environment/generated-application/check.d.ts +13 -0
  115. package/dist/environment/generated-application/check.js +191 -0
  116. package/dist/environment/generated-application/custom-surface.d.ts +26 -0
  117. package/dist/environment/generated-application/custom-surface.js +289 -0
  118. package/dist/environment/generated-application/prepare.d.ts +29 -0
  119. package/dist/environment/generated-application/prepare.js +278 -0
  120. package/dist/environment/generated-application/publication.d.ts +33 -0
  121. package/dist/environment/generated-application/publication.js +547 -0
  122. package/dist/environment/generated-application/shared.d.ts +492 -0
  123. package/dist/environment/generated-application/shared.js +354 -0
  124. package/dist/environment/generated-application/surface-observation.d.ts +4 -0
  125. package/dist/environment/generated-application/surface-observation.js +69 -0
  126. package/dist/environment/generated-application/surface-outputs.d.ts +71 -0
  127. package/dist/environment/generated-application/surface-outputs.js +400 -0
  128. package/dist/environment/generated-application/surfaces.d.ts +3 -0
  129. package/dist/environment/generated-application/surfaces.js +704 -0
  130. package/dist/environment/generated-application/sync.d.ts +6 -0
  131. package/dist/environment/generated-application/sync.js +124 -0
  132. package/dist/environment/git-observation.d.ts +202 -0
  133. package/dist/environment/git-observation.js +553 -0
  134. package/dist/environment/health-composition.d.ts +12 -0
  135. package/dist/environment/health-composition.js +645 -0
  136. package/dist/environment/host-observation.d.ts +56 -0
  137. package/dist/environment/host-observation.js +52 -0
  138. package/dist/environment/identity.d.ts +48 -0
  139. package/dist/environment/identity.js +85 -0
  140. package/dist/environment/init-application.d.ts +333 -0
  141. package/dist/environment/init-application.js +726 -0
  142. package/dist/environment/install-policy-observation.d.ts +71 -0
  143. package/dist/environment/install-policy-observation.js +284 -0
  144. package/dist/environment/install-policy.d.ts +48 -0
  145. package/dist/environment/install-policy.js +96 -0
  146. package/dist/environment/instance.d.ts +33 -0
  147. package/dist/environment/instance.js +122 -0
  148. package/dist/environment/instruction-pointer.d.ts +19 -0
  149. package/dist/environment/instruction-pointer.js +144 -0
  150. package/dist/environment/lifecycle-composition.d.ts +31 -0
  151. package/dist/environment/lifecycle-composition.js +742 -0
  152. package/dist/environment/lifecycle-stage.d.ts +120 -0
  153. package/dist/environment/lifecycle-stage.js +408 -0
  154. package/dist/environment/lifecycle.d.ts +75 -0
  155. package/dist/environment/lifecycle.js +354 -0
  156. package/dist/environment/logs.d.ts +132 -0
  157. package/dist/environment/logs.js +519 -0
  158. package/dist/environment/map-limit.d.ts +2 -0
  159. package/dist/environment/map-limit.js +13 -0
  160. package/dist/environment/mcp-observation.d.ts +9 -0
  161. package/dist/environment/mcp-observation.js +46 -0
  162. package/dist/environment/observations.d.ts +46 -0
  163. package/dist/environment/observations.js +346 -0
  164. package/dist/environment/operator-application.d.ts +79 -0
  165. package/dist/environment/operator-application.js +197 -0
  166. package/dist/environment/ports.d.ts +182 -0
  167. package/dist/environment/ports.js +1205 -0
  168. package/dist/environment/posture-observation.d.ts +68 -0
  169. package/dist/environment/posture-observation.js +253 -0
  170. package/dist/environment/presence.d.ts +4 -0
  171. package/dist/environment/presence.js +26 -0
  172. package/dist/environment/read-composition.d.ts +32 -0
  173. package/dist/environment/read-composition.js +397 -0
  174. package/dist/environment/readiness-composition.d.ts +57 -0
  175. package/dist/environment/readiness-composition.js +151 -0
  176. package/dist/environment/reclaim.d.ts +370 -0
  177. package/dist/environment/reclaim.js +1940 -0
  178. package/dist/environment/repository-identity.d.ts +13 -0
  179. package/dist/environment/repository-identity.js +108 -0
  180. package/dist/environment/runtime-measurement-record.d.ts +38 -0
  181. package/dist/environment/runtime-measurement-record.js +111 -0
  182. package/dist/environment/runtime-measurement.d.ts +27 -0
  183. package/dist/environment/runtime-measurement.js +224 -0
  184. package/dist/environment/runtime-probe-residue.d.ts +43 -0
  185. package/dist/environment/runtime-probe-residue.js +148 -0
  186. package/dist/environment/runtime-probe.d.ts +72 -0
  187. package/dist/environment/runtime-probe.js +725 -0
  188. package/dist/environment/runtime.d.ts +551 -0
  189. package/dist/environment/runtime.js +2405 -0
  190. package/dist/environment/seed.d.ts +16 -0
  191. package/dist/environment/seed.js +43 -0
  192. package/dist/environment/selftest-application.d.ts +86 -0
  193. package/dist/environment/selftest-application.js +713 -0
  194. package/dist/environment/sensitive.d.ts +3 -0
  195. package/dist/environment/sensitive.js +48 -0
  196. package/dist/environment/served-checkout-grants.d.ts +53 -0
  197. package/dist/environment/served-checkout-grants.js +182 -0
  198. package/dist/environment/setup-observation.d.ts +62 -0
  199. package/dist/environment/setup-observation.js +1473 -0
  200. package/dist/environment/setup.d.ts +43 -0
  201. package/dist/environment/setup.js +176 -0
  202. package/dist/environment/sibling-checkouts.d.ts +119 -0
  203. package/dist/environment/sibling-checkouts.js +254 -0
  204. package/dist/environment/sibling-instructions.d.ts +33 -0
  205. package/dist/environment/sibling-instructions.js +224 -0
  206. package/dist/environment/sibling-observation.d.ts +27 -0
  207. package/dist/environment/sibling-observation.js +45 -0
  208. package/dist/environment/sibling-pull.d.ts +23 -0
  209. package/dist/environment/sibling-pull.js +95 -0
  210. package/dist/environment/sibling-registration.d.ts +45 -0
  211. package/dist/environment/sibling-registration.js +538 -0
  212. package/dist/environment/stack-inputs.d.ts +18 -0
  213. package/dist/environment/stack-inputs.js +210 -0
  214. package/dist/environment/stack-inventory-prune.d.ts +31 -0
  215. package/dist/environment/stack-inventory-prune.js +129 -0
  216. package/dist/environment/stack-inventory-report.d.ts +44 -0
  217. package/dist/environment/stack-inventory-report.js +78 -0
  218. package/dist/environment/stack-inventory.d.ts +94 -0
  219. package/dist/environment/stack-inventory.js +418 -0
  220. package/dist/environment/state.d.ts +410 -0
  221. package/dist/environment/state.js +2153 -0
  222. package/dist/environment/templates.d.ts +140 -0
  223. package/dist/environment/templates.js +685 -0
  224. package/dist/environment/tool-registration.d.ts +9 -0
  225. package/dist/environment/tool-registration.js +92 -0
  226. package/dist/environment/upgrade-application.d.ts +19 -0
  227. package/dist/environment/upgrade-application.js +175 -0
  228. package/dist/environment-exec/execute.d.ts +105 -0
  229. package/dist/environment-exec/execute.js +1179 -0
  230. package/dist/environment-exec/libexec-program.d.ts +6 -0
  231. package/dist/environment-exec/libexec-program.js +22 -0
  232. package/dist/environment-exec/verified-digest.d.ts +4 -0
  233. package/dist/environment-exec/verified-digest.js +16 -0
  234. package/dist/exact-keys.d.ts +7 -0
  235. package/dist/exact-keys.js +15 -0
  236. package/dist/fix-catalogue.d.ts +32 -0
  237. package/dist/fix-catalogue.js +60 -0
  238. package/dist/freshness.d.ts +29 -0
  239. package/dist/freshness.js +75 -0
  240. package/dist/generated-environment/adopt.d.ts +16 -0
  241. package/dist/generated-environment/adopt.js +271 -0
  242. package/dist/generated-environment/command.d.ts +47 -0
  243. package/dist/generated-environment/command.js +75 -0
  244. package/dist/generated-environment/transaction.d.ts +186 -0
  245. package/dist/generated-environment/transaction.js +1770 -0
  246. package/dist/grading/evaluate.d.ts +71 -0
  247. package/dist/grading/evaluate.js +403 -0
  248. package/dist/grading/grade.d.ts +33 -0
  249. package/dist/grading/grade.js +57 -0
  250. package/dist/guards/answer-confirmation.d.ts +41 -0
  251. package/dist/guards/answer-confirmation.js +109 -0
  252. package/dist/guards/evaluator.d.ts +130 -0
  253. package/dist/guards/evaluator.js +1258 -0
  254. package/dist/guards/harness-adapter.d.ts +17 -0
  255. package/dist/guards/harness-adapter.js +57 -0
  256. package/dist/guards/host.d.ts +8 -0
  257. package/dist/guards/host.js +10 -0
  258. package/dist/guards/invocation-parser.d.ts +66 -0
  259. package/dist/guards/invocation-parser.js +595 -0
  260. package/dist/guards/local-identity.d.ts +44 -0
  261. package/dist/guards/local-identity.js +129 -0
  262. package/dist/guards/policy-change.d.ts +43 -0
  263. package/dist/guards/policy-change.js +159 -0
  264. package/dist/guards/policy-pin.d.ts +13 -0
  265. package/dist/guards/policy-pin.js +177 -0
  266. package/dist/guards/protected-locations.d.ts +62 -0
  267. package/dist/guards/protected-locations.js +461 -0
  268. package/dist/guards/read-only.d.ts +37 -0
  269. package/dist/guards/read-only.js +315 -0
  270. package/dist/init/command.d.ts +41 -0
  271. package/dist/init/command.js +330 -0
  272. package/dist/init/derive.d.ts +53 -0
  273. package/dist/init/derive.js +819 -0
  274. package/dist/init/draft.d.ts +140 -0
  275. package/dist/init/draft.js +1228 -0
  276. package/dist/init/render.d.ts +47 -0
  277. package/dist/init/render.js +104 -0
  278. package/dist/init/scaffold.d.ts +53 -0
  279. package/dist/init/scaffold.js +121 -0
  280. package/dist/invocation.d.ts +13 -0
  281. package/dist/invocation.js +20 -0
  282. package/dist/package-metadata.d.ts +9 -0
  283. package/dist/package-metadata.js +19 -0
  284. package/dist/readiness.d.ts +53 -0
  285. package/dist/readiness.js +88 -0
  286. package/dist/references/named.d.ts +24 -0
  287. package/dist/references/named.js +27 -0
  288. package/dist/refusal.d.ts +15 -0
  289. package/dist/refusal.js +7 -0
  290. package/dist/registry-derivation.d.ts +31 -0
  291. package/dist/registry-derivation.js +32 -0
  292. package/dist/registry-resolve/command.d.ts +47 -0
  293. package/dist/registry-resolve/command.js +226 -0
  294. package/dist/registry-resolve/registry.d.ts +68 -0
  295. package/dist/registry-resolve/registry.js +292 -0
  296. package/dist/registry-resolve/render-shell.d.ts +18 -0
  297. package/dist/registry-resolve/render-shell.js +36 -0
  298. package/dist/repair.d.ts +29 -0
  299. package/dist/repair.js +8 -0
  300. package/dist/repository-path.d.ts +9 -0
  301. package/dist/repository-path.js +16 -0
  302. package/dist/schema-json.d.ts +1 -0
  303. package/dist/schema-json.js +177 -0
  304. package/dist/schema.d.ts +1289 -0
  305. package/dist/schema.js +985 -0
  306. package/dist/setup/command.d.ts +4 -0
  307. package/dist/setup/command.js +4 -0
  308. package/dist/sha256.d.ts +1 -0
  309. package/dist/sha256.js +4 -0
  310. package/dist/surfaces/adoption.d.ts +41 -0
  311. package/dist/surfaces/adoption.js +217 -0
  312. package/dist/surfaces/consumer-instructions.d.ts +20 -0
  313. package/dist/surfaces/consumer-instructions.js +43 -0
  314. package/dist/surfaces/contract.d.ts +42 -0
  315. package/dist/surfaces/contract.js +169 -0
  316. package/dist/surfaces/core-declarations.d.ts +24 -0
  317. package/dist/surfaces/core-declarations.js +79 -0
  318. package/dist/surfaces/development-markers.d.ts +1 -0
  319. package/dist/surfaces/development-markers.js +18 -0
  320. package/dist/surfaces/generator-adapter.d.ts +71 -0
  321. package/dist/surfaces/generator-adapter.js +809 -0
  322. package/dist/surfaces/harness-registry.d.ts +260 -0
  323. package/dist/surfaces/harness-registry.js +146 -0
  324. package/dist/surfaces/mcp.d.ts +145 -0
  325. package/dist/surfaces/mcp.js +349 -0
  326. package/dist/surfaces/merge.d.ts +30 -0
  327. package/dist/surfaces/merge.js +105 -0
  328. package/dist/surfaces/ownership.d.ts +190 -0
  329. package/dist/surfaces/ownership.js +795 -0
  330. package/dist/surfaces/projection.d.ts +136 -0
  331. package/dist/surfaces/projection.js +716 -0
  332. package/dist/surfaces/render.d.ts +79 -0
  333. package/dist/surfaces/render.js +636 -0
  334. package/dist/surfaces/restrictions.d.ts +130 -0
  335. package/dist/surfaces/restrictions.js +447 -0
  336. package/dist/surfaces/selftest.d.ts +162 -0
  337. package/dist/surfaces/selftest.js +393 -0
  338. package/dist/surfaces/skill-contract.d.ts +85 -0
  339. package/dist/surfaces/skill-contract.js +449 -0
  340. package/dist/surfaces/sync.d.ts +57 -0
  341. package/dist/surfaces/sync.js +164 -0
  342. package/dist/team-metadata.d.ts +41 -0
  343. package/dist/team-metadata.js +513 -0
  344. package/dist/testing/gates.d.ts +91 -0
  345. package/dist/testing/gates.js +182 -0
  346. package/dist/testing/hooks.d.ts +59 -0
  347. package/dist/testing/hooks.js +139 -0
  348. package/dist/testing/test-protection.d.ts +34 -0
  349. package/dist/testing/test-protection.js +137 -0
  350. package/dist/testing/verdict.d.ts +29 -0
  351. package/dist/testing/verdict.js +62 -0
  352. package/dist/testing/weakening.d.ts +15 -0
  353. package/dist/testing/weakening.js +30 -0
  354. package/dist/work-orders/application-closure.d.ts +7 -0
  355. package/dist/work-orders/application-closure.js +76 -0
  356. package/dist/work-orders/application-context.d.ts +162 -0
  357. package/dist/work-orders/application-context.js +137 -0
  358. package/dist/work-orders/application-decisions.d.ts +27 -0
  359. package/dist/work-orders/application-decisions.js +121 -0
  360. package/dist/work-orders/application-grading.d.ts +11 -0
  361. package/dist/work-orders/application-grading.js +212 -0
  362. package/dist/work-orders/application.d.ts +6 -0
  363. package/dist/work-orders/application.js +223 -0
  364. package/dist/work-orders/composition.d.ts +101 -0
  365. package/dist/work-orders/composition.js +1202 -0
  366. package/dist/work-orders/contract.d.ts +77 -0
  367. package/dist/work-orders/contract.js +140 -0
  368. package/dist/work-orders/decisions.d.ts +23 -0
  369. package/dist/work-orders/decisions.js +55 -0
  370. package/dist/work-orders/store.d.ts +207 -0
  371. package/dist/work-orders/store.js +291 -0
  372. package/docs/README.md +68 -0
  373. package/docs/architecture.md +136 -0
  374. package/docs/capability-matrix.md +58 -0
  375. package/docs/cli-reference.md +807 -0
  376. package/docs/command-list.md +62 -0
  377. package/docs/compose-patterns.md +99 -0
  378. package/docs/concepts.md +173 -0
  379. package/docs/configuration-essentials.md +177 -0
  380. package/docs/configuration-reference.md +636 -0
  381. package/docs/docs-check.md +76 -0
  382. package/docs/environment.md +948 -0
  383. package/docs/extending.md +43 -0
  384. package/docs/faq.md +113 -0
  385. package/docs/getting-started.md +692 -0
  386. package/docs/harness-surfaces.md +500 -0
  387. package/docs/joining-a-team.md +76 -0
  388. package/docs/release-policy.md +49 -0
  389. package/docs/safety-and-autonomy.md +463 -0
  390. package/docs/troubleshooting.md +382 -0
  391. package/docs/tutorial.md +171 -0
  392. package/docs/work-and-browser.md +420 -0
  393. package/libexec/browser-operation.cjs +270 -0
  394. package/libexec/fence-marker.cjs +101 -0
  395. package/libexec/fence-marker.d.cts +24 -0
  396. package/libexec/fenced-group-runner.cjs +77 -0
  397. package/libexec/fenced-supervisor.cjs +137 -0
  398. package/libexec/generated-filesystem.cjs +731 -0
  399. package/libexec/install-filesystem.cjs +225 -0
  400. package/libexec/rulesync-generator.NOTICE.md +1112 -0
  401. package/libexec/rulesync-generator.cjs +743 -0
  402. package/libexec/surface-generator-worker.cjs +266 -0
  403. package/libexec/surface-output-reader.cjs +99 -0
  404. package/libexec/surface-scratch-cleanup.cjs +14 -0
  405. package/libexec/validate-harness-evidence.d.mts +183 -0
  406. package/libexec/validate-harness-evidence.mjs +1312 -0
  407. package/package.json +74 -4
  408. package/surfaces/README.md +33 -0
  409. package/surfaces/agents/evaluator.agent.md +76 -0
  410. package/surfaces/guards/bash-guard.sh +48 -0
  411. package/surfaces/guards/claude.adapter.json +25 -0
  412. package/surfaces/guards/codex.adapter.json +24 -0
  413. package/surfaces/guards/opencode.adapter.json +25 -0
  414. package/surfaces/references/browser.md +63 -0
  415. package/surfaces/references/test-data-and-personas.md +84 -0
  416. package/surfaces/references/testing-tiers.md +11 -0
  417. package/surfaces/skills/cockpit-browser.skill.md +59 -0
  418. package/surfaces/skills/cockpit-explain.skill.md +32 -0
  419. package/surfaces/skills/cockpit-fix.skill.md +37 -0
  420. package/surfaces/skills/cockpit-setup.skill.md +39 -0
  421. package/surfaces/skills/cockpit-work.skill.md +34 -0
  422. package/surfaces/skills/collection.json +5 -0
  423. package/surfaces/skills/procedures/explain.md +66 -0
  424. package/surfaces/skills/procedures/fix.md +95 -0
  425. package/surfaces/skills/procedures/setup.md +452 -0
  426. package/surfaces/skills/procedures/work.md +134 -0
@@ -0,0 +1,382 @@
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, confined working directory, or remote server URL, header
125
+ reference or `headersHelper` named by the message.
126
+ `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
127
+ server disabled because `[mcp.approved]` has no entry for it, or its declaration changed since it
128
+ was approved; a person, only after reviewing its command, arguments, working directory, environment
129
+ names and sources, sets its name to the sha256 in the message under `[mcp.approved]` and runs `sync`.
130
+ 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
131
+ declaration. `MCP_EXECUTABLE_UNAVAILABLE` comes from the generated wrapper when its declared
132
+ executable is absent or not executable; restore that executable rather than changing the wrapper.
133
+ `MCP_TRANSPORT_UNAVAILABLE` names a remote server left out of the tools that cannot carry its
134
+ credential, such as OpenCode for a server with a `headersHelper`; see
135
+ [Remote servers](harness-surfaces.md#remote-servers) for what each tool can carry.
136
+
137
+ For `RESTRICTION_INPUT_INVALID`, `RESTRICTION_ADAPTER_INVALID`, `RESTRICTION_EVENT_UNADAPTED`,
138
+ `RESTRICTION_TEMPLATE_INVALID` or `RESTRICTION_OUTPUT_LIMIT`, correct the named guard policy,
139
+ adapter, template or output. An unadapted event stays unavailable; do not replace it with an
140
+ instruction and call it enforced.
141
+
142
+ ### Sibling projection and skills
143
+
144
+ `PROJECTION_INPUT_INVALID` and `PROJECTION_RESULT_BOUNDS` mean the projection request or result
145
+ is not valid, size-limited data. `PROJECTION_ROOT_AMBIGUOUS`, `PROJECTION_MOUNT_MISMATCH`, and
146
+ `PROJECTION_GRANT_MISMATCH` require the main checkout, active mount, and directory grant
147
+ to agree. `PROJECTION_GUIDE_UNAVAILABLE`, `PROJECTION_GUIDE_ESCAPE`,
148
+ `PROJECTION_GUIDE_READ_FAILED`, and `PROJECTION_GUIDE_CLOSE_FAILED` identify the named guide or
149
+ its confined read. Restore a regular declared guide and safe root. `PROJECTION_GUIDE_CHANGED`
150
+ means the guide changed after observation; stop the concurrent edit and retry from a fresh read.
151
+ A sibling guide holding one of cockpit's own `<!-- cockpit:instructions:` or `<!-- cockpit:owner:`
152
+ markers is refused as `PROJECTION_INPUT_INVALID`, because its copy would end or split cockpit's
153
+ region of the root **AGENTS.md**; remove the marker from the guide.
154
+
155
+ For `SKILL_INPUT_INVALID`, `SKILL_FRONTMATTER_INVALID`, `SKILL_CONTRACT_INVALID`,
156
+ `SKILL_IDENTITY_INVALID`, `SKILL_NAME_DUPLICATE`, `SKILL_TOOL_EQUIVALENCE_MISSING`,
157
+ `SKILL_PROCEDURE_MISSING`, `SKILL_COMMAND_UNDECLARED`, `SKILL_ENTRY_POINT_EXCEEDED`, or
158
+ `SKILL_DECISION_LOGIC_EMBEDDED`, correct the shipped skill entry point or shared procedure named
159
+ by the diagnostic. `SKILL_RENDER_INVALID` and `SKILL_RENDER_INVENTORY_INVALID` mean generated
160
+ files do not match the skill contract. `SKILL_STANDING_COST_EXCEEDED` means the always-loaded
161
+ skill entry points are too large. Shrink them; moving decision logic into another always-loaded
162
+ file is not a repair.
163
+
164
+ ### Selftest and override inspection
165
+
166
+ `SELFTEST_SOURCE_INVALID` means the generated check, resolved probe-specification path, source
167
+ digest, generated-manifest digest or specification size failed its check, or the file still has a
168
+ `null` where a probe belongs. For a missing file, write a fresh one with
169
+ `npx --no cockpit selftest --config <path> --write-probe-specifications <new file>` and fill in its
170
+ `null` fields; for a stale one, add `--probe-specifications <stale file>` to that command so the
171
+ rows you filled for unchanged cells are kept. Do not edit the stored digests. For a `null`, fill in the rows the message lists.
172
+ [Skills and selftest evidence](harness-surfaces.md#skills-and-selftest-evidence) describes each
173
+ field.
174
+
175
+ `SELFTEST_EXECUTION_INVALID` has two causes:
176
+
177
+ - An unapproved or mismatched probe file, refused before any command in it runs. Inspect its
178
+ displayed whole-file digest and exact command vectors.
179
+ - A candidate, deliberately broken control, version/help event, transcript or final result bundle
180
+ did not give the expected result. Inspect the named harness and the retained output.
181
+
182
+ A missing executable, a sign-in requirement, missing process isolation or a pending enforcement
183
+ probe stays `human_needed` until the manual action in the record is done. Run
184
+ `selftest --interactive` at a terminal outside CI; approve the full file digest and commands
185
+ first, then each executable path and SHA-256. Approval lasts only for that run.
186
+
187
+ `SURFACE_OVERRIDE_INSPECTION_UNAVAILABLE`, `SURFACE_OVERRIDE_INSPECTION_REFUSED`,
188
+ `SURFACE_OVERRIDE_INSPECTION_INVALID`, and `SURFACE_OVERRIDE_INSPECTION_PATH_MISMATCH` mean
189
+ `doctor` could not produce its read-only override view. They do not mean there are no overrides;
190
+ inspect the named generated source or configuration path before relying on that view.
191
+
192
+ ## Clear cockpit state
193
+
194
+ cockpit keeps machine-local runtime state outside the repository: which sessions hold each stack,
195
+ its port lease, and how far `up` got. Each user has one state root:
196
+
197
+ | Host | State root |
198
+ | --- | --- |
199
+ | macOS | `~/Library/Application Support/cockpit/state/v1` |
200
+ | Linux, `XDG_STATE_HOME` set | `$XDG_STATE_HOME/cockpit/v1` |
201
+ | Linux, otherwise | `~/.local/state/cockpit/v1` |
202
+
203
+ Under it, `cockpits/cockpit_<name>_<hash>/` holds one cockpit's state, where `<name>` is
204
+ `cockpit.name` and `<hash>` identifies the cockpit's main checkout; `checkouts/` holds `init`
205
+ progress per checkout. A state diagnostic's target names the exact directory.
206
+
207
+ These records are how cockpit knows which containers and ports a stack owns. Do not edit them by
208
+ hand, and do not delete them while the stack runs: its containers would keep running with nothing
209
+ that knows about them.
210
+
211
+ A stack whose worktree was deleted, and state folders an earlier cockpit build left, are removed by
212
+ `stacks prune`, which previews by default and removes only what no checkout can reach; see
213
+ [List and prune stacks across the machine](environment.md#list-and-prune-stacks-across-the-machine).
214
+ `doctor` warns with `STACKS_ORPHANED` when it finds such a stack, and with `STATE_RECORD_MALFORMED`
215
+ for another cockpit's state folder this version cannot read; `up` and `sleep` ignore that folder's
216
+ port leases.
217
+
218
+ `stacks prune` keeps a stack whose checkout still exists. To clear the state of a checkout you still
219
+ have:
220
+
221
+ 1. Stop the stack and release its claims from the cockpit directory:
222
+ `./node_modules/.bin/cockpit down --config cockpit.toml`.
223
+ 2. If `down` refuses because the state cannot be read, stop the stack with Docker instead: find
224
+ its project with `docker compose ls`, then run `docker compose -p <project> down`.
225
+ 3. Delete the directory the diagnostic names, for example
226
+ `rm -rf "$HOME/Library/Application Support/cockpit/state/v1/cockpits/cockpit_duo_<hash>"`.
227
+
228
+ When this cockpit's own state cannot be read, runtime commands refuse with
229
+ `STATE_RECORD_MALFORMED` or `STATE_FORMAT_UNSUPPORTED` until you clear it this way.
230
+
231
+ <!-- cockpit:diagnostic-index:begin -->
232
+ ## Codes with a fixed remedy
233
+
234
+ 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.
235
+
236
+ | Diagnostic | What to do |
237
+ | --- | --- |
238
+ | `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 |
239
+ | `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 |
240
+ | `BROWSER_ROUTE_FINDINGS` | this run asked for a clean route (--fail-on-findings). Read result.receipt.surfaces[].diagnostics, including excerpt.messages where present: fix the product for each console error, uncaught page error and failed request that matters, then rerun npx --no cockpit browser drive --config <your cockpit.toml> --route <name> --fail-on-findings; third-party traffic never counts |
241
+ | `CLAIM_CO_TENANT` | [see above](#common-refusal-guidance) |
242
+ | `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 |
243
+ | `COCKPIT_REVISION_UNSTAMPED` | install a released @b00dea/cockpit when the resolved data must name the exact cockpit source commit |
244
+ | `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> |
245
+ | `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> |
246
+ | `CONFIG_ENCODING_INVALID` | save the configuration as UTF-8, then retry |
247
+ | `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> |
248
+ | `DECISION_INDEX_ENTRY_MISSING` | correct the link to the record's current file name, or remove the entry if the record was deleted on purpose |
249
+ | `DECISION_LINK_UNRESOLVED` | correct the number or link to name an existing record, or restore the record it names |
250
+ | `DECISION_NUMBER_REUSED` | renumber the later record to the next free number, then update the index and every supersedes line that cites it |
251
+ | `DECISION_UNINDEXED` | add a line linking the record to the decision index |
252
+ | `DOCS_NOT_DECLARED` | add a [docs] table to cockpit.toml: living = ["README.md", "docs/**/*.md"] lists the documents that must stay true, and the optional decisions = "docs/adr" and decisions_index = "docs/adr/README.md" name the decision records and their index; then rerun npx --no cockpit docs check --config <your cockpit.toml> |
253
+ | `DOCS_REFERENCE_REMOVED` | cite the path that replaced it (a rename is named in the message), or rewrite or delete the sentence if what it described is gone; then rerun npx --no cockpit docs check --config <your cockpit.toml> |
254
+ | `DOCS_TARGET_REMOVED` | cite the target or command that replaced it, or rewrite or delete the sentence if the step is gone; then rerun npx --no cockpit docs check --config <your cockpit.toml> |
255
+ | `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> |
256
+ | `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 |
257
+ | `DOCUMENT_RUNTIME_NOT_DECLARED` | once a product runs, declare environment.compose_files and run npx --no cockpit sync --config <your cockpit.toml> |
258
+ | `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> |
259
+ | `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> |
260
+ | `EXECUTION_TERMINATION_UNCONFIRMED` | [see above](#merge-ownership-and-generation) |
261
+ | `GENERATED_ARTIFACT_DRIFT` | [see above](#generated_artifact_drift) |
262
+ | `GENERATED_ARTIFACT_MISSING` | run npx --no cockpit sync --config <your cockpit.toml> |
263
+ | `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> |
264
+ | `GENERATED_OWNERSHIP_DRIFT` | run npx --no cockpit sync --config <your cockpit.toml> |
265
+ | `GENERATED_OWNERSHIP_INVALID` | [see above](#common-refusal-guidance) |
266
+ | `GENERATED_STALE_APPROVAL_INVALID` | [see above](#merge-ownership-and-generation) |
267
+ | `GENERATED_STALE_APPROVAL_REQUIRED` | [see above](#merge-ownership-and-generation) |
268
+ | `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 |
269
+ | `GUARD_AUTHORITY_UNAVAILABLE` | [see above](#common-refusal-guidance) |
270
+ | `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] |
271
+ | `GUARD_REFUSED` | [see above](#common-refusal-guidance) |
272
+ | `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 |
273
+ | `INIT_CANONICAL_OWNERSHIP_MISSING` | [see above](#common-refusal-guidance) |
274
+ | `INIT_SCAFFOLD_COMPOSE_EXISTS` | run npx --no cockpit init <cockpit root> --target <tool>, which proposes the existing Compose file for environment.compose_files |
275
+ | `LOGS_TRUNCATED` | lower --tail to the number of recent records you need, or read the older records from the container runtime directly |
276
+ | `MCP_APPROVAL_UNKNOWN` | [see above](#mcp-and-restrictions) |
277
+ | `MCP_COMMAND_CONFLICT` | [see above](#mcp-and-restrictions) |
278
+ | `MCP_COMMAND_UNRESOLVED` | install the command or correct it in the sibling's MCP declaration, then run npx --no cockpit sync --config <your cockpit.toml>; a changed declaration needs a person to approve its new sha256 under [mcp.approved] |
279
+ | `MCP_DECLARATION_INVALID` | [see above](#mcp-and-restrictions) |
280
+ | `MCP_INPUT_INVALID` | [see above](#mcp-and-restrictions) |
281
+ | `MCP_NOT_APPROVED` | [see above](#mcp-and-restrictions) |
282
+ | `MCP_TRANSPORT_UNAVAILABLE` | [see above](#mcp-and-restrictions) |
283
+ | `OUTPUT_EXISTS` | choose a new path; replacement requires a future explicit option |
284
+ | `PORT_FAMILY_COLLISION` | [see above](#common-refusal-guidance) |
285
+ | `PORT_LEASE_EXHAUSTED` | [see above](#common-refusal-guidance) |
286
+ | `PROJECTION_GRANT_MISMATCH` | [see above](#sibling-projection-and-skills) |
287
+ | `PROJECTION_GUIDE_CHANGED` | [see above](#sibling-projection-and-skills) |
288
+ | `PROJECTION_GUIDE_CLOSE_FAILED` | [see above](#sibling-projection-and-skills) |
289
+ | `PROJECTION_GUIDE_ESCAPE` | [see above](#sibling-projection-and-skills) |
290
+ | `PROJECTION_GUIDE_READ_FAILED` | [see above](#sibling-projection-and-skills) |
291
+ | `PROJECTION_GUIDE_UNAVAILABLE` | [see above](#sibling-projection-and-skills) |
292
+ | `PROJECTION_INPUT_INVALID` | [see above](#sibling-projection-and-skills) |
293
+ | `PROJECTION_MOUNT_MISMATCH` | [see above](#sibling-projection-and-skills) |
294
+ | `PROJECTION_RESULT_BOUNDS` | [see above](#sibling-projection-and-skills) |
295
+ | `PROJECTION_ROOT_AMBIGUOUS` | [see above](#sibling-projection-and-skills) |
296
+ | `REGISTRY_INPUT_INVALID` | [see above](#harness-surface-failures) |
297
+ | `RESTRICTION_ADAPTER_INVALID` | [see above](#mcp-and-restrictions) |
298
+ | `RESTRICTION_EVENT_UNADAPTED` | [see above](#mcp-and-restrictions) |
299
+ | `RESTRICTION_INPUT_INVALID` | [see above](#mcp-and-restrictions) |
300
+ | `RESTRICTION_OUTPUT_LIMIT` | [see above](#mcp-and-restrictions) |
301
+ | `RESTRICTION_TEMPLATE_INVALID` | [see above](#mcp-and-restrictions) |
302
+ | `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 |
303
+ | `RUNTIME_UNAVAILABLE` | [see above](#common-refusal-guidance) |
304
+ | `RUNTIME_UNMEASURED` | [see above](#common-refusal-guidance) |
305
+ | `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 |
306
+ | `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 |
307
+ | `SELFTEST_EXECUTION_INVALID` | [see above](#selftest-and-override-inspection) |
308
+ | `SELFTEST_SOURCE_INVALID` | [see above](#selftest-and-override-inspection) |
309
+ | `SERVICE_NOT_DECLARED` | rerun with --service set to one of the declared services |
310
+ | `SESSION_STACK_RETAINED` | run npx --no cockpit sleep --config <your cockpit.toml> to release this checkout's remaining hold |
311
+ | `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 |
312
+ | `SETUP_INSTRUCTION_FILES_OFFERED` | review the proposed change with a person, then run npx --no cockpit setup --config <your cockpit.toml> --write-instruction-files |
313
+ | `SETUP_INSTRUCTION_POINTER_OFFERED` | review the proposed AGENTS.md block, then run npx --no cockpit setup --config <your cockpit.toml> --write-instruction-pointers |
314
+ | `SETUP_MANUAL_MISSING` | create the checkout, then run npx --no cockpit setup --config <your cockpit.toml> again; [see above](#common-refusal-guidance) |
315
+ | `SETUP_REMOTE_MISMATCH` | [see above](#common-refusal-guidance) |
316
+ | `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 |
317
+ | `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> |
318
+ | `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 |
319
+ | `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 |
320
+ | `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 |
321
+ | `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 |
322
+ | `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 |
323
+ | `SKILL_COMMAND_UNDECLARED` | [see above](#sibling-projection-and-skills) |
324
+ | `SKILL_CONTRACT_INVALID` | [see above](#sibling-projection-and-skills) |
325
+ | `SKILL_DECISION_LOGIC_EMBEDDED` | [see above](#sibling-projection-and-skills) |
326
+ | `SKILL_ENTRY_POINT_EXCEEDED` | [see above](#sibling-projection-and-skills) |
327
+ | `SKILL_FRONTMATTER_INVALID` | [see above](#sibling-projection-and-skills) |
328
+ | `SKILL_IDENTITY_INVALID` | [see above](#sibling-projection-and-skills) |
329
+ | `SKILL_INPUT_INVALID` | [see above](#sibling-projection-and-skills) |
330
+ | `SKILL_NAME_DUPLICATE` | [see above](#sibling-projection-and-skills) |
331
+ | `SKILL_PROCEDURE_MISSING` | [see above](#sibling-projection-and-skills) |
332
+ | `SKILL_RENDER_INVALID` | [see above](#sibling-projection-and-skills) |
333
+ | `SKILL_RENDER_INVENTORY_INVALID` | [see above](#sibling-projection-and-skills) |
334
+ | `SKILL_STANDING_COST_EXCEEDED` | [see above](#sibling-projection-and-skills) |
335
+ | `SKILL_TOOL_EQUIVALENCE_MISSING` | [see above](#sibling-projection-and-skills) |
336
+ | `STACKS_ORPHANED` | [see above](#clear-cockpit-state) |
337
+ | `STATE_FORMAT_UNSUPPORTED` | [see above](#clear-cockpit-state) |
338
+ | `STATE_RECORD_MALFORMED` | [see above](#clear-cockpit-state) |
339
+ | `SURFACE_ADOPTION_REFUSED` | [see above](#merge-ownership-and-generation) |
340
+ | `SURFACE_ARTIFACT_INVALID` | [see above](#merge-ownership-and-generation) |
341
+ | `SURFACE_BOUNDS` | [see above](#merge-ownership-and-generation) |
342
+ | `SURFACE_CLEANUP_FAILED` | [see above](#merge-ownership-and-generation) |
343
+ | `SURFACE_CUSTOM_REFUSED` | [see above](#merge-ownership-and-generation) |
344
+ | `SURFACE_FEATURE_COVERAGE` | [see above](#merge-ownership-and-generation) |
345
+ | `SURFACE_GENERATION_FAILED` | [see above](#merge-ownership-and-generation) |
346
+ | `SURFACE_GENERATOR_TRUST_WARNING` | [see above](#merge-ownership-and-generation) |
347
+ | `SURFACE_INPUT_INVALID` | [see above](#merge-ownership-and-generation) |
348
+ | `SURFACE_KIND_AMBIGUOUS` | [see above](#merge-ownership-and-generation) |
349
+ | `SURFACE_NAME_DUPLICATE` | [see above](#merge-ownership-and-generation) |
350
+ | `SURFACE_NODE_UNAVAILABLE` | [see above](#merge-ownership-and-generation) |
351
+ | `SURFACE_OUTPUT_COVERAGE` | [see above](#merge-ownership-and-generation) |
352
+ | `SURFACE_OVERRIDE_INSPECTION_INVALID` | [see above](#selftest-and-override-inspection) |
353
+ | `SURFACE_OVERRIDE_INSPECTION_PATH_MISMATCH` | [see above](#selftest-and-override-inspection) |
354
+ | `SURFACE_OVERRIDE_INSPECTION_REFUSED` | [see above](#selftest-and-override-inspection) |
355
+ | `SURFACE_OVERRIDE_INSPECTION_UNAVAILABLE` | [see above](#selftest-and-override-inspection) |
356
+ | `SURFACE_OVERRIDE_INVALID` | [see above](#merge-ownership-and-generation) |
357
+ | `SURFACE_OWNERSHIP_INVALID` | [see above](#common-refusal-guidance) |
358
+ | `SURFACE_PACKAGE_UNAVAILABLE` | [see above](#merge-ownership-and-generation) |
359
+ | `SURFACE_PATH_CONFLICT` | [see above](#merge-ownership-and-generation) |
360
+ | `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> |
361
+ | `SURFACE_SCRATCH_UNAVAILABLE` | [see above](#merge-ownership-and-generation) |
362
+ | `SURFACE_SOURCE_UNAVAILABLE` | [see above](#common-refusal-guidance) |
363
+ | `SURFACE_STAGE_VARIANCE` | [see above](#merge-ownership-and-generation) |
364
+ | `SURFACE_STAGING_FAILED` | [see above](#merge-ownership-and-generation) |
365
+ | `SURFACE_STATE_CONFLICT` | [see above](#common-refusal-guidance) |
366
+ | `SURFACE_WORKER_NONZERO` | [see above](#merge-ownership-and-generation) |
367
+ | `SURFACE_WORKER_OUTPUT` | [see above](#merge-ownership-and-generation) |
368
+ | `SURFACE_WORKER_SIGNAL` | [see above](#merge-ownership-and-generation) |
369
+ | `SURFACE_WORKER_STDERR` | [see above](#merge-ownership-and-generation) |
370
+ | `SURFACE_WORKER_TIMEOUT` | [see above](#merge-ownership-and-generation) |
371
+ | `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> |
372
+ | `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 |
373
+ | `UPGRADE_ALREADY_CURRENT` | nothing to upgrade; to move to another version name it: npx --no cockpit upgrade --config <your cockpit.toml> <version> |
374
+ | `UPGRADE_INSTALL_FAILED` | fix what the package manager reported (is the version published?), then run npx --no cockpit upgrade --config <your cockpit.toml> <version> |
375
+ | `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> |
376
+ | `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> |
377
+ | `UPGRADE_SYNC_FAILED` | act on what sync reported above or put npx on PATH, then run npx --no cockpit sync --config <your cockpit.toml> |
378
+ | `UPGRADE_VERSION_INVALID` | give a full version such as 1.2.3, not a range or tag |
379
+ | `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> |
380
+ | `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 |
381
+ | `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; for a decision record that is missing or no longer cites its order, restore it from git or put back its "Work order: <id>" line |
382
+ <!-- cockpit:diagnostic-index:end -->
@@ -0,0 +1,171 @@
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, list its
149
+ services, run one 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 ps --config cockpit.toml
156
+ ./node_modules/.bin/cockpit session --config cockpit.toml -- sh -c 'curl -fsS "http://127.0.0.1:$API_HOST_PORT/health"'
157
+ ./node_modules/.bin/cockpit down --config cockpit.toml
158
+ ```
159
+
160
+ `up` leases a free port family, so the api answers on the port it prints rather than always on
161
+ 4200; `session` hands that port to its command as `API_HOST_PORT`. For everyday work, see
162
+ [Bring the product up](getting-started.md#bring-the-product-up) and
163
+ [Run an agent inside the environment](getting-started.md#run-an-agent-inside-the-environment).
164
+
165
+ ## Clean up
166
+
167
+ Run `down` first if the stack is up, then delete the demo directory:
168
+
169
+ ```sh
170
+ rm -rf "${TMPDIR:-/tmp}/cockpit-demo"
171
+ ```