@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,505 @@
|
|
|
1
|
+
import { type ExecuteProbeOutcome } from '../environment-exec/execute.js';
|
|
2
|
+
import { type MachineFloorConfigProjection } from '../config/load.js';
|
|
3
|
+
import { ENVIRONMENT_CODES, type EnvironmentCommandOutcome, type EnvironmentObservation, type ExecutionFailureCode, type ExecutionFence, type ExecutionPlan, type ExecutionStep, type CockpitId, type StackId } from './contract.js';
|
|
4
|
+
import { type ResolvedExecutable } from './executable.js';
|
|
5
|
+
import { type DrainOutcome, type ReservedDrainAttempt } from './claims.js';
|
|
6
|
+
import { type PortLeaseProjection } from './ports.js';
|
|
7
|
+
import type { StateNamespace } from './state.js';
|
|
8
|
+
import type { LocalRuntimeMeasurements } from './runtime-measurement-record.js';
|
|
9
|
+
import { type ConsumedSetupCheckoutObservation, type SetupCheckoutProjection } from './setup-observation.js';
|
|
10
|
+
export declare const observationDeclarations: readonly [{
|
|
11
|
+
readonly id: 'runtime-availability';
|
|
12
|
+
readonly owner: "runtime-planning";
|
|
13
|
+
readonly postures: readonly ["mounted", "host"];
|
|
14
|
+
readonly stages: readonly [{
|
|
15
|
+
readonly stage: 'bootstrap';
|
|
16
|
+
readonly disposition: 'required';
|
|
17
|
+
}, {
|
|
18
|
+
readonly stage: 'steady';
|
|
19
|
+
readonly disposition: 'required';
|
|
20
|
+
}];
|
|
21
|
+
readonly code: "RUNTIME_UNAVAILABLE";
|
|
22
|
+
readonly isIssued: typeof isRuntimeObservation;
|
|
23
|
+
readonly issuedAt: typeof observationIssuedAt;
|
|
24
|
+
}, {
|
|
25
|
+
readonly id: 'runtime-measurement';
|
|
26
|
+
readonly owner: "runtime-planning";
|
|
27
|
+
readonly postures: readonly ["environment", "mounted", "host"];
|
|
28
|
+
readonly stages: readonly [{
|
|
29
|
+
readonly stage: 'bootstrap';
|
|
30
|
+
readonly disposition: 'required';
|
|
31
|
+
}, {
|
|
32
|
+
readonly stage: 'steady';
|
|
33
|
+
readonly disposition: 'required';
|
|
34
|
+
}];
|
|
35
|
+
readonly code: "RUNTIME_UNMEASURED";
|
|
36
|
+
readonly isIssued: typeof isRuntimeObservation;
|
|
37
|
+
readonly issuedAt: typeof observationIssuedAt;
|
|
38
|
+
}, {
|
|
39
|
+
readonly id: 'mount-posture';
|
|
40
|
+
readonly owner: "runtime-planning";
|
|
41
|
+
readonly postures: readonly ["mounted", "host"];
|
|
42
|
+
readonly stages: readonly [{
|
|
43
|
+
readonly stage: 'bootstrap';
|
|
44
|
+
readonly disposition: 'required';
|
|
45
|
+
}, {
|
|
46
|
+
readonly stage: 'steady';
|
|
47
|
+
readonly disposition: 'required';
|
|
48
|
+
}];
|
|
49
|
+
readonly code: "MOUNT_POSTURE_UNAVAILABLE";
|
|
50
|
+
readonly isIssued: typeof isRuntimeObservation;
|
|
51
|
+
readonly issuedAt: typeof observationIssuedAt;
|
|
52
|
+
}];
|
|
53
|
+
export declare const runtimeHealthObservationDeclarations: readonly [{
|
|
54
|
+
readonly id: 'runtime-mount-materialization';
|
|
55
|
+
readonly owner: "runtime-planning";
|
|
56
|
+
readonly postures: readonly ["running-stack"];
|
|
57
|
+
readonly stages: readonly [{
|
|
58
|
+
readonly stage: 'bootstrap';
|
|
59
|
+
readonly disposition: 'required';
|
|
60
|
+
}, {
|
|
61
|
+
readonly stage: 'steady';
|
|
62
|
+
readonly disposition: 'required';
|
|
63
|
+
}];
|
|
64
|
+
readonly code: "MOUNT_MATERIALIZATION_UNAVAILABLE";
|
|
65
|
+
readonly isIssued: typeof isRuntimeObservation;
|
|
66
|
+
readonly issuedAt: typeof observationIssuedAt;
|
|
67
|
+
}, {
|
|
68
|
+
readonly id: 'runtime-port-family';
|
|
69
|
+
readonly owner: "runtime-planning";
|
|
70
|
+
readonly postures: readonly ["running-stack"];
|
|
71
|
+
readonly stages: readonly [{
|
|
72
|
+
readonly stage: 'bootstrap';
|
|
73
|
+
readonly disposition: 'not-applicable';
|
|
74
|
+
readonly reason: 'ports are leased after the first seed';
|
|
75
|
+
}, {
|
|
76
|
+
readonly stage: 'steady';
|
|
77
|
+
readonly disposition: 'required';
|
|
78
|
+
}];
|
|
79
|
+
readonly code: "PORT_FAMILY_COLLISION";
|
|
80
|
+
readonly isIssued: typeof isRuntimeObservation;
|
|
81
|
+
readonly issuedAt: typeof observationIssuedAt;
|
|
82
|
+
}];
|
|
83
|
+
export declare function isRuntimeObservation(value: unknown): value is EnvironmentObservation;
|
|
84
|
+
declare function observationIssuedAt(value: unknown): number | undefined;
|
|
85
|
+
export declare function observeRuntimeExecution(input: {
|
|
86
|
+
readonly plan: ExecutionPlan;
|
|
87
|
+
readonly outcome: ExecuteProbeOutcome;
|
|
88
|
+
}): readonly EnvironmentObservation[];
|
|
89
|
+
export type RuntimeOperation = 'validate' | 'up' | 'down';
|
|
90
|
+
export interface RuntimeAdapterInput {
|
|
91
|
+
runtime: {
|
|
92
|
+
name: 'docker';
|
|
93
|
+
version: string;
|
|
94
|
+
executableSha256: string;
|
|
95
|
+
};
|
|
96
|
+
composeVersion: string;
|
|
97
|
+
executable: ResolvedExecutable;
|
|
98
|
+
operation: RuntimeOperation;
|
|
99
|
+
cwd: string;
|
|
100
|
+
composeFiles: readonly ComposeArtifact[];
|
|
101
|
+
projectName: string;
|
|
102
|
+
env: Readonly<Record<string, string>>;
|
|
103
|
+
ports: readonly number[];
|
|
104
|
+
labels: Readonly<Record<string, string>>;
|
|
105
|
+
timeoutMs: number;
|
|
106
|
+
activeProfiles?: readonly string[];
|
|
107
|
+
stackId?: StackId;
|
|
108
|
+
coldStartLimitMillis?: number;
|
|
109
|
+
expectedMountSources?: readonly string[];
|
|
110
|
+
}
|
|
111
|
+
export interface RuntimePlanResult {
|
|
112
|
+
runtime: 'docker';
|
|
113
|
+
operation: RuntimeOperation;
|
|
114
|
+
projectName: string;
|
|
115
|
+
}
|
|
116
|
+
export interface ComposeArtifact {
|
|
117
|
+
reference: string;
|
|
118
|
+
canonicalPath: string;
|
|
119
|
+
source: string;
|
|
120
|
+
sha256: string;
|
|
121
|
+
}
|
|
122
|
+
/** Each `[[sibling]] var` and the absolute sibling directory it names. */
|
|
123
|
+
export type SiblingDirectoryVariables = Readonly<Record<string, string>>;
|
|
124
|
+
export type RuntimeAdapterAuthority =
|
|
125
|
+
/** A stack's own Compose files, which interpolate the lease, the sibling directories and their own defaults. */
|
|
126
|
+
Readonly<{
|
|
127
|
+
ownComposeFiles: true;
|
|
128
|
+
cockpitId: CockpitId;
|
|
129
|
+
stackId: StackId;
|
|
130
|
+
portLeaseProjection?: PortLeaseProjection;
|
|
131
|
+
siblingDirectories?: SiblingDirectoryVariables;
|
|
132
|
+
}>;
|
|
133
|
+
/** The numeric core of a version Docker or Compose printed, or undefined when it has none. */
|
|
134
|
+
export declare function observedVersionCore(value: string): string | undefined;
|
|
135
|
+
export declare function classifyResolvedRuntimeLiterals(values: readonly string[]): 'resolved' | 'unresolved' | 'unsafe';
|
|
136
|
+
export type MachineFloorPlanInput = {
|
|
137
|
+
readonly runtimeExecutable: ResolvedExecutable;
|
|
138
|
+
readonly diskExecutable: ResolvedExecutable;
|
|
139
|
+
readonly cwd: string;
|
|
140
|
+
readonly env: Readonly<Record<string, string>>;
|
|
141
|
+
readonly timeoutMs: number;
|
|
142
|
+
readonly authority?: MachineFloorAuthority;
|
|
143
|
+
} | {
|
|
144
|
+
readonly runtimePlan: ExecutionPlan;
|
|
145
|
+
readonly diskExecutable: ResolvedExecutable;
|
|
146
|
+
readonly timeoutMs: number;
|
|
147
|
+
readonly authority?: MachineFloorAuthority;
|
|
148
|
+
};
|
|
149
|
+
export interface MachineFloorThresholds {
|
|
150
|
+
readonly memoryBytes: number;
|
|
151
|
+
readonly cpuMillis: number;
|
|
152
|
+
readonly freeDiskBytes: number;
|
|
153
|
+
}
|
|
154
|
+
declare const machineFloorEvidenceBrand: unique symbol;
|
|
155
|
+
export interface MachineFloorEvidence {
|
|
156
|
+
readonly [machineFloorEvidenceBrand]: true;
|
|
157
|
+
readonly memoryBytes: number;
|
|
158
|
+
readonly cpuMillis: number;
|
|
159
|
+
readonly freeDiskBytes: number;
|
|
160
|
+
readonly observedAt: string;
|
|
161
|
+
readonly stackId?: StackId;
|
|
162
|
+
readonly floor?: MachineFloorThresholds;
|
|
163
|
+
}
|
|
164
|
+
export interface MachineFloorAuthority {
|
|
165
|
+
readonly kind: 'machine-floor-authority';
|
|
166
|
+
}
|
|
167
|
+
export declare function issueMachineFloorAuthority(input: {
|
|
168
|
+
readonly configuration: MachineFloorConfigProjection;
|
|
169
|
+
readonly checkout: SetupCheckoutProjection;
|
|
170
|
+
}): Readonly<{
|
|
171
|
+
authority: MachineFloorAuthority;
|
|
172
|
+
checkout: ConsumedSetupCheckoutObservation;
|
|
173
|
+
}> | undefined;
|
|
174
|
+
export declare function isMachineFloorEvidence(value: unknown): value is MachineFloorEvidence;
|
|
175
|
+
export interface DockerRuntimeObservationInput {
|
|
176
|
+
readonly executable: ResolvedExecutable;
|
|
177
|
+
readonly cwd: string;
|
|
178
|
+
readonly env: Readonly<Record<string, string>>;
|
|
179
|
+
readonly timeoutMs: number;
|
|
180
|
+
}
|
|
181
|
+
export type RuntimeIdentity = 'docker-desktop' | 'orbstack' | 'colima' | 'rancher-desktop' | 'docker-engine';
|
|
182
|
+
export interface DockerInfoIdentityInput {
|
|
183
|
+
readonly operatingSystem: string;
|
|
184
|
+
readonly name: string;
|
|
185
|
+
readonly osType: string;
|
|
186
|
+
readonly hostPlatform: string;
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Name the container runtime product from one `docker info` reading, or null when it is not one we
|
|
190
|
+
* recognise. The identity selects this machine's runtime measurement, so a wrong match would
|
|
191
|
+
* admit a runtime on another product's measurement; anything unrecognised therefore stays null.
|
|
192
|
+
*
|
|
193
|
+
* Provenance of each rule: `orbstack` was observed on a host running OrbStack (OperatingSystem
|
|
194
|
+
* "OrbStack", Name "orbstack", OSType "linux"). The `docker-desktop`, `colima`, `rancher-desktop` and
|
|
195
|
+
* `docker-engine` rules are derived from those vendors' documented `docker info` output and have not
|
|
196
|
+
* been probed on a host here.
|
|
197
|
+
*/
|
|
198
|
+
export declare function runtimeIdentity(input: DockerInfoIdentityInput): RuntimeIdentity | null;
|
|
199
|
+
export type DockerRuntimeObservation = Readonly<{
|
|
200
|
+
kind: 'complete';
|
|
201
|
+
runtime: {
|
|
202
|
+
readonly name: 'docker';
|
|
203
|
+
readonly version: string;
|
|
204
|
+
readonly executableSha256: string;
|
|
205
|
+
};
|
|
206
|
+
runtimeIdentity: RuntimeIdentity | null;
|
|
207
|
+
operatingSystem: string;
|
|
208
|
+
name: string;
|
|
209
|
+
osType: string;
|
|
210
|
+
hostPlatform: string;
|
|
211
|
+
composeVersion: string;
|
|
212
|
+
observedAt: string;
|
|
213
|
+
}> | Readonly<{
|
|
214
|
+
kind: 'unavailable';
|
|
215
|
+
code: typeof ENVIRONMENT_CODES.RUNTIME_UNAVAILABLE;
|
|
216
|
+
reason: string;
|
|
217
|
+
fix?: string;
|
|
218
|
+
}>;
|
|
219
|
+
export interface RuntimeMeasurementProbeAuthority {
|
|
220
|
+
readonly kind: 'runtime-measurement-probe-authority';
|
|
221
|
+
}
|
|
222
|
+
export declare function issueRuntimeMeasurementProbeAuthority(observation: DockerRuntimeObservation): RuntimeMeasurementProbeAuthority;
|
|
223
|
+
export declare function runtimeMeasurementProbeObservation(authority: RuntimeMeasurementProbeAuthority, executableSha256: string): Extract<DockerRuntimeObservation, {
|
|
224
|
+
readonly kind: 'complete';
|
|
225
|
+
}> | undefined;
|
|
226
|
+
export type RuntimeMeasurementAdmission = Readonly<{
|
|
227
|
+
kind: 'admitted';
|
|
228
|
+
runtimeIdentity: string;
|
|
229
|
+
measurement: string;
|
|
230
|
+
}> | Readonly<{
|
|
231
|
+
kind: 'unavailable';
|
|
232
|
+
code: typeof ENVIRONMENT_CODES.RUNTIME_UNMEASURED;
|
|
233
|
+
reason: string;
|
|
234
|
+
}>;
|
|
235
|
+
/** A floor cockpit writes: a bare numeric core. */
|
|
236
|
+
export declare function isVersionFloor(value: string): boolean;
|
|
237
|
+
/** Whether a version Docker or Compose printed is at least `floor`; false when either is malformed. */
|
|
238
|
+
export declare function versionAtLeast(actual: string, floor: string): boolean;
|
|
239
|
+
export declare function admitRuntimeMeasurement(observation: DockerRuntimeObservation, measurements: LocalRuntimeMeasurements): RuntimeMeasurementAdmission;
|
|
240
|
+
export declare function observeRuntimeMeasurement(admission: RuntimeMeasurementAdmission, stackId: StackId): EnvironmentObservation;
|
|
241
|
+
export declare function observeDockerRuntime(rawInput: DockerRuntimeObservationInput, execute: (step: ExecutionStep) => Promise<ExecuteProbeOutcome>): Promise<DockerRuntimeObservation>;
|
|
242
|
+
export type MachineFloorMeasurement = {
|
|
243
|
+
readonly kind: 'complete';
|
|
244
|
+
readonly evidence: MachineFloorEvidence;
|
|
245
|
+
} | MachineFloorRefusal | {
|
|
246
|
+
readonly kind: 'unavailable';
|
|
247
|
+
};
|
|
248
|
+
type MachineFloorRefusal = Extract<EnvironmentCommandOutcome<null>, {
|
|
249
|
+
kind: 'refusal';
|
|
250
|
+
}>;
|
|
251
|
+
/** Measures the container runtime's memory and CPU and the checkout's free disk. */
|
|
252
|
+
export declare function measureMachineFloor(rawInput: MachineFloorPlanInput, execute: (step: ExecutionStep) => Promise<ExecuteProbeOutcome>): Promise<MachineFloorMeasurement>;
|
|
253
|
+
export declare function createRuntimeAdapter(rawInput: RuntimeAdapterInput, authority?: RuntimeAdapterAuthority): EnvironmentCommandOutcome<RuntimePlanResult>;
|
|
254
|
+
export interface RuntimeObservationWindow {
|
|
255
|
+
readonly startedAt: string;
|
|
256
|
+
readonly expiresAt: string;
|
|
257
|
+
}
|
|
258
|
+
export interface RuntimeTopologyService {
|
|
259
|
+
readonly id: string;
|
|
260
|
+
readonly dependsOn: readonly string[];
|
|
261
|
+
readonly bindMountSources: readonly string[];
|
|
262
|
+
readonly namedVolumeMounts?: readonly Readonly<{
|
|
263
|
+
readonly source: string;
|
|
264
|
+
readonly name: string;
|
|
265
|
+
readonly target: string;
|
|
266
|
+
}>[];
|
|
267
|
+
readonly healthcheck: boolean;
|
|
268
|
+
}
|
|
269
|
+
export interface RuntimeTopologyEvidence {
|
|
270
|
+
readonly stackId: StackId;
|
|
271
|
+
readonly configSha256: string;
|
|
272
|
+
readonly batchId: string;
|
|
273
|
+
readonly runtimeVersion: string;
|
|
274
|
+
readonly composeVersion: string;
|
|
275
|
+
readonly executableSha256: string;
|
|
276
|
+
readonly projectName: string;
|
|
277
|
+
readonly cwd: string;
|
|
278
|
+
readonly observationWindow: RuntimeObservationWindow;
|
|
279
|
+
readonly services: readonly RuntimeTopologyService[];
|
|
280
|
+
}
|
|
281
|
+
export type RuntimeTopologyObservation = {
|
|
282
|
+
readonly kind: 'complete';
|
|
283
|
+
readonly step: ExecutionStep;
|
|
284
|
+
readonly topology: RuntimeTopologyEvidence;
|
|
285
|
+
readonly observations: readonly EnvironmentObservation[];
|
|
286
|
+
} | {
|
|
287
|
+
readonly kind: 'unavailable';
|
|
288
|
+
readonly reason: string;
|
|
289
|
+
readonly mounts?: RuntimeMountMismatch;
|
|
290
|
+
};
|
|
291
|
+
export declare const OBSERVATION_WINDOW_HEADROOM_MS = 300000;
|
|
292
|
+
/**
|
|
293
|
+
* Reads the stack's services through `compose config` from a validated runtime plan, and binds the
|
|
294
|
+
* topology to that plan, the observation window and the declared bind sources.
|
|
295
|
+
*/
|
|
296
|
+
export declare function observeRuntimeTopology(input: {
|
|
297
|
+
readonly runtimePlan: ExecutionPlan;
|
|
298
|
+
readonly stackId: StackId;
|
|
299
|
+
readonly configSha256: string;
|
|
300
|
+
readonly batchId: string;
|
|
301
|
+
readonly observationWindow: RuntimeObservationWindow;
|
|
302
|
+
readonly execute: (step: ExecutionStep) => Promise<ExecuteProbeOutcome>;
|
|
303
|
+
}): Promise<RuntimeTopologyObservation>;
|
|
304
|
+
/** Declared mount sources no service binds inside, and bind sources inside no declared one. */
|
|
305
|
+
export type RuntimeMountMismatch = Readonly<{
|
|
306
|
+
missing: readonly string[];
|
|
307
|
+
unexpected: readonly string[];
|
|
308
|
+
}>;
|
|
309
|
+
export declare function isRuntimeTopologyEvidence(value: unknown): value is RuntimeTopologyEvidence;
|
|
310
|
+
export declare function resolveRuntimeServiceOrder(topology: RuntimeTopologyEvidence): readonly string[];
|
|
311
|
+
export declare function projectRuntimeExecutionEnvironment(topology: RuntimeTopologyEvidence, namespace?: StateNamespace): Readonly<Record<string, string>> | undefined;
|
|
312
|
+
export type RuntimeContainerIdSlot = Readonly<{
|
|
313
|
+
kind: 'runtime-container-id';
|
|
314
|
+
service: string;
|
|
315
|
+
}>;
|
|
316
|
+
export interface RuntimeLifecycleExecutionSemantics {
|
|
317
|
+
readonly argv: readonly [string | RuntimeContainerIdSlot, ...(string | RuntimeContainerIdSlot)[]];
|
|
318
|
+
readonly argv0: string;
|
|
319
|
+
readonly cwd: string;
|
|
320
|
+
readonly env: Readonly<Record<string, string>>;
|
|
321
|
+
readonly timeoutCeilingMs: number;
|
|
322
|
+
readonly stdoutLimitBytes: number;
|
|
323
|
+
readonly stderrLimitBytes: number;
|
|
324
|
+
readonly paths: readonly string[];
|
|
325
|
+
readonly ports: readonly number[];
|
|
326
|
+
readonly expected: ExecutionStep['expected'];
|
|
327
|
+
readonly consumedFiles: ExecutionStep['consumedFiles'];
|
|
328
|
+
readonly filesystemChecks: ExecutionStep['filesystemChecks'];
|
|
329
|
+
readonly compensation: readonly RuntimeLifecycleExecutionSemantics[];
|
|
330
|
+
}
|
|
331
|
+
export interface RuntimeLifecycleServiceSemantics {
|
|
332
|
+
readonly id: string;
|
|
333
|
+
readonly start: RuntimeLifecycleExecutionSemantics;
|
|
334
|
+
readonly status: RuntimeLifecycleExecutionSemantics;
|
|
335
|
+
readonly identity: RuntimeLifecycleExecutionSemantics;
|
|
336
|
+
readonly inspect: RuntimeLifecycleExecutionSemantics;
|
|
337
|
+
readonly healthAcceptance: Readonly<{
|
|
338
|
+
state: 'running';
|
|
339
|
+
health: 'healthy' | null;
|
|
340
|
+
}>;
|
|
341
|
+
}
|
|
342
|
+
export interface RuntimeLifecycleSemantics {
|
|
343
|
+
readonly stackId: StackId;
|
|
344
|
+
readonly configSha256: string;
|
|
345
|
+
readonly runtimeVersion: string;
|
|
346
|
+
readonly composeVersion: string;
|
|
347
|
+
readonly projectName: string;
|
|
348
|
+
readonly topology: Readonly<{
|
|
349
|
+
order: readonly string[];
|
|
350
|
+
services: readonly RuntimeTopologyService[];
|
|
351
|
+
}>;
|
|
352
|
+
readonly runtimeChecks: Readonly<{
|
|
353
|
+
coldStartLimitMillis: number;
|
|
354
|
+
expectedMountSources: readonly string[];
|
|
355
|
+
}>;
|
|
356
|
+
readonly services: readonly RuntimeLifecycleServiceSemantics[];
|
|
357
|
+
}
|
|
358
|
+
/** The stable work a topology describes, which lifecycle planning digests; valid while its topology is. */
|
|
359
|
+
export interface RuntimeLifecycleProjection {
|
|
360
|
+
readonly topology: RuntimeTopologyEvidence;
|
|
361
|
+
readonly semantics: RuntimeLifecycleSemantics;
|
|
362
|
+
}
|
|
363
|
+
declare const runtimeServiceFailureEvidenceBrand: unique symbol;
|
|
364
|
+
export interface RuntimeServiceFailureEvidence {
|
|
365
|
+
readonly [runtimeServiceFailureEvidenceBrand]: true;
|
|
366
|
+
}
|
|
367
|
+
export interface RuntimeServiceEvidence {
|
|
368
|
+
readonly stackId: StackId;
|
|
369
|
+
readonly configSha256: string;
|
|
370
|
+
readonly batchId: string;
|
|
371
|
+
readonly runtimeVersion: string;
|
|
372
|
+
readonly composeVersion: string;
|
|
373
|
+
readonly executableSha256: string;
|
|
374
|
+
readonly projectName: string;
|
|
375
|
+
readonly service: string;
|
|
376
|
+
readonly containerId: string;
|
|
377
|
+
readonly state: 'running';
|
|
378
|
+
readonly health: 'healthy' | null;
|
|
379
|
+
readonly observedAt: string;
|
|
380
|
+
readonly observationWindow: RuntimeObservationWindow;
|
|
381
|
+
}
|
|
382
|
+
export interface RuntimeServiceObservation {
|
|
383
|
+
readonly stackId: StackId;
|
|
384
|
+
readonly configSha256: string;
|
|
385
|
+
readonly batchId: string;
|
|
386
|
+
readonly runtimeVersion: string;
|
|
387
|
+
readonly composeVersion: string;
|
|
388
|
+
readonly executableSha256: string;
|
|
389
|
+
readonly projectName: string;
|
|
390
|
+
readonly service: string;
|
|
391
|
+
readonly containerId: string;
|
|
392
|
+
readonly state: 'created' | 'running' | 'restarting' | 'paused' | 'exited' | 'dead' | 'removing';
|
|
393
|
+
readonly health: 'healthy' | 'starting' | 'unhealthy' | null;
|
|
394
|
+
readonly observedAt: string;
|
|
395
|
+
readonly observationWindow: RuntimeObservationWindow;
|
|
396
|
+
}
|
|
397
|
+
/** What a service start or revalidation observed; `stop` stops, without removing, a service this run started. */
|
|
398
|
+
export type RuntimeServiceOutcome = {
|
|
399
|
+
readonly kind: 'observed';
|
|
400
|
+
readonly observation: RuntimeServiceObservation;
|
|
401
|
+
readonly stop?: ExecutionStep;
|
|
402
|
+
} | {
|
|
403
|
+
readonly kind: 'stale';
|
|
404
|
+
} | {
|
|
405
|
+
readonly kind: 'failure';
|
|
406
|
+
readonly logs?: RuntimeServiceFailureEvidence;
|
|
407
|
+
readonly stop?: ExecutionStep;
|
|
408
|
+
};
|
|
409
|
+
type Execute = (step: ExecutionStep) => Promise<ExecuteProbeOutcome>;
|
|
410
|
+
export declare function projectRuntimeLifecycle(topology: RuntimeTopologyEvidence): RuntimeLifecycleProjection | undefined;
|
|
411
|
+
/**
|
|
412
|
+
* Starts one service with `up --wait`, finds its container through Compose and inspects it. Each
|
|
413
|
+
* step must finish inside the topology's observation window and after the one before it.
|
|
414
|
+
*/
|
|
415
|
+
export declare function startRuntimeService(input: {
|
|
416
|
+
readonly topology: RuntimeTopologyEvidence;
|
|
417
|
+
readonly service: string;
|
|
418
|
+
readonly execute: Execute;
|
|
419
|
+
}): Promise<RuntimeServiceOutcome>;
|
|
420
|
+
/**
|
|
421
|
+
* Re-reads a service an earlier run started: stale when Compose no longer has the recorded
|
|
422
|
+
* container, otherwise the container's current inspection.
|
|
423
|
+
*/
|
|
424
|
+
export declare function revalidateRuntimeService(input: {
|
|
425
|
+
readonly topology: RuntimeTopologyEvidence;
|
|
426
|
+
readonly service: string;
|
|
427
|
+
readonly expectedContainerId: string;
|
|
428
|
+
readonly execute: Execute;
|
|
429
|
+
}): Promise<RuntimeServiceOutcome>;
|
|
430
|
+
/** The observation as healthy-service evidence, or undefined when the service is not running healthy. */
|
|
431
|
+
export declare function admitRuntimeServiceHealth(observation: RuntimeServiceObservation): RuntimeServiceEvidence | undefined;
|
|
432
|
+
export declare function isRuntimeServiceEvidence(value: unknown): value is RuntimeServiceEvidence;
|
|
433
|
+
export declare function observeRuntimeMountMaterialization(input: {
|
|
434
|
+
readonly topology: RuntimeTopologyEvidence;
|
|
435
|
+
readonly services: readonly RuntimeServiceEvidence[];
|
|
436
|
+
readonly observedAt: string;
|
|
437
|
+
}): EnvironmentObservation;
|
|
438
|
+
export declare function observeRuntimePortFamily(input: {
|
|
439
|
+
readonly topology: RuntimeTopologyEvidence;
|
|
440
|
+
readonly services: readonly RuntimeServiceEvidence[];
|
|
441
|
+
readonly namespace: StateNamespace;
|
|
442
|
+
readonly listenerTimeoutMs: number;
|
|
443
|
+
readonly revalidate: () => Promise<readonly RuntimeServiceEvidence[]>;
|
|
444
|
+
}): Promise<EnvironmentObservation>;
|
|
445
|
+
export declare function observeRuntimeServiceColdStart(input: {
|
|
446
|
+
readonly services: readonly RuntimeServiceEvidence[];
|
|
447
|
+
}): EnvironmentObservation;
|
|
448
|
+
export interface RuntimeServiceFailureLogContext {
|
|
449
|
+
readonly stage: 'start' | 'status' | 'identity' | 'inspect';
|
|
450
|
+
readonly stackId: StackId;
|
|
451
|
+
readonly configSha256: string;
|
|
452
|
+
readonly batchId: string;
|
|
453
|
+
readonly runtimeVersion: string;
|
|
454
|
+
readonly composeVersion: string;
|
|
455
|
+
readonly executableSha256: string;
|
|
456
|
+
readonly projectName: string;
|
|
457
|
+
readonly service: string;
|
|
458
|
+
readonly containerId: string | null;
|
|
459
|
+
readonly observedAt: string;
|
|
460
|
+
readonly observationWindow: RuntimeObservationWindow;
|
|
461
|
+
readonly executable: ResolvedExecutable;
|
|
462
|
+
readonly cwd: string;
|
|
463
|
+
readonly env: Readonly<Record<string, string>>;
|
|
464
|
+
readonly composeArgvPrefix: readonly string[];
|
|
465
|
+
readonly paths: ExecutionStep['paths'];
|
|
466
|
+
readonly consumedFiles: ExecutionStep['consumedFiles'];
|
|
467
|
+
readonly filesystemChecks: ExecutionStep['filesystemChecks'];
|
|
468
|
+
}
|
|
469
|
+
export declare function consumeRuntimeServiceFailureForLogs(evidence: RuntimeServiceFailureEvidence): RuntimeServiceFailureLogContext | undefined;
|
|
470
|
+
export interface RuntimeServiceFailureContext {
|
|
471
|
+
readonly observation: RuntimeServiceObservation;
|
|
472
|
+
readonly executable: ResolvedExecutable;
|
|
473
|
+
readonly cwd: string;
|
|
474
|
+
readonly env: Readonly<Record<string, string>>;
|
|
475
|
+
}
|
|
476
|
+
export declare function consumeRuntimeServiceObservationForFailureLogs(value: RuntimeServiceObservation): RuntimeServiceFailureContext | undefined;
|
|
477
|
+
export type RuntimeStopOutcome =
|
|
478
|
+
/** Compose stopped the stack and a fresh `ps` found nothing running. */
|
|
479
|
+
{
|
|
480
|
+
readonly kind: 'stopped';
|
|
481
|
+
readonly outcome: DrainOutcome;
|
|
482
|
+
readonly fence: ExecutionFence;
|
|
483
|
+
}
|
|
484
|
+
/** The stop never started, so the drain attempt is settled as failed and nothing changed. */
|
|
485
|
+
| {
|
|
486
|
+
readonly kind: 'not-started';
|
|
487
|
+
readonly code: ExecutionFailureCode;
|
|
488
|
+
readonly outcome: DrainOutcome;
|
|
489
|
+
readonly fence: ExecutionFence;
|
|
490
|
+
}
|
|
491
|
+
/** No proof either way; the drain attempt stays open and its fence stays for repair. */
|
|
492
|
+
| {
|
|
493
|
+
readonly kind: 'unavailable';
|
|
494
|
+
readonly reason: string;
|
|
495
|
+
};
|
|
496
|
+
/**
|
|
497
|
+
* Runs the drain's runtime-stop action: `compose stop` under the attempt's execution fence, then a
|
|
498
|
+
* fresh `ps` that must find nothing running, and settles the attempt as the outcome to publish.
|
|
499
|
+
*/
|
|
500
|
+
export declare function stopRuntime(input: {
|
|
501
|
+
readonly topology: RuntimeTopologyEvidence;
|
|
502
|
+
readonly attempt: ReservedDrainAttempt;
|
|
503
|
+
readonly execute: (step: ExecutionStep) => Promise<ExecuteProbeOutcome>;
|
|
504
|
+
}): Promise<RuntimeStopOutcome>;
|
|
505
|
+
export {};
|