@remoraflow/core 0.1.0

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 (77) hide show
  1. package/LICENSE +674 -0
  2. package/README.md +110 -0
  3. package/dist/compiler/index.d.ts +25 -0
  4. package/dist/compiler/index.d.ts.map +1 -0
  5. package/dist/compiler/passes/apply-best-practices.d.ts +19 -0
  6. package/dist/compiler/passes/apply-best-practices.d.ts.map +1 -0
  7. package/dist/compiler/passes/build-graph.d.ts +7 -0
  8. package/dist/compiler/passes/build-graph.d.ts.map +1 -0
  9. package/dist/compiler/passes/generate-constrained-tool-schemas.d.ts +4 -0
  10. package/dist/compiler/passes/generate-constrained-tool-schemas.d.ts.map +1 -0
  11. package/dist/compiler/passes/validate-control-flow.d.ts +4 -0
  12. package/dist/compiler/passes/validate-control-flow.d.ts.map +1 -0
  13. package/dist/compiler/passes/validate-foreach-target.d.ts +4 -0
  14. package/dist/compiler/passes/validate-foreach-target.d.ts.map +1 -0
  15. package/dist/compiler/passes/validate-jmespath.d.ts +4 -0
  16. package/dist/compiler/passes/validate-jmespath.d.ts.map +1 -0
  17. package/dist/compiler/passes/validate-limits.d.ts +9 -0
  18. package/dist/compiler/passes/validate-limits.d.ts.map +1 -0
  19. package/dist/compiler/passes/validate-references.d.ts +4 -0
  20. package/dist/compiler/passes/validate-references.d.ts.map +1 -0
  21. package/dist/compiler/passes/validate-tools.d.ts +4 -0
  22. package/dist/compiler/passes/validate-tools.d.ts.map +1 -0
  23. package/dist/compiler/types.d.ts +100 -0
  24. package/dist/compiler/types.d.ts.map +1 -0
  25. package/dist/compiler/utils/graph.d.ts +35 -0
  26. package/dist/compiler/utils/graph.d.ts.map +1 -0
  27. package/dist/compiler/utils/jmespath-helpers.d.ts +34 -0
  28. package/dist/compiler/utils/jmespath-helpers.d.ts.map +1 -0
  29. package/dist/compiler/utils/schema.d.ts +33 -0
  30. package/dist/compiler/utils/schema.d.ts.map +1 -0
  31. package/dist/example-tasks.d.ts +834 -0
  32. package/dist/example-tasks.d.ts.map +1 -0
  33. package/dist/executor/context.d.ts +42 -0
  34. package/dist/executor/context.d.ts.map +1 -0
  35. package/dist/executor/errors.d.ts +57 -0
  36. package/dist/executor/errors.d.ts.map +1 -0
  37. package/dist/executor/executor-types.d.ts +117 -0
  38. package/dist/executor/executor-types.d.ts.map +1 -0
  39. package/dist/executor/helpers.d.ts +21 -0
  40. package/dist/executor/helpers.d.ts.map +1 -0
  41. package/dist/executor/index.d.ts +16 -0
  42. package/dist/executor/index.d.ts.map +1 -0
  43. package/dist/executor/schema-inference.d.ts +3 -0
  44. package/dist/executor/schema-inference.d.ts.map +1 -0
  45. package/dist/executor/state.d.ts +292 -0
  46. package/dist/executor/state.d.ts.map +1 -0
  47. package/dist/executor/steps/agent-loop.d.ts +15 -0
  48. package/dist/executor/steps/agent-loop.d.ts.map +1 -0
  49. package/dist/executor/steps/end.d.ts +5 -0
  50. package/dist/executor/steps/end.d.ts.map +1 -0
  51. package/dist/executor/steps/extract-data.d.ts +15 -0
  52. package/dist/executor/steps/extract-data.d.ts.map +1 -0
  53. package/dist/executor/steps/for-each.d.ts +11 -0
  54. package/dist/executor/steps/for-each.d.ts.map +1 -0
  55. package/dist/executor/steps/llm-prompt.d.ts +13 -0
  56. package/dist/executor/steps/llm-prompt.d.ts.map +1 -0
  57. package/dist/executor/steps/sleep.d.ts +7 -0
  58. package/dist/executor/steps/sleep.d.ts.map +1 -0
  59. package/dist/executor/steps/start.d.ts +2 -0
  60. package/dist/executor/steps/start.d.ts.map +1 -0
  61. package/dist/executor/steps/switch-case.d.ts +11 -0
  62. package/dist/executor/steps/switch-case.d.ts.map +1 -0
  63. package/dist/executor/steps/tool-call.d.ts +9 -0
  64. package/dist/executor/steps/tool-call.d.ts.map +1 -0
  65. package/dist/executor/steps/wait-for-condition.d.ts +8 -0
  66. package/dist/executor/steps/wait-for-condition.d.ts.map +1 -0
  67. package/dist/generator/index.d.ts +59 -0
  68. package/dist/generator/index.d.ts.map +1 -0
  69. package/dist/generator/prompt.d.ts +6 -0
  70. package/dist/generator/prompt.d.ts.map +1 -0
  71. package/dist/lib.d.ts +15 -0
  72. package/dist/lib.d.ts.map +1 -0
  73. package/dist/lib.js +3566 -0
  74. package/dist/lib.js.map +42 -0
  75. package/dist/types.d.ts +481 -0
  76. package/dist/types.d.ts.map +1 -0
  77. package/package.json +54 -0
@@ -0,0 +1,11 @@
1
+ import type { WorkflowStep } from "../../types";
2
+ import type { DurableContext } from "../context";
3
+ import type { ExecuteChainFn, ExecutionStateManager, ResolvedExecuteWorkflowOptions } from "../executor-types";
4
+ import type { ExecutionPathSegment } from "../state";
5
+ export declare function executeForEach(step: WorkflowStep & {
6
+ type: "for-each";
7
+ }, scope: Record<string, unknown>, stepIndex: Map<string, WorkflowStep>, stepOutputs: Record<string, unknown>, loopVars: Record<string, unknown>, options: ResolvedExecuteWorkflowOptions, context: DurableContext, stateManager: ExecutionStateManager | undefined, execPath: ExecutionPathSegment[], executeChain: ExecuteChainFn): Promise<unknown[]>;
8
+ export declare function resolveForEachInputs(step: WorkflowStep & {
9
+ type: "for-each";
10
+ }, scope: Record<string, unknown>): unknown;
11
+ //# sourceMappingURL=for-each.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"for-each.d.ts","sourceRoot":"","sources":["../../../src/executor/steps/for-each.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,OAAO,KAAK,EACX,cAAc,EACd,qBAAqB,EAErB,8BAA8B,EAC9B,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAErD,wBAAsB,cAAc,CACnC,IAAI,EAAE,YAAY,GAAG;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,EACzC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,EACpC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACpC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACjC,OAAO,EAAE,8BAA8B,EACvC,OAAO,EAAE,cAAc,EACvB,YAAY,EAAE,qBAAqB,GAAG,SAAS,EAC/C,QAAQ,EAAE,oBAAoB,EAAE,EAChC,YAAY,EAAE,cAAc,GAC1B,OAAO,CAAC,OAAO,EAAE,CAAC,CA2CpB;AAED,wBAAgB,oBAAoB,CACnC,IAAI,EAAE,YAAY,GAAG;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,EACzC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,OAAO,CAYT"}
@@ -0,0 +1,13 @@
1
+ import type { WorkflowStep } from "../../types";
2
+ import type { ResolvedExecuteWorkflowOptions } from "../executor-types";
3
+ import type { TraceEntry } from "../state";
4
+ export declare function executeLlmPrompt(step: WorkflowStep & {
5
+ type: "llm-prompt";
6
+ }, scope: Record<string, unknown>, options: ResolvedExecuteWorkflowOptions): Promise<{
7
+ output: unknown;
8
+ trace?: TraceEntry[];
9
+ }>;
10
+ export declare function resolveLlmPromptInputs(step: WorkflowStep & {
11
+ type: "llm-prompt";
12
+ }, scope: Record<string, unknown>): unknown;
13
+ //# sourceMappingURL=llm-prompt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"llm-prompt.d.ts","sourceRoot":"","sources":["../../../src/executor/steps/llm-prompt.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,mBAAmB,CAAC;AAExE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,wBAAsB,gBAAgB,CACrC,IAAI,EAAE,YAAY,GAAG;IAAE,IAAI,EAAE,YAAY,CAAA;CAAE,EAC3C,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,OAAO,EAAE,8BAA8B,GACrC,OAAO,CAAC;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,UAAU,EAAE,CAAA;CAAE,CAAC,CAgCpD;AAED,wBAAgB,sBAAsB,CACrC,IAAI,EAAE,YAAY,GAAG;IAAE,IAAI,EAAE,YAAY,CAAA;CAAE,EAC3C,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,OAAO,CAQT"}
@@ -0,0 +1,7 @@
1
+ import type { WorkflowStep } from "../../types";
2
+ import type { DurableContext } from "../context";
3
+ import type { ExecutionTimer } from "../executor-types";
4
+ export declare function executeSleep(step: WorkflowStep & {
5
+ type: "sleep";
6
+ }, scope: Record<string, unknown>, context: DurableContext, timer: ExecutionTimer): Promise<void>;
7
+ //# sourceMappingURL=sleep.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sleep.d.ts","sourceRoot":"","sources":["../../../src/executor/steps/sleep.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,OAAO,KAAK,EAAE,cAAc,EAAc,MAAM,mBAAmB,CAAC;AAGpE,wBAAsB,YAAY,CACjC,IAAI,EAAE,YAAY,GAAG;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,EACtC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,OAAO,EAAE,cAAc,EACvB,KAAK,EAAE,cAAc,GACnB,OAAO,CAAC,IAAI,CAAC,CAgBf"}
@@ -0,0 +1,2 @@
1
+ export declare function executeStart(): undefined;
2
+ //# sourceMappingURL=start.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"start.d.ts","sourceRoot":"","sources":["../../../src/executor/steps/start.ts"],"names":[],"mappings":"AAAA,wBAAgB,YAAY,IAAI,SAAS,CAExC"}
@@ -0,0 +1,11 @@
1
+ import type { WorkflowStep } from "../../types";
2
+ import type { DurableContext } from "../context";
3
+ import type { ExecuteChainFn, ExecutionStateManager, ResolvedExecuteWorkflowOptions } from "../executor-types";
4
+ import type { ExecutionPathSegment } from "../state";
5
+ export declare function executeSwitchCase(step: WorkflowStep & {
6
+ type: "switch-case";
7
+ }, scope: Record<string, unknown>, stepIndex: Map<string, WorkflowStep>, stepOutputs: Record<string, unknown>, loopVars: Record<string, unknown>, options: ResolvedExecuteWorkflowOptions, context: DurableContext, stateManager: ExecutionStateManager | undefined, execPath: ExecutionPathSegment[], executeChain: ExecuteChainFn): Promise<unknown>;
8
+ export declare function resolveSwitchCaseInputs(step: WorkflowStep & {
9
+ type: "switch-case";
10
+ }, scope: Record<string, unknown>): unknown;
11
+ //# sourceMappingURL=switch-case.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"switch-case.d.ts","sourceRoot":"","sources":["../../../src/executor/steps/switch-case.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EACX,cAAc,EACd,qBAAqB,EAErB,8BAA8B,EAC9B,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAErD,wBAAsB,iBAAiB,CACtC,IAAI,EAAE,YAAY,GAAG;IAAE,IAAI,EAAE,aAAa,CAAA;CAAE,EAC5C,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,EACpC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACpC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACjC,OAAO,EAAE,8BAA8B,EACvC,OAAO,EAAE,cAAc,EACvB,YAAY,EAAE,qBAAqB,GAAG,SAAS,EAC/C,QAAQ,EAAE,oBAAoB,EAAE,EAChC,YAAY,EAAE,cAAc,GAC1B,OAAO,CAAC,OAAO,CAAC,CAwDlB;AAED,wBAAgB,uBAAuB,CACtC,IAAI,EAAE,YAAY,GAAG;IAAE,IAAI,EAAE,aAAa,CAAA;CAAE,EAC5C,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,OAAO,CAYT"}
@@ -0,0 +1,9 @@
1
+ import type { ToolSet } from "ai";
2
+ import type { WorkflowStep } from "../../types";
3
+ export declare function executeToolCall(step: WorkflowStep & {
4
+ type: "tool-call";
5
+ }, scope: Record<string, unknown>, tools: ToolSet): Promise<unknown>;
6
+ export declare function resolveToolCallInputs(step: WorkflowStep & {
7
+ type: "tool-call";
8
+ }, scope: Record<string, unknown>): unknown;
9
+ //# sourceMappingURL=tool-call.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-call.d.ts","sourceRoot":"","sources":["../../../src/executor/steps/tool-call.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAClC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAShD,wBAAsB,eAAe,CACpC,IAAI,EAAE,YAAY,GAAG;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,EAC1C,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,KAAK,EAAE,OAAO,GACZ,OAAO,CAAC,OAAO,CAAC,CA6ClB;AAED,wBAAgB,qBAAqB,CACpC,IAAI,EAAE,YAAY,GAAG;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,EAC1C,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,OAAO,CAUT"}
@@ -0,0 +1,8 @@
1
+ import type { WorkflowStep } from "../../types";
2
+ import type { DurableContext } from "../context";
3
+ import type { ExecuteChainFn, ExecutionStateManager, ExecutionTimer, ResolvedExecuteWorkflowOptions } from "../executor-types";
4
+ import type { ExecutionPathSegment } from "../state";
5
+ export declare function executeWaitForCondition(step: WorkflowStep & {
6
+ type: "wait-for-condition";
7
+ }, scope: Record<string, unknown>, stepIndex: Map<string, WorkflowStep>, stepOutputs: Record<string, unknown>, loopVars: Record<string, unknown>, options: ResolvedExecuteWorkflowOptions, context: DurableContext, timer: ExecutionTimer, stateManager: ExecutionStateManager | undefined, execPath: ExecutionPathSegment[], executeChain: ExecuteChainFn): Promise<unknown>;
8
+ //# sourceMappingURL=wait-for-condition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wait-for-condition.d.ts","sourceRoot":"","sources":["../../../src/executor/steps/wait-for-condition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EACX,cAAc,EACd,qBAAqB,EACrB,cAAc,EAEd,8BAA8B,EAC9B,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAErD,wBAAsB,uBAAuB,CAC5C,IAAI,EAAE,YAAY,GAAG;IAAE,IAAI,EAAE,oBAAoB,CAAA;CAAE,EACnD,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,EACpC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACpC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACjC,OAAO,EAAE,8BAA8B,EACvC,OAAO,EAAE,cAAc,EACvB,KAAK,EAAE,cAAc,EACrB,YAAY,EAAE,qBAAqB,GAAG,SAAS,EAC/C,QAAQ,EAAE,oBAAoB,EAAE,EAChC,YAAY,EAAE,cAAc,GAC1B,OAAO,CAAC,OAAO,CAAC,CAkFlB"}
@@ -0,0 +1,59 @@
1
+ import type { LanguageModel, ToolSet } from "ai";
2
+ import type { Diagnostic } from "../compiler/types";
3
+ import type { WorkflowDefinition } from "../types";
4
+ /** Options for {@link generateWorkflow}. */
5
+ export interface GenerateWorkflowOptions {
6
+ /** The language model to use for generating the workflow. */
7
+ model: LanguageModel;
8
+ /** Available tools the generated workflow can reference. All tools must have an `outputSchema`. */
9
+ tools: ToolSet;
10
+ /** Natural language description of the task the workflow should accomplish. */
11
+ task: string;
12
+ /** Maximum number of generation attempts if the LLM produces invalid workflows. Defaults to 3. */
13
+ maxRetries?: number;
14
+ /** Additional instructions appended to the system prompt to guide workflow generation. */
15
+ additionalInstructions?: string;
16
+ }
17
+ /** The result of generating a workflow via LLM. */
18
+ export interface GenerateWorkflowResult {
19
+ /** The generated workflow, or `null` if all attempts produced invalid workflows. */
20
+ workflow: WorkflowDefinition | null;
21
+ /** Diagnostics from the last compilation attempt. */
22
+ diagnostics: Diagnostic[];
23
+ /** Total number of generation attempts made. */
24
+ attempts: number;
25
+ }
26
+ /** Options for {@link createWorkflowGeneratorTool}. */
27
+ export interface WorkflowGeneratorToolOptions {
28
+ /** The language model to use for generation. */
29
+ model: LanguageModel;
30
+ /** Available tools the generated workflow can reference. */
31
+ tools?: ToolSet;
32
+ /** Maximum number of generation attempts. Defaults to 3. */
33
+ maxRetries?: number;
34
+ /** Additional instructions appended to the system prompt to guide workflow generation. */
35
+ additionalInstructions?: string;
36
+ }
37
+ /**
38
+ * Uses an LLM to generate a validated workflow definition from a natural language
39
+ * task description. The LLM produces a workflow via tool call, which is then compiled
40
+ * and validated. If compilation fails, diagnostics are fed back to the LLM for
41
+ * correction, up to `maxRetries` attempts.
42
+ *
43
+ * @param options - Generation options including model, tools, and task description.
44
+ * @returns A {@link GenerateWorkflowResult} with the generated workflow (or null), diagnostics, and attempt count.
45
+ * @throws If any tool in `options.tools` is missing an `outputSchema`.
46
+ */
47
+ export declare function generateWorkflow(options: GenerateWorkflowOptions): Promise<GenerateWorkflowResult>;
48
+ /**
49
+ * Creates an AI SDK tool that generates validated workflow definitions from
50
+ * natural language task descriptions. Useful for giving an agent the ability
51
+ * to create workflows on the fly.
52
+ *
53
+ * @param options - Configuration including the model and available tools.
54
+ * @returns An AI SDK `tool` that accepts a `{ task: string }` input and returns a {@link GenerateWorkflowResult}.
55
+ */
56
+ export declare function createWorkflowGeneratorTool(options: WorkflowGeneratorToolOptions): import("ai").Tool<{
57
+ task: string;
58
+ }, GenerateWorkflowResult>;
59
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/generator/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAIjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAUnD,4CAA4C;AAC5C,MAAM,WAAW,uBAAuB;IACvC,6DAA6D;IAC7D,KAAK,EAAE,aAAa,CAAC;IACrB,mGAAmG;IACnG,KAAK,EAAE,OAAO,CAAC;IACf,+EAA+E;IAC/E,IAAI,EAAE,MAAM,CAAC;IACb,kGAAkG;IAClG,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0FAA0F;IAC1F,sBAAsB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,mDAAmD;AACnD,MAAM,WAAW,sBAAsB;IACtC,oFAAoF;IACpF,QAAQ,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACpC,qDAAqD;IACrD,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,gDAAgD;IAChD,QAAQ,EAAE,MAAM,CAAC;CACjB;AAED,uDAAuD;AACvD,MAAM,WAAW,4BAA4B;IAC5C,gDAAgD;IAChD,KAAK,EAAE,aAAa,CAAC;IACrB,4DAA4D;IAC5D,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,4DAA4D;IAC5D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0FAA0F;IAC1F,sBAAsB,CAAC,EAAE,MAAM,CAAC;CAChC;AAID;;;;;;;;;GASG;AACH,wBAAsB,gBAAgB,CACrC,OAAO,EAAE,uBAAuB,GAC9B,OAAO,CAAC,sBAAsB,CAAC,CA+DjC;AAID;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CAC1C,OAAO,EAAE,4BAA4B;;2BAuBrC"}
@@ -0,0 +1,6 @@
1
+ import { type ToolSet } from "ai";
2
+ import type { Diagnostic } from "../compiler/types";
3
+ export declare function serializeToolsForPrompt(tools: ToolSet): Promise<string>;
4
+ export declare function buildWorkflowGenerationPrompt(serializedTools: string, additionalInstructions?: string): string;
5
+ export declare function formatDiagnostics(diagnostics: Diagnostic[]): string;
6
+ //# sourceMappingURL=prompt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompt.d.ts","sourceRoot":"","sources":["../../src/generator/prompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,OAAO,EAAE,MAAM,IAAI,CAAC;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,wBAAsB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAa7E;AAED,wBAAgB,6BAA6B,CAC5C,eAAe,EAAE,MAAM,EACvB,sBAAsB,CAAC,EAAE,MAAM,GAC7B,MAAM,CA0OR;AAED,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,UAAU,EAAE,GAAG,MAAM,CAWnE"}
package/dist/lib.d.ts ADDED
@@ -0,0 +1,15 @@
1
+ export type { CompilerLimits, CompilerResult, ConstrainedToolSchema, ConstrainedToolSchemaMap, Diagnostic, DiagnosticCode, DiagnosticLocation, DiagnosticSeverity, ExecutionGraph, } from "./compiler";
2
+ export { compileWorkflow } from "./compiler";
3
+ export type { ExecuteWorkflowOptions, ExecutionResult, ExecutorLimits, } from "./executor";
4
+ export { executeWorkflow } from "./executor";
5
+ export type { DurableContext, WaitForConditionOptions, } from "./executor/context";
6
+ export { createDefaultDurableContext } from "./executor/context";
7
+ export type { ErrorCategory, ErrorCode, RecoveryStrategy, } from "./executor/errors";
8
+ export { ConfigurationError, ExpressionError, ExternalServiceError, OutputQualityError, StepExecutionError, ValidationError, } from "./executor/errors";
9
+ export type { ErrorSnapshot, ExecutionDelta, ExecutionPathSegment, ExecutionState, RetryRecord, RunStatus, StepExecutionRecord, StepStatus, TraceEntry, } from "./executor/state";
10
+ export { applyDelta, snapshotError } from "./executor/state";
11
+ export type { GenerateWorkflowOptions, GenerateWorkflowResult, WorkflowGeneratorToolOptions, } from "./generator";
12
+ export { createWorkflowGeneratorTool, generateWorkflow } from "./generator";
13
+ export { buildWorkflowGenerationPrompt, serializeToolsForPrompt, } from "./generator/prompt";
14
+ export { type WorkflowDefinition, type WorkflowStep, workflowDefinitionSchema, } from "./types";
15
+ //# sourceMappingURL=lib.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../src/lib.ts"],"names":[],"mappings":"AAAA,YAAY,EACX,cAAc,EACd,cAAc,EACd,qBAAqB,EACrB,wBAAwB,EACxB,UAAU,EACV,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,cAAc,GACd,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,YAAY,EACX,sBAAsB,EACtB,eAAe,EACf,cAAc,GACd,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,YAAY,EACX,cAAc,EACd,uBAAuB,GACvB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AACjE,YAAY,EACX,aAAa,EACb,SAAS,EACT,gBAAgB,GAChB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACN,kBAAkB,EAClB,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,GACf,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EACX,aAAa,EACb,cAAc,EACd,oBAAoB,EACpB,cAAc,EACd,WAAW,EACX,SAAS,EACT,mBAAmB,EACnB,UAAU,EACV,UAAU,GACV,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC7D,YAAY,EACX,uBAAuB,EACvB,sBAAsB,EACtB,4BAA4B,GAC5B,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,2BAA2B,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,EACN,6BAA6B,EAC7B,uBAAuB,GACvB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACN,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,wBAAwB,GACxB,MAAM,SAAS,CAAC"}