@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.
Files changed (302) hide show
  1. package/README.md +123 -89
  2. package/TRADEMARKS.md +1 -1
  3. package/agent-skills/interf-actions/SKILL.md +71 -0
  4. package/agent-skills/interf-actions/references/cli.md +190 -0
  5. package/apps/compiler-ui/.next/server/app/index.html +1 -0
  6. package/apps/compiler-ui/.next/static/XWKL548yXD_UOG4ID9G3J/_buildManifest.js +11 -0
  7. package/apps/compiler-ui/.next/static/XWKL548yXD_UOG4ID9G3J/_clientMiddlewareManifest.js +1 -0
  8. package/apps/compiler-ui/.next/static/XWKL548yXD_UOG4ID9G3J/_ssgManifest.js +1 -0
  9. package/apps/compiler-ui/.next/static/chunks/03~yq9q893hmn.js +1 -0
  10. package/apps/compiler-ui/.next/static/chunks/06z~l3kwb891e.js +1 -0
  11. package/apps/compiler-ui/.next/static/chunks/08g7lvje.te.u.js +1 -0
  12. package/apps/compiler-ui/.next/static/chunks/08m7vf5asqlsm.js +91 -0
  13. package/apps/compiler-ui/.next/static/chunks/0_i-3_5l9t2qe.js +1 -0
  14. package/apps/compiler-ui/.next/static/chunks/0b-ywny_j0g~0.js +1 -0
  15. package/apps/compiler-ui/.next/static/chunks/0b52v41o1gixx.js +1 -0
  16. package/apps/compiler-ui/.next/static/chunks/0fgt_8knmicoz.js +124 -0
  17. package/apps/compiler-ui/.next/static/chunks/0gpzgsv0w.q~m.js +31 -0
  18. package/apps/compiler-ui/.next/static/chunks/0ilwfezfvu6~-.js +1 -0
  19. package/apps/compiler-ui/.next/static/chunks/0n51hrfoufc7g.js +1 -0
  20. package/apps/compiler-ui/.next/static/chunks/0ti_66mx7~w2-.js +5 -0
  21. package/apps/compiler-ui/.next/static/chunks/0xxmf45eskdt~.css +1 -0
  22. package/apps/compiler-ui/.next/static/chunks/0y5z3t-z1c8ks.js.map +5 -0
  23. package/apps/compiler-ui/.next/static/chunks/13g~4mamjft.c.css +3 -0
  24. package/apps/compiler-ui/.next/static/chunks/14wtz~vq25~qq.js +1 -0
  25. package/apps/compiler-ui/.next/static/chunks/turbopack-109rtik40vwh5.js +1 -0
  26. package/apps/compiler-ui/.next/static/chunks/turbopack-10e~t1yzi4svj.js +1 -0
  27. package/apps/compiler-ui/.next/static/chunks/turbopack-worker-0sjn--fhq~1cg.js +1 -0
  28. package/apps/compiler-ui/.next/static/media/GeistMono_Variable.p.17jn9btb_52pq.woff2 +0 -0
  29. package/apps/compiler-ui/.next/static/media/Geist_Variable-s.p.0-te~ja_gpvcf.woff2 +0 -0
  30. package/apps/compiler-ui/.next/static/media/worker.102zas1s52_pf.js +109 -0
  31. package/builtin-workflows/interf/README.md +8 -8
  32. package/builtin-workflows/interf/compile/stages/shape/SKILL.md +4 -4
  33. package/builtin-workflows/interf/compile/stages/structure/SKILL.md +1 -1
  34. package/builtin-workflows/interf/improve/SKILL.md +1 -1
  35. package/builtin-workflows/interf/use/query/SKILL.md +1 -1
  36. package/builtin-workflows/interf/workflow.json +8 -8
  37. package/builtin-workflows/interf/workflow.schema.json +1 -1
  38. package/dist/cli/commands/check-draft.d.ts +5 -4
  39. package/dist/cli/commands/check-draft.js +18 -17
  40. package/dist/cli/commands/compile-controller.d.ts +3 -0
  41. package/dist/cli/commands/compile-controller.js +53 -45
  42. package/dist/cli/commands/compile.js +83 -27
  43. package/dist/cli/commands/compiled-flow.d.ts +3 -0
  44. package/dist/cli/commands/compiled-flow.js +9 -7
  45. package/dist/cli/commands/control-path.d.ts +11 -0
  46. package/dist/cli/commands/control-path.js +72 -0
  47. package/dist/cli/commands/create-workflow-wizard.d.ts +6 -0
  48. package/dist/cli/commands/create-workflow-wizard.js +191 -77
  49. package/dist/cli/commands/create.js +54 -40
  50. package/dist/cli/commands/default.js +4 -3
  51. package/dist/cli/commands/doctor.js +5 -5
  52. package/dist/cli/commands/executor-flow.js +1 -1
  53. package/dist/cli/commands/init.js +326 -76
  54. package/dist/cli/commands/list.js +8 -7
  55. package/dist/cli/commands/preparation-selection.d.ts +6 -0
  56. package/dist/cli/commands/preparation-selection.js +11 -0
  57. package/dist/cli/commands/reset.js +3 -3
  58. package/dist/cli/commands/source-config-wizard.d.ts +4 -3
  59. package/dist/cli/commands/source-config-wizard.js +175 -197
  60. package/dist/cli/commands/status.js +116 -8
  61. package/dist/cli/commands/test-flow.d.ts +1 -1
  62. package/dist/cli/commands/test-flow.js +31 -31
  63. package/dist/cli/commands/test.d.ts +4 -0
  64. package/dist/cli/commands/test.js +95 -58
  65. package/dist/cli/commands/verify.js +7 -7
  66. package/dist/cli/commands/web.d.ts +11 -0
  67. package/dist/cli/commands/web.js +373 -0
  68. package/dist/cli/index.d.ts +2 -1
  69. package/dist/cli/index.js +3 -1
  70. package/dist/index.d.ts +4 -2
  71. package/dist/index.js +3 -1
  72. package/dist/packages/agents/lib/execution.js +4 -2
  73. package/dist/packages/agents/lib/executors.d.ts +1 -0
  74. package/dist/packages/agents/lib/executors.js +1 -0
  75. package/dist/packages/agents/lib/render.d.ts +2 -2
  76. package/dist/packages/agents/lib/render.js +10 -9
  77. package/dist/packages/agents/lib/shells.d.ts +3 -11
  78. package/dist/packages/agents/lib/shells.js +45 -96
  79. package/dist/packages/agents/lib/types.d.ts +1 -0
  80. package/dist/packages/compiler/compiled-paths.d.ts +4 -1
  81. package/dist/packages/compiler/compiled-paths.js +7 -1
  82. package/dist/packages/compiler/compiled-pipeline.d.ts +7 -0
  83. package/dist/packages/compiler/compiled-pipeline.js +15 -4
  84. package/dist/packages/compiler/compiled-schema.js +1 -1
  85. package/dist/packages/compiler/compiled-stage-plan.d.ts +2 -2
  86. package/dist/packages/compiler/compiled-stage-plan.js +4 -4
  87. package/dist/packages/compiler/compiled-stage-runner.d.ts +5 -0
  88. package/dist/packages/compiler/compiled-stage-runner.js +50 -2
  89. package/dist/packages/compiler/compiled-target.d.ts +1 -1
  90. package/dist/packages/compiler/compiled-target.js +2 -2
  91. package/dist/packages/compiler/lib/schema.d.ts +161 -1
  92. package/dist/packages/compiler/lib/schema.js +87 -1
  93. package/dist/packages/compiler/raw-snapshot.d.ts +9 -2
  94. package/dist/packages/compiler/runtime-acceptance.js +1 -1
  95. package/dist/packages/compiler/runtime-contracts.js +2 -2
  96. package/dist/packages/compiler/runtime-prompt.js +6 -6
  97. package/dist/packages/compiler/runtime-reconcile.js +3 -3
  98. package/dist/packages/compiler/runtime-runs.js +3 -0
  99. package/dist/packages/compiler/runtime-types.d.ts +1 -0
  100. package/dist/packages/compiler/state-health.js +1 -1
  101. package/dist/packages/compiler/state-view.js +2 -2
  102. package/dist/packages/compiler/validate-compiled.js +11 -9
  103. package/dist/packages/execution/adapters.d.ts +15 -0
  104. package/dist/packages/execution/adapters.js +1 -0
  105. package/dist/packages/execution/events.d.ts +8 -0
  106. package/dist/packages/execution/events.js +16 -0
  107. package/dist/packages/execution/index.d.ts +9 -0
  108. package/dist/packages/execution/index.js +6 -0
  109. package/dist/packages/execution/lib/schema.d.ts +1554 -0
  110. package/dist/packages/execution/lib/schema.js +319 -0
  111. package/dist/packages/local-service/action-values.d.ts +23 -0
  112. package/dist/packages/local-service/action-values.js +31 -0
  113. package/dist/packages/local-service/client.d.ts +119 -0
  114. package/dist/packages/local-service/client.js +356 -0
  115. package/dist/packages/local-service/index.d.ts +15 -0
  116. package/dist/packages/local-service/index.js +11 -0
  117. package/dist/packages/local-service/lib/schema.d.ts +7355 -0
  118. package/dist/packages/local-service/lib/schema.js +636 -0
  119. package/dist/packages/local-service/routes.d.ts +27 -0
  120. package/dist/packages/local-service/routes.js +32 -0
  121. package/dist/packages/local-service/runtime.d.ts +134 -0
  122. package/dist/packages/local-service/runtime.js +2841 -0
  123. package/dist/packages/local-service/server.d.ts +17 -0
  124. package/dist/packages/local-service/server.js +572 -0
  125. package/dist/packages/project-model/index.d.ts +2 -1
  126. package/dist/packages/project-model/index.js +1 -0
  127. package/dist/packages/project-model/interf-detect.d.ts +6 -2
  128. package/dist/packages/project-model/interf-detect.js +25 -10
  129. package/dist/packages/project-model/interf-scaffold.js +9 -6
  130. package/dist/packages/project-model/interf.d.ts +1 -1
  131. package/dist/packages/project-model/interf.js +1 -1
  132. package/dist/packages/project-model/lib/schema.d.ts +80 -6
  133. package/dist/packages/project-model/lib/schema.js +29 -19
  134. package/dist/packages/project-model/source-config.d.ts +22 -13
  135. package/dist/packages/project-model/source-config.js +140 -123
  136. package/dist/packages/project-model/source-folders.d.ts +11 -0
  137. package/dist/packages/project-model/source-folders.js +110 -0
  138. package/dist/packages/testing/test-execution.js +5 -5
  139. package/dist/packages/testing/test-paths.js +1 -3
  140. package/dist/packages/workflow-authoring/workflow-authoring.d.ts +4 -6
  141. package/dist/packages/workflow-authoring/workflow-authoring.js +45 -86
  142. package/dist/packages/workflow-authoring/workflow-edit-session.d.ts +2 -0
  143. package/dist/packages/workflow-authoring/workflow-edit-session.js +80 -49
  144. package/dist/packages/workflow-authoring/workflow-improvement.js +2 -1
  145. package/dist/packages/workflow-package/context-interface.js +1 -1
  146. package/dist/packages/workflow-package/interf-workflow-package.d.ts +6 -0
  147. package/dist/packages/workflow-package/interf-workflow-package.js +115 -8
  148. package/dist/packages/workflow-package/local-workflows.js +33 -17
  149. package/dist/packages/workflow-package/workflow-definitions.d.ts +5 -5
  150. package/dist/packages/workflow-package/workflow-definitions.js +23 -22
  151. package/dist/packages/workflow-package/workflow-helpers.js +10 -6
  152. package/dist/packages/workflow-package/workflow-stage-runner.d.ts +1 -0
  153. package/dist/packages/workflow-package/workflow-stage-runner.js +2 -0
  154. package/package.json +17 -1
  155. package/dist/cli/commands/dataset-selection.d.ts +0 -6
  156. package/dist/cli/commands/dataset-selection.js +0 -11
  157. package/dist/lib/agent-args.d.ts +0 -1
  158. package/dist/lib/agent-args.js +0 -1
  159. package/dist/lib/agent-constants.d.ts +0 -1
  160. package/dist/lib/agent-constants.js +0 -1
  161. package/dist/lib/agent-detection.d.ts +0 -1
  162. package/dist/lib/agent-detection.js +0 -1
  163. package/dist/lib/agent-execution.d.ts +0 -1
  164. package/dist/lib/agent-execution.js +0 -1
  165. package/dist/lib/agent-logs.d.ts +0 -1
  166. package/dist/lib/agent-logs.js +0 -1
  167. package/dist/lib/agent-preflight.d.ts +0 -1
  168. package/dist/lib/agent-preflight.js +0 -1
  169. package/dist/lib/agent-render.d.ts +0 -1
  170. package/dist/lib/agent-render.js +0 -1
  171. package/dist/lib/agent-shells.d.ts +0 -1
  172. package/dist/lib/agent-shells.js +0 -1
  173. package/dist/lib/agent-status.d.ts +0 -1
  174. package/dist/lib/agent-status.js +0 -1
  175. package/dist/lib/agent-types.d.ts +0 -1
  176. package/dist/lib/agent-types.js +0 -1
  177. package/dist/lib/agents.d.ts +0 -1
  178. package/dist/lib/agents.js +0 -1
  179. package/dist/lib/builtin-compiled-workflow.d.ts +0 -1
  180. package/dist/lib/builtin-compiled-workflow.js +0 -1
  181. package/dist/lib/chart-guidance.d.ts +0 -1
  182. package/dist/lib/chart-guidance.js +0 -1
  183. package/dist/lib/compiled-compile.d.ts +0 -1
  184. package/dist/lib/compiled-compile.js +0 -1
  185. package/dist/lib/compiled-paths.d.ts +0 -1
  186. package/dist/lib/compiled-paths.js +0 -3
  187. package/dist/lib/compiled-raw.d.ts +0 -1
  188. package/dist/lib/compiled-raw.js +0 -3
  189. package/dist/lib/compiled-reset.d.ts +0 -1
  190. package/dist/lib/compiled-reset.js +0 -3
  191. package/dist/lib/compiled-schema.d.ts +0 -1
  192. package/dist/lib/compiled-schema.js +0 -1
  193. package/dist/lib/discovery.d.ts +0 -1
  194. package/dist/lib/discovery.js +0 -1
  195. package/dist/lib/execution-profile.d.ts +0 -1
  196. package/dist/lib/execution-profile.js +0 -1
  197. package/dist/lib/executors.d.ts +0 -1
  198. package/dist/lib/executors.js +0 -1
  199. package/dist/lib/filesystem.d.ts +0 -1
  200. package/dist/lib/filesystem.js +0 -1
  201. package/dist/lib/interf-bootstrap.d.ts +0 -1
  202. package/dist/lib/interf-bootstrap.js +0 -3
  203. package/dist/lib/interf-detect.d.ts +0 -1
  204. package/dist/lib/interf-detect.js +0 -3
  205. package/dist/lib/interf-scaffold.d.ts +0 -1
  206. package/dist/lib/interf-scaffold.js +0 -3
  207. package/dist/lib/interf-workflow-package.d.ts +0 -1
  208. package/dist/lib/interf-workflow-package.js +0 -1
  209. package/dist/lib/interf.d.ts +0 -1
  210. package/dist/lib/interf.js +0 -3
  211. package/dist/lib/local-workflows.d.ts +0 -1
  212. package/dist/lib/local-workflows.js +0 -1
  213. package/dist/lib/logger.d.ts +0 -1
  214. package/dist/lib/logger.js +0 -1
  215. package/dist/lib/package-root.d.ts +0 -1
  216. package/dist/lib/package-root.js +0 -1
  217. package/dist/lib/parse.d.ts +0 -1
  218. package/dist/lib/parse.js +0 -1
  219. package/dist/lib/project-paths.d.ts +0 -1
  220. package/dist/lib/project-paths.js +0 -3
  221. package/dist/lib/runtime-acceptance.d.ts +0 -1
  222. package/dist/lib/runtime-acceptance.js +0 -1
  223. package/dist/lib/runtime-contracts.d.ts +0 -1
  224. package/dist/lib/runtime-contracts.js +0 -1
  225. package/dist/lib/runtime-inventory.d.ts +0 -1
  226. package/dist/lib/runtime-inventory.js +0 -1
  227. package/dist/lib/runtime-paths.d.ts +0 -1
  228. package/dist/lib/runtime-paths.js +0 -1
  229. package/dist/lib/runtime-prompt.d.ts +0 -1
  230. package/dist/lib/runtime-prompt.js +0 -1
  231. package/dist/lib/runtime-reconcile.d.ts +0 -1
  232. package/dist/lib/runtime-reconcile.js +0 -1
  233. package/dist/lib/runtime-runs.d.ts +0 -1
  234. package/dist/lib/runtime-runs.js +0 -1
  235. package/dist/lib/runtime-types.d.ts +0 -1
  236. package/dist/lib/runtime-types.js +0 -1
  237. package/dist/lib/runtime.d.ts +0 -1
  238. package/dist/lib/runtime.js +0 -1
  239. package/dist/lib/schema.d.ts +0 -4
  240. package/dist/lib/schema.js +0 -6
  241. package/dist/lib/source-config.d.ts +0 -1
  242. package/dist/lib/source-config.js +0 -3
  243. package/dist/lib/state-artifacts.d.ts +0 -1
  244. package/dist/lib/state-artifacts.js +0 -1
  245. package/dist/lib/state-health.d.ts +0 -1
  246. package/dist/lib/state-health.js +0 -1
  247. package/dist/lib/state-io.d.ts +0 -1
  248. package/dist/lib/state-io.js +0 -1
  249. package/dist/lib/state-paths.d.ts +0 -1
  250. package/dist/lib/state-paths.js +0 -1
  251. package/dist/lib/state-view.d.ts +0 -1
  252. package/dist/lib/state-view.js +0 -1
  253. package/dist/lib/state.d.ts +0 -1
  254. package/dist/lib/state.js +0 -1
  255. package/dist/lib/test-execution.d.ts +0 -1
  256. package/dist/lib/test-execution.js +0 -3
  257. package/dist/lib/test-matrices.d.ts +0 -1
  258. package/dist/lib/test-matrices.js +0 -3
  259. package/dist/lib/test-paths.d.ts +0 -1
  260. package/dist/lib/test-paths.js +0 -3
  261. package/dist/lib/test-profile-presets.d.ts +0 -1
  262. package/dist/lib/test-profile-presets.js +0 -3
  263. package/dist/lib/test-sandbox.d.ts +0 -1
  264. package/dist/lib/test-sandbox.js +0 -3
  265. package/dist/lib/test-specs.d.ts +0 -1
  266. package/dist/lib/test-specs.js +0 -3
  267. package/dist/lib/test-targets.d.ts +0 -1
  268. package/dist/lib/test-targets.js +0 -3
  269. package/dist/lib/test-types.d.ts +0 -1
  270. package/dist/lib/test-types.js +0 -3
  271. package/dist/lib/test.d.ts +0 -1
  272. package/dist/lib/test.js +0 -3
  273. package/dist/lib/util.d.ts +0 -1
  274. package/dist/lib/util.js +0 -1
  275. package/dist/lib/validate-compiled.d.ts +0 -1
  276. package/dist/lib/validate-compiled.js +0 -1
  277. package/dist/lib/validate-helpers.d.ts +0 -1
  278. package/dist/lib/validate-helpers.js +0 -1
  279. package/dist/lib/validate.d.ts +0 -1
  280. package/dist/lib/validate.js +0 -1
  281. package/dist/lib/workflow-authoring.d.ts +0 -1
  282. package/dist/lib/workflow-authoring.js +0 -1
  283. package/dist/lib/workflow-definitions.d.ts +0 -1
  284. package/dist/lib/workflow-definitions.js +0 -1
  285. package/dist/lib/workflow-edit-session.d.ts +0 -1
  286. package/dist/lib/workflow-edit-session.js +0 -1
  287. package/dist/lib/workflow-edit-utils.d.ts +0 -1
  288. package/dist/lib/workflow-edit-utils.js +0 -1
  289. package/dist/lib/workflow-helpers.d.ts +0 -1
  290. package/dist/lib/workflow-helpers.js +0 -1
  291. package/dist/lib/workflow-improvement.d.ts +0 -1
  292. package/dist/lib/workflow-improvement.js +0 -1
  293. package/dist/lib/workflow-primitives.d.ts +0 -1
  294. package/dist/lib/workflow-primitives.js +0 -1
  295. package/dist/lib/workflow-review-paths.d.ts +0 -1
  296. package/dist/lib/workflow-review-paths.js +0 -1
  297. package/dist/lib/workflow-stage-policy.d.ts +0 -1
  298. package/dist/lib/workflow-stage-policy.js +0 -1
  299. package/dist/lib/workflow-stage-runner.d.ts +0 -1
  300. package/dist/lib/workflow-stage-runner.js +0 -1
  301. package/dist/lib/workflows.d.ts +0 -1
  302. package/dist/lib/workflows.js +0 -1
@@ -0,0 +1,636 @@
1
+ import { z } from "zod";
2
+ import { ArtifactRefSchema, CompileRunSchema, CompileRunStatusSchema, InterfRunEventSchema, ProofRecordSchema, RunObservabilitySchema, } from "../../execution/lib/schema.js";
3
+ import { DatasetNameSchema, PreparationNameSchema, SourceDatasetConfigSchema, SourcePreparationConfigSchema, SourceReadinessCheckSchema, } from "../../project-model/lib/schema.js";
4
+ import { TestRunComparisonSchema, TestRunModeSchema, } from "../../testing/lib/schema.js";
5
+ import { ReadinessStateSchema, SourceCompiledMaxAttemptsSchema, SourceCompiledMaxLoopsSchema, WorkflowIdSchema, } from "../../compiler/lib/schema.js";
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
+ export const LocalServiceHostSchema = z.string().min(1);
85
+ export const LocalServicePortSchema = z.number().int().min(1).max(65535);
86
+ export const LocalServiceConfigSchema = z.object({
87
+ host: LocalServiceHostSchema.default("127.0.0.1"),
88
+ port: LocalServicePortSchema.default(4873),
89
+ }).strict();
90
+ export const LocalServiceHealthSchema = z.object({
91
+ kind: z.literal("interf-local-service-health"),
92
+ version: z.literal(1),
93
+ status: z.literal("ok"),
94
+ host: LocalServiceHostSchema,
95
+ port: LocalServicePortSchema,
96
+ service_url: z.string().min(1),
97
+ control_path: z.string().min(1).optional(),
98
+ source_folder_path: z.string().min(1).nullable().optional(),
99
+ started_at: z.string().min(1).optional(),
100
+ package_version: z.string().min(1).optional(),
101
+ }).strict();
102
+ export const LocalServiceInstancePointerSchema = z.object({
103
+ service_url: z.string().min(1),
104
+ host: LocalServiceHostSchema,
105
+ port: LocalServicePortSchema,
106
+ pid: z.number().int().positive(),
107
+ control_path: z.string().min(1),
108
+ started_at: z.string().min(1),
109
+ }).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
+ export const PreparationReadinessStateSchema = ReadinessStateSchema;
118
+ export const PortableContextMappingSchema = z.object({
119
+ preparation: PreparationNameSchema,
120
+ path: z.string().min(1).nullable(),
121
+ exists: z.boolean(),
122
+ method_id: WorkflowIdSchema.nullable(),
123
+ latest_compile_run_id: z.string().min(1).nullable(),
124
+ latest_test_run_id: z.string().min(1).nullable(),
125
+ }).strict();
126
+ export const PreparationRunLinkageSchema = z.object({
127
+ latest_compile_run_id: z.string().min(1).nullable(),
128
+ latest_test_run_id: z.string().min(1).nullable(),
129
+ }).strict();
130
+ export const PreparationResourceSchema = z.object({
131
+ id: PreparationNameSchema,
132
+ name: PreparationNameSchema,
133
+ preparation: SourcePreparationConfigSchema,
134
+ source_path: z.string().min(1),
135
+ method_id: WorkflowIdSchema.nullable(),
136
+ checks: z.array(SourceReadinessCheckSchema).default([]),
137
+ portable_context: PortableContextMappingSchema,
138
+ portable_context_path: z.string().min(1).nullable(),
139
+ readiness: PreparationReadinessStateSchema,
140
+ runs: PreparationRunLinkageSchema,
141
+ latest_compile_run_id: z.string().min(1).nullable().optional(),
142
+ latest_test_run_id: z.string().min(1).nullable().optional(),
143
+ }).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
+ export const MethodResourceSchema = z.object({
164
+ id: WorkflowIdSchema,
165
+ method_id: WorkflowIdSchema,
166
+ path: z.string().min(1),
167
+ label: z.string().min(1).optional(),
168
+ hint: z.string().min(1).optional(),
169
+ source_kind: z.enum(["builtin", "local"]).default("local"),
170
+ built_in: z.boolean().default(false),
171
+ active_for_preparations: z.array(DatasetNameSchema).default([]),
172
+ stages: z.array(z.object({
173
+ id: z.string().min(1),
174
+ label: z.string().min(1),
175
+ description: z.string().min(1).optional(),
176
+ contract_type: z.string().min(1),
177
+ skill_dir: z.string().min(1),
178
+ reads: z.array(z.string().min(1)).default([]),
179
+ writes: z.array(z.string().min(1)).default([]),
180
+ acceptance: z.record(z.string(), z.unknown()).optional(),
181
+ }).strict()).default([]),
182
+ }).strict();
183
+ export const CompileRunCreateRequestSchema = z.preprocess(normalizePreparationMethodRequest, z.object({
184
+ preparation: PreparationNameSchema,
185
+ method: WorkflowIdSchema.optional(),
186
+ max_attempts: SourceCompiledMaxAttemptsSchema.optional(),
187
+ max_loops: SourceCompiledMaxLoopsSchema.optional(),
188
+ preserve_stage_shells: z.enum(["on-failure", "always"]).optional(),
189
+ }).strict());
190
+ export const CompileRunSummarySchema = z.object({
191
+ run_id: z.string().min(1),
192
+ status: CompileRunStatusSchema,
193
+ preparation: PreparationNameSchema,
194
+ method: WorkflowIdSchema,
195
+ portable_context_path: z.string().min(1),
196
+ started_at: z.string().nullable().optional(),
197
+ finished_at: z.string().nullable().optional(),
198
+ latest_event: InterfRunEventSchema.nullable().optional(),
199
+ latest_proof: ProofRecordSchema.nullable().optional(),
200
+ }).strict();
201
+ export const CompileRunResourceSchema = z.object({
202
+ run: CompileRunSchema,
203
+ }).strict();
204
+ export const LocalJobTypeSchema = z.enum([
205
+ "preparation-setup",
206
+ "readiness-check-draft",
207
+ "method-authoring",
208
+ "method-improvement",
209
+ "compile",
210
+ "test",
211
+ ]);
212
+ export const LocalJobStatusSchema = z.enum([
213
+ "queued",
214
+ "running",
215
+ "succeeded",
216
+ "failed",
217
+ "cancelled",
218
+ ]);
219
+ export const LocalRunHandlerResultSchema = z.object({
220
+ ok: z.boolean(),
221
+ error: z.string().min(1).optional(),
222
+ }).strict();
223
+ export const LocalJobAgentSchema = z.object({
224
+ name: z.string().min(1),
225
+ display_name: z.string().min(1),
226
+ command: z.string().min(1).nullable().optional(),
227
+ }).strict();
228
+ export const LocalExecutorOptionSchema = LocalJobAgentSchema.extend({
229
+ current: z.boolean(),
230
+ }).strict();
231
+ export const LocalJobStepSchema = z.object({
232
+ id: z.string().min(1),
233
+ label: z.string().min(1),
234
+ status: LocalJobStatusSchema,
235
+ started_at: z.string().nullable().optional(),
236
+ finished_at: z.string().nullable().optional(),
237
+ summary: z.string().min(1).nullable().optional(),
238
+ input: JsonObjectSchema.nullable().optional(),
239
+ output: JsonObjectSchema.nullable().optional(),
240
+ }).strict();
241
+ export const LocalJobEventTypeSchema = z.enum([
242
+ "job.started",
243
+ "step.started",
244
+ "log.appended",
245
+ "artifact.written",
246
+ "step.completed",
247
+ "step.failed",
248
+ "job.completed",
249
+ "job.failed",
250
+ ]);
251
+ export const LocalJobEventSchema = z.object({
252
+ event_id: z.string().min(1),
253
+ run_id: z.string().min(1),
254
+ timestamp: z.string().min(1),
255
+ type: LocalJobEventTypeSchema,
256
+ step_id: z.string().min(1).optional(),
257
+ message: z.string().min(1).optional(),
258
+ artifact: ArtifactRefSchema.optional(),
259
+ input: JsonObjectSchema.nullable().optional(),
260
+ output: JsonObjectSchema.nullable().optional(),
261
+ }).strict();
262
+ export const LocalJobRunCreateRequestSchema = z.preprocess(normalizePreparationMethodRequest, z.object({
263
+ job_type: LocalJobTypeSchema,
264
+ title: z.string().min(1),
265
+ preparation: PreparationNameSchema.nullable().optional(),
266
+ method: WorkflowIdSchema.nullable().optional(),
267
+ source_path: z.string().min(1).nullable().optional(),
268
+ output_path: z.string().min(1).nullable().optional(),
269
+ agent: LocalJobAgentSchema.nullable().optional(),
270
+ steps: z.array(z.object({
271
+ id: z.string().min(1),
272
+ label: z.string().min(1),
273
+ input: JsonObjectSchema.nullable().optional(),
274
+ }).strict()).default([]),
275
+ }).strict());
276
+ export const PreparationSetupCreateRequestSchema = z.preprocess(normalizePreparationObjectRequest, z.object({
277
+ preparation: SourcePreparationConfigSchema,
278
+ }).strict());
279
+ export const DatasetSetupCreateRequestSchema = PreparationSetupCreateRequestSchema;
280
+ export const ReadinessCheckDraftCreateRequestSchema = z.preprocess(normalizeWorkflowAuthoringRequest, z.object({
281
+ preparation: PreparationNameSchema,
282
+ source_folder_path: z.string().min(1),
283
+ about: z.string().min(1).optional(),
284
+ target_count: z.number().int().min(1).max(8).default(4),
285
+ }).strict());
286
+ export const ReadinessCheckDraftResultSchema = z.object({
287
+ checks: z.array(SourceReadinessCheckSchema).default([]),
288
+ }).strict();
289
+ export const WorkflowAuthoringCreateRequestSchema = z.preprocess(normalizeWorkflowAuthoringRequest, z.object({
290
+ preparation: PreparationNameSchema.nullable().optional(),
291
+ source_folder_path: z.string().min(1),
292
+ base_method_id: WorkflowIdSchema.optional(),
293
+ reference_method_id: WorkflowIdSchema.optional(),
294
+ method_id: WorkflowIdSchema,
295
+ label: z.string().min(1),
296
+ hint: z.string().min(1),
297
+ task_prompt: z.string().min(1),
298
+ checks: z.array(SourceReadinessCheckSchema).default([]),
299
+ }).strict());
300
+ export const WorkflowAuthoringResultSchema = z.object({
301
+ status: z.enum(["updated", "no-change", "invalid", "executor-failed"]),
302
+ changed: z.boolean(),
303
+ summary: z.string().min(1),
304
+ method_path: z.string().min(1),
305
+ shell_path: z.string().min(1),
306
+ validation: z.unknown().nullable().optional(),
307
+ }).strict();
308
+ export const LocalJobEventAppendRequestSchema = z.object({
309
+ type: LocalJobEventTypeSchema,
310
+ step_id: z.string().min(1).optional(),
311
+ message: z.string().min(1).optional(),
312
+ artifact: ArtifactRefSchema.optional(),
313
+ input: JsonObjectSchema.nullable().optional(),
314
+ output: JsonObjectSchema.nullable().optional(),
315
+ }).strict();
316
+ export const LocalJobRunResourceSchema = z.object({
317
+ kind: z.literal("interf-local-job-run"),
318
+ version: z.literal(1),
319
+ run_id: z.string().min(1),
320
+ job_type: LocalJobTypeSchema,
321
+ status: LocalJobStatusSchema,
322
+ title: z.string().min(1),
323
+ preparation: PreparationNameSchema.nullable().optional(),
324
+ method: WorkflowIdSchema.nullable().optional(),
325
+ source_path: z.string().min(1).nullable().optional(),
326
+ output_path: z.string().min(1).nullable().optional(),
327
+ agent: LocalJobAgentSchema.nullable().optional(),
328
+ created_at: z.string().min(1),
329
+ started_at: z.string().nullable().optional(),
330
+ finished_at: z.string().nullable().optional(),
331
+ steps: z.array(LocalJobStepSchema).default([]),
332
+ events: z.array(LocalJobEventSchema).default([]),
333
+ result: z.record(z.string(), z.unknown()).nullable().optional(),
334
+ error: z.string().min(1).nullable().optional(),
335
+ }).strict();
336
+ export const TestRunStatusSchema = z.enum([
337
+ "queued",
338
+ "running",
339
+ "succeeded",
340
+ "failed",
341
+ "cancelled",
342
+ ]);
343
+ export const TestRunCreateRequestSchema = z.preprocess(normalizePreparationMethodRequest, z.object({
344
+ preparation: PreparationNameSchema,
345
+ mode: TestRunModeSchema.default("both"),
346
+ }).strict());
347
+ export const TestRunResourceSchema = z.object({
348
+ run_id: z.string().min(1),
349
+ status: TestRunStatusSchema,
350
+ preparation: PreparationNameSchema,
351
+ mode: TestRunModeSchema,
352
+ source_path: z.string().min(1),
353
+ portable_context_path: z.string().min(1).nullable(),
354
+ started_at: z.string().nullable().optional(),
355
+ finished_at: z.string().nullable().optional(),
356
+ comparison: TestRunComparisonSchema.nullable(),
357
+ readiness: ReadinessStateSchema.nullable().optional(),
358
+ events: z.array(InterfRunEventSchema).default([]),
359
+ error: z.string().min(1).nullable().optional(),
360
+ }).strict();
361
+ export const RunObservabilityResourceSchema = RunObservabilitySchema;
362
+ export const RunCreateRequestSchema = z.preprocess(normalizePreparationMethodRequest, z.discriminatedUnion("run_type", [
363
+ z.object({
364
+ run_type: z.literal("compile"),
365
+ preparation: PreparationNameSchema,
366
+ method: WorkflowIdSchema.optional(),
367
+ max_attempts: SourceCompiledMaxAttemptsSchema.optional(),
368
+ max_loops: SourceCompiledMaxLoopsSchema.optional(),
369
+ preserve_stage_shells: z.enum(["on-failure", "always"]).optional(),
370
+ }).strict(),
371
+ z.object({
372
+ run_type: z.literal("prepare"),
373
+ preparation: PreparationNameSchema,
374
+ method: WorkflowIdSchema.optional(),
375
+ max_attempts: SourceCompiledMaxAttemptsSchema.optional(),
376
+ max_loops: SourceCompiledMaxLoopsSchema.optional(),
377
+ preserve_stage_shells: z.enum(["on-failure", "always"]).optional(),
378
+ }).strict(),
379
+ z.object({
380
+ run_type: z.literal("test"),
381
+ preparation: PreparationNameSchema,
382
+ mode: TestRunModeSchema.default("both"),
383
+ }).strict(),
384
+ z.object({
385
+ run_type: z.literal("check"),
386
+ preparation: PreparationNameSchema,
387
+ mode: TestRunModeSchema.default("both"),
388
+ }).strict(),
389
+ ]));
390
+ export const LocalExecutorStatusSchema = z.object({
391
+ kind: z.literal("interf-local-executor-status"),
392
+ version: z.literal(1),
393
+ status: z.enum(["connected", "unavailable"]),
394
+ checked_at: z.string().min(1),
395
+ executor: LocalJobAgentSchema.nullable(),
396
+ available_executors: z.array(LocalExecutorOptionSchema).default([]),
397
+ message: z.string().min(1),
398
+ }).strict();
399
+ export const LocalExecutorSelectRequestSchema = z.object({
400
+ agent: z.string().min(1),
401
+ }).strict();
402
+ export const ActionProposalTypeSchema = z.enum([
403
+ "clarification",
404
+ "preparation-setup",
405
+ "readiness-check-draft",
406
+ "method-authoring",
407
+ "method-improvement",
408
+ "compile",
409
+ "test",
410
+ ]);
411
+ export const ActionProposalStatusSchema = z.enum([
412
+ "needs_clarification",
413
+ "awaiting_approval",
414
+ "approved",
415
+ "denied",
416
+ "submitted",
417
+ "failed",
418
+ ]);
419
+ export const ActionProposalCreateRequestSchema = z.preprocess(normalizePreparationMethodRequest, z.object({
420
+ message: z.string().min(1),
421
+ preparation: PreparationNameSchema.optional(),
422
+ values: JsonObjectSchema.optional(),
423
+ }).strict());
424
+ export const ActionProposalPlanSchema = z.preprocess(normalizePublicActionType, z.object({
425
+ action_type: ActionProposalTypeSchema,
426
+ preparation: PreparationNameSchema.optional(),
427
+ method: WorkflowIdSchema.optional(),
428
+ values: JsonObjectSchema.optional(),
429
+ title: z.string().min(1).optional(),
430
+ summary: z.string().min(1).optional(),
431
+ assistant_message: z.string().min(1).optional(),
432
+ command_preview: z.string().min(1).optional(),
433
+ }).strict());
434
+ export const ActionProposalApprovalRequestSchema = z.object({
435
+ approved: z.boolean(),
436
+ note: z.string().min(1).optional(),
437
+ }).strict();
438
+ export const ActionProposalApprovalSchema = z.object({
439
+ approved: z.boolean(),
440
+ decided_at: z.string().min(1),
441
+ note: z.string().min(1).optional(),
442
+ }).strict();
443
+ const ActionProposalResourceBaseSchema = z.object({
444
+ kind: z.literal("interf-action-proposal"),
445
+ version: z.literal(1),
446
+ proposal_id: z.string().min(1),
447
+ status: ActionProposalStatusSchema,
448
+ title: z.string().min(1),
449
+ summary: z.string().min(1),
450
+ assistant_message: z.string().min(1).optional(),
451
+ command_preview: z.string().min(1).optional(),
452
+ message: z.string().min(1),
453
+ preparation: PreparationNameSchema.nullable().optional(),
454
+ method: WorkflowIdSchema.nullable().optional(),
455
+ created_at: z.string().min(1),
456
+ updated_at: z.string().min(1),
457
+ proposed_by_executor: LocalJobAgentSchema.nullable().optional(),
458
+ approval: ActionProposalApprovalSchema.nullable().optional(),
459
+ submitted_run_id: z.string().min(1).nullable().optional(),
460
+ submitted_run_type: z.enum(["compile-run", "test-run", "job-run"]).nullable().optional(),
461
+ error: z.string().min(1).nullable().optional(),
462
+ }).strict();
463
+ export const ActionProposalResourceSchema = z.discriminatedUnion("action_type", [
464
+ ActionProposalResourceBaseSchema.extend({
465
+ action_type: z.literal("clarification"),
466
+ request: JsonObjectSchema,
467
+ }).strict(),
468
+ ActionProposalResourceBaseSchema.extend({
469
+ action_type: z.literal("compile"),
470
+ request: CompileRunCreateRequestSchema,
471
+ }).strict(),
472
+ ActionProposalResourceBaseSchema.extend({
473
+ action_type: z.literal("preparation-setup"),
474
+ request: PreparationSetupCreateRequestSchema,
475
+ }).strict(),
476
+ ActionProposalResourceBaseSchema.extend({
477
+ action_type: z.literal("test"),
478
+ request: TestRunCreateRequestSchema,
479
+ }).strict(),
480
+ ActionProposalResourceBaseSchema.extend({
481
+ action_type: z.literal("readiness-check-draft"),
482
+ request: ReadinessCheckDraftCreateRequestSchema,
483
+ }).strict(),
484
+ ActionProposalResourceBaseSchema.extend({
485
+ action_type: z.literal("method-authoring"),
486
+ request: WorkflowAuthoringCreateRequestSchema,
487
+ }).strict(),
488
+ ActionProposalResourceBaseSchema.extend({
489
+ action_type: z.literal("method-improvement"),
490
+ request: WorkflowAuthoringCreateRequestSchema,
491
+ }).strict(),
492
+ ]);
493
+ export const PortableContextResourceSchema = z.object({
494
+ preparation: PreparationNameSchema,
495
+ path: z.string().min(1),
496
+ exists: z.boolean(),
497
+ readiness: ReadinessStateSchema,
498
+ method: WorkflowIdSchema.nullable().optional(),
499
+ latest_compile_run_id: z.string().min(1).nullable().optional(),
500
+ latest_test_run_id: z.string().min(1).nullable().optional(),
501
+ artifacts: z.array(ArtifactRefSchema).default([]),
502
+ }).strict();
503
+ export const ReadinessResourceSchema = PreparationReadinessStateSchema;
504
+ export const SourceFileResourceSchema = z.object({
505
+ preparation: PreparationNameSchema,
506
+ path: z.string().min(1),
507
+ absolute_path: z.string().min(1),
508
+ size_bytes: z.number().int().min(0),
509
+ modified_at: z.string().min(1).nullable(),
510
+ source_folder_path: z.string().min(1),
511
+ }).strict();
512
+ export const WorkspaceFileResourceSchema = z.object({
513
+ path: z.string().min(1),
514
+ absolute_path: z.string().min(1),
515
+ size_bytes: z.number().int().min(0),
516
+ modified_at: z.string().min(1).nullable(),
517
+ }).strict();
518
+ export const LocalServiceDiscoverySchema = z.object({
519
+ kind: z.literal("interf-local-service-discovery"),
520
+ version: z.literal(1),
521
+ resources: z.object({
522
+ preparations: z.string().min(1),
523
+ methods: z.string().min(1),
524
+ runs: z.string().min(1),
525
+ readiness: z.string().min(1),
526
+ portable_contexts: z.string().min(1),
527
+ source_files: z.string().min(1),
528
+ workspace_files: z.string().min(1),
529
+ action_proposals: z.string().min(1),
530
+ executor: z.string().min(1),
531
+ }).strict(),
532
+ }).strict();
533
+ export const OpenPathRequestSchema = z.object({
534
+ path: z.string().min(1),
535
+ }).strict();
536
+ export const OpenPathResponseSchema = z.object({
537
+ opened: z.boolean(),
538
+ path: z.string().min(1),
539
+ }).strict();
540
+ export const LocalServiceResourceSchema = z.discriminatedUnion("kind", [
541
+ z.object({
542
+ kind: z.literal("dataset"),
543
+ value: DatasetResourceSchema,
544
+ }).strict(),
545
+ z.object({
546
+ kind: z.literal("preparation"),
547
+ value: PreparationResourceSchema,
548
+ }).strict(),
549
+ z.object({
550
+ kind: z.literal("workflow-package"),
551
+ value: WorkflowPackageResourceSchema,
552
+ }).strict(),
553
+ z.object({
554
+ kind: z.literal("method"),
555
+ value: MethodResourceSchema,
556
+ }).strict(),
557
+ z.object({
558
+ kind: z.literal("compile-run"),
559
+ value: CompileRunResourceSchema,
560
+ }).strict(),
561
+ z.object({
562
+ kind: z.literal("job-run"),
563
+ value: LocalJobRunResourceSchema,
564
+ }).strict(),
565
+ z.object({
566
+ kind: z.literal("test-run"),
567
+ value: TestRunResourceSchema,
568
+ }).strict(),
569
+ z.object({
570
+ kind: z.literal("run-observability"),
571
+ value: RunObservabilityResourceSchema,
572
+ }).strict(),
573
+ z.object({
574
+ kind: z.literal("executor-status"),
575
+ value: LocalExecutorStatusSchema,
576
+ }).strict(),
577
+ z.object({
578
+ kind: z.literal("action-proposal"),
579
+ value: ActionProposalResourceSchema,
580
+ }).strict(),
581
+ z.object({
582
+ kind: z.literal("portable-context"),
583
+ value: PortableContextResourceSchema,
584
+ }).strict(),
585
+ z.object({
586
+ kind: z.literal("readiness"),
587
+ value: ReadinessResourceSchema,
588
+ }).strict(),
589
+ z.object({
590
+ kind: z.literal("source-file"),
591
+ value: SourceFileResourceSchema,
592
+ }).strict(),
593
+ z.object({
594
+ kind: z.literal("workspace-file"),
595
+ value: WorkspaceFileResourceSchema,
596
+ }).strict(),
597
+ ]);
598
+ export const DatasetListResponseSchema = z.object({
599
+ datasets: z.array(DatasetResourceSchema),
600
+ }).strict();
601
+ export const PreparationListResponseSchema = z.object({
602
+ preparations: z.array(PreparationResourceSchema),
603
+ }).strict();
604
+ export const WorkflowPackageListResponseSchema = z.object({
605
+ workflow_packages: z.array(WorkflowPackageResourceSchema),
606
+ }).strict();
607
+ export const MethodListResponseSchema = z.object({
608
+ methods: z.array(MethodResourceSchema),
609
+ }).strict();
610
+ export const CompileRunListResponseSchema = z.object({
611
+ compile_runs: z.array(CompileRunResourceSchema),
612
+ }).strict();
613
+ export const LocalJobRunListResponseSchema = z.object({
614
+ jobs: z.array(LocalJobRunResourceSchema),
615
+ }).strict();
616
+ export const TestRunListResponseSchema = z.object({
617
+ test_runs: z.array(TestRunResourceSchema),
618
+ }).strict();
619
+ export const RunObservabilityListResponseSchema = z.object({
620
+ runs: z.array(RunObservabilityResourceSchema),
621
+ }).strict();
622
+ export const ActionProposalListResponseSchema = z.object({
623
+ action_proposals: z.array(ActionProposalResourceSchema),
624
+ }).strict();
625
+ export const PortableContextListResponseSchema = z.object({
626
+ portable_contexts: z.array(PortableContextResourceSchema),
627
+ }).strict();
628
+ export const ReadinessListResponseSchema = z.object({
629
+ readiness: z.array(ReadinessResourceSchema),
630
+ }).strict();
631
+ export const SourceFileListResponseSchema = z.object({
632
+ source_files: z.array(SourceFileResourceSchema),
633
+ }).strict();
634
+ export const WorkspaceFileListResponseSchema = z.object({
635
+ workspace_files: z.array(WorkspaceFileResourceSchema),
636
+ }).strict();
@@ -0,0 +1,27 @@
1
+ export declare const LOCAL_SERVICE_DEFAULT_HOST = "127.0.0.1";
2
+ export declare const LOCAL_SERVICE_DEFAULT_PORT = 4873;
3
+ export declare const LOCAL_SERVICE_INSTANCE_POINTER_PATH: readonly ["interf", ".service", "local-instance.json"];
4
+ export declare const LOCAL_SERVICE_ROUTES: {
5
+ readonly root: "/";
6
+ readonly api: "/v1";
7
+ readonly health: "/health";
8
+ readonly preparations: "/v1/preparations";
9
+ readonly workspaceFiles: "/v1/workspace-files";
10
+ readonly sourceFiles: "/v1/source-files";
11
+ readonly methods: "/v1/methods";
12
+ readonly jobs: "/v1/jobs";
13
+ readonly readinessCheckDrafts: "/v1/readiness-check-drafts";
14
+ readonly methodAuthoringRuns: "/v1/method-authoring-runs";
15
+ readonly runs: "/v1/runs";
16
+ readonly executor: "/v1/executor";
17
+ readonly actionProposals: "/v1/action-proposals";
18
+ readonly compileRuns: "/v1/compile-runs";
19
+ readonly testRuns: "/v1/test-runs";
20
+ readonly portableContexts: "/v1/portable-contexts";
21
+ readonly readiness: "/v1/readiness";
22
+ readonly openPath: "/v1/open-path";
23
+ };
24
+ export declare function buildLocalServiceUrl(options?: {
25
+ host?: string;
26
+ port?: number;
27
+ }): string;
@@ -0,0 +1,32 @@
1
+ export const LOCAL_SERVICE_DEFAULT_HOST = "127.0.0.1";
2
+ export const LOCAL_SERVICE_DEFAULT_PORT = 4873;
3
+ export const LOCAL_SERVICE_INSTANCE_POINTER_PATH = [
4
+ "interf",
5
+ ".service",
6
+ "local-instance.json",
7
+ ];
8
+ export const LOCAL_SERVICE_ROUTES = {
9
+ root: "/",
10
+ api: "/v1",
11
+ health: "/health",
12
+ preparations: "/v1/preparations",
13
+ workspaceFiles: "/v1/workspace-files",
14
+ sourceFiles: "/v1/source-files",
15
+ methods: "/v1/methods",
16
+ jobs: "/v1/jobs",
17
+ readinessCheckDrafts: "/v1/readiness-check-drafts",
18
+ methodAuthoringRuns: "/v1/method-authoring-runs",
19
+ runs: "/v1/runs",
20
+ executor: "/v1/executor",
21
+ actionProposals: "/v1/action-proposals",
22
+ compileRuns: "/v1/compile-runs",
23
+ testRuns: "/v1/test-runs",
24
+ portableContexts: "/v1/portable-contexts",
25
+ readiness: "/v1/readiness",
26
+ openPath: "/v1/open-path",
27
+ };
28
+ export function buildLocalServiceUrl(options = {}) {
29
+ const host = options.host ?? LOCAL_SERVICE_DEFAULT_HOST;
30
+ const port = options.port ?? LOCAL_SERVICE_DEFAULT_PORT;
31
+ return `http://${host}:${port}`;
32
+ }