@interf/compiler 0.7.3 → 0.9.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.
- package/README.md +123 -89
- package/TRADEMARKS.md +1 -1
- package/agent-skills/interf-actions/SKILL.md +71 -0
- package/agent-skills/interf-actions/references/cli.md +190 -0
- package/apps/compiler-ui/.next/server/app/index.html +1 -0
- package/apps/compiler-ui/.next/static/XWKL548yXD_UOG4ID9G3J/_buildManifest.js +11 -0
- package/apps/compiler-ui/.next/static/XWKL548yXD_UOG4ID9G3J/_clientMiddlewareManifest.js +1 -0
- package/apps/compiler-ui/.next/static/XWKL548yXD_UOG4ID9G3J/_ssgManifest.js +1 -0
- package/apps/compiler-ui/.next/static/chunks/03~yq9q893hmn.js +1 -0
- package/apps/compiler-ui/.next/static/chunks/06z~l3kwb891e.js +1 -0
- package/apps/compiler-ui/.next/static/chunks/08g7lvje.te.u.js +1 -0
- package/apps/compiler-ui/.next/static/chunks/08m7vf5asqlsm.js +91 -0
- package/apps/compiler-ui/.next/static/chunks/0_i-3_5l9t2qe.js +1 -0
- package/apps/compiler-ui/.next/static/chunks/0b-ywny_j0g~0.js +1 -0
- package/apps/compiler-ui/.next/static/chunks/0b52v41o1gixx.js +1 -0
- package/apps/compiler-ui/.next/static/chunks/0fgt_8knmicoz.js +124 -0
- package/apps/compiler-ui/.next/static/chunks/0gpzgsv0w.q~m.js +31 -0
- package/apps/compiler-ui/.next/static/chunks/0ilwfezfvu6~-.js +1 -0
- package/apps/compiler-ui/.next/static/chunks/0n51hrfoufc7g.js +1 -0
- package/apps/compiler-ui/.next/static/chunks/0ti_66mx7~w2-.js +5 -0
- package/apps/compiler-ui/.next/static/chunks/0xxmf45eskdt~.css +1 -0
- package/apps/compiler-ui/.next/static/chunks/0y5z3t-z1c8ks.js.map +5 -0
- package/apps/compiler-ui/.next/static/chunks/13g~4mamjft.c.css +3 -0
- package/apps/compiler-ui/.next/static/chunks/14wtz~vq25~qq.js +1 -0
- package/apps/compiler-ui/.next/static/chunks/turbopack-109rtik40vwh5.js +1 -0
- package/apps/compiler-ui/.next/static/chunks/turbopack-10e~t1yzi4svj.js +1 -0
- package/apps/compiler-ui/.next/static/chunks/turbopack-worker-0sjn--fhq~1cg.js +1 -0
- package/apps/compiler-ui/.next/static/media/GeistMono_Variable.p.17jn9btb_52pq.woff2 +0 -0
- package/apps/compiler-ui/.next/static/media/Geist_Variable-s.p.0-te~ja_gpvcf.woff2 +0 -0
- package/apps/compiler-ui/.next/static/media/worker.102zas1s52_pf.js +109 -0
- package/builtin-workflows/interf/README.md +8 -8
- package/builtin-workflows/interf/compile/stages/shape/SKILL.md +4 -4
- package/builtin-workflows/interf/compile/stages/structure/SKILL.md +1 -1
- package/builtin-workflows/interf/improve/SKILL.md +1 -1
- package/builtin-workflows/interf/use/query/SKILL.md +1 -1
- package/builtin-workflows/interf/workflow.json +8 -8
- package/builtin-workflows/interf/workflow.schema.json +1 -1
- package/dist/cli/commands/check-draft.d.ts +5 -4
- package/dist/cli/commands/check-draft.js +18 -17
- package/dist/cli/commands/compile-controller.d.ts +3 -0
- package/dist/cli/commands/compile-controller.js +53 -45
- package/dist/cli/commands/compile.js +83 -27
- package/dist/cli/commands/compiled-flow.d.ts +3 -0
- package/dist/cli/commands/compiled-flow.js +9 -7
- package/dist/cli/commands/control-path.d.ts +11 -0
- package/dist/cli/commands/control-path.js +72 -0
- package/dist/cli/commands/create-workflow-wizard.d.ts +6 -0
- package/dist/cli/commands/create-workflow-wizard.js +191 -77
- package/dist/cli/commands/create.js +54 -40
- package/dist/cli/commands/default.js +4 -3
- package/dist/cli/commands/doctor.js +5 -5
- package/dist/cli/commands/executor-flow.js +1 -1
- package/dist/cli/commands/init.js +326 -76
- package/dist/cli/commands/list.js +8 -7
- package/dist/cli/commands/preparation-selection.d.ts +6 -0
- package/dist/cli/commands/preparation-selection.js +11 -0
- package/dist/cli/commands/reset.js +3 -3
- package/dist/cli/commands/source-config-wizard.d.ts +4 -3
- package/dist/cli/commands/source-config-wizard.js +175 -197
- package/dist/cli/commands/status.js +116 -8
- package/dist/cli/commands/test-flow.d.ts +1 -1
- package/dist/cli/commands/test-flow.js +31 -31
- package/dist/cli/commands/test.d.ts +4 -0
- package/dist/cli/commands/test.js +95 -58
- package/dist/cli/commands/verify.js +7 -7
- package/dist/cli/commands/web.d.ts +11 -0
- package/dist/cli/commands/web.js +373 -0
- package/dist/cli/index.d.ts +2 -1
- package/dist/cli/index.js +3 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.js +3 -1
- package/dist/packages/agents/lib/execution.js +4 -2
- package/dist/packages/agents/lib/executors.d.ts +1 -0
- package/dist/packages/agents/lib/executors.js +1 -0
- package/dist/packages/agents/lib/render.d.ts +2 -2
- package/dist/packages/agents/lib/render.js +10 -9
- package/dist/packages/agents/lib/shells.d.ts +3 -11
- package/dist/packages/agents/lib/shells.js +45 -96
- package/dist/packages/agents/lib/types.d.ts +1 -0
- package/dist/packages/compiler/compiled-paths.d.ts +4 -1
- package/dist/packages/compiler/compiled-paths.js +7 -1
- package/dist/packages/compiler/compiled-pipeline.d.ts +7 -0
- package/dist/packages/compiler/compiled-pipeline.js +15 -4
- package/dist/packages/compiler/compiled-schema.js +1 -1
- package/dist/packages/compiler/compiled-stage-plan.d.ts +2 -2
- package/dist/packages/compiler/compiled-stage-plan.js +4 -4
- package/dist/packages/compiler/compiled-stage-runner.d.ts +5 -0
- package/dist/packages/compiler/compiled-stage-runner.js +50 -2
- package/dist/packages/compiler/compiled-target.d.ts +1 -1
- package/dist/packages/compiler/compiled-target.js +2 -2
- package/dist/packages/compiler/lib/schema.d.ts +161 -1
- package/dist/packages/compiler/lib/schema.js +87 -1
- package/dist/packages/compiler/raw-snapshot.d.ts +9 -2
- package/dist/packages/compiler/runtime-acceptance.js +1 -1
- package/dist/packages/compiler/runtime-contracts.js +2 -2
- package/dist/packages/compiler/runtime-prompt.js +6 -6
- package/dist/packages/compiler/runtime-reconcile.js +3 -3
- package/dist/packages/compiler/runtime-runs.js +3 -0
- package/dist/packages/compiler/runtime-types.d.ts +1 -0
- package/dist/packages/compiler/state-health.js +1 -1
- package/dist/packages/compiler/state-view.js +2 -2
- package/dist/packages/compiler/validate-compiled.js +11 -9
- package/dist/packages/execution/adapters.d.ts +15 -0
- package/dist/packages/execution/adapters.js +1 -0
- package/dist/packages/execution/events.d.ts +8 -0
- package/dist/packages/execution/events.js +16 -0
- package/dist/packages/execution/index.d.ts +9 -0
- package/dist/packages/execution/index.js +6 -0
- package/dist/packages/execution/lib/schema.d.ts +1554 -0
- package/dist/packages/execution/lib/schema.js +319 -0
- package/dist/packages/local-service/action-values.d.ts +23 -0
- package/dist/packages/local-service/action-values.js +31 -0
- package/dist/packages/local-service/client.d.ts +119 -0
- package/dist/packages/local-service/client.js +356 -0
- package/dist/packages/local-service/index.d.ts +15 -0
- package/dist/packages/local-service/index.js +11 -0
- package/dist/packages/local-service/lib/schema.d.ts +7355 -0
- package/dist/packages/local-service/lib/schema.js +636 -0
- package/dist/packages/local-service/routes.d.ts +27 -0
- package/dist/packages/local-service/routes.js +32 -0
- package/dist/packages/local-service/runtime.d.ts +134 -0
- package/dist/packages/local-service/runtime.js +2841 -0
- package/dist/packages/local-service/server.d.ts +17 -0
- package/dist/packages/local-service/server.js +572 -0
- package/dist/packages/project-model/index.d.ts +2 -1
- package/dist/packages/project-model/index.js +1 -0
- package/dist/packages/project-model/interf-detect.d.ts +6 -2
- package/dist/packages/project-model/interf-detect.js +25 -10
- package/dist/packages/project-model/interf-scaffold.js +9 -6
- package/dist/packages/project-model/interf.d.ts +1 -1
- package/dist/packages/project-model/interf.js +1 -1
- package/dist/packages/project-model/lib/schema.d.ts +80 -6
- package/dist/packages/project-model/lib/schema.js +29 -19
- package/dist/packages/project-model/source-config.d.ts +22 -13
- package/dist/packages/project-model/source-config.js +140 -123
- package/dist/packages/project-model/source-folders.d.ts +11 -0
- package/dist/packages/project-model/source-folders.js +110 -0
- package/dist/packages/testing/test-execution.js +5 -5
- package/dist/packages/testing/test-paths.js +1 -3
- package/dist/packages/workflow-authoring/workflow-authoring.d.ts +4 -6
- package/dist/packages/workflow-authoring/workflow-authoring.js +45 -86
- package/dist/packages/workflow-authoring/workflow-edit-session.d.ts +2 -0
- package/dist/packages/workflow-authoring/workflow-edit-session.js +80 -49
- package/dist/packages/workflow-authoring/workflow-improvement.js +2 -1
- package/dist/packages/workflow-package/context-interface.js +1 -1
- package/dist/packages/workflow-package/interf-workflow-package.d.ts +6 -0
- package/dist/packages/workflow-package/interf-workflow-package.js +115 -8
- package/dist/packages/workflow-package/local-workflows.js +33 -17
- package/dist/packages/workflow-package/workflow-definitions.d.ts +5 -5
- package/dist/packages/workflow-package/workflow-definitions.js +23 -22
- package/dist/packages/workflow-package/workflow-helpers.js +10 -6
- package/dist/packages/workflow-package/workflow-stage-runner.d.ts +1 -0
- package/dist/packages/workflow-package/workflow-stage-runner.js +2 -0
- package/package.json +17 -1
- package/dist/cli/commands/dataset-selection.d.ts +0 -6
- package/dist/cli/commands/dataset-selection.js +0 -11
- package/dist/lib/agent-args.d.ts +0 -1
- package/dist/lib/agent-args.js +0 -1
- package/dist/lib/agent-constants.d.ts +0 -1
- package/dist/lib/agent-constants.js +0 -1
- package/dist/lib/agent-detection.d.ts +0 -1
- package/dist/lib/agent-detection.js +0 -1
- package/dist/lib/agent-execution.d.ts +0 -1
- package/dist/lib/agent-execution.js +0 -1
- package/dist/lib/agent-logs.d.ts +0 -1
- package/dist/lib/agent-logs.js +0 -1
- package/dist/lib/agent-preflight.d.ts +0 -1
- package/dist/lib/agent-preflight.js +0 -1
- package/dist/lib/agent-render.d.ts +0 -1
- package/dist/lib/agent-render.js +0 -1
- package/dist/lib/agent-shells.d.ts +0 -1
- package/dist/lib/agent-shells.js +0 -1
- package/dist/lib/agent-status.d.ts +0 -1
- package/dist/lib/agent-status.js +0 -1
- package/dist/lib/agent-types.d.ts +0 -1
- package/dist/lib/agent-types.js +0 -1
- package/dist/lib/agents.d.ts +0 -1
- package/dist/lib/agents.js +0 -1
- package/dist/lib/builtin-compiled-workflow.d.ts +0 -1
- package/dist/lib/builtin-compiled-workflow.js +0 -1
- package/dist/lib/chart-guidance.d.ts +0 -1
- package/dist/lib/chart-guidance.js +0 -1
- package/dist/lib/compiled-compile.d.ts +0 -1
- package/dist/lib/compiled-compile.js +0 -1
- package/dist/lib/compiled-paths.d.ts +0 -1
- package/dist/lib/compiled-paths.js +0 -3
- package/dist/lib/compiled-raw.d.ts +0 -1
- package/dist/lib/compiled-raw.js +0 -3
- package/dist/lib/compiled-reset.d.ts +0 -1
- package/dist/lib/compiled-reset.js +0 -3
- package/dist/lib/compiled-schema.d.ts +0 -1
- package/dist/lib/compiled-schema.js +0 -1
- package/dist/lib/discovery.d.ts +0 -1
- package/dist/lib/discovery.js +0 -1
- package/dist/lib/execution-profile.d.ts +0 -1
- package/dist/lib/execution-profile.js +0 -1
- package/dist/lib/executors.d.ts +0 -1
- package/dist/lib/executors.js +0 -1
- package/dist/lib/filesystem.d.ts +0 -1
- package/dist/lib/filesystem.js +0 -1
- package/dist/lib/interf-bootstrap.d.ts +0 -1
- package/dist/lib/interf-bootstrap.js +0 -3
- package/dist/lib/interf-detect.d.ts +0 -1
- package/dist/lib/interf-detect.js +0 -3
- package/dist/lib/interf-scaffold.d.ts +0 -1
- package/dist/lib/interf-scaffold.js +0 -3
- package/dist/lib/interf-workflow-package.d.ts +0 -1
- package/dist/lib/interf-workflow-package.js +0 -1
- package/dist/lib/interf.d.ts +0 -1
- package/dist/lib/interf.js +0 -3
- package/dist/lib/local-workflows.d.ts +0 -1
- package/dist/lib/local-workflows.js +0 -1
- package/dist/lib/logger.d.ts +0 -1
- package/dist/lib/logger.js +0 -1
- package/dist/lib/package-root.d.ts +0 -1
- package/dist/lib/package-root.js +0 -1
- package/dist/lib/parse.d.ts +0 -1
- package/dist/lib/parse.js +0 -1
- package/dist/lib/project-paths.d.ts +0 -1
- package/dist/lib/project-paths.js +0 -3
- package/dist/lib/runtime-acceptance.d.ts +0 -1
- package/dist/lib/runtime-acceptance.js +0 -1
- package/dist/lib/runtime-contracts.d.ts +0 -1
- package/dist/lib/runtime-contracts.js +0 -1
- package/dist/lib/runtime-inventory.d.ts +0 -1
- package/dist/lib/runtime-inventory.js +0 -1
- package/dist/lib/runtime-paths.d.ts +0 -1
- package/dist/lib/runtime-paths.js +0 -1
- package/dist/lib/runtime-prompt.d.ts +0 -1
- package/dist/lib/runtime-prompt.js +0 -1
- package/dist/lib/runtime-reconcile.d.ts +0 -1
- package/dist/lib/runtime-reconcile.js +0 -1
- package/dist/lib/runtime-runs.d.ts +0 -1
- package/dist/lib/runtime-runs.js +0 -1
- package/dist/lib/runtime-types.d.ts +0 -1
- package/dist/lib/runtime-types.js +0 -1
- package/dist/lib/runtime.d.ts +0 -1
- package/dist/lib/runtime.js +0 -1
- package/dist/lib/schema.d.ts +0 -4
- package/dist/lib/schema.js +0 -6
- package/dist/lib/source-config.d.ts +0 -1
- package/dist/lib/source-config.js +0 -3
- package/dist/lib/state-artifacts.d.ts +0 -1
- package/dist/lib/state-artifacts.js +0 -1
- package/dist/lib/state-health.d.ts +0 -1
- package/dist/lib/state-health.js +0 -1
- package/dist/lib/state-io.d.ts +0 -1
- package/dist/lib/state-io.js +0 -1
- package/dist/lib/state-paths.d.ts +0 -1
- package/dist/lib/state-paths.js +0 -1
- package/dist/lib/state-view.d.ts +0 -1
- package/dist/lib/state-view.js +0 -1
- package/dist/lib/state.d.ts +0 -1
- package/dist/lib/state.js +0 -1
- package/dist/lib/test-execution.d.ts +0 -1
- package/dist/lib/test-execution.js +0 -3
- package/dist/lib/test-matrices.d.ts +0 -1
- package/dist/lib/test-matrices.js +0 -3
- package/dist/lib/test-paths.d.ts +0 -1
- package/dist/lib/test-paths.js +0 -3
- package/dist/lib/test-profile-presets.d.ts +0 -1
- package/dist/lib/test-profile-presets.js +0 -3
- package/dist/lib/test-sandbox.d.ts +0 -1
- package/dist/lib/test-sandbox.js +0 -3
- package/dist/lib/test-specs.d.ts +0 -1
- package/dist/lib/test-specs.js +0 -3
- package/dist/lib/test-targets.d.ts +0 -1
- package/dist/lib/test-targets.js +0 -3
- package/dist/lib/test-types.d.ts +0 -1
- package/dist/lib/test-types.js +0 -3
- package/dist/lib/test.d.ts +0 -1
- package/dist/lib/test.js +0 -3
- package/dist/lib/util.d.ts +0 -1
- package/dist/lib/util.js +0 -1
- package/dist/lib/validate-compiled.d.ts +0 -1
- package/dist/lib/validate-compiled.js +0 -1
- package/dist/lib/validate-helpers.d.ts +0 -1
- package/dist/lib/validate-helpers.js +0 -1
- package/dist/lib/validate.d.ts +0 -1
- package/dist/lib/validate.js +0 -1
- package/dist/lib/workflow-authoring.d.ts +0 -1
- package/dist/lib/workflow-authoring.js +0 -1
- package/dist/lib/workflow-definitions.d.ts +0 -1
- package/dist/lib/workflow-definitions.js +0 -1
- package/dist/lib/workflow-edit-session.d.ts +0 -1
- package/dist/lib/workflow-edit-session.js +0 -1
- package/dist/lib/workflow-edit-utils.d.ts +0 -1
- package/dist/lib/workflow-edit-utils.js +0 -1
- package/dist/lib/workflow-helpers.d.ts +0 -1
- package/dist/lib/workflow-helpers.js +0 -1
- package/dist/lib/workflow-improvement.d.ts +0 -1
- package/dist/lib/workflow-improvement.js +0 -1
- package/dist/lib/workflow-primitives.d.ts +0 -1
- package/dist/lib/workflow-primitives.js +0 -1
- package/dist/lib/workflow-review-paths.d.ts +0 -1
- package/dist/lib/workflow-review-paths.js +0 -1
- package/dist/lib/workflow-stage-policy.d.ts +0 -1
- package/dist/lib/workflow-stage-policy.js +0 -1
- package/dist/lib/workflow-stage-runner.d.ts +0 -1
- package/dist/lib/workflow-stage-runner.js +0 -1
- package/dist/lib/workflows.d.ts +0 -1
- package/dist/lib/workflows.js +0 -1
|
@@ -32,6 +32,161 @@ export declare const CompiledStageStatusSchema: z.ZodEnum<{
|
|
|
32
32
|
}>;
|
|
33
33
|
export declare const SourceCompiledMaxAttemptsSchema: z.ZodNumber;
|
|
34
34
|
export declare const SourceCompiledMaxLoopsSchema: z.ZodNumber;
|
|
35
|
+
export declare const ReadinessStatusSchema: z.ZodEnum<{
|
|
36
|
+
stale: "stale";
|
|
37
|
+
failed: "failed";
|
|
38
|
+
"not-configured": "not-configured";
|
|
39
|
+
"not-built": "not-built";
|
|
40
|
+
building: "building";
|
|
41
|
+
built: "built";
|
|
42
|
+
checking: "checking";
|
|
43
|
+
ready: "ready";
|
|
44
|
+
"not-ready": "not-ready";
|
|
45
|
+
}>;
|
|
46
|
+
export declare const ReadinessGateSchema: z.ZodEnum<{
|
|
47
|
+
"preparation-config": "preparation-config";
|
|
48
|
+
"portable-context": "portable-context";
|
|
49
|
+
"compile-run": "compile-run";
|
|
50
|
+
"readiness-checks": "readiness-checks";
|
|
51
|
+
"source-baseline": "source-baseline";
|
|
52
|
+
"portable-context-check": "portable-context-check";
|
|
53
|
+
"checks-current": "checks-current";
|
|
54
|
+
}>;
|
|
55
|
+
export declare const ReadinessCheckSchema: z.ZodObject<{
|
|
56
|
+
gate: z.ZodEnum<{
|
|
57
|
+
"preparation-config": "preparation-config";
|
|
58
|
+
"portable-context": "portable-context";
|
|
59
|
+
"compile-run": "compile-run";
|
|
60
|
+
"readiness-checks": "readiness-checks";
|
|
61
|
+
"source-baseline": "source-baseline";
|
|
62
|
+
"portable-context-check": "portable-context-check";
|
|
63
|
+
"checks-current": "checks-current";
|
|
64
|
+
}>;
|
|
65
|
+
ok: z.ZodBoolean;
|
|
66
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
67
|
+
stale: "stale";
|
|
68
|
+
failed: "failed";
|
|
69
|
+
"not-configured": "not-configured";
|
|
70
|
+
"not-built": "not-built";
|
|
71
|
+
building: "building";
|
|
72
|
+
built: "built";
|
|
73
|
+
checking: "checking";
|
|
74
|
+
ready: "ready";
|
|
75
|
+
"not-ready": "not-ready";
|
|
76
|
+
}>>;
|
|
77
|
+
summary: z.ZodString;
|
|
78
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
79
|
+
run_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
80
|
+
artifact_path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
81
|
+
}, z.core.$strict>;
|
|
82
|
+
export declare const ReadinessTargetResultSchema: z.ZodObject<{
|
|
83
|
+
passed: z.ZodNumber;
|
|
84
|
+
total: z.ZodNumber;
|
|
85
|
+
pass_rate: z.ZodNullable<z.ZodNumber>;
|
|
86
|
+
checks_fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
87
|
+
stale: z.ZodDefault<z.ZodBoolean>;
|
|
88
|
+
run_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
89
|
+
run_path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
90
|
+
}, z.core.$strict>;
|
|
91
|
+
export declare const ReadinessStateSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
|
|
92
|
+
kind: z.ZodLiteral<"interf-readiness-state">;
|
|
93
|
+
version: z.ZodLiteral<1>;
|
|
94
|
+
generated_at: z.ZodString;
|
|
95
|
+
preparation: z.ZodString;
|
|
96
|
+
status: z.ZodEnum<{
|
|
97
|
+
stale: "stale";
|
|
98
|
+
failed: "failed";
|
|
99
|
+
"not-configured": "not-configured";
|
|
100
|
+
"not-built": "not-built";
|
|
101
|
+
building: "building";
|
|
102
|
+
built: "built";
|
|
103
|
+
checking: "checking";
|
|
104
|
+
ready: "ready";
|
|
105
|
+
"not-ready": "not-ready";
|
|
106
|
+
}>;
|
|
107
|
+
ready: z.ZodBoolean;
|
|
108
|
+
summary: z.ZodString;
|
|
109
|
+
portable_context_path: z.ZodNullable<z.ZodString>;
|
|
110
|
+
latest_compile_run_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
111
|
+
latest_test_run_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
112
|
+
compile: z.ZodNullable<z.ZodObject<{
|
|
113
|
+
gate: z.ZodEnum<{
|
|
114
|
+
"preparation-config": "preparation-config";
|
|
115
|
+
"portable-context": "portable-context";
|
|
116
|
+
"compile-run": "compile-run";
|
|
117
|
+
"readiness-checks": "readiness-checks";
|
|
118
|
+
"source-baseline": "source-baseline";
|
|
119
|
+
"portable-context-check": "portable-context-check";
|
|
120
|
+
"checks-current": "checks-current";
|
|
121
|
+
}>;
|
|
122
|
+
ok: z.ZodBoolean;
|
|
123
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
124
|
+
stale: "stale";
|
|
125
|
+
failed: "failed";
|
|
126
|
+
"not-configured": "not-configured";
|
|
127
|
+
"not-built": "not-built";
|
|
128
|
+
building: "building";
|
|
129
|
+
built: "built";
|
|
130
|
+
checking: "checking";
|
|
131
|
+
ready: "ready";
|
|
132
|
+
"not-ready": "not-ready";
|
|
133
|
+
}>>;
|
|
134
|
+
summary: z.ZodString;
|
|
135
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
136
|
+
run_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
137
|
+
artifact_path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
138
|
+
}, z.core.$strict>>;
|
|
139
|
+
check_results: z.ZodObject<{
|
|
140
|
+
configured: z.ZodNumber;
|
|
141
|
+
fingerprint: z.ZodNullable<z.ZodString>;
|
|
142
|
+
source_files: z.ZodNullable<z.ZodObject<{
|
|
143
|
+
passed: z.ZodNumber;
|
|
144
|
+
total: z.ZodNumber;
|
|
145
|
+
pass_rate: z.ZodNullable<z.ZodNumber>;
|
|
146
|
+
checks_fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
147
|
+
stale: z.ZodDefault<z.ZodBoolean>;
|
|
148
|
+
run_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
149
|
+
run_path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
150
|
+
}, z.core.$strict>>;
|
|
151
|
+
portable_context: z.ZodNullable<z.ZodObject<{
|
|
152
|
+
passed: z.ZodNumber;
|
|
153
|
+
total: z.ZodNumber;
|
|
154
|
+
pass_rate: z.ZodNullable<z.ZodNumber>;
|
|
155
|
+
checks_fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
156
|
+
stale: z.ZodDefault<z.ZodBoolean>;
|
|
157
|
+
run_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
158
|
+
run_path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
159
|
+
}, z.core.$strict>>;
|
|
160
|
+
delta: z.ZodNullable<z.ZodNumber>;
|
|
161
|
+
}, z.core.$strict>;
|
|
162
|
+
checks: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
163
|
+
gate: z.ZodEnum<{
|
|
164
|
+
"preparation-config": "preparation-config";
|
|
165
|
+
"portable-context": "portable-context";
|
|
166
|
+
"compile-run": "compile-run";
|
|
167
|
+
"readiness-checks": "readiness-checks";
|
|
168
|
+
"source-baseline": "source-baseline";
|
|
169
|
+
"portable-context-check": "portable-context-check";
|
|
170
|
+
"checks-current": "checks-current";
|
|
171
|
+
}>;
|
|
172
|
+
ok: z.ZodBoolean;
|
|
173
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
174
|
+
stale: "stale";
|
|
175
|
+
failed: "failed";
|
|
176
|
+
"not-configured": "not-configured";
|
|
177
|
+
"not-built": "not-built";
|
|
178
|
+
building: "building";
|
|
179
|
+
built: "built";
|
|
180
|
+
checking: "checking";
|
|
181
|
+
ready: "ready";
|
|
182
|
+
"not-ready": "not-ready";
|
|
183
|
+
}>>;
|
|
184
|
+
summary: z.ZodString;
|
|
185
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
186
|
+
run_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
187
|
+
artifact_path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
188
|
+
}, z.core.$strict>>>;
|
|
189
|
+
}, z.core.$strict>>;
|
|
35
190
|
export declare const CompiledStageStateSchema: z.ZodObject<{
|
|
36
191
|
contract_type: z.ZodOptional<z.ZodString>;
|
|
37
192
|
status: z.ZodOptional<z.ZodEnum<{
|
|
@@ -512,7 +667,7 @@ export declare const WorkflowImprovementContextSchema: z.ZodObject<{
|
|
|
512
667
|
test_runs: z.ZodNullable<z.ZodString>;
|
|
513
668
|
test_sandboxes: z.ZodNullable<z.ZodString>;
|
|
514
669
|
}, z.core.$strip>;
|
|
515
|
-
|
|
670
|
+
readiness_checks: z.ZodObject<{
|
|
516
671
|
count: z.ZodNumber;
|
|
517
672
|
questions: z.ZodArray<z.ZodObject<{
|
|
518
673
|
id: z.ZodString;
|
|
@@ -655,6 +810,11 @@ export type PreservedShellSnapshot = z.infer<typeof PreservedShellSnapshotSchema
|
|
|
655
810
|
export type WorkflowPackageValidation = z.infer<typeof WorkflowPackageValidationSchema>;
|
|
656
811
|
export type WorkflowImprovementLoopRecord = z.infer<typeof WorkflowImprovementLoopRecordSchema>;
|
|
657
812
|
export type WorkflowImprovementRunLedger = z.infer<typeof WorkflowImprovementRunLedgerSchema>;
|
|
813
|
+
export type ReadinessStatus = z.infer<typeof ReadinessStatusSchema>;
|
|
814
|
+
export type ReadinessGate = z.infer<typeof ReadinessGateSchema>;
|
|
815
|
+
export type ReadinessCheck = z.infer<typeof ReadinessCheckSchema>;
|
|
816
|
+
export type ReadinessTargetResult = z.infer<typeof ReadinessTargetResultSchema>;
|
|
817
|
+
export type ReadinessState = z.infer<typeof ReadinessStateSchema>;
|
|
658
818
|
export type CompiledState = z.infer<typeof CompiledStateSchema>;
|
|
659
819
|
export type ViewSection = z.infer<typeof ViewSectionSchema>;
|
|
660
820
|
export type ViewCard = z.infer<typeof ViewCardSchema>;
|
|
@@ -23,6 +23,92 @@ export const WorkflowZoneRoleSchema = z.enum(["input", "working", "output", "run
|
|
|
23
23
|
export const CompiledStageStatusSchema = z.enum(["idle", "running", "succeeded", "failed"]);
|
|
24
24
|
export const SourceCompiledMaxAttemptsSchema = z.number().int().min(1).max(5);
|
|
25
25
|
export const SourceCompiledMaxLoopsSchema = z.number().int().min(1).max(3);
|
|
26
|
+
export const ReadinessStatusSchema = z.enum([
|
|
27
|
+
"not-configured",
|
|
28
|
+
"not-built",
|
|
29
|
+
"building",
|
|
30
|
+
"built",
|
|
31
|
+
"checking",
|
|
32
|
+
"ready",
|
|
33
|
+
"not-ready",
|
|
34
|
+
"stale",
|
|
35
|
+
"failed",
|
|
36
|
+
]);
|
|
37
|
+
export const ReadinessGateSchema = z.enum([
|
|
38
|
+
"preparation-config",
|
|
39
|
+
"portable-context",
|
|
40
|
+
"compile-run",
|
|
41
|
+
"readiness-checks",
|
|
42
|
+
"source-baseline",
|
|
43
|
+
"portable-context-check",
|
|
44
|
+
"checks-current",
|
|
45
|
+
]);
|
|
46
|
+
export const ReadinessCheckSchema = z.object({
|
|
47
|
+
gate: ReadinessGateSchema,
|
|
48
|
+
ok: z.boolean(),
|
|
49
|
+
status: ReadinessStatusSchema.optional(),
|
|
50
|
+
summary: z.string().min(1),
|
|
51
|
+
detail: z.string().min(1).optional(),
|
|
52
|
+
run_id: z.string().min(1).nullable().optional(),
|
|
53
|
+
artifact_path: z.string().min(1).nullable().optional(),
|
|
54
|
+
}).strict();
|
|
55
|
+
export const ReadinessTargetResultSchema = z.object({
|
|
56
|
+
passed: z.number().int().min(0),
|
|
57
|
+
total: z.number().int().min(0),
|
|
58
|
+
pass_rate: z.number().min(0).max(100).nullable(),
|
|
59
|
+
checks_fingerprint: z.string().min(1).nullable().optional(),
|
|
60
|
+
stale: z.boolean().default(false),
|
|
61
|
+
run_id: z.string().min(1).nullable().optional(),
|
|
62
|
+
run_path: z.string().min(1).nullable().optional(),
|
|
63
|
+
}).strict();
|
|
64
|
+
function normalizeReadinessState(value) {
|
|
65
|
+
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
66
|
+
return value;
|
|
67
|
+
const input = value;
|
|
68
|
+
const output = { ...input };
|
|
69
|
+
if (typeof output.preparation !== "string" && typeof input.dataset === "string") {
|
|
70
|
+
output.preparation = input.dataset;
|
|
71
|
+
}
|
|
72
|
+
delete output.dataset;
|
|
73
|
+
if (Array.isArray(output.checks)) {
|
|
74
|
+
output.checks = output.checks.map((check) => {
|
|
75
|
+
if (!check || typeof check !== "object" || Array.isArray(check))
|
|
76
|
+
return check;
|
|
77
|
+
const normalizedCheck = { ...check };
|
|
78
|
+
if (normalizedCheck.gate === "dataset-config")
|
|
79
|
+
normalizedCheck.gate = "preparation-config";
|
|
80
|
+
return normalizedCheck;
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
if (output.compile && typeof output.compile === "object" && !Array.isArray(output.compile)) {
|
|
84
|
+
const compile = { ...output.compile };
|
|
85
|
+
if (compile.gate === "dataset-config")
|
|
86
|
+
compile.gate = "preparation-config";
|
|
87
|
+
output.compile = compile;
|
|
88
|
+
}
|
|
89
|
+
return output;
|
|
90
|
+
}
|
|
91
|
+
export const ReadinessStateSchema = z.preprocess(normalizeReadinessState, z.object({
|
|
92
|
+
kind: z.literal("interf-readiness-state"),
|
|
93
|
+
version: z.literal(1),
|
|
94
|
+
generated_at: z.string().min(1),
|
|
95
|
+
preparation: z.string().min(1),
|
|
96
|
+
status: ReadinessStatusSchema,
|
|
97
|
+
ready: z.boolean(),
|
|
98
|
+
summary: z.string().min(1),
|
|
99
|
+
portable_context_path: z.string().min(1).nullable(),
|
|
100
|
+
latest_compile_run_id: z.string().min(1).nullable().optional(),
|
|
101
|
+
latest_test_run_id: z.string().min(1).nullable().optional(),
|
|
102
|
+
compile: ReadinessCheckSchema.nullable(),
|
|
103
|
+
check_results: z.object({
|
|
104
|
+
configured: z.number().int().min(0),
|
|
105
|
+
fingerprint: z.string().min(1).nullable(),
|
|
106
|
+
source_files: ReadinessTargetResultSchema.nullable(),
|
|
107
|
+
portable_context: ReadinessTargetResultSchema.nullable(),
|
|
108
|
+
delta: z.number().nullable(),
|
|
109
|
+
}).strict(),
|
|
110
|
+
checks: z.array(ReadinessCheckSchema).default([]),
|
|
111
|
+
}).strict());
|
|
26
112
|
export const CompiledStageStateSchema = z.object({
|
|
27
113
|
contract_type: RuntimeContractTypeSchema.optional(),
|
|
28
114
|
status: CompiledStageStatusSchema.optional(),
|
|
@@ -298,7 +384,7 @@ export const WorkflowImprovementContextSchema = z.object({
|
|
|
298
384
|
test_runs: z.string().nullable(),
|
|
299
385
|
test_sandboxes: z.string().nullable(),
|
|
300
386
|
}),
|
|
301
|
-
|
|
387
|
+
readiness_checks: z.object({
|
|
302
388
|
count: z.number().int().min(0),
|
|
303
389
|
questions: z.array(z.object({
|
|
304
390
|
id: z.string(),
|
|
@@ -9,7 +9,7 @@ export declare function resolveCompiledRawPath(compiledPath: string, config?: {
|
|
|
9
9
|
[x: string]: unknown;
|
|
10
10
|
type: "compiled";
|
|
11
11
|
name: string;
|
|
12
|
-
|
|
12
|
+
method: string;
|
|
13
13
|
checks: {
|
|
14
14
|
question: string;
|
|
15
15
|
id?: string | undefined;
|
|
@@ -25,12 +25,19 @@ export declare function resolveCompiledRawPath(compiledPath: string, config?: {
|
|
|
25
25
|
}[];
|
|
26
26
|
source: {
|
|
27
27
|
path: string;
|
|
28
|
-
dataset_path: string;
|
|
29
28
|
control_path?: string | undefined;
|
|
29
|
+
preparation_path?: string | undefined;
|
|
30
|
+
source_folder_path?: string | undefined;
|
|
31
|
+
dataset_path?: string | undefined;
|
|
30
32
|
};
|
|
31
33
|
about?: string | undefined;
|
|
34
|
+
workflow?: string | undefined;
|
|
32
35
|
max_attempts?: number | undefined;
|
|
33
36
|
max_loops?: number | undefined;
|
|
37
|
+
method_origin?: {
|
|
38
|
+
selected: string;
|
|
39
|
+
local_draft?: boolean | undefined;
|
|
40
|
+
} | undefined;
|
|
34
41
|
workflow_origin?: {
|
|
35
42
|
selected: string;
|
|
36
43
|
local_draft?: boolean | undefined;
|
|
@@ -108,7 +108,7 @@ export function validateResolvedStageAcceptance(dirPath, options) {
|
|
|
108
108
|
return {
|
|
109
109
|
ok: false,
|
|
110
110
|
summary: `Stage acceptance failed for ${options.stageId}: missing workflow schema.`,
|
|
111
|
-
failures: [`Missing
|
|
111
|
+
failures: [`Missing method/${WORKFLOW_SCHEMA_FILE}.`],
|
|
112
112
|
};
|
|
113
113
|
}
|
|
114
114
|
const failures = [];
|
|
@@ -12,7 +12,7 @@ export function buildRuntimeStageContract(options) {
|
|
|
12
12
|
artifacts: {
|
|
13
13
|
reads: [
|
|
14
14
|
"interf.json",
|
|
15
|
-
`
|
|
15
|
+
`method/${WORKFLOW_SCHEMA_FILE}`,
|
|
16
16
|
...(options.extraReadArtifacts ?? []),
|
|
17
17
|
...options.stageReadArtifacts,
|
|
18
18
|
...localSkillDocs,
|
|
@@ -28,7 +28,7 @@ export function buildRuntimeStageContract(options) {
|
|
|
28
28
|
notes: [
|
|
29
29
|
`This is the "${options.stageLabel}" stage for the compiled context "${options.compiledName}".`,
|
|
30
30
|
"The workflow package is the authoritative method layer for this run.",
|
|
31
|
-
`Use \`
|
|
31
|
+
`Use \`method/${WORKFLOW_SCHEMA_FILE}\` as the deterministic context-interface reference for this portable context.`,
|
|
32
32
|
"Honor the declared read and write artifacts instead of inventing a parallel workflow.",
|
|
33
33
|
"Only create or update files that fall under the declared write targets for this stage.",
|
|
34
34
|
"Interf writes `.interf/runtime/` ledgers such as run, state, health, and view-spec files. Read them if needed, but do not create, edit, or replace them in this stage unless the contract explicitly marks a runtime artifact as stage-owned.",
|
|
@@ -3,7 +3,7 @@ export function buildStagePrompt(instructions, contractPath, statusLines) {
|
|
|
3
3
|
const modeNotes = instructions.effective_mode === "override"
|
|
4
4
|
? [
|
|
5
5
|
"Local stage instruction docs are authoritative for this run.",
|
|
6
|
-
"
|
|
6
|
+
"Use bundled workflow heuristics only when the stage contract explicitly permits them.",
|
|
7
7
|
"Interf still enforces the same required reads, writes, verifier outputs, and runtime reconciliation at stage close.",
|
|
8
8
|
]
|
|
9
9
|
: instructions.effective_mode === "extend"
|
|
@@ -15,15 +15,15 @@ export function buildStagePrompt(instructions, contractPath, statusLines) {
|
|
|
15
15
|
"Use the current compiled workflow docs as the default workflow for this run.",
|
|
16
16
|
];
|
|
17
17
|
return [
|
|
18
|
-
`Interf
|
|
18
|
+
`Interf Method stage docs: method/compile/stages/${stageSkillDir}/`,
|
|
19
19
|
"",
|
|
20
20
|
"This is an automated Interf stage run, not an open-ended chat session.",
|
|
21
21
|
"The user has already invoked this stage through the Interf CLI. Execute it now.",
|
|
22
22
|
"Do not ask what the user wants, offer help, list tools, or wait for another instruction.",
|
|
23
23
|
`Read \`${contractPath}\` first. It is the authoritative contract for this stage.`,
|
|
24
|
-
"If `runtime/paths.json` exists in this shell, read it next. It maps
|
|
24
|
+
"If `runtime/paths.json` exists in this shell, read it next. It maps Method zone ids onto the shell-local `inputs/` and `outputs/` mounts for this stage.",
|
|
25
25
|
"For file-zone mounts, `runtime/paths.json` also gives the exact file path inside the `inputs/` or `outputs/` mount root.",
|
|
26
|
-
"Honor the contract's counts, artifact paths, and policies instead of inventing another
|
|
26
|
+
"Honor the contract's counts, artifact paths, and policies instead of inventing another Method.",
|
|
27
27
|
"Read only the files named by the contract's `artifacts.reads` list plus any paths they explicitly direct you to open.",
|
|
28
28
|
"Prefer direct file-reading and search tools over shell commands when you inspect inputs, docs, or generated outputs.",
|
|
29
29
|
"Do not use shell helpers like `cat`, `sed`, `ls`, or `find` for routine file inspection if a native read/search tool can do the same job.",
|
|
@@ -33,8 +33,8 @@ export function buildStagePrompt(instructions, contractPath, statusLines) {
|
|
|
33
33
|
"If a contract-listed output file does not exist yet, create it in one whole-file write. Do not attempt patch-style edits against a missing runtime path.",
|
|
34
34
|
"Stay inside the current compiled context. Do not try to open repo docs, repo source files, or other paths outside the compiled context unless the stage contract explicitly requires them.",
|
|
35
35
|
instructions.effective_mode === "override"
|
|
36
|
-
? "Do not depend on any repo-root or globally installed skill cache for this run. Local stage instruction docs are the primary
|
|
37
|
-
: "Do not depend on any repo-root or globally installed skill cache for this run. Use the current compiled
|
|
36
|
+
? "Do not depend on any repo-root or globally installed skill cache for this run. Local stage instruction docs are the primary Method layer for this run."
|
|
37
|
+
: "Do not depend on any repo-root or globally installed skill cache for this run. Use the current compiled Method docs and the contract as the default behavior.",
|
|
38
38
|
...modeNotes,
|
|
39
39
|
"Do not narrate intentions, plans, or reasoning to the user.",
|
|
40
40
|
"Only emit user-visible updates that begin with STATUS:, DONE:, BLOCKED:, or ERROR:.",
|
|
@@ -6,7 +6,7 @@ import { parseJsonFrontmatter } from "../shared/parse.js";
|
|
|
6
6
|
import { loadRuntimeRun } from "./runtime.js";
|
|
7
7
|
import { initCompiledState, loadState, refreshCompiledArtifacts, saveState, } from "./state.js";
|
|
8
8
|
import { compiledInventoryFromEntries } from "./runtime-inventory.js";
|
|
9
|
-
import { compiledRuntimeRoot } from "./compiled-paths.js";
|
|
9
|
+
import { compiledRuntimeRoot, workflowPackagePathForCompiled } from "./compiled-paths.js";
|
|
10
10
|
import { extractSynthAbstract, isOutputMarkdownFile } from "./validate.js";
|
|
11
11
|
function readActiveRunStartedAtMs(dirPath) {
|
|
12
12
|
const run = loadRuntimeRun(dirPath);
|
|
@@ -93,7 +93,7 @@ function buildInventoryMetadata(options) {
|
|
|
93
93
|
return metadata;
|
|
94
94
|
}
|
|
95
95
|
function buildStageInventoryEntries(dirPath, stage) {
|
|
96
|
-
const schema = readCompiledSchemaFile(
|
|
96
|
+
const schema = readCompiledSchemaFile(workflowPackagePathForCompiled(dirPath));
|
|
97
97
|
if (!schema)
|
|
98
98
|
return [];
|
|
99
99
|
const readableInputZones = stage.reads
|
|
@@ -155,7 +155,7 @@ export function reconcileCompiledStageRun(dirPath, stage) {
|
|
|
155
155
|
const startedAtMs = readActiveRunStartedAtMs(dirPath);
|
|
156
156
|
if (startedAtMs === null)
|
|
157
157
|
return false;
|
|
158
|
-
const schema = readCompiledSchemaFile(
|
|
158
|
+
const schema = readCompiledSchemaFile(workflowPackagePathForCompiled(dirPath));
|
|
159
159
|
if (!schema)
|
|
160
160
|
return false;
|
|
161
161
|
const writeZones = stage.writes
|
|
@@ -49,6 +49,7 @@ export async function runExecutorStage(options) {
|
|
|
49
49
|
eventLogPath: eventLogPath(options.compiledPath, startedRun.run.run_id),
|
|
50
50
|
statusLogPath: statusLogPath(options.compiledPath, startedRun.run.run_id),
|
|
51
51
|
completionCheck: options.completionCheck,
|
|
52
|
+
onStatus: options.onStatus,
|
|
52
53
|
});
|
|
53
54
|
finalizeRuntimeRun(options.compiledPath, code);
|
|
54
55
|
return code;
|
|
@@ -63,6 +64,7 @@ export async function runExecutorSummarizeStage(options) {
|
|
|
63
64
|
eventLogPath: eventLogPath(options.compiledPath, startedRun.run.run_id),
|
|
64
65
|
statusLogPath: statusLogPath(options.compiledPath, startedRun.run.run_id),
|
|
65
66
|
completionCheck: options.completionCheck,
|
|
67
|
+
onStatus: options.onStatus,
|
|
66
68
|
});
|
|
67
69
|
const timer = setInterval(() => {
|
|
68
70
|
const currentSummaryCount = countFilesRecursive(join(options.compiledPath, "summaries"));
|
|
@@ -79,6 +81,7 @@ export async function runExecutorSummarizeStage(options) {
|
|
|
79
81
|
summary: `${options.stageLabel} ${completed}/${options.targetCount} source files into summaries.`,
|
|
80
82
|
});
|
|
81
83
|
console.log(chalk.dim(` STATUS: wrote ${completed}/${options.targetCount} summaries`));
|
|
84
|
+
options.onStatus?.(`STATUS: wrote ${completed}/${options.targetCount} summaries`);
|
|
82
85
|
}, 10000);
|
|
83
86
|
try {
|
|
84
87
|
const code = await progressPromise;
|
|
@@ -16,6 +16,7 @@ export interface RuntimeStageExecutionOptions {
|
|
|
16
16
|
contract: RuntimeStageContractDraft;
|
|
17
17
|
buildPrompt: (contractPath: string) => string;
|
|
18
18
|
completionCheck?: (() => boolean) | null;
|
|
19
|
+
onStatus?: (line: string) => void;
|
|
19
20
|
}
|
|
20
21
|
export interface RuntimeSummarizeExecutionOptions extends RuntimeStageExecutionOptions {
|
|
21
22
|
startingSummaryCount: number;
|
|
@@ -71,7 +71,7 @@ export function normalizeCompiledViewSpec(existing, defaults) {
|
|
|
71
71
|
function buildDefaultCompiledViewSpec(dirPath, compiledName, generatedAt) {
|
|
72
72
|
const config = readInterfConfig(dirPath);
|
|
73
73
|
const workflowId = resolveRequiredCompiledWorkflowFromConfig(config, `.interf/interf.json for ${dirPath}`);
|
|
74
|
-
const workflow = getActiveCompiledWorkflow(dirPath
|
|
74
|
+
const workflow = getActiveCompiledWorkflow(dirPath);
|
|
75
75
|
const schema = readCompiledSchemaFile(workflowPackagePathForCompiled(dirPath));
|
|
76
76
|
const outputDocumentPaths = (schema?.zones ?? [])
|
|
77
77
|
.filter((zone) => zone.role === "output" && zone.kind !== "runtime")
|
|
@@ -97,7 +97,7 @@ function buildDefaultCompiledViewSpec(dirPath, compiledName, generatedAt) {
|
|
|
97
97
|
...(outputDocumentPaths.length > 0
|
|
98
98
|
? [{ id: "outputs", type: "documents", title: "Output Zones", paths: outputDocumentPaths }]
|
|
99
99
|
: []),
|
|
100
|
-
{ id: "
|
|
100
|
+
{ id: "method", type: "documents", title: "Method Docs", paths: ["method/README.md", ...workflow.stages.map((stage) => `method/compile/stages/${stage.skillDir}`)] },
|
|
101
101
|
],
|
|
102
102
|
};
|
|
103
103
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { existsSync } from "node:fs";
|
|
2
|
-
import { join } from "node:path";
|
|
3
2
|
import { discoverSourceFiles } from "./discovery.js";
|
|
4
3
|
import { WORKFLOW_SCHEMA_FILE, compiledZoneAbsolutePath, findCompiledSchemaZone, readCompiledSchemaFile, workflowSchemaExists, } from "./compiled-schema.js";
|
|
5
4
|
import { resolveSourceFolderPath } from "../project-model/interf-detect.js";
|
|
@@ -10,7 +9,10 @@ import { validateResolvedStageAcceptance, stageRecordFromState } from "./runtime
|
|
|
10
9
|
import { getActiveCompiledWorkflow, resolveRequiredCompiledWorkflowFromConfig, } from "../workflow-package/workflow-definitions.js";
|
|
11
10
|
import { listFilesRecursive } from "../shared/filesystem.js";
|
|
12
11
|
function workflowSchemaPresent(dirPath) {
|
|
13
|
-
return workflowSchemaExists(
|
|
12
|
+
return workflowSchemaExists(workflowPackagePathForCompiled(dirPath));
|
|
13
|
+
}
|
|
14
|
+
function workflowJsonPresent(dirPath) {
|
|
15
|
+
return existsSync(workflowPackagePathForCompiled(dirPath) + "/workflow.json");
|
|
14
16
|
}
|
|
15
17
|
function countZoneArtifacts(compiledPath, zonePath, kind) {
|
|
16
18
|
const absolutePath = compiledZoneAbsolutePath(compiledPath, { path: zonePath });
|
|
@@ -28,7 +30,7 @@ function readWorkflowContext(dirPath) {
|
|
|
28
30
|
let workflow = null;
|
|
29
31
|
if (workflowId) {
|
|
30
32
|
try {
|
|
31
|
-
workflow = getActiveCompiledWorkflow(dirPath
|
|
33
|
+
workflow = getActiveCompiledWorkflow(dirPath);
|
|
32
34
|
}
|
|
33
35
|
catch {
|
|
34
36
|
workflow = null;
|
|
@@ -85,7 +87,7 @@ export function validateCompiled(dirPath) {
|
|
|
85
87
|
config_present: context.config.present,
|
|
86
88
|
config_valid: context.config.valid,
|
|
87
89
|
config_type_match: context.config.typeMatch(),
|
|
88
|
-
workflow_present:
|
|
90
|
+
workflow_present: workflowJsonPresent(dirPath),
|
|
89
91
|
workflow_valid: context.workflow !== null,
|
|
90
92
|
schema_present: workflowSchemaPresent(dirPath),
|
|
91
93
|
schema_valid: context.schema !== null,
|
|
@@ -97,7 +99,7 @@ export function validateCompiledStage(dirPath, stageId) {
|
|
|
97
99
|
config_present: context.config.present,
|
|
98
100
|
config_valid: context.config.valid,
|
|
99
101
|
config_type_match: context.config.typeMatch(),
|
|
100
|
-
workflow_present:
|
|
102
|
+
workflow_present: workflowJsonPresent(dirPath),
|
|
101
103
|
workflow_valid: context.workflow !== null,
|
|
102
104
|
schema_present: workflowSchemaPresent(dirPath),
|
|
103
105
|
schema_valid: context.schema !== null,
|
|
@@ -110,13 +112,13 @@ export function validateCompiledStage(dirPath, stageId) {
|
|
|
110
112
|
else if (!checks.config_type_match)
|
|
111
113
|
errors.push("Config is not a compiled context.");
|
|
112
114
|
if (!checks.workflow_present)
|
|
113
|
-
errors.push("Missing .interf/
|
|
115
|
+
errors.push("Missing .interf/method/workflow.json.");
|
|
114
116
|
else if (!checks.workflow_valid)
|
|
115
117
|
errors.push("Could not load the active workflow package.");
|
|
116
118
|
if (!checks.schema_present)
|
|
117
|
-
errors.push(`Missing .interf/
|
|
119
|
+
errors.push(`Missing .interf/method/${WORKFLOW_SCHEMA_FILE}.`);
|
|
118
120
|
else if (!checks.schema_valid)
|
|
119
|
-
errors.push(`Could not parse .interf/
|
|
121
|
+
errors.push(`Could not parse .interf/method/${WORKFLOW_SCHEMA_FILE}.`);
|
|
120
122
|
const workflowStage = context.workflow?.stages.find((stage) => stage.id === stageId) ?? null;
|
|
121
123
|
checks.stage_present = workflowStage !== null;
|
|
122
124
|
if (!checks.stage_present) {
|
|
@@ -179,7 +181,7 @@ export function validateCompiledWorkflow(dirPath) {
|
|
|
179
181
|
config_present: context.config.present,
|
|
180
182
|
config_valid: context.config.valid,
|
|
181
183
|
config_type_match: context.config.typeMatch(),
|
|
182
|
-
workflow_present:
|
|
184
|
+
workflow_present: workflowJsonPresent(dirPath),
|
|
183
185
|
workflow_valid: context.workflow !== null,
|
|
184
186
|
schema_present: workflowSchemaPresent(dirPath),
|
|
185
187
|
schema_valid: context.schema !== null,
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ExecutionBackendKind, InterfRunEvent } from "./lib/schema.js";
|
|
2
|
+
import type { RunEventSink } from "./events.js";
|
|
3
|
+
export interface ExecutionAdapterContext {
|
|
4
|
+
runId: string;
|
|
5
|
+
backend: ExecutionBackendKind;
|
|
6
|
+
events?: RunEventSink;
|
|
7
|
+
}
|
|
8
|
+
export interface ExecutionAdapter<TInput, TResult> {
|
|
9
|
+
kind: ExecutionBackendKind;
|
|
10
|
+
run(input: TInput, context: ExecutionAdapterContext): Promise<TResult>;
|
|
11
|
+
}
|
|
12
|
+
export interface ExecutionEventRecorder {
|
|
13
|
+
record(event: InterfRunEvent): void | Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
export declare const nativeExecutionBackendKind = "native";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const nativeExecutionBackendKind = "native";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type InterfRunEvent } from "./lib/schema.js";
|
|
2
|
+
export interface RunEventSink {
|
|
3
|
+
emit(event: InterfRunEvent): void | Promise<void>;
|
|
4
|
+
}
|
|
5
|
+
export declare const nullRunEventSink: RunEventSink;
|
|
6
|
+
export declare function parseInterfRunEvent(value: unknown): InterfRunEvent;
|
|
7
|
+
export declare function createRunEventId(prefix?: string): string;
|
|
8
|
+
export declare function createRunEventTimestamp(date?: Date): string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { InterfRunEventSchema, } from "./lib/schema.js";
|
|
2
|
+
export const nullRunEventSink = {
|
|
3
|
+
emit() {
|
|
4
|
+
// Intentionally empty. Callers can depend on an event sink without
|
|
5
|
+
// requiring a service process.
|
|
6
|
+
},
|
|
7
|
+
};
|
|
8
|
+
export function parseInterfRunEvent(value) {
|
|
9
|
+
return InterfRunEventSchema.parse(value);
|
|
10
|
+
}
|
|
11
|
+
export function createRunEventId(prefix = "event") {
|
|
12
|
+
return `${prefix}-${Date.now()}-${Math.random().toString(36).slice(2, 10)}`;
|
|
13
|
+
}
|
|
14
|
+
export function createRunEventTimestamp(date = new Date()) {
|
|
15
|
+
return date.toISOString();
|
|
16
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * as schema from "./lib/schema.js";
|
|
2
|
+
export * as events from "./events.js";
|
|
3
|
+
export * as adapters from "./adapters.js";
|
|
4
|
+
export type { ArtifactRef, ArtifactRole, CompileRun, CompileRunStatus, ExecutionBackendKind, InterfRunEvent, ObservableRunMetric, ObservableRunStatus, ObservableRunType, ProofCheck, ProofRecord, RunObservability, StageRun, StageRunContract, StageRunLogs, StageRunStatus, WorkflowTrace, WorkflowTraceEvent, WorkflowTraceEventType, WorkflowTraceRun, WorkflowTraceRunStatus, WorkflowTraceStreamChunk, WorkflowTraceStructuredError, } from "./lib/schema.js";
|
|
5
|
+
export { ArtifactRefSchema, ArtifactRoleSchema, CompileRunSchema, CompileRunStatusSchema, ExecutionBackendKindSchema, InterfRunEventSchema, LogAppendedEventSchema, ObservableRunMetricSchema, ObservableRunStatusSchema, ObservableRunTypeSchema, ProofCheckSchema, ProofRecordSchema, RunObservabilitySchema, StageRunSchema, StageRunContractSchema, StageRunLogsSchema, StageRunStatusSchema, WorkflowTraceEventSchema, WorkflowTraceEventTypeSchema, WorkflowTraceRunSchema, WorkflowTraceRunStatusSchema, WorkflowTraceSchema, WorkflowTraceStreamChunkSchema, WorkflowTraceStructuredErrorSchema, } from "./lib/schema.js";
|
|
6
|
+
export type { ExecutionAdapter, ExecutionAdapterContext, ExecutionEventRecorder, } from "./adapters.js";
|
|
7
|
+
export { nativeExecutionBackendKind, } from "./adapters.js";
|
|
8
|
+
export type { RunEventSink, } from "./events.js";
|
|
9
|
+
export { createRunEventId, createRunEventTimestamp, nullRunEventSink, parseInterfRunEvent, } from "./events.js";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * as schema from "./lib/schema.js";
|
|
2
|
+
export * as events from "./events.js";
|
|
3
|
+
export * as adapters from "./adapters.js";
|
|
4
|
+
export { ArtifactRefSchema, ArtifactRoleSchema, CompileRunSchema, CompileRunStatusSchema, ExecutionBackendKindSchema, InterfRunEventSchema, LogAppendedEventSchema, ObservableRunMetricSchema, ObservableRunStatusSchema, ObservableRunTypeSchema, ProofCheckSchema, ProofRecordSchema, RunObservabilitySchema, StageRunSchema, StageRunContractSchema, StageRunLogsSchema, StageRunStatusSchema, WorkflowTraceEventSchema, WorkflowTraceEventTypeSchema, WorkflowTraceRunSchema, WorkflowTraceRunStatusSchema, WorkflowTraceSchema, WorkflowTraceStreamChunkSchema, WorkflowTraceStructuredErrorSchema, } from "./lib/schema.js";
|
|
5
|
+
export { nativeExecutionBackendKind, } from "./adapters.js";
|
|
6
|
+
export { createRunEventId, createRunEventTimestamp, nullRunEventSink, parseInterfRunEvent, } from "./events.js";
|