owenloop 0.5.9 → 0.5.11
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 +51 -0
- package/README.md +77 -37
- package/bin/owenloop.mjs +16 -1
- package/dist/packages/work/src/agent/loop.js +7 -0
- package/dist/packages/work/src/bundle/pull.d.ts +21 -0
- package/dist/packages/work/src/bundle/pull.js +118 -0
- package/dist/packages/work/src/exec/instructions.d.ts +4 -1
- package/dist/packages/work/src/exec/instructions.js +3 -0
- package/dist/packages/work/src/exec/loop.d.ts +1 -1
- package/dist/packages/work/src/exec/loop.js +92 -14
- package/dist/packages/work/src/harness/claude.js +16 -0
- package/dist/packages/work/src/harness/codex.d.ts +8 -0
- package/dist/packages/work/src/harness/codex.js +27 -1
- package/dist/packages/work/src/harness/contract.d.ts +9 -0
- package/dist/packages/work/src/roles/agent-run.js +38 -10
- package/dist/packages/work/src/roles/exec.js +25 -8
- package/dist/packages/work/src/shift/loop.js +118 -4
- package/dist/packages/work/src/shift/runtime.d.ts +3 -0
- package/dist/packages/work/src/shift/runtime.js +10 -1
- package/dist/packages/work/src/submit-proof.d.ts +11 -8
- package/dist/packages/work/src/submit-proof.js +11 -8
- package/dist/src/capabilities.d.ts +70 -6
- package/dist/src/capabilities.js +49 -6
- package/dist/src/capability-mapping-client.d.ts +29 -0
- package/dist/src/capability-mapping-client.js +160 -0
- package/dist/src/cli.d.ts +2 -2
- package/dist/src/cli.js +1200 -166
- package/dist/src/defs.d.ts +41 -1
- package/dist/src/defs.js +461 -92
- package/dist/src/engine.d.ts +108 -22
- package/dist/src/engine.js +573 -85
- package/dist/src/factory.js +5 -3
- package/dist/src/hub.d.ts +77 -0
- package/dist/src/hub.js +162 -0
- package/dist/src/implements.d.ts +37 -0
- package/dist/src/implements.js +790 -0
- package/dist/src/index.d.ts +12 -10
- package/dist/src/index.js +7 -6
- package/dist/src/mcp/serve.js +254 -45
- package/dist/src/mcp/server.d.ts +10 -7
- package/dist/src/mcp/server.js +53 -8
- package/dist/src/model.d.ts +46 -10
- package/dist/src/model.js +224 -78
- package/dist/src/order-resolver.js +1 -0
- package/dist/src/store/def-source.d.ts +19 -0
- package/dist/src/store/def-source.js +87 -17
- package/dist/src/store/gc-recovery.d.ts +46 -0
- package/dist/src/store/gc-recovery.js +258 -0
- package/dist/src/store/gc.d.ts +94 -0
- package/dist/src/store/gc.js +563 -0
- package/dist/src/store/index.d.ts +3 -1
- package/dist/src/store/index.js +2 -0
- package/dist/src/store/install.d.ts +34 -5
- package/dist/src/store/install.js +73 -11
- package/dist/src/store/pre-commit-verifier.js +42 -2
- package/dist/src/store/snapshot-guard.d.ts +18 -0
- package/dist/src/store/snapshot-guard.js +94 -0
- package/dist/src/store.d.ts +66 -4
- package/dist/src/store.js +333 -12
- package/dist/src/types.d.ts +97 -17
- package/dist/src/types.js +4 -0
- package/dist/src/util.js +4 -1
- package/docs/authoring.md +214 -9
- package/docs/bundles.md +19 -0
- package/docs/cli.md +270 -30
- package/docs/crypto.md +13 -7
- package/docs/design.md +107 -46
- package/docs/evals/mcp-charter-baseline.json +428 -0
- package/docs/mcp-charter-eval.md +124 -0
- package/docs/shift-logs.md +18 -0
- package/docs/wire-contracts.md +28 -7
- package/examples/workflows/compile-dev-playbook.yaml +1 -1
- package/examples/workflows/ship.yaml +28 -2
- package/package.json +2 -1
- package/plugins/claude-code/plugin/.claude-plugin/plugin.json +1 -1
- package/plugins/claude-code/plugin/.mcp.json +1 -1
- package/plugins/claude-code/plugin/skills/author/SKILL.md +22 -0
- package/plugins/claude-code/plugin/skills/ephemeral/SKILL.md +95 -0
- package/plugins/claude-code/plugin/skills/graduate/SKILL.md +156 -0
- package/plugins/claude-code/plugin/skills/plan/SKILL.md +236 -0
- package/plugins/codex/plugins/owenloop/.codex-plugin/plugin.json +1 -1
- package/plugins/codex/plugins/owenloop/.mcp.json +1 -1
- package/plugins/codex/plugins/owenloop/skills/author/SKILL.md +22 -0
- package/plugins/codex/plugins/owenloop/skills/ephemeral/SKILL.md +95 -0
- package/plugins/codex/plugins/owenloop/skills/graduate/SKILL.md +156 -0
- package/plugins/codex/plugins/owenloop/skills/plan/SKILL.md +236 -0
package/dist/src/defs.d.ts
CHANGED
|
@@ -34,6 +34,15 @@ import type { StepDef, WorkflowDef } from './types.ts';
|
|
|
34
34
|
export declare const SUPPORTED_ENGINE_VERSION = 1;
|
|
35
35
|
export declare class DefError extends Error {
|
|
36
36
|
}
|
|
37
|
+
/** Named, actionable refusal for a malformed authored interface call. */
|
|
38
|
+
export declare class InterfaceCallDefinitionError extends DefError {
|
|
39
|
+
readonly name = "InterfaceCallDefinitionError";
|
|
40
|
+
readonly step: string;
|
|
41
|
+
readonly interfaceName?: string;
|
|
42
|
+
readonly interfaceVersion?: string;
|
|
43
|
+
readonly detail: string;
|
|
44
|
+
constructor(step: string, claim: Record<string, unknown> | undefined, detail: string);
|
|
45
|
+
}
|
|
37
46
|
/**
|
|
38
47
|
* Instance-to-definition pinning (§28): a stable content hash of a compiled
|
|
39
48
|
* WorkflowDef, used to detect when the live definition has drifted from an
|
|
@@ -96,6 +105,22 @@ export declare function digestScopedCallsTargetKey(digest: string, target: strin
|
|
|
96
105
|
* spawns at runtime.
|
|
97
106
|
*/
|
|
98
107
|
export declare function resolveCallsTarget(defs: Map<string, WorkflowDef>, target: string, from: WorkflowDef): WorkflowDef | undefined;
|
|
108
|
+
/** A calls cycle and the resolved definition keys on its displayed path. */
|
|
109
|
+
export interface CallsCycleFinding {
|
|
110
|
+
message: string;
|
|
111
|
+
members: string[];
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Report calls cycles in a flat def map. This is the Mode 2 analogue of the
|
|
115
|
+
* Mode 1 include-cycle guard in expandIncludes; the two edge kinds stay
|
|
116
|
+
* deliberately separate. Findings use resolved map identity, not bare call
|
|
117
|
+
* text, so CAS bundle siblings cannot be accidentally fused. The first finding
|
|
118
|
+
* is strict loading's legacy DFS witness. Further findings add at most one
|
|
119
|
+
* deterministic witness for each still-unattributed cyclic member, keeping
|
|
120
|
+
* authoring attribution polynomial and every finding's members consistent with
|
|
121
|
+
* its displayed path without enumerating exponentially many simple cycles.
|
|
122
|
+
*/
|
|
123
|
+
export declare function reportCallsCycles(defs: Map<string, WorkflowDef>): CallsCycleFinding[];
|
|
99
124
|
/** Load and validate a single workflow definition from a YAML file. */
|
|
100
125
|
export declare function loadDefFile(file: string): WorkflowDef;
|
|
101
126
|
/**
|
|
@@ -130,7 +155,8 @@ export declare function loadDefsUnfinalized(dir: string): Map<string, WorkflowDe
|
|
|
130
155
|
* (each def possibly still carrying `_includes`), it: expands each def's
|
|
131
156
|
* includes; runs the cross-def `calls:` checks (target existence, `callsInputs`
|
|
132
157
|
* key validity, exactly-one child output); runs `validateDef` per expanded def;
|
|
133
|
-
* and finally
|
|
158
|
+
* and finally performs the bounded first-cycle DFS over the whole expanded map.
|
|
159
|
+
* `reportCallsCycles` exposes the wider per-member authoring report. Returns the
|
|
134
160
|
* expanded, validated map. Throws `DefError` on the first problem — the same
|
|
135
161
|
* messages, in the same order, the filesystem loader has always produced (this
|
|
136
162
|
* is a pure extraction of what used to live inline in `loadDefs`).
|
|
@@ -153,6 +179,12 @@ export interface FinalizeDefsOptions {
|
|
|
153
179
|
*/
|
|
154
180
|
allowUnresolvedCalls?: boolean;
|
|
155
181
|
}
|
|
182
|
+
/**
|
|
183
|
+
* Return every direct cross-definition `calls:` error for one expanded
|
|
184
|
+
* definition. Strict loading uses the first result to retain its historical
|
|
185
|
+
* throw behavior; tolerant authoring commands can present the complete list.
|
|
186
|
+
*/
|
|
187
|
+
export declare function validateCallsEdges(def: WorkflowDef, defs: Map<string, WorkflowDef>, options?: FinalizeDefsOptions): string[];
|
|
156
188
|
export declare function finalizeDefs(raw: Map<string, WorkflowDef>, options?: FinalizeDefsOptions): Map<string, WorkflowDef>;
|
|
157
189
|
/** One file that `loadDefsRaw` could not turn into a def (malformed YAML, bad shape, duplicate name). */
|
|
158
190
|
export interface DefLoadFailure {
|
|
@@ -168,4 +200,12 @@ export interface DefLoadFailure {
|
|
|
168
200
|
* Two-phase: Phase 1 collects all defs. Phase 2 expands includes best-effort
|
|
169
201
|
* (silently skips expansion failures so the lint caller sees un-expanded defs).
|
|
170
202
|
*/
|
|
203
|
+
export declare function scanDefsRaw(dir: string, failures?: DefLoadFailure[]): Map<string, WorkflowDef>;
|
|
204
|
+
/** Best-effort include expansion for a complete, already-merged raw map. */
|
|
205
|
+
export declare function expandDefsRaw(raw: Map<string, WorkflowDef>): Map<string, WorkflowDef>;
|
|
206
|
+
/**
|
|
207
|
+
* Compatibility wrapper for tolerant single-directory loading. Raw loading
|
|
208
|
+
* builds and expands includes best-effort; callers explicitly invoke shared
|
|
209
|
+
* calls validation and cycle reporting against the complete definition map.
|
|
210
|
+
*/
|
|
171
211
|
export declare function loadDefsRaw(dir: string, failures?: DefLoadFailure[]): Map<string, WorkflowDef>;
|