owlrunkit 0.18.2 → 0.18.4
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 +63 -0
- package/README.md +159 -52
- package/docs/architecture/OWLCODA_RUNKIT_0184_EXTERNAL_DELIVERY_INTAKE_PRODUCT_DECISION_20260812.md +209 -0
- package/docs/architecture/OWLCODA_RUNKIT_018_PROJECT_DRIVER_PRODUCT_DEFINITION.md +16 -5
- package/docs/architecture/OWLCODA_RUNKIT_USAGE_MODE_SELECTION_PRODUCT_DECISION_20260811.md +54 -3
- package/docs/architecture/OWLCODA_RUN_KIT_CONTRACT_V0_2.md +7 -0
- package/integrations/codex/skills/owlcoda-runkit/SKILL.md +125 -74
- package/integrations/codex/skills/owlcoda-runkit/assets/templates/config.json +3 -3
- package/integrations/codex/skills/owlcoda-runkit/references/contract-v0.1.md +160 -0
- package/integrations/codex/skills/owlcoda-runkit/references/contract-v0.2.md +545 -0
- package/package.json +1 -1
- package/packages/attest/README.md +4 -3
- package/packages/attest/consumer-surface-v1.json +1 -0
- package/packages/attest/distribution-manifest-v1.json +12 -1
- package/packages/attest/schemas/quick-verification-receipt-v2.schema.json +232 -0
- package/packages/attest/src/index.mjs +4 -1
- package/packages/attest/src/quick-receipt-contract.mjs +16 -6
- package/packages/attest/src/quick.mjs +21 -2
- package/packages/attest/src/workspace-snapshot.mjs +10 -1
- package/registry-release-policy-v1.json +5 -5
- package/sbom.spdx.json +5 -5
- package/scripts/runkit-contract/assurance-router.mjs +25 -6
- package/scripts/runkit-contract/core-contract.mjs +10 -1
- package/scripts/runkit-contract/onboarding-doctor.mjs +1 -1
- package/scripts/runkit-contract/profile-onboarding.mjs +263 -15
- package/scripts/runkit-contract/project-cli-resolver.mjs +6 -0
- package/scripts/runkit-contract/project-external-delivery.mjs +707 -0
- package/scripts/runkit-contract/quick-metrics.mjs +3 -3
- package/scripts/runkit-contract/quick-receipt.mjs +79 -12
- package/scripts/runkit-contract/quick-verify.mjs +89 -12
- package/scripts/runkit-contract/runkit-bootstrap.mjs +6 -1
- package/scripts/runkit-contract/runkit-cli.mjs +363 -143
- package/scripts/runkit-contract/schemas/assurance-route-v2.schema.json +26 -0
- package/scripts/runkit-contract/schemas/profile-detection-v3.schema.json +170 -0
- package/scripts/runkit-contract/schemas/team-project-event-v2.schema.json +128 -0
- package/scripts/runkit-contract/schemas/team-project-event-v3.schema.json +146 -0
- package/scripts/runkit-contract/schemas/team-project-status-v2.schema.json +85 -0
- package/scripts/runkit-contract/schemas/usage-mode-recommendation-v2.schema.json +136 -0
- package/scripts/runkit-contract/team-project.mjs +782 -55
- package/scripts/runkit-contract/usage-mode.mjs +28 -7
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# OwlCoda RunKit Contract v0.1
|
|
2
|
+
|
|
3
|
+
Status: **frozen for Codex-side project execution**
|
|
4
|
+
Frozen at: 2026-07-13
|
|
5
|
+
Runner prerequisite: Node.js 20+
|
|
6
|
+
|
|
7
|
+
## Purpose
|
|
8
|
+
|
|
9
|
+
RunKit Contract v0.1 defines the smallest reusable execution contract proven while developing OwlCoda inside Codex. It coordinates project-owned truth, bounded workers, delivery evidence, stage verification, invalidation and replacement without relying on chat history or agent memory.
|
|
10
|
+
|
|
11
|
+
This is a control and evidence contract. It is not an OwlCoda product API, a workflow designer, a memory system or a release system.
|
|
12
|
+
|
|
13
|
+
## Frozen principles
|
|
14
|
+
|
|
15
|
+
1. **Project-owned truth** — goals, packets, profiles, receipts and decisions live as project artifacts. Agent memory may help locate them but is never authoritative.
|
|
16
|
+
2. **One owner per write scope** — every work item has an explicit lease and owned paths. Parallelism is allowed only across non-overlapping scopes.
|
|
17
|
+
3. **Complete a phase before stage verification** — implementation lanes may batch a coherent phase and stop at `ready_for_stage_verification`; the stage gate runs once after all dependencies are fresh.
|
|
18
|
+
4. **Evidence travels with delivery** — a delivery packet records scoped whole-file hashes, canonical fingerprint, commands already run and repository actions. The controller verifies hashes instead of repeating covered commands.
|
|
19
|
+
5. **Stale evidence fails before execution** — a scoped source mismatch returns `invalidated_by_concurrent_write`; verification commands must remain at zero until a fresh replacement packet is valid.
|
|
20
|
+
6. **Uncovered change fails closed** — if no profile covers a changed path, the decision is `full_profile_required`, never an empty successful selection.
|
|
21
|
+
7. **Lineage validity is not verification success** — a structurally valid receipt graph becomes accepted only when the active receipt binds the current source fingerprint, exact selected profiles and real command receipts.
|
|
22
|
+
8. **Append-only replacement** — invalidated receipts remain immutable. A replacement references the parent receipt SHA-256 and becomes the only active leaf.
|
|
23
|
+
9. **Foreign projects remain project-owned** — read-only shadow runs may read another repository but must write all runner artifacts and scratch outside that repository and prove its start/end state is unchanged.
|
|
24
|
+
10. **Runtime truth beats transcript appearance** — gate decisions consume files, hashes, exit codes and receipts, not worker summaries.
|
|
25
|
+
|
|
26
|
+
### Additive clarifications
|
|
27
|
+
|
|
28
|
+
These rules narrow unsafe or ambiguous inputs without changing the frozen v0.1 semantics:
|
|
29
|
+
|
|
30
|
+
1. **Runtime state is never product source** — `.owlcoda/runkit` and every descendant are reserved. They are forbidden in delivery `changedFiles`, verification profile path rules and lease owned paths. A violation is `invalid_input` / exit `3`, never a source change or profile match.
|
|
31
|
+
2. **One execution pins one engine** — execution creation records `contractVersion`, `coreVersion`, `coreManifestSha256` and an immutable or content-addressed `coreSourceRef`. Every later core invocation compares this pin before acting. A mismatch fails closed as `engine_changed_during_execution` / exit `2`; it cannot silently mix implementations inside one lineage.
|
|
32
|
+
3. **Core and producer data are separate** — acceptance semantics consume the contract version, pinned core identity and core payload. Producer identity is provenance. Adapter-specific extensions are namespaced and cannot add authority or change acceptance.
|
|
33
|
+
4. **Configuration is data, not authority** — project configuration, profiles and command declarations never authorize Git, publish, deploy, destructive actions, credential use or foreign-project writes.
|
|
34
|
+
|
|
35
|
+
## Artifact chain
|
|
36
|
+
|
|
37
|
+
```text
|
|
38
|
+
GoalContract
|
|
39
|
+
-> ExecutionPlan
|
|
40
|
+
-> WorkItem + WorkerLease
|
|
41
|
+
-> ExecutionDeliveryPacket
|
|
42
|
+
-> VerificationProfile selection
|
|
43
|
+
-> Stage VerificationReceipt
|
|
44
|
+
-> GateDecision
|
|
45
|
+
-> CloseoutReceipt
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
`events.jsonl` is the append-only transition ledger. `execution-plan.json` is a derived mutable snapshot and must not override contradictory events or receipts.
|
|
49
|
+
|
|
50
|
+
## Delivery source contract
|
|
51
|
+
|
|
52
|
+
An `ExecutionDeliveryPacket` contains exactly one source hash map:
|
|
53
|
+
|
|
54
|
+
- `changedFiles.files`, or
|
|
55
|
+
- `changedFiles.wholeFileSha256`.
|
|
56
|
+
|
|
57
|
+
Both shapes present is malformed. Paths must be safe repository-relative paths: no absolute path, Windows rooted or drive-relative path, backslash, NUL, empty segment, `.` or `..`. Selected sources must be regular files inside the physical workspace root; symlinks and root escapes are rejected. The reserved `.owlcoda/runkit` subtree is rejected even though it is otherwise repository-relative, preventing receipts from recursively changing the fingerprint they describe.
|
|
58
|
+
|
|
59
|
+
Canonical stream:
|
|
60
|
+
|
|
61
|
+
```text
|
|
62
|
+
<path><TAB>sha256:<lowercase-whole-file-sha256><LF>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Rows are ordered by ascending Unicode code units, independent of locale and ICU. The source fingerprint is SHA-256 of the UTF-8 bytes of the canonical stream.
|
|
66
|
+
|
|
67
|
+
Source gate results and process exit codes:
|
|
68
|
+
|
|
69
|
+
- `valid` — exit `0`
|
|
70
|
+
- `invalidated_by_concurrent_write` — exit `2`
|
|
71
|
+
- `malformed_packet` — exit `3`
|
|
72
|
+
|
|
73
|
+
## Verification profile contract
|
|
74
|
+
|
|
75
|
+
A profile has a stable `id` and path rules. v0.1 supports only:
|
|
76
|
+
|
|
77
|
+
- exact safe repository-relative path;
|
|
78
|
+
- safe non-empty `directory/**` prefix.
|
|
79
|
+
|
|
80
|
+
For legal inputs the resolver returns deterministic, de-duplicated profile IDs. Any uncovered changed path returns:
|
|
81
|
+
|
|
82
|
+
```json
|
|
83
|
+
{
|
|
84
|
+
"decision": "full_profile_required",
|
|
85
|
+
"profileIds": [],
|
|
86
|
+
"uncoveredPaths": ["..."]
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Unsafe input is `invalid_input` / exit `3`; it is not converted into a profile decision. Profiles may not name `.owlcoda/runkit`, `.owlcoda/runkit/**` or a descendant exact path.
|
|
91
|
+
|
|
92
|
+
## Receipt lineage contract
|
|
93
|
+
|
|
94
|
+
Each lineage entry contains:
|
|
95
|
+
|
|
96
|
+
- a 64-hex `receiptSha256` matching canonical receipt content;
|
|
97
|
+
- a receipt object;
|
|
98
|
+
- optional 64-hex `parentReceiptSha256` referencing an earlier invalidated receipt.
|
|
99
|
+
|
|
100
|
+
Receipt SHA values are globally unique. The lineage rejects malformed entries, hash mismatch, missing or non-prior parent, parent with the wrong state, cycles, branches and multiple active leaves.
|
|
101
|
+
|
|
102
|
+
Lineage CLI exit codes:
|
|
103
|
+
|
|
104
|
+
- structurally valid — exit `0`
|
|
105
|
+
- well-formed but invalid — exit `2`
|
|
106
|
+
- malformed input — exit `3`
|
|
107
|
+
|
|
108
|
+
## Joint verification gate
|
|
109
|
+
|
|
110
|
+
The active receipt must bind:
|
|
111
|
+
|
|
112
|
+
- a current source gate with `status=valid` and exit `0`;
|
|
113
|
+
- the exact recomputed source fingerprint;
|
|
114
|
+
- the exact targeted profile IDs;
|
|
115
|
+
- a valid single-leaf receipt lineage.
|
|
116
|
+
|
|
117
|
+
For `status=passed`, `commandRuns` must be greater than zero and equal the number of command receipts. Every command receipt requires a non-empty command, exit `0`, and SHA-256 for stdout and stderr.
|
|
118
|
+
|
|
119
|
+
A zero-command receipt may remain `shadow_validated` or `ready_for_verification`, but it cannot be accepted as passed.
|
|
120
|
+
|
|
121
|
+
## Stage verification economy
|
|
122
|
+
|
|
123
|
+
- Implementation lanes complete a coherent phase before testing when the round contract selects stage verification.
|
|
124
|
+
- A stage owner consumes all fresh packets and runs one declared top-level profile.
|
|
125
|
+
- The controller validates the packet and receipt hashes and does not repeat covered commands.
|
|
126
|
+
- A failed stage is classified before repair. Only the affected stage is rerun after a replacement packet; unrelated profiles remain valid.
|
|
127
|
+
- Full regression belongs at an integration, merge or release boundary, not every feature delivery.
|
|
128
|
+
|
|
129
|
+
## Foreign-project read-only mode
|
|
130
|
+
|
|
131
|
+
Before and after the stage, record at minimum:
|
|
132
|
+
|
|
133
|
+
- foreign HEAD;
|
|
134
|
+
- raw Git status bytes and SHA-256;
|
|
135
|
+
- a declared workspace manifest fingerprint appropriate to the project;
|
|
136
|
+
- selected file hashes.
|
|
137
|
+
|
|
138
|
+
All foreign build scratch and receipts must be redirected to the controller project's artifact directory. Any start/end mismatch is `foreign_workspace_changed_during_shadow`, even when the verifier itself passed.
|
|
139
|
+
|
|
140
|
+
## Provenance
|
|
141
|
+
|
|
142
|
+
- Run001 proved leases, receipt-first handoff, targeted repair and controller economy.
|
|
143
|
+
- Run002 proved a packaged provider-backed synthetic coding loop and restart recovery.
|
|
144
|
+
- Run003 proved stale packet invalidation, minimal affected profile selection and append-only replacement.
|
|
145
|
+
- Run004 proved the contract against the foreign Swift/macOS OwlOps project with one stage command, one focused Swift verifier and zero foreign repository writes.
|
|
146
|
+
|
|
147
|
+
The exact evidence hashes are recorded in the Run004 manifest and closeout receipt.
|
|
148
|
+
|
|
149
|
+
## Versioning rule
|
|
150
|
+
|
|
151
|
+
The semantics above are frozen as v0.1. New optional fields are allowed when they do not weaken these invariants. Any change to path grammar, canonicalization, exit meanings, invalidation timing, receipt parentage, acceptance evidence or foreign-write policy requires a new contract version.
|
|
152
|
+
|
|
153
|
+
## Not yet included
|
|
154
|
+
|
|
155
|
+
- reusable npm package or global installation;
|
|
156
|
+
- Codex plugin or skill distribution;
|
|
157
|
+
- remote worker transport;
|
|
158
|
+
- UI/workflow designer;
|
|
159
|
+
- cloud/team memory;
|
|
160
|
+
- automatic commit, publish or deployment authority.
|