@openapi-flow/langchain 0.3.18 → 0.4.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 (137) hide show
  1. package/README.md +21 -0
  2. package/dist/arguments/analyze-api-input-answers.js +34 -6
  3. package/dist/arguments/api-argument-planning-error.d.ts +11 -0
  4. package/dist/arguments/api-argument-planning-error.js +32 -0
  5. package/dist/arguments/assert-api-argument-generation-source.d.ts +4 -0
  6. package/dist/arguments/assert-api-argument-generation-source.js +16 -0
  7. package/dist/arguments/attribute-api-literal-generation-sources.d.ts +4 -0
  8. package/dist/arguments/attribute-api-literal-generation-sources.js +16 -0
  9. package/dist/arguments/create-api-argument-rejection.d.ts +3 -0
  10. package/dist/arguments/create-api-argument-rejection.js +38 -0
  11. package/dist/arguments/fingerprint-api-argument-source.d.ts +4 -0
  12. package/dist/arguments/fingerprint-api-argument-source.js +13 -0
  13. package/dist/arguments/generate-api-arguments.js +108 -40
  14. package/dist/arguments/interpret-api-argument-enums.js +1 -0
  15. package/dist/arguments/resolve-api-literal-generation-output.d.ts +3 -0
  16. package/dist/arguments/resolve-api-literal-generation-output.js +14 -0
  17. package/dist/bindings/plan-api-bindings-by-call.js +12 -3
  18. package/dist/bindings/plan-api-call-bindings.js +30 -9
  19. package/dist/bindings/select-api-binding-sources.js +32 -8
  20. package/dist/model/invoke-structured-model.js +32 -6
  21. package/dist/prompts/api-arguments-prompt.d.ts +2 -1
  22. package/dist/prompts/api-arguments-prompt.js +11 -1
  23. package/dist/prompts/api-input-answers-prompt.d.ts +1 -1
  24. package/dist/prompts/api-input-answers-prompt.js +8 -7
  25. package/dist/prompts/api-material-repair-prompt.d.ts +1 -0
  26. package/dist/prompts/api-material-repair-prompt.js +1 -0
  27. package/dist/prompts/incremental-workflow-connections-prompt.d.ts +2 -2
  28. package/dist/prompts/incremental-workflow-connections-prompt.js +5 -4
  29. package/dist/prompts/native-instance-selection-review-prompt.d.ts +1 -0
  30. package/dist/prompts/native-instance-selection-review-prompt.js +9 -0
  31. package/dist/prompts/native-node-planning-prompt.d.ts +1 -1
  32. package/dist/prompts/native-node-planning-prompt.js +2 -0
  33. package/dist/prompts/workflow-connection-goal-recovery-prompt.d.ts +1 -0
  34. package/dist/prompts/workflow-connection-goal-recovery-prompt.js +8 -0
  35. package/dist/prompts/workflow-connection-goal-review-prompt.d.ts +1 -0
  36. package/dist/prompts/workflow-connection-goal-review-prompt.js +7 -0
  37. package/dist/prompts/workflow-connection-native-repair-prompt.d.ts +1 -0
  38. package/dist/prompts/workflow-connection-native-repair-prompt.js +1 -0
  39. package/dist/prompts/workflow-connection-outline-prompt.d.ts +1 -0
  40. package/dist/prompts/workflow-connection-outline-prompt.js +6 -0
  41. package/dist/prompts/workflow-connection-revision-prompt.d.ts +1 -0
  42. package/dist/prompts/workflow-connection-revision-prompt.js +10 -0
  43. package/dist/public-api.d.ts +28 -0
  44. package/dist/public-api.js +21 -0
  45. package/dist/schemas/api-argument-rejection-schema.d.ts +28 -0
  46. package/dist/schemas/api-argument-rejection-schema.js +20 -0
  47. package/dist/schemas/api-input-answer-source-schema.d.ts +5 -5
  48. package/dist/schemas/api-input-answer-source-schema.js +14 -6
  49. package/dist/schemas/api-literal-generation-output-schema.d.ts +35 -4
  50. package/dist/schemas/api-literal-generation-output-schema.js +49 -14
  51. package/dist/schemas/create-connection-material-repair-choice-schema.d.ts +4 -0
  52. package/dist/schemas/create-connection-material-repair-choice-schema.js +23 -0
  53. package/dist/schemas/model-signal-schema.d.ts +3 -0
  54. package/dist/schemas/model-signal-schema.js +3 -0
  55. package/dist/schemas/native-node-parameter-contract.js +2 -0
  56. package/dist/schemas/native-node-planning-contract.js +30 -23
  57. package/dist/schemas/native-planning-rejection-schema.d.ts +11 -0
  58. package/dist/schemas/native-planning-rejection-schema.js +8 -0
  59. package/dist/schemas/workflow-connection-goal-recovery-schema.d.ts +4 -0
  60. package/dist/schemas/workflow-connection-goal-recovery-schema.js +16 -0
  61. package/dist/schemas/workflow-connection-goal-rejection-schema.d.ts +76 -0
  62. package/dist/schemas/workflow-connection-goal-rejection-schema.js +2 -1
  63. package/dist/schemas/workflow-connection-goal-review-schema.d.ts +4 -0
  64. package/dist/schemas/workflow-connection-goal-review-schema.js +26 -0
  65. package/dist/schemas/workflow-connection-goals-schema.d.ts +4 -2
  66. package/dist/schemas/workflow-connection-outline-rejection-schema.d.ts +25 -0
  67. package/dist/schemas/workflow-connection-outline-rejection-schema.js +21 -0
  68. package/dist/schemas/workflow-connection-outline-schema.d.ts +3 -0
  69. package/dist/schemas/workflow-connection-outline-schema.js +25 -0
  70. package/dist/schemas/workflow-connection-revision-rejection-schema.d.ts +113 -0
  71. package/dist/schemas/workflow-connection-revision-rejection-schema.js +23 -0
  72. package/dist/schemas/workflow-connection-revision-schema.d.ts +4 -0
  73. package/dist/schemas/workflow-connection-revision-schema.js +23 -0
  74. package/dist/schemas/workflow-connection-step-schema.d.ts +5 -3
  75. package/dist/schemas/workflow-connection-step-schema.js +62 -31
  76. package/dist/types/api-call-binding-planning.d.ts +2 -1
  77. package/dist/types/api-input-answers.d.ts +3 -6
  78. package/dist/types/argument-generation.d.ts +37 -12
  79. package/dist/types/incremental-connection-planning.d.ts +10 -3
  80. package/dist/types/native-instance-selection-review.d.ts +12 -0
  81. package/dist/types/native-instance-selection-review.js +1 -0
  82. package/dist/types/native-node-planning.d.ts +10 -2
  83. package/dist/types/native-planning-rejection.d.ts +21 -0
  84. package/dist/types/native-planning-rejection.js +1 -0
  85. package/dist/types/workflow-connection-goal-recovery.d.ts +22 -0
  86. package/dist/types/workflow-connection-goal-recovery.js +1 -0
  87. package/dist/types/workflow-connection-goal-review.d.ts +13 -0
  88. package/dist/types/workflow-connection-goal-review.js +1 -0
  89. package/dist/types/workflow-connection-native-repair.d.ts +16 -0
  90. package/dist/types/workflow-connection-native-repair.js +1 -0
  91. package/dist/types/workflow-connection-outline.d.ts +22 -0
  92. package/dist/types/workflow-connection-outline.js +1 -0
  93. package/dist/types/workflow-connection-revision.d.ts +34 -0
  94. package/dist/types/workflow-connection-revision.js +1 -0
  95. package/dist/workflow/connections/create-workflow-connection-goal-rejection.js +8 -2
  96. package/dist/workflow/connections/create-workflow-connection-outline-rejection.d.ts +3 -0
  97. package/dist/workflow/connections/create-workflow-connection-outline-rejection.js +28 -0
  98. package/dist/workflow/connections/create-workflow-connection-revision-rejection.d.ts +3 -0
  99. package/dist/workflow/connections/create-workflow-connection-revision-rejection.js +32 -0
  100. package/dist/workflow/connections/describe-workflow-connection-outline-request.d.ts +3 -0
  101. package/dist/workflow/connections/describe-workflow-connection-outline-request.js +30 -0
  102. package/dist/workflow/connections/generate-workflow-connection-native-parameters.d.ts +4 -0
  103. package/dist/workflow/connections/generate-workflow-connection-native-parameters.js +80 -0
  104. package/dist/workflow/connections/invoke-connection-planning-model.js +3 -0
  105. package/dist/workflow/connections/plan-workflow-connection-goal-recovery.d.ts +3 -0
  106. package/dist/workflow/connections/plan-workflow-connection-goal-recovery.js +111 -0
  107. package/dist/workflow/connections/plan-workflow-connection-goals.js +35 -16
  108. package/dist/workflow/connections/plan-workflow-connection-native-dependencies.d.ts +4 -0
  109. package/dist/workflow/connections/plan-workflow-connection-native-dependencies.js +73 -0
  110. package/dist/workflow/connections/plan-workflow-connection-outline.d.ts +4 -0
  111. package/dist/workflow/connections/plan-workflow-connection-outline.js +93 -0
  112. package/dist/workflow/connections/plan-workflow-connection-revision.d.ts +3 -0
  113. package/dist/workflow/connections/plan-workflow-connection-revision.js +163 -0
  114. package/dist/workflow/connections/plan-workflow-connection-step.js +75 -29
  115. package/dist/workflow/connections/resolve-connection-selections.d.ts +6 -0
  116. package/dist/workflow/connections/resolve-connection-selections.js +28 -0
  117. package/dist/workflow/connections/review-workflow-connection-goals.d.ts +4 -0
  118. package/dist/workflow/connections/review-workflow-connection-goals.js +64 -0
  119. package/dist/workflow/connections/validate-workflow-goal-review-feedback.d.ts +4 -0
  120. package/dist/workflow/connections/validate-workflow-goal-review-feedback.js +22 -0
  121. package/dist/workflow/connections/workflow-connection-native-repair-error.d.ts +6 -0
  122. package/dist/workflow/connections/workflow-connection-native-repair-error.js +18 -0
  123. package/dist/workflow/connections/workflow-connection-planning-error.d.ts +1 -0
  124. package/dist/workflow/connections/workflow-connection-planning-error.js +2 -0
  125. package/dist/workflow/native-selection/create-native-planning-rejection.d.ts +4 -0
  126. package/dist/workflow/native-selection/create-native-planning-rejection.js +45 -0
  127. package/dist/workflow/native-selection/describe-native-planning-request.d.ts +5 -0
  128. package/dist/workflow/native-selection/describe-native-planning-request.js +26 -0
  129. package/dist/workflow/native-selection/native-instance-selection-review-error.d.ts +6 -0
  130. package/dist/workflow/native-selection/native-instance-selection-review-error.js +18 -0
  131. package/dist/workflow/native-selection/review-native-instance-selection.d.ts +4 -0
  132. package/dist/workflow/native-selection/review-native-instance-selection.js +97 -0
  133. package/dist/workflow/native-selection/validate-native-planning-rejections.d.ts +2 -0
  134. package/dist/workflow/native-selection/validate-native-planning-rejections.js +14 -0
  135. package/dist/workflow/resolve-native-node-planning-output.js +3 -1
  136. package/dist/workflow/select-native-node-instances.js +44 -17
  137. package/package.json +2 -2
@@ -1,24 +1,24 @@
1
1
  import { z } from 'zod';
2
- import type { ApiInputRequirement, ApiInputSourceCatalog, ApiInputEnumAnswerChoice } from '@openapi-flow/core';
2
+ import type { ApiInputRequirement, ApiInputSourceCatalog, ApiInputEnumAnswerChoice, ApiInputMessageSourceCatalog, ApiInputSourceSelection } from '@openapi-flow/core';
3
3
  export declare const apiInputAnswerExplanationOptionsSchema: z.ZodObject<{
4
4
  includeExplanations: z.ZodOptional<z.ZodBoolean>;
5
5
  selectOasEnums: z.ZodOptional<z.ZodBoolean>;
6
6
  }, z.core.$strict>;
7
7
  /** Values and unanswered IDs are deliberately not model-owned output fields. */
8
- export declare function createApiInputAnswerSourceSchema(requirements: ApiInputRequirement[], catalog: ApiInputSourceCatalog, includeExplanations?: boolean, enumChoices?: ApiInputEnumAnswerChoice[]): z.ZodObject<{
8
+ export declare function createApiInputAnswerSourceSchema(requirements: ApiInputRequirement[], catalog: ApiInputSourceCatalog | undefined, includeExplanations?: boolean, enumChoices?: ApiInputEnumAnswerChoice[], messageSources?: ApiInputMessageSourceCatalog[]): z.ZodObject<{
9
9
  reason?: z.ZodString | undefined;
10
10
  answers: z.ZodArray<z.ZodObject<{
11
11
  reason?: z.ZodString | undefined;
12
12
  requirementId: z.ZodEnum<{
13
13
  [x: string]: string;
14
14
  }>;
15
- source: z.ZodUnion<z.ZodType<import("@openapi-flow/core").ApiInputJsonSourceSelection | import("@openapi-flow/core").ApiInputTextSourceSelection, unknown, z.core.$ZodTypeInternals<import("@openapi-flow/core").ApiInputJsonSourceSelection | import("@openapi-flow/core").ApiInputTextSourceSelection, unknown>>[]>;
15
+ source: z.ZodType<ApiInputSourceSelection, unknown, z.core.$ZodTypeInternals<ApiInputSourceSelection, unknown>>;
16
16
  }, z.core.$strict> | z.ZodUnion<readonly [z.ZodObject<{
17
17
  reason?: z.ZodString | undefined;
18
18
  requirementId: z.ZodEnum<{
19
19
  [x: string]: string;
20
20
  }>;
21
- source: z.ZodUnion<z.ZodType<import("@openapi-flow/core").ApiInputJsonSourceSelection | import("@openapi-flow/core").ApiInputTextSourceSelection, unknown, z.core.$ZodTypeInternals<import("@openapi-flow/core").ApiInputJsonSourceSelection | import("@openapi-flow/core").ApiInputTextSourceSelection, unknown>>[]>;
21
+ source: z.ZodType<ApiInputSourceSelection, unknown, z.core.$ZodTypeInternals<ApiInputSourceSelection, unknown>>;
22
22
  }, z.core.$strict>, ...z.ZodObject<{
23
23
  requirementId: z.ZodLiteral<string>;
24
24
  source: z.ZodObject<{
@@ -26,7 +26,7 @@ export declare function createApiInputAnswerSourceSchema(requirements: ApiInputR
26
26
  candidateId: z.ZodEnum<{
27
27
  [x: string]: string;
28
28
  }>;
29
- intent: z.ZodUnion<z.ZodType<import("@openapi-flow/core").ApiInputJsonSourceSelection | import("@openapi-flow/core").ApiInputTextSourceSelection, unknown, z.core.$ZodTypeInternals<import("@openapi-flow/core").ApiInputJsonSourceSelection | import("@openapi-flow/core").ApiInputTextSourceSelection, unknown>>[]>;
29
+ intent: z.ZodType<ApiInputSourceSelection, unknown, z.core.$ZodTypeInternals<ApiInputSourceSelection, unknown>>;
30
30
  }, z.core.$strict>;
31
31
  reason: z.ZodString;
32
32
  }, z.core.$strict>[]]>>;
@@ -1,23 +1,31 @@
1
1
  import { z } from 'zod';
2
- import { createApiInputSourceSelectionSchema } from '@openapi-flow/core';
2
+ import { createApiInputSourceSelectionSchema, createApiInputMessageSourceSelectionSchema, } from '@openapi-flow/core';
3
3
  export const apiInputAnswerExplanationOptionsSchema = z.strictObject({
4
4
  includeExplanations: z.boolean().optional(),
5
5
  selectOasEnums: z.boolean().optional(),
6
6
  });
7
7
  /** Values and unanswered IDs are deliberately not model-owned output fields. */
8
- export function createApiInputAnswerSourceSchema(requirements, catalog, includeExplanations = false, enumChoices = []) {
8
+ export function createApiInputAnswerSourceSchema(requirements, catalog, includeExplanations = false, enumChoices = [], messageSources) {
9
9
  const ids = requirements.map((item) => item.id);
10
10
  if (!ids.length || new Set(ids).size !== ids.length)
11
11
  throw new Error('Answer source schema requires distinct pending requirements');
12
12
  const reason = z
13
13
  .string()
14
14
  .min(1)
15
- .describe("A brief user-facing reason in the user's language, grounded only in this reply and the supplied pending questions. Instruction/schema language does not set the user's language. Never translate input values, identifiers or original source spans. Not a hidden reasoning trace or a claim that code validation passed.");
15
+ .describe("A brief user-facing reason in the user's language, grounded only in the original user sources and supplied pending questions. Separate reply context is not a quotation source when explicit messages are supplied. Instruction/schema language does not set the user's language. Never translate input values, identifiers or original source spans. Not a hidden reasoning trace or a claim that code validation passed.");
16
+ let sourceSchema;
17
+ if (messageSources !== undefined)
18
+ sourceSchema = createApiInputMessageSourceSelectionSchema(messageSources);
19
+ else {
20
+ if (catalog === undefined)
21
+ throw new Error('Answer source schema requires its original source catalog');
22
+ sourceSchema = createApiInputSourceSelectionSchema(catalog);
23
+ }
16
24
  const answer = z.strictObject({
17
25
  requirementId: z
18
26
  .enum(ids)
19
27
  .describe('The offered pending question answered by this exact source span.'),
20
- source: createApiInputSourceSelectionSchema(catalog),
28
+ source: sourceSchema,
21
29
  ...(includeExplanations ? { reason } : {}),
22
30
  });
23
31
  const enumAnswers = enumChoices.map((choice) => {
@@ -28,7 +36,7 @@ export function createApiInputAnswerSourceSchema(requirements, catalog, includeE
28
36
  source: z.strictObject({
29
37
  kind: z.literal('oas-enum'),
30
38
  candidateId: z.enum(choice.candidates.map((candidate) => candidate.id)),
31
- intent: createApiInputSourceSelectionSchema(catalog),
39
+ intent: sourceSchema,
32
40
  }),
33
41
  reason,
34
42
  });
@@ -36,7 +44,7 @@ export function createApiInputAnswerSourceSchema(requirements, catalog, includeE
36
44
  return z.strictObject({
37
45
  answers: z
38
46
  .array(enumAnswers.length ? z.union([answer, ...enumAnswers]) : answer)
39
- .describe('Select each answered pending question at most once. Return [] when the reply gives no complete requested value. Do not return a value field or fabricate missing inputs.'),
47
+ .describe('Select each answered pending question at most once. Return [] when the original sources give no complete requested value or supported enum intent. Do not return a value field or fabricate missing inputs.'),
40
48
  ...(includeExplanations ? { reason } : {}),
41
49
  });
42
50
  }
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
- import type { ApiArgumentGenerationContract, JsonObject } from '@openapi-flow/core';
3
- import type { ApiLiteralGenerationOutputSchema } from '../types/argument-generation.js';
2
+ import type { ApiArgumentGenerationContract, JsonObject, WorkflowSourceMessage } from '@openapi-flow/core';
3
+ import type { ApiLiteralGenerationOutputSchema, ApiLiteralGenerationSource } from '../types/argument-generation.js';
4
4
  export declare const apiLiteralGenerationOptionsSchema: z.ZodObject<{
5
5
  includeExplanations: z.ZodOptional<z.ZodBoolean>;
6
6
  selectOasEnums: z.ZodOptional<z.ZodBoolean>;
@@ -17,5 +17,36 @@ export declare const apiLiteralGenerationSourcesSchema: z.ZodArray<z.ZodObject<{
17
17
  sourceText: z.ZodString;
18
18
  targetPointer: z.ZodString;
19
19
  }, z.core.$strict>>;
20
- /** The core values schema is unchanged; only optional human-readable attribution is added. */
21
- export declare function createApiLiteralGenerationOutputSchema(contract: ApiArgumentGenerationContract, includeExplanations: boolean, requestSchema?: JsonObject): ApiLiteralGenerationOutputSchema;
20
+ export declare const apiLiteralNotProvidedSchema: z.ZodObject<{
21
+ state: z.ZodLiteral<"not-provided">;
22
+ }, z.core.$strict>;
23
+ export declare function createApiLiteralProvidedSchema(contract: ApiArgumentGenerationContract, messages?: WorkflowSourceMessage[]): z.ZodObject<{
24
+ state: z.ZodLiteral<"provided">;
25
+ values: z.ZodType<import("@openapi-flow/core").ApiArgumentValues, unknown, z.core.$ZodTypeInternals<import("@openapi-flow/core").ApiArgumentValues, unknown>>;
26
+ literalSources: z.ZodType<ApiLiteralGenerationSource[], unknown, z.core.$ZodTypeInternals<ApiLiteralGenerationSource[], unknown>>;
27
+ }, z.core.$strict>;
28
+ export declare function createApiTrackedLiteralGenerationSchema(contract: ApiArgumentGenerationContract, requestSchema: JsonObject, messages?: WorkflowSourceMessage[]): z.ZodObject<{
29
+ literalInputs: z.ZodUnion<readonly [z.ZodObject<{
30
+ state: z.ZodLiteral<"not-provided">;
31
+ }, z.core.$strict>, z.ZodObject<{
32
+ state: z.ZodLiteral<"provided">;
33
+ values: z.ZodType<import("@openapi-flow/core").ApiArgumentValues, unknown, z.core.$ZodTypeInternals<import("@openapi-flow/core").ApiArgumentValues, unknown>>;
34
+ literalSources: z.ZodType<ApiLiteralGenerationSource[], unknown, z.core.$ZodTypeInternals<ApiLiteralGenerationSource[], unknown>>;
35
+ }, z.core.$strict>]>;
36
+ requestedInputs: z.ZodArray<z.ZodString | z.ZodNever>;
37
+ }, z.core.$strict>;
38
+ export declare function createApiExplainedTrackedLiteralGenerationSchema(contract: ApiArgumentGenerationContract, requestSchema: JsonObject, messages?: WorkflowSourceMessage[]): z.ZodObject<{
39
+ literalInputs: z.ZodUnion<readonly [z.ZodObject<{
40
+ state: z.ZodLiteral<"not-provided">;
41
+ }, z.core.$strict>, z.ZodObject<{
42
+ state: z.ZodLiteral<"provided">;
43
+ values: z.ZodType<import("@openapi-flow/core").ApiArgumentValues, unknown, z.core.$ZodTypeInternals<import("@openapi-flow/core").ApiArgumentValues, unknown>>;
44
+ literalSources: z.ZodType<ApiLiteralGenerationSource[], unknown, z.core.$ZodTypeInternals<ApiLiteralGenerationSource[], unknown>>;
45
+ }, z.core.$strict>]>;
46
+ requestedInputs: z.ZodArray<z.ZodString | z.ZodNever>;
47
+ explanation: z.ZodObject<{
48
+ reason: z.ZodString;
49
+ }, z.core.$strict>;
50
+ }, z.core.$strict>;
51
+ /** Tracked generation separates absence from literal empty values; the OAS value contract stays unchanged. */
52
+ export declare function createApiLiteralGenerationOutputSchema(contract: ApiArgumentGenerationContract, includeExplanations: boolean, requestSchema?: JsonObject, messages?: WorkflowSourceMessage[]): ApiLiteralGenerationOutputSchema;
@@ -15,23 +15,58 @@ export const apiLiteralGenerationReasonSchema = z.strictObject({
15
15
  export const apiLiteralGenerationSourcesSchema = z.array(apiInputLiteralSourceSchema.extend({
16
16
  targetPointer: z
17
17
  .string()
18
- .describe('RFC 6901 pointer relative to values, e.g. /query/id, never /values/query/id. Cover each proposed literal leaf or an explicitly quoted whole object/array. Code verifies exact occurrence, JSON type equality and complete coverage. The original scenario is the only source; purpose and OAS values are not literal quotations.'),
18
+ .describe('RFC 6901 pointer relative to values, e.g. /query/id, never /values/query/id. Cover each proposed literal leaf or an explicitly quoted whole object/array. Code verifies exact occurrence, JSON type equality and complete coverage. Use literalSourceMessages when supplied; otherwise use the original scenario. Purpose, OAS and feedback are not literal quotations.'),
19
19
  }));
20
- /** The core values schema is unchanged; only optional human-readable attribution is added. */
21
- export function createApiLiteralGenerationOutputSchema(contract, includeExplanations, requestSchema) {
20
+ function createLiteralSourcesSchema(messages) {
21
+ if (messages === undefined || messages.length === 1)
22
+ return apiLiteralGenerationSourcesSchema.min(1);
23
+ const ids = messages.map((message) => message.id);
24
+ return z
25
+ .array(apiLiteralGenerationSourcesSchema.element.extend({
26
+ messageId: z
27
+ .enum(ids)
28
+ .describe('Select the supplied original message containing this exact quotation. Never cite scenario context or feedback instead.'),
29
+ }))
30
+ .min(1);
31
+ }
32
+ export const apiLiteralNotProvidedSchema = z.strictObject({
33
+ state: z
34
+ .literal('not-provided')
35
+ .describe('No request literal was supplied by the scenario for this call. Code owns the empty values and source list. Do not supply a placeholder body, values, or literalSources in this decision.'),
36
+ });
37
+ export function createApiLiteralProvidedSchema(contract, messages) {
38
+ return z.strictObject({
39
+ state: z.literal('provided'),
40
+ values: contract.valuesSchema.refine((values) => Object.entries(values).some(([group, value]) => group === 'body' ||
41
+ (value !== null &&
42
+ typeof value === 'object' &&
43
+ Object.keys(value).length > 0)), 'Provided literals require an actual request value, not empty parameter-location containers.'),
44
+ literalSources: createLiteralSourcesSchema(messages).describe('Every provided literal, including an empty object, empty array, empty string or null, needs its original exact user source. Never use a source-free placeholder.'),
45
+ });
46
+ }
47
+ export function createApiTrackedLiteralGenerationSchema(contract, requestSchema, messages) {
48
+ const provided = createApiLiteralProvidedSchema(contract, messages);
49
+ const schema = z.strictObject({
50
+ literalInputs: z.union([apiLiteralNotProvidedSchema, provided]),
51
+ requestedInputs: z
52
+ .array(createApiRequestInputPointerSchema(requestSchema))
53
+ .refine((pointers) => new Set(pointers).size === pointers.length)
54
+ .describe('Exact OAS request pointers explicitly requested for this call, even when the value is not given verbatim. Include requested optional inputs. Do not select unrequested filters, OAS defaults or examples. Code validates the original OAS and missing presence. This field contains paths, never values or bindings.'),
55
+ });
56
+ return schema;
57
+ }
58
+ export function createApiExplainedTrackedLiteralGenerationSchema(contract, requestSchema, messages) {
59
+ return createApiTrackedLiteralGenerationSchema(contract, requestSchema, messages).extend({
60
+ explanation: apiLiteralGenerationReasonSchema,
61
+ });
62
+ }
63
+ /** Tracked generation separates absence from literal empty values; the OAS value contract stays unchanged. */
64
+ export function createApiLiteralGenerationOutputSchema(contract, includeExplanations, requestSchema, messages) {
22
65
  z.boolean().parse(includeExplanations);
23
- if (requestSchema !== undefined) {
24
- const schema = contract.schema.extend({
25
- literalSources: apiLiteralGenerationSourcesSchema,
26
- requestedInputs: z
27
- .array(createApiRequestInputPointerSchema(requestSchema))
28
- .refine((pointers) => new Set(pointers).size === pointers.length)
29
- .describe('Exact OAS request pointers explicitly requested for this call, even when the value is not given verbatim. Include requested optional inputs. Do not select unrequested filters, OAS defaults or examples. Code validates the original OAS and missing presence. This field contains paths, never values or bindings.'),
30
- });
66
+ if (requestSchema !== undefined)
31
67
  return includeExplanations && contract.hasLiteralInputs
32
- ? schema.extend({ explanation: apiLiteralGenerationReasonSchema })
33
- : schema;
34
- }
68
+ ? createApiExplainedTrackedLiteralGenerationSchema(contract, requestSchema, messages)
69
+ : createApiTrackedLiteralGenerationSchema(contract, requestSchema, messages);
35
70
  return includeExplanations && contract.hasLiteralInputs
36
71
  ? contract.schema.extend({ explanation: apiLiteralGenerationReasonSchema })
37
72
  : contract.schema;
@@ -0,0 +1,4 @@
1
+ import { z } from 'zod';
2
+ import type { WorkflowConnectionMaterialRepairRequest, WorkflowConnectionMaterialRepairStage } from '@openapi-flow/core';
3
+ /** The same actual stage/identity choices serve initial goal recovery and accepted-session revision. */
4
+ export declare function createConnectionMaterialRepairChoiceSchema(stages: WorkflowConnectionMaterialRepairStage[], factIds: string[]): z.ZodType<WorkflowConnectionMaterialRepairRequest> | undefined;
@@ -0,0 +1,23 @@
1
+ import { z } from 'zod';
2
+ import { workflowConnectionMaterialRepairTargetSchema, workflowConnectionMaterialRepairRequestSchema, } from '@openapi-flow/core';
3
+ import { connectionChoicesSchema } from './connection-planning-field-schemas.js';
4
+ /** The same actual stage/identity choices serve initial goal recovery and accepted-session revision. */
5
+ export function createConnectionMaterialRepairChoiceSchema(stages, factIds) {
6
+ const targets = [];
7
+ for (const stage of stages) {
8
+ if (!stage.nodeIds.length)
9
+ continue;
10
+ targets.push(workflowConnectionMaterialRepairTargetSchema.extend({
11
+ stage: z
12
+ .literal(stage.stage)
13
+ .describe('Origin-stage ownership: api-bindings changes API producer references; api-arguments changes only API literals/requested inputs and retains bindings; native-dependencies changes native producer IDs and then regenerates its settings; native-parameters changes settings or pointers while retaining the existing producer IDs. Request native-dependencies for a producer substitution, not native-parameters alone.'),
14
+ nodeId: z.enum(stage.nodeIds),
15
+ }));
16
+ }
17
+ if (!targets.length)
18
+ return undefined;
19
+ return workflowConnectionMaterialRepairRequestSchema.extend({
20
+ targets: z.array(connectionChoicesSchema(targets)).min(1),
21
+ factIds: z.array(z.enum(factIds)).min(1),
22
+ });
23
+ }
@@ -0,0 +1,3 @@
1
+ import { z } from 'zod';
2
+ /** Runtime invocation configuration only; never included in model data or source fingerprints. */
3
+ export declare const modelSignalSchema: z.ZodOptional<z.ZodInstanceOf<AbortSignal>>;
@@ -0,0 +1,3 @@
1
+ import { z } from 'zod';
2
+ /** Runtime invocation configuration only; never included in model data or source fingerprints. */
3
+ export const modelSignalSchema = z.instanceof(AbortSignal).optional();
@@ -10,6 +10,8 @@ export function createNativeNodeParameterContract(capability, allowRuntimeParame
10
10
  };
11
11
  const schemas = [];
12
12
  const material = createNativePlanningCapabilityMaterial(capability, allowRuntimeParameters);
13
+ if (material.hasProvablyEmptyParameters)
14
+ return { schemas: [], material };
13
15
  if (allowRuntimeParameters && capability.supportsRuntimeParameters === true) {
14
16
  schemas.push(z.strictObject({
15
17
  ...identity,
@@ -6,37 +6,44 @@ export function createNativeNodePlanningContract(capabilities, allowRuntimeParam
6
6
  throw new Error('native planning schema requires supplied capabilities');
7
7
  const contracts = capabilities.map((capability) => createNativeNodeParameterContract(capability, allowRuntimeParameters));
8
8
  const nodes = contracts.flatMap((contract) => contract.schemas);
9
- const nodeSchema = z.union([nodes[0], ...nodes.slice(1)]);
9
+ const [first, ...rest] = nodes;
10
+ const nodeSchema = first === undefined ? undefined : z.union([first, ...rest]);
10
11
  const gaps = z
11
12
  .array(z.strictObject({
12
13
  description: nativeNodePlanningReasonSchema.describe('Describe a requested native behavior that cannot be represented and the missing capability or contract. Never a reminder to generate API requests, bindings or connections later.'),
13
14
  }))
14
15
  .describe('Blocking unmet native behavior only. Return [] when requested native behavior is representable. Selected OAS API calls are implemented separately; their bindings, request arguments and connections belong to later stages, not these gaps. Never invent missing data or substitute a capability.');
16
+ const noAdditions = z.strictObject({
17
+ noAdditionalNodesReason: nativeNodePlanningReasonSchema.describe('Why no NEW native instance is proposed, including when prepared nodes suffice or only unmet native requirements remain. Do not repeat supplied nodes or generate a fixed empty node array.'),
18
+ gaps,
19
+ });
20
+ const explainedDecision = nodeSchema === undefined
21
+ ? noAdditions
22
+ : z.union([
23
+ z.strictObject({
24
+ additions: z
25
+ .array(z.strictObject({
26
+ node: nodeSchema,
27
+ reason: nativeNodePlanningReasonSchema,
28
+ }))
29
+ .min(1)
30
+ .describe('Only NEW native instances required by the scenario. Code extracts node data and keeps the reason outside executable parameters.'),
31
+ gaps,
32
+ }),
33
+ noAdditions,
34
+ ]);
15
35
  const schema = includeExplanations
16
36
  ? z.strictObject({
17
- decision: z.union([
18
- z.strictObject({
19
- additions: z
20
- .array(z.strictObject({
21
- node: nodeSchema,
22
- reason: nativeNodePlanningReasonSchema,
23
- }))
24
- .min(1)
25
- .describe('Only NEW native instances required by the scenario. Code extracts node data and keeps the reason outside executable parameters.'),
26
- gaps,
27
- }),
28
- z.strictObject({
29
- noAdditionalNodesReason: nativeNodePlanningReasonSchema.describe('Why no NEW native instance is proposed, including when prepared nodes suffice or only unmet native requirements remain. Do not repeat supplied nodes or generate a fixed empty node array.'),
30
- gaps,
31
- }),
32
- ]),
37
+ decision: explainedDecision,
33
38
  })
34
- : z.strictObject({
35
- nativeNodes: z
36
- .array(nodeSchema)
37
- .describe('Only new instances required by the scenario, with values following the supplied implementation schema. No ports, output schemas, code or n8n JSON.'),
38
- gaps,
39
- });
39
+ : nodeSchema === undefined
40
+ ? z.strictObject({ gaps })
41
+ : z.strictObject({
42
+ nativeNodes: z
43
+ .array(nodeSchema)
44
+ .describe('Only new instances required by the scenario, with values following the supplied implementation schema. No ports, output schemas, code or n8n JSON.'),
45
+ gaps,
46
+ });
40
47
  return {
41
48
  schema,
42
49
  capabilities: contracts.map((contract) => contract.material),
@@ -0,0 +1,11 @@
1
+ import { z } from 'zod';
2
+ /** Private, lossless model-output feedback; not a public progress/error payload. */
3
+ export declare const nativePlanningRejectionSchema: z.ZodObject<{
4
+ stage: z.ZodEnum<{
5
+ "instance-selection": "instance-selection";
6
+ "selection-review": "selection-review";
7
+ }>;
8
+ requestFingerprint: z.ZodString;
9
+ output: z.ZodJSONSchema;
10
+ reason: z.ZodString;
11
+ }, z.core.$strict>;
@@ -0,0 +1,8 @@
1
+ import { z } from 'zod';
2
+ /** Private, lossless model-output feedback; not a public progress/error payload. */
3
+ export const nativePlanningRejectionSchema = z.strictObject({
4
+ stage: z.enum(['instance-selection', 'selection-review']),
5
+ requestFingerprint: z.string().regex(/^[a-f0-9]{64}$/u),
6
+ output: z.json(),
7
+ reason: z.string().min(1),
8
+ });
@@ -0,0 +1,4 @@
1
+ import { z } from 'zod';
2
+ import type { WorkflowConnectionGoalPlanningDescription } from '@openapi-flow/core';
3
+ import type { WorkflowConnectionGoalRecoveryModelOutput } from '../types/workflow-connection-goal-recovery.js';
4
+ export declare function createWorkflowConnectionGoalRecoverySchema(description: WorkflowConnectionGoalPlanningDescription): z.ZodType<WorkflowConnectionGoalRecoveryModelOutput>;
@@ -0,0 +1,16 @@
1
+ import { z } from 'zod';
2
+ import { createWorkflowConnectionGoalsSchema } from './workflow-connection-goals-schema.js';
3
+ import { createConnectionMaterialRepairChoiceSchema } from './create-connection-material-repair-choice-schema.js';
4
+ import { connectionChoicesSchema } from './connection-planning-field-schemas.js';
5
+ export function createWorkflowConnectionGoalRecoverySchema(description) {
6
+ const choices = [
7
+ z.strictObject({
8
+ kind: z.literal('goals'),
9
+ goals: createWorkflowConnectionGoalsSchema(description).shape.goals,
10
+ }),
11
+ ];
12
+ const material = createConnectionMaterialRepairChoiceSchema(description.materialRepairStages, description.requirements.map((fact) => fact.id));
13
+ if (material)
14
+ choices.push(material);
15
+ return z.strictObject({ decision: connectionChoicesSchema(choices) });
16
+ }
@@ -8,6 +8,82 @@ export declare const workflowConnectionGoalRejectionSchema: z.ZodDiscriminatedUn
8
8
  }, z.core.$strict>, z.ZodObject<{
9
9
  stage: z.ZodLiteral<"contract-validation">;
10
10
  code: z.ZodLiteral<"WORKFLOW_GRAPH_PLANNING_FAILED">;
11
+ constraints: z.ZodOptional<z.ZodObject<{
12
+ checkedScope: z.ZodLiteral<"necessary-node-order">;
13
+ dependencies: z.ZodArray<z.ZodObject<{
14
+ from: z.ZodString;
15
+ to: z.ZodString;
16
+ scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
17
+ kind: z.ZodLiteral<"node">;
18
+ }, z.core.$strict>, z.ZodObject<{
19
+ kind: z.ZodLiteral<"input-port">;
20
+ port: z.ZodString;
21
+ }, z.core.$strict>], "kind">;
22
+ origin: z.ZodDiscriminatedUnion<[z.ZodObject<{
23
+ kind: z.ZodLiteral<"value-reference">;
24
+ source: z.ZodEnum<{
25
+ response: "response";
26
+ "node-output": "node-output";
27
+ }>;
28
+ pointer: z.ZodString;
29
+ }, z.core.$strict>, z.ZodObject<{
30
+ kind: z.ZodLiteral<"native-dependency">;
31
+ }, z.core.$strict>, z.ZodObject<{
32
+ kind: z.ZodLiteral<"protected-connection">;
33
+ edgeId: z.ZodString;
34
+ }, z.core.$strict>, z.ZodObject<{
35
+ kind: z.ZodLiteral<"goal">;
36
+ goalIndex: z.ZodNumber;
37
+ factIds: z.ZodArray<z.ZodString>;
38
+ goalKind: z.ZodEnum<{
39
+ join: "join";
40
+ precedence: "precedence";
41
+ route: "route";
42
+ }>;
43
+ }, z.core.$strict>], "kind">;
44
+ }, z.core.$strict>>;
45
+ conflicts: z.ZodArray<z.ZodObject<{
46
+ code: z.ZodEnum<{
47
+ DEPENDENCY_CYCLE: "DEPENDENCY_CYCLE";
48
+ INDEPENDENCE_CONFLICT: "INDEPENDENCE_CONFLICT";
49
+ }>;
50
+ message: z.ZodString;
51
+ nodeIds: z.ZodArray<z.ZodString>;
52
+ goalIndexes: z.ZodArray<z.ZodNumber>;
53
+ dependencies: z.ZodArray<z.ZodObject<{
54
+ from: z.ZodString;
55
+ to: z.ZodString;
56
+ scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
57
+ kind: z.ZodLiteral<"node">;
58
+ }, z.core.$strict>, z.ZodObject<{
59
+ kind: z.ZodLiteral<"input-port">;
60
+ port: z.ZodString;
61
+ }, z.core.$strict>], "kind">;
62
+ origin: z.ZodDiscriminatedUnion<[z.ZodObject<{
63
+ kind: z.ZodLiteral<"value-reference">;
64
+ source: z.ZodEnum<{
65
+ response: "response";
66
+ "node-output": "node-output";
67
+ }>;
68
+ pointer: z.ZodString;
69
+ }, z.core.$strict>, z.ZodObject<{
70
+ kind: z.ZodLiteral<"native-dependency">;
71
+ }, z.core.$strict>, z.ZodObject<{
72
+ kind: z.ZodLiteral<"protected-connection">;
73
+ edgeId: z.ZodString;
74
+ }, z.core.$strict>, z.ZodObject<{
75
+ kind: z.ZodLiteral<"goal">;
76
+ goalIndex: z.ZodNumber;
77
+ factIds: z.ZodArray<z.ZodString>;
78
+ goalKind: z.ZodEnum<{
79
+ join: "join";
80
+ precedence: "precedence";
81
+ route: "route";
82
+ }>;
83
+ }, z.core.$strict>], "kind">;
84
+ }, z.core.$strict>>;
85
+ }, z.core.$strict>>;
86
+ }, z.core.$strict>>;
11
87
  sourceFingerprint: z.ZodString;
12
88
  output: z.ZodJSONSchema;
13
89
  reason: z.ZodString;
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { workflowConnectionStepExpectationSchema } from '@openapi-flow/core';
2
+ import { workflowConnectionStepExpectationSchema, workflowPlanningConstraintInspectionSchema, } from '@openapi-flow/core';
3
3
  /** Private planning feedback; never part of the public error JSON or progress projection. */
4
4
  const source = {
5
5
  sourceFingerprint: workflowConnectionStepExpectationSchema.shape.sourceFingerprint,
@@ -16,5 +16,6 @@ export const workflowConnectionGoalRejectionSchema = z.discriminatedUnion('stage
16
16
  ...source,
17
17
  stage: z.literal('contract-validation'),
18
18
  code: z.literal('WORKFLOW_GRAPH_PLANNING_FAILED'),
19
+ constraints: workflowPlanningConstraintInspectionSchema.optional(),
19
20
  }),
20
21
  ]);
@@ -0,0 +1,4 @@
1
+ import { z } from 'zod';
2
+ import type { WorkflowConnectionGoalReviewDescription } from '@openapi-flow/core';
3
+ import type { WorkflowConnectionGoalReviewModelOutput } from '../types/workflow-connection-goal-review.js';
4
+ export declare function createWorkflowConnectionGoalReviewSchema(description: WorkflowConnectionGoalReviewDescription): z.ZodType<WorkflowConnectionGoalReviewModelOutput>;
@@ -0,0 +1,26 @@
1
+ import { z } from 'zod';
2
+ import { workflowConnectionGoalAssessmentSchema } from '@openapi-flow/core';
3
+ export function createWorkflowConnectionGoalReviewSchema(description) {
4
+ const assessment = workflowConnectionGoalAssessmentSchema
5
+ .omit({ factId: true })
6
+ .extend({
7
+ policyIds: workflowConnectionGoalAssessmentSchema.shape.policyIds.describe('Select only supplied code-enforced policy IDs for clauses actually covered by that policy. A protected-edge policy does not prove data semantics or implementation of new connections.'),
8
+ goalIds: z
9
+ .array(z.enum(description.goals.map((goal) => goal.id)))
10
+ .describe('Select only actual candidate goals. An omitted requirement may have no matching goal.'),
11
+ sourceQuotes: z
12
+ .array(z.string().min(1))
13
+ .min(1)
14
+ .describe('Exact unchanged quotes from THIS original requirement, including any missing or contradicted clause.'),
15
+ reason: z
16
+ .string()
17
+ .min(1)
18
+ .describe('Brief evidence-based explanation comparing the entire original requirement with goals and actual mappings. Not private reasoning.'),
19
+ });
20
+ return z.strictObject({
21
+ assessments: z.strictObject(Object.fromEntries(description.requirements.map((fact) => [
22
+ fact.id,
23
+ assessment.describe(fact.text),
24
+ ]))),
25
+ });
26
+ }
@@ -1,4 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import type { WorkflowConnectionGoalPlanningDescription } from '@openapi-flow/core';
3
- import type { WorkflowConnectionGoalsModelOutput } from '../types/incremental-connection-planning.js';
4
- export declare function createWorkflowConnectionGoalsSchema(description: WorkflowConnectionGoalPlanningDescription): z.ZodType<WorkflowConnectionGoalsModelOutput>;
3
+ import type { WorkflowConnectionGoalSelection } from '../types/incremental-connection-planning.js';
4
+ export declare function createWorkflowConnectionGoalsSchema(description: WorkflowConnectionGoalPlanningDescription): z.ZodObject<{
5
+ goals: z.ZodArray<z.ZodType<WorkflowConnectionGoalSelection, unknown, z.core.$ZodTypeInternals<WorkflowConnectionGoalSelection, unknown>>>;
6
+ }, z.core.$strict>;
@@ -0,0 +1,25 @@
1
+ import { z } from 'zod';
2
+ /** Exact private proposal feedback, never a public progress or error payload. */
3
+ export declare const workflowConnectionOutlineRejectionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
4
+ requestFingerprint: z.ZodString;
5
+ expected: z.ZodObject<{
6
+ sessionId: z.ZodUUID;
7
+ sourceFingerprint: z.ZodString;
8
+ revision: z.ZodNumber;
9
+ }, z.core.$strict>;
10
+ stage: z.ZodLiteral<"model-output">;
11
+ code: z.ZodLiteral<"MODEL_OUTPUT_INVALID">;
12
+ output: z.ZodJSONSchema;
13
+ reason: z.ZodString;
14
+ }, z.core.$strict>, z.ZodObject<{
15
+ requestFingerprint: z.ZodString;
16
+ expected: z.ZodObject<{
17
+ sessionId: z.ZodUUID;
18
+ sourceFingerprint: z.ZodString;
19
+ revision: z.ZodNumber;
20
+ }, z.core.$strict>;
21
+ stage: z.ZodLiteral<"contract-validation">;
22
+ code: z.ZodLiteral<"WORKFLOW_GRAPH_PLANNING_FAILED">;
23
+ output: z.ZodJSONSchema;
24
+ reason: z.ZodString;
25
+ }, z.core.$strict>], "stage">;
@@ -0,0 +1,21 @@
1
+ import { z } from 'zod';
2
+ import { workflowConnectionStepExpectationSchema } from '@openapi-flow/core';
3
+ /** Exact private proposal feedback, never a public progress or error payload. */
4
+ export const workflowConnectionOutlineRejectionSchema = z.discriminatedUnion('stage', [
5
+ z.strictObject({
6
+ requestFingerprint: z.string().regex(/^[a-f0-9]{64}$/),
7
+ expected: workflowConnectionStepExpectationSchema,
8
+ stage: z.literal('model-output'),
9
+ code: z.literal('MODEL_OUTPUT_INVALID'),
10
+ output: z.json(),
11
+ reason: z.string().min(1),
12
+ }),
13
+ z.strictObject({
14
+ requestFingerprint: z.string().regex(/^[a-f0-9]{64}$/),
15
+ expected: workflowConnectionStepExpectationSchema,
16
+ stage: z.literal('contract-validation'),
17
+ code: z.literal('WORKFLOW_GRAPH_PLANNING_FAILED'),
18
+ output: z.json(),
19
+ reason: z.string().min(1),
20
+ }),
21
+ ]);
@@ -0,0 +1,3 @@
1
+ import { z } from 'zod';
2
+ import type { WorkflowConnectionStepDescription, WorkflowConnectionOutlineProposal } from '@openapi-flow/core';
3
+ export declare function createWorkflowConnectionOutlineSchema(description: WorkflowConnectionStepDescription): z.ZodType<WorkflowConnectionOutlineProposal>;
@@ -0,0 +1,25 @@
1
+ import { z } from 'zod';
2
+ import { workflowConnectionOutlineBundleProposalSchema, workflowConnectionOutlineProposalSchema, } from '@openapi-flow/core';
3
+ import { connectionIdListSchema } from './connection-planning-field-schemas.js';
4
+ export function createWorkflowConnectionOutlineSchema(description) {
5
+ const ids = description.context.nodes.map((node) => node.id);
6
+ if (!ids.length)
7
+ throw new Error('Outline planning requires actual supplied nodes');
8
+ const bundle = workflowConnectionOutlineBundleProposalSchema.extend({
9
+ nodeIds: z
10
+ .array(z.enum(ids))
11
+ .min(1)
12
+ .describe('Choose actual node anchors for a coherent planning task. Shared boundary nodes may appear in several tasks.'),
13
+ goalIds: connectionIdListSchema(description.goals.map((goal) => goal.id)).describe('Select actual current goals addressed by this task; all goals must appear somewhere in the outline.'),
14
+ factIds: z
15
+ .array(z.enum(description.requirements.map((fact) => fact.id)))
16
+ .min(1)
17
+ .describe('Select unchanged original requirement IDs supporting this task; never create replacement requirements.'),
18
+ });
19
+ return workflowConnectionOutlineProposalSchema.extend({
20
+ bundles: z
21
+ .array(bundle)
22
+ .min(1)
23
+ .describe('Cover all supplied node, goal and fact identities with planning tasks. Array order is not execution order.'),
24
+ });
25
+ }