@intutic/sync-daemon 1.9.0 → 1.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 +2 -2
- package/dist/agentReporter.d.ts +205 -0
- package/dist/agentReporter.d.ts.map +1 -0
- package/dist/agentReporter.js +394 -0
- package/dist/agentReporter.js.map +1 -0
- package/dist/configReader.d.ts +39 -2
- package/dist/configReader.d.ts.map +1 -1
- package/dist/configReader.js +56 -2
- package/dist/configReader.js.map +1 -1
- package/dist/configWriter.d.ts +51 -1
- package/dist/configWriter.d.ts.map +1 -1
- package/dist/configWriter.js +490 -63
- package/dist/configWriter.js.map +1 -1
- package/dist/harness/antigravityHooks.d.ts.map +1 -1
- package/dist/harness/antigravityHooks.js +33 -55
- package/dist/harness/antigravityHooks.js.map +1 -1
- package/dist/harness/claudeCodeHooks.d.ts +47 -13
- package/dist/harness/claudeCodeHooks.d.ts.map +1 -1
- package/dist/harness/claudeCodeHooks.js +323 -55
- package/dist/harness/claudeCodeHooks.js.map +1 -1
- package/dist/harness/claudeDesktopHooks.d.ts.map +1 -1
- package/dist/harness/claudeDesktopHooks.js +35 -48
- package/dist/harness/claudeDesktopHooks.js.map +1 -1
- package/dist/harness/clineHooks.d.ts.map +1 -1
- package/dist/harness/clineHooks.js +42 -34
- package/dist/harness/clineHooks.js.map +1 -1
- package/dist/harness/codexHooks.d.ts +36 -0
- package/dist/harness/codexHooks.d.ts.map +1 -0
- package/dist/harness/codexHooks.js +227 -0
- package/dist/harness/codexHooks.js.map +1 -0
- package/dist/harness/continueHooks.d.ts +45 -5
- package/dist/harness/continueHooks.d.ts.map +1 -1
- package/dist/harness/continueHooks.js +225 -5
- package/dist/harness/continueHooks.js.map +1 -1
- package/dist/harness/cursorHooks.d.ts +31 -0
- package/dist/harness/cursorHooks.d.ts.map +1 -1
- package/dist/harness/cursorHooks.js +78 -49
- package/dist/harness/cursorHooks.js.map +1 -1
- package/dist/harness/dshHooks.d.ts +198 -0
- package/dist/harness/dshHooks.d.ts.map +1 -0
- package/dist/harness/dshHooks.js +569 -0
- package/dist/harness/dshHooks.js.map +1 -0
- package/dist/harness/gateBody.d.ts +422 -0
- package/dist/harness/gateBody.d.ts.map +1 -0
- package/dist/harness/gateBody.js +1816 -0
- package/dist/harness/gateBody.js.map +1 -0
- package/dist/harness/gateKind.d.ts +164 -0
- package/dist/harness/gateKind.d.ts.map +1 -0
- package/dist/harness/gateKind.js +143 -0
- package/dist/harness/gateKind.js.map +1 -0
- package/dist/harness/githubCopilotHooks.d.ts +54 -0
- package/dist/harness/githubCopilotHooks.d.ts.map +1 -0
- package/dist/harness/githubCopilotHooks.js +218 -0
- package/dist/harness/githubCopilotHooks.js.map +1 -0
- package/dist/harness/gooseHooks.d.ts.map +1 -1
- package/dist/harness/gooseHooks.js +67 -37
- package/dist/harness/gooseHooks.js.map +1 -1
- package/dist/harness/grokHooks.d.ts +77 -0
- package/dist/harness/grokHooks.d.ts.map +1 -0
- package/dist/harness/grokHooks.js +350 -0
- package/dist/harness/grokHooks.js.map +1 -0
- package/dist/harness/hermesHooks.d.ts.map +1 -1
- package/dist/harness/hermesHooks.js +26 -55
- package/dist/harness/hermesHooks.js.map +1 -1
- package/dist/harness/holdRedaction.d.ts +69 -0
- package/dist/harness/holdRedaction.d.ts.map +1 -0
- package/dist/harness/holdRedaction.js +211 -0
- package/dist/harness/holdRedaction.js.map +1 -0
- package/dist/harness/jetbrainsXmlConfig.d.ts +51 -0
- package/dist/harness/jetbrainsXmlConfig.d.ts.map +1 -0
- package/dist/harness/jetbrainsXmlConfig.js +151 -0
- package/dist/harness/jetbrainsXmlConfig.js.map +1 -0
- package/dist/harness/mcpAutoWrite.d.ts +100 -3
- package/dist/harness/mcpAutoWrite.d.ts.map +1 -1
- package/dist/harness/mcpAutoWrite.js +712 -90
- package/dist/harness/mcpAutoWrite.js.map +1 -1
- package/dist/harness/museHooks.d.ts +53 -0
- package/dist/harness/museHooks.d.ts.map +1 -0
- package/dist/harness/museHooks.js +273 -0
- package/dist/harness/museHooks.js.map +1 -0
- package/dist/harness/n8nHooks.d.ts +25 -9
- package/dist/harness/n8nHooks.d.ts.map +1 -1
- package/dist/harness/n8nHooks.js +174 -9
- package/dist/harness/n8nHooks.js.map +1 -1
- package/dist/harness/openCodeHooks.d.ts +93 -0
- package/dist/harness/openCodeHooks.d.ts.map +1 -0
- package/dist/harness/openCodeHooks.js +248 -0
- package/dist/harness/openCodeHooks.js.map +1 -0
- package/dist/harness/openWebuiHooks.d.ts.map +1 -1
- package/dist/harness/openWebuiHooks.js +56 -11
- package/dist/harness/openWebuiHooks.js.map +1 -1
- package/dist/harness/openclawHooks.d.ts.map +1 -1
- package/dist/harness/openclawHooks.js +30 -54
- package/dist/harness/openclawHooks.js.map +1 -1
- package/dist/harness/openhandsHooks.d.ts.map +1 -1
- package/dist/harness/openhandsHooks.js +35 -41
- package/dist/harness/openhandsHooks.js.map +1 -1
- package/dist/harness/piHooks.d.ts.map +1 -1
- package/dist/harness/piHooks.js +31 -58
- package/dist/harness/piHooks.js.map +1 -1
- package/dist/harness/protectedPaths.d.ts +353 -0
- package/dist/harness/protectedPaths.d.ts.map +1 -0
- package/dist/harness/protectedPaths.js +805 -0
- package/dist/harness/protectedPaths.js.map +1 -0
- package/dist/harness/rooCodeHooks.d.ts.map +1 -1
- package/dist/harness/rooCodeHooks.js +34 -48
- package/dist/harness/rooCodeHooks.js.map +1 -1
- package/dist/harness/windsurfHooks.d.ts +72 -0
- package/dist/harness/windsurfHooks.d.ts.map +1 -1
- package/dist/harness/windsurfHooks.js +172 -58
- package/dist/harness/windsurfHooks.js.map +1 -1
- package/dist/harness/windsurfJetBrainsProxy.d.ts +78 -0
- package/dist/harness/windsurfJetBrainsProxy.d.ts.map +1 -0
- package/dist/harness/windsurfJetBrainsProxy.js +159 -0
- package/dist/harness/windsurfJetBrainsProxy.js.map +1 -0
- package/dist/hashReporter.js +1 -1
- package/dist/hashReporter.js.map +1 -1
- package/dist/index.d.ts +12 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -6
- package/dist/index.js.map +1 -1
- package/dist/integrityStore.d.ts +0 -8
- package/dist/integrityStore.d.ts.map +1 -1
- package/dist/integrityStore.js +6 -29
- package/dist/integrityStore.js.map +1 -1
- package/dist/lib/approvedBypasses.d.ts +76 -0
- package/dist/lib/approvedBypasses.d.ts.map +1 -0
- package/dist/lib/approvedBypasses.js +140 -0
- package/dist/lib/approvedBypasses.js.map +1 -0
- package/dist/lib/complianceProbes.d.ts.map +1 -1
- package/dist/lib/complianceProbes.js +5 -0
- package/dist/lib/complianceProbes.js.map +1 -1
- package/dist/lib/decisionsDigest.d.ts +99 -0
- package/dist/lib/decisionsDigest.d.ts.map +1 -0
- package/dist/lib/decisionsDigest.js +199 -0
- package/dist/lib/decisionsDigest.js.map +1 -0
- package/dist/lib/egressPolicy.d.ts +69 -0
- package/dist/lib/egressPolicy.d.ts.map +1 -0
- package/dist/lib/egressPolicy.js +126 -0
- package/dist/lib/egressPolicy.js.map +1 -0
- package/dist/lib/gitWorktrees.d.ts +140 -0
- package/dist/lib/gitWorktrees.d.ts.map +1 -0
- package/dist/lib/gitWorktrees.js +191 -0
- package/dist/lib/gitWorktrees.js.map +1 -0
- package/dist/lib/policySnapshot.d.ts +224 -0
- package/dist/lib/policySnapshot.d.ts.map +1 -0
- package/dist/lib/policySnapshot.js +637 -0
- package/dist/lib/policySnapshot.js.map +1 -0
- package/dist/lib/processPoller.d.ts +44 -0
- package/dist/lib/processPoller.d.ts.map +1 -1
- package/dist/lib/processPoller.js +176 -1
- package/dist/lib/processPoller.js.map +1 -1
- package/dist/lib/runtimeEnv.d.ts +8 -0
- package/dist/lib/runtimeEnv.d.ts.map +1 -1
- package/dist/lib/runtimeEnv.js +3 -0
- package/dist/lib/runtimeEnv.js.map +1 -1
- package/dist/localTrajectoryHeuristics.d.ts +51 -0
- package/dist/localTrajectoryHeuristics.d.ts.map +1 -0
- package/dist/localTrajectoryHeuristics.js +90 -0
- package/dist/localTrajectoryHeuristics.js.map +1 -0
- package/dist/sessionReporter.d.ts +70 -0
- package/dist/sessionReporter.d.ts.map +1 -0
- package/dist/sessionReporter.js +140 -0
- package/dist/sessionReporter.js.map +1 -0
- package/dist/skillWriter.d.ts +1 -1
- package/dist/skillWriter.d.ts.map +1 -1
- package/dist/skillWriter.js +6 -3
- package/dist/skillWriter.js.map +1 -1
- package/dist/syncLoop.d.ts +105 -3
- package/dist/syncLoop.d.ts.map +1 -1
- package/dist/syncLoop.js +397 -65
- package/dist/syncLoop.js.map +1 -1
- package/dist/trajectoryMonitor.d.ts +2 -0
- package/dist/trajectoryMonitor.d.ts.map +1 -1
- package/dist/trajectoryMonitor.js +57 -0
- package/dist/trajectoryMonitor.js.map +1 -1
- package/dist/watcher/driftWatcher.d.ts.map +1 -1
- package/dist/watcher/driftWatcher.js +12 -3
- package/dist/watcher/driftWatcher.js.map +1 -1
- package/dist/watcher/settingsGuard.d.ts +23 -0
- package/dist/watcher/settingsGuard.d.ts.map +1 -1
- package/dist/watcher/settingsGuard.js +202 -17
- package/dist/watcher/settingsGuard.js.map +1 -1
- package/package.json +37 -6
- package/dist/brainIndexer.d.ts +0 -51
- package/dist/brainIndexer.d.ts.map +0 -1
- package/dist/brainIndexer.js +0 -148
- package/dist/brainIndexer.js.map +0 -1
- package/dist/harness/cursorHooksJson.d.ts +0 -29
- package/dist/harness/cursorHooksJson.d.ts.map +0 -1
- package/dist/harness/cursorHooksJson.js +0 -130
- package/dist/harness/cursorHooksJson.js.map +0 -1
- package/dist/harness/gooseHooksWriter.d.ts +0 -27
- package/dist/harness/gooseHooksWriter.d.ts.map +0 -1
- package/dist/harness/gooseHooksWriter.js +0 -147
- package/dist/harness/gooseHooksWriter.js.map +0 -1
- package/dist/harness/openhandsHooksWriter.d.ts +0 -23
- package/dist/harness/openhandsHooksWriter.d.ts.map +0 -1
- package/dist/harness/openhandsHooksWriter.js +0 -146
- package/dist/harness/openhandsHooksWriter.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protectedPaths.js","sourceRoot":"","sources":["../../src/harness/protectedPaths.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAE7D,iEAAiE;AACjE,MAAM,CAAC,MAAM,yBAAyB,GAAsB;IAC1D,qCAAqC;IACrC,gBAAgB;IAChB,yBAAyB;IACzB,iBAAiB;IAEjB,sEAAsE;IACtE,4EAA4E;IAC5E,oEAAoE;IACpE,uBAAuB;IACvB,6BAA6B;IAE7B,2EAA2E;IAC3E,sEAAsE;IACtE,iCAAiC;IACjC,oBAAoB;IACpB,cAAc;IACd,8BAA8B;IAC9B,0EAA0E;IAC1E,qEAAqE;IACrE,oEAAoE;IACpE,qEAAqE;IACrE,2CAA2C;IAC3C,qBAAqB;IACrB,sBAAsB;IACtB,uBAAuB;IACvB,uBAAuB;IACvB,oCAAoC;IAEpC,2EAA2E;IAC3E,gEAAgE;IAChE,kBAAkB;IAClB,4BAA4B;IAC5B,yCAAyC;IAEzC,0EAA0E;IAC1E,wEAAwE;IACxE,0EAA0E;IAC1E,qEAAqE;IACrE,wEAAwE;IACxE,qEAAqE;IACrE,uCAAuC;IACvC,aAAa;IACb,mBAAmB;IACnB,4BAA4B;IAE5B,sEAAsE;IACtE,0EAA0E;IAC1E,2EAA2E;IAC3E,wEAAwE;IACxE,uEAAuE;IACvE,wEAAwE;IACxE,2EAA2E;IAC3E,2EAA2E;IAC3E,+CAA+C;IAC/C,eAAe;IACf,oBAAoB;IAEpB,2EAA2E;IAC3E,0EAA0E;IAC1E,yEAAyE;IACzE,mEAAmE;IACnE,mBAAmB;IACnB,kBAAkB;IAClB,0BAA0B;CAC3B,CAAA;AAoGD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH;;;;;;;;;;G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AAG,EAAE,OAAO,CAAC,UAAU,CAAC;IACnE,UAAU,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,iBAAiB,CAAC;CAC9D,CAAC,CAAC,CACJ,CAAC,EAAE,CAAA;AAEN,MAAM,UAAU,0BAA0B;IACxC,OAAO,6BAA6B,CAAA;AACtC,CAAC;AAED;;;;;;;;;;kBAUkB;AAClB,MAAM,UAAU,mBAAmB;IACjC,OAAO;QACL,GAAG,0BAA0B;QAC7B,GAAG,uBAAuB;QAC1B,GAAG,sBAAsB;QACzB,GAAG,0BAA0B,EAAE;KAChC,CAAA;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rooCodeHooks.d.ts","sourceRoot":"","sources":["../../src/harness/rooCodeHooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;
|
|
1
|
+
{"version":3,"file":"rooCodeHooks.d.ts","sourceRoot":"","sources":["../../src/harness/rooCodeHooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAqNH;;;;;;;;;;;GAWG;AACH,wBAAsB,iBAAiB,CACrC,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,MAAM,EAChB,WAAW,SAAK,GACf,OAAO,CAAC,IAAI,CAAC,CAuEf"}
|
|
@@ -20,18 +20,10 @@ import * as path from 'node:path';
|
|
|
20
20
|
import * as os from 'node:os';
|
|
21
21
|
import { createLogger } from '@intutic/logger';
|
|
22
22
|
import { newIso } from '@intutic/id';
|
|
23
|
+
import { emitJsGate, emitJsFailClosedPrelude } from './gateBody.js';
|
|
24
|
+
import { UNIVERSAL_PROTECTED_PATHS } from './protectedPaths.js';
|
|
23
25
|
const log = createLogger('sync-roo-code-hooks');
|
|
24
26
|
/** Governance-sensitive paths that the hook gate protects. */
|
|
25
|
-
const PROTECTED_PATHS = [
|
|
26
|
-
path.join(os.homedir(), '.claude', 'settings.json'),
|
|
27
|
-
path.join(os.homedir(), '.claude', 'settings.local.json'),
|
|
28
|
-
'.claude/settings.json',
|
|
29
|
-
'.claude/settings.local.json',
|
|
30
|
-
'.intutic/hooks',
|
|
31
|
-
'.intutic/integrity.json',
|
|
32
|
-
'.intutic/context_integrity.json',
|
|
33
|
-
'.roorules/hooks',
|
|
34
|
-
];
|
|
35
27
|
// ─── Node.js hook script template ─────────────────────────────────────────────
|
|
36
28
|
function buildRooCheckScript(proxyUrl, workspaceRoot, workspaceId) {
|
|
37
29
|
const hookEventsLog = path.join(workspaceRoot, '.intutic', 'events', 'roo-hook-events.jsonl');
|
|
@@ -52,6 +44,7 @@ function buildRooCheckScript(proxyUrl, workspaceRoot, workspaceId) {
|
|
|
52
44
|
* Workspace: ${workspaceId}
|
|
53
45
|
*/
|
|
54
46
|
'use strict';
|
|
47
|
+
${emitJsFailClosedPrelude({ harness: 'roo-code', contract: 'stdout-cancel' })}
|
|
55
48
|
const path = require('path');
|
|
56
49
|
const os = require('os');
|
|
57
50
|
const fs = require('fs');
|
|
@@ -83,11 +76,12 @@ function loadRuntimeEnv() {
|
|
|
83
76
|
}
|
|
84
77
|
|
|
85
78
|
// ── Governance-sensitive paths ────────────────────────────────────────────────
|
|
86
|
-
|
|
79
|
+
${emitJsGate({ harness: "roo-code", contract: 'stdout-cancel' })}
|
|
87
80
|
|
|
88
81
|
// ── Dual-path logEvent ────────────────────────────────────────────────────────
|
|
89
82
|
const HOOK_EVENTS_LOG = ${JSON.stringify(hookEventsLog)};
|
|
90
83
|
|
|
84
|
+
let _intuticSessionId = '';
|
|
91
85
|
function logEvent(env, verdict, toolName, reason) {
|
|
92
86
|
const ts = new Date().toISOString();
|
|
93
87
|
const incidentId = crypto.createHash('sha1')
|
|
@@ -95,13 +89,16 @@ function logEvent(env, verdict, toolName, reason) {
|
|
|
95
89
|
.digest('hex').slice(0, 16);
|
|
96
90
|
|
|
97
91
|
const entry = {
|
|
98
|
-
|
|
92
|
+
// Passed through, not collapsed to two values: the advisory tier emits
|
|
93
|
+
// 'tool_flagged', and a ternary here silently recorded it as an allow.
|
|
94
|
+
event: verdict,
|
|
99
95
|
toolName,
|
|
100
96
|
reason: reason || '',
|
|
101
97
|
workspaceId: env.INTUTIC_WORKSPACE_ID,
|
|
102
98
|
harnessType: 'roo-code',
|
|
103
99
|
timestamp: ts,
|
|
104
100
|
incidentId,
|
|
101
|
+
...(_intuticSessionId ? { sessionId: _intuticSessionId } : {}),
|
|
105
102
|
};
|
|
106
103
|
|
|
107
104
|
// Path B — reliable file append
|
|
@@ -135,13 +132,13 @@ function logEvent(env, verdict, toolName, reason) {
|
|
|
135
132
|
}
|
|
136
133
|
|
|
137
134
|
function block(env, toolName, reason) {
|
|
138
|
-
logEvent(env, '
|
|
135
|
+
logEvent(env, 'tool_blocked', toolName, reason);
|
|
139
136
|
process.stdout.write(JSON.stringify({ cancel: true, errorMessage: reason }));
|
|
140
137
|
process.exit(0);
|
|
141
138
|
}
|
|
142
139
|
|
|
143
140
|
function allow(env, toolName) {
|
|
144
|
-
logEvent(env, '
|
|
141
|
+
logEvent(env, 'tool_allowed', toolName, '');
|
|
145
142
|
process.stdout.write(JSON.stringify({ cancel: false }));
|
|
146
143
|
process.exit(0);
|
|
147
144
|
}
|
|
@@ -153,47 +150,36 @@ process.stdin.on('data', (chunk) => { inputData += chunk; });
|
|
|
153
150
|
process.stdin.on('end', () => {
|
|
154
151
|
try {
|
|
155
152
|
const ctx = JSON.parse(inputData);
|
|
156
|
-
|
|
153
|
+
_intuticSessionId = ctx.session_id || ctx.sessionId || ctx.conversation_id || ctx.conversationId || ctx.task_id || ctx.taskId || '';
|
|
154
|
+
// An envelope carrying none of the tool fields extracts to empty strings,
|
|
155
|
+
// which match no rule — an allow. Refused instead, and the refusal CANCELS
|
|
156
|
+
// (this harness ignores exit codes); see intuticGuardEnvelope.
|
|
157
|
+
intuticGuardEnvelope(ctx, ['tool_name', 'toolName', 'tool_input', 'toolInput'],
|
|
158
|
+
(v, t, r) => logEvent(runtimeEnv, v, t, r));
|
|
159
|
+
const toolName = (ctx.tool_name || ctx.toolName || '').toLowerCase()
|
|
160
|
+
// Case preserved for the gate. A BLOCK: SOP compiles to a tool-name
|
|
161
|
+
// pattern the operator wrote as they see it (Bash, Write) and this
|
|
162
|
+
// harness lowercases the tool for its own matching. Handing the gate the
|
|
163
|
+
// lowercased form means every SOP tool rule silently matches nothing here
|
|
164
|
+
// while appearing active everywhere else.
|
|
165
|
+
const rawToolName = ctx.tool_name || ctx.toolName || '';
|
|
157
166
|
const toolInput = ctx.tool_input || ctx.toolInput || {};
|
|
158
167
|
const toolInputStr = JSON.stringify(toolInput);
|
|
159
168
|
|
|
160
|
-
//
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
block(runtimeEnv, toolName, reason);
|
|
169
|
-
return;
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
// 2. Bash/shell command bypass guard
|
|
175
|
-
if (toolName === 'bash') {
|
|
176
|
-
const cmd = toolInput.command || toolInput.cmd || '';
|
|
177
|
-
const BYPASS_PATTERNS = [
|
|
178
|
-
'chflags nouchg',
|
|
179
|
-
'chattr -i',
|
|
180
|
-
'rm -rf .intutic',
|
|
181
|
-
'rm -rf .roorules',
|
|
182
|
-
];
|
|
183
|
-
for (const pattern of BYPASS_PATTERNS) {
|
|
184
|
-
if (cmd.includes(pattern)) {
|
|
185
|
-
const reason = 'Shell command matches governance bypass pattern: "' + pattern + '"';
|
|
186
|
-
block(runtimeEnv, toolName, reason);
|
|
187
|
-
return;
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
}
|
|
169
|
+
// Roo Code ignores the exit code and reads a cancel object from stdout, so
|
|
170
|
+
// the shared gate is emitted with the stdout-cancel contract. Getting that
|
|
171
|
+
// wrong is invisible in review — the gate would exit 2 into a harness that
|
|
172
|
+
// never looks at it, and every call would proceed.
|
|
173
|
+
const targetPath = toolInput.path || toolInput.file_path || toolInput.filePath ||
|
|
174
|
+
toolInput.new_path || toolInput.target || toolInput.notebook_path || '';
|
|
175
|
+
const command = toolInput.command || toolInput.cmd || toolInput.script || '';
|
|
176
|
+
intuticGate(rawToolName, targetPath, command, (v, t, r) => logEvent(runtimeEnv, v, t, r), runtimeEnv.INTUTIC_WORKSPACE_ID, toolInput);
|
|
191
177
|
|
|
192
178
|
allow(runtimeEnv, toolName);
|
|
193
179
|
} catch (err) {
|
|
194
180
|
// Fail closed on parse error
|
|
195
181
|
const env = runtimeEnv;
|
|
196
|
-
logEvent(env, '
|
|
182
|
+
logEvent(env, 'tool_blocked', 'unknown', String(err));
|
|
197
183
|
process.stdout.write(JSON.stringify({ cancel: true, errorMessage: '[Intutic] Hook error: ' + String(err) }));
|
|
198
184
|
process.exit(0);
|
|
199
185
|
}
|
|
@@ -217,7 +203,7 @@ function buildRooRulesContent() {
|
|
|
217
203
|
'',
|
|
218
204
|
'The following paths must not be modified by any agent:',
|
|
219
205
|
'',
|
|
220
|
-
...
|
|
206
|
+
...UNIVERSAL_PROTECTED_PATHS.map((p) => `- \`${p}\``),
|
|
221
207
|
'',
|
|
222
208
|
'### Hook Events',
|
|
223
209
|
'',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rooCodeHooks.js","sourceRoot":"","sources":["../../src/harness/rooCodeHooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAA;AACtC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA;AACjC,OAAO,KAAK,EAAE,MAAM,SAAS,CAAA;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"rooCodeHooks.js","sourceRoot":"","sources":["../../src/harness/rooCodeHooks.ts"],"names":[],"mappings":"AAAA;;;;;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A;IACxC,CAAC;SAAM,CAAC;QACN,MAAM,WAAW,GAAG,YAAY,GAAG,cAAc,CAAA;QACjD,MAAM,EAAE,CAAC,SAAS,CAAC,WAAW,EAAE,oBAAoB,EAAE,EAAE,OAAO,CAAC,CAAA;QAChE,MAAM,EAAE,CAAC,MAAM,CAAC,WAAW,EAAE,YAAY,CAAC,CAAA;IAC5C,CAAC;IAED,GAAG,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,mBAAmB,EAAE,EAAE,4BAA4B,CAAC,CAAA;IAEvE,6EAA6E;IAE7E,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,YAAY,CAAC,CAAA;IAC1D,MAAM,WAAW,GAAG;QAClB,KAAK,EAAE;YACL;gBACE,IAAI,EAAE,YAAY;gBAClB,OAAO,EAAE,IAAI;gBACb,OAAO,EAAE,QAAQ,cAAc,EAAE;aAClC;SACF;KACF,CAAA;IAED,MAAM,YAAY,GAAG,aAAa,GAAG,cAAc,CAAA;IACnD,MAAM,EAAE,CAAC,SAAS,CAAC,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,EAAE,OAAO,CAAC,CAAA;IACtF,MAAM,EAAE,CAAC,MAAM,CAAC,YAAY,EAAE,aAAa,CAAC,CAAA;IAE5C,GAAG,CAAC,IAAI,CACN,EAAE,MAAM,EAAE,wBAAwB,EAAE,IAAI,EAAE,aAAa,EAAE,EACzD,6BAA6B,CAC9B,CAAA;AACH,CAAC"}
|
|
@@ -12,6 +12,78 @@
|
|
|
12
12
|
* LLD #14 — Phase 3 cross-harness defence
|
|
13
13
|
* HLD §3.14 — Three-Tier Defense Cascade
|
|
14
14
|
*
|
|
15
|
+
* # Correction (2026-08-18): this file's hook event names and payload
|
|
16
|
+
* # extraction were WRONG from the day this file was written, not a case of
|
|
17
|
+
* # Windsurf changing later
|
|
18
|
+
*
|
|
19
|
+
* The original implementation (2026-06-18) registered
|
|
20
|
+
* `beforeShellExecution`/`beforeMCPExecution`/`beforeFileEdit` — Cursor's
|
|
21
|
+
* event names — under the stated assumption that Windsurf's hook system
|
|
22
|
+
* "registers the same event names Cursor's does." That assumption was never
|
|
23
|
+
* independently verified, and it was wrong: Windsurf/Cascade's REAL hook
|
|
24
|
+
* system (confirmed against docs.devin.ai/desktop/cascade/hooks — the
|
|
25
|
+
* current authoritative source; docs.windsurf.com/windsurf/cascade/hooks
|
|
26
|
+
* redirects there post-Cognition/Devin acquisition — 2026-08-18) uses
|
|
27
|
+
* entirely different event names and a differently-shaped payload, and this
|
|
28
|
+
* naming was ALREADY the live one when this file was first written — a
|
|
29
|
+
* March-2026 third-party integration guide already documents
|
|
30
|
+
* `pre_run_command`/`tool_info.command_line`, predating this file's own
|
|
31
|
+
* 2026-06-18 commit date. This was a copy-without-verifying mistake at
|
|
32
|
+
* authoring time, not a later drift.
|
|
33
|
+
*
|
|
34
|
+
* Confirmed real facts, all from docs.devin.ai/desktop/cascade/hooks:
|
|
35
|
+
* - Event names (the `hooks.json` top-level keys) are `pre_run_command`,
|
|
36
|
+
* `pre_write_code`, `pre_mcp_tool_use` (plus `post_*` variants this file
|
|
37
|
+
* has no use for — only pre-hooks can block, via exit code 2; any other
|
|
38
|
+
* non-zero exit is treated as a hook ERROR and the action proceeds, i.e.
|
|
39
|
+
* Cascade fails OPEN if this script itself cannot run — same as every
|
|
40
|
+
* other harness in this codebase, not a Windsurf-specific gap).
|
|
41
|
+
* - Each event's value in `hooks.json` is an ARRAY of `{command, ...}`
|
|
42
|
+
* objects, not a single object — `[{command: "..."}]`, not
|
|
43
|
+
* `{command: "..."}`. There is no `failClosed` field in Windsurf's schema
|
|
44
|
+
* (that was Cursor's field, also copied without verification); dropped
|
|
45
|
+
* from the config this file writes.
|
|
46
|
+
* - The payload delivered on stdin has `agent_action_name` as its event-name
|
|
47
|
+
* field (not `hook_event_name`/`event`, which are Cursor's field names),
|
|
48
|
+
* and nests event-specific data under `tool_info`:
|
|
49
|
+
* `tool_info.command_line`/`tool_info.cwd` for `pre_run_command`,
|
|
50
|
+
* `tool_info.file_path`/`tool_info.edits[]` for `pre_write_code`,
|
|
51
|
+
* `tool_info.mcp_server_name`/`tool_info.mcp_tool_name`/
|
|
52
|
+
* `tool_info.mcp_tool_arguments` for `pre_mcp_tool_use`. `trajectory_id`
|
|
53
|
+
* is Cascade's real conversation-identifier field.
|
|
54
|
+
*
|
|
55
|
+
* # Follow-up (2026-08-18): JetBrains plugin coverage
|
|
56
|
+
*
|
|
57
|
+
* The JetBrains plugin reads user-level hooks.json from a DIFFERENT path —
|
|
58
|
+
* `~/.codeium/hooks.json`, no `windsurf` subdirectory — which this file now
|
|
59
|
+
* also writes (same config content). Its own changelog (v2.12.4) naming
|
|
60
|
+
* `post_setup_worktree`, one of Cascade's documented event names, as a hook
|
|
61
|
+
* it added is corroborating evidence the JetBrains plugin dispatches the
|
|
62
|
+
* SAME event/payload system as Desktop, not a guess. Workspace-level
|
|
63
|
+
* `.windsurf/hooks.json` needed no change — that path is workspace-root-
|
|
64
|
+
* relative, not app-specific, so the existing write already covers both
|
|
65
|
+
* clients. Still not independently verified: whether `post_mcp_tool_use`'s
|
|
66
|
+
* `mcp_result` field would be useful for anything (it isn't used here —
|
|
67
|
+
* post-hooks can't block, so there is nothing this file's threat model
|
|
68
|
+
* gains from it).
|
|
69
|
+
*
|
|
70
|
+
* # Follow-up 2 (2026-08-18): JetBrains proxy configuration
|
|
71
|
+
*
|
|
72
|
+
* The JetBrains plugin's proxy-config surface — the thing that decides
|
|
73
|
+
* whether its OWN AI traffic (not just hook dispatch) routes through
|
|
74
|
+
* Intutic's TLS MITM proxy — is now also configured, via
|
|
75
|
+
* `windsurfJetBrainsProxy.ts`. See that module's doc comment for the full
|
|
76
|
+
* research record: the plugin has no manual-proxy field of its own (only
|
|
77
|
+
* a `detectProxy` boolean that opts into the IDE PLATFORM's proxy
|
|
78
|
+
* setting), confirmed by decompiling the actual published plugin JAR, not
|
|
79
|
+
* guessed.
|
|
80
|
+
*
|
|
81
|
+
* The Cursor-shaped field names this file previously relied on exclusively
|
|
82
|
+
* are kept as a SECOND, lower-priority fallback in the extraction below —
|
|
83
|
+
* not because they are believed to be real for Windsurf, but because they
|
|
84
|
+
* cost nothing to keep checking and this file has already been wrong about
|
|
85
|
+
* a Windsurf-specific assumption once.
|
|
86
|
+
*
|
|
15
87
|
* @module
|
|
16
88
|
*/
|
|
17
89
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"windsurfHooks.d.ts","sourceRoot":"","sources":["../../src/harness/windsurfHooks.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"windsurfHooks.d.ts","sourceRoot":"","sources":["../../src/harness/windsurfHooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuFG;AAuKH;;;;;;;;GAQG;AACH,wBAAsB,kBAAkB,CACtC,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,MAAM,EAChB,SAAS,SAAO,EAChB,WAAW,SAAK,GACf,OAAO,CAAC,IAAI,CAAC,CAwEf"}
|
|
@@ -12,6 +12,78 @@
|
|
|
12
12
|
* LLD #14 — Phase 3 cross-harness defence
|
|
13
13
|
* HLD §3.14 — Three-Tier Defense Cascade
|
|
14
14
|
*
|
|
15
|
+
* # Correction (2026-08-18): this file's hook event names and payload
|
|
16
|
+
* # extraction were WRONG from the day this file was written, not a case of
|
|
17
|
+
* # Windsurf changing later
|
|
18
|
+
*
|
|
19
|
+
* The original implementation (2026-06-18) registered
|
|
20
|
+
* `beforeShellExecution`/`beforeMCPExecution`/`beforeFileEdit` — Cursor's
|
|
21
|
+
* event names — under the stated assumption that Windsurf's hook system
|
|
22
|
+
* "registers the same event names Cursor's does." That assumption was never
|
|
23
|
+
* independently verified, and it was wrong: Windsurf/Cascade's REAL hook
|
|
24
|
+
* system (confirmed against docs.devin.ai/desktop/cascade/hooks — the
|
|
25
|
+
* current authoritative source; docs.windsurf.com/windsurf/cascade/hooks
|
|
26
|
+
* redirects there post-Cognition/Devin acquisition — 2026-08-18) uses
|
|
27
|
+
* entirely different event names and a differently-shaped payload, and this
|
|
28
|
+
* naming was ALREADY the live one when this file was first written — a
|
|
29
|
+
* March-2026 third-party integration guide already documents
|
|
30
|
+
* `pre_run_command`/`tool_info.command_line`, predating this file's own
|
|
31
|
+
* 2026-06-18 commit date. This was a copy-without-verifying mistake at
|
|
32
|
+
* authoring time, not a later drift.
|
|
33
|
+
*
|
|
34
|
+
* Confirmed real facts, all from docs.devin.ai/desktop/cascade/hooks:
|
|
35
|
+
* - Event names (the `hooks.json` top-level keys) are `pre_run_command`,
|
|
36
|
+
* `pre_write_code`, `pre_mcp_tool_use` (plus `post_*` variants this file
|
|
37
|
+
* has no use for — only pre-hooks can block, via exit code 2; any other
|
|
38
|
+
* non-zero exit is treated as a hook ERROR and the action proceeds, i.e.
|
|
39
|
+
* Cascade fails OPEN if this script itself cannot run — same as every
|
|
40
|
+
* other harness in this codebase, not a Windsurf-specific gap).
|
|
41
|
+
* - Each event's value in `hooks.json` is an ARRAY of `{command, ...}`
|
|
42
|
+
* objects, not a single object — `[{command: "..."}]`, not
|
|
43
|
+
* `{command: "..."}`. There is no `failClosed` field in Windsurf's schema
|
|
44
|
+
* (that was Cursor's field, also copied without verification); dropped
|
|
45
|
+
* from the config this file writes.
|
|
46
|
+
* - The payload delivered on stdin has `agent_action_name` as its event-name
|
|
47
|
+
* field (not `hook_event_name`/`event`, which are Cursor's field names),
|
|
48
|
+
* and nests event-specific data under `tool_info`:
|
|
49
|
+
* `tool_info.command_line`/`tool_info.cwd` for `pre_run_command`,
|
|
50
|
+
* `tool_info.file_path`/`tool_info.edits[]` for `pre_write_code`,
|
|
51
|
+
* `tool_info.mcp_server_name`/`tool_info.mcp_tool_name`/
|
|
52
|
+
* `tool_info.mcp_tool_arguments` for `pre_mcp_tool_use`. `trajectory_id`
|
|
53
|
+
* is Cascade's real conversation-identifier field.
|
|
54
|
+
*
|
|
55
|
+
* # Follow-up (2026-08-18): JetBrains plugin coverage
|
|
56
|
+
*
|
|
57
|
+
* The JetBrains plugin reads user-level hooks.json from a DIFFERENT path —
|
|
58
|
+
* `~/.codeium/hooks.json`, no `windsurf` subdirectory — which this file now
|
|
59
|
+
* also writes (same config content). Its own changelog (v2.12.4) naming
|
|
60
|
+
* `post_setup_worktree`, one of Cascade's documented event names, as a hook
|
|
61
|
+
* it added is corroborating evidence the JetBrains plugin dispatches the
|
|
62
|
+
* SAME event/payload system as Desktop, not a guess. Workspace-level
|
|
63
|
+
* `.windsurf/hooks.json` needed no change — that path is workspace-root-
|
|
64
|
+
* relative, not app-specific, so the existing write already covers both
|
|
65
|
+
* clients. Still not independently verified: whether `post_mcp_tool_use`'s
|
|
66
|
+
* `mcp_result` field would be useful for anything (it isn't used here —
|
|
67
|
+
* post-hooks can't block, so there is nothing this file's threat model
|
|
68
|
+
* gains from it).
|
|
69
|
+
*
|
|
70
|
+
* # Follow-up 2 (2026-08-18): JetBrains proxy configuration
|
|
71
|
+
*
|
|
72
|
+
* The JetBrains plugin's proxy-config surface — the thing that decides
|
|
73
|
+
* whether its OWN AI traffic (not just hook dispatch) routes through
|
|
74
|
+
* Intutic's TLS MITM proxy — is now also configured, via
|
|
75
|
+
* `windsurfJetBrainsProxy.ts`. See that module's doc comment for the full
|
|
76
|
+
* research record: the plugin has no manual-proxy field of its own (only
|
|
77
|
+
* a `detectProxy` boolean that opts into the IDE PLATFORM's proxy
|
|
78
|
+
* setting), confirmed by decompiling the actual published plugin JAR, not
|
|
79
|
+
* guessed.
|
|
80
|
+
*
|
|
81
|
+
* The Cursor-shaped field names this file previously relied on exclusively
|
|
82
|
+
* are kept as a SECOND, lower-priority fallback in the extraction below —
|
|
83
|
+
* not because they are believed to be real for Windsurf, but because they
|
|
84
|
+
* cost nothing to keep checking and this file has already been wrong about
|
|
85
|
+
* a Windsurf-specific assumption once.
|
|
86
|
+
*
|
|
15
87
|
* @module
|
|
16
88
|
*/
|
|
17
89
|
import * as fs from 'node:fs/promises';
|
|
@@ -19,37 +91,28 @@ import * as path from 'node:path';
|
|
|
19
91
|
import * as os from 'node:os';
|
|
20
92
|
import { createLogger } from '@intutic/logger';
|
|
21
93
|
import { newIso } from '@intutic/id';
|
|
94
|
+
import { emitJsGate, emitJsFailClosedPrelude } from './gateBody.js';
|
|
95
|
+
import { configureJetBrainsWindsurfProxy } from './windsurfJetBrainsProxy.js';
|
|
22
96
|
const log = createLogger('sync-windsurf-hooks');
|
|
23
97
|
const WINDSURF_USER_DIR = path.join(os.homedir(), '.codeium', 'windsurf');
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
98
|
+
/** The JetBrains plugin's user-level hooks.json lives directly under
|
|
99
|
+
* `~/.codeium` — no `windsurf` subdirectory — confirmed against
|
|
100
|
+
* docs.devin.ai/desktop/cascade/hooks (see module doc comment). Only
|
|
101
|
+
* hooks.json goes here: this writer's `settings.json` proxy-config write
|
|
102
|
+
* targets Desktop's known path specifically, and whether/how the
|
|
103
|
+
* JetBrains plugin has an equivalent proxy-config surface was not
|
|
104
|
+
* researched — out of scope for this fix, which is about hook dispatch. */
|
|
105
|
+
const WINDSURF_JETBRAINS_USER_DIR = path.join(os.homedir(), '.codeium');
|
|
106
|
+
/** Cascade's real pre-hook event names (see module doc comment). Each maps
|
|
107
|
+
* to an ARRAY of hook entries in `hooks.json` — Windsurf's schema, unlike
|
|
108
|
+
* Cursor's, has no `failClosed` field; exit code 2 is the only block
|
|
109
|
+
* signal Cascade recognizes. */
|
|
110
|
+
const CASCADE_HOOK_EVENTS = ['pre_run_command', 'pre_write_code', 'pre_mcp_tool_use'];
|
|
35
111
|
function buildHooksConfig(hookScriptPath) {
|
|
36
112
|
return {
|
|
37
113
|
_comment: 'Intutic governance hooks — auto-generated. DO NOT EDIT.',
|
|
38
114
|
_lastSync: newIso(),
|
|
39
|
-
hooks: {
|
|
40
|
-
beforeShellExecution: {
|
|
41
|
-
command: `node "${hookScriptPath}"`,
|
|
42
|
-
failClosed: true,
|
|
43
|
-
},
|
|
44
|
-
beforeMCPExecution: {
|
|
45
|
-
command: `node "${hookScriptPath}"`,
|
|
46
|
-
failClosed: true,
|
|
47
|
-
},
|
|
48
|
-
beforeFileEdit: {
|
|
49
|
-
command: `node "${hookScriptPath}"`,
|
|
50
|
-
failClosed: true,
|
|
51
|
-
},
|
|
52
|
-
},
|
|
115
|
+
hooks: Object.fromEntries(CASCADE_HOOK_EVENTS.map((event) => [event, [{ command: `node "${hookScriptPath}"` }]])),
|
|
53
116
|
};
|
|
54
117
|
}
|
|
55
118
|
function buildHookScript(proxyUrl, workspaceRoot, workspaceId) {
|
|
@@ -61,6 +124,7 @@ function buildHookScript(proxyUrl, workspaceRoot, workspaceId) {
|
|
|
61
124
|
* Proxy: ${proxyUrl}
|
|
62
125
|
* Generated: ${newIso()}
|
|
63
126
|
*/
|
|
127
|
+
${emitJsFailClosedPrelude({ harness: 'windsurf', contract: 'exit2' })}
|
|
64
128
|
const fs = require('fs');
|
|
65
129
|
const crypto = require('crypto');
|
|
66
130
|
const https = require('https');
|
|
@@ -78,19 +142,23 @@ try {
|
|
|
78
142
|
});
|
|
79
143
|
} catch {}
|
|
80
144
|
|
|
81
|
-
|
|
145
|
+
${emitJsGate({ harness: "windsurf", contract: 'exit2' })}
|
|
82
146
|
|
|
147
|
+
let _intuticSessionId = '';
|
|
83
148
|
function logEvent(verdict, toolName, reason) {
|
|
84
149
|
try {
|
|
85
150
|
const ts = new Date().toISOString();
|
|
86
151
|
const incidentId = crypto.createHash('sha1').update(ts + toolName + _intuticWsId).digest('hex').slice(0, 16);
|
|
87
152
|
const entry = JSON.stringify({
|
|
88
|
-
|
|
153
|
+
// Passed through, not collapsed to two values: the advisory tier emits
|
|
154
|
+
// 'tool_flagged', and a ternary here silently recorded it as an allow.
|
|
155
|
+
event: verdict,
|
|
89
156
|
toolName, reason: reason || '',
|
|
90
157
|
workspaceId: _intuticWsId,
|
|
91
158
|
harnessType: 'windsurf',
|
|
92
159
|
timestamp: ts,
|
|
93
160
|
incidentId,
|
|
161
|
+
...(_intuticSessionId ? { sessionId: _intuticSessionId } : {}),
|
|
94
162
|
}) + '\\n';
|
|
95
163
|
fs.appendFileSync(${JSON.stringify(hookEventsLog)}, entry, { flag: 'a' });
|
|
96
164
|
if (_intuticKey) {
|
|
@@ -111,41 +179,63 @@ process.stdin.on('data', (c) => { raw += c; });
|
|
|
111
179
|
process.stdin.on('end', () => {
|
|
112
180
|
try {
|
|
113
181
|
const ctx = JSON.parse(raw);
|
|
114
|
-
|
|
115
|
-
|
|
182
|
+
_intuticSessionId = ctx.trajectory_id || ctx.trajectoryId || ctx.session_id || ctx.sessionId ||
|
|
183
|
+
ctx.conversation_id || ctx.conversationId || ctx.task_id || ctx.taskId || '';
|
|
184
|
+
// 'agent_action_name' and 'tool_info' are Cascade's REAL top-level
|
|
185
|
+
// fields (docs.devin.ai/desktop/cascade/hooks; see this file's module
|
|
186
|
+
// doc comment for the correction record). The rest of this list is the
|
|
187
|
+
// Claude-Code-shaped envelope this repo's own generic gate-behaviour
|
|
188
|
+
// test suite drives every harness writer with uniformly, plus the
|
|
189
|
+
// Cursor-shaped fields this file incorrectly targeted before — kept so
|
|
190
|
+
// neither that test coverage nor an unconfirmed Windsurf variant loses
|
|
191
|
+
// recognition.
|
|
192
|
+
intuticGuardEnvelope(ctx, ['agent_action_name', 'tool_info', 'tool_name', 'toolName', 'tool_input', 'toolInput',
|
|
193
|
+
'input', 'event', 'hook_event_name', 'command', 'cmd', 'script', 'path', 'file_path', 'filePath', 'file',
|
|
194
|
+
'target', 'notebook_path'], logEvent);
|
|
195
|
+
// Cascade's real event field is 'agent_action_name' (values like
|
|
196
|
+
// 'pre_run_command'/'pre_write_code'/'pre_mcp_tool_use'), checked
|
|
197
|
+
// first. 'hook_event_name'/'event' are Cursor's field names, kept as a
|
|
198
|
+
// fallback this file no longer trusts as primary.
|
|
199
|
+
const event = (ctx.agent_action_name || ctx.hook_event_name || ctx.event || '').toLowerCase();
|
|
200
|
+
// Cascade nests event-specific data under 'tool_info' — NOT 'input' or
|
|
201
|
+
// 'tool_input', which are the Claude-Code/Cursor-shaped fields this file
|
|
202
|
+
// previously read exclusively. Prefer 'tool_info' when present; fall
|
|
203
|
+
// back to the others for the generic test envelope / an unconfirmed
|
|
204
|
+
// variant.
|
|
205
|
+
const toolInfo = ctx.tool_info || {};
|
|
206
|
+
const input = ctx.input || ctx.tool_input || ctx.toolInput || toolInfo || ctx;
|
|
116
207
|
|
|
117
|
-
const targetPath = input.path || input.
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
process.stderr.write('[Intutic Governance] BLOCKED: ' + reason + '\\n');
|
|
122
|
-
logEvent('blocked', 'edit', reason);
|
|
123
|
-
process.exit(2);
|
|
124
|
-
}
|
|
125
|
-
}
|
|
208
|
+
const targetPath = toolInfo.file_path || input.path || input.file_path || input.filePath || input.file ||
|
|
209
|
+
input.target || input.notebook_path || '';
|
|
210
|
+
const command = toolInfo.command_line || input.command || input.cmd || input.script || '';
|
|
211
|
+
let toolName = ctx.tool_name || ctx.toolName || event || 'tool';
|
|
126
212
|
|
|
127
|
-
//
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
process.exit(2);
|
|
140
|
-
}
|
|
213
|
+
// M3: compose \`mcp__<server>__<tool>\` for an MCP tool call. Cascade's
|
|
214
|
+
// CONFIRMED real shape is event 'pre_mcp_tool_use' with
|
|
215
|
+
// tool_info.mcp_server_name/tool_info.mcp_tool_name (see module doc
|
|
216
|
+
// comment). The 'beforemcpexecution'/ctx.command-or-url branch below is
|
|
217
|
+
// Cursor's shape, which this file previously assumed without
|
|
218
|
+
// verification and which never matched anything Cascade actually
|
|
219
|
+
// sends — kept only as a fallback, now second priority.
|
|
220
|
+
if (event === 'pre_mcp_tool_use' && toolInfo.mcp_tool_name) {
|
|
221
|
+
toolName = 'mcp__' + toolInfo.mcp_server_name + '__' + toolInfo.mcp_tool_name;
|
|
222
|
+
} else if (event === 'beforemcpexecution' && ctx.tool_name) {
|
|
223
|
+
const mcpServer = ctx.command || ctx.url || ctx.server_name || ctx.serverName;
|
|
224
|
+
if (mcpServer) toolName = 'mcp__' + mcpServer + '__' + ctx.tool_name;
|
|
141
225
|
}
|
|
142
226
|
|
|
143
|
-
|
|
227
|
+
// The block reason now comes from the shared gate and always contains
|
|
228
|
+
// "governance rule". hookEvents.resolveSeverity keys CRITICAL off the
|
|
229
|
+
// "governance-protected" substring, and this was the one harness of twelve
|
|
230
|
+
// that omitted it — so a Windsurf agent caught tampering was filed MEDIUM.
|
|
231
|
+
intuticGate(toolName, targetPath, command, logEvent, _intuticWsId, input);
|
|
232
|
+
|
|
233
|
+
logEvent('tool_allowed', toolName, '');
|
|
144
234
|
process.exit(0);
|
|
145
235
|
} catch (err) {
|
|
146
236
|
const errMsg = String(err);
|
|
147
237
|
process.stderr.write('[Intutic Governance] Hook error (fail-closed): ' + errMsg + '\\n');
|
|
148
|
-
logEvent('
|
|
238
|
+
logEvent('tool_blocked', 'unknown', errMsg);
|
|
149
239
|
process.exit(2);
|
|
150
240
|
}
|
|
151
241
|
});
|
|
@@ -171,19 +261,38 @@ export async function writeWindsurfHooks(workspaceRoot, proxyUrl, proxyPort = 88
|
|
|
171
261
|
await fs.rename(tmpScript, hookScriptPath);
|
|
172
262
|
await fs.chmod(hookScriptPath, 0o755);
|
|
173
263
|
const config = buildHooksConfig(hookScriptPath);
|
|
174
|
-
// 1. User-level hooks
|
|
264
|
+
// 1. User-level hooks — Desktop's path.
|
|
175
265
|
await fs.mkdir(WINDSURF_USER_DIR, { recursive: true });
|
|
176
266
|
await atomicWriteJson(path.join(WINDSURF_USER_DIR, 'hooks.json'), config);
|
|
177
267
|
log.info({ action: 'windsurf_hooks_written', level: 'user' }, 'Windsurf user-level hooks written');
|
|
178
|
-
//
|
|
268
|
+
// 1b. User-level hooks — the JetBrains plugin's SEPARATE path. Same config
|
|
269
|
+
// content: the JetBrains plugin's own changelog (v2.12.4) names
|
|
270
|
+
// `post_setup_worktree` — one of Cascade's documented event names — as a
|
|
271
|
+
// hook it added, which is corroborating evidence (not a guess) that it
|
|
272
|
+
// dispatches the same Cascade hook event/payload system as Desktop, just
|
|
273
|
+
// reads its user-level config from this different file.
|
|
274
|
+
await fs.mkdir(WINDSURF_JETBRAINS_USER_DIR, { recursive: true });
|
|
275
|
+
await atomicWriteJson(path.join(WINDSURF_JETBRAINS_USER_DIR, 'hooks.json'), config);
|
|
276
|
+
log.info({ action: 'windsurf_hooks_written', level: 'user-jetbrains' }, 'Windsurf JetBrains plugin user-level hooks written');
|
|
277
|
+
// 2. Workspace-level hooks (.windsurf/hooks.json) — the SAME relative path
|
|
278
|
+
// for both Desktop and the JetBrains plugin (workspace-root-relative, not
|
|
279
|
+
// app-specific), so this one write already covers both. Hooks configured
|
|
280
|
+
// at multiple levels are NOT one-wins: Cascade runs every level's hooks
|
|
281
|
+
// for a matching event, in order system → user → workspace (confirmed
|
|
282
|
+
// against docs.devin.ai/desktop/cascade/hooks) — an earlier version of
|
|
283
|
+
// this comment claimed user-level "takes precedence," which was another
|
|
284
|
+
// unverified assumption.
|
|
179
285
|
const wsWindsurfDir = path.join(workspaceRoot, '.windsurf');
|
|
180
286
|
await fs.mkdir(wsWindsurfDir, { recursive: true });
|
|
181
287
|
await atomicWriteJson(path.join(wsWindsurfDir, 'hooks.json'), {
|
|
182
288
|
...config,
|
|
183
|
-
_note: 'Workspace-level hooks — agent may be able to modify this file.
|
|
289
|
+
_note: 'Workspace-level hooks — agent may be able to modify this file. Runs IN ADDITION to ' +
|
|
290
|
+
'user-level hooks (Cascade runs every configured level for a matching event; last-wins/' +
|
|
291
|
+
'precedence is not how this works), so this file being tampered with does not disable ' +
|
|
292
|
+
'user-level enforcement.',
|
|
184
293
|
});
|
|
185
294
|
log.info({ action: 'windsurf_hooks_written', level: 'workspace' }, 'Windsurf workspace-level hooks written');
|
|
186
|
-
// 3. HTTP proxy settings
|
|
295
|
+
// 3. HTTP proxy settings — Desktop's own settings.json.
|
|
187
296
|
const wsSettings = {
|
|
188
297
|
_comment: 'Intutic proxy settings — auto-generated. DO NOT EDIT.',
|
|
189
298
|
_lastSync: newIso(),
|
|
@@ -193,6 +302,11 @@ export async function writeWindsurfHooks(workspaceRoot, proxyUrl, proxyPort = 88
|
|
|
193
302
|
};
|
|
194
303
|
await atomicWriteJson(path.join(WINDSURF_USER_DIR, 'settings.json'), wsSettings);
|
|
195
304
|
log.info({ action: 'windsurf_proxy_configured', port: proxyPort }, 'Windsurf HTTP proxy configured for TLS MITM interception');
|
|
305
|
+
// 4. HTTP proxy settings — every installed JetBrains product. See
|
|
306
|
+
// windsurfJetBrainsProxy.ts's module doc comment for what this
|
|
307
|
+
// configures and why it needs two merge-writes per product rather than
|
|
308
|
+
// one owned file the way Desktop's settings.json is.
|
|
309
|
+
await configureJetBrainsWindsurfProxy(proxyPort);
|
|
196
310
|
}
|
|
197
311
|
async function atomicWriteJson(filePath, data) {
|
|
198
312
|
const tmp = filePath + '.intutic-tmp';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"windsurfHooks.js","sourceRoot":"","sources":["../../src/harness/windsurfHooks.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"windsurfHooks.js","sourceRoot":"","sources":["../../src/harness/windsurfHooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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