@niroai/niro 0.10.1 → 0.12.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/CHANGELOG.md +164 -0
- package/README.md +81 -4
- package/docs/working-on-branches.md +63 -0
- package/package.json +1 -1
- package/src/commands/_resolveProject.js +59 -3
- package/src/commands/cleanup.js +689 -0
- package/src/commands/delete.js +16 -1
- package/src/commands/info.js +51 -2
- package/src/commands/release.js +13 -60
- package/src/commands/remove.js +13 -0
- package/src/commands/takeover.js +52 -2
- package/src/commands/watch.js +93 -25
- package/src/index.js +23 -3
- package/src/lib/folderSync.js +7 -0
- package/src/lib/impactLog.js +251 -0
- package/src/lib/periodicClaim.js +100 -0
- package/src/lib/printError.js +46 -0
- package/src/lib/receiptStore.js +1 -1
- package/src/lib/takeoverRestore.js +156 -0
- package/src/mcp/server.js +30 -10
- package/src/mcp/setup.js +441 -23
- package/src/mcp/teardown.js +7 -2
package/src/mcp/teardown.js
CHANGED
|
@@ -42,6 +42,7 @@ const {
|
|
|
42
42
|
isNiroUserPromptHook,
|
|
43
43
|
isNiroPreToolUseHook,
|
|
44
44
|
isNiroExploreHook,
|
|
45
|
+
isNiroImpactHook,
|
|
45
46
|
userHome,
|
|
46
47
|
} = require("./setup");
|
|
47
48
|
|
|
@@ -126,7 +127,7 @@ function removeMarkerSectionBounded(content, marker) {
|
|
|
126
127
|
}
|
|
127
128
|
|
|
128
129
|
/**
|
|
129
|
-
* Strip niro's PostCompact, UserPromptSubmit, and PreToolUse (temp-project + explore-first) hook
|
|
130
|
+
* Strip niro's PostCompact, UserPromptSubmit, and PreToolUse (temp-project + explore-first + impact-gate) hook
|
|
130
131
|
* entries from a parsed Claude Code settings object (mutates and returns it). Uses the same matchers
|
|
131
132
|
* install uses. Empty arrays / an empty `hooks` object are pruned so the file stays tidy. Other hooks
|
|
132
133
|
* are untouched. Returns { settings, removed } where `removed` is the count deleted.
|
|
@@ -152,7 +153,9 @@ function filterNiroHooks(settings) {
|
|
|
152
153
|
}
|
|
153
154
|
if (Array.isArray(hooks.PreToolUse)) {
|
|
154
155
|
const before = hooks.PreToolUse.length;
|
|
155
|
-
hooks.PreToolUse = hooks.PreToolUse.filter(
|
|
156
|
+
hooks.PreToolUse = hooks.PreToolUse.filter(
|
|
157
|
+
(h) => !isNiroPreToolUseHook(h) && !isNiroExploreHook(h) && !isNiroImpactHook(h),
|
|
158
|
+
);
|
|
156
159
|
removed += before - hooks.PreToolUse.length;
|
|
157
160
|
if (hooks.PreToolUse.length === 0) delete hooks.PreToolUse;
|
|
158
161
|
}
|
|
@@ -388,6 +391,8 @@ function uninstallClaudeCode() {
|
|
|
388
391
|
// a task the developer has long forgotten.
|
|
389
392
|
try {
|
|
390
393
|
require("../lib/receiptStore").purge();
|
|
394
|
+
// The impact gate's evidence files and off switch go with the hook that read them.
|
|
395
|
+
require("../lib/impactLog").purge();
|
|
391
396
|
} catch {
|
|
392
397
|
/* best effort — never block an uninstall on cleaning up a cache */
|
|
393
398
|
}
|