claude-mem-opencode 0.0.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/README.md +391 -0
- package/dist/bundle/claude-mem-opencode.js +542 -0
- package/dist/bundle/index.d.ts +13 -0
- package/dist/bundle/index.d.ts.map +1 -0
- package/dist/bundle/index.js.map +1 -0
- package/dist/bundle/package.json +10 -0
- package/dist/bundle/skill/SKILL.md +118 -0
- package/dist/bundle/skill/operations/search.md +178 -0
- package/dist/bundle/skill/operations/timeline.md +269 -0
- package/dist/bundle/skill/operations/workflow.md +375 -0
- package/dist/cli.d.ts +6 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +164 -0
- package/dist/cli.js.map +1 -0
- package/dist/integration/context-injector.d.ts +19 -0
- package/dist/integration/context-injector.d.ts.map +1 -0
- package/dist/integration/context-injector.js +47 -0
- package/dist/integration/context-injector.js.map +1 -0
- package/dist/integration/event-listeners.d.ts +41 -0
- package/dist/integration/event-listeners.d.ts.map +1 -0
- package/dist/integration/event-listeners.js +156 -0
- package/dist/integration/event-listeners.js.map +1 -0
- package/dist/integration/index.d.ts +66 -0
- package/dist/integration/index.d.ts.map +1 -0
- package/dist/integration/index.js +127 -0
- package/dist/integration/index.js.map +1 -0
- package/dist/integration/session-mapper.d.ts +39 -0
- package/dist/integration/session-mapper.d.ts.map +1 -0
- package/dist/integration/session-mapper.js +63 -0
- package/dist/integration/session-mapper.js.map +1 -0
- package/dist/integration/test.d.ts +6 -0
- package/dist/integration/test.d.ts.map +1 -0
- package/dist/integration/test.js +73 -0
- package/dist/integration/test.js.map +1 -0
- package/dist/integration/utils/logger.d.ts +15 -0
- package/dist/integration/utils/logger.d.ts.map +1 -0
- package/dist/integration/utils/logger.js +26 -0
- package/dist/integration/utils/logger.js.map +1 -0
- package/dist/integration/utils/privacy.d.ts +32 -0
- package/dist/integration/utils/privacy.d.ts.map +1 -0
- package/dist/integration/utils/privacy.js +62 -0
- package/dist/integration/utils/privacy.js.map +1 -0
- package/dist/integration/utils/project-name.d.ts +16 -0
- package/dist/integration/utils/project-name.d.ts.map +1 -0
- package/dist/integration/utils/project-name.js +28 -0
- package/dist/integration/utils/project-name.js.map +1 -0
- package/dist/integration/version-checker.d.ts +52 -0
- package/dist/integration/version-checker.d.ts.map +1 -0
- package/dist/integration/version-checker.js +121 -0
- package/dist/integration/version-checker.js.map +1 -0
- package/dist/integration/worker-client.d.ts +94 -0
- package/dist/integration/worker-client.d.ts.map +1 -0
- package/dist/integration/worker-client.js +188 -0
- package/dist/integration/worker-client.js.map +1 -0
- package/dist/test.d.ts +6 -0
- package/dist/test.d.ts.map +1 -0
- package/dist/test.js +73 -0
- package/dist/test.js.map +1 -0
- package/package.json +69 -0
package/dist/test.js
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
#!/usr/bin/env bun
|
|
2
|
+
/**
|
|
3
|
+
* Test script for claude-mem OpenCode integration
|
|
4
|
+
*/
|
|
5
|
+
import { ClaudeMemIntegration } from './index.js';
|
|
6
|
+
async function testIntegration() {
|
|
7
|
+
console.log('='.repeat(60));
|
|
8
|
+
console.log('claude-mem OpenCode Integration Test');
|
|
9
|
+
console.log('='.repeat(60));
|
|
10
|
+
console.log();
|
|
11
|
+
const integration = new ClaudeMemIntegration();
|
|
12
|
+
try {
|
|
13
|
+
// Test 1: Initialize integration
|
|
14
|
+
console.log('Test 1: Initializing integration...');
|
|
15
|
+
await integration.initialize();
|
|
16
|
+
console.log('✅ PASS: Integration initialized');
|
|
17
|
+
console.log();
|
|
18
|
+
// Test 2: Check status
|
|
19
|
+
console.log('Test 2: Getting integration status...');
|
|
20
|
+
const status = await integration.getStatus();
|
|
21
|
+
console.log('Status:');
|
|
22
|
+
console.log(` - Initialized: ${status.initialized}`);
|
|
23
|
+
console.log(` - Worker Ready: ${status.workerReady}`);
|
|
24
|
+
console.log(` - Project: ${status.currentProject}`);
|
|
25
|
+
console.log(` - Worker URL: ${status.workerUrl}`);
|
|
26
|
+
console.log('✅ PASS: Status retrieved');
|
|
27
|
+
console.log();
|
|
28
|
+
// Test 3: Get project context
|
|
29
|
+
console.log('Test 3: Getting project context...');
|
|
30
|
+
const context = await integration.getProjectContext();
|
|
31
|
+
if (context) {
|
|
32
|
+
console.log(`✅ PASS: Got context (${context.length} chars)`);
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
console.log('⚠️ WARN: No context available (expected for new project)');
|
|
36
|
+
}
|
|
37
|
+
console.log();
|
|
38
|
+
// Test 4: Search memory
|
|
39
|
+
console.log('Test 4: Searching memory...');
|
|
40
|
+
try {
|
|
41
|
+
const searchResults = await integration.searchMemory('test');
|
|
42
|
+
console.log(`✅ PASS: Search returned ${Array.isArray(searchResults) ? searchResults.length : 'results'}`);
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
console.log('⚠️ WARN: Search failed (expected for empty database)');
|
|
46
|
+
console.log(` Error: ${error}`);
|
|
47
|
+
}
|
|
48
|
+
console.log();
|
|
49
|
+
// Test 5: Shutdown
|
|
50
|
+
console.log('Test 5: Shutting down integration...');
|
|
51
|
+
await integration.shutdown();
|
|
52
|
+
console.log('✅ PASS: Integration shut down');
|
|
53
|
+
console.log();
|
|
54
|
+
console.log('='.repeat(60));
|
|
55
|
+
console.log('All tests completed!');
|
|
56
|
+
console.log('='.repeat(60));
|
|
57
|
+
process.exit(0);
|
|
58
|
+
}
|
|
59
|
+
catch (error) {
|
|
60
|
+
console.error('❌ FAIL: Test failed');
|
|
61
|
+
console.error(` Error: ${error}`);
|
|
62
|
+
console.log();
|
|
63
|
+
console.log('Troubleshooting:');
|
|
64
|
+
console.log(' 1. Ensure worker is running: npm run worker:start');
|
|
65
|
+
console.log(' 2. Check worker health: curl http://localhost:37777/api/health');
|
|
66
|
+
console.log(' 3. Check worker logs: npm run worker:tail');
|
|
67
|
+
console.log();
|
|
68
|
+
process.exit(1);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
// Run tests
|
|
72
|
+
testIntegration();
|
|
73
|
+
//# sourceMappingURL=test.js.map
|
package/dist/test.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test.js","sourceRoot":"","sources":["../src/test.ts"],"names":[],"mappings":";AAEA;;GAEG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAA;AAEjD,KAAK,UAAU,eAAe;IAC5B,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAA;IAC3B,OAAO,CAAC,GAAG,CAAC,sCAAsC,CAAC,CAAA;IACnD,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAA;IAC3B,OAAO,CAAC,GAAG,EAAE,CAAA;IAEb,MAAM,WAAW,GAAG,IAAI,oBAAoB,EAAE,CAAA;IAE9C,IAAI,CAAC;QACH,iCAAiC;QACjC,OAAO,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAA;QAClD,MAAM,WAAW,CAAC,UAAU,EAAE,CAAA;QAC9B,OAAO,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAA;QAC9C,OAAO,CAAC,GAAG,EAAE,CAAA;QAEb,uBAAuB;QACvB,OAAO,CAAC,GAAG,CAAC,uCAAuC,CAAC,CAAA;QACpD,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,SAAS,EAAE,CAAA;QAC5C,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA;QACtB,OAAO,CAAC,GAAG,CAAC,oBAAoB,MAAM,CAAC,WAAW,EAAE,CAAC,CAAA;QACrD,OAAO,CAAC,GAAG,CAAC,qBAAqB,MAAM,CAAC,WAAW,EAAE,CAAC,CAAA;QACtD,OAAO,CAAC,GAAG,CAAC,gBAAgB,MAAM,CAAC,cAAc,EAAE,CAAC,CAAA;QACpD,OAAO,CAAC,GAAG,CAAC,mBAAmB,MAAM,CAAC,SAAS,EAAE,CAA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AA;QAC3B,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAA;QACnC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAA;QAC3B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACjB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAA;QACpC,OAAO,CAAC,KAAK,CAAC,YAAY,KAAK,EAAE,CAAC,CAAA;QAClC,OAAO,CAAC,GAAG,EAAE,CAAA;QACb,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAA;QAC/B,OAAO,CAAC,GAAG,CAAC,qDAAqD,CAAC,CAAA;QAClE,OAAO,CAAC,GAAG,CAAC,kEAAkE,CAAC,CAAA;QAC/E,OAAO,CAAC,GAAG,CAAC,6CAA6C,CAAC,CAAA;QAC1D,OAAO,CAAC,GAAG,EAAE,CAAA;QACb,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACjB,CAAC;AACH,CAAC;AAED,YAAY;AACZ,eAAe,EAAE,CAAA"}
|
package/package.json
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "claude-mem-opencode",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "OpenCode integration for claude-mem persistent memory",
|
|
5
|
+
"main": "./dist/bundle/index.js",
|
|
6
|
+
"types": "./dist/bundle/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"import": "./dist/bundle/index.js",
|
|
10
|
+
"types": "./dist/bundle/index.d.ts"
|
|
11
|
+
},
|
|
12
|
+
"./bundle": {
|
|
13
|
+
"import": "./dist/bundle/opencode-mem.js"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist",
|
|
18
|
+
"README.md",
|
|
19
|
+
"LICENSE"
|
|
20
|
+
],
|
|
21
|
+
"engines": {
|
|
22
|
+
"node": ">=18.0.0",
|
|
23
|
+
"bun": ">=1.0.0"
|
|
24
|
+
},
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"open": "^8.4.2"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@types/node": "^20.10.0",
|
|
30
|
+
"bun-types": "^1.0.0",
|
|
31
|
+
"typescript": "^5.3.0"
|
|
32
|
+
},
|
|
33
|
+
"peerDependencies": {
|
|
34
|
+
"claude-mem": ">=8.5.4"
|
|
35
|
+
},
|
|
36
|
+
"peerDependenciesMeta": {
|
|
37
|
+
"claude-mem": {
|
|
38
|
+
"optional": true
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"scripts": {
|
|
42
|
+
"prepare": "npm run build",
|
|
43
|
+
"build": "npm run build:lib && npm run build:bundle",
|
|
44
|
+
"build:lib": "tsc",
|
|
45
|
+
"build:bundle": "bun build src/bundle/index.ts --outfile dist/bundle/claude-mem-opencode.js --target node",
|
|
46
|
+
"test": "bun test",
|
|
47
|
+
"test:unit": "bun test tests/unit",
|
|
48
|
+
"test:integration": "bun test tests/integration",
|
|
49
|
+
"test:e2e": "bun test tests/e2e",
|
|
50
|
+
"lint": "eslint src tests || echo 'Linting not configured'",
|
|
51
|
+
"bundle": "bash scripts/bundle.sh",
|
|
52
|
+
"install:from-source": "bash scripts/install-from-source.sh",
|
|
53
|
+
"cleanup": "bash scripts/cleanup.sh",
|
|
54
|
+
"release": "npm run build && npm publish"
|
|
55
|
+
},
|
|
56
|
+
"repository": {
|
|
57
|
+
"type": "git",
|
|
58
|
+
"url": "https://github.com/mc303/claude-mem-opencode.git"
|
|
59
|
+
},
|
|
60
|
+
"keywords": [
|
|
61
|
+
"claude-mem",
|
|
62
|
+
"opencode",
|
|
63
|
+
"memory",
|
|
64
|
+
"ai",
|
|
65
|
+
"integration"
|
|
66
|
+
],
|
|
67
|
+
"author": "Your Name",
|
|
68
|
+
"license": "MIT"
|
|
69
|
+
}
|