@hyperwindmill/caretaker-cli 0.13.1 → 0.14.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/dist/cli/config_claude.d.ts +9 -0
- package/dist/cli/config_claude.d.ts.map +1 -0
- package/dist/cli/config_claude.js +62 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +15 -0
- package/dist/cli/mcp.d.ts +2 -0
- package/dist/cli/mcp.d.ts.map +1 -0
- package/dist/cli/mcp.js +17 -0
- package/dist/cli/web/mcp_bridge.d.ts.map +1 -1
- package/dist/cli/web/mcp_bridge.js +2 -44
- package/dist/harness/claude_code_runner.d.ts +3 -0
- package/dist/harness/claude_code_runner.d.ts.map +1 -1
- package/dist/harness/claude_code_runner.js +6 -2
- package/dist/index.js +21 -15
- package/dist/mcp/task_server.d.ts +9 -0
- package/dist/mcp/task_server.d.ts.map +1 -0
- package/dist/mcp/task_server.js +48 -0
- package/dist/tui/agents.d.ts.map +1 -1
- package/dist/tui/agents.js +16 -5
- package/dist/webview/standalone.js +41 -16
- package/dist/webview/standalone.js.map +2 -2
- package/package.json +3 -3
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Runs a command and normalizes the result to a plain exit code + output,
|
|
2
|
+
* so a non-zero exit is data (not a throw). Injectable for tests. */
|
|
3
|
+
export type Runner = (cmd: string, args: string[]) => Promise<{
|
|
4
|
+
stdout: string;
|
|
5
|
+
stderr: string;
|
|
6
|
+
code: number;
|
|
7
|
+
}>;
|
|
8
|
+
export declare function configureClaude(run?: Runner, log?: (msg: string) => void): Promise<number>;
|
|
9
|
+
//# sourceMappingURL=config_claude.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config_claude.d.ts","sourceRoot":"","sources":["../../src/cli/config_claude.ts"],"names":[],"mappings":"AAiBA;sEACsE;AACtE,MAAM,MAAM,MAAM,GAAG,CACnB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EAAE,KACX,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAgB/D,wBAAsB,eAAe,CACnC,GAAG,GAAE,MAAsB,EAC3B,GAAG,GAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAkB,GACvC,OAAO,CAAC,MAAM,CAAC,CAoCjB"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// `caretaker-cli config claude` — one-shot setup that registers caretaker's
|
|
2
|
+
// stdio MCP server (`caretaker-cli mcp`) in the user's Claude Code config, so
|
|
3
|
+
// an external Claude Code session can drive caretaker's task/project tools.
|
|
4
|
+
//
|
|
5
|
+
// This lives in the CLI (not the web/TUI settings) on purpose: the whole
|
|
6
|
+
// feature depends on `caretaker-cli` being installed, and if you can run this
|
|
7
|
+
// command then `caretaker-cli` is on your PATH — so the `caretaker-cli mcp`
|
|
8
|
+
// command we register is guaranteed to resolve when Claude Code spawns it.
|
|
9
|
+
//
|
|
10
|
+
// Writing the config is delegated to `claude mcp add` rather than editing
|
|
11
|
+
// ~/.claude.json ourselves, so we stay forward-compatible with their format.
|
|
12
|
+
import { execFile } from 'node:child_process';
|
|
13
|
+
import { promisify } from 'node:util';
|
|
14
|
+
const pexec = promisify(execFile);
|
|
15
|
+
const defaultRunner = async (cmd, args) => {
|
|
16
|
+
try {
|
|
17
|
+
const { stdout, stderr } = await pexec(cmd, args);
|
|
18
|
+
return { stdout, stderr, code: 0 };
|
|
19
|
+
}
|
|
20
|
+
catch (e) {
|
|
21
|
+
const err = e;
|
|
22
|
+
return {
|
|
23
|
+
stdout: err.stdout ?? '',
|
|
24
|
+
stderr: err.stderr ?? err.message ?? '',
|
|
25
|
+
code: typeof err.code === 'number' ? err.code : 1,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
export async function configureClaude(run = defaultRunner, log = console.log) {
|
|
30
|
+
// 1. Is Claude Code installed?
|
|
31
|
+
const version = await run('claude', ['--version']);
|
|
32
|
+
if (version.code !== 0) {
|
|
33
|
+
log('✗ Claude Code CLI not found on PATH.');
|
|
34
|
+
log(' Install it first: https://claude.com/product/claude-code');
|
|
35
|
+
return 1;
|
|
36
|
+
}
|
|
37
|
+
log(`✓ Claude Code CLI found (${version.stdout.trim() || 'unknown version'})`);
|
|
38
|
+
// Best-effort: warn if the command we're about to register won't resolve for
|
|
39
|
+
// Claude Code (e.g. desktop-only users who never installed the CLI globally).
|
|
40
|
+
const whichCmd = process.platform === 'win32' ? 'where' : 'which';
|
|
41
|
+
const resolved = await run(whichCmd, ['caretaker-cli']);
|
|
42
|
+
if (resolved.code !== 0) {
|
|
43
|
+
log(' ⚠ caretaker-cli is not on your PATH — Claude Code may fail to launch the server.');
|
|
44
|
+
log(' Install the CLI globally: npm i -g @hyperwindmill/caretaker-cli');
|
|
45
|
+
}
|
|
46
|
+
// 2. Already configured?
|
|
47
|
+
const existing = await run('claude', ['mcp', 'get', 'caretaker']);
|
|
48
|
+
if (existing.code === 0) {
|
|
49
|
+
log('✓ caretaker MCP server already configured in Claude Code (user scope). Nothing to do.');
|
|
50
|
+
return 0;
|
|
51
|
+
}
|
|
52
|
+
// 3. Add it (user scope = the standard per-user config).
|
|
53
|
+
const add = await run('claude', ['mcp', 'add', 'caretaker', '-s', 'user', '--', 'caretaker-cli', 'mcp']);
|
|
54
|
+
if (add.code !== 0) {
|
|
55
|
+
log('✗ Failed to add the caretaker MCP server:');
|
|
56
|
+
log(` ${add.stderr.trim() || add.stdout.trim() || `exit ${add.code}`}`);
|
|
57
|
+
return 1;
|
|
58
|
+
}
|
|
59
|
+
log('✓ Added caretaker MCP server to Claude Code (user scope).');
|
|
60
|
+
log(' Restart your Claude Code sessions to pick it up, then the task/project tools are available.');
|
|
61
|
+
return 0;
|
|
62
|
+
}
|
package/dist/cli/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAcA,wBAAsB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAcA,wBAAsB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAmE1D"}
|
package/dist/cli/index.js
CHANGED
|
@@ -46,5 +46,20 @@ export async function runCli(argv) {
|
|
|
46
46
|
const { startServer } = await import('./web/server.js');
|
|
47
47
|
await startServer(parseInt(opts.port, 10), opts.host);
|
|
48
48
|
});
|
|
49
|
+
program
|
|
50
|
+
.command('mcp')
|
|
51
|
+
.description('Serve the caretaker task/project tools over stdio for an external MCP client.')
|
|
52
|
+
.action(async () => {
|
|
53
|
+
const { startMcpStdioServer } = await import('./mcp.js');
|
|
54
|
+
await startMcpStdioServer();
|
|
55
|
+
});
|
|
56
|
+
const config = program.command('config').description('Configure caretaker integrations.');
|
|
57
|
+
config
|
|
58
|
+
.command('claude')
|
|
59
|
+
.description("Register caretaker's MCP server in your Claude Code config (user scope).")
|
|
60
|
+
.action(async () => {
|
|
61
|
+
const { configureClaude } = await import('./config_claude.js');
|
|
62
|
+
process.exit(await configureClaude());
|
|
63
|
+
});
|
|
49
64
|
await program.parseAsync(argv);
|
|
50
65
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../src/cli/mcp.ts"],"names":[],"mappings":"AASA,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC,CASzD"}
|
package/dist/cli/mcp.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// `caretaker-cli mcp` — serve the built-in mcp__task__* tools over stdio so an
|
|
2
|
+
// external MCP client (e.g. Claude Code) can steer caretaker's task/project
|
|
3
|
+
// system symmetrically. No auth: the trust boundary is local process access to
|
|
4
|
+
// CARETAKER_HOME (the caller could edit the folder DB directly). stdout carries
|
|
5
|
+
// the JSON-RPC wire — never write anything else to it here.
|
|
6
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
7
|
+
import { buildTaskMcpServer } from '../mcp/task_server.js';
|
|
8
|
+
export async function startMcpStdioServer() {
|
|
9
|
+
const server = buildTaskMcpServer({ name: 'caretaker', version: '0.0.0' });
|
|
10
|
+
const transport = new StdioServerTransport();
|
|
11
|
+
await server.connect(transport);
|
|
12
|
+
// Stay alive until the client closes stdin. Resolve on transport close so
|
|
13
|
+
// the caller can let the process exit cleanly.
|
|
14
|
+
await new Promise((resolve) => {
|
|
15
|
+
transport.onclose = () => resolve();
|
|
16
|
+
});
|
|
17
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp_bridge.d.ts","sourceRoot":"","sources":["../../../src/cli/web/mcp_bridge.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"mcp_bridge.d.ts","sourceRoot":"","sources":["../../../src/cli/web/mcp_bridge.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAOjC,wBAAgB,gBAAgB,IAAI,MAAM,CAIzC;AACD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAErD;AAGD,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAElD;AACD,wBAAgB,gBAAgB,IAAI,MAAM,GAAG,IAAI,CAEhD;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,IAAI,GAAG,IAAI,CAgBlD"}
|
|
@@ -6,11 +6,8 @@
|
|
|
6
6
|
// injection is needed.
|
|
7
7
|
import { randomBytes } from 'node:crypto';
|
|
8
8
|
import { RESPONSE_ALREADY_SENT } from '@hono/node-server/utils/response';
|
|
9
|
-
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
10
9
|
import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js';
|
|
11
|
-
import {
|
|
12
|
-
import { tools as registry } from '../../harness/tools/instance.js';
|
|
13
|
-
const TASK_PREFIX = 'mcp__task__';
|
|
10
|
+
import { buildTaskMcpServer } from '../../mcp/task_server.js';
|
|
14
11
|
const activeTokens = new Set();
|
|
15
12
|
export function issueBridgeToken() {
|
|
16
13
|
const token = randomBytes(24).toString('hex');
|
|
@@ -27,45 +24,6 @@ export function setTaskBridgeUrl(url) {
|
|
|
27
24
|
export function getTaskBridgeUrl() {
|
|
28
25
|
return bridgeUrl;
|
|
29
26
|
}
|
|
30
|
-
function taskTools() {
|
|
31
|
-
return registry.list().filter((t) => t.name.startsWith(TASK_PREFIX));
|
|
32
|
-
}
|
|
33
|
-
function buildServer() {
|
|
34
|
-
const server = new Server({ name: 'caretaker-task', version: '0.0.0' }, { capabilities: { tools: {} } });
|
|
35
|
-
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
36
|
-
tools: taskTools().map((t) => ({
|
|
37
|
-
name: t.name.slice(TASK_PREFIX.length),
|
|
38
|
-
description: t.description,
|
|
39
|
-
inputSchema: t.parameters,
|
|
40
|
-
})),
|
|
41
|
-
}));
|
|
42
|
-
server.setRequestHandler(CallToolRequestSchema, async (req) => {
|
|
43
|
-
const tool = taskTools().find((t) => t.name === TASK_PREFIX + req.params.name);
|
|
44
|
-
if (!tool) {
|
|
45
|
-
return {
|
|
46
|
-
content: [{ type: 'text', text: `Error: unknown tool "${req.params.name}"` }],
|
|
47
|
-
isError: true,
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
// ponytail: task tools ignore ctx entirely; a stub keeps the types happy.
|
|
51
|
-
const ctx = {
|
|
52
|
-
workingDir: process.cwd(),
|
|
53
|
-
signal: new AbortController().signal,
|
|
54
|
-
readPaths: new Set(),
|
|
55
|
-
};
|
|
56
|
-
try {
|
|
57
|
-
const result = await tool.execute(req.params.arguments ?? {}, ctx);
|
|
58
|
-
return { content: [{ type: 'text', text: result.content }] };
|
|
59
|
-
}
|
|
60
|
-
catch (err) {
|
|
61
|
-
return {
|
|
62
|
-
content: [{ type: 'text', text: `Error: ${err?.message ?? String(err)}` }],
|
|
63
|
-
isError: true,
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
return server;
|
|
68
|
-
}
|
|
69
27
|
export function registerTaskBridge(app) {
|
|
70
28
|
app.post('/api/mcp/task', async (c) => {
|
|
71
29
|
const auth = c.req.header('authorization') ?? '';
|
|
@@ -73,7 +31,7 @@ export function registerTaskBridge(app) {
|
|
|
73
31
|
if (!token || !activeTokens.has(token))
|
|
74
32
|
return c.json({ error: 'unauthorized' }, 401);
|
|
75
33
|
const body = await c.req.json().catch(() => null);
|
|
76
|
-
const server =
|
|
34
|
+
const server = buildTaskMcpServer();
|
|
77
35
|
const transport = new StreamableHTTPServerTransport({
|
|
78
36
|
sessionIdGenerator: undefined, // stateless
|
|
79
37
|
enableJsonResponse: true, // plain JSON responses, no SSE needed
|
|
@@ -33,6 +33,9 @@ export interface ClaudeArgsInput {
|
|
|
33
33
|
allowedTools?: string[];
|
|
34
34
|
disallowedTools?: string[];
|
|
35
35
|
mcpConfigPath?: string;
|
|
36
|
+
/** Pass --strict-mcp-config alongside --mcp-config so ONLY caretaker's
|
|
37
|
+
* servers are used. Off (default) merges the user's native ~/.claude MCP. */
|
|
38
|
+
strictMcp?: boolean;
|
|
36
39
|
settingsPath?: string;
|
|
37
40
|
resumeId?: string;
|
|
38
41
|
persistSession: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude_code_runner.d.ts","sourceRoot":"","sources":["../../src/harness/claude_code_runner.ts"],"names":[],"mappings":"AAMA,OAAO,EAAs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Q,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,OAAO,CAAC;CACzB;AAED,wBAAgB,eAAe,CAAC,CAAC,EAAE,eAAe,GAAG,MAAM,EAAE,CAe5D;AAED,uEAAuE;AACvE,wBAAgB,oBAAoB,CAAC,CAAC,EAAE;IACtC,QAAQ,EAAE,OAAO,CAAC;IAClB,GAAG,EAAE,OAAO,CAAC;IACb,MAAM,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;CACzC,GAAG,mBAAmB,CAoBtB;AA+LD,wBAAsB,aAAa,CAAC,IAAI,EAAE,UAAU,EAAE,EAAE,GAAE,YAAiB,GAAG,OAAO,CAAC,SAAS,CAAC,CAmI/F"}
|
|
@@ -44,8 +44,11 @@ export function buildClaudeArgs(i) {
|
|
|
44
44
|
args.push('--allowedTools', ...i.allowedTools);
|
|
45
45
|
if (i.disallowedTools?.length)
|
|
46
46
|
args.push('--disallowedTools', ...i.disallowedTools);
|
|
47
|
-
if (i.mcpConfigPath)
|
|
48
|
-
args.push('--mcp-config', i.mcpConfigPath
|
|
47
|
+
if (i.mcpConfigPath) {
|
|
48
|
+
args.push('--mcp-config', i.mcpConfigPath);
|
|
49
|
+
if (i.strictMcp)
|
|
50
|
+
args.push('--strict-mcp-config');
|
|
51
|
+
}
|
|
49
52
|
if (i.settingsPath)
|
|
50
53
|
args.push('--settings', i.settingsPath);
|
|
51
54
|
if (i.resumeId)
|
|
@@ -285,6 +288,7 @@ export async function runClaudeCode(opts, cb = {}) {
|
|
|
285
288
|
allowedTools: opts.claudeCode?.allowedTools,
|
|
286
289
|
disallowedTools: opts.claudeCode?.disallowedTools,
|
|
287
290
|
mcpConfigPath: mcp?.configPath,
|
|
291
|
+
strictMcp: agent.strictMcp ?? false,
|
|
288
292
|
settingsPath: settings?.settingsPath,
|
|
289
293
|
resumeId: resume,
|
|
290
294
|
persistSession: Boolean(opts.sessionId),
|
package/dist/index.js
CHANGED
|
@@ -7,21 +7,27 @@ import { closeAll as closeAllMcp } from './mcp/client.js';
|
|
|
7
7
|
import { initModelLimits } from './harness/model_limits.js';
|
|
8
8
|
import { probeShellEnv } from './harness/tools/builtin/shell-env.js';
|
|
9
9
|
import { runCli } from './cli/index.js';
|
|
10
|
-
//
|
|
11
|
-
//
|
|
12
|
-
//
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
//
|
|
17
|
-
//
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
//
|
|
23
|
-
//
|
|
24
|
-
|
|
10
|
+
// The `mcp` subcommand serves JSON-RPC over stdout — it must stay pristine
|
|
11
|
+
// (no banner, no log lines) and needs none of these boot side-effects, which
|
|
12
|
+
// also spawn child processes / network fetches. Skip them for that path.
|
|
13
|
+
const isMcpStdio = process.argv[2] === 'mcp';
|
|
14
|
+
if (!isMcpStdio) {
|
|
15
|
+
// Fire refresh-on-start in the background — startup must not block on a
|
|
16
|
+
// slow git fetch. The next agent run reads plugins.json fresh so it picks
|
|
17
|
+
// up newly-discovered plugins automatically.
|
|
18
|
+
void refreshSourcesOnStart().catch((err) => {
|
|
19
|
+
console.error('[boot] refresh-on-start failed:', err);
|
|
20
|
+
});
|
|
21
|
+
// Probe the interactive shell environment on Linux to capture PATH and
|
|
22
|
+
// version manager variables (NVM, volta, fnm, etc.) that .bashrc sets.
|
|
23
|
+
// This runs in the background and the result is cached for bash tool use.
|
|
24
|
+
void probeShellEnv().catch((err) => {
|
|
25
|
+
console.error('[boot] shell-env probe failed:', err);
|
|
26
|
+
});
|
|
27
|
+
// Populate the model-context registry from models.dev in the background.
|
|
28
|
+
// Degrades gracefully (percent stays null) until the first fetch lands.
|
|
29
|
+
initModelLimits();
|
|
30
|
+
}
|
|
25
31
|
// Tear pooled MCP connections down on shutdown so child stdio processes are
|
|
26
32
|
// not orphaned and HTTP sessions get a chance to send DELETE. Best-effort:
|
|
27
33
|
// SIGINT/SIGTERM may not yield enough time for the close handshake.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
2
|
+
import type { Tool } from '../harness/tools/index.js';
|
|
3
|
+
export declare const TASK_PREFIX = "mcp__task__";
|
|
4
|
+
export declare function taskTools(): Tool[];
|
|
5
|
+
export declare function buildTaskMcpServer(info?: {
|
|
6
|
+
name: string;
|
|
7
|
+
version: string;
|
|
8
|
+
}): Server;
|
|
9
|
+
//# sourceMappingURL=task_server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task_server.d.ts","sourceRoot":"","sources":["../../src/mcp/task_server.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAGnE,OAAO,KAAK,EAAE,IAAI,EAAe,MAAM,2BAA2B,CAAC;AAEnE,eAAO,MAAM,WAAW,gBAAgB,CAAC;AAEzC,wBAAgB,SAAS,IAAI,IAAI,EAAE,CAElC;AAED,wBAAgB,kBAAkB,CAChC,IAAI,GAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAiD,GACrF,MAAM,CAkCR"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// Shared builder: wraps the built-in mcp__task__* registry tools as an MCP
|
|
2
|
+
// Server. Used by BOTH the per-task HTTP bridge (cli/web/mcp_bridge.ts) and
|
|
3
|
+
// the general stdio subcommand (cli/mcp.ts) so the task surface has one
|
|
4
|
+
// definition and one wrapping. The task tools are context-free (they take
|
|
5
|
+
// task_id/project_id as arguments), so a stub ToolContext is sufficient.
|
|
6
|
+
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
7
|
+
import { ListToolsRequestSchema, CallToolRequestSchema } from '@modelcontextprotocol/sdk/types.js';
|
|
8
|
+
import { tools as registry } from '../harness/tools/instance.js';
|
|
9
|
+
export const TASK_PREFIX = 'mcp__task__';
|
|
10
|
+
export function taskTools() {
|
|
11
|
+
return registry.list().filter((t) => t.name.startsWith(TASK_PREFIX));
|
|
12
|
+
}
|
|
13
|
+
export function buildTaskMcpServer(info = { name: 'caretaker-task', version: '0.0.0' }) {
|
|
14
|
+
const server = new Server(info, { capabilities: { tools: {} } });
|
|
15
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
16
|
+
tools: taskTools().map((t) => ({
|
|
17
|
+
name: t.name.slice(TASK_PREFIX.length),
|
|
18
|
+
description: t.description,
|
|
19
|
+
inputSchema: t.parameters,
|
|
20
|
+
})),
|
|
21
|
+
}));
|
|
22
|
+
server.setRequestHandler(CallToolRequestSchema, async (req) => {
|
|
23
|
+
const tool = taskTools().find((t) => t.name === TASK_PREFIX + req.params.name);
|
|
24
|
+
if (!tool) {
|
|
25
|
+
return {
|
|
26
|
+
content: [{ type: 'text', text: `Error: unknown tool "${req.params.name}"` }],
|
|
27
|
+
isError: true,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
// ponytail: task tools ignore ctx entirely; a stub keeps the types happy.
|
|
31
|
+
const ctx = {
|
|
32
|
+
workingDir: process.cwd(),
|
|
33
|
+
signal: new AbortController().signal,
|
|
34
|
+
readPaths: new Set(),
|
|
35
|
+
};
|
|
36
|
+
try {
|
|
37
|
+
const result = await tool.execute(req.params.arguments ?? {}, ctx);
|
|
38
|
+
return { content: [{ type: 'text', text: result.content }] };
|
|
39
|
+
}
|
|
40
|
+
catch (err) {
|
|
41
|
+
return {
|
|
42
|
+
content: [{ type: 'text', text: `Error: ${err?.message ?? String(err)}` }],
|
|
43
|
+
isError: true,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
return server;
|
|
48
|
+
}
|
package/dist/tui/agents.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../src/tui/agents.tsx"],"names":[],"mappings":"AAoCA,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,EAAE,MAAM,IAAI,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../src/tui/agents.tsx"],"names":[],"mappings":"AAoCA,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,EAAE,MAAM,IAAI,CAAA;CAAE,2CAyXhE"}
|
package/dist/tui/agents.js
CHANGED
|
@@ -196,7 +196,7 @@ export default function Agents({ onBack }) {
|
|
|
196
196
|
if (mode === 'detail' && selected) {
|
|
197
197
|
const managed = !!selected.pluginId;
|
|
198
198
|
const isClaudeCode = providers.find((p) => p.name === selected.provider)?.type === 'claude-code';
|
|
199
|
-
return (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { bold: true, children: selected.name }), managed && (_jsx(Text, { color: "cyan", children: "[managed by plugin \u00B7 name + system prompt come from the manifest]" })), _jsxs(Text, { children: ["provider: ", selected.provider] }), _jsxs(Text, { children: ["model: ", selected.model] }), isClaudeCode ? (_jsxs(Text, { children: ["permissionMode: ", selected.permissionMode || 'Auto (Claude Code default)'] })) : (_jsxs(_Fragment, { children: [_jsxs(Text, { children: ["maxTurns: ", selected.maxTurns === 0 ? 'unlimited' : selected.maxTurns] }), _jsxs(Text, { children: ["tools:", ' ', selected.allowedTools.length === 0
|
|
199
|
+
return (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { bold: true, children: selected.name }), managed && (_jsx(Text, { color: "cyan", children: "[managed by plugin \u00B7 name + system prompt come from the manifest]" })), _jsxs(Text, { children: ["provider: ", selected.provider] }), _jsxs(Text, { children: ["model: ", selected.model] }), isClaudeCode ? (_jsxs(_Fragment, { children: [_jsxs(Text, { children: ["permissionMode: ", selected.permissionMode || 'Auto (Claude Code default)'] }), _jsxs(Text, { children: ["strictMcp: ", selected.strictMcp ? 'on' : 'off (merge ~/.claude MCP)'] })] })) : (_jsxs(_Fragment, { children: [_jsxs(Text, { children: ["maxTurns: ", selected.maxTurns === 0 ? 'unlimited' : selected.maxTurns] }), _jsxs(Text, { children: ["tools:", ' ', selected.allowedTools.length === 0
|
|
200
200
|
? '(none)'
|
|
201
201
|
: formatToolsForDetail(selected.allowedTools, selected.confirmTools ?? [])] }), _jsxs(Text, { children: ["plugins:", ' ', (selected.plugins ?? []).length === 0 ? '(none)' : selected.plugins.join(', ')] })] })), _jsxs(Text, { children: ["mcp: ", (selected.mcpServers ?? []).length === 0 ? '(none)' : selected.mcpServers.length, ' ', "server(s)"] }), _jsxs(Text, { children: ["workDir: ", selected.workingDir || '(cwd)'] }), _jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsx(Text, { dimColor: true, children: "system prompt:" }), _jsx(Text, { children: selected.systemPrompt || '(empty)' })] }), _jsx(Box, { marginTop: 1, children: _jsx(SelectInput, { items: [
|
|
202
202
|
{ label: 'New chat', value: 'new-chat' },
|
|
@@ -263,7 +263,7 @@ function stepSequence(managed, isClaudeCode) {
|
|
|
263
263
|
if (!managed)
|
|
264
264
|
seq.push('systemPrompt');
|
|
265
265
|
if (isClaudeCode) {
|
|
266
|
-
seq.push('mcpServers', 'workingDir', 'permissionMode');
|
|
266
|
+
seq.push('mcpServers', 'workingDir', 'permissionMode', 'strictMcp');
|
|
267
267
|
}
|
|
268
268
|
else {
|
|
269
269
|
seq.push('tools', 'plugins', 'mcpServers', 'workingDir', 'maxTurns');
|
|
@@ -282,6 +282,7 @@ function AgentForm({ providers, existingNames, initial, onSave, onCancel, }) {
|
|
|
282
282
|
const [model, setModel] = useState(initial?.model ?? '');
|
|
283
283
|
const [systemPrompt, setSystemPrompt] = useState(initial?.systemPrompt ?? '');
|
|
284
284
|
const [permissionMode, setPermissionMode] = useState(initial?.permissionMode ?? '');
|
|
285
|
+
const [strictMcp, setStrictMcp] = useState(initial?.strictMcp ?? false);
|
|
285
286
|
const normalizeTools = (tools) => {
|
|
286
287
|
const hasTaskTools = tools.some((t) => t.startsWith('mcp__task__'));
|
|
287
288
|
if (hasTaskTools) {
|
|
@@ -314,8 +315,9 @@ function AgentForm({ providers, existingNames, initial, onSave, onCancel, }) {
|
|
|
314
315
|
const idx = steps.indexOf(s);
|
|
315
316
|
return idx >= 0 && idx + 1 < steps.length ? steps[idx + 1] : s;
|
|
316
317
|
};
|
|
317
|
-
const finalize = (n, permissionModeOverride) => {
|
|
318
|
+
const finalize = (n, permissionModeOverride, strictMcpOverride) => {
|
|
318
319
|
const pm = permissionModeOverride ?? permissionMode;
|
|
320
|
+
const sm = strictMcpOverride ?? strictMcp;
|
|
319
321
|
const a = {
|
|
320
322
|
id: initial?.id ?? randomUUID(),
|
|
321
323
|
name: name.trim(),
|
|
@@ -329,6 +331,7 @@ function AgentForm({ providers, existingNames, initial, onSave, onCancel, }) {
|
|
|
329
331
|
...(activeMcp.length > 0 ? { mcpServers: activeMcp } : {}),
|
|
330
332
|
...(workingDir.trim() ? { workingDir: workingDir.trim() } : {}),
|
|
331
333
|
...(isClaudeCode && pm ? { permissionMode: pm } : {}),
|
|
334
|
+
...(isClaudeCode && sm ? { strictMcp: true } : {}),
|
|
332
335
|
// Preserve plugin-managed origin tags so the next sync recognizes
|
|
333
336
|
// this row instead of orphaning it.
|
|
334
337
|
...(initial?.pluginId ? { pluginId: initial.pluginId } : {}),
|
|
@@ -413,9 +416,17 @@ function AgentForm({ providers, existingNames, initial, onSave, onCancel, }) {
|
|
|
413
416
|
: 0, onSelect: (item) => {
|
|
414
417
|
setPermissionMode(item.value);
|
|
415
418
|
setError(null);
|
|
419
|
+
setStep('strictMcp');
|
|
420
|
+
} })) : ['name', 'provider', 'model', 'systemPrompt', 'mcpServers', 'workingDir'].includes(step) ? (_jsx(Text, { dimColor: true, children: "(pending)" })) : (_jsx(Text, { children: permissionMode || 'Auto (Claude Code default)' })), _jsx(Text, { dimColor: true, children: "Uses your local Claude Code session; Anthropic may bill programmatic use as extra usage." })] })), isClaudeCode && (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { children: "strictMcp: " }), step === 'strictMcp' ? (_jsx(SelectInput, { items: [
|
|
421
|
+
{ label: 'off — merge your ~/.claude MCP servers (default)', value: 'off' },
|
|
422
|
+
{ label: 'on — use only caretaker servers (--strict-mcp-config)', value: 'on' },
|
|
423
|
+
], initialIndex: strictMcp ? 1 : 0, onSelect: (item) => {
|
|
424
|
+
const val = item.value === 'on';
|
|
425
|
+
setStrictMcp(val);
|
|
426
|
+
setError(null);
|
|
416
427
|
const n = Number.parseInt(maxTurns.trim(), 10);
|
|
417
|
-
finalize(Number.isFinite(n) && n >= 0 ? n : 30,
|
|
418
|
-
} })) :
|
|
428
|
+
finalize(Number.isFinite(n) && n >= 0 ? n : 30, undefined, val);
|
|
429
|
+
} })) : step === 'permissionMode' ? (_jsx(Text, { dimColor: true, children: "(pending)" })) : (_jsx(Text, { children: strictMcp ? 'on' : 'off' }))] })), error && (_jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "red", children: error }) })), _jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, children: "(esc to cancel)" }) })] }));
|
|
419
430
|
}
|
|
420
431
|
function ModelStep({ provider, initialModel, onPick, }) {
|
|
421
432
|
const isClaudeCode = provider.type === 'claude-code';
|
|
@@ -16597,6 +16597,7 @@ ${text}</tr>
|
|
|
16597
16597
|
const [maxTurns, setMaxTurns] = (0, import_react8.useState)(30);
|
|
16598
16598
|
const [workingDir, setWorkingDir] = (0, import_react8.useState)("");
|
|
16599
16599
|
const [permissionMode, setPermissionMode] = (0, import_react8.useState)("");
|
|
16600
|
+
const [strictMcp, setStrictMcp] = (0, import_react8.useState)(false);
|
|
16600
16601
|
const [selectedTools, setSelectedTools] = (0, import_react8.useState)({});
|
|
16601
16602
|
const [confirmTools, setConfirmTools] = (0, import_react8.useState)({});
|
|
16602
16603
|
const [selectedPlugins, setSelectedPlugins] = (0, import_react8.useState)({});
|
|
@@ -16624,6 +16625,7 @@ ${text}</tr>
|
|
|
16624
16625
|
setMaxTurns(30);
|
|
16625
16626
|
setWorkingDir("");
|
|
16626
16627
|
setPermissionMode("");
|
|
16628
|
+
setStrictMcp(false);
|
|
16627
16629
|
const initialTools = {};
|
|
16628
16630
|
availableTools.forEach((t) => {
|
|
16629
16631
|
initialTools[t] = t === "read_file" || t === "grep_search";
|
|
@@ -16645,6 +16647,7 @@ ${text}</tr>
|
|
|
16645
16647
|
setMaxTurns(agent.maxTurns || 30);
|
|
16646
16648
|
setWorkingDir(agent.workingDir || "");
|
|
16647
16649
|
setPermissionMode(agent.permissionMode ?? "");
|
|
16650
|
+
setStrictMcp(agent.strictMcp ?? false);
|
|
16648
16651
|
const initialTools = {};
|
|
16649
16652
|
const initialConfirm = {};
|
|
16650
16653
|
availableTools.forEach((t) => {
|
|
@@ -16741,6 +16744,7 @@ ${text}</tr>
|
|
|
16741
16744
|
maxTurns,
|
|
16742
16745
|
...trimmedWorkingDir ? { workingDir: trimmedWorkingDir } : {},
|
|
16743
16746
|
...isClaudeCode && permissionMode ? { permissionMode } : {},
|
|
16747
|
+
...isClaudeCode && strictMcp ? { strictMcp: true } : {},
|
|
16744
16748
|
// Preserve plugin-managed properties
|
|
16745
16749
|
...editingAgent?.pluginId ? { pluginId: editingAgent.pluginId } : {},
|
|
16746
16750
|
...editingAgent?.pluginScopedName ? { pluginScopedName: editingAgent.pluginScopedName } : {}
|
|
@@ -16880,22 +16884,43 @@ ${text}</tr>
|
|
|
16880
16884
|
)
|
|
16881
16885
|
] }),
|
|
16882
16886
|
isClaudeCode ? (
|
|
16883
|
-
/* Permission mode (
|
|
16884
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
16885
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.
|
|
16886
|
-
|
|
16887
|
-
|
|
16888
|
-
|
|
16889
|
-
|
|
16890
|
-
|
|
16891
|
-
|
|
16892
|
-
|
|
16893
|
-
|
|
16894
|
-
|
|
16895
|
-
|
|
16896
|
-
|
|
16897
|
-
|
|
16898
|
-
|
|
16887
|
+
/* Permission mode + strict-MCP toggle (replace the tool/plugins pickers, ignored at runtime) */
|
|
16888
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
|
|
16889
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "form-group", children: [
|
|
16890
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("label", { htmlFor: "agent-permission-mode", children: "Permission Mode" }),
|
|
16891
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
16892
|
+
"select",
|
|
16893
|
+
{
|
|
16894
|
+
id: "agent-permission-mode",
|
|
16895
|
+
value: permissionMode,
|
|
16896
|
+
onChange: (e) => setPermissionMode(e.target.value),
|
|
16897
|
+
children: [
|
|
16898
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: "", children: "Auto (Claude Code default from ~/.claude/settings.json)" }),
|
|
16899
|
+
["acceptEdits", "auto", "bypassPermissions", "manual", "dontAsk", "plan"].map((m) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: m, children: m }, m))
|
|
16900
|
+
]
|
|
16901
|
+
}
|
|
16902
|
+
),
|
|
16903
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { style: { fontSize: "11px", color: "var(--vscode-descriptionForeground)", lineHeight: "1.4", margin: "4px 0 0" }, children: "Claude Code uses its own tools and permissions. Uses your local Claude Code session; Anthropic may bill programmatic use as extra usage." })
|
|
16904
|
+
] }),
|
|
16905
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "form-group", children: [
|
|
16906
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { style: { display: "flex", alignItems: "center", gap: "8px", cursor: "pointer" }, children: [
|
|
16907
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
16908
|
+
"input",
|
|
16909
|
+
{
|
|
16910
|
+
type: "checkbox",
|
|
16911
|
+
checked: strictMcp,
|
|
16912
|
+
onChange: (e) => setStrictMcp(e.target.checked)
|
|
16913
|
+
}
|
|
16914
|
+
),
|
|
16915
|
+
"Strict MCP config"
|
|
16916
|
+
] }),
|
|
16917
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("p", { style: { fontSize: "11px", color: "var(--vscode-descriptionForeground)", lineHeight: "1.4", margin: "4px 0 0" }, children: [
|
|
16918
|
+
"Off (default): merge your native ~/.claude MCP servers with caretaker's \u2014 e.g. add a",
|
|
16919
|
+
" ",
|
|
16920
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: "caretaker-cli mcp" }),
|
|
16921
|
+
" stdio server to ~/.claude for task tools in chat. On: use only caretaker's servers (--strict-mcp-config)."
|
|
16922
|
+
] })
|
|
16923
|
+
] })
|
|
16899
16924
|
] })
|
|
16900
16925
|
) : /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
|
|
16901
16926
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "form-group form-group--chips", children: [
|