@reinamaccredy/maestro 1.0.1 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. package/bin/maestro.js +4 -4
  2. package/bin/platform.js +4 -4
  3. package/bin/platform.test.ts +13 -13
  4. package/dist/agents/execution/index.d.ts +4 -0
  5. package/dist/agents/{scribe.d.ts → execution/scribe.d.ts} +1 -1
  6. package/dist/agents/{soloist.d.ts → execution/soloist.d.ts} +1 -1
  7. package/dist/agents/{virtuoso.d.ts → execution/virtuoso.d.ts} +1 -1
  8. package/dist/agents/index.d.ts +6 -1
  9. package/dist/agents/{arranger.d.ts → orchestration/arranger.d.ts} +1 -1
  10. package/dist/agents/{conductor.d.ts → orchestration/conductor.d.ts} +3 -3
  11. package/dist/agents/orchestration/index.d.ts +4 -0
  12. package/dist/agents/{maestro.d.ts → orchestration/maestro.d.ts} +1 -1
  13. package/dist/agents/{maestro-prompt-builder.d.ts → orchestration/prompt-builder.d.ts} +1 -1
  14. package/dist/agents/{designer.d.ts → planning/designer.d.ts} +1 -1
  15. package/dist/agents/planning/index.d.ts +3 -0
  16. package/dist/agents/{analyst.d.ts → research/analyst.d.ts} +1 -1
  17. package/dist/agents/{archivist.d.ts → research/archivist.d.ts} +1 -1
  18. package/dist/agents/research/index.d.ts +3 -0
  19. package/dist/agents/{scout.d.ts → research/scout.d.ts} +1 -1
  20. package/dist/agents/{critic.d.ts → review/critic.d.ts} +1 -1
  21. package/dist/agents/review/index.d.ts +1 -0
  22. package/dist/agents/utils.d.ts +1 -1
  23. package/dist/cli/doctor/constants.d.ts +1 -1
  24. package/dist/cli/index.js +49 -45
  25. package/dist/features/{background-agent → background/agent}/concurrency.d.ts +1 -1
  26. package/dist/features/{background-agent → background/agent}/manager.d.ts +1 -1
  27. package/dist/features/background/index.d.ts +2 -0
  28. package/dist/features/{task-toast-manager → background/toast-manager}/manager.d.ts +1 -1
  29. package/dist/features/builtin-commands/types.d.ts +1 -1
  30. package/dist/features/loaders/index.d.ts +4 -0
  31. package/dist/features/{claude-code-plugin-loader → loaders/plugin-loader}/loader.d.ts +2 -2
  32. package/dist/features/{claude-code-plugin-loader → loaders/plugin-loader}/types.d.ts +1 -1
  33. package/dist/features/opencode-skill-loader/loader.d.ts +1 -1
  34. package/dist/features/opencode-skill-loader/types.d.ts +1 -1
  35. package/dist/features/skill-mcp-manager/manager.d.ts +1 -1
  36. package/dist/features/skill-mcp-manager/types.d.ts +1 -1
  37. package/dist/features/state/index.d.ts +2 -0
  38. package/dist/hooks/context/index.d.ts +4 -0
  39. package/dist/hooks/{anthropic-context-window-limit-recovery → error-recovery/anthropic-context-window-limit-recovery}/executor.d.ts +1 -1
  40. package/dist/hooks/{anthropic-context-window-limit-recovery → error-recovery/anthropic-context-window-limit-recovery}/index.d.ts +1 -1
  41. package/dist/hooks/{anthropic-context-window-limit-recovery → error-recovery/anthropic-context-window-limit-recovery}/pruning-executor.d.ts +1 -1
  42. package/dist/hooks/error-recovery/index.d.ts +3 -0
  43. package/dist/hooks/index.d.ts +6 -25
  44. package/dist/hooks/{auto-slash-command → input/auto-slash-command}/executor.d.ts +1 -1
  45. package/dist/hooks/{auto-slash-command → input/auto-slash-command}/index.d.ts +1 -1
  46. package/dist/hooks/input/index.d.ts +3 -0
  47. package/dist/hooks/{keyword-detector → input/keyword-detector}/index.d.ts +1 -1
  48. package/dist/hooks/{auto-update-checker → lifecycle/auto-update-checker}/constants.d.ts +2 -2
  49. package/dist/hooks/lifecycle/index.d.ts +3 -0
  50. package/dist/hooks/{session-recovery → lifecycle/session-recovery}/index.d.ts +1 -1
  51. package/dist/hooks/{background-compaction → system/background-compaction}/index.d.ts +1 -1
  52. package/dist/hooks/{background-notification → system/background-notification}/index.d.ts +1 -1
  53. package/dist/hooks/{background-notification → system/background-notification}/types.d.ts +1 -1
  54. package/dist/hooks/system/index.d.ts +8 -0
  55. package/dist/hooks/{maestro-orchestrator → system/maestro-orchestrator}/index.d.ts +1 -1
  56. package/dist/hooks/{ralph-loop → system/ralph-loop}/types.d.ts +1 -1
  57. package/dist/hooks/todo-continuation-enforcer.d.ts +1 -1
  58. package/dist/hooks/{comment-checker → tool-intercept/comment-checker}/downloader.d.ts +1 -1
  59. package/dist/hooks/{comment-checker → tool-intercept/comment-checker}/index.d.ts +1 -1
  60. package/dist/hooks/tool-intercept/index.d.ts +4 -0
  61. package/dist/index.js +12334 -12297
  62. package/dist/shared/config-path.d.ts +2 -2
  63. package/dist/shared/external-plugin-detector.d.ts +1 -1
  64. package/dist/shared/index.d.ts +1 -0
  65. package/dist/shared/platform-detection.d.ts +42 -0
  66. package/dist/shared/system-directive.d.ts +2 -2
  67. package/dist/tools/background-task/tools.d.ts +1 -1
  68. package/dist/tools/call-omo-agent/tools.d.ts +1 -1
  69. package/dist/tools/delegate-task/tools.d.ts +1 -1
  70. package/dist/tools/index.d.ts +1 -1
  71. package/package.json +1 -1
  72. package/postinstall.mjs +97 -4
  73. /package/dist/agents/{build-prompt.d.ts → execution/build-prompt.d.ts} +0 -0
  74. /package/dist/agents/{composer.d.ts → planning/composer.d.ts} +0 -0
  75. /package/dist/agents/{plan-prompt.d.ts → planning/plan-prompt.d.ts} +0 -0
  76. /package/dist/features/{background-agent → background/agent}/index.d.ts +0 -0
  77. /package/dist/features/{background-agent → background/agent}/types.d.ts +0 -0
  78. /package/dist/features/{task-toast-manager → background/toast-manager}/index.d.ts +0 -0
  79. /package/dist/features/{task-toast-manager → background/toast-manager}/types.d.ts +0 -0
  80. /package/dist/features/{claude-code-agent-loader → loaders/agent-loader}/index.d.ts +0 -0
  81. /package/dist/features/{claude-code-agent-loader → loaders/agent-loader}/loader.d.ts +0 -0
  82. /package/dist/features/{claude-code-agent-loader → loaders/agent-loader}/types.d.ts +0 -0
  83. /package/dist/features/{claude-code-command-loader → loaders/command-loader}/index.d.ts +0 -0
  84. /package/dist/features/{claude-code-command-loader → loaders/command-loader}/loader.d.ts +0 -0
  85. /package/dist/features/{claude-code-command-loader → loaders/command-loader}/types.d.ts +0 -0
  86. /package/dist/features/{claude-code-mcp-loader → loaders/mcp-loader}/env-expander.d.ts +0 -0
  87. /package/dist/features/{claude-code-mcp-loader → loaders/mcp-loader}/index.d.ts +0 -0
  88. /package/dist/features/{claude-code-mcp-loader → loaders/mcp-loader}/loader.d.ts +0 -0
  89. /package/dist/features/{claude-code-mcp-loader → loaders/mcp-loader}/transformer.d.ts +0 -0
  90. /package/dist/features/{claude-code-mcp-loader → loaders/mcp-loader}/types.d.ts +0 -0
  91. /package/dist/features/{claude-code-plugin-loader → loaders/plugin-loader}/index.d.ts +0 -0
  92. /package/dist/features/{boulder-state → state/boulder-state}/constants.d.ts +0 -0
  93. /package/dist/features/{boulder-state → state/boulder-state}/index.d.ts +0 -0
  94. /package/dist/features/{boulder-state → state/boulder-state}/storage.d.ts +0 -0
  95. /package/dist/features/{boulder-state → state/boulder-state}/types.d.ts +0 -0
  96. /package/dist/features/{claude-code-session-state → state/session-state}/index.d.ts +0 -0
  97. /package/dist/features/{claude-code-session-state → state/session-state}/state.d.ts +0 -0
  98. /package/dist/hooks/{compaction-context-injector → context/compaction-context-injector}/index.d.ts +0 -0
  99. /package/dist/hooks/{directory-agents-injector → context/directory-agents-injector}/constants.d.ts +0 -0
  100. /package/dist/hooks/{directory-agents-injector → context/directory-agents-injector}/index.d.ts +0 -0
  101. /package/dist/hooks/{directory-agents-injector → context/directory-agents-injector}/storage.d.ts +0 -0
  102. /package/dist/hooks/{directory-agents-injector → context/directory-agents-injector}/types.d.ts +0 -0
  103. /package/dist/hooks/{directory-readme-injector → context/directory-readme-injector}/constants.d.ts +0 -0
  104. /package/dist/hooks/{directory-readme-injector → context/directory-readme-injector}/index.d.ts +0 -0
  105. /package/dist/hooks/{directory-readme-injector → context/directory-readme-injector}/storage.d.ts +0 -0
  106. /package/dist/hooks/{directory-readme-injector → context/directory-readme-injector}/types.d.ts +0 -0
  107. /package/dist/hooks/{rules-injector → context/rules-injector}/constants.d.ts +0 -0
  108. /package/dist/hooks/{rules-injector → context/rules-injector}/finder.d.ts +0 -0
  109. /package/dist/hooks/{rules-injector → context/rules-injector}/index.d.ts +0 -0
  110. /package/dist/hooks/{rules-injector → context/rules-injector}/matcher.d.ts +0 -0
  111. /package/dist/hooks/{rules-injector → context/rules-injector}/parser.d.ts +0 -0
  112. /package/dist/hooks/{rules-injector → context/rules-injector}/storage.d.ts +0 -0
  113. /package/dist/hooks/{rules-injector → context/rules-injector}/types.d.ts +0 -0
  114. /package/dist/hooks/{anthropic-context-window-limit-recovery → error-recovery/anthropic-context-window-limit-recovery}/parser.d.ts +0 -0
  115. /package/dist/hooks/{anthropic-context-window-limit-recovery → error-recovery/anthropic-context-window-limit-recovery}/pruning-deduplication.d.ts +0 -0
  116. /package/dist/hooks/{anthropic-context-window-limit-recovery → error-recovery/anthropic-context-window-limit-recovery}/pruning-purge-errors.d.ts +0 -0
  117. /package/dist/hooks/{anthropic-context-window-limit-recovery → error-recovery/anthropic-context-window-limit-recovery}/pruning-storage.d.ts +0 -0
  118. /package/dist/hooks/{anthropic-context-window-limit-recovery → error-recovery/anthropic-context-window-limit-recovery}/pruning-supersede.d.ts +0 -0
  119. /package/dist/hooks/{anthropic-context-window-limit-recovery → error-recovery/anthropic-context-window-limit-recovery}/pruning-types.d.ts +0 -0
  120. /package/dist/hooks/{anthropic-context-window-limit-recovery → error-recovery/anthropic-context-window-limit-recovery}/storage.d.ts +0 -0
  121. /package/dist/hooks/{anthropic-context-window-limit-recovery → error-recovery/anthropic-context-window-limit-recovery}/types.d.ts +0 -0
  122. /package/dist/hooks/{delegate-task-retry → error-recovery/delegate-task-retry}/index.d.ts +0 -0
  123. /package/dist/hooks/{edit-error-recovery → error-recovery/edit-error-recovery}/index.d.ts +0 -0
  124. /package/dist/hooks/{auto-slash-command → input/auto-slash-command}/constants.d.ts +0 -0
  125. /package/dist/hooks/{auto-slash-command → input/auto-slash-command}/detector.d.ts +0 -0
  126. /package/dist/hooks/{auto-slash-command → input/auto-slash-command}/types.d.ts +0 -0
  127. /package/dist/hooks/{empty-message-sanitizer → input/empty-message-sanitizer}/index.d.ts +0 -0
  128. /package/dist/hooks/{keyword-detector → input/keyword-detector}/constants.d.ts +0 -0
  129. /package/dist/hooks/{keyword-detector → input/keyword-detector}/detector.d.ts +0 -0
  130. /package/dist/hooks/{keyword-detector → input/keyword-detector}/types.d.ts +0 -0
  131. /package/dist/hooks/{auto-update-checker → lifecycle/auto-update-checker}/cache.d.ts +0 -0
  132. /package/dist/hooks/{auto-update-checker → lifecycle/auto-update-checker}/checker.d.ts +0 -0
  133. /package/dist/hooks/{auto-update-checker → lifecycle/auto-update-checker}/index.d.ts +0 -0
  134. /package/dist/hooks/{auto-update-checker → lifecycle/auto-update-checker}/types.d.ts +0 -0
  135. /package/dist/hooks/{session-recovery → lifecycle/session-recovery}/constants.d.ts +0 -0
  136. /package/dist/hooks/{session-recovery → lifecycle/session-recovery}/storage.d.ts +0 -0
  137. /package/dist/hooks/{session-recovery → lifecycle/session-recovery}/types.d.ts +0 -0
  138. /package/dist/hooks/{start-work → lifecycle/start-work}/index.d.ts +0 -0
  139. /package/dist/hooks/{agent-usage-reminder → system/agent-usage-reminder}/constants.d.ts +0 -0
  140. /package/dist/hooks/{agent-usage-reminder → system/agent-usage-reminder}/index.d.ts +0 -0
  141. /package/dist/hooks/{agent-usage-reminder → system/agent-usage-reminder}/storage.d.ts +0 -0
  142. /package/dist/hooks/{agent-usage-reminder → system/agent-usage-reminder}/types.d.ts +0 -0
  143. /package/dist/hooks/{interactive-bash-session → system/interactive-bash-session}/constants.d.ts +0 -0
  144. /package/dist/hooks/{interactive-bash-session → system/interactive-bash-session}/index.d.ts +0 -0
  145. /package/dist/hooks/{interactive-bash-session → system/interactive-bash-session}/storage.d.ts +0 -0
  146. /package/dist/hooks/{interactive-bash-session → system/interactive-bash-session}/types.d.ts +0 -0
  147. /package/dist/hooks/{non-interactive-env → system/non-interactive-env}/constants.d.ts +0 -0
  148. /package/dist/hooks/{non-interactive-env → system/non-interactive-env}/detector.d.ts +0 -0
  149. /package/dist/hooks/{non-interactive-env → system/non-interactive-env}/index.d.ts +0 -0
  150. /package/dist/hooks/{non-interactive-env → system/non-interactive-env}/types.d.ts +0 -0
  151. /package/dist/hooks/{ralph-loop → system/ralph-loop}/constants.d.ts +0 -0
  152. /package/dist/hooks/{ralph-loop → system/ralph-loop}/index.d.ts +0 -0
  153. /package/dist/hooks/{ralph-loop → system/ralph-loop}/storage.d.ts +0 -0
  154. /package/dist/hooks/{task-resume-info → system/task-resume-info}/index.d.ts +0 -0
  155. /package/dist/hooks/{comment-checker → tool-intercept/comment-checker}/cli.d.ts +0 -0
  156. /package/dist/hooks/{comment-checker → tool-intercept/comment-checker}/constants.d.ts +0 -0
  157. /package/dist/hooks/{comment-checker → tool-intercept/comment-checker}/filters/bdd.d.ts +0 -0
  158. /package/dist/hooks/{comment-checker → tool-intercept/comment-checker}/filters/directive.d.ts +0 -0
  159. /package/dist/hooks/{comment-checker → tool-intercept/comment-checker}/filters/docstring.d.ts +0 -0
  160. /package/dist/hooks/{comment-checker → tool-intercept/comment-checker}/filters/index.d.ts +0 -0
  161. /package/dist/hooks/{comment-checker → tool-intercept/comment-checker}/filters/shebang.d.ts +0 -0
  162. /package/dist/hooks/{comment-checker → tool-intercept/comment-checker}/output/formatter.d.ts +0 -0
  163. /package/dist/hooks/{comment-checker → tool-intercept/comment-checker}/output/index.d.ts +0 -0
  164. /package/dist/hooks/{comment-checker → tool-intercept/comment-checker}/output/xml-builder.d.ts +0 -0
  165. /package/dist/hooks/{comment-checker → tool-intercept/comment-checker}/types.d.ts +0 -0
  166. /package/dist/hooks/{composer-md-only → tool-intercept/composer-md-only}/constants.d.ts +0 -0
  167. /package/dist/hooks/{composer-md-only → tool-intercept/composer-md-only}/index.d.ts +0 -0
  168. /package/dist/hooks/{think-mode → tool-intercept/think-mode}/detector.d.ts +0 -0
  169. /package/dist/hooks/{think-mode → tool-intercept/think-mode}/index.d.ts +0 -0
  170. /package/dist/hooks/{think-mode → tool-intercept/think-mode}/switcher.d.ts +0 -0
  171. /package/dist/hooks/{think-mode → tool-intercept/think-mode}/types.d.ts +0 -0
  172. /package/dist/hooks/{thinking-block-validator → tool-intercept/thinking-block-validator}/index.d.ts +0 -0
@@ -8,10 +8,10 @@
8
8
  */
9
9
  export declare function getUserConfigDir(): string;
10
10
  /**
11
- * Returns the full path to the user-level oh-my-opencode config file.
11
+ * Returns the full path to the user-level maestro config file.
12
12
  */
13
13
  export declare function getUserConfigPath(): string;
14
14
  /**
15
- * Returns the full path to the project-level oh-my-opencode config file.
15
+ * Returns the full path to the project-level maestro config file.
16
16
  */
17
17
  export declare function getProjectConfigPath(directory: string): string;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Detects external plugins that may conflict with oh-my-opencode features.
2
+ * Detects external plugins that may conflict with maestro features.
3
3
  * Used to prevent crashes from concurrent notification plugins.
4
4
  */
5
5
  export interface ExternalNotifierResult {
@@ -26,3 +26,4 @@ export * from "./session-cursor";
26
26
  export * from "./shell-env";
27
27
  export * from "./system-directive";
28
28
  export * from "./agent-tool-restrictions";
29
+ export * from "./platform-detection";
@@ -0,0 +1,42 @@
1
+ export type Platform = "opencode" | "claude-code" | "amp" | "codex" | "unknown";
2
+ /**
3
+ * Detect which AI coding platform is running this plugin.
4
+ *
5
+ * Detection priority:
6
+ * 1. Plugin context (for OpenCode - ctx.client exists)
7
+ * 2. Environment variables (most reliable for other platforms)
8
+ * 3. Directory presence (fallback)
9
+ */
10
+ export declare function detectPlatform(ctx?: {
11
+ client?: unknown;
12
+ directory?: string;
13
+ }): Platform;
14
+ /**
15
+ * Check if running on Amp Code with native oracle tool.
16
+ *
17
+ * Amp Code provides oracle/librarian as NATIVE TOOLS, not agents.
18
+ * When true, we should NOT register our Virtuoso/Archivist agents.
19
+ *
20
+ * Detection: Check if platform is Amp or if tool registry contains
21
+ * a tool named "oracle" that is NOT one of our registered agents.
22
+ */
23
+ export declare function hasNativeOracle(ctx?: {
24
+ tools?: Map<string, unknown>;
25
+ }): boolean;
26
+ /**
27
+ * Check if running on Amp Code with native librarian tool.
28
+ * Same logic as hasNativeOracle.
29
+ */
30
+ export declare function hasNativeLibrarian(ctx?: {
31
+ tools?: Map<string, unknown>;
32
+ }): boolean;
33
+ /**
34
+ * Get platform-specific skill directory.
35
+ * Different platforms look for skills in different locations.
36
+ */
37
+ export declare function getSkillDirectory(platform: Platform): string;
38
+ /**
39
+ * Check if we should skip registering our agents because
40
+ * native equivalents exist on the current platform.
41
+ */
42
+ export declare function shouldSkipAgent(agentName: string): boolean;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Unified system directive prefix for oh-my-opencode internal messages.
2
+ * Unified system directive prefix for maestro internal messages.
3
3
  * All system-generated messages should use this prefix for consistent filtering.
4
4
  *
5
5
  * Format: [SYSTEM DIRECTIVE: OH-MY-OPENCODE - {TYPE}]
@@ -12,7 +12,7 @@ export declare const SYSTEM_DIRECTIVE_PREFIX = "[SYSTEM DIRECTIVE: OH-MY-OPENCOD
12
12
  */
13
13
  export declare function createSystemDirective(type: string): string;
14
14
  /**
15
- * Checks if a message starts with the oh-my-opencode system directive prefix.
15
+ * Checks if a message starts with the maestro system directive prefix.
16
16
  * Used by keyword-detector and other hooks to skip system-generated messages.
17
17
  * @param text - The message text to check
18
18
  * @returns true if the message is a system directive
@@ -1,5 +1,5 @@
1
1
  import { type PluginInput, type ToolDefinition } from "@opencode-ai/plugin";
2
- import type { BackgroundManager } from "../../features/background-agent";
2
+ import type { BackgroundManager } from "../../features/background/agent";
3
3
  type OpencodeClient = PluginInput["client"];
4
4
  export declare function createBackgroundTask(manager: BackgroundManager): ToolDefinition;
5
5
  export declare function createBackgroundOutput(manager: BackgroundManager, client: OpencodeClient): ToolDefinition;
@@ -1,3 +1,3 @@
1
1
  import { type PluginInput, type ToolDefinition } from "@opencode-ai/plugin";
2
- import type { BackgroundManager } from "../../features/background-agent";
2
+ import type { BackgroundManager } from "../../features/background/agent";
3
3
  export declare function createCallOmoAgent(ctx: PluginInput, backgroundManager: BackgroundManager): ToolDefinition;
@@ -1,5 +1,5 @@
1
1
  import { type PluginInput, type ToolDefinition } from "@opencode-ai/plugin";
2
- import type { BackgroundManager } from "../../features/background-agent";
2
+ import type { BackgroundManager } from "../../features/background/agent";
3
3
  import type { CategoriesConfig, GitMasterConfig } from "../../config/schema";
4
4
  type OpencodeClient = PluginInput["client"];
5
5
  export interface DelegateTaskToolOptions {
@@ -7,7 +7,7 @@ export { createSkillTool } from "./skill";
7
7
  export { getTmuxPath } from "./interactive-bash/utils";
8
8
  export { createSkillMcpTool } from "./skill-mcp";
9
9
  import type { PluginInput, ToolDefinition } from "@opencode-ai/plugin";
10
- import type { BackgroundManager } from "../features/background-agent";
10
+ import type { BackgroundManager } from "../features/background/agent";
11
11
  type OpencodeClient = PluginInput["client"];
12
12
  export { createCallOmoAgent } from "./call-omo-agent";
13
13
  export { createLookAt } from "./look-at";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reinamaccredy/maestro",
3
- "version": "1.0.1",
3
+ "version": "1.2.0",
4
4
  "description": "Maestro - Context-driven development for AI coding agents with music-themed orchestration",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/postinstall.mjs CHANGED
@@ -1,10 +1,16 @@
1
1
  // postinstall.mjs
2
- // Runs after npm install to verify platform binary is available
2
+ // Runs after npm install to:
3
+ // 1. Verify platform binary is available
4
+ // 2. Create skill symlinks for multi-platform compatibility
3
5
 
4
6
  import { createRequire } from "node:module";
7
+ import { existsSync, symlinkSync, mkdirSync, realpathSync, lstatSync } from "node:fs";
8
+ import { join, dirname } from "node:path";
9
+ import { fileURLToPath } from "node:url";
5
10
  import { getPlatformPackage, getBinaryPath } from "./bin/platform.js";
6
11
 
7
12
  const require = createRequire(import.meta.url);
13
+ const __dirname = dirname(fileURLToPath(import.meta.url));
8
14
 
9
15
  /**
10
16
  * Detect libc family on Linux
@@ -22,7 +28,89 @@ function getLibcFamily() {
22
28
  }
23
29
  }
24
30
 
25
- function main() {
31
+ /**
32
+ * Check if path is a symlink
33
+ */
34
+ function isSymlink(path) {
35
+ try {
36
+ return lstatSync(path).isSymbolicLink();
37
+ } catch {
38
+ return false;
39
+ }
40
+ }
41
+
42
+ /**
43
+ * Create skill symlinks for multi-platform compatibility.
44
+ * Creates symlinks from platform-specific skill directories to our builtin-skills.
45
+ */
46
+ function createSkillSymlinks() {
47
+ // Skills are in the npm package at src/features/builtin-skills/
48
+ // __dirname is the package root (where postinstall.mjs lives)
49
+ const skillsSource = join(__dirname, "src", "features", "builtin-skills");
50
+
51
+ // Verify skills source exists (should always exist in published package)
52
+ if (!existsSync(skillsSource)) {
53
+ console.log("[SKIP] Skills source not found (development install?)");
54
+ return;
55
+ }
56
+
57
+ // User's project root (where npm install was run)
58
+ const projectRoot = process.cwd();
59
+
60
+ // Skip if we're in the package directory itself (development)
61
+ if (projectRoot === __dirname) {
62
+ console.log("[SKIP] Development install detected");
63
+ return;
64
+ }
65
+
66
+ const symlinks = [
67
+ { target: ".claude/skills", platform: "claude-code" },
68
+ { target: ".opencode/skill", platform: "opencode" },
69
+ { target: ".codex/skills", platform: "codex" },
70
+ { target: ".agents/skills", platform: "amp" },
71
+ ];
72
+
73
+ console.log("Creating skill symlinks...");
74
+
75
+ for (const { target, platform } of symlinks) {
76
+ const targetPath = join(projectRoot, target);
77
+ const targetDir = dirname(targetPath);
78
+
79
+ // Don't overwrite existing directories/files (unless it's our symlink)
80
+ if (existsSync(targetPath) && !isSymlink(targetPath)) {
81
+ console.log(` [SKIP] ${target} already exists (${platform})`);
82
+ continue;
83
+ }
84
+
85
+ // If it's an existing symlink, skip (already set up)
86
+ if (isSymlink(targetPath)) {
87
+ console.log(` [OK] ${target} symlink exists (${platform})`);
88
+ continue;
89
+ }
90
+
91
+ try {
92
+ // Create parent directory if needed
93
+ if (!existsSync(targetDir)) {
94
+ mkdirSync(targetDir, { recursive: true });
95
+ }
96
+
97
+ // On Windows, use junction (doesn't require admin)
98
+ // On Unix, use absolute path for reliability
99
+ if (process.platform === "win32") {
100
+ symlinkSync(skillsSource, targetPath, "junction");
101
+ } else {
102
+ const absoluteSource = realpathSync(skillsSource);
103
+ symlinkSync(absoluteSource, targetPath);
104
+ }
105
+ console.log(` [OK] Created ${target} -> builtin-skills (${platform})`);
106
+ } catch (error) {
107
+ // Warn but don't fail installation
108
+ console.warn(` [WARN] Failed to create ${target}: ${error.message}`);
109
+ }
110
+ }
111
+ }
112
+
113
+ function checkBinary() {
26
114
  const { platform, arch } = process;
27
115
  const libcFamily = getLibcFamily();
28
116
 
@@ -32,12 +120,17 @@ function main() {
32
120
 
33
121
  // Try to resolve the binary
34
122
  require.resolve(binPath);
35
- console.log(`✓ oh-my-opencode binary installed for ${platform}-${arch}`);
123
+ console.log(`[OK] Maestro binary installed for ${platform}-${arch}`);
36
124
  } catch (error) {
37
- console.warn(`⚠ oh-my-opencode: ${error.message}`);
125
+ console.warn(`[WARN] Maestro: ${error.message}`);
38
126
  console.warn(` The CLI may not work on this platform.`);
39
127
  // Don't fail installation - let user try anyway
40
128
  }
41
129
  }
42
130
 
131
+ function main() {
132
+ checkBinary();
133
+ createSkillSymlinks();
134
+ }
135
+
43
136
  main();