@gamaze/hicortex 0.19.6 → 0.20.0
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 +8 -4
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +8 -1
- package/dist/consolidate.d.ts +21 -0
- package/dist/consolidate.js +37 -0
- package/dist/dashboard.js +5 -2
- package/dist/identity-store.d.ts +3 -3
- package/dist/identity-store.js +2 -2
- package/dist/init.d.ts +3 -1
- package/dist/init.js +93 -1
- package/dist/llm-flight.d.ts +30 -0
- package/dist/llm-flight.js +190 -0
- package/dist/llm.d.ts +32 -0
- package/dist/llm.js +69 -2
- package/dist/nightly.d.ts +41 -0
- package/dist/nightly.js +87 -3
- package/dist/opencode-transcript-reader.d.ts +63 -0
- package/dist/opencode-transcript-reader.js +181 -0
- package/dist/status.js +23 -0
- package/dist/telemetry.d.ts +5 -5
- package/dist/telemetry.js +5 -5
- package/dist/uninstall.js +34 -0
- package/opencode-plugin/hicortex/index.ts +981 -0
- package/package.json +6 -4
- package/pi-extension/hicortex/README.md +56 -0
- package/pi-extension/hicortex/index.ts +888 -0
package/dist/status.js
CHANGED
|
@@ -132,6 +132,29 @@ async function runStatus() {
|
|
|
132
132
|
}
|
|
133
133
|
catch { /* no CC settings */ }
|
|
134
134
|
console.log(` CC MCP: ${ccRegistered ? `registered → ${ccUrl}` : "not registered"}`);
|
|
135
|
+
// Pi (#348): the bundled extension at ~/.pi/agent/extensions/hicortex.ts.
|
|
136
|
+
// "not found" = no Pi on this machine; "not installed" = Pi present, run
|
|
137
|
+
// init to place the extension.
|
|
138
|
+
const piAgentDir = (0, node_path_1.join)((0, node_os_1.homedir)(), ".pi", "agent");
|
|
139
|
+
if ((0, node_fs_1.existsSync)(piAgentDir)) {
|
|
140
|
+
const piInstalled = (0, node_fs_1.existsSync)((0, node_path_1.join)(piAgentDir, "extensions", "hicortex.ts"));
|
|
141
|
+
console.log(` Pi plugin: ${piInstalled ? "installed" : "not installed (run: npx @gamaze/hicortex init)"}`);
|
|
142
|
+
}
|
|
143
|
+
else {
|
|
144
|
+
console.log(" Pi plugin: not found");
|
|
145
|
+
}
|
|
146
|
+
// opencode (#347): the bundled plugin at ~/.config/opencode/plugins/hicortex.ts.
|
|
147
|
+
// "not found" = no opencode on this machine; "not installed" = opencode
|
|
148
|
+
// present, run init to place the plugin.
|
|
149
|
+
const opencodeConfigDir = (0, node_path_1.join)((0, node_os_1.homedir)(), ".config", "opencode");
|
|
150
|
+
const opencodeDataDir = (0, node_path_1.join)((0, node_os_1.homedir)(), ".local", "share", "opencode");
|
|
151
|
+
if ((0, node_fs_1.existsSync)(opencodeConfigDir) || (0, node_fs_1.existsSync)(opencodeDataDir)) {
|
|
152
|
+
const openCodeInstalled = (0, node_fs_1.existsSync)((0, node_path_1.join)(opencodeConfigDir, "plugins", "hicortex.ts"));
|
|
153
|
+
console.log(` opencode: ${openCodeInstalled ? "installed" : "not installed (run: npx @gamaze/hicortex init)"}`);
|
|
154
|
+
}
|
|
155
|
+
else {
|
|
156
|
+
console.log(" opencode: not found");
|
|
157
|
+
}
|
|
135
158
|
console.log();
|
|
136
159
|
// Server status. /health/detail carries the diagnostics (version, memories,
|
|
137
160
|
// llm) — /health itself is the public minimal {status:"ok"} probe (#253).
|
package/dist/telemetry.d.ts
CHANGED
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
* v — package version
|
|
7
7
|
* pv — payload schema version
|
|
8
8
|
* mode — server or client
|
|
9
|
-
* agent — cc, pi, oc, or mixed (detected from session
|
|
10
|
-
* when the agent type is genuinely unknown
|
|
11
|
-
* transcripts read yet). The admin summary
|
|
12
|
-
* as "?", distinct from any real type, so
|
|
13
|
-
* client is never miscounted as "cc".
|
|
9
|
+
* agent — cc, hermes, pi, oc, opencode, or mixed (detected from session
|
|
10
|
+
* sources); OMITTED when the agent type is genuinely unknown
|
|
11
|
+
* (pre-flight abort — no transcripts read yet). The admin summary
|
|
12
|
+
* buckets a missing agent as "?", distinct from any real type, so
|
|
13
|
+
* an aborting Hermes/OC client is never miscounted as "cc".
|
|
14
14
|
* mem — total memory count
|
|
15
15
|
* lessons — total lesson count
|
|
16
16
|
* lessonsGenerated — lessons created THIS run (server mode only; the per-run
|
package/dist/telemetry.js
CHANGED
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
* v — package version
|
|
8
8
|
* pv — payload schema version
|
|
9
9
|
* mode — server or client
|
|
10
|
-
* agent — cc, pi, oc, or mixed (detected from session
|
|
11
|
-
* when the agent type is genuinely unknown
|
|
12
|
-
* transcripts read yet). The admin summary
|
|
13
|
-
* as "?", distinct from any real type, so
|
|
14
|
-
* client is never miscounted as "cc".
|
|
10
|
+
* agent — cc, hermes, pi, oc, opencode, or mixed (detected from session
|
|
11
|
+
* sources); OMITTED when the agent type is genuinely unknown
|
|
12
|
+
* (pre-flight abort — no transcripts read yet). The admin summary
|
|
13
|
+
* buckets a missing agent as "?", distinct from any real type, so
|
|
14
|
+
* an aborting Hermes/OC client is never miscounted as "cc".
|
|
15
15
|
* mem — total memory count
|
|
16
16
|
* lessons — total lesson count
|
|
17
17
|
* lessonsGenerated — lessons created THIS run (server mode only; the per-run
|
package/dist/uninstall.js
CHANGED
|
@@ -234,6 +234,40 @@ async function runUninstall() {
|
|
|
234
234
|
if ((0, claude_md_js_1.removeLessonsBlock)(CLAUDE_MD)) {
|
|
235
235
|
console.log(" ✓ Removed Hicortex Learnings block from CLAUDE.md");
|
|
236
236
|
}
|
|
237
|
+
// 6. Remove the Pi extension (#348). Guarded on the "hicortex" marker the
|
|
238
|
+
// installer always ships — "hicortex.ts" is a plausible user filename,
|
|
239
|
+
// and uninstall never deletes a file we did not write. Fail-soft when
|
|
240
|
+
// absent (no Pi on the machine) or unreadable.
|
|
241
|
+
const piExtension = (0, node_path_1.join)((0, node_os_1.homedir)(), ".pi", "agent", "extensions", "hicortex.ts");
|
|
242
|
+
if ((0, node_fs_1.existsSync)(piExtension)) {
|
|
243
|
+
try {
|
|
244
|
+
if ((0, node_fs_1.readFileSync)(piExtension, "utf-8").toLowerCase().includes("hicortex")) {
|
|
245
|
+
(0, node_fs_1.unlinkSync)(piExtension);
|
|
246
|
+
console.log(" ✓ Removed Pi extension (~/.pi/agent/extensions/hicortex.ts)");
|
|
247
|
+
}
|
|
248
|
+
else {
|
|
249
|
+
console.log(" ⚠ Skipping ~/.pi/agent/extensions/hicortex.ts — not a Hicortex file, left untouched");
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
catch { /* unreadable — leave it */ }
|
|
253
|
+
}
|
|
254
|
+
// 7. Remove the opencode plugin (#347). Same marker guard — the plugins
|
|
255
|
+
// directory is shared (third-party files live there too), and uninstall
|
|
256
|
+
// never deletes a file we did not write. Fail-soft when absent (no
|
|
257
|
+
// opencode on the machine) or unreadable.
|
|
258
|
+
const openCodePlugin = (0, node_path_1.join)((0, node_os_1.homedir)(), ".config", "opencode", "plugins", "hicortex.ts");
|
|
259
|
+
if ((0, node_fs_1.existsSync)(openCodePlugin)) {
|
|
260
|
+
try {
|
|
261
|
+
if ((0, node_fs_1.readFileSync)(openCodePlugin, "utf-8").toLowerCase().includes("hicortex")) {
|
|
262
|
+
(0, node_fs_1.unlinkSync)(openCodePlugin);
|
|
263
|
+
console.log(" ✓ Removed opencode plugin (~/.config/opencode/plugins/hicortex.ts)");
|
|
264
|
+
}
|
|
265
|
+
else {
|
|
266
|
+
console.log(" ⚠ Skipping ~/.config/opencode/plugins/hicortex.ts — not a Hicortex file, left untouched");
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
catch { /* unreadable — leave it */ }
|
|
270
|
+
}
|
|
237
271
|
console.log(`\n✓ Uninstalled. Database preserved at ${HICORTEX_HOME}/hicortex.db`);
|
|
238
272
|
console.log(" To remove all data: rm -rf ~/.hicortex");
|
|
239
273
|
}
|