@flomatai/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.
- package/dist/agent.d.ts +92 -0
- package/dist/agent.d.ts.map +1 -0
- package/dist/agent.js +137 -0
- package/dist/agent.js.map +1 -0
- package/dist/cli-utils.d.ts +41 -0
- package/dist/cli-utils.d.ts.map +1 -0
- package/dist/cli-utils.js +64 -0
- package/dist/cli-utils.js.map +1 -0
- package/dist/errors.d.ts +52 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +105 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +35 -0
- package/dist/index.js.map +1 -0
- package/dist/llm-provider.d.ts +29 -0
- package/dist/llm-provider.d.ts.map +1 -0
- package/dist/llm-provider.js +44 -0
- package/dist/llm-provider.js.map +1 -0
- package/dist/logger.d.ts +32 -0
- package/dist/logger.d.ts.map +1 -0
- package/dist/logger.js +75 -0
- package/dist/logger.js.map +1 -0
- package/dist/mock-llm.d.ts +70 -0
- package/dist/mock-llm.d.ts.map +1 -0
- package/dist/mock-llm.js +385 -0
- package/dist/mock-llm.js.map +1 -0
- package/dist/orchestrator-helpers.d.ts +20 -0
- package/dist/orchestrator-helpers.d.ts.map +1 -0
- package/dist/orchestrator-helpers.js +38 -0
- package/dist/orchestrator-helpers.js.map +1 -0
- package/dist/orchestrator.d.ts +124 -0
- package/dist/orchestrator.d.ts.map +1 -0
- package/dist/orchestrator.js +349 -0
- package/dist/orchestrator.js.map +1 -0
- package/dist/pipeline-registry.d.ts +120 -0
- package/dist/pipeline-registry.d.ts.map +1 -0
- package/dist/pipeline-registry.js +171 -0
- package/dist/pipeline-registry.js.map +1 -0
- package/dist/pipeline.d.ts +122 -0
- package/dist/pipeline.d.ts.map +1 -0
- package/dist/pipeline.js +152 -0
- package/dist/pipeline.js.map +1 -0
- package/dist/skill.d.ts +112 -0
- package/dist/skill.d.ts.map +1 -0
- package/dist/skill.js +12 -0
- package/dist/skill.js.map +1 -0
- package/dist/skills/io-skill.d.ts +49 -0
- package/dist/skills/io-skill.d.ts.map +1 -0
- package/dist/skills/io-skill.js +103 -0
- package/dist/skills/io-skill.js.map +1 -0
- package/dist/skills/llm-skill.d.ts +64 -0
- package/dist/skills/llm-skill.d.ts.map +1 -0
- package/dist/skills/llm-skill.js +112 -0
- package/dist/skills/llm-skill.js.map +1 -0
- package/dist/skills/transform-skill.d.ts +27 -0
- package/dist/skills/transform-skill.d.ts.map +1 -0
- package/dist/skills/transform-skill.js +32 -0
- package/dist/skills/transform-skill.js.map +1 -0
- package/dist/state/file-store.d.ts +25 -0
- package/dist/state/file-store.d.ts.map +1 -0
- package/dist/state/file-store.js +92 -0
- package/dist/state/file-store.js.map +1 -0
- package/dist/state/memory-store.d.ts +24 -0
- package/dist/state/memory-store.d.ts.map +1 -0
- package/dist/state/memory-store.js +65 -0
- package/dist/state/memory-store.js.map +1 -0
- package/dist/state/types.d.ts +40 -0
- package/dist/state/types.d.ts.map +1 -0
- package/dist/state/types.js +8 -0
- package/dist/state/types.js.map +1 -0
- package/dist/strategies/custom.d.ts +12 -0
- package/dist/strategies/custom.d.ts.map +1 -0
- package/dist/strategies/custom.js +14 -0
- package/dist/strategies/custom.js.map +1 -0
- package/dist/strategies/plan-and-execute.d.ts +27 -0
- package/dist/strategies/plan-and-execute.d.ts.map +1 -0
- package/dist/strategies/plan-and-execute.js +195 -0
- package/dist/strategies/plan-and-execute.js.map +1 -0
- package/dist/strategies/react.d.ts +27 -0
- package/dist/strategies/react.d.ts.map +1 -0
- package/dist/strategies/react.js +172 -0
- package/dist/strategies/react.js.map +1 -0
- package/dist/strategies/router.d.ts +11 -0
- package/dist/strategies/router.d.ts.map +1 -0
- package/dist/strategies/router.js +70 -0
- package/dist/strategies/router.js.map +1 -0
- package/dist/strategies/sequential.d.ts +12 -0
- package/dist/strategies/sequential.d.ts.map +1 -0
- package/dist/strategies/sequential.js +39 -0
- package/dist/strategies/sequential.js.map +1 -0
- package/dist/strategies/types.d.ts +62 -0
- package/dist/strategies/types.d.ts.map +1 -0
- package/dist/strategies/types.js +5 -0
- package/dist/strategies/types.js.map +1 -0
- package/dist/types.d.ts +83 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +5 -0
- package/dist/types.js.map +1 -0
- package/package.json +28 -0
- package/src/agent.ts +243 -0
- package/src/cli-utils.ts +73 -0
- package/src/errors.ts +146 -0
- package/src/index.ts +124 -0
- package/src/llm-provider.ts +88 -0
- package/src/logger.ts +97 -0
- package/src/mock-llm.ts +433 -0
- package/src/orchestrator-helpers.ts +40 -0
- package/src/orchestrator.ts +522 -0
- package/src/pipeline-registry.ts +253 -0
- package/src/pipeline.ts +265 -0
- package/src/skill.ts +127 -0
- package/src/skills/io-skill.ts +133 -0
- package/src/skills/llm-skill.ts +207 -0
- package/src/skills/transform-skill.ts +61 -0
- package/src/state/file-store.ts +119 -0
- package/src/state/memory-store.ts +82 -0
- package/src/state/types.ts +53 -0
- package/src/strategies/custom.ts +24 -0
- package/src/strategies/plan-and-execute.ts +268 -0
- package/src/strategies/react.ts +239 -0
- package/src/strategies/router.ts +101 -0
- package/src/strategies/sequential.ts +55 -0
- package/src/strategies/types.ts +97 -0
- package/src/types.ts +102 -0
- package/tsconfig.json +9 -0
package/dist/skill.d.ts
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skill — the atomic unit of work in flomatai.
|
|
3
|
+
*
|
|
4
|
+
* A Skill is a typed, composable function that can:
|
|
5
|
+
* - Call an LLM (LLMSkill)
|
|
6
|
+
* - Transform data (TransformSkill)
|
|
7
|
+
* - Perform IO (IOSkill)
|
|
8
|
+
* - Execute Python (PythonSkill via bridge)
|
|
9
|
+
* - Wrap a sub-pipeline (CompositeSkill)
|
|
10
|
+
*/
|
|
11
|
+
import type { ZodSchema } from 'zod';
|
|
12
|
+
import type { LLMProvider } from './llm-provider.js';
|
|
13
|
+
import type { StateStore } from './state/types.js';
|
|
14
|
+
import type { Logger } from './logger.js';
|
|
15
|
+
/**
|
|
16
|
+
* Minimal interface that any MCP client must satisfy.
|
|
17
|
+
* Defined in core so OrchestratorConfig and SkillContext can reference it
|
|
18
|
+
* without hard-depending on @flomatai/mcp-client.
|
|
19
|
+
*
|
|
20
|
+
* @flomatai/mcp-client's MCPClient class implements this interface.
|
|
21
|
+
*/
|
|
22
|
+
export interface MCPClientLike {
|
|
23
|
+
/**
|
|
24
|
+
* List all tools exposed by the connected MCP server.
|
|
25
|
+
* Returns an array of tool descriptors (name, description, inputSchema).
|
|
26
|
+
*/
|
|
27
|
+
listTools(): Promise<Array<{
|
|
28
|
+
name: string;
|
|
29
|
+
description: string;
|
|
30
|
+
inputSchema: Record<string, unknown>;
|
|
31
|
+
}>>;
|
|
32
|
+
/**
|
|
33
|
+
* Call a named tool on the connected MCP server.
|
|
34
|
+
* @param name Tool name as returned by listTools().
|
|
35
|
+
* @param args Arguments matching the tool's inputSchema.
|
|
36
|
+
*/
|
|
37
|
+
callTool(name: string, args: Record<string, unknown>): Promise<unknown>;
|
|
38
|
+
}
|
|
39
|
+
export interface SkillMeta {
|
|
40
|
+
/** Unique identifier for this skill. Used in pipeline step names. */
|
|
41
|
+
name: string;
|
|
42
|
+
/** Human-readable description for agent routing and planning prompts. */
|
|
43
|
+
description: string;
|
|
44
|
+
/** Semantic version. */
|
|
45
|
+
version?: string;
|
|
46
|
+
/** Categorization tags (e.g. 'llm', 'transform', 'io'). */
|
|
47
|
+
tags?: string[];
|
|
48
|
+
/**
|
|
49
|
+
* Retry configuration.
|
|
50
|
+
* Defaults to 0 retries (fail immediately).
|
|
51
|
+
*/
|
|
52
|
+
retries?: number;
|
|
53
|
+
/**
|
|
54
|
+
* Per-execution timeout in milliseconds.
|
|
55
|
+
* 0 or undefined means no timeout.
|
|
56
|
+
*/
|
|
57
|
+
timeout?: number;
|
|
58
|
+
/**
|
|
59
|
+
* Cache configuration. If provided, identical inputs return cached results.
|
|
60
|
+
*/
|
|
61
|
+
cache?: {
|
|
62
|
+
/** Time-to-live in seconds. */
|
|
63
|
+
ttl: number;
|
|
64
|
+
/** Function that derives a cache key from the input. */
|
|
65
|
+
key: (input: unknown) => string;
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
export interface SkillContext {
|
|
69
|
+
/** The LLM bound to this execution context. */
|
|
70
|
+
llm: LLMProvider;
|
|
71
|
+
/** Child logger scoped to this skill execution. */
|
|
72
|
+
logger: Logger;
|
|
73
|
+
/** State store for caching and cross-step communication. */
|
|
74
|
+
state: StateStore;
|
|
75
|
+
/** Emit a named event (for observability / side effects). */
|
|
76
|
+
emit: (event: string, data: unknown) => void;
|
|
77
|
+
/** Arbitrary config passed from the orchestrator. */
|
|
78
|
+
config: Record<string, unknown>;
|
|
79
|
+
/** Abort signal — check this for graceful cancellation. */
|
|
80
|
+
abortSignal: AbortSignal;
|
|
81
|
+
/** ID of the current run. */
|
|
82
|
+
runId: string;
|
|
83
|
+
/** LLM registry — retrieve a named LLM by key. */
|
|
84
|
+
getLLM: (key: string) => LLMProvider;
|
|
85
|
+
/**
|
|
86
|
+
* MCP client registry — retrieve a named MCP client by key.
|
|
87
|
+
* Only present when the Orchestrator is configured with an `mcp` registry.
|
|
88
|
+
*/
|
|
89
|
+
getMCPClient?: (key: string) => MCPClientLike;
|
|
90
|
+
}
|
|
91
|
+
export interface Skill<TInput = unknown, TOutput = unknown> {
|
|
92
|
+
/** Metadata describing this skill. */
|
|
93
|
+
meta: SkillMeta;
|
|
94
|
+
/** Zod schema for validating input at runtime. */
|
|
95
|
+
inputSchema: ZodSchema<TInput>;
|
|
96
|
+
/** Zod schema for validating output at runtime. */
|
|
97
|
+
outputSchema: ZodSchema<TOutput>;
|
|
98
|
+
/**
|
|
99
|
+
* Execute the skill.
|
|
100
|
+
* @param input Validated input data.
|
|
101
|
+
* @param ctx Execution context (LLM, logger, state, etc.).
|
|
102
|
+
* @returns Validated output data.
|
|
103
|
+
*/
|
|
104
|
+
execute(input: TInput, ctx: SkillContext): Promise<TOutput>;
|
|
105
|
+
}
|
|
106
|
+
export interface SkillResult<T = unknown> {
|
|
107
|
+
output: T;
|
|
108
|
+
tokensUsed: number;
|
|
109
|
+
durationMs: number;
|
|
110
|
+
cached: boolean;
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=skill.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skill.d.ts","sourceRoot":"","sources":["../src/skill.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACrC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAI1C;;;;;;GAMG;AACH,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,SAAS,IAAI,OAAO,CAAC,KAAK,CAAC;QACzB,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACtC,CAAC,CAAC,CAAC;IACJ;;;;OAIG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACzE;AAID,MAAM,WAAW,SAAS;IACxB,qEAAqE;IACrE,IAAI,EAAE,MAAM,CAAC;IACb,yEAAyE;IACzE,WAAW,EAAE,MAAM,CAAC;IACpB,wBAAwB;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,2DAA2D;IAC3D,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB;;;OAGG;IACH,OAAO,CAAC,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;IACtC,MAAM,EAAE,CAAC,CAAC;IACV,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,OAAO,CAAC;CACjB"}
|
package/dist/skill.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skill — the atomic unit of work in flomatai.
|
|
3
|
+
*
|
|
4
|
+
* A Skill is a typed, composable function that can:
|
|
5
|
+
* - Call an LLM (LLMSkill)
|
|
6
|
+
* - Transform data (TransformSkill)
|
|
7
|
+
* - Perform IO (IOSkill)
|
|
8
|
+
* - Execute Python (PythonSkill via bridge)
|
|
9
|
+
* - Wrap a sub-pipeline (CompositeSkill)
|
|
10
|
+
*/
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=skill.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skill.js","sourceRoot":"","sources":["../src/skill.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IOSkill — a skill that performs file, HTTP, or other IO operations.
|
|
3
|
+
*
|
|
4
|
+
* Thin wrapper around TransformSkill but with 'io' tag and
|
|
5
|
+
* helper factories for common patterns.
|
|
6
|
+
*/
|
|
7
|
+
import type { Skill } from '../skill.js';
|
|
8
|
+
export declare function createHttpGetSkill(options: {
|
|
9
|
+
name: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
/** URL factory from input. */
|
|
12
|
+
url: (input: Record<string, unknown>) => string;
|
|
13
|
+
/** Headers factory from input. */
|
|
14
|
+
headers?: (input: Record<string, unknown>) => Record<string, string>;
|
|
15
|
+
/** Parse the response. Default: parse as JSON. */
|
|
16
|
+
parseResponse?: (body: string, status: number) => unknown;
|
|
17
|
+
timeout?: number;
|
|
18
|
+
retries?: number;
|
|
19
|
+
}): Skill;
|
|
20
|
+
export declare function createHttpPostSkill(options: {
|
|
21
|
+
name: string;
|
|
22
|
+
description?: string;
|
|
23
|
+
url: (input: Record<string, unknown>) => string;
|
|
24
|
+
body: (input: Record<string, unknown>) => unknown;
|
|
25
|
+
headers?: (input: Record<string, unknown>) => Record<string, string>;
|
|
26
|
+
parseResponse?: (body: string, status: number) => unknown;
|
|
27
|
+
timeout?: number;
|
|
28
|
+
}): Skill;
|
|
29
|
+
export declare function createReadFileSkill(options: {
|
|
30
|
+
name: string;
|
|
31
|
+
description?: string;
|
|
32
|
+
path: (input: Record<string, unknown>) => string;
|
|
33
|
+
encoding?: BufferEncoding;
|
|
34
|
+
}): Skill;
|
|
35
|
+
export declare function createWriteFileSkill(options: {
|
|
36
|
+
name: string;
|
|
37
|
+
description?: string;
|
|
38
|
+
path: (input: Record<string, unknown>) => string;
|
|
39
|
+
content: (input: Record<string, unknown>) => string;
|
|
40
|
+
encoding?: BufferEncoding;
|
|
41
|
+
}): Skill;
|
|
42
|
+
/** Namespace export */
|
|
43
|
+
export declare const IOSkill: {
|
|
44
|
+
httpGet: typeof createHttpGetSkill;
|
|
45
|
+
httpPost: typeof createHttpPostSkill;
|
|
46
|
+
readFile: typeof createReadFileSkill;
|
|
47
|
+
writeFile: typeof createWriteFileSkill;
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=io-skill.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"io-skill.d.ts","sourceRoot":"","sources":["../../src/skills/io-skill.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,EAAE,KAAK,EAAgB,MAAM,aAAa,CAAC;AAKvD,wBAAgB,kBAAkB,CAAC,OAAO,EAAE;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8BAA8B;IAC9B,GAAG,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,MAAM,CAAC;IAChD,kCAAkC;IAClC,OAAO,CAAC,E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M,CAAC;IACrB,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,MAAM,CAAC;IACjD,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,MAAM,CAAC;IACpD,QAAQ,CAAC,EAAE,cAAc,CAAC;CAC3B,GAAG,KAAK,CAeR;AAED,uBAAuB;AACvB,eAAO,MAAM,OAAO;;;;;CAKnB,CAAC"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IOSkill — a skill that performs file, HTTP, or other IO operations.
|
|
3
|
+
*
|
|
4
|
+
* Thin wrapper around TransformSkill but with 'io' tag and
|
|
5
|
+
* helper factories for common patterns.
|
|
6
|
+
*/
|
|
7
|
+
import { z } from 'zod';
|
|
8
|
+
import { readFile, writeFile, mkdir } from 'fs/promises';
|
|
9
|
+
import { dirname } from 'path';
|
|
10
|
+
import { createTransformSkill } from './transform-skill.js';
|
|
11
|
+
// ── HTTP GET ─────────────────────────────────────────────────────────────────
|
|
12
|
+
export function createHttpGetSkill(options) {
|
|
13
|
+
return createTransformSkill({
|
|
14
|
+
name: options.name,
|
|
15
|
+
description: options.description ?? `HTTP GET skill: ${options.name}`,
|
|
16
|
+
tags: ['io', 'http'],
|
|
17
|
+
inputSchema: z.record(z.unknown()),
|
|
18
|
+
outputSchema: z.unknown(),
|
|
19
|
+
timeout: options.timeout,
|
|
20
|
+
async transform(input) {
|
|
21
|
+
const url = options.url(input);
|
|
22
|
+
const headers = options.headers?.(input) ?? {};
|
|
23
|
+
const res = await fetch(url, { headers });
|
|
24
|
+
const body = await res.text();
|
|
25
|
+
if (options.parseResponse) {
|
|
26
|
+
return options.parseResponse(body, res.status);
|
|
27
|
+
}
|
|
28
|
+
try {
|
|
29
|
+
return JSON.parse(body);
|
|
30
|
+
}
|
|
31
|
+
catch {
|
|
32
|
+
return body;
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
// ── HTTP POST ────────────────────────────────────────────────────────────────
|
|
38
|
+
export function createHttpPostSkill(options) {
|
|
39
|
+
return createTransformSkill({
|
|
40
|
+
name: options.name,
|
|
41
|
+
description: options.description ?? `HTTP POST skill: ${options.name}`,
|
|
42
|
+
tags: ['io', 'http'],
|
|
43
|
+
inputSchema: z.record(z.unknown()),
|
|
44
|
+
outputSchema: z.unknown(),
|
|
45
|
+
timeout: options.timeout,
|
|
46
|
+
async transform(input) {
|
|
47
|
+
const url = options.url(input);
|
|
48
|
+
const headers = { 'Content-Type': 'application/json', ...(options.headers?.(input) ?? {}) };
|
|
49
|
+
const body = JSON.stringify(options.body(input));
|
|
50
|
+
const res = await fetch(url, { method: 'POST', headers, body });
|
|
51
|
+
const text = await res.text();
|
|
52
|
+
if (options.parseResponse) {
|
|
53
|
+
return options.parseResponse(text, res.status);
|
|
54
|
+
}
|
|
55
|
+
try {
|
|
56
|
+
return JSON.parse(text);
|
|
57
|
+
}
|
|
58
|
+
catch {
|
|
59
|
+
return text;
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
// ── File Read ─────────────────────────────────────────────────────────────────
|
|
65
|
+
export function createReadFileSkill(options) {
|
|
66
|
+
return createTransformSkill({
|
|
67
|
+
name: options.name,
|
|
68
|
+
description: options.description ?? `Read file skill: ${options.name}`,
|
|
69
|
+
tags: ['io', 'file'],
|
|
70
|
+
inputSchema: z.record(z.unknown()),
|
|
71
|
+
outputSchema: z.object({ content: z.string(), path: z.string() }),
|
|
72
|
+
async transform(input) {
|
|
73
|
+
const path = options.path(input);
|
|
74
|
+
const content = await readFile(path, options.encoding ?? 'utf-8');
|
|
75
|
+
return { content, path };
|
|
76
|
+
},
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
// ── File Write ────────────────────────────────────────────────────────────────
|
|
80
|
+
export function createWriteFileSkill(options) {
|
|
81
|
+
return createTransformSkill({
|
|
82
|
+
name: options.name,
|
|
83
|
+
description: options.description ?? `Write file skill: ${options.name}`,
|
|
84
|
+
tags: ['io', 'file'],
|
|
85
|
+
inputSchema: z.record(z.unknown()),
|
|
86
|
+
outputSchema: z.object({ path: z.string(), bytesWritten: z.number() }),
|
|
87
|
+
async transform(input) {
|
|
88
|
+
const path = options.path(input);
|
|
89
|
+
const content = options.content(input);
|
|
90
|
+
await mkdir(dirname(path), { recursive: true });
|
|
91
|
+
await writeFile(path, content, options.encoding ?? 'utf-8');
|
|
92
|
+
return { path, bytesWritten: Buffer.byteLength(content) };
|
|
93
|
+
},
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
/** Namespace export */
|
|
97
|
+
export const IOSkill = {
|
|
98
|
+
httpGet: createHttpGetSkill,
|
|
99
|
+
httpPost: createHttpPostSkill,
|
|
100
|
+
readFile: createReadFileSkill,
|
|
101
|
+
writeFile: createWriteFileSkill,
|
|
102
|
+
};
|
|
103
|
+
//# sourceMappingURL=io-skill.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"io-skill.js","sourceRoot":"","sources":["../../src/skills/io-skill.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAkB,MAAM,KAAK,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAE/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAE5D,gFAAgF;AAEhF,MAAM,UAAU,kBAAkB,CAAC,OAWlC;IACC,OAAO,oBAAoB,CAAC;QAC1B,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,WAAW,EAAE,OAAO,CAAC,WAAW,IAAI,mBAAmB,OAAO,CAAC,IAAI,EAAE;QACrE,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC;QACp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AACL,CAAC;AAED,uBAAuB;AACvB,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,OAAO,EAAE,kBAAkB;IAC3B,QAAQ,EAAE,mBAAmB;IAC7B,QAAQ,EAAE,mBAAmB;IAC7B,SAAS,EAAE,oBAAoB;CAChC,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LLMSkill — builds a Skill that calls an LLM with a prompt template.
|
|
3
|
+
*
|
|
4
|
+
* The primary skill type for LLM-backed operations.
|
|
5
|
+
*/
|
|
6
|
+
import { type ZodSchema } from 'zod';
|
|
7
|
+
import type { Skill, SkillMeta } from '../skill.js';
|
|
8
|
+
import type { Message } from '../types.js';
|
|
9
|
+
export interface LLMSkillConfig<TInput, TOutput> {
|
|
10
|
+
/** Unique skill name. */
|
|
11
|
+
name: string;
|
|
12
|
+
/** Human-readable description used in agent routing/planning prompts. */
|
|
13
|
+
description: string;
|
|
14
|
+
/** Version string (default '1.0.0'). */
|
|
15
|
+
version?: string;
|
|
16
|
+
/** Tags for categorization. */
|
|
17
|
+
tags?: string[];
|
|
18
|
+
/**
|
|
19
|
+
* Which LLM from the Orchestrator registry to use.
|
|
20
|
+
* Defaults to 'default'. Can be overridden per-execution.
|
|
21
|
+
*/
|
|
22
|
+
llm?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Prompt factory. Receives validated input, returns prompt string or messages array.
|
|
25
|
+
*/
|
|
26
|
+
prompt: (input: TInput) => string | Message[];
|
|
27
|
+
/**
|
|
28
|
+
* Optional system message prepended to every call.
|
|
29
|
+
*/
|
|
30
|
+
systemMessage?: string | ((input: TInput) => string);
|
|
31
|
+
/**
|
|
32
|
+
* Zod schema for input validation.
|
|
33
|
+
*/
|
|
34
|
+
inputSchema: ZodSchema<TInput>;
|
|
35
|
+
/**
|
|
36
|
+
* Zod schema for output validation.
|
|
37
|
+
*/
|
|
38
|
+
outputSchema: ZodSchema<TOutput>;
|
|
39
|
+
/**
|
|
40
|
+
* Function to parse the raw LLM text response into TOutput.
|
|
41
|
+
* If not provided, the raw text is returned as-is (must match outputSchema).
|
|
42
|
+
*/
|
|
43
|
+
parseOutput?: (raw: string, input: TInput) => TOutput;
|
|
44
|
+
/**
|
|
45
|
+
* LLM call options (temperature, maxTokens, etc.).
|
|
46
|
+
*/
|
|
47
|
+
llmOptions?: {
|
|
48
|
+
temperature?: number;
|
|
49
|
+
maxTokens?: number;
|
|
50
|
+
responseFormat?: 'text' | 'json';
|
|
51
|
+
};
|
|
52
|
+
/** Number of retries on LLM failure (default 1). */
|
|
53
|
+
retries?: number;
|
|
54
|
+
/** Timeout in ms (default none). */
|
|
55
|
+
timeout?: number;
|
|
56
|
+
/** Cache config. */
|
|
57
|
+
cache?: SkillMeta['cache'];
|
|
58
|
+
}
|
|
59
|
+
export declare function createLLMSkill<TInput, TOutput>(config: LLMSkillConfig<TInput, TOutput>): Skill<TInput, TOutput>;
|
|
60
|
+
/** Namespace export for ergonomic usage: LLMSkill.create(...) */
|
|
61
|
+
export declare const LLMSkill: {
|
|
62
|
+
create: typeof createLLMSkill;
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=llm-skill.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"llm-skill.d.ts","sourceRoot":"","sources":["../../src/skills/llm-skill.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAK,KAAK,SAAS,EAAE,MAAM,KAAK,CAAC;AACxC,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAgB,MAAM,aAAa,CAAC;AAClE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAM3C,MAAM,WAAW,cAAc,CAAC,MAAM,EAAE,OAAO;IAC7C,yBAAyB;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,yEAAyE;IACzE,WAAW,EAAE,MAAM,CAAC;IACpB,wCAAwC;IACxC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,+BAA+B;IAC/B,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,GAAG,OAAO,EAAE,CAAC;IAC9C;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC,CAAC;IACrD;;OAEG;IACH,WAAW,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IAC/B;;OAEG;IACH,YAAY,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;IACjC;;;OAGG;IACH,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;IACtD;;OAEG;IACH,UAAU,CAAC,EAAE;QACX,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;KAClC,CAAC;IACF,oDAAoD;IACpD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oCAAoC;IACpC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oBAAoB;IACpB,KAAK,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;CAC5B;AAID,wBAAgB,cAAc,CAAC,MAAM,EAAE,OAAO,EAC5C,MAAM,EAAE,cAAc,CAAC,MAAM,EAAE,OAAO,CAAC,GACtC,KAAK,CAAC,MAAM,EAAE,OAAO,CAAC,CAsIxB;AAED,iEAAiE;AACjE,eAAO,MAAM,QAAQ;;CAA6B,CAAC"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LLMSkill — builds a Skill that calls an LLM with a prompt template.
|
|
3
|
+
*
|
|
4
|
+
* The primary skill type for LLM-backed operations.
|
|
5
|
+
*/
|
|
6
|
+
import { SkillError, SkillValidationError } from '../errors.js';
|
|
7
|
+
import { withRetry, withTimeout } from '../llm-provider.js';
|
|
8
|
+
// ── LLMSkill Builder ──────────────────────────────────────────────────────────
|
|
9
|
+
export function createLLMSkill(config) {
|
|
10
|
+
const meta = {
|
|
11
|
+
name: config.name,
|
|
12
|
+
description: config.description,
|
|
13
|
+
version: config.version ?? '1.0.0',
|
|
14
|
+
tags: config.tags ?? ['llm'],
|
|
15
|
+
retries: config.retries ?? 1,
|
|
16
|
+
timeout: config.timeout,
|
|
17
|
+
cache: config.cache,
|
|
18
|
+
};
|
|
19
|
+
return {
|
|
20
|
+
meta,
|
|
21
|
+
inputSchema: config.inputSchema,
|
|
22
|
+
outputSchema: config.outputSchema,
|
|
23
|
+
async execute(input, ctx) {
|
|
24
|
+
// ── Input validation ──
|
|
25
|
+
const parsed = config.inputSchema.safeParse(input);
|
|
26
|
+
if (!parsed.success) {
|
|
27
|
+
throw new SkillValidationError(config.name, 'input', `Input validation failed: ${parsed.error.message}`, parsed.error.issues);
|
|
28
|
+
}
|
|
29
|
+
const validInput = parsed.data;
|
|
30
|
+
// ── Cache lookup ──
|
|
31
|
+
if (config.cache) {
|
|
32
|
+
const cacheKey = `llmskill:${config.name}:${config.cache.key(validInput)}`;
|
|
33
|
+
const cached = await ctx.state.get(cacheKey);
|
|
34
|
+
if (cached !== null) {
|
|
35
|
+
ctx.logger.debug(`Cache hit for skill "${config.name}"`);
|
|
36
|
+
return cached;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
// ── Resolve LLM ──
|
|
40
|
+
const llm = ctx.getLLM(config.llm ?? 'default');
|
|
41
|
+
// ── Build messages ──
|
|
42
|
+
const promptResult = config.prompt(validInput);
|
|
43
|
+
let messages;
|
|
44
|
+
if (typeof promptResult === 'string') {
|
|
45
|
+
messages = [{ role: 'user', content: promptResult }];
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
messages = promptResult;
|
|
49
|
+
}
|
|
50
|
+
// Prepend system message if provided
|
|
51
|
+
if (config.systemMessage) {
|
|
52
|
+
const sysContent = typeof config.systemMessage === 'string'
|
|
53
|
+
? config.systemMessage
|
|
54
|
+
: config.systemMessage(validInput);
|
|
55
|
+
messages = [{ role: 'system', content: sysContent }, ...messages];
|
|
56
|
+
}
|
|
57
|
+
// ── Execute with retry/timeout ──
|
|
58
|
+
const retries = config.retries ?? 1;
|
|
59
|
+
const timeout = config.timeout;
|
|
60
|
+
const doCall = () => llm.chat(messages, {
|
|
61
|
+
temperature: config.llmOptions?.temperature,
|
|
62
|
+
maxTokens: config.llmOptions?.maxTokens,
|
|
63
|
+
responseFormat: config.llmOptions?.responseFormat,
|
|
64
|
+
retries: 0, // retries handled here
|
|
65
|
+
});
|
|
66
|
+
const callWithRetry = () => withRetry(doCall, retries, (attempt, err) => ctx.logger.warn(`Skill "${config.name}" retry ${attempt}/${retries}: ${err.message}`));
|
|
67
|
+
const response = await (timeout
|
|
68
|
+
? withTimeout(callWithRetry, timeout, config.name)
|
|
69
|
+
: callWithRetry());
|
|
70
|
+
ctx.emit('llm:response', {
|
|
71
|
+
skill: config.name,
|
|
72
|
+
tokens: response.usage.totalTokens,
|
|
73
|
+
model: response.model,
|
|
74
|
+
});
|
|
75
|
+
// ── Parse output ──
|
|
76
|
+
let output;
|
|
77
|
+
try {
|
|
78
|
+
if (config.parseOutput) {
|
|
79
|
+
output = config.parseOutput(response.content, validInput);
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
// Try JSON parse if schema expects object, else return raw string
|
|
83
|
+
try {
|
|
84
|
+
output = JSON.parse(response.content);
|
|
85
|
+
}
|
|
86
|
+
catch {
|
|
87
|
+
output = response.content;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
catch (err) {
|
|
92
|
+
throw new SkillError(config.name, `Output parsing failed: ${err instanceof Error ? err.message : String(err)}`, { raw: response.content.substring(0, 500) });
|
|
93
|
+
}
|
|
94
|
+
// ── Output validation ──
|
|
95
|
+
const outParsed = config.outputSchema.safeParse(output);
|
|
96
|
+
if (!outParsed.success) {
|
|
97
|
+
ctx.logger.warn(`Skill "${config.name}" output failed schema validation — returning raw`, outParsed.error.issues);
|
|
98
|
+
// Don't hard-fail on output validation — return what we have
|
|
99
|
+
// This matches real-world LLM usage where output schema is a guide not a gate
|
|
100
|
+
}
|
|
101
|
+
// ── Cache store ──
|
|
102
|
+
if (config.cache) {
|
|
103
|
+
const cacheKey = `llmskill:${config.name}:${config.cache.key(validInput)}`;
|
|
104
|
+
await ctx.state.set(cacheKey, output, config.cache.ttl);
|
|
105
|
+
}
|
|
106
|
+
return output;
|
|
107
|
+
},
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
/** Namespace export for ergonomic usage: LLMSkill.create(...) */
|
|
111
|
+
export const LLMSkill = { create: createLLMSkill };
|
|
112
|
+
//# sourceMappingURL=llm-skill.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"llm-skill.js","sourceRoot":"","sources":["../../src/skills/llm-skill.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAuD5D,iFAAiF;AAEjF,MAAM,UAAU,cAAc,CAC5B,MAAuC;IAEvC,MAAM,IAAI,GAAc;QACtB,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,OAAO,EAAE,MAAM,CAAC,OAAO,IAAI,OAAO;QAClC,IAAI,EAAE,MAAM,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC;QAC5B,OAAO,EAAE,MAAM,CAAC,OAAO,IAAI,CAAC;QAC5B,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,KAAK,EAAE,MAAM,CAAC,KAAK;KACpB,CAAC;IAEF,OAAO;QACL,IAAI;QAC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,CACvB,CAAC;gBACF,6DAA6D;gBAC7D,8EAA8E;YAChF,CAAC;YAED,oBAAoB;YACpB,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;gBACjB,MAAM,QAAQ,GAAG,YAAY,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC;gBAC3E,MAAM,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAC1D,CAAC;YAED,OAAO,MAAM,CAAC;QAChB,CAAC;KACF,CAAC;AACJ,CAAC;AAED,iEAAiE;AACjE,MAAM,CAAC,MAAM,QAAQ,GAAG,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TransformSkill — a pure data transformation skill (no LLM).
|
|
3
|
+
*
|
|
4
|
+
* Pure data transformation skill.
|
|
5
|
+
*/
|
|
6
|
+
import type { ZodSchema } from 'zod';
|
|
7
|
+
import type { Skill, SkillContext } from '../skill.js';
|
|
8
|
+
export interface TransformSkillConfig<TInput, TOutput> {
|
|
9
|
+
name: string;
|
|
10
|
+
description: string;
|
|
11
|
+
version?: string;
|
|
12
|
+
tags?: string[];
|
|
13
|
+
inputSchema: ZodSchema<TInput>;
|
|
14
|
+
outputSchema: ZodSchema<TOutput>;
|
|
15
|
+
/**
|
|
16
|
+
* The transformation function. Pure sync or async.
|
|
17
|
+
* The second argument (ctx) is optional — most transforms won't need it.
|
|
18
|
+
*/
|
|
19
|
+
transform: (input: TInput, ctx?: SkillContext) => TOutput | Promise<TOutput>;
|
|
20
|
+
timeout?: number;
|
|
21
|
+
}
|
|
22
|
+
export declare function createTransformSkill<TInput, TOutput>(config: TransformSkillConfig<TInput, TOutput>): Skill<TInput, TOutput>;
|
|
23
|
+
/** Namespace export: TransformSkill.create(...) */
|
|
24
|
+
export declare const TransformSkill: {
|
|
25
|
+
create: typeof createTransformSkill;
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=transform-skill.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transform-skill.d.ts","sourceRoot":"","sources":["../../src/skills/transform-skill.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACrC,OAAO,KAAK,EAAE,KAAK,EAAa,YAAY,EAAE,MAAM,aAAa,CAAC;AAGlE,MAAM,WAAW,oBAAoB,CAAC,MAAM,EAAE,OAAO;IACnD,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,WAAW,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IAC/B,YAAY,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;IACjC;;;OAGG;IACH,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,YAAY,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7E,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,OAAO,EAClD,MAAM,EAAE,oBAAoB,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5C,KAAK,CAAC,MAAM,EAAE,OAAO,CAAC,CA8BxB;AAED,mDAAmD;AACnD,eAAO,MAAM,cAAc;;CAAmC,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TransformSkill — a pure data transformation skill (no LLM).
|
|
3
|
+
*
|
|
4
|
+
* Pure data transformation skill.
|
|
5
|
+
*/
|
|
6
|
+
import { SkillValidationError } from '../errors.js';
|
|
7
|
+
export function createTransformSkill(config) {
|
|
8
|
+
const meta = {
|
|
9
|
+
name: config.name,
|
|
10
|
+
description: config.description,
|
|
11
|
+
version: config.version ?? '1.0.0',
|
|
12
|
+
tags: config.tags ?? ['transform'],
|
|
13
|
+
timeout: config.timeout,
|
|
14
|
+
};
|
|
15
|
+
return {
|
|
16
|
+
meta,
|
|
17
|
+
inputSchema: config.inputSchema,
|
|
18
|
+
outputSchema: config.outputSchema,
|
|
19
|
+
async execute(input, ctx) {
|
|
20
|
+
// Input validation
|
|
21
|
+
const parsed = config.inputSchema.safeParse(input);
|
|
22
|
+
if (!parsed.success) {
|
|
23
|
+
throw new SkillValidationError(config.name, 'input', `Input validation failed: ${parsed.error.message}`, parsed.error.issues);
|
|
24
|
+
}
|
|
25
|
+
const output = await config.transform(parsed.data, ctx);
|
|
26
|
+
return output;
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
/** Namespace export: TransformSkill.create(...) */
|
|
31
|
+
export const TransformSkill = { create: createTransformSkill };
|
|
32
|
+
//# sourceMappingURL=transform-skill.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transform-skill.js","sourceRoot":"","sources":["../../src/skills/transform-skill.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAiBpD,MAAM,UAAU,oBAAoB,CAClC,MAA6C;IAE7C,MAAM,IAAI,GAAc;QACtB,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,OAAO,EAAE,MAAM,CAAC,OAAO,IAAI,OAAO;QAClC,IAAI,EAAE,MAAM,CAAC,IAAI,IAAI,CAAC,WAAW,CAAC;QAClC,OAAO,EAAE,MAAM,CAAC,OAAO;KACxB,CAAC;IAEF,OAAO;QACL,IAAI;QACJ,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,YAAY,EAAE,MAAM,CAAC,YAAY;QAEjC,KAAK,CAAC,OAAO,CAAC,KAAa,EAAE,GAAiB;YAC5C,mBAAmB;YACnB,MAAM,MAAM,GAAG,MAAM,CAAC,WAAW,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;YACnD,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;gBACpB,MAAM,IAAI,oBAAoB,CAC5B,MAAM,CAAC,IAAI,EACX,OAAO,EACP,4BAA4B,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,EAClD,MAAM,CAAC,KAAK,CAAC,MAAM,CACpB,CAAC;YACJ,CAAC;YAED,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;YACxD,OAAO,MAAM,CAAC;QAChB,CAAC;KACF,CAAC;AACJ,CAAC;AAED,mDAAmD;AACnD,MAAM,CAAC,MAAM,cAAc,GAAG,EAAE,MAAM,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File-based StateStore — persists data as JSON files.
|
|
3
|
+
* Good for development and small-scale use. No external dependencies.
|
|
4
|
+
*/
|
|
5
|
+
import type { StateStore, RunFilter } from './types.js';
|
|
6
|
+
import type { PipelineRun } from '../types.js';
|
|
7
|
+
export declare class FileStore implements StateStore {
|
|
8
|
+
private readonly dataFile;
|
|
9
|
+
private data;
|
|
10
|
+
constructor(dataDir?: string);
|
|
11
|
+
init(): Promise<void>;
|
|
12
|
+
close(): Promise<void>;
|
|
13
|
+
private flush;
|
|
14
|
+
get<T>(key: string): Promise<T | null>;
|
|
15
|
+
set<T>(key: string, value: T, ttlSeconds?: number): Promise<void>;
|
|
16
|
+
delete(key: string): Promise<void>;
|
|
17
|
+
has(key: string): Promise<boolean>;
|
|
18
|
+
saveRun(run: PipelineRun): Promise<void>;
|
|
19
|
+
getRun(runId: string): Promise<PipelineRun | null>;
|
|
20
|
+
listRuns(filter?: RunFilter): Promise<PipelineRun[]>;
|
|
21
|
+
saveCheckpoint(runId: string, stepName: string, data: unknown): Promise<void>;
|
|
22
|
+
getCheckpoint(runId: string, stepName: string): Promise<unknown | null>;
|
|
23
|
+
clearCheckpoints(runId: string): Promise<void>;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=file-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-store.d.ts","sourceRoot":"","sources":["../../src/state/file-store.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAa/C,qBAAa,SAAU,YAAW,UAAU;IAC1C,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,IAAI,CAA2D;gBAE3D,OAAO,SAAc;IAI3B,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAYrB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;YAId,KAAK;IAKb,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IAUtC,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQjE,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKlC,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAKlC,OAAO,CAAC,GAAG,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAKxC,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;IAIlD,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,GAAG,OAAO,CAA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