fivocell 8.12.15 โ 8.12.17
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.
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
export declare const AGENTS_MD_FILENAME = ".cell/AGENTS.md";
|
|
2
2
|
export declare const CURSORRULES_FILENAME = ".cell/.cursorrules";
|
|
3
|
+
export declare const ROOT_AGENTS_MD_FILENAME = "AGENTS.md";
|
|
3
4
|
export declare const CELL_RULES_MARKER = "# fivo-cell:rules:v1";
|
|
5
|
+
export declare const FIVO_CELL_SECTION_MARKER = "<!-- fivo-cell:start -->";
|
|
4
6
|
export declare const AGENTS_MD_TEMPLATE = "# fivo-cell:rules:v1\n# FIVO Cell \u2014 AI Memory Rules\n\nFIVO Cell is installed and configured for this project. Use its MCP tools\n(named `cell_*`) to maintain permanent memory across sessions.\n\n## The @cell Convention\n\nWhenever the user types `@cell` in their message (e.g. \"@cell what did I\njust edit?\" or \"@cell fix this bug\"), you MUST do the following BEFORE\nresponding:\n\n1. **Call `cell_get_context` FIRST** to load this project's full context.\n2. **Pass `project` as the current folder name** \u2014 derive it from\n `path.basename(process.cwd())` or the absolute path the IDE is open\n in. If unsure, call `cell_list_projects` and pick the matching one.\n3. **Also pass `tool`** set to YOUR ACTUAL IDE/TOOL NAME (the one you\n are running in right now). Cell formats the block differently for\n each tool. The valid values are:\n - If you are in **Antigravity** / **Gemini** IDE \u2192 pass `\"tool\": \"antigravity\"`\n - If you are in **Cursor** \u2192 pass `\"tool\": \"cursor\"`\n - If you are in **OpenCode** CLI \u2192 pass `\"tool\": \"opencode\"`\n - If you are in **Claude Code** CLI \u2192 pass `\"tool\": \"claude-code\"`\n - If you are in **Codex** CLI \u2192 pass `\"tool\": \"codex\"`\n - If you are in **Windsurf** / **Codeium** \u2192 pass `\"tool\": \"windsurf\"`\n - If you are in **GitHub Copilot** \u2192 pass `\"tool\": \"copilot\"`\n - If you are in **Aider** \u2192 pass `\"tool\": \"aider\"`\n - If you are in **Continue.dev** \u2192 pass `\"tool\": \"continue-dev\"`\n - If you are unsure / none of the above \u2192 omit `tool` and Cell\n returns the rich text block (works for every IDE).\n DO NOT pass `\"opencode\"` unless you are actually OpenCode. If you\n are Antigravity, the correct value is `\"antigravity\"` (not\n `\"opencode\"`, not `\"cursor\"`, not `\"antigravity-ide\"`).\n4. **Use the returned context** to inform your answer \u2014 it contains the\n last session, recent file edits (live events), blind spots, style\n hints, predictions, tried approaches, **session bridge (what just happened)**,\n and **continuity thread (what's been happening across sessions)**.\n\n## Supreme Context: Bridge + Continuity\n\nFivo Cell v7+ maintains **Supreme Context** \u2014 AI never starts a session blind:\n\n- **\uD83C\uDF09 Session Bridge**: Automatically captured at session end. Auto-injected\n at session start. Contains: summary, open questions, failed approaches,\n working approaches, last thought, file focus, vibe snapshot.\n- **\uD83E\uDDF5 Continuity Thread**: Tracks work across multiple sessions. Knows\n what you're building, open questions, pending actions, key learnings.\n- **\uD83D\uDD2E Context Predictions**: Predicts what you'll need \u2014 which files,\n which errors may recur, which decisions need revisiting.\n\n**The bridge is auto-loaded in every `@cell` block.** You don't need to\nask for it \u2014 just read the `\uD83C\uDF09 LAST SESSION BRIDGE` and `\uD83E\uDDF5 CONTINUITY\nTHREAD` sections at the top of the context block and use them.\n\n## Common Cell Tools\n\n| Task | Tool |\n|------|------|\n| Load project context (`@cell`) | `cell_get_context` |\n| Open a work session | `cell_session_start` |\n| Close a session with key decisions | `cell_session_end` |\n| See recent sessions | `cell_session_recent` |\n| See recent file saves | `cell_watch_events` |\n| Start the file watcher | `cell_watch_start` |\n| Stop the file watcher | `cell_watch_stop` |\n| Detect code risks (try/catch, null checks, validation) | `cell_blindspots` |\n| Scan the project | `cell_scan` |\n| Log an error you hit | `cell_log_error` |\n| Log how you fixed it | `cell_log_fix` |\n| Log a key decision | `cell_log_decision` |\n| List all registered projects | `cell_list_projects` |\n\nThere are 67 cell tools in total. Run `cell --help` to see all of them.\n\n## Session Discipline\n\n- **At the start of a non-trivial task** (multi-file work, refactor,\n feature, debugging session): call `cell_session_start` to open a\n session.\n- **At the end** (or before a long break): call `cell_session_end` with\n `keyDecisions` summarising what you decided and `filesTouched`\n listing the files you changed.\n- If the user switches tools (e.g. Cursor \u2192 Antigravity) within a\n project, the bridge context is auto-loaded \u2014 read it from the @cell\n block to understand what was just done.\n\n## Supreme Context: Never Start Blind\n\nFivo v7 includes **Supreme Context** that auto-injects into every\n`@cell` block:\n\n- **\uD83C\uDF09 Bridge**: Last session's summary, decisions, open questions,\n file focus, failed approaches (don't retry), working approaches\n- **\uD83E\uDDF5 Continuity Thread**: Cross-session work tracking \u2014 what's being\n built, pending actions, key learnings across sessions\n- **\uD83D\uDD2E Predictions**: What files you'll need, which errors may recur,\n which decisions need revisiting\n\nRead these sections at the top of the context block and you'll\nimmediately know what was happening and what to do next.\n\n## Watcher Awareness\n\n- If the watcher is active, the @cell block includes the most recent\n file edits. Trust those for \"what did I just edit\" questions.\n- If the user reports a file change you don't know about, call\n `cell_watch_events` directly.\n\n## Anti-Patterns to Avoid\n\n- Do NOT guess a project name. If unsure, call `cell_list_projects`.\n- Do NOT skip `cell_get_context` when @cell is in the prompt \u2014 the\n whole point of the convention is automatic context.\n- Do NOT call `cell_get_context` for every message. Only when @cell\n appears, or when context is genuinely needed.\n- Do NOT modify or remove this file. To regenerate it, run\n `cell scan` again (it is idempotent \u2014 existing files are kept).\n\n## Regeneration\n\nThis file is auto-generated by `cell scan`. To remove it: `cell scan --no-rules`.\n";
|
|
5
7
|
export declare const CURSORRULES_TEMPLATE = "# fivo-cell:rules:v1\n# FIVO Cell \u2014 Cursor Rules\n\nWhen the user types `@cell` in chat or Composer, you MUST call the\n`cell_get_context` MCP tool FIRST, with `project` set to the current\nfolder name and `tool` set to `cursor`. Then use the returned block\nto inform your response. See AGENTS.md for the full convention.\n";
|
|
8
|
+
export declare const ROOT_AGENTS_MD_TEMPLATE = "<!-- fivo-cell:start -->\n<!-- fivo-cell:end -->\n\n## \uD83D\uDD37 FIVO Cell \u2014 Permanent AI Memory\n\nThis project has **FIVO Cell** installed. It remembers everything across sessions via MCP tools (`cell_*` tools on port 9876).\n\n### `@cell` \u2014 Query Memory & Context\nWhen user types `@cell` with a question (e.g. `@cell what was I working on?`, `@cell show recent errors`, `@cell what\\'s my vibe?`):\n1. Call `cell_get_context` with `project` = this folder name and `tool` = your tool name (cursor, claude-code, opencode, etc.)\n2. Use the returned block \u2014 it has session bridge, continuity thread, recent edits, vibe, predictions\n3. Answer the question from that context\n\n### `@cellscan` \u2014 FULL Scan + Context Load + .cell/ Update\nWhen user types `@cellscan` (no question, just scanning + setup):\n\n**Step 1 \u2014 Scan the project**\n- Call `cell_deep_scan` to analyze the current project (files, patterns, blind spots, style)\n- Call `cell_discover` to detect AI tools on this machine and import their sessions\n- Both save data to `~/.fivo/cell/` (global) and `./.cell/` (project)\n\n**Step 2 \u2014 Read ALL .cell/ files** (THIS IS THE KEY \u2014 actually read the updated data)\nRead these files and use their content to understand the full picture:\n- `.cell/vibe/vibe-summary.json` or `.cell/vibe/` \u2014 developer personality, identity, AI guide\n- `.cell/personal/profile.json` + `.cell/personal/style.json` \u2014 coding preferences\n- `.cell/AGENTS.md` \u2014 full cell tools contract\n- `.cell/INDEX.md` \u2014 project structure index\n- `.cell/context` \u2014 current context state\n- `~/.fivo/cell/personal/` \u2014 global profile across all projects\n- `~/.fivo/cell/projects/PROJECT-NAME/` \u2014 per-project session history\n\n**Step 3 \u2014 Update .cell/ intelligently**\nBased on what you read, add to your working memory:\n- What was the last session working on?\n- What are the top blind spots to watch?\n- What's the developer's preferred working style?\n- What files are in focus?\n- Update `.cell/context` with current state if needed\n\n**Step 4 \u2014 Tell the user what happened**\nGive a brief summary: what was scanned, what was found, what you learned from .cell/ data.\n\n### Quick Reference\n| Trigger | Action |\n|---------|--------|\n| `@cell [question]` | Query context, memory, vibe, errors, decisions |\n| `@cellscan` | Full scan \u2192 read .cell/ \u2192 load context \u2192 update .cell/ |\n| Full contract | See `.cell/AGENTS.md` for all 67 MCP tools |\n\n### Tool Name Mapping\n- Cursor \u2192 `cursor` \u00B7 Claude Code \u2192 `claude-code` \u00B7 OpenCode \u2192 `opencode`\n- Codex \u2192 `codex` \u00B7 Windsurf \u2192 `windsurf` \u00B7 Copilot \u2192 `copilot`\n- Aider \u2192 `aider` \u00B7 Continue.dev \u2192 `continue-dev`\n- Antigravity/Gemini \u2192 `antigravity`\n\n---\n\n";
|
|
6
9
|
export interface WriteRulesResult {
|
|
7
10
|
agentsMd: 'written' | 'exists' | 'skipped';
|
|
8
11
|
cursorRules: 'written' | 'exists' | 'skipped';
|
|
12
|
+
rootAgentsMd: 'written' | 'exists' | 'skipped';
|
|
9
13
|
reason?: string;
|
|
10
14
|
}
|
|
11
15
|
export declare function isCellRulesFile(content: string): boolean;
|
|
@@ -15,6 +19,16 @@ export declare function writeAgentsMd(projectPath: string, opts?: {
|
|
|
15
19
|
export declare function writeCursorRules(projectPath: string, opts?: {
|
|
16
20
|
overwrite?: boolean;
|
|
17
21
|
}): 'written' | 'exists' | 'skipped';
|
|
22
|
+
/**
|
|
23
|
+
* Write fivocell rules into the root AGENTS.md file that AI editors actually read.
|
|
24
|
+
* - If file doesn't exist: create fresh
|
|
25
|
+
* - If file exists but has no fivocell section: append at end
|
|
26
|
+
* - If file exists with stale fivocell section: replace the fivocell section
|
|
27
|
+
* Returns 'written' if content was modified, 'exists' if up-to-date, 'skipped' on error.
|
|
28
|
+
*/
|
|
29
|
+
export declare function writeRootAgentsMd(projectPath: string, opts?: {
|
|
30
|
+
overwrite?: boolean;
|
|
31
|
+
}): 'written' | 'exists' | 'skipped';
|
|
18
32
|
export declare function writeCellRules(projectPath: string, opts?: {
|
|
19
33
|
overwrite?: boolean;
|
|
20
34
|
cursor?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents-md.d.ts","sourceRoot":"","sources":["../../../../src/walls/01-context/context/agents-md.ts"],"names":[],"mappings":"AAKA,e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,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAkC3H;AAED,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,GAAE;IAAE,SAAS,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,gBAAgB,CAK1H"}
|
|
@@ -33,18 +33,21 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.CURSORRULES_TEMPLATE = exports.AGENTS_MD_TEMPLATE = exports.CELL_RULES_MARKER = exports.CURSORRULES_FILENAME = exports.AGENTS_MD_FILENAME = void 0;
|
|
36
|
+
exports.ROOT_AGENTS_MD_TEMPLATE = exports.CURSORRULES_TEMPLATE = exports.AGENTS_MD_TEMPLATE = exports.FIVO_CELL_SECTION_MARKER = exports.CELL_RULES_MARKER = exports.ROOT_AGENTS_MD_FILENAME = exports.CURSORRULES_FILENAME = exports.AGENTS_MD_FILENAME = void 0;
|
|
37
37
|
exports.isCellRulesFile = isCellRulesFile;
|
|
38
38
|
exports.writeAgentsMd = writeAgentsMd;
|
|
39
39
|
exports.writeCursorRules = writeCursorRules;
|
|
40
|
+
exports.writeRootAgentsMd = writeRootAgentsMd;
|
|
40
41
|
exports.writeCellRules = writeCellRules;
|
|
41
42
|
const fs = __importStar(require("fs"));
|
|
42
43
|
const path = __importStar(require("path"));
|
|
43
|
-
//
|
|
44
|
-
//
|
|
44
|
+
// .cell/ copies are fivo-cell's canonical reference backups.
|
|
45
|
+
// Root-level AGENTS.md is the live file AI editors actually read.
|
|
45
46
|
exports.AGENTS_MD_FILENAME = '.cell/AGENTS.md';
|
|
46
47
|
exports.CURSORRULES_FILENAME = '.cell/.cursorrules';
|
|
48
|
+
exports.ROOT_AGENTS_MD_FILENAME = 'AGENTS.md';
|
|
47
49
|
exports.CELL_RULES_MARKER = '# fivo-cell:rules:v1';
|
|
50
|
+
exports.FIVO_CELL_SECTION_MARKER = '<!-- fivo-cell:start -->';
|
|
48
51
|
exports.AGENTS_MD_TEMPLATE = `${exports.CELL_RULES_MARKER}
|
|
49
52
|
# FIVO Cell โ AI Memory Rules
|
|
50
53
|
|
|
@@ -174,6 +177,64 @@ When the user types \`@cell\` in chat or Composer, you MUST call the
|
|
|
174
177
|
\`cell_get_context\` MCP tool FIRST, with \`project\` set to the current
|
|
175
178
|
folder name and \`tool\` set to \`cursor\`. Then use the returned block
|
|
176
179
|
to inform your response. See AGENTS.md for the full convention.
|
|
180
|
+
`;
|
|
181
|
+
exports.ROOT_AGENTS_MD_TEMPLATE = `${exports.FIVO_CELL_SECTION_MARKER}
|
|
182
|
+
<!-- fivo-cell:end -->
|
|
183
|
+
|
|
184
|
+
## ๐ท FIVO Cell โ Permanent AI Memory
|
|
185
|
+
|
|
186
|
+
This project has **FIVO Cell** installed. It remembers everything across sessions via MCP tools (\`cell_*\` tools on port 9876).
|
|
187
|
+
|
|
188
|
+
### \`@cell\` โ Query Memory & Context
|
|
189
|
+
When user types \`@cell\` with a question (e.g. \`@cell what was I working on?\`, \`@cell show recent errors\`, \`@cell what\\'s my vibe?\`):
|
|
190
|
+
1. Call \`cell_get_context\` with \`project\` = this folder name and \`tool\` = your tool name (cursor, claude-code, opencode, etc.)
|
|
191
|
+
2. Use the returned block โ it has session bridge, continuity thread, recent edits, vibe, predictions
|
|
192
|
+
3. Answer the question from that context
|
|
193
|
+
|
|
194
|
+
### \`@cellscan\` โ FULL Scan + Context Load + .cell/ Update
|
|
195
|
+
When user types \`@cellscan\` (no question, just scanning + setup):
|
|
196
|
+
|
|
197
|
+
**Step 1 โ Scan the project**
|
|
198
|
+
- Call \`cell_deep_scan\` to analyze the current project (files, patterns, blind spots, style)
|
|
199
|
+
- Call \`cell_discover\` to detect AI tools on this machine and import their sessions
|
|
200
|
+
- Both save data to \`~/.fivo/cell/\` (global) and \`./.cell/\` (project)
|
|
201
|
+
|
|
202
|
+
**Step 2 โ Read ALL .cell/ files** (THIS IS THE KEY โ actually read the updated data)
|
|
203
|
+
Read these files and use their content to understand the full picture:
|
|
204
|
+
- \`.cell/vibe/vibe-summary.json\` or \`.cell/vibe/\` โ developer personality, identity, AI guide
|
|
205
|
+
- \`.cell/personal/profile.json\` + \`.cell/personal/style.json\` โ coding preferences
|
|
206
|
+
- \`.cell/AGENTS.md\` โ full cell tools contract
|
|
207
|
+
- \`.cell/INDEX.md\` โ project structure index
|
|
208
|
+
- \`.cell/context\` โ current context state
|
|
209
|
+
- \`~/.fivo/cell/personal/\` โ global profile across all projects
|
|
210
|
+
- \`~/.fivo/cell/projects/PROJECT-NAME/\` โ per-project session history
|
|
211
|
+
|
|
212
|
+
**Step 3 โ Update .cell/ intelligently**
|
|
213
|
+
Based on what you read, add to your working memory:
|
|
214
|
+
- What was the last session working on?
|
|
215
|
+
- What are the top blind spots to watch?
|
|
216
|
+
- What's the developer's preferred working style?
|
|
217
|
+
- What files are in focus?
|
|
218
|
+
- Update \`.cell/context\` with current state if needed
|
|
219
|
+
|
|
220
|
+
**Step 4 โ Tell the user what happened**
|
|
221
|
+
Give a brief summary: what was scanned, what was found, what you learned from .cell/ data.
|
|
222
|
+
|
|
223
|
+
### Quick Reference
|
|
224
|
+
| Trigger | Action |
|
|
225
|
+
|---------|--------|
|
|
226
|
+
| \`@cell [question]\` | Query context, memory, vibe, errors, decisions |
|
|
227
|
+
| \`@cellscan\` | Full scan โ read .cell/ โ load context โ update .cell/ |
|
|
228
|
+
| Full contract | See \`.cell/AGENTS.md\` for all 67 MCP tools |
|
|
229
|
+
|
|
230
|
+
### Tool Name Mapping
|
|
231
|
+
- Cursor โ \`cursor\` ยท Claude Code โ \`claude-code\` ยท OpenCode โ \`opencode\`
|
|
232
|
+
- Codex โ \`codex\` ยท Windsurf โ \`windsurf\` ยท Copilot โ \`copilot\`
|
|
233
|
+
- Aider โ \`aider\` ยท Continue.dev โ \`continue-dev\`
|
|
234
|
+
- Antigravity/Gemini โ \`antigravity\`
|
|
235
|
+
|
|
236
|
+
---
|
|
237
|
+
|
|
177
238
|
`;
|
|
178
239
|
function isCellRulesFile(content) {
|
|
179
240
|
return content.includes(exports.CELL_RULES_MARKER);
|
|
@@ -206,9 +267,54 @@ function writeCursorRules(projectPath, opts = {}) {
|
|
|
206
267
|
return 'skipped';
|
|
207
268
|
}
|
|
208
269
|
}
|
|
270
|
+
/**
|
|
271
|
+
* Write fivocell rules into the root AGENTS.md file that AI editors actually read.
|
|
272
|
+
* - If file doesn't exist: create fresh
|
|
273
|
+
* - If file exists but has no fivocell section: append at end
|
|
274
|
+
* - If file exists with stale fivocell section: replace the fivocell section
|
|
275
|
+
* Returns 'written' if content was modified, 'exists' if up-to-date, 'skipped' on error.
|
|
276
|
+
*/
|
|
277
|
+
function writeRootAgentsMd(projectPath, opts = {}) {
|
|
278
|
+
const filePath = path.join(projectPath, exports.ROOT_AGENTS_MD_FILENAME);
|
|
279
|
+
try {
|
|
280
|
+
if (fs.existsSync(filePath)) {
|
|
281
|
+
const existing = fs.readFileSync(filePath, 'utf8');
|
|
282
|
+
const startMarker = '<!-- fivo-cell:start -->';
|
|
283
|
+
const endMarker = '<!-- fivo-cell:end -->';
|
|
284
|
+
// Check if fivocell section already exists
|
|
285
|
+
const startIdx = existing.indexOf(startMarker);
|
|
286
|
+
const endIdx = existing.indexOf(endMarker);
|
|
287
|
+
if (startIdx !== -1 && endIdx !== -1 && endIdx > startIdx) {
|
|
288
|
+
// Replace existing fivocell section
|
|
289
|
+
if (!opts.overwrite)
|
|
290
|
+
return 'exists'; // already has our section, skip unless forced
|
|
291
|
+
const before = existing.substring(0, startIdx);
|
|
292
|
+
const after = existing.substring(endIdx + endMarker.length);
|
|
293
|
+
fs.writeFileSync(filePath, before + exports.ROOT_AGENTS_MD_TEMPLATE + after, 'utf8');
|
|
294
|
+
return 'written';
|
|
295
|
+
}
|
|
296
|
+
else {
|
|
297
|
+
// Append fivocell section at the end
|
|
298
|
+
const trimmed = existing.trimEnd();
|
|
299
|
+
const newContent = trimmed.endsWith('\n') ? trimmed + exports.ROOT_AGENTS_MD_TEMPLATE : trimmed + '\n\n' + exports.ROOT_AGENTS_MD_TEMPLATE;
|
|
300
|
+
fs.writeFileSync(filePath, newContent, 'utf8');
|
|
301
|
+
return 'written';
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
else {
|
|
305
|
+
// File doesn't exist โ create fresh
|
|
306
|
+
fs.writeFileSync(filePath, exports.ROOT_AGENTS_MD_TEMPLATE, 'utf8');
|
|
307
|
+
return 'written';
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
catch {
|
|
311
|
+
return 'skipped';
|
|
312
|
+
}
|
|
313
|
+
}
|
|
209
314
|
function writeCellRules(projectPath, opts = {}) {
|
|
210
315
|
const agentsMd = writeAgentsMd(projectPath, opts);
|
|
211
316
|
const cursorRules = opts.cursor === false ? 'skipped' : writeCursorRules(projectPath, opts);
|
|
212
|
-
|
|
317
|
+
const rootAgentsMd = writeRootAgentsMd(projectPath, { overwrite: opts.overwrite });
|
|
318
|
+
return { agentsMd, cursorRules, rootAgentsMd };
|
|
213
319
|
}
|
|
214
320
|
//# sourceMappingURL=agents-md.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents-md.js","sourceRoot":"","sources":["../../../../src/walls/01-context/context/agents-md.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"agents-md.js","sourceRoot":"","sources":["../../../../src/walls/01-context/context/agents-md.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiNA,0CAEC;AAED,sCAYC;AAED,4CAYC;AASD,8CAkCC;AAED,wCAKC;AAjSD,uCAAyB;AACzB,2CAA6B;AAE7B,6DAA6D;AAC7D,kEAAkE;AACrD,QAAA,kBAAkB,GAA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AAI,CAAC,CAAC;IAC5F,MAAM,YAAY,GAAG,iBAAiB,CAAC,WAAW,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;IACnF,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC;AACjD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fivocell",
|
|
3
|
-
"version": "8.12.
|
|
3
|
+
"version": "8.12.17",
|
|
4
4
|
"description": "FIVO Cell โ Permanent Developer Memory. Learns how you think, build, fail, and grow.",
|
|
5
5
|
"main": "dist/walls/07-runtime/cli/cli.js",
|
|
6
6
|
"types": "dist/walls/07-runtime/cli/cli.d.ts",
|