@smol-workflows/sdk 0.1.0-alpha.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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 hbc
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,197 @@
1
+ # @smol-workflows/sdk
2
+
3
+ Minimal TypeScript SDK package for smol-workflow.
4
+
5
+ The SDK provides types for workflow scripts. Runtime values are injected by the workflow runner.
6
+
7
+ ## User script contract
8
+
9
+ A workflow script is an ES module.
10
+
11
+ It must export metadata as `export const meta = {...}`. Metadata must include `name` and `description` and may include `whenToUse` and phase metadata. The SDK separates Dynamic Workflow metadata fields from SDK/engine-specific extensions such as phase-level `provider` hints:
12
+
13
+ ```ts
14
+ import type { WorkflowMetadata } from "@smol-workflows/sdk";
15
+
16
+ export const meta = {
17
+ name: "stock-investment-analysis",
18
+ description: "Analyze stocks and synthesize an investment report",
19
+ whenToUse: "Use when the user wants a multi-agent stock analysis workflow",
20
+ phases: [
21
+ { title: "Analyze", detail: "Break the question into research dimensions" },
22
+ { title: "Research", detail: "Run research agents in parallel", provider: "claude-code" },
23
+ { title: "Synthesize", detail: "Create the final report", model: "opus", provider: "pi" },
24
+ ],
25
+ } satisfies WorkflowMetadata;
26
+ ```
27
+
28
+ It must default export either:
29
+
30
+ 1. the final workflow result — preferred
31
+ 2. a workflow function — supported
32
+
33
+ ## Preferred: top-level ESM workflow
34
+
35
+ The preferred style is to write normal top-level ESM code and default export the final result:
36
+
37
+ ```ts
38
+ phase("Analyze");
39
+ log("args", args);
40
+
41
+ const result = await agent("Do the work");
42
+
43
+ export default result;
44
+ ```
45
+
46
+ This style relies on globals injected by the runner before the module is imported.
47
+
48
+ Top-level `await` is valid in ESM, but top-level `return` is not. Use `export default` for the final result:
49
+
50
+ ```ts
51
+ const result = await agent("Do the work");
52
+ export default result;
53
+ ```
54
+
55
+ Do not write:
56
+
57
+ ```ts
58
+ const result = await agent("Do the work");
59
+ return result;
60
+ ```
61
+
62
+ ## Supported: default workflow function
63
+
64
+ A workflow may also default export a function:
65
+
66
+ ```ts
67
+ import type { WorkflowHandler } from "@smol-workflows/sdk";
68
+
69
+ const workflow: WorkflowHandler = async (input, ctx) => {
70
+ ctx.phase("Analyze");
71
+ ctx.log("args", ctx.args);
72
+
73
+ return await ctx.agent("Do the work");
74
+ };
75
+
76
+ export default workflow;
77
+ ```
78
+
79
+ Or using globals:
80
+
81
+ ```ts
82
+ export default async function workflow() {
83
+ phase("Analyze");
84
+ log("args", args);
85
+
86
+ return await agent("Do the work");
87
+ }
88
+ ```
89
+
90
+ ## Input
91
+
92
+ Workflow input is provided as an untyped argument map:
93
+
94
+ ```ts
95
+ type WorkflowArgs = Record<string, unknown>;
96
+ ```
97
+
98
+ In the preferred top-level ESM style, input is available as the global `args`:
99
+
100
+ ```ts
101
+ log("args", args);
102
+ ```
103
+
104
+ In the function style, the same value is available in three places:
105
+
106
+ ```ts
107
+ export default async function workflow(input, ctx) {
108
+ input; // workflow args
109
+ ctx.args; // workflow args
110
+ args; // global workflow args
111
+ }
112
+ ```
113
+
114
+ The runner should treat this value as read-only from the script side.
115
+
116
+ ## Output
117
+
118
+ In the preferred top-level ESM style, the workflow output is the default export:
119
+
120
+ ```ts
121
+ const output = {
122
+ summary: "Done",
123
+ items: [1, 2, 3],
124
+ };
125
+
126
+ export default output;
127
+ ```
128
+
129
+ In the function style, the workflow output is the value returned by the default workflow function:
130
+
131
+ ```ts
132
+ export default async function workflow() {
133
+ return {
134
+ summary: "Done",
135
+ items: [1, 2, 3],
136
+ };
137
+ }
138
+ ```
139
+
140
+ Recommended output shape is JSON-serializable data.
141
+
142
+ If an agent call uses `schema`, the SDK can infer the TypeScript result type from a literal JSON Schema:
143
+
144
+ ```ts
145
+ import type { JSONSchema } from "@smol-workflows/sdk";
146
+
147
+ const schema = {
148
+ type: "object",
149
+ properties: {
150
+ summary: { type: "string" },
151
+ },
152
+ required: ["summary"],
153
+ additionalProperties: false,
154
+ } as const satisfies JSONSchema;
155
+
156
+ const result = await agent("Summarize", { schema });
157
+ if (result) {
158
+ result.summary; // string
159
+ }
160
+
161
+ export default result;
162
+ ```
163
+
164
+ ## Workflow tool input
165
+
166
+ External Workflow tool invocations can be typed with `WorkflowToolInput`:
167
+
168
+ ```ts
169
+ import type { WorkflowToolInput } from "@smol-workflows/sdk";
170
+
171
+ const input: WorkflowToolInput = {
172
+ scriptPath: "./workflow.js",
173
+ args: { item: "alpha" },
174
+ };
175
+ ```
176
+
177
+ When multiple workflow sources are provided, runners should prefer `scriptPath` over `script` and `name`.
178
+
179
+ ## Runtime globals
180
+
181
+ The runner injects these globals:
182
+
183
+ - `args` — untyped workflow args
184
+ - `agent(prompt, options?)` — AI call primitive; returns `null` if the run is skipped
185
+ - `parallel(tasks)` — run tasks concurrently with a barrier; thrown tasks resolve to `null`
186
+ - `pipeline(items, ...stages)` — run each item through stages without barriers between stages
187
+ - `workflow(nameOrRef, args?)` — run another workflow inline as a sub-step
188
+ - `budget` — shared output-token budget with `total`, `spent()`, and `remaining()`
189
+ - `log(...values)` — write workflow logs
190
+ - `phase(name)` — mark workflow phase
191
+ - `SW.extra.sleep(ms)` / `ctx.extra.sleep(ms)` / `import { sleep } from "workflow:extra"` — pause workflow execution
192
+
193
+ ## Scripts
194
+
195
+ - `npm run build` - compile TypeScript to `dist/`
196
+ - `npm run typecheck` - type-check without emitting files
197
+ - `npm run clean` - remove build output
package/changelogs.md ADDED
@@ -0,0 +1,18 @@
1
+ # Changelogs
2
+
3
+ Track user-visible changes to `@smol-workflows/sdk`, especially public TypeScript types and workflow authoring APIs.
4
+
5
+ ## Unpublished
6
+
7
+ No unpublished changes yet.
8
+
9
+ ## 0.1.0-alpha.0
10
+
11
+ Initial SDK types for workflow authors.
12
+
13
+ - Added workflow metadata types, including phase metadata and provider hints.
14
+ - Added ambient global declarations for runtime-injected workflow APIs: `args`, `agent`, `parallel`, `pipeline`, `workflow`, `budget`, `log`, `phase`, and `SW`.
15
+ - Added agent option types for `provider`, `model`, `schema`, `phase`, `label`, `isolation`, and `agentType`.
16
+ - Added JSON Schema typing for structured agent outputs via `json-schema-to-ts`.
17
+ - Added workflow handler/context types for function-style workflows.
18
+ - Added `workflow:extra` virtual module declarations.
@@ -0,0 +1,167 @@
1
+ import type { FromSchema } from "json-schema-to-ts";
2
+ import type { JSONSchema } from "./json-schema.js";
3
+ import type { PipelineFn } from "./pipeline.js";
4
+ export type { JSONArray, JSONObject, JSONPrimitive, JSONSchema, JSONSchemaObject, JSONSchemaType, JSONValue, } from "./json-schema.js";
5
+ export type { PipelineFn, PipelineStage } from "./pipeline.js";
6
+ export type { WorkflowToolInput } from "./tool.js";
7
+ /** A value that may be returned synchronously or asynchronously. */
8
+ export type Awaitable<T> = T | Promise<T>;
9
+ /** Untyped workflow arguments injected by the isolated workflow runner. */
10
+ export type WorkflowArgs = Record<string, unknown>;
11
+ /** Workflow phase metadata fields mirrored from the Dynamic Workflow reference. */
12
+ export type DynamicWorkflowPhaseMetadata = {
13
+ /** Phase title. Must exactly match the corresponding `phase(...)` call. */
14
+ title: string;
15
+ /** Optional longer phase description. */
16
+ detail?: string;
17
+ /** Optional model hint for agent work in this phase. */
18
+ model?: string;
19
+ };
20
+ /** Workflow metadata fields mirrored from the Dynamic Workflow reference. */
21
+ export type DynamicWorkflowMetadata = {
22
+ /** Stable workflow name or identifier. */
23
+ name: string;
24
+ /** Workflow description for display, tracing, and agent context. */
25
+ description: string;
26
+ /** Optional hint shown when listing or selecting workflows. */
27
+ whenToUse?: string;
28
+ /** Ordered list of phases the workflow may report with `phase(...)`. */
29
+ phases?: readonly DynamicWorkflowPhaseMetadata[];
30
+ };
31
+ /** Metadata describing a workflow phase for display, tracing, and agent context. */
32
+ export type WorkflowPhaseMetadata = DynamicWorkflowPhaseMetadata & {
33
+ /** Optional provider hint for agent work in this phase. */
34
+ provider?: string;
35
+ };
36
+ /** Metadata exported by a workflow script as `meta`. */
37
+ export type WorkflowMetadata = Omit<DynamicWorkflowMetadata, "phases"> & {
38
+ /** Ordered list of phases the workflow may report with `phase(...)`. */
39
+ phases?: readonly WorkflowPhaseMetadata[];
40
+ };
41
+ /** Writes a message to the workflow log. */
42
+ export type WorkflowLogFn = (...args: unknown[]) => void;
43
+ /** Reference to a workflow that can be run from another workflow. */
44
+ export type WorkflowRef = string | {
45
+ scriptPath: string;
46
+ };
47
+ /** Runs another workflow inline as a sub-step. */
48
+ export type WorkflowRunFn = <Output = unknown>(nameOrRef: WorkflowRef, args?: unknown) => Promise<Output>;
49
+ /** Shared token budget exposed to workflow scripts. */
50
+ export type WorkflowBudget = {
51
+ /** Target output-token budget, or `null` when no target was configured. */
52
+ total: number | null;
53
+ /** Output tokens spent across this workflow run and child workflows. */
54
+ spent(): number;
55
+ /** Remaining output-token budget, or `Infinity` when no target was configured. */
56
+ remaining(): number;
57
+ };
58
+ /** A unit of work passed to `parallel`. */
59
+ export type ParallelTask<T = unknown> = () => Awaitable<T>;
60
+ /** Preserves the tuple result types returned by a tuple of parallel tasks. */
61
+ export type ParallelResults<Tasks extends readonly ParallelTask[]> = {
62
+ -readonly [Index in keyof Tasks]: Tasks[Index] extends ParallelTask<infer Result> ? Awaited<Result> | null : never;
63
+ };
64
+ /** Runs multiple tasks concurrently and returns their results in input order. Thrown tasks resolve to `null`. */
65
+ export type ParallelFn = <const Tasks extends readonly ParallelTask[]>(tasks: Tasks) => Promise<ParallelResults<Tasks>>;
66
+ /** Agent options mirrored from the Dynamic Workflow reference. */
67
+ export type DynamicWorkflowAgentRunOptions<Schema extends JSONSchema = JSONSchema> = {
68
+ /** Optional display label for progress UIs and traces. */
69
+ label?: string;
70
+ /** Optional phase name used for tracing/grouping this agent run. */
71
+ phase?: string;
72
+ /** JSON Schema used to request and/or validate structured output. */
73
+ schema?: Schema;
74
+ /**
75
+ * Optional model override for this call.
76
+ *
77
+ * The accepted values are provider-specific. If omitted, the selected
78
+ * provider's default model is used.
79
+ */
80
+ model?: string;
81
+ /**
82
+ * Request a fresh git worktree for this agent run.
83
+ *
84
+ * The workflow engine creates the worktree from the workflow cwd's git
85
+ * repository using a temporary `smol-wf/agent-run/<id>` branch, passes that
86
+ * worktree as the provider cwd for this call, then removes it after the call.
87
+ */
88
+ isolation?: "worktree";
89
+ /** Optional provider-specific subagent/agent type, such as `Explore` or `code-reviewer`. */
90
+ agentType?: string;
91
+ };
92
+ /** Options for a single agent run supported by this SDK. */
93
+ export type AgentRunOptions<Schema extends JSONSchema = JSONSchema> = DynamicWorkflowAgentRunOptions<Schema> & {
94
+ /**
95
+ * Optional agent provider override for this call.
96
+ *
97
+ * If omitted, the runner's default provider is used. Runners may support
98
+ * built-in provider names such as `debug`, `claude-code`, `codex`,
99
+ * `opencode`, or `pi`, and may also register custom provider names.
100
+ */
101
+ provider?: string;
102
+ };
103
+ /** An AI capability exposed to workflow scripts. */
104
+ export type Agent = {
105
+ /** Runs the agent with a prompt and returns text output by default, or `null` if skipped. */
106
+ run(prompt: string): Promise<string | null>;
107
+ /** Runs the agent and infers structured output from the provided JSON Schema, or returns `null` if skipped. */
108
+ run<const Schema extends JSONSchema>(prompt: string, options: AgentRunOptions<Schema> & {
109
+ schema: Schema;
110
+ }): Promise<FromSchema<Schema> | null>;
111
+ /** Runs the agent with optional per-call options and an explicit output type, or returns `null` if skipped. */
112
+ run<Output = string>(prompt: string, options?: AgentRunOptions): Promise<Output | null>;
113
+ };
114
+ /** The global agent helper exposed to workflow scripts. */
115
+ export type AgentRunFn = Agent["run"];
116
+ /** Marks the current workflow phase for tracing and observability. */
117
+ export type PhaseFn = (name: string) => void;
118
+ /** Runtime helpers that are not part of the base workflow API. */
119
+ export type WorkflowExtra = {
120
+ /** Pause workflow execution for at least `ms` milliseconds. */
121
+ sleep(ms: number): Promise<void>;
122
+ };
123
+ /** smol-workflows runtime namespace exposed to workflow scripts. */
124
+ export type WorkflowRuntimeNamespace = {
125
+ extra: WorkflowExtra;
126
+ };
127
+ /** Explicit workflow capabilities passed as the second argument to a workflow. */
128
+ export type WorkflowContext = {
129
+ args: WorkflowArgs;
130
+ agent: AgentRunFn;
131
+ parallel: ParallelFn;
132
+ pipeline: PipelineFn;
133
+ workflow: WorkflowRunFn;
134
+ budget: WorkflowBudget;
135
+ log: WorkflowLogFn;
136
+ phase: PhaseFn;
137
+ extra: WorkflowExtra;
138
+ };
139
+ /** The default export shape expected from a workflow script. */
140
+ export type WorkflowHandler<Input = unknown, Output = unknown> = (input: Input, ctx: WorkflowContext) => Awaitable<Output>;
141
+ declare module "workflow:extra" {
142
+ export const sleep: WorkflowExtra["sleep"];
143
+ const extra: WorkflowExtra;
144
+ export default extra;
145
+ }
146
+ declare global {
147
+ /** Global workflow arguments injected by the isolated workflow runner. */
148
+ var args: WorkflowArgs;
149
+ /** Global agent run helper injected by the isolated workflow runner. */
150
+ var agent: AgentRunFn;
151
+ /** Global parallel helper injected by the isolated workflow runner. */
152
+ var parallel: ParallelFn;
153
+ /** Global pipeline helper injected by the isolated workflow runner. */
154
+ var pipeline: PipelineFn;
155
+ /** Global child workflow helper injected by the isolated workflow runner. */
156
+ var workflow: WorkflowRunFn;
157
+ /** Global token budget helper injected by the isolated workflow runner. */
158
+ var budget: WorkflowBudget;
159
+ /** Global logger injected by the isolated workflow runner. */
160
+ var log: WorkflowLogFn;
161
+ /** Global phase helper injected by the isolated workflow runner. */
162
+ var phase: PhaseFn;
163
+ /** smol-workflows runtime namespace. */
164
+ var SW: WorkflowRuntimeNamespace;
165
+ }
166
+ export {};
167
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,YAAY,EACV,SAAS,EACT,UAAU,EACV,aAAa,EACb,UAAU,EACV,gBAAgB,EAChB,cAAc,EACd,SAAS,GACV,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC/D,YAAY,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAEnD,oEAAoE;AACpE,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;AAE1C,2EAA2E;AAC3E,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEnD,mFAAmF;AACnF,MAAM,MAAM,4BAA4B,GAAG;IACzC,2EAA2E;IAC3E,KAAK,EAAE,MAAM,CAAC;IACd,yCAAyC;IACzC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,w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ACZ,GAAG,EAAE,eAAe,KACjB,SAAS,CAAC,MAAM,CAAC,CAAC;AAGvB,OAAO,QAAQ,gBAAgB,CAAC;IAC9B,MAAM,CAAC,MAAM,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IAC3C,MAAM,KAAK,EAAE,aAAa,CAAC;IAC3B,eAAe,KAAK,CAAC;CACtB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,0EAA0E;IAC1E,IAAI,IAAI,EAAE,YAAY,CAAC;IACvB,wEAAwE;IACxE,IAAI,KAAK,EAAE,UAAU,CAAC;IACtB,uEAAuE;IACvE,IAAI,QAAQ,EAAE,UAAU,CAAC;IACzB,uEAAuE;IACvE,IAAI,QAAQ,EAAE,UAAU,CAAC;IACzB,6EAA6E;IAC7E,IAAI,QAAQ,EAAE,aAAa,CAAC;IAC5B,2EAA2E;IAC3E,IAAI,MAAM,EAAE,cAAc,CAAC;IAC3B,8DAA8D;IAC9D,IAAI,GAAG,EAAE,aAAa,CAAC;IACvB,oEAAoE;IACpE,IAAI,KAAK,EAAE,OAAO,CAAC;IACnB,wCAAwC;IACxC,IAAI,EAAE,EAAE,wBAAwB,CAAC;CAClC;AAED,OAAO,EAAE,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,68 @@
1
+ /** A primitive JSON value. */
2
+ export type JSONPrimitive = string | number | boolean | null;
3
+ /** Any value that can be represented in JSON. */
4
+ export type JSONValue = JSONPrimitive | JSONObject | JSONArray;
5
+ /** A JSON object with string keys and JSON-compatible values. */
6
+ export type JSONObject = {
7
+ [key: string]: JSONValue;
8
+ };
9
+ /** A JSON array containing JSON-compatible values. */
10
+ export type JSONArray = JSONValue[];
11
+ /** Valid values for the JSON Schema `type` keyword. */
12
+ export type JSONSchemaType = "null" | "boolean" | "object" | "array" | "number" | "integer" | "string";
13
+ /**
14
+ * A JSON Schema document or subschema.
15
+ *
16
+ * Boolean schemas are supported: `true` accepts anything, `false` rejects everything.
17
+ */
18
+ export type JSONSchema = boolean | JSONSchemaObject;
19
+ /**
20
+ * A JSON Schema object using common JSON Schema keywords.
21
+ *
22
+ * This is intended for SDK typing and editor help, not as a complete validator.
23
+ */
24
+ export type JSONSchemaObject = {
25
+ $id?: string;
26
+ $schema?: string;
27
+ $ref?: string;
28
+ $defs?: Record<string, JSONSchema>;
29
+ definitions?: Record<string, JSONSchema>;
30
+ title?: string;
31
+ description?: string;
32
+ default?: JSONValue;
33
+ examples?: readonly JSONValue[];
34
+ type?: JSONSchemaType | readonly JSONSchemaType[];
35
+ enum?: readonly JSONValue[];
36
+ const?: JSONValue;
37
+ properties?: Record<string, JSONSchema>;
38
+ patternProperties?: Record<string, JSONSchema>;
39
+ additionalProperties?: JSONSchema;
40
+ required?: readonly string[];
41
+ propertyNames?: JSONSchema;
42
+ minProperties?: number;
43
+ maxProperties?: number;
44
+ items?: JSONSchema | readonly JSONSchema[];
45
+ prefixItems?: readonly JSONSchema[];
46
+ additionalItems?: JSONSchema;
47
+ minItems?: number;
48
+ maxItems?: number;
49
+ uniqueItems?: boolean;
50
+ minLength?: number;
51
+ maxLength?: number;
52
+ pattern?: string;
53
+ format?: string;
54
+ minimum?: number;
55
+ maximum?: number;
56
+ exclusiveMinimum?: number;
57
+ exclusiveMaximum?: number;
58
+ multipleOf?: number;
59
+ allOf?: readonly JSONSchema[];
60
+ anyOf?: readonly JSONSchema[];
61
+ oneOf?: readonly JSONSchema[];
62
+ not?: JSONSchema;
63
+ if?: JSONSchema;
64
+ then?: JSONSchema;
65
+ else?: JSONSchema;
66
+ dependentSchemas?: Record<string, JSONSchema>;
67
+ };
68
+ //# sourceMappingURL=json-schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json-schema.d.ts","sourceRoot":"","sources":["../src/json-schema.ts"],"names":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 @@
1
+ export {};
2
+ //# sourceMappingURL=json-schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json-schema.js","sourceRoot":"","sources":["../src/json-schema.ts"],"names":[],"mappings":""}
@@ -0,0 +1,21 @@
1
+ /** A value that may be returned synchronously or asynchronously. */
2
+ export type Awaitable<T> = T | Promise<T>;
3
+ /** A stage in a `pipeline` call. */
4
+ export type PipelineStage<Previous = unknown, Item = unknown, Result = unknown> = (previous: Previous, item: Item, index: number) => Awaitable<Result>;
5
+ /**
6
+ * Runs items through sequential stages without a barrier between stages.
7
+ *
8
+ * Each item advances to its next stage as soon as that item is ready. If a stage
9
+ * throws for an item, that item resolves to `null` and remaining stages are skipped.
10
+ */
11
+ export type PipelineFn = {
12
+ <Item>(items: readonly Item[]): Promise<Item[]>;
13
+ <Item, Stage1>(items: readonly Item[], stage1: PipelineStage<Item, Item, Stage1>): Promise<Array<Awaited<Stage1> | null>>;
14
+ <Item, Stage1, Stage2>(items: readonly Item[], stage1: PipelineStage<Item, Item, Stage1>, stage2: PipelineStage<Awaited<Stage1>, Item, Stage2>): Promise<Array<Awaited<Stage2> | null>>;
15
+ <Item, Stage1, Stage2, Stage3>(items: readonly Item[], stage1: PipelineStage<Item, Item, Stage1>, stage2: PipelineStage<Awaited<Stage1>, Item, Stage2>, stage3: PipelineStage<Awaited<Stage2>, Item, Stage3>): Promise<Array<Awaited<Stage3> | null>>;
16
+ <Item, Stage1, Stage2, Stage3, Stage4>(items: readonly Item[], stage1: PipelineStage<Item, Item, Stage1>, stage2: PipelineStage<Awaited<Stage1>, Item, Stage2>, stage3: PipelineStage<Awaited<Stage2>, Item, Stage3>, stage4: PipelineStage<Awaited<Stage3>, Item, Stage4>): Promise<Array<Awaited<Stage4> | null>>;
17
+ <Item, Stage1, Stage2, Stage3, Stage4, Stage5>(items: readonly Item[], stage1: PipelineStage<Item, Item, Stage1>, stage2: PipelineStage<Awaited<Stage1>, Item, Stage2>, stage3: PipelineStage<Awaited<Stage2>, Item, Stage3>, stage4: PipelineStage<Awaited<Stage3>, Item, Stage4>, stage5: PipelineStage<Awaited<Stage4>, Item, Stage5>): Promise<Array<Awaited<Stage5> | null>>;
18
+ <Item, Stage1, Stage2, Stage3, Stage4, Stage5, Stage6>(items: readonly Item[], stage1: PipelineStage<Item, Item, Stage1>, stage2: PipelineStage<Awaited<Stage1>, Item, Stage2>, stage3: PipelineStage<Awaited<Stage2>, Item, Stage3>, stage4: PipelineStage<Awaited<Stage3>, Item, Stage4>, stage5: PipelineStage<Awaited<Stage4>, Item, Stage5>, stage6: PipelineStage<Awaited<Stage5>, Item, Stage6>): Promise<Array<Awaited<Stage6> | null>>;
19
+ <Item, Result = unknown>(items: readonly Item[], ...stages: readonly PipelineStage<unknown, Item, unknown>[]): Promise<Array<Result | null>>;
20
+ };
21
+ //# sourceMappingURL=pipeline.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipeline.d.ts","sourceRoot":"","sources":["../src/pipeline.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;AAE1C,oCAAoC;AACpC,MAAM,MAAM,aAAa,CAAC,QAAQ,GAAG,OAAO,EAAE,IAAI,GAAG,OAAO,EAAE,MAAM,GAAG,OAAO,IAAI,CAChF,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,MAAM,KACV,SAAS,CAAC,MAAM,CAAC,CAAC;AAEvB;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,CAAC,IAAI,EAAE,KAAK,EAAE,SAAS,IAAI,EAAE,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;IAChD,CAAC,IAAI,EAAE,MAAM,EACX,KAAK,EAAE,SAAS,IAAI,EAAE,EACtB,MAAM,EAAE,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,GACxC,O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Aa,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,GACnD,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;IAC1C,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,EACrB,KAAK,EAAE,SAAS,IAAI,EAAE,EACtB,GAAG,MAAM,EAAE,SAAS,aAAa,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,EAAE,GAC1D,OAAO,CAAC,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC;CAClC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=pipeline.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipeline.js","sourceRoot":"","sources":["../src/pipeline.ts"],"names":[],"mappings":""}
package/dist/tool.d.ts ADDED
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Parameters accepted by an external Workflow tool invocation.
3
+ *
4
+ * This mirrors the Dynamic Workflow reference. When multiple workflow sources are
5
+ * provided, runners should prefer `scriptPath` over `script` and `name`.
6
+ */
7
+ export type WorkflowToolInput = {
8
+ /** Inline workflow script source. */
9
+ script?: string;
10
+ /** Path to a workflow script file on disk. Takes precedence over `script` and `name`. */
11
+ scriptPath?: string;
12
+ /** Name of a saved workflow, typically resolved from `.claude/workflows/`. */
13
+ name?: string;
14
+ /** Value passed to the workflow as its `args` global. */
15
+ args?: unknown;
16
+ /** Prior workflow run ID to resume from, when supported by the runner. */
17
+ resumeFromRunId?: string;
18
+ };
19
+ //# sourceMappingURL=tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool.d.ts","sourceRoot":"","sources":["../src/tool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,qCAAqC;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,yFAAyF;IACzF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8EAA8E;IAC9E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,yDAAyD;IACzD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,0EAA0E;IAC1E,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC"}
package/dist/tool.js ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool.js","sourceRoot":"","sources":["../src/tool.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ declare module "workflow:extra" {
2
+ const sleep: import("./index.js").WorkflowExtra["sleep"];
3
+ }
4
+ export {};
5
+ //# sourceMappingURL=workflow-extra.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow-extra.d.ts","sourceRoot":"","sources":["../src/workflow-extra.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,gBAAgB,CAAC;IACvB,MAAM,KAAK,EAAE,OAAO,YAAY,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;CACjE"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=workflow-extra.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow-extra.js","sourceRoot":"","sources":["../src/workflow-extra.ts"],"names":[],"mappings":""}
package/package.json ADDED
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "@smol-workflows/sdk",
3
+ "version": "0.1.0-alpha.0",
4
+ "description": "TypeScript SDK and workflow runtime types for smol-workflow.",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "main": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js"
13
+ }
14
+ },
15
+ "files": [
16
+ "dist",
17
+ "README.md",
18
+ "changelogs.md"
19
+ ],
20
+ "publishConfig": {
21
+ "access": "public"
22
+ },
23
+ "scripts": {
24
+ "build": "tsc -p tsconfig.json",
25
+ "clean": "rm -rf dist",
26
+ "typecheck": "tsc -p tsconfig.json --noEmit"
27
+ },
28
+ "dependencies": {
29
+ "json-schema-to-ts": "3.1.1"
30
+ },
31
+ "devDependencies": {
32
+ "typescript": "6.0.3"
33
+ }
34
+ }