trellis 1.0.0 → 1.0.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/.//out//windows-style.json +602 -0
- package/README.md +115 -2
- package/bun.lock +350 -0
- package/dist/cli/iroh.linux-x64-gnu-2y4tmrmh.node +0 -0
- package/dist/cli/iroh.linux-x64-musl-50ncx5bz.node +0 -0
- package/dist/cli/server.js +30438 -0
- package/dist/cli/tql.js +48018 -0
- package/dist/client/tql-client.js +108 -0
- package/dist/index.js +15207 -0
- package/index.ts +29 -0
- package/package.json +80 -10
- package/run-server.sh +5 -0
- package/.npmignore +0 -10
package/index.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Q - EAV Datalog Engine
|
|
3
|
+
*
|
|
4
|
+
* Quick start example
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { EAVStore, jsonEntityFacts } from './src/index.js';
|
|
8
|
+
|
|
9
|
+
// Example usage
|
|
10
|
+
const store = new EAVStore();
|
|
11
|
+
|
|
12
|
+
// Sample data
|
|
13
|
+
const sampleData = {
|
|
14
|
+
id: 1,
|
|
15
|
+
title: 'Hello World',
|
|
16
|
+
tags: ['demo', 'example'],
|
|
17
|
+
metadata: {
|
|
18
|
+
created: '2024-01-01',
|
|
19
|
+
views: 100,
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
// Convert to EAV facts
|
|
24
|
+
const facts = jsonEntityFacts('demo:1', sampleData, 'demo');
|
|
25
|
+
store.addFacts(facts);
|
|
26
|
+
|
|
27
|
+
console.log('✅ EAV Datalog Engine initialized!');
|
|
28
|
+
console.log(`📊 Store contains ${store.getAllFacts().length} facts`);
|
|
29
|
+
console.log("🚀 Run 'bun run demo:eav' to see the full demo");
|
package/package.json
CHANGED
|
@@ -1,17 +1,87 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "trellis",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "
|
|
5
|
-
"main": "index.js",
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"description": "Graph database and query engine for Node.js — EAV-based Datalog with natural language support",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"module": "./dist/index.js",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"private": false,
|
|
9
|
+
"author": "Trent Brew <tbrew@turtle.tech>",
|
|
10
|
+
"bin": {
|
|
11
|
+
"trellis": "./dist/cli/tql.js",
|
|
12
|
+
"trellis-serve": "./dist/cli/server.js"
|
|
13
|
+
},
|
|
14
|
+
"exports": {
|
|
15
|
+
".": "./dist/index.js",
|
|
16
|
+
"./store": "./dist/store/eav-store.js",
|
|
17
|
+
"./query": "./dist/query/index.js",
|
|
18
|
+
"./kernel": "./dist/kernel/trellis-kernel.js",
|
|
19
|
+
"./kernel/backend": "./dist/persist/backend.js",
|
|
20
|
+
"./kernel/sqlite": "./dist/persist/sqlite-backend.js",
|
|
21
|
+
"./kernel/middleware": "./dist/kernel/middleware.js",
|
|
22
|
+
"./kernel/security": "./dist/kernel/security-middleware.js",
|
|
23
|
+
"./kernel/schema": "./dist/kernel/schema-middleware.js",
|
|
24
|
+
"./kernel/logic": "./dist/kernel/logic-middleware.js",
|
|
25
|
+
"./kernel/operations": "./dist/kernel/operations.js",
|
|
26
|
+
"./kernel/workspace": "./dist/kernel/workspace.js",
|
|
27
|
+
"./ai": "./dist/ai/index.js",
|
|
28
|
+
"./graph": "./dist/graph/index.js",
|
|
29
|
+
"./workflows": "./dist/workflows/index.js",
|
|
30
|
+
"./client": "./dist/client/tql-client.js",
|
|
31
|
+
"./server": "./dist/server/index.js",
|
|
32
|
+
"./cli": "./dist/cli/tql.js"
|
|
33
|
+
},
|
|
6
34
|
"scripts": {
|
|
7
|
-
"
|
|
35
|
+
"dev": "bun run index.ts",
|
|
36
|
+
"serve": "bun run src/cli/server.ts",
|
|
37
|
+
"demo:eav": "bun run examples/eav-demo.ts",
|
|
38
|
+
"demo:graph": "bun run examples/graph-demo.ts",
|
|
39
|
+
"demo:agent-graph": "bun run examples/agent-graph-demo.ts",
|
|
40
|
+
"demo:tql-graph": "bun run examples/tql-graph-demo.ts",
|
|
41
|
+
"demo:products": "bun run examples/products-final-demo.ts",
|
|
42
|
+
"demo:tot": "bun run examples/tot-demo.ts",
|
|
43
|
+
"demo:real-data": "bun run examples/real-data-demo.ts",
|
|
44
|
+
"demo:enhanced-real-data": "bun run examples/enhanced-real-data-demo.ts",
|
|
45
|
+
"demos": "bun run examples/run-all-demos.ts",
|
|
46
|
+
"tql": "bun run src/cli/tql.ts",
|
|
47
|
+
"demo:tql": "bun run examples/tql-demo.ts",
|
|
48
|
+
"build": "bun build src/index.ts --outdir dist --target node",
|
|
49
|
+
"build:all": "bun build src/index.ts --outdir dist --target node && bun build src/cli/tql.ts --outdir dist/cli --target node && bun build src/cli/server.ts --outdir dist/cli --target node && bun build src/client/tql-client.ts --outdir dist/client --target node",
|
|
50
|
+
"typecheck": "tsc --noEmit",
|
|
51
|
+
"clean": "rm -rf dist",
|
|
52
|
+
"test": "vitest run",
|
|
53
|
+
"test:watch": "vitest",
|
|
54
|
+
"test:workflow": "vitest run test/workflow-hardening.test.ts"
|
|
8
55
|
},
|
|
9
56
|
"keywords": [
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
57
|
+
"trellis",
|
|
58
|
+
"graph",
|
|
59
|
+
"database",
|
|
60
|
+
"datalog",
|
|
61
|
+
"eav",
|
|
62
|
+
"query-engine",
|
|
63
|
+
"natural-language",
|
|
64
|
+
"embeddings",
|
|
65
|
+
"agent"
|
|
14
66
|
],
|
|
15
|
-
"
|
|
16
|
-
"
|
|
67
|
+
"license": "MIT",
|
|
68
|
+
"devDependencies": {
|
|
69
|
+
"@types/bun": "latest",
|
|
70
|
+
"@types/yaml": "^1.9.7",
|
|
71
|
+
"vitest": "^1.0.0"
|
|
72
|
+
},
|
|
73
|
+
"peerDependencies": {
|
|
74
|
+
"typescript": "^5"
|
|
75
|
+
},
|
|
76
|
+
"dependencies": {
|
|
77
|
+
"bun": "^1.0.0",
|
|
78
|
+
"@ai-sdk/openai": "^2.0.30",
|
|
79
|
+
"@number0/iroh": "^0.35.0",
|
|
80
|
+
"ai": "^5.0.44",
|
|
81
|
+
"ajv": "^8.17.1",
|
|
82
|
+
"chalk": "^5.6.2",
|
|
83
|
+
"commander": "^14.0.1",
|
|
84
|
+
"yaml": "^2.8.1",
|
|
85
|
+
"zod": "^4.1.8"
|
|
86
|
+
}
|
|
17
87
|
}
|
package/run-server.sh
ADDED