@ellyco/agentic 0.1.0 → 0.1.2
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/README.md +152 -12
- package/dist/graphs/graph.d.ts.map +1 -1
- package/dist/graphs/graph.js +26 -6
- package/dist/graphs/graph.js.map +1 -1
- package/dist/graphs/index.d.ts +9 -6
- package/dist/graphs/index.d.ts.map +1 -1
- package/dist/graphs/index.js +23 -12
- package/dist/graphs/index.js.map +1 -1
- package/dist/graphs/store/index.d.ts +4 -0
- package/dist/graphs/store/index.d.ts.map +1 -0
- package/dist/graphs/store/index.js +20 -0
- package/dist/graphs/store/index.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -0
- package/dist/models/index.d.ts +4 -0
- package/dist/models/index.d.ts.map +1 -0
- package/dist/models/index.js +20 -0
- package/dist/models/index.js.map +1 -0
- package/dist/nodes/index.d.ts +4 -3
- package/dist/nodes/index.d.ts.map +1 -1
- package/dist/nodes/index.js +18 -6
- package/dist/nodes/index.js.map +1 -1
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -12,11 +12,12 @@ A powerful TypeScript framework for building stateful, agentic workflows with bu
|
|
|
12
12
|
🔄 **State Management** - Declarative state merging with support for custom merge strategies
|
|
13
13
|
🔀 **Flexible Graphs** - State machines, linear sequences, and iterators for different workflow patterns
|
|
14
14
|
📦 **Fully Typed** - Complete TypeScript support with Zod schema validation
|
|
15
|
+
📊 **OpenTelemetry Observability** - Built-in distributed tracing for monitoring and debugging
|
|
15
16
|
|
|
16
17
|
## Installation
|
|
17
18
|
|
|
18
19
|
```bash
|
|
19
|
-
npm install ellyco
|
|
20
|
+
npm install @ellyco/agentic
|
|
20
21
|
```
|
|
21
22
|
|
|
22
23
|
### Dependencies
|
|
@@ -30,7 +31,7 @@ npm install ellyco-agentic
|
|
|
30
31
|
### 1. Define Your Messages
|
|
31
32
|
|
|
32
33
|
```typescript
|
|
33
|
-
import { SystemMessage, UserMessage, AgentMessage } from 'ellyco
|
|
34
|
+
import { SystemMessage, UserMessage, AgentMessage } from '@ellyco/agentic';
|
|
34
35
|
|
|
35
36
|
const systemMsg = new SystemMessage(
|
|
36
37
|
"You are a helpful assistant that processes data."
|
|
@@ -45,7 +46,7 @@ userMsg.interpolate({ data: "important info" });
|
|
|
45
46
|
### 2. Define Your Tools
|
|
46
47
|
|
|
47
48
|
```typescript
|
|
48
|
-
import { defineTool, tool } from 'ellyco
|
|
49
|
+
import { defineTool, tool } from '@ellyco/agentic';
|
|
49
50
|
import { z } from 'zod';
|
|
50
51
|
|
|
51
52
|
const searchTool = defineTool(
|
|
@@ -69,7 +70,7 @@ const searchImplementation = tool(
|
|
|
69
70
|
### 3. Configure Your Model
|
|
70
71
|
|
|
71
72
|
```typescript
|
|
72
|
-
import { BedrockModel } from 'ellyco
|
|
73
|
+
import { BedrockModel } from '@ellyco/agentic';
|
|
73
74
|
|
|
74
75
|
const model = new BedrockModel({
|
|
75
76
|
modelId: "anthropic.claude-3-sonnet-20240229-v1:0",
|
|
@@ -85,7 +86,7 @@ const response = await model.invoke([userMsg]);
|
|
|
85
86
|
### 4. Build a Graph
|
|
86
87
|
|
|
87
88
|
```typescript
|
|
88
|
-
import { StateMachine, makeNode } from 'ellyco
|
|
89
|
+
import { StateMachine, makeNode } from '@ellyco/agentic';
|
|
89
90
|
import { z } from 'zod';
|
|
90
91
|
|
|
91
92
|
const schema = z.object({
|
|
@@ -177,7 +178,7 @@ Nodes are the building blocks of graphs - they execute logic and return partial
|
|
|
177
178
|
Simple synchronous or asynchronous functions.
|
|
178
179
|
|
|
179
180
|
```typescript
|
|
180
|
-
import { makeNode } from 'ellyco
|
|
181
|
+
import { makeNode } from '@ellyco/agentic';
|
|
181
182
|
|
|
182
183
|
const node = makeNode((state, context) => ({
|
|
183
184
|
processed: true,
|
|
@@ -211,7 +212,7 @@ const confirmNode = new InterruptNode(
|
|
|
211
212
|
Messages represent communication in the system with different roles:
|
|
212
213
|
|
|
213
214
|
```typescript
|
|
214
|
-
import { SystemMessage, UserMessage, AgentMessage } from 'ellyco
|
|
215
|
+
import { SystemMessage, UserMessage, AgentMessage } from '@ellyco/agentic';
|
|
215
216
|
|
|
216
217
|
// System messages set context
|
|
217
218
|
const system = new SystemMessage("You are a data analyst");
|
|
@@ -229,7 +230,7 @@ const agent = new AgentMessage("The analysis shows...");
|
|
|
229
230
|
Tools enable models to request external operations:
|
|
230
231
|
|
|
231
232
|
```typescript
|
|
232
|
-
import { ToolRequest, ToolResponse, ToolError } from 'ellyco
|
|
233
|
+
import { ToolRequest, ToolResponse, ToolError } from '@ellyco/agentic';
|
|
233
234
|
|
|
234
235
|
// Model requests a tool
|
|
235
236
|
const request = new ToolRequest(
|
|
@@ -295,7 +296,7 @@ if (result.exitReason === "interrupt") {
|
|
|
295
296
|
Use SQLite to persist and resume runs across sessions:
|
|
296
297
|
|
|
297
298
|
```typescript
|
|
298
|
-
import { SQLiteStore } from 'ellyco
|
|
299
|
+
import { SQLiteStore } from '@ellyco/agentic';
|
|
299
300
|
import Database from 'better-sqlite3';
|
|
300
301
|
|
|
301
302
|
// Setup database
|
|
@@ -347,7 +348,7 @@ console.log(result.explanation); // string
|
|
|
347
348
|
Implement your own model provider:
|
|
348
349
|
|
|
349
350
|
```typescript
|
|
350
|
-
import { BaseModel, InvokeResponse, ModelMessages } from 'ellyco
|
|
351
|
+
import { BaseModel, InvokeResponse, ModelMessages } from '@ellyco/agentic';
|
|
351
352
|
|
|
352
353
|
class MyCustomModel extends BaseModel {
|
|
353
354
|
protected async runModel(
|
|
@@ -375,7 +376,7 @@ const model = new MyCustomModel({ temperature: 0.7 });
|
|
|
375
376
|
Use the mock model for testing without hitting real APIs:
|
|
376
377
|
|
|
377
378
|
```typescript
|
|
378
|
-
import { TestModel, TestResponseConfig } from 'ellyco
|
|
379
|
+
import { TestModel, TestResponseConfig } from '@ellyco/agentic';
|
|
379
380
|
|
|
380
381
|
const testModel = new TestModel({ temperature: 0.7 });
|
|
381
382
|
|
|
@@ -391,6 +392,141 @@ const response = await testModel.invoke([new UserMessage("Hello")]);
|
|
|
391
392
|
expect(response.messages[0].text).toBe("Hi there!");
|
|
392
393
|
```
|
|
393
394
|
|
|
395
|
+
### OpenTelemetry Traces
|
|
396
|
+
|
|
397
|
+
Graphs automatically emit OpenTelemetry traces for observability and debugging. Each node execution is captured as a span with rich context and state information.
|
|
398
|
+
|
|
399
|
+
#### Setup
|
|
400
|
+
|
|
401
|
+
OpenTelemetry is included as a dependency. Configure a tracer provider and exporter in your application:
|
|
402
|
+
|
|
403
|
+
```typescript
|
|
404
|
+
import { BasicTracerProvider, ConsoleSpanExporter, SimpleSpanProcessor } from '@opentelemetry/sdk-trace-node';
|
|
405
|
+
|
|
406
|
+
// Create a basic tracer provider
|
|
407
|
+
const provider = new BasicTracerProvider();
|
|
408
|
+
provider.addSpanProcessor(
|
|
409
|
+
new SimpleSpanProcessor(new ConsoleSpanExporter())
|
|
410
|
+
);
|
|
411
|
+
|
|
412
|
+
// For production, use a real exporter (Jaeger, OTLP, etc.)
|
|
413
|
+
// const exporter = new OTLPTraceExporter({
|
|
414
|
+
// url: 'http://localhost:4317/v1/traces'
|
|
415
|
+
// });
|
|
416
|
+
// provider.addSpanProcessor(new BatchSpanProcessor(exporter));
|
|
417
|
+
|
|
418
|
+
// Set the global tracer provider
|
|
419
|
+
import { trace } from '@opentelemetry/api';
|
|
420
|
+
trace.setGlobalTracerProvider(provider);
|
|
421
|
+
```
|
|
422
|
+
|
|
423
|
+
#### Automatic Span Collection
|
|
424
|
+
|
|
425
|
+
Every node execution in a graph automatically creates a span with:
|
|
426
|
+
|
|
427
|
+
- **Span name**: Node name (e.g., "process", "validate", "search")
|
|
428
|
+
- **Attributes**:
|
|
429
|
+
- `runId` - Unique identifier for the graph run
|
|
430
|
+
- `nodeName` - Name of the node being executed
|
|
431
|
+
- `layerId` - Context layer ID (for nested graphs)
|
|
432
|
+
- `changes` - JSON-stringified state changes from the node
|
|
433
|
+
- `newState` - JSON-stringified complete state after merge
|
|
434
|
+
|
|
435
|
+
```typescript
|
|
436
|
+
// When this node runs, a span is automatically created
|
|
437
|
+
graph.addNode("process", makeNode((state) => {
|
|
438
|
+
return { processed: true, count: state.count + 1 };
|
|
439
|
+
}));
|
|
440
|
+
|
|
441
|
+
// Span details:
|
|
442
|
+
// {
|
|
443
|
+
// name: "process",
|
|
444
|
+
// attributes: {
|
|
445
|
+
// runId: "run-abc123",
|
|
446
|
+
// nodeName: "process",
|
|
447
|
+
// layerId: "ROOT",
|
|
448
|
+
// changes: '{"processed":true,"count":6}',
|
|
449
|
+
// newState: '{"input":"hello","processed":true,"count":6}'
|
|
450
|
+
// }
|
|
451
|
+
// }
|
|
452
|
+
```
|
|
453
|
+
|
|
454
|
+
#### Viewing Traces
|
|
455
|
+
|
|
456
|
+
**Console Output**:
|
|
457
|
+
Simple tracing for development:
|
|
458
|
+
```typescript
|
|
459
|
+
import { ConsoleSpanExporter } from '@opentelemetry/sdk-trace-node';
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
**Jaeger Integration**:
|
|
463
|
+
Visualize traces in real-time:
|
|
464
|
+
```typescript
|
|
465
|
+
import { JaegerExporter } from '@opentelemetry/exporter-trace-jaeger-http';
|
|
466
|
+
|
|
467
|
+
const exporter = new JaegerExporter({
|
|
468
|
+
serviceName: 'ellyco-agentic',
|
|
469
|
+
host: 'localhost',
|
|
470
|
+
port: 6831
|
|
471
|
+
});
|
|
472
|
+
|
|
473
|
+
provider.addSpanProcessor(new SimpleSpanProcessor(exporter));
|
|
474
|
+
```
|
|
475
|
+
|
|
476
|
+
Then access the Jaeger UI at `http://localhost:16686`
|
|
477
|
+
|
|
478
|
+
**OTLP Export**:
|
|
479
|
+
Export traces to any OTLP-compatible backend:
|
|
480
|
+
```typescript
|
|
481
|
+
import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-http';
|
|
482
|
+
|
|
483
|
+
const exporter = new OTLPTraceExporter({
|
|
484
|
+
url: 'http://localhost:4317/v1/traces'
|
|
485
|
+
});
|
|
486
|
+
|
|
487
|
+
provider.addSpanProcessor(new BatchSpanProcessor(exporter));
|
|
488
|
+
```
|
|
489
|
+
|
|
490
|
+
#### Tracing Nested Graphs
|
|
491
|
+
|
|
492
|
+
When graphs call other graphs, context layers create a hierarchical span structure:
|
|
493
|
+
|
|
494
|
+
```typescript
|
|
495
|
+
// Parent graph
|
|
496
|
+
const parentGraph = new StateMachine(parentSchema);
|
|
497
|
+
parentGraph.addNode("delegate", new FunctionNode(async (state) => {
|
|
498
|
+
// Calling a subgraph
|
|
499
|
+
return await subGraph.run(state, context);
|
|
500
|
+
}));
|
|
501
|
+
|
|
502
|
+
// Traces show hierarchy:
|
|
503
|
+
// ├─ run-id: run-abc123
|
|
504
|
+
// │ ├─ process (layerId: ROOT)
|
|
505
|
+
// │ ├─ delegate (layerId: ROOT.delegate)
|
|
506
|
+
// │ │ ├─ subprocess (layerId: ROOT.delegate.subprocess)
|
|
507
|
+
// │ │ └─ validate (layerId: ROOT.delegate.validate)
|
|
508
|
+
// │ └─ finalize (layerId: ROOT)
|
|
509
|
+
```
|
|
510
|
+
|
|
511
|
+
#### Debugging with Traces
|
|
512
|
+
|
|
513
|
+
Traces are invaluable for:
|
|
514
|
+
- **Performance analysis** - Identify slow nodes
|
|
515
|
+
- **State debugging** - See how state evolves through the graph
|
|
516
|
+
- **Error investigation** - Track state at each step before failure
|
|
517
|
+
- **Production monitoring** - Monitor graph executions in real-time
|
|
518
|
+
|
|
519
|
+
```typescript
|
|
520
|
+
// Example: Find slow nodes
|
|
521
|
+
const traces = await exporter.getTraces();
|
|
522
|
+
traces.forEach(span => {
|
|
523
|
+
const duration = span.endTime - span.startTime;
|
|
524
|
+
if (duration > 5000) {
|
|
525
|
+
console.warn(`Slow node: ${span.attributes.nodeName} took ${duration}ms`);
|
|
526
|
+
}
|
|
527
|
+
});
|
|
528
|
+
```
|
|
529
|
+
|
|
394
530
|
## Architecture
|
|
395
531
|
|
|
396
532
|
### Execution Flow
|
|
@@ -492,7 +628,7 @@ import {
|
|
|
492
628
|
SQLiteStore,
|
|
493
629
|
defineTool,
|
|
494
630
|
tool
|
|
495
|
-
} from 'ellyco
|
|
631
|
+
} from '@ellyco/agentic';
|
|
496
632
|
import { z } from 'zod';
|
|
497
633
|
import Database from 'better-sqlite3';
|
|
498
634
|
|
|
@@ -555,6 +691,10 @@ console.log("Summary:", result.state.summary);
|
|
|
555
691
|
db.close();
|
|
556
692
|
```
|
|
557
693
|
|
|
694
|
+
## License
|
|
695
|
+
|
|
696
|
+
MIT
|
|
558
697
|
|
|
698
|
+
---
|
|
559
699
|
|
|
560
700
|
**Questions?** Check out the comprehensive JSDoc comments throughout the codebase for detailed API documentation and examples!
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../src/graphs/graph.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../src/graphs/graph.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,EAAE,CAAC,EAA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EAAE,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC;IAItD;;;;;;;OAOG;IACG,GAAG,CAAC,KAAK,EAAE,CAAC,EAAE,gBAAgB,EAAE,YAAY,GAAG,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAUzF;;;;;;;;OAQG;IACG,MAAM,CAAC,KAAK,EAAE,CAAC,EAAE,MAAM,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;IAEnE;;;;;OAKG;IACG,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;CAmGrF"}
|
package/dist/graphs/graph.js
CHANGED
|
@@ -4,6 +4,8 @@ exports.Graph = exports.DerivedSchemaConstructor = exports.END = exports.START =
|
|
|
4
4
|
const runtime_context_1 = require("./runtime-context");
|
|
5
5
|
const cuid2_1 = require("@paralleldrive/cuid2");
|
|
6
6
|
const merge_state_1 = require("./merge-state");
|
|
7
|
+
const api_1 = require("@opentelemetry/api");
|
|
8
|
+
const tracer = api_1.trace.getTracer("@ellyco/agentic", "0.1.2");
|
|
7
9
|
/**
|
|
8
10
|
* Special node name indicating the start of graph execution
|
|
9
11
|
*/
|
|
@@ -144,12 +146,30 @@ class Graph {
|
|
|
144
146
|
if (node === undefined) {
|
|
145
147
|
throw new Error(`Node ${currentNode} not found`);
|
|
146
148
|
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
149
|
+
return await tracer.startActiveSpan(currentNode, {
|
|
150
|
+
attributes: {
|
|
151
|
+
runId: context.runtime.runId,
|
|
152
|
+
nodeName: currentNode,
|
|
153
|
+
layerId: context.id,
|
|
154
|
+
}
|
|
155
|
+
}, async (span) => {
|
|
156
|
+
const inputNodeState = this.stateToNodeState(structuredClone(state), context);
|
|
157
|
+
const result = await node.run(structuredClone(inputNodeState), context);
|
|
158
|
+
if (Object.keys(result).length === 0) {
|
|
159
|
+
span.setAttributes({
|
|
160
|
+
changes: JSON.stringify({}),
|
|
161
|
+
newState: JSON.stringify(state),
|
|
162
|
+
});
|
|
163
|
+
return state;
|
|
164
|
+
}
|
|
165
|
+
const changes = this.nodeStateToState(result, context);
|
|
166
|
+
const mergedState = this.mergeState(state, changes);
|
|
167
|
+
span.setAttributes({
|
|
168
|
+
changes: JSON.stringify(changes),
|
|
169
|
+
newState: JSON.stringify(mergedState),
|
|
170
|
+
});
|
|
171
|
+
return mergedState;
|
|
172
|
+
});
|
|
153
173
|
}
|
|
154
174
|
/**
|
|
155
175
|
* Validates the graph structure.
|
package/dist/graphs/graph.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph.js","sourceRoot":"","sources":["../../src/graphs/graph.ts"],"names":[],"mappings":";;;AAEA,uDAAiE;AAEjE,gDAAgD;AAEhD,+CAA2C;
|
|
1
|
+
{"version":3,"file":"graph.js","sourceRoot":"","sources":["../../src/graphs/graph.ts"],"names":[],"mappings":";;;AAEA,uDAAiE;AAEjE,gDAAgD;AAEhD,+CAA2C;AAC3C,4CAA2C;AAE3C,MAAM,MAAM,GAAG,WAAK,CAAC,SAAS,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;AAO3D;;GAEG;AACU,QAAA,KAAK,GAAG,OAAO,CAAC;AAE7B;;GAEG;AACU,QAAA,GAAG,GAAG,KAAK,CAAC;AA4BzB;;;;GAIG;AACH,SAAS,iBAAiB,CAAC,MAAmC;IAC1D,OAAO,OAAO,IAAI,MAAM,CAAC;AAC7B,CAAC;AAQD;;;;;;;;;;;;;GAaG;AACI,MAAM,wBAAwB,GAAG,CAAI,WAAuC,EAAmC,EAAE;IACpH,MAAM,CAAC,cAAc,CAAC,WAAW,EAAE,SAAS,EAAE,EAAE,KAAK,EAAE,IA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C"}
|
package/dist/graphs/index.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
1
|
+
export * from "./store";
|
|
2
|
+
export * from "./graph";
|
|
3
|
+
export * from "./iterator";
|
|
4
|
+
export * from "./merge-state";
|
|
5
|
+
export * from "./node-sequence";
|
|
6
|
+
export * from "./registry";
|
|
7
|
+
export * from "./runtime-context";
|
|
8
|
+
export * from "./state-machine";
|
|
9
|
+
export * from "./types";
|
|
7
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/graphs/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/graphs/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC"}
|
package/dist/graphs/index.js
CHANGED
|
@@ -1,15 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
2
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
Object.defineProperty(exports, "ContextLayer", { enumerable: true, get: function () { return runtime_context_1.ContextLayer; } });
|
|
13
|
-
var registry_1 = require("./registry");
|
|
14
|
-
Object.defineProperty(exports, "STATE_MERGE", { enumerable: true, get: function () { return registry_1.STATE_MERGE; } });
|
|
17
|
+
__exportStar(require("./store"), exports);
|
|
18
|
+
__exportStar(require("./graph"), exports);
|
|
19
|
+
__exportStar(require("./iterator"), exports);
|
|
20
|
+
__exportStar(require("./merge-state"), exports);
|
|
21
|
+
__exportStar(require("./node-sequence"), exports);
|
|
22
|
+
__exportStar(require("./registry"), exports);
|
|
23
|
+
__exportStar(require("./runtime-context"), exports);
|
|
24
|
+
__exportStar(require("./state-machine"), exports);
|
|
25
|
+
__exportStar(require("./types"), exports);
|
|
15
26
|
//# sourceMappingURL=index.js.map
|
package/dist/graphs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/graphs/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/graphs/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,0CAAwB;AACxB,6CAA2B;AAC3B,gDAA8B;AAC9B,kDAAgC;AAChC,6CAA2B;AAC3B,oDAAkC;AAClC,kDAAgC;AAChC,0CAAwB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/graphs/store/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./base-store"), exports);
|
|
18
|
+
__exportStar(require("./sqlite-store"), exports);
|
|
19
|
+
__exportStar(require("./stored-run"), exports);
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/graphs/store/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,iDAA+B;AAC/B,+CAA6B"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./graphs"), exports);
|
|
18
|
+
__exportStar(require("./messages"), exports);
|
|
19
|
+
__exportStar(require("./models"), exports);
|
|
20
|
+
__exportStar(require("./nodes"), exports);
|
|
21
|
+
__exportStar(require("./tools"), exports);
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,6CAA2B;AAC3B,2CAAyB;AACzB,0CAAwB;AACxB,0CAAwB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./BaseModel"), exports);
|
|
18
|
+
__exportStar(require("./BedrockModel"), exports);
|
|
19
|
+
__exportStar(require("./TestModel"), exports);
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,iDAA+B;AAC/B,8CAA4B"}
|
package/dist/nodes/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
1
|
+
export * from "./function-node";
|
|
2
|
+
export * from "./interrupt-node";
|
|
3
|
+
export * from "./model-node";
|
|
4
|
+
export * from "./types";
|
|
4
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/nodes/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/nodes/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC"}
|
package/dist/nodes/index.js
CHANGED
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
2
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var interrupt_node_1 = require("./interrupt-node");
|
|
8
|
-
Object.defineProperty(exports, "InterruptNode", { enumerable: true, get: function () { return interrupt_node_1.InterruptNode; } });
|
|
17
|
+
__exportStar(require("./function-node"), exports);
|
|
18
|
+
__exportStar(require("./interrupt-node"), exports);
|
|
19
|
+
__exportStar(require("./model-node"), exports);
|
|
20
|
+
__exportStar(require("./types"), exports);
|
|
9
21
|
//# sourceMappingURL=index.js.map
|
package/dist/nodes/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/nodes/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/nodes/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,mDAAiC;AACjC,+CAA6B;AAC7B,0CAAwB"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ellyco/agentic",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Simple AI Agent Library",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"types": "dist/index.d.ts",
|
|
7
5
|
"files": [
|
|
8
6
|
"dist"
|
|
9
7
|
],
|
|
8
|
+
"main": "dist/index.js",
|
|
9
|
+
"types": "dist/index.d.ts",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"test": "vitest",
|
|
12
12
|
"build": "tsc"
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
"zod": "^4.2.1"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
+
"@opentelemetry/api": "^1.9.0",
|
|
23
24
|
"@paralleldrive/cuid2": "^3.0.4",
|
|
24
25
|
"typescript": "^5.9.3"
|
|
25
26
|
},
|