@gamaze/hicortex 0.7.1 → 0.10.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 +72 -39
- package/dist/claude-md.d.ts +9 -21
- package/dist/claude-md.js +9 -241
- package/dist/cli.d.ts +3 -2
- package/dist/cli.js +29 -11
- package/dist/consolidate.js +0 -7
- package/dist/db.js +24 -0
- package/dist/embedder.d.ts +11 -0
- package/dist/embedder.js +27 -0
- package/dist/extensions.d.ts +41 -88
- package/dist/extensions.js +36 -61
- package/dist/features.d.ts +21 -25
- package/dist/features.js +47 -83
- package/dist/hermes-transcript-reader.d.ts +27 -0
- package/dist/hermes-transcript-reader.js +134 -0
- package/dist/index.d.ts +16 -4
- package/dist/index.js +252 -344
- package/dist/init.d.ts +41 -1
- package/dist/init.js +545 -190
- package/dist/lesson-selection.d.ts +62 -0
- package/dist/lesson-selection.js +159 -0
- package/dist/lessons-context.d.ts +17 -0
- package/dist/lessons-context.js +96 -0
- package/dist/llm.d.ts +42 -29
- package/dist/llm.js +89 -270
- package/dist/mcp-server.d.ts +0 -1
- package/dist/mcp-server.js +404 -86
- package/dist/nightly.d.ts +9 -6
- package/dist/nightly.js +197 -357
- package/dist/oc-transcript-reader.d.ts +20 -0
- package/dist/oc-transcript-reader.js +61 -0
- package/dist/pi-transcript-reader.d.ts +1 -0
- package/dist/status.js +22 -2
- package/dist/storage.d.ts +7 -1
- package/dist/storage.js +28 -7
- package/dist/transcript-reader.d.ts +19 -0
- package/dist/transcript-reader.js +17 -3
- package/dist/types.d.ts +10 -0
- package/dist/uninstall.js +31 -1
- package/hermes-plugin/hicortex/README.md +77 -0
- package/hermes-plugin/hicortex/__init__.py +17 -0
- package/hermes-plugin/hicortex/client.py +162 -0
- package/hermes-plugin/hicortex/config.py +105 -0
- package/hermes-plugin/hicortex/plugin.yaml +12 -0
- package/hermes-plugin/hicortex/provider.py +432 -0
- package/openclaw.plugin.json +17 -44
- package/package.json +7 -5
- package/dist/pro-loader.d.ts +0 -33
- package/dist/pro-loader.js +0 -187
package/dist/init.d.ts
CHANGED
|
@@ -11,9 +11,49 @@
|
|
|
11
11
|
* Actions:
|
|
12
12
|
* - Install persistent daemon (launchd/systemd)
|
|
13
13
|
* - Register MCP server in CC settings
|
|
14
|
-
* -
|
|
14
|
+
* - Install CC SessionStart hook for query-time lessons
|
|
15
|
+
* - Strip old static CLAUDE.md learnings block if present
|
|
15
16
|
* - Install CC custom commands (/learn, /hicortex-activate)
|
|
16
17
|
*/
|
|
18
|
+
/**
|
|
19
|
+
* Parse a KEY=VALUE env file (e.g. ~/.hermes/.env or ~/.claude/settings.json env block).
|
|
20
|
+
* Handles: comments (#), quoted values, empty lines.
|
|
21
|
+
* Exported for testability.
|
|
22
|
+
*/
|
|
23
|
+
export declare function parseEnvFile(content: string): Record<string, string>;
|
|
24
|
+
/**
|
|
25
|
+
* Generate a random auth token in the format hctx-<32 hex chars>.
|
|
26
|
+
* Exported for testability.
|
|
27
|
+
*/
|
|
28
|
+
export declare function generateAuthToken(): string;
|
|
29
|
+
/**
|
|
30
|
+
* Ensure a server-mode auth token exists in config.json.
|
|
31
|
+
* Generates and saves one if absent. Never overwrites an existing token.
|
|
32
|
+
* Returns the token (existing or newly generated).
|
|
33
|
+
* Exported for testability.
|
|
34
|
+
*/
|
|
35
|
+
export declare function persistAuthToken(configPath: string): {
|
|
36
|
+
token: string;
|
|
37
|
+
generated: boolean;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Install (or verify) the CC SessionStart hook that runs `hicortex lessons-context`.
|
|
41
|
+
* The hook fetches lessons from the configured server at session start and injects
|
|
42
|
+
* them as context — replacing the old static CLAUDE.md block.
|
|
43
|
+
*
|
|
44
|
+
* Idempotent: skips if a SessionStart hook containing "lessons-context" already exists.
|
|
45
|
+
* Uses JSON.parse/JSON.stringify to safely merge into ~/.claude/settings.json.
|
|
46
|
+
*
|
|
47
|
+
* @param settingsPath Override for the settings.json path (used in tests; defaults to CC_SETTINGS).
|
|
48
|
+
*/
|
|
49
|
+
export declare function installSessionStartHook(settingsPath?: string): void;
|
|
17
50
|
export declare function runInit(options?: {
|
|
18
51
|
serverUrl?: string;
|
|
19
52
|
}): Promise<void>;
|
|
53
|
+
/**
|
|
54
|
+
* Resolve the nightly hour (0–23, local time) for the generated schedule.
|
|
55
|
+
* Priority: `nightlyHour` in ~/.hicortex/config.json → mode default.
|
|
56
|
+
* Defaults: client 02:00, server 03:00 — staggered so that in mixed fleets
|
|
57
|
+
* clients push their sessions before the server's capture + consolidation run.
|
|
58
|
+
*/
|
|
59
|
+
export declare function resolveNightlyHour(mode: "server" | "client", configDir?: string): number;
|