@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.
- package/bin/maestro.js +4 -4
- package/bin/platform.js +4 -4
- package/bin/platform.test.ts +13 -13
- package/dist/agents/execution/index.d.ts +4 -0
- package/dist/agents/{scribe.d.ts → execution/scribe.d.ts} +1 -1
- package/dist/agents/{soloist.d.ts → execution/soloist.d.ts} +1 -1
- package/dist/agents/{virtuoso.d.ts → execution/virtuoso.d.ts} +1 -1
- package/dist/agents/index.d.ts +6 -1
- package/dist/agents/{arranger.d.ts → orchestration/arranger.d.ts} +1 -1
- package/dist/agents/{conductor.d.ts → orchestration/conductor.d.ts} +3 -3
- package/dist/agents/orchestration/index.d.ts +4 -0
- package/dist/agents/{maestro.d.ts → orchestration/maestro.d.ts} +1 -1
- package/dist/agents/{maestro-prompt-builder.d.ts → orchestration/prompt-builder.d.ts} +1 -1
- package/dist/agents/{designer.d.ts → planning/designer.d.ts} +1 -1
- package/dist/agents/planning/index.d.ts +3 -0
- package/dist/agents/{analyst.d.ts → research/analyst.d.ts} +1 -1
- package/dist/agents/{archivist.d.ts → research/archivist.d.ts} +1 -1
- package/dist/agents/research/index.d.ts +3 -0
- package/dist/agents/{scout.d.ts → research/scout.d.ts} +1 -1
- package/dist/agents/{critic.d.ts → review/critic.d.ts} +1 -1
- package/dist/agents/review/index.d.ts +1 -0
- package/dist/agents/utils.d.ts +1 -1
- package/dist/cli/doctor/constants.d.ts +1 -1
- package/dist/cli/index.js +49 -45
- package/dist/features/{background-agent → background/agent}/concurrency.d.ts +1 -1
- package/dist/features/{background-agent → background/agent}/manager.d.ts +1 -1
- package/dist/features/background/index.d.ts +2 -0
- package/dist/features/{task-toast-manager → background/toast-manager}/manager.d.ts +1 -1
- package/dist/features/builtin-commands/types.d.ts +1 -1
- package/dist/features/loaders/index.d.ts +4 -0
- package/dist/features/{claude-code-plugin-loader → loaders/plugin-loader}/loader.d.ts +2 -2
- package/dist/features/{claude-code-plugin-loader → loaders/plugin-loader}/types.d.ts +1 -1
- package/dist/features/opencode-skill-loader/loader.d.ts +1 -1
- package/dist/features/opencode-skill-loader/types.d.ts +1 -1
- package/dist/features/skill-mcp-manager/manager.d.ts +1 -1
- package/dist/features/skill-mcp-manager/types.d.ts +1 -1
- package/dist/features/state/index.d.ts +2 -0
- package/dist/hooks/context/index.d.ts +4 -0
- package/dist/hooks/{anthropic-context-window-limit-recovery → error-recovery/anthropic-context-window-limit-recovery}/executor.d.ts +1 -1
- package/dist/hooks/{anthropic-context-window-limit-recovery → error-recovery/anthropic-context-window-limit-recovery}/index.d.ts +1 -1
- package/dist/hooks/{anthropic-context-window-limit-recovery → error-recovery/anthropic-context-window-limit-recovery}/pruning-executor.d.ts +1 -1
- package/dist/hooks/error-recovery/index.d.ts +3 -0
- package/dist/hooks/index.d.ts +6 -25
- package/dist/hooks/{auto-slash-command → input/auto-slash-command}/executor.d.ts +1 -1
- package/dist/hooks/{auto-slash-command → input/auto-slash-command}/index.d.ts +1 -1
- package/dist/hooks/input/index.d.ts +3 -0
- package/dist/hooks/{keyword-detector → input/keyword-detector}/index.d.ts +1 -1
- package/dist/hooks/{auto-update-checker → lifecycle/auto-update-checker}/constants.d.ts +2 -2
- package/dist/hooks/lifecycle/index.d.ts +3 -0
- package/dist/hooks/{session-recovery → lifecycle/session-recovery}/index.d.ts +1 -1
- package/dist/hooks/{background-compaction → system/background-compaction}/index.d.ts +1 -1
- package/dist/hooks/{background-notification → system/background-notification}/index.d.ts +1 -1
- package/dist/hooks/{background-notification → system/background-notification}/types.d.ts +1 -1
- package/dist/hooks/system/index.d.ts +8 -0
- package/dist/hooks/{maestro-orchestrator → system/maestro-orchestrator}/index.d.ts +1 -1
- package/dist/hooks/{ralph-loop → system/ralph-loop}/types.d.ts +1 -1
- package/dist/hooks/todo-continuation-enforcer.d.ts +1 -1
- package/dist/hooks/{comment-checker → tool-intercept/comment-checker}/downloader.d.ts +1 -1
- package/dist/hooks/{comment-checker → tool-intercept/comment-checker}/index.d.ts +1 -1
- package/dist/hooks/tool-intercept/index.d.ts +4 -0
- package/dist/index.js +12334 -12297
- package/dist/shared/config-path.d.ts +2 -2
- package/dist/shared/external-plugin-detector.d.ts +1 -1
- package/dist/shared/index.d.ts +1 -0
- package/dist/shared/platform-detection.d.ts +42 -0
- package/dist/shared/system-directive.d.ts +2 -2
- package/dist/tools/background-task/tools.d.ts +1 -1
- package/dist/tools/call-omo-agent/tools.d.ts +1 -1
- package/dist/tools/delegate-task/tools.d.ts +1 -1
- package/dist/tools/index.d.ts +1 -1
- package/package.json +1 -1
- package/postinstall.mjs +97 -4
- /package/dist/agents/{build-prompt.d.ts → execution/build-prompt.d.ts} +0 -0
- /package/dist/agents/{composer.d.ts → planning/composer.d.ts} +0 -0
- /package/dist/agents/{plan-prompt.d.ts → planning/plan-prompt.d.ts} +0 -0
- /package/dist/features/{background-agent → background/agent}/index.d.ts +0 -0
- /package/dist/features/{background-agent → background/agent}/types.d.ts +0 -0
- /package/dist/features/{task-toast-manager → background/toast-manager}/index.d.ts +0 -0
- /package/dist/features/{task-toast-manager → background/toast-manager}/types.d.ts +0 -0
- /package/dist/features/{claude-code-agent-loader → loaders/agent-loader}/index.d.ts +0 -0
- /package/dist/features/{claude-code-agent-loader → loaders/agent-loader}/loader.d.ts +0 -0
- /package/dist/features/{claude-code-agent-loader → loaders/agent-loader}/types.d.ts +0 -0
- /package/dist/features/{claude-code-command-loader → loaders/command-loader}/index.d.ts +0 -0
- /package/dist/features/{claude-code-command-loader → loaders/command-loader}/loader.d.ts +0 -0
- /package/dist/features/{claude-code-command-loader → loaders/command-loader}/types.d.ts +0 -0
- /package/dist/features/{claude-code-mcp-loader → loaders/mcp-loader}/env-expander.d.ts +0 -0
- /package/dist/features/{claude-code-mcp-loader → loaders/mcp-loader}/index.d.ts +0 -0
- /package/dist/features/{claude-code-mcp-loader → loaders/mcp-loader}/loader.d.ts +0 -0
- /package/dist/features/{claude-code-mcp-loader → loaders/mcp-loader}/transformer.d.ts +0 -0
- /package/dist/features/{claude-code-mcp-loader → loaders/mcp-loader}/types.d.ts +0 -0
- /package/dist/features/{claude-code-plugin-loader → loaders/plugin-loader}/index.d.ts +0 -0
- /package/dist/features/{boulder-state → state/boulder-state}/constants.d.ts +0 -0
- /package/dist/features/{boulder-state → state/boulder-state}/index.d.ts +0 -0
- /package/dist/features/{boulder-state → state/boulder-state}/storage.d.ts +0 -0
- /package/dist/features/{boulder-state → state/boulder-state}/types.d.ts +0 -0
- /package/dist/features/{claude-code-session-state → state/session-state}/index.d.ts +0 -0
- /package/dist/features/{claude-code-session-state → state/session-state}/state.d.ts +0 -0
- /package/dist/hooks/{compaction-context-injector → context/compaction-context-injector}/index.d.ts +0 -0
- /package/dist/hooks/{directory-agents-injector → context/directory-agents-injector}/constants.d.ts +0 -0
- /package/dist/hooks/{directory-agents-injector → context/directory-agents-injector}/index.d.ts +0 -0
- /package/dist/hooks/{directory-agents-injector → context/directory-agents-injector}/storage.d.ts +0 -0
- /package/dist/hooks/{directory-agents-injector → context/directory-agents-injector}/types.d.ts +0 -0
- /package/dist/hooks/{directory-readme-injector → context/directory-readme-injector}/constants.d.ts +0 -0
- /package/dist/hooks/{directory-readme-injector → context/directory-readme-injector}/index.d.ts +0 -0
- /package/dist/hooks/{directory-readme-injector → context/directory-readme-injector}/storage.d.ts +0 -0
- /package/dist/hooks/{directory-readme-injector → context/directory-readme-injector}/types.d.ts +0 -0
- /package/dist/hooks/{rules-injector → context/rules-injector}/constants.d.ts +0 -0
- /package/dist/hooks/{rules-injector → context/rules-injector}/finder.d.ts +0 -0
- /package/dist/hooks/{rules-injector → context/rules-injector}/index.d.ts +0 -0
- /package/dist/hooks/{rules-injector → context/rules-injector}/matcher.d.ts +0 -0
- /package/dist/hooks/{rules-injector → context/rules-injector}/parser.d.ts +0 -0
- /package/dist/hooks/{rules-injector → context/rules-injector}/storage.d.ts +0 -0
- /package/dist/hooks/{rules-injector → context/rules-injector}/types.d.ts +0 -0
- /package/dist/hooks/{anthropic-context-window-limit-recovery → error-recovery/anthropic-context-window-limit-recovery}/parser.d.ts +0 -0
- /package/dist/hooks/{anthropic-context-window-limit-recovery → error-recovery/anthropic-context-window-limit-recovery}/pruning-deduplication.d.ts +0 -0
- /package/dist/hooks/{anthropic-context-window-limit-recovery → error-recovery/anthropic-context-window-limit-recovery}/pruning-purge-errors.d.ts +0 -0
- /package/dist/hooks/{anthropic-context-window-limit-recovery → error-recovery/anthropic-context-window-limit-recovery}/pruning-storage.d.ts +0 -0
- /package/dist/hooks/{anthropic-context-window-limit-recovery → error-recovery/anthropic-context-window-limit-recovery}/pruning-supersede.d.ts +0 -0
- /package/dist/hooks/{anthropic-context-window-limit-recovery → error-recovery/anthropic-context-window-limit-recovery}/pruning-types.d.ts +0 -0
- /package/dist/hooks/{anthropic-context-window-limit-recovery → error-recovery/anthropic-context-window-limit-recovery}/storage.d.ts +0 -0
- /package/dist/hooks/{anthropic-context-window-limit-recovery → error-recovery/anthropic-context-window-limit-recovery}/types.d.ts +0 -0
- /package/dist/hooks/{delegate-task-retry → error-recovery/delegate-task-retry}/index.d.ts +0 -0
- /package/dist/hooks/{edit-error-recovery → error-recovery/edit-error-recovery}/index.d.ts +0 -0
- /package/dist/hooks/{auto-slash-command → input/auto-slash-command}/constants.d.ts +0 -0
- /package/dist/hooks/{auto-slash-command → input/auto-slash-command}/detector.d.ts +0 -0
- /package/dist/hooks/{auto-slash-command → input/auto-slash-command}/types.d.ts +0 -0
- /package/dist/hooks/{empty-message-sanitizer → input/empty-message-sanitizer}/index.d.ts +0 -0
- /package/dist/hooks/{keyword-detector → input/keyword-detector}/constants.d.ts +0 -0
- /package/dist/hooks/{keyword-detector → input/keyword-detector}/detector.d.ts +0 -0
- /package/dist/hooks/{keyword-detector → input/keyword-detector}/types.d.ts +0 -0
- /package/dist/hooks/{auto-update-checker → lifecycle/auto-update-checker}/cache.d.ts +0 -0
- /package/dist/hooks/{auto-update-checker → lifecycle/auto-update-checker}/checker.d.ts +0 -0
- /package/dist/hooks/{auto-update-checker → lifecycle/auto-update-checker}/index.d.ts +0 -0
- /package/dist/hooks/{auto-update-checker → lifecycle/auto-update-checker}/types.d.ts +0 -0
- /package/dist/hooks/{session-recovery → lifecycle/session-recovery}/constants.d.ts +0 -0
- /package/dist/hooks/{session-recovery → lifecycle/session-recovery}/storage.d.ts +0 -0
- /package/dist/hooks/{session-recovery → lifecycle/session-recovery}/types.d.ts +0 -0
- /package/dist/hooks/{start-work → lifecycle/start-work}/index.d.ts +0 -0
- /package/dist/hooks/{agent-usage-reminder → system/agent-usage-reminder}/constants.d.ts +0 -0
- /package/dist/hooks/{agent-usage-reminder → system/agent-usage-reminder}/index.d.ts +0 -0
- /package/dist/hooks/{agent-usage-reminder → system/agent-usage-reminder}/storage.d.ts +0 -0
- /package/dist/hooks/{agent-usage-reminder → system/agent-usage-reminder}/types.d.ts +0 -0
- /package/dist/hooks/{interactive-bash-session → system/interactive-bash-session}/constants.d.ts +0 -0
- /package/dist/hooks/{interactive-bash-session → system/interactive-bash-session}/index.d.ts +0 -0
- /package/dist/hooks/{interactive-bash-session → system/interactive-bash-session}/storage.d.ts +0 -0
- /package/dist/hooks/{interactive-bash-session → system/interactive-bash-session}/types.d.ts +0 -0
- /package/dist/hooks/{non-interactive-env → system/non-interactive-env}/constants.d.ts +0 -0
- /package/dist/hooks/{non-interactive-env → system/non-interactive-env}/detector.d.ts +0 -0
- /package/dist/hooks/{non-interactive-env → system/non-interactive-env}/index.d.ts +0 -0
- /package/dist/hooks/{non-interactive-env → system/non-interactive-env}/types.d.ts +0 -0
- /package/dist/hooks/{ralph-loop → system/ralph-loop}/constants.d.ts +0 -0
- /package/dist/hooks/{ralph-loop → system/ralph-loop}/index.d.ts +0 -0
- /package/dist/hooks/{ralph-loop → system/ralph-loop}/storage.d.ts +0 -0
- /package/dist/hooks/{task-resume-info → system/task-resume-info}/index.d.ts +0 -0
- /package/dist/hooks/{comment-checker → tool-intercept/comment-checker}/cli.d.ts +0 -0
- /package/dist/hooks/{comment-checker → tool-intercept/comment-checker}/constants.d.ts +0 -0
- /package/dist/hooks/{comment-checker → tool-intercept/comment-checker}/filters/bdd.d.ts +0 -0
- /package/dist/hooks/{comment-checker → tool-intercept/comment-checker}/filters/directive.d.ts +0 -0
- /package/dist/hooks/{comment-checker → tool-intercept/comment-checker}/filters/docstring.d.ts +0 -0
- /package/dist/hooks/{comment-checker → tool-intercept/comment-checker}/filters/index.d.ts +0 -0
- /package/dist/hooks/{comment-checker → tool-intercept/comment-checker}/filters/shebang.d.ts +0 -0
- /package/dist/hooks/{comment-checker → tool-intercept/comment-checker}/output/formatter.d.ts +0 -0
- /package/dist/hooks/{comment-checker → tool-intercept/comment-checker}/output/index.d.ts +0 -0
- /package/dist/hooks/{comment-checker → tool-intercept/comment-checker}/output/xml-builder.d.ts +0 -0
- /package/dist/hooks/{comment-checker → tool-intercept/comment-checker}/types.d.ts +0 -0
- /package/dist/hooks/{composer-md-only → tool-intercept/composer-md-only}/constants.d.ts +0 -0
- /package/dist/hooks/{composer-md-only → tool-intercept/composer-md-only}/index.d.ts +0 -0
- /package/dist/hooks/{think-mode → tool-intercept/think-mode}/detector.d.ts +0 -0
- /package/dist/hooks/{think-mode → tool-intercept/think-mode}/index.d.ts +0 -0
- /package/dist/hooks/{think-mode → tool-intercept/think-mode}/switcher.d.ts +0 -0
- /package/dist/hooks/{think-mode → tool-intercept/think-mode}/types.d.ts +0 -0
- /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
|
|
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
|
|
15
|
+
* Returns the full path to the project-level maestro config file.
|
|
16
16
|
*/
|
|
17
17
|
export declare function getProjectConfigPath(directory: string): string;
|
package/dist/shared/index.d.ts
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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 {
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -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
|
|
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
package/postinstall.mjs
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
// postinstall.mjs
|
|
2
|
-
// Runs after npm install to
|
|
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
|
-
|
|
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(
|
|
123
|
+
console.log(`[OK] Maestro binary installed for ${platform}-${arch}`);
|
|
36
124
|
} catch (error) {
|
|
37
|
-
console.warn(
|
|
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();
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/hooks/{compaction-context-injector → context/compaction-context-injector}/index.d.ts
RENAMED
|
File without changes
|
/package/dist/hooks/{directory-agents-injector → context/directory-agents-injector}/constants.d.ts
RENAMED
|
File without changes
|
/package/dist/hooks/{directory-agents-injector → context/directory-agents-injector}/index.d.ts
RENAMED
|
File without changes
|
/package/dist/hooks/{directory-agents-injector → context/directory-agents-injector}/storage.d.ts
RENAMED
|
File without changes
|
/package/dist/hooks/{directory-agents-injector → context/directory-agents-injector}/types.d.ts
RENAMED
|
File without changes
|
/package/dist/hooks/{directory-readme-injector → context/directory-readme-injector}/constants.d.ts
RENAMED
|
File without changes
|
/package/dist/hooks/{directory-readme-injector → context/directory-readme-injector}/index.d.ts
RENAMED
|
File without changes
|
/package/dist/hooks/{directory-readme-injector → context/directory-readme-injector}/storage.d.ts
RENAMED
|
File without changes
|
/package/dist/hooks/{directory-readme-injector → context/directory-readme-injector}/types.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/hooks/{interactive-bash-session → system/interactive-bash-session}/constants.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/hooks/{interactive-bash-session → system/interactive-bash-session}/storage.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/hooks/{comment-checker → tool-intercept/comment-checker}/filters/directive.d.ts
RENAMED
|
File without changes
|
/package/dist/hooks/{comment-checker → tool-intercept/comment-checker}/filters/docstring.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/hooks/{comment-checker → tool-intercept/comment-checker}/output/formatter.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/hooks/{comment-checker → tool-intercept/comment-checker}/output/xml-builder.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/hooks/{thinking-block-validator → tool-intercept/thinking-block-validator}/index.d.ts
RENAMED
|
File without changes
|