@sparkleideas/agentdb 3.0.0-alpha.3-patch.1
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 +21 -0
- package/README.md +2854 -0
- package/package.json +164 -0
- package/scripts/README.md +314 -0
- package/scripts/postinstall.cjs +30 -0
package/package.json
ADDED
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@sparkleideas/agentdb",
|
|
3
|
+
"version": "3.0.0-alpha.3-patch.1",
|
|
4
|
+
"description": "AgentDB v3 - Intelligent agentic vector database with RVF native format, RuVector-powered graph DB, Cypher queries, ACID persistence. 150x faster than SQLite with self-learning GNN, 6 cognitive memory patterns, semantic routing, COW branching, and comprehensive MCP integration. Runs anywhere: Node.js, browsers, edge, offline.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/src/index.js",
|
|
7
|
+
"types": "dist/src/index.d.ts",
|
|
8
|
+
"bin": {
|
|
9
|
+
"@sparkleideas/agentdb": "dist/src/cli/agentdb-cli.js"
|
|
10
|
+
},
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"types": "./dist/src/index.d.ts",
|
|
14
|
+
"import": "./dist/src/index.js",
|
|
15
|
+
"default": "./dist/src/index.js"
|
|
16
|
+
},
|
|
17
|
+
"./wasm": "./dist/src/wasm-loader.js",
|
|
18
|
+
"./package.json": "./package.json",
|
|
19
|
+
"./cli": "./dist/src/cli/agentdb-cli.js",
|
|
20
|
+
"./cli/commands/migrate": "./dist/src/cli/commands/migrate.js",
|
|
21
|
+
"./db-fallback": "./dist/src/db-fallback.js",
|
|
22
|
+
"./backends": "./dist/src/backends/index.js",
|
|
23
|
+
"./backends/self-learning": "./dist/src/backends/rvf/SelfLearningRvfBackend.js",
|
|
24
|
+
"./backends/native-accelerator": "./dist/src/backends/rvf/NativeAccelerator.js",
|
|
25
|
+
"./security": "./dist/src/security/input-validation.js",
|
|
26
|
+
"./wrappers": "./dist/src/wrappers/index.js",
|
|
27
|
+
"./wrappers/gnn": "./dist/src/wrappers/gnn-wrapper.js",
|
|
28
|
+
"./wrappers/agentdb-fast": "./dist/src/wrappers/agentdb-fast.js",
|
|
29
|
+
"./wrappers/attention": "./dist/src/wrappers/attention-fallbacks.js",
|
|
30
|
+
"./wrappers/embedding": "./dist/src/wrappers/embedding-service.js",
|
|
31
|
+
"./controllers": "./dist/src/controllers/index.js",
|
|
32
|
+
"./controllers/CausalMemoryGraph": "./dist/src/controllers/CausalMemoryGraph.js",
|
|
33
|
+
"./controllers/CausalRecall": "./dist/src/controllers/CausalRecall.js",
|
|
34
|
+
"./controllers/ExplainableRecall": "./dist/src/controllers/ExplainableRecall.js",
|
|
35
|
+
"./controllers/NightlyLearner": "./dist/src/controllers/NightlyLearner.js",
|
|
36
|
+
"./controllers/ReflexionMemory": "./dist/src/controllers/ReflexionMemory.js",
|
|
37
|
+
"./controllers/SkillLibrary": "./dist/src/controllers/SkillLibrary.js",
|
|
38
|
+
"./controllers/EmbeddingService": "./dist/src/controllers/EmbeddingService.js",
|
|
39
|
+
"./controllers/WASMVectorSearch": "./dist/src/controllers/WASMVectorSearch.js",
|
|
40
|
+
"./controllers/EnhancedEmbeddingService": "./dist/src/controllers/EnhancedEmbeddingService.js",
|
|
41
|
+
"./controllers/MMRDiversityRanker": "./dist/src/controllers/MMRDiversityRanker.js",
|
|
42
|
+
"./controllers/ContextSynthesizer": "./dist/src/controllers/ContextSynthesizer.js",
|
|
43
|
+
"./controllers/MetadataFilter": "./dist/src/controllers/MetadataFilter.js",
|
|
44
|
+
"./controllers/QUICServer": "./dist/src/controllers/QUICServer.js",
|
|
45
|
+
"./controllers/QUICClient": "./dist/src/controllers/QUICClient.js",
|
|
46
|
+
"./controllers/SyncCoordinator": "./dist/src/controllers/SyncCoordinator.js",
|
|
47
|
+
"./controllers/HNSWIndex": "./dist/src/controllers/HNSWIndex.js",
|
|
48
|
+
"./controllers/AttentionService": "./dist/src/controllers/AttentionService.js",
|
|
49
|
+
"./services/federated-learning": "./dist/src/services/federated-learning.js",
|
|
50
|
+
"./model": "./dist/src/model/ModelCacheLoader.js"
|
|
51
|
+
},
|
|
52
|
+
"scripts": {
|
|
53
|
+
"build": "npm run build:ts && npm run copy:schemas && npm run build:browser",
|
|
54
|
+
"build:ts": "tsc",
|
|
55
|
+
"copy:schemas": "mkdir -p dist/schemas && cp src/schemas/*.sql dist/schemas/",
|
|
56
|
+
"build:browser": "node scripts/build-browser.js && node scripts/build-browser-v2.js",
|
|
57
|
+
"build:napi": "bash scripts/optimize-napi.sh",
|
|
58
|
+
"build:wasm": "bash scripts/optimize-wasm.sh",
|
|
59
|
+
"build:optimized": "npm run build:napi && npm run build:wasm && npm run build",
|
|
60
|
+
"postinstall": "node scripts/postinstall.cjs || true",
|
|
61
|
+
"dev": "tsx src/cli/agentdb-cli.ts",
|
|
62
|
+
"test": "vitest",
|
|
63
|
+
"test:unit": "vitest --run",
|
|
64
|
+
"test:browser": "vitest browser-bundle-unit.test.js --run",
|
|
65
|
+
"test:ci": "npm run test:browser && npm run build && npm run verify:bundle",
|
|
66
|
+
"verify:bundle": "node scripts/verify-bundle.js",
|
|
67
|
+
"cli": "node dist/src/cli/agentdb-cli.js",
|
|
68
|
+
"docker:test": "docker build -f docs/SQLITE-FIX-DOCKER-TEST.Dockerfile -t agentdb-test . && docker run --rm agentdb-test",
|
|
69
|
+
"benchmark": "tsx benchmarks/simple-benchmark.ts",
|
|
70
|
+
"benchmark:full": "tsx benchmarks/benchmark-runner.ts",
|
|
71
|
+
"benchmark:build": "cd benchmarks && tsc",
|
|
72
|
+
"benchmark:attention": "tsx benchmarks/attention-performance.ts",
|
|
73
|
+
"benchmark:backends": "tsx benchmarks/compare-backends.ts",
|
|
74
|
+
"benchmark:profile": "tsx scripts/profile-hot-paths.ts",
|
|
75
|
+
"benchmark:ruvector": "tsx benchmarks/ruvector-benchmark.ts",
|
|
76
|
+
"benchmark:all": "npm run benchmark:attention && npm run benchmark:backends && npm run benchmark:profile && npm run benchmark:ruvector",
|
|
77
|
+
"build:model": "node scripts/build-model-rvf.mjs"
|
|
78
|
+
},
|
|
79
|
+
"keywords": [
|
|
80
|
+
"agentdb",
|
|
81
|
+
"vector-database",
|
|
82
|
+
"ai-agents",
|
|
83
|
+
"memory",
|
|
84
|
+
"causal-reasoning",
|
|
85
|
+
"reflexion",
|
|
86
|
+
"episodic-memory",
|
|
87
|
+
"skill-library",
|
|
88
|
+
"lifelong-learning",
|
|
89
|
+
"explainable-ai",
|
|
90
|
+
"provenance",
|
|
91
|
+
"hnsw",
|
|
92
|
+
"embeddings",
|
|
93
|
+
"sqlite",
|
|
94
|
+
"sql.js",
|
|
95
|
+
"wasm"
|
|
96
|
+
],
|
|
97
|
+
"author": "ruv",
|
|
98
|
+
"license": "MIT",
|
|
99
|
+
"repository": {
|
|
100
|
+
"type": "git",
|
|
101
|
+
"url": "https://github.com/ruvnet/agentic-flow.git",
|
|
102
|
+
"directory": "packages/agentdb"
|
|
103
|
+
},
|
|
104
|
+
"bugs": {
|
|
105
|
+
"url": "https://github.com/ruvnet/agentic-flow/issues"
|
|
106
|
+
},
|
|
107
|
+
"homepage": "https://agentdb.ruv.io",
|
|
108
|
+
"dependencies": {
|
|
109
|
+
"@modelcontextprotocol/sdk": "^1.20.1",
|
|
110
|
+
"@opentelemetry/api": "^1.9.0",
|
|
111
|
+
"ajv": "^8.18.0",
|
|
112
|
+
"jsonwebtoken": "^9.0.2",
|
|
113
|
+
"sql.js": "^1.13.0"
|
|
114
|
+
},
|
|
115
|
+
"devDependencies": {
|
|
116
|
+
"@types/jsonwebtoken": "^9.0.10",
|
|
117
|
+
"@types/node": "^22.10.2",
|
|
118
|
+
"dotenv": "^16.4.7",
|
|
119
|
+
"esbuild": "^0.25.11",
|
|
120
|
+
"tsx": "^4.19.2",
|
|
121
|
+
"typescript": "^5.7.2",
|
|
122
|
+
"vitest": "^4.0.15"
|
|
123
|
+
},
|
|
124
|
+
"engines": {
|
|
125
|
+
"node": ">=18.0.0"
|
|
126
|
+
},
|
|
127
|
+
"files": [
|
|
128
|
+
"dist/src/",
|
|
129
|
+
"dist/schemas/",
|
|
130
|
+
"dist/models/",
|
|
131
|
+
"scripts/postinstall.cjs",
|
|
132
|
+
"README.md",
|
|
133
|
+
"LICENSE"
|
|
134
|
+
],
|
|
135
|
+
"optionalDependencies": {
|
|
136
|
+
"@opentelemetry/resources": "^1.25.0",
|
|
137
|
+
"@opentelemetry/sdk-node": "^0.52.0",
|
|
138
|
+
"@opentelemetry/semantic-conventions": "^1.25.0",
|
|
139
|
+
"@ruvector/attention": "^0.1.2",
|
|
140
|
+
"@ruvector/gnn": "^0.1.23",
|
|
141
|
+
"@ruvector/graph-node": "^2.0.2",
|
|
142
|
+
"@ruvector/router": "^0.1.15",
|
|
143
|
+
"@ruvector/ruvllm": "^2.5.1",
|
|
144
|
+
"@ruvector/rvf": "^0.1.9",
|
|
145
|
+
"@ruvector/rvf-node": "^0.1.7",
|
|
146
|
+
"@ruvector/rvf-solver": "^0.1.7",
|
|
147
|
+
"@ruvector/rvf-wasm": "^0.1.6",
|
|
148
|
+
"@ruvector/sona": "^0.1.4",
|
|
149
|
+
"@xenova/transformers": "^2.17.2",
|
|
150
|
+
"argon2": "^0.44.0",
|
|
151
|
+
"better-sqlite3": "^11.8.1",
|
|
152
|
+
"chalk": "^5.3.0",
|
|
153
|
+
"commander": "^12.1.0",
|
|
154
|
+
"hnswlib-node": "^3.0.0",
|
|
155
|
+
"inquirer": "^9.3.8",
|
|
156
|
+
"ruvector": "^0.1.30",
|
|
157
|
+
"ruvector-attention-wasm": "^0.1.0"
|
|
158
|
+
},
|
|
159
|
+
"overrides": {
|
|
160
|
+
"@xenova/transformers": {
|
|
161
|
+
"sharp": "^0.33.0"
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
# AgentDB Scripts Directory
|
|
2
|
+
|
|
3
|
+
This directory contains build, validation, and deployment scripts for AgentDB v2.
|
|
4
|
+
|
|
5
|
+
## Build Scripts
|
|
6
|
+
|
|
7
|
+
### Browser Builds
|
|
8
|
+
|
|
9
|
+
#### `build-browser.js`
|
|
10
|
+
**Purpose:** Original browser bundle builder
|
|
11
|
+
**Usage:** `node scripts/build-browser.js`
|
|
12
|
+
**Output:** `dist/agentdb.browser.js`
|
|
13
|
+
**Features:**
|
|
14
|
+
- Basic SQL.js WASM integration
|
|
15
|
+
- Single-file browser bundle
|
|
16
|
+
- CDN-ready output
|
|
17
|
+
|
|
18
|
+
#### `build-browser-v2.js`
|
|
19
|
+
**Purpose:** Enhanced v2 browser bundle with advanced features
|
|
20
|
+
**Usage:** `node scripts/build-browser-v2.js`
|
|
21
|
+
**Output:** `dist/agentdb.browser.v2.js`
|
|
22
|
+
**Features:**
|
|
23
|
+
- Multi-backend support (SQL.js/IndexedDB auto-detection)
|
|
24
|
+
- GNN optimization integration
|
|
25
|
+
- IndexedDB persistence
|
|
26
|
+
- Cross-tab synchronization
|
|
27
|
+
- 100% v1 API backward compatibility
|
|
28
|
+
- Enhanced error handling
|
|
29
|
+
|
|
30
|
+
**Recommended:** Use this for new projects requiring browser support.
|
|
31
|
+
|
|
32
|
+
#### `build-browser-advanced.cjs`
|
|
33
|
+
**Purpose:** Advanced browser features build
|
|
34
|
+
**Usage:** `node scripts/build-browser-advanced.cjs`
|
|
35
|
+
**Features:**
|
|
36
|
+
- Advanced WASM optimization
|
|
37
|
+
- Progressive loading
|
|
38
|
+
- Service worker integration
|
|
39
|
+
- Memory management enhancements
|
|
40
|
+
|
|
41
|
+
### Dependencies
|
|
42
|
+
|
|
43
|
+
#### `postinstall.cjs`
|
|
44
|
+
**Purpose:** Post-installation setup and verification
|
|
45
|
+
**Auto-runs:** After `npm install`
|
|
46
|
+
**Tasks:**
|
|
47
|
+
- Validates environment
|
|
48
|
+
- Checks native dependencies (better-sqlite3)
|
|
49
|
+
- Sets up development environment
|
|
50
|
+
- Verifies WASM files
|
|
51
|
+
|
|
52
|
+
## Validation Scripts
|
|
53
|
+
|
|
54
|
+
### `comprehensive-review.ts`
|
|
55
|
+
**Purpose:** Complete v2 feature validation and performance testing
|
|
56
|
+
**Usage:** `tsx scripts/comprehensive-review.ts`
|
|
57
|
+
**Tests:**
|
|
58
|
+
- @ruvector/core integration
|
|
59
|
+
- @ruvector/gnn integration
|
|
60
|
+
- ReasoningBank functionality
|
|
61
|
+
- All v2 controllers (HNSW, QUIC, etc.)
|
|
62
|
+
- Backend performance comparison
|
|
63
|
+
- Memory usage analysis
|
|
64
|
+
- Optimization opportunities
|
|
65
|
+
|
|
66
|
+
**Output:** Comprehensive test report with metrics
|
|
67
|
+
|
|
68
|
+
### `validate-security-fixes.ts`
|
|
69
|
+
**Purpose:** Security validation and audit
|
|
70
|
+
**Usage:** `tsx scripts/validate-security-fixes.ts`
|
|
71
|
+
**Checks:**
|
|
72
|
+
- SQL injection prevention
|
|
73
|
+
- Input sanitization
|
|
74
|
+
- Path traversal protection
|
|
75
|
+
- Dependency vulnerabilities
|
|
76
|
+
- Code signing verification
|
|
77
|
+
|
|
78
|
+
### `verify-bundle.js`
|
|
79
|
+
**Purpose:** Bundle integrity verification
|
|
80
|
+
**Usage:** `node scripts/verify-bundle.js`
|
|
81
|
+
**Validates:**
|
|
82
|
+
- Bundle size limits
|
|
83
|
+
- Export completeness
|
|
84
|
+
- API surface consistency
|
|
85
|
+
- WASM file integrity
|
|
86
|
+
|
|
87
|
+
### `verify-core-tools-6-10.sh`
|
|
88
|
+
**Purpose:** Core tools validation (tools 6-10)
|
|
89
|
+
**Usage:** `bash scripts/verify-core-tools-6-10.sh`
|
|
90
|
+
**Tests:**
|
|
91
|
+
- Tool 6: Batch insert operations
|
|
92
|
+
- Tool 7: Hybrid search
|
|
93
|
+
- Tool 8: QUIC synchronization
|
|
94
|
+
- Tool 9: Learning plugins
|
|
95
|
+
- Tool 10: Performance benchmarks
|
|
96
|
+
|
|
97
|
+
## Release Scripts
|
|
98
|
+
|
|
99
|
+
### `npm-release.sh`
|
|
100
|
+
**Purpose:** Automated NPM release workflow
|
|
101
|
+
**Usage:** `bash scripts/npm-release.sh [version]`
|
|
102
|
+
**Process:**
|
|
103
|
+
1. Version bump (semver)
|
|
104
|
+
2. Changelog generation
|
|
105
|
+
3. Build verification
|
|
106
|
+
4. Test suite execution
|
|
107
|
+
5. Bundle validation
|
|
108
|
+
6. NPM publish
|
|
109
|
+
7. Git tag creation
|
|
110
|
+
|
|
111
|
+
**Requirements:**
|
|
112
|
+
- NPM authentication
|
|
113
|
+
- Git repository
|
|
114
|
+
- Clean working tree
|
|
115
|
+
|
|
116
|
+
### `pre-release-validation.sh`
|
|
117
|
+
**Purpose:** Pre-release quality gate
|
|
118
|
+
**Usage:** `bash scripts/pre-release-validation.sh`
|
|
119
|
+
**Validates:**
|
|
120
|
+
- All tests passing
|
|
121
|
+
- No TypeScript errors
|
|
122
|
+
- Bundle integrity
|
|
123
|
+
- Documentation accuracy
|
|
124
|
+
- Security audit clean
|
|
125
|
+
- Performance benchmarks met
|
|
126
|
+
|
|
127
|
+
## Testing Scripts
|
|
128
|
+
|
|
129
|
+
### `docker-test.sh`
|
|
130
|
+
**Purpose:** Docker environment testing
|
|
131
|
+
**Usage:** `bash scripts/docker-test.sh`
|
|
132
|
+
**Tests:**
|
|
133
|
+
- Installation in clean environment
|
|
134
|
+
- Runtime dependencies
|
|
135
|
+
- Cross-platform compatibility
|
|
136
|
+
- Network isolation scenarios
|
|
137
|
+
|
|
138
|
+
### `docker-validation.sh`
|
|
139
|
+
**Purpose:** Comprehensive Docker validation suite
|
|
140
|
+
**Usage:** `bash scripts/docker-validation.sh`
|
|
141
|
+
**Includes:**
|
|
142
|
+
- Multi-stage build verification
|
|
143
|
+
- Container security scan
|
|
144
|
+
- Resource usage monitoring
|
|
145
|
+
- Integration test suite
|
|
146
|
+
|
|
147
|
+
## AgentDB Version
|
|
148
|
+
|
|
149
|
+
**Current Version:** 1.6.1
|
|
150
|
+
**Target:** v2.0.0 with full backward compatibility
|
|
151
|
+
|
|
152
|
+
All scripts are designed to work with:
|
|
153
|
+
- **Node.js:** >=18.0.0
|
|
154
|
+
- **TypeScript:** ^5.7.2
|
|
155
|
+
- **Better-sqlite3:** ^11.8.1 (optional)
|
|
156
|
+
- **@ruvector/core:** ^0.1.15
|
|
157
|
+
- **@ruvector/gnn:** ^0.1.15
|
|
158
|
+
|
|
159
|
+
## Development Workflow
|
|
160
|
+
|
|
161
|
+
### 1. Local Development
|
|
162
|
+
```bash
|
|
163
|
+
npm run build # Full build pipeline
|
|
164
|
+
npm run dev # Development mode with tsx
|
|
165
|
+
npm test # Run test suite
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
### 2. Browser Testing
|
|
169
|
+
```bash
|
|
170
|
+
npm run build:browser # Build browser bundle
|
|
171
|
+
npm run test:browser # Test browser bundle
|
|
172
|
+
npm run verify:bundle # Verify bundle integrity
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### 3. Pre-Release Validation
|
|
176
|
+
```bash
|
|
177
|
+
bash scripts/pre-release-validation.sh
|
|
178
|
+
tsx scripts/comprehensive-review.ts
|
|
179
|
+
tsx scripts/validate-security-fixes.ts
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### 4. Release
|
|
183
|
+
```bash
|
|
184
|
+
bash scripts/npm-release.sh patch # Patch release
|
|
185
|
+
bash scripts/npm-release.sh minor # Minor release
|
|
186
|
+
bash scripts/npm-release.sh major # Major release
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
## Script Dependencies
|
|
190
|
+
|
|
191
|
+
### Required Global Tools
|
|
192
|
+
- `node` (>=18.0.0)
|
|
193
|
+
- `npm` (>=9.0.0)
|
|
194
|
+
- `bash` (>=4.0)
|
|
195
|
+
- `tsx` (for TypeScript scripts)
|
|
196
|
+
- `docker` (for container tests)
|
|
197
|
+
|
|
198
|
+
### Package Scripts Integration
|
|
199
|
+
|
|
200
|
+
Scripts integrate with `package.json` scripts:
|
|
201
|
+
|
|
202
|
+
```json
|
|
203
|
+
{
|
|
204
|
+
"scripts": {
|
|
205
|
+
"build": "npm run build:ts && npm run copy:schemas && npm run build:browser",
|
|
206
|
+
"build:browser": "node scripts/build-browser.js",
|
|
207
|
+
"postinstall": "node scripts/postinstall.cjs || true",
|
|
208
|
+
"verify:bundle": "node scripts/verify-bundle.js",
|
|
209
|
+
"docker:test": "bash scripts/docker-test.sh"
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
## Troubleshooting
|
|
215
|
+
|
|
216
|
+
### Build Failures
|
|
217
|
+
|
|
218
|
+
**Problem:** Browser bundle build fails
|
|
219
|
+
**Solution:**
|
|
220
|
+
```bash
|
|
221
|
+
# Clear dist and rebuild
|
|
222
|
+
rm -rf dist
|
|
223
|
+
npm run build
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
**Problem:** WASM files not loading
|
|
227
|
+
**Solution:**
|
|
228
|
+
```bash
|
|
229
|
+
# Re-download dependencies
|
|
230
|
+
rm -rf node_modules
|
|
231
|
+
npm install
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
### Validation Failures
|
|
235
|
+
|
|
236
|
+
**Problem:** Security validation fails
|
|
237
|
+
**Solution:**
|
|
238
|
+
```bash
|
|
239
|
+
npm audit fix
|
|
240
|
+
tsx scripts/validate-security-fixes.ts
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
**Problem:** Bundle size exceeded
|
|
244
|
+
**Solution:**
|
|
245
|
+
```bash
|
|
246
|
+
# Check bundle analysis
|
|
247
|
+
npm run verify:bundle
|
|
248
|
+
# Consider code splitting or lazy loading
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
### Release Issues
|
|
252
|
+
|
|
253
|
+
**Problem:** NPM publish fails
|
|
254
|
+
**Solution:**
|
|
255
|
+
```bash
|
|
256
|
+
# Verify authentication
|
|
257
|
+
npm whoami
|
|
258
|
+
npm login
|
|
259
|
+
|
|
260
|
+
# Check version
|
|
261
|
+
npm version patch --no-git-tag-version
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
## Best Practices
|
|
265
|
+
|
|
266
|
+
1. **Always run validation before releases:**
|
|
267
|
+
```bash
|
|
268
|
+
bash scripts/pre-release-validation.sh
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
2. **Test browser builds locally:**
|
|
272
|
+
```bash
|
|
273
|
+
npm run test:browser
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
3. **Keep dependencies updated:**
|
|
277
|
+
```bash
|
|
278
|
+
npm outdated
|
|
279
|
+
npm update
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
4. **Run security audits regularly:**
|
|
283
|
+
```bash
|
|
284
|
+
tsx scripts/validate-security-fixes.ts
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
5. **Verify Docker compatibility:**
|
|
288
|
+
```bash
|
|
289
|
+
bash scripts/docker-test.sh
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
## Contributing
|
|
293
|
+
|
|
294
|
+
When adding new scripts:
|
|
295
|
+
|
|
296
|
+
1. Add executable permissions: `chmod +x script-name.sh`
|
|
297
|
+
2. Include shebang line: `#!/usr/bin/env node` or `#!/usr/bin/env bash`
|
|
298
|
+
3. Add comprehensive error handling
|
|
299
|
+
4. Document in this README
|
|
300
|
+
5. Add to package.json scripts if appropriate
|
|
301
|
+
6. Include validation tests
|
|
302
|
+
|
|
303
|
+
## Support
|
|
304
|
+
|
|
305
|
+
For issues with scripts:
|
|
306
|
+
- Check logs in `logs/` directory
|
|
307
|
+
- Review error messages carefully
|
|
308
|
+
- Verify Node.js/npm versions
|
|
309
|
+
- Check GitHub Issues: https://github.com/ruvnet/agentic-flow/issues
|
|
310
|
+
|
|
311
|
+
---
|
|
312
|
+
|
|
313
|
+
**Last Updated:** 2025-11-29
|
|
314
|
+
**AgentDB Version:** 1.6.1 → 2.0.0
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* AgentDB Post-Install Script
|
|
4
|
+
* Verifies sql.js (WASM SQLite) is available — no native compilation needed.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
function main() {
|
|
8
|
+
// Skip in CI environments or if explicitly disabled
|
|
9
|
+
if (process.env.CI || process.env.AGENTDB_SKIP_POSTINSTALL === 'true') {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// Verify core dependency: sql.js
|
|
14
|
+
try {
|
|
15
|
+
require('sql.js');
|
|
16
|
+
console.log('[@sparkleideas/agentdb] sql.js (WASM SQLite): OK');
|
|
17
|
+
} catch {
|
|
18
|
+
console.error('[@sparkleideas/agentdb] sql.js not found — run: npm install sql.js');
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// Check optional deps without failing
|
|
22
|
+
try {
|
|
23
|
+
require('better-sqlite3');
|
|
24
|
+
console.log('[@sparkleideas/agentdb] better-sqlite3: available (optional)');
|
|
25
|
+
} catch {
|
|
26
|
+
console.log('[@sparkleideas/agentdb] better-sqlite3: not installed (optional, sql.js used)');
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
main();
|