@ellyco/agentic 0.1.1 → 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 CHANGED
@@ -17,7 +17,7 @@ A powerful TypeScript framework for building stateful, agentic workflows with bu
17
17
  ## Installation
18
18
 
19
19
  ```bash
20
- npm install ellyco-agentic
20
+ npm install @ellyco/agentic
21
21
  ```
22
22
 
23
23
  ### Dependencies
@@ -31,7 +31,7 @@ npm install ellyco-agentic
31
31
  ### 1. Define Your Messages
32
32
 
33
33
  ```typescript
34
- import { SystemMessage, UserMessage, AgentMessage } from 'ellyco-agentic';
34
+ import { SystemMessage, UserMessage, AgentMessage } from '@ellyco/agentic';
35
35
 
36
36
  const systemMsg = new SystemMessage(
37
37
  "You are a helpful assistant that processes data."
@@ -46,7 +46,7 @@ userMsg.interpolate({ data: "important info" });
46
46
  ### 2. Define Your Tools
47
47
 
48
48
  ```typescript
49
- import { defineTool, tool } from 'ellyco-agentic';
49
+ import { defineTool, tool } from '@ellyco/agentic';
50
50
  import { z } from 'zod';
51
51
 
52
52
  const searchTool = defineTool(
@@ -70,7 +70,7 @@ const searchImplementation = tool(
70
70
  ### 3. Configure Your Model
71
71
 
72
72
  ```typescript
73
- import { BedrockModel } from 'ellyco-agentic';
73
+ import { BedrockModel } from '@ellyco/agentic';
74
74
 
75
75
  const model = new BedrockModel({
76
76
  modelId: "anthropic.claude-3-sonnet-20240229-v1:0",
@@ -86,7 +86,7 @@ const response = await model.invoke([userMsg]);
86
86
  ### 4. Build a Graph
87
87
 
88
88
  ```typescript
89
- import { StateMachine, makeNode } from 'ellyco-agentic';
89
+ import { StateMachine, makeNode } from '@ellyco/agentic';
90
90
  import { z } from 'zod';
91
91
 
92
92
  const schema = z.object({
@@ -178,7 +178,7 @@ Nodes are the building blocks of graphs - they execute logic and return partial
178
178
  Simple synchronous or asynchronous functions.
179
179
 
180
180
  ```typescript
181
- import { makeNode } from 'ellyco-agentic';
181
+ import { makeNode } from '@ellyco/agentic';
182
182
 
183
183
  const node = makeNode((state, context) => ({
184
184
  processed: true,
@@ -212,7 +212,7 @@ const confirmNode = new InterruptNode(
212
212
  Messages represent communication in the system with different roles:
213
213
 
214
214
  ```typescript
215
- import { SystemMessage, UserMessage, AgentMessage } from 'ellyco-agentic';
215
+ import { SystemMessage, UserMessage, AgentMessage } from '@ellyco/agentic';
216
216
 
217
217
  // System messages set context
218
218
  const system = new SystemMessage("You are a data analyst");
@@ -230,7 +230,7 @@ const agent = new AgentMessage("The analysis shows...");
230
230
  Tools enable models to request external operations:
231
231
 
232
232
  ```typescript
233
- import { ToolRequest, ToolResponse, ToolError } from 'ellyco-agentic';
233
+ import { ToolRequest, ToolResponse, ToolError } from '@ellyco/agentic';
234
234
 
235
235
  // Model requests a tool
236
236
  const request = new ToolRequest(
@@ -296,7 +296,7 @@ if (result.exitReason === "interrupt") {
296
296
  Use SQLite to persist and resume runs across sessions:
297
297
 
298
298
  ```typescript
299
- import { SQLiteStore } from 'ellyco-agentic';
299
+ import { SQLiteStore } from '@ellyco/agentic';
300
300
  import Database from 'better-sqlite3';
301
301
 
302
302
  // Setup database
@@ -348,7 +348,7 @@ console.log(result.explanation); // string
348
348
  Implement your own model provider:
349
349
 
350
350
  ```typescript
351
- import { BaseModel, InvokeResponse, ModelMessages } from 'ellyco-agentic';
351
+ import { BaseModel, InvokeResponse, ModelMessages } from '@ellyco/agentic';
352
352
 
353
353
  class MyCustomModel extends BaseModel {
354
354
  protected async runModel(
@@ -376,7 +376,7 @@ const model = new MyCustomModel({ temperature: 0.7 });
376
376
  Use the mock model for testing without hitting real APIs:
377
377
 
378
378
  ```typescript
379
- import { TestModel, TestResponseConfig } from 'ellyco-agentic';
379
+ import { TestModel, TestResponseConfig } from '@ellyco/agentic';
380
380
 
381
381
  const testModel = new TestModel({ temperature: 0.7 });
382
382
 
@@ -628,7 +628,7 @@ import {
628
628
  SQLiteStore,
629
629
  defineTool,
630
630
  tool
631
- } from 'ellyco-agentic';
631
+ } from '@ellyco/agentic';
632
632
  import { z } from 'zod';
633
633
  import Database from 'better-sqlite3';
634
634
 
@@ -5,7 +5,7 @@ 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
7
  const api_1 = require("@opentelemetry/api");
8
- const tracer = api_1.trace.getTracer("@ellyco/agentic", "0.1.1");
8
+ const tracer = api_1.trace.getTracer("@ellyco/agentic", "0.1.2");
9
9
  /**
10
10
  * Special node name indicating the start of graph execution
11
11
  */
@@ -1,7 +1,10 @@
1
- export { StateMachine } from "./state-machine";
2
- export { type GraphResult } from "./types";
3
- export { NodeSequence } from "./node-sequence";
4
- export { Iterator } from "./iterator";
5
- export { RuntimeContext, ContextLayer } from "./runtime-context";
6
- export { STATE_MERGE } from "./registry";
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,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC"}
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"}
@@ -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
- exports.STATE_MERGE = exports.ContextLayer = exports.RuntimeContext = exports.Iterator = exports.NodeSequence = exports.StateMachine = void 0;
4
- var state_machine_1 = require("./state-machine");
5
- Object.defineProperty(exports, "StateMachine", { enumerable: true, get: function () { return state_machine_1.StateMachine; } });
6
- var node_sequence_1 = require("./node-sequence");
7
- Object.defineProperty(exports, "NodeSequence", { enumerable: true, get: function () { return node_sequence_1.NodeSequence; } });
8
- var iterator_1 = require("./iterator");
9
- Object.defineProperty(exports, "Iterator", { enumerable: true, get: function () { return iterator_1.Iterator; } });
10
- var runtime_context_1 = require("./runtime-context");
11
- Object.defineProperty(exports, "RuntimeContext", { enumerable: true, get: function () { return runtime_context_1.RuntimeContext; } });
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
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/graphs/index.ts"],"names":[],"mappings":";;;AAAA,iDAA+C;AAAtC,6GAAA,YAAY,OAAA;AAErB,iDAA+C;AAAtC,6GAAA,YAAY,OAAA;AACrB,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA;AACjB,qDAAiE;AAAxD,iHAAA,cAAc,OAAA;AAAE,+GAAA,YAAY,OAAA;AACrC,uCAAyC;AAAhC,uGAAA,WAAW,OAAA"}
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,4 @@
1
+ export * from "./base-store";
2
+ export * from "./sqlite-store";
3
+ export * from "./stored-run";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -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"}
@@ -0,0 +1,6 @@
1
+ export * from "./graphs";
2
+ export * from "./messages";
3
+ export * from "./models";
4
+ export * from "./nodes";
5
+ export * from "./tools";
6
+ //# sourceMappingURL=index.d.ts.map
@@ -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,4 @@
1
+ export * from "./BaseModel";
2
+ export * from "./BedrockModel";
3
+ export * from "./TestModel";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -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"}
@@ -1,4 +1,5 @@
1
- export { FunctionNode, makeNode } from "./function-node";
2
- export { InterruptNode } from "./interrupt-node";
3
- export { type NodeLike } from "./types";
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,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,SAAS,CAAC"}
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"}
@@ -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
- exports.InterruptNode = exports.makeNode = exports.FunctionNode = void 0;
4
- var function_node_1 = require("./function-node");
5
- Object.defineProperty(exports, "FunctionNode", { enumerable: true, get: function () { return function_node_1.FunctionNode; } });
6
- Object.defineProperty(exports, "makeNode", { enumerable: true, get: function () { return function_node_1.makeNode; } });
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
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/nodes/index.ts"],"names":[],"mappings":";;;AAAA,iDAAyD;AAAhD,6GAAA,YAAY,OAAA;AAAE,yGAAA,QAAQ,OAAA;AAC/B,mDAAiD;AAAxC,+GAAA,aAAa,OAAA"}
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,10 +1,12 @@
1
1
  {
2
2
  "name": "@ellyco/agentic",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Simple AI Agent Library",
5
5
  "files": [
6
6
  "dist"
7
7
  ],
8
+ "main": "dist/index.js",
9
+ "types": "dist/index.d.ts",
8
10
  "scripts": {
9
11
  "test": "vitest",
10
12
  "build": "tsc"