@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 +1 @@
1
- {"version":3,"file":"agenticOrchestrator.js","sourceRoot":"","sources":["../../src/harness/agenticOrchestrator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAInD,sEAAsE;AACtE,MAAM,kCAAkC,GAAG,uBAAuB,CAAA;AAClE;yEACyE;AACzE,MAAM,6BAA6B,GAAG,4BAA4B,CAAA;AAElE,MAAM,CAAC,MAAM,0BAA0B,GAAoB;IACzD,IAAI,EAAE,WAAW,CAAC,oBAAoB;IACtC,2EAA2E;IAC3E,wEAAwE;IACxE,uEAAuE;IACvE,kEAAkE;IAClE,cAAc,EAAE,EAAE;IAElB,KAAK,CAAC,MAAM,CAAC,cAAsB;QACjC,yEAAyE;QACzE,mEAAmE;QACnE,wEAAwE;QACxE,qEAAqE;QACrE,uEAAuE;QACvE,mBAAmB;QACnB,IAAI,CAAC;YACH,MAAM,MAAM,CAAC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EAAE,UAAU,CAAC,CAAC,CAAA;gBACjC,OAAO,IAAI,CAAA;YACb,CAAC;YAAC,MAAM,CAAC,CAAC,cAAc,CAAC,CAAC;QAC5B,CAAC;QAED,wEAAwE;QACxE,mEAAmE;QACnE,oEAAoE;QACpE,gCAAgC;QAChC,IAAI,OAAO,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;YAClC,IAAI,CAAC;gBACH,MAAM,MAAM,CAAC,6BAA6B,CAAC,CAAA;gBAC3C,OAAO,IAAI,CAAA;YACb,CAAC;YAAC,MAAM,CAAC,CAAC,kBAAkB,CAAC,CAAC;QAChC,CAAC;QAED,OAAO,KAAK,CAAA;IACd,CAAC;IAED,oEAAoE;IACpE,mEAAmE;IACnE,0EAA0E;IAC1E,oEAAoE;IACpE,oDAAoD;IACpD,KAAK,CAAC,WAAW,CAAC,cAAsB,EAAE,KAAqB,EAAE,SAAiB;QAChF,OAAO,IAAI,CAAA;IACb,CAAC;IAED,KAAK,CAAC,eAAe,CAAC,cAAsB;QAC1C,OAAO,IAAI,CAAA;IACb,CAAC;CACF,CAAA"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * agentsMd.ts — the one writer of `AGENTS.md`.
3
+ *
4
+ * `AGENTS.md` is the cross-tool instructions file (https://agents.md). Codex,
5
+ * Grok Build, OpenCode, Muse Code and Pi all load the workspace's copy, and
6
+ * it is often the team's own, so every one of them writes the same marked
7
+ * section through this module instead of each writing the whole file: the
8
+ * last writer used to replace the rules of the others, and the user's own
9
+ * text with them.
10
+ *
11
+ * `intutic connect` hands each of them every rule set aimed at any
12
+ * `AGENTS.md` reader configured in the workspace (`writeHarnessConfigs`), so
13
+ * whichever writes, the section is the same. A rule set aimed at one of them
14
+ * is therefore read by all of them: they share the file.
15
+ *
16
+ * @module
17
+ */
18
+ import type { SyncSopEntry } from '@intutic/shared-types';
19
+ export declare const AGENTS_MD = "AGENTS.md";
20
+ /** Writes the rule sets as the marked section of the workspace's `AGENTS.md`. */
21
+ export declare function writeAgentsMd(workspaceRoot: string, sops: SyncSopEntry[], proxyUrl: string): Promise<string | null>;
22
+ /** The section's hash, for drift. */
23
+ export declare function agentsMdHash(workspaceRoot: string): Promise<string | null>;
24
+ //# sourceMappingURL=agentsMd.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agentsMd.d.ts","sourceRoot":"","sources":["../../src/harness/agentsMd.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAGzD,eAAO,MAAM,SAAS,cAAc,CAAA;AAEpC,iFAAiF;AACjF,wBAAgB,aAAa,CAAC,aAAa,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAEnH;AAED,qCAAqC;AACrC,wBAAgB,YAAY,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAE1E"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * agentsMd.ts — the one writer of `AGENTS.md`.
3
+ *
4
+ * `AGENTS.md` is the cross-tool instructions file (https://agents.md). Codex,
5
+ * Grok Build, OpenCode, Muse Code and Pi all load the workspace's copy, and
6
+ * it is often the team's own, so every one of them writes the same marked
7
+ * section through this module instead of each writing the whole file: the
8
+ * last writer used to replace the rules of the others, and the user's own
9
+ * text with them.
10
+ *
11
+ * `intutic connect` hands each of them every rule set aimed at any
12
+ * `AGENTS.md` reader configured in the workspace (`writeHarnessConfigs`), so
13
+ * whichever writes, the section is the same. A rule set aimed at one of them
14
+ * is therefore read by all of them: they share the file.
15
+ *
16
+ * @module
17
+ */
18
+ import { rulesSectionHash, writeRulesSectionFile } from './rulesFiles.js';
19
+ export const AGENTS_MD = 'AGENTS.md';
20
+ /** Writes the rule sets as the marked section of the workspace's `AGENTS.md`. */
21
+ export function writeAgentsMd(workspaceRoot, sops, proxyUrl) {
22
+ return writeRulesSectionFile(workspaceRoot, AGENTS_MD, sops, proxyUrl);
23
+ }
24
+ /** The section's hash, for drift. */
25
+ export function agentsMdHash(workspaceRoot) {
26
+ return rulesSectionHash(workspaceRoot, AGENTS_MD);
27
+ }
28
+ //# sourceMappingURL=agentsMd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agentsMd.js","sourceRoot":"","sources":["../../src/harness/agentsMd.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAA;AAEzE,MAAM,CAAC,MAAM,SAAS,GAAG,WAAW,CAAA;AAEpC,iFAAiF;AACjF,MAAM,UAAU,aAAa,CAAC,aAAqB,EAAE,IAAoB,EAAE,QAAgB;IACzF,OAAO,qBAAqB,CAAC,aAAa,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAA;AACxE,CAAC;AAED,qCAAqC;AACrC,MAAM,UAAU,YAAY,CAAC,aAAqB;IAChD,OAAO,gBAAgB,CAAC,aAAa,EAAE,SAAS,CAAC,CAAA;AACnD,CAAC"}
@@ -4,7 +4,9 @@
4
4
  * Merges proxy routing into .aider.conf.yml using the aiderConfigMerger,
5
5
  * which keeps the user's own keys, strips dangerous auto-exec keys
6
6
  * (test-cmd, lint-cmd) that Aider auto-executes on startup, and lists the
7
- * SOP text as a read-only context file (.intutic/aider-sops.md).
7
+ * SOP text as a read-only context file (.intutic/aider-sops.md) by absolute
8
+ * path: Aider loads no instructions file it is not told about
9
+ * (https://aider.chat/docs/usage/conventions.html).
8
10
  *
9
11
  * HLD §3.14 — Harness Onboarding Matrix
10
12
  * @module
@@ -1 +1 @@
1
- {"version":3,"file":"aider.d.ts","sourceRoot":"","sources":["../../src/harness/aider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAMH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAMjD,eAAO,MAAM,YAAY,EAAE,eAiC1B,CAAA"}
1
+ {"version":3,"file":"aider.d.ts","sourceRoot":"","sources":["../../src/harness/aider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAMH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAOjD,eAAO,MAAM,YAAY,EAAE,eAgC1B,CAAA"}
@@ -4,7 +4,9 @@
4
4
  * Merges proxy routing into .aider.conf.yml using the aiderConfigMerger,
5
5
  * which keeps the user's own keys, strips dangerous auto-exec keys
6
6
  * (test-cmd, lint-cmd) that Aider auto-executes on startup, and lists the
7
- * SOP text as a read-only context file (.intutic/aider-sops.md).
7
+ * SOP text as a read-only context file (.intutic/aider-sops.md) by absolute
8
+ * path: Aider loads no instructions file it is not told about
9
+ * (https://aider.chat/docs/usage/conventions.html).
8
10
  *
9
11
  * HLD §3.14 — Harness Onboarding Matrix
10
12
  * @module
@@ -13,11 +15,13 @@ import { access } from 'node:fs/promises';
13
15
  import { join } from 'node:path';
14
16
  import { HarnessType } from '@intutic/shared-types';
15
17
  import { hashFile } from '../lib/hash.js';
16
- import { mergeAiderConfig } from '@intutic/sync-daemon/harness/aiderConfigMerger';
18
+ import { AIDER_SOPS_FILE, mergeAiderConfig } from '@intutic/sync-daemon/harness/aiderConfigMerger';
19
+ import { buildSopSections } from './rulesFiles.js';
17
20
  const CONFIG_FILE = '.aider.conf.yml';
18
21
  export const aiderAdapter = {
19
22
  type: HarnessType.AIDER,
20
- configFileName: CONFIG_FILE,
23
+ // Drift is tracked on the rules file, which .aider.conf.yml lists under `read:`.
24
+ configFileName: AIDER_SOPS_FILE,
21
25
  async detect(workspaceRoot) {
22
26
  try {
23
27
  await access(join(workspaceRoot, CONFIG_FILE));
@@ -29,9 +33,7 @@ export const aiderAdapter = {
29
33
  },
30
34
  async writeConfig(workspaceRoot, sops, proxyUrl) {
31
35
  const filePath = join(workspaceRoot, CONFIG_FILE);
32
- const sopsText = sops.length > 0
33
- ? sops.map((sop) => `## ${sop.title}\n\n${sop.content}`).join('\n\n---\n\n')
34
- : undefined;
36
+ const sopsText = sops.length > 0 ? buildSopSections(sops) : undefined;
35
37
  // Safe merge: strips test-cmd/lint-cmd, preserves all other user keys,
36
38
  // routes OpenAI (openai-api-base) and Anthropic (set-env) models through
37
39
  // the proxy and lists the SOPs as a read-only context file.
@@ -39,7 +41,7 @@ export const aiderAdapter = {
39
41
  },
40
42
  async readCurrentHash(workspaceRoot) {
41
43
  try {
42
- return await hashFile(join(workspaceRoot, CONFIG_FILE));
44
+ return await hashFile(join(workspaceRoot, AIDER_SOPS_FILE));
43
45
  }
44
46
  catch {
45
47
  return null;
@@ -1 +1 @@
1
- {"version":3,"file":"aider.js","sourceRoot":"","sources":["../../src/harness/aider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAGnD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAA;AAEjF,MAAM,WAAW,GAAG,iBAAiB,CAAA;AAErC,MAAM,CAAC,MAAM,YAAY,GAAoB;IAC3C,IAAI,EAAE,WAAW,CAAC,KAAK;IACvB,cAAc,EAAE,WAAW;IAE3B,KAAK,CAAC,MAAM,CAAC,aAAqB;QAChC,IAAI,CAAC;YACH,MAAM,MAAM,CAAC,IAAI,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC,CAAA;YAC9C,OAAO,IAAI,CAAA;QACb,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,KAAK,CAAA;QACd,CAAC;IACH,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,aAAqB,EAAE,IAAoB,EAAE,QAAgB;QAC7E,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EAAE,WAAW,CAAC,KAAK;IACvB,iFAAiF;IACjF,cAAc,EAAE,eAAe;IAE/B,KAAK,CAAC,MAAM,CAAC,aAAqB;QAChC,IAAI,CAAC;YACH,MAAM,MAAM,CAAC,IAAI,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC,CAAA;YAC9C,OAAO,IAAI,CAAA;QACb,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,KAAK,CAAA;QACd,CAAC;IACH,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,aAAqB,EAAE,IAAoB,EAAE,QAAgB;QAC7E,MAAM,QAAQ,GAAG,IAAI,CAAC,aAAa,EAAE,WAAW,CAAC,CAAA;QAEjD,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;QAErE,uEAAuE;QACvE,yEAAyE;QACzE,4DAA4D;QAC5D,OAAO,CAAC,MAAM,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAA;IACjF,CAAC;IAED,KAAK,CAAC,eAAe,CAAC,aAAqB;QACzC,IAAI,CAAC;YACH,OAAO,MAAM,QAAQ,CAAC,IAAI,CAAC,aAAa,EAAE,eAAe,CAAC,CAAC,CAAA;QAC7D,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,IAAI,CAAA;QACb,CAAC;IACH,CAAC;CACF,CAAA"}
@@ -1,10 +1,28 @@
1
1
  /**
2
- * Antigravity adapter — .gemini/settings.json
2
+ * Antigravity adapter — Google Antigravity and Gemini CLI.
3
3
  *
4
- * Merges SOP content into the customInstructions field of the workspace's
5
- * Gemini settings JSON file, and installs the Gemini CLI `BeforeTool` gate in
6
- * `~/.gemini/settings.json` (see antigravityHooks.ts). A settings file that is
7
- * not a plain JSON object is left alone and reported.
4
+ * Google's terminal agent was Gemini CLI until Antigravity CLI replaced it
5
+ * for individual users in 2026; enterprise and API-key users keep Gemini
6
+ * CLI. Both live under `~/.gemini`, and this one harness governs both:
7
+ *
8
+ * - the Antigravity gate (app, IDE and CLI): a `PreToolUse` hook in
9
+ * `~/.gemini/config/hooks.json` (see antigravityCliHooks.ts);
10
+ * - the Gemini CLI gate: a `BeforeTool` hook in `~/.gemini/settings.json`
11
+ * (see antigravityHooks.ts);
12
+ * - rules: a marked section of the workspace's `GEMINI.md`, the context file
13
+ * both products load as persistent instructions (see rulesSection.ts).
14
+ * Gemini CLI reads `GEMINI.md` from the workspace up to the git root (its
15
+ * `context.fileName` setting can rename it); Antigravity reads `GEMINI.md`
16
+ * and `AGENTS.md` in every directory from the file it works on up to the
17
+ * workspace root. Neither reads a `customInstructions` key in
18
+ * `.gemini/settings.json`, where earlier versions put the rules;
19
+ * `intutic disconnect` removes that key.
20
+ *
21
+ * A hooks file that is not a plain JSON object is left alone and reported.
22
+ *
23
+ * The two gates report under their own gate ids, `antigravity` and
24
+ * `gemini-cli` (gateIdentity.ts in @intutic/shared-types), so the control
25
+ * plane can tell the products apart; the harness stays one.
8
26
  *
9
27
  * HLD §3.14 — Harness Onboarding Matrix
10
28
  * @module
@@ -1 +1 @@
1
- {"version":3,"file":"antigravity.d.ts","sourceRoot":"","sources":["../../src/harness/antigravity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAOH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAQjD,eAAO,MAAM,kBAAkB,EAAE,eAsDhC,CAAA"}
1
+ {"version":3,"file":"antigravity.d.ts","sourceRoot":"","sources":["../../src/harness/antigravity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAIH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAOjD,eAAO,MAAM,kBAAkB,EAAE,eA8BhC,CAAA"}
@@ -1,72 +1,62 @@
1
1
  /**
2
- * Antigravity adapter — .gemini/settings.json
2
+ * Antigravity adapter — Google Antigravity and Gemini CLI.
3
3
  *
4
- * Merges SOP content into the customInstructions field of the workspace's
5
- * Gemini settings JSON file, and installs the Gemini CLI `BeforeTool` gate in
6
- * `~/.gemini/settings.json` (see antigravityHooks.ts). A settings file that is
7
- * not a plain JSON object is left alone and reported.
4
+ * Google's terminal agent was Gemini CLI until Antigravity CLI replaced it
5
+ * for individual users in 2026; enterprise and API-key users keep Gemini
6
+ * CLI. Both live under `~/.gemini`, and this one harness governs both:
7
+ *
8
+ * - the Antigravity gate (app, IDE and CLI): a `PreToolUse` hook in
9
+ * `~/.gemini/config/hooks.json` (see antigravityCliHooks.ts);
10
+ * - the Gemini CLI gate: a `BeforeTool` hook in `~/.gemini/settings.json`
11
+ * (see antigravityHooks.ts);
12
+ * - rules: a marked section of the workspace's `GEMINI.md`, the context file
13
+ * both products load as persistent instructions (see rulesSection.ts).
14
+ * Gemini CLI reads `GEMINI.md` from the workspace up to the git root (its
15
+ * `context.fileName` setting can rename it); Antigravity reads `GEMINI.md`
16
+ * and `AGENTS.md` in every directory from the file it works on up to the
17
+ * workspace root. Neither reads a `customInstructions` key in
18
+ * `.gemini/settings.json`, where earlier versions put the rules;
19
+ * `intutic disconnect` removes that key.
20
+ *
21
+ * A hooks file that is not a plain JSON object is left alone and reported.
22
+ *
23
+ * The two gates report under their own gate ids, `antigravity` and
24
+ * `gemini-cli` (gateIdentity.ts in @intutic/shared-types), so the control
25
+ * plane can tell the products apart; the harness stays one.
8
26
  *
9
27
  * HLD §3.14 — Harness Onboarding Matrix
10
28
  * @module
11
29
  */
12
- import { join } from 'node:path';
13
- import { access, writeFile, rename, mkdir } from 'node:fs/promises';
14
- import { dirname } from 'node:path';
15
30
  import { HarnessType } from '@intutic/shared-types';
16
- import { hashFile } from '../lib/hash.js';
17
- import { newIso } from '@intutic/id';
18
31
  import { loadCredentials } from '../config/store.js';
19
- import { keepOriginal, readJsonObjectForMerge, writeAntigravityHooks } from '@intutic/sync-daemon';
20
- const CONFIG_FILE = '.gemini/settings.json';
32
+ import { antigravityGateIdentities, writeAntigravityCliHooks, writeAntigravityHooks } from '@intutic/sync-daemon';
33
+ import { rulesSectionHash, writeRulesSectionFile } from './rulesFiles.js';
34
+ const CONFIG_FILE = 'GEMINI.md';
21
35
  export const antigravityAdapter = {
22
36
  type: HarnessType.ANTIGRAVITY,
23
37
  configFileName: CONFIG_FILE,
38
+ /**
39
+ * Either product, found the way the sync daemon finds it for the agent
40
+ * report and the AI inventory (antigravityProducts.ts): Antigravity's
41
+ * app-data directories or a project `.agents/hooks.json`; Gemini CLI's
42
+ * `gemini` on PATH, a project `.gemini` directory or its own
43
+ * `~/.gemini/settings.json`. A plain Gemini CLI install with no `.gemini`
44
+ * in the workspace is found by the binary and the settings file.
45
+ */
24
46
  async detect(workspaceRoot) {
25
- try {
26
- await access(join(workspaceRoot, '.gemini'));
27
- return true;
28
- }
29
- catch {
30
- return false;
31
- }
47
+ return (await antigravityGateIdentities(workspaceRoot)).length > 0;
48
+ },
49
+ async installGate(workspaceRoot, proxyUrl) {
50
+ const workspaceId = (await loadCredentials())?.workspaceId || 'local';
51
+ await writeAntigravityCliHooks(workspaceRoot, proxyUrl, workspaceId);
52
+ await writeAntigravityHooks(workspaceRoot, proxyUrl, workspaceId);
32
53
  },
33
- async writeConfig(workspaceRoot, sops, proxyUrl) {
34
- // The gate is installed even with zero SOPs: it is what refuses tool
35
- // calls, and the built-in protections apply without any SOP.
36
- const creds = await loadCredentials();
37
- await writeAntigravityHooks(workspaceRoot, proxyUrl, creds?.workspaceId || 'local');
38
- if (sops.length === 0)
39
- return null;
40
- const filePath = join(workspaceRoot, CONFIG_FILE);
41
- const tmpPath = filePath + '.intutic-tmp';
42
- await keepOriginal(filePath, workspaceRoot);
43
- const settings = await readJsonObjectForMerge(filePath);
44
- if (settings === null)
45
- return null;
46
- // Merge governance instructions
47
- const instructions = sops
48
- .map((sop) => `## ${sop.title}\n\n${sop.content}`)
49
- .join('\n\n---\n\n');
50
- settings.customInstructions = [
51
- '# Intutic Governance Rules (auto-generated)',
52
- `# DO NOT EDIT — managed by intutic sync daemon`,
53
- `# Last sync: ${newIso()}`,
54
- `# Proxy URL: ${proxyUrl}`,
55
- '',
56
- instructions,
57
- ].join('\n');
58
- await mkdir(dirname(filePath), { recursive: true });
59
- await writeFile(tmpPath, JSON.stringify(settings, null, 2) + '\n', 'utf-8');
60
- await rename(tmpPath, filePath);
61
- return filePath;
54
+ writeConfig(workspaceRoot, sops, proxyUrl) {
55
+ return writeRulesSectionFile(workspaceRoot, CONFIG_FILE, sops, proxyUrl);
62
56
  },
63
- async readCurrentHash(workspaceRoot) {
64
- try {
65
- return await hashFile(join(workspaceRoot, CONFIG_FILE));
66
- }
67
- catch {
68
- return null;
69
- }
57
+ /** The section only: the user's own edits elsewhere in `GEMINI.md` are not drift. */
58
+ readCurrentHash(workspaceRoot) {
59
+ return rulesSectionHash(workspaceRoot, CONFIG_FILE);
70
60
  },
71
61
  };
72
62
  //# sourceMappingURL=antigravity.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"antigravity.js","sourceRoot":"","sources":["../../src/harness/antigravity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAGnD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,EAAE,YAAY,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,sBA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aAAqB;QAChC,OAAO,CAAC,MAAM,yBAAyB,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAA;IACpE,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,aAAqB,EAAE,QAAgB;QACvD,MAAM,WAAW,GAAG,CAAC,MAAM,eAAe,EAAE,CAAC,EAAE,WAAW,IAAI,OAAO,CAAA;QACrE,MAAM,wBAAwB,CAAC,aAAa,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAA;QACpE,MAAM,qBAAqB,CAAC,aAAa,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAA;IACnE,CAAC;IAED,WAAW,CAAC,aAAqB,EAAE,IAAoB,EAAE,QAAgB;QACvE,OAAO,qBAAqB,CAAC,aAAa,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAA;IAC1E,CAAC;IAED,qFAAqF;IACrF,eAAe,CAAC,aAAqB;QACnC,OAAO,gBAAgB,CAAC,aAAa,EAAE,WAAW,CAAC,CAAA;IACrD,CAAC;CACF,CAAA"}
@@ -15,7 +15,7 @@
15
15
  * calls never go through the runtime at all, so for `AssistantAgent`-based
16
16
  * code the framework-agnostic `@guard`/`guard_tools` helpers (governing the
17
17
  * tool objects directly) remain the applicable coverage, same as before this
18
- * adapter existed (see TD-374).
18
+ * adapter existed.
19
19
  *
20
20
  * HLD §3.14 — Harness Onboarding Matrix
21
21
  * @module
@@ -15,7 +15,7 @@
15
15
  * calls never go through the runtime at all, so for `AssistantAgent`-based
16
16
  * code the framework-agnostic `@guard`/`guard_tools` helpers (governing the
17
17
  * tool objects directly) remain the applicable coverage, same as before this
18
- * adapter existed (see TD-374).
18
+ * adapter existed.
19
19
  *
20
20
  * HLD §3.14 — Harness Onboarding Matrix
21
21
  * @module
@@ -28,7 +28,7 @@ export const autogenAdapter = makeSdkGatedAdapter({
28
28
  keywords: ['autogen-agentchat', 'autogen-core', 'autogen-ext'],
29
29
  pipInstall: 'intutic-clawde[autogen]',
30
30
  importLine: 'from intutic_clawde.gate.adapters.autogen import IntuticInterventionHandler',
31
- usageSummary: 'IntuticInterventionHandler vetoes a runtime-routed FunctionCall via on_send (see TD-374: ' +
31
+ usageSummary: 'IntuticInterventionHandler vetoes a runtime-routed FunctionCall via on_send (' +
32
32
  'invisible to AssistantAgent\'s own tool calls — wrap those tools with @guard/guard_tools ' +
33
33
  'instead).',
34
34
  docsSlug: 'autogen',
@@ -1 +1 @@
1
- {"version":3,"file":"autogen.js","sourceRoot":"","sources":["../../src/harness/autogen.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAE1D,MAAM,CAAC,MAAM,cAAc,GAAG,mBAAmB,CAAC;IAChD,IAAI,EAAE,WAAW,CAAC,OAAO;IACzB,KAAK,EAAE,SAAS;IAChB,QAAQ,EAAE,CAAC,mBAAmB,EAAE,cAAc,EAAE,aAAa,CAAC;IAC9D,UAAU,EAAE,yBAAyB;IACrC,UAAU,EAAE,6EAA6E;IACzF,YAAY,EACV,2FAA2F;QAC3F,2FAA2F;QAC3F,WAAW;IACb,QAAQ,EAAE,SAAS;CACpB,CAAC,CAAA"}
1
+ {"version":3,"file":"autogen.js","sourceRoot":"","sources":["../../src/harness/autogen.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAE1D,MAAM,CAAC,MAAM,cAAc,GAAG,mBAAmB,CAAC;IAChD,IAAI,EAAE,WAAW,CAAC,OAAO;IACzB,KAAK,EAAE,SAAS;IAChB,QAAQ,EAAE,CAAC,mBAAmB,EAAE,cAAc,EAAE,aAAa,CAAC;IAC9D,UAAU,EAAE,yBAAyB;IACrC,UAAU,EAAE,6EAA6E;IACzF,YAAY,EACV,+EAA+E;QAC/E,2FAA2F;QAC3F,WAAW;IACb,QAAQ,EAAE,SAAS;CACpB,CAAC,CAAA"}
@@ -1,2 +1,23 @@
1
- export declare const claudeCodeAdapter: import("./types.js").IHarnessAdapter;
1
+ /**
2
+ * Claude Code adapter — rule sets in `.claude/rules/intutic-governance.md`.
3
+ *
4
+ * Claude Code loads every `.claude/rules/*.md` without `paths:` front matter
5
+ * at launch, with the priority of `.claude/CLAUDE.md`
6
+ * (https://code.claude.com/docs/en/memory). Not `CLAUDE.md` itself, which is
7
+ * usually the team's own: and under Claude Code's default setting a project
8
+ * `CLAUDE.md` stops it reading `AGENTS.md`, so creating one would hide a
9
+ * team's `AGENTS.md` from it. Earlier versions overwrote `CLAUDE.md`; the
10
+ * user's own copy comes back. The decisions log goes next to it, in
11
+ * `.claude/rules/intutic-decisions.md` (decisionsDigest.ts). A rule set that
12
+ * also reaches Claude Code through `AGENTS.md` is left out of its own file
13
+ * (`writeHarnessConfigs`), so Claude Code does not load it twice.
14
+ *
15
+ * The gate is installed by `intutic connect`'s own step, with the synced
16
+ * settings its deny rules need.
17
+ *
18
+ * HLD §3.14 — Harness Onboarding Matrix
19
+ * @module
20
+ */
21
+ import type { IHarnessAdapter } from './types.js';
22
+ export declare const claudeCodeAdapter: IHarnessAdapter;
2
23
  //# sourceMappingURL=claudeCode.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"claudeCode.d.ts","sourceRoot":"","sources":["../../src/harness/claudeCode.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,iBAAiB,sCAA8D,CAAA"}
1
+ {"version":3,"file":"claudeCode.d.ts","sourceRoot":"","sources":["../../src/harness/claudeCode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAMH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAMjD,eAAO,MAAM,iBAAiB,EAAE,eA2B/B,CAAA"}
@@ -1,9 +1,53 @@
1
1
  /**
2
- * Claude Code adapter — CLAUDE.md
2
+ * Claude Code adapter — rule sets in `.claude/rules/intutic-governance.md`.
3
+ *
4
+ * Claude Code loads every `.claude/rules/*.md` without `paths:` front matter
5
+ * at launch, with the priority of `.claude/CLAUDE.md`
6
+ * (https://code.claude.com/docs/en/memory). Not `CLAUDE.md` itself, which is
7
+ * usually the team's own: and under Claude Code's default setting a project
8
+ * `CLAUDE.md` stops it reading `AGENTS.md`, so creating one would hide a
9
+ * team's `AGENTS.md` from it. Earlier versions overwrote `CLAUDE.md`; the
10
+ * user's own copy comes back. The decisions log goes next to it, in
11
+ * `.claude/rules/intutic-decisions.md` (decisionsDigest.ts). A rule set that
12
+ * also reaches Claude Code through `AGENTS.md` is left out of its own file
13
+ * (`writeHarnessConfigs`), so Claude Code does not load it twice.
14
+ *
15
+ * The gate is installed by `intutic connect`'s own step, with the synced
16
+ * settings its deny rules need.
17
+ *
3
18
  * HLD §3.14 — Harness Onboarding Matrix
4
19
  * @module
5
20
  */
21
+ import { access } from 'node:fs/promises';
22
+ import { join } from 'node:path';
6
23
  import { HarnessType } from '@intutic/shared-types';
7
- import { createMarkdownAdapter } from './base.js';
8
- export const claudeCodeAdapter = createMarkdownAdapter(HarnessType.CLAUDE_CODE, 'CLAUDE.md');
24
+ import { ownRulesFileHash, retireLegacyRulesFile, writeOwnRulesFile } from './rulesFiles.js';
25
+ const RULES_FILE = '.claude/rules/intutic-governance.md';
26
+ const LEGACY_FILE = 'CLAUDE.md';
27
+ export const claudeCodeAdapter = {
28
+ type: HarnessType.CLAUDE_CODE,
29
+ configFileName: RULES_FILE,
30
+ async detect(workspaceRoot) {
31
+ try {
32
+ await access(join(workspaceRoot, LEGACY_FILE));
33
+ return true;
34
+ }
35
+ catch {
36
+ return false;
37
+ }
38
+ },
39
+ /** With no rule set left for it (they all reach it through `AGENTS.md`;
40
+ * see `writeHarnessConfigs`), its own file goes rather than repeat them. */
41
+ async writeConfig(workspaceRoot, sops, proxyUrl) {
42
+ await retireLegacyRulesFile(workspaceRoot, LEGACY_FILE);
43
+ if (sops.length === 0) {
44
+ await retireLegacyRulesFile(workspaceRoot, RULES_FILE);
45
+ return null;
46
+ }
47
+ return writeOwnRulesFile(workspaceRoot, RULES_FILE, sops, proxyUrl);
48
+ },
49
+ readCurrentHash(workspaceRoot) {
50
+ return ownRulesFileHash(workspaceRoot, RULES_FILE);
51
+ },
52
+ };
9
53
  //# sourceMappingURL=claudeCode.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"claudeCode.js","sourceRoot":"","sources":["../../src/harness/claudeCode.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAA;AAEjD,MAAM,CAAC,MAAM,iBAAiB,GAAG,qBAAqB,CAAC,WAAW,CAAC,WAAW,EAAE,WAAW,CAAC,CAAA"}
1
+ {"version":3,"file":"claudeCode.js","sourceRoot":"","sources":["../../src/harness/claudeCode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAGnD,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAE5F,MAAM,UAAU,GAAG,qCAAqC,CAAA;AACxD,MAAM,WAAW,GAAG,WAAW,CAAA;AAE/B,MAAM,CAAC,MAAM,iBAAiB,GAAoB;IAChD,IAAI,EAAE,WAAW,CAAC,WAAW;IAC7B,cAAc,EAAE,UAAU;IAE1B,KAAK,CAAC,MAAM,CAAC,aAAqB;QAChC,IAAI,CAAC;YACH,MAAM,MAAM,CAAC,IAAI,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC,CAAA;YAC9C,OAAO,IAAI,CAAA;QACb,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,KAAK,CAAA;QACd,CAAC;IACH,CAAC;IAED;iFAC6E;IAC7E,KAAK,CAAC,WAAW,CAAC,aAAqB,EAAE,IAAoB,EAAE,QAAgB;QAC7E,MAAM,qBAAqB,CAAC,aAAa,EAAE,WAAW,CAAC,CAAA;QACvD,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACtB,MAAM,qBAAqB,CAAC,aAAa,EAAE,UAAU,CAAC,CAAA;YACtD,OAAO,IAAI,CAAA;QACb,CAAC;QACD,OAAO,iBAAiB,CAAC,aAAa,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAA;IACrE,CAAC;IAED,eAAe,CAAC,aAAqB;QACnC,OAAO,gBAAgB,CAAC,aAAa,EAAE,UAAU,CAAC,CAAA;IACpD,CAAC;CACF,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"cline.d.ts","sourceRoot":"","sources":["../../src/harness/cline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAOH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AASjD,eAAO,MAAM,YAAY,EAAE,eA4D1B,CAAA"}
1
+ {"version":3,"file":"cline.d.ts","sourceRoot":"","sources":["../../src/harness/cline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAOH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AASjD,eAAO,MAAM,YAAY,EAAE,eA8C1B,CAAA"}
@@ -20,9 +20,9 @@ import { homedir } from 'node:os';
20
20
  import { HarnessType } from '@intutic/shared-types';
21
21
  import { hashFile } from '../lib/hash.js';
22
22
  import { loadCredentials } from '../config/store.js';
23
- import { newIso } from '@intutic/id';
24
23
  import { writeClineHooks, ensureClinerulesDirectory } from '@intutic/sync-daemon/harness/clineHooks';
25
- import { keepOriginal, writeOwnedFile } from '@intutic/sync-daemon';
24
+ import { keepOriginal } from '@intutic/sync-daemon';
25
+ import { writeOwnRulesFile } from './rulesFiles.js';
26
26
  const CONFIG_FILE = '.clinerules/intutic-governance.md';
27
27
  export const clineAdapter = {
28
28
  type: HarnessType.CLINE,
@@ -46,30 +46,21 @@ export const clineAdapter = {
46
46
  return false;
47
47
  }
48
48
  },
49
+ /** The PreToolUse gate in .clinerules/hooks/. */
50
+ async installGate(workspaceRoot, proxyUrl) {
51
+ const creds = await loadCredentials();
52
+ await writeClineHooks(workspaceRoot, proxyUrl, creds?.workspaceId || 'local');
53
+ },
54
+ /** Rules, as one file in the .clinerules directory Cline reads; every
55
+ * file there is applied (https://docs.cline.bot/features/cline-rules). */
49
56
  async writeConfig(workspaceRoot, sops, proxyUrl) {
50
- // 1. Rules, as one file in the .clinerules directory Cline reads.
51
- let filePath = null;
57
+ if (sops.length === 0)
58
+ return null;
52
59
  // Kept before `.clinerules` is created, so disconnect knows it made the directory.
53
60
  await keepOriginal(join(workspaceRoot, CONFIG_FILE), workspaceRoot);
54
- if (await ensureClinerulesDirectory(workspaceRoot)) {
55
- filePath = join(workspaceRoot, CONFIG_FILE);
56
- const instructions = sops.length > 0
57
- ? sops.map((sop) => `## ${sop.title}\n\n${sop.content}`).join('\n\n---\n\n')
58
- : '# Intutic governance active — no SOP rules configured yet.';
59
- const content = [
60
- '# Intutic Governance Rules (auto-generated)',
61
- '# DO NOT EDIT — managed by intutic sync daemon',
62
- `# Last sync: ${newIso()}`,
63
- '',
64
- instructions,
65
- '',
66
- ].join('\n');
67
- await writeOwnedFile(filePath, workspaceRoot, content);
68
- }
69
- // 2. The PreToolUse gate in .clinerules/hooks/.
70
- const creds = await loadCredentials();
71
- await writeClineHooks(workspaceRoot, proxyUrl, creds?.workspaceId || 'local');
72
- return filePath;
61
+ if (!(await ensureClinerulesDirectory(workspaceRoot)))
62
+ return null;
63
+ return writeOwnRulesFile(workspaceRoot, CONFIG_FILE, sops, proxyUrl);
73
64
  },
74
65
  async readCurrentHash(workspaceRoot) {
75
66
  try {
@@ -1 +1 @@
1
- {"version":3,"file":"cline.js","sourceRoot":"","sources":["../../src/harness/cline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;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,MAAM,uBAAuB,CAAA;AAGnD,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,yBAAyB,EAAE,MAAM,yCAAyC,CAAA;AACpG,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAEnE,MAAM,WAAW,GAAG,mCAAmC,CAAA;AAEvD,MAAM,CAAC,MAAM,YAAY,GAAoB;IAC3C,IAAI,EAAE,WAAW,CAAC,KAAK;IACvB,cAAc,EAAE,WAAW;IAE3B,KAAK,CAAC,MAAM,CAAC,aAAqB;QAChC,yDAAyD;QACzD,IAAI,CAAC;YACH,MAAM,MAAM,CAAC,IAAI,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC,CAAA;YAChD,OAAO,IAAI,CAAA;QACb,CAAC;QAAC,MAAM,CAAC;YACP,eAAe;QACjB,CAAC;QAED,wCAAwC;QACxC,IAAI,CAAC;YACH,MAAM,aAAa,GAAG,IAAI,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,YAAY,CAAC,CAAA;YAC9D,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,CAAA;YAC5C,OAAO,OAAO,CAAC,IAA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;YAC9D,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,CAAA;YAC5C,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,yBAAyB,CAAC,CAAC,CAAA;QAC7E,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,KAAK,CAAA;QACd,CAAC;IACH,CAAC;IAED,iDAAiD;IACjD,KAAK,CAAC,WAAW,CAAC,aAAqB,EAAE,QAAgB;QACvD,MAAM,KAAK,GAAG,MAAM,eAAe,EAAE,CAAA;QACrC,MAAM,eAAe,CAAC,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,IAAI,OAAO,CAAC,CAAA;IAC/E,CAAC;IAED;+EAC2E;IAC3E,KAAK,CAAC,WAAW,CAAC,aAAqB,EAAE,IAAoB,EAAE,QAAgB;QAC7E,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,IAAI,CAAA;QAClC,mFAAmF;QACnF,MAAM,YAAY,CAAC,IAAI,CAAC,aAAa,EAAE,WAAW,CAAC,EAAE,aAAa,CAAC,CAAA;QACnE,IAAI,CAAC,CAAC,MAAM,yBAAyB,CAAC,aAAa,CAAC,CAAC;YAAE,OAAO,IAAI,CAAA;QAClE,OAAO,iBAAiB,CAAC,aAAa,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAA;IACtE,CAAC;IAED,KAAK,CAAC,eAAe,CAAC,aAAqB;QACzC,IAAI,CAAC;YACH,OAAO,MAAM,QAAQ,CAAC,IAAI,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC,CAAA;QACzD,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,IAAI,CAAA;QACb,CAAC;IACH,CAAC;CACF,CAAA"}
@@ -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`,
@@ -1 +1 @@
1
- {"version":3,"file":"codex.d.ts","sourceRoot":"","sources":["../../src/harness/codex.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAMH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAcjD,eAAO,MAAM,YAAY,EAAE,eAqD1B,CAAA"}
1
+ {"version":3,"file":"codex.d.ts","sourceRoot":"","sources":["../../src/harness/codex.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAMH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAcjD,eAAO,MAAM,YAAY,EAAE,eAkD1B,CAAA"}