context-mode 1.0.107 → 1.0.109
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/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/.openclaw-plugin/openclaw.plugin.json +1 -1
- package/.openclaw-plugin/package.json +1 -1
- package/README.md +22 -18
- package/build/adapters/claude-code/index.js +26 -9
- package/build/adapters/opencode/index.js +5 -5
- package/build/cli.js +92 -12
- package/build/server.js +45 -3
- package/build/session/analytics.d.ts +7 -0
- package/build/session/analytics.js +75 -15
- package/build/session/db.d.ts +3 -1
- package/build/session/persist-tool-calls.d.ts +54 -0
- package/build/session/persist-tool-calls.js +105 -0
- package/build/session/project-attribution.d.ts +1 -1
- package/cli.bundle.mjs +123 -122
- package/hooks/ensure-deps.mjs +28 -12
- package/hooks/posttooluse.mjs +90 -80
- package/hooks/precompact.mjs +56 -46
- package/hooks/pretooluse.mjs +161 -167
- package/hooks/routing-block.mjs +2 -2
- package/hooks/run-hook.mjs +82 -0
- package/hooks/session-db.bundle.mjs +2 -2
- package/hooks/sessionstart.mjs +187 -155
- package/hooks/userpromptsubmit.mjs +69 -58
- package/openclaw.plugin.json +1 -1
- package/package.json +2 -1
- package/scripts/heal-better-sqlite3.mjs +108 -0
- package/scripts/postinstall.mjs +27 -0
- package/server.bundle.mjs +88 -88
- package/skills/UPSTREAM-CREDITS.md +51 -0
- package/skills/context-mode-ops/SKILL.md +147 -0
- package/skills/diagnose/SKILL.md +122 -0
- package/skills/diagnose/scripts/hitl-loop.template.sh +41 -0
- package/skills/grill-me/SKILL.md +15 -0
- package/skills/grill-with-docs/ADR-FORMAT.md +47 -0
- package/skills/grill-with-docs/CONTEXT-FORMAT.md +77 -0
- package/skills/grill-with-docs/SKILL.md +93 -0
- package/skills/improve-codebase-architecture/DEEPENING.md +37 -0
- package/skills/improve-codebase-architecture/INTERFACE-DESIGN.md +44 -0
- package/skills/improve-codebase-architecture/LANGUAGE.md +53 -0
- package/skills/improve-codebase-architecture/SKILL.md +76 -0
- package/skills/tdd/SKILL.md +114 -0
- package/skills/tdd/deep-modules.md +33 -0
- package/skills/tdd/interface-design.md +31 -0
- package/skills/tdd/mocking.md +59 -0
- package/skills/tdd/refactoring.md +10 -0
- package/skills/tdd/tests.md +61 -0
package/scripts/postinstall.mjs
CHANGED
|
@@ -13,6 +13,7 @@ import { execSync } from "node:child_process";
|
|
|
13
13
|
import { dirname, resolve, join, sep } from "node:path";
|
|
14
14
|
import { fileURLToPath } from "node:url";
|
|
15
15
|
import { homedir } from "node:os";
|
|
16
|
+
import { healBetterSqlite3Binding } from "./heal-better-sqlite3.mjs";
|
|
16
17
|
|
|
17
18
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
18
19
|
const pkgRoot = resolve(__dirname, "..");
|
|
@@ -146,3 +147,29 @@ if (process.platform === "win32" && process.env.npm_config_global === "true") {
|
|
|
146
147
|
// Best effort — don't block install. User can use npx as fallback.
|
|
147
148
|
}
|
|
148
149
|
}
|
|
150
|
+
|
|
151
|
+
// ── 3. Native binding self-heal — better-sqlite3 (#408) ──────────────
|
|
152
|
+
// On Windows, `npm rebuild` falls through to node-gyp without MSVC; bypass
|
|
153
|
+
// that by spawning prebuild-install directly. Cross-platform safety net —
|
|
154
|
+
// the binding can also go missing on macOS/Linux when prebuilds are stale
|
|
155
|
+
// or the install was interrupted.
|
|
156
|
+
//
|
|
157
|
+
// Logic lives in scripts/heal-better-sqlite3.mjs (shared with
|
|
158
|
+
// hooks/ensure-deps.mjs so there's one source of truth).
|
|
159
|
+
try { healBetterSqlite3Binding(pkgRoot); } catch { /* best effort — don't block install */ }
|
|
160
|
+
|
|
161
|
+
// ── 4. Hook normalization at install time (#414) ─────────────────────
|
|
162
|
+
// hooks/hooks.json + .claude-plugin/plugin.json ship with `${CLAUDE_PLUGIN_ROOT}`
|
|
163
|
+
// + bare `node` command. On Windows + Claude Code that combination triggers
|
|
164
|
+
// `cjs/loader:1479 MODULE_NOT_FOUND` (placeholder mangling, MSYS path issues,
|
|
165
|
+
// PATH lookup failure). start.mjs normalizes on every MCP boot, but normalizing
|
|
166
|
+
// here too closes the gap for the very first hook fire after a fresh install
|
|
167
|
+
// (before any MCP server has run).
|
|
168
|
+
try {
|
|
169
|
+
const { normalizeHooksOnStartup } = await import("../hooks/normalize-hooks.mjs");
|
|
170
|
+
normalizeHooksOnStartup({
|
|
171
|
+
pluginRoot: pkgRoot,
|
|
172
|
+
nodePath: process.execPath,
|
|
173
|
+
platform: process.platform,
|
|
174
|
+
});
|
|
175
|
+
} catch { /* best effort — never block install */ }
|