@cybernetyx1/atlasflow-runtime 0.1.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/LICENSE +18 -0
- package/README.md +56 -0
- package/dist/adapter/index.d.ts +1 -0
- package/dist/adapter/index.js +0 -0
- package/dist/channel-Dv3Hv1ee.d.ts +634 -0
- package/dist/chunk-4DU4GJ2X.js +347 -0
- package/dist/chunk-HO6QHSUS.js +85 -0
- package/dist/chunk-M4JW76IL.js +1161 -0
- package/dist/chunk-RF6W3TKJ.js +2762 -0
- package/dist/chunk-S7RZJMCF.js +47 -0
- package/dist/cloudflare/index.d.ts +109 -0
- package/dist/cloudflare/index.js +212 -0
- package/dist/command-kxrqWIH7.d.ts +204 -0
- package/dist/index-UFTgKRK4.d.ts +589 -0
- package/dist/index.d.ts +739 -0
- package/dist/index.js +965 -0
- package/dist/node/index.d.ts +65 -0
- package/dist/node/index.js +251 -0
- package/dist/providers.d.ts +40 -0
- package/dist/providers.js +26 -0
- package/dist/routing/index.d.ts +256 -0
- package/dist/routing/index.js +2184 -0
- package/package.json +68 -0
- package/schemas/persona-manifest.v1.schema.json +258 -0
package/package.json
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@cybernetyx1/atlasflow-runtime",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Portable TypeScript runtime for AtlasFlow agents, sessions, tools, sandboxes, routing, and persistence.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
7
|
+
"author": "Cybernetyx",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/Cybernetyx/atlasflow.git",
|
|
11
|
+
"directory": "packages/runtime"
|
|
12
|
+
},
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"import": "./dist/index.js"
|
|
17
|
+
},
|
|
18
|
+
"./node": {
|
|
19
|
+
"types": "./dist/node/index.d.ts",
|
|
20
|
+
"import": "./dist/node/index.js"
|
|
21
|
+
},
|
|
22
|
+
"./routing": {
|
|
23
|
+
"types": "./dist/routing/index.d.ts",
|
|
24
|
+
"import": "./dist/routing/index.js"
|
|
25
|
+
},
|
|
26
|
+
"./cloudflare": {
|
|
27
|
+
"types": "./dist/cloudflare/index.d.ts",
|
|
28
|
+
"import": "./dist/cloudflare/index.js"
|
|
29
|
+
},
|
|
30
|
+
"./adapter": {
|
|
31
|
+
"types": "./dist/adapter/index.d.ts",
|
|
32
|
+
"import": "./dist/adapter/index.js"
|
|
33
|
+
},
|
|
34
|
+
"./providers": {
|
|
35
|
+
"types": "./dist/providers.d.ts",
|
|
36
|
+
"import": "./dist/providers.js"
|
|
37
|
+
},
|
|
38
|
+
"./schemas/persona-manifest.v1.schema.json": "./schemas/persona-manifest.v1.schema.json"
|
|
39
|
+
},
|
|
40
|
+
"files": [
|
|
41
|
+
"dist",
|
|
42
|
+
"schemas"
|
|
43
|
+
],
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"@earendil-works/pi-ai": "^0.79.1",
|
|
46
|
+
"@hono/node-server": "^1.13.7",
|
|
47
|
+
"@modelcontextprotocol/sdk": "^1.12.0",
|
|
48
|
+
"@valibot/to-json-schema": "^1.0.0",
|
|
49
|
+
"hono": "^4.6.14",
|
|
50
|
+
"just-bash": "^2.14.5",
|
|
51
|
+
"valibot": "^1.0.0"
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@cloudflare/workers-types": "^4.20250101.0",
|
|
55
|
+
"@types/node": "^22.10.0",
|
|
56
|
+
"tsup": "^8.3.5",
|
|
57
|
+
"typescript": "^5.7.2",
|
|
58
|
+
"zod": "^4.0.0"
|
|
59
|
+
},
|
|
60
|
+
"publishConfig": {
|
|
61
|
+
"access": "public"
|
|
62
|
+
},
|
|
63
|
+
"scripts": {
|
|
64
|
+
"build": "tsup",
|
|
65
|
+
"typecheck": "tsc --noEmit",
|
|
66
|
+
"test": "node --import tsx --test test/*.test.ts"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://atlasflow.dev/schemas/persona-manifest.v1.schema.json",
|
|
4
|
+
"title": "AtlasFlow Persona Manifest v1",
|
|
5
|
+
"description": "Declarative persona manifest: identity, loadout, deploy-time slots, and defaults.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["atlasflow", "name", "model"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"$schema": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "Optional editor schema reference. It is ignored by the runtime."
|
|
13
|
+
},
|
|
14
|
+
"atlasflow": {
|
|
15
|
+
"const": 1,
|
|
16
|
+
"description": "Manifest format version. v1 is the frozen schema."
|
|
17
|
+
},
|
|
18
|
+
"name": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"minLength": 1
|
|
21
|
+
},
|
|
22
|
+
"description": {
|
|
23
|
+
"type": "string"
|
|
24
|
+
},
|
|
25
|
+
"identity": {
|
|
26
|
+
"$ref": "#/$defs/identity"
|
|
27
|
+
},
|
|
28
|
+
"model": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"minLength": 1,
|
|
31
|
+
"description": "Model reference in provider/model-id form."
|
|
32
|
+
},
|
|
33
|
+
"loadout": {
|
|
34
|
+
"$ref": "#/$defs/loadout"
|
|
35
|
+
},
|
|
36
|
+
"slots": {
|
|
37
|
+
"type": "array",
|
|
38
|
+
"items": {
|
|
39
|
+
"$ref": "#/$defs/slot"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"defaults": {
|
|
43
|
+
"$ref": "#/$defs/defaults"
|
|
44
|
+
},
|
|
45
|
+
"provenance": {
|
|
46
|
+
"type": "object",
|
|
47
|
+
"additionalProperties": true,
|
|
48
|
+
"description": "Opaque metadata for lineage, fork base, or provenance summaries."
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"$defs": {
|
|
52
|
+
"provenance": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"enum": ["earned", "taught", "ingested", "researched", "inherited"],
|
|
55
|
+
"default": "taught",
|
|
56
|
+
"description": "Optional trust metadata. If omitted, hand-authored scaffold content is treated as taught."
|
|
57
|
+
},
|
|
58
|
+
"identity": {
|
|
59
|
+
"type": "object",
|
|
60
|
+
"additionalProperties": false,
|
|
61
|
+
"properties": {
|
|
62
|
+
"role": { "type": "string" },
|
|
63
|
+
"disposition": { "type": "string" },
|
|
64
|
+
"voice": { "type": "string" },
|
|
65
|
+
"taste": { "type": "string" },
|
|
66
|
+
"instructions": { "type": "string" }
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"loadout": {
|
|
70
|
+
"type": "object",
|
|
71
|
+
"additionalProperties": false,
|
|
72
|
+
"properties": {
|
|
73
|
+
"skills": {
|
|
74
|
+
"type": "array",
|
|
75
|
+
"items": { "$ref": "#/$defs/skill" }
|
|
76
|
+
},
|
|
77
|
+
"contextPacks": {
|
|
78
|
+
"type": "array",
|
|
79
|
+
"items": { "$ref": "#/$defs/contextPack" }
|
|
80
|
+
},
|
|
81
|
+
"standards": {
|
|
82
|
+
"type": "array",
|
|
83
|
+
"items": { "$ref": "#/$defs/standard" }
|
|
84
|
+
},
|
|
85
|
+
"rules": {
|
|
86
|
+
"type": "array",
|
|
87
|
+
"items": { "$ref": "#/$defs/rule" }
|
|
88
|
+
},
|
|
89
|
+
"workflows": {
|
|
90
|
+
"type": "array",
|
|
91
|
+
"items": { "$ref": "#/$defs/workflow" }
|
|
92
|
+
},
|
|
93
|
+
"personas": {
|
|
94
|
+
"type": "array",
|
|
95
|
+
"items": { "$ref": "#/$defs/subPersona" }
|
|
96
|
+
},
|
|
97
|
+
"triggers": {
|
|
98
|
+
"$ref": "#/$defs/triggers"
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"skill": {
|
|
103
|
+
"type": "object",
|
|
104
|
+
"additionalProperties": false,
|
|
105
|
+
"required": ["name", "body"],
|
|
106
|
+
"properties": {
|
|
107
|
+
"name": { "type": "string", "minLength": 1 },
|
|
108
|
+
"description": { "type": "string", "default": "" },
|
|
109
|
+
"when_to_use": { "type": "string" },
|
|
110
|
+
"body": { "type": "string" },
|
|
111
|
+
"allowedTools": {
|
|
112
|
+
"type": "array",
|
|
113
|
+
"items": { "type": "string" }
|
|
114
|
+
},
|
|
115
|
+
"provenance": { "$ref": "#/$defs/provenance" }
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"contextPack": {
|
|
119
|
+
"type": "object",
|
|
120
|
+
"additionalProperties": false,
|
|
121
|
+
"required": ["name", "items"],
|
|
122
|
+
"properties": {
|
|
123
|
+
"name": { "type": "string", "minLength": 1 },
|
|
124
|
+
"description": { "type": "string" },
|
|
125
|
+
"version": { "type": "string" },
|
|
126
|
+
"mount": { "type": "string", "enum": ["context", "sandbox"] },
|
|
127
|
+
"items": {
|
|
128
|
+
"type": "array",
|
|
129
|
+
"items": {
|
|
130
|
+
"type": "object",
|
|
131
|
+
"additionalProperties": false,
|
|
132
|
+
"required": ["name", "content"],
|
|
133
|
+
"properties": {
|
|
134
|
+
"name": { "type": "string", "minLength": 1 },
|
|
135
|
+
"content": { "type": "string" }
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
"provenance": { "$ref": "#/$defs/provenance" }
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"standard": {
|
|
143
|
+
"type": "object",
|
|
144
|
+
"additionalProperties": false,
|
|
145
|
+
"required": ["name", "content"],
|
|
146
|
+
"properties": {
|
|
147
|
+
"name": { "type": "string", "minLength": 1 },
|
|
148
|
+
"content": { "type": "string" },
|
|
149
|
+
"provenance": { "$ref": "#/$defs/provenance" }
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
"rule": {
|
|
153
|
+
"type": "object",
|
|
154
|
+
"additionalProperties": false,
|
|
155
|
+
"required": ["name", "enforce", "message"],
|
|
156
|
+
"properties": {
|
|
157
|
+
"name": { "type": "string", "minLength": 1 },
|
|
158
|
+
"enforce": { "type": "string", "enum": ["before_prompt", "before_tool", "after_tool"] },
|
|
159
|
+
"tools": {
|
|
160
|
+
"type": "array",
|
|
161
|
+
"items": { "type": "string" }
|
|
162
|
+
},
|
|
163
|
+
"pattern": { "type": "string" },
|
|
164
|
+
"action": { "type": "string", "enum": ["block", "warn"], "default": "block" },
|
|
165
|
+
"message": { "type": "string" },
|
|
166
|
+
"provenance": { "$ref": "#/$defs/provenance" }
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
"workflow": {
|
|
170
|
+
"type": "object",
|
|
171
|
+
"additionalProperties": true,
|
|
172
|
+
"required": ["name", "steps"],
|
|
173
|
+
"properties": {
|
|
174
|
+
"name": { "type": "string", "minLength": 1 },
|
|
175
|
+
"description": { "type": "string" },
|
|
176
|
+
"roleSlots": {
|
|
177
|
+
"type": "object",
|
|
178
|
+
"additionalProperties": { "type": "string" }
|
|
179
|
+
},
|
|
180
|
+
"defaultModel": { "type": "string" },
|
|
181
|
+
"steps": {
|
|
182
|
+
"type": "array",
|
|
183
|
+
"items": { "type": "object" }
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
"subPersona": {
|
|
188
|
+
"type": "object",
|
|
189
|
+
"additionalProperties": false,
|
|
190
|
+
"required": ["name", "instructions"],
|
|
191
|
+
"properties": {
|
|
192
|
+
"name": { "type": "string", "minLength": 1 },
|
|
193
|
+
"model": { "type": "string" },
|
|
194
|
+
"instructions": { "type": "string" },
|
|
195
|
+
"provenance": { "$ref": "#/$defs/provenance" }
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
"triggers": {
|
|
199
|
+
"type": "object",
|
|
200
|
+
"additionalProperties": false,
|
|
201
|
+
"properties": {
|
|
202
|
+
"webhook": { "type": "boolean" },
|
|
203
|
+
"cron": { "type": "string" }
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
"slot": {
|
|
207
|
+
"type": "object",
|
|
208
|
+
"additionalProperties": false,
|
|
209
|
+
"required": ["name", "type"],
|
|
210
|
+
"properties": {
|
|
211
|
+
"name": { "type": "string", "minLength": 1 },
|
|
212
|
+
"type": { "type": "string", "enum": ["credential", "mcp", "tool", "sandbox", "memory"] },
|
|
213
|
+
"env": { "type": "string" },
|
|
214
|
+
"required": { "type": "boolean", "default": false },
|
|
215
|
+
"description": { "type": "string" }
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
"defaults": {
|
|
219
|
+
"type": "object",
|
|
220
|
+
"additionalProperties": false,
|
|
221
|
+
"properties": {
|
|
222
|
+
"thinkingLevel": { "type": "string", "enum": ["off", "minimal", "low", "medium", "high", "xhigh"] },
|
|
223
|
+
"headless": { "type": "boolean" },
|
|
224
|
+
"builtinTools": {
|
|
225
|
+
"oneOf": [
|
|
226
|
+
{ "type": "boolean" },
|
|
227
|
+
{
|
|
228
|
+
"type": "array",
|
|
229
|
+
"items": { "type": "string" }
|
|
230
|
+
}
|
|
231
|
+
]
|
|
232
|
+
},
|
|
233
|
+
"compaction": {
|
|
234
|
+
"oneOf": [
|
|
235
|
+
{ "const": false },
|
|
236
|
+
{
|
|
237
|
+
"type": "object",
|
|
238
|
+
"additionalProperties": false,
|
|
239
|
+
"properties": {
|
|
240
|
+
"threshold": { "type": "number" },
|
|
241
|
+
"thresholdTokens": { "type": "number" },
|
|
242
|
+
"keepRecent": { "type": "number" }
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
]
|
|
246
|
+
},
|
|
247
|
+
"durability": {
|
|
248
|
+
"type": "object",
|
|
249
|
+
"additionalProperties": false,
|
|
250
|
+
"properties": {
|
|
251
|
+
"retry": { "type": "number" },
|
|
252
|
+
"timeoutMs": { "type": "number" }
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|