@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,16 +1,15 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import {
|
|
3
|
-
import { PreparationNameSchema, } from "../../project-model/lib/schema.js";
|
|
2
|
+
import { RuntimeExecutorInfoSchema, RuntimeStageSchema, MethodIdSchema, ReadinessStateSchema, PreparationNameSchema, } from "../../contracts/lib/schema.js";
|
|
4
3
|
const RunIdSchema = z.string().min(1);
|
|
5
4
|
const JsonObjectSchema = z.record(z.string(), z.unknown());
|
|
6
|
-
export const
|
|
5
|
+
export const MethodTraceRunStatusSchema = z.enum([
|
|
7
6
|
"pending",
|
|
8
7
|
"running",
|
|
9
8
|
"completed",
|
|
10
9
|
"failed",
|
|
11
10
|
"cancelled",
|
|
12
11
|
]);
|
|
13
|
-
export const
|
|
12
|
+
export const MethodTraceEventTypeSchema = z.enum([
|
|
14
13
|
"run_created",
|
|
15
14
|
"run_started",
|
|
16
15
|
"run_completed",
|
|
@@ -28,37 +27,37 @@ export const WorkflowTraceEventTypeSchema = z.enum([
|
|
|
28
27
|
"wait_created",
|
|
29
28
|
"wait_completed",
|
|
30
29
|
]);
|
|
31
|
-
export const
|
|
30
|
+
export const MethodTraceStructuredErrorSchema = z.object({
|
|
32
31
|
message: z.string().min(1),
|
|
33
32
|
stack: z.string().min(1).optional(),
|
|
34
33
|
code: z.string().min(1).optional(),
|
|
35
34
|
}).strict();
|
|
36
|
-
export const
|
|
35
|
+
export const MethodTraceRunSchema = z.object({
|
|
37
36
|
runId: RunIdSchema,
|
|
38
|
-
status:
|
|
37
|
+
status: MethodTraceRunStatusSchema,
|
|
39
38
|
deploymentId: z.string().min(1),
|
|
40
|
-
|
|
39
|
+
methodName: z.string().min(1),
|
|
41
40
|
specVersion: z.literal(1),
|
|
42
41
|
executionContext: JsonObjectSchema.optional(),
|
|
43
42
|
input: z.unknown(),
|
|
44
43
|
output: z.unknown().optional(),
|
|
45
|
-
error:
|
|
44
|
+
error: MethodTraceStructuredErrorSchema.optional(),
|
|
46
45
|
expiredAt: z.string().min(1).optional(),
|
|
47
46
|
startedAt: z.string().min(1).optional(),
|
|
48
47
|
completedAt: z.string().min(1).optional(),
|
|
49
48
|
createdAt: z.string().min(1),
|
|
50
49
|
updatedAt: z.string().min(1),
|
|
51
50
|
}).strict();
|
|
52
|
-
export const
|
|
51
|
+
export const MethodTraceEventSchema = z.object({
|
|
53
52
|
runId: RunIdSchema,
|
|
54
53
|
eventId: z.string().min(1),
|
|
55
|
-
eventType:
|
|
54
|
+
eventType: MethodTraceEventTypeSchema,
|
|
56
55
|
correlationId: z.string().min(1).optional(),
|
|
57
56
|
specVersion: z.literal(1),
|
|
58
57
|
createdAt: z.string().min(1),
|
|
59
58
|
eventData: z.unknown().optional(),
|
|
60
59
|
}).strict();
|
|
61
|
-
export const
|
|
60
|
+
export const MethodTraceStreamChunkSchema = z.object({
|
|
62
61
|
streamId: z.string().min(1),
|
|
63
62
|
chunkId: z.string().min(1),
|
|
64
63
|
index: z.number().int().min(0),
|
|
@@ -66,10 +65,10 @@ export const WorkflowTraceStreamChunkSchema = z.object({
|
|
|
66
65
|
text: z.string(),
|
|
67
66
|
data: z.unknown().optional(),
|
|
68
67
|
}).strict();
|
|
69
|
-
export const
|
|
70
|
-
run:
|
|
71
|
-
events: z.array(
|
|
72
|
-
streams: z.array(
|
|
68
|
+
export const MethodTraceSchema = z.object({
|
|
69
|
+
run: MethodTraceRunSchema,
|
|
70
|
+
events: z.array(MethodTraceEventSchema).default([]),
|
|
71
|
+
streams: z.array(MethodTraceStreamChunkSchema).default([]),
|
|
73
72
|
}).strict();
|
|
74
73
|
export const ObservableRunTypeSchema = z.enum([
|
|
75
74
|
"preparation-setup",
|
|
@@ -108,7 +107,6 @@ export const StageRunStatusSchema = z.enum([
|
|
|
108
107
|
"running",
|
|
109
108
|
"succeeded",
|
|
110
109
|
"failed",
|
|
111
|
-
"skipped",
|
|
112
110
|
]);
|
|
113
111
|
export const ArtifactRoleSchema = z.enum([
|
|
114
112
|
"source",
|
|
@@ -130,28 +128,7 @@ export const ProofCheckSchema = z.object({
|
|
|
130
128
|
ok: z.boolean(),
|
|
131
129
|
detail: z.string().min(1).optional(),
|
|
132
130
|
}).strict();
|
|
133
|
-
|
|
134
|
-
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
135
|
-
return value;
|
|
136
|
-
const input = value;
|
|
137
|
-
const output = { ...input };
|
|
138
|
-
if (typeof output.preparation !== "string" && typeof input.dataset === "string") {
|
|
139
|
-
output.preparation = input.dataset;
|
|
140
|
-
}
|
|
141
|
-
if (typeof output.method !== "string" && typeof input.workflow === "string") {
|
|
142
|
-
output.method = input.workflow;
|
|
143
|
-
}
|
|
144
|
-
if (output.run_type === "dataset-setup")
|
|
145
|
-
output.run_type = "preparation-setup";
|
|
146
|
-
if (output.run_type === "workflow-authoring")
|
|
147
|
-
output.run_type = "method-authoring";
|
|
148
|
-
if (output.run_type === "workflow-improvement")
|
|
149
|
-
output.run_type = "method-improvement";
|
|
150
|
-
delete output.dataset;
|
|
151
|
-
delete output.workflow;
|
|
152
|
-
return output;
|
|
153
|
-
}
|
|
154
|
-
export const RunObservabilitySchema = z.preprocess(normalizePreparationMethodFields, z.object({
|
|
131
|
+
export const RunObservabilitySchema = z.object({
|
|
155
132
|
kind: z.literal("interf-run-observability"),
|
|
156
133
|
version: z.literal(1),
|
|
157
134
|
run_id: RunIdSchema,
|
|
@@ -159,7 +136,7 @@ export const RunObservabilitySchema = z.preprocess(normalizePreparationMethodFie
|
|
|
159
136
|
title: z.string().min(1),
|
|
160
137
|
status: ObservableRunStatusSchema,
|
|
161
138
|
preparation: PreparationNameSchema.nullable().optional(),
|
|
162
|
-
method:
|
|
139
|
+
method: MethodIdSchema.nullable().optional(),
|
|
163
140
|
source_path: z.string().min(1).nullable().optional(),
|
|
164
141
|
output_path: z.string().min(1).nullable().optional(),
|
|
165
142
|
executor: RuntimeExecutorInfoSchema.nullable().optional(),
|
|
@@ -171,8 +148,8 @@ export const RunObservabilitySchema = z.preprocess(normalizePreparationMethodFie
|
|
|
171
148
|
artifacts: z.array(ArtifactRefSchema).default([]),
|
|
172
149
|
proof: z.array(ProofCheckSchema).default([]),
|
|
173
150
|
readiness: ReadinessStateSchema.nullable().optional(),
|
|
174
|
-
trace:
|
|
175
|
-
}).strict()
|
|
151
|
+
trace: MethodTraceSchema,
|
|
152
|
+
}).strict();
|
|
176
153
|
export const ProofRecordSchema = z.object({
|
|
177
154
|
id: z.string().min(1),
|
|
178
155
|
run_id: RunIdSchema,
|
|
@@ -205,7 +182,7 @@ const RunEventBaseSchema = z.object({
|
|
|
205
182
|
export const RunStartedEventSchema = RunEventBaseSchema.extend({
|
|
206
183
|
type: z.literal("run.started"),
|
|
207
184
|
preparation: PreparationNameSchema,
|
|
208
|
-
method:
|
|
185
|
+
method: MethodIdSchema,
|
|
209
186
|
portable_context_path: z.string().min(1),
|
|
210
187
|
backend: ExecutionBackendKindSchema,
|
|
211
188
|
}).strict();
|
|
@@ -268,7 +245,7 @@ export const ReadinessUpdatedEventSchema = RunEventBaseSchema.extend({
|
|
|
268
245
|
preparation: PreparationNameSchema,
|
|
269
246
|
readiness: ReadinessStateSchema,
|
|
270
247
|
}).strict();
|
|
271
|
-
export const InterfRunEventSchema = z.
|
|
248
|
+
export const InterfRunEventSchema = z.discriminatedUnion("type", [
|
|
272
249
|
RunStartedEventSchema,
|
|
273
250
|
StageStartedEventSchema,
|
|
274
251
|
FileProcessedEventSchema,
|
|
@@ -281,7 +258,7 @@ export const InterfRunEventSchema = z.preprocess(normalizePreparationMethodField
|
|
|
281
258
|
RunFailedEventSchema,
|
|
282
259
|
ChecksEvaluatedEventSchema,
|
|
283
260
|
ReadinessUpdatedEventSchema,
|
|
284
|
-
])
|
|
261
|
+
]);
|
|
285
262
|
export const StageRunSchema = z.object({
|
|
286
263
|
run_id: RunIdSchema,
|
|
287
264
|
stage_id: RuntimeStageSchema,
|
|
@@ -299,13 +276,13 @@ export const StageRunSchema = z.object({
|
|
|
299
276
|
latest_proof: ProofRecordSchema.nullable().optional(),
|
|
300
277
|
failure: z.string().nullable().optional(),
|
|
301
278
|
}).strict();
|
|
302
|
-
export const CompileRunSchema = z.
|
|
279
|
+
export const CompileRunSchema = z.object({
|
|
303
280
|
kind: z.literal("interf-compile-run"),
|
|
304
281
|
version: z.literal(1),
|
|
305
282
|
run_id: RunIdSchema,
|
|
306
283
|
status: CompileRunStatusSchema,
|
|
307
284
|
preparation: PreparationNameSchema,
|
|
308
|
-
method:
|
|
285
|
+
method: MethodIdSchema,
|
|
309
286
|
backend: ExecutionBackendKindSchema,
|
|
310
287
|
source_path: z.string().min(1),
|
|
311
288
|
portable_context_path: z.string().min(1),
|
|
@@ -316,4 +293,4 @@ export const CompileRunSchema = z.preprocess(normalizePreparationMethodFields, z
|
|
|
316
293
|
events: z.array(InterfRunEventSchema).default([]),
|
|
317
294
|
latest_proof: ProofRecordSchema.nullable().optional(),
|
|
318
295
|
readiness: ReadinessStateSchema.nullable().optional(),
|
|
319
|
-
}).strict()
|
|
296
|
+
}).strict();
|
|
@@ -7,7 +7,6 @@ export declare const PreparationSetupActionValuesSchema: z.ZodObject<{
|
|
|
7
7
|
path: z.ZodString;
|
|
8
8
|
about: z.ZodString;
|
|
9
9
|
method: z.ZodOptional<z.ZodString>;
|
|
10
|
-
workflow: z.ZodOptional<z.ZodString>;
|
|
11
10
|
readiness_notes: z.ZodOptional<z.ZodString>;
|
|
12
11
|
}, z.core.$strict>;
|
|
13
12
|
export declare const MethodAuthoringActionValuesSchema: z.ZodObject<{
|
|
@@ -7,7 +7,6 @@ export const PreparationSetupActionValuesSchema = z.object({
|
|
|
7
7
|
path: z.string().trim().min(1, "Source Folder is required."),
|
|
8
8
|
about: z.string().trim().min(1, "Agent work is required."),
|
|
9
9
|
method: OptionalActionValueIdSchema.optional(),
|
|
10
|
-
workflow: OptionalActionValueIdSchema.optional(),
|
|
11
10
|
readiness_notes: z.string().trim().optional(),
|
|
12
11
|
}).strict();
|
|
13
12
|
export const MethodAuthoringActionValuesSchema = z.object({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type CompileRunCreateRequest, type CompileRunListResponse, type CompileRunResource, type LocalJobEventAppendRequest, type LocalJobRunCreateRequest, type LocalJobRunListResponse, type LocalJobRunResource, type LocalServiceHealth, type ReadinessCheckDraftCreateRequest, type ReadinessCheckDraftResult, type ReadinessListResponse, type TestRunCreateRequest, type TestRunListResponse, type TestRunResource, type
|
|
1
|
+
import { type CompileRunCreateRequest, type CompileRunListResponse, type CompileRunResource, type LocalJobEventAppendRequest, type LocalJobRunCreateRequest, type LocalJobRunListResponse, type LocalJobRunResource, type LocalServiceHealth, type ReadinessCheckDraftCreateRequest, type ReadinessCheckDraftResult, type ReadinessListResponse, type TestRunCreateRequest, type TestRunListResponse, type TestRunResource, type MethodAuthoringCreateRequest, type MethodAuthoringResult } from "./lib/schema.js";
|
|
2
2
|
export interface LocalServiceConnection {
|
|
3
3
|
serviceUrl: string;
|
|
4
4
|
health: LocalServiceHealth;
|
|
@@ -94,12 +94,12 @@ export declare function submitReadinessCheckDraftToLocalService(options: {
|
|
|
94
94
|
onSubmitted?: (submission: LocalServiceJobSubmitted) => void;
|
|
95
95
|
onUpdate?: (job: LocalJobRunResource) => void;
|
|
96
96
|
}): Promise<LocalServiceJobSubmission<ReadinessCheckDraftResult> | null>;
|
|
97
|
-
export declare function
|
|
97
|
+
export declare function submitMethodAuthoringRunToLocalService(options: {
|
|
98
98
|
projectPath: string;
|
|
99
|
-
request:
|
|
99
|
+
request: MethodAuthoringCreateRequest;
|
|
100
100
|
onSubmitted?: (submission: LocalServiceJobSubmitted) => void;
|
|
101
101
|
onUpdate?: (job: LocalJobRunResource) => void;
|
|
102
|
-
}): Promise<LocalServiceJobSubmission<
|
|
102
|
+
}): Promise<LocalServiceJobSubmission<MethodAuthoringResult> | null>;
|
|
103
103
|
export interface LocalJobTracker {
|
|
104
104
|
serviceUrl: string;
|
|
105
105
|
runId: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { existsSync, readFileSync } from "node:fs";
|
|
2
2
|
import { join, resolve } from "node:path";
|
|
3
|
-
import { CompileRunCreateRequestSchema, CompileRunListResponseSchema, CompileRunResourceSchema, LocalServiceInstancePointerSchema, LocalJobEventAppendRequestSchema, LocalJobRunCreateRequestSchema, LocalJobRunListResponseSchema, LocalJobRunResourceSchema, LocalServiceHealthSchema, ReadinessCheckDraftCreateRequestSchema, ReadinessCheckDraftResultSchema, ReadinessListResponseSchema, TestRunCreateRequestSchema, TestRunListResponseSchema, TestRunResourceSchema,
|
|
3
|
+
import { CompileRunCreateRequestSchema, CompileRunListResponseSchema, CompileRunResourceSchema, LocalServiceInstancePointerSchema, LocalJobEventAppendRequestSchema, LocalJobRunCreateRequestSchema, LocalJobRunListResponseSchema, LocalJobRunResourceSchema, LocalServiceHealthSchema, ReadinessCheckDraftCreateRequestSchema, ReadinessCheckDraftResultSchema, ReadinessListResponseSchema, TestRunCreateRequestSchema, TestRunListResponseSchema, TestRunResourceSchema, MethodAuthoringCreateRequestSchema, MethodAuthoringResultSchema, } from "./lib/schema.js";
|
|
4
4
|
import { LOCAL_SERVICE_INSTANCE_POINTER_PATH, LOCAL_SERVICE_ROUTES, buildLocalServiceUrl, } from "./routes.js";
|
|
5
5
|
function trimTrailingSlash(value) {
|
|
6
6
|
return value.replace(/\/+$/, "");
|
|
@@ -260,11 +260,11 @@ export async function submitReadinessCheckDraftToLocalService(options) {
|
|
|
260
260
|
result: parsed.data,
|
|
261
261
|
};
|
|
262
262
|
}
|
|
263
|
-
export async function
|
|
263
|
+
export async function submitMethodAuthoringRunToLocalService(options) {
|
|
264
264
|
const connection = await findLocalService({ projectPath: options.projectPath });
|
|
265
265
|
if (!connection)
|
|
266
266
|
return null;
|
|
267
|
-
const request =
|
|
267
|
+
const request = MethodAuthoringCreateRequestSchema.parse(options.request);
|
|
268
268
|
const initialJob = LocalJobRunResourceSchema.parse(await fetchJson(`${connection.serviceUrl}${LOCAL_SERVICE_ROUTES.methodAuthoringRuns}`, {
|
|
269
269
|
method: "POST",
|
|
270
270
|
body: JSON.stringify(request),
|
|
@@ -286,7 +286,7 @@ export async function submitWorkflowAuthoringRunToLocalService(options) {
|
|
|
286
286
|
error: resultError(job, "Method authoring failed in the local Interf service."),
|
|
287
287
|
};
|
|
288
288
|
}
|
|
289
|
-
const parsed =
|
|
289
|
+
const parsed = MethodAuthoringResultSchema.safeParse(job.result);
|
|
290
290
|
if (!parsed.success) {
|
|
291
291
|
return {
|
|
292
292
|
serviceUrl: connection.serviceUrl,
|
|
@@ -4,11 +4,11 @@ export * as routes from "./routes.js";
|
|
|
4
4
|
export * as client from "./client.js";
|
|
5
5
|
export * as runtime from "./runtime.js";
|
|
6
6
|
export * as server from "./server.js";
|
|
7
|
-
export type { CompileRunCreateRequest, CompileRunResource, CompileRunSummary,
|
|
8
|
-
export { CompileRunCreateRequestSchema, CompileRunResourceSchema, CompileRunSummarySchema,
|
|
7
|
+
export type { CompileRunCreateRequest, CompileRunResource, CompileRunSummary, LocalServiceDiscovery, PortableContextMapping, PreparationReadinessState, PreparationRunLinkage, PreparationResource, MethodResource, LocalJobAgent, LocalJobEvent, LocalJobEventAppendRequest, LocalJobEventType, LocalJobRunCreateRequest, LocalJobRunListResponse, LocalJobRunResource, LocalJobStatus, LocalRunHandlerResult, LocalJobStep, LocalJobType, LocalServiceConfig, LocalServiceHealth, LocalServiceInstancePointer, LocalServiceResource, LocalExecutorStatus, ActionProposalApproval, ActionProposalApprovalRequest, ActionProposalCreateRequest, ActionProposalListResponse, ActionProposalPlan, ActionProposalResource, ActionProposalStatus, ActionProposalType, PreparationSetupCreateRequest, PortableContextResource, ReadinessListResponse, ReadinessResource, SourceFileResource, WorkspaceFileResource, ReadinessCheckDraftCreateRequest, ReadinessCheckDraftResult, TestRunCreateRequest, TestRunResource, TestRunStatus, RunCreateRequest, RunObservabilityListResponse, RunObservabilityResource, MethodAuthoringCreateRequest, MethodAuthoringResult, PreparationListResponse, MethodListResponse, CompileRunListResponse, TestRunListResponse, PortableContextListResponse, SourceFileListResponse, WorkspaceFileListResponse, OpenPathRequest, OpenPathResponse, } from "./lib/schema.js";
|
|
8
|
+
export { CompileRunCreateRequestSchema, CompileRunResourceSchema, CompileRunSummarySchema, LocalServiceDiscoverySchema, PortableContextMappingSchema, PreparationReadinessStateSchema, PreparationRunLinkageSchema, PreparationResourceSchema, MethodResourceSchema, LocalJobAgentSchema, LocalJobEventAppendRequestSchema, LocalJobEventSchema, LocalJobEventTypeSchema, LocalJobRunCreateRequestSchema, LocalJobRunResourceSchema, LocalJobStatusSchema, LocalRunHandlerResultSchema, LocalJobStepSchema, LocalJobTypeSchema, LocalServiceConfigSchema, LocalServiceHealthSchema, LocalServiceInstancePointerSchema, LocalServiceResourceSchema, PortableContextResourceSchema, ReadinessResourceSchema, SourceFileResourceSchema, WorkspaceFileResourceSchema, ReadinessCheckDraftCreateRequestSchema, ReadinessCheckDraftResultSchema, TestRunCreateRequestSchema, TestRunResourceSchema, TestRunStatusSchema, RunCreateRequestSchema, RunObservabilityResourceSchema, RunObservabilityListResponseSchema, LocalExecutorStatusSchema, ActionProposalApprovalRequestSchema, ActionProposalApprovalSchema, ActionProposalCreateRequestSchema, ActionProposalListResponseSchema, ActionProposalPlanSchema, ActionProposalResourceSchema, ActionProposalStatusSchema, ActionProposalTypeSchema, PreparationSetupCreateRequestSchema, MethodAuthoringCreateRequestSchema, MethodAuthoringResultSchema, PreparationListResponseSchema, MethodListResponseSchema, CompileRunListResponseSchema, LocalJobRunListResponseSchema, TestRunListResponseSchema, PortableContextListResponseSchema, ReadinessListResponseSchema, SourceFileListResponseSchema, WorkspaceFileListResponseSchema, OpenPathRequestSchema, OpenPathResponseSchema, } from "./lib/schema.js";
|
|
9
9
|
export { LOCAL_SERVICE_DEFAULT_HOST, LOCAL_SERVICE_DEFAULT_PORT, LOCAL_SERVICE_INSTANCE_POINTER_PATH, LOCAL_SERVICE_ROUTES, buildLocalServiceUrl, } from "./routes.js";
|
|
10
10
|
export type { LocalServiceJobSubmission, LocalServiceJobSubmitted, LocalServiceConnection, LocalServiceRunSnapshot, LocalJobTracker, } from "./client.js";
|
|
11
|
-
export { appendLocalJobRunEvent, configuredLocalServiceUrl, findLocalService, getLocalJobRun, getLocalCompileRun, getLocalTestRun, listLocalCompileRuns, listLocalJobRuns, listLocalTestRuns, readLocalServiceRunSnapshot, startLocalJobRun, submitCompileRunToLocalService, submitReadinessCheckDraftToLocalService, submitTestRunToLocalService,
|
|
11
|
+
export { appendLocalJobRunEvent, configuredLocalServiceUrl, findLocalService, getLocalJobRun, getLocalCompileRun, getLocalTestRun, listLocalCompileRuns, listLocalJobRuns, listLocalTestRuns, readLocalServiceRunSnapshot, startLocalJobRun, submitCompileRunToLocalService, submitReadinessCheckDraftToLocalService, submitTestRunToLocalService, submitMethodAuthoringRunToLocalService, waitForLocalJobRun, waitForLocalCompileRun, waitForLocalTestRun, } from "./client.js";
|
|
12
12
|
export type { LocalServiceActionPlanningContext, LocalServiceCompileRunContext, LocalServiceJobRunContext, LocalServiceRunHandlers, LocalServiceRuntimeOptions, LocalServiceTestRunContext, } from "./runtime.js";
|
|
13
13
|
export { LocalServiceRuntime, createLocalServiceRuntime, } from "./runtime.js";
|
|
14
14
|
export type { StartedLocalService, StartLocalServiceOptions, } from "./server.js";
|
|
@@ -4,8 +4,8 @@ export * as routes from "./routes.js";
|
|
|
4
4
|
export * as client from "./client.js";
|
|
5
5
|
export * as runtime from "./runtime.js";
|
|
6
6
|
export * as server from "./server.js";
|
|
7
|
-
export { CompileRunCreateRequestSchema, CompileRunResourceSchema, CompileRunSummarySchema,
|
|
7
|
+
export { CompileRunCreateRequestSchema, CompileRunResourceSchema, CompileRunSummarySchema, LocalServiceDiscoverySchema, PortableContextMappingSchema, PreparationReadinessStateSchema, PreparationRunLinkageSchema, PreparationResourceSchema, MethodResourceSchema, LocalJobAgentSchema, LocalJobEventAppendRequestSchema, LocalJobEventSchema, LocalJobEventTypeSchema, LocalJobRunCreateRequestSchema, LocalJobRunResourceSchema, LocalJobStatusSchema, LocalRunHandlerResultSchema, LocalJobStepSchema, LocalJobTypeSchema, LocalServiceConfigSchema, LocalServiceHealthSchema, LocalServiceInstancePointerSchema, LocalServiceResourceSchema, PortableContextResourceSchema, ReadinessResourceSchema, SourceFileResourceSchema, WorkspaceFileResourceSchema, ReadinessCheckDraftCreateRequestSchema, ReadinessCheckDraftResultSchema, TestRunCreateRequestSchema, TestRunResourceSchema, TestRunStatusSchema, RunCreateRequestSchema, RunObservabilityResourceSchema, RunObservabilityListResponseSchema, LocalExecutorStatusSchema, ActionProposalApprovalRequestSchema, ActionProposalApprovalSchema, ActionProposalCreateRequestSchema, ActionProposalListResponseSchema, ActionProposalPlanSchema, ActionProposalResourceSchema, ActionProposalStatusSchema, ActionProposalTypeSchema, PreparationSetupCreateRequestSchema, MethodAuthoringCreateRequestSchema, MethodAuthoringResultSchema, PreparationListResponseSchema, MethodListResponseSchema, CompileRunListResponseSchema, LocalJobRunListResponseSchema, TestRunListResponseSchema, PortableContextListResponseSchema, ReadinessListResponseSchema, SourceFileListResponseSchema, WorkspaceFileListResponseSchema, OpenPathRequestSchema, OpenPathResponseSchema, } from "./lib/schema.js";
|
|
8
8
|
export { LOCAL_SERVICE_DEFAULT_HOST, LOCAL_SERVICE_DEFAULT_PORT, LOCAL_SERVICE_INSTANCE_POINTER_PATH, LOCAL_SERVICE_ROUTES, buildLocalServiceUrl, } from "./routes.js";
|
|
9
|
-
export { appendLocalJobRunEvent, configuredLocalServiceUrl, findLocalService, getLocalJobRun, getLocalCompileRun, getLocalTestRun, listLocalCompileRuns, listLocalJobRuns, listLocalTestRuns, readLocalServiceRunSnapshot, startLocalJobRun, submitCompileRunToLocalService, submitReadinessCheckDraftToLocalService, submitTestRunToLocalService,
|
|
9
|
+
export { appendLocalJobRunEvent, configuredLocalServiceUrl, findLocalService, getLocalJobRun, getLocalCompileRun, getLocalTestRun, listLocalCompileRuns, listLocalJobRuns, listLocalTestRuns, readLocalServiceRunSnapshot, startLocalJobRun, submitCompileRunToLocalService, submitReadinessCheckDraftToLocalService, submitTestRunToLocalService, submitMethodAuthoringRunToLocalService, waitForLocalJobRun, waitForLocalCompileRun, waitForLocalTestRun, } from "./client.js";
|
|
10
10
|
export { LocalServiceRuntime, createLocalServiceRuntime, } from "./runtime.js";
|
|
11
11
|
export { createLocalServiceServer, startLocalService, } from "./server.js";
|