@adaptic/maestro 1.9.5 → 1.10.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/lib/claude-bin.mjs
CHANGED
|
@@ -49,6 +49,33 @@ export function resolveClaudeBin() {
|
|
|
49
49
|
return _resolved;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
+
/**
|
|
53
|
+
* Default args every daemon-spawned `claude --print` should receive on
|
|
54
|
+
* top of the prompt + model selection. Currently:
|
|
55
|
+
*
|
|
56
|
+
* --strict-mcp-config
|
|
57
|
+
* Skip every globally-installed Claude Code MCP plugin (Serena,
|
|
58
|
+
* Playwright, etc). Daemon spawns don't need IDE-grade code
|
|
59
|
+
* intelligence; they need to write a Slack reply / draft an email
|
|
60
|
+
* / classify an item. Loading MCPs wastes 3-5s per spawn AND opens
|
|
61
|
+
* a browser dashboard tab per session (Serena does this).
|
|
62
|
+
*
|
|
63
|
+
* --bare (opt-in via DAEMON_BARE_MODE=1)
|
|
64
|
+
* Skip hooks, LSP, plugin sync, auto-memory, keychain reads. Even
|
|
65
|
+
* more minimal. Use when you specifically want a stateless spawn —
|
|
66
|
+
* but it disables Keychain OAuth, so MAESTRO_PREFER_SUBSCRIPTION_AUTH
|
|
67
|
+
* callers should NOT set this.
|
|
68
|
+
*
|
|
69
|
+
* Operators who want full MCP support on daemon spawns can set
|
|
70
|
+
* DAEMON_LOAD_MCPS=1 in .env; the spawn sites will skip these flags.
|
|
71
|
+
*/
|
|
72
|
+
export function daemonClaudeArgs() {
|
|
73
|
+
if (process.env.DAEMON_LOAD_MCPS === "1") return [];
|
|
74
|
+
const args = ["--strict-mcp-config"];
|
|
75
|
+
if (process.env.DAEMON_BARE_MODE === "1") args.unshift("--bare");
|
|
76
|
+
return args;
|
|
77
|
+
}
|
|
78
|
+
|
|
52
79
|
/**
|
|
53
80
|
* Build a PATH suitable for child processes spawned from a daemon.
|
|
54
81
|
* launchd strips PATH down to /usr/bin:/bin; this returns a string that
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptic/maestro",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.0",
|
|
4
4
|
"description": "Maestro — Autonomous AI agent operating system. Deploy AI employees on dedicated Mac minis.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
},
|
|
47
47
|
"always-build-npm": true,
|
|
48
48
|
"scripts": {
|
|
49
|
-
"test": "node --test lib/cadence-bus.test.mjs scripts/cadence/enqueue-cadence-tick.test.mjs scripts/daemon/cadence-consumer.test.mjs scripts/daemon/dispatcher-cooldown.test.mjs scripts/daemon/lib/session-router.test.mjs scripts/local-triggers/generate-plists.test.mjs bin/maestro.test.mjs",
|
|
49
|
+
"test": "node --test lib/cadence-bus.test.mjs scripts/cadence/enqueue-cadence-tick.test.mjs scripts/daemon/cadence-consumer.test.mjs scripts/daemon/dispatcher-cooldown.test.mjs scripts/daemon/lib/session-router.test.mjs scripts/local-triggers/generate-plists.test.mjs scripts/poller/slack-socket-mode.test.mjs bin/maestro.test.mjs",
|
|
50
50
|
"test:cadence": "node --test lib/cadence-bus.test.mjs scripts/cadence/enqueue-cadence-tick.test.mjs scripts/daemon/cadence-consumer.test.mjs",
|
|
51
51
|
"test:cli": "node --test bin/maestro.test.mjs",
|
|
52
52
|
"test:plists": "node --test scripts/local-triggers/generate-plists.test.mjs",
|
|
@@ -59,7 +59,7 @@ import {
|
|
|
59
59
|
logBusEvent,
|
|
60
60
|
busDepth,
|
|
61
61
|
} from "../../lib/cadence-bus.mjs";
|
|
62
|
-
import { resolveClaudeBin as sharedResolveClaude, augmentedPath } from "../../lib/claude-bin.mjs";
|
|
62
|
+
import { resolveClaudeBin as sharedResolveClaude, augmentedPath, daemonClaudeArgs } from "../../lib/claude-bin.mjs";
|
|
63
63
|
import { getCadenceDef } from "./cadence-handlers.mjs";
|
|
64
64
|
|
|
65
65
|
// ---------------------------------------------------------------------------
|
|
@@ -135,7 +135,7 @@ function realSpawnSession({ agentRoot, cadence, promptPath, timeoutMs, log }) {
|
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
const bin = resolveClaudeBin();
|
|
138
|
-
const args = ["--print", "--dangerously-skip-permissions", body];
|
|
138
|
+
const args = ["--print", "--dangerously-skip-permissions", ...daemonClaudeArgs(), body];
|
|
139
139
|
// PATH augmented via lib/claude-bin.mjs so subsession can find jq/node.
|
|
140
140
|
const env = {
|
|
141
141
|
...process.env,
|
|
@@ -103,7 +103,7 @@ function loadAgentRegistry() {
|
|
|
103
103
|
const ANTHROPIC_MODEL = "claude-haiku-4-5-20251001";
|
|
104
104
|
const OPENAI_MODEL = "gpt-4o-mini";
|
|
105
105
|
// Resolve claude against the agent's PATH (not launchd's bare env).
|
|
106
|
-
import { resolveClaudeBin, augmentedPath } from "../../lib/claude-bin.mjs";
|
|
106
|
+
import { resolveClaudeBin, augmentedPath, daemonClaudeArgs } from "../../lib/claude-bin.mjs";
|
|
107
107
|
const CLAUDE_BIN = resolveClaudeBin();
|
|
108
108
|
const CLAUDE_CLI_TIMEOUT_MS = 30_000;
|
|
109
109
|
|
|
@@ -314,6 +314,7 @@ async function runClaudeCLI(systemPrompt, userPrompt) {
|
|
|
314
314
|
const args = [
|
|
315
315
|
"--print",
|
|
316
316
|
"--dangerously-skip-permissions",
|
|
317
|
+
...daemonClaudeArgs(),
|
|
317
318
|
"--model", ANTHROPIC_MODEL,
|
|
318
319
|
"--append-system-prompt", systemPrompt,
|
|
319
320
|
];
|
|
@@ -11,7 +11,7 @@ import { recordSession } from "./health.mjs";
|
|
|
11
11
|
const AGENT_REPO_DIR = process.env.AGENT_DIR || join(new URL(".", import.meta.url).pathname, "../..");
|
|
12
12
|
// Resolve the claude binary against the agent's PATH (not launchd's bare
|
|
13
13
|
// env). Without this, every daemon-spawned `claude --print` exits ENOENT.
|
|
14
|
-
import { resolveClaudeBin, augmentedPath } from "../../lib/claude-bin.mjs";
|
|
14
|
+
import { resolveClaudeBin, augmentedPath, daemonClaudeArgs } from "../../lib/claude-bin.mjs";
|
|
15
15
|
const CLAUDE_BIN = resolveClaudeBin();
|
|
16
16
|
const MAX_CONCURRENT = parseInt(process.env.DAEMON_MAX_CONCURRENT || "10", 10);
|
|
17
17
|
const RESERVED_INBOX_SLOTS = 3; // Always keep 3 slots free for real-time inbox items
|
|
@@ -318,6 +318,7 @@ function spawnSession(entry) {
|
|
|
318
318
|
const args = [
|
|
319
319
|
"--print",
|
|
320
320
|
"--dangerously-skip-permissions",
|
|
321
|
+
...daemonClaudeArgs(),
|
|
321
322
|
"--model", model,
|
|
322
323
|
prompt,
|
|
323
324
|
];
|
|
@@ -26,7 +26,7 @@ import { routingKey as deriveRoutingKey, createRouter } from "./lib/session-rout
|
|
|
26
26
|
const AGENT_REPO_DIR = process.env.AGENT_DIR || join(new URL(".", import.meta.url).pathname, "../..");
|
|
27
27
|
const SONNET_MODEL = "claude-sonnet-4-6";
|
|
28
28
|
// Resolve claude against the agent's PATH (not launchd's bare env).
|
|
29
|
-
import { resolveClaudeBin, augmentedPath } from "../../lib/claude-bin.mjs";
|
|
29
|
+
import { resolveClaudeBin, augmentedPath, daemonClaudeArgs } from "../../lib/claude-bin.mjs";
|
|
30
30
|
const CLAUDE_BIN = resolveClaudeBin();
|
|
31
31
|
const CLAUDE_CLI_TIMEOUT_MS = 60_000;
|
|
32
32
|
const SESSION_REGISTRY_PATH = join(AGENT_REPO_DIR, "state", "daemon", "session-router-registry.json");
|
|
@@ -129,6 +129,7 @@ function runClaudeCLI(systemPrompt, userPrompt, model, opts = {}) {
|
|
|
129
129
|
const args = [
|
|
130
130
|
"--print",
|
|
131
131
|
"--dangerously-skip-permissions",
|
|
132
|
+
...daemonClaudeArgs(),
|
|
132
133
|
"--model", model,
|
|
133
134
|
"--append-system-prompt", systemPrompt,
|
|
134
135
|
];
|