owlrunkit 0.15.1 → 0.16.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 (76) hide show
  1. package/CHANGELOG.md +105 -0
  2. package/README.md +284 -66
  3. package/integrations/codex/skills/owlcoda-runkit/SKILL.md +235 -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 +10 -0
  8. package/packages/attest/src/quick.mjs +10 -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 +1198 -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 +704 -0
  28. package/scripts/runkit-contract/project-control-parser.mjs +889 -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 +1155 -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 +167 -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 +62 -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 +166 -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,110 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.16.1
4
+
5
+ - Replaces mutable publication-state assertions in the bundled Codex Skill
6
+ with time-stable registry verification guidance.
7
+ - Binds the 0.16.1 candidate and rollback path to the exact officially
8
+ published `owlrunkit@0.16.0` registry shasum, integrity, and tarball URL.
9
+ - Extends the trusted prior-Core catalog and public verifier so 0.16.0 projects
10
+ can enter the existing fail-closed Core-successor path without hand edits.
11
+ - Strengthens the release identity gate so both source and unpacked Skill
12
+ copies fail when stale publication claims or mismatched release identities
13
+ appear.
14
+ - Grants no Git, publish, release, deploy, installation, global Skill update,
15
+ or foreign-project migration authority.
16
+
17
+ ## 0.16.0
18
+
19
+ - Adds a persistent coverage-root registry. After each fleet root is registered
20
+ once, ordinary discovery, shared Skill upgrades, and Core successor planning
21
+ automatically scan the complete registered scope. RunKit refuses unreachable
22
+ registered roots and does not claim to discover projects outside them.
23
+ - Upgrades profile detection to emit high-confidence, exact project-local
24
+ npm, pnpm, Yarn, or Bun launchers that can be adopted atomically with
25
+ `profiles detect --apply`; a PATH-only manager remains review-required.
26
+ - Adds deterministic assurance routing among No RunKit, Quick Verification,
27
+ and Formal Delivery based on explicit risk facts.
28
+ - Adds the three-command Formal happy path: `formal start`, incremental
29
+ `formal check`, and one `formal finish` that performs the final source,
30
+ evidence, permission, closeout, and lease-release gates. Exact create-only
31
+ checks and finishes resume after interruption; mismatches fail closed.
32
+ - Restricts Formal accepted checks to the mechanically safe built-in Node
33
+ syntax checker until a filesystem-write and network sandbox exists. Profile,
34
+ package-manager, wrapper, and custom commands fail before spawn; legacy
35
+ verification remains available without being treated as sandbox-equivalent.
36
+ - Adds `SourceCandidateV2` for immutable dirty-worktree candidates with exact
37
+ owned-path closure, verification, and clean-workspace materialization.
38
+ Materialization now uses a sibling staging checkout, atomic target switch,
39
+ byte-exact rollback, and interruption recovery instead of incrementally
40
+ mutating the clean target. An accepted candidate, including deletion-only
41
+ and renamed changes, remains first-class through closeout, READY V2, release
42
+ successor verification, deployment prepare, and deployment lineage while
43
+ legacy DeliveryPacket runs remain compatible.
44
+ - Adds fleet-safe Core successor planning and Owner-authorized apply, including
45
+ mixed prior Core identities, exact candidate materialization, and
46
+ append-only per-project migration receipts. Owner authorization is an
47
+ Ed25519-signed V2 artifact verified against the fixed user trust store.
48
+ - Adds linked deployment prepare/execute contracts and a staged remote
49
+ deployment adapter with fixed machine identity, create-only upload, exact
50
+ deletion allowlists, before/after state, hash verification, and stage-specific
51
+ failure receipts. Deployment authority binds the full remote intent and is
52
+ revalidated with execution, lease, preflight, engine, and lineage state before
53
+ every remote stage.
54
+ - Adds an independently hashed `OwnerDeploymentDecisionV1` for deployment
55
+ mode, existing assets, rollback and data authority, service activation,
56
+ baseline cut, and destructive scope. The decision is compiled against Goal,
57
+ prepare receipt, remote manifest, and signed Authority V2 before child or
58
+ lease creation, then revalidated before every remote stage.
59
+ - Closes a child as blocked `closed_superseded` when its Owner decision changes,
60
+ preserving old evidence and reporting the business goal incomplete with a
61
+ replacement plan required. Exact same-decision resume remains supported;
62
+ permission, target, artifact, remote intent, data, rollback, service,
63
+ baseline, or destructive expansion requires new authority.
64
+ - Adds a release identity gate that compares package version, computed Core,
65
+ public Attest, bundled Skill declaration and config, unpacked tarball copies,
66
+ release binding, and retained tarball bytes. A stale hash on any surface
67
+ blocks the release successor.
68
+ - Makes the built-in argv-only SSH adapter selectable directly from the remote
69
+ deployment manifest, with exact bindings for the Core adapter, `known_hosts`,
70
+ SSH executable, opaque credential reference, target, and structured stage
71
+ contracts. Its caller-provided privileged remote helper is explicitly bound
72
+ by path, protocol, version, and fixed execute/reconcile capabilities, then
73
+ checked during identity preflight before any side effect. The npm package
74
+ does not install this VM prerequisite and does not claim out-of-the-box
75
+ privileged deployment. Existing external process-adapter manifests remain
76
+ compatible.
77
+ - Adds create-only before/after journals for every remote stage invocation,
78
+ bound to the deployment lineage, remote manifest, execute request, and exact
79
+ adapter identity. `deployment execute --resume` reuses the existing child,
80
+ validates the complete journal, and reconciles remote truth instead of
81
+ creating a replacement execution.
82
+ - Prevents interrupted install, service, and proxy stages from being replayed
83
+ without a successful read-only reconciliation. Unknown non-idempotent state
84
+ returns `reconciliation_required` and keeps the child control active; only
85
+ idempotent stages may be retried without proof.
86
+ - Revalidates `known_hosts`, the SSH executable, and identity-file real paths
87
+ and hashes before every external SSH invocation. SSH and process transport
88
+ failures are recorded as indeterminate remote state rather than proven
89
+ failures.
90
+ - Adds a concise human status projection that reports completed steps,
91
+ remaining gates, and the next allowed action.
92
+ - Adds action-specific help for the new daily-use commands and makes the
93
+ automatic deployment child workflow the documented default; manually
94
+ assembled execute requests remain an advanced compatibility path.
95
+ - Makes nested command help available through the published bootstrap before
96
+ project binding, rejects symlink traversal for READY evidence and retained
97
+ release artifacts, validates the complete READY lineage, and includes file
98
+ modes in SourceCandidate V2 release equivalence.
99
+ - Makes the `owlrunkit` launcher prefer a project's exact locally bound CLI for
100
+ ordinary commands; bootstrap-only operations continue through the current
101
+ package. Delegation additionally requires the canonical official npm tarball
102
+ URL, canonical SHA-512 SRI, a bootstrap-trusted Core identity, and a matching
103
+ project Config, so a jointly forged local CLI and Config remain blocked.
104
+ - Was published to the official npm registry with `owlrunkit@0.15.1` as its
105
+ release-time rollback baseline; publication did not grant Git, deployment,
106
+ installation, or business authority.
107
+
3
108
  ## 0.15.1
4
109
 
5
110
  - Treats preserved active lease bytes in trusted `blocked` or `rejected`
package/README.md CHANGED
@@ -1,105 +1,323 @@
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.1
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
+ ```
88
+
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 inspect-registry
142
+ owlrunkit fleet discover
143
+ ```
144
+
145
+ The registry lives under the user-owned OwlCoda home. Initial discovery stops
146
+ at each project root; nested projects require a separate coverage root or
147
+ explicit registration. Marker, depth and filesystem failures are reported as
148
+ typed path-level issues rather than being collapsed into an unreachable root.
149
+ After a fleet is classified, `fleet replace-registry --dry-run` previews an
150
+ evidence-bound active, retired, excluded and invalid membership. Applying the
151
+ same request atomically records the exact preimage and a rollback receipt;
152
+ coverage reduction requires explicit exclusion evidence. Retired archives stay
153
+ auditable but are never interpreted as active writers.
154
+
155
+ RunKit rejects an unreachable root and freezes the exact active workspace list
156
+ before a shared Skill or Core change.
157
+ Explicit `--fleet-root` and `--fleet-manifest` remain available for bounded
158
+ one-off operations. Completeness is intentionally limited to registered roots;
159
+ RunKit does not claim machine-wide protection for an unregistered location.
160
+
161
+ ## Upgrade a self-hosted Core
162
+
163
+ Core successor separates an immutable candidate and fleet-wide plan from the
164
+ Owner-authorized migration:
93
165
 
94
- RunKit does not grant Git, release, publish, deploy, or business authority.
95
- Those remain explicit external decisions even when verification passes.
166
+ ```bash
167
+ owlrunkit core-successor plan --workspace . --plan-id core-016 \
168
+ --run-id release-001 --from-lease delivery --candidate-id rc-001
169
+
170
+ owlrunkit core-successor apply --workspace . \
171
+ --plan .owlcoda/runkit/core-successors/core-016/plan.json \
172
+ --owner-authority ./owner-core-successor-authority.json \
173
+ --receipt-id core-016-apply
174
+ ```
175
+
176
+ Planning materializes the complete `SourceCandidateV2` in a clean workspace,
177
+ requires its computed Core identity to equal the proposed successor, and freezes
178
+ the automatically discovered registered fleet. Apply rediscovers the same
179
+ fleet, verifies the frozen plan and Ed25519-signed Owner authority against the
180
+ fixed user trust store, supports mixed prior Core identities, and writes
181
+ append-only per-project migration receipts. Unsigned V1 authority is historical
182
+ evidence only and cannot execute a migration.
183
+
184
+ ## Two-stage deployment and remote adapter
185
+
186
+ Build and verification stay separate from the later permission to change a
187
+ machine:
188
+
189
+ ```bash
190
+ owlrunkit deployment prepare --workspace . --run-id build-001 \
191
+ --artifact dist/app.tgz --media-type application/gzip \
192
+ --owner-decision ./owner-deployment-decision.json \
193
+ --output .owlcoda/runkit/deployments/app-prepare.json
194
+
195
+ owlrunkit deployment execute --workspace . \
196
+ --prepare .owlcoda/runkit/deployments/app-prepare.json \
197
+ --owner-decision ./owner-deployment-decision.json \
198
+ --owner-authority ./deployment-owner-authority.json \
199
+ --manifest ./remote-deployment-manifest.json
200
+
201
+ # Resume the automatic child after an interrupted or indeterminate stage.
202
+ owlrunkit deployment execute --workspace . --resume \
203
+ --prepare .owlcoda/runkit/deployments/app-prepare.json \
204
+ --owner-decision ./owner-deployment-decision.json \
205
+ --owner-authority ./deployment-owner-authority.json \
206
+ --manifest ./remote-deployment-manifest.json
207
+ ```
208
+
209
+ `deployment_prepare` freezes the accepted source artifact, build artifact, and
210
+ canonical `OwnerDeploymentDecisionV1` hash without granting deployment. The
211
+ decision explicitly states clean install versus in-place update, existing
212
+ asset and data authority, rollback semantics, service activation, baseline
213
+ cut, and destructive scope; missing high-risk fields fail closed. A Formal
214
+ `SourceCandidateV2`, including an
215
+ ordinary modification or deletion-only candidate, remains the first-class
216
+ source artifact through verification, accepted closeout, prepare, and lineage.
217
+ Legacy accepted runs that use a DeliveryPacket remain compatible.
218
+ `deployment_execute` requires a separate active execution
219
+ and signed V2 Owner authority that binds the prepare receipt, independent Owner
220
+ decision, and complete remote intent. Before creating the child or lease,
221
+ RunKit compiles the decision against the Goal, prepare receipt, manifest, and
222
+ authority. Conflicts stop before any executable child or remote command. The
223
+ default command creates the child execution, goal, lease,
224
+ profile, resource preflight, lineage, and result automatically. Supplying a
225
+ fully assembled `--request`, `--lineage-output`, and `--output` remains an
226
+ advanced compatibility path for controllers that already own those artifacts.
227
+
228
+ The standard remote deployment adapter models first install and update
229
+ separately. Its contract binds the VM host key and machine identity, create-only
230
+ upload, ordered remote stages, before/after state, exact file hashes, explicit
231
+ deletion allowlists, and remote smoke checks. A failure receipt identifies the
232
+ exact stage reached; destructive deletion is impossible unless both the
233
+ manifest and Owner-authorized execution permit it. Before every stage, RunKit
234
+ revalidates the child execution, lease, preflight, engine pin, and lineage.
235
+
236
+ Every external stage invocation has create-only before/after journal entries
237
+ under the deployment child. The journal binds the deployment lineage, remote
238
+ manifest, execute request, and adapter identity. Resume validates the complete
239
+ journal and reconciles remote truth before proceeding. Interrupted upload,
240
+ hash-check, identity, and smoke stages may be rerun because their contracts are
241
+ idempotent. Interrupted install, service, or proxy stages are never replayed
242
+ unless read-only reconciliation proves the expected state. Otherwise RunKit
243
+ returns `reconciliation_required`, keeps the existing child and lease active,
244
+ and requires the same `deployment execute --resume` path after the remote state
245
+ is reconciled.
246
+
247
+ `--resume` is limited to the same child and same Owner decision. If the bound
248
+ decision is replaced by a decision that explicitly supersedes it, RunKit sends
249
+ no remote command, releases the old child lease, and appends a blocked
250
+ `closed_superseded` closeout with `businessGoalIncomplete=true` and
251
+ `nextAllowedAction=plan_replacement_execution`. RunKit does not automatically
252
+ invent the replacement execution. Qualification evidence may remain reusable,
253
+ but rollback, remote intent, and Owner authority bound to the old decision do
254
+ not.
255
+
256
+ The remote manifest can select either adapter path:
257
+
258
+ - `kind: "builtin_ssh"` uses RunKit's built-in, argv-only SSH adapter. The
259
+ manifest binds the exact Core adapter bytes, project-owned `known_hosts`
260
+ bytes through `target.hostKeySha256`, SSH executable bytes, opaque credential
261
+ reference and authentication mode, target identity, a caller-provided remote
262
+ helper path/protocol/version/capability descriptor, and structured install,
263
+ systemd, Nginx, and smoke contracts. Credential bytes are never written to
264
+ the manifest or result. Before every SSH or reconciliation invocation, RunKit
265
+ revalidates `known_hosts`, the SSH executable, and any identity file as
266
+ regular non-symlink files with the same real path and exact SHA-256 bytes.
267
+ Before upload or any later side effect, `identity_preflight` requires the
268
+ helper to return the exact declared protocol, version, and
269
+ `["execute", "reconcile"]` capability set. A mismatch fails closed.
270
+
271
+ This npm package is the SSH client and protocol enforcer; it does not contain
272
+ or install the privileged `owlrunkit-remote-helper` on a target VM. The
273
+ operator must install and audit that helper separately, then bind its exact
274
+ descriptor in the manifest. The handshake proves compatibility with the
275
+ trusted target response, not the provenance of a host already controlled by
276
+ an attacker. Therefore built-in SSH is not an out-of-the-box VM deployment
277
+ capability.
278
+ - `kind: "process"` runs an exact externally supplied adapter executable and
279
+ preserves the existing JSON stage protocol. A transport timeout, nonzero exit,
280
+ or invalid output is indeterminate rather than a proven remote failure, so
281
+ the stage journal drives the same safe resume rules. Manifests created before
282
+ 0.16 may omit `kind`; they remain process-adapter manifests.
283
+
284
+ For `identity_file` authentication, the manifest contains only the canonical
285
+ local file path and SHA-256 binding; the private key bytes are never persisted
286
+ by RunKit. Agent authentication stores only its opaque `agent:`, `keychain:`,
287
+ or `vault:` reference.
288
+
289
+ ## Shared Skill upgrades
290
+
291
+ Process-wide Codex Skill updates automatically use the registered fleet:
292
+
293
+ ```bash
294
+ node ./scripts/runkit-contract/install-codex-skill.mjs install \
295
+ --repository /absolute/path/to/owlrunkit-package \
296
+ --target /absolute/path/to/installed/owlcoda-runkit \
297
+ --archive /absolute/path/to/skill-archives
298
+ ```
299
+
300
+ The installer stops before any mutation when the registry is missing, a
301
+ registered root is unreachable, a discovered project is invalid, or the fleet
302
+ contains active work. Historical closed leases remain evidence but do not
303
+ masquerade as active writers. Restore and drift recovery remain receipt-bound
304
+ and preserve project history.
305
+
306
+ The package also includes the read-only verifier:
307
+
308
+ ```bash
309
+ owlrunkit-attest /absolute/path/to/receipt.json
310
+ ```
96
311
 
97
312
  ## Requirements
98
313
 
99
314
  - Node.js 20.19 or newer
100
315
  - a local project directory
101
- - network access only for explicit `doctor` registry diagnostics and `adopt`;
102
- normal verification and recovery remain local
316
+ - network access only for explicit registry diagnostics and adoption; normal
317
+ verification, fleet discovery, recovery, and attestation remain local
318
+
319
+ OwlRunKit belongs to the OwlCoda product family and source repository, but its
320
+ npm version is independent from the `owlcoda` CLI version.
103
321
 
104
322
  ## License
105
323