@intutic/sync-daemon 2.0.0 → 2.2.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 (206) hide show
  1. package/dist/agentReporter.d.ts +5 -12
  2. package/dist/agentReporter.d.ts.map +1 -1
  3. package/dist/agentReporter.js +25 -4
  4. package/dist/agentReporter.js.map +1 -1
  5. package/dist/configReader.d.ts +44 -22
  6. package/dist/configReader.d.ts.map +1 -1
  7. package/dist/configReader.js +70 -44
  8. package/dist/configReader.js.map +1 -1
  9. package/dist/configWriter.d.ts +29 -41
  10. package/dist/configWriter.d.ts.map +1 -1
  11. package/dist/configWriter.js +28 -625
  12. package/dist/configWriter.js.map +1 -1
  13. package/dist/disconnect/harnesses.d.ts +31 -0
  14. package/dist/disconnect/harnesses.d.ts.map +1 -0
  15. package/dist/disconnect/harnesses.js +728 -0
  16. package/dist/disconnect/harnesses.js.map +1 -0
  17. package/dist/disconnect/index.d.ts +25 -0
  18. package/dist/disconnect/index.d.ts.map +1 -0
  19. package/dist/disconnect/index.js +82 -0
  20. package/dist/disconnect/index.js.map +1 -0
  21. package/dist/disconnect/mcp.d.ts +60 -0
  22. package/dist/disconnect/mcp.d.ts.map +1 -0
  23. package/dist/disconnect/mcp.js +283 -0
  24. package/dist/disconnect/mcp.js.map +1 -0
  25. package/dist/disconnect/originals.d.ts +88 -0
  26. package/dist/disconnect/originals.d.ts.map +1 -0
  27. package/dist/disconnect/originals.js +257 -0
  28. package/dist/disconnect/originals.js.map +1 -0
  29. package/dist/disconnect/plan.d.ts +175 -0
  30. package/dist/disconnect/plan.d.ts.map +1 -0
  31. package/dist/disconnect/plan.js +580 -0
  32. package/dist/disconnect/plan.js.map +1 -0
  33. package/dist/disconnect/recognise.d.ts +43 -0
  34. package/dist/disconnect/recognise.d.ts.map +1 -0
  35. package/dist/disconnect/recognise.js +98 -0
  36. package/dist/disconnect/recognise.js.map +1 -0
  37. package/dist/disconnect/tomlLines.d.ts +39 -0
  38. package/dist/disconnect/tomlLines.d.ts.map +1 -0
  39. package/dist/disconnect/tomlLines.js +105 -0
  40. package/dist/disconnect/tomlLines.js.map +1 -0
  41. package/dist/harness/aiderConfigMerger.d.ts +42 -5
  42. package/dist/harness/aiderConfigMerger.d.ts.map +1 -1
  43. package/dist/harness/aiderConfigMerger.js +113 -86
  44. package/dist/harness/aiderConfigMerger.js.map +1 -1
  45. package/dist/harness/antigravityHooks.d.ts +13 -8
  46. package/dist/harness/antigravityHooks.d.ts.map +1 -1
  47. package/dist/harness/antigravityHooks.js +53 -39
  48. package/dist/harness/antigravityHooks.js.map +1 -1
  49. package/dist/harness/claudeCodeHooks.d.ts +1 -2
  50. package/dist/harness/claudeCodeHooks.d.ts.map +1 -1
  51. package/dist/harness/claudeCodeHooks.js +61 -34
  52. package/dist/harness/claudeCodeHooks.js.map +1 -1
  53. package/dist/harness/claudeDesktopHooks.d.ts +3 -0
  54. package/dist/harness/claudeDesktopHooks.d.ts.map +1 -1
  55. package/dist/harness/claudeDesktopHooks.js +3 -1
  56. package/dist/harness/claudeDesktopHooks.js.map +1 -1
  57. package/dist/harness/claudeProjectApproval.d.ts +53 -0
  58. package/dist/harness/claudeProjectApproval.d.ts.map +1 -0
  59. package/dist/harness/claudeProjectApproval.js +159 -0
  60. package/dist/harness/claudeProjectApproval.js.map +1 -0
  61. package/dist/harness/clineHooks.d.ts +39 -9
  62. package/dist/harness/clineHooks.d.ts.map +1 -1
  63. package/dist/harness/clineHooks.js +142 -60
  64. package/dist/harness/clineHooks.js.map +1 -1
  65. package/dist/harness/codexConfigMerger.d.ts +38 -0
  66. package/dist/harness/codexConfigMerger.d.ts.map +1 -0
  67. package/dist/harness/codexConfigMerger.js +105 -0
  68. package/dist/harness/codexConfigMerger.js.map +1 -0
  69. package/dist/harness/codexHooks.d.ts +4 -2
  70. package/dist/harness/codexHooks.d.ts.map +1 -1
  71. package/dist/harness/codexHooks.js +14 -11
  72. package/dist/harness/codexHooks.js.map +1 -1
  73. package/dist/harness/continueConfigMerger.d.ts +46 -0
  74. package/dist/harness/continueConfigMerger.d.ts.map +1 -0
  75. package/dist/harness/continueConfigMerger.js +94 -0
  76. package/dist/harness/continueConfigMerger.js.map +1 -0
  77. package/dist/harness/continueHooks.d.ts +15 -25
  78. package/dist/harness/continueHooks.d.ts.map +1 -1
  79. package/dist/harness/continueHooks.js +25 -119
  80. package/dist/harness/continueHooks.js.map +1 -1
  81. package/dist/harness/cursorHooks.d.ts +33 -16
  82. package/dist/harness/cursorHooks.d.ts.map +1 -1
  83. package/dist/harness/cursorHooks.js +69 -25
  84. package/dist/harness/cursorHooks.js.map +1 -1
  85. package/dist/harness/dshHooks.d.ts +59 -52
  86. package/dist/harness/dshHooks.d.ts.map +1 -1
  87. package/dist/harness/dshHooks.js +152 -147
  88. package/dist/harness/dshHooks.js.map +1 -1
  89. package/dist/harness/gateBody.d.ts +11 -2
  90. package/dist/harness/gateBody.d.ts.map +1 -1
  91. package/dist/harness/gateBody.js +33 -6
  92. package/dist/harness/gateBody.js.map +1 -1
  93. package/dist/harness/gateKind.d.ts.map +1 -1
  94. package/dist/harness/gateKind.js +1 -0
  95. package/dist/harness/gateKind.js.map +1 -1
  96. package/dist/harness/githubCopilotHooks.d.ts.map +1 -1
  97. package/dist/harness/githubCopilotHooks.js +5 -10
  98. package/dist/harness/githubCopilotHooks.js.map +1 -1
  99. package/dist/harness/gooseHooks.d.ts +15 -0
  100. package/dist/harness/gooseHooks.d.ts.map +1 -1
  101. package/dist/harness/gooseHooks.js +55 -43
  102. package/dist/harness/gooseHooks.js.map +1 -1
  103. package/dist/harness/grokHooks.d.ts.map +1 -1
  104. package/dist/harness/grokHooks.js +14 -12
  105. package/dist/harness/grokHooks.js.map +1 -1
  106. package/dist/harness/hermesHooks.d.ts +9 -0
  107. package/dist/harness/hermesHooks.d.ts.map +1 -1
  108. package/dist/harness/hermesHooks.js +39 -33
  109. package/dist/harness/hermesHooks.js.map +1 -1
  110. package/dist/harness/holdRedaction.d.ts +4 -1
  111. package/dist/harness/holdRedaction.d.ts.map +1 -1
  112. package/dist/harness/holdRedaction.js +32 -8
  113. package/dist/harness/holdRedaction.js.map +1 -1
  114. package/dist/harness/jetbrainsXmlConfig.d.ts +20 -0
  115. package/dist/harness/jetbrainsXmlConfig.d.ts.map +1 -1
  116. package/dist/harness/jetbrainsXmlConfig.js +39 -18
  117. package/dist/harness/jetbrainsXmlConfig.js.map +1 -1
  118. package/dist/harness/jsonMergeTarget.d.ts +23 -0
  119. package/dist/harness/jsonMergeTarget.d.ts.map +1 -0
  120. package/dist/harness/jsonMergeTarget.js +50 -0
  121. package/dist/harness/jsonMergeTarget.js.map +1 -0
  122. package/dist/harness/mcpAutoWrite.d.ts +64 -20
  123. package/dist/harness/mcpAutoWrite.d.ts.map +1 -1
  124. package/dist/harness/mcpAutoWrite.js +429 -85
  125. package/dist/harness/mcpAutoWrite.js.map +1 -1
  126. package/dist/harness/museHooks.d.ts.map +1 -1
  127. package/dist/harness/museHooks.js +6 -2
  128. package/dist/harness/museHooks.js.map +1 -1
  129. package/dist/harness/n8nHooks.d.ts.map +1 -1
  130. package/dist/harness/n8nHooks.js +6 -7
  131. package/dist/harness/n8nHooks.js.map +1 -1
  132. package/dist/harness/openCodeHooks.d.ts +37 -6
  133. package/dist/harness/openCodeHooks.d.ts.map +1 -1
  134. package/dist/harness/openCodeHooks.js +103 -13
  135. package/dist/harness/openCodeHooks.js.map +1 -1
  136. package/dist/harness/openWebuiHooks.d.ts.map +1 -1
  137. package/dist/harness/openWebuiHooks.js +10 -5
  138. package/dist/harness/openWebuiHooks.js.map +1 -1
  139. package/dist/harness/openclawHooks.d.ts +5 -0
  140. package/dist/harness/openclawHooks.d.ts.map +1 -1
  141. package/dist/harness/openclawHooks.js +3 -1
  142. package/dist/harness/openclawHooks.js.map +1 -1
  143. package/dist/harness/openhandsHooks.d.ts +26 -1
  144. package/dist/harness/openhandsHooks.d.ts.map +1 -1
  145. package/dist/harness/openhandsHooks.js +160 -40
  146. package/dist/harness/openhandsHooks.js.map +1 -1
  147. package/dist/harness/piHooks.d.ts +17 -0
  148. package/dist/harness/piHooks.d.ts.map +1 -1
  149. package/dist/harness/piHooks.js +31 -29
  150. package/dist/harness/piHooks.js.map +1 -1
  151. package/dist/harness/protectedPaths.d.ts +64 -6
  152. package/dist/harness/protectedPaths.d.ts.map +1 -1
  153. package/dist/harness/protectedPaths.js +161 -11
  154. package/dist/harness/protectedPaths.js.map +1 -1
  155. package/dist/harness/rooCodeHooks.d.ts.map +1 -1
  156. package/dist/harness/rooCodeHooks.js +5 -10
  157. package/dist/harness/rooCodeHooks.js.map +1 -1
  158. package/dist/harness/windsurfHooks.d.ts +21 -3
  159. package/dist/harness/windsurfHooks.d.ts.map +1 -1
  160. package/dist/harness/windsurfHooks.js +96 -44
  161. package/dist/harness/windsurfHooks.js.map +1 -1
  162. package/dist/harness/windsurfJetBrainsProxy.d.ts +10 -7
  163. package/dist/harness/windsurfJetBrainsProxy.d.ts.map +1 -1
  164. package/dist/harness/windsurfJetBrainsProxy.js +22 -7
  165. package/dist/harness/windsurfJetBrainsProxy.js.map +1 -1
  166. package/dist/index.d.ts +12 -12
  167. package/dist/index.d.ts.map +1 -1
  168. package/dist/index.js +11 -10
  169. package/dist/index.js.map +1 -1
  170. package/dist/lib/decisionsDigest.d.ts +1 -1
  171. package/dist/lib/decisionsDigest.js +1 -1
  172. package/dist/lib/policySnapshot.d.ts +37 -0
  173. package/dist/lib/policySnapshot.d.ts.map +1 -1
  174. package/dist/lib/policySnapshot.js +170 -8
  175. package/dist/lib/policySnapshot.js.map +1 -1
  176. package/dist/sessionReporter.d.ts +2 -2
  177. package/dist/sessionReporter.js +2 -2
  178. package/dist/syncCycle.d.ts +142 -0
  179. package/dist/syncCycle.d.ts.map +1 -0
  180. package/dist/syncCycle.js +315 -0
  181. package/dist/syncCycle.js.map +1 -0
  182. package/dist/trajectoryMonitor.d.ts +1 -1
  183. package/dist/trajectoryMonitor.d.ts.map +1 -1
  184. package/dist/trajectoryMonitor.js +1 -1
  185. package/dist/trajectoryMonitor.js.map +1 -1
  186. package/dist/watcher/settingsGuard.d.ts +4 -1
  187. package/dist/watcher/settingsGuard.d.ts.map +1 -1
  188. package/dist/watcher/settingsGuard.js +42 -18
  189. package/dist/watcher/settingsGuard.js.map +1 -1
  190. package/package.json +6 -6
  191. package/dist/hashReporter.d.ts +0 -33
  192. package/dist/hashReporter.d.ts.map +0 -1
  193. package/dist/hashReporter.js +0 -69
  194. package/dist/hashReporter.js.map +0 -1
  195. package/dist/integrityStore.d.ts +0 -35
  196. package/dist/integrityStore.d.ts.map +0 -1
  197. package/dist/integrityStore.js +0 -71
  198. package/dist/integrityStore.js.map +0 -1
  199. package/dist/lib/gitWorktrees.d.ts +0 -140
  200. package/dist/lib/gitWorktrees.d.ts.map +0 -1
  201. package/dist/lib/gitWorktrees.js +0 -191
  202. package/dist/lib/gitWorktrees.js.map +0 -1
  203. package/dist/syncLoop.d.ts +0 -172
  204. package/dist/syncLoop.d.ts.map +0 -1
  205. package/dist/syncLoop.js +0 -878
  206. package/dist/syncLoop.js.map +0 -1
@@ -21,11 +21,11 @@
21
21
  * Muse Code/Grok Build in Wave 1. This writer was authored against a real
22
22
  * `npm pack` + read of those packages' shipped `.d.ts`/README files, not
23
23
  * solely the phase brief's prior research (see the TD entry this phase filed
24
- * for exactly what was checked and what is still genuinely unconfirmed —
25
- * dsh-permission, dsh-settings-local, and dsh-fs-policy 404'd as
26
- * `publishConfig.access: restricted`, so the exact settings.yaml schema
27
- * dsh-settings-local enforces was not directly inspected, only inferred from
28
- * `dsh-base`'s own `cordis.patch.yml` comments and `dsh-llm-pi-ai`'s README).
24
+ * for exactly what was checked). In 0.1 three packages (dsh-permission,
25
+ * dsh-settings-local, dsh-fs-policy) 404'd as restricted; 0.2.0-rc.2 no
26
+ * longer depends on them — their roles moved to the public `dsh-settings`,
27
+ * `dsh-config-editor`, `dsh-sandbox-policy`, `dsh-permission-presets` and
28
+ * `dsh-user-approval`, all read directly for the 0.2 re-verification.
29
29
  *
30
30
  * Confirmed facts this writer relies on:
31
31
  *
@@ -56,30 +56,31 @@
56
56
  * for out-of-tree plugins) — which means `@intutic/gate` must actually be
57
57
  * installed there; see {@link mergeProfileDependency} and the TD entry
58
58
  * for why this writer cannot run `pnpm install` on the user's behalf.
59
- * - `settings.yaml`'s `llm-pi-ai.providers.<id>.baseURL` path — CONFIRMED,
60
- * not merely the plan's assumption: `dsh-llm-pi-ai`'s shipped README shows
61
- * exactly this shape overriding an EXISTING catalog route's endpoint
62
- * (`providers.openai.baseURL: https://proxy.example.com:8443`), the same
63
- * "override base_url on what already resolves, don't invent a model
64
- * picker entry" shape `grokHooks.ts`'s `[model.*]` merge uses. `llm-pi-ai`
65
- * is NOT dsh's default LLM route (`llm-deepseek`, the native DeepSeek
66
- * adapter, is — see `dsh-base`'s own `agent-default-model` row) and
67
- * mounts **dormant** until a `llm-pi-ai:` settings section exists at all,
68
- * so this override alone never redirected a fresh profile's DEFAULT
69
- * egress — it only added a selectable route.
70
- * - **TD-370 follow-up, closed this phase:** `@deepseek-ai/dsh-llm-deepseek`
71
- * (registry-public, `npm pack`ed and read directly — 0.1.0-rc.8, the
72
- * current prerelease at the time) IS the adapter `dsh-base`'s
73
- * `agent-default-model` routes through by default, and its own shipped
74
- * README CONFIRMS the same live-reload settings seam `llm-pi-ai` has:
75
- * "the plugin registers the `llm-deepseek` namespace with this same
76
- * `Config` schema ... so a `llm-deepseek:` section in the user settings
77
- * document overrides any field without a restart." {@link mergeSettingsYaml}
78
- * now also merges `llm-deepseek.baseURL`, touching only that one field
79
- * (same "override base_url on what already resolves" discipline as the
80
- * `llm-pi-ai` merge and `grokHooks.ts`'s `[model.*]` merge) — this is the
81
- * one that actually redirects DEFAULT egress. The `llm-pi-ai` merge is
82
- * kept alongside it (a selectable route remains useful), not replaced.
59
+ * - **LLM egress, re-verified against dsh 0.2.0-rc.2 (TD-370, 2026-10-03).**
60
+ * 0.2 removed the harness-home `settings.yaml` document this writer used
61
+ * to merge into: `@deepseek-ai/dsh-settings` now imports a leftover
62
+ * `$DSH_HOME/settings.yaml` ONCE into whichever profile boots first
63
+ * (renaming it to `settings.yaml.imported`), and live configuration
64
+ * lives in each profile's `cordis.patch.yml` as an id-targeted override
65
+ * row (`dsh-config-editor` persists Models-page edits the same way). The
66
+ * default route is still the entry id `llm-deepseek` — in 0.2 that id
67
+ * mounts `@deepseek-ai/dsh-llm-deepseek-api-key`, which registers the
68
+ * `deepseek-official` provider `dsh-base`'s `agent-default-model` row
69
+ * selects (`provider: deepseek-official, model: deepseek-flash`) — and
70
+ * `dsh-llm-deepseek`'s README confirms its endpoint resolves "explicit
71
+ * value, then `$DEEPSEEK_BASE_URL`, then the official root"
72
+ * (`https://api.deepseek.com/anthropic`, Messages wire format; requests
73
+ * go to `<baseURL>/v1/messages`). {@link mergeProfileLlmRoute} therefore
74
+ * sets `config.baseURL` on that entry's override row in every profile
75
+ * patch. Observed live (uat/evidence/live-verify/dsh-0.2.md): a headless
76
+ * 0.2.0-rc.2 session sent every model request to the configured base URL.
77
+ * Two routes are deliberately NOT redirected: `llm-pi-ai` (0.2 refuses a
78
+ * hand-declared route without a non-empty `models` list, so the old
79
+ * `providers.intutic` route is now invalid config — dropped), and
80
+ * `llm-deepseek-account` (`deepseek-account` provider; its token is only
81
+ * released to `inferenceOrigin`, which accepts an alternate origin only
82
+ * with a grant from DeepSeek's platform — an opt-in, signed-in route this
83
+ * writer cannot point at a proxy). See the TD entry.
83
84
  * - The `@intutic/gate/dsh` veto contract itself (`tools/pre-execute`,
84
85
  * `PreToolDecision`'s real `'deny'`/`'allow'`/`'ask'` shape, Cordis's
85
86
  * `waterfall` `next()` semantics) is confirmed from `dsh-tools`'s shipped
@@ -95,8 +96,10 @@ import { existsSync } from 'node:fs';
95
96
  import * as path from 'node:path';
96
97
  import * as os from 'node:os';
97
98
  import { isDeepStrictEqual } from 'node:util';
98
- import { isMap, isSeq, parseDocument } from 'yaml';
99
+ import { isSeq, parseDocument } from 'yaml';
99
100
  import { createLogger } from '@intutic/logger';
101
+ import { keepOriginal, noteWritten } from '../disconnect/originals.js';
102
+ import { anthropicBaseUrl } from '@intutic/shared-types';
100
103
  const log = createLogger('sync-dsh-hooks');
101
104
  /** Mirrors `dsh-home-paths`' `DSH_HOME_ENV`/`DSH_HOME_DIR_NAME` constants. */
102
105
  const DSH_HOME_ENV = 'DSH_HOME';
@@ -104,19 +107,19 @@ const DSH_HOME_DIR_NAME = '.dsh';
104
107
  /** Mirrors `dsh-app-boot`'s `PROFILES_DIR`/`PROFILE_PATCH_FILENAME`. */
105
108
  const PROFILES_DIR = 'profiles';
106
109
  const PROFILE_PATCH_FILENAME = 'cordis.patch.yml';
107
- const SETTINGS_FILENAME = 'settings.yaml';
108
110
  /** Stable row id — recognized on every later sync regardless of which of the
109
111
  * patch-op shapes (see module doc) a prior write or a human left. */
110
112
  const PLUGIN_ROW_ID = 'intutic-governance';
111
113
  /** Resolved via a bare `import()` from the profile's own `node_modules` — see
112
114
  * {@link mergeProfileDependency}. */
113
115
  const PLUGIN_MODULE_NAME = '@intutic/gate/dsh';
114
- /** The pinned `@intutic/gate` version range written into a profile's
115
- * `package.json` dependency — dsh's own preview-software stance (stated
116
- * breaking-changes policy) is matched here the same way Muse Code/Grok Build
117
- * pin themselves against a *tested* version rather than `latest`. Bump this
118
- * alongside `packages/gate-js/package.json`'s own `version` field. */
119
- const INTUTIC_GATE_VERSION_RANGE = '^0.1.0';
116
+ /** The `@intutic/gate` range declared in a profile's `package.json` when the
117
+ * profile declares none yet. Must name a version that exists on npm with a
118
+ * `./dsh` export — this was `^0.1.0` until 2026-10-03, which no published
119
+ * `@intutic/gate` satisfies (npm has 1.10.1 and 2.0.0), so a `pnpm install`
120
+ * in the profile could never resolve it. Bump with
121
+ * `packages/gate-js/package.json`'s major version. */
122
+ const INTUTIC_GATE_VERSION_RANGE = '^2.0.0';
120
123
  /** `$DSH_HOME` resolution: an explicit env override, else `~/.dsh` — mirrors
121
124
  * `dsh-home-paths`' `resolveDshHome()` (this writer has no "explicit
122
125
  * configured path" input the way a booted dsh process might). An
@@ -328,10 +331,19 @@ export async function mergeProfilePatch(profileDir, workspaceRoot, workspaceId)
328
331
  * writer in this codebase only ever writes config, never invokes a package
329
332
  * manager on the user's behalf. Until the user (or their own tooling) runs
330
333
  * one, the `cordis.patch.yml` row this module also writes resolves to a
331
- * MISSING module and dsh's own loader reports that row's activation failed
332
- * (`assertEntriesActivated`, confirmed from `dsh-app-boot`'s exports) rather
333
- * than silently no-op — a fail-LOUD gap, not a fail-open one, but a real
334
- * manual step nonetheless. See the TD entry and `apps/docs/integrations/dsh.md`.
334
+ * MISSING module. Observed live against dsh 0.2.0-rc.2: the loader prints
335
+ * `dsh: warning: 1 entry did not activate` / `intutic-governance
336
+ * (@intutic/gate/dsh): failed to import` on stderr and the session then runs
337
+ * UNGOVERNED — loud, but fail-OPEN (dsh's hard-fail list is global to the
338
+ * launcher; a profile row cannot mark itself required). See the TD entry and
339
+ * `apps/docs/integrations/dsh.md`.
340
+ *
341
+ * Adds the declaration only when the profile has none: an existing one was
342
+ * written by `dsh plugin --profile <name> add @intutic/gate` (pnpm records
343
+ * the installed range, e.g. `^2.0.0`) or by the user, and rewriting it to this
344
+ * writer's range on every sync would drift the manifest away from what is
345
+ * actually installed — observed live against dsh 0.2.0-rc.2, where the old
346
+ * `^0.1.0` overwrote pnpm's `^2.0.0`.
335
347
  */
336
348
  export async function mergeProfileDependency(profileDir) {
337
349
  const manifestPath = path.join(profileDir, 'package.json');
@@ -347,7 +359,7 @@ export async function mergeProfileDependency(profileDir) {
347
359
  const deps = (manifest.dependencies && typeof manifest.dependencies === 'object'
348
360
  ? manifest.dependencies
349
361
  : {});
350
- if (deps['@intutic/gate'] === INTUTIC_GATE_VERSION_RANGE)
362
+ if (typeof deps['@intutic/gate'] === 'string' && deps['@intutic/gate'].trim())
351
363
  return;
352
364
  manifest.dependencies = { ...deps, '@intutic/gate': INTUTIC_GATE_VERSION_RANGE };
353
365
  const tmp = manifestPath + '.intutic-tmp';
@@ -355,120 +367,104 @@ export async function mergeProfileDependency(profileDir) {
355
367
  await fs.rename(tmp, manifestPath);
356
368
  log.info({ action: 'dsh_dependency_written', path: manifestPath }, 'dsh profile package.json dependency updated');
357
369
  }
358
- // ─── settings.yaml: llm-deepseek (default route) + llm-pi-ai (selectable) ──
359
- /** dsh's ACTUAL DEFAULT LLM route — `@deepseek-ai/dsh-llm-deepseek`, per
360
- * `dsh-base`'s own `agent-default-model` row. See module doc for the
361
- * README confirmation that a `llm-deepseek:` settings section overrides
362
- * this adapter's config live, no restart. */
363
- const DEFAULT_LLM_SECTION = 'llm-deepseek';
364
- /** A SELECTABLE route, mounts dormant until this section exists at all —
365
- * see module doc. Kept alongside the default-route merge, not replaced. */
366
- const SELECTABLE_LLM_SECTION = 'llm-pi-ai';
367
- async function mergeSettingsYamlAppendOnly(settingsPath, existingYaml, proxyUrl) {
368
- const blocks = [];
369
- if (!existingYaml.includes(`${DEFAULT_LLM_SECTION}:`)) {
370
- blocks.push('', '# Intutic proxy route — auto-appended (fallback: this file did not parse as YAML).', "# Redirects dsh's DEFAULT LLM route (llm-deepseek, the native DeepSeek", "# adapter — see dsh-base's agent-default-model row) through the proxy.", `${DEFAULT_LLM_SECTION}:`, ` baseURL: ${JSON.stringify(proxyUrl)}`);
371
- }
372
- if (!existingYaml.includes(`${SELECTABLE_LLM_SECTION}:`)) {
373
- blocks.push('', '# Intutic proxy route — auto-appended (fallback: this file did not parse as YAML).', `${SELECTABLE_LLM_SECTION}:`, ' providers:', ' intutic:', ' displayName: Intutic Governance Proxy', ' api: openai-completions', ` baseURL: ${JSON.stringify(proxyUrl)}`);
370
+ // ─── cordis.patch.yml: llm-deepseek egress override (dsh's default route) ──
371
+ /** The profile entry id of dsh's DEFAULT LLM route. In 0.2 it mounts
372
+ * `@deepseek-ai/dsh-llm-deepseek-api-key` (provider `deepseek-official`, the
373
+ * one `dsh-base`'s `agent-default-model` row selects). No module-name
374
+ * assertion is written alongside it: an id-targeted row without `name`
375
+ * survives DeepSeek renaming the module again (0.1 named it
376
+ * `dsh-llm-deepseek`), where a stale assertion would fail profile boot. */
377
+ const DEFAULT_LLM_ENTRY_ID = 'llm-deepseek';
378
+ /** Index of the LAST bare (not `insert:`-wrapped) row targeting
379
+ * {@link DEFAULT_LLM_ENTRY_ID} — the loader applies patch rows in order, so
380
+ * the last one is the override that takes effect, and it is also the one
381
+ * `dsh-config-editor` edits when the user saves the Models page. */
382
+ function findLastLlmOverride(patchList) {
383
+ for (let i = patchList.length - 1; i >= 0; i--) {
384
+ const item = patchList[i];
385
+ if (!item || typeof item !== 'object' || Array.isArray(item))
386
+ continue;
387
+ const obj = item;
388
+ if (obj.id === DEFAULT_LLM_ENTRY_ID && !('insert' in obj))
389
+ return i;
374
390
  }
375
- if (blocks.length === 0)
376
- return;
377
- const text = existingYaml.trimEnd() + '\n' + blocks.join('\n') + '\n';
378
- await fs.mkdir(path.dirname(settingsPath), { recursive: true });
379
- const tmp = settingsPath + '.intutic-tmp';
380
- await fs.writeFile(tmp, text, 'utf-8');
381
- await fs.rename(tmp, settingsPath);
382
- log.info({ action: 'dsh_settings_written', path: settingsPath, mode: 'append_only_fallback' }, 'dsh settings.yaml updated (append-only fallback)');
391
+ return -1;
383
392
  }
384
393
  /**
385
- * Structurally merges the Intutic proxy into TWO `settings.yaml` sections:
394
+ * Points dsh's DEFAULT LLM route at the Intutic proxy by setting
395
+ * `config.baseURL` on the profile's `llm-deepseek` override row.
386
396
  *
387
- * - `llm-deepseek.baseURL` — dsh's ACTUAL DEFAULT LLM route (CONFIRMED
388
- * against `@deepseek-ai/dsh-llm-deepseek`'s own shipped README this
389
- * phase — see module doc). Only `baseURL` is touched; `apiKeyEnv`,
390
- * `thinking`, `models`, etc. round-trip untouched, the same
391
- * "override base_url on what already resolves, never invent the rest of
392
- * the section" discipline `grokHooks.ts`'s `[model.*]` merge uses. This
393
- * is the merge that actually redirects DEFAULT egress — see the TD entry
394
- * for why the `llm-pi-ai` merge alone (below) never did.
395
- * - `llm-pi-ai.providers.intutic` — a SELECTABLE route (mounts dormant
396
- * until this section exists at all — see module doc). Kept alongside the
397
- * new default-route merge: a user, or a future sync, can still point a
398
- * model at it explicitly.
397
+ * A Cordis id-targeted patch REPLACES the entry's whole `config`
398
+ * (`dsh-app-boot`'s README: "an id-targeted patch does not deep-merge"), so
399
+ * when the profile already overrides this entry (a Models-page save, a hand
400
+ * edit, or dsh 0.2's one-time import of a legacy `settings.yaml`), only
401
+ * `baseURL` is set on THAT row and every other field it restates
402
+ * (`apiKeyEnv`, `reasoningEffort`, `models`, ...) round-trips untouched.
403
+ * Otherwise a fresh `{ id, config: { baseURL } }` row is appended — the
404
+ * base bundle's row carries no config, so nothing is lost by replacing it.
399
405
  *
400
- * Both overrides preserve every other provider and every other top-level
401
- * section untouched.
406
+ * Same parse-structurally / write-if-changed / append-only-on-unparseable
407
+ * discipline as {@link mergeProfilePatch}, on the same file.
402
408
  */
403
- export async function mergeSettingsYaml(dshHome, proxyUrl) {
404
- const settingsPath = path.join(dshHome, SETTINGS_FILENAME);
409
+ export async function mergeProfileLlmRoute(profileDir, proxyUrl) {
410
+ const patchPath = path.join(profileDir, PROFILE_PATCH_FILENAME);
405
411
  let existingYaml = '';
406
412
  try {
407
- existingYaml = await fs.readFile(settingsPath, 'utf-8');
413
+ existingYaml = await fs.readFile(patchPath, 'utf-8');
408
414
  }
409
415
  catch {
410
- // No settings.yaml yet — falls through with '' so a fresh file is
411
- // written below.
416
+ // No cordis.patch.yml yet — written fresh below.
412
417
  }
413
418
  let doc;
414
419
  try {
415
- doc = parseDocument(existingYaml.trim() ? existingYaml : '{}');
420
+ doc = parseDocument(existingYaml.trim() ? existingYaml : '[]');
416
421
  if (doc.errors.length > 0)
417
422
  throw doc.errors[0];
418
423
  }
419
- catch (err) {
420
- log.warn({ action: 'dsh_settings_unparseable', path: settingsPath, err: err.message }, 'dsh settings.yaml did not parse as YAML — falling back to append-only text injection');
421
- await mergeSettingsYamlAppendOnly(settingsPath, existingYaml, proxyUrl);
424
+ catch {
425
+ // mergeProfilePatch already logged this file as unparseable this cycle.
426
+ // Append only when no row for this id exists at all: a row we cannot
427
+ // parse is a row we cannot safely edit, and a second, later row would
428
+ // silently replace whatever config the user gave it.
429
+ if (existingYaml.includes(`id: ${DEFAULT_LLM_ENTRY_ID}`))
430
+ return;
431
+ const block = [
432
+ '',
433
+ '# Intutic proxy route — auto-appended (fallback: this file did not parse as YAML).',
434
+ `- id: ${DEFAULT_LLM_ENTRY_ID}`,
435
+ ' config:',
436
+ ` baseURL: ${JSON.stringify(proxyUrl)}`,
437
+ ].join('\n');
438
+ const tmp = patchPath + '.intutic-tmp';
439
+ await fs.writeFile(tmp, (existingYaml || '[]').trimEnd() + '\n' + block + '\n', 'utf-8');
440
+ await fs.rename(tmp, patchPath);
441
+ log.info({ action: 'dsh_llm_route_written', path: patchPath, mode: 'append_only_fallback' }, 'dsh llm-deepseek route updated (append-only fallback)');
422
442
  return;
423
443
  }
424
- if (doc.contents == null || !isMap(doc.contents)) {
425
- doc.contents = doc.createNode({});
444
+ if (doc.contents == null || !isSeq(doc.contents))
445
+ doc.contents = doc.createNode([]);
446
+ const patchList = doc.toJS();
447
+ const index = findLastLlmOverride(patchList);
448
+ if (index === -1) {
449
+ doc.addIn([], doc.createNode({ id: DEFAULT_LLM_ENTRY_ID, config: { baseURL: proxyUrl } }));
426
450
  }
427
- // Defensive per-level checks: `setIn` auto-vivifies a MISSING intermediate
428
- // key as a map, but throws on an EXISTING non-collection value at that key
429
- // (confirmed empirically against the `yaml` package) — same failure mode
430
- // `injectGoose` guards for `mcp: null`. Reset only the offending level,
431
- // never the whole document.
432
- for (const keyPath of [
433
- [DEFAULT_LLM_SECTION],
434
- [SELECTABLE_LLM_SECTION],
435
- [SELECTABLE_LLM_SECTION, 'providers'],
436
- ]) {
437
- const node = doc.getIn(keyPath);
438
- if (node !== undefined && !isMap(node)) {
439
- doc.setIn(keyPath, {});
451
+ else {
452
+ const config = patchList[index].config;
453
+ if (config && typeof config === 'object' && !Array.isArray(config)) {
454
+ if (config.baseURL === proxyUrl)
455
+ return;
456
+ doc.setIn([index, 'config', 'baseURL'], proxyUrl);
457
+ }
458
+ else {
459
+ // `config` absent, null, or a scalar — setIn cannot descend into it.
460
+ doc.setIn([index, 'config'], doc.createNode({ baseURL: proxyUrl }));
440
461
  }
441
462
  }
442
- const settingsJs = doc.toJS();
443
- let changed = false;
444
- // ── llm-deepseek: DEFAULT route ──────────────────────────────────────
445
- const deepseekSection = settingsJs[DEFAULT_LLM_SECTION] ?? {};
446
- const desiredDeepseekSection = { ...deepseekSection, baseURL: proxyUrl };
447
- if (!isDeepStrictEqual(deepseekSection, desiredDeepseekSection)) {
448
- doc.setIn([DEFAULT_LLM_SECTION], desiredDeepseekSection);
449
- changed = true;
450
- }
451
- // ── llm-pi-ai: SELECTABLE route ──────────────────────────────────────
452
- const llmPiAi = settingsJs[SELECTABLE_LLM_SECTION] ?? {};
453
- const providers = llmPiAi.providers ?? {};
454
- const existingRoute = providers.intutic ?? {};
455
- const desiredRoute = {
456
- ...existingRoute,
457
- displayName: 'Intutic Governance Proxy',
458
- api: 'openai-completions',
459
- baseURL: proxyUrl,
460
- };
461
- if (!isDeepStrictEqual(existingRoute, desiredRoute)) {
462
- doc.setIn([SELECTABLE_LLM_SECTION, 'providers', 'intutic'], desiredRoute);
463
- changed = true;
464
- }
465
- if (!changed)
466
- return;
467
- await fs.mkdir(dshHome, { recursive: true });
468
- const tmp = settingsPath + '.intutic-tmp';
463
+ await fs.mkdir(profileDir, { recursive: true });
464
+ const tmp = patchPath + '.intutic-tmp';
469
465
  await fs.writeFile(tmp, doc.toString(), 'utf-8');
470
- await fs.rename(tmp, settingsPath);
471
- log.info({ action: 'dsh_settings_written', path: settingsPath, mode: 'yaml' }, 'dsh settings.yaml updated (structural YAML edit)');
466
+ await fs.rename(tmp, patchPath);
467
+ log.info({ action: 'dsh_llm_route_written', path: patchPath, mode: 'yaml' }, 'dsh llm-deepseek route updated (structural YAML edit)');
472
468
  }
473
469
  // ─── INSTALL.md: the manual pnpm-install / `dsh plugin add` step ──────────
474
470
  /**
@@ -494,23 +490,24 @@ Every sync writes the \`intutic-governance\` row into each profile's
494
490
  \`@intutic/gate\` in that profile's \`package.json\` \`dependencies\` — but this
495
491
  daemon has no general capability to run a package manager in a directory it
496
492
  does not own, so the dependency itself is never installed by this writer.
497
- Until it is, dsh's own Cordis loader reports that row's activation as
498
- FAILED (fail-loud, not silent — \`dsh-app-boot\`'s \`assertEntriesActivated\`)
499
- rather than silently skipping it, but it also means nothing is governed yet.
493
+ Until it is, dsh's loader cannot import the row's module and prints a
494
+ labelled plugin-activation warning on every start (dsh 0.2 keeps booting
495
+ without it — the row is not a required entry), so nothing is governed yet.
500
496
 
501
497
  Finish activation with dsh's own forwarding command, once per profile:
502
498
 
503
499
  ${profileLines}
504
500
 
505
- That is equivalent to \`cd $DSH_HOME/profiles/<name> && pnpm install\` —
506
- either works; the forwarding command is dsh's own documented shortcut for
507
- exactly this case.
501
+ dsh 0.2 installs it as a plain profile dependency (it warns that the package
502
+ declares no \`dsh.bundle\` — expected: the row above is what loads it).
503
+ \`cd $DSH_HOME/profiles/<name> && pnpm add @intutic/gate\` is equivalent.
508
504
 
509
505
  ## Default LLM egress needs no manual step
510
506
 
511
- The Intutic proxy is merged into \`settings.yaml\`'s \`llm-deepseek\` (dsh's
512
- default LLM route) and \`llm-pi-ai\` (a selectable route) sections on every
513
- sync — both take effect on dsh's next request without a restart.
507
+ Every sync also sets \`config.baseURL\` on the \`llm-deepseek\` row of each
508
+ profile's \`cordis.patch.yml\` (dsh's default \`deepseek-official\` route) to
509
+ the Intutic proxy. A signed-in DeepSeek *account* route (\`deepseek-account\`)
510
+ is not redirected: dsh only releases its token to DeepSeek's own origin.
514
511
  `;
515
512
  }
516
513
  /** Write-if-changed, atomic rename — same discipline every other writer in
@@ -528,17 +525,19 @@ async function writeDshInstallMd(dshHome, profileNames) {
528
525
  }
529
526
  if (existing === content)
530
527
  return;
528
+ await keepOriginal(installPath, dshHome);
531
529
  await fs.mkdir(dshHome, { recursive: true });
532
530
  const tmp = installPath + '.intutic-tmp';
533
531
  await fs.writeFile(tmp, content, 'utf-8');
534
532
  await fs.rename(tmp, installPath);
533
+ await noteWritten(installPath, dshHome, content);
535
534
  log.info({ action: 'dsh_install_md_written', path: installPath }, 'dsh INSTALL.md updated');
536
535
  }
537
536
  // ─── Public API ────────────────────────────────────────────────────────────
538
537
  /**
539
538
  * Register the Intutic governance plugin against every existing dsh profile
540
- * on this machine, and merge the Intutic proxy into `settings.yaml`'s
541
- * `llm-deepseek` (default) and `llm-pi-ai` (selectable) routes.
539
+ * on this machine, and point each profile's `llm-deepseek` (default) LLM
540
+ * route at the Intutic proxy.
542
541
  *
543
542
  * A no-op (logged, not an error) when `$DSH_HOME/profiles` does not exist
544
543
  * yet — dsh has not been run with any `--profile <name>` on this machine, so
@@ -548,7 +547,7 @@ async function writeDshInstallMd(dshHome, profileNames) {
548
547
  *
549
548
  * @param workspaceRoot - Absolute workspace root (stored in the plugin row's
550
549
  * `config.repoRoot`).
551
- * @param proxyUrl - Intutic proxy URL, merged into settings.yaml.
550
+ * @param proxyUrl - Intutic proxy URL, set as the `llm-deepseek` row's `baseURL`.
552
551
  * @param workspaceId - Workspace ID, stored in the plugin row's config.
553
552
  */
554
553
  export async function writeDshHooks(workspaceRoot, proxyUrl, workspaceId = '') {
@@ -559,11 +558,17 @@ export async function writeDshHooks(workspaceRoot, proxyUrl, workspaceId = '') {
559
558
  return;
560
559
  }
561
560
  for (const profileDir of profileDirs) {
561
+ // The profile's own files, kept for disconnect before Intutic first edits
562
+ // them. Recorded under $DSH_HOME, which need not be inside the home directory.
563
+ await keepOriginal(path.join(profileDir, PROFILE_PATCH_FILENAME), dshHome);
564
+ await keepOriginal(path.join(profileDir, 'package.json'), dshHome);
562
565
  await mergeProfilePatch(profileDir, workspaceRoot, workspaceId);
566
+ // dsh's llm-deepseek route speaks the Anthropic Messages wire and
567
+ // appends /v1/messages to its baseURL, so it gets the bare proxy host.
568
+ await mergeProfileLlmRoute(profileDir, anthropicBaseUrl(proxyUrl));
563
569
  await mergeProfileDependency(profileDir);
564
570
  log.info({ action: 'dsh_profile_written', profile: path.basename(profileDir) }, 'dsh profile governance plugin registered');
565
571
  }
566
- await mergeSettingsYaml(dshHome, proxyUrl);
567
572
  await writeDshInstallMd(dshHome, profileDirs.map((d) => path.basename(d)));
568
573
  }
569
574
  //# sourceMappingURL=dshHooks.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dshHooks.js","sourceRoot":"","sources":["../../src/harness/dshHooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2FG;AAEH,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAA;AACtC,OAAO,EAAE,UAAU,EAAe,MAAM,SAAS,CAAA;AACjD,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA;AACjC,OAAO,KAAK,EAAE,MAAM,SAAS,CAAA;AAC7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAC7C,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,MAAM,CAAA;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAE9C,MAAM,GAAG,GAAG,YAAY,CAAC,gBAAgB,CAAC,CAAA;AAE1C,8EAA8E;AAC9E,MAAM,YAAY,GAAG,UAAU,CAAA;AAC/B,MAAM,iBAAiB,GAAG,MAAM,CAAA;AAChC,wEAAwE;AACxE,MAAM,YAAY,GAAG,UAAU,CAAA;AAC/B,MAAM,sBAAsB,GAAG,kBAAkB,CAAA;AACjD,MAAM,iBAAiB,GAAG,eAAe,CAAA;AAEzC;sEACsE;AACtE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AAC,IAAI,CAAC,EAAE,MAAM,EAAE,qBAAqB,EAAE,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,EAAE,0CAA0C,CAAC,CAAA;IAC7H,CAAC;IAED,MAAM,iBAAiB,CAAC,OAAO,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AAC5E,CAAC"}
@@ -113,8 +113,17 @@ import { DESTRUCTIVE_COMMAND_PATTERNS, type GuardPattern } from './protectedPath
113
113
  * unrecognised severity to `flags`, i.e. ALLOWED, which is why the v8 filter
114
114
  * maps unknown to block and why the daemon regenerates every gate each cycle —
115
115
  * the skew window is one sync interval.
116
+ *
117
+ * v9: SSO-group refusals. The snapshot carries the workspace's
118
+ * `sso_group_policy` and the member it was issued to as an `@sso_groups` data
119
+ * line (two columns, so every rule parser skips it; inside the digest, so an
120
+ * edited group list fails the check), and the policy decided for that member
121
+ * as ordinary `sso_group.*` block rules on the tool subject. The one gate-side
122
+ * change: an invalid snapshot keeps its `sso_group.*` block rules instead of
123
+ * dropping them with the rest of the dynamic tier. A v8 gate reading a v9
124
+ * snapshot enforces the same rules and drops them on an invalid one.
116
125
  */
117
- export declare const GATE_VERSION = 8;
126
+ export declare const GATE_VERSION = 9;
118
127
  /**
119
128
  * The coarse command → action-token classification the hold tier keys on:
120
129
  * `review_before: action:deploy` holds a shell command that contains any of
@@ -241,7 +250,7 @@ export declare function toRulesLine(p: GuardPattern): string;
241
250
  * calling: a crash earlier than the definition still blocks, just without an
242
251
  * audit line (stderr carries the reason either way).
243
252
  */
244
- export declare const SHELL_FAIL_CLOSED = "\n# \u2500\u2500 Intutic fail-closed prelude v8 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n# Any exit status other than the two deliberate verdicts (0 = allow, 2 = block)\n# means this gate crashed rather than decided. The harness would read exit 1 as\n# \"hook errored\" and run the tool anyway, so a crash is converted into a block.\n# EXIT rather than ERR: ERR is unreliable across shells for set -u deaths, and\n# it fires on benign non-zero intermediates; the final status cannot lie.\nintutic_fail_closed() {\n _intutic_exit_rc=$?\n # The trap must not itself die on an unset variable or a failed command \u2014\n # that would replace the exit status it exists to correct.\n set +eu\n trap - EXIT\n if [ \"$_intutic_exit_rc\" = \"0\" ] || [ \"$_intutic_exit_rc\" = \"2\" ]; then\n exit \"$_intutic_exit_rc\"\n fi\n echo \"[Intutic Governance] BLOCKED: gate crashed (exit ${_intutic_exit_rc}) \u2014 failing closed rather than allowing an unevaluated call.\" >&2\n if command -v log_event >/dev/null 2>&1; then\n log_event \"tool_blocked\" \"${TOOL:-unknown}\" \"gate crashed (exit ${_intutic_exit_rc}) \u2014 failing closed\" || true\n fi\n exit 2\n}\ntrap intutic_fail_closed EXIT\n";
253
+ export declare const SHELL_FAIL_CLOSED = "\n# \u2500\u2500 Intutic fail-closed prelude v9 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n# Any exit status other than the two deliberate verdicts (0 = allow, 2 = block)\n# means this gate crashed rather than decided. The harness would read exit 1 as\n# \"hook errored\" and run the tool anyway, so a crash is converted into a block.\n# EXIT rather than ERR: ERR is unreliable across shells for set -u deaths, and\n# it fires on benign non-zero intermediates; the final status cannot lie.\nintutic_fail_closed() {\n _intutic_exit_rc=$?\n # The trap must not itself die on an unset variable or a failed command \u2014\n # that would replace the exit status it exists to correct.\n set +eu\n trap - EXIT\n if [ \"$_intutic_exit_rc\" = \"0\" ] || [ \"$_intutic_exit_rc\" = \"2\" ]; then\n exit \"$_intutic_exit_rc\"\n fi\n echo \"[Intutic Governance] BLOCKED: gate crashed (exit ${_intutic_exit_rc}) \u2014 failing closed rather than allowing an unevaluated call.\" >&2\n if command -v log_event >/dev/null 2>&1; then\n log_event \"tool_blocked\" \"${TOOL:-unknown}\" \"gate crashed (exit ${_intutic_exit_rc}) \u2014 failing closed\" || true\n fi\n exit 2\n}\ntrap intutic_fail_closed EXIT\n";
245
254
  export interface ShellGateOptions {
246
255
  /** Harness id, as it appears in audit lines. */
247
256
  harness: string;
@@ -1 +1 @@
1
- {"version":3,"file":"gateBody.d.ts","sourceRoot":"","sources":["../../src/harness/gateBody.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,OAAO,EACL,4BAA4B,EAG5B,KAAK,YAAY,EAClB,MAAM,qBAAqB,CAAA;AAE5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgEG;AACH,eAAO,MAAM,YAAY,IAAI,CAAA;AAE7B;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc,EAAE,aAAa,CAAC,SAAS,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAK9E,CAAA;AAED,yEAAyE;AACzE,eAAO,MAAM,iBAAiB,kEAAmE,CAAA;AAEjG;iDACiD;AACjD,eAAO,MAAM,wBAAwB,0BAA0B,CAAA;AAC/D,eAAO,MAAM,mBAAmB,0CAAgD,CAAA;AAChF;+BAC+B;AAC/B,eAAO,MAAM,sBAAsB,IAAI,CAAA;AAkBvC;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,IAAI,CAAA;AAE1C;;;;;;;;;;;;;;GAcG;AACH;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,eAAe,GAAG,sBAAsB,GAAG,OAAO,CAAA;AAmCxF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,eAAO,MAAM,aAAa,sFAAuF,C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