@intutic/cli 2.2.0 → 2.3.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 (344) hide show
  1. package/README.md +8 -8
  2. package/dist/cli.d.ts +0 -1
  3. package/dist/cli.d.ts.map +1 -1
  4. package/dist/cli.js +481 -19
  5. package/dist/cli.js.map +1 -1
  6. package/dist/commands/apiCommand.d.ts +40 -0
  7. package/dist/commands/apiCommand.d.ts.map +1 -0
  8. package/dist/commands/apiCommand.js +88 -0
  9. package/dist/commands/apiCommand.js.map +1 -0
  10. package/dist/commands/budget.d.ts +4 -0
  11. package/dist/commands/budget.d.ts.map +1 -1
  12. package/dist/commands/budget.js +8 -0
  13. package/dist/commands/budget.js.map +1 -1
  14. package/dist/commands/compliance.d.ts +122 -0
  15. package/dist/commands/compliance.d.ts.map +1 -0
  16. package/dist/commands/compliance.js +278 -0
  17. package/dist/commands/compliance.js.map +1 -0
  18. package/dist/commands/connect.d.ts +26 -1
  19. package/dist/commands/connect.d.ts.map +1 -1
  20. package/dist/commands/connect.js +109 -51
  21. package/dist/commands/connect.js.map +1 -1
  22. package/dist/commands/credentials.d.ts +1 -1
  23. package/dist/commands/credentials.js +1 -1
  24. package/dist/commands/decision.d.ts +4 -4
  25. package/dist/commands/decision.js +4 -4
  26. package/dist/commands/disconnect.d.ts +4 -0
  27. package/dist/commands/disconnect.d.ts.map +1 -1
  28. package/dist/commands/disconnect.js +17 -3
  29. package/dist/commands/disconnect.js.map +1 -1
  30. package/dist/commands/doctor.d.ts +0 -1
  31. package/dist/commands/doctor.d.ts.map +1 -1
  32. package/dist/commands/doctor.js +0 -1
  33. package/dist/commands/doctor.js.map +1 -1
  34. package/dist/commands/enforce.d.ts +1 -1
  35. package/dist/commands/enforce.js +1 -1
  36. package/dist/commands/enterprise.d.ts +3 -2
  37. package/dist/commands/enterprise.d.ts.map +1 -1
  38. package/dist/commands/enterprise.js +11 -3
  39. package/dist/commands/enterprise.js.map +1 -1
  40. package/dist/commands/env.js +1 -1
  41. package/dist/commands/exec.d.ts +2 -3
  42. package/dist/commands/exec.d.ts.map +1 -1
  43. package/dist/commands/exec.js +4 -5
  44. package/dist/commands/exec.js.map +1 -1
  45. package/dist/commands/gateLiveness.d.ts +15 -0
  46. package/dist/commands/gateLiveness.d.ts.map +1 -0
  47. package/dist/commands/gateLiveness.js +34 -0
  48. package/dist/commands/gateLiveness.js.map +1 -0
  49. package/dist/commands/gateway.d.ts +14 -4
  50. package/dist/commands/gateway.d.ts.map +1 -1
  51. package/dist/commands/gateway.js +34 -4
  52. package/dist/commands/gateway.js.map +1 -1
  53. package/dist/commands/github.d.ts +20 -0
  54. package/dist/commands/github.d.ts.map +1 -0
  55. package/dist/commands/github.js +41 -0
  56. package/dist/commands/github.js.map +1 -0
  57. package/dist/commands/guardrails.d.ts +28 -2
  58. package/dist/commands/guardrails.d.ts.map +1 -1
  59. package/dist/commands/guardrails.js +233 -24
  60. package/dist/commands/guardrails.js.map +1 -1
  61. package/dist/commands/init.d.ts +1 -2
  62. package/dist/commands/init.d.ts.map +1 -1
  63. package/dist/commands/init.js +1 -2
  64. package/dist/commands/init.js.map +1 -1
  65. package/dist/commands/install-daemon.d.ts +1 -1
  66. package/dist/commands/install-daemon.js +2 -2
  67. package/dist/commands/integrity.d.ts +10 -2
  68. package/dist/commands/integrity.d.ts.map +1 -1
  69. package/dist/commands/integrity.js +3 -3
  70. package/dist/commands/integrity.js.map +1 -1
  71. package/dist/commands/inventory.d.ts +60 -0
  72. package/dist/commands/inventory.d.ts.map +1 -0
  73. package/dist/commands/inventory.js +141 -0
  74. package/dist/commands/inventory.js.map +1 -0
  75. package/dist/commands/judge.d.ts +1 -1
  76. package/dist/commands/judge.js +2 -2
  77. package/dist/commands/judge.js.map +1 -1
  78. package/dist/commands/login.d.ts +0 -1
  79. package/dist/commands/login.d.ts.map +1 -1
  80. package/dist/commands/login.js +0 -1
  81. package/dist/commands/login.js.map +1 -1
  82. package/dist/commands/logout.d.ts +0 -1
  83. package/dist/commands/logout.d.ts.map +1 -1
  84. package/dist/commands/logout.js +0 -1
  85. package/dist/commands/logout.js.map +1 -1
  86. package/dist/commands/mcp.d.ts +31 -0
  87. package/dist/commands/mcp.d.ts.map +1 -0
  88. package/dist/commands/mcp.js +65 -0
  89. package/dist/commands/mcp.js.map +1 -0
  90. package/dist/commands/notifications.d.ts +54 -0
  91. package/dist/commands/notifications.d.ts.map +1 -0
  92. package/dist/commands/notifications.js +151 -0
  93. package/dist/commands/notifications.js.map +1 -0
  94. package/dist/commands/org.d.ts +3 -3
  95. package/dist/commands/org.js +3 -3
  96. package/dist/commands/policy.d.ts +6 -1
  97. package/dist/commands/policy.d.ts.map +1 -1
  98. package/dist/commands/policy.js +77 -37
  99. package/dist/commands/policy.js.map +1 -1
  100. package/dist/commands/rollback.d.ts.map +1 -1
  101. package/dist/commands/rollback.js +3 -1
  102. package/dist/commands/rollback.js.map +1 -1
  103. package/dist/commands/routing.d.ts +1 -1
  104. package/dist/commands/routing.js +1 -1
  105. package/dist/commands/rules.d.ts +74 -0
  106. package/dist/commands/rules.d.ts.map +1 -0
  107. package/dist/commands/rules.js +283 -0
  108. package/dist/commands/rules.js.map +1 -0
  109. package/dist/commands/settings.d.ts +43 -0
  110. package/dist/commands/settings.d.ts.map +1 -0
  111. package/dist/commands/settings.js +108 -0
  112. package/dist/commands/settings.js.map +1 -0
  113. package/dist/commands/setup.d.ts +1 -1
  114. package/dist/commands/setup.js +1 -1
  115. package/dist/commands/siem.d.ts +53 -0
  116. package/dist/commands/siem.d.ts.map +1 -0
  117. package/dist/commands/siem.js +132 -0
  118. package/dist/commands/siem.js.map +1 -0
  119. package/dist/commands/skill.d.ts +5 -5
  120. package/dist/commands/skill.js +7 -7
  121. package/dist/commands/skill.js.map +1 -1
  122. package/dist/commands/status.d.ts +0 -1
  123. package/dist/commands/status.d.ts.map +1 -1
  124. package/dist/commands/status.js +2 -3
  125. package/dist/commands/status.js.map +1 -1
  126. package/dist/commands/syncContext.d.ts +0 -1
  127. package/dist/commands/syncContext.d.ts.map +1 -1
  128. package/dist/commands/syncContext.js +0 -1
  129. package/dist/commands/syncContext.js.map +1 -1
  130. package/dist/commands/team.d.ts +2 -2
  131. package/dist/commands/team.js +2 -2
  132. package/dist/commands/traces.d.ts +0 -3
  133. package/dist/commands/traces.d.ts.map +1 -1
  134. package/dist/commands/traces.js +0 -3
  135. package/dist/commands/traces.js.map +1 -1
  136. package/dist/commands/usage.d.ts +41 -0
  137. package/dist/commands/usage.d.ts.map +1 -0
  138. package/dist/commands/usage.js +129 -0
  139. package/dist/commands/usage.js.map +1 -0
  140. package/dist/commands/whoami.d.ts +0 -1
  141. package/dist/commands/whoami.d.ts.map +1 -1
  142. package/dist/commands/whoami.js +0 -1
  143. package/dist/commands/whoami.js.map +1 -1
  144. package/dist/config/keychain.d.ts +0 -1
  145. package/dist/config/keychain.d.ts.map +1 -1
  146. package/dist/config/keychain.js +0 -1
  147. package/dist/config/keychain.js.map +1 -1
  148. package/dist/config/paths.d.ts +0 -1
  149. package/dist/config/paths.d.ts.map +1 -1
  150. package/dist/config/paths.js +0 -1
  151. package/dist/config/paths.js.map +1 -1
  152. package/dist/config/store.d.ts +0 -1
  153. package/dist/config/store.d.ts.map +1 -1
  154. package/dist/config/store.js +0 -1
  155. package/dist/config/store.js.map +1 -1
  156. package/dist/harness/ag2.d.ts +1 -1
  157. package/dist/harness/ag2.js +1 -1
  158. package/dist/harness/agentFramework.d.ts +1 -1
  159. package/dist/harness/agentFramework.js +1 -1
  160. package/dist/harness/agenticOrchestrator.d.ts +1 -1
  161. package/dist/harness/agenticOrchestrator.js +2 -2
  162. package/dist/harness/agenticOrchestrator.js.map +1 -1
  163. package/dist/harness/agentsMd.d.ts +24 -0
  164. package/dist/harness/agentsMd.d.ts.map +1 -0
  165. package/dist/harness/agentsMd.js +28 -0
  166. package/dist/harness/agentsMd.js.map +1 -0
  167. package/dist/harness/aider.d.ts +3 -1
  168. package/dist/harness/aider.d.ts.map +1 -1
  169. package/dist/harness/aider.js +9 -7
  170. package/dist/harness/aider.js.map +1 -1
  171. package/dist/harness/antigravity.d.ts +23 -5
  172. package/dist/harness/antigravity.d.ts.map +1 -1
  173. package/dist/harness/antigravity.js +45 -55
  174. package/dist/harness/antigravity.js.map +1 -1
  175. package/dist/harness/autogen.d.ts +1 -1
  176. package/dist/harness/autogen.js +2 -2
  177. package/dist/harness/autogen.js.map +1 -1
  178. package/dist/harness/claudeCode.d.ts +22 -1
  179. package/dist/harness/claudeCode.d.ts.map +1 -1
  180. package/dist/harness/claudeCode.js +47 -3
  181. package/dist/harness/claudeCode.js.map +1 -1
  182. package/dist/harness/cline.d.ts.map +1 -1
  183. package/dist/harness/cline.js +14 -23
  184. package/dist/harness/cline.js.map +1 -1
  185. package/dist/harness/codex.d.ts +6 -1
  186. package/dist/harness/codex.d.ts.map +1 -1
  187. package/dist/harness/codex.js +23 -21
  188. package/dist/harness/codex.js.map +1 -1
  189. package/dist/harness/continue.d.ts +10 -4
  190. package/dist/harness/continue.d.ts.map +1 -1
  191. package/dist/harness/continue.js +22 -22
  192. package/dist/harness/continue.js.map +1 -1
  193. package/dist/harness/cursor.d.ts +5 -2
  194. package/dist/harness/cursor.d.ts.map +1 -1
  195. package/dist/harness/cursor.js +19 -23
  196. package/dist/harness/cursor.js.map +1 -1
  197. package/dist/harness/detector.d.ts +0 -1
  198. package/dist/harness/detector.d.ts.map +1 -1
  199. package/dist/harness/detector.js +0 -1
  200. package/dist/harness/detector.js.map +1 -1
  201. package/dist/harness/dsh.d.ts +5 -3
  202. package/dist/harness/dsh.d.ts.map +1 -1
  203. package/dist/harness/dsh.js +17 -29
  204. package/dist/harness/dsh.js.map +1 -1
  205. package/dist/harness/eve.d.ts +3 -4
  206. package/dist/harness/eve.d.ts.map +1 -1
  207. package/dist/harness/eve.js +3 -4
  208. package/dist/harness/eve.js.map +1 -1
  209. package/dist/harness/githubCopilot.d.ts +4 -1
  210. package/dist/harness/githubCopilot.d.ts.map +1 -1
  211. package/dist/harness/githubCopilot.js +12 -20
  212. package/dist/harness/githubCopilot.js.map +1 -1
  213. package/dist/harness/goose.d.ts +7 -3
  214. package/dist/harness/goose.d.ts.map +1 -1
  215. package/dist/harness/goose.js +18 -21
  216. package/dist/harness/goose.js.map +1 -1
  217. package/dist/harness/grok.d.ts +2 -2
  218. package/dist/harness/grok.d.ts.map +1 -1
  219. package/dist/harness/grok.js +13 -24
  220. package/dist/harness/grok.js.map +1 -1
  221. package/dist/harness/hermes.d.ts +6 -0
  222. package/dist/harness/hermes.d.ts.map +1 -1
  223. package/dist/harness/hermes.js +17 -16
  224. package/dist/harness/hermes.js.map +1 -1
  225. package/dist/harness/muse.d.ts +3 -7
  226. package/dist/harness/muse.d.ts.map +1 -1
  227. package/dist/harness/muse.js +15 -35
  228. package/dist/harness/muse.js.map +1 -1
  229. package/dist/harness/n8n.d.ts +13 -14
  230. package/dist/harness/n8n.d.ts.map +1 -1
  231. package/dist/harness/n8n.js +21 -181
  232. package/dist/harness/n8n.js.map +1 -1
  233. package/dist/harness/openWebUI.d.ts.map +1 -1
  234. package/dist/harness/openWebUI.js +5 -4
  235. package/dist/harness/openWebUI.js.map +1 -1
  236. package/dist/harness/openaiAgents.d.ts +1 -1
  237. package/dist/harness/openaiAgents.js +2 -2
  238. package/dist/harness/openaiAgents.js.map +1 -1
  239. package/dist/harness/openclaw.d.ts +8 -0
  240. package/dist/harness/openclaw.d.ts.map +1 -1
  241. package/dist/harness/openclaw.js +27 -12
  242. package/dist/harness/openclaw.js.map +1 -1
  243. package/dist/harness/opencode.d.ts +4 -5
  244. package/dist/harness/opencode.d.ts.map +1 -1
  245. package/dist/harness/opencode.js +15 -30
  246. package/dist/harness/opencode.js.map +1 -1
  247. package/dist/harness/openhands.d.ts +9 -3
  248. package/dist/harness/openhands.d.ts.map +1 -1
  249. package/dist/harness/openhands.js +30 -24
  250. package/dist/harness/openhands.js.map +1 -1
  251. package/dist/harness/pi.d.ts +7 -2
  252. package/dist/harness/pi.d.ts.map +1 -1
  253. package/dist/harness/pi.js +19 -18
  254. package/dist/harness/pi.js.map +1 -1
  255. package/dist/harness/rooCode.d.ts +12 -5
  256. package/dist/harness/rooCode.d.ts.map +1 -1
  257. package/dist/harness/rooCode.js +23 -39
  258. package/dist/harness/rooCode.js.map +1 -1
  259. package/dist/harness/rulesFiles.d.ts +53 -0
  260. package/dist/harness/rulesFiles.d.ts.map +1 -0
  261. package/dist/harness/rulesFiles.js +106 -0
  262. package/dist/harness/rulesFiles.js.map +1 -0
  263. package/dist/harness/smolagents.d.ts +2 -2
  264. package/dist/harness/smolagents.js +3 -3
  265. package/dist/harness/smolagents.js.map +1 -1
  266. package/dist/harness/types.d.ts +20 -6
  267. package/dist/harness/types.d.ts.map +1 -1
  268. package/dist/harness/types.js +1 -95
  269. package/dist/harness/types.js.map +1 -1
  270. package/dist/harness/windsurf.d.ts +6 -1
  271. package/dist/harness/windsurf.d.ts.map +1 -1
  272. package/dist/harness/windsurf.js +21 -24
  273. package/dist/harness/windsurf.js.map +1 -1
  274. package/dist/harness/xirp.d.ts +1 -2
  275. package/dist/harness/xirp.d.ts.map +1 -1
  276. package/dist/harness/xirp.js +2 -3
  277. package/dist/harness/xirp.js.map +1 -1
  278. package/dist/lib/api.d.ts +27 -1
  279. package/dist/lib/api.d.ts.map +1 -1
  280. package/dist/lib/api.js +55 -18
  281. package/dist/lib/api.js.map +1 -1
  282. package/dist/lib/ciscoScanner.d.ts +1 -1
  283. package/dist/lib/ciscoScanner.js +1 -1
  284. package/dist/lib/decisionsLogRefresh.d.ts.map +1 -1
  285. package/dist/lib/decisionsLogRefresh.js +6 -7
  286. package/dist/lib/decisionsLogRefresh.js.map +1 -1
  287. package/dist/lib/deviceReport.d.ts +15 -0
  288. package/dist/lib/deviceReport.d.ts.map +1 -1
  289. package/dist/lib/deviceReport.js +30 -0
  290. package/dist/lib/deviceReport.js.map +1 -1
  291. package/dist/lib/gitHooks.d.ts +0 -1
  292. package/dist/lib/gitHooks.d.ts.map +1 -1
  293. package/dist/lib/gitHooks.js +8 -9
  294. package/dist/lib/gitHooks.js.map +1 -1
  295. package/dist/lib/gracefulShutdown.d.ts +1 -1
  296. package/dist/lib/gracefulShutdown.js +1 -1
  297. package/dist/lib/hash.d.ts +0 -1
  298. package/dist/lib/hash.d.ts.map +1 -1
  299. package/dist/lib/hash.js +0 -1
  300. package/dist/lib/hash.js.map +1 -1
  301. package/dist/lib/inventory.d.ts +47 -0
  302. package/dist/lib/inventory.d.ts.map +1 -0
  303. package/dist/lib/inventory.js +106 -0
  304. package/dist/lib/inventory.js.map +1 -0
  305. package/dist/lib/logger.d.ts +0 -1
  306. package/dist/lib/logger.d.ts.map +1 -1
  307. package/dist/lib/logger.js +0 -1
  308. package/dist/lib/logger.js.map +1 -1
  309. package/dist/lib/mdmManifest.d.ts +30 -2
  310. package/dist/lib/mdmManifest.d.ts.map +1 -1
  311. package/dist/lib/mdmManifest.js +50 -2
  312. package/dist/lib/mdmManifest.js.map +1 -1
  313. package/dist/lib/onboarding.d.ts +0 -1
  314. package/dist/lib/onboarding.d.ts.map +1 -1
  315. package/dist/lib/onboarding.js +1 -2
  316. package/dist/lib/onboarding.js.map +1 -1
  317. package/dist/lib/policySnapshot.d.ts +3 -2
  318. package/dist/lib/policySnapshot.d.ts.map +1 -1
  319. package/dist/lib/policySnapshot.js +6 -3
  320. package/dist/lib/policySnapshot.js.map +1 -1
  321. package/dist/lib/process.d.ts +5 -1
  322. package/dist/lib/process.d.ts.map +1 -1
  323. package/dist/lib/process.js +13 -4
  324. package/dist/lib/process.js.map +1 -1
  325. package/dist/lib/providerProbe.d.ts +2 -2
  326. package/dist/lib/providerProbe.js +2 -2
  327. package/dist/lib/sandbox/firecracker.d.ts +3 -3
  328. package/dist/lib/sandbox/firecracker.js +3 -3
  329. package/dist/lib/sandbox/index.d.ts +2 -2
  330. package/dist/lib/sandbox/index.js +2 -2
  331. package/dist/lib/sandbox/oci.d.ts +1 -1
  332. package/dist/lib/sandbox/oci.js +1 -1
  333. package/dist/lib/sandbox/types.d.ts +1 -1
  334. package/dist/lib/sandbox/types.js +1 -1
  335. package/dist/lib/sopFrontMatter.d.ts +1 -1
  336. package/dist/lib/sopFrontMatter.js +1 -1
  337. package/package.json +6 -5
  338. package/resources/sandbox/Dockerfile +1 -1
  339. package/resources/sandbox/entrypoint.sh +4 -4
  340. package/resources/sandbox/firecracker-launch.sh +1 -1
  341. package/dist/harness/base.d.ts +0 -24
  342. package/dist/harness/base.d.ts.map +0 -1
  343. package/dist/harness/base.js +0 -74
  344. package/dist/harness/base.js.map +0 -1
@@ -1,7 +1,12 @@
1
1
  /**
2
2
  * codex.ts — Codex adapter.
3
3
  *
4
- * Writes three things:
4
+ * Writes four things:
5
+ * - the rule sets, as the marked section of the workspace's `AGENTS.md`,
6
+ * which Codex reads before any work, merged from `~/.codex` and every
7
+ * directory from the project root down to where it runs
8
+ * (https://developers.openai.com/codex/guides/agents-md), through the
9
+ * shared writer (agentsMd.ts);
5
10
  * - `.env.intutic` in the workspace, with the proxy base URLs for shells and
6
11
  * scripts that source it;
7
12
  * - `openai_base_url` in Codex's user config (`$CODEX_HOME/config.toml`,
@@ -17,11 +22,11 @@
17
22
  import { join } from 'node:path';
18
23
  import { homedir } from 'node:os';
19
24
  import { HarnessType, anthropicBaseUrl, openaiBaseUrl, proxyHost } from '@intutic/shared-types';
20
- import { hashFile } from '../lib/hash.js';
21
25
  import { loadCredentials } from '../config/store.js';
22
26
  import { newIso } from '@intutic/id';
23
27
  import { writeCodexHooks, mergeCodexConfig, writeOwnedFile } from '@intutic/sync-daemon';
24
- const CONFIG_FILE = '.env.intutic';
28
+ import { AGENTS_MD, agentsMdHash, writeAgentsMd } from './agentsMd.js';
29
+ const ENV_FILE = '.env.intutic';
25
30
  /** Codex's user config directory, resolved at call time so CODEX_HOME and
26
31
  * HOME changes (and tests that move them) are honoured. */
27
32
  function codexHome() {
@@ -29,7 +34,7 @@ function codexHome() {
29
34
  }
30
35
  export const codexAdapter = {
31
36
  type: HarnessType.CODEX,
32
- configFileName: CONFIG_FILE,
37
+ configFileName: AGENTS_MD,
33
38
  async detect(_workspaceRoot) {
34
39
  if (process.env.CODEX_HOME)
35
40
  return true;
@@ -47,9 +52,18 @@ export const codexAdapter = {
47
52
  catch { /* ignore */ }
48
53
  return false;
49
54
  },
55
+ async installGate(workspaceRoot, proxyUrl) {
56
+ // Codex user config — persists proxy routing across sessions without env
57
+ // sourcing. Merged; a config.toml that does not parse is left alone.
58
+ await mergeCodexConfig(join(codexHome(), 'config.toml'), openaiBaseUrl(proxyUrl));
59
+ // The PreToolUse gate. The routing above governs LLM egress only; the
60
+ // gate is what refuses tool calls.
61
+ const creds = await loadCredentials();
62
+ await writeCodexHooks(workspaceRoot, proxyUrl, creds?.workspaceId || 'local');
63
+ },
64
+ /** The `AGENTS.md` section, and the workspace `.env.intutic`. */
50
65
  async writeConfig(workspaceRoot, sops, proxyUrl) {
51
- // 1. Workspace .env.intutic
52
- const filePath = join(workspaceRoot, CONFIG_FILE);
66
+ const filePath = join(workspaceRoot, ENV_FILE);
53
67
  const envContent = [
54
68
  '# Intutic Governance Rules (auto-generated)',
55
69
  '# DO NOT EDIT — managed by intutic sync daemon',
@@ -63,22 +77,10 @@ export const codexAdapter = {
63
77
  '',
64
78
  ].join('\n');
65
79
  await writeOwnedFile(filePath, workspaceRoot, envContent);
66
- // 2. Codex user config — persists proxy routing across sessions without
67
- // env sourcing. Merged; a config.toml that does not parse is left alone.
68
- await mergeCodexConfig(join(codexHome(), 'config.toml'), openaiBaseUrl(proxyUrl));
69
- // 3. The PreToolUse gate. The routing above governs LLM egress only; the
70
- // gate is what refuses tool calls.
71
- const creds = await loadCredentials();
72
- await writeCodexHooks(workspaceRoot, proxyUrl, creds?.workspaceId || 'local');
73
- return filePath;
80
+ return (await writeAgentsMd(workspaceRoot, sops, proxyUrl)) ?? filePath;
74
81
  },
75
- async readCurrentHash(workspaceRoot) {
76
- try {
77
- return await hashFile(join(workspaceRoot, CONFIG_FILE));
78
- }
79
- catch {
80
- return null;
81
- }
82
+ readCurrentHash(workspaceRoot) {
83
+ return agentsMdHash(workspaceRoot);
82
84
  },
83
85
  };
84
86
  //# sourceMappingURL=codex.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"codex.js","sourceRoot":"","sources":["../../src/harness/codex.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACjC,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAG/F,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAExF,MAAM,WAAW,GAAG,cAAc,CAAA;AAElC;4DAC4D;AAC5D,SAAS,SAAS;IAChB,OAAO,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,OAAO,EAAE,EAAE,QAAQ,CAAC,CAAA;AAC5D,CAAC;AAED,MAAM,CAAC,MAAM,YAAY,GAAoB;IAC3C,IAAI,EAAE,WAAW,CAAC,KAAK;IACvB,cAAc,EAAE,WAAW;IAE3B,KAAK,CAAC,MAAM,CAAC,cAAsB;QACjC,IAAI,OAAO,CAAC,GAAG,CAAC,UAAU;YAAE,OAAO,IAAI,CAAA;QACvC,MAAM,QAAQ,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,C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;YAC1B,yCAAyC;YACzC,EAAE;YACF,8BAA8B,gBAAgB,CAAC,QAAQ,CAAC,GAAG;YAC3D,2BAA2B,aAAa,CAAC,QAAQ,CAAC,GAAG;YACrD,6BAA6B,SAAS,CAAC,QAAQ,CAAC,GAAG;YACnD,4BAA4B,IAAI,CAAC,MAAM,EAAE;YACzC,EAAE;SACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAEZ,MAAM,cAAc,CAAC,QAAQ,EAAE,aAAa,EAAE,UAAU,CAAC,CAAA;QACzD,OAAO,CAAC,MAAM,aAAa,CAAC,aAAa,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC,IAAI,QAAQ,CAAA;IACzE,CAAC;IAED,eAAe,CAAC,aAAqB;QACnC,OAAO,YAAY,CAAC,aAAa,CAAC,CAAA;IACpC,CAAC;CACF,CAAA"}
@@ -4,10 +4,16 @@
4
4
  * Detects the Continue AI coding assistant and:
5
5
  * - sets `apiBase` on each OpenAI/Anthropic model in `~/.continue/config.yaml`
6
6
  * so its LLM calls reach the proxy (merged; see continueConfigMerger.ts);
7
- * - installs the Continue CLI (`cn`) PreToolUse gate in
8
- * `~/.continue/settings.json` and `<repo>/.continue/settings.json` (see
9
- * continueHooks.ts). The IDE extension has no hook system, so for it proxy
10
- * routing is the only mechanism.
7
+ * - installs no tool-call gate: the CLI (`cn`) loads PreToolUse hooks from
8
+ * its settings but never fires them (`firePreToolUse` has no caller at
9
+ * continuedev/continue main 5522c6f), and the IDE extension has no hook
10
+ * system. The proxy and the rules below are what govern it;
11
+ * - writes the rule sets to `.continue/rules/intutic-governance.md` with
12
+ * `alwaysApply: true`. The IDE extension reads the workspace root's
13
+ * `.continue/rules/`, and the CLI the one in the directory it runs in,
14
+ * which keeps only always-apply rules
15
+ * (https://github.com/continuedev/continue/blob/5522c6f44ca0ac3528b37244818fbfa39b5af470/core/config/markdown/loadMarkdownRules.ts,
16
+ * https://github.com/continuedev/continue/blob/5522c6f44ca0ac3528b37244818fbfa39b5af470/extensions/cli/src/systemMessage.ts).
11
17
  *
12
18
  * HLD §3.14 — Harness Onboarding Matrix
13
19
  * @module
@@ -1 +1 @@
1
- {"version":3,"file":"continue.d.ts","sourceRoot":"","sources":["../../src/harness/continue.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAOH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAWjD,eAAO,MAAM,eAAe,EAAE,eA6B7B,CAAA"}
1
+ {"version":3,"file":"continue.d.ts","sourceRoot":"","sources":["../../src/harness/continue.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAOH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAYjD,eAAO,MAAM,eAAe,EAAE,eA2B7B,CAAA"}
@@ -4,10 +4,16 @@
4
4
  * Detects the Continue AI coding assistant and:
5
5
  * - sets `apiBase` on each OpenAI/Anthropic model in `~/.continue/config.yaml`
6
6
  * so its LLM calls reach the proxy (merged; see continueConfigMerger.ts);
7
- * - installs the Continue CLI (`cn`) PreToolUse gate in
8
- * `~/.continue/settings.json` and `<repo>/.continue/settings.json` (see
9
- * continueHooks.ts). The IDE extension has no hook system, so for it proxy
10
- * routing is the only mechanism.
7
+ * - installs no tool-call gate: the CLI (`cn`) loads PreToolUse hooks from
8
+ * its settings but never fires them (`firePreToolUse` has no caller at
9
+ * continuedev/continue main 5522c6f), and the IDE extension has no hook
10
+ * system. The proxy and the rules below are what govern it;
11
+ * - writes the rule sets to `.continue/rules/intutic-governance.md` with
12
+ * `alwaysApply: true`. The IDE extension reads the workspace root's
13
+ * `.continue/rules/`, and the CLI the one in the directory it runs in,
14
+ * which keeps only always-apply rules
15
+ * (https://github.com/continuedev/continue/blob/5522c6f44ca0ac3528b37244818fbfa39b5af470/core/config/markdown/loadMarkdownRules.ts,
16
+ * https://github.com/continuedev/continue/blob/5522c6f44ca0ac3528b37244818fbfa39b5af470/extensions/cli/src/systemMessage.ts).
11
17
  *
12
18
  * HLD §3.14 — Harness Onboarding Matrix
13
19
  * @module
@@ -15,10 +21,10 @@
15
21
  import { access, readdir } from 'node:fs/promises';
16
22
  import { join } from 'node:path';
17
23
  import { homedir } from 'node:os';
18
- import { HarnessType, openaiBaseUrl } from '@intutic/shared-types';
19
- import { hashFile } from '../lib/hash.js';
20
- import { loadCredentials } from '../config/store.js';
21
- import { mergeContinueConfig, writeContinueHooks } from '@intutic/sync-daemon';
24
+ import { HarnessType, rulesFrontMatterOf, openaiBaseUrl } from '@intutic/shared-types';
25
+ import { mergeContinueConfig } from '@intutic/sync-daemon';
26
+ import { ownRulesFileHash, writeOwnRulesFile } from './rulesFiles.js';
27
+ const RULES_FILE = '.continue/rules/intutic-governance.md';
22
28
  /** `~/.continue/<name>`, resolved at call time so HOME changes (and tests
23
29
  * that move HOME) are honoured. */
24
30
  function continuePath(name) {
@@ -26,7 +32,7 @@ function continuePath(name) {
26
32
  }
27
33
  export const continueAdapter = {
28
34
  type: HarnessType.CONTINUE,
29
- configFileName: continuePath('config.yaml'),
35
+ configFileName: RULES_FILE,
30
36
  async detect(_workspaceRoot) {
31
37
  for (const p of [continuePath('config.yaml'), continuePath('config.json')]) {
32
38
  try {
@@ -43,20 +49,14 @@ export const continueAdapter = {
43
49
  return false;
44
50
  }
45
51
  },
46
- async writeConfig(workspaceRoot, _sops, proxyUrl) {
47
- const configYaml = continuePath('config.yaml');
48
- const routed = await mergeContinueConfig(configYaml, openaiBaseUrl(proxyUrl));
49
- const creds = await loadCredentials();
50
- await writeContinueHooks(workspaceRoot, proxyUrl, creds?.workspaceId || 'local');
51
- return routed > 0 ? configYaml : null;
52
+ async installGate(workspaceRoot, proxyUrl) {
53
+ await mergeContinueConfig(continuePath('config.yaml'), openaiBaseUrl(proxyUrl));
52
54
  },
53
- async readCurrentHash(_workspaceRoot) {
54
- try {
55
- return await hashFile(continuePath('config.yaml'));
56
- }
57
- catch {
58
- return null;
59
- }
55
+ writeConfig(workspaceRoot, sops, proxyUrl) {
56
+ return writeOwnRulesFile(workspaceRoot, RULES_FILE, sops, proxyUrl, rulesFrontMatterOf(HarnessType.CONTINUE, 'Intutic governance rules'));
57
+ },
58
+ readCurrentHash(workspaceRoot) {
59
+ return ownRulesFileHash(workspaceRoot, RULES_FILE);
60
60
  },
61
61
  };
62
62
  //# sourceMappingURL=continue.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"continue.js","sourceRoot":"","sources":["../../src/harness/continue.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACjC,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAGlE,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAE9E;oCACoC;AACpC,SAAS,YAAY,CAAC,IAAY;IAChC,OAAO,IAAI,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,IAAI,CAAC,CAAA;AAC3C,CAAC;AAED,MAAM,CAAC,MAAM,eAAe,GAAoB;IAC9C,IAAI,EAAE,WAAW,CAAC,QAAQ;IAC1B,cAAc,EAAE,YAAY,CAAC,aAAa,CAAC;IAE3C,KAAK,CAAC,MAAM,CAAC,cAAsB;QACjC,KAAK,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC,EAAE,YAAY,CAAC,aAAa,CAAC,CAAC,EAAE,CAAC;YAC3E,IAAI,CAAC;gBAAC,MAAM,MAAM,CAAC,CAAC,CAAC,CAAC;gBAAC,OAAO,IAAI,CAAA;YAAC,CAAC;YAAC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,CAAC,aAAa,CAAC,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAA;IACjF,CAAC;IAED,WAAW,CAAC,aAAqB,EAAE,IAAoB,EAAE,QAAgB;QACvE,OAAO,iBAAiB,CAAC,aAAa,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,kBAAkB,CAAC,WAAW,CAAC,QAAQ,EAAE,0BAA0B,CAAC,CAAC,CAAA;IAC3I,CAAC;IAED,eAAe,CAAC,aAAqB;QACnC,OAAO,gBAAgB,CAAC,aAAa,EAAE,UAAU,CAAC,CAAA;IACpD,CAAC;CACF,CAAA"}
@@ -1,8 +1,11 @@
1
1
  /**
2
2
  * cursor.ts — Cursor adapter (full implementation with 3-level hooks).
3
3
  *
4
- * Replaces the minimal createMarkdownAdapter stub with a full adapter that:
5
- * - Writes .cursorrules governance text (existing behaviour, kept)
4
+ * - Writes the rule sets to `.cursor/rules/intutic-governance.mdc`, a project
5
+ * rule with `alwaysApply: true`, which Cursor adds to every request
6
+ * (https://cursor.com/docs/context/rules; a plain `.md` there is ignored).
7
+ * Earlier versions overwrote `.cursorrules`, a single file the current docs
8
+ * no longer describe; the user's own copy of it comes back.
6
9
  * - Injects hooks.json at project-level AND user-level
7
10
  * - Enterprise system-level (/etc/cursor) is handled by the system administrator
8
11
  *
@@ -1 +1 @@
1
- {"version":3,"file":"cursor.d.ts","sourceRoot":"","sources":["../../src/harness/cursor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAOH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAQjD,eAAO,MAAM,aAAa,EAAE,eA6B3B,CAAA"}
1
+ {"version":3,"file":"cursor.d.ts","sourceRoot":"","sources":["../../src/harness/cursor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAOH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAOjD,eAAO,MAAM,aAAa,EAAE,eA2B3B,CAAA"}
@@ -1,8 +1,11 @@
1
1
  /**
2
2
  * cursor.ts — Cursor adapter (full implementation with 3-level hooks).
3
3
  *
4
- * Replaces the minimal createMarkdownAdapter stub with a full adapter that:
5
- * - Writes .cursorrules governance text (existing behaviour, kept)
4
+ * - Writes the rule sets to `.cursor/rules/intutic-governance.mdc`, a project
5
+ * rule with `alwaysApply: true`, which Cursor adds to every request
6
+ * (https://cursor.com/docs/context/rules; a plain `.md` there is ignored).
7
+ * Earlier versions overwrote `.cursorrules`, a single file the current docs
8
+ * no longer describe; the user's own copy of it comes back.
6
9
  * - Injects hooks.json at project-level AND user-level
7
10
  * - Enterprise system-level (/etc/cursor) is handled by the system administrator
8
11
  *
@@ -12,18 +15,17 @@
12
15
  import { access } from 'node:fs/promises';
13
16
  import { join } from 'node:path';
14
17
  import { homedir } from 'node:os';
15
- import { HarnessType } from '@intutic/shared-types';
16
- import { hashFile } from '../lib/hash.js';
17
- import { buildMarkdownContent } from './base.js';
18
+ import { HarnessType, rulesFrontMatterOf } from '@intutic/shared-types';
18
19
  import { writeCursorHooks } from '@intutic/sync-daemon/harness/cursorHooks';
19
- import { writeOwnedFile } from '@intutic/sync-daemon';
20
- const CONFIG_FILE = '.cursorrules';
20
+ import { ownRulesFileHash, retireLegacyRulesFile, writeOwnRulesFile } from './rulesFiles.js';
21
+ const CONFIG_FILE = '.cursor/rules/intutic-governance.mdc';
22
+ const LEGACY_FILE = '.cursorrules';
21
23
  export const cursorAdapter = {
22
24
  type: HarnessType.CURSOR,
23
25
  configFileName: CONFIG_FILE,
24
26
  async detect(workspaceRoot) {
25
27
  // .cursorrules or .cursor/ directory
26
- for (const marker of [CONFIG_FILE, '.cursor']) {
28
+ for (const marker of [LEGACY_FILE, '.cursor']) {
27
29
  try {
28
30
  await access(join(workspaceRoot, marker));
29
31
  return true;
@@ -39,23 +41,17 @@ export const cursorAdapter = {
39
41
  return false;
40
42
  }
41
43
  },
42
- async writeConfig(workspaceRoot, sops, proxyUrl) {
43
- // 1. Write .cursorrules markdown governance text
44
- const filePath = join(workspaceRoot, CONFIG_FILE);
45
- const content = buildMarkdownContent(sops, proxyUrl);
46
- await writeOwnedFile(filePath, workspaceRoot, content);
47
- // 2. Inject hooks.json at project + user level (writeSystemLevel=false;
48
- // system level requires sudo execution)
44
+ /** hooks.json at project + user level; the system level needs
45
+ * administrator rights and is `intutic enterprise install`'s job. */
46
+ async installGate(workspaceRoot, proxyUrl) {
49
47
  await writeCursorHooks(workspaceRoot, proxyUrl, '', false);
50
- return filePath;
51
48
  },
52
- async readCurrentHash(workspaceRoot) {
53
- try {
54
- return await hashFile(join(workspaceRoot, CONFIG_FILE));
55
- }
56
- catch {
57
- return null;
58
- }
49
+ async writeConfig(workspaceRoot, sops, proxyUrl) {
50
+ await retireLegacyRulesFile(workspaceRoot, LEGACY_FILE);
51
+ return writeOwnRulesFile(workspaceRoot, CONFIG_FILE, sops, proxyUrl, rulesFrontMatterOf(HarnessType.CURSOR, 'Intutic governance rules'));
52
+ },
53
+ readCurrentHash(workspaceRoot) {
54
+ return ownRulesFileHash(workspaceRoot, CONFIG_FILE);
59
55
  },
60
56
  };
61
57
  //# sourceMappingURL=cursor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cursor.js","sourceRoot":"","sources":["../../src/harness/cursor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAGnD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAA;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAA;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,C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CAAC;IAED;0EACsE;IACtE,KAAK,CAAC,WAAW,CAAC,aAAqB,EAAE,QAAgB;QACvD,MAAM,gBAAgB,CAAC,aAAa,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,CAAC,CAAA;IAC5D,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,aAAqB,EAAE,IAAoB,EAAE,QAAgB;QAC7E,MAAM,qBAAqB,CAAC,aAAa,EAAE,WAAW,CAAC,CAAA;QACvD,OAAO,iBAAiB,CAAC,aAAa,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,EAAE,kBAAkB,CAAC,WAAW,CAAC,MAAM,EAAE,0BAA0B,CAAC,CAAC,CAAA;IAC1I,CAAC;IAED,eAAe,CAAC,aAAqB;QACnC,OAAO,gBAAgB,CAAC,aAAa,EAAE,WAAW,CAAC,CAAA;IACrD,CAAC;CACF,CAAA"}
@@ -5,7 +5,6 @@
5
5
  * the workspace. Returns a DetectedHarness array for reporting.
6
6
  *
7
7
  * HLD §3.14 — Harness Onboarding Matrix
8
- * LLD #8 — Sync Daemon / CLI
9
8
  * @module
10
9
  */
11
10
  import type { DetectedHarness } from '@intutic/shared-types';
@@ -1 +1 @@
1
- {"version":3,"file":"detector.d.ts","sourceRoot":"","sources":["../../src/harness/detector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AA6CjD,uCAAuC;AACvC,eAAO,MAAM,YAAY,EAAE,eAAe,EA2CzC,CAAA;AAED;;;;;GAKG;AACH,wBAAsB,eAAe,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,CAgBvF;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,CAEpE"}
1
+ {"version":3,"file":"detector.d.ts","sourceRoot":"","sources":["../../src/harness/detector.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AA6CjD,uCAAuC;AACvC,eAAO,MAAM,YAAY,EAAE,eAAe,EA2CzC,CAAA;AAED;;;;;GAKG;AACH,wBAAsB,eAAe,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,CAgBvF;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,CAEpE"}
@@ -5,7 +5,6 @@
5
5
  * the workspace. Returns a DetectedHarness array for reporting.
6
6
  *
7
7
  * HLD §3.14 — Harness Onboarding Matrix
8
- * LLD #8 — Sync Daemon / CLI
9
8
  * @module
10
9
  */
11
10
  import { cursorAdapter } from './cursor.js';
@@ -1 +1 @@
1
- {"version":3,"file":"detector.js","sourceRoot":"","sources":["../../src/harness/detector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAC7C,OAAO,EAAE,e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Aa,EAAE,OAAO,CAAC,cAAc,CAAC;gBAC7C,CAAC,CAAC,EAAE;YACN,QAAQ;YACR,WAAW,EAAE,IAAI;SAClB,CAAC,CAAA;IACJ,CAAC;IAED,OAAO,OAAO,CAAA;AAChB,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CAAC,IAAY;IACrC,OAAO,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,CAAA;AAClD,CAAC"}
@@ -2,9 +2,11 @@
2
2
  * dsh.ts — DeepSeek "dsh" adapter (binary `dsh`, `@deepseek-ai/dsh`,
3
3
  * developer preview since 2026-08-13).
4
4
  *
5
- * dsh is plugin-first (Cordis) and has no workspace-relative rules file this
6
- * adapter could write governance text into (see `types.ts`'s
7
- * `HARNESS_CONFIG_FILES.dsh`). The governance-critical half — the
5
+ * Rule sets go into the workspace's `AGENTS.md` through the shared writer
6
+ * (agentsMd.ts): dsh's default profile loads every `AGENTS.md` and
7
+ * `CLAUDE.md` from the git root down to where it runs
8
+ * (https://github.com/deepseek-ai/deepseek-harness/blob/5badb15009ae1756c3afe0ae0cef1faafc290ccc/packages/context/agent-instructions/README.md).
9
+ * The governance-critical half — the
8
10
  * `tools/pre-execute` Cordis plugin registration (`cordis.patch.yml` per
9
11
  * profile), the profile's `@intutic/gate` dependency, and the `llm-deepseek`
10
12
  * egress override in that same patch file — is delegated entirely to
@@ -1 +1 @@
1
- {"version":3,"file":"dsh.d.ts","sourceRoot":"","sources":["../../src/harness/dsh.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAMH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAGjD,eAAO,MAAM,UAAU,EAAE,eA2ExB,CAAA"}
1
+ {"version":3,"file":"dsh.d.ts","sourceRoot":"","sources":["../../src/harness/dsh.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAMH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAIjD,eAAO,MAAM,UAAU,EAAE,eA4DxB,CAAA"}
@@ -2,9 +2,11 @@
2
2
  * dsh.ts — DeepSeek "dsh" adapter (binary `dsh`, `@deepseek-ai/dsh`,
3
3
  * developer preview since 2026-08-13).
4
4
  *
5
- * dsh is plugin-first (Cordis) and has no workspace-relative rules file this
6
- * adapter could write governance text into (see `types.ts`'s
7
- * `HARNESS_CONFIG_FILES.dsh`). The governance-critical half — the
5
+ * Rule sets go into the workspace's `AGENTS.md` through the shared writer
6
+ * (agentsMd.ts): dsh's default profile loads every `AGENTS.md` and
7
+ * `CLAUDE.md` from the git root down to where it runs
8
+ * (https://github.com/deepseek-ai/deepseek-harness/blob/5badb15009ae1756c3afe0ae0cef1faafc290ccc/packages/context/agent-instructions/README.md).
9
+ * The governance-critical half — the
8
10
  * `tools/pre-execute` Cordis plugin registration (`cordis.patch.yml` per
9
11
  * profile), the profile's `@intutic/gate` dependency, and the `llm-deepseek`
10
12
  * egress override in that same patch file — is delegated entirely to
@@ -17,15 +19,11 @@
17
19
  import { access } from 'node:fs/promises';
18
20
  import { join } from 'node:path';
19
21
  import { HarnessType } from '@intutic/shared-types';
20
- import { writeDshHooks, resolveDshHome, listDshProfileDirs } from '@intutic/sync-daemon/harness/dshHooks';
22
+ import { writeDshHooks, resolveDshHome } from '@intutic/sync-daemon/harness/dshHooks';
23
+ import { AGENTS_MD, agentsMdHash, writeAgentsMd } from './agentsMd.js';
21
24
  export const dshAdapter = {
22
25
  type: HarnessType.DEEPSEEK_HARNESS,
23
- // No canonical workspace-relative config file — see types.ts's comment on
24
- // this harness's HARNESS_CONFIG_FILES entry. detect/writeConfig/
25
- // readCurrentHash below resolve dsh's real, $DSH_HOME-anchored paths
26
- // directly, the same way goose.ts bypasses configFileName's
27
- // workspaceRoot-join for its own home-anchored config.
28
- configFileName: '',
26
+ configFileName: AGENTS_MD,
29
27
  async detect(_workspaceRoot) {
30
28
  const dshHome = resolveDshHome();
31
29
  // 1. `$DSH_HOME`/`~/.dsh` exists at all (settings.yaml, .credentials.yaml,
@@ -67,27 +65,17 @@ export const dshAdapter = {
67
65
  // the CLI adapters this mirrors, not as an independent signal.
68
66
  return false;
69
67
  },
70
- async writeConfig(workspaceRoot, _sops, proxyUrl) {
71
- // No rules/markdown file for dsh — `sops` are not consulted here (same
72
- // "no text-rules file" posture as goose.ts's own adapter). The plugin
73
- // registration + egress row in each profile patch is the entirety of what this
74
- // harness gets, and it happens for every existing profile, not one file.
68
+ // The plugin registration + egress row in each profile patch is the
69
+ // entirety of what this harness gets, and it happens for every existing
70
+ // profile, not one file.
71
+ async installGate(workspaceRoot, proxyUrl) {
75
72
  await writeDshHooks(workspaceRoot, proxyUrl, '');
76
- const dshHome = resolveDshHome();
77
- const profiles = await listDshProfileDirs(dshHome);
78
- // Representative path for the connect-summary UI, matching the "return
79
- // the path written" contract every other adapter follows — the first
80
- // profile's patch file when one exists, otherwise the $DSH_HOME root
81
- // itself (nothing was written yet; the next sync cycle picks it up once
82
- // a profile exists, per dshHooks.ts's own module doc).
83
- return profiles.length > 0 ? join(profiles[0], 'cordis.patch.yml') : dshHome;
84
73
  },
85
- async readCurrentHash(_workspaceRoot) {
86
- // No single canonical file to hash — dsh may have zero, one, or several
87
- // profiles, each with its own cordis.patch.yml. Matching goose.ts/
88
- // cline.ts's own "no rules file" precedent, this reports no hash rather
89
- // than picking one arbitrary profile's file to represent all of them.
90
- return null;
74
+ writeConfig(workspaceRoot, sops, proxyUrl) {
75
+ return writeAgentsMd(workspaceRoot, sops, proxyUrl);
76
+ },
77
+ readCurrentHash(workspaceRoot) {
78
+ return agentsMdHash(workspaceRoot);
91
79
  },
92
80
  };
93
81
  //# sourceMappingURL=dsh.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dsh.js","sourceRoot":"","sources":["../../src/harness/dsh.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OA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QACxE,yEAAyE;QACzE,mEAAmE;QACnE,uEAAuE;QACvE,kEAAkE;QAClE,OAAO,KAAK,CAAA;IACd,CAAC;IAED,oEAAoE;IACpE,wEAAwE;IACxE,yBAAyB;IACzB,KAAK,CAAC,WAAW,CAAC,aAAqB,EAAE,QAAgB;QACvD,MAAM,aAAa,CAAC,aAAa,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAA;IAClD,CAAC;IAED,WAAW,CAAC,aAAqB,EAAE,IAAoB,EAAE,QAAgB;QACvE,OAAO,aAAa,CAAC,aAAa,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAA;IACrD,CAAC;IAED,eAAe,CAAC,aAAqB;QACnC,OAAO,YAAY,CAAC,aAAa,CAAC,CAAA;IACpC,CAAC;CACF,CAAA"}
@@ -16,20 +16,19 @@
16
16
  * No version floor: eve is pre-1.0 (0.39.x at integration time) and the
17
17
  * `approval` surface `@intutic/gate/eve` targets has no known major-version
18
18
  * boundary to gate on — the churn risk is handled by the gate package's own
19
- * pinned devDependency verification instead (TD-410).
19
+ * pinned devDependency verification instead.
20
20
  *
21
21
  * PREVIEW-CHURN NOTE (same shield the dsh integration established): eve is a
22
22
  * fast-moving preview product. `@intutic/gate/eve` was verified against
23
23
  * eve@0.71.0's shipped `.d.ts` (first 0.39.1) — see that module's doc for exactly what was
24
- * confirmed vs. assumed, and docs/TECH_DEBT.md TD-410/TD-411/TD-412.
24
+ * confirmed vs. assumed.
25
25
  *
26
26
  * LLM-egress note carried into the generated `.env.intutic`: eve routes
27
27
  * models through the Vercel AI Gateway by default, whose wire protocol the
28
28
  * Intutic proxy does not parse — and like the plain Vercel AI SDK it is
29
29
  * built on, eve has no env-var base-URL override. Only the in-code
30
30
  * direct-provider path (`defineAgent({ model: withIntuticProxy(...)(...) })`)
31
- * routes through the proxy. See TD-412 and
32
- * `apps/docs/integrations/eve.md`.
31
+ * routes through the proxy. See `apps/docs/integrations/eve.md`.
33
32
  *
34
33
  * HLD §3.14 — Harness Onboarding Matrix
35
34
  * @module
@@ -1 +1 @@
1
- {"version":3,"file":"eve.d.ts","sourceRoot":"","sources":["../../src/harness/eve.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAKH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAiBjD,2EAA2E;AAC3E,eAAO,MAAM,UAAU,EAAE,eAWxB,CAAA"}
1
+ {"version":3,"file":"eve.d.ts","sourceRoot":"","sources":["../../src/harness/eve.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAKH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAiBjD,2EAA2E;AAC3E,eAAO,MAAM,UAAU,EAAE,eAWxB,CAAA"}
@@ -16,20 +16,19 @@
16
16
  * No version floor: eve is pre-1.0 (0.39.x at integration time) and the
17
17
  * `approval` surface `@intutic/gate/eve` targets has no known major-version
18
18
  * boundary to gate on — the churn risk is handled by the gate package's own
19
- * pinned devDependency verification instead (TD-410).
19
+ * pinned devDependency verification instead.
20
20
  *
21
21
  * PREVIEW-CHURN NOTE (same shield the dsh integration established): eve is a
22
22
  * fast-moving preview product. `@intutic/gate/eve` was verified against
23
23
  * eve@0.71.0's shipped `.d.ts` (first 0.39.1) — see that module's doc for exactly what was
24
- * confirmed vs. assumed, and docs/TECH_DEBT.md TD-410/TD-411/TD-412.
24
+ * confirmed vs. assumed.
25
25
  *
26
26
  * LLM-egress note carried into the generated `.env.intutic`: eve routes
27
27
  * models through the Vercel AI Gateway by default, whose wire protocol the
28
28
  * Intutic proxy does not parse — and like the plain Vercel AI SDK it is
29
29
  * built on, eve has no env-var base-URL override. Only the in-code
30
30
  * direct-provider path (`defineAgent({ model: withIntuticProxy(...)(...) })`)
31
- * routes through the proxy. See TD-412 and
32
- * `apps/docs/integrations/eve.md`.
31
+ * routes through the proxy. See `apps/docs/integrations/eve.md`.
33
32
  *
34
33
  * HLD §3.14 — Harness Onboarding Matrix
35
34
  * @module
@@ -1 +1 @@
1
- {"version":3,"file":"eve.js","sourceRoot":"","sources":["../../src/harness/eve.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAEnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAA;AAE9D,MAAM,IAAI,GAAG,qBAAqB,CAAC;IACjC,IAAI,EAAE,WAAW,CAAC,GAAG;IACrB,KAAK,EAAE,KAAK;IACZ,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;IAC3B,UAAU,EAAE,eAAe;IAC3B,UAAU,EAAE,wEAAwE;IACpF,YAAY,EACV,6FAA6F;QAC7F,qFAAqF;QACrF,sFAAsF;QACtF,yFAAyF;IAC3F,QAAQ,EAAE,KAAK;CAChB,CAAC,CAAA;AAEF,2EAA2E;AAC3E,MAAM,CAAC,MAAM,UAAU,GAAoB;IACzC,GAAG,IAAI;IAEP,KAAK,CAAC,MAAM,CAAC,aAAqB;QAChC,IAAI,CAAC,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;YAAE,OAAO,KAAK,CAAA;QACrD,IAAI,CAAC;YACH,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAA;QACjE,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,KAAK,CAAA,CAAC,6DAA6D;QAC5E,CAAC;IACH,CAAC;CACF,CAAA"}
1
+ {"version":3,"file":"eve.js","sourceRoot":"","sources":["../../src/harness/eve.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAEnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAA;AAE9D,MAAM,IAAI,GAAG,qBAAqB,CAAC;IACjC,IAAI,EAAE,WAAW,CAAC,GAAG;IACrB,KAAK,EAAE,KAAK;IACZ,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;IAC3B,UAAU,EAAE,eAAe;IAC3B,UAAU,EAAE,wEAAwE;IACpF,YAAY,EACV,6FAA6F;QAC7F,qFAAqF;QACrF,sFAAsF;QACtF,yFAAyF;IAC3F,QAAQ,EAAE,KAAK;CAChB,CAAC,CAAA;AAEF,2EAA2E;AAC3E,MAAM,CAAC,MAAM,UAAU,GAAoB;IACzC,GAAG,IAAI;IAEP,KAAK,CAAC,MAAM,CAAC,aAAqB;QAChC,IAAI,CAAC,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;YAAE,OAAO,KAAK,CAAA;QACrD,IAAI,CAAC;YACH,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAA;QACjE,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,KAAK,CAAA,CAAC,6DAA6D;QAC5E,CAAC;IACH,CAAC;CACF,CAAA"}
@@ -2,7 +2,10 @@
2
2
  * githubCopilot.ts — GitHub Copilot adapter.
3
3
  *
4
4
  * Detects GitHub Copilot presence (.git, .github, or .github/copilot-instructions.md),
5
- * writes Markdown rules to `.github/copilot-instructions.md`, and installs the
5
+ * writes the rule sets as a marked section of `.github/copilot-instructions.md`
6
+ * (the repository-wide instructions file Copilot adds to every chat, agent
7
+ * and code-review request; https://docs.github.com/en/copilot/how-tos/configure-custom-instructions/add-repository-instructions),
8
+ * keeping the team's own instructions in it, and installs the
6
9
  * VS Code agent-mode PreToolUse gate (`.github/hooks/intutic-governance.json`
7
10
  * and `~/.copilot/hooks/intutic-governance.json`) — see githubCopilotHooks.ts.
8
11
  *
@@ -1 +1 @@
1
- {"version":3,"file":"githubCopilot.d.ts","sourceRoot":"","sources":["../../src/harness/githubCopilot.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAOH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAQjD,eAAO,MAAM,oBAAoB,EAAE,eAqClC,CAAA"}
1
+ {"version":3,"file":"githubCopilot.d.ts","sourceRoot":"","sources":["../../src/harness/githubCopilot.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAOH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAOjD,eAAO,MAAM,oBAAoB,EAAE,eA6BlC,CAAA"}
@@ -2,7 +2,10 @@
2
2
  * githubCopilot.ts — GitHub Copilot adapter.
3
3
  *
4
4
  * Detects GitHub Copilot presence (.git, .github, or .github/copilot-instructions.md),
5
- * writes Markdown rules to `.github/copilot-instructions.md`, and installs the
5
+ * writes the rule sets as a marked section of `.github/copilot-instructions.md`
6
+ * (the repository-wide instructions file Copilot adds to every chat, agent
7
+ * and code-review request; https://docs.github.com/en/copilot/how-tos/configure-custom-instructions/add-repository-instructions),
8
+ * keeping the team's own instructions in it, and installs the
6
9
  * VS Code agent-mode PreToolUse gate (`.github/hooks/intutic-governance.json`
7
10
  * and `~/.copilot/hooks/intutic-governance.json`) — see githubCopilotHooks.ts.
8
11
  *
@@ -13,10 +16,9 @@ import { join } from 'node:path';
13
16
  import { access } from 'node:fs/promises';
14
17
  import { existsSync } from 'node:fs';
15
18
  import { HarnessType } from '@intutic/shared-types';
16
- import { hashFile } from '../lib/hash.js';
17
- import { buildMarkdownContent } from './base.js';
18
19
  import { loadCredentials } from '../config/store.js';
19
- import { writeGithubCopilotHooks, writeOwnedFile } from '@intutic/sync-daemon';
20
+ import { writeGithubCopilotHooks } from '@intutic/sync-daemon';
21
+ import { rulesSectionHash, writeRulesSectionFile } from './rulesFiles.js';
20
22
  const CONFIG_FILE = '.github/copilot-instructions.md';
21
23
  export const githubCopilotAdapter = {
22
24
  type: HarnessType.GITHUB_COPILOT,
@@ -35,25 +37,15 @@ export const githubCopilotAdapter = {
35
37
  return false;
36
38
  }
37
39
  },
38
- async writeConfig(workspaceRoot, sops, proxyUrl) {
39
- // The gate is installed even with zero SOPs: it is what refuses tool
40
- // calls, and the built-in protections apply without any SOP.
40
+ async installGate(workspaceRoot, proxyUrl) {
41
41
  const creds = await loadCredentials();
42
42
  await writeGithubCopilotHooks(workspaceRoot, proxyUrl, creds?.workspaceId || 'local');
43
- if (sops.length === 0)
44
- return null;
45
- const filePath = join(workspaceRoot, CONFIG_FILE);
46
- const content = buildMarkdownContent(sops, proxyUrl);
47
- await writeOwnedFile(filePath, workspaceRoot, content);
48
- return filePath;
49
43
  },
50
- async readCurrentHash(workspaceRoot) {
51
- try {
52
- return await hashFile(join(workspaceRoot, CONFIG_FILE));
53
- }
54
- catch {
55
- return null;
56
- }
44
+ writeConfig(workspaceRoot, sops, proxyUrl) {
45
+ return writeRulesSectionFile(workspaceRoot, CONFIG_FILE, sops, proxyUrl);
46
+ },
47
+ readCurrentHash(workspaceRoot) {
48
+ return rulesSectionHash(workspaceRoot, CONFIG_FILE);
57
49
  },
58
50
  };
59
51
  //# sourceMappingURL=githubCopilot.js.map