@intutic/sync-daemon 2.2.0 → 2.4.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.
Files changed (235) hide show
  1. package/README.md +1 -1
  2. package/dist/agentReporter.d.ts +23 -11
  3. package/dist/agentReporter.d.ts.map +1 -1
  4. package/dist/agentReporter.js +20 -13
  5. package/dist/agentReporter.js.map +1 -1
  6. package/dist/configReader.d.ts +1 -3
  7. package/dist/configReader.d.ts.map +1 -1
  8. package/dist/configReader.js +0 -2
  9. package/dist/configReader.js.map +1 -1
  10. package/dist/configWriter.d.ts +11 -12
  11. package/dist/configWriter.d.ts.map +1 -1
  12. package/dist/configWriter.js +35 -58
  13. package/dist/configWriter.js.map +1 -1
  14. package/dist/disconnect/harnesses.d.ts +0 -2
  15. package/dist/disconnect/harnesses.d.ts.map +1 -1
  16. package/dist/disconnect/harnesses.js +157 -80
  17. package/dist/disconnect/harnesses.js.map +1 -1
  18. package/dist/disconnect/index.d.ts.map +1 -1
  19. package/dist/disconnect/index.js +11 -1
  20. package/dist/disconnect/index.js.map +1 -1
  21. package/dist/disconnect/mcp.d.ts +21 -0
  22. package/dist/disconnect/mcp.d.ts.map +1 -1
  23. package/dist/disconnect/mcp.js +71 -0
  24. package/dist/disconnect/mcp.js.map +1 -1
  25. package/dist/disconnect/recognise.d.ts +2 -2
  26. package/dist/disconnect/recognise.d.ts.map +1 -1
  27. package/dist/disconnect/recognise.js +15 -5
  28. package/dist/disconnect/recognise.js.map +1 -1
  29. package/dist/harness/aiderConfigMerger.d.ts +28 -8
  30. package/dist/harness/aiderConfigMerger.d.ts.map +1 -1
  31. package/dist/harness/aiderConfigMerger.js +59 -11
  32. package/dist/harness/aiderConfigMerger.js.map +1 -1
  33. package/dist/harness/antigravityCliHooks.d.ts +61 -0
  34. package/dist/harness/antigravityCliHooks.d.ts.map +1 -0
  35. package/dist/harness/antigravityCliHooks.js +207 -0
  36. package/dist/harness/antigravityCliHooks.js.map +1 -0
  37. package/dist/harness/antigravityHooks.d.ts +12 -2
  38. package/dist/harness/antigravityHooks.d.ts.map +1 -1
  39. package/dist/harness/antigravityHooks.js +36 -16
  40. package/dist/harness/antigravityHooks.js.map +1 -1
  41. package/dist/harness/antigravityProducts.d.ts +40 -0
  42. package/dist/harness/antigravityProducts.d.ts.map +1 -0
  43. package/dist/harness/antigravityProducts.js +109 -0
  44. package/dist/harness/antigravityProducts.js.map +1 -0
  45. package/dist/harness/claudeAgentsMd.d.ts +29 -0
  46. package/dist/harness/claudeAgentsMd.d.ts.map +1 -0
  47. package/dist/harness/claudeAgentsMd.js +80 -0
  48. package/dist/harness/claudeAgentsMd.js.map +1 -0
  49. package/dist/harness/claudeCodeHooks.d.ts +6 -5
  50. package/dist/harness/claudeCodeHooks.d.ts.map +1 -1
  51. package/dist/harness/claudeCodeHooks.js +98 -24
  52. package/dist/harness/claudeCodeHooks.js.map +1 -1
  53. package/dist/harness/clineHooks.d.ts +0 -1
  54. package/dist/harness/clineHooks.d.ts.map +1 -1
  55. package/dist/harness/clineHooks.js +10 -4
  56. package/dist/harness/clineHooks.js.map +1 -1
  57. package/dist/harness/codexHooks.d.ts +2 -0
  58. package/dist/harness/codexHooks.d.ts.map +1 -1
  59. package/dist/harness/codexHooks.js +12 -4
  60. package/dist/harness/codexHooks.js.map +1 -1
  61. package/dist/harness/cursorHooks.d.ts +5 -2
  62. package/dist/harness/cursorHooks.d.ts.map +1 -1
  63. package/dist/harness/cursorHooks.js +9 -3
  64. package/dist/harness/cursorHooks.js.map +1 -1
  65. package/dist/harness/dshHooks.d.ts +5 -5
  66. package/dist/harness/dshHooks.d.ts.map +1 -1
  67. package/dist/harness/dshHooks.js +5 -5
  68. package/dist/harness/gateArtifacts.d.ts +35 -0
  69. package/dist/harness/gateArtifacts.d.ts.map +1 -0
  70. package/dist/harness/gateArtifacts.js +88 -0
  71. package/dist/harness/gateArtifacts.js.map +1 -0
  72. package/dist/harness/gateBody.d.ts +186 -69
  73. package/dist/harness/gateBody.d.ts.map +1 -1
  74. package/dist/harness/gateBody.js +820 -182
  75. package/dist/harness/gateBody.js.map +1 -1
  76. package/dist/harness/gateSightings.d.ts +47 -0
  77. package/dist/harness/gateSightings.d.ts.map +1 -0
  78. package/dist/harness/gateSightings.js +159 -0
  79. package/dist/harness/gateSightings.js.map +1 -0
  80. package/dist/harness/githubCopilotHooks.d.ts.map +1 -1
  81. package/dist/harness/githubCopilotHooks.js +7 -1
  82. package/dist/harness/githubCopilotHooks.js.map +1 -1
  83. package/dist/harness/gooseHardener.d.ts +0 -1
  84. package/dist/harness/gooseHardener.d.ts.map +1 -1
  85. package/dist/harness/gooseHardener.js +1 -1
  86. package/dist/harness/gooseHardener.js.map +1 -1
  87. package/dist/harness/gooseHooks.d.ts +14 -1
  88. package/dist/harness/gooseHooks.d.ts.map +1 -1
  89. package/dist/harness/gooseHooks.js +55 -29
  90. package/dist/harness/gooseHooks.js.map +1 -1
  91. package/dist/harness/grokHooks.d.ts +2 -2
  92. package/dist/harness/grokHooks.d.ts.map +1 -1
  93. package/dist/harness/grokHooks.js +11 -6
  94. package/dist/harness/grokHooks.js.map +1 -1
  95. package/dist/harness/hermesHooks.d.ts +18 -8
  96. package/dist/harness/hermesHooks.d.ts.map +1 -1
  97. package/dist/harness/hermesHooks.js +48 -17
  98. package/dist/harness/hermesHooks.js.map +1 -1
  99. package/dist/harness/mcpAutoWrite.d.ts +24 -9
  100. package/dist/harness/mcpAutoWrite.d.ts.map +1 -1
  101. package/dist/harness/mcpAutoWrite.js +218 -25
  102. package/dist/harness/mcpAutoWrite.js.map +1 -1
  103. package/dist/harness/museHooks.d.ts +3 -3
  104. package/dist/harness/museHooks.d.ts.map +1 -1
  105. package/dist/harness/museHooks.js +9 -5
  106. package/dist/harness/museHooks.js.map +1 -1
  107. package/dist/harness/n8nHooks.d.ts +0 -1
  108. package/dist/harness/n8nHooks.d.ts.map +1 -1
  109. package/dist/harness/n8nHooks.js +4 -1
  110. package/dist/harness/n8nHooks.js.map +1 -1
  111. package/dist/harness/openCodeHooks.d.ts +2 -2
  112. package/dist/harness/openCodeHooks.d.ts.map +1 -1
  113. package/dist/harness/openCodeHooks.js +7 -3
  114. package/dist/harness/openCodeHooks.js.map +1 -1
  115. package/dist/harness/openWebuiHooks.d.ts +0 -1
  116. package/dist/harness/openWebuiHooks.d.ts.map +1 -1
  117. package/dist/harness/openWebuiHooks.js +5 -1
  118. package/dist/harness/openWebuiHooks.js.map +1 -1
  119. package/dist/harness/openclawHooks.d.ts +70 -18
  120. package/dist/harness/openclawHooks.d.ts.map +1 -1
  121. package/dist/harness/openclawHooks.js +213 -161
  122. package/dist/harness/openclawHooks.js.map +1 -1
  123. package/dist/harness/openhandsHooks.d.ts +24 -10
  124. package/dist/harness/openhandsHooks.d.ts.map +1 -1
  125. package/dist/harness/openhandsHooks.js +49 -48
  126. package/dist/harness/openhandsHooks.js.map +1 -1
  127. package/dist/harness/piHooks.d.ts +52 -17
  128. package/dist/harness/piHooks.d.ts.map +1 -1
  129. package/dist/harness/piHooks.js +177 -166
  130. package/dist/harness/piHooks.js.map +1 -1
  131. package/dist/harness/protectedPaths.d.ts +107 -25
  132. package/dist/harness/protectedPaths.d.ts.map +1 -1
  133. package/dist/harness/protectedPaths.js +342 -48
  134. package/dist/harness/protectedPaths.js.map +1 -1
  135. package/dist/harness/rulesSection.d.ts +62 -0
  136. package/dist/harness/rulesSection.d.ts.map +1 -0
  137. package/dist/harness/rulesSection.js +145 -0
  138. package/dist/harness/rulesSection.js.map +1 -0
  139. package/dist/harness/windsurfHooks.d.ts +0 -1
  140. package/dist/harness/windsurfHooks.d.ts.map +1 -1
  141. package/dist/harness/windsurfHooks.js +4 -1
  142. package/dist/harness/windsurfHooks.js.map +1 -1
  143. package/dist/index.d.ts +12 -8
  144. package/dist/index.d.ts.map +1 -1
  145. package/dist/index.js +11 -9
  146. package/dist/index.js.map +1 -1
  147. package/dist/inventory.d.ts +53 -0
  148. package/dist/inventory.d.ts.map +1 -0
  149. package/dist/inventory.js +133 -0
  150. package/dist/inventory.js.map +1 -0
  151. package/dist/lib/complianceProbes.d.ts +2 -1
  152. package/dist/lib/complianceProbes.d.ts.map +1 -1
  153. package/dist/lib/complianceProbes.js +1 -1
  154. package/dist/lib/complianceProbes.js.map +1 -1
  155. package/dist/lib/decisionsDigest.d.ts +34 -16
  156. package/dist/lib/decisionsDigest.d.ts.map +1 -1
  157. package/dist/lib/decisionsDigest.js +105 -46
  158. package/dist/lib/decisionsDigest.js.map +1 -1
  159. package/dist/lib/egressPolicy.d.ts +2 -2
  160. package/dist/lib/egressPolicy.js +2 -2
  161. package/dist/lib/mcpRegistryPy.d.ts +11 -0
  162. package/dist/lib/mcpRegistryPy.d.ts.map +1 -0
  163. package/dist/lib/mcpRegistryPy.js +173 -0
  164. package/dist/lib/mcpRegistryPy.js.map +1 -0
  165. package/dist/lib/phrasesPy.d.ts +11 -0
  166. package/dist/lib/phrasesPy.d.ts.map +1 -0
  167. package/dist/lib/phrasesPy.js +351 -0
  168. package/dist/lib/phrasesPy.js.map +1 -0
  169. package/dist/lib/policySnapshot.d.ts +46 -10
  170. package/dist/lib/policySnapshot.d.ts.map +1 -1
  171. package/dist/lib/policySnapshot.js +136 -47
  172. package/dist/lib/policySnapshot.js.map +1 -1
  173. package/dist/lib/processPoller.d.ts.map +1 -1
  174. package/dist/lib/processPoller.js +9 -2
  175. package/dist/lib/processPoller.js.map +1 -1
  176. package/dist/lib/regexLinearity.d.ts +43 -0
  177. package/dist/lib/regexLinearity.d.ts.map +1 -0
  178. package/dist/lib/regexLinearity.js +275 -0
  179. package/dist/lib/regexLinearity.js.map +1 -0
  180. package/dist/lib/runtimeEnv.d.ts +1 -3
  181. package/dist/lib/runtimeEnv.d.ts.map +1 -1
  182. package/dist/lib/runtimeEnv.js +0 -2
  183. package/dist/lib/runtimeEnv.js.map +1 -1
  184. package/dist/lib/sequencePy.d.ts +10 -0
  185. package/dist/lib/sequencePy.d.ts.map +1 -0
  186. package/dist/lib/sequencePy.js +102 -0
  187. package/dist/lib/sequencePy.js.map +1 -0
  188. package/dist/sessionReporter.d.ts +17 -11
  189. package/dist/sessionReporter.d.ts.map +1 -1
  190. package/dist/sessionReporter.js +36 -23
  191. package/dist/sessionReporter.js.map +1 -1
  192. package/dist/skillWriter.d.ts +23 -5
  193. package/dist/skillWriter.d.ts.map +1 -1
  194. package/dist/skillWriter.js +159 -16
  195. package/dist/skillWriter.js.map +1 -1
  196. package/dist/syncCycle.d.ts.map +1 -1
  197. package/dist/syncCycle.js +21 -9
  198. package/dist/syncCycle.js.map +1 -1
  199. package/dist/trajectoryMonitor.d.ts +1 -3
  200. package/dist/trajectoryMonitor.d.ts.map +1 -1
  201. package/dist/trajectoryMonitor.js +1 -4
  202. package/dist/trajectoryMonitor.js.map +1 -1
  203. package/dist/watcher/driftWatcher.d.ts +0 -1
  204. package/dist/watcher/driftWatcher.d.ts.map +1 -1
  205. package/dist/watcher/driftWatcher.js +1 -2
  206. package/dist/watcher/driftWatcher.js.map +1 -1
  207. package/dist/watcher/settingsGuard.d.ts +33 -7
  208. package/dist/watcher/settingsGuard.d.ts.map +1 -1
  209. package/dist/watcher/settingsGuard.js +373 -61
  210. package/dist/watcher/settingsGuard.js.map +1 -1
  211. package/dist/watcher/vscodeHookSettings.d.ts +30 -0
  212. package/dist/watcher/vscodeHookSettings.d.ts.map +1 -0
  213. package/dist/watcher/vscodeHookSettings.js +170 -0
  214. package/dist/watcher/vscodeHookSettings.js.map +1 -0
  215. package/dist/wsClient.d.ts +0 -1
  216. package/dist/wsClient.d.ts.map +1 -1
  217. package/dist/wsClient.js +0 -1
  218. package/dist/wsClient.js.map +1 -1
  219. package/package.json +5 -5
  220. package/dist/harness/claudeDesktopHooks.d.ts +0 -33
  221. package/dist/harness/claudeDesktopHooks.d.ts.map +0 -1
  222. package/dist/harness/claudeDesktopHooks.js +0 -256
  223. package/dist/harness/claudeDesktopHooks.js.map +0 -1
  224. package/dist/harness/continueHooks.d.ts +0 -63
  225. package/dist/harness/continueHooks.d.ts.map +0 -1
  226. package/dist/harness/continueHooks.js +0 -250
  227. package/dist/harness/continueHooks.js.map +0 -1
  228. package/dist/harness/gateKind.d.ts +0 -164
  229. package/dist/harness/gateKind.d.ts.map +0 -1
  230. package/dist/harness/gateKind.js +0 -144
  231. package/dist/harness/gateKind.js.map +0 -1
  232. package/dist/harness/rooCodeHooks.d.ts +0 -31
  233. package/dist/harness/rooCodeHooks.d.ts.map +0 -1
  234. package/dist/harness/rooCodeHooks.js +0 -281
  235. package/dist/harness/rooCodeHooks.js.map +0 -1
@@ -1,57 +1,96 @@
1
1
  /**
2
- * openclawHooks.ts — Openclaw governance hook injection.
2
+ * openclawHooks.ts — OpenClaw plugin gate.
3
3
  *
4
- * Openclaw uses `~/.openclaw/openclaw.json` (JSON5 format — may have comments
5
- * and trailing commas). The hook entry is registered under
6
- * `hooks.internal.entries["intutic-governance"]`. This module:
4
+ * OpenClaw has two hook systems, and only one of them can stop a tool call.
5
+ * Its *internal* hooks (`hooks.internal.entries` in `~/.openclaw/openclaw.json`,
6
+ * `HOOK.md` handlers) react to command, session and Gateway events; the
7
+ * dispatcher catches a handler's error and carries on, and tool calls are not
8
+ * among their events at all. Earlier versions of this writer registered the
9
+ * gate there, as `{ event: 'PreToolUse', command }`, a shape OpenClaw keeps
10
+ * (hook entries are open-ended) and never runs. Tool calls are intercepted by
11
+ * a *plugin* hook, `before_tool_call`, registered with `api.on(...)`:
12
+ * https://github.com/openclaw/openclaw/blob/59309cc7777e07d52ca1be94bf8c25fd685919bc/docs/automation/hooks.md
13
+ * ("Choose the right surface": intercepting tools is a plugin hook).
7
14
  *
8
- * 1. JSON5-safe-merges `~/.openclaw/openclaw.json` with the hook entry.
9
- * 2. Writes `~/.intutic/hooks/openclaw-check.js` — dual-path Node.js hook.
10
- * 3. Writes `.intutic/env/openclaw.env` — env snippet.
11
- * 4. Optionally validates with `openclaw hooks check` (non-fatal).
15
+ * ## The plugin
12
16
  *
13
- * Hook protocol: stdin JSON `{tool_name, tool_input, transcript_path}`,
14
- * exit 0 = allow, exit 2 = block (stderr shown to agent).
17
+ * A standalone plugin file needs no manifest when it is listed in
18
+ * `plugins.load.paths`; its id is the file's basename, so the file is
19
+ * `intutic-governance.cjs` and exports `{ id: 'intutic-governance', register }`
20
+ * (`docs/plugins/hooks/tool-policy.md` "Sender-aware policy in one file";
21
+ * `src/plugins/discovery.ts` `discoverFromPath`; the loader test "loads
22
+ * multiple manifestless standalone files"). `.cjs`, so the module format does
23
+ * not depend on any `package.json` above it. A plugin from a configured path
24
+ * is enabled by default unless a non-empty `plugins.allow` leaves it out
25
+ * (`src/plugins/config-activation-shared.ts`), so the id is added to an
26
+ * existing allowlist and nothing is written when there is none.
15
27
  *
16
- * WS-C2 — Openclaw harness (Phase 3 cross-harness defence)
17
- * LLD #14 — Phase 3 cross-harness defence (Gap 3)
18
- * HLD §3.14 — Three-Tier Defense Cascade (Tier 1 Native Gating)
28
+ * `before_tool_call` receives `{ toolName, params, toolCallId?, runId?,
29
+ * derivedPaths? }` and `ctx.sessionId`, and refuses with `{ block: true,
30
+ * blockReason }`, which is terminal (`docs/plugins/hooks/tool-policy.md`,
31
+ * `src/plugins/hook-types.ts`). The global hook runner runs it fail-closed: a
32
+ * handler that throws or outlives its timeout blocks the call
33
+ * (`src/plugins/hook-runner-global.ts`: `before_tool_call: "fail-closed"`;
34
+ * default 15 s, `docs/plugins/hooks/reference.md`). That timeout cannot stop
35
+ * synchronous code, so the hook registers `timeoutMs: HOOK_TIMEOUT_SECONDS *
36
+ * 1000` and the gate runs under its own deadline inside it
37
+ * (`gateDeadlineMs('openclaw')`).
38
+ *
39
+ * The plugin embeds the shared `emitJsGate` body (`'throw'` contract) and
40
+ * returns OpenClaw's block result for the refusal it throws. Any other fault
41
+ * is a block too. MCP tools reach the hook as `<server>__<tool>`
42
+ * (`src/agents/agent-bundle-mcp-names.ts`, `TOOL_NAME_SEPARATOR`), which the
43
+ * plugin composes into `mcp__<server>__<tool>` for the allowlist.
44
+ *
45
+ * The file lives under `~/.intutic/hooks/`, a governance-protected path, so an
46
+ * agent cannot edit it under any gated harness.
19
47
  *
20
48
  * @module
21
49
  */
22
50
  import * as fs from 'node:fs/promises';
23
51
  import * as path from 'node:path';
24
52
  import * as os from 'node:os';
25
- import { exec } from 'node:child_process';
26
- import { promisify } from 'node:util';
27
53
  import { createLogger } from '@intutic/logger';
28
- import { keepOriginal } from '../disconnect/originals.js';
54
+ import { keepOriginal, writeOwnedFile } from '../disconnect/originals.js';
29
55
  import { newIso } from '@intutic/id';
30
- import { emitJsGate, emitJsFailClosedPrelude } from './gateBody.js';
56
+ import { HOOK_TIMEOUT_SECONDS } from '@intutic/shared-types';
57
+ import { emitJsGate, REVIEW_REQUESTS_BASENAME } from './gateBody.js';
31
58
  const log = createLogger('sync-openclaw-hooks');
32
- const execAsync = promisify(exec);
33
- /** Path to the Openclaw global config file. */
34
- const OPENCLAW_CONFIG = path.join(os.homedir(), '.openclaw', 'openclaw.json');
35
- /** Governance-sensitive paths that the hook gate protects. */
36
- // ─── Node.js hook script template ────────────────────────────────────────────
37
- function buildOpenclawCheckScript(hookEventsLog, workspaceId, proxyUrl) {
38
- return `#!/usr/bin/env node
39
- /**
40
- * Intutic Openclaw PreToolUse execution gate.
59
+ /** The plugin id, which OpenClaw takes from the standalone file's basename. */
60
+ export const OPENCLAW_PLUGIN_ID = 'intutic-governance';
61
+ /** The plugin file, relative to the home directory. */
62
+ export const OPENCLAW_PLUGIN_FILE = path.join('.intutic', 'hooks', 'openclaw', `${OPENCLAW_PLUGIN_ID}.cjs`);
63
+ /** The first line of the plugin's header, which disconnect recognises it by. */
64
+ export const OPENCLAW_PLUGIN_MARKER = 'Intutic OpenClaw governance plugin.';
65
+ function openclawConfigPath() {
66
+ return path.join(os.homedir(), '.openclaw', 'openclaw.json');
67
+ }
68
+ /** The absolute path of the plugin file for the current home directory. */
69
+ export function openclawPluginPath() {
70
+ return path.join(os.homedir(), OPENCLAW_PLUGIN_FILE);
71
+ }
72
+ // ─── The plugin ──────────────────────────────────────────────────────────────
73
+ export function buildOpenclawPlugin(proxyUrl, workspaceRoot, workspaceId) {
74
+ const hookEventsLog = path.join(workspaceRoot, '.intutic', 'events', 'hook-events.jsonl');
75
+ return `/**
76
+ * ${OPENCLAW_PLUGIN_MARKER}
41
77
  * Auto-generated by intutic sync-daemon. DO NOT EDIT.
42
78
  * Proxy: ${proxyUrl}
43
79
  * Generated: ${newIso()}
44
- * Workspace: ${workspaceId}
80
+ *
81
+ * A before_tool_call plugin hook, loaded through plugins.load.paths in
82
+ * ~/.openclaw/openclaw.json. Refuses a tool call by returning
83
+ * { block: true, blockReason }. See
84
+ * services/sync-daemon/src/harness/openclawHooks.ts.
45
85
  */
46
86
  'use strict';
47
- ${emitJsFailClosedPrelude({ harness: 'openclaw', contract: 'exit2' })}
48
87
  const path = require('path');
49
88
  const os = require('os');
50
89
  const fs = require('fs');
51
90
  const crypto = require('crypto');
52
91
  const https = require('https');
53
92
 
54
- // ── Runtime credentials (sourced from ~/.intutic/env/runtime.env at invocation time) ──
93
+ // Runtime credentials, read when OpenClaw loads the plugin.
55
94
  const _runtimeEnvPath = path.join(os.homedir(), '.intutic', 'env', 'runtime.env');
56
95
  let _intuticHost = 'https://api.intutic.ai', _intuticKey = '', _intuticWsId = ${JSON.stringify(workspaceId)};
57
96
  try {
@@ -62,96 +101,98 @@ try {
62
101
  if (k === 'INTUTIC_API_KEY' && v) _intuticKey = v;
63
102
  if (k === 'INTUTIC_WORKSPACE_ID' && v) _intuticWsId = v;
64
103
  });
65
- } catch { /* runtime.env not yet written — use defaults */ }
104
+ } catch {}
66
105
 
67
- ${emitJsGate({ harness: 'openclaw', contract: 'exit2' })}
106
+ ${emitJsGate({ harness: 'openclaw', contract: 'throw', reviewRequestFile: path.join(workspaceRoot, '.intutic', 'events', REVIEW_REQUESTS_BASENAME) })}
68
107
 
69
- /**
70
- * Appends a governance event to the local hook-events log (Path B)
71
- * and fires a non-blocking HTTP POST to the control plane (Path A).
72
- */
73
108
  let _intuticSessionId = '';
74
109
  function logEvent(verdict, toolName, reason) {
75
110
  try {
76
111
  const ts = new Date().toISOString();
77
- // incidentId = sha1(timestamp + toolName + workspaceId).slice(0,16)
78
112
  const incidentId = crypto.createHash('sha1').update(ts + toolName + _intuticWsId).digest('hex').slice(0, 16);
113
+ // The event's id: random, made once here, and resent with the line it is
114
+ // written into, so the control plane processes the event once.
115
+ const eventId = crypto.randomBytes(16).toString('hex');
79
116
  const entry = JSON.stringify({
80
- // Passed through, not collapsed to two values: the advisory tier emits
81
- // 'tool_flagged', and a ternary here silently recorded it as an allow.
82
117
  event: verdict,
83
- toolName,
84
- reason: reason || '',
118
+ toolName, reason: reason || '',
85
119
  workspaceId: _intuticWsId,
86
120
  harnessType: 'openclaw',
87
121
  timestamp: ts,
88
122
  incidentId,
123
+ eventId,
89
124
  ...(_intuticSessionId ? { sessionId: _intuticSessionId } : {}),
90
125
  }) + '\\n';
91
- // Path B: reliable file append (sync-daemon drains on FSEvents change)
92
- fs.appendFileSync(${JSON.stringify(hookEventsLog)}, entry, { flag: 'a' });
93
- // Path A: fire-and-forget HTTP POST (near-real-time dashboard, non-blocking)
126
+ const logPath = ${JSON.stringify(hookEventsLog)};
127
+ try { fs.mkdirSync(path.dirname(logPath), { recursive: true }); } catch {}
128
+ fs.appendFileSync(logPath, entry, { flag: 'a' });
94
129
  if (_intuticKey) {
95
130
  try {
96
131
  const body = JSON.stringify({ events: [JSON.parse(entry)] });
97
132
  const urlObj = new URL('/api/v1/hook-events', _intuticHost);
98
133
  const isHttps = urlObj.protocol === 'https:';
99
134
  const mod = isHttps ? https : require('http');
100
- const req = mod.request({
101
- hostname: urlObj.hostname,
102
- port: urlObj.port || (isHttps ? 443 : 80),
103
- path: urlObj.pathname,
104
- method: 'POST',
105
- headers: {
106
- 'Content-Type': 'application/json',
107
- 'Content-Length': Buffer.byteLength(body),
108
- 'Authorization': 'Bearer ' + _intuticKey,
109
- },
110
- });
111
- req.on('error', () => { /* fire-and-forget — ignore errors */ });
112
- req.write(body);
113
- req.end();
135
+ const req = mod.request({ hostname: urlObj.hostname, port: urlObj.port || (isHttps ? 443 : 80), path: urlObj.pathname, method: 'POST', headers: { 'Content-Type': 'application/json', 'Content-Length': Buffer.byteLength(body), 'Authorization': 'Bearer ' + _intuticKey } });
136
+ req.on('error', () => { /* fire-and-forget */ });
137
+ req.write(body); req.end();
114
138
  } catch { /* never crash the hook */ }
115
139
  }
116
140
  } catch { /* never crash the hook */ }
117
141
  }
118
142
 
119
- // Read stdin containing Openclaw's tool context
120
- let inputData = '';
121
- process.stdin.on('data', (chunk) => { inputData += chunk; });
122
- process.stdin.on('end', () => {
123
- try {
124
- const ctx = JSON.parse(inputData);
125
- _intuticSessionId = ctx.session_id || ctx.sessionId || ctx.conversation_id || ctx.conversationId || ctx.task_id || ctx.taskId || '';
126
- // An envelope carrying none of the tool fields extracts to empty strings,
127
- // which match no rule — an allow. Refused instead; see the guard itself.
128
- intuticGuardEnvelope(ctx, ['tool_name', 'toolName', 'tool_input', 'toolInput'], logEvent);
129
- const toolName = (ctx.tool_name || ctx.toolName || '').toLowerCase()
130
- // Case preserved for the gate. A BLOCK: SOP compiles to a tool-name
131
- // pattern the operator wrote as they see it (Bash, Write) and this
132
- // harness lowercases the tool for its own matching. Handing the gate the
133
- // lowercased form means every SOP tool rule silently matches nothing here
134
- // while appearing active everywhere else.
135
- const rawToolName = ctx.tool_name || ctx.toolName || '';
136
- const toolInput = ctx.tool_input || ctx.toolInput || {};
137
-
138
- const targetPath = toolInput.path || toolInput.file_path || toolInput.filePath ||
139
- toolInput.new_path || toolInput.target || toolInput.notebook_path || '';
140
- const command = toolInput.command || toolInput.cmd || toolInput.script || '';
141
- intuticGate(rawToolName, targetPath, command, logEvent, _intuticWsId, toolInput);
143
+ /**
144
+ * One tool call. Returns to allow; throws '[Intutic Governance] …' to refuse.
145
+ * Params that are not an object are refused outright: the gate reads paths
146
+ * and commands out of them, and a shape it cannot read is not one it can
147
+ * allow. apply_patch names its files in derivedPaths, and each is checked.
148
+ */
149
+ function intuticEvaluate(event, ctx) {
150
+ _intuticSessionId = String((ctx && (ctx.sessionId || ctx.sessionKey)) || '');
151
+ let tool = String((event && event.toolName) || 'tool');
152
+ // OpenClaw names an MCP tool <server>__<tool>; the allowlist reads
153
+ // mcp__<server>__<tool>. No built-in tool id has a double underscore.
154
+ if (tool.indexOf('__') > 0 && tool.indexOf('mcp__') !== 0) tool = 'mcp__' + tool;
155
+ const params = event && event.params;
156
+ if (!params || typeof params !== 'object' || Array.isArray(params)) {
157
+ const reason = '[Intutic Governance] BLOCKED: tool "' + tool + '" was called with parameters the gate cannot read (' +
158
+ (params === null ? 'null' : typeof params) + '); refusing rather than allowing a call it cannot evaluate.';
159
+ try { logEvent('tool_blocked', tool, reason); } catch (e) {}
160
+ throw new Error(reason);
161
+ }
162
+ const command = params.command || params.cmd || params.script || '';
163
+ const direct = params.path || params.file_path || params.filePath || params.target || '';
164
+ const derived = event && Array.isArray(event.derivedPaths) ? event.derivedPaths.filter((p) => typeof p === 'string' && p) : [];
165
+ const targets = derived.length > 0 ? (direct ? [direct].concat(derived) : derived) : [direct];
166
+ for (const target of targets) intuticGate(tool, target, command, logEvent, _intuticWsId, params, _intuticSessionId);
167
+ logEvent('tool_allowed', tool, '');
168
+ }
142
169
 
143
- logEvent('tool_allowed', toolName, '');
144
- process.exit(0);
170
+ /** Fail closed: a fault inside the gate is a refusal, never an allow. */
171
+ function beforeToolCall(event, ctx) {
172
+ try {
173
+ intuticEvaluate(event, ctx);
174
+ return undefined;
145
175
  } catch (err) {
146
- // Fail CLOSED — any hook execution error blocks the tool call.
147
- console.error('[Intutic Governance] Hook error (blocking for safety):', err);
148
- logEvent('tool_blocked', 'unknown', String(err));
149
- process.exit(2);
176
+ let reason = String((err && err.message) || err);
177
+ if (reason.indexOf('[Intutic Governance]') !== 0) {
178
+ reason = '[Intutic Governance] BLOCKED: gate fault (failing closed): ' + reason;
179
+ try { logEvent('tool_blocked', String((event && event.toolName) || 'unknown'), reason); } catch (e) {}
180
+ }
181
+ return { block: true, blockReason: reason };
150
182
  }
151
- });
183
+ }
184
+
185
+ module.exports = {
186
+ id: ${JSON.stringify(OPENCLAW_PLUGIN_ID)},
187
+ name: 'Intutic governance',
188
+ description: 'Refuses tool calls that break the workspace policy before they run.',
189
+ register(api) {
190
+ api.on('before_tool_call', beforeToolCall, { timeoutMs: ${HOOK_TIMEOUT_SECONDS * 1000} });
191
+ },
192
+ };
152
193
  `;
153
194
  }
154
- // ─── JSON5 merge helpers ──────────────────────────────────────────────────────
195
+ // ─── ~/.openclaw/openclaw.json ───────────────────────────────────────────────
155
196
  /**
156
197
  * Attempt to parse a JSON5-like string by progressively stripping
157
198
  * non-standard syntax. Returns a plain JS object or throws if unparseable.
@@ -176,99 +217,110 @@ export function parseJson5Like(raw) {
176
217
  stripped = stripped.replace(/,(\s*[}\]])/g, '$1');
177
218
  return JSON.parse(stripped);
178
219
  }
220
+ const asObject = (v) => typeof v === 'object' && v !== null && !Array.isArray(v) ? v : {};
179
221
  /**
180
- * Deep-merge `hooks.internal.entries["intutic-governance"]` into the parsed
181
- * openclaw config object and return the merged result.
222
+ * Adds the plugin to `plugins.load.paths`, and its id to `plugins.allow` when
223
+ * that list is non-empty (an empty or absent one allows every plugin).
224
+ * Everything else is kept, and a second run adds nothing.
182
225
  */
183
- function mergeOpenclawConfig(existing, hookScriptPath) {
184
- const hooks = existing.hooks ?? {};
185
- const internal = hooks.internal ?? {};
186
- const entries = internal.entries ?? {};
226
+ export function mergeOpenclawConfig(existing, pluginPath) {
227
+ const plugins = asObject(existing.plugins);
228
+ const load = asObject(plugins.load);
229
+ const paths = Array.isArray(load.paths) ? load.paths : [];
230
+ const allow = Array.isArray(plugins.allow) ? plugins.allow : undefined;
187
231
  return {
188
232
  ...existing,
189
- hooks: {
190
- ...hooks,
191
- internal: {
192
- ...internal,
193
- entries: {
194
- ...entries,
195
- 'intutic-governance': {
196
- enabled: true,
197
- event: 'PreToolUse',
198
- command: hookScriptPath,
199
- },
200
- },
201
- },
233
+ plugins: {
234
+ ...plugins,
235
+ ...(allow && allow.length > 0 && !allow.includes(OPENCLAW_PLUGIN_ID) ? { allow: [...allow, OPENCLAW_PLUGIN_ID] } : {}),
236
+ load: { ...load, paths: paths.includes(pluginPath) ? paths : [...paths, pluginPath] },
202
237
  },
203
238
  };
204
239
  }
240
+ /** Why the plugin will not load even once it is listed, when the config says so. */
241
+ function configBlocksPlugin(config) {
242
+ const plugins = asObject(config.plugins);
243
+ if (plugins.enabled === false)
244
+ return 'plugins.enabled is false';
245
+ if (Array.isArray(plugins.deny) && plugins.deny.includes(OPENCLAW_PLUGIN_ID))
246
+ return `plugins.deny lists ${OPENCLAW_PLUGIN_ID}`;
247
+ if (asObject(asObject(plugins.entries)[OPENCLAW_PLUGIN_ID]).enabled === false)
248
+ return `plugins.entries.${OPENCLAW_PLUGIN_ID}.enabled is false`;
249
+ return null;
250
+ }
205
251
  // ─── Main export ──────────────────────────────────────────────────────────────
206
252
  /**
207
- * Write the Openclaw governance hook script and merge hook configuration
208
- * into `~/.openclaw/openclaw.json`.
253
+ * Write the OpenClaw governance plugin and list it in
254
+ * `~/.openclaw/openclaw.json`.
209
255
  *
210
- * Safe to call repeatedly — uses atomic rename so partial writes never
211
- * leave a corrupt state.
256
+ * Safe to call repeatedly: the plugin is replaced by atomic rename and the
257
+ * config merge is idempotent. A config file that does not parse is left as
258
+ * it is, and reported.
212
259
  *
213
260
  * @param workspaceRoot - Absolute workspace root path.
214
- * @param proxyUrl - Intutic proxy URL written into hook headers.
261
+ * @param proxyUrl - Intutic proxy URL written into the plugin header.
215
262
  * @param workspaceId - Workspace ID embedded in every hook event payload.
216
263
  */
217
264
  export async function writeOpenclawHooks(workspaceRoot, proxyUrl, workspaceId = '') {
218
- // ── 1. Ensure directories ──────────────────────────────────────────────────
219
- const globalHookDir = path.join(os.homedir(), '.intutic', 'hooks');
220
- const hookEventsDir = path.join(workspaceRoot, '.intutic', 'events');
221
- const envDir = path.join(workspaceRoot, '.intutic', 'env');
222
- const openclawDir = path.join(os.homedir(), '.openclaw');
223
- await keepOriginal(OPENCLAW_CONFIG, workspaceRoot);
224
- await Promise.all([
225
- fs.mkdir(globalHookDir, { recursive: true }),
226
- fs.mkdir(hookEventsDir, { recursive: true }),
227
- fs.mkdir(envDir, { recursive: true }),
228
- fs.mkdir(openclawDir, { recursive: true }),
229
- ]);
230
- // ── 2. Write Node.js hook script ──────────────────────────────────────────
231
- const hookScriptPath = path.join(globalHookDir, 'openclaw-check.js');
232
- const hookEventsLog = path.join(hookEventsDir, 'hook-events.jsonl');
233
- const tmpScript = hookScriptPath + '.intutic-tmp';
234
- await fs.writeFile(tmpScript, buildOpenclawCheckScript(hookEventsLog, workspaceId, proxyUrl), 'utf-8');
235
- await fs.rename(tmpScript, hookScriptPath);
236
- await fs.chmod(hookScriptPath, 0o755);
237
- log.info({ action: 'openclaw_hook_script_written', path: hookScriptPath }, 'Openclaw hook script written');
238
- // ── 3. JSON5-safe merge into ~/.openclaw/openclaw.json ────────────────────
239
- let existingConfig = {};
265
+ await fs.mkdir(path.join(workspaceRoot, '.intutic', 'events'), { recursive: true });
266
+ const pluginPath = openclawPluginPath();
267
+ await writeOwnedFile(pluginPath, workspaceRoot, buildOpenclawPlugin(proxyUrl, workspaceRoot, workspaceId));
268
+ log.info({ action: 'openclaw_plugin_written', path: pluginPath }, 'OpenClaw governance plugin written');
269
+ const configPath = openclawConfigPath();
270
+ let raw = null;
240
271
  try {
241
- const raw = await fs.readFile(OPENCLAW_CONFIG, 'utf-8');
242
- existingConfig = parseJson5Like(raw);
272
+ raw = await fs.readFile(configPath, 'utf-8');
243
273
  }
244
- catch {
245
- // File doesn't exist or is unparseable — start fresh
274
+ catch (err) {
275
+ if (err.code !== 'ENOENT') {
276
+ log.warn({ action: 'config_merge_skipped', path: configPath, error: String(err) }, `Could not read ${configPath} — left untouched`);
277
+ return;
278
+ }
246
279
  }
247
- const mergedConfig = mergeOpenclawConfig(existingConfig, hookScriptPath);
248
- const tmpConfig = OPENCLAW_CONFIG + '.intutic-tmp';
249
- await fs.writeFile(tmpConfig, JSON.stringify(mergedConfig, null, 2) + '\n', 'utf-8');
250
- await fs.rename(tmpConfig, OPENCLAW_CONFIG);
251
- log.info({ action: 'openclaw_config_merged', path: OPENCLAW_CONFIG }, 'Merged Intutic hook into ~/.openclaw/openclaw.json');
252
- // ── 4. Write env snippet ───────────────────────────────────────────────────
253
- const envSnippet = [
254
- `# Intutic openclaw governance env`,
255
- `INTUTIC_OPENCLAW_HOOK=~/.intutic/hooks/openclaw-check.js`,
256
- `INTUTIC_OPENCLAW_CONFIG=~/.openclaw/openclaw.json`,
257
- `# Validate: openclaw hooks check`,
258
- ].join('\n') + '\n';
259
- const envFilePath = path.join(envDir, 'openclaw.env');
260
- const tmpEnv = envFilePath + '.intutic-tmp';
261
- await fs.writeFile(tmpEnv, envSnippet, 'utf-8');
262
- await fs.rename(tmpEnv, envFilePath);
263
- log.info({ action: 'openclaw_env_written', path: envFilePath }, 'Openclaw env snippet written');
264
- // ── 5. Optional validation (non-fatal) ────────────────────────────────────
280
+ let existing = {};
281
+ if (raw !== null && raw.trim() !== '') {
282
+ try {
283
+ existing = asObject(parseJson5Like(raw));
284
+ }
285
+ catch {
286
+ log.warn({ action: 'config_merge_skipped', path: configPath }, `${configPath} does not parse — left untouched; fix it and the next sync will list the Intutic plugin`);
287
+ return;
288
+ }
289
+ }
290
+ const blocked = configBlocksPlugin(existing);
291
+ if (blocked) {
292
+ log.warn({ action: 'openclaw_plugin_disabled', path: configPath, reason: blocked }, `OpenClaw will not load the Intutic plugin: ${blocked}`);
293
+ }
294
+ await keepOriginal(configPath, workspaceRoot);
295
+ await fs.mkdir(path.dirname(configPath), { recursive: true });
296
+ const tmp = configPath + '.intutic-tmp';
297
+ await fs.writeFile(tmp, JSON.stringify(mergeOpenclawConfig(existing, pluginPath), null, 2) + '\n', 'utf-8');
298
+ await fs.rename(tmp, configPath);
299
+ log.info({ action: 'openclaw_config_merged', path: configPath }, 'Listed the Intutic plugin in ~/.openclaw/openclaw.json');
300
+ }
301
+ /**
302
+ * OpenClaw's agent workspace, where it loads `AGENTS.md` and its other
303
+ * bootstrap files every session — never from a project:
304
+ * `agents.defaults.workspace` in `~/.openclaw/openclaw.json`, else
305
+ * `OPENCLAW_WORKSPACE_DIR`, else `~/.openclaw/workspace`
306
+ * (https://github.com/openclaw/openclaw/blob/98457908cf3e4fbbd0354b530e0aa0d15b560158/docs/gateway/config-agents/workspace-and-bootstrap.md).
307
+ */
308
+ export async function openclawAgentWorkspace() {
309
+ const home = os.homedir();
310
+ const expand = (p) => (p === '~' || p.startsWith('~/') ? path.join(home, p.slice(1)) : path.resolve(p));
265
311
  try {
266
- const { stdout, stderr } = await execAsync('openclaw hooks check', { timeout: 5000 });
267
- log.info({ action: 'openclaw_hooks_check', stdout: stdout.trim(), stderr: stderr.trim() }, 'openclaw hooks check passed');
312
+ const doc = parseJson5Like(await fs.readFile(path.join(home, '.openclaw', 'openclaw.json'), 'utf-8'));
313
+ const agents = doc.agents;
314
+ const configured = agents?.defaults?.workspace;
315
+ if (typeof configured === 'string' && configured.trim() !== '')
316
+ return expand(configured.trim());
268
317
  }
269
- catch (err) {
270
- // Not installed or check failed — non-fatal
271
- log.debug({ action: 'openclaw_hooks_check_skipped', err }, 'openclaw hooks check skipped (binary not in PATH or check failed)');
318
+ catch {
319
+ // No config, or one that does not parse: the defaults apply.
272
320
  }
321
+ const fromEnv = process.env.OPENCLAW_WORKSPACE_DIR;
322
+ if (fromEnv)
323
+ return expand(fromEnv);
324
+ return path.join(home, '.openclaw', 'workspace');
273
325
  }
274
326
  //# sourceMappingURL=openclawHooks.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"openclawHooks.js","sourceRoot":"","sources":["../../src/harness/openclawHooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAA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UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAA;IAC/G,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,cAAc,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,WAAW,EAAE,eAAe,CAAC,EAAE,OAAO,CAAC,CAAC,CAAA;QACrG,MAAM,MAAM,GAAG,GAAG,CAAC,MAA4D,CAAA;QAC/E,MAAM,UAAU,GAAG,MAAM,EAAE,QAAQ,EAAE,SAAS,CAAA;QAC9C,IAAI,OAAO,UAAU,KAAK,QAAQ,IAAI,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE;YAAE,OAAO,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,CAAA;IAClG,CAAC;IAAC,MAAM,CAAC;QACP,6DAA6D;IAC/D,CAAC;IACD,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAA;IAClD,IAAI,OAAO;QAAE,OAAO,MAAM,CAAC,OAAO,CAAC,CAAA;IACnC,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,WAAW,EAAE,WAAW,CAAC,CAAA;AAClD,CAAC"}
@@ -7,11 +7,21 @@
7
7
  * The hooks file lives within the agent's sandbox working directory,
8
8
  * so we also register it with the drift watcher.
9
9
  *
10
- * LLD #14 — Phase 3 cross-harness defence
11
10
  * HLD §3.14 — Three-Tier Defense Cascade
12
11
  *
13
12
  * @module
14
13
  */
14
+ /**
15
+ * `.openhands/hooks.json` in the OpenHands SDK's schema (\`HookConfig\`): each
16
+ * event a list of matchers, each with its hook definitions. Earlier versions
17
+ * wrote a flat list of \`{type: 'PreToolUse', command, failClosed}\`, which the
18
+ * SDK cannot load, and had extra top-level keys beside \`hooks\`, which it
19
+ * drops with a warning; the marker that tells disconnect the file is ours is
20
+ * now each hook's \`name\`. OpenHands runs a call whose hook times out, and
21
+ * has no setting to refuse instead, so the gate refuses at its own deadline,
22
+ * inside the \`timeout\` set here (default 60 s).
23
+ */
24
+ export declare function openHandsHooksConfig(hookScriptPath: string): Record<string, unknown>;
15
25
  /**
16
26
  * Write .openhands/hooks.json and the pre-tool-check shell script.
17
27
  * Also points `[llm] base_url` in ~/.openhands/config.toml at the proxy when
@@ -34,16 +44,20 @@ export declare function isOpenHandsConfig(raw: string): boolean;
34
44
  */
35
45
  export declare function mergeOpenHandsBaseUrl(raw: string, proxyUrl: string): string | null;
36
46
  /**
37
- * Merge Intutic's keys into an OpenHands `config.toml`:
38
- * - `[llm] base_url` — the proxy, in the form the configured model's SDK
39
- * expects (LiteLLM appends `/v1/messages` to an Anthropic base and
40
- * `/chat/completions` to an OpenAI-style one);
41
- * - an `[intutic]` table carrying the SOP text, replaced whole each sync.
47
+ * Point `[llm] base_url` in the workspace's OpenHands `config.toml` at the
48
+ * proxy, in the form the configured model's SDK expects (LiteLLM appends
49
+ * `/v1/messages` to an Anthropic base and `/chat/completions` to an
50
+ * OpenAI-style one), and keep the rest of the file.
51
+ *
52
+ * Earlier versions also wrote the rule sets into an `[intutic]` table, which
53
+ * OpenHands never reads (the rules now go into a microagent, see the
54
+ * adapter); that table is dropped. Earlier still, versions replaced the
55
+ * whole file, so a file starting with their header holds nothing of the
56
+ * user's and is regenerated.
42
57
  *
43
58
  * Edited line by line so the user's own settings and comments survive; the
44
- * result is parsed before it is returned. Earlier versions replaced the whole
45
- * file, so a file starting with their header holds nothing of the user's and
46
- * is regenerated. Returns `null` when the existing file is not valid TOML.
59
+ * result is parsed before it is returned. Returns `null` when the existing
60
+ * file is not valid TOML.
47
61
  */
48
- export declare function mergeOpenHandsToml(raw: string, proxyUrl: string, instructions: string): string | null;
62
+ export declare function mergeOpenHandsToml(raw: string, proxyUrl: string): string | null;
49
63
  //# sourceMappingURL=openhandsHooks.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"openhandsHooks.d.ts","sourceRoot":"","sources":["../../src/harness/openhandsHooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAcH;;;;;;;;GAQG;AACH,wBAAsB,mBAAmB,CACvC,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,MAAM,EAChB,WAAW,SAAK,GACf,OAAO,CAAC,IAAI,CAAC,CAqHf;AAqDD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAItD;AAuCD;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAUlF;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAsBrG"}
1
+ {"version":3,"file":"openhandsHooks.d.ts","sourceRoot":"","sources":["../../src/harness/openhandsHooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAcH;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAQpF;AAED;;;;;;;;GAQG;AACH,wBAAsB,mBAAmB,CACvC,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,MAAM,EAChB,WAAW,SAAK,GACf,OAAO,CAAC,IAAI,CAAC,CAwGf;AAqDD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAItD;AAuCD;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAUlF;AAED;;;;;;;;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