@interf/compiler 0.9.4 → 0.9.5

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 (103) hide show
  1. package/CHANGELOG.md +93 -0
  2. package/README.md +2 -1
  3. package/agent-skills/interf-actions/SKILL.md +17 -11
  4. package/agent-skills/interf-actions/references/cli.md +8 -22
  5. package/dist/cli/commands/action-input-cli.d.ts +25 -0
  6. package/dist/cli/commands/action-input-cli.js +73 -0
  7. package/dist/cli/commands/compile.d.ts +3 -8
  8. package/dist/cli/commands/compile.js +13 -41
  9. package/dist/cli/commands/create-method-wizard.d.ts +0 -12
  10. package/dist/cli/commands/create-method-wizard.js +95 -126
  11. package/dist/cli/commands/create.d.ts +0 -2
  12. package/dist/cli/commands/create.js +16 -22
  13. package/dist/cli/commands/doctor.js +1 -1
  14. package/dist/cli/commands/executor-flow.js +1 -1
  15. package/dist/cli/commands/init.d.ts +16 -1
  16. package/dist/cli/commands/init.js +40 -53
  17. package/dist/cli/commands/list.js +1 -1
  18. package/dist/cli/commands/preparation-action.d.ts +8 -0
  19. package/dist/cli/commands/preparation-action.js +29 -0
  20. package/dist/cli/commands/preparation-picker.d.ts +5 -0
  21. package/dist/cli/commands/preparation-picker.js +36 -0
  22. package/dist/cli/commands/preparation-selection.js +2 -2
  23. package/dist/cli/commands/reset.js +15 -4
  24. package/dist/cli/commands/service-action-flow.d.ts +9 -0
  25. package/dist/cli/commands/service-action-flow.js +19 -0
  26. package/dist/cli/commands/source-config-wizard.d.ts +0 -1
  27. package/dist/cli/commands/source-config-wizard.js +43 -53
  28. package/dist/cli/commands/status.js +7 -123
  29. package/dist/cli/commands/test.d.ts +1 -2
  30. package/dist/cli/commands/test.js +40 -203
  31. package/dist/cli/commands/web.js +8 -262
  32. package/dist/compiler-ui/404.html +1 -1
  33. package/dist/compiler-ui/__next.__PAGE__.txt +2 -2
  34. package/dist/compiler-ui/__next._full.txt +3 -3
  35. package/dist/compiler-ui/__next._head.txt +1 -1
  36. package/dist/compiler-ui/__next._index.txt +2 -2
  37. package/dist/compiler-ui/__next._tree.txt +2 -2
  38. package/dist/compiler-ui/_next/static/chunks/177mvn4rse235.js +89 -0
  39. package/dist/compiler-ui/_next/static/chunks/18a8f2jkv3z.c.css +3 -0
  40. package/dist/compiler-ui/_not-found/__next._full.txt +2 -2
  41. package/dist/compiler-ui/_not-found/__next._head.txt +1 -1
  42. package/dist/compiler-ui/_not-found/__next._index.txt +2 -2
  43. package/dist/compiler-ui/_not-found/__next._not-found.__PAGE__.txt +1 -1
  44. package/dist/compiler-ui/_not-found/__next._not-found.txt +1 -1
  45. package/dist/compiler-ui/_not-found/__next._tree.txt +2 -2
  46. package/dist/compiler-ui/_not-found.html +1 -1
  47. package/dist/compiler-ui/_not-found.txt +2 -2
  48. package/dist/compiler-ui/index.html +1 -1
  49. package/dist/compiler-ui/index.txt +3 -3
  50. package/dist/index.d.ts +0 -23
  51. package/dist/index.js +0 -16
  52. package/dist/packages/agents/lib/shells.js +2 -2
  53. package/dist/packages/compiler/lib/schema.d.ts +1 -1
  54. package/dist/packages/compiler/lib/schema.js +1 -1
  55. package/dist/packages/contracts/lib/schema.d.ts +0 -1
  56. package/dist/packages/contracts/lib/schema.js +0 -1
  57. package/dist/packages/execution/lib/schema.d.ts +0 -7
  58. package/dist/packages/execution/lib/schema.js +0 -1
  59. package/dist/packages/local-service/action-definitions.d.ts +246 -0
  60. package/dist/packages/local-service/action-definitions.js +1148 -0
  61. package/dist/packages/local-service/action-planner.d.ts +9 -0
  62. package/dist/packages/local-service/action-planner.js +134 -0
  63. package/dist/packages/local-service/action-values.d.ts +1 -23
  64. package/dist/packages/local-service/action-values.js +1 -31
  65. package/dist/packages/local-service/client.d.ts +48 -17
  66. package/dist/packages/local-service/client.js +95 -52
  67. package/dist/packages/local-service/index.d.ts +8 -5
  68. package/dist/packages/local-service/index.js +5 -3
  69. package/dist/packages/local-service/lib/schema.d.ts +301 -295
  70. package/dist/packages/local-service/lib/schema.js +114 -39
  71. package/dist/packages/local-service/native-run-handlers.d.ts +23 -0
  72. package/dist/{cli/commands/compile-controller.js → packages/local-service/native-run-handlers.js} +203 -19
  73. package/dist/{cli/commands/check-draft.d.ts → packages/local-service/readiness-check-draft.d.ts} +2 -2
  74. package/dist/packages/local-service/routes.d.ts +6 -1
  75. package/dist/packages/local-service/routes.js +7 -2
  76. package/dist/packages/local-service/run-observability.js +15 -17
  77. package/dist/packages/local-service/runtime.d.ts +10 -7
  78. package/dist/packages/local-service/runtime.js +427 -297
  79. package/dist/packages/local-service/server.js +94 -44
  80. package/dist/packages/method-package/method-review-paths.d.ts +1 -1
  81. package/dist/packages/method-package/method-review-paths.js +5 -5
  82. package/dist/packages/project-model/index.d.ts +1 -0
  83. package/dist/packages/project-model/index.js +1 -0
  84. package/dist/packages/project-model/preparation-entries.d.ts +11 -0
  85. package/dist/packages/project-model/preparation-entries.js +49 -0
  86. package/dist/packages/project-model/source-config.d.ts +1 -0
  87. package/dist/packages/project-model/source-config.js +12 -1
  88. package/dist/packages/testing/lib/schema.d.ts +2 -3
  89. package/dist/packages/testing/lib/schema.js +2 -3
  90. package/dist/packages/testing/readiness-check-run.d.ts +3 -3
  91. package/dist/packages/testing/readiness-check-run.js +12 -17
  92. package/package.json +5 -24
  93. package/dist/cli/commands/compile-controller.d.ts +0 -17
  94. package/dist/cli/commands/compiled-flow.d.ts +0 -25
  95. package/dist/cli/commands/compiled-flow.js +0 -112
  96. package/dist/cli/commands/test-flow.d.ts +0 -58
  97. package/dist/cli/commands/test-flow.js +0 -231
  98. package/dist/compiler-ui/_next/static/chunks/0d~8t0zm6545p.js +0 -118
  99. package/dist/compiler-ui/_next/static/chunks/0xnel.ax9a.2c.css +0 -3
  100. /package/dist/compiler-ui/_next/static/{j7pdoqWrl4YJrJUVnksbl → 84FaeF3EzBF9kKTMjSEVN}/_buildManifest.js +0 -0
  101. /package/dist/compiler-ui/_next/static/{j7pdoqWrl4YJrJUVnksbl → 84FaeF3EzBF9kKTMjSEVN}/_clientMiddlewareManifest.js +0 -0
  102. /package/dist/compiler-ui/_next/static/{j7pdoqWrl4YJrJUVnksbl → 84FaeF3EzBF9kKTMjSEVN}/_ssgManifest.js +0 -0
  103. /package/dist/{cli/commands/check-draft.js → packages/local-service/readiness-check-draft.js} +0 -0
package/dist/index.d.ts CHANGED
@@ -1,26 +1,3 @@
1
- export * as compiler from "./packages/compiler/index.js";
2
1
  export * as contracts from "./packages/contracts/index.js";
3
- export * as methods from "./packages/methods/index.js";
4
- export * as methodPackage from "./packages/method-package/index.js";
5
- export * as methodAuthoring from "./packages/method-authoring/index.js";
6
2
  export * as execution from "./packages/execution/index.js";
7
3
  export * as localService from "./packages/local-service/index.js";
8
- export * as projectModel from "./packages/project-model/index.js";
9
- export * as agents from "./packages/agents/index.js";
10
- export * as testing from "./packages/testing/index.js";
11
- export { createCompiled, } from "./packages/project-model/interf.js";
12
- export { compileCompiled, runCompiledSummarize, runCompiledCompile, } from "./packages/compiler/method-runs.js";
13
- export { createRawTestTarget, createCompiledTestTarget, listTestSpecs, loadTestSpec, loadTestSpecFromFile, writeTestSpec, listTestTargets, runTargetTests, runTargetTestsWithJudge, runTargetTestsAuto, saveTargetTestRun, } from "./packages/testing/test.js";
14
- export { computeCompiledHealth, } from "./packages/compiler/state.js";
15
- export { SOURCE_FOLDER_CONFIG_FILE, SOURCE_FOLDER_CONFIG_PATH, loadSourceFolderConfig, resolveSourceFolderConfigPath, sourceFolderConfigPath, buildTestSpecFromSourceFolderConfig, } from "./packages/project-model/source-config.js";
16
- export { validateCompiledSummarize, validateCompiledCompile, } from "./packages/compiler/validate.js";
17
- export { InterfConfigSchema, SourceFolderConfigSchema, } from "./packages/project-model/lib/schema.js";
18
- export { TestSpecSchema, } from "./packages/testing/lib/schema.js";
19
- export { CompiledHealthSchema, } from "./packages/compiler/lib/schema.js";
20
- export type { InterfConfig } from "./packages/project-model/lib/schema.js";
21
- export type { TestCase, TestSpec, TestCheckResult, TestCaseResult, TestTargetResult, TestTargetRun, LoadedTestSpec, TestTargetCandidate, } from "./packages/testing/index.js";
22
- export type { SourceReadinessCheck, SourcePreparationConfig, SourceFolderConfig, } from "./packages/project-model/lib/schema.js";
23
- export type { TestCaseExpect, } from "./packages/testing/lib/schema.js";
24
- export type { CompiledHealth, } from "./packages/compiler/lib/schema.js";
25
- export type { CompiledStageValidation, CompiledMethodValidation, } from "./packages/compiler/validate.js";
26
- export type { CompiledSummarizeResult, CompiledCompileResult, } from "./packages/compiler/method-runs.js";
package/dist/index.js CHANGED
@@ -1,19 +1,3 @@
1
- export * as compiler from "./packages/compiler/index.js";
2
1
  export * as contracts from "./packages/contracts/index.js";
3
- export * as methods from "./packages/methods/index.js";
4
- export * as methodPackage from "./packages/method-package/index.js";
5
- export * as methodAuthoring from "./packages/method-authoring/index.js";
6
2
  export * as execution from "./packages/execution/index.js";
7
3
  export * as localService from "./packages/local-service/index.js";
8
- export * as projectModel from "./packages/project-model/index.js";
9
- export * as agents from "./packages/agents/index.js";
10
- export * as testing from "./packages/testing/index.js";
11
- export { createCompiled, } from "./packages/project-model/interf.js";
12
- export { compileCompiled, runCompiledSummarize, runCompiledCompile, } from "./packages/compiler/method-runs.js";
13
- export { createRawTestTarget, createCompiledTestTarget, listTestSpecs, loadTestSpec, loadTestSpecFromFile, writeTestSpec, listTestTargets, runTargetTests, runTargetTestsWithJudge, runTargetTestsAuto, saveTargetTestRun, } from "./packages/testing/test.js";
14
- export { computeCompiledHealth, } from "./packages/compiler/state.js";
15
- export { SOURCE_FOLDER_CONFIG_FILE, SOURCE_FOLDER_CONFIG_PATH, loadSourceFolderConfig, resolveSourceFolderConfigPath, sourceFolderConfigPath, buildTestSpecFromSourceFolderConfig, } from "./packages/project-model/source-config.js";
16
- export { validateCompiledSummarize, validateCompiledCompile, } from "./packages/compiler/validate.js";
17
- export { InterfConfigSchema, SourceFolderConfigSchema, } from "./packages/project-model/lib/schema.js";
18
- export { TestSpecSchema, } from "./packages/testing/lib/schema.js";
19
- export { CompiledHealthSchema, } from "./packages/compiler/lib/schema.js";
@@ -956,8 +956,8 @@ export function createMethodImprovementShell(options) {
956
956
  if (reviewSources.executionShells) {
957
957
  copyIfExists(reviewSources.executionShells, join(shellRoot, "artifacts", "execution-shells"), "method-improvement");
958
958
  }
959
- if (reviewSources.testComparisons) {
960
- copyIfExists(reviewSources.testComparisons, join(shellRoot, "artifacts", "test-comparisons"), "method-improvement");
959
+ if (reviewSources.readinessRuns) {
960
+ copyIfExists(reviewSources.readinessRuns, join(shellRoot, "artifacts", "readiness-runs"), "method-improvement");
961
961
  }
962
962
  if (reviewSources.targetTestRuns) {
963
963
  copyIfExists(reviewSources.targetTestRuns, join(shellRoot, "artifacts", "test-runs"), "method-improvement");
@@ -475,7 +475,7 @@ export declare const MethodImprovementContextSchema: z.ZodObject<{
475
475
  review_paths: z.ZodObject<{
476
476
  method_root: z.ZodString;
477
477
  compiled_runtime: z.ZodNullable<z.ZodString>;
478
- test_comparisons: z.ZodNullable<z.ZodString>;
478
+ readiness_runs: z.ZodNullable<z.ZodString>;
479
479
  execution_shells: z.ZodNullable<z.ZodString>;
480
480
  test_runs: z.ZodNullable<z.ZodString>;
481
481
  test_sandboxes: z.ZodNullable<z.ZodString>;
@@ -260,7 +260,7 @@ export const MethodImprovementContextSchema = z.object({
260
260
  review_paths: z.object({
261
261
  method_root: z.string(),
262
262
  compiled_runtime: z.string().nullable(),
263
- test_comparisons: z.string().nullable(),
263
+ readiness_runs: z.string().nullable(),
264
264
  execution_shells: z.string().nullable(),
265
265
  test_runs: z.string().nullable(),
266
266
  test_sandboxes: z.string().nullable(),
@@ -139,7 +139,6 @@ export declare const ReadinessStateSchema: z.ZodObject<{
139
139
  run_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
140
140
  run_path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
141
141
  }, z.core.$strict>>;
142
- delta: z.ZodNullable<z.ZodNumber>;
143
142
  }, z.core.$strict>;
144
143
  checks: z.ZodDefault<z.ZodArray<z.ZodObject<{
145
144
  gate: z.ZodEnum<{
@@ -68,7 +68,6 @@ export const ReadinessStateSchema = z.object({
68
68
  fingerprint: z.string().min(1).nullable(),
69
69
  source_files: ReadinessTargetResultSchema.nullable(),
70
70
  portable_context: ReadinessTargetResultSchema.nullable(),
71
- delta: z.number().nullable(),
72
71
  }).strict(),
73
72
  checks: z.array(ReadinessCheckSchema).default([]),
74
73
  }).strict();
@@ -155,7 +155,6 @@ export declare const ObservableRunTypeSchema: z.ZodEnum<{
155
155
  compile: "compile";
156
156
  "method-authoring": "method-authoring";
157
157
  "method-improvement": "method-improvement";
158
- "preparation-setup": "preparation-setup";
159
158
  test: "test";
160
159
  "readiness-check-draft": "readiness-check-draft";
161
160
  job: "job";
@@ -223,7 +222,6 @@ export declare const RunObservabilitySchema: z.ZodObject<{
223
222
  compile: "compile";
224
223
  "method-authoring": "method-authoring";
225
224
  "method-improvement": "method-improvement";
226
- "preparation-setup": "preparation-setup";
227
225
  test: "test";
228
226
  "readiness-check-draft": "readiness-check-draft";
229
227
  job: "job";
@@ -351,7 +349,6 @@ export declare const RunObservabilitySchema: z.ZodObject<{
351
349
  run_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
352
350
  run_path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
353
351
  }, z.core.$strict>>;
354
- delta: z.ZodNullable<z.ZodNumber>;
355
352
  }, z.core.$strict>;
356
353
  checks: z.ZodDefault<z.ZodArray<z.ZodObject<{
357
354
  gate: z.ZodEnum<{
@@ -702,7 +699,6 @@ export declare const ReadinessUpdatedEventSchema: z.ZodObject<{
702
699
  run_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
703
700
  run_path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
704
701
  }, z.core.$strict>>;
705
- delta: z.ZodNullable<z.ZodNumber>;
706
702
  }, z.core.$strict>;
707
703
  checks: z.ZodDefault<z.ZodArray<z.ZodObject<{
708
704
  gate: z.ZodEnum<{
@@ -939,7 +935,6 @@ export declare const InterfRunEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
939
935
  run_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
940
936
  run_path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
941
937
  }, z.core.$strict>>;
942
- delta: z.ZodNullable<z.ZodNumber>;
943
938
  }, z.core.$strict>;
944
939
  checks: z.ZodDefault<z.ZodArray<z.ZodObject<{
945
940
  gate: z.ZodEnum<{
@@ -1368,7 +1363,6 @@ export declare const CompileRunSchema: z.ZodObject<{
1368
1363
  run_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1369
1364
  run_path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1370
1365
  }, z.core.$strict>>;
1371
- delta: z.ZodNullable<z.ZodNumber>;
1372
1366
  }, z.core.$strict>;
1373
1367
  checks: z.ZodDefault<z.ZodArray<z.ZodObject<{
1374
1368
  gate: z.ZodEnum<{
@@ -1495,7 +1489,6 @@ export declare const CompileRunSchema: z.ZodObject<{
1495
1489
  run_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1496
1490
  run_path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1497
1491
  }, z.core.$strict>>;
1498
- delta: z.ZodNullable<z.ZodNumber>;
1499
1492
  }, z.core.$strict>;
1500
1493
  checks: z.ZodDefault<z.ZodArray<z.ZodObject<{
1501
1494
  gate: z.ZodEnum<{
@@ -71,7 +71,6 @@ export const MethodTraceSchema = z.object({
71
71
  streams: z.array(MethodTraceStreamChunkSchema).default([]),
72
72
  }).strict();
73
73
  export const ObservableRunTypeSchema = z.enum([
74
- "preparation-setup",
75
74
  "compile",
76
75
  "test",
77
76
  "readiness-check-draft",
@@ -0,0 +1,246 @@
1
+ import { z } from "zod";
2
+ export declare const ActionValueIdPattern: RegExp;
3
+ export declare const ActionValueIdSchema: z.ZodString;
4
+ export declare const OptionalActionValueIdSchema: z.ZodString;
5
+ export declare const SourceReadinessCheckActionValueSchema: z.ZodObject<{
6
+ question: z.ZodString;
7
+ answer: z.ZodOptional<z.ZodString>;
8
+ }, z.core.$strict>;
9
+ export declare const PreparationSetupActionValuesSchema: z.ZodObject<{
10
+ name: z.ZodString;
11
+ path: z.ZodString;
12
+ about: z.ZodString;
13
+ method: z.ZodOptional<z.ZodString>;
14
+ checks: z.ZodOptional<z.ZodArray<z.ZodObject<{
15
+ question: z.ZodString;
16
+ answer: z.ZodOptional<z.ZodString>;
17
+ }, z.core.$strict>>>;
18
+ max_attempts: z.ZodOptional<z.ZodNumber>;
19
+ max_loops: z.ZodOptional<z.ZodNumber>;
20
+ readiness_notes: z.ZodOptional<z.ZodString>;
21
+ prepare_after_setup: z.ZodOptional<z.ZodBoolean>;
22
+ setup_mode: z.ZodOptional<z.ZodEnum<{
23
+ create: "create";
24
+ "select-method": "select-method";
25
+ }>>;
26
+ }, z.core.$strict>;
27
+ export declare const MethodAuthoringActionValuesSchema: z.ZodObject<{
28
+ method_id: z.ZodOptional<z.ZodString>;
29
+ base_method_id: z.ZodOptional<z.ZodString>;
30
+ reference_method_id: z.ZodOptional<z.ZodString>;
31
+ label: z.ZodOptional<z.ZodString>;
32
+ hint: z.ZodOptional<z.ZodString>;
33
+ task_prompt: z.ZodString;
34
+ portable_output: z.ZodOptional<z.ZodString>;
35
+ readiness_notes: z.ZodOptional<z.ZodString>;
36
+ }, z.core.$strict>;
37
+ export type PreparationSetupActionValues = z.infer<typeof PreparationSetupActionValuesSchema>;
38
+ export type MethodAuthoringActionValues = z.infer<typeof MethodAuthoringActionValuesSchema>;
39
+ export type SourceReadinessCheckActionValue = z.infer<typeof SourceReadinessCheckActionValueSchema>;
40
+ export declare const INTERF_SERVICE_ACTIONS: {
41
+ readonly createPreparation: {
42
+ readonly id: "create-preparation";
43
+ readonly serviceAction: "preparation-setup";
44
+ readonly title: "Create Preparation";
45
+ readonly description: "Save a Source Folder and agent job as a Preparation.";
46
+ };
47
+ readonly runPreparation: {
48
+ readonly id: "prepare-run";
49
+ readonly serviceAction: "compile";
50
+ readonly title: "Run Preparation";
51
+ readonly description: "Build portable context for a saved Preparation.";
52
+ };
53
+ readonly selectMethod: {
54
+ readonly id: "select-method";
55
+ readonly serviceAction: "preparation-setup";
56
+ readonly title: "Select Method";
57
+ readonly description: "Save the Method a Preparation should use for future prepare runs.";
58
+ };
59
+ readonly createMethod: {
60
+ readonly id: "create-method";
61
+ readonly serviceAction: "method-authoring";
62
+ readonly title: "Create Method";
63
+ readonly description: "Draft a reusable local Method for an agent-work pattern.";
64
+ };
65
+ readonly methodChange: {
66
+ readonly id: "method-change";
67
+ readonly serviceAction: "method-change";
68
+ readonly title: "Method Change";
69
+ readonly description: "Modify, duplicate, or remove an existing Method.";
70
+ };
71
+ readonly preparationChange: {
72
+ readonly id: "preparation-change";
73
+ readonly serviceAction: "preparation-change";
74
+ readonly title: "Preparation Change";
75
+ readonly description: "Modify, duplicate, or remove an existing Preparation.";
76
+ };
77
+ readonly confirmAction: {
78
+ readonly id: "confirm-action";
79
+ readonly serviceAction: "action-proposal";
80
+ readonly title: "Send Request";
81
+ readonly description: "Confirm the typed Interf service request before it runs.";
82
+ };
83
+ readonly checkReadiness: {
84
+ readonly id: "check-readiness";
85
+ readonly serviceAction: "test";
86
+ readonly title: "Check Readiness";
87
+ readonly description: "Run saved readiness checks against this Preparation.";
88
+ };
89
+ readonly draftReadinessChecks: {
90
+ readonly id: "draft-readiness-checks";
91
+ readonly serviceAction: "readiness-check-draft";
92
+ readonly title: "Draft Readiness Checks";
93
+ readonly description: "Ask the configured local executor to draft saved readiness checks.";
94
+ };
95
+ readonly improvePreparation: {
96
+ readonly id: "improve-preparation";
97
+ readonly serviceAction: "method-improvement";
98
+ readonly title: "Improve Preparation";
99
+ readonly description: "Use readiness evidence to improve the Method for this Preparation.";
100
+ };
101
+ };
102
+ export type InterfServiceActionKey = keyof typeof INTERF_SERVICE_ACTIONS;
103
+ export type InterfServiceActionId = typeof INTERF_SERVICE_ACTIONS[InterfServiceActionKey]["id"];
104
+ export declare function methodAuthoringTaskPrompt(values: MethodAuthoringActionValues): string;
105
+ export type ActionInputValues = Record<string, string>;
106
+ export type ActionValues = Record<string, unknown>;
107
+ export type ActionInputDraft = {
108
+ confirmed?: boolean;
109
+ preparation: string;
110
+ message: string;
111
+ values?: ActionValues;
112
+ };
113
+ export type ActionFieldOption = {
114
+ label: string;
115
+ value: string;
116
+ };
117
+ export type ActionFieldDefinition = {
118
+ advanced?: boolean;
119
+ context: string;
120
+ help: string;
121
+ label: string;
122
+ name: string;
123
+ options?: ActionFieldOption[];
124
+ placeholder?: string;
125
+ readOnly?: boolean;
126
+ rows?: number;
127
+ type: "text" | "textarea" | "select";
128
+ };
129
+ export type ActionInputDefinition = {
130
+ buildDraft: (values: ActionInputValues) => ActionInputDraft;
131
+ description: string;
132
+ fields: ActionFieldDefinition[];
133
+ id: string;
134
+ initialValues: ActionInputValues;
135
+ normalizeValues?: (values: ActionInputValues) => ActionInputValues;
136
+ schema: z.ZodType<ActionInputValues>;
137
+ submitLabel: string;
138
+ title: string;
139
+ validateRequest?: (values: ActionInputValues) => Record<string, string>;
140
+ valuesPreview: (values: ActionInputValues) => ActionValues;
141
+ };
142
+ export type MethodActionChoice = {
143
+ id: string;
144
+ label?: string | null;
145
+ };
146
+ export type CreatePreparationActionContext = {
147
+ existingNames: string[];
148
+ methods: MethodActionChoice[];
149
+ sourcePath: string;
150
+ suggestedName: string;
151
+ };
152
+ export type PrepareRunActionContext = {
153
+ about: string;
154
+ methodId: string;
155
+ name: string;
156
+ sourceFolderPath: string;
157
+ };
158
+ export type SelectMethodActionContext = {
159
+ about: string;
160
+ checks?: SourceReadinessCheckActionValue[];
161
+ currentMethodId: string;
162
+ maxAttempts?: number;
163
+ maxLoops?: number;
164
+ methods: MethodActionChoice[];
165
+ name: string;
166
+ sourceFolderPath: string;
167
+ };
168
+ export type CreateMethodActionContext = {
169
+ defaultPreparation: string;
170
+ existingMethodIds: string[];
171
+ suggestedMethodId: string;
172
+ };
173
+ export type MethodChangeAction = "modify" | "duplicate" | "remove";
174
+ export type PreparationChangeAction = "modify" | "duplicate" | "remove";
175
+ export type ReadinessAction = "check" | "draft-checks" | "improve";
176
+ export type MethodChangeActionContext = {
177
+ action: MethodChangeAction;
178
+ existingMethodIds: string[];
179
+ hint?: string | null;
180
+ label?: string | null;
181
+ methodId: string;
182
+ preparation: string;
183
+ };
184
+ export type PreparationChangeActionContext = {
185
+ about?: string | null;
186
+ action: PreparationChangeAction;
187
+ existingNames: string[];
188
+ methodId?: string | null;
189
+ preparation: string;
190
+ sourceFolderPath: string;
191
+ };
192
+ export declare function packageSchemaFieldErrors(result: z.ZodSafeParseResult<unknown>, pathMap: Record<string, string>): Record<string, string>;
193
+ export declare function slugForActionId(value: string): string;
194
+ export declare function uniqueActionId(seed: string, usedIds: Set<string>): string;
195
+ export declare function titleFromActionId(value: string): string;
196
+ export declare function maybeActionValue(value: string): string | undefined;
197
+ export declare function methodChoiceOptions(methods: MethodActionChoice[]): ActionFieldOption[];
198
+ export declare function methodTaskPromptFromInput(values: ActionInputValues): string;
199
+ export declare function preparationSetupRequestFromActionValues(input: unknown): {
200
+ preparation: {
201
+ about: string;
202
+ checks: SourceReadinessCheckActionValue[];
203
+ max_attempts?: number;
204
+ max_loops?: number;
205
+ method: string;
206
+ name: string;
207
+ path: string;
208
+ };
209
+ prepare_after_setup: boolean;
210
+ setup_mode: "create" | "select-method";
211
+ };
212
+ export declare function methodAuthoringRequestFromActionValues(input: unknown, context: {
213
+ checks?: SourceReadinessCheckActionValue[];
214
+ preparation?: string | null;
215
+ sourceFolderPath: string;
216
+ }): {
217
+ base_method_id?: string;
218
+ checks: SourceReadinessCheckActionValue[];
219
+ hint: string;
220
+ label: string;
221
+ method_id: string;
222
+ preparation?: string;
223
+ reference_method_id?: string;
224
+ source_folder_path: string;
225
+ task_prompt: string;
226
+ };
227
+ export declare function methodImprovementActionValues(options: {
228
+ checks?: SourceReadinessCheckActionValue[];
229
+ hint?: string;
230
+ label?: string;
231
+ methodId: string;
232
+ preparationName: string;
233
+ }): MethodAuthoringActionValues;
234
+ export declare function buildCreatePreparationActionDefinition(context: CreatePreparationActionContext): ActionInputDefinition;
235
+ export declare function buildPrepareRunActionDefinition(context: PrepareRunActionContext): ActionInputDefinition;
236
+ export declare function buildPrepareRunActionDraft(context: PrepareRunActionContext): ActionInputDraft;
237
+ export declare function buildSelectMethodActionDefinition(context: SelectMethodActionContext): ActionInputDefinition;
238
+ export declare function buildCreateMethodActionDefinition(context: CreateMethodActionContext): ActionInputDefinition;
239
+ export declare function buildMethodChangeActionDefinition(context: MethodChangeActionContext): ActionInputDefinition;
240
+ export declare function buildPreparationChangeActionDefinition(context: PreparationChangeActionContext): ActionInputDefinition;
241
+ export declare function buildConfirmActionDefinition(draft: ActionInputDraft): ActionInputDefinition;
242
+ export declare function buildReadinessActionDraft(options: {
243
+ action: ReadinessAction;
244
+ methodId?: string;
245
+ preparation: string;
246
+ }): ActionInputDraft;