@framers/agentos 0.1.69 → 0.1.71

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 (128) hide show
  1. package/dist/api/agent.d.ts +98 -2
  2. package/dist/api/agent.d.ts.map +1 -1
  3. package/dist/api/agent.js +64 -9
  4. package/dist/api/agent.js.map +1 -1
  5. package/dist/api/generateImage.d.ts +109 -0
  6. package/dist/api/generateImage.d.ts.map +1 -0
  7. package/dist/api/generateImage.js +41 -0
  8. package/dist/api/generateImage.js.map +1 -0
  9. package/dist/api/generateText.d.ts +73 -3
  10. package/dist/api/generateText.d.ts.map +1 -1
  11. package/dist/api/generateText.js +29 -4
  12. package/dist/api/generateText.js.map +1 -1
  13. package/dist/api/model.d.ts +74 -4
  14. package/dist/api/model.d.ts.map +1 -1
  15. package/dist/api/model.js +79 -5
  16. package/dist/api/model.js.map +1 -1
  17. package/dist/api/streamText.d.ts +37 -1
  18. package/dist/api/streamText.d.ts.map +1 -1
  19. package/dist/api/streamText.js +188 -49
  20. package/dist/api/streamText.js.map +1 -1
  21. package/dist/api/toolAdapter.d.ts +58 -0
  22. package/dist/api/toolAdapter.d.ts.map +1 -0
  23. package/dist/api/{tool-adapter.js → toolAdapter.js} +24 -2
  24. package/dist/api/toolAdapter.js.map +1 -0
  25. package/dist/index.d.ts +5 -2
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.js +5 -1
  28. package/dist/index.js.map +1 -1
  29. package/dist/orchestration/builders/AgentGraph.d.ts +250 -0
  30. package/dist/orchestration/builders/AgentGraph.d.ts.map +1 -0
  31. package/dist/orchestration/builders/AgentGraph.js +338 -0
  32. package/dist/orchestration/builders/AgentGraph.js.map +1 -0
  33. package/dist/orchestration/builders/MissionBuilder.d.ts +231 -0
  34. package/dist/orchestration/builders/MissionBuilder.d.ts.map +1 -0
  35. package/dist/orchestration/builders/MissionBuilder.js +321 -0
  36. package/dist/orchestration/builders/MissionBuilder.js.map +1 -0
  37. package/dist/orchestration/builders/WorkflowBuilder.d.ts +265 -0
  38. package/dist/orchestration/builders/WorkflowBuilder.d.ts.map +1 -0
  39. package/dist/orchestration/builders/WorkflowBuilder.js +472 -0
  40. package/dist/orchestration/builders/WorkflowBuilder.js.map +1 -0
  41. package/dist/orchestration/builders/index.d.ts +7 -0
  42. package/dist/orchestration/builders/index.d.ts.map +1 -0
  43. package/dist/orchestration/builders/index.js +5 -0
  44. package/dist/orchestration/builders/index.js.map +1 -0
  45. package/dist/orchestration/builders/nodes.d.ts +36 -0
  46. package/dist/orchestration/builders/nodes.d.ts.map +1 -0
  47. package/dist/orchestration/builders/nodes.js +98 -0
  48. package/dist/orchestration/builders/nodes.js.map +1 -0
  49. package/dist/orchestration/checkpoint/ICheckpointStore.d.ts +152 -0
  50. package/dist/orchestration/checkpoint/ICheckpointStore.d.ts.map +1 -0
  51. package/dist/orchestration/checkpoint/ICheckpointStore.js +8 -0
  52. package/dist/orchestration/checkpoint/ICheckpointStore.js.map +1 -0
  53. package/dist/orchestration/checkpoint/InMemoryCheckpointStore.d.ts +89 -0
  54. package/dist/orchestration/checkpoint/InMemoryCheckpointStore.d.ts.map +1 -0
  55. package/dist/orchestration/checkpoint/InMemoryCheckpointStore.js +156 -0
  56. package/dist/orchestration/checkpoint/InMemoryCheckpointStore.js.map +1 -0
  57. package/dist/orchestration/checkpoint/index.d.ts +10 -0
  58. package/dist/orchestration/checkpoint/index.d.ts.map +1 -0
  59. package/dist/orchestration/checkpoint/index.js +10 -0
  60. package/dist/orchestration/checkpoint/index.js.map +1 -0
  61. package/dist/orchestration/compiler/GraphCompiler.d.ts +85 -0
  62. package/dist/orchestration/compiler/GraphCompiler.d.ts.map +1 -0
  63. package/dist/orchestration/compiler/GraphCompiler.js +71 -0
  64. package/dist/orchestration/compiler/GraphCompiler.js.map +1 -0
  65. package/dist/orchestration/compiler/MissionCompiler.d.ts +181 -0
  66. package/dist/orchestration/compiler/MissionCompiler.d.ts.map +1 -0
  67. package/dist/orchestration/compiler/MissionCompiler.js +219 -0
  68. package/dist/orchestration/compiler/MissionCompiler.js.map +1 -0
  69. package/dist/orchestration/compiler/SchemaLowering.d.ts +37 -0
  70. package/dist/orchestration/compiler/SchemaLowering.d.ts.map +1 -0
  71. package/dist/orchestration/compiler/SchemaLowering.js +93 -0
  72. package/dist/orchestration/compiler/SchemaLowering.js.map +1 -0
  73. package/dist/orchestration/compiler/Validator.d.ts +61 -0
  74. package/dist/orchestration/compiler/Validator.d.ts.map +1 -0
  75. package/dist/orchestration/compiler/Validator.js +96 -0
  76. package/dist/orchestration/compiler/Validator.js.map +1 -0
  77. package/dist/orchestration/compiler/index.d.ts +16 -0
  78. package/dist/orchestration/compiler/index.d.ts.map +1 -0
  79. package/dist/orchestration/compiler/index.js +13 -0
  80. package/dist/orchestration/compiler/index.js.map +1 -0
  81. package/dist/orchestration/events/GraphEvent.d.ts +233 -0
  82. package/dist/orchestration/events/GraphEvent.d.ts.map +1 -0
  83. package/dist/orchestration/events/GraphEvent.js +203 -0
  84. package/dist/orchestration/events/GraphEvent.js.map +1 -0
  85. package/dist/orchestration/events/index.d.ts +2 -0
  86. package/dist/orchestration/events/index.d.ts.map +1 -0
  87. package/dist/orchestration/events/index.js +2 -0
  88. package/dist/orchestration/events/index.js.map +1 -0
  89. package/dist/orchestration/index.d.ts +20 -0
  90. package/dist/orchestration/index.d.ts.map +1 -0
  91. package/dist/orchestration/index.js +26 -0
  92. package/dist/orchestration/index.js.map +1 -0
  93. package/dist/orchestration/ir/index.d.ts +2 -0
  94. package/dist/orchestration/ir/index.d.ts.map +1 -0
  95. package/dist/orchestration/ir/index.js +2 -0
  96. package/dist/orchestration/ir/index.js.map +1 -0
  97. package/dist/orchestration/ir/types.d.ts +540 -0
  98. package/dist/orchestration/ir/types.d.ts.map +1 -0
  99. package/dist/orchestration/ir/types.js +20 -0
  100. package/dist/orchestration/ir/types.js.map +1 -0
  101. package/dist/orchestration/runtime/GraphRuntime.d.ts +135 -0
  102. package/dist/orchestration/runtime/GraphRuntime.d.ts.map +1 -0
  103. package/dist/orchestration/runtime/GraphRuntime.js +381 -0
  104. package/dist/orchestration/runtime/GraphRuntime.js.map +1 -0
  105. package/dist/orchestration/runtime/LoopController.d.ts +173 -0
  106. package/dist/orchestration/runtime/LoopController.d.ts.map +1 -0
  107. package/dist/orchestration/runtime/LoopController.js +130 -0
  108. package/dist/orchestration/runtime/LoopController.js.map +1 -0
  109. package/dist/orchestration/runtime/NodeExecutor.d.ts +206 -0
  110. package/dist/orchestration/runtime/NodeExecutor.d.ts.map +1 -0
  111. package/dist/orchestration/runtime/NodeExecutor.js +227 -0
  112. package/dist/orchestration/runtime/NodeExecutor.js.map +1 -0
  113. package/dist/orchestration/runtime/NodeScheduler.d.ts +85 -0
  114. package/dist/orchestration/runtime/NodeScheduler.d.ts.map +1 -0
  115. package/dist/orchestration/runtime/NodeScheduler.js +180 -0
  116. package/dist/orchestration/runtime/NodeScheduler.js.map +1 -0
  117. package/dist/orchestration/runtime/StateManager.d.ts +122 -0
  118. package/dist/orchestration/runtime/StateManager.d.ts.map +1 -0
  119. package/dist/orchestration/runtime/StateManager.js +243 -0
  120. package/dist/orchestration/runtime/StateManager.js.map +1 -0
  121. package/dist/orchestration/runtime/index.d.ts +16 -0
  122. package/dist/orchestration/runtime/index.d.ts.map +1 -0
  123. package/dist/orchestration/runtime/index.js +13 -0
  124. package/dist/orchestration/runtime/index.js.map +1 -0
  125. package/package.json +10 -4
  126. package/dist/api/tool-adapter.d.ts +0 -12
  127. package/dist/api/tool-adapter.d.ts.map +0 -1
  128. package/dist/api/tool-adapter.js.map +0 -1
@@ -0,0 +1,96 @@
1
+ /**
2
+ * @file Validator.ts
3
+ * @description Static graph validator for `CompiledExecutionGraph` IR objects.
4
+ *
5
+ * Validation is split into two severity levels:
6
+ * - **errors** — structural problems that will cause runtime failures (missing entry/exit
7
+ * points, dangling edge references, cycles when acyclicity is required).
8
+ * - **warnings** — non-fatal issues worth investigating (unreachable nodes).
9
+ *
10
+ * The validator delegates cycle detection and reachability analysis to `NodeScheduler`,
11
+ * which already implements Kahn's algorithm and DFS reachability traversal.
12
+ */
13
+ import { NodeScheduler } from '../runtime/NodeScheduler.js';
14
+ // ---------------------------------------------------------------------------
15
+ // GraphValidator
16
+ // ---------------------------------------------------------------------------
17
+ /**
18
+ * Static validator for compiled execution graphs.
19
+ *
20
+ * Runs a suite of structural checks against a `CompiledExecutionGraph`:
21
+ *
22
+ * 1. **Cycle detection** — rejects cyclic graphs when `requireAcyclic` is not `false`.
23
+ * 2. **Unreachable nodes** — warns when one or more nodes cannot be reached from `__START__`.
24
+ * 3. **Edge reference integrity** — errors when an edge's source/target names a non-existent node
25
+ * (ignoring the sentinel values `__START__` and `__END__`).
26
+ * 4. **Entry point** — errors when no edge originates from `__START__`.
27
+ * 5. **Exit point** — errors when no edge terminates at `__END__`.
28
+ *
29
+ * @example
30
+ * ```ts
31
+ * const result = GraphValidator.validate(graph, { requireAcyclic: true });
32
+ * if (!result.valid) {
33
+ * throw new Error(result.errors.join('\n'));
34
+ * }
35
+ * ```
36
+ */
37
+ export class GraphValidator {
38
+ /**
39
+ * Validates a compiled execution graph.
40
+ *
41
+ * @param graph - The `CompiledExecutionGraph` produced by a compiler pass.
42
+ * @param options - Optional validation flags.
43
+ * @param options.requireAcyclic - When `true` (the default) any cycle is treated as an error.
44
+ * Pass `false` to allow cyclic graphs (e.g. iterative agent loops).
45
+ * @returns A `ValidationResult` describing errors and warnings found.
46
+ */
47
+ static validate(graph, options) {
48
+ const errors = [];
49
+ const warnings = [];
50
+ // Delegate cycle detection and reachability analysis to NodeScheduler.
51
+ const scheduler = new NodeScheduler(graph.nodes, graph.edges);
52
+ // -----------------------------------------------------------------------
53
+ // 1. Cycle detection
54
+ // -----------------------------------------------------------------------
55
+ // Default behaviour: acyclicity is required. Authors opt into cycles by
56
+ // explicitly passing { requireAcyclic: false }.
57
+ if (options?.requireAcyclic !== false && scheduler.hasCycles()) {
58
+ errors.push('Graph contains a cycle — cycles are not allowed when requireAcyclic is true');
59
+ }
60
+ // -----------------------------------------------------------------------
61
+ // 2. Unreachable nodes
62
+ // -----------------------------------------------------------------------
63
+ const unreachable = scheduler.getUnreachableNodes();
64
+ if (unreachable.length > 0) {
65
+ warnings.push(`Unreachable nodes detected: ${unreachable.join(', ')}`);
66
+ }
67
+ // -----------------------------------------------------------------------
68
+ // 3. Edge reference integrity
69
+ // -----------------------------------------------------------------------
70
+ // Build a fast-lookup set of declared node ids.
71
+ const nodeIds = new Set(graph.nodes.map((n) => n.id));
72
+ for (const edge of graph.edges) {
73
+ // __START__ and __END__ are virtual sentinels — they are never in graph.nodes.
74
+ if (edge.source !== '__START__' && !nodeIds.has(edge.source)) {
75
+ errors.push(`Edge ${edge.id} references unknown source node: ${edge.source}`);
76
+ }
77
+ if (edge.target !== '__END__' && !nodeIds.has(edge.target)) {
78
+ errors.push(`Edge ${edge.id} references unknown target node: ${edge.target}`);
79
+ }
80
+ }
81
+ // -----------------------------------------------------------------------
82
+ // 4. Entry point check
83
+ // -----------------------------------------------------------------------
84
+ if (!graph.edges.some((e) => e.source === '__START__')) {
85
+ errors.push('No edges from START — graph has no entry point');
86
+ }
87
+ // -----------------------------------------------------------------------
88
+ // 5. Exit point check
89
+ // -----------------------------------------------------------------------
90
+ if (!graph.edges.some((e) => e.target === '__END__')) {
91
+ errors.push('No edges to END — graph has no exit point');
92
+ }
93
+ return { valid: errors.length === 0, errors, warnings };
94
+ }
95
+ }
96
+ //# sourceMappingURL=Validator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Validator.js","sourceRoot":"","sources":["../../../src/orchestration/compiler/Validator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAoB5D,8EAA8E;AAC9E,iBAAiB;AACjB,8EAA8E;AAE9E;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,OAAO,cAAc;IACzB;;;;;;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ACJ,CAAC;YACD,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;gBAC3D,MAAM,CAAC,IAAI,CACT,QAAQ,IAAI,CAAC,EAAE,oCAAoC,IAAI,CAAC,MAAM,EAAE,CACjE,CAAC;YACJ,CAAC;QACH,CAAC;QAED,0EAA0E;QAC1E,uBAAuB;QACvB,0EAA0E;QAC1E,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,WAAW,CAAC,EAAE,CAAC;YACvD,MAAM,CAAC,IAAI,CAAC,gDAAgD,CAAC,CAAC;QAChE,CAAC;QAED,0EAA0E;QAC1E,sBAAsB;QACtB,0EAA0E;QAC1E,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,SAAS,CAAC,EAAE,CAAC;YACrD,MAAM,CAAC,IAAI,CAAC,2CAA2C,CAAC,CAAC;QAC3D,CAAC;QAED,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;IAC1D,CAAC;CACF"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @file index.ts
3
+ * @description Barrel export for the orchestration compiler sub-package.
4
+ *
5
+ * Exposes schema lowering utilities and the static graph validator used during
6
+ * the compilation pipeline that transforms author-facing graph/workflow/mission
7
+ * definitions into `CompiledExecutionGraph` IR objects.
8
+ */
9
+ export { lowerZodToJsonSchema } from './SchemaLowering.js';
10
+ export { GraphValidator } from './Validator.js';
11
+ export type { ValidationResult } from './Validator.js';
12
+ export { GraphCompiler } from './GraphCompiler.js';
13
+ export type { GraphCompilerInput } from './GraphCompiler.js';
14
+ export { MissionCompiler } from './MissionCompiler.js';
15
+ export type { MissionConfig, SimplePlan } from './MissionCompiler.js';
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/orchestration/compiler/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,YAAY,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,YAAY,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @file index.ts
3
+ * @description Barrel export for the orchestration compiler sub-package.
4
+ *
5
+ * Exposes schema lowering utilities and the static graph validator used during
6
+ * the compilation pipeline that transforms author-facing graph/workflow/mission
7
+ * definitions into `CompiledExecutionGraph` IR objects.
8
+ */
9
+ export { lowerZodToJsonSchema } from './SchemaLowering.js';
10
+ export { GraphValidator } from './Validator.js';
11
+ export { GraphCompiler } from './GraphCompiler.js';
12
+ export { MissionCompiler } from './MissionCompiler.js';
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/orchestration/compiler/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,233 @@
1
+ /**
2
+ * @file GraphEvent.ts
3
+ * @description Discriminated union of all runtime events emitted during an AgentOS graph run,
4
+ * plus a `GraphEventEmitter` that supports both listener-based and async-iterable consumption.
5
+ *
6
+ * Events are emitted in strict causal order within a single run. Consumers may subscribe via
7
+ * `on()` / `off()` for push-based handling, or via `stream()` for pull-based async iteration.
8
+ */
9
+ import type { GraphState } from '../ir/types.js';
10
+ /**
11
+ * All runtime events emitted by the graph executor.
12
+ *
13
+ * Every variant carries a `type` discriminant so consumers can narrow with a
14
+ * simple `switch (event.type)` or exhaustive-check library.
15
+ */
16
+ export type GraphEvent =
17
+ /** Emitted once when the executor accepts a new run request. */
18
+ {
19
+ type: 'run_start';
20
+ runId: string;
21
+ graphId: string;
22
+ }
23
+ /** Emitted immediately before a node's executor is called. */
24
+ | {
25
+ type: 'node_start';
26
+ nodeId: string;
27
+ state: Partial<GraphState>;
28
+ }
29
+ /**
30
+ * Emitted after a node's executor returns successfully.
31
+ * `durationMs` is wall-clock time from `node_start` to `node_end`.
32
+ */
33
+ | {
34
+ type: 'node_end';
35
+ nodeId: string;
36
+ output: unknown;
37
+ durationMs: number;
38
+ }
39
+ /** Emitted when the executor resolves a routing condition and moves to the next node. */
40
+ | {
41
+ type: 'edge_transition';
42
+ sourceId: string;
43
+ targetId: string;
44
+ edgeType: string;
45
+ }
46
+ /**
47
+ * Streaming token delta from an LLM (GMI) node.
48
+ * Multiple deltas are emitted per node; concatenate `content` to reconstruct the full response.
49
+ */
50
+ | {
51
+ type: 'text_delta';
52
+ nodeId: string;
53
+ content: string;
54
+ }
55
+ /** Emitted when a node issues a tool call to the tool catalogue. */
56
+ | {
57
+ type: 'tool_call';
58
+ nodeId: string;
59
+ toolName: string;
60
+ args: unknown;
61
+ }
62
+ /** Emitted when a tool call returns (whether success or structured error). */
63
+ | {
64
+ type: 'tool_result';
65
+ nodeId: string;
66
+ toolName: string;
67
+ result: unknown;
68
+ }
69
+ /**
70
+ * Emitted after each guardrail evaluation.
71
+ * `passed: false` indicates a violation; `action` mirrors `GuardrailPolicy.onViolation`.
72
+ */
73
+ | {
74
+ type: 'guardrail_result';
75
+ nodeId: string;
76
+ guardrailId: string;
77
+ passed: boolean;
78
+ action: string;
79
+ }
80
+ /** Emitted after the runtime successfully persists a checkpoint snapshot. */
81
+ | {
82
+ type: 'checkpoint_saved';
83
+ checkpointId: string;
84
+ nodeId: string;
85
+ }
86
+ /**
87
+ * Emitted when graph execution is suspended mid-run.
88
+ * - `human_approval` — node requires operator sign-off before proceeding.
89
+ * - `error` — unrecoverable error after exhausting retry budget.
90
+ * - `guardrail_violation` — a `block` guardrail fired, halting the run.
91
+ */
92
+ | {
93
+ type: 'interrupt';
94
+ nodeId: string;
95
+ reason: 'human_approval' | 'error' | 'guardrail_violation';
96
+ }
97
+ /** Emitted after memory traces are loaded into `GraphState.memory` for a node. */
98
+ | {
99
+ type: 'memory_read';
100
+ nodeId: string;
101
+ traceCount: number;
102
+ }
103
+ /** Emitted after a memory trace is staged or committed for a node. */
104
+ | {
105
+ type: 'memory_write';
106
+ nodeId: string;
107
+ traceType: string;
108
+ }
109
+ /** Emitted after `DiscoveryPolicy`-triggered capability discovery completes. */
110
+ | {
111
+ type: 'discovery_result';
112
+ nodeId: string;
113
+ toolsFound: string[];
114
+ }
115
+ /**
116
+ * Emitted once when the graph run concludes normally.
117
+ * `totalDurationMs` is wall-clock time from `run_start` to `run_end`.
118
+ */
119
+ | {
120
+ type: 'run_end';
121
+ runId: string;
122
+ finalOutput: unknown;
123
+ totalDurationMs: number;
124
+ }
125
+ /** Emitted when a node's wall-clock execution time exceeds `GraphNode.timeout`. */
126
+ | {
127
+ type: 'node_timeout';
128
+ nodeId: string;
129
+ timeoutMs: number;
130
+ }
131
+ /**
132
+ * Emitted for unhandled exceptions or structured runtime errors.
133
+ * `nodeId` is absent for graph-level errors that occur outside any node's scope.
134
+ */
135
+ | {
136
+ type: 'error';
137
+ nodeId?: string;
138
+ error: {
139
+ message: string;
140
+ code: string;
141
+ };
142
+ };
143
+ /**
144
+ * Lightweight event emitter for `GraphEvent` values.
145
+ *
146
+ * Supports both:
147
+ * - **Push-based** consumption via `on()` / `off()` callbacks.
148
+ * - **Pull-based** consumption via the `stream()` async generator.
149
+ *
150
+ * The emitter is single-use: once `close()` is called it is permanently closed
151
+ * and subsequent `emit()` calls are silently ignored.
152
+ *
153
+ * @example
154
+ * ```ts
155
+ * const emitter = new GraphEventEmitter();
156
+ *
157
+ * // Pull-based — collect events in order
158
+ * async function consume() {
159
+ * for await (const event of emitter.stream()) {
160
+ * console.log(event.type);
161
+ * }
162
+ * }
163
+ *
164
+ * emitter.emit({ type: 'run_start', runId: 'r1', graphId: 'g1' });
165
+ * emitter.close();
166
+ * await consume(); // logs 'run_start'
167
+ * ```
168
+ */
169
+ export declare class GraphEventEmitter {
170
+ /** Registered push-based listener callbacks. */
171
+ private readonly listeners;
172
+ /**
173
+ * `true` after `close()` has been called. Once closed, `emit()` becomes a no-op
174
+ * and all active `stream()` generators are drained and terminated.
175
+ */
176
+ private closed;
177
+ /**
178
+ * Registers a callback that is invoked synchronously for every subsequent `emit()` call.
179
+ *
180
+ * @param listener - Function to call with each emitted `GraphEvent`.
181
+ */
182
+ on(listener: (event: GraphEvent) => void): void;
183
+ /**
184
+ * Removes a previously registered listener.
185
+ * If the listener was not registered, this is a no-op.
186
+ *
187
+ * @param listener - The exact function reference passed to `on()`.
188
+ */
189
+ off(listener: (event: GraphEvent) => void): void;
190
+ /**
191
+ * Dispatches `event` to all registered listeners and any active `stream()` generators.
192
+ * If `close()` has already been called, this method is a no-op.
193
+ *
194
+ * @param event - The `GraphEvent` to dispatch.
195
+ */
196
+ emit(event: GraphEvent): void;
197
+ /**
198
+ * Permanently closes the emitter.
199
+ *
200
+ * - Future `emit()` calls are silently ignored.
201
+ * - Active `stream()` generators are signalled to drain their queues and return.
202
+ */
203
+ close(): void;
204
+ /**
205
+ * Internal set of per-stream event dispatch functions.
206
+ * Each active `stream()` generator registers one entry here.
207
+ */
208
+ private readonly streamDispatchers;
209
+ /**
210
+ * Internal set of per-stream close signals.
211
+ * Each active `stream()` generator registers one entry here.
212
+ */
213
+ private readonly streamCompleters;
214
+ /**
215
+ * Returns an `AsyncGenerator` that yields every `GraphEvent` emitted after the
216
+ * call to `stream()`, in the exact order they were emitted.
217
+ *
218
+ * The generator completes (returns) when `close()` is called on the emitter
219
+ * and any queued events have been yielded.
220
+ *
221
+ * Multiple concurrent `stream()` calls are supported; each gets an independent
222
+ * copy of the event stream.
223
+ *
224
+ * @example
225
+ * ```ts
226
+ * for await (const event of emitter.stream()) {
227
+ * if (event.type === 'run_end') break;
228
+ * }
229
+ * ```
230
+ */
231
+ stream(): AsyncGenerator<GraphEvent>;
232
+ }
233
+ //# sourceMappingURL=GraphEvent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GraphEvent.d.ts","sourceRoot":"","sources":["../../../src/orchestration/events/GraphEvent.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAMjD;;;;;GAKG;AACH,MAAM,MAAM,UAAU;AACpB,gEAAgE;AAC9D;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE;AAEvD,8DAA8D;GAC5D;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,CAAA;CAAE;AAEpE;;;GAGG;GACD;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,OAAO,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE;AAE3E,yFAAyF;GACvF;IAAE,IAAI,EAAE,iBAAiB,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE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ated union of all runtime events emitted during an AgentOS graph run,
4
+ * plus a `GraphEventEmitter` that supports both listener-based and async-iterable consumption.
5
+ *
6
+ * Events are emitted in strict causal order within a single run. Consumers may subscribe via
7
+ * `on()` / `off()` for push-based handling, or via `stream()` for pull-based async iteration.
8
+ */
9
+ // ---------------------------------------------------------------------------
10
+ // GraphEventEmitter
11
+ // ---------------------------------------------------------------------------
12
+ /**
13
+ * Lightweight event emitter for `GraphEvent` values.
14
+ *
15
+ * Supports both:
16
+ * - **Push-based** consumption via `on()` / `off()` callbacks.
17
+ * - **Pull-based** consumption via the `stream()` async generator.
18
+ *
19
+ * The emitter is single-use: once `close()` is called it is permanently closed
20
+ * and subsequent `emit()` calls are silently ignored.
21
+ *
22
+ * @example
23
+ * ```ts
24
+ * const emitter = new GraphEventEmitter();
25
+ *
26
+ * // Pull-based — collect events in order
27
+ * async function consume() {
28
+ * for await (const event of emitter.stream()) {
29
+ * console.log(event.type);
30
+ * }
31
+ * }
32
+ *
33
+ * emitter.emit({ type: 'run_start', runId: 'r1', graphId: 'g1' });
34
+ * emitter.close();
35
+ * await consume(); // logs 'run_start'
36
+ * ```
37
+ */
38
+ export class GraphEventEmitter {
39
+ constructor() {
40
+ /** Registered push-based listener callbacks. */
41
+ this.listeners = [];
42
+ /**
43
+ * `true` after `close()` has been called. Once closed, `emit()` becomes a no-op
44
+ * and all active `stream()` generators are drained and terminated.
45
+ */
46
+ this.closed = false;
47
+ // ---------------------------------------------------------------------------
48
+ // Pull-based API (async iterable)
49
+ // ---------------------------------------------------------------------------
50
+ /**
51
+ * Internal set of per-stream event dispatch functions.
52
+ * Each active `stream()` generator registers one entry here.
53
+ */
54
+ this.streamDispatchers = new Set();
55
+ /**
56
+ * Internal set of per-stream close signals.
57
+ * Each active `stream()` generator registers one entry here.
58
+ */
59
+ this.streamCompleters = new Set();
60
+ }
61
+ // ---------------------------------------------------------------------------
62
+ // Push-based API
63
+ // ---------------------------------------------------------------------------
64
+ /**
65
+ * Registers a callback that is invoked synchronously for every subsequent `emit()` call.
66
+ *
67
+ * @param listener - Function to call with each emitted `GraphEvent`.
68
+ */
69
+ on(listener) {
70
+ this.listeners.push(listener);
71
+ }
72
+ /**
73
+ * Removes a previously registered listener.
74
+ * If the listener was not registered, this is a no-op.
75
+ *
76
+ * @param listener - The exact function reference passed to `on()`.
77
+ */
78
+ off(listener) {
79
+ const index = this.listeners.indexOf(listener);
80
+ if (index !== -1) {
81
+ this.listeners.splice(index, 1);
82
+ }
83
+ }
84
+ /**
85
+ * Dispatches `event` to all registered listeners and any active `stream()` generators.
86
+ * If `close()` has already been called, this method is a no-op.
87
+ *
88
+ * @param event - The `GraphEvent` to dispatch.
89
+ */
90
+ emit(event) {
91
+ if (this.closed)
92
+ return;
93
+ // Notify all push-based listeners synchronously.
94
+ for (const listener of this.listeners) {
95
+ listener(event);
96
+ }
97
+ // Notify all active stream generators via their internal dispatch functions.
98
+ for (const dispatch of this.streamDispatchers) {
99
+ dispatch(event);
100
+ }
101
+ }
102
+ /**
103
+ * Permanently closes the emitter.
104
+ *
105
+ * - Future `emit()` calls are silently ignored.
106
+ * - Active `stream()` generators are signalled to drain their queues and return.
107
+ */
108
+ close() {
109
+ if (this.closed)
110
+ return;
111
+ this.closed = true;
112
+ // Signal each active stream generator to complete.
113
+ for (const complete of this.streamCompleters) {
114
+ complete();
115
+ }
116
+ }
117
+ /**
118
+ * Returns an `AsyncGenerator` that yields every `GraphEvent` emitted after the
119
+ * call to `stream()`, in the exact order they were emitted.
120
+ *
121
+ * The generator completes (returns) when `close()` is called on the emitter
122
+ * and any queued events have been yielded.
123
+ *
124
+ * Multiple concurrent `stream()` calls are supported; each gets an independent
125
+ * copy of the event stream.
126
+ *
127
+ * @example
128
+ * ```ts
129
+ * for await (const event of emitter.stream()) {
130
+ * if (event.type === 'run_end') break;
131
+ * }
132
+ * ```
133
+ */
134
+ async *stream() {
135
+ // Per-generator queue of events waiting to be yielded.
136
+ const queue = [];
137
+ // When non-null, a pending `await next` in the generator loop is resolved here.
138
+ let pendingResolve = null;
139
+ /**
140
+ * Called by `emit()` — either resolves a waiting generator or enqueues the event.
141
+ */
142
+ const dispatch = (event) => {
143
+ if (pendingResolve !== null) {
144
+ const resolve = pendingResolve;
145
+ pendingResolve = null;
146
+ resolve({ value: event, done: false });
147
+ }
148
+ else {
149
+ queue.push(event);
150
+ }
151
+ };
152
+ /** Called by `close()` — wakes up a waiting generator so it can drain and exit. */
153
+ const complete = () => {
154
+ if (pendingResolve !== null) {
155
+ const resolve = pendingResolve;
156
+ pendingResolve = null;
157
+ // Signal the generator loop to re-check the closed flag.
158
+ resolve({ value: undefined, done: true });
159
+ }
160
+ };
161
+ this.streamDispatchers.add(dispatch);
162
+ this.streamCompleters.add(complete);
163
+ try {
164
+ // If the emitter was already closed before stream() was called, drain nothing.
165
+ while (!this.closed || queue.length > 0) {
166
+ if (queue.length > 0) {
167
+ // There are queued events — yield them immediately without suspending.
168
+ yield queue.shift();
169
+ }
170
+ else if (this.closed) {
171
+ // Queue is empty and emitter is closed — we are done.
172
+ break;
173
+ }
174
+ else {
175
+ // Queue is empty and emitter is still open — suspend until the next event.
176
+ const result = await new Promise((resolve) => {
177
+ pendingResolve = resolve;
178
+ });
179
+ if (result.done) {
180
+ // `complete()` was called — drain remaining queue items then exit.
181
+ while (queue.length > 0) {
182
+ yield queue.shift();
183
+ }
184
+ break;
185
+ }
186
+ yield result.value;
187
+ }
188
+ }
189
+ }
190
+ finally {
191
+ // Always clean up registrations, even if the caller breaks out of the for-await loop.
192
+ this.streamDispatchers.delete(dispatch);
193
+ this.streamCompleters.delete(complete);
194
+ if (pendingResolve !== null) {
195
+ // Resolve any dangling promise to avoid memory leaks.
196
+ const resolve = pendingResolve;
197
+ pendingResolve = null;
198
+ resolve({ value: undefined, done: true });
199
+ }
200
+ }
201
+ }
202
+ }
203
+ //# sourceMappingURL=GraphEvent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GraphEvent.js","sourceRoot":"","sources":["../../../src/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ot":"","sources":["../../../src/orchestration/events/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './GraphEvent.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/orchestration/events/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @file index.ts
3
+ * @description Barrel re-exports for the AgentOS orchestration layer.
4
+ *
5
+ * The orchestration subsystem provides:
6
+ * - **IR**: Intermediate representation types and utilities for graph-based workflows
7
+ * - **Events**: Event definitions and infrastructure for orchestration runtime
8
+ * - **Checkpoint**: Checkpoint persistence and recovery for long-running workflows
9
+ * - **Runtime**: State management, scheduling, execution, and graph runtime engines
10
+ *
11
+ * Consumers should import from this module rather than from individual subdirectories
12
+ * to keep import paths stable across internal refactors.
13
+ */
14
+ export * from './ir/index.js';
15
+ export * from './events/index.js';
16
+ export * from './checkpoint/index.js';
17
+ export * from './runtime/index.js';
18
+ export * from './builders/index.js';
19
+ export * from './compiler/index.js';
20
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/orchestration/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,cAAc,eAAe,CAAC;AAE9B,cAAc,mBAAmB,CAAC;AAElC,cAAc,uBAAuB,CAAC;AAEtC,cAAc,oBAAoB,CAAC;AAEnC,cAAc,qBAAqB,CAAC;AAEpC,cAAc,qBAAqB,CAAC"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * @file index.ts
3
+ * @description Barrel re-exports for the AgentOS orchestration layer.
4
+ *
5
+ * The orchestration subsystem provides:
6
+ * - **IR**: Intermediate representation types and utilities for graph-based workflows
7
+ * - **Events**: Event definitions and infrastructure for orchestration runtime
8
+ * - **Checkpoint**: Checkpoint persistence and recovery for long-running workflows
9
+ * - **Runtime**: State management, scheduling, execution, and graph runtime engines
10
+ *
11
+ * Consumers should import from this module rather than from individual subdirectories
12
+ * to keep import paths stable across internal refactors.
13
+ */
14
+ // IR types
15
+ export * from './ir/index.js';
16
+ // Events
17
+ export * from './events/index.js';
18
+ // Checkpoint
19
+ export * from './checkpoint/index.js';
20
+ // Runtime
21
+ export * from './runtime/index.js';
22
+ // Builders (public API)
23
+ export * from './builders/index.js';
24
+ // Compiler (advanced use)
25
+ export * from './compiler/index.js';
26
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/orchestration/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,WAAW;AACX,cAAc,eAAe,CAAC;AAC9B,SAAS;AACT,cAAc,mBAAmB,CAAC;AAClC,aAAa;AACb,cAAc,uBAAuB,CAAC;AACtC,UAAU;AACV,cAAc,oBAAoB,CAAC;AACnC,wBAAwB;AACxB,cAAc,qBAAqB,CAAC;AACpC,0BAA0B;AAC1B,cAAc,qBAAqB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './types.js';
2
+ //# sourceMappingURL=index.d.ts.map