@ekairos/story 1.6.2 → 1.6.3

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 (42) hide show
  1. package/dist/agent.d.ts +72 -72
  2. package/dist/agent.js +478 -478
  3. package/dist/document-parser.d.ts +15 -15
  4. package/dist/document-parser.js +156 -156
  5. package/dist/engine.d.ts +21 -21
  6. package/dist/engine.js +35 -35
  7. package/dist/events.d.ts +27 -27
  8. package/dist/events.js +203 -203
  9. package/dist/index.d.ts +11 -13
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +50 -52
  12. package/dist/index.js.map +1 -1
  13. package/dist/schema.d.ts +107 -107
  14. package/dist/schema.js +63 -63
  15. package/dist/service.d.ts +44 -44
  16. package/dist/service.js +202 -202
  17. package/dist/steps/ai.d.ts +42 -42
  18. package/dist/steps/ai.js +135 -135
  19. package/dist/steps/base.d.ts +13 -13
  20. package/dist/steps/base.js +36 -36
  21. package/dist/steps/index.d.ts +3 -4
  22. package/dist/steps/index.d.ts.map +1 -1
  23. package/dist/steps/index.js +19 -20
  24. package/dist/steps/index.js.map +1 -1
  25. package/dist/steps/registry.d.ts +4 -4
  26. package/dist/steps/registry.js +28 -28
  27. package/dist/steps/sampleStep.d.ts.map +1 -1
  28. package/dist/steps/sampleStep.js +1 -1
  29. package/dist/steps/sampleStep.js.map +1 -1
  30. package/dist/steps-context.d.ts +11 -11
  31. package/dist/steps-context.js +19 -19
  32. package/dist/story.d.ts +49 -49
  33. package/dist/story.js +54 -54
  34. package/dist/storyEngine.d.ts +54 -54
  35. package/dist/storyEngine.js +50 -50
  36. package/dist/storyRunner.d.ts +7 -7
  37. package/dist/storyRunner.js +55 -55
  38. package/dist/workflows/sampleWorkflow.d.ts +5 -1
  39. package/dist/workflows/sampleWorkflow.d.ts.map +1 -1
  40. package/dist/workflows/sampleWorkflow.js +6 -2
  41. package/dist/workflows/sampleWorkflow.js.map +1 -1
  42. package/package.json +2 -2
package/dist/story.d.ts CHANGED
@@ -1,50 +1,50 @@
1
- import type { ContextIdentifier } from "./service";
2
- export type PrimitiveType = "string" | "number" | "boolean" | "object" | "array";
3
- export type FieldSchema = {
4
- type: PrimitiveType;
5
- description?: string;
6
- required?: boolean;
7
- properties?: Record<string, FieldSchema>;
8
- items?: FieldSchema;
9
- };
10
- export type StepInputSchema = {
11
- type: "object";
12
- description?: string;
13
- properties?: Record<string, FieldSchema>;
14
- };
15
- export type StoryActionSpec = {
16
- name: string;
17
- description: string;
18
- implementationKey: string;
19
- inputSchema?: StepInputSchema;
20
- finalize?: boolean;
21
- execute?: (args: any & {
22
- contextId?: string;
23
- }) => Promise<any>;
24
- };
25
- export type StoryOptions = {
26
- reasoningEffort?: "low" | "medium" | "high";
27
- webSearch?: boolean;
28
- maxLoops?: number;
29
- finalActions?: string[];
30
- includeBaseTools?: {
31
- createMessage?: boolean;
32
- requestDirection?: boolean;
33
- end?: boolean;
34
- };
35
- };
36
- export type StoryConfig = {
37
- narrative: string;
38
- actions: StoryActionSpec[];
39
- options?: StoryOptions;
40
- };
41
- export type StoryStartArgs = {
42
- context?: ContextIdentifier | null;
43
- trigger?: any | null;
44
- };
45
- export declare function story(key: string, config: StoryConfig): (args?: StoryStartArgs) => Promise<{
46
- contextId: string;
47
- status: "completed";
48
- }>;
49
- export type { StoryActionSpec as StoryAction, StoryOptions as StoryConfigOptions };
1
+ import type { ContextIdentifier } from "./service";
2
+ export type PrimitiveType = "string" | "number" | "boolean" | "object" | "array";
3
+ export type FieldSchema = {
4
+ type: PrimitiveType;
5
+ description?: string;
6
+ required?: boolean;
7
+ properties?: Record<string, FieldSchema>;
8
+ items?: FieldSchema;
9
+ };
10
+ export type StepInputSchema = {
11
+ type: "object";
12
+ description?: string;
13
+ properties?: Record<string, FieldSchema>;
14
+ };
15
+ export type StoryActionSpec = {
16
+ name: string;
17
+ description: string;
18
+ implementationKey: string;
19
+ inputSchema?: StepInputSchema;
20
+ finalize?: boolean;
21
+ execute?: (args: any & {
22
+ contextId?: string;
23
+ }) => Promise<any>;
24
+ };
25
+ export type StoryOptions = {
26
+ reasoningEffort?: "low" | "medium" | "high";
27
+ webSearch?: boolean;
28
+ maxLoops?: number;
29
+ finalActions?: string[];
30
+ includeBaseTools?: {
31
+ createMessage?: boolean;
32
+ requestDirection?: boolean;
33
+ end?: boolean;
34
+ };
35
+ };
36
+ export type StoryConfig = {
37
+ narrative: string;
38
+ actions: StoryActionSpec[];
39
+ options?: StoryOptions;
40
+ };
41
+ export type StoryStartArgs = {
42
+ context?: ContextIdentifier | null;
43
+ trigger?: any | null;
44
+ };
45
+ export declare function story(key: string, config: StoryConfig): (args?: StoryStartArgs) => Promise<{
46
+ contextId: string;
47
+ status: "completed";
48
+ }>;
49
+ export type { StoryActionSpec as StoryAction, StoryOptions as StoryConfigOptions };
50
50
  //# sourceMappingURL=story.d.ts.map
package/dist/story.js CHANGED
@@ -1,55 +1,55 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.story = story;
4
- // Steps (se resuelven en tiempo de ejecución del step, no en workflow)
5
- // Se importan como referencias; su lógica corre con "use step" dentro de cada función.
6
- const steps_context_1 = require("./steps-context");
7
- const ai_1 = require("./steps/ai");
8
- const base_1 = require("./steps/base");
9
- // story(): genera una función workflow que orquesta los steps de manera durable
10
- function story(key, config) {
11
- // Retorna una función que orquesta la iteración del workflow (sin directiva)
12
- return async function runStory(args) {
13
- const maxLoops = config.options?.maxLoops ?? 10;
14
- const { contextId } = await (0, steps_context_1.ensureContextStep)({ key, context: args?.context ?? null });
15
- let loopCount = 0;
16
- while (loopCount < maxLoops) {
17
- loopCount++;
18
- const systemPrompt = await (0, steps_context_1.buildSystemPromptStep)({
19
- contextId,
20
- narrative: config.narrative,
21
- });
22
- const { toolCalls } = await (0, ai_1.runReasoningOnceStep)({
23
- contextId,
24
- systemPrompt,
25
- actions: config.actions,
26
- options: config.options ?? {},
27
- });
28
- if (!toolCalls || toolCalls.length === 0) {
29
- break;
30
- }
31
- const executions = await Promise.all(toolCalls.map(async (tc) => {
32
- const action = config.actions.find((a) => a.name === tc.toolName);
33
- const implementationKey = (action?.implementationKey || tc.toolName);
34
- const result = await (0, base_1.executeRegisteredStep)({
35
- implementationKey,
36
- contextId,
37
- args: tc.args,
38
- });
39
- return { tc, action, result };
40
- }));
41
- const shouldEnd = executions.some(({ action }) => {
42
- const isFinalByAction = Boolean(action?.finalize);
43
- const isFinalByOptions = action && Array.isArray(config.options?.finalActions)
44
- ? (config.options.finalActions).includes(action.name)
45
- : false;
46
- return isFinalByAction || isFinalByOptions;
47
- });
48
- if (shouldEnd) {
49
- break;
50
- }
51
- }
52
- return { contextId, status: "completed" };
53
- };
54
- }
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.story = story;
4
+ // Steps (se resuelven en tiempo de ejecución del step, no en workflow)
5
+ // Se importan como referencias; su lógica corre con "use step" dentro de cada función.
6
+ const steps_context_1 = require("./steps-context");
7
+ const ai_1 = require("./steps/ai");
8
+ const base_1 = require("./steps/base");
9
+ // story(): genera una función workflow que orquesta los steps de manera durable
10
+ function story(key, config) {
11
+ // Retorna una función que orquesta la iteración del workflow (sin directiva)
12
+ return async function runStory(args) {
13
+ const maxLoops = config.options?.maxLoops ?? 10;
14
+ const { contextId } = await (0, steps_context_1.ensureContextStep)({ key, context: args?.context ?? null });
15
+ let loopCount = 0;
16
+ while (loopCount < maxLoops) {
17
+ loopCount++;
18
+ const systemPrompt = await (0, steps_context_1.buildSystemPromptStep)({
19
+ contextId,
20
+ narrative: config.narrative,
21
+ });
22
+ const { toolCalls } = await (0, ai_1.runReasoningOnceStep)({
23
+ contextId,
24
+ systemPrompt,
25
+ actions: config.actions,
26
+ options: config.options ?? {},
27
+ });
28
+ if (!toolCalls || toolCalls.length === 0) {
29
+ break;
30
+ }
31
+ const executions = await Promise.all(toolCalls.map(async (tc) => {
32
+ const action = config.actions.find((a) => a.name === tc.toolName);
33
+ const implementationKey = (action?.implementationKey || tc.toolName);
34
+ const result = await (0, base_1.executeRegisteredStep)({
35
+ implementationKey,
36
+ contextId,
37
+ args: tc.args,
38
+ });
39
+ return { tc, action, result };
40
+ }));
41
+ const shouldEnd = executions.some(({ action }) => {
42
+ const isFinalByAction = Boolean(action?.finalize);
43
+ const isFinalByOptions = action && Array.isArray(config.options?.finalActions)
44
+ ? (config.options.finalActions).includes(action.name)
45
+ : false;
46
+ return isFinalByAction || isFinalByOptions;
47
+ });
48
+ if (shouldEnd) {
49
+ break;
50
+ }
51
+ }
52
+ return { contextId, status: "completed" };
53
+ };
54
+ }
55
55
  //# sourceMappingURL=story.js.map
@@ -1,55 +1,55 @@
1
- import { StoryActionSpec } from "./story";
2
- export type StoryRuntimeAction = {
3
- name: string;
4
- implementationKey: string;
5
- execute: (args: any & {
6
- contextId?: string;
7
- }) => Promise<any>;
8
- };
9
- export type StoryRuntimeCallbacks = {
10
- onToolCallExecuted?: (executionEvent: {
11
- toolCall: {
12
- toolCallId: string;
13
- toolName: string;
14
- args: any;
15
- };
16
- success: boolean;
17
- message?: string;
18
- result?: any;
19
- contextId: string;
20
- }) => void | Promise<void>;
21
- evaluateToolCalls?: (toolCalls: any[]) => Promise<{
22
- success: boolean;
23
- message?: string;
24
- }>;
25
- onEnd?: (lastEvent: any) => void | {
26
- end?: boolean;
27
- } | Promise<void | {
28
- end?: boolean;
29
- }>;
30
- };
31
- export type StoryRuntime = {
32
- key: string;
33
- narrative: string;
34
- actions: Record<string, StoryRuntimeAction>;
35
- callbacks?: StoryRuntimeCallbacks;
36
- };
37
- export type StoryDescriptor = {
38
- key: string;
39
- narrative: string;
40
- actions: Array<Pick<StoryActionSpec, "name" | "description" | "inputSchema" | "finalize" | "implementationKey">>;
41
- options?: any;
42
- };
43
- export declare const engine: {
44
- register(story: {
45
- key: string;
46
- narrative: string;
47
- actions: StoryActionSpec[];
48
- callbacks?: StoryRuntimeCallbacks;
49
- options?: any;
50
- }): {
51
- story: (key: string) => StoryDescriptor;
52
- };
53
- get(key: string): StoryRuntime | undefined;
54
- };
1
+ import { StoryActionSpec } from "./story";
2
+ export type StoryRuntimeAction = {
3
+ name: string;
4
+ implementationKey: string;
5
+ execute: (args: any & {
6
+ contextId?: string;
7
+ }) => Promise<any>;
8
+ };
9
+ export type StoryRuntimeCallbacks = {
10
+ onToolCallExecuted?: (executionEvent: {
11
+ toolCall: {
12
+ toolCallId: string;
13
+ toolName: string;
14
+ args: any;
15
+ };
16
+ success: boolean;
17
+ message?: string;
18
+ result?: any;
19
+ contextId: string;
20
+ }) => void | Promise<void>;
21
+ evaluateToolCalls?: (toolCalls: any[]) => Promise<{
22
+ success: boolean;
23
+ message?: string;
24
+ }>;
25
+ onEnd?: (lastEvent: any) => void | {
26
+ end?: boolean;
27
+ } | Promise<void | {
28
+ end?: boolean;
29
+ }>;
30
+ };
31
+ export type StoryRuntime = {
32
+ key: string;
33
+ narrative: string;
34
+ actions: Record<string, StoryRuntimeAction>;
35
+ callbacks?: StoryRuntimeCallbacks;
36
+ };
37
+ export type StoryDescriptor = {
38
+ key: string;
39
+ narrative: string;
40
+ actions: Array<Pick<StoryActionSpec, "name" | "description" | "inputSchema" | "finalize" | "implementationKey">>;
41
+ options?: any;
42
+ };
43
+ export declare const engine: {
44
+ register(story: {
45
+ key: string;
46
+ narrative: string;
47
+ actions: StoryActionSpec[];
48
+ callbacks?: StoryRuntimeCallbacks;
49
+ options?: any;
50
+ }): {
51
+ story: (key: string) => StoryDescriptor;
52
+ };
53
+ get(key: string): StoryRuntime | undefined;
54
+ };
55
55
  //# sourceMappingURL=storyEngine.d.ts.map
@@ -1,51 +1,51 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.engine = void 0;
4
- const GLOBAL_STORY_ENGINE_SYMBOL = Symbol.for("PULZAR_STORY_ENGINE");
5
- function getGlobalEngine() {
6
- const g = globalThis;
7
- if (!g[GLOBAL_STORY_ENGINE_SYMBOL]) {
8
- g[GLOBAL_STORY_ENGINE_SYMBOL] = { stories: new Map() };
9
- }
10
- return g[GLOBAL_STORY_ENGINE_SYMBOL];
11
- }
12
- exports.engine = {
13
- register(story) {
14
- const runtimeActions = {};
15
- for (const a of story.actions) {
16
- if (typeof a.execute === "function") {
17
- runtimeActions[a.implementationKey || a.name] = {
18
- name: a.name,
19
- implementationKey: a.implementationKey || a.name,
20
- execute: (a.execute),
21
- };
22
- }
23
- }
24
- const runtime = {
25
- key: story.key,
26
- narrative: story.narrative,
27
- actions: runtimeActions,
28
- callbacks: story.callbacks,
29
- };
30
- getGlobalEngine().stories.set(story.key, runtime);
31
- return {
32
- story: (key) => {
33
- const rt = getGlobalEngine().stories.get(key);
34
- if (!rt)
35
- throw new Error(`Story not registered: ${key}`);
36
- const actions = story.actions.map((a) => ({
37
- name: a.name,
38
- description: a.description,
39
- inputSchema: a.inputSchema,
40
- finalize: a.finalize,
41
- implementationKey: a.implementationKey,
42
- }));
43
- return { key: story.key, narrative: story.narrative, actions, options: story.options };
44
- }
45
- };
46
- },
47
- get(key) {
48
- return getGlobalEngine().stories.get(key);
49
- }
50
- };
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.engine = void 0;
4
+ const GLOBAL_STORY_ENGINE_SYMBOL = Symbol.for("PULZAR_STORY_ENGINE");
5
+ function getGlobalEngine() {
6
+ const g = globalThis;
7
+ if (!g[GLOBAL_STORY_ENGINE_SYMBOL]) {
8
+ g[GLOBAL_STORY_ENGINE_SYMBOL] = { stories: new Map() };
9
+ }
10
+ return g[GLOBAL_STORY_ENGINE_SYMBOL];
11
+ }
12
+ exports.engine = {
13
+ register(story) {
14
+ const runtimeActions = {};
15
+ for (const a of story.actions) {
16
+ if (typeof a.execute === "function") {
17
+ runtimeActions[a.implementationKey || a.name] = {
18
+ name: a.name,
19
+ implementationKey: a.implementationKey || a.name,
20
+ execute: (a.execute),
21
+ };
22
+ }
23
+ }
24
+ const runtime = {
25
+ key: story.key,
26
+ narrative: story.narrative,
27
+ actions: runtimeActions,
28
+ callbacks: story.callbacks,
29
+ };
30
+ getGlobalEngine().stories.set(story.key, runtime);
31
+ return {
32
+ story: (key) => {
33
+ const rt = getGlobalEngine().stories.get(key);
34
+ if (!rt)
35
+ throw new Error(`Story not registered: ${key}`);
36
+ const actions = story.actions.map((a) => ({
37
+ name: a.name,
38
+ description: a.description,
39
+ inputSchema: a.inputSchema,
40
+ finalize: a.finalize,
41
+ implementationKey: a.implementationKey,
42
+ }));
43
+ return { key: story.key, narrative: story.narrative, actions, options: story.options };
44
+ }
45
+ };
46
+ },
47
+ get(key) {
48
+ return getGlobalEngine().stories.get(key);
49
+ }
50
+ };
51
51
  //# sourceMappingURL=storyEngine.js.map
@@ -1,8 +1,8 @@
1
- import { type StoryDescriptor } from "./storyEngine";
2
- export declare function storyRunner(serialized: StoryDescriptor, args?: {
3
- context?: any;
4
- }): Promise<{
5
- success: boolean;
6
- contextId: string;
7
- }>;
1
+ import { type StoryDescriptor } from "./storyEngine";
2
+ export declare function storyRunner(serialized: StoryDescriptor, args?: {
3
+ context?: any;
4
+ }): Promise<{
5
+ success: boolean;
6
+ contextId: string;
7
+ }>;
8
8
  //# sourceMappingURL=storyRunner.d.ts.map
@@ -1,56 +1,56 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.storyRunner = storyRunner;
4
- const storyEngine_1 = require("./storyEngine");
5
- const steps_context_1 = require("./steps-context");
6
- const ai_1 = require("./steps/ai");
7
- const base_1 = require("./steps/base");
8
- async function storyRunner(serialized, args) {
9
- "use workflow";
10
- const maxLoops = 10;
11
- const { contextId } = await (0, steps_context_1.ensureContextStep)({ key: serialized.key, context: args?.context ?? null });
12
- let loopCount = 0;
13
- while (loopCount < maxLoops) {
14
- loopCount++;
15
- const systemPrompt = await (0, steps_context_1.buildSystemPromptStep)({
16
- contextId,
17
- narrative: serialized.narrative,
18
- });
19
- const { toolCalls } = await (0, ai_1.runReasoningOnceStep)({
20
- contextId,
21
- systemPrompt,
22
- actions: serialized.actions.map((a) => ({
23
- name: a.name,
24
- description: a.description,
25
- implementationKey: a.implementationKey || a.name,
26
- inputSchema: a.inputSchema,
27
- finalize: a.finalize,
28
- })),
29
- options: { reasoningEffort: "medium" },
30
- });
31
- if (!toolCalls || toolCalls.length === 0) {
32
- break;
33
- }
34
- const rt = storyEngine_1.engine.get(serialized.key);
35
- if (!rt)
36
- throw new Error(`Story runtime not found for key=${serialized.key}`);
37
- const executions = await Promise.all(toolCalls.map(async (tc) => {
38
- const implKey = tc.toolName;
39
- const action = rt.actions[implKey];
40
- if (action && typeof action.execute === "function") {
41
- // Ejecutar en el runtime local (no serializable) dentro de un step wrapper
42
- return await (0, base_1.executeRegisteredStep)({ implementationKey: implKey, contextId, args: tc.args });
43
- }
44
- // fallback: ejecutar step registrado directo si existe
45
- return await (0, base_1.executeRegisteredStep)({ implementationKey: implKey, contextId, args: tc.args });
46
- }));
47
- const shouldEnd = executions.some((_r, i) => {
48
- const a = serialized.actions.find((x) => (x.implementationKey || x.name) === toolCalls[i].toolName);
49
- return Boolean(a?.finalize);
50
- });
51
- if (shouldEnd)
52
- break;
53
- }
54
- return { success: true, contextId };
55
- }
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.storyRunner = storyRunner;
4
+ const storyEngine_1 = require("./storyEngine");
5
+ const steps_context_1 = require("./steps-context");
6
+ const ai_1 = require("./steps/ai");
7
+ const base_1 = require("./steps/base");
8
+ async function storyRunner(serialized, args) {
9
+ "use workflow";
10
+ const maxLoops = 10;
11
+ const { contextId } = await (0, steps_context_1.ensureContextStep)({ key: serialized.key, context: args?.context ?? null });
12
+ let loopCount = 0;
13
+ while (loopCount < maxLoops) {
14
+ loopCount++;
15
+ const systemPrompt = await (0, steps_context_1.buildSystemPromptStep)({
16
+ contextId,
17
+ narrative: serialized.narrative,
18
+ });
19
+ const { toolCalls } = await (0, ai_1.runReasoningOnceStep)({
20
+ contextId,
21
+ systemPrompt,
22
+ actions: serialized.actions.map((a) => ({
23
+ name: a.name,
24
+ description: a.description,
25
+ implementationKey: a.implementationKey || a.name,
26
+ inputSchema: a.inputSchema,
27
+ finalize: a.finalize,
28
+ })),
29
+ options: { reasoningEffort: "medium" },
30
+ });
31
+ if (!toolCalls || toolCalls.length === 0) {
32
+ break;
33
+ }
34
+ const rt = storyEngine_1.engine.get(serialized.key);
35
+ if (!rt)
36
+ throw new Error(`Story runtime not found for key=${serialized.key}`);
37
+ const executions = await Promise.all(toolCalls.map(async (tc) => {
38
+ const implKey = tc.toolName;
39
+ const action = rt.actions[implKey];
40
+ if (action && typeof action.execute === "function") {
41
+ // Ejecutar en el runtime local (no serializable) dentro de un step wrapper
42
+ return await (0, base_1.executeRegisteredStep)({ implementationKey: implKey, contextId, args: tc.args });
43
+ }
44
+ // fallback: ejecutar step registrado directo si existe
45
+ return await (0, base_1.executeRegisteredStep)({ implementationKey: implKey, contextId, args: tc.args });
46
+ }));
47
+ const shouldEnd = executions.some((_r, i) => {
48
+ const a = serialized.actions.find((x) => (x.implementationKey || x.name) === toolCalls[i].toolName);
49
+ return Boolean(a?.finalize);
50
+ });
51
+ if (shouldEnd)
52
+ break;
53
+ }
54
+ return { success: true, contextId };
55
+ }
56
56
  //# sourceMappingURL=storyRunner.js.map
@@ -2,7 +2,11 @@ export interface SampleWorkflowInput {
2
2
  text: string;
3
3
  }
4
4
  export interface SampleWorkflowOutput {
5
- uppercase: string;
5
+ ok: boolean;
6
+ workflow: string;
7
+ echo: string;
8
+ upper: string;
9
+ stepProcessed: boolean;
6
10
  }
7
11
  export declare function sampleWorkflow(input: SampleWorkflowInput): Promise<SampleWorkflowOutput>;
8
12
  //# sourceMappingURL=sampleWorkflow.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sampleWorkflow.d.ts","sourceRoot":"","sources":["../../src/workflows/sampleWorkflow.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,mBAAmB;IAElC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,oBAAoB;IAEnC,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,wBAAsB,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAmB9F"}
1
+ {"version":3,"file":"sampleWorkflow.d.ts","sourceRoot":"","sources":["../../src/workflows/sampleWorkflow.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,OAAO,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,OAAO,CAAC;CACxB;AAED,wBAAsB,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAqB9F"}
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
- "use workflow";
3
2
  Object.defineProperty(exports, "__esModule", { value: true });
4
3
  exports.sampleWorkflow = sampleWorkflow;
5
4
  const sampleStep_1 = require("../steps/sampleStep");
6
5
  async function sampleWorkflow(input) {
6
+ "use workflow";
7
7
  if (input == null) {
8
8
  throw new Error("input is required");
9
9
  }
@@ -13,7 +13,11 @@ async function sampleWorkflow(input) {
13
13
  }
14
14
  const uppercase = await (0, sampleStep_1.sampleStep)(text);
15
15
  return {
16
- uppercase,
16
+ ok: true,
17
+ workflow: 'library:workbench',
18
+ echo: text,
19
+ upper: `[STEP-PROCESSED] ${uppercase}`,
20
+ stepProcessed: true,
17
21
  };
18
22
  }
19
23
  //# sourceMappingURL=sampleWorkflow.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sampleWorkflow.js","sourceRoot":"","sources":["../../src/workflows/sampleWorkflow.ts"],"names":[],"mappings":";AAAA,cAAc,CAAC;;AAcf,wCAmBC;AA/BD,oDAAiD;AAY1C,KAAK,UAAU,cAAc,CAAC,KAA0B;IAE7D,IAAI,KAAK,IAAI,IAAI,EACjB,CAAC;QACC,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;IACvC,CAAC;IAED,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;IAEvB,IAAI,IAAI,IAAI,IAAI,EAChB,CAAC;QACC,MAAM,IAAI,KAAK,CAAC,kBAAkB,CAAC,CAAC;IACtC,CAAC;IAED,MAAM,SAAS,GAAG,MAAM,IAAA,uBAAU,EAAC,IAAI,CAAC,CAAC;IAEzC,OAAO;QACL,SAAS;KACV,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"sampleWorkflow.js","sourceRoot":"","sources":["../../src/workflows/sampleWorkflow.ts"],"names":[],"mappings":";;AAgBA,wCAqBC;AAnCD,oDAAiD;AAc1C,KAAK,UAAU,cAAc,CAAC,KAA0B;IAC7D,cAAc,CAAC;IACf,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;QAClB,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;IACvC,CAAC;IAED,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;IAEvB,IAAI,IAAI,IAAI,IAAI,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CAAC,kBAAkB,CAAC,CAAC;IACtC,CAAC;IAED,MAAM,SAAS,GAAG,MAAM,IAAA,uBAAU,EAAC,IAAI,CAAC,CAAC;IAEzC,OAAO;QACL,EAAE,EAAE,IAAI;QACR,QAAQ,EAAE,mBAAmB;QAC7B,IAAI,EAAE,IAAI;QACV,KAAK,EAAE,oBAAoB,SAAS,EAAE;QACtC,aAAa,EAAE,IAAI;KACpB,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ekairos/story",
3
- "version": "1.6.2",
3
+ "version": "1.6.3",
4
4
  "description": "Pulzar Story - Workflow-based AI Stories",
5
5
  "type": "commonjs",
6
6
  "main": "dist/index.js",
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@ai-sdk/openai": "^2.0.52",
35
- "@ekairos/domain": "^1.6.0",
35
+ "@ekairos/domain": "^1.6.1",
36
36
  "@instantdb/admin": "^0.22.13",
37
37
  "@instantdb/core": "^0.22.13",
38
38
  "@vercel/sandbox": "^0.0.23",