@interf/compiler 0.9.1 → 0.9.3
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 +9 -9
- package/agent-skills/interf-actions/SKILL.md +3 -0
- package/agent-skills/interf-actions/references/cli.md +13 -13
- package/{builtin-workflows/interf → builtin-methods/interf-default}/README.md +2 -2
- package/builtin-methods/interf-default/improve/SKILL.md +18 -0
- package/{builtin-workflows/interf/workflow.json → builtin-methods/interf-default/method.json} +4 -4
- package/{builtin-workflows/interf/workflow.schema.json → builtin-methods/interf-default/method.schema.json} +2 -2
- package/dist/cli/commands/check-draft.d.ts +6 -6
- package/dist/cli/commands/check-draft.js +5 -5
- package/dist/cli/commands/compile-controller.d.ts +7 -7
- package/dist/cli/commands/compile-controller.js +35 -38
- package/dist/cli/commands/compile.d.ts +3 -3
- package/dist/cli/commands/compile.js +23 -21
- package/dist/cli/commands/compiled-flow.d.ts +11 -11
- package/dist/cli/commands/compiled-flow.js +33 -30
- package/dist/cli/commands/create-method-wizard.d.ts +76 -0
- package/dist/cli/commands/{create-workflow-wizard.js → create-method-wizard.js} +153 -163
- package/dist/cli/commands/create.d.ts +3 -3
- package/dist/cli/commands/create.js +44 -45
- package/dist/cli/commands/default.js +1 -1
- package/dist/cli/commands/executor-flow.d.ts +6 -6
- package/dist/cli/commands/executor-flow.js +1 -1
- package/dist/cli/commands/init.d.ts +2 -2
- package/dist/cli/commands/init.js +139 -118
- package/dist/cli/commands/list.js +11 -10
- package/dist/cli/commands/preparation-selection.d.ts +3 -3
- package/dist/cli/commands/source-config-wizard.d.ts +9 -9
- package/dist/cli/commands/source-config-wizard.js +43 -43
- package/dist/cli/commands/status.js +36 -9
- package/dist/cli/commands/test-flow.d.ts +15 -15
- package/dist/cli/commands/test-flow.js +29 -219
- package/dist/cli/commands/test.d.ts +2 -2
- package/dist/cli/commands/test.js +50 -51
- package/dist/cli/commands/verify.js +7 -7
- package/dist/cli/commands/web.js +41 -28
- package/dist/compiler-ui/404.html +1 -0
- package/dist/compiler-ui/__next.__PAGE__.txt +10 -0
- package/dist/compiler-ui/__next._full.txt +20 -0
- package/dist/compiler-ui/__next._head.txt +5 -0
- package/dist/compiler-ui/__next._index.txt +5 -0
- package/dist/compiler-ui/__next._tree.txt +5 -0
- package/dist/compiler-ui/_next/static/chunks/06yhdspx~ca5-.js +5 -0
- package/{apps/compiler-ui/.next/static/chunks/13g~4mamjft.c.css → dist/compiler-ui/_next/static/chunks/0c9mu7yldxyyg.css} +1 -1
- package/{apps/compiler-ui/.next/static/chunks/0fgt_8knmicoz.js → dist/compiler-ui/_next/static/chunks/15mks7ry_cupt.js} +15 -21
- package/{apps/compiler-ui/.next/static/chunks/turbopack-109rtik40vwh5.js → dist/compiler-ui/_next/static/chunks/turbopack-0.uq1k8c0j4s..js} +1 -1
- package/dist/compiler-ui/_not-found/__next._full.txt +15 -0
- package/dist/compiler-ui/_not-found/__next._head.txt +5 -0
- package/dist/compiler-ui/_not-found/__next._index.txt +5 -0
- package/dist/compiler-ui/_not-found/__next._not-found.__PAGE__.txt +5 -0
- package/dist/compiler-ui/_not-found/__next._not-found.txt +5 -0
- package/dist/compiler-ui/_not-found/__next._tree.txt +2 -0
- package/dist/compiler-ui/_not-found.html +1 -0
- package/dist/compiler-ui/_not-found.txt +15 -0
- package/{apps/compiler-ui/.next/server/app → dist/compiler-ui}/index.html +1 -1
- package/dist/compiler-ui/index.txt +20 -0
- package/dist/index.d.ts +8 -6
- package/dist/index.js +5 -3
- package/dist/packages/agents/index.d.ts +1 -1
- package/dist/packages/agents/lib/args.d.ts +2 -2
- package/dist/packages/agents/lib/compiled-bootstrap.js +7 -6
- package/dist/packages/agents/lib/execution-profile.d.ts +5 -5
- package/dist/packages/agents/lib/execution-profile.js +7 -6
- package/dist/packages/agents/lib/executors.d.ts +13 -13
- package/dist/packages/agents/lib/preflight.d.ts +1 -0
- package/dist/packages/agents/lib/preflight.js +32 -9
- package/dist/packages/agents/lib/shells.d.ts +25 -24
- package/dist/packages/agents/lib/shells.js +161 -154
- package/dist/packages/agents/lib/types.d.ts +2 -2
- package/dist/packages/compiler/artifact-counts.d.ts +1 -0
- package/dist/packages/compiler/artifact-counts.js +30 -0
- package/dist/packages/compiler/compiled-paths.d.ts +4 -7
- package/dist/packages/compiler/compiled-paths.js +9 -15
- package/dist/packages/compiler/compiled-pipeline.d.ts +11 -12
- package/dist/packages/compiler/compiled-pipeline.js +22 -22
- package/dist/packages/compiler/compiled-schema.d.ts +20 -20
- package/dist/packages/compiler/compiled-schema.js +29 -29
- package/dist/packages/compiler/compiled-stage-plan.d.ts +4 -4
- package/dist/packages/compiler/compiled-stage-plan.js +8 -8
- package/dist/packages/compiler/compiled-stage-runner.d.ts +5 -5
- package/dist/packages/compiler/compiled-stage-runner.js +7 -7
- package/dist/packages/compiler/compiled-target.d.ts +5 -5
- package/dist/packages/compiler/compiled-target.js +5 -5
- package/dist/packages/compiler/index.d.ts +3 -3
- package/dist/packages/compiler/index.js +2 -2
- package/dist/packages/compiler/lib/schema.d.ts +62 -247
- package/dist/packages/compiler/lib/schema.js +56 -174
- package/dist/packages/compiler/{workflows.d.ts → method-runs.d.ts} +4 -4
- package/dist/packages/compiler/{workflows.js → method-runs.js} +4 -3
- package/dist/packages/compiler/raw-snapshot.d.ts +0 -7
- package/dist/packages/compiler/raw-snapshot.js +0 -1
- package/dist/packages/compiler/reset.js +3 -3
- package/dist/packages/compiler/runtime-acceptance.js +9 -16
- package/dist/packages/compiler/runtime-contracts.js +9 -9
- package/dist/packages/compiler/runtime-prompt.js +4 -4
- package/dist/packages/compiler/runtime-reconcile.d.ts +2 -2
- package/dist/packages/compiler/runtime-reconcile.js +3 -3
- package/dist/packages/compiler/runtime-runs.js +9 -9
- package/dist/packages/compiler/runtime-types.d.ts +8 -7
- package/dist/packages/compiler/state-health.js +26 -35
- package/dist/packages/compiler/state-view.js +6 -6
- package/dist/packages/compiler/validate-compiled.d.ts +5 -5
- package/dist/packages/compiler/validate-compiled.js +56 -64
- package/dist/packages/compiler/validate.d.ts +2 -2
- package/dist/packages/compiler/validate.js +22 -14
- package/dist/packages/contracts/index.d.ts +2 -0
- package/dist/packages/contracts/index.js +1 -0
- package/dist/packages/contracts/lib/schema.d.ts +205 -0
- package/dist/packages/contracts/lib/schema.js +101 -0
- package/dist/packages/execution/index.d.ts +2 -2
- package/dist/packages/execution/index.js +1 -1
- package/dist/packages/execution/lib/schema.d.ts +80 -83
- package/dist/packages/execution/lib/schema.js +25 -48
- package/dist/packages/local-service/action-values.d.ts +0 -1
- package/dist/packages/local-service/action-values.js +0 -1
- package/dist/packages/local-service/client.d.ts +4 -4
- package/dist/packages/local-service/client.js +4 -4
- package/dist/packages/local-service/index.d.ts +3 -3
- package/dist/packages/local-service/index.js +2 -2
- package/dist/packages/local-service/lib/schema.d.ts +536 -974
- package/dist/packages/local-service/lib/schema.js +43 -160
- package/dist/packages/local-service/run-observability.d.ts +6 -0
- package/dist/packages/local-service/run-observability.js +592 -0
- package/dist/packages/local-service/runtime.d.ts +19 -23
- package/dist/packages/local-service/runtime.js +302 -880
- package/dist/packages/local-service/server.d.ts +1 -0
- package/dist/packages/local-service/server.js +25 -20
- package/dist/packages/method-authoring/index.d.ts +4 -0
- package/dist/packages/method-authoring/index.js +4 -0
- package/dist/packages/{workflow-authoring/lib/workflow-edit-utils.d.ts → method-authoring/lib/method-edit-utils.d.ts} +3 -3
- package/dist/packages/method-authoring/method-authoring.d.ts +24 -0
- package/dist/packages/method-authoring/method-authoring.js +116 -0
- package/dist/packages/method-authoring/method-edit-session.d.ts +18 -0
- package/dist/packages/method-authoring/method-edit-session.js +125 -0
- package/dist/packages/method-authoring/method-improvement.d.ts +23 -0
- package/dist/packages/{workflow-authoring/workflow-improvement.js → method-authoring/method-improvement.js} +63 -63
- package/dist/packages/{workflow-package/builtin-compiled-workflow.d.ts → method-package/builtin-compiled-method.d.ts} +1 -1
- package/dist/packages/{workflow-package/builtin-compiled-workflow.js → method-package/builtin-compiled-method.js} +17 -17
- package/dist/packages/{workflow-package → method-package}/context-interface.d.ts +12 -12
- package/dist/packages/{workflow-package → method-package}/context-interface.js +19 -19
- package/dist/packages/method-package/index.d.ts +11 -0
- package/dist/packages/method-package/index.js +11 -0
- package/dist/packages/method-package/interf-method-package.d.ts +31 -0
- package/dist/packages/{workflow-package/interf-workflow-package.js → method-package/interf-method-package.js} +145 -145
- package/dist/packages/{workflow-package → method-package}/lib/package-root.js +1 -1
- package/dist/packages/method-package/local-methods.d.ts +64 -0
- package/dist/packages/method-package/local-methods.js +466 -0
- package/dist/packages/method-package/method-definitions.d.ts +83 -0
- package/dist/packages/method-package/method-definitions.js +205 -0
- package/dist/packages/{workflow-package/workflow-helpers.d.ts → method-package/method-helpers.d.ts} +10 -10
- package/dist/packages/{workflow-package/workflow-helpers.js → method-package/method-helpers.js} +22 -26
- package/dist/packages/method-package/method-review-paths.d.ts +10 -0
- package/dist/packages/{workflow-package/workflow-review-paths.js → method-package/method-review-paths.js} +4 -4
- package/dist/packages/{workflow-package/workflow-stage-runner.d.ts → method-package/method-stage-runner.d.ts} +12 -11
- package/dist/packages/{workflow-package/workflow-stage-runner.js → method-package/method-stage-runner.js} +6 -6
- package/dist/packages/methods/index.d.ts +2 -0
- package/dist/packages/methods/index.js +2 -0
- package/dist/packages/methods/method-resolution.d.ts +6 -0
- package/dist/packages/methods/method-resolution.js +7 -0
- package/dist/packages/project-model/index.d.ts +1 -4
- package/dist/packages/project-model/index.js +0 -3
- package/dist/packages/project-model/interf-detect.d.ts +1 -5
- package/dist/packages/project-model/interf-detect.js +7 -18
- package/dist/packages/project-model/interf-scaffold.d.ts +2 -2
- package/dist/packages/project-model/interf-scaffold.js +38 -39
- package/dist/packages/project-model/interf.d.ts +1 -2
- package/dist/packages/project-model/interf.js +1 -2
- package/dist/packages/project-model/lib/schema.d.ts +2 -66
- package/dist/packages/project-model/lib/schema.js +5 -23
- package/dist/packages/project-model/project-paths.d.ts +9 -10
- package/dist/packages/project-model/project-paths.js +14 -17
- package/dist/packages/project-model/source-config.d.ts +11 -18
- package/dist/packages/project-model/source-config.js +42 -60
- package/dist/packages/project-model/source-folders.d.ts +4 -4
- package/dist/packages/project-model/source-folders.js +10 -10
- package/dist/packages/testing/index.d.ts +2 -2
- package/dist/packages/testing/index.js +1 -1
- package/dist/packages/testing/lib/schema.d.ts +11 -11
- package/dist/packages/testing/lib/schema.js +8 -9
- package/dist/packages/testing/readiness-check-run.d.ts +67 -0
- package/dist/packages/testing/readiness-check-run.js +258 -0
- package/dist/packages/testing/test-execution.d.ts +3 -3
- package/dist/packages/testing/test-execution.js +5 -5
- package/dist/packages/testing/test-paths.js +6 -6
- package/dist/packages/testing/test-profile-presets.js +2 -2
- package/dist/packages/testing/test-sandbox.js +10 -11
- package/dist/packages/testing/test-targets.d.ts +1 -1
- package/dist/packages/testing/test-targets.js +8 -7
- package/dist/packages/testing/test-types.d.ts +1 -1
- package/package.json +16 -33
- package/apps/compiler-ui/.next/static/chunks/0ti_66mx7~w2-.js +0 -5
- package/builtin-workflows/interf/improve/SKILL.md +0 -18
- package/dist/cli/commands/create-workflow-wizard.d.ts +0 -76
- package/dist/packages/project-model/compiled-paths.d.ts +0 -1
- package/dist/packages/project-model/compiled-paths.js +0 -1
- package/dist/packages/project-model/compiled-raw.d.ts +0 -1
- package/dist/packages/project-model/compiled-raw.js +0 -1
- package/dist/packages/project-model/compiled-reset.d.ts +0 -1
- package/dist/packages/project-model/compiled-reset.js +0 -1
- package/dist/packages/shared/index.d.ts +0 -7
- package/dist/packages/shared/index.js +0 -7
- package/dist/packages/shared/util.d.ts +0 -3
- package/dist/packages/shared/util.js +0 -3
- package/dist/packages/testing/test-matrices.d.ts +0 -90
- package/dist/packages/testing/test-matrices.js +0 -96
- package/dist/packages/workflow-authoring/index.d.ts +0 -4
- package/dist/packages/workflow-authoring/index.js +0 -4
- package/dist/packages/workflow-authoring/workflow-authoring.d.ts +0 -24
- package/dist/packages/workflow-authoring/workflow-authoring.js +0 -82
- package/dist/packages/workflow-authoring/workflow-edit-session.d.ts +0 -18
- package/dist/packages/workflow-authoring/workflow-edit-session.js +0 -91
- package/dist/packages/workflow-authoring/workflow-improvement.d.ts +0 -23
- package/dist/packages/workflow-package/index.d.ts +0 -11
- package/dist/packages/workflow-package/index.js +0 -11
- package/dist/packages/workflow-package/interf-workflow-package.d.ts +0 -31
- package/dist/packages/workflow-package/local-workflows.d.ts +0 -64
- package/dist/packages/workflow-package/local-workflows.js +0 -457
- package/dist/packages/workflow-package/workflow-definitions.d.ts +0 -82
- package/dist/packages/workflow-package/workflow-definitions.js +0 -211
- package/dist/packages/workflow-package/workflow-review-paths.d.ts +0 -10
- /package/{builtin-workflows/interf → builtin-methods/interf-default}/compile/stages/shape/SKILL.md +0 -0
- /package/{builtin-workflows/interf → builtin-methods/interf-default}/compile/stages/structure/SKILL.md +0 -0
- /package/{builtin-workflows/interf → builtin-methods/interf-default}/compile/stages/summarize/SKILL.md +0 -0
- /package/{builtin-workflows/interf → builtin-methods/interf-default}/use/query/SKILL.md +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/03~yq9q893hmn.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/06z~l3kwb891e.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/08g7lvje.te.u.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/08m7vf5asqlsm.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0_i-3_5l9t2qe.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0b-ywny_j0g~0.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0b52v41o1gixx.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0gpzgsv0w.q~m.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0ilwfezfvu6~-.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0n51hrfoufc7g.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0xxmf45eskdt~.css +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0y5z3t-z1c8ks.js.map +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/14wtz~vq25~qq.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/turbopack-10e~t1yzi4svj.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/turbopack-worker-0sjn--fhq~1cg.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/media/GeistMono_Variable.p.17jn9btb_52pq.woff2 +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/media/Geist_Variable-s.p.0-te~ja_gpvcf.woff2 +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/media/worker.102zas1s52_pf.js +0 -0
- /package/{apps/compiler-ui/.next/static/XWKL548yXD_UOG4ID9G3J → dist/compiler-ui/_next/static/pIZnDsV3Je6hdC3cOsGdK}/_buildManifest.js +0 -0
- /package/{apps/compiler-ui/.next/static/XWKL548yXD_UOG4ID9G3J → dist/compiler-ui/_next/static/pIZnDsV3Je6hdC3cOsGdK}/_clientMiddlewareManifest.js +0 -0
- /package/{apps/compiler-ui/.next/static/XWKL548yXD_UOG4ID9G3J → dist/compiler-ui/_next/static/pIZnDsV3Je6hdC3cOsGdK}/_ssgManifest.js +0 -0
- /package/dist/packages/compiler/{workflow-primitives.d.ts → method-primitives.d.ts} +0 -0
- /package/dist/packages/compiler/{workflow-primitives.js → method-primitives.js} +0 -0
- /package/dist/packages/{workflow-authoring/lib/workflow-edit-utils.js → method-authoring/lib/method-edit-utils.js} +0 -0
- /package/dist/packages/{workflow-package → method-package}/lib/package-root.d.ts +0 -0
- /package/dist/packages/{workflow-package/workflow-stage-policy.d.ts → method-package/method-stage-policy.d.ts} +0 -0
- /package/dist/packages/{workflow-package/workflow-stage-policy.js → method-package/method-stage-policy.js} +0 -0
|
@@ -1,86 +1,9 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { ArtifactRefSchema, CompileRunSchema, CompileRunStatusSchema, InterfRunEventSchema, ProofRecordSchema, RunObservabilitySchema, } from "../../execution/lib/schema.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { SourcePreparationConfigSchema, SourceReadinessCheckSchema, } from "../../project-model/lib/schema.js";
|
|
4
|
+
import { PreparationNameSchema, ReadinessStateSchema, SourceCompiledMaxAttemptsSchema, SourceCompiledMaxLoopsSchema, MethodIdSchema, } from "../../contracts/lib/schema.js";
|
|
5
|
+
import { ReadinessCheckRunSchema, TestRunModeSchema, } from "../../testing/lib/schema.js";
|
|
6
6
|
const JsonObjectSchema = z.record(z.string(), z.unknown());
|
|
7
|
-
function normalizePreparationMethodRequest(value) {
|
|
8
|
-
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
9
|
-
return value;
|
|
10
|
-
const input = value;
|
|
11
|
-
const normalized = { ...input };
|
|
12
|
-
if (normalized.preparation == null || normalized.preparation === "") {
|
|
13
|
-
delete normalized.preparation;
|
|
14
|
-
}
|
|
15
|
-
if (normalized.method == null || normalized.method === "") {
|
|
16
|
-
delete normalized.method;
|
|
17
|
-
}
|
|
18
|
-
if (typeof normalized.preparation !== "string" && typeof input.dataset === "string") {
|
|
19
|
-
normalized.preparation = input.dataset;
|
|
20
|
-
}
|
|
21
|
-
if (typeof normalized.method !== "string" && typeof input.workflow === "string") {
|
|
22
|
-
normalized.method = input.workflow;
|
|
23
|
-
}
|
|
24
|
-
delete normalized.dataset;
|
|
25
|
-
delete normalized.workflow;
|
|
26
|
-
return normalized;
|
|
27
|
-
}
|
|
28
|
-
function normalizePreparationObjectRequest(value) {
|
|
29
|
-
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
30
|
-
return value;
|
|
31
|
-
const input = value;
|
|
32
|
-
const normalized = { ...input };
|
|
33
|
-
if (!normalized.preparation && input.dataset && typeof input.dataset === "object") {
|
|
34
|
-
normalized.preparation = input.dataset;
|
|
35
|
-
}
|
|
36
|
-
delete normalized.dataset;
|
|
37
|
-
return normalized;
|
|
38
|
-
}
|
|
39
|
-
function normalizePublicActionType(value) {
|
|
40
|
-
const normalized = normalizePreparationMethodRequest(value);
|
|
41
|
-
if (!normalized || typeof normalized !== "object" || Array.isArray(normalized)) {
|
|
42
|
-
return normalized;
|
|
43
|
-
}
|
|
44
|
-
const output = { ...normalized };
|
|
45
|
-
if (output.action_type === "dataset-setup")
|
|
46
|
-
output.action_type = "preparation-setup";
|
|
47
|
-
if (output.action_type === "workflow-authoring")
|
|
48
|
-
output.action_type = "method-authoring";
|
|
49
|
-
if (output.action_type === "workflow-improvement")
|
|
50
|
-
output.action_type = "method-improvement";
|
|
51
|
-
for (const key of ["title", "summary", "assistant_message", "command_preview"]) {
|
|
52
|
-
if (output[key] == null || output[key] === "") {
|
|
53
|
-
delete output[key];
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
return output;
|
|
57
|
-
}
|
|
58
|
-
function normalizeWorkflowAuthoringRequest(value) {
|
|
59
|
-
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
60
|
-
return value;
|
|
61
|
-
const input = value;
|
|
62
|
-
const normalized = normalizePreparationMethodRequest(input);
|
|
63
|
-
if (typeof normalized.source_folder_path !== "string" && typeof input.dataset_path === "string") {
|
|
64
|
-
normalized.source_folder_path = input.dataset_path;
|
|
65
|
-
}
|
|
66
|
-
if (typeof normalized.method_id !== "string") {
|
|
67
|
-
if (typeof input.workflow_id === "string")
|
|
68
|
-
normalized.method_id = input.workflow_id;
|
|
69
|
-
else if (typeof normalized.method === "string")
|
|
70
|
-
normalized.method_id = normalized.method;
|
|
71
|
-
}
|
|
72
|
-
if (typeof normalized.base_method_id !== "string" && typeof input.base_workflow_id === "string") {
|
|
73
|
-
normalized.base_method_id = input.base_workflow_id;
|
|
74
|
-
}
|
|
75
|
-
if (typeof normalized.reference_method_id !== "string" && typeof input.reference_workflow_id === "string") {
|
|
76
|
-
normalized.reference_method_id = input.reference_workflow_id;
|
|
77
|
-
}
|
|
78
|
-
delete normalized.dataset_path;
|
|
79
|
-
delete normalized.workflow_id;
|
|
80
|
-
delete normalized.base_workflow_id;
|
|
81
|
-
delete normalized.reference_workflow_id;
|
|
82
|
-
return normalized;
|
|
83
|
-
}
|
|
84
7
|
export const LocalServiceHostSchema = z.string().min(1);
|
|
85
8
|
export const LocalServicePortSchema = z.number().int().min(1).max(65535);
|
|
86
9
|
export const LocalServiceConfigSchema = z.object({
|
|
@@ -107,19 +30,12 @@ export const LocalServiceInstancePointerSchema = z.object({
|
|
|
107
30
|
control_path: z.string().min(1),
|
|
108
31
|
started_at: z.string().min(1),
|
|
109
32
|
}).strict();
|
|
110
|
-
export const DatasetResourceSchema = z.object({
|
|
111
|
-
dataset: SourceDatasetConfigSchema,
|
|
112
|
-
portable_context_path: z.string().min(1).nullable(),
|
|
113
|
-
readiness: ReadinessStateSchema,
|
|
114
|
-
latest_compile_run_id: z.string().min(1).nullable().optional(),
|
|
115
|
-
latest_test_run_id: z.string().min(1).nullable().optional(),
|
|
116
|
-
}).strict();
|
|
117
33
|
export const PreparationReadinessStateSchema = ReadinessStateSchema;
|
|
118
34
|
export const PortableContextMappingSchema = z.object({
|
|
119
35
|
preparation: PreparationNameSchema,
|
|
120
36
|
path: z.string().min(1).nullable(),
|
|
121
37
|
exists: z.boolean(),
|
|
122
|
-
method_id:
|
|
38
|
+
method_id: MethodIdSchema.nullable(),
|
|
123
39
|
latest_compile_run_id: z.string().min(1).nullable(),
|
|
124
40
|
latest_test_run_id: z.string().min(1).nullable(),
|
|
125
41
|
}).strict();
|
|
@@ -132,7 +48,7 @@ export const PreparationResourceSchema = z.object({
|
|
|
132
48
|
name: PreparationNameSchema,
|
|
133
49
|
preparation: SourcePreparationConfigSchema,
|
|
134
50
|
source_path: z.string().min(1),
|
|
135
|
-
method_id:
|
|
51
|
+
method_id: MethodIdSchema.nullable(),
|
|
136
52
|
checks: z.array(SourceReadinessCheckSchema).default([]),
|
|
137
53
|
portable_context: PortableContextMappingSchema,
|
|
138
54
|
portable_context_path: z.string().min(1).nullable(),
|
|
@@ -141,34 +57,15 @@ export const PreparationResourceSchema = z.object({
|
|
|
141
57
|
latest_compile_run_id: z.string().min(1).nullable().optional(),
|
|
142
58
|
latest_test_run_id: z.string().min(1).nullable().optional(),
|
|
143
59
|
}).strict();
|
|
144
|
-
export const WorkflowPackageResourceSchema = z.object({
|
|
145
|
-
id: WorkflowIdSchema,
|
|
146
|
-
path: z.string().min(1),
|
|
147
|
-
label: z.string().min(1).optional(),
|
|
148
|
-
hint: z.string().min(1).optional(),
|
|
149
|
-
source_kind: z.enum(["builtin", "local"]).default("local"),
|
|
150
|
-
built_in: z.boolean().default(false),
|
|
151
|
-
active_for_datasets: z.array(DatasetNameSchema).default([]),
|
|
152
|
-
stages: z.array(z.object({
|
|
153
|
-
id: z.string().min(1),
|
|
154
|
-
label: z.string().min(1),
|
|
155
|
-
description: z.string().min(1).optional(),
|
|
156
|
-
contract_type: z.string().min(1),
|
|
157
|
-
skill_dir: z.string().min(1),
|
|
158
|
-
reads: z.array(z.string().min(1)).default([]),
|
|
159
|
-
writes: z.array(z.string().min(1)).default([]),
|
|
160
|
-
acceptance: z.record(z.string(), z.unknown()).optional(),
|
|
161
|
-
}).strict()).default([]),
|
|
162
|
-
}).strict();
|
|
163
60
|
export const MethodResourceSchema = z.object({
|
|
164
|
-
id:
|
|
165
|
-
method_id:
|
|
61
|
+
id: MethodIdSchema,
|
|
62
|
+
method_id: MethodIdSchema,
|
|
166
63
|
path: z.string().min(1),
|
|
167
64
|
label: z.string().min(1).optional(),
|
|
168
65
|
hint: z.string().min(1).optional(),
|
|
169
66
|
source_kind: z.enum(["builtin", "local"]).default("local"),
|
|
170
67
|
built_in: z.boolean().default(false),
|
|
171
|
-
active_for_preparations: z.array(
|
|
68
|
+
active_for_preparations: z.array(PreparationNameSchema).default([]),
|
|
172
69
|
stages: z.array(z.object({
|
|
173
70
|
id: z.string().min(1),
|
|
174
71
|
label: z.string().min(1),
|
|
@@ -180,18 +77,18 @@ export const MethodResourceSchema = z.object({
|
|
|
180
77
|
acceptance: z.record(z.string(), z.unknown()).optional(),
|
|
181
78
|
}).strict()).default([]),
|
|
182
79
|
}).strict();
|
|
183
|
-
export const CompileRunCreateRequestSchema = z.
|
|
80
|
+
export const CompileRunCreateRequestSchema = z.object({
|
|
184
81
|
preparation: PreparationNameSchema,
|
|
185
|
-
method:
|
|
82
|
+
method: MethodIdSchema.optional(),
|
|
186
83
|
max_attempts: SourceCompiledMaxAttemptsSchema.optional(),
|
|
187
84
|
max_loops: SourceCompiledMaxLoopsSchema.optional(),
|
|
188
85
|
preserve_stage_shells: z.enum(["on-failure", "always"]).optional(),
|
|
189
|
-
}).strict()
|
|
86
|
+
}).strict();
|
|
190
87
|
export const CompileRunSummarySchema = z.object({
|
|
191
88
|
run_id: z.string().min(1),
|
|
192
89
|
status: CompileRunStatusSchema,
|
|
193
90
|
preparation: PreparationNameSchema,
|
|
194
|
-
method:
|
|
91
|
+
method: MethodIdSchema,
|
|
195
92
|
portable_context_path: z.string().min(1),
|
|
196
93
|
started_at: z.string().nullable().optional(),
|
|
197
94
|
finished_at: z.string().nullable().optional(),
|
|
@@ -219,6 +116,7 @@ export const LocalJobStatusSchema = z.enum([
|
|
|
219
116
|
export const LocalRunHandlerResultSchema = z.object({
|
|
220
117
|
ok: z.boolean(),
|
|
221
118
|
error: z.string().min(1).optional(),
|
|
119
|
+
comparison: ReadinessCheckRunSchema.nullable().optional(),
|
|
222
120
|
}).strict();
|
|
223
121
|
export const LocalJobAgentSchema = z.object({
|
|
224
122
|
name: z.string().min(1),
|
|
@@ -259,11 +157,11 @@ export const LocalJobEventSchema = z.object({
|
|
|
259
157
|
input: JsonObjectSchema.nullable().optional(),
|
|
260
158
|
output: JsonObjectSchema.nullable().optional(),
|
|
261
159
|
}).strict();
|
|
262
|
-
export const LocalJobRunCreateRequestSchema = z.
|
|
160
|
+
export const LocalJobRunCreateRequestSchema = z.object({
|
|
263
161
|
job_type: LocalJobTypeSchema,
|
|
264
162
|
title: z.string().min(1),
|
|
265
163
|
preparation: PreparationNameSchema.nullable().optional(),
|
|
266
|
-
method:
|
|
164
|
+
method: MethodIdSchema.nullable().optional(),
|
|
267
165
|
source_path: z.string().min(1).nullable().optional(),
|
|
268
166
|
output_path: z.string().min(1).nullable().optional(),
|
|
269
167
|
agent: LocalJobAgentSchema.nullable().optional(),
|
|
@@ -272,32 +170,31 @@ export const LocalJobRunCreateRequestSchema = z.preprocess(normalizePreparationM
|
|
|
272
170
|
label: z.string().min(1),
|
|
273
171
|
input: JsonObjectSchema.nullable().optional(),
|
|
274
172
|
}).strict()).default([]),
|
|
275
|
-
}).strict()
|
|
276
|
-
export const PreparationSetupCreateRequestSchema = z.
|
|
173
|
+
}).strict();
|
|
174
|
+
export const PreparationSetupCreateRequestSchema = z.object({
|
|
277
175
|
preparation: SourcePreparationConfigSchema,
|
|
278
|
-
}).strict()
|
|
279
|
-
export const
|
|
280
|
-
export const ReadinessCheckDraftCreateRequestSchema = z.preprocess(normalizeWorkflowAuthoringRequest, z.object({
|
|
176
|
+
}).strict();
|
|
177
|
+
export const ReadinessCheckDraftCreateRequestSchema = z.object({
|
|
281
178
|
preparation: PreparationNameSchema,
|
|
282
179
|
source_folder_path: z.string().min(1),
|
|
283
180
|
about: z.string().min(1).optional(),
|
|
284
181
|
target_count: z.number().int().min(1).max(8).default(4),
|
|
285
|
-
}).strict()
|
|
182
|
+
}).strict();
|
|
286
183
|
export const ReadinessCheckDraftResultSchema = z.object({
|
|
287
184
|
checks: z.array(SourceReadinessCheckSchema).default([]),
|
|
288
185
|
}).strict();
|
|
289
|
-
export const
|
|
186
|
+
export const MethodAuthoringCreateRequestSchema = z.object({
|
|
290
187
|
preparation: PreparationNameSchema.nullable().optional(),
|
|
291
188
|
source_folder_path: z.string().min(1),
|
|
292
|
-
base_method_id:
|
|
293
|
-
reference_method_id:
|
|
294
|
-
method_id:
|
|
189
|
+
base_method_id: MethodIdSchema.optional(),
|
|
190
|
+
reference_method_id: MethodIdSchema.optional(),
|
|
191
|
+
method_id: MethodIdSchema,
|
|
295
192
|
label: z.string().min(1),
|
|
296
193
|
hint: z.string().min(1),
|
|
297
194
|
task_prompt: z.string().min(1),
|
|
298
195
|
checks: z.array(SourceReadinessCheckSchema).default([]),
|
|
299
|
-
}).strict()
|
|
300
|
-
export const
|
|
196
|
+
}).strict();
|
|
197
|
+
export const MethodAuthoringResultSchema = z.object({
|
|
301
198
|
status: z.enum(["updated", "no-change", "invalid", "executor-failed"]),
|
|
302
199
|
changed: z.boolean(),
|
|
303
200
|
summary: z.string().min(1),
|
|
@@ -321,7 +218,7 @@ export const LocalJobRunResourceSchema = z.object({
|
|
|
321
218
|
status: LocalJobStatusSchema,
|
|
322
219
|
title: z.string().min(1),
|
|
323
220
|
preparation: PreparationNameSchema.nullable().optional(),
|
|
324
|
-
method:
|
|
221
|
+
method: MethodIdSchema.nullable().optional(),
|
|
325
222
|
source_path: z.string().min(1).nullable().optional(),
|
|
326
223
|
output_path: z.string().min(1).nullable().optional(),
|
|
327
224
|
agent: LocalJobAgentSchema.nullable().optional(),
|
|
@@ -340,10 +237,10 @@ export const TestRunStatusSchema = z.enum([
|
|
|
340
237
|
"failed",
|
|
341
238
|
"cancelled",
|
|
342
239
|
]);
|
|
343
|
-
export const TestRunCreateRequestSchema = z.
|
|
240
|
+
export const TestRunCreateRequestSchema = z.object({
|
|
344
241
|
preparation: PreparationNameSchema,
|
|
345
242
|
mode: TestRunModeSchema.default("both"),
|
|
346
|
-
}).strict()
|
|
243
|
+
}).strict();
|
|
347
244
|
export const TestRunResourceSchema = z.object({
|
|
348
245
|
run_id: z.string().min(1),
|
|
349
246
|
status: TestRunStatusSchema,
|
|
@@ -353,17 +250,17 @@ export const TestRunResourceSchema = z.object({
|
|
|
353
250
|
portable_context_path: z.string().min(1).nullable(),
|
|
354
251
|
started_at: z.string().nullable().optional(),
|
|
355
252
|
finished_at: z.string().nullable().optional(),
|
|
356
|
-
comparison:
|
|
253
|
+
comparison: ReadinessCheckRunSchema.nullable(),
|
|
357
254
|
readiness: ReadinessStateSchema.nullable().optional(),
|
|
358
255
|
events: z.array(InterfRunEventSchema).default([]),
|
|
359
256
|
error: z.string().min(1).nullable().optional(),
|
|
360
257
|
}).strict();
|
|
361
258
|
export const RunObservabilityResourceSchema = RunObservabilitySchema;
|
|
362
|
-
export const RunCreateRequestSchema = z.
|
|
259
|
+
export const RunCreateRequestSchema = z.discriminatedUnion("run_type", [
|
|
363
260
|
z.object({
|
|
364
261
|
run_type: z.literal("compile"),
|
|
365
262
|
preparation: PreparationNameSchema,
|
|
366
|
-
method:
|
|
263
|
+
method: MethodIdSchema.optional(),
|
|
367
264
|
max_attempts: SourceCompiledMaxAttemptsSchema.optional(),
|
|
368
265
|
max_loops: SourceCompiledMaxLoopsSchema.optional(),
|
|
369
266
|
preserve_stage_shells: z.enum(["on-failure", "always"]).optional(),
|
|
@@ -371,7 +268,7 @@ export const RunCreateRequestSchema = z.preprocess(normalizePreparationMethodReq
|
|
|
371
268
|
z.object({
|
|
372
269
|
run_type: z.literal("prepare"),
|
|
373
270
|
preparation: PreparationNameSchema,
|
|
374
|
-
method:
|
|
271
|
+
method: MethodIdSchema.optional(),
|
|
375
272
|
max_attempts: SourceCompiledMaxAttemptsSchema.optional(),
|
|
376
273
|
max_loops: SourceCompiledMaxLoopsSchema.optional(),
|
|
377
274
|
preserve_stage_shells: z.enum(["on-failure", "always"]).optional(),
|
|
@@ -386,7 +283,7 @@ export const RunCreateRequestSchema = z.preprocess(normalizePreparationMethodReq
|
|
|
386
283
|
preparation: PreparationNameSchema,
|
|
387
284
|
mode: TestRunModeSchema.default("both"),
|
|
388
285
|
}).strict(),
|
|
389
|
-
])
|
|
286
|
+
]);
|
|
390
287
|
export const LocalExecutorStatusSchema = z.object({
|
|
391
288
|
kind: z.literal("interf-local-executor-status"),
|
|
392
289
|
version: z.literal(1),
|
|
@@ -416,21 +313,21 @@ export const ActionProposalStatusSchema = z.enum([
|
|
|
416
313
|
"submitted",
|
|
417
314
|
"failed",
|
|
418
315
|
]);
|
|
419
|
-
export const ActionProposalCreateRequestSchema = z.
|
|
316
|
+
export const ActionProposalCreateRequestSchema = z.object({
|
|
420
317
|
message: z.string().min(1),
|
|
421
318
|
preparation: PreparationNameSchema.optional(),
|
|
422
319
|
values: JsonObjectSchema.optional(),
|
|
423
|
-
}).strict()
|
|
424
|
-
export const ActionProposalPlanSchema = z.
|
|
320
|
+
}).strict();
|
|
321
|
+
export const ActionProposalPlanSchema = z.object({
|
|
425
322
|
action_type: ActionProposalTypeSchema,
|
|
426
323
|
preparation: PreparationNameSchema.optional(),
|
|
427
|
-
method:
|
|
324
|
+
method: MethodIdSchema.optional(),
|
|
428
325
|
values: JsonObjectSchema.optional(),
|
|
429
326
|
title: z.string().min(1).optional(),
|
|
430
327
|
summary: z.string().min(1).optional(),
|
|
431
328
|
assistant_message: z.string().min(1).optional(),
|
|
432
329
|
command_preview: z.string().min(1).optional(),
|
|
433
|
-
}).strict()
|
|
330
|
+
}).strict();
|
|
434
331
|
export const ActionProposalApprovalRequestSchema = z.object({
|
|
435
332
|
approved: z.boolean(),
|
|
436
333
|
note: z.string().min(1).optional(),
|
|
@@ -451,7 +348,7 @@ const ActionProposalResourceBaseSchema = z.object({
|
|
|
451
348
|
command_preview: z.string().min(1).optional(),
|
|
452
349
|
message: z.string().min(1),
|
|
453
350
|
preparation: PreparationNameSchema.nullable().optional(),
|
|
454
|
-
method:
|
|
351
|
+
method: MethodIdSchema.nullable().optional(),
|
|
455
352
|
created_at: z.string().min(1),
|
|
456
353
|
updated_at: z.string().min(1),
|
|
457
354
|
proposed_by_executor: LocalJobAgentSchema.nullable().optional(),
|
|
@@ -483,11 +380,11 @@ export const ActionProposalResourceSchema = z.discriminatedUnion("action_type",
|
|
|
483
380
|
}).strict(),
|
|
484
381
|
ActionProposalResourceBaseSchema.extend({
|
|
485
382
|
action_type: z.literal("method-authoring"),
|
|
486
|
-
request:
|
|
383
|
+
request: MethodAuthoringCreateRequestSchema,
|
|
487
384
|
}).strict(),
|
|
488
385
|
ActionProposalResourceBaseSchema.extend({
|
|
489
386
|
action_type: z.literal("method-improvement"),
|
|
490
|
-
request:
|
|
387
|
+
request: MethodAuthoringCreateRequestSchema,
|
|
491
388
|
}).strict(),
|
|
492
389
|
]);
|
|
493
390
|
export const PortableContextResourceSchema = z.object({
|
|
@@ -495,7 +392,7 @@ export const PortableContextResourceSchema = z.object({
|
|
|
495
392
|
path: z.string().min(1),
|
|
496
393
|
exists: z.boolean(),
|
|
497
394
|
readiness: ReadinessStateSchema,
|
|
498
|
-
method:
|
|
395
|
+
method: MethodIdSchema.nullable().optional(),
|
|
499
396
|
latest_compile_run_id: z.string().min(1).nullable().optional(),
|
|
500
397
|
latest_test_run_id: z.string().min(1).nullable().optional(),
|
|
501
398
|
artifacts: z.array(ArtifactRefSchema).default([]),
|
|
@@ -538,18 +435,10 @@ export const OpenPathResponseSchema = z.object({
|
|
|
538
435
|
path: z.string().min(1),
|
|
539
436
|
}).strict();
|
|
540
437
|
export const LocalServiceResourceSchema = z.discriminatedUnion("kind", [
|
|
541
|
-
z.object({
|
|
542
|
-
kind: z.literal("dataset"),
|
|
543
|
-
value: DatasetResourceSchema,
|
|
544
|
-
}).strict(),
|
|
545
438
|
z.object({
|
|
546
439
|
kind: z.literal("preparation"),
|
|
547
440
|
value: PreparationResourceSchema,
|
|
548
441
|
}).strict(),
|
|
549
|
-
z.object({
|
|
550
|
-
kind: z.literal("workflow-package"),
|
|
551
|
-
value: WorkflowPackageResourceSchema,
|
|
552
|
-
}).strict(),
|
|
553
442
|
z.object({
|
|
554
443
|
kind: z.literal("method"),
|
|
555
444
|
value: MethodResourceSchema,
|
|
@@ -595,15 +484,9 @@ export const LocalServiceResourceSchema = z.discriminatedUnion("kind", [
|
|
|
595
484
|
value: WorkspaceFileResourceSchema,
|
|
596
485
|
}).strict(),
|
|
597
486
|
]);
|
|
598
|
-
export const DatasetListResponseSchema = z.object({
|
|
599
|
-
datasets: z.array(DatasetResourceSchema),
|
|
600
|
-
}).strict();
|
|
601
487
|
export const PreparationListResponseSchema = z.object({
|
|
602
488
|
preparations: z.array(PreparationResourceSchema),
|
|
603
489
|
}).strict();
|
|
604
|
-
export const WorkflowPackageListResponseSchema = z.object({
|
|
605
|
-
workflow_packages: z.array(WorkflowPackageResourceSchema),
|
|
606
|
-
}).strict();
|
|
607
490
|
export const MethodListResponseSchema = z.object({
|
|
608
491
|
methods: z.array(MethodResourceSchema),
|
|
609
492
|
}).strict();
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ArtifactRef, type CompileRun } from "../execution/lib/schema.js";
|
|
2
|
+
import { type LocalJobRunResource, type RunObservabilityResource, type TestRunResource } from "./lib/schema.js";
|
|
3
|
+
export declare function uniqueArtifacts(artifacts: ArtifactRef[]): ArtifactRef[];
|
|
4
|
+
export declare function compileRunToObservability(run: CompileRun): RunObservabilityResource;
|
|
5
|
+
export declare function testRunToObservability(run: TestRunResource): RunObservabilityResource;
|
|
6
|
+
export declare function jobRunToObservability(job: LocalJobRunResource): RunObservabilityResource;
|