@hyperwindmill/caretaker-cli 0.19.0 → 0.21.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/mcp.js +5 -5
- package/dist/cli/web/mcp_bridge.d.ts +1 -1
- package/dist/cli/web/mcp_bridge.d.ts.map +1 -1
- package/dist/cli/web/mcp_bridge.js +23 -7
- package/dist/cli/web/scheduler/heartbeat.d.ts +2 -2
- package/dist/cli/web/scheduler/heartbeat.d.ts.map +1 -1
- package/dist/cli/web/scheduler/locks.d.ts +6 -0
- package/dist/cli/web/scheduler/locks.d.ts.map +1 -1
- package/dist/cli/web/scheduler/locks.js +6 -0
- package/dist/cli/web/scheduler/strategy.d.ts +3 -3
- package/dist/cli/web/scheduler/strategy.d.ts.map +1 -1
- package/dist/cli/web/scheduler/task_roles.d.ts +0 -4
- package/dist/cli/web/scheduler/task_roles.d.ts.map +1 -1
- package/dist/cli/web/scheduler/task_roles.js +12 -2
- package/dist/cli/web/scheduler/task_strategy.d.ts.map +1 -1
- package/dist/cli/web/scheduler/task_strategy.js +86 -4
- package/dist/cli/web/scheduler/telegram.d.ts.map +1 -1
- package/dist/cli/web/scheduler/telegram.js +4 -1
- package/dist/cli/web/server.d.ts.map +1 -1
- package/dist/cli/web/server.js +121 -10
- package/dist/harness/claude_code_runner.d.ts.map +1 -1
- package/dist/harness/claude_code_runner.js +5 -1
- package/dist/harness/tools/builtin/email_tools.d.ts +5 -0
- package/dist/harness/tools/builtin/email_tools.d.ts.map +1 -0
- package/dist/harness/tools/builtin/email_tools.js +182 -0
- package/dist/harness/tools/builtin/index.d.ts +2 -1
- package/dist/harness/tools/builtin/index.d.ts.map +1 -1
- package/dist/harness/tools/builtin/index.js +7 -1
- package/dist/harness/tools/builtin/task_tools.d.ts.map +1 -1
- package/dist/harness/tools/builtin/task_tools.js +48 -6
- package/dist/harness/tools/resolve.d.ts.map +1 -1
- package/dist/harness/tools/resolve.js +9 -4
- package/dist/lib/email.d.ts +132 -0
- package/dist/lib/email.d.ts.map +1 -0
- package/dist/lib/email.js +306 -0
- package/dist/lib/repo_url.d.ts +12 -0
- package/dist/lib/repo_url.d.ts.map +1 -0
- package/dist/lib/repo_url.js +36 -0
- package/dist/lib/task_git.d.ts +53 -1
- package/dist/lib/task_git.d.ts.map +1 -1
- package/dist/lib/task_git.js +197 -5
- package/dist/mcp/builtin_server.d.ts +13 -0
- package/dist/mcp/builtin_server.d.ts.map +1 -0
- package/dist/mcp/builtin_server.js +65 -0
- package/dist/store/json.d.ts +1 -0
- package/dist/store/json.d.ts.map +1 -1
- package/dist/store/json.js +15 -0
- package/dist/tui/agents.js +36 -14
- package/dist/webview/standalone.js +1511 -1068
- package/dist/webview/standalone.js.map +4 -4
- package/package.json +8 -3
- package/dist/mcp/task_server.d.ts +0 -9
- package/dist/mcp/task_server.d.ts.map +0 -1
- package/dist/mcp/task_server.js +0 -48
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
// Agent-facing email tools. Named `mcp__email__*` so the shared builtin MCP
|
|
2
|
+
// server (mcp/builtin_server.ts) picks them up by prefix and serves them over
|
|
3
|
+
// both the stdio subcommand and the per-task HTTP bridge, exactly like the
|
|
4
|
+
// `mcp__task__*` set.
|
|
5
|
+
//
|
|
6
|
+
// Accounts come from the Services collection (`type: 'email'`); see lib/email.ts.
|
|
7
|
+
// Three boundaries, all host-side and none of them the model's choice:
|
|
8
|
+
// - which accounts exist at all for this agent (`allowedAgents`, resolved from
|
|
9
|
+
// ctx.callerAgent — a scoped account is invisible, not refused);
|
|
10
|
+
// - who an account may send to (`allowedRecipients`, checked before connecting);
|
|
11
|
+
// - whose mail it may read (`allowedSenders`, checked on the envelope pass).
|
|
12
|
+
import { listEmailAccounts, findAccount, matchesAllowlist, bareAddress, sendEmail, fetchInbox, canSend, canRead, clampLimit, MAX_FETCH, } from '../../../lib/email.js';
|
|
13
|
+
function err(msg) {
|
|
14
|
+
return { content: JSON.stringify({ error: msg }) };
|
|
15
|
+
}
|
|
16
|
+
/** Accept either a single address or a list of them. */
|
|
17
|
+
function toList(value) {
|
|
18
|
+
if (value === undefined || value === null || value === '')
|
|
19
|
+
return [];
|
|
20
|
+
if (typeof value === 'string') {
|
|
21
|
+
const items = value
|
|
22
|
+
.split(/[,;\n]/)
|
|
23
|
+
.map((s) => s.trim())
|
|
24
|
+
.filter(Boolean);
|
|
25
|
+
return items;
|
|
26
|
+
}
|
|
27
|
+
if (Array.isArray(value) && value.every((v) => typeof v === 'string')) {
|
|
28
|
+
return value.map((v) => v.trim()).filter(Boolean);
|
|
29
|
+
}
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
export const emailListAccountsTool = {
|
|
33
|
+
name: 'mcp__email__email_list_accounts',
|
|
34
|
+
description: 'List the configured email accounts. Returns each account name (use it as the `account` argument of email_send / email_fetch), its From address, whether it can send and/or be read, and its address allowlists. Passwords are never returned.',
|
|
35
|
+
parameters: { type: 'object', properties: {}, additionalProperties: false },
|
|
36
|
+
execute: async (_args, ctx) => {
|
|
37
|
+
const accounts = await listEmailAccounts(ctx.callerAgent?.id);
|
|
38
|
+
return {
|
|
39
|
+
content: JSON.stringify({
|
|
40
|
+
accounts: accounts.map((a) => ({
|
|
41
|
+
name: a.name,
|
|
42
|
+
from: a.from,
|
|
43
|
+
// Empty list = no restriction; say so instead of showing `[]`.
|
|
44
|
+
canSend: canSend(a) ? `${a.smtpHost}:${a.smtpPort}` : false,
|
|
45
|
+
canRead: canRead(a) ? `${a.imapHost}:${a.imapPort}` : false,
|
|
46
|
+
allowedRecipients: a.allowedRecipients.length ? a.allowedRecipients : 'any',
|
|
47
|
+
allowedSenders: a.allowedSenders.length ? a.allowedSenders : 'any',
|
|
48
|
+
})),
|
|
49
|
+
}),
|
|
50
|
+
};
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
export const emailFetchTool = {
|
|
54
|
+
name: 'mcp__email__email_fetch',
|
|
55
|
+
description: 'Read the oldest unread messages from an account inbox and mark them read, so a later run does not see them again. Messages from senders outside the account allowlist are never returned. Bodies are plain text and may be truncated; attachments are listed by name only, not downloaded.',
|
|
56
|
+
parameters: {
|
|
57
|
+
type: 'object',
|
|
58
|
+
properties: {
|
|
59
|
+
account: { type: 'string', description: 'Account name from email_list_accounts.' },
|
|
60
|
+
limit: {
|
|
61
|
+
type: 'number',
|
|
62
|
+
description: `How many messages to read this call. Default 10, hard maximum ${MAX_FETCH}.`,
|
|
63
|
+
},
|
|
64
|
+
unread_only: {
|
|
65
|
+
type: 'boolean',
|
|
66
|
+
description: 'Default true. Set false to re-read messages already marked read.',
|
|
67
|
+
},
|
|
68
|
+
subject: { type: 'string', description: 'Only messages whose subject contains this text.' },
|
|
69
|
+
mark_seen: {
|
|
70
|
+
type: 'boolean',
|
|
71
|
+
description: 'Default true. Set false to leave the messages unread — they will come back on the next call.',
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
required: ['account'],
|
|
75
|
+
},
|
|
76
|
+
execute: async (args, ctx) => {
|
|
77
|
+
const name = typeof args?.account === 'string' ? args.account : '';
|
|
78
|
+
if (!name.trim())
|
|
79
|
+
return err('account must be a non-empty string');
|
|
80
|
+
const accounts = await listEmailAccounts(ctx.callerAgent?.id);
|
|
81
|
+
const account = findAccount(accounts, name);
|
|
82
|
+
if (!account) {
|
|
83
|
+
const available = accounts.filter(canRead).map((a) => a.name);
|
|
84
|
+
return err(available.length
|
|
85
|
+
? `Unknown email account "${name}". Readable accounts: ${available.join(', ')}`
|
|
86
|
+
: `Unknown email account "${name}". No account is configured for reading — an email service needs an IMAP host and must be enabled.`);
|
|
87
|
+
}
|
|
88
|
+
if (!canRead(account)) {
|
|
89
|
+
return err(`Account "${account.name}" has no IMAP host, so it cannot be read.`);
|
|
90
|
+
}
|
|
91
|
+
try {
|
|
92
|
+
const { messages, refused } = await fetchInbox(account, {
|
|
93
|
+
limit: clampLimit(args?.limit),
|
|
94
|
+
unreadOnly: args?.unread_only !== false,
|
|
95
|
+
subject: typeof args?.subject === 'string' ? args.subject : undefined,
|
|
96
|
+
markSeen: args?.mark_seen !== false,
|
|
97
|
+
signal: ctx.signal,
|
|
98
|
+
});
|
|
99
|
+
return {
|
|
100
|
+
content: JSON.stringify({
|
|
101
|
+
account: account.name,
|
|
102
|
+
count: messages.length,
|
|
103
|
+
// Surfaced rather than silent: "nothing new" and "3 messages you are
|
|
104
|
+
// not allowed to see" are different situations for the agent.
|
|
105
|
+
...(refused ? { refusedBySenderAllowlist: refused } : {}),
|
|
106
|
+
messages,
|
|
107
|
+
}),
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
catch (e) {
|
|
111
|
+
return err(`IMAP fetch failed: ${e?.message ?? String(e)}`);
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
};
|
|
115
|
+
export const emailSendTool = {
|
|
116
|
+
name: 'mcp__email__email_send',
|
|
117
|
+
description: 'Send a plain-text email through one of the configured accounts. Pick the account by its name from email_list_accounts. Recipients outside the account allowlist are refused and nothing is sent.',
|
|
118
|
+
parameters: {
|
|
119
|
+
type: 'object',
|
|
120
|
+
properties: {
|
|
121
|
+
account: { type: 'string', description: 'Account name from email_list_accounts.' },
|
|
122
|
+
to: {
|
|
123
|
+
type: 'array',
|
|
124
|
+
items: { type: 'string' },
|
|
125
|
+
description: 'Recipient addresses. A single comma-separated string is also accepted.',
|
|
126
|
+
},
|
|
127
|
+
cc: { type: 'array', items: { type: 'string' } },
|
|
128
|
+
bcc: { type: 'array', items: { type: 'string' } },
|
|
129
|
+
subject: { type: 'string' },
|
|
130
|
+
body: { type: 'string', description: 'Plain text. No HTML, no attachments.' },
|
|
131
|
+
},
|
|
132
|
+
required: ['account', 'to', 'subject', 'body'],
|
|
133
|
+
},
|
|
134
|
+
dangerous: true,
|
|
135
|
+
execute: async (args, ctx) => {
|
|
136
|
+
const name = typeof args?.account === 'string' ? args.account : '';
|
|
137
|
+
if (!name.trim())
|
|
138
|
+
return err('account must be a non-empty string');
|
|
139
|
+
const subject = typeof args?.subject === 'string' ? args.subject : '';
|
|
140
|
+
const body = typeof args?.body === 'string' ? args.body : '';
|
|
141
|
+
if (!subject.trim())
|
|
142
|
+
return err('subject must be a non-empty string');
|
|
143
|
+
if (typeof args?.body !== 'string')
|
|
144
|
+
return err('body must be a string');
|
|
145
|
+
const to = toList(args?.to);
|
|
146
|
+
const cc = toList(args?.cc);
|
|
147
|
+
const bcc = toList(args?.bcc);
|
|
148
|
+
if (!to || !cc || !bcc)
|
|
149
|
+
return err('to/cc/bcc must be a string or an array of strings');
|
|
150
|
+
if (to.length === 0)
|
|
151
|
+
return err('to must contain at least one recipient');
|
|
152
|
+
const accounts = await listEmailAccounts(ctx.callerAgent?.id);
|
|
153
|
+
const account = findAccount(accounts, name);
|
|
154
|
+
if (!account) {
|
|
155
|
+
const available = accounts.filter(canSend).map((a) => a.name);
|
|
156
|
+
return err(available.length
|
|
157
|
+
? `Unknown email account "${name}". Available: ${available.join(', ')}`
|
|
158
|
+
: `Unknown email account "${name}". No account is configured for sending — an email service needs an SMTP host and must be enabled.`);
|
|
159
|
+
}
|
|
160
|
+
if (!canSend(account)) {
|
|
161
|
+
return err(`Account "${account.name}" has no SMTP host, so it cannot send.`);
|
|
162
|
+
}
|
|
163
|
+
if (!account.from) {
|
|
164
|
+
return err(`Account "${account.name}" has no From address — set its From or IMAP user.`);
|
|
165
|
+
}
|
|
166
|
+
// Allowlist first, for every recipient kind: a refusal must cost no I/O and
|
|
167
|
+
// must never leave a partially delivered message behind.
|
|
168
|
+
const refused = [...to, ...cc, ...bcc].filter((r) => !matchesAllowlist(bareAddress(r), account.allowedRecipients));
|
|
169
|
+
if (refused.length) {
|
|
170
|
+
return err(`Recipient(s) not allowed by account "${account.name}": ${refused.join(', ')}. Allowed patterns: ${account.allowedRecipients.join(', ')}`);
|
|
171
|
+
}
|
|
172
|
+
try {
|
|
173
|
+
const messageId = await sendEmail(account, { to, cc, bcc, subject, body }, ctx.signal);
|
|
174
|
+
return {
|
|
175
|
+
content: JSON.stringify({ ok: true, messageId, from: account.from, to, cc, bcc }),
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
catch (e) {
|
|
179
|
+
return err(`SMTP send failed: ${e?.message ?? String(e)}`);
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
};
|
|
@@ -17,7 +17,8 @@ import { invokeAgentTool } from './invoke_agent.js';
|
|
|
17
17
|
import { listCommandsTool } from './list_commands.js';
|
|
18
18
|
import { invokeCommandTool } from './invoke_command.js';
|
|
19
19
|
import { getAgentContextTool } from './get_agent_context.js';
|
|
20
|
+
import { emailListAccountsTool, emailSendTool, emailFetchTool } from './email_tools.js';
|
|
20
21
|
import { getTaskStateTool, updateChecklistItemTool, updateChecklistTool, addMessageTool, completeTaskTool, blockTaskTool, yieldTaskTool, projectListTool, taskCreateTool, taskSearchTool, taskUnblockTool, taskActivateTool, taskUnpauseTool, taskDiscardWorktreeTool, taskArchiveTool, taskUnarchiveTool, taskDeleteTool, taskSetAgentTool, submitPlanTool, taskUpdateDetailsTool } from './task_tools.js';
|
|
21
22
|
export declare function registerBuiltins(registry: ToolRegistry): void;
|
|
22
|
-
export { readFileTool, readDocumentTool, readImageTool, readAttachmentTool, writeTool, editTool, multieditTool, globTool, grepTool, fetchTool, bashTool, listSkillsTool, readSkillTool, listAgentsTool, invokeAgentTool, listCommandsTool, invokeCommandTool, getAgentContextTool, getTaskStateTool, updateChecklistItemTool, updateChecklistTool, addMessageTool, completeTaskTool, blockTaskTool, yieldTaskTool, projectListTool, taskCreateTool, taskSearchTool, taskUnblockTool, taskActivateTool, taskUnpauseTool, taskDiscardWorktreeTool, taskArchiveTool, taskUnarchiveTool, taskDeleteTool, taskSetAgentTool, submitPlanTool, taskUpdateDetailsTool, };
|
|
23
|
+
export { readFileTool, readDocumentTool, readImageTool, readAttachmentTool, writeTool, editTool, multieditTool, globTool, grepTool, fetchTool, bashTool, listSkillsTool, readSkillTool, listAgentsTool, invokeAgentTool, listCommandsTool, invokeCommandTool, getAgentContextTool, getTaskStateTool, updateChecklistItemTool, updateChecklistTool, addMessageTool, completeTaskTool, blockTaskTool, yieldTaskTool, projectListTool, taskCreateTool, taskSearchTool, taskUnblockTool, taskActivateTool, taskUnpauseTool, taskDiscardWorktreeTool, taskArchiveTool, taskUnarchiveTool, taskDeleteTool, taskSetAgentTool, submitPlanTool, taskUpdateDetailsTool, emailListAccountsTool, emailSendTool, emailFetchTool, };
|
|
23
24
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/harness/tools/builtin/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CA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,cAAc,EACd,qBAAqB,EACrB,qBAAqB,EACrB,aAAa,EACb,cAAc,GACf,CAAC"}
|
|
@@ -19,6 +19,7 @@ import { invokeAgentTool } from './invoke_agent.js';
|
|
|
19
19
|
import { listCommandsTool } from './list_commands.js';
|
|
20
20
|
import { invokeCommandTool } from './invoke_command.js';
|
|
21
21
|
import { getAgentContextTool } from './get_agent_context.js';
|
|
22
|
+
import { emailListAccountsTool, emailSendTool, emailFetchTool } from './email_tools.js';
|
|
22
23
|
import { getTaskStateTool, updateChecklistItemTool, updateChecklistTool, addMessageTool, completeTaskTool, blockTaskTool, yieldTaskTool, projectListTool, taskCreateTool, taskSearchTool, taskUnblockTool, taskActivateTool, taskUnpauseTool, taskDiscardWorktreeTool, taskArchiveTool, taskUnarchiveTool, taskDeleteTool, taskSetAgentTool, submitPlanTool, taskUpdateDetailsTool, } from './task_tools.js';
|
|
23
24
|
export function registerBuiltins(registry) {
|
|
24
25
|
// Filesystem (sandboxed to ctx.workingDir).
|
|
@@ -71,5 +72,10 @@ export function registerBuiltins(registry) {
|
|
|
71
72
|
registry.register(taskSetAgentTool);
|
|
72
73
|
registry.register(submitPlanTool);
|
|
73
74
|
registry.register(taskUpdateDetailsTool);
|
|
75
|
+
// Email tools. Same mcp__* naming as the task tools, so the shared builtin
|
|
76
|
+
// MCP server exposes them over stdio and the per-task bridge alike.
|
|
77
|
+
registry.register(emailListAccountsTool);
|
|
78
|
+
registry.register(emailSendTool);
|
|
79
|
+
registry.register(emailFetchTool);
|
|
74
80
|
}
|
|
75
|
-
export { readFileTool, readDocumentTool, readImageTool, readAttachmentTool, writeTool, editTool, multieditTool, globTool, grepTool, fetchTool, bashTool, listSkillsTool, readSkillTool, listAgentsTool, invokeAgentTool, listCommandsTool, invokeCommandTool, getAgentContextTool, getTaskStateTool, updateChecklistItemTool, updateChecklistTool, addMessageTool, completeTaskTool, blockTaskTool, yieldTaskTool, projectListTool, taskCreateTool, taskSearchTool, taskUnblockTool, taskActivateTool, taskUnpauseTool, taskDiscardWorktreeTool, taskArchiveTool, taskUnarchiveTool, taskDeleteTool, taskSetAgentTool, submitPlanTool, taskUpdateDetailsTool, };
|
|
81
|
+
export { readFileTool, readDocumentTool, readImageTool, readAttachmentTool, writeTool, editTool, multieditTool, globTool, grepTool, fetchTool, bashTool, listSkillsTool, readSkillTool, listAgentsTool, invokeAgentTool, listCommandsTool, invokeCommandTool, getAgentContextTool, getTaskStateTool, updateChecklistItemTool, updateChecklistTool, addMessageTool, completeTaskTool, blockTaskTool, yieldTaskTool, projectListTool, taskCreateTool, taskSearchTool, taskUnblockTool, taskActivateTool, taskUnpauseTool, taskDiscardWorktreeTool, taskArchiveTool, taskUnarchiveTool, taskDeleteTool, taskSetAgentTool, submitPlanTool, taskUpdateDetailsTool, emailListAccountsTool, emailSendTool, emailFetchTool, };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task_tools.d.ts","sourceRoot":"","sources":["../../../../src/harness/tools/builtin/task_tools.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAc,MAAM,aAAa,CAAC;AAcpD,eAAO,MAAM,gBAAgB,EAAE,IAmD9B,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,IAqCrC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,IAoDjC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,IAmEnC,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,IAiC5B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,IAgD9B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,IAoC3B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,IAoC3B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"task_tools.d.ts","sourceRoot":"","sources":["../../../../src/harness/tools/builtin/task_tools.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAc,MAAM,aAAa,CAAC;AAcpD,eAAO,MAAM,gBAAgB,EAAE,IAmD9B,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,IAqCrC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,IAoDjC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,IAmEnC,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,IAiC5B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,IAgD9B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,IAoC3B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,IAoC3B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,IA4B7B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,IAgG5B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,IA+B5B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,IAwC7B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,IAoC9B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,IAwC7B,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,IA+CrC,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,IAkC7B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,IA8B/B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,IA0D5B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,IAgD9B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,IAuC5B,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { randomUUID } from 'node:crypto';
|
|
2
2
|
import { getDb, getTaskById, saveTask, createTask, addTaskMessage, deleteTask, tryNormalizeChecklistStatus } from '../../../store/db.js';
|
|
3
3
|
import { loadConfig, loadAgents } from '../../../store/json.js';
|
|
4
|
-
import { discardWorktree } from '../../../lib/task_git.js';
|
|
4
|
+
import { discardWorktree, projectWorkingDir } from '../../../lib/task_git.js';
|
|
5
5
|
import { removeContainer } from '../../../lib/docker.js';
|
|
6
6
|
import { runningTasks } from '../../../cli/web/scheduler/locks.js';
|
|
7
7
|
import { resolveReviewEnabled, resolvePlanningEnabled, activationStatus } from '../../../cli/web/scheduler/task_roles.js';
|
|
@@ -52,7 +52,7 @@ export const getTaskStateTool = {
|
|
|
52
52
|
project: project
|
|
53
53
|
? {
|
|
54
54
|
name: project.name,
|
|
55
|
-
workingDir: project
|
|
55
|
+
workingDir: projectWorkingDir(project),
|
|
56
56
|
}
|
|
57
57
|
: null,
|
|
58
58
|
recentMessages: messages.slice(-20),
|
|
@@ -358,7 +358,20 @@ export const projectListTool = {
|
|
|
358
358
|
const config = await loadConfig();
|
|
359
359
|
const projects = [...(config.projects || [])];
|
|
360
360
|
projects.sort((a, b) => a.name.localeCompare(b.name));
|
|
361
|
-
|
|
361
|
+
// Curated projection, never the raw record: ProjectConfig carries secrets
|
|
362
|
+
// (repositoryToken) that must not reach an agent's context, its prompt, or
|
|
363
|
+
// the session logs — and workingDir must be the resolved effective dir,
|
|
364
|
+
// which is blank in storage for a managed clone.
|
|
365
|
+
return {
|
|
366
|
+
content: JSON.stringify(projects.map((p) => ({
|
|
367
|
+
id: p.id,
|
|
368
|
+
name: p.name,
|
|
369
|
+
description: p.description,
|
|
370
|
+
workingDir: projectWorkingDir(p),
|
|
371
|
+
agentId: p.agentId,
|
|
372
|
+
active: p.active,
|
|
373
|
+
}))),
|
|
374
|
+
};
|
|
362
375
|
},
|
|
363
376
|
};
|
|
364
377
|
export const taskCreateTool = {
|
|
@@ -601,11 +614,26 @@ export const taskDiscardWorktreeTool = {
|
|
|
601
614
|
return err(`Task ${taskId} not found`);
|
|
602
615
|
if (!task.worktreePath)
|
|
603
616
|
return err(`Task ${taskId} has no active worktree`);
|
|
617
|
+
// Same guard as task_delete: discarding mid-cycle would rip the worktree out
|
|
618
|
+
// from under the running agent, and the critical section now pushes.
|
|
619
|
+
if (task.lockedAt || runningTasks.has(`task_db_${taskId}`)) {
|
|
620
|
+
return err(`Task ${taskId} is currently running (locked). Wait for it to finish or pause it first.`);
|
|
621
|
+
}
|
|
604
622
|
if (task.dockerContainer) {
|
|
605
623
|
await removeContainer(task.dockerContainer);
|
|
606
624
|
task.dockerContainer = null;
|
|
607
625
|
}
|
|
608
|
-
await
|
|
626
|
+
const config = await loadConfig();
|
|
627
|
+
const project = (config.projects || []).find((p) => p.id === task.projectId);
|
|
628
|
+
const repoUrl = project?.repositoryUrl?.trim();
|
|
629
|
+
try {
|
|
630
|
+
await discardWorktree(task.worktreePath, task.title, repoUrl && task.branch
|
|
631
|
+
? { branch: task.branch, url: repoUrl, token: project?.repositoryToken }
|
|
632
|
+
: undefined);
|
|
633
|
+
}
|
|
634
|
+
catch (e) {
|
|
635
|
+
return err(`Discard aborted — worktree kept: ${e instanceof Error ? e.message : String(e)}`);
|
|
636
|
+
}
|
|
609
637
|
task.worktreePath = null;
|
|
610
638
|
task.updatedAt = new Date().toISOString();
|
|
611
639
|
await saveTask(task);
|
|
@@ -705,11 +733,25 @@ export const taskDeleteTool = {
|
|
|
705
733
|
}
|
|
706
734
|
}
|
|
707
735
|
if (task.worktreePath) {
|
|
736
|
+
const config = await loadConfig();
|
|
737
|
+
const project = (config.projects || []).find((p) => p.id === task.projectId);
|
|
738
|
+
const repoUrl = project?.repositoryUrl?.trim();
|
|
739
|
+
const push = repoUrl && task.branch
|
|
740
|
+
? { branch: task.branch, url: repoUrl, token: project?.repositoryToken }
|
|
741
|
+
: undefined;
|
|
708
742
|
try {
|
|
709
|
-
await discardWorktree(task.worktreePath, task.title);
|
|
743
|
+
await discardWorktree(task.worktreePath, task.title, push);
|
|
710
744
|
}
|
|
711
745
|
catch {
|
|
712
|
-
//
|
|
746
|
+
// A failed push must not strand the worktree on disk with no task row
|
|
747
|
+
// pointing at it: drop the push and clean up. The branch stays in the
|
|
748
|
+
// local clone either way.
|
|
749
|
+
try {
|
|
750
|
+
await discardWorktree(task.worktreePath, task.title);
|
|
751
|
+
}
|
|
752
|
+
catch {
|
|
753
|
+
// Best-effort: proceed with deletion even if worktree cleanup fails.
|
|
754
|
+
}
|
|
713
755
|
}
|
|
714
756
|
}
|
|
715
757
|
await deleteTask(taskId);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../../src/harness/tools/resolve.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAgBvC,wBAAsB,iBAAiB,CACrC,KAAK,EAAE,WAAW,EAClB,QAAQ,EAAE,YAAY,GACrB,OAAO,CAAC,IAAI,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../../src/harness/tools/resolve.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAgBvC,wBAAsB,iBAAiB,CACrC,KAAK,EAAE,WAAW,EAClB,QAAQ,EAAE,YAAY,GACrB,OAAO,CAAC,IAAI,EAAE,CAAC,CA+BjB"}
|
|
@@ -37,11 +37,16 @@ function autoInclude(tools, registry, names) {
|
|
|
37
37
|
}
|
|
38
38
|
export async function resolveAgentTools(agent, registry) {
|
|
39
39
|
const tools = registry.filtered(agent.allowedTools);
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
// Namespace wildcards: `mcp__task__*`, `mcp__email__*`, … pull in every
|
|
41
|
+
// builtin carrying that prefix. The picker offers the wildcard, not the
|
|
42
|
+
// individual tools, so a namespace gaining a tool needs no config change.
|
|
43
|
+
for (const entry of agent.allowedTools) {
|
|
44
|
+
const ns = /^(mcp__[a-z]+__)\*$/.exec(entry);
|
|
45
|
+
if (!ns)
|
|
46
|
+
continue;
|
|
42
47
|
const have = new Set(tools.map((t) => t.name));
|
|
43
|
-
for (const t of
|
|
44
|
-
if (!have.has(t.name)) {
|
|
48
|
+
for (const t of registry.list()) {
|
|
49
|
+
if (t.name.startsWith(ns[1]) && !have.has(t.name)) {
|
|
45
50
|
tools.push(t);
|
|
46
51
|
}
|
|
47
52
|
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import type { ServiceConfig } from '../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Ceiling on one mail network operation, and the same reasoning as
|
|
4
|
+
* `NET_TIMEOUT_MS` in lib/task_git.ts: an unattended run must not hang forever
|
|
5
|
+
* on a wedged server. The abort also carries `ctx.signal`, so Pause and the
|
|
6
|
+
* task's wall-clock budget reach *inside* an in-flight connection — the loop
|
|
7
|
+
* only checks the signal between turns, and would otherwise sit awaiting this
|
|
8
|
+
* tool call.
|
|
9
|
+
*/
|
|
10
|
+
export declare const NET_TIMEOUT_MS = 60000;
|
|
11
|
+
/** An email account with its secrets decrypted and its defaults applied. */
|
|
12
|
+
export type EmailAccount = {
|
|
13
|
+
name: string;
|
|
14
|
+
from: string;
|
|
15
|
+
smtpHost: string;
|
|
16
|
+
smtpPort: number;
|
|
17
|
+
smtpSecure: boolean;
|
|
18
|
+
smtpUser: string;
|
|
19
|
+
smtpPassword: string;
|
|
20
|
+
imapHost: string;
|
|
21
|
+
imapPort: number;
|
|
22
|
+
imapSecure: boolean;
|
|
23
|
+
imapUser: string;
|
|
24
|
+
imapPassword: string;
|
|
25
|
+
/** Outbound: who this account may send to. Enforced by email_send. */
|
|
26
|
+
allowedRecipients: string[];
|
|
27
|
+
/** Inbound: whose mail this account may hand to an agent. Enforced by fetchInbox. */
|
|
28
|
+
allowedSenders: string[];
|
|
29
|
+
/** Agent ids this account is restricted to. Empty = every agent. */
|
|
30
|
+
allowedAgents: string[];
|
|
31
|
+
};
|
|
32
|
+
/** An account can send only if it has somewhere to send through. */
|
|
33
|
+
export declare function canSend(a: EmailAccount): boolean;
|
|
34
|
+
/** …and can be read only if it has a mailbox to read. */
|
|
35
|
+
export declare function canRead(a: EmailAccount): boolean;
|
|
36
|
+
/** Split a comma/newline-separated allowlist into patterns. */
|
|
37
|
+
export declare function parsePatterns(raw: string | undefined): string[];
|
|
38
|
+
/**
|
|
39
|
+
* Does `address` match any of `patterns`? `*` is the only wildcard and matches
|
|
40
|
+
* any run of characters, so `*@example.com` and a bare `*` both work; anything
|
|
41
|
+
* else is compared literally. Case-insensitive.
|
|
42
|
+
*
|
|
43
|
+
* An empty pattern list means "no allowlist configured" and allows everything —
|
|
44
|
+
* the restriction is opt-in, see the design doc.
|
|
45
|
+
*/
|
|
46
|
+
export declare function matchesAllowlist(address: string, patterns: string[]): boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Pull the bare address out of a recipient string, so a display-name form
|
|
49
|
+
* ("Ada <ada@example.com>") is checked against the allowlist by its address and
|
|
50
|
+
* not by the whole label.
|
|
51
|
+
*/
|
|
52
|
+
export declare function bareAddress(recipient: string): string;
|
|
53
|
+
/** Every enabled `email` service, with defaults applied and secrets revealed.
|
|
54
|
+
* Direction is not filtered here — ask canSend()/canRead(). */
|
|
55
|
+
export declare function emailAccounts(services: ServiceConfig[]): EmailAccount[];
|
|
56
|
+
/**
|
|
57
|
+
* Narrow a list to the accounts one agent may use. A scoped account is removed
|
|
58
|
+
* outright rather than refused later: the agent never sees a mailbox it cannot
|
|
59
|
+
* touch, so it cannot name it, be tricked into naming it, or report that it
|
|
60
|
+
* exists.
|
|
61
|
+
*
|
|
62
|
+
* `agentId` undefined means the caller has no agent identity, and that only
|
|
63
|
+
* happens for callers that already hold full access to CARETAKER_HOME — the
|
|
64
|
+
* `caretaker-cli mcp` stdio server (whose trust boundary IS local process
|
|
65
|
+
* access) and direct in-process calls. Those see everything. Any new surface
|
|
66
|
+
* that executes these tools on behalf of an agent MUST set `ctx.callerAgent`,
|
|
67
|
+
* or it silently opts out of scoping.
|
|
68
|
+
*/
|
|
69
|
+
export declare function visibleAccounts(accounts: EmailAccount[], agentId?: string): EmailAccount[];
|
|
70
|
+
/** Configured accounts visible to `agentId`, read from the live config. */
|
|
71
|
+
export declare function listEmailAccounts(agentId?: string): Promise<EmailAccount[]>;
|
|
72
|
+
/** Look an account up by service name, case-insensitively. */
|
|
73
|
+
export declare function findAccount(accounts: EmailAccount[], name: string): EmailAccount | undefined;
|
|
74
|
+
export type OutgoingMail = {
|
|
75
|
+
to: string[];
|
|
76
|
+
cc?: string[];
|
|
77
|
+
bcc?: string[];
|
|
78
|
+
subject: string;
|
|
79
|
+
body: string;
|
|
80
|
+
};
|
|
81
|
+
/** Send one plain-text message. Returns the SMTP message id. */
|
|
82
|
+
export declare function sendEmail(account: EmailAccount, mail: OutgoingMail, signal?: AbortSignal): Promise<string>;
|
|
83
|
+
/** Hard ceiling on messages per call, whatever the caller asks for. */
|
|
84
|
+
export declare const MAX_FETCH = 50;
|
|
85
|
+
/** How many unread messages we are willing to look at to fill one window.
|
|
86
|
+
* Only matters with a sender allowlist: unlisted mail is skipped and left
|
|
87
|
+
* unread, so without a bound a mailbox full of junk would be re-scanned
|
|
88
|
+
* forever. The scan itself is one cheap ENVELOPE fetch, not a download. */
|
|
89
|
+
export declare const MAX_SCAN = 200;
|
|
90
|
+
/** Hard ceiling on the body text handed to the model, per message. */
|
|
91
|
+
export declare const MAX_BODY_CHARS = 8000;
|
|
92
|
+
export type InboundMessage = {
|
|
93
|
+
uid: number;
|
|
94
|
+
from: string;
|
|
95
|
+
to: string;
|
|
96
|
+
subject: string;
|
|
97
|
+
date: string;
|
|
98
|
+
body: string;
|
|
99
|
+
/** Set when the body hit MAX_BODY_CHARS. */
|
|
100
|
+
truncated?: boolean;
|
|
101
|
+
attachments: string[];
|
|
102
|
+
};
|
|
103
|
+
/** ISO-8601 for whatever the parser or the server gave us; '' when unusable. */
|
|
104
|
+
export declare function isoDate(value: Date | string | undefined): string;
|
|
105
|
+
export declare function clampLimit(limit: unknown): number;
|
|
106
|
+
export declare function truncateBody(text: string): {
|
|
107
|
+
body: string;
|
|
108
|
+
truncated: boolean;
|
|
109
|
+
};
|
|
110
|
+
/** Best-effort plain text for a message: the text/plain part, else the HTML converted. */
|
|
111
|
+
export declare function messageText(parsed: {
|
|
112
|
+
text?: string;
|
|
113
|
+
html?: string | false;
|
|
114
|
+
}): string;
|
|
115
|
+
export type FetchOptions = {
|
|
116
|
+
limit?: number;
|
|
117
|
+
/** Unread only (default true) — the whole point of the \Seen convention. */
|
|
118
|
+
unreadOnly?: boolean;
|
|
119
|
+
/** Server-side subject substring filter. */
|
|
120
|
+
subject?: string;
|
|
121
|
+
/** Mark the delivered messages \Seen (default true), so the next run skips them. */
|
|
122
|
+
markSeen?: boolean;
|
|
123
|
+
/** Run-level abort (ctx.signal): closes the connection mid-flight. */
|
|
124
|
+
signal?: AbortSignal;
|
|
125
|
+
};
|
|
126
|
+
/** Read the oldest matching messages from INBOX. */
|
|
127
|
+
export declare function fetchInbox(account: EmailAccount, opts?: FetchOptions): Promise<{
|
|
128
|
+
messages: InboundMessage[];
|
|
129
|
+
refused: number;
|
|
130
|
+
scanTruncated?: boolean;
|
|
131
|
+
}>;
|
|
132
|
+
//# sourceMappingURL=email.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"email.d.ts","sourceRoot":"","sources":["../../src/lib/email.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,QAAS,CAAC;AAarC,4EAA4E;AAC5E,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,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