@goondocks/myco 0.17.2 → 0.18.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 (182) hide show
  1. package/README.md +14 -22
  2. package/bin/myco-run +15 -2
  3. package/dist/{agent-run-7AYHXIEF.js → agent-run-2NFYMQXW.js} +7 -7
  4. package/dist/{agent-tasks-UUIFKBD4.js → agent-tasks-MEIYLXGN.js} +7 -7
  5. package/dist/{chunk-XD3NEN3Q.js → chunk-2V7HR7HB.js} +2 -2
  6. package/dist/{chunk-CTF7TQMJ.js → chunk-55QEICRO.js} +14 -4
  7. package/dist/chunk-55QEICRO.js.map +1 -0
  8. package/dist/{chunk-DT42247G.js → chunk-75AZFBFW.js} +3 -3
  9. package/dist/{chunk-ZSJPI5MS.js → chunk-7OYXB2NM.js} +2 -2
  10. package/dist/{chunk-XZWFMMJR.js → chunk-BUIR3JWM.js} +3 -3
  11. package/dist/{chunk-7DAH5GLC.js → chunk-CKJAWZQE.js} +5 -1
  12. package/dist/chunk-CKJAWZQE.js.map +1 -0
  13. package/dist/{chunk-ML6GTPZU.js → chunk-CML4MCYF.js} +2 -2
  14. package/dist/{chunk-BZDZORVP.js → chunk-DLFDBKEV.js} +4 -4
  15. package/dist/{chunk-SI5BBQAT.js → chunk-EO2RQW4S.js} +2 -2
  16. package/dist/{chunk-EBIYONNZ.js → chunk-FABWUX5G.js} +20 -2
  17. package/dist/chunk-FABWUX5G.js.map +1 -0
  18. package/dist/{chunk-RMJPQZGF.js → chunk-JDI4DPWD.js} +127 -125
  19. package/dist/chunk-JDI4DPWD.js.map +1 -0
  20. package/dist/chunk-JMOUFG6Y.js +65 -0
  21. package/dist/chunk-JMOUFG6Y.js.map +1 -0
  22. package/dist/{chunk-HPZ7YAMA.js → chunk-KWTOCJLB.js} +3 -3
  23. package/dist/{chunk-F6C4IC6R.js → chunk-NI23QCHB.js} +3 -3
  24. package/dist/{chunk-IGBHLFV5.js → chunk-NZI7WBZI.js} +2 -2
  25. package/dist/{chunk-C3C5QVLK.js → chunk-O3TRN3RC.js} +2 -2
  26. package/dist/{chunk-UTLWSKDV.js → chunk-OW433Q4C.js} +2 -2
  27. package/dist/{chunk-5ZISXCDC.js → chunk-PFWIPRF6.js} +39 -5
  28. package/dist/chunk-PFWIPRF6.js.map +1 -0
  29. package/dist/{chunk-3NCVCGUZ.js → chunk-RAV5YMRU.js} +3 -3
  30. package/dist/{chunk-RKPTMHED.js → chunk-U3J2DDSR.js} +2 -2
  31. package/dist/{chunk-25WHTV4N.js → chunk-U7GJTVSX.js} +2 -2
  32. package/dist/{chunk-NUSTG3BH.js → chunk-VOCGURV7.js} +3 -3
  33. package/dist/{chunk-VVGZL2HX.js → chunk-WYOE4IAX.js} +153 -15
  34. package/dist/{chunk-VVGZL2HX.js.map → chunk-WYOE4IAX.js.map} +1 -1
  35. package/dist/{cli-WJVYP2QT.js → cli-IIMBALPV.js} +40 -40
  36. package/dist/{client-LZ3ZR4HC.js → client-VZCUISHZ.js} +4 -4
  37. package/dist/{config-ZQIMG3FB.js → config-DA4IUVFL.js} +3 -3
  38. package/dist/{detect-NJ2OREDP.js → detect-GEM3NVK6.js} +2 -2
  39. package/dist/{detect-providers-C64L3QET.js → detect-providers-PSVKXTWE.js} +4 -4
  40. package/dist/{doctor-XEPBNHM3.js → doctor-QYD34X7Q.js} +12 -12
  41. package/dist/{executor-NXKJU5KW.js → executor-NSPRTH4M.js} +17 -17
  42. package/dist/{init-BHVQAQ27.js → init-WYYL44KZ.js} +13 -13
  43. package/dist/{installer-45ZLP2RP.js → installer-BWJED3ED.js} +2 -2
  44. package/dist/{llm-KTD6SR55.js → llm-KEDHK3TQ.js} +4 -4
  45. package/dist/{loader-SHRKUKOS.js → loader-Q3P3R4UP.js} +3 -3
  46. package/dist/{loader-NEX3UF6U.js → loader-SKKUMT5C.js} +3 -3
  47. package/dist/{main-YFVBIRRK.js → main-6PY3ITQ5.js} +388 -125
  48. package/dist/main-6PY3ITQ5.js.map +1 -0
  49. package/dist/{open-2U7ZRGA3.js → open-HRFMJDQX.js} +7 -7
  50. package/dist/{post-compact-QIBMEWL3.js → post-compact-HT24YMAN.js} +7 -7
  51. package/dist/{post-tool-use-ICGFXDVY.js → post-tool-use-DENRI5WB.js} +6 -6
  52. package/dist/{post-tool-use-failure-C7TLH3XQ.js → post-tool-use-failure-A6SNJX42.js} +7 -7
  53. package/dist/{pre-compact-IF7K4TQK.js → pre-compact-3Q4BALCL.js} +7 -7
  54. package/dist/{provider-check-LTLQ6BUZ.js → provider-check-AE3L5Z6R.js} +4 -4
  55. package/dist/{registry-TFQ22Z7N.js → registry-O2NZLO3V.js} +4 -4
  56. package/dist/{remove-FBGM2QVJ.js → remove-YB5A6HY2.js} +9 -9
  57. package/dist/{resolution-events-HGKIJOTA.js → resolution-events-XWYLLDRK.js} +4 -4
  58. package/dist/{restart-TQEECRNW.js → restart-RGDVHELZ.js} +8 -8
  59. package/dist/{search-NN5FC4Z6.js → search-WOHT3G55.js} +8 -8
  60. package/dist/{server-XMWJ4GF7.js → server-6SUNYDV7.js} +4 -4
  61. package/dist/{session-GLPAFYPO.js → session-W3SKRFRV.js} +9 -9
  62. package/dist/{session-end-TI3ILRBC.js → session-end-OUTY7AFF.js} +6 -6
  63. package/dist/{session-start-PJLJDVJJ.js → session-start-5MB3LFOA.js} +24 -13
  64. package/dist/{session-start-PJLJDVJJ.js.map → session-start-5MB3LFOA.js.map} +1 -1
  65. package/dist/{setup-llm-AQSWLXCZ.js → setup-llm-ZMYGIQX5.js} +8 -8
  66. package/dist/src/cli.js +1 -1
  67. package/dist/src/daemon/main.js +1 -1
  68. package/dist/src/hooks/post-tool-use.js +1 -1
  69. package/dist/src/hooks/session-end.js +1 -1
  70. package/dist/src/hooks/session-start.js +1 -1
  71. package/dist/src/hooks/stop.js +1 -1
  72. package/dist/src/hooks/user-prompt-submit.js +1 -1
  73. package/dist/src/mcp/server.js +1 -1
  74. package/dist/src/symbionts/manifests/codex.yaml +47 -0
  75. package/dist/src/symbionts/templates/claude-code/hooks.json +12 -12
  76. package/dist/src/symbionts/templates/claude-code/settings.json +3 -3
  77. package/dist/src/symbionts/templates/codex/hooks.json +4 -4
  78. package/dist/src/symbionts/templates/cursor/hooks.json +9 -9
  79. package/dist/src/symbionts/templates/cursor/settings.json +2 -2
  80. package/dist/src/symbionts/templates/gemini/hooks.json +6 -6
  81. package/dist/src/symbionts/templates/gemini/settings.json +2 -2
  82. package/dist/src/symbionts/templates/myco-run.cjs +44 -0
  83. package/dist/src/symbionts/templates/opencode/settings.json +2 -2
  84. package/dist/src/symbionts/templates/vscode-copilot/hooks.json +7 -7
  85. package/dist/src/symbionts/templates/vscode-copilot/settings.json +2 -2
  86. package/dist/src/symbionts/templates/windsurf/hooks.json +4 -4
  87. package/dist/src/symbionts/templates/windsurf/settings.json +2 -2
  88. package/dist/src/worker/package-lock.json +4338 -0
  89. package/dist/src/worker/package.json +5 -0
  90. package/dist/src/worker/src/index.ts +50 -63
  91. package/dist/src/worker/src/mcp/auth.ts +65 -0
  92. package/dist/src/worker/src/mcp/server.ts +53 -0
  93. package/dist/src/worker/src/mcp/tools/context.ts +13 -0
  94. package/dist/src/worker/src/mcp/tools/get.ts +15 -0
  95. package/dist/src/worker/src/mcp/tools/graph.ts +35 -0
  96. package/dist/src/worker/src/mcp/tools/search.ts +32 -0
  97. package/dist/src/worker/src/mcp/tools/sessions.ts +24 -0
  98. package/dist/src/worker/src/mcp/tools/skills.ts +16 -0
  99. package/dist/src/worker/src/mcp/tools/team.ts +9 -0
  100. package/dist/src/worker/src/schema.ts +3 -1
  101. package/dist/src/worker/src/search-helpers.ts +70 -0
  102. package/dist/src/worker/wrangler.toml +9 -0
  103. package/dist/{stats-BISBIBXZ.js → stats-DGI6B3HX.js} +9 -9
  104. package/dist/{stop-47BJ42EO.js → stop-YGHODSP7.js} +6 -6
  105. package/dist/{stop-failure-VU5BTLWX.js → stop-failure-7IJTPJ6W.js} +7 -7
  106. package/dist/{subagent-start-SPTKQRHU.js → subagent-start-ZBQ5PJB5.js} +7 -7
  107. package/dist/{subagent-stop-UU75BYLC.js → subagent-stop-N2TDQU2D.js} +7 -7
  108. package/dist/{task-completed-MVDO7TZF.js → task-completed-BDLMRSBB.js} +7 -7
  109. package/dist/{team-7X64J4Y6.js → team-2ZFGTSIN.js} +97 -14
  110. package/dist/team-2ZFGTSIN.js.map +1 -0
  111. package/dist/ui/assets/{index-rpmSpJpm.js → index-DtT9_nlT.js} +120 -120
  112. package/dist/ui/index.html +1 -1
  113. package/dist/{update-DA7VEXOS.js → update-STLAN7LR.js} +18 -9
  114. package/dist/update-STLAN7LR.js.map +1 -0
  115. package/dist/{user-prompt-submit-ADZ4NTVO.js → user-prompt-submit-4IBFUYQ3.js} +27 -7
  116. package/dist/user-prompt-submit-4IBFUYQ3.js.map +1 -0
  117. package/dist/{verify-QYSERHF7.js → verify-EJYPO7QA.js} +5 -5
  118. package/dist/{version-A72TAL2J.js → version-YPBIKH77.js} +2 -2
  119. package/package.json +1 -1
  120. package/dist/chunk-5ZISXCDC.js.map +0 -1
  121. package/dist/chunk-7DAH5GLC.js.map +0 -1
  122. package/dist/chunk-CTF7TQMJ.js.map +0 -1
  123. package/dist/chunk-EBIYONNZ.js.map +0 -1
  124. package/dist/chunk-RMJPQZGF.js.map +0 -1
  125. package/dist/main-YFVBIRRK.js.map +0 -1
  126. package/dist/src/symbionts/templates/hook-guard.cjs +0 -19
  127. package/dist/team-7X64J4Y6.js.map +0 -1
  128. package/dist/update-DA7VEXOS.js.map +0 -1
  129. package/dist/user-prompt-submit-ADZ4NTVO.js.map +0 -1
  130. /package/dist/{agent-run-7AYHXIEF.js.map → agent-run-2NFYMQXW.js.map} +0 -0
  131. /package/dist/{agent-tasks-UUIFKBD4.js.map → agent-tasks-MEIYLXGN.js.map} +0 -0
  132. /package/dist/{chunk-XD3NEN3Q.js.map → chunk-2V7HR7HB.js.map} +0 -0
  133. /package/dist/{chunk-DT42247G.js.map → chunk-75AZFBFW.js.map} +0 -0
  134. /package/dist/{chunk-ZSJPI5MS.js.map → chunk-7OYXB2NM.js.map} +0 -0
  135. /package/dist/{chunk-XZWFMMJR.js.map → chunk-BUIR3JWM.js.map} +0 -0
  136. /package/dist/{chunk-ML6GTPZU.js.map → chunk-CML4MCYF.js.map} +0 -0
  137. /package/dist/{chunk-BZDZORVP.js.map → chunk-DLFDBKEV.js.map} +0 -0
  138. /package/dist/{chunk-SI5BBQAT.js.map → chunk-EO2RQW4S.js.map} +0 -0
  139. /package/dist/{chunk-HPZ7YAMA.js.map → chunk-KWTOCJLB.js.map} +0 -0
  140. /package/dist/{chunk-F6C4IC6R.js.map → chunk-NI23QCHB.js.map} +0 -0
  141. /package/dist/{chunk-IGBHLFV5.js.map → chunk-NZI7WBZI.js.map} +0 -0
  142. /package/dist/{chunk-C3C5QVLK.js.map → chunk-O3TRN3RC.js.map} +0 -0
  143. /package/dist/{chunk-UTLWSKDV.js.map → chunk-OW433Q4C.js.map} +0 -0
  144. /package/dist/{chunk-3NCVCGUZ.js.map → chunk-RAV5YMRU.js.map} +0 -0
  145. /package/dist/{chunk-RKPTMHED.js.map → chunk-U3J2DDSR.js.map} +0 -0
  146. /package/dist/{chunk-25WHTV4N.js.map → chunk-U7GJTVSX.js.map} +0 -0
  147. /package/dist/{chunk-NUSTG3BH.js.map → chunk-VOCGURV7.js.map} +0 -0
  148. /package/dist/{cli-WJVYP2QT.js.map → cli-IIMBALPV.js.map} +0 -0
  149. /package/dist/{client-LZ3ZR4HC.js.map → client-VZCUISHZ.js.map} +0 -0
  150. /package/dist/{config-ZQIMG3FB.js.map → config-DA4IUVFL.js.map} +0 -0
  151. /package/dist/{detect-NJ2OREDP.js.map → detect-GEM3NVK6.js.map} +0 -0
  152. /package/dist/{detect-providers-C64L3QET.js.map → detect-providers-PSVKXTWE.js.map} +0 -0
  153. /package/dist/{doctor-XEPBNHM3.js.map → doctor-QYD34X7Q.js.map} +0 -0
  154. /package/dist/{executor-NXKJU5KW.js.map → executor-NSPRTH4M.js.map} +0 -0
  155. /package/dist/{init-BHVQAQ27.js.map → init-WYYL44KZ.js.map} +0 -0
  156. /package/dist/{installer-45ZLP2RP.js.map → installer-BWJED3ED.js.map} +0 -0
  157. /package/dist/{llm-KTD6SR55.js.map → llm-KEDHK3TQ.js.map} +0 -0
  158. /package/dist/{loader-NEX3UF6U.js.map → loader-Q3P3R4UP.js.map} +0 -0
  159. /package/dist/{loader-SHRKUKOS.js.map → loader-SKKUMT5C.js.map} +0 -0
  160. /package/dist/{open-2U7ZRGA3.js.map → open-HRFMJDQX.js.map} +0 -0
  161. /package/dist/{post-compact-QIBMEWL3.js.map → post-compact-HT24YMAN.js.map} +0 -0
  162. /package/dist/{post-tool-use-ICGFXDVY.js.map → post-tool-use-DENRI5WB.js.map} +0 -0
  163. /package/dist/{post-tool-use-failure-C7TLH3XQ.js.map → post-tool-use-failure-A6SNJX42.js.map} +0 -0
  164. /package/dist/{pre-compact-IF7K4TQK.js.map → pre-compact-3Q4BALCL.js.map} +0 -0
  165. /package/dist/{provider-check-LTLQ6BUZ.js.map → provider-check-AE3L5Z6R.js.map} +0 -0
  166. /package/dist/{registry-TFQ22Z7N.js.map → registry-O2NZLO3V.js.map} +0 -0
  167. /package/dist/{remove-FBGM2QVJ.js.map → remove-YB5A6HY2.js.map} +0 -0
  168. /package/dist/{resolution-events-HGKIJOTA.js.map → resolution-events-XWYLLDRK.js.map} +0 -0
  169. /package/dist/{restart-TQEECRNW.js.map → restart-RGDVHELZ.js.map} +0 -0
  170. /package/dist/{search-NN5FC4Z6.js.map → search-WOHT3G55.js.map} +0 -0
  171. /package/dist/{server-XMWJ4GF7.js.map → server-6SUNYDV7.js.map} +0 -0
  172. /package/dist/{session-GLPAFYPO.js.map → session-W3SKRFRV.js.map} +0 -0
  173. /package/dist/{session-end-TI3ILRBC.js.map → session-end-OUTY7AFF.js.map} +0 -0
  174. /package/dist/{setup-llm-AQSWLXCZ.js.map → setup-llm-ZMYGIQX5.js.map} +0 -0
  175. /package/dist/{stats-BISBIBXZ.js.map → stats-DGI6B3HX.js.map} +0 -0
  176. /package/dist/{stop-47BJ42EO.js.map → stop-YGHODSP7.js.map} +0 -0
  177. /package/dist/{stop-failure-VU5BTLWX.js.map → stop-failure-7IJTPJ6W.js.map} +0 -0
  178. /package/dist/{subagent-start-SPTKQRHU.js.map → subagent-start-ZBQ5PJB5.js.map} +0 -0
  179. /package/dist/{subagent-stop-UU75BYLC.js.map → subagent-stop-N2TDQU2D.js.map} +0 -0
  180. /package/dist/{task-completed-MVDO7TZF.js.map → task-completed-BDLMRSBB.js.map} +0 -0
  181. /package/dist/{verify-QYSERHF7.js.map → verify-EJYPO7QA.js.map} +0 -0
  182. /package/dist/{version-A72TAL2J.js.map → version-YPBIKH77.js.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
2
2
 
3
3
  // src/entries/user-prompt-submit.ts
4
- var { main } = await import("../../user-prompt-submit-ADZ4NTVO.js");
4
+ var { main } = await import("../../user-prompt-submit-4IBFUYQ3.js");
5
5
  await main();
6
6
  //# sourceMappingURL=user-prompt-submit.js.map
@@ -1,6 +1,6 @@
1
1
  import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
2
2
 
3
3
  // src/entries/mcp-server.ts
4
- var { main } = await import("../../server-XMWJ4GF7.js");
4
+ var { main } = await import("../../server-6SUNYDV7.js");
5
5
  await main();
6
6
  //# sourceMappingURL=server.js.map
@@ -11,6 +11,53 @@ hookFields:
11
11
  lastResponse: last_assistant_message
12
12
  capture:
13
13
  planDirs: []
14
+ rules:
15
+ # Ephemeral sub-invocation filter (structural, two-layer defense).
16
+ #
17
+ # Codex spawns internal LLM sub-invocations for things like UI
18
+ # title generation. Those sub-invocations fire SessionStart and
19
+ # UserPromptSubmit with their own session_id but never write a
20
+ # rollout transcript file, so both events arrive with
21
+ # `transcript_path: null`. Real user-facing sessions always have a
22
+ # rollout file in ~/.codex/sessions/... and therefore a populated
23
+ # transcript_path.
24
+ #
25
+ # Dropping on `transcript_path_missing` is a deliberately
26
+ # pattern-based signal — robust across Codex and extension updates
27
+ # because it keys on the Codex protocol contract (transcript_path
28
+ # is populated iff a real transcript exists), not on any specific
29
+ # prompt text that could drift.
30
+ #
31
+ # Scope is `any_agent` for both rules because detection itself
32
+ # falls back to transcript_path → configDir matching; when that's
33
+ # missing the hook can't attribute the event, so the owning
34
+ # manifest has to opt into enforcing the rule regardless.
35
+
36
+ # Layer 1 — stop the phantom from ever being registered.
37
+ - event: session_start
38
+ scope: any_agent
39
+ when:
40
+ transcript_path_missing: true
41
+ action: drop
42
+ reason: ephemeral-sub-invocation
43
+
44
+ # Layer 2 — safety net. Deletes any phantom session row that did
45
+ # slip past SessionStart (e.g. because Codex's rollout file hadn't
46
+ # been flushed by the time SessionStart was queried).
47
+ - event: user_prompt
48
+ scope: any_agent
49
+ when:
50
+ transcript_path_missing: true
51
+ action: drop
52
+ reason: ephemeral-sub-invocation
53
+
54
+ # NOTE: the VS Code Codex extension wraps user prompts with an IDE
55
+ # context preamble (`# Context from my IDE setup:` … `## My request
56
+ # for Codex:`). Stripping that belongs in a follow-up that keys on
57
+ # the transcript's `session_meta.payload.originator == "codex_vscode"`
58
+ # signal rather than matching preamble text, per Chris's correctness
59
+ # bar against fragile text matching. Leaving unfiltered for now —
60
+ # session data is preserved, just shown with the wrapper.
14
61
  registration:
15
62
  hooksTarget: .codex/hooks.json
16
63
  mcpTarget: .codex/config.toml
@@ -4,7 +4,7 @@
4
4
  "hooks": [
5
5
  {
6
6
  "type": "command",
7
- "command": "cd \"${CLAUDE_PROJECT_DIR:-.}\" && node .agents/myco-hook.cjs hook session-start",
7
+ "command": "cd \"${CLAUDE_PROJECT_DIR:-.}\" && node .agents/myco-run.cjs hook session-start --symbiont claude-code",
8
8
  "timeout": 10
9
9
  }
10
10
  ]
@@ -15,7 +15,7 @@
15
15
  "hooks": [
16
16
  {
17
17
  "type": "command",
18
- "command": "cd \"${CLAUDE_PROJECT_DIR:-.}\" && node .agents/myco-hook.cjs hook user-prompt-submit",
18
+ "command": "cd \"${CLAUDE_PROJECT_DIR:-.}\" && node .agents/myco-run.cjs hook user-prompt-submit --symbiont claude-code",
19
19
  "timeout": 5
20
20
  }
21
21
  ]
@@ -26,7 +26,7 @@
26
26
  "hooks": [
27
27
  {
28
28
  "type": "command",
29
- "command": "cd \"${CLAUDE_PROJECT_DIR:-.}\" && node .agents/myco-hook.cjs hook post-tool-use",
29
+ "command": "cd \"${CLAUDE_PROJECT_DIR:-.}\" && node .agents/myco-run.cjs hook post-tool-use --symbiont claude-code",
30
30
  "timeout": 5
31
31
  }
32
32
  ]
@@ -37,7 +37,7 @@
37
37
  "hooks": [
38
38
  {
39
39
  "type": "command",
40
- "command": "cd \"${CLAUDE_PROJECT_DIR:-.}\" && node .agents/myco-hook.cjs hook post-tool-use-failure",
40
+ "command": "cd \"${CLAUDE_PROJECT_DIR:-.}\" && node .agents/myco-run.cjs hook post-tool-use-failure --symbiont claude-code",
41
41
  "timeout": 5
42
42
  }
43
43
  ]
@@ -48,7 +48,7 @@
48
48
  "hooks": [
49
49
  {
50
50
  "type": "command",
51
- "command": "cd \"${CLAUDE_PROJECT_DIR:-.}\" && node .agents/myco-hook.cjs hook stop",
51
+ "command": "cd \"${CLAUDE_PROJECT_DIR:-.}\" && node .agents/myco-run.cjs hook stop --symbiont claude-code",
52
52
  "timeout": 30
53
53
  }
54
54
  ]
@@ -59,7 +59,7 @@
59
59
  "hooks": [
60
60
  {
61
61
  "type": "command",
62
- "command": "cd \"${CLAUDE_PROJECT_DIR:-.}\" && node .agents/myco-hook.cjs hook session-end",
62
+ "command": "cd \"${CLAUDE_PROJECT_DIR:-.}\" && node .agents/myco-run.cjs hook session-end --symbiont claude-code",
63
63
  "timeout": 10
64
64
  }
65
65
  ]
@@ -70,7 +70,7 @@
70
70
  "hooks": [
71
71
  {
72
72
  "type": "command",
73
- "command": "cd \"${CLAUDE_PROJECT_DIR:-.}\" && node .agents/myco-hook.cjs hook subagent-start",
73
+ "command": "cd \"${CLAUDE_PROJECT_DIR:-.}\" && node .agents/myco-run.cjs hook subagent-start --symbiont claude-code",
74
74
  "timeout": 5
75
75
  }
76
76
  ]
@@ -81,7 +81,7 @@
81
81
  "hooks": [
82
82
  {
83
83
  "type": "command",
84
- "command": "cd \"${CLAUDE_PROJECT_DIR:-.}\" && node .agents/myco-hook.cjs hook subagent-stop",
84
+ "command": "cd \"${CLAUDE_PROJECT_DIR:-.}\" && node .agents/myco-run.cjs hook subagent-stop --symbiont claude-code",
85
85
  "timeout": 10
86
86
  }
87
87
  ]
@@ -92,7 +92,7 @@
92
92
  "hooks": [
93
93
  {
94
94
  "type": "command",
95
- "command": "cd \"${CLAUDE_PROJECT_DIR:-.}\" && node .agents/myco-hook.cjs hook stop-failure",
95
+ "command": "cd \"${CLAUDE_PROJECT_DIR:-.}\" && node .agents/myco-run.cjs hook stop-failure --symbiont claude-code",
96
96
  "timeout": 10
97
97
  }
98
98
  ]
@@ -103,7 +103,7 @@
103
103
  "hooks": [
104
104
  {
105
105
  "type": "command",
106
- "command": "cd \"${CLAUDE_PROJECT_DIR:-.}\" && node .agents/myco-hook.cjs hook task-completed",
106
+ "command": "cd \"${CLAUDE_PROJECT_DIR:-.}\" && node .agents/myco-run.cjs hook task-completed --symbiont claude-code",
107
107
  "timeout": 5
108
108
  }
109
109
  ]
@@ -114,7 +114,7 @@
114
114
  "hooks": [
115
115
  {
116
116
  "type": "command",
117
- "command": "cd \"${CLAUDE_PROJECT_DIR:-.}\" && node .agents/myco-hook.cjs hook pre-compact",
117
+ "command": "cd \"${CLAUDE_PROJECT_DIR:-.}\" && node .agents/myco-run.cjs hook pre-compact --symbiont claude-code",
118
118
  "timeout": 5
119
119
  }
120
120
  ]
@@ -125,7 +125,7 @@
125
125
  "hooks": [
126
126
  {
127
127
  "type": "command",
128
- "command": "cd \"${CLAUDE_PROJECT_DIR:-.}\" && node .agents/myco-hook.cjs hook post-compact",
128
+ "command": "cd \"${CLAUDE_PROJECT_DIR:-.}\" && node .agents/myco-run.cjs hook post-compact --symbiont claude-code",
129
129
  "timeout": 5
130
130
  }
131
131
  ]
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "permissions": {
3
3
  "allow": [
4
- "Bash(myco-run *)",
5
- "Bash(myco-run:*)",
6
4
  "Bash(myco *)",
7
- "Bash(myco:*)"
5
+ "Bash(myco:*)",
6
+ "Bash(myco-dev *)",
7
+ "Bash(myco-dev:*)"
8
8
  ]
9
9
  }
10
10
  }
@@ -4,7 +4,7 @@
4
4
  "hooks": [
5
5
  {
6
6
  "type": "command",
7
- "command": "cd \"$(git rev-parse --show-toplevel 2>/dev/null || echo .)\" && node .agents/myco-hook.cjs hook session-start",
7
+ "command": "cd \"$(git rev-parse --show-toplevel 2>/dev/null || echo .)\" && node .agents/myco-run.cjs hook session-start --symbiont codex",
8
8
  "timeout": 10
9
9
  }
10
10
  ]
@@ -15,7 +15,7 @@
15
15
  "hooks": [
16
16
  {
17
17
  "type": "command",
18
- "command": "cd \"$(git rev-parse --show-toplevel 2>/dev/null || echo .)\" && node .agents/myco-hook.cjs hook user-prompt-submit",
18
+ "command": "cd \"$(git rev-parse --show-toplevel 2>/dev/null || echo .)\" && node .agents/myco-run.cjs hook user-prompt-submit --symbiont codex",
19
19
  "timeout": 5
20
20
  }
21
21
  ]
@@ -26,7 +26,7 @@
26
26
  "hooks": [
27
27
  {
28
28
  "type": "command",
29
- "command": "cd \"$(git rev-parse --show-toplevel 2>/dev/null || echo .)\" && node .agents/myco-hook.cjs hook post-tool-use",
29
+ "command": "cd \"$(git rev-parse --show-toplevel 2>/dev/null || echo .)\" && node .agents/myco-run.cjs hook post-tool-use --symbiont codex",
30
30
  "timeout": 5
31
31
  }
32
32
  ]
@@ -37,7 +37,7 @@
37
37
  "hooks": [
38
38
  {
39
39
  "type": "command",
40
- "command": "cd \"$(git rev-parse --show-toplevel 2>/dev/null || echo .)\" && node .agents/myco-hook.cjs hook stop",
40
+ "command": "cd \"$(git rev-parse --show-toplevel 2>/dev/null || echo .)\" && node .agents/myco-run.cjs hook stop --symbiont codex",
41
41
  "timeout": 30
42
42
  }
43
43
  ]
@@ -1,63 +1,63 @@
1
1
  {
2
2
  "sessionStart": [
3
3
  {
4
- "command": "cd \"${CURSOR_PROJECT_DIR:-.}\" && node .agents/myco-hook.cjs hook session-start",
4
+ "command": "cd \"${CURSOR_PROJECT_DIR:-.}\" && node .agents/myco-run.cjs hook session-start --symbiont cursor",
5
5
  "type": "command",
6
6
  "timeout": 10
7
7
  }
8
8
  ],
9
9
  "beforeSubmitPrompt": [
10
10
  {
11
- "command": "cd \"${CURSOR_PROJECT_DIR:-.}\" && node .agents/myco-hook.cjs hook user-prompt-submit",
11
+ "command": "cd \"${CURSOR_PROJECT_DIR:-.}\" && node .agents/myco-run.cjs hook user-prompt-submit --symbiont cursor",
12
12
  "type": "command",
13
13
  "timeout": 5
14
14
  }
15
15
  ],
16
16
  "postToolUse": [
17
17
  {
18
- "command": "cd \"${CURSOR_PROJECT_DIR:-.}\" && node .agents/myco-hook.cjs hook post-tool-use",
18
+ "command": "cd \"${CURSOR_PROJECT_DIR:-.}\" && node .agents/myco-run.cjs hook post-tool-use --symbiont cursor",
19
19
  "type": "command",
20
20
  "timeout": 5
21
21
  }
22
22
  ],
23
23
  "postToolUseFailure": [
24
24
  {
25
- "command": "cd \"${CURSOR_PROJECT_DIR:-.}\" && node .agents/myco-hook.cjs hook post-tool-use-failure",
25
+ "command": "cd \"${CURSOR_PROJECT_DIR:-.}\" && node .agents/myco-run.cjs hook post-tool-use-failure --symbiont cursor",
26
26
  "type": "command",
27
27
  "timeout": 5
28
28
  }
29
29
  ],
30
30
  "stop": [
31
31
  {
32
- "command": "cd \"${CURSOR_PROJECT_DIR:-.}\" && node .agents/myco-hook.cjs hook stop",
32
+ "command": "cd \"${CURSOR_PROJECT_DIR:-.}\" && node .agents/myco-run.cjs hook stop --symbiont cursor",
33
33
  "type": "command",
34
34
  "timeout": 30
35
35
  }
36
36
  ],
37
37
  "sessionEnd": [
38
38
  {
39
- "command": "cd \"${CURSOR_PROJECT_DIR:-.}\" && node .agents/myco-hook.cjs hook session-end",
39
+ "command": "cd \"${CURSOR_PROJECT_DIR:-.}\" && node .agents/myco-run.cjs hook session-end --symbiont cursor",
40
40
  "type": "command",
41
41
  "timeout": 10
42
42
  }
43
43
  ],
44
44
  "subagentStart": [
45
45
  {
46
- "command": "cd \"${CURSOR_PROJECT_DIR:-.}\" && node .agents/myco-hook.cjs hook subagent-start",
46
+ "command": "cd \"${CURSOR_PROJECT_DIR:-.}\" && node .agents/myco-run.cjs hook subagent-start --symbiont cursor",
47
47
  "type": "command",
48
48
  "timeout": 5
49
49
  }
50
50
  ],
51
51
  "subagentStop": [
52
52
  {
53
- "command": "cd \"${CURSOR_PROJECT_DIR:-.}\" && node .agents/myco-hook.cjs hook subagent-stop",
53
+ "command": "cd \"${CURSOR_PROJECT_DIR:-.}\" && node .agents/myco-run.cjs hook subagent-stop --symbiont cursor",
54
54
  "type": "command",
55
55
  "timeout": 10
56
56
  }
57
57
  ],
58
58
  "preCompact": [
59
59
  {
60
- "command": "cd \"${CURSOR_PROJECT_DIR:-.}\" && node .agents/myco-hook.cjs hook pre-compact",
60
+ "command": "cd \"${CURSOR_PROJECT_DIR:-.}\" && node .agents/myco-run.cjs hook pre-compact --symbiont cursor",
61
61
  "type": "command",
62
62
  "timeout": 5
63
63
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "chat.tools.terminal.autoApprove": {
3
- "myco-run": true,
4
- "myco": true
3
+ "myco": true,
4
+ "myco-dev": true
5
5
  }
6
6
  }
@@ -5,7 +5,7 @@
5
5
  {
6
6
  "name": "myco-session-start",
7
7
  "type": "command",
8
- "command": "cd \"${GEMINI_PROJECT_DIR:-.}\" && node .agents/myco-hook.cjs hook session-start",
8
+ "command": "cd \"${GEMINI_PROJECT_DIR:-.}\" && node .agents/myco-run.cjs hook session-start --symbiont gemini",
9
9
  "timeout": 10000
10
10
  }
11
11
  ]
@@ -17,7 +17,7 @@
17
17
  {
18
18
  "name": "myco-user-prompt-submit",
19
19
  "type": "command",
20
- "command": "cd \"${GEMINI_PROJECT_DIR:-.}\" && node .agents/myco-hook.cjs hook user-prompt-submit",
20
+ "command": "cd \"${GEMINI_PROJECT_DIR:-.}\" && node .agents/myco-run.cjs hook user-prompt-submit --symbiont gemini",
21
21
  "timeout": 5000
22
22
  }
23
23
  ]
@@ -29,7 +29,7 @@
29
29
  {
30
30
  "name": "myco-post-tool-use",
31
31
  "type": "command",
32
- "command": "cd \"${GEMINI_PROJECT_DIR:-.}\" && node .agents/myco-hook.cjs hook post-tool-use",
32
+ "command": "cd \"${GEMINI_PROJECT_DIR:-.}\" && node .agents/myco-run.cjs hook post-tool-use --symbiont gemini",
33
33
  "timeout": 5000
34
34
  }
35
35
  ]
@@ -41,7 +41,7 @@
41
41
  {
42
42
  "name": "myco-stop",
43
43
  "type": "command",
44
- "command": "cd \"${GEMINI_PROJECT_DIR:-.}\" && node .agents/myco-hook.cjs hook stop",
44
+ "command": "cd \"${GEMINI_PROJECT_DIR:-.}\" && node .agents/myco-run.cjs hook stop --symbiont gemini",
45
45
  "timeout": 30000
46
46
  }
47
47
  ]
@@ -53,7 +53,7 @@
53
53
  {
54
54
  "name": "myco-session-end",
55
55
  "type": "command",
56
- "command": "cd \"${GEMINI_PROJECT_DIR:-.}\" && node .agents/myco-hook.cjs hook session-end",
56
+ "command": "cd \"${GEMINI_PROJECT_DIR:-.}\" && node .agents/myco-run.cjs hook session-end --symbiont gemini",
57
57
  "timeout": 10000
58
58
  }
59
59
  ]
@@ -65,7 +65,7 @@
65
65
  {
66
66
  "name": "myco-pre-compact",
67
67
  "type": "command",
68
- "command": "cd \"${GEMINI_PROJECT_DIR:-.}\" && node .agents/myco-hook.cjs hook pre-compact",
68
+ "command": "cd \"${GEMINI_PROJECT_DIR:-.}\" && node .agents/myco-run.cjs hook pre-compact --symbiont gemini",
69
69
  "timeout": 5000
70
70
  }
71
71
  ]
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "coreTools": [
3
- "ShellTool(myco-run *)",
4
- "ShellTool(myco *)"
3
+ "ShellTool(myco *)",
4
+ "ShellTool(myco-dev *)"
5
5
  ]
6
6
  }
@@ -0,0 +1,44 @@
1
+ #!/usr/bin/env node
2
+ // Myco hook guard — silently no-ops when myco is not installed.
3
+ //
4
+ // This file is committed to the repo so open-source contributors without
5
+ // Myco don't see hook errors in their agent sessions. It stays deliberately
6
+ // thin: its only jobs are (1) provide a cross-platform entry point that
7
+ // works under every shell our symbionts fire hooks from, and (2) resolve
8
+ // which myco binary to exec via .myco/runtime.command.
9
+ //
10
+ // Managed by: myco init / myco update
11
+ // Safe to delete: myco remove
12
+ 'use strict';
13
+
14
+ // Skip hooks for Myco's own agent pipeline sessions — they are internal
15
+ // and should not be captured as user sessions.
16
+ if (process.env.MYCO_AGENT_SESSION) process.exit(0);
17
+
18
+ const fs = require('node:fs');
19
+ const path = require('node:path');
20
+ const { execFileSync } = require('node:child_process');
21
+
22
+ // Resolve the myco command name.
23
+ //
24
+ // Source of truth is `.myco/runtime.command` — a one-line plain-text file
25
+ // containing the command to invoke (e.g. `myco`, `myco-dev`, or a user's
26
+ // own alias). When absent or empty, the default is `myco`.
27
+ //
28
+ // We resolve the file path via __dirname so the guard doesn't depend on
29
+ // the agent's current working directory. Lifecycle hook wrappers `cd` to
30
+ // project root before invoking us, but not every agent keeps that contract
31
+ // reliably under every shell — __dirname removes the dependency entirely.
32
+ let bin = 'myco';
33
+ try {
34
+ const aliasPath = path.resolve(__dirname, '..', '.myco', 'runtime.command');
35
+ const alias = fs.readFileSync(aliasPath, 'utf-8').trim();
36
+ if (alias) bin = alias;
37
+ } catch { /* missing file → use default */ }
38
+
39
+ try {
40
+ execFileSync(bin, process.argv.slice(2), { stdio: 'inherit' });
41
+ } catch (e) {
42
+ if (e.code === 'ENOENT') process.exit(0);
43
+ process.exit(e.status ?? 1);
44
+ }
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "permission": {
3
3
  "bash": {
4
- "myco-run *": "allow",
5
- "myco *": "allow"
4
+ "myco *": "allow",
5
+ "myco-dev *": "allow"
6
6
  }
7
7
  }
8
8
  }
@@ -4,7 +4,7 @@
4
4
  "hooks": [
5
5
  {
6
6
  "type": "command",
7
- "command": "cd \"${CLAUDE_PROJECT_DIR:-.}\" && node .agents/myco-hook.cjs hook session-start",
7
+ "command": "cd \"${CLAUDE_PROJECT_DIR:-.}\" && node .agents/myco-run.cjs hook session-start --symbiont vscode-copilot",
8
8
  "timeout": 10
9
9
  }
10
10
  ]
@@ -15,7 +15,7 @@
15
15
  "hooks": [
16
16
  {
17
17
  "type": "command",
18
- "command": "cd \"${CLAUDE_PROJECT_DIR:-.}\" && node .agents/myco-hook.cjs hook user-prompt-submit",
18
+ "command": "cd \"${CLAUDE_PROJECT_DIR:-.}\" && node .agents/myco-run.cjs hook user-prompt-submit --symbiont vscode-copilot",
19
19
  "timeout": 5
20
20
  }
21
21
  ]
@@ -26,7 +26,7 @@
26
26
  "hooks": [
27
27
  {
28
28
  "type": "command",
29
- "command": "cd \"${CLAUDE_PROJECT_DIR:-.}\" && node .agents/myco-hook.cjs hook post-tool-use",
29
+ "command": "cd \"${CLAUDE_PROJECT_DIR:-.}\" && node .agents/myco-run.cjs hook post-tool-use --symbiont vscode-copilot",
30
30
  "timeout": 5
31
31
  }
32
32
  ]
@@ -37,7 +37,7 @@
37
37
  "hooks": [
38
38
  {
39
39
  "type": "command",
40
- "command": "cd \"${CLAUDE_PROJECT_DIR:-.}\" && node .agents/myco-hook.cjs hook pre-compact",
40
+ "command": "cd \"${CLAUDE_PROJECT_DIR:-.}\" && node .agents/myco-run.cjs hook pre-compact --symbiont vscode-copilot",
41
41
  "timeout": 5
42
42
  }
43
43
  ]
@@ -48,7 +48,7 @@
48
48
  "hooks": [
49
49
  {
50
50
  "type": "command",
51
- "command": "cd \"${CLAUDE_PROJECT_DIR:-.}\" && node .agents/myco-hook.cjs hook subagent-start",
51
+ "command": "cd \"${CLAUDE_PROJECT_DIR:-.}\" && node .agents/myco-run.cjs hook subagent-start --symbiont vscode-copilot",
52
52
  "timeout": 5
53
53
  }
54
54
  ]
@@ -59,7 +59,7 @@
59
59
  "hooks": [
60
60
  {
61
61
  "type": "command",
62
- "command": "cd \"${CLAUDE_PROJECT_DIR:-.}\" && node .agents/myco-hook.cjs hook subagent-stop",
62
+ "command": "cd \"${CLAUDE_PROJECT_DIR:-.}\" && node .agents/myco-run.cjs hook subagent-stop --symbiont vscode-copilot",
63
63
  "timeout": 10
64
64
  }
65
65
  ]
@@ -70,7 +70,7 @@
70
70
  "hooks": [
71
71
  {
72
72
  "type": "command",
73
- "command": "cd \"${CLAUDE_PROJECT_DIR:-.}\" && node .agents/myco-hook.cjs hook stop",
73
+ "command": "cd \"${CLAUDE_PROJECT_DIR:-.}\" && node .agents/myco-run.cjs hook stop --symbiont vscode-copilot",
74
74
  "timeout": 30
75
75
  }
76
76
  ]
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "chat.tools.terminal.autoApprove": {
3
- "myco-run": true,
4
- "myco": true
3
+ "myco": true,
4
+ "myco-dev": true
5
5
  }
6
6
  }
@@ -1,22 +1,22 @@
1
1
  {
2
2
  "pre_user_prompt": [
3
3
  {
4
- "command": "cd \"$(git rev-parse --show-toplevel 2>/dev/null || echo .)\" && node .agents/myco-hook.cjs hook user-prompt-submit"
4
+ "command": "cd \"$(git rev-parse --show-toplevel 2>/dev/null || echo .)\" && node .agents/myco-run.cjs hook user-prompt-submit --symbiont windsurf"
5
5
  }
6
6
  ],
7
7
  "post_run_command": [
8
8
  {
9
- "command": "cd \"$(git rev-parse --show-toplevel 2>/dev/null || echo .)\" && node .agents/myco-hook.cjs hook post-tool-use"
9
+ "command": "cd \"$(git rev-parse --show-toplevel 2>/dev/null || echo .)\" && node .agents/myco-run.cjs hook post-tool-use --symbiont windsurf"
10
10
  }
11
11
  ],
12
12
  "post_write_code": [
13
13
  {
14
- "command": "cd \"$(git rev-parse --show-toplevel 2>/dev/null || echo .)\" && node .agents/myco-hook.cjs hook post-tool-use"
14
+ "command": "cd \"$(git rev-parse --show-toplevel 2>/dev/null || echo .)\" && node .agents/myco-run.cjs hook post-tool-use --symbiont windsurf"
15
15
  }
16
16
  ],
17
17
  "post_cascade_response": [
18
18
  {
19
- "command": "cd \"$(git rev-parse --show-toplevel 2>/dev/null || echo .)\" && node .agents/myco-hook.cjs hook stop"
19
+ "command": "cd \"$(git rev-parse --show-toplevel 2>/dev/null || echo .)\" && node .agents/myco-run.cjs hook stop --symbiont windsurf"
20
20
  }
21
21
  ]
22
22
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "windsurf.cascadeCommandsAllowList": [
3
- "myco-run",
4
- "myco"
3
+ "myco",
4
+ "myco-dev"
5
5
  ]
6
6
  }