@womp/spark-agent 5.2.2 → 5.3.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 +430 -423
- package/dist/agent-run.d.ts +1 -1
- package/dist/agent-tools.js +30 -12
- package/dist/capabilities/geometry.js +14 -14
- package/dist/capabilities/materials.d.ts +45 -0
- package/dist/capabilities/materials.js +89 -0
- package/dist/capabilities/openscad-instructions.js +77 -77
- package/dist/capabilities/operations.js +28 -28
- package/dist/capabilities/scene.d.ts +21 -0
- package/dist/capabilities/scene.js +82 -82
- package/dist/capabilities.d.ts +1 -0
- package/dist/capabilities.js +1 -0
- package/dist/error-diagnostics.d.ts +24 -0
- package/dist/error-diagnostics.js +53 -0
- package/dist/generated/materials-declarations.d.ts +1 -0
- package/dist/generated/materials-declarations.js +3 -0
- package/dist/geometry/schemas/backend-schema.json +3393 -3393
- package/dist/geometry/schemas/flowir-dialect.json +1023 -1023
- package/dist/geometry.js +6 -6
- package/dist/kakapo.d.ts +1 -0
- package/dist/kakapo.js +1 -0
- package/dist/materials/composition.d.ts +64 -0
- package/dist/materials/composition.js +121 -0
- package/dist/materials/graph.d.ts +79 -0
- package/dist/materials/graph.js +335 -0
- package/dist/materials/inspection.d.ts +40 -0
- package/dist/materials/inspection.js +54 -0
- package/dist/materials/recipes.d.ts +12 -0
- package/dist/materials/recipes.js +284 -0
- package/dist/materials/reference.d.ts +2 -0
- package/dist/materials/reference.js +97 -0
- package/dist/materials/shaping.d.ts +294 -0
- package/dist/materials/shaping.js +184 -0
- package/dist/materials/structure.d.ts +2 -0
- package/dist/materials/structure.js +12 -0
- package/dist/materials/surface-recipes.d.ts +78 -0
- package/dist/materials/surface-recipes.js +193 -0
- package/dist/materials/types.d.ts +222 -0
- package/dist/materials/types.js +1 -0
- package/dist/models.d.ts +7 -0
- package/dist/models.js +8 -0
- package/dist/pricing.js +5 -0
- package/dist/prompt.d.ts +1 -1
- package/dist/prompt.js +72 -72
- package/dist/scene-operations.d.ts +3 -2
- package/dist/scene-operations.js +19 -11
- package/dist/sdk-geometry-host.js +3 -1
- package/dist/sdk-materials-host.d.ts +9 -0
- package/dist/sdk-materials-host.js +360 -0
- package/dist/sdk-openscad-host.js +3 -1
- package/dist/sdk-scene-host.d.ts +6 -1
- package/dist/sdk-scene-host.js +19 -3
- package/dist/server/fixtures/materials/matte-blue.json +14 -14
- package/dist/server/fixtures/materials/polished-copper.json +14 -14
- package/dist/server/sqlite-store.js +37 -37
- package/dist/server/standalone.js +6 -1
- package/dist/ui.d.ts +50 -6
- package/package.json +139 -139
|
@@ -17,36 +17,36 @@ export class SqliteSparkStore {
|
|
|
17
17
|
this.database.close();
|
|
18
18
|
throw new Error(`Unsupported Spark database version: ${version}`);
|
|
19
19
|
}
|
|
20
|
-
this.database.exec(`
|
|
21
|
-
PRAGMA busy_timeout = 5000;
|
|
22
|
-
PRAGMA journal_mode = WAL;
|
|
23
|
-
PRAGMA synchronous = FULL;
|
|
24
|
-
PRAGMA foreign_keys = ON;
|
|
25
|
-
CREATE TABLE IF NOT EXISTS conversations (
|
|
26
|
-
id TEXT PRIMARY KEY, owner_id TEXT NOT NULL, updated_at TEXT NOT NULL, data TEXT NOT NULL
|
|
27
|
-
);
|
|
28
|
-
CREATE INDEX IF NOT EXISTS conversation_owner ON conversations(owner_id, updated_at);
|
|
29
|
-
CREATE TABLE IF NOT EXISTS runs (
|
|
30
|
-
id TEXT PRIMARY KEY, conversation_id TEXT NOT NULL, data TEXT NOT NULL
|
|
31
|
-
);
|
|
32
|
-
CREATE TABLE IF NOT EXISTS chunks (
|
|
33
|
-
run_id TEXT NOT NULL REFERENCES runs(id), sequence INTEGER NOT NULL, data TEXT NOT NULL,
|
|
34
|
-
PRIMARY KEY (run_id, sequence)
|
|
35
|
-
);
|
|
36
|
-
CREATE TABLE IF NOT EXISTS artifacts (
|
|
37
|
-
id TEXT PRIMARY KEY, owner_id TEXT NOT NULL, metadata TEXT NOT NULL, bytes BLOB NOT NULL
|
|
38
|
-
);
|
|
39
|
-
CREATE TABLE IF NOT EXISTS execution_owner (
|
|
40
|
-
singleton INTEGER PRIMARY KEY CHECK (singleton = 1), pid INTEGER NOT NULL, token TEXT NOT NULL
|
|
41
|
-
);
|
|
42
|
-
CREATE TABLE IF NOT EXISTS scene_operations (
|
|
43
|
-
target_key TEXT NOT NULL, id TEXT NOT NULL, revision INTEGER NOT NULL, data TEXT NOT NULL,
|
|
44
|
-
PRIMARY KEY (target_key, id)
|
|
45
|
-
);
|
|
46
|
-
CREATE TABLE IF NOT EXISTS repair_states (
|
|
47
|
-
target_key TEXT PRIMARY KEY, revision INTEGER NOT NULL, data TEXT NOT NULL
|
|
48
|
-
);
|
|
49
|
-
PRAGMA user_version = 4;
|
|
20
|
+
this.database.exec(`
|
|
21
|
+
PRAGMA busy_timeout = 5000;
|
|
22
|
+
PRAGMA journal_mode = WAL;
|
|
23
|
+
PRAGMA synchronous = FULL;
|
|
24
|
+
PRAGMA foreign_keys = ON;
|
|
25
|
+
CREATE TABLE IF NOT EXISTS conversations (
|
|
26
|
+
id TEXT PRIMARY KEY, owner_id TEXT NOT NULL, updated_at TEXT NOT NULL, data TEXT NOT NULL
|
|
27
|
+
);
|
|
28
|
+
CREATE INDEX IF NOT EXISTS conversation_owner ON conversations(owner_id, updated_at);
|
|
29
|
+
CREATE TABLE IF NOT EXISTS runs (
|
|
30
|
+
id TEXT PRIMARY KEY, conversation_id TEXT NOT NULL, data TEXT NOT NULL
|
|
31
|
+
);
|
|
32
|
+
CREATE TABLE IF NOT EXISTS chunks (
|
|
33
|
+
run_id TEXT NOT NULL REFERENCES runs(id), sequence INTEGER NOT NULL, data TEXT NOT NULL,
|
|
34
|
+
PRIMARY KEY (run_id, sequence)
|
|
35
|
+
);
|
|
36
|
+
CREATE TABLE IF NOT EXISTS artifacts (
|
|
37
|
+
id TEXT PRIMARY KEY, owner_id TEXT NOT NULL, metadata TEXT NOT NULL, bytes BLOB NOT NULL
|
|
38
|
+
);
|
|
39
|
+
CREATE TABLE IF NOT EXISTS execution_owner (
|
|
40
|
+
singleton INTEGER PRIMARY KEY CHECK (singleton = 1), pid INTEGER NOT NULL, token TEXT NOT NULL
|
|
41
|
+
);
|
|
42
|
+
CREATE TABLE IF NOT EXISTS scene_operations (
|
|
43
|
+
target_key TEXT NOT NULL, id TEXT NOT NULL, revision INTEGER NOT NULL, data TEXT NOT NULL,
|
|
44
|
+
PRIMARY KEY (target_key, id)
|
|
45
|
+
);
|
|
46
|
+
CREATE TABLE IF NOT EXISTS repair_states (
|
|
47
|
+
target_key TEXT PRIMARY KEY, revision INTEGER NOT NULL, data TEXT NOT NULL
|
|
48
|
+
);
|
|
49
|
+
PRAGMA user_version = 4;
|
|
50
50
|
`);
|
|
51
51
|
}
|
|
52
52
|
repairStateStore(targetKey) {
|
|
@@ -127,13 +127,13 @@ export class SqliteSparkStore {
|
|
|
127
127
|
if (result.changes !== 1)
|
|
128
128
|
throw new Error("Scene operation changed concurrently or is missing");
|
|
129
129
|
if (next.status === "committed" || next.status === "rolled_back") {
|
|
130
|
-
this.database.prepare(`
|
|
131
|
-
DELETE FROM scene_operations WHERE rowid IN (
|
|
132
|
-
SELECT rowid FROM scene_operations
|
|
133
|
-
WHERE target_key = ? AND json_extract(data, '$.status') IN ('committed', 'rolled_back')
|
|
134
|
-
ORDER BY COALESCE(json_extract(data, '$.completedAt'), '') DESC
|
|
135
|
-
LIMIT -1 OFFSET ?
|
|
136
|
-
)
|
|
130
|
+
this.database.prepare(`
|
|
131
|
+
DELETE FROM scene_operations WHERE rowid IN (
|
|
132
|
+
SELECT rowid FROM scene_operations
|
|
133
|
+
WHERE target_key = ? AND json_extract(data, '$.status') IN ('committed', 'rolled_back')
|
|
134
|
+
ORDER BY COALESCE(json_extract(data, '$.completedAt'), '') DESC
|
|
135
|
+
LIMIT -1 OFFSET ?
|
|
136
|
+
)
|
|
137
137
|
`).run(next.targetKey, completedSceneOperationLimit);
|
|
138
138
|
}
|
|
139
139
|
this.database.exec("COMMIT");
|
|
@@ -5,10 +5,11 @@ import express from "express";
|
|
|
5
5
|
import { getSparkModel, SPARK_MODELS } from "../models.js";
|
|
6
6
|
import { KakapoAPI, KakapoRpcError, KakapoSceneCommitError } from "@womp/kakapo-sdk";
|
|
7
7
|
import { captureSdkSceneScreenshot } from "../sdk-scene-screenshot.js";
|
|
8
|
-
import { composeCapabilities, createAccountCapability, createGeometryCapability, createOpenScadCapability, createSceneCapability, } from "../capabilities.js";
|
|
8
|
+
import { composeCapabilities, createAccountCapability, createGeometryCapability, createMaterialsCapability, createOpenScadCapability, createSceneCapability, } from "../capabilities.js";
|
|
9
9
|
import { loadDemoSceneMaterials } from "./demo-scene-materials.js";
|
|
10
10
|
import { createDemoAccountHost } from "./demo-account.js";
|
|
11
11
|
import { createSdkSceneEditor, createSdkSceneHost, } from "../sdk-scene-host.js";
|
|
12
|
+
import { createSdkMaterialsHost } from "../sdk-materials-host.js";
|
|
12
13
|
import { createSdkGeometryHost } from "../sdk-geometry-host.js";
|
|
13
14
|
import { createSdkOpenScadHost } from "../sdk-openscad-host.js";
|
|
14
15
|
import { createSdkSceneHealthHost } from "../sdk-scene-health-host.js";
|
|
@@ -114,6 +115,10 @@ export async function createStandaloneSparkAgentApp(options) {
|
|
|
114
115
|
});
|
|
115
116
|
const capabilityBindings = {
|
|
116
117
|
scene: createSceneCapability(sceneHost),
|
|
118
|
+
materials: createMaterialsCapability(createSdkMaterialsHost({
|
|
119
|
+
editor,
|
|
120
|
+
assertAvailable: editorOptions.assertEditable,
|
|
121
|
+
}), sceneHost),
|
|
117
122
|
geometry: createGeometryCapability(createSdkGeometryHost({
|
|
118
123
|
editor,
|
|
119
124
|
repairs,
|
package/dist/ui.d.ts
CHANGED
|
@@ -116,16 +116,24 @@ export type SparkUITools = {
|
|
|
116
116
|
read_skill: {
|
|
117
117
|
input: {
|
|
118
118
|
name: string;
|
|
119
|
+
names?: never;
|
|
120
|
+
} | {
|
|
121
|
+
names: string[];
|
|
122
|
+
name?: never;
|
|
119
123
|
};
|
|
120
|
-
output:
|
|
121
|
-
ok:
|
|
122
|
-
|
|
123
|
-
ok: false;
|
|
124
|
-
error: string;
|
|
125
|
-
available: string[];
|
|
124
|
+
output: SkillReadResult | {
|
|
125
|
+
ok: boolean;
|
|
126
|
+
skills: SkillReadResult[];
|
|
126
127
|
};
|
|
127
128
|
};
|
|
128
129
|
};
|
|
130
|
+
export type SkillReadResult = ({
|
|
131
|
+
ok: true;
|
|
132
|
+
} & SparkSkill) | {
|
|
133
|
+
ok: false;
|
|
134
|
+
error: string;
|
|
135
|
+
available: string[];
|
|
136
|
+
};
|
|
129
137
|
export type SparkUIMessage = UIMessage<SparkMessageMetadata, SparkDataParts, SparkUITools>;
|
|
130
138
|
export type SparkUIMessageChunk = InferUIMessageChunk<SparkUIMessage>;
|
|
131
139
|
export type StoredSparkChunk = {
|
|
@@ -168,12 +176,24 @@ export declare const sparkMessageMetadataSchema: z.ZodObject<{
|
|
|
168
176
|
code: z.ZodOptional<z.ZodString>;
|
|
169
177
|
status: z.ZodOptional<z.ZodNumber>;
|
|
170
178
|
requestId: z.ZodOptional<z.ZodString>;
|
|
179
|
+
eventType: z.ZodOptional<z.ZodString>;
|
|
180
|
+
issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
181
|
+
code: z.ZodString;
|
|
182
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
183
|
+
expected: z.ZodOptional<z.ZodString>;
|
|
184
|
+
}, z.core.$strip>>>;
|
|
171
185
|
cause: z.ZodOptional<z.ZodObject<{
|
|
172
186
|
message: z.ZodString;
|
|
173
187
|
name: z.ZodOptional<z.ZodString>;
|
|
174
188
|
code: z.ZodOptional<z.ZodString>;
|
|
175
189
|
status: z.ZodOptional<z.ZodNumber>;
|
|
176
190
|
requestId: z.ZodOptional<z.ZodString>;
|
|
191
|
+
eventType: z.ZodOptional<z.ZodString>;
|
|
192
|
+
issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
193
|
+
code: z.ZodString;
|
|
194
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
195
|
+
expected: z.ZodOptional<z.ZodString>;
|
|
196
|
+
}, z.core.$strip>>>;
|
|
177
197
|
}, z.core.$strip>>;
|
|
178
198
|
}, z.core.$strip>>;
|
|
179
199
|
message: z.ZodString;
|
|
@@ -181,6 +201,12 @@ export declare const sparkMessageMetadataSchema: z.ZodObject<{
|
|
|
181
201
|
code: z.ZodOptional<z.ZodString>;
|
|
182
202
|
status: z.ZodOptional<z.ZodNumber>;
|
|
183
203
|
requestId: z.ZodOptional<z.ZodString>;
|
|
204
|
+
eventType: z.ZodOptional<z.ZodString>;
|
|
205
|
+
issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
206
|
+
code: z.ZodString;
|
|
207
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
208
|
+
expected: z.ZodOptional<z.ZodString>;
|
|
209
|
+
}, z.core.$strip>>>;
|
|
184
210
|
}, z.core.$strip>>;
|
|
185
211
|
}, z.core.$strip>;
|
|
186
212
|
export declare const sparkDataPartSchemas: {
|
|
@@ -243,12 +269,24 @@ export declare const sparkDataPartSchemas: {
|
|
|
243
269
|
code: z.ZodOptional<z.ZodString>;
|
|
244
270
|
status: z.ZodOptional<z.ZodNumber>;
|
|
245
271
|
requestId: z.ZodOptional<z.ZodString>;
|
|
272
|
+
eventType: z.ZodOptional<z.ZodString>;
|
|
273
|
+
issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
274
|
+
code: z.ZodString;
|
|
275
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
276
|
+
expected: z.ZodOptional<z.ZodString>;
|
|
277
|
+
}, z.core.$strip>>>;
|
|
246
278
|
cause: z.ZodOptional<z.ZodObject<{
|
|
247
279
|
message: z.ZodString;
|
|
248
280
|
name: z.ZodOptional<z.ZodString>;
|
|
249
281
|
code: z.ZodOptional<z.ZodString>;
|
|
250
282
|
status: z.ZodOptional<z.ZodNumber>;
|
|
251
283
|
requestId: z.ZodOptional<z.ZodString>;
|
|
284
|
+
eventType: z.ZodOptional<z.ZodString>;
|
|
285
|
+
issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
286
|
+
code: z.ZodString;
|
|
287
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
288
|
+
expected: z.ZodOptional<z.ZodString>;
|
|
289
|
+
}, z.core.$strip>>>;
|
|
252
290
|
}, z.core.$strip>>;
|
|
253
291
|
}, z.core.$strip>>;
|
|
254
292
|
message: z.ZodString;
|
|
@@ -256,6 +294,12 @@ export declare const sparkDataPartSchemas: {
|
|
|
256
294
|
code: z.ZodOptional<z.ZodString>;
|
|
257
295
|
status: z.ZodOptional<z.ZodNumber>;
|
|
258
296
|
requestId: z.ZodOptional<z.ZodString>;
|
|
297
|
+
eventType: z.ZodOptional<z.ZodString>;
|
|
298
|
+
issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
299
|
+
code: z.ZodString;
|
|
300
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
301
|
+
expected: z.ZodOptional<z.ZodString>;
|
|
302
|
+
}, z.core.$strip>>>;
|
|
259
303
|
}, z.core.$strip>>;
|
|
260
304
|
label: z.ZodOptional<z.ZodString>;
|
|
261
305
|
}, z.core.$strip>;
|
package/package.json
CHANGED
|
@@ -1,139 +1,139 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@womp/spark-agent",
|
|
3
|
-
"version": "5.
|
|
4
|
-
"description": "Portable skills-based AI agent with local and durable chat transports for Womp",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "./dist/index.js",
|
|
7
|
-
"types": "./dist/index.d.ts",
|
|
8
|
-
"bin": {
|
|
9
|
-
"spark-agent": "dist/cli.js",
|
|
10
|
-
"simple-bench": "dist/simple-bench-cli.js",
|
|
11
|
-
"agent-run": "dist/agent-run-cli.js"
|
|
12
|
-
},
|
|
13
|
-
"exports": {
|
|
14
|
-
"./browser": {
|
|
15
|
-
"types": "./dist/browser.d.ts",
|
|
16
|
-
"import": "./dist/browser.js",
|
|
17
|
-
"default": "./dist/browser.js"
|
|
18
|
-
},
|
|
19
|
-
"./capabilities": {
|
|
20
|
-
"types": "./dist/capabilities.d.ts",
|
|
21
|
-
"import": "./dist/capabilities.js",
|
|
22
|
-
"default": "./dist/capabilities.js"
|
|
23
|
-
},
|
|
24
|
-
"./kakapo": {
|
|
25
|
-
"types": "./dist/kakapo.d.ts",
|
|
26
|
-
"import": "./dist/kakapo.js",
|
|
27
|
-
"default": "./dist/kakapo.js"
|
|
28
|
-
},
|
|
29
|
-
"./geometry": {
|
|
30
|
-
"types": "./dist/geometry.d.ts",
|
|
31
|
-
"import": "./dist/geometry.js",
|
|
32
|
-
"default": "./dist/geometry.js"
|
|
33
|
-
},
|
|
34
|
-
"./openscad": {
|
|
35
|
-
"types": "./dist/openscad.d.ts",
|
|
36
|
-
"import": "./dist/openscad.js",
|
|
37
|
-
"default": "./dist/openscad.js"
|
|
38
|
-
},
|
|
39
|
-
"./quickjs": {
|
|
40
|
-
"types": "./dist/quickjs-executor.d.ts",
|
|
41
|
-
"import": "./dist/quickjs-executor.js",
|
|
42
|
-
"default": "./dist/quickjs-executor.js"
|
|
43
|
-
},
|
|
44
|
-
".": {
|
|
45
|
-
"types": "./dist/index.d.ts",
|
|
46
|
-
"import": "./dist/index.js",
|
|
47
|
-
"default": "./dist/index.js"
|
|
48
|
-
},
|
|
49
|
-
"./ui": {
|
|
50
|
-
"types": "./dist/ui.d.ts",
|
|
51
|
-
"import": "./dist/ui.js",
|
|
52
|
-
"default": "./dist/ui.js"
|
|
53
|
-
},
|
|
54
|
-
"./client": {
|
|
55
|
-
"types": "./dist/client.d.ts",
|
|
56
|
-
"import": "./dist/client.js",
|
|
57
|
-
"default": "./dist/client.js"
|
|
58
|
-
},
|
|
59
|
-
"./server": {
|
|
60
|
-
"types": "./dist/server/index.d.ts",
|
|
61
|
-
"import": "./dist/server/index.js",
|
|
62
|
-
"default": "./dist/server/index.js"
|
|
63
|
-
},
|
|
64
|
-
"./express": {
|
|
65
|
-
"types": "./dist/server/express.d.ts",
|
|
66
|
-
"import": "./dist/server/express.js",
|
|
67
|
-
"default": "./dist/server/express.js"
|
|
68
|
-
},
|
|
69
|
-
"./package.json": "./package.json"
|
|
70
|
-
},
|
|
71
|
-
"files": [
|
|
72
|
-
"dist/**/*.js",
|
|
73
|
-
"dist/**/*.d.ts",
|
|
74
|
-
"dist/server/fixtures/**/*.json",
|
|
75
|
-
"dist/geometry/schemas/**/*.json",
|
|
76
|
-
"README.md"
|
|
77
|
-
],
|
|
78
|
-
"sideEffects": false,
|
|
79
|
-
"engines": {
|
|
80
|
-
"node": ">=22.13"
|
|
81
|
-
},
|
|
82
|
-
"repository": {
|
|
83
|
-
"type": "git",
|
|
84
|
-
"url": "git+https://github.com/wompxyz/spark-agent.git"
|
|
85
|
-
},
|
|
86
|
-
"publishConfig": {
|
|
87
|
-
"access": "public"
|
|
88
|
-
},
|
|
89
|
-
"license": "MIT",
|
|
90
|
-
"scripts": {
|
|
91
|
-
"clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"",
|
|
92
|
-
"build": "yarn clean && node scripts/generate-skill-declarations.mjs && tsc -p tsconfig.json && node scripts/copy-fixtures.mjs",
|
|
93
|
-
"typecheck": "tsc --noEmit -p tsconfig.json && tsc --noEmit -p web/tsconfig.json",
|
|
94
|
-
"lint": "yarn typecheck",
|
|
95
|
-
"dev": "yarn build && concurrently --kill-others \"yarn dev:server\" \"yarn dev:web\"",
|
|
96
|
-
"dev:server": "tsx src/cli.ts",
|
|
97
|
-
"simple-bench": "tsx src/simple-bench-cli.ts",
|
|
98
|
-
"agent-run": "tsx src/agent-run-cli.ts",
|
|
99
|
-
"dev:demo-account": "yarn build && concurrently --kill-others \"yarn dev:server --profile demo-account\" \"yarn dev:web\"",
|
|
100
|
-
"dev:web": "vite --config web/vite.config.ts",
|
|
101
|
-
"start": "node dist/cli.js",
|
|
102
|
-
"web:build": "yarn build && tsc --noEmit -p web/tsconfig.json && vite build --config web/vite.config.ts",
|
|
103
|
-
"test": "yarn build && tsx --tsconfig tsconfig.json --test test/**/*.test.ts && node --input-type=module -e \"await Promise.all([import('@womp/spark-agent'), import('@womp/spark-agent/ui'), import('@womp/spark-agent/client'), import('@womp/spark-agent/server'), import('@womp/spark-agent/express'), import('@womp/spark-agent/kakapo'), import('@womp/spark-agent/geometry'), import('@womp/spark-agent/openscad')])\"",
|
|
104
|
-
"test:live": "tsx --tsconfig tsconfig.json test/womp-scene-api.live.ts",
|
|
105
|
-
"prepack": "yarn build"
|
|
106
|
-
},
|
|
107
|
-
"dependencies": {
|
|
108
|
-
"@ai-sdk/anthropic": "4.0.50",
|
|
109
|
-
"@ai-sdk/google": "4.0.69",
|
|
110
|
-
"@ai-sdk/openai": "4.0.63",
|
|
111
|
-
"@jitl/quickjs-wasmfile-release-sync": "0.32.0",
|
|
112
|
-
"@womp/flowir": "0.3.0",
|
|
113
|
-
"@womp/kakapo-sdk": "0.7.2",
|
|
114
|
-
"ai": "7.0.95",
|
|
115
|
-
"eventsource-parser": "^3.0.6",
|
|
116
|
-
"express": "^5.2.1",
|
|
117
|
-
"lodash": "4.18.1",
|
|
118
|
-
"quickjs-emscripten-core": "0.32.0",
|
|
119
|
-
"zod": "4.5.4"
|
|
120
|
-
},
|
|
121
|
-
"devDependencies": {
|
|
122
|
-
"@ai-sdk/react": "^4.0.77",
|
|
123
|
-
"@types/express": "^5.0.5",
|
|
124
|
-
"@types/lodash": "4.17.24",
|
|
125
|
-
"@types/node": "^24.0.0",
|
|
126
|
-
"@types/react": "^19.2.17",
|
|
127
|
-
"@types/react-dom": "^19.2.3",
|
|
128
|
-
"@vitejs/plugin-react": "^6.0.4",
|
|
129
|
-
"concurrently": "^9.2.1",
|
|
130
|
-
"lucide-react": "^1.26.0",
|
|
131
|
-
"react": "^19.2.8",
|
|
132
|
-
"react-dom": "^19.2.8",
|
|
133
|
-
"react-markdown": "^10.1.0",
|
|
134
|
-
"remark-gfm": "^4.0.1",
|
|
135
|
-
"tsx": "^4.23.1",
|
|
136
|
-
"typescript": "^5.9.3",
|
|
137
|
-
"vite": "^8.1.5"
|
|
138
|
-
}
|
|
139
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@womp/spark-agent",
|
|
3
|
+
"version": "5.3.0",
|
|
4
|
+
"description": "Portable skills-based AI agent with local and durable chat transports for Womp",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"bin": {
|
|
9
|
+
"spark-agent": "dist/cli.js",
|
|
10
|
+
"simple-bench": "dist/simple-bench-cli.js",
|
|
11
|
+
"agent-run": "dist/agent-run-cli.js"
|
|
12
|
+
},
|
|
13
|
+
"exports": {
|
|
14
|
+
"./browser": {
|
|
15
|
+
"types": "./dist/browser.d.ts",
|
|
16
|
+
"import": "./dist/browser.js",
|
|
17
|
+
"default": "./dist/browser.js"
|
|
18
|
+
},
|
|
19
|
+
"./capabilities": {
|
|
20
|
+
"types": "./dist/capabilities.d.ts",
|
|
21
|
+
"import": "./dist/capabilities.js",
|
|
22
|
+
"default": "./dist/capabilities.js"
|
|
23
|
+
},
|
|
24
|
+
"./kakapo": {
|
|
25
|
+
"types": "./dist/kakapo.d.ts",
|
|
26
|
+
"import": "./dist/kakapo.js",
|
|
27
|
+
"default": "./dist/kakapo.js"
|
|
28
|
+
},
|
|
29
|
+
"./geometry": {
|
|
30
|
+
"types": "./dist/geometry.d.ts",
|
|
31
|
+
"import": "./dist/geometry.js",
|
|
32
|
+
"default": "./dist/geometry.js"
|
|
33
|
+
},
|
|
34
|
+
"./openscad": {
|
|
35
|
+
"types": "./dist/openscad.d.ts",
|
|
36
|
+
"import": "./dist/openscad.js",
|
|
37
|
+
"default": "./dist/openscad.js"
|
|
38
|
+
},
|
|
39
|
+
"./quickjs": {
|
|
40
|
+
"types": "./dist/quickjs-executor.d.ts",
|
|
41
|
+
"import": "./dist/quickjs-executor.js",
|
|
42
|
+
"default": "./dist/quickjs-executor.js"
|
|
43
|
+
},
|
|
44
|
+
".": {
|
|
45
|
+
"types": "./dist/index.d.ts",
|
|
46
|
+
"import": "./dist/index.js",
|
|
47
|
+
"default": "./dist/index.js"
|
|
48
|
+
},
|
|
49
|
+
"./ui": {
|
|
50
|
+
"types": "./dist/ui.d.ts",
|
|
51
|
+
"import": "./dist/ui.js",
|
|
52
|
+
"default": "./dist/ui.js"
|
|
53
|
+
},
|
|
54
|
+
"./client": {
|
|
55
|
+
"types": "./dist/client.d.ts",
|
|
56
|
+
"import": "./dist/client.js",
|
|
57
|
+
"default": "./dist/client.js"
|
|
58
|
+
},
|
|
59
|
+
"./server": {
|
|
60
|
+
"types": "./dist/server/index.d.ts",
|
|
61
|
+
"import": "./dist/server/index.js",
|
|
62
|
+
"default": "./dist/server/index.js"
|
|
63
|
+
},
|
|
64
|
+
"./express": {
|
|
65
|
+
"types": "./dist/server/express.d.ts",
|
|
66
|
+
"import": "./dist/server/express.js",
|
|
67
|
+
"default": "./dist/server/express.js"
|
|
68
|
+
},
|
|
69
|
+
"./package.json": "./package.json"
|
|
70
|
+
},
|
|
71
|
+
"files": [
|
|
72
|
+
"dist/**/*.js",
|
|
73
|
+
"dist/**/*.d.ts",
|
|
74
|
+
"dist/server/fixtures/**/*.json",
|
|
75
|
+
"dist/geometry/schemas/**/*.json",
|
|
76
|
+
"README.md"
|
|
77
|
+
],
|
|
78
|
+
"sideEffects": false,
|
|
79
|
+
"engines": {
|
|
80
|
+
"node": ">=22.13"
|
|
81
|
+
},
|
|
82
|
+
"repository": {
|
|
83
|
+
"type": "git",
|
|
84
|
+
"url": "git+https://github.com/wompxyz/spark-agent.git"
|
|
85
|
+
},
|
|
86
|
+
"publishConfig": {
|
|
87
|
+
"access": "public"
|
|
88
|
+
},
|
|
89
|
+
"license": "MIT",
|
|
90
|
+
"scripts": {
|
|
91
|
+
"clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"",
|
|
92
|
+
"build": "yarn clean && node scripts/generate-skill-declarations.mjs && tsc -p tsconfig.json && node scripts/copy-fixtures.mjs",
|
|
93
|
+
"typecheck": "tsc --noEmit -p tsconfig.json && tsc --noEmit -p web/tsconfig.json",
|
|
94
|
+
"lint": "yarn typecheck",
|
|
95
|
+
"dev": "yarn build && concurrently --kill-others \"yarn dev:server\" \"yarn dev:web\"",
|
|
96
|
+
"dev:server": "tsx src/cli.ts",
|
|
97
|
+
"simple-bench": "tsx src/simple-bench-cli.ts",
|
|
98
|
+
"agent-run": "tsx src/agent-run-cli.ts",
|
|
99
|
+
"dev:demo-account": "yarn build && concurrently --kill-others \"yarn dev:server --profile demo-account\" \"yarn dev:web\"",
|
|
100
|
+
"dev:web": "vite --config web/vite.config.ts",
|
|
101
|
+
"start": "node dist/cli.js",
|
|
102
|
+
"web:build": "yarn build && tsc --noEmit -p web/tsconfig.json && vite build --config web/vite.config.ts",
|
|
103
|
+
"test": "yarn build && tsx --tsconfig tsconfig.json --test test/**/*.test.ts && node --input-type=module -e \"await Promise.all([import('@womp/spark-agent'), import('@womp/spark-agent/ui'), import('@womp/spark-agent/client'), import('@womp/spark-agent/server'), import('@womp/spark-agent/express'), import('@womp/spark-agent/kakapo'), import('@womp/spark-agent/geometry'), import('@womp/spark-agent/openscad')])\"",
|
|
104
|
+
"test:live": "tsx --tsconfig tsconfig.json test/womp-scene-api.live.ts",
|
|
105
|
+
"prepack": "yarn build"
|
|
106
|
+
},
|
|
107
|
+
"dependencies": {
|
|
108
|
+
"@ai-sdk/anthropic": "4.0.50",
|
|
109
|
+
"@ai-sdk/google": "4.0.69",
|
|
110
|
+
"@ai-sdk/openai": "4.0.63",
|
|
111
|
+
"@jitl/quickjs-wasmfile-release-sync": "0.32.0",
|
|
112
|
+
"@womp/flowir": "0.3.0",
|
|
113
|
+
"@womp/kakapo-sdk": "0.7.2",
|
|
114
|
+
"ai": "7.0.95",
|
|
115
|
+
"eventsource-parser": "^3.0.6",
|
|
116
|
+
"express": "^5.2.1",
|
|
117
|
+
"lodash": "4.18.1",
|
|
118
|
+
"quickjs-emscripten-core": "0.32.0",
|
|
119
|
+
"zod": "4.5.4"
|
|
120
|
+
},
|
|
121
|
+
"devDependencies": {
|
|
122
|
+
"@ai-sdk/react": "^4.0.77",
|
|
123
|
+
"@types/express": "^5.0.5",
|
|
124
|
+
"@types/lodash": "4.17.24",
|
|
125
|
+
"@types/node": "^24.0.0",
|
|
126
|
+
"@types/react": "^19.2.17",
|
|
127
|
+
"@types/react-dom": "^19.2.3",
|
|
128
|
+
"@vitejs/plugin-react": "^6.0.4",
|
|
129
|
+
"concurrently": "^9.2.1",
|
|
130
|
+
"lucide-react": "^1.26.0",
|
|
131
|
+
"react": "^19.2.8",
|
|
132
|
+
"react-dom": "^19.2.8",
|
|
133
|
+
"react-markdown": "^10.1.0",
|
|
134
|
+
"remark-gfm": "^4.0.1",
|
|
135
|
+
"tsx": "^4.23.1",
|
|
136
|
+
"typescript": "^5.9.3",
|
|
137
|
+
"vite": "^8.1.5"
|
|
138
|
+
}
|
|
139
|
+
}
|