ekairos 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +112 -0
- package/dist/domain.d.ts +2 -0
- package/dist/domain.d.ts.map +1 -0
- package/dist/domain.js +18 -0
- package/dist/domain.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -0
- package/dist/story.d.ts +2 -0
- package/dist/story.d.ts.map +1 -0
- package/dist/story.js +18 -0
- package/dist/story.js.map +1 -0
- package/package.json +53 -0
package/README.md
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# Ekairos
|
|
2
|
+
|
|
3
|
+
**AI Stories and Workflows Runtime** - Build durable, intelligent workflows with AI.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# Core package (story + domain)
|
|
9
|
+
pnpm add ekairos
|
|
10
|
+
|
|
11
|
+
# Dataset tools (separate package)
|
|
12
|
+
pnpm add @ekairos/dataset
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Quick Start
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import { story, engine, storyRunner } from 'ekairos';
|
|
19
|
+
|
|
20
|
+
// 1. Define your story
|
|
21
|
+
const myStory = {
|
|
22
|
+
key: 'my-story',
|
|
23
|
+
narrative: 'You are a helpful assistant that...',
|
|
24
|
+
actions: [
|
|
25
|
+
{
|
|
26
|
+
name: 'doSomething',
|
|
27
|
+
description: 'Does something useful',
|
|
28
|
+
implementationKey: 'my.action',
|
|
29
|
+
execute: async ({ arg, contextId }) => {
|
|
30
|
+
// Your non-serializable code here
|
|
31
|
+
return { success: true, result: 'done' };
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
options: {
|
|
36
|
+
reasoningEffort: 'medium',
|
|
37
|
+
maxLoops: 10
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
// 2. Register the story
|
|
42
|
+
export const storyEngineInstance = engine.register(myStory);
|
|
43
|
+
export const descriptor = storyEngineInstance.story('my-story');
|
|
44
|
+
|
|
45
|
+
// 3. Create a workflow (in app/workflows/my-story.ts)
|
|
46
|
+
import { storyRunner } from 'ekairos';
|
|
47
|
+
import { descriptor } from './stories';
|
|
48
|
+
|
|
49
|
+
export async function myWorkflow(args?: { context?: any }) {
|
|
50
|
+
"use workflow"; // Required for Next.js Workflow DevKit
|
|
51
|
+
return storyRunner(descriptor, args);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// 4. Start the workflow
|
|
55
|
+
import { start } from 'workflow/api';
|
|
56
|
+
import { myWorkflow } from './workflows/my-story';
|
|
57
|
+
|
|
58
|
+
await start(myWorkflow);
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Next.js Integration
|
|
62
|
+
|
|
63
|
+
```typescript
|
|
64
|
+
// next.config.ts
|
|
65
|
+
import { withWorkflow } from 'workflow/next';
|
|
66
|
+
import type { NextConfig } from 'next';
|
|
67
|
+
|
|
68
|
+
const nextConfig: NextConfig = {
|
|
69
|
+
transpilePackages: ['ekairos'],
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export default withWorkflow(nextConfig);
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## What's Included
|
|
76
|
+
|
|
77
|
+
This package (`ekairos`) is a convenience wrapper that re-exports:
|
|
78
|
+
- **@ekairos/story** - AI agents, story engine, workflows, steps
|
|
79
|
+
- **@ekairos/domain** - Domain modeling utilities for InstantDB
|
|
80
|
+
|
|
81
|
+
**Not included:** Dataset tools are a separate package (`@ekairos/dataset`)
|
|
82
|
+
|
|
83
|
+
## Package Ecosystem
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
# Core runtime (recommended for most use cases)
|
|
87
|
+
pnpm add ekairos
|
|
88
|
+
|
|
89
|
+
# Dataset tools - SEPARATE package
|
|
90
|
+
pnpm add @ekairos/dataset
|
|
91
|
+
|
|
92
|
+
# Advanced: Use scoped packages directly if needed
|
|
93
|
+
pnpm add @ekairos/story # Story engine only
|
|
94
|
+
pnpm add @ekairos/domain # Domain utilities only
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Features
|
|
98
|
+
|
|
99
|
+
- 🤖 **AI Agents** - Durable agents with tool execution
|
|
100
|
+
- 🎭 **Story Engine** - Modular stories with non-serializable actions
|
|
101
|
+
- 🔄 **Workflow Integration** - Compatible with Vercel Workflow DevKit
|
|
102
|
+
- 💾 **Persistent State** - Built on InstantDB
|
|
103
|
+
- 🛠️ **Extensible** - Easy to add custom tools and actions
|
|
104
|
+
|
|
105
|
+
## Documentation
|
|
106
|
+
|
|
107
|
+
See the [monorepo README](../../README.md) for full documentation.
|
|
108
|
+
|
|
109
|
+
## License
|
|
110
|
+
|
|
111
|
+
MIT
|
|
112
|
+
|
package/dist/domain.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"domain.d.ts","sourceRoot":"","sources":["../src/domain.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
|
package/dist/domain.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
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("@ekairos/domain"), exports);
|
|
18
|
+
//# sourceMappingURL=domain.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"domain.js","sourceRoot":"","sources":["../src/domain.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,gBAAgB,CAAC;AAG/B,cAAc,iBAAiB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
// Re-export todo de story (el paquete principal)
|
|
18
|
+
__exportStar(require("@ekairos/story"), exports);
|
|
19
|
+
// Re-export domain utilities
|
|
20
|
+
__exportStar(require("@ekairos/domain"), exports);
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAAiD;AACjD,iDAA+B;AAE/B,6BAA6B;AAC7B,kDAAgC"}
|
package/dist/story.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"story.d.ts","sourceRoot":"","sources":["../src/story.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
|
package/dist/story.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
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("@ekairos/story"), exports);
|
|
18
|
+
//# sourceMappingURL=story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"story.js","sourceRoot":"","sources":["../src/story.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B"}
|
package/package.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ekairos",
|
|
3
|
+
"version": "1.6.0",
|
|
4
|
+
"description": "Ekairos - AI Stories and Workflows Runtime",
|
|
5
|
+
"type": "commonjs",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
11
|
+
"publishConfig": {
|
|
12
|
+
"access": "public"
|
|
13
|
+
},
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "git+https://github.com/pulz-ar/pulzar-lib-core.git",
|
|
18
|
+
"directory": "packages/ekairos"
|
|
19
|
+
},
|
|
20
|
+
"exports": {
|
|
21
|
+
".": {
|
|
22
|
+
"types": "./dist/index.d.ts",
|
|
23
|
+
"require": "./dist/index.js",
|
|
24
|
+
"default": "./dist/index.js"
|
|
25
|
+
},
|
|
26
|
+
"./story": {
|
|
27
|
+
"types": "./dist/story.d.ts",
|
|
28
|
+
"require": "./dist/story.js",
|
|
29
|
+
"default": "./dist/story.js"
|
|
30
|
+
},
|
|
31
|
+
"./domain": {
|
|
32
|
+
"types": "./dist/domain.d.ts",
|
|
33
|
+
"require": "./dist/domain.js",
|
|
34
|
+
"default": "./dist/domain.js"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"scripts": {
|
|
38
|
+
"build": "tsc -p tsconfig.json",
|
|
39
|
+
"dev": "tsc -p tsconfig.json --watch",
|
|
40
|
+
"clean": "node -e \"require('fs').rmSync('dist', {recursive:true, force:true})\"",
|
|
41
|
+
"typecheck": "tsc --noEmit"
|
|
42
|
+
},
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"@ekairos/story": "^1.6.0",
|
|
45
|
+
"@ekairos/domain": "^1.6.0"
|
|
46
|
+
},
|
|
47
|
+
"devDependencies": {
|
|
48
|
+
"@ekairos/tsconfig": "workspace:*",
|
|
49
|
+
"@types/node": "^24.5.0",
|
|
50
|
+
"typescript": "^5.9.2"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|