owlrunkit 0.15.1 → 0.16.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.
Files changed (76) hide show
  1. package/CHANGELOG.md +91 -0
  2. package/README.md +274 -66
  3. package/integrations/codex/skills/owlcoda-runkit/SKILL.md +222 -116
  4. package/integrations/codex/skills/owlcoda-runkit/assets/templates/config.json +3 -3
  5. package/integrations/codex/skills/owlcoda-runkit/assets/templates/ready-for-commit-request.json +2 -2
  6. package/package.json +2 -2
  7. package/packages/attest/distribution-manifest-v1.json +5 -0
  8. package/packages/attest/src/quick.mjs +5 -0
  9. package/registry-release-policy-v1.json +8 -2
  10. package/sbom.spdx.json +5 -5
  11. package/scripts/runkit-contract/assurance-router.mjs +119 -0
  12. package/scripts/runkit-contract/core-contract.mjs +203 -206
  13. package/scripts/runkit-contract/core-successor.mjs +2043 -0
  14. package/scripts/runkit-contract/deployment-workflow.mjs +2040 -0
  15. package/scripts/runkit-contract/finalize.mjs +242 -21
  16. package/scripts/runkit-contract/fleet-discovery.mjs +456 -0
  17. package/scripts/runkit-contract/formal-workflow.mjs +850 -0
  18. package/scripts/runkit-contract/human-status.mjs +553 -0
  19. package/scripts/runkit-contract/inspect-presentation.mjs +25 -8
  20. package/scripts/runkit-contract/install-codex-skill.mjs +73 -30
  21. package/scripts/runkit-contract/lease-lifecycle.mjs +8 -2
  22. package/scripts/runkit-contract/lifecycle-orchestration.mjs +135 -12
  23. package/scripts/runkit-contract/onboarding-doctor.mjs +43 -90
  24. package/scripts/runkit-contract/owner-authority-trust.mjs +230 -0
  25. package/scripts/runkit-contract/owner-deployment-decision.mjs +385 -0
  26. package/scripts/runkit-contract/profile-onboarding.mjs +841 -13
  27. package/scripts/runkit-contract/project-cli-resolver.mjs +701 -0
  28. package/scripts/runkit-contract/project-control-parser.mjs +830 -0
  29. package/scripts/runkit-contract/project-control-state.mjs +28 -0
  30. package/scripts/runkit-contract/provenance-common.mjs +19 -2
  31. package/scripts/runkit-contract/ready-for-commit.mjs +330 -18
  32. package/scripts/runkit-contract/remote-deployment.mjs +1596 -0
  33. package/scripts/runkit-contract/remote-process-adapter.mjs +177 -0
  34. package/scripts/runkit-contract/runkit-bootstrap.mjs +131 -0
  35. package/scripts/runkit-contract/runkit-cli.mjs +1097 -21
  36. package/scripts/runkit-contract/schemas/assurance-route-v1.schema.json +26 -0
  37. package/scripts/runkit-contract/schemas/core-successor-batch-receipt-v1.schema.json +126 -0
  38. package/scripts/runkit-contract/schemas/core-successor-plan-v1.schema.json +155 -0
  39. package/scripts/runkit-contract/schemas/core-successor-project-success-receipt-v1.schema.json +72 -0
  40. package/scripts/runkit-contract/schemas/deployment-execute-request-v1.schema.json +63 -0
  41. package/scripts/runkit-contract/schemas/deployment-lineage-v1.schema.json +292 -0
  42. package/scripts/runkit-contract/schemas/deployment-prepare-receipt-v1.schema.json +140 -0
  43. package/scripts/runkit-contract/schemas/fleet-discovery-v1.schema.json +31 -0
  44. package/scripts/runkit-contract/schemas/fleet-manifest-v1.schema.json +20 -0
  45. package/scripts/runkit-contract/schemas/fleet-root-registry-v1.schema.json +34 -0
  46. package/scripts/runkit-contract/schemas/human-status-v1.schema.json +102 -0
  47. package/scripts/runkit-contract/schemas/owner-authority-trust-v1.schema.json +66 -0
  48. package/scripts/runkit-contract/schemas/owner-deployment-authority-v1.schema.json +46 -0
  49. package/scripts/runkit-contract/schemas/owner-deployment-authority-v2.schema.json +94 -0
  50. package/scripts/runkit-contract/schemas/owner-deployment-decision-v1.schema.json +102 -0
  51. package/scripts/runkit-contract/schemas/owner-migration-authority-v1.schema.json +33 -0
  52. package/scripts/runkit-contract/schemas/owner-migration-authority-v2.schema.json +67 -0
  53. package/scripts/runkit-contract/schemas/profile-apply-receipt-v1.schema.json +32 -0
  54. package/scripts/runkit-contract/schemas/profile-detection-v2.schema.json +145 -0
  55. package/scripts/runkit-contract/schemas/ready-for-commit-v2.schema.json +37 -0
  56. package/scripts/runkit-contract/schemas/remote-deployment-manifest-v1.schema.json +379 -0
  57. package/scripts/runkit-contract/schemas/remote-deployment-result-v1.schema.json +153 -0
  58. package/scripts/runkit-contract/schemas/remote-deployment-stage-journal-v1.schema.json +183 -0
  59. package/scripts/runkit-contract/schemas/remote-target-v1.schema.json +32 -0
  60. package/scripts/runkit-contract/schemas/source-candidate-v2.schema.json +152 -0
  61. package/scripts/runkit-contract/schemas/verification-receipt-v2.schema.json +13 -0
  62. package/scripts/runkit-contract/snapshot.mjs +1 -1
  63. package/scripts/runkit-contract/source-candidate.mjs +1382 -0
  64. package/scripts/runkit-contract/ssh-remote-adapter.mjs +1184 -0
  65. package/scripts/runkit-contract/sync-core016-release-identity.mjs +161 -0
  66. package/scripts/runkit-contract/templates/assurance-request.json +13 -0
  67. package/scripts/runkit-contract/templates/core-successor-owner-authority.json +15 -0
  68. package/scripts/runkit-contract/templates/deployment-execute-request.json +39 -0
  69. package/scripts/runkit-contract/templates/deployment-owner-authority.json +23 -0
  70. package/scripts/runkit-contract/templates/deployment-owner-decision.json +26 -0
  71. package/scripts/runkit-contract/templates/fleet-manifest.json +8 -0
  72. package/scripts/runkit-contract/templates/fleet-root-registry.json +8 -0
  73. package/scripts/runkit-contract/templates/owner-authority-trust.json +16 -0
  74. package/scripts/runkit-contract/templates/ready-for-commit-request.json +2 -2
  75. package/scripts/runkit-contract/templates/remote-deployment-manifest.json +108 -0
  76. package/scripts/runkit-contract/verification-receipt-gate.mjs +28 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,96 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.16.0
4
+
5
+ - Adds a persistent coverage-root registry. After each fleet root is registered
6
+ once, ordinary discovery, shared Skill upgrades, and Core successor planning
7
+ automatically scan the complete registered scope. RunKit refuses unreachable
8
+ registered roots and does not claim to discover projects outside them.
9
+ - Upgrades profile detection to emit high-confidence, exact project-local
10
+ npm, pnpm, Yarn, or Bun launchers that can be adopted atomically with
11
+ `profiles detect --apply`; a PATH-only manager remains review-required.
12
+ - Adds deterministic assurance routing among No RunKit, Quick Verification,
13
+ and Formal Delivery based on explicit risk facts.
14
+ - Adds the three-command Formal happy path: `formal start`, incremental
15
+ `formal check`, and one `formal finish` that performs the final source,
16
+ evidence, permission, closeout, and lease-release gates. Exact create-only
17
+ checks and finishes resume after interruption; mismatches fail closed.
18
+ - Restricts Formal accepted checks to the mechanically safe built-in Node
19
+ syntax checker until a filesystem-write and network sandbox exists. Profile,
20
+ package-manager, wrapper, and custom commands fail before spawn; legacy
21
+ verification remains available without being treated as sandbox-equivalent.
22
+ - Adds `SourceCandidateV2` for immutable dirty-worktree candidates with exact
23
+ owned-path closure, verification, and clean-workspace materialization.
24
+ Materialization now uses a sibling staging checkout, atomic target switch,
25
+ byte-exact rollback, and interruption recovery instead of incrementally
26
+ mutating the clean target. An accepted candidate, including deletion-only
27
+ and renamed changes, remains first-class through closeout, READY V2, release
28
+ successor verification, deployment prepare, and deployment lineage while
29
+ legacy DeliveryPacket runs remain compatible.
30
+ - Adds fleet-safe Core successor planning and Owner-authorized apply, including
31
+ mixed prior Core identities, exact candidate materialization, and
32
+ append-only per-project migration receipts. Owner authorization is an
33
+ Ed25519-signed V2 artifact verified against the fixed user trust store.
34
+ - Adds linked deployment prepare/execute contracts and a staged remote
35
+ deployment adapter with fixed machine identity, create-only upload, exact
36
+ deletion allowlists, before/after state, hash verification, and stage-specific
37
+ failure receipts. Deployment authority binds the full remote intent and is
38
+ revalidated with execution, lease, preflight, engine, and lineage state before
39
+ every remote stage.
40
+ - Adds an independently hashed `OwnerDeploymentDecisionV1` for deployment
41
+ mode, existing assets, rollback and data authority, service activation,
42
+ baseline cut, and destructive scope. The decision is compiled against Goal,
43
+ prepare receipt, remote manifest, and signed Authority V2 before child or
44
+ lease creation, then revalidated before every remote stage.
45
+ - Closes a child as blocked `closed_superseded` when its Owner decision changes,
46
+ preserving old evidence and reporting the business goal incomplete with a
47
+ replacement plan required. Exact same-decision resume remains supported;
48
+ permission, target, artifact, remote intent, data, rollback, service,
49
+ baseline, or destructive expansion requires new authority.
50
+ - Adds a release identity gate that compares package version, computed Core,
51
+ public Attest, bundled Skill declaration and config, unpacked tarball copies,
52
+ release binding, and retained tarball bytes. A stale hash on any surface
53
+ blocks the release successor.
54
+ - Makes the built-in argv-only SSH adapter selectable directly from the remote
55
+ deployment manifest, with exact bindings for the Core adapter, `known_hosts`,
56
+ SSH executable, opaque credential reference, target, and structured stage
57
+ contracts. Its caller-provided privileged remote helper is explicitly bound
58
+ by path, protocol, version, and fixed execute/reconcile capabilities, then
59
+ checked during identity preflight before any side effect. The npm package
60
+ does not install this VM prerequisite and does not claim out-of-the-box
61
+ privileged deployment. Existing external process-adapter manifests remain
62
+ compatible.
63
+ - Adds create-only before/after journals for every remote stage invocation,
64
+ bound to the deployment lineage, remote manifest, execute request, and exact
65
+ adapter identity. `deployment execute --resume` reuses the existing child,
66
+ validates the complete journal, and reconciles remote truth instead of
67
+ creating a replacement execution.
68
+ - Prevents interrupted install, service, and proxy stages from being replayed
69
+ without a successful read-only reconciliation. Unknown non-idempotent state
70
+ returns `reconciliation_required` and keeps the child control active; only
71
+ idempotent stages may be retried without proof.
72
+ - Revalidates `known_hosts`, the SSH executable, and identity-file real paths
73
+ and hashes before every external SSH invocation. SSH and process transport
74
+ failures are recorded as indeterminate remote state rather than proven
75
+ failures.
76
+ - Adds a concise human status projection that reports completed steps,
77
+ remaining gates, and the next allowed action.
78
+ - Adds action-specific help for the new daily-use commands and makes the
79
+ automatic deployment child workflow the documented default; manually
80
+ assembled execute requests remain an advanced compatibility path.
81
+ - Makes nested command help available through the published bootstrap before
82
+ project binding, rejects symlink traversal for READY evidence and retained
83
+ release artifacts, validates the complete READY lineage, and includes file
84
+ modes in SourceCandidate V2 release equivalence.
85
+ - Makes the `owlrunkit` launcher prefer a project's exact locally bound CLI for
86
+ ordinary commands; bootstrap-only operations continue through the current
87
+ package. Delegation additionally requires the canonical official npm tarball
88
+ URL, canonical SHA-512 SRI, a bootstrap-trusted Core identity, and a matching
89
+ project Config, so a jointly forged local CLI and Config remain blocked.
90
+ - Keeps the candidate unpublished, binds the rollback baseline to the exact
91
+ published `owlrunkit@0.15.1`, and grants no Git, publish, release, deploy, or
92
+ business authority.
93
+
3
94
  ## 0.15.1
4
95
 
5
96
  - Treats preserved active lease bytes in trusted `blocked` or `rejected`
package/README.md CHANGED
@@ -1,105 +1,313 @@
1
1
  # OwlRunKit
2
2
 
3
3
  OwlRunKit is OwlCoda's project-owned execution and evidence engine, released
4
- with its own version lifecycle.
5
-
6
- It keeps bounded agent work inspectable and recoverable through goal
7
- contracts, exact writer leases, source-bound delivery packets, verification
8
- receipts, deterministic repair, accepted or blocked closeout, and explicit
9
- release authority.
4
+ with its own version lifecycle. It makes the correct workflow the ordinary
5
+ path: choose the assurance level, run bounded work, preserve source and
6
+ evidence, then close out once.
10
7
 
11
8
  ## Install
12
9
 
13
10
  ```bash
14
- npm install --save-exact owlrunkit@0.15.1
11
+ npm install --save-exact owlrunkit@0.16.0
15
12
  ```
16
13
 
17
- Check the ordinary CLI surface, then initialize a project:
14
+ The `owlrunkit` bootstrap uses the project's exact locally bound CLI for
15
+ ordinary project commands. The installed current package remains responsible
16
+ for bootstrap operations such as initialization, adoption, and Core successor
17
+ migration, so a global CLI does not reinterpret an older project's control
18
+ state. Delegation is fail-closed: the lock entry must contain the canonical
19
+ official npm tarball URL and SHA-512 SRI, the installed Core closure must match
20
+ the current bootstrap Core or its embedded prior-release identity catalog, and
21
+ the project Config must independently bind the same Core.
18
22
 
19
23
  ```bash
20
- owlrunkit --help
21
24
  owlrunkit --version
22
25
  owlrunkit init --workspace /absolute/path/to/project
23
26
  owlrunkit doctor --workspace /absolute/path/to/project
24
- owlrunkit profiles detect --workspace /absolute/path/to/project --dry-run
25
- owlrunkit adopt --workspace /absolute/path/to/project --exact owlrunkit@0.15.1
26
27
  ```
27
28
 
28
- `doctor` is read-only and distinguishes offline/DNS timeout, registry
29
- authentication, missing version, and local install binding failures. Profile
30
- detection is deterministic and dry-run only; use `profiles validate` and
31
- `profiles impact --changed` for supported profile checks. `adopt` writes typed
32
- evidence only after the exact installed package and lockfile match the official
33
- npm registry release.
34
-
35
- Core 0.15 keeps Contract v0.2 and all 0.13/0.14 project artifact schemas
36
- readable. `init` refreshes an older ConfigV2 Core binding with an append-only
37
- migration receipt only when the project has no active execution, active writer
38
- lease, or ambiguous control state. Otherwise the upgrade exits before changing
39
- the config or writing migration evidence. Legal refreshes preserve profiles,
40
- executions, receipts, and adoption evidence byte-for-byte. Existing profiles
41
- are never rewritten automatically; a fresh `profiles detect --dry-run` supplies
42
- safer, workspace-aware candidates for human review.
43
- Repeated Core refreshes create sequenced receipts without replacing an earlier
44
- migration event, and rejected Formal finalize gates retain their request-bound
45
- reason as append-only evidence.
46
-
47
- ## Updating the process-wide Codex Skill
48
-
49
- Do not replace a shared installed Skill while any consuming project is active.
50
- For a changed Skill manifest, enumerate the complete consuming fleet with
51
- repeated `--workspace` arguments:
29
+ ## Detect and apply project profiles
30
+
31
+ Preview deterministic, project-local commands, or atomically adopt only
32
+ high-confidence candidates:
52
33
 
53
34
  ```bash
54
- node ./scripts/runkit-contract/install-codex-skill.mjs install \
55
- --repository /absolute/path/to/owlrunkit-package \
56
- --target /absolute/path/to/installed/owlcoda-runkit \
57
- --archive /absolute/path/to/skill-archives \
58
- --workspace /absolute/project-a \
59
- --workspace /absolute/project-b
35
+ owlrunkit profiles detect --workspace . --dry-run
36
+ owlrunkit profiles detect --workspace . --apply
37
+ owlrunkit profiles validate --workspace .
60
38
  ```
61
39
 
62
- The update is refused before global or project mutation if any listed project
63
- is active or invalid. A successful update records the exact prior Skill
64
- identity and each original project config in an append-only receipt. Restore
65
- that exact state with:
40
+ `--apply` is create-only. It refuses ambiguous or low-confidence candidates,
41
+ source drift, symlinks, and launchers that do not resolve to exact local files.
42
+ It directly supports lock-bound npm plus exact project-installed pnpm, Yarn,
43
+ and Bun launchers. A PATH-only package manager remains review-required. It
44
+ never silently replaces an existing profile set.
45
+
46
+ ## Choose No RunKit, Quick, or Formal
47
+
48
+ Route explicit risk facts before starting work:
66
49
 
67
50
  ```bash
68
- node ./scripts/runkit-contract/install-codex-skill.mjs restore \
69
- --target /absolute/path/to/installed/owlcoda-runkit \
70
- --archive /absolute/path/to/skill-archives \
71
- --receipt /absolute/path/to/skill-upgrade-receipt.json
51
+ owlrunkit assurance route --workspace . \
52
+ --request ./scripts/runkit-contract/templates/assurance-request.json
72
53
  ```
73
54
 
74
- `recover-active` is reserved for a fleet already drifted by an older unsafe
75
- replacement. It accepts only an archived Skill whose Core identity exactly
76
- matches every affected config and active execution pin, leaves all project
77
- bytes untouched, and writes a recovery receipt.
55
+ - **No RunKit** is for work that needs neither a reusable receipt nor controlled
56
+ writes.
57
+ - **Quick Verification** is for one low-risk, source-bound command that needs a
58
+ reusable receipt but no writer lease or Formal acceptance.
59
+ - **Formal Delivery** is for multi-writer, long-running, migration, integration,
60
+ release, production, funds, destructive, or formally accepted work.
78
61
 
79
- Use Quick Verification for one low-risk source-bound command that needs a
80
- reusable receipt but no writer lease or Formal acceptance. Use Formal Delivery
81
- for multi-writer, long-running, migration, integration, release, production,
82
- funds, or formally accepted work. A Quick receipt cannot become Formal
83
- acceptance, and accepted never grants Git or release authority.
62
+ The router fails closed to Formal when required risk facts are incomplete.
63
+ Quick receipts cannot become Formal acceptance, and Formal acceptance does not
64
+ grant Git, release, publish, deploy, or business authority.
84
65
 
85
- The package also includes the read-only verifier:
66
+ Run Quick with:
86
67
 
87
68
  ```bash
88
- owlrunkit-attest /absolute/path/to/receipt.json
69
+ owlrunkit quick-verify --workspace . -- npm test
89
70
  ```
90
71
 
91
- RunKit belongs to the OwlCoda product family and source repository, but its
92
- npm version is independent from the `owlcoda` CLI version.
72
+ ## Formal Delivery in three commands
73
+
74
+ Given a Goal Contract and the paths this work item may write, the happy path is:
75
+
76
+ ```bash
77
+ NODE_BIN="$(node -p 'process.execPath')"
78
+
79
+ owlrunkit formal start --workspace . --run-id release-001 \
80
+ --goal .owlcoda/runkit/goal.json --owned-path 'src/**'
81
+
82
+ owlrunkit formal check --workspace . --run-id release-001 \
83
+ --check-id source-syntax -- "$NODE_BIN" --check src/index.js
84
+
85
+ owlrunkit formal finish --workspace . --run-id release-001 \
86
+ --decision accepted
87
+ ```
93
88
 
94
- RunKit does not grant Git, release, publish, deploy, or business authority.
95
- Those remain explicit external decisions even when verification passes.
89
+ `formal start` creates the execution and exact writer lease. Each `formal check`
90
+ adds source-bound evidence without rebuilding the execution. `formal finish`
91
+ performs the final source-drift, evidence, permission, acceptance, closeout,
92
+ and lease-release gates in one command. Create a related execution only when
93
+ the authorized permission scope really changes. Repeating the same `check` or
94
+ `finish` command resumes exact create-only artifacts after an interruption;
95
+ different bytes fail closed.
96
+
97
+ Formal accepted evidence currently admits only the built-in Node syntax check
98
+ shown above: the exact `process.execPath`, `--check`, and an ordinary workspace
99
+ file. Profile, package-manager, wrapper, and custom commands are rejected
100
+ before spawn because RunKit does not yet enforce a filesystem-write and network
101
+ sandbox for them. Existing full verification and legacy `verify` commands
102
+ remain available for controlled execution, but their deny rules are not
103
+ sandbox-equivalent and their output is not silently promoted into this Formal
104
+ accepted-evidence path.
105
+
106
+ Use `owlrunkit status --workspace .` for a concise human view of what is ready,
107
+ what has not happened, how many gates remain, and the next allowed action.
108
+
109
+ ## Freeze a dirty worktree safely
110
+
111
+ `SourceCandidateV2` makes a dirty but precisely bounded candidate a first-class
112
+ artifact. It binds the baseline, exact owned-path closure, source manifest,
113
+ and payload bytes without requiring a Git commit.
114
+
115
+ ```bash
116
+ owlrunkit candidate freeze --workspace . --run-id release-001 \
117
+ --from-lease delivery --candidate-id rc-001
118
+ owlrunkit candidate verify --workspace . \
119
+ --candidate .owlcoda/runkit/executions/release-001/source-candidates/rc-001.json
120
+ owlrunkit candidate materialize --workspace . \
121
+ --candidate .owlcoda/runkit/executions/release-001/source-candidates/rc-001.json \
122
+ --target-workspace /absolute/clean/materialization
123
+ ```
124
+
125
+ Materialization is create-only and verifies every byte. It applies payloads in
126
+ a sibling staging checkout, then atomically switches the target directory.
127
+ Write or mode failures roll back to the byte-exact clean target, and an
128
+ interrupted switch is recovered from its transaction journal on the next
129
+ invocation. Release reconstruction can therefore compare a clean workspace
130
+ with the frozen candidate instead of requiring the working tree to be
131
+ committed first.
132
+
133
+ ## Register and automatically discover a fleet
134
+
135
+ Register every coverage root once. Later discovery and process-wide migration
136
+ commands use the persistent registry automatically:
137
+
138
+ ```bash
139
+ owlrunkit fleet register-root --fleet-root /absolute/projects
140
+ owlrunkit fleet register-root --fleet-root /absolute/other-projects
141
+ owlrunkit fleet discover
142
+ ```
143
+
144
+ The registry lives under the user-owned OwlCoda home. RunKit recursively
145
+ discovers projects inside every registered root, rejects an unreachable root,
146
+ and freezes the exact workspace list before a shared Skill or Core change.
147
+ Explicit `--fleet-root` and `--fleet-manifest` remain available for bounded
148
+ one-off operations. Completeness is intentionally limited to registered roots;
149
+ RunKit does not claim machine-wide protection for an unregistered location.
150
+
151
+ ## Upgrade a self-hosted Core
152
+
153
+ Core successor separates an immutable candidate and fleet-wide plan from the
154
+ Owner-authorized migration:
155
+
156
+ ```bash
157
+ owlrunkit core-successor plan --workspace . --plan-id core-016 \
158
+ --run-id release-001 --from-lease delivery --candidate-id rc-001
159
+
160
+ owlrunkit core-successor apply --workspace . \
161
+ --plan .owlcoda/runkit/core-successors/core-016/plan.json \
162
+ --owner-authority ./owner-core-successor-authority.json \
163
+ --receipt-id core-016-apply
164
+ ```
165
+
166
+ Planning materializes the complete `SourceCandidateV2` in a clean workspace,
167
+ requires its computed Core identity to equal the proposed successor, and freezes
168
+ the automatically discovered registered fleet. Apply rediscovers the same
169
+ fleet, verifies the frozen plan and Ed25519-signed Owner authority against the
170
+ fixed user trust store, supports mixed prior Core identities, and writes
171
+ append-only per-project migration receipts. Unsigned V1 authority is historical
172
+ evidence only and cannot execute a migration.
173
+
174
+ ## Two-stage deployment and remote adapter
175
+
176
+ Build and verification stay separate from the later permission to change a
177
+ machine:
178
+
179
+ ```bash
180
+ owlrunkit deployment prepare --workspace . --run-id build-001 \
181
+ --artifact dist/app.tgz --media-type application/gzip \
182
+ --owner-decision ./owner-deployment-decision.json \
183
+ --output .owlcoda/runkit/deployments/app-prepare.json
184
+
185
+ owlrunkit deployment execute --workspace . \
186
+ --prepare .owlcoda/runkit/deployments/app-prepare.json \
187
+ --owner-decision ./owner-deployment-decision.json \
188
+ --owner-authority ./deployment-owner-authority.json \
189
+ --manifest ./remote-deployment-manifest.json
190
+
191
+ # Resume the automatic child after an interrupted or indeterminate stage.
192
+ owlrunkit deployment execute --workspace . --resume \
193
+ --prepare .owlcoda/runkit/deployments/app-prepare.json \
194
+ --owner-decision ./owner-deployment-decision.json \
195
+ --owner-authority ./deployment-owner-authority.json \
196
+ --manifest ./remote-deployment-manifest.json
197
+ ```
198
+
199
+ `deployment_prepare` freezes the accepted source artifact, build artifact, and
200
+ canonical `OwnerDeploymentDecisionV1` hash without granting deployment. The
201
+ decision explicitly states clean install versus in-place update, existing
202
+ asset and data authority, rollback semantics, service activation, baseline
203
+ cut, and destructive scope; missing high-risk fields fail closed. A Formal
204
+ `SourceCandidateV2`, including an
205
+ ordinary modification or deletion-only candidate, remains the first-class
206
+ source artifact through verification, accepted closeout, prepare, and lineage.
207
+ Legacy accepted runs that use a DeliveryPacket remain compatible.
208
+ `deployment_execute` requires a separate active execution
209
+ and signed V2 Owner authority that binds the prepare receipt, independent Owner
210
+ decision, and complete remote intent. Before creating the child or lease,
211
+ RunKit compiles the decision against the Goal, prepare receipt, manifest, and
212
+ authority. Conflicts stop before any executable child or remote command. The
213
+ default command creates the child execution, goal, lease,
214
+ profile, resource preflight, lineage, and result automatically. Supplying a
215
+ fully assembled `--request`, `--lineage-output`, and `--output` remains an
216
+ advanced compatibility path for controllers that already own those artifacts.
217
+
218
+ The standard remote deployment adapter models first install and update
219
+ separately. Its contract binds the VM host key and machine identity, create-only
220
+ upload, ordered remote stages, before/after state, exact file hashes, explicit
221
+ deletion allowlists, and remote smoke checks. A failure receipt identifies the
222
+ exact stage reached; destructive deletion is impossible unless both the
223
+ manifest and Owner-authorized execution permit it. Before every stage, RunKit
224
+ revalidates the child execution, lease, preflight, engine pin, and lineage.
225
+
226
+ Every external stage invocation has create-only before/after journal entries
227
+ under the deployment child. The journal binds the deployment lineage, remote
228
+ manifest, execute request, and adapter identity. Resume validates the complete
229
+ journal and reconciles remote truth before proceeding. Interrupted upload,
230
+ hash-check, identity, and smoke stages may be rerun because their contracts are
231
+ idempotent. Interrupted install, service, or proxy stages are never replayed
232
+ unless read-only reconciliation proves the expected state. Otherwise RunKit
233
+ returns `reconciliation_required`, keeps the existing child and lease active,
234
+ and requires the same `deployment execute --resume` path after the remote state
235
+ is reconciled.
236
+
237
+ `--resume` is limited to the same child and same Owner decision. If the bound
238
+ decision is replaced by a decision that explicitly supersedes it, RunKit sends
239
+ no remote command, releases the old child lease, and appends a blocked
240
+ `closed_superseded` closeout with `businessGoalIncomplete=true` and
241
+ `nextAllowedAction=plan_replacement_execution`. RunKit does not automatically
242
+ invent the replacement execution. Qualification evidence may remain reusable,
243
+ but rollback, remote intent, and Owner authority bound to the old decision do
244
+ not.
245
+
246
+ The remote manifest can select either adapter path:
247
+
248
+ - `kind: "builtin_ssh"` uses RunKit's built-in, argv-only SSH adapter. The
249
+ manifest binds the exact Core adapter bytes, project-owned `known_hosts`
250
+ bytes through `target.hostKeySha256`, SSH executable bytes, opaque credential
251
+ reference and authentication mode, target identity, a caller-provided remote
252
+ helper path/protocol/version/capability descriptor, and structured install,
253
+ systemd, Nginx, and smoke contracts. Credential bytes are never written to
254
+ the manifest or result. Before every SSH or reconciliation invocation, RunKit
255
+ revalidates `known_hosts`, the SSH executable, and any identity file as
256
+ regular non-symlink files with the same real path and exact SHA-256 bytes.
257
+ Before upload or any later side effect, `identity_preflight` requires the
258
+ helper to return the exact declared protocol, version, and
259
+ `["execute", "reconcile"]` capability set. A mismatch fails closed.
260
+
261
+ This npm package is the SSH client and protocol enforcer; it does not contain
262
+ or install the privileged `owlrunkit-remote-helper` on a target VM. The
263
+ operator must install and audit that helper separately, then bind its exact
264
+ descriptor in the manifest. The handshake proves compatibility with the
265
+ trusted target response, not the provenance of a host already controlled by
266
+ an attacker. Therefore built-in SSH is not an out-of-the-box VM deployment
267
+ capability.
268
+ - `kind: "process"` runs an exact externally supplied adapter executable and
269
+ preserves the existing JSON stage protocol. A transport timeout, nonzero exit,
270
+ or invalid output is indeterminate rather than a proven remote failure, so
271
+ the stage journal drives the same safe resume rules. Manifests created before
272
+ 0.16 may omit `kind`; they remain process-adapter manifests.
273
+
274
+ For `identity_file` authentication, the manifest contains only the canonical
275
+ local file path and SHA-256 binding; the private key bytes are never persisted
276
+ by RunKit. Agent authentication stores only its opaque `agent:`, `keychain:`,
277
+ or `vault:` reference.
278
+
279
+ ## Shared Skill upgrades
280
+
281
+ Process-wide Codex Skill updates automatically use the registered fleet:
282
+
283
+ ```bash
284
+ node ./scripts/runkit-contract/install-codex-skill.mjs install \
285
+ --repository /absolute/path/to/owlrunkit-package \
286
+ --target /absolute/path/to/installed/owlcoda-runkit \
287
+ --archive /absolute/path/to/skill-archives
288
+ ```
289
+
290
+ The installer stops before any mutation when the registry is missing, a
291
+ registered root is unreachable, a discovered project is invalid, or the fleet
292
+ contains active work. Historical closed leases remain evidence but do not
293
+ masquerade as active writers. Restore and drift recovery remain receipt-bound
294
+ and preserve project history.
295
+
296
+ The package also includes the read-only verifier:
297
+
298
+ ```bash
299
+ owlrunkit-attest /absolute/path/to/receipt.json
300
+ ```
96
301
 
97
302
  ## Requirements
98
303
 
99
304
  - Node.js 20.19 or newer
100
305
  - a local project directory
101
- - network access only for explicit `doctor` registry diagnostics and `adopt`;
102
- normal verification and recovery remain local
306
+ - network access only for explicit registry diagnostics and adoption; normal
307
+ verification, fleet discovery, recovery, and attestation remain local
308
+
309
+ OwlRunKit belongs to the OwlCoda product family and source repository, but its
310
+ npm version is independent from the `owlcoda` CLI version.
103
311
 
104
312
  ## License
105
313