oh-my-musacode 0.0.1

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 (401) hide show
  1. package/LICENSE.md +82 -0
  2. package/README.ja.md +370 -0
  3. package/README.md +376 -0
  4. package/README.zh-cn.md +380 -0
  5. package/bin/oh-my-musacode-dev.js +80 -0
  6. package/bin/oh-my-musacode.js +80 -0
  7. package/bin/platform.js +38 -0
  8. package/bin/platform.test.ts +148 -0
  9. package/dist/agents/atlas.d.ts +19 -0
  10. package/dist/agents/dynamic-agent-prompt-builder.d.ts +30 -0
  11. package/dist/agents/explore.d.ts +4 -0
  12. package/dist/agents/index.d.ts +11 -0
  13. package/dist/agents/librarian.d.ts +4 -0
  14. package/dist/agents/metis.d.ts +18 -0
  15. package/dist/agents/momus.d.ts +18 -0
  16. package/dist/agents/momus.test.d.ts +1 -0
  17. package/dist/agents/multimodal-looker.d.ts +4 -0
  18. package/dist/agents/musa-orchestrator-junior.d.ts +7 -0
  19. package/dist/agents/musa-orchestrator-junior.test.d.ts +1 -0
  20. package/dist/agents/musa-orchestrator.d.ts +3 -0
  21. package/dist/agents/oracle.d.ts +4 -0
  22. package/dist/agents/prometheus-prompt.d.ts +29 -0
  23. package/dist/agents/prometheus-prompt.test.d.ts +1 -0
  24. package/dist/agents/sisyphus-junior.d.ts +7 -0
  25. package/dist/agents/sisyphus-junior.test.d.ts +1 -0
  26. package/dist/agents/sisyphus.d.ts +3 -0
  27. package/dist/agents/types.d.ts +50 -0
  28. package/dist/agents/utils.d.ts +14 -0
  29. package/dist/agents/utils.test.d.ts +1 -0
  30. package/dist/cli/config-manager.d.ts +99 -0
  31. package/dist/cli/config-manager.test.d.ts +1 -0
  32. package/dist/cli/doctor/checks/auth.d.ts +7 -0
  33. package/dist/cli/doctor/checks/auth.test.d.ts +1 -0
  34. package/dist/cli/doctor/checks/config.d.ts +8 -0
  35. package/dist/cli/doctor/checks/config.test.d.ts +1 -0
  36. package/dist/cli/doctor/checks/dependencies.d.ts +8 -0
  37. package/dist/cli/doctor/checks/dependencies.test.d.ts +1 -0
  38. package/dist/cli/doctor/checks/gh.d.ts +13 -0
  39. package/dist/cli/doctor/checks/gh.test.d.ts +1 -0
  40. package/dist/cli/doctor/checks/index.d.ts +11 -0
  41. package/dist/cli/doctor/checks/lsp.d.ts +8 -0
  42. package/dist/cli/doctor/checks/lsp.test.d.ts +1 -0
  43. package/dist/cli/doctor/checks/mcp.d.ts +6 -0
  44. package/dist/cli/doctor/checks/mcp.test.d.ts +1 -0
  45. package/dist/cli/doctor/checks/musacode.d.ts +14 -0
  46. package/dist/cli/doctor/checks/musacode.test.d.ts +1 -0
  47. package/dist/cli/doctor/checks/plugin.d.ts +4 -0
  48. package/dist/cli/doctor/checks/plugin.test.d.ts +1 -0
  49. package/dist/cli/doctor/checks/version.d.ts +4 -0
  50. package/dist/cli/doctor/checks/version.test.d.ts +1 -0
  51. package/dist/cli/doctor/constants.d.ts +40 -0
  52. package/dist/cli/doctor/formatter.d.ts +12 -0
  53. package/dist/cli/doctor/formatter.test.d.ts +1 -0
  54. package/dist/cli/doctor/index.d.ts +5 -0
  55. package/dist/cli/doctor/runner.d.ts +7 -0
  56. package/dist/cli/doctor/runner.test.d.ts +1 -0
  57. package/dist/cli/doctor/types.d.ts +91 -0
  58. package/dist/cli/get-local-version/formatter.d.ts +3 -0
  59. package/dist/cli/get-local-version/index.d.ts +3 -0
  60. package/dist/cli/get-local-version/types.d.ts +13 -0
  61. package/dist/cli/index.d.ts +2 -0
  62. package/dist/cli/index.js +25243 -0
  63. package/dist/cli/install.d.ts +2 -0
  64. package/dist/cli/run/completion.d.ts +2 -0
  65. package/dist/cli/run/completion.test.d.ts +1 -0
  66. package/dist/cli/run/events.d.ts +12 -0
  67. package/dist/cli/run/events.test.d.ts +1 -0
  68. package/dist/cli/run/index.d.ts +2 -0
  69. package/dist/cli/run/runner.d.ts +2 -0
  70. package/dist/cli/run/types.d.ts +71 -0
  71. package/dist/cli/types.d.ts +27 -0
  72. package/dist/config/index.d.ts +2 -0
  73. package/dist/config/schema.d.ts +1835 -0
  74. package/dist/config/schema.test.d.ts +1 -0
  75. package/dist/features/background-agent/concurrency.d.ts +27 -0
  76. package/dist/features/background-agent/concurrency.test.d.ts +1 -0
  77. package/dist/features/background-agent/index.d.ts +3 -0
  78. package/dist/features/background-agent/manager.d.ts +104 -0
  79. package/dist/features/background-agent/manager.test.d.ts +1 -0
  80. package/dist/features/background-agent/types.d.ts +73 -0
  81. package/dist/features/boulder-state/constants.d.ts +10 -0
  82. package/dist/features/boulder-state/index.d.ts +3 -0
  83. package/dist/features/boulder-state/storage.d.ts +28 -0
  84. package/dist/features/boulder-state/storage.test.d.ts +1 -0
  85. package/dist/features/boulder-state/types.d.ts +24 -0
  86. package/dist/features/builtin-commands/commands.d.ts +2 -0
  87. package/dist/features/builtin-commands/index.d.ts +2 -0
  88. package/dist/features/builtin-commands/templates/init-deep.d.ts +1 -0
  89. package/dist/features/builtin-commands/templates/ralph-loop.d.ts +2 -0
  90. package/dist/features/builtin-commands/templates/refactor.d.ts +1 -0
  91. package/dist/features/builtin-commands/templates/start-work.d.ts +1 -0
  92. package/dist/features/builtin-commands/types.d.ts +6 -0
  93. package/dist/features/builtin-skills/index.d.ts +2 -0
  94. package/dist/features/builtin-skills/skills.d.ts +2 -0
  95. package/dist/features/builtin-skills/types.d.ts +15 -0
  96. package/dist/features/claude-code-agent-loader/index.d.ts +2 -0
  97. package/dist/features/claude-code-agent-loader/loader.d.ts +3 -0
  98. package/dist/features/claude-code-agent-loader/types.d.ts +14 -0
  99. package/dist/features/claude-code-command-loader/index.d.ts +2 -0
  100. package/dist/features/claude-code-command-loader/loader.d.ts +6 -0
  101. package/dist/features/claude-code-command-loader/types.d.ts +42 -0
  102. package/dist/features/claude-code-mcp-loader/env-expander.d.ts +2 -0
  103. package/dist/features/claude-code-mcp-loader/index.d.ts +10 -0
  104. package/dist/features/claude-code-mcp-loader/loader.d.ts +4 -0
  105. package/dist/features/claude-code-mcp-loader/loader.test.d.ts +1 -0
  106. package/dist/features/claude-code-mcp-loader/transformer.d.ts +2 -0
  107. package/dist/features/claude-code-mcp-loader/types.d.ts +35 -0
  108. package/dist/features/claude-code-plugin-loader/index.d.ts +3 -0
  109. package/dist/features/claude-code-plugin-loader/loader.d.ts +20 -0
  110. package/dist/features/claude-code-plugin-loader/types.d.ts +186 -0
  111. package/dist/features/claude-code-session-state/index.d.ts +1 -0
  112. package/dist/features/claude-code-session-state/state.d.ts +9 -0
  113. package/dist/features/claude-code-session-state/state.test.d.ts +1 -0
  114. package/dist/features/context-injector/collector.d.ts +11 -0
  115. package/dist/features/context-injector/collector.test.d.ts +1 -0
  116. package/dist/features/context-injector/index.d.ts +3 -0
  117. package/dist/features/context-injector/injector.d.ts +39 -0
  118. package/dist/features/context-injector/injector.test.d.ts +1 -0
  119. package/dist/features/context-injector/types.d.ts +83 -0
  120. package/dist/features/hook-message-injector/constants.d.ts +3 -0
  121. package/dist/features/hook-message-injector/index.d.ts +4 -0
  122. package/dist/features/hook-message-injector/injector.d.ts +18 -0
  123. package/dist/features/hook-message-injector/types.d.ts +44 -0
  124. package/dist/features/musacode-skill-loader/async-loader.d.ts +6 -0
  125. package/dist/features/musacode-skill-loader/async-loader.test.d.ts +1 -0
  126. package/dist/features/musacode-skill-loader/blocking.d.ts +2 -0
  127. package/dist/features/musacode-skill-loader/blocking.test.d.ts +1 -0
  128. package/dist/features/musacode-skill-loader/discover-worker.d.ts +1 -0
  129. package/dist/features/musacode-skill-loader/index.d.ts +4 -0
  130. package/dist/features/musacode-skill-loader/loader.d.ts +16 -0
  131. package/dist/features/musacode-skill-loader/loader.test.d.ts +1 -0
  132. package/dist/features/musacode-skill-loader/merger.d.ts +7 -0
  133. package/dist/features/musacode-skill-loader/skill-content.d.ts +20 -0
  134. package/dist/features/musacode-skill-loader/skill-content.test.d.ts +1 -0
  135. package/dist/features/musacode-skill-loader/types.d.ts +34 -0
  136. package/dist/features/skill-mcp-manager/env-cleaner.d.ts +2 -0
  137. package/dist/features/skill-mcp-manager/env-cleaner.test.d.ts +1 -0
  138. package/dist/features/skill-mcp-manager/index.d.ts +2 -0
  139. package/dist/features/skill-mcp-manager/manager.d.ts +40 -0
  140. package/dist/features/skill-mcp-manager/manager.test.d.ts +1 -0
  141. package/dist/features/skill-mcp-manager/types.d.ts +11 -0
  142. package/dist/features/task-toast-manager/index.d.ts +2 -0
  143. package/dist/features/task-toast-manager/manager.d.ts +57 -0
  144. package/dist/features/task-toast-manager/manager.test.d.ts +1 -0
  145. package/dist/features/task-toast-manager/types.d.ts +21 -0
  146. package/dist/hooks/agent-usage-reminder/constants.d.ts +5 -0
  147. package/dist/hooks/agent-usage-reminder/index.d.ts +22 -0
  148. package/dist/hooks/agent-usage-reminder/storage.d.ts +4 -0
  149. package/dist/hooks/agent-usage-reminder/types.d.ts +6 -0
  150. package/dist/hooks/anthropic-context-window-limit-recovery/executor.d.ts +4 -0
  151. package/dist/hooks/anthropic-context-window-limit-recovery/executor.test.d.ts +1 -0
  152. package/dist/hooks/anthropic-context-window-limit-recovery/index.d.ts +16 -0
  153. package/dist/hooks/anthropic-context-window-limit-recovery/parser.d.ts +2 -0
  154. package/dist/hooks/anthropic-context-window-limit-recovery/pruning-deduplication.d.ts +7 -0
  155. package/dist/hooks/anthropic-context-window-limit-recovery/pruning-deduplication.test.d.ts +1 -0
  156. package/dist/hooks/anthropic-context-window-limit-recovery/pruning-types.d.ts +36 -0
  157. package/dist/hooks/anthropic-context-window-limit-recovery/storage.d.ts +28 -0
  158. package/dist/hooks/anthropic-context-window-limit-recovery/storage.test.d.ts +1 -0
  159. package/dist/hooks/anthropic-context-window-limit-recovery/types.d.ts +37 -0
  160. package/dist/hooks/atlas/index.d.ts +35 -0
  161. package/dist/hooks/atlas/index.test.d.ts +1 -0
  162. package/dist/hooks/auto-slash-command/constants.d.ts +5 -0
  163. package/dist/hooks/auto-slash-command/detector.d.ts +9 -0
  164. package/dist/hooks/auto-slash-command/detector.test.d.ts +1 -0
  165. package/dist/hooks/auto-slash-command/executor.d.ts +11 -0
  166. package/dist/hooks/auto-slash-command/index.d.ts +12 -0
  167. package/dist/hooks/auto-slash-command/index.test.d.ts +1 -0
  168. package/dist/hooks/auto-slash-command/types.d.ts +27 -0
  169. package/dist/hooks/auto-update-checker/cache.d.ts +3 -0
  170. package/dist/hooks/auto-update-checker/checker.d.ts +20 -0
  171. package/dist/hooks/auto-update-checker/checker.test.d.ts +1 -0
  172. package/dist/hooks/auto-update-checker/constants.d.ts +13 -0
  173. package/dist/hooks/auto-update-checker/index.d.ts +17 -0
  174. package/dist/hooks/auto-update-checker/index.test.d.ts +1 -0
  175. package/dist/hooks/auto-update-checker/types.d.ts +25 -0
  176. package/dist/hooks/background-compaction/index.d.ts +19 -0
  177. package/dist/hooks/background-notification/index.d.ts +18 -0
  178. package/dist/hooks/background-notification/types.d.ts +4 -0
  179. package/dist/hooks/claude-code-hooks/config-loader.d.ts +13 -0
  180. package/dist/hooks/claude-code-hooks/config.d.ts +3 -0
  181. package/dist/hooks/claude-code-hooks/index.d.ts +48 -0
  182. package/dist/hooks/claude-code-hooks/plugin-config.d.ts +8 -0
  183. package/dist/hooks/claude-code-hooks/post-tool-use.d.ts +40 -0
  184. package/dist/hooks/claude-code-hooks/pre-compact.d.ts +16 -0
  185. package/dist/hooks/claude-code-hooks/pre-tool-use.d.ts +25 -0
  186. package/dist/hooks/claude-code-hooks/stop.d.ts +20 -0
  187. package/dist/hooks/claude-code-hooks/todo.d.ts +12 -0
  188. package/dist/hooks/claude-code-hooks/tool-input-cache.d.ts +5 -0
  189. package/dist/hooks/claude-code-hooks/transcript.d.ts +38 -0
  190. package/dist/hooks/claude-code-hooks/types.d.ts +183 -0
  191. package/dist/hooks/claude-code-hooks/user-prompt-submit.d.ts +22 -0
  192. package/dist/hooks/comment-checker/cli.d.ts +52 -0
  193. package/dist/hooks/comment-checker/cli.test.d.ts +1 -0
  194. package/dist/hooks/comment-checker/downloader.d.ts +25 -0
  195. package/dist/hooks/comment-checker/index.d.ts +19 -0
  196. package/dist/hooks/comment-checker/types.d.ts +31 -0
  197. package/dist/hooks/compaction-context-injector/index.d.ts +8 -0
  198. package/dist/hooks/context-window-monitor.d.ts +18 -0
  199. package/dist/hooks/delegate-task-retry/index.d.ts +24 -0
  200. package/dist/hooks/delegate-task-retry/index.test.d.ts +1 -0
  201. package/dist/hooks/directory-agents-injector/constants.d.ts +3 -0
  202. package/dist/hooks/directory-agents-injector/index.d.ts +26 -0
  203. package/dist/hooks/directory-agents-injector/storage.d.ts +3 -0
  204. package/dist/hooks/directory-agents-injector/types.d.ts +5 -0
  205. package/dist/hooks/directory-readme-injector/constants.d.ts +3 -0
  206. package/dist/hooks/directory-readme-injector/index.d.ts +26 -0
  207. package/dist/hooks/directory-readme-injector/storage.d.ts +3 -0
  208. package/dist/hooks/directory-readme-injector/types.d.ts +5 -0
  209. package/dist/hooks/edit-error-recovery/index.d.ts +31 -0
  210. package/dist/hooks/edit-error-recovery/index.test.d.ts +1 -0
  211. package/dist/hooks/empty-task-response-detector.d.ts +12 -0
  212. package/dist/hooks/index.d.ts +29 -0
  213. package/dist/hooks/interactive-bash-session/constants.d.ts +4 -0
  214. package/dist/hooks/interactive-bash-session/index.d.ts +23 -0
  215. package/dist/hooks/interactive-bash-session/storage.d.ts +4 -0
  216. package/dist/hooks/interactive-bash-session/types.d.ts +10 -0
  217. package/dist/hooks/keyword-detector/constants.d.ts +12 -0
  218. package/dist/hooks/keyword-detector/detector.d.ts +11 -0
  219. package/dist/hooks/keyword-detector/index.d.ts +23 -0
  220. package/dist/hooks/keyword-detector/index.test.d.ts +1 -0
  221. package/dist/hooks/keyword-detector/types.d.ts +4 -0
  222. package/dist/hooks/non-interactive-env/constants.d.ts +34 -0
  223. package/dist/hooks/non-interactive-env/detector.d.ts +1 -0
  224. package/dist/hooks/non-interactive-env/index.d.ts +14 -0
  225. package/dist/hooks/non-interactive-env/index.test.d.ts +1 -0
  226. package/dist/hooks/non-interactive-env/types.d.ts +3 -0
  227. package/dist/hooks/prometheus-md-only/constants.d.ts +6 -0
  228. package/dist/hooks/prometheus-md-only/index.d.ts +12 -0
  229. package/dist/hooks/prometheus-md-only/index.test.d.ts +1 -0
  230. package/dist/hooks/ralph-loop/constants.d.ts +5 -0
  231. package/dist/hooks/ralph-loop/index.d.ts +21 -0
  232. package/dist/hooks/ralph-loop/index.test.d.ts +1 -0
  233. package/dist/hooks/ralph-loop/storage.d.ts +6 -0
  234. package/dist/hooks/ralph-loop/types.d.ts +17 -0
  235. package/dist/hooks/rules-injector/constants.d.ts +8 -0
  236. package/dist/hooks/rules-injector/finder.d.ts +33 -0
  237. package/dist/hooks/rules-injector/finder.test.d.ts +1 -0
  238. package/dist/hooks/rules-injector/index.d.ts +26 -0
  239. package/dist/hooks/rules-injector/matcher.d.ts +21 -0
  240. package/dist/hooks/rules-injector/parser.d.ts +18 -0
  241. package/dist/hooks/rules-injector/parser.test.d.ts +1 -0
  242. package/dist/hooks/rules-injector/storage.d.ts +9 -0
  243. package/dist/hooks/rules-injector/types.d.ts +54 -0
  244. package/dist/hooks/session-notification-utils.d.ts +9 -0
  245. package/dist/hooks/session-notification.d.ts +20 -0
  246. package/dist/hooks/session-notification.test.d.ts +1 -0
  247. package/dist/hooks/session-recovery/constants.d.ts +6 -0
  248. package/dist/hooks/session-recovery/index.d.ts +22 -0
  249. package/dist/hooks/session-recovery/index.test.d.ts +1 -0
  250. package/dist/hooks/session-recovery/storage.d.ts +19 -0
  251. package/dist/hooks/session-recovery/types.d.ts +90 -0
  252. package/dist/hooks/start-work/index.d.ts +16 -0
  253. package/dist/hooks/start-work/index.test.d.ts +1 -0
  254. package/dist/hooks/task-resume-info/index.d.ts +11 -0
  255. package/dist/hooks/think-mode/detector.d.ts +5 -0
  256. package/dist/hooks/think-mode/index.d.ts +14 -0
  257. package/dist/hooks/think-mode/index.test.d.ts +1 -0
  258. package/dist/hooks/think-mode/switcher.d.ts +57 -0
  259. package/dist/hooks/think-mode/switcher.test.d.ts +1 -0
  260. package/dist/hooks/think-mode/types.d.ts +21 -0
  261. package/dist/hooks/thinking-block-validator/index.d.ts +30 -0
  262. package/dist/hooks/todo-continuation-enforcer.d.ts +17 -0
  263. package/dist/hooks/todo-continuation-enforcer.test.d.ts +1 -0
  264. package/dist/hooks/tool-output-truncator.d.ts +17 -0
  265. package/dist/hooks/tool-output-truncator.test.d.ts +1 -0
  266. package/dist/index.d.ts +5 -0
  267. package/dist/index.js +67990 -0
  268. package/dist/mcp/context7.d.ts +6 -0
  269. package/dist/mcp/grep-app.d.ts +6 -0
  270. package/dist/mcp/index.d.ts +9 -0
  271. package/dist/mcp/index.test.d.ts +1 -0
  272. package/dist/mcp/types.d.ts +9 -0
  273. package/dist/mcp/websearch.d.ts +9 -0
  274. package/dist/plugin-config.d.ts +4 -0
  275. package/dist/plugin-config.test.d.ts +1 -0
  276. package/dist/plugin-handlers/config-handler.d.ts +12 -0
  277. package/dist/plugin-handlers/config-handler.test.d.ts +1 -0
  278. package/dist/plugin-handlers/index.d.ts +1 -0
  279. package/dist/plugin-state.d.ts +6 -0
  280. package/dist/shared/agent-tool-restrictions.d.ts +7 -0
  281. package/dist/shared/agent-variant.d.ts +5 -0
  282. package/dist/shared/agent-variant.test.d.ts +1 -0
  283. package/dist/shared/claude-config-dir.d.ts +1 -0
  284. package/dist/shared/claude-config-dir.test.d.ts +1 -0
  285. package/dist/shared/command-executor.d.ts +21 -0
  286. package/dist/shared/config-errors.d.ts +7 -0
  287. package/dist/shared/config-path.d.ts +17 -0
  288. package/dist/shared/data-path.d.ts +14 -0
  289. package/dist/shared/deep-merge.d.ts +13 -0
  290. package/dist/shared/deep-merge.test.d.ts +1 -0
  291. package/dist/shared/dynamic-truncator.d.ts +27 -0
  292. package/dist/shared/external-plugin-detector.d.ts +18 -0
  293. package/dist/shared/external-plugin-detector.test.d.ts +1 -0
  294. package/dist/shared/file-reference-resolver.d.ts +1 -0
  295. package/dist/shared/file-utils.d.ts +7 -0
  296. package/dist/shared/first-message-variant.d.ts +11 -0
  297. package/dist/shared/first-message-variant.test.d.ts +1 -0
  298. package/dist/shared/frontmatter.d.ts +7 -0
  299. package/dist/shared/frontmatter.test.d.ts +1 -0
  300. package/dist/shared/hook-disabled.d.ts +2 -0
  301. package/dist/shared/index.d.ts +29 -0
  302. package/dist/shared/jsonc-parser.d.ts +15 -0
  303. package/dist/shared/jsonc-parser.test.d.ts +1 -0
  304. package/dist/shared/logger.d.ts +2 -0
  305. package/dist/shared/migration.d.ts +31 -0
  306. package/dist/shared/migration.test.d.ts +1 -0
  307. package/dist/shared/model-resolver.d.ts +19 -0
  308. package/dist/shared/model-resolver.test.d.ts +1 -0
  309. package/dist/shared/model-sanitizer.d.ts +3 -0
  310. package/dist/shared/musacode-config-dir.d.ts +19 -0
  311. package/dist/shared/musacode-config-dir.test.d.ts +1 -0
  312. package/dist/shared/musacode-version.d.ts +13 -0
  313. package/dist/shared/musacode-version.test.d.ts +1 -0
  314. package/dist/shared/pattern-matcher.d.ts +3 -0
  315. package/dist/shared/permission-compat.d.ts +27 -0
  316. package/dist/shared/permission-compat.test.d.ts +1 -0
  317. package/dist/shared/session-cursor.d.ts +13 -0
  318. package/dist/shared/session-cursor.test.d.ts +1 -0
  319. package/dist/shared/shell-env.d.ts +41 -0
  320. package/dist/shared/shell-env.test.d.ts +1 -0
  321. package/dist/shared/snake-case.d.ts +4 -0
  322. package/dist/shared/system-directive.d.ts +31 -0
  323. package/dist/shared/tool-name.d.ts +1 -0
  324. package/dist/shared/zip-extractor.d.ts +1 -0
  325. package/dist/tools/ast-grep/cli.d.ts +15 -0
  326. package/dist/tools/ast-grep/constants.d.ts +29 -0
  327. package/dist/tools/ast-grep/downloader.d.ts +5 -0
  328. package/dist/tools/ast-grep/index.d.ts +8 -0
  329. package/dist/tools/ast-grep/tools.d.ts +3 -0
  330. package/dist/tools/ast-grep/types.d.ts +58 -0
  331. package/dist/tools/ast-grep/utils.d.ts +5 -0
  332. package/dist/tools/background-task/constants.d.ts +3 -0
  333. package/dist/tools/background-task/index.d.ts +3 -0
  334. package/dist/tools/background-task/tools.d.ts +7 -0
  335. package/dist/tools/background-task/types.d.ts +14 -0
  336. package/dist/tools/call-omo-agent/constants.d.ts +2 -0
  337. package/dist/tools/call-omo-agent/index.d.ts +3 -0
  338. package/dist/tools/call-omo-agent/tools.d.ts +3 -0
  339. package/dist/tools/call-omo-agent/types.d.ts +24 -0
  340. package/dist/tools/delegate-task/constants.d.ts +12 -0
  341. package/dist/tools/delegate-task/index.d.ts +3 -0
  342. package/dist/tools/delegate-task/tools.d.ts +27 -0
  343. package/dist/tools/delegate-task/tools.test.d.ts +1 -0
  344. package/dist/tools/delegate-task/types.d.ts +9 -0
  345. package/dist/tools/glob/cli.d.ts +11 -0
  346. package/dist/tools/glob/cli.test.d.ts +1 -0
  347. package/dist/tools/glob/constants.d.ts +6 -0
  348. package/dist/tools/glob/index.d.ts +2 -0
  349. package/dist/tools/glob/tools.d.ts +2 -0
  350. package/dist/tools/glob/types.d.ts +20 -0
  351. package/dist/tools/glob/utils.d.ts +2 -0
  352. package/dist/tools/grep/cli.d.ts +3 -0
  353. package/dist/tools/grep/constants.d.ts +17 -0
  354. package/dist/tools/grep/downloader.d.ts +3 -0
  355. package/dist/tools/grep/downloader.test.d.ts +1 -0
  356. package/dist/tools/grep/index.d.ts +2 -0
  357. package/dist/tools/grep/tools.d.ts +2 -0
  358. package/dist/tools/grep/types.d.ts +36 -0
  359. package/dist/tools/grep/utils.d.ts +3 -0
  360. package/dist/tools/index.d.ts +16 -0
  361. package/dist/tools/interactive-bash/constants.d.ts +3 -0
  362. package/dist/tools/interactive-bash/index.d.ts +3 -0
  363. package/dist/tools/interactive-bash/tools.d.ts +7 -0
  364. package/dist/tools/interactive-bash/utils.d.ts +3 -0
  365. package/dist/tools/look-at/constants.d.ts +2 -0
  366. package/dist/tools/look-at/index.d.ts +3 -0
  367. package/dist/tools/look-at/tools.d.ts +9 -0
  368. package/dist/tools/look-at/tools.test.d.ts +1 -0
  369. package/dist/tools/look-at/types.d.ts +4 -0
  370. package/dist/tools/lsp/client.d.ts +57 -0
  371. package/dist/tools/lsp/config.d.ts +17 -0
  372. package/dist/tools/lsp/config.test.d.ts +1 -0
  373. package/dist/tools/lsp/constants.d.ts +9 -0
  374. package/dist/tools/lsp/index.d.ts +6 -0
  375. package/dist/tools/lsp/tools.d.ts +7 -0
  376. package/dist/tools/lsp/types.d.ts +123 -0
  377. package/dist/tools/lsp/utils.d.ts +26 -0
  378. package/dist/tools/session-manager/constants.d.ts +12 -0
  379. package/dist/tools/session-manager/index.d.ts +3 -0
  380. package/dist/tools/session-manager/storage.d.ts +12 -0
  381. package/dist/tools/session-manager/storage.test.d.ts +1 -0
  382. package/dist/tools/session-manager/tools.d.ts +5 -0
  383. package/dist/tools/session-manager/tools.test.d.ts +1 -0
  384. package/dist/tools/session-manager/types.d.ts +89 -0
  385. package/dist/tools/session-manager/utils.d.ts +11 -0
  386. package/dist/tools/session-manager/utils.test.d.ts +1 -0
  387. package/dist/tools/skill/constants.d.ts +3 -0
  388. package/dist/tools/skill/index.d.ts +3 -0
  389. package/dist/tools/skill/tools.d.ts +4 -0
  390. package/dist/tools/skill/tools.test.d.ts +1 -0
  391. package/dist/tools/skill/types.d.ts +28 -0
  392. package/dist/tools/skill-mcp/constants.d.ts +2 -0
  393. package/dist/tools/skill-mcp/index.d.ts +3 -0
  394. package/dist/tools/skill-mcp/tools.d.ts +11 -0
  395. package/dist/tools/skill-mcp/tools.test.d.ts +1 -0
  396. package/dist/tools/skill-mcp/types.d.ts +8 -0
  397. package/dist/tools/slashcommand/index.d.ts +2 -0
  398. package/dist/tools/slashcommand/tools.d.ts +5 -0
  399. package/dist/tools/slashcommand/types.d.ts +24 -0
  400. package/package.json +89 -0
  401. package/postinstall.mjs +47 -0
@@ -0,0 +1,123 @@
1
+ export interface LSPServerConfig {
2
+ id: string;
3
+ command: string[];
4
+ extensions: string[];
5
+ disabled?: boolean;
6
+ env?: Record<string, string>;
7
+ initialization?: Record<string, unknown>;
8
+ }
9
+ export interface Position {
10
+ line: number;
11
+ character: number;
12
+ }
13
+ export interface Range {
14
+ start: Position;
15
+ end: Position;
16
+ }
17
+ export interface Location {
18
+ uri: string;
19
+ range: Range;
20
+ }
21
+ export interface LocationLink {
22
+ targetUri: string;
23
+ targetRange: Range;
24
+ targetSelectionRange: Range;
25
+ originSelectionRange?: Range;
26
+ }
27
+ export interface SymbolInfo {
28
+ name: string;
29
+ kind: number;
30
+ location: Location;
31
+ containerName?: string;
32
+ }
33
+ export interface DocumentSymbol {
34
+ name: string;
35
+ kind: number;
36
+ range: Range;
37
+ selectionRange: Range;
38
+ children?: DocumentSymbol[];
39
+ }
40
+ export interface Diagnostic {
41
+ range: Range;
42
+ severity?: number;
43
+ code?: string | number;
44
+ source?: string;
45
+ message: string;
46
+ }
47
+ export interface TextDocumentIdentifier {
48
+ uri: string;
49
+ }
50
+ export interface VersionedTextDocumentIdentifier extends TextDocumentIdentifier {
51
+ version: number | null;
52
+ }
53
+ export interface TextEdit {
54
+ range: Range;
55
+ newText: string;
56
+ }
57
+ export interface TextDocumentEdit {
58
+ textDocument: VersionedTextDocumentIdentifier;
59
+ edits: TextEdit[];
60
+ }
61
+ export interface CreateFile {
62
+ kind: "create";
63
+ uri: string;
64
+ options?: {
65
+ overwrite?: boolean;
66
+ ignoreIfExists?: boolean;
67
+ };
68
+ }
69
+ export interface RenameFile {
70
+ kind: "rename";
71
+ oldUri: string;
72
+ newUri: string;
73
+ options?: {
74
+ overwrite?: boolean;
75
+ ignoreIfExists?: boolean;
76
+ };
77
+ }
78
+ export interface DeleteFile {
79
+ kind: "delete";
80
+ uri: string;
81
+ options?: {
82
+ recursive?: boolean;
83
+ ignoreIfNotExists?: boolean;
84
+ };
85
+ }
86
+ export interface WorkspaceEdit {
87
+ changes?: {
88
+ [uri: string]: TextEdit[];
89
+ };
90
+ documentChanges?: (TextDocumentEdit | CreateFile | RenameFile | DeleteFile)[];
91
+ }
92
+ export interface PrepareRenameResult {
93
+ range: Range;
94
+ placeholder?: string;
95
+ }
96
+ export interface PrepareRenameDefaultBehavior {
97
+ defaultBehavior: boolean;
98
+ }
99
+ export interface ServerLookupInfo {
100
+ id: string;
101
+ command: string[];
102
+ extensions: string[];
103
+ }
104
+ export type ServerLookupResult = {
105
+ status: "found";
106
+ server: ResolvedServer;
107
+ } | {
108
+ status: "not_configured";
109
+ extension: string;
110
+ availableServers: string[];
111
+ } | {
112
+ status: "not_installed";
113
+ server: ServerLookupInfo;
114
+ installHint: string;
115
+ };
116
+ export interface ResolvedServer {
117
+ id: string;
118
+ command: string[];
119
+ extensions: string[];
120
+ priority: number;
121
+ env?: Record<string, string>;
122
+ initialization?: Record<string, unknown>;
123
+ }
@@ -0,0 +1,26 @@
1
+ import { LSPClient } from "./client";
2
+ import type { Location, LocationLink, DocumentSymbol, SymbolInfo, Diagnostic, PrepareRenameResult, PrepareRenameDefaultBehavior, Range, WorkspaceEdit, TextEdit, ServerLookupResult } from "./types";
3
+ export declare function findWorkspaceRoot(filePath: string): string;
4
+ export declare function uriToPath(uri: string): string;
5
+ export declare function formatServerLookupError(result: Exclude<ServerLookupResult, {
6
+ status: "found";
7
+ }>): string;
8
+ export declare function withLspClient<T>(filePath: string, fn: (client: LSPClient) => Promise<T>): Promise<T>;
9
+ export declare function formatLocation(loc: Location | LocationLink): string;
10
+ export declare function formatSymbolKind(kind: number): string;
11
+ export declare function formatSeverity(severity: number | undefined): string;
12
+ export declare function formatDocumentSymbol(symbol: DocumentSymbol, indent?: number): string;
13
+ export declare function formatSymbolInfo(symbol: SymbolInfo): string;
14
+ export declare function formatDiagnostic(diag: Diagnostic): string;
15
+ export declare function filterDiagnosticsBySeverity(diagnostics: Diagnostic[], severityFilter?: "error" | "warning" | "information" | "hint" | "all"): Diagnostic[];
16
+ export declare function formatPrepareRenameResult(result: PrepareRenameResult | PrepareRenameDefaultBehavior | Range | null): string;
17
+ export declare function formatTextEdit(edit: TextEdit): string;
18
+ export declare function formatWorkspaceEdit(edit: WorkspaceEdit | null): string;
19
+ export interface ApplyResult {
20
+ success: boolean;
21
+ filesModified: string[];
22
+ totalEdits: number;
23
+ errors: string[];
24
+ }
25
+ export declare function applyWorkspaceEdit(edit: WorkspaceEdit | null): ApplyResult;
26
+ export declare function formatApplyResult(result: ApplyResult): string;
@@ -0,0 +1,12 @@
1
+ export declare const MUSACODE_STORAGE: string;
2
+ export declare const MESSAGE_STORAGE: string;
3
+ export declare const PART_STORAGE: string;
4
+ export declare const SESSION_STORAGE: string;
5
+ export declare const TODO_DIR: string;
6
+ export declare const TRANSCRIPT_DIR: string;
7
+ export declare const SESSION_LIST_DESCRIPTION = "List all MusaCode sessions with optional filtering.\n\nReturns a list of available session IDs with metadata including message count, date range, and agents used.\n\nArguments:\n- limit (optional): Maximum number of sessions to return\n- from_date (optional): Filter sessions from this date (ISO 8601 format)\n- to_date (optional): Filter sessions until this date (ISO 8601 format)\n\nExample output:\n| Session ID | Messages | First | Last | Agents |\n|------------|----------|-------|------|--------|\n| ses_abc123 | 45 | 2025-12-20 | 2025-12-24 | build, oracle |\n| ses_def456 | 12 | 2025-12-19 | 2025-12-19 | build |";
8
+ export declare const SESSION_READ_DESCRIPTION = "Read messages and history from an MusaCode session.\n\nReturns a formatted view of session messages with role, timestamp, and content. Optionally includes todos and transcript data.\n\nArguments:\n- session_id (required): Session ID to read\n- include_todos (optional): Include todo list if available (default: false)\n- include_transcript (optional): Include transcript log if available (default: false)\n- limit (optional): Maximum number of messages to return (default: all)\n\nExample output:\nSession: ses_abc123\nMessages: 45\nDate Range: 2025-12-20 to 2025-12-24\n\n[Message 1] user (2025-12-20 10:30:00)\nHello, can you help me with...\n\n[Message 2] assistant (2025-12-20 10:30:15)\nOf course! Let me help you with...";
9
+ export declare const SESSION_SEARCH_DESCRIPTION = "Search for content within MusaCode session messages.\n\nPerforms full-text search across session messages and returns matching excerpts with context.\n\nArguments:\n- query (required): Search query string\n- session_id (optional): Search within specific session only (default: all sessions)\n- case_sensitive (optional): Case-sensitive search (default: false)\n- limit (optional): Maximum number of results to return (default: 20)\n\nExample output:\nFound 3 matches across 2 sessions:\n\n[ses_abc123] Message msg_001 (user)\n...implement the **session manager** tool...\n\n[ses_abc123] Message msg_005 (assistant)\n...I'll create a **session manager** with full search...\n\n[ses_def456] Message msg_012 (user)\n...use the **session manager** to find...";
10
+ export declare const SESSION_INFO_DESCRIPTION = "Get metadata and statistics about an MusaCode session.\n\nReturns detailed information about a session including message count, date range, agents used, and available data sources.\n\nArguments:\n- session_id (required): Session ID to inspect\n\nExample output:\nSession ID: ses_abc123\nMessages: 45\nDate Range: 2025-12-20 10:30:00 to 2025-12-24 15:45:30\nDuration: 4 days, 5 hours\nAgents Used: build, oracle, librarian\nHas Todos: Yes (12 items, 8 completed)\nHas Transcript: Yes (234 entries)";
11
+ export declare const SESSION_DELETE_DESCRIPTION = "Delete an MusaCode session and all associated data.\n\nRemoves session messages, parts, todos, and transcript. This operation cannot be undone.\n\nArguments:\n- session_id (required): Session ID to delete\n- confirm (required): Must be true to confirm deletion\n\nExample:\nsession_delete(session_id=\"ses_abc123\", confirm=true)\nSuccessfully deleted session ses_abc123";
12
+ export declare const TOOL_NAME_PREFIX = "session_";
@@ -0,0 +1,3 @@
1
+ export * from "./tools";
2
+ export * from "./types";
3
+ export * from "./constants";
@@ -0,0 +1,12 @@
1
+ import type { SessionMessage, SessionInfo, TodoItem, SessionMetadata } from "./types";
2
+ export interface GetMainSessionsOptions {
3
+ directory?: string;
4
+ }
5
+ export declare function getMainSessions(options: GetMainSessionsOptions): Promise<SessionMetadata[]>;
6
+ export declare function getAllSessions(): Promise<string[]>;
7
+ export declare function getMessageDir(sessionID: string): string;
8
+ export declare function sessionExists(sessionID: string): boolean;
9
+ export declare function readSessionMessages(sessionID: string): Promise<SessionMessage[]>;
10
+ export declare function readSessionTodos(sessionID: string): Promise<TodoItem[]>;
11
+ export declare function readSessionTranscript(sessionID: string): Promise<number>;
12
+ export declare function getSessionInfo(sessionID: string): Promise<SessionInfo | null>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ import { type ToolDefinition } from "@opencode-ai/plugin/tool";
2
+ export declare const session_list: ToolDefinition;
3
+ export declare const session_read: ToolDefinition;
4
+ export declare const session_search: ToolDefinition;
5
+ export declare const session_info: ToolDefinition;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,89 @@
1
+ export interface SessionMessage {
2
+ id: string;
3
+ role: "user" | "assistant";
4
+ agent?: string;
5
+ time?: {
6
+ created: number;
7
+ updated?: number;
8
+ };
9
+ parts: MessagePart[];
10
+ }
11
+ export interface MessagePart {
12
+ id: string;
13
+ type: string;
14
+ text?: string;
15
+ thinking?: string;
16
+ tool?: string;
17
+ callID?: string;
18
+ input?: Record<string, unknown>;
19
+ output?: string;
20
+ error?: string;
21
+ }
22
+ export interface SessionInfo {
23
+ id: string;
24
+ message_count: number;
25
+ first_message?: Date;
26
+ last_message?: Date;
27
+ agents_used: string[];
28
+ has_todos: boolean;
29
+ has_transcript: boolean;
30
+ todos?: TodoItem[];
31
+ transcript_entries?: number;
32
+ }
33
+ export interface TodoItem {
34
+ id: string;
35
+ content: string;
36
+ status: "pending" | "in_progress" | "completed" | "cancelled";
37
+ priority?: string;
38
+ }
39
+ export interface SearchResult {
40
+ session_id: string;
41
+ message_id: string;
42
+ role: string;
43
+ excerpt: string;
44
+ match_count: number;
45
+ timestamp?: number;
46
+ }
47
+ export interface SessionMetadata {
48
+ id: string;
49
+ version?: string;
50
+ projectID: string;
51
+ directory: string;
52
+ title?: string;
53
+ parentID?: string;
54
+ time: {
55
+ created: number;
56
+ updated: number;
57
+ };
58
+ summary?: {
59
+ additions: number;
60
+ deletions: number;
61
+ files: number;
62
+ };
63
+ }
64
+ export interface SessionListArgs {
65
+ limit?: number;
66
+ offset?: number;
67
+ from_date?: string;
68
+ to_date?: string;
69
+ project_path?: string;
70
+ }
71
+ export interface SessionReadArgs {
72
+ session_id: string;
73
+ include_todos?: boolean;
74
+ include_transcript?: boolean;
75
+ limit?: number;
76
+ }
77
+ export interface SessionSearchArgs {
78
+ query: string;
79
+ session_id?: string;
80
+ case_sensitive?: boolean;
81
+ limit?: number;
82
+ }
83
+ export interface SessionInfoArgs {
84
+ session_id: string;
85
+ }
86
+ export interface SessionDeleteArgs {
87
+ session_id: string;
88
+ confirm: boolean;
89
+ }
@@ -0,0 +1,11 @@
1
+ import type { SessionInfo, SessionMessage, SearchResult } from "./types";
2
+ export declare function formatSessionList(sessionIDs: string[]): Promise<string>;
3
+ export declare function formatSessionMessages(messages: SessionMessage[], includeTodos?: boolean, todos?: Array<{
4
+ id: string;
5
+ content: string;
6
+ status: string;
7
+ }>): string;
8
+ export declare function formatSessionInfo(info: SessionInfo): string;
9
+ export declare function formatSearchResults(results: SearchResult[]): string;
10
+ export declare function filterSessionsByDate(sessionIDs: string[], fromDate?: string, toDate?: string): Promise<string[]>;
11
+ export declare function searchInSession(sessionID: string, query: string, caseSensitive?: boolean, maxResults?: number): Promise<SearchResult[]>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ export declare const TOOL_NAME: "skill";
2
+ export declare const TOOL_DESCRIPTION_NO_SKILLS = "Load a skill to get detailed instructions for a specific task. No skills are currently available.";
3
+ export declare const TOOL_DESCRIPTION_PREFIX = "Load a skill to get detailed instructions for a specific task.\n\nSkills provide specialized knowledge and step-by-step guidance.\nUse this when a task matches an available skill's description.";
@@ -0,0 +1,3 @@
1
+ export * from "./constants";
2
+ export * from "./types";
3
+ export { skill, createSkillTool } from "./tools";
@@ -0,0 +1,4 @@
1
+ import { type ToolDefinition } from "@opencode-ai/plugin";
2
+ import type { SkillLoadOptions } from "./types";
3
+ export declare function createSkillTool(options?: SkillLoadOptions): ToolDefinition;
4
+ export declare const skill: ToolDefinition;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,28 @@
1
+ import type { SkillScope, LoadedSkill } from "../../features/musacode-skill-loader/types";
2
+ import type { SkillMcpManager } from "../../features/skill-mcp-manager";
3
+ import type { GitMasterConfig } from "../../config/schema";
4
+ export interface SkillArgs {
5
+ name: string;
6
+ }
7
+ export interface SkillInfo {
8
+ name: string;
9
+ description: string;
10
+ location?: string;
11
+ scope: SkillScope;
12
+ license?: string;
13
+ compatibility?: string;
14
+ metadata?: Record<string, string>;
15
+ allowedTools?: string[];
16
+ }
17
+ export interface SkillLoadOptions {
18
+ /** When true, only load from MusaCode paths (.musacode/skill/, ~/.config.musacode/skill/) */
19
+ musacodeOnly?: boolean;
20
+ /** Pre-merged skills to use instead of discovering */
21
+ skills?: LoadedSkill[];
22
+ /** MCP manager for querying skill-embedded MCP servers */
23
+ mcpManager?: SkillMcpManager;
24
+ /** Session ID getter for MCP client identification */
25
+ getSessionID?: () => string;
26
+ /** Git master configuration for watermark/co-author settings */
27
+ gitMasterConfig?: GitMasterConfig;
28
+ }
@@ -0,0 +1,2 @@
1
+ export declare const SKILL_MCP_TOOL_NAME = "skill_mcp";
2
+ export declare const SKILL_MCP_DESCRIPTION = "Invoke MCP server operations from skill-embedded MCPs. Requires mcp_name plus exactly one of: tool_name, resource_name, or prompt_name.";
@@ -0,0 +1,3 @@
1
+ export * from "./constants";
2
+ export * from "./types";
3
+ export { createSkillMcpTool } from "./tools";
@@ -0,0 +1,11 @@
1
+ import { type ToolDefinition } from "@opencode-ai/plugin";
2
+ import type { SkillMcpManager } from "../../features/skill-mcp-manager";
3
+ import type { LoadedSkill } from "../../features/musacode-skill-loader/types";
4
+ interface SkillMcpToolOptions {
5
+ manager: SkillMcpManager;
6
+ getLoadedSkills: () => LoadedSkill[];
7
+ getSessionID: () => string;
8
+ }
9
+ export declare function applyGrepFilter(output: string, pattern: string | undefined): string;
10
+ export declare function createSkillMcpTool(options: SkillMcpToolOptions): ToolDefinition;
11
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,8 @@
1
+ export interface SkillMcpArgs {
2
+ mcp_name: string;
3
+ tool_name?: string;
4
+ resource_name?: string;
5
+ prompt_name?: string;
6
+ arguments?: string | Record<string, unknown>;
7
+ grep?: string;
8
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./types";
2
+ export { slashcommand, createSlashcommandTool, discoverCommandsSync } from "./tools";
@@ -0,0 +1,5 @@
1
+ import { type ToolDefinition } from "@opencode-ai/plugin";
2
+ import type { CommandInfo, SlashcommandToolOptions } from "./types";
3
+ export declare function discoverCommandsSync(): CommandInfo[];
4
+ export declare function createSlashcommandTool(options?: SlashcommandToolOptions): ToolDefinition;
5
+ export declare const slashcommand: ToolDefinition;
@@ -0,0 +1,24 @@
1
+ import type { LoadedSkill, LazyContentLoader } from "../../features/musacode-skill-loader";
2
+ export type CommandScope = "builtin" | "config" | "user" | "project" | "musacode" | "musacode-project";
3
+ export interface CommandMetadata {
4
+ name: string;
5
+ description: string;
6
+ argumentHint?: string;
7
+ model?: string;
8
+ agent?: string;
9
+ subtask?: boolean;
10
+ }
11
+ export interface CommandInfo {
12
+ name: string;
13
+ path?: string;
14
+ metadata: CommandMetadata;
15
+ content?: string;
16
+ scope: CommandScope;
17
+ lazyContentLoader?: LazyContentLoader;
18
+ }
19
+ export interface SlashcommandToolOptions {
20
+ /** Pre-loaded commands (skip discovery if provided) */
21
+ commands?: CommandInfo[];
22
+ /** Pre-loaded skills (skip discovery if provided) */
23
+ skills?: LoadedSkill[];
24
+ }
package/package.json ADDED
@@ -0,0 +1,89 @@
1
+ {
2
+ "name": "oh-my-musacode",
3
+ "version": "0.0.1",
4
+ "description": "The Best AI Agent Harness - Batteries-Included MusaCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "type": "module",
8
+ "bin": {
9
+ "oh-my-musacode": "./bin/oh-my-musacode.js"
10
+ },
11
+ "files": [
12
+ "dist",
13
+ "bin",
14
+ "postinstall.mjs"
15
+ ],
16
+ "exports": {
17
+ ".": {
18
+ "types": "./dist/index.d.ts",
19
+ "import": "./dist/index.js"
20
+ },
21
+ "./schema.json": "./dist/oh-my-musacode.schema.json"
22
+ },
23
+ "scripts": {
24
+ "build": "bun build src/index.ts --outdir dist --target bun --format esm --external @ast-grep/napi && tsc --emitDeclarationOnly && bun build src/cli/index.ts --outdir dist/cli --target bun --format esm --external @ast-grep/napi && bun run build:schema",
25
+ "build:all": "bun run build && bun run build:binaries",
26
+ "build:binaries": "bun run script/build-binaries.ts",
27
+ "build:schema": "bun run script/build-schema.ts",
28
+ "clean": "rm -rf dist",
29
+ "postinstall": "node postinstall.mjs",
30
+ "prepublishOnly": "bun run clean && bun run build",
31
+ "typecheck": "tsc --noEmit",
32
+ "test": "bun test"
33
+ },
34
+ "keywords": [
35
+ "opencode",
36
+ "plugin",
37
+ "oracle",
38
+ "librarian",
39
+ "agents",
40
+ "ai",
41
+ "llm"
42
+ ],
43
+ "author": "YeonGyu-Kim",
44
+ "license": "SUL-1.0",
45
+ "repository": {
46
+ "type": "git",
47
+ "url": "git+https://github.com/code-yeongyu/oh-my-opencode.git"
48
+ },
49
+ "bugs": {
50
+ "url": "https://github.com/code-yeongyu/oh-my-opencode/issues"
51
+ },
52
+ "homepage": "https://github.com/code-yeongyu/oh-my-opencode#readme",
53
+ "dependencies": {
54
+ "@ast-grep/cli": "^0.40.5",
55
+ "@ast-grep/napi": "^0.40.5",
56
+ "@clack/prompts": "^0.11.0",
57
+ "@code-yeongyu/comment-checker": "^0.6.1",
58
+ "@modelcontextprotocol/sdk": "^1.25.3",
59
+ "@opencode-ai/plugin": "^1.1.36",
60
+ "@opencode-ai/sdk": "^1.1.36",
61
+ "commander": "^14.0.2",
62
+ "detect-libc": "^2.1.2",
63
+ "js-yaml": "^4.1.1",
64
+ "jsonc-parser": "^3.3.1",
65
+ "picocolors": "^1.1.1",
66
+ "picomatch": "^4.0.3",
67
+ "zod": "^4.3.6"
68
+ },
69
+ "devDependencies": {
70
+ "@types/js-yaml": "^4.0.9",
71
+ "@types/picomatch": "^3.0.2",
72
+ "bun-types": "^1.3.6",
73
+ "typescript": "^5.9.3"
74
+ },
75
+ "optionalDependencies": {
76
+ "oh-my-musacode-darwin-arm64": "0.0.1",
77
+ "oh-my-musacode-darwin-x64": "0.0.1",
78
+ "oh-my-musacode-linux-arm64": "0.0.1",
79
+ "oh-my-musacode-linux-arm64-musl": "0.0.1",
80
+ "oh-my-musacode-linux-x64": "0.0.1",
81
+ "oh-my-musacode-linux-x64-musl": "0.0.1",
82
+ "oh-my-musacode-windows-x64": "0.0.1"
83
+ },
84
+ "trustedDependencies": [
85
+ "@ast-grep/cli",
86
+ "@ast-grep/napi",
87
+ "@code-yeongyu/comment-checker"
88
+ ]
89
+ }
@@ -0,0 +1,47 @@
1
+ // postinstall.mjs
2
+ // Runs after npm install to verify platform binary is available
3
+
4
+ import { createRequire } from "node:module";
5
+ import { getPlatformPackage, getBinaryPath } from "./bin/platform.js";
6
+
7
+ const require = createRequire(import.meta.url);
8
+
9
+ /**
10
+ * Detect libc family on Linux
11
+ */
12
+ function getLibcFamily() {
13
+ if (process.platform !== "linux") {
14
+ return undefined;
15
+ }
16
+
17
+ try {
18
+ const detectLibc = require("detect-libc");
19
+ return detectLibc.familySync();
20
+ } catch {
21
+ return null;
22
+ }
23
+ }
24
+
25
+ function main() {
26
+ const { platform, arch } = process;
27
+ const libcFamily = getLibcFamily();
28
+
29
+ try {
30
+ const pkg = getPlatformPackage({ platform, arch, libcFamily });
31
+ const binPath = getBinaryPath(pkg, platform);
32
+ console.log(`DEBUG: platform=${platform}, arch=${arch}, libcFamily=${libcFamily}`);
33
+
34
+ console.log(`DEBUG: pkg=${pkg}`)
35
+
36
+ console.log(`DEBUG: binPath=${binPath}`)
37
+ // Try to resolve the binary
38
+ require.resolve(binPath);
39
+ console.log(`✓ oh-my-musacode binary installed for ${platform}-${arch}`);
40
+ } catch (error) {
41
+ console.warn(`⚠ oh-my-musacode: ${error.message}`);
42
+ console.warn(` The CLI may not work on this platform.`);
43
+ // Don't fail installation - let user try anyway
44
+ }
45
+ }
46
+
47
+ main();