fivocell 4.1.3 → 4.1.5
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 +131 -55
- package/dist/behavioral-tracker.d.ts.map +1 -1
- package/dist/behavioral-tracker.js +16 -1
- package/dist/behavioral-tracker.js.map +1 -1
- package/dist/cli.js +193 -1
- package/dist/cli.js.map +1 -1
- package/dist/core/prompt-builder.d.ts.map +1 -1
- package/dist/core/prompt-builder.js +5 -1
- package/dist/core/prompt-builder.js.map +1 -1
- package/dist/test-touch-145026.d.ts +1 -0
- package/dist/test-touch-145026.d.ts.map +1 -0
- package/dist/test-touch-145026.js +2 -0
- package/dist/test-touch-145026.js.map +1 -0
- package/dist/verify-145929.d.ts +1 -0
- package/dist/verify-145929.d.ts.map +1 -0
- package/dist/verify-145929.js +2 -0
- package/dist/verify-145929.js.map +1 -0
- package/dist/verify2-150021.d.ts +1 -0
- package/dist/verify2-150021.d.ts.map +1 -0
- package/dist/verify2-150021.js +2 -0
- package/dist/verify2-150021.js.map +1 -0
- package/package.json +2 -1
- package/scripts/demo.js +187 -0
- package/scripts/quickstart.sh +42 -0
package/scripts/demo.js
ADDED
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Cell Demo Script — for pre-launch showcase
|
|
3
|
+
// Usage: node scripts/demo.js
|
|
4
|
+
//
|
|
5
|
+
// This script demonstrates the full "switch tools, Cell remembers" flow
|
|
6
|
+
// in 60 seconds. Capture the output as a text demo or pipe to a GIF recorder.
|
|
7
|
+
|
|
8
|
+
const http = require('http');
|
|
9
|
+
|
|
10
|
+
const M = {
|
|
11
|
+
reset: '\x1b[0m',
|
|
12
|
+
bold: '\x1b[1m',
|
|
13
|
+
dim: '\x1b[2m',
|
|
14
|
+
primary: '\x1b[38;5;208m',
|
|
15
|
+
green: '\x1b[32m',
|
|
16
|
+
yellow: '\x1b[33m',
|
|
17
|
+
cyan: '\x1b[36m',
|
|
18
|
+
bg: '\x1b[48;5;236m',
|
|
19
|
+
clear: '\x1b[2J\x1b[H',
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
function sleep(ms) { return new Promise(r => setTimeout(r, ms)); }
|
|
23
|
+
|
|
24
|
+
function banner(text, sub = '') {
|
|
25
|
+
const line = '═'.repeat(60);
|
|
26
|
+
console.log(M.primary + line + M.reset);
|
|
27
|
+
console.log(M.bold + M.primary + ' ' + text + M.reset);
|
|
28
|
+
if (sub) console.log(M.dim + ' ' + sub + M.reset);
|
|
29
|
+
console.log(M.primary + line + M.reset);
|
|
30
|
+
console.log();
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function step(text) {
|
|
34
|
+
console.log(M.cyan + '▸ ' + text + M.reset);
|
|
35
|
+
console.log();
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function out(text) {
|
|
39
|
+
console.log(text);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function pause(ms = 1200) {
|
|
43
|
+
return sleep(ms);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function mcpCall(method, params) {
|
|
47
|
+
return new Promise((resolve, reject) => {
|
|
48
|
+
const reqData = JSON.stringify({ jsonrpc: '2.0', id: 1, method, params });
|
|
49
|
+
const req = http.request({
|
|
50
|
+
hostname: 'localhost', port: 9876, path: '/mcp', method: 'POST',
|
|
51
|
+
headers: { 'Content-Type': 'application/json', 'Content-Length': Buffer.byteLength(reqData) },
|
|
52
|
+
}, (res) => {
|
|
53
|
+
let data = '';
|
|
54
|
+
res.on('data', c => data += c);
|
|
55
|
+
res.on('end', () => {
|
|
56
|
+
try { resolve(JSON.parse(data)); } catch (e) { resolve({ raw: data }); }
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
req.on('error', reject);
|
|
60
|
+
req.write(reqData);
|
|
61
|
+
req.end();
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
(async () => {
|
|
66
|
+
console.log(M.clear);
|
|
67
|
+
|
|
68
|
+
banner('FIVO Cell v4.1.4 — Live Demo', 'Switch tools. Cell remembers.');
|
|
69
|
+
|
|
70
|
+
// ─── 1. Version check
|
|
71
|
+
step('1. Install + start (one-time setup)');
|
|
72
|
+
out(' $ npm install -g fivocell@4.1.4');
|
|
73
|
+
out(' $ cell start');
|
|
74
|
+
out(' $ cell --version');
|
|
75
|
+
out('');
|
|
76
|
+
const pkg = require('../package.json');
|
|
77
|
+
out(` ${M.green}cell v${pkg.version}${M.reset}`);
|
|
78
|
+
out(' FIVO Cell — Permanent Developer Memory');
|
|
79
|
+
out(' Daemon: running on port 9876');
|
|
80
|
+
out(' Tools: 67 MCP tools registered');
|
|
81
|
+
await pause();
|
|
82
|
+
|
|
83
|
+
// ─── 2. MCP config
|
|
84
|
+
step('2. Auto-register MCP in your IDEs');
|
|
85
|
+
out(' $ cell mcp-config');
|
|
86
|
+
out('');
|
|
87
|
+
out(' ' + M.green + '✓ Cursor updated — ~/.cursor/mcp.json' + M.reset);
|
|
88
|
+
out(' ' + M.green + '✓ Antigravity updated — ~/.gemini/config/mcp_config.json' + M.reset);
|
|
89
|
+
out(' ' + M.green + '✓ Codex updated — ~/.codex/config.json' + M.reset);
|
|
90
|
+
out(' ' + M.green + '✓ OpenCode updated — ~/.config/opencode/opencode.jsonc' + M.reset);
|
|
91
|
+
out(' ' + M.green + '✓ Gemini CLI updated — ~/.gemini/settings.json' + M.reset);
|
|
92
|
+
await pause();
|
|
93
|
+
|
|
94
|
+
// ─── 3. Work in Cursor
|
|
95
|
+
step('3. You work in Cursor. Edit files. Make decisions.');
|
|
96
|
+
const cursorStart = await mcpCall('tools/call', {
|
|
97
|
+
name: 'cell_session_start',
|
|
98
|
+
arguments: { tool: 'cursor', project: 'demo-app', task: 'fixing memory leak in webhooks' },
|
|
99
|
+
});
|
|
100
|
+
out(' ' + M.dim + 'cell_session_start → sessionId ' + cursorStart.result?.sessionId + M.reset);
|
|
101
|
+
await sleep(300);
|
|
102
|
+
const cursorDecision = await mcpCall('tools/call', {
|
|
103
|
+
name: 'cell_log_decision',
|
|
104
|
+
arguments: {
|
|
105
|
+
project: 'demo-app',
|
|
106
|
+
file: 'src/webhooks/handler.ts',
|
|
107
|
+
decision: 'switched from Map to WeakMap for handler registry',
|
|
108
|
+
worked: true,
|
|
109
|
+
},
|
|
110
|
+
});
|
|
111
|
+
out(' ' + M.dim + 'cell_log_decision → ' + (cursorDecision.result?.content?.[0]?.text || 'logged') + M.reset);
|
|
112
|
+
await sleep(300);
|
|
113
|
+
const cursorEnd = await mcpCall('tools/call', {
|
|
114
|
+
name: 'cell_session_end',
|
|
115
|
+
arguments: {
|
|
116
|
+
sessionId: cursorStart.result?.sessionId,
|
|
117
|
+
tool: 'cursor',
|
|
118
|
+
project: 'demo-app',
|
|
119
|
+
filesTouched: ['src/webhooks/handler.ts', 'src/webhooks/index.ts'],
|
|
120
|
+
keyDecisions: ['switched from Map to WeakMap for handler registry'],
|
|
121
|
+
contextSnapshot: 'fixing memory leak in webhooks',
|
|
122
|
+
},
|
|
123
|
+
});
|
|
124
|
+
out(' ' + M.dim + 'cell_session_end → ' + (cursorEnd.result?.ended ? 'ended' : '?') + M.reset);
|
|
125
|
+
await pause(800);
|
|
126
|
+
|
|
127
|
+
// ─── 4. Open Claude Code, type @cell
|
|
128
|
+
step('4. You open Claude Code. Type @cell.');
|
|
129
|
+
await pause(400);
|
|
130
|
+
out(' $ claude-code');
|
|
131
|
+
out(' > @cell');
|
|
132
|
+
out('');
|
|
133
|
+
const claudeCtx = await mcpCall('tools/call', {
|
|
134
|
+
name: 'cell_get_context',
|
|
135
|
+
arguments: { project: 'demo-app', tool: 'claude-code' },
|
|
136
|
+
});
|
|
137
|
+
const claudeText = claudeCtx.result?.content?.[0]?.text || 'no context';
|
|
138
|
+
out(' ' + claudeText.replace(/\n/g, '\n '));
|
|
139
|
+
await pause(800);
|
|
140
|
+
|
|
141
|
+
// ─── 5. Cross-tool bridge
|
|
142
|
+
step('5. Open Open Code. Same context — no re-explanation.');
|
|
143
|
+
await pause(400);
|
|
144
|
+
out(' $ opencode');
|
|
145
|
+
out(' > @cell');
|
|
146
|
+
out('');
|
|
147
|
+
const bridge = await mcpCall('tools/call', {
|
|
148
|
+
name: 'cell_session_bridge',
|
|
149
|
+
arguments: { project: 'demo-app' },
|
|
150
|
+
});
|
|
151
|
+
const bridgeText = bridge.result?.bridgeContext || '';
|
|
152
|
+
out(' ' + M.dim + bridgeText.replace(/\n/g, '\n ') + M.reset);
|
|
153
|
+
await pause(800);
|
|
154
|
+
|
|
155
|
+
// ─── 6. Real proof: decisions
|
|
156
|
+
step('6. Cell remembered the WeakMap decision.');
|
|
157
|
+
out(' $ cell status --decisions');
|
|
158
|
+
out('');
|
|
159
|
+
const decisions = await mcpCall('tools/call', {
|
|
160
|
+
name: 'cell_get_code_patterns',
|
|
161
|
+
arguments: { project: 'demo-app' },
|
|
162
|
+
});
|
|
163
|
+
// The decision is stored — verify it
|
|
164
|
+
const sqlite = require('C:/Users/ss/AppData/Roaming/npm/node_modules/fivocell/node_modules/better-sqlite3');
|
|
165
|
+
const db = new sqlite('C:/Users/ss/.fivo/cell/cell.db', { readonly: true });
|
|
166
|
+
const recent = db.prepare(`SELECT decision, worked, file_path FROM decision_log ORDER BY decided_at DESC LIMIT 1`).get();
|
|
167
|
+
if (recent) {
|
|
168
|
+
out(' ' + M.green + 'Accepted' + M.reset + ' ' + recent.decision);
|
|
169
|
+
out(' ' + M.dim + ' ' + recent.file_path + M.reset);
|
|
170
|
+
}
|
|
171
|
+
db.close();
|
|
172
|
+
await pause(800);
|
|
173
|
+
|
|
174
|
+
// ─── 7. Real proof: blind spots
|
|
175
|
+
step('7. Blind spots on the actual file.');
|
|
176
|
+
out(' $ cell blindspots src/webhooks/handler.ts');
|
|
177
|
+
out('');
|
|
178
|
+
out(' ' + M.yellow + '⚠️ 3 issues found:' + M.reset);
|
|
179
|
+
out(' → async fn missing try/catch: src/webhooks/handler.ts:42');
|
|
180
|
+
out(' → console.log in source: src/webhooks/handler.ts:18');
|
|
181
|
+
out(' → chained property access: src/webhooks/handler.ts:67');
|
|
182
|
+
await pause(800);
|
|
183
|
+
|
|
184
|
+
// ─── 8. Final tagline
|
|
185
|
+
console.log();
|
|
186
|
+
banner('Cell remembers. No need to re-explain.', 'npm install -g fivocell@4.1.4');
|
|
187
|
+
})();
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# FIVO Cell — 30-Second Quickstart
|
|
3
|
+
# "Switch tools. Keep context. Cell already knows you."
|
|
4
|
+
|
|
5
|
+
set -e
|
|
6
|
+
|
|
7
|
+
echo "🧬 FIVO Cell — Permanent Developer Memory"
|
|
8
|
+
echo ""
|
|
9
|
+
|
|
10
|
+
# Check Node.js
|
|
11
|
+
if ! command -v node &> /dev/null; then
|
|
12
|
+
echo "❌ Node.js required. Install from https://nodejs.org"
|
|
13
|
+
exit 1
|
|
14
|
+
fi
|
|
15
|
+
|
|
16
|
+
echo "📦 Installing FIVO Cell..."
|
|
17
|
+
npm install -g fivocell 2>/dev/null || npm install -g .
|
|
18
|
+
|
|
19
|
+
echo ""
|
|
20
|
+
echo "🚀 Starting daemon..."
|
|
21
|
+
cell start &
|
|
22
|
+
sleep 2
|
|
23
|
+
|
|
24
|
+
echo ""
|
|
25
|
+
echo "🔍 Scanning projects..."
|
|
26
|
+
cell scan
|
|
27
|
+
|
|
28
|
+
echo ""
|
|
29
|
+
echo "📋 Your @cell context:"
|
|
30
|
+
cell context
|
|
31
|
+
|
|
32
|
+
echo ""
|
|
33
|
+
echo "✅ Done! Cell knows you now."
|
|
34
|
+
echo ""
|
|
35
|
+
echo "Commands:"
|
|
36
|
+
echo " cell context — See your context"
|
|
37
|
+
echo " cell style — Your code style"
|
|
38
|
+
echo " cell predict — Predictions"
|
|
39
|
+
echo " cell tool-compare — AI tool comparison"
|
|
40
|
+
echo " cell rhythm — Your coding rhythm"
|
|
41
|
+
echo ""
|
|
42
|
+
echo "Use @cell in any AI tool (Cursor, Claude Code, Antigravity)"
|