@hyperwindmill/caretaker-cli 0.11.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/LICENSE +110 -0
- package/README.md +25 -0
- package/dist/agents/dispatch.d.ts +35 -0
- package/dist/agents/dispatch.d.ts.map +1 -0
- package/dist/agents/dispatch.js +108 -0
- package/dist/agents/sync.d.ts +10 -0
- package/dist/agents/sync.d.ts.map +1 -0
- package/dist/agents/sync.js +95 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +50 -0
- package/dist/cli/run.d.ts +11 -0
- package/dist/cli/run.d.ts.map +1 -0
- package/dist/cli/run.js +89 -0
- package/dist/cli/web/fs.d.ts +3 -0
- package/dist/cli/web/fs.d.ts.map +1 -0
- package/dist/cli/web/fs.js +35 -0
- package/dist/cli/web/mcp_bridge.d.ts +7 -0
- package/dist/cli/web/mcp_bridge.d.ts.map +1 -0
- package/dist/cli/web/mcp_bridge.js +86 -0
- package/dist/cli/web/scheduler/heartbeat.d.ts +16 -0
- package/dist/cli/web/scheduler/heartbeat.d.ts.map +1 -0
- package/dist/cli/web/scheduler/heartbeat.js +181 -0
- package/dist/cli/web/scheduler/locks.d.ts +8 -0
- package/dist/cli/web/scheduler/locks.d.ts.map +1 -0
- package/dist/cli/web/scheduler/locks.js +7 -0
- package/dist/cli/web/scheduler/logs.d.ts +21 -0
- package/dist/cli/web/scheduler/logs.d.ts.map +1 -0
- package/dist/cli/web/scheduler/logs.js +62 -0
- package/dist/cli/web/scheduler/strategy.d.ts +6 -0
- package/dist/cli/web/scheduler/strategy.d.ts.map +1 -0
- package/dist/cli/web/scheduler/strategy.js +1 -0
- package/dist/cli/web/scheduler/task_review.d.ts +18 -0
- package/dist/cli/web/scheduler/task_review.d.ts.map +1 -0
- package/dist/cli/web/scheduler/task_review.js +77 -0
- package/dist/cli/web/scheduler/task_roles.d.ts +22 -0
- package/dist/cli/web/scheduler/task_roles.d.ts.map +1 -0
- package/dist/cli/web/scheduler/task_roles.js +70 -0
- package/dist/cli/web/scheduler/task_strategy.d.ts +2 -0
- package/dist/cli/web/scheduler/task_strategy.d.ts.map +1 -0
- package/dist/cli/web/scheduler/task_strategy.js +437 -0
- package/dist/cli/web/scheduler/telegram.d.ts +7 -0
- package/dist/cli/web/scheduler/telegram.d.ts.map +1 -0
- package/dist/cli/web/scheduler/telegram.js +393 -0
- package/dist/cli/web/scheduler.d.ts +15 -0
- package/dist/cli/web/scheduler.d.ts.map +1 -0
- package/dist/cli/web/scheduler.js +60 -0
- package/dist/cli/web/server.d.ts +38 -0
- package/dist/cli/web/server.d.ts.map +1 -0
- package/dist/cli/web/server.js +970 -0
- package/dist/commands/loader.d.ts +37 -0
- package/dist/commands/loader.d.ts.map +1 -0
- package/dist/commands/loader.js +110 -0
- package/dist/harness/claude_code_runner.d.ts +47 -0
- package/dist/harness/claude_code_runner.d.ts.map +1 -0
- package/dist/harness/claude_code_runner.js +325 -0
- package/dist/harness/claude_code_stream.d.ts +32 -0
- package/dist/harness/claude_code_stream.d.ts.map +1 -0
- package/dist/harness/claude_code_stream.js +121 -0
- package/dist/harness/context_files.d.ts +23 -0
- package/dist/harness/context_files.d.ts.map +1 -0
- package/dist/harness/context_files.js +126 -0
- package/dist/harness/history.d.ts +4 -0
- package/dist/harness/history.d.ts.map +1 -0
- package/dist/harness/history.js +120 -0
- package/dist/harness/index.d.ts +8 -0
- package/dist/harness/index.d.ts.map +1 -0
- package/dist/harness/index.js +8 -0
- package/dist/harness/loop.d.ts +73 -0
- package/dist/harness/loop.d.ts.map +1 -0
- package/dist/harness/loop.js +373 -0
- package/dist/harness/model_limits.d.ts +25 -0
- package/dist/harness/model_limits.d.ts.map +1 -0
- package/dist/harness/model_limits.js +67 -0
- package/dist/harness/models.d.ts +9 -0
- package/dist/harness/models.d.ts.map +1 -0
- package/dist/harness/models.js +38 -0
- package/dist/harness/prelude.d.ts +21 -0
- package/dist/harness/prelude.d.ts.map +1 -0
- package/dist/harness/prelude.js +41 -0
- package/dist/harness/provider.d.ts +87 -0
- package/dist/harness/provider.d.ts.map +1 -0
- package/dist/harness/provider.js +140 -0
- package/dist/harness/runtime_info.d.ts +7 -0
- package/dist/harness/runtime_info.d.ts.map +1 -0
- package/dist/harness/runtime_info.js +15 -0
- package/dist/harness/think_tag_splitter.d.ts +33 -0
- package/dist/harness/think_tag_splitter.d.ts.map +1 -0
- package/dist/harness/think_tag_splitter.js +70 -0
- package/dist/harness/title.d.ts +17 -0
- package/dist/harness/title.d.ts.map +1 -0
- package/dist/harness/title.js +75 -0
- package/dist/harness/tools/builtin/bash.d.ts +3 -0
- package/dist/harness/tools/builtin/bash.d.ts.map +1 -0
- package/dist/harness/tools/builtin/bash.js +137 -0
- package/dist/harness/tools/builtin/edit.d.ts +6 -0
- package/dist/harness/tools/builtin/edit.d.ts.map +1 -0
- package/dist/harness/tools/builtin/edit.js +85 -0
- package/dist/harness/tools/builtin/fetch.d.ts +3 -0
- package/dist/harness/tools/builtin/fetch.d.ts.map +1 -0
- package/dist/harness/tools/builtin/fetch.js +75 -0
- package/dist/harness/tools/builtin/get_agent_context.d.ts +3 -0
- package/dist/harness/tools/builtin/get_agent_context.d.ts.map +1 -0
- package/dist/harness/tools/builtin/get_agent_context.js +76 -0
- package/dist/harness/tools/builtin/glob.d.ts +3 -0
- package/dist/harness/tools/builtin/glob.d.ts.map +1 -0
- package/dist/harness/tools/builtin/glob.js +52 -0
- package/dist/harness/tools/builtin/grep.d.ts +3 -0
- package/dist/harness/tools/builtin/grep.d.ts.map +1 -0
- package/dist/harness/tools/builtin/grep.js +126 -0
- package/dist/harness/tools/builtin/index.d.ts +23 -0
- package/dist/harness/tools/builtin/index.d.ts.map +1 -0
- package/dist/harness/tools/builtin/index.js +74 -0
- package/dist/harness/tools/builtin/invoke_agent.d.ts +3 -0
- package/dist/harness/tools/builtin/invoke_agent.d.ts.map +1 -0
- package/dist/harness/tools/builtin/invoke_agent.js +106 -0
- package/dist/harness/tools/builtin/invoke_command.d.ts +3 -0
- package/dist/harness/tools/builtin/invoke_command.d.ts.map +1 -0
- package/dist/harness/tools/builtin/invoke_command.js +42 -0
- package/dist/harness/tools/builtin/list_agents.d.ts +3 -0
- package/dist/harness/tools/builtin/list_agents.d.ts.map +1 -0
- package/dist/harness/tools/builtin/list_agents.js +32 -0
- package/dist/harness/tools/builtin/list_commands.d.ts +3 -0
- package/dist/harness/tools/builtin/list_commands.d.ts.map +1 -0
- package/dist/harness/tools/builtin/list_commands.js +27 -0
- package/dist/harness/tools/builtin/list_skills.d.ts +3 -0
- package/dist/harness/tools/builtin/list_skills.d.ts.map +1 -0
- package/dist/harness/tools/builtin/list_skills.js +24 -0
- package/dist/harness/tools/builtin/multiedit.d.ts +3 -0
- package/dist/harness/tools/builtin/multiedit.d.ts.map +1 -0
- package/dist/harness/tools/builtin/multiedit.js +88 -0
- package/dist/harness/tools/builtin/read_attachment.d.ts +3 -0
- package/dist/harness/tools/builtin/read_attachment.d.ts.map +1 -0
- package/dist/harness/tools/builtin/read_attachment.js +128 -0
- package/dist/harness/tools/builtin/read_document.d.ts +37 -0
- package/dist/harness/tools/builtin/read_document.d.ts.map +1 -0
- package/dist/harness/tools/builtin/read_document.js +238 -0
- package/dist/harness/tools/builtin/read_file.d.ts +3 -0
- package/dist/harness/tools/builtin/read_file.d.ts.map +1 -0
- package/dist/harness/tools/builtin/read_file.js +141 -0
- package/dist/harness/tools/builtin/read_image.d.ts +3 -0
- package/dist/harness/tools/builtin/read_image.d.ts.map +1 -0
- package/dist/harness/tools/builtin/read_image.js +80 -0
- package/dist/harness/tools/builtin/read_skill.d.ts +3 -0
- package/dist/harness/tools/builtin/read_skill.d.ts.map +1 -0
- package/dist/harness/tools/builtin/read_skill.js +30 -0
- package/dist/harness/tools/builtin/shell-env.d.ts +55 -0
- package/dist/harness/tools/builtin/shell-env.d.ts.map +1 -0
- package/dist/harness/tools/builtin/shell-env.js +181 -0
- package/dist/harness/tools/builtin/task_tools.d.ts +21 -0
- package/dist/harness/tools/builtin/task_tools.d.ts.map +1 -0
- package/dist/harness/tools/builtin/task_tools.js +708 -0
- package/dist/harness/tools/builtin/write.d.ts +3 -0
- package/dist/harness/tools/builtin/write.d.ts.map +1 -0
- package/dist/harness/tools/builtin/write.js +56 -0
- package/dist/harness/tools/index.d.ts +6 -0
- package/dist/harness/tools/index.d.ts.map +1 -0
- package/dist/harness/tools/index.js +7 -0
- package/dist/harness/tools/instance.d.ts +3 -0
- package/dist/harness/tools/instance.d.ts.map +1 -0
- package/dist/harness/tools/instance.js +19 -0
- package/dist/harness/tools/registry.d.ts +21 -0
- package/dist/harness/tools/registry.d.ts.map +1 -0
- package/dist/harness/tools/registry.js +33 -0
- package/dist/harness/tools/resolve.d.ts +5 -0
- package/dist/harness/tools/resolve.d.ts.map +1 -0
- package/dist/harness/tools/resolve.js +60 -0
- package/dist/harness/tools/sandbox.d.ts +6 -0
- package/dist/harness/tools/sandbox.d.ts.map +1 -0
- package/dist/harness/tools/sandbox.js +23 -0
- package/dist/harness/tools/types.d.ts +80 -0
- package/dist/harness/tools/types.d.ts.map +1 -0
- package/dist/harness/tools/types.js +16 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +46 -0
- package/dist/lib/encryption.d.ts +24 -0
- package/dist/lib/encryption.d.ts.map +1 -0
- package/dist/lib/encryption.js +163 -0
- package/dist/lib/open_url.d.ts +9 -0
- package/dist/lib/open_url.d.ts.map +1 -0
- package/dist/lib/open_url.js +23 -0
- package/dist/lib/task_git.d.ts +11 -0
- package/dist/lib/task_git.d.ts.map +1 -0
- package/dist/lib/task_git.js +100 -0
- package/dist/mcp/adapter.d.ts +9 -0
- package/dist/mcp/adapter.d.ts.map +1 -0
- package/dist/mcp/adapter.js +74 -0
- package/dist/mcp/client.d.ts +50 -0
- package/dist/mcp/client.d.ts.map +1 -0
- package/dist/mcp/client.js +243 -0
- package/dist/mcp/oauth.d.ts +30 -0
- package/dist/mcp/oauth.d.ts.map +1 -0
- package/dist/mcp/oauth.js +171 -0
- package/dist/mcp/oauth_callback.d.ts +9 -0
- package/dist/mcp/oauth_callback.d.ts.map +1 -0
- package/dist/mcp/oauth_callback.js +51 -0
- package/dist/mcp/oauth_store.d.ts +22 -0
- package/dist/mcp/oauth_store.d.ts.map +1 -0
- package/dist/mcp/oauth_store.js +40 -0
- package/dist/mcp/server_manager.d.ts +49 -0
- package/dist/mcp/server_manager.d.ts.map +1 -0
- package/dist/mcp/server_manager.js +271 -0
- package/dist/plugins/fetchers/git.d.ts +67 -0
- package/dist/plugins/fetchers/git.d.ts.map +1 -0
- package/dist/plugins/fetchers/git.js +130 -0
- package/dist/plugins/fetchers/path.d.ts +4 -0
- package/dist/plugins/fetchers/path.d.ts.map +1 -0
- package/dist/plugins/fetchers/path.js +22 -0
- package/dist/plugins/loader.d.ts +31 -0
- package/dist/plugins/loader.d.ts.map +1 -0
- package/dist/plugins/loader.js +146 -0
- package/dist/plugins/manifest.d.ts +56 -0
- package/dist/plugins/manifest.d.ts.map +1 -0
- package/dist/plugins/manifest.js +389 -0
- package/dist/plugins/refresh_on_start.d.ts +7 -0
- package/dist/plugins/refresh_on_start.d.ts.map +1 -0
- package/dist/plugins/refresh_on_start.js +35 -0
- package/dist/plugins/source_manager.d.ts +27 -0
- package/dist/plugins/source_manager.d.ts.map +1 -0
- package/dist/plugins/source_manager.js +211 -0
- package/dist/plugins/types.d.ts +41 -0
- package/dist/plugins/types.d.ts.map +1 -0
- package/dist/plugins/types.js +11 -0
- package/dist/session/context_usage.d.ts +13 -0
- package/dist/session/context_usage.d.ts.map +1 -0
- package/dist/session/context_usage.js +25 -0
- package/dist/session/index.d.ts +7 -0
- package/dist/session/index.d.ts.map +1 -0
- package/dist/session/index.js +5 -0
- package/dist/session/store.d.ts +68 -0
- package/dist/session/store.d.ts.map +1 -0
- package/dist/session/store.js +268 -0
- package/dist/session/types.d.ts +60 -0
- package/dist/session/types.d.ts.map +1 -0
- package/dist/session/types.js +11 -0
- package/dist/store/db.d.ts +64 -0
- package/dist/store/db.d.ts.map +1 -0
- package/dist/store/db.js +91 -0
- package/dist/store/json.d.ts +21 -0
- package/dist/store/json.d.ts.map +1 -0
- package/dist/store/json.js +135 -0
- package/dist/tui/agents.d.ts +4 -0
- package/dist/tui/agents.d.ts.map +1 -0
- package/dist/tui/agents.js +616 -0
- package/dist/tui/app.d.ts +2 -0
- package/dist/tui/app.d.ts.map +1 -0
- package/dist/tui/app.js +32 -0
- package/dist/tui/chat.d.ts +10 -0
- package/dist/tui/chat.d.ts.map +1 -0
- package/dist/tui/chat.js +258 -0
- package/dist/tui/logo.d.ts +2 -0
- package/dist/tui/logo.d.ts.map +1 -0
- package/dist/tui/logo.js +10 -0
- package/dist/tui/mcp_servers.d.ts +4 -0
- package/dist/tui/mcp_servers.d.ts.map +1 -0
- package/dist/tui/mcp_servers.js +287 -0
- package/dist/tui/plugins.d.ts +4 -0
- package/dist/tui/plugins.d.ts.map +1 -0
- package/dist/tui/plugins.js +234 -0
- package/dist/tui/providers.d.ts +4 -0
- package/dist/tui/providers.d.ts.map +1 -0
- package/dist/tui/providers.js +178 -0
- package/dist/tui/tool_picker_state.d.ts +9 -0
- package/dist/tui/tool_picker_state.d.ts.map +1 -0
- package/dist/tui/tool_picker_state.js +37 -0
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +1 -0
- package/dist/webview/index.html +22 -0
- package/dist/webview/standalone.css +2732 -0
- package/dist/webview/standalone.css.map +7 -0
- package/dist/webview/standalone.js +20641 -0
- package/dist/webview/standalone.js.map +7 -0
- package/package.json +120 -0
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
// Parser for `claude -p --output-format stream-json --verbose
|
|
2
|
+
// --include-partial-messages` output. One JSON object per line.
|
|
3
|
+
// Derived from real captured fixtures in ./fixtures/ — do not "fix"
|
|
4
|
+
// field paths from memory; check the fixtures.
|
|
5
|
+
function mapUsage(u) {
|
|
6
|
+
if (!u || typeof u !== 'object')
|
|
7
|
+
return undefined;
|
|
8
|
+
const usage = {
|
|
9
|
+
input: typeof u.input_tokens === 'number' ? u.input_tokens : 0,
|
|
10
|
+
output: typeof u.output_tokens === 'number' ? u.output_tokens : 0,
|
|
11
|
+
};
|
|
12
|
+
if (typeof u.cache_read_input_tokens === 'number')
|
|
13
|
+
usage.cacheRead = u.cache_read_input_tokens;
|
|
14
|
+
if (typeof u.cache_creation_input_tokens === 'number')
|
|
15
|
+
usage.cacheWrite = u.cache_creation_input_tokens;
|
|
16
|
+
return usage;
|
|
17
|
+
}
|
|
18
|
+
function textFromToolResultContent(content) {
|
|
19
|
+
if (typeof content === 'string')
|
|
20
|
+
return content;
|
|
21
|
+
if (Array.isArray(content)) {
|
|
22
|
+
return content
|
|
23
|
+
.map((b) => (b && b.type === 'text' && typeof b.text === 'string' ? b.text : ''))
|
|
24
|
+
.join('');
|
|
25
|
+
}
|
|
26
|
+
return '';
|
|
27
|
+
}
|
|
28
|
+
export function parseClaudeStreamLine(rawLine) {
|
|
29
|
+
const line = rawLine.trim();
|
|
30
|
+
if (!line)
|
|
31
|
+
return [];
|
|
32
|
+
let obj;
|
|
33
|
+
try {
|
|
34
|
+
obj = JSON.parse(line);
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
return [];
|
|
38
|
+
}
|
|
39
|
+
if (!obj || typeof obj !== 'object')
|
|
40
|
+
return [];
|
|
41
|
+
switch (obj.type) {
|
|
42
|
+
case 'system':
|
|
43
|
+
if (obj.subtype === 'init' && typeof obj.session_id === 'string') {
|
|
44
|
+
return [{ kind: 'init', sessionId: obj.session_id }];
|
|
45
|
+
}
|
|
46
|
+
return [];
|
|
47
|
+
case 'stream_event': {
|
|
48
|
+
const ev = obj.event;
|
|
49
|
+
if (ev?.type === 'content_block_delta') {
|
|
50
|
+
const d = ev.delta;
|
|
51
|
+
if (d?.type === 'text_delta' && typeof d.text === 'string' && d.text.length > 0) {
|
|
52
|
+
return [{ kind: 'text', text: d.text }];
|
|
53
|
+
}
|
|
54
|
+
if (d?.type === 'thinking_delta' && typeof d.thinking === 'string' && d.thinking.length > 0) {
|
|
55
|
+
return [{ kind: 'thinking', text: d.thinking }];
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return [];
|
|
59
|
+
}
|
|
60
|
+
case 'assistant': {
|
|
61
|
+
const msg = obj.message;
|
|
62
|
+
if (!msg || !Array.isArray(msg.content))
|
|
63
|
+
return [];
|
|
64
|
+
const parts = [];
|
|
65
|
+
for (const block of msg.content) {
|
|
66
|
+
if (block?.type === 'text' && typeof block.text === 'string') {
|
|
67
|
+
parts.push({ type: 'text', text: block.text });
|
|
68
|
+
}
|
|
69
|
+
else if (block?.type === 'thinking' &&
|
|
70
|
+
typeof block.thinking === 'string' &&
|
|
71
|
+
block.thinking.trim().length > 0) {
|
|
72
|
+
// Opus (extended thinking off) emits empty thinking blocks in the final
|
|
73
|
+
// assistant message; persisting them renders as empty boxes on reload.
|
|
74
|
+
parts.push({ type: 'thinking', text: block.thinking });
|
|
75
|
+
}
|
|
76
|
+
else if (block?.type === 'tool_use') {
|
|
77
|
+
parts.push({ type: 'tool_use', id: block.id, name: block.name, args: block.input });
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
if (parts.length === 0)
|
|
81
|
+
return [];
|
|
82
|
+
return [
|
|
83
|
+
{
|
|
84
|
+
kind: 'assistant_message',
|
|
85
|
+
id: typeof msg.id === 'string' ? msg.id : '',
|
|
86
|
+
parts,
|
|
87
|
+
usage: mapUsage(msg.usage),
|
|
88
|
+
},
|
|
89
|
+
];
|
|
90
|
+
}
|
|
91
|
+
case 'user': {
|
|
92
|
+
const content = obj.message?.content;
|
|
93
|
+
if (!Array.isArray(content))
|
|
94
|
+
return [];
|
|
95
|
+
const out = [];
|
|
96
|
+
for (const block of content) {
|
|
97
|
+
if (block?.type === 'tool_result' && typeof block.tool_use_id === 'string') {
|
|
98
|
+
out.push({
|
|
99
|
+
kind: 'tool_result',
|
|
100
|
+
toolUseId: block.tool_use_id,
|
|
101
|
+
content: textFromToolResultContent(block.content),
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return out;
|
|
106
|
+
}
|
|
107
|
+
case 'result':
|
|
108
|
+
return [
|
|
109
|
+
{
|
|
110
|
+
kind: 'result',
|
|
111
|
+
subtype: typeof obj.subtype === 'string' ? obj.subtype : '',
|
|
112
|
+
text: typeof obj.result === 'string' ? obj.result : '',
|
|
113
|
+
usage: mapUsage(obj.usage),
|
|
114
|
+
costUsd: typeof obj.total_cost_usd === 'number' ? obj.total_cost_usd : undefined,
|
|
115
|
+
isError: obj.is_error === true || String(obj.subtype ?? '').startsWith('error'),
|
|
116
|
+
},
|
|
117
|
+
];
|
|
118
|
+
default:
|
|
119
|
+
return [];
|
|
120
|
+
}
|
|
121
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface ContextEntry {
|
|
2
|
+
path: string;
|
|
3
|
+
content: string;
|
|
4
|
+
}
|
|
5
|
+
/** Discover and read context files for a given workingDir. */
|
|
6
|
+
export declare function loadContextFiles(workingDir: string): Promise<ContextEntry[]>;
|
|
7
|
+
/** Format the loaded context entries as a single string block for the system prompt. */
|
|
8
|
+
export declare function formatContextBlock(entries: ContextEntry[]): string;
|
|
9
|
+
/**
|
|
10
|
+
* Resolve `@<path>` references embedded in a system prompt.
|
|
11
|
+
*
|
|
12
|
+
* Syntax: `@path/to/file` or `@./relative/path` — the path is resolved
|
|
13
|
+
* relative to the agent's working directory (or CWD if none is set).
|
|
14
|
+
*
|
|
15
|
+
* Each reference is replaced inline with the file content wrapped in
|
|
16
|
+
* `<context-file>` tags. If a referenced file does not exist or exceeds
|
|
17
|
+
* PER_FILE_MAX, the reference is replaced with a graceful fallback message
|
|
18
|
+
* instead of causing an error.
|
|
19
|
+
*
|
|
20
|
+
* Nested @-references inside resolved files are NOT expanded (single pass).
|
|
21
|
+
*/
|
|
22
|
+
export declare function resolveFileReferences(text: string, workingDir: string): Promise<string>;
|
|
23
|
+
//# sourceMappingURL=context_files.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context_files.d.ts","sourceRoot":"","sources":["../../src/harness/context_files.ts"],"names":[],"mappings":"AAwBA,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAgCD,8DAA8D;AAC9D,wBAAsB,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAyBlF;AAED,wFAAwF;AACxF,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,MAAM,CAKlE;AAID;;;;;;;;;;;;GAYG;AACH,wBAAsB,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CA0B7F"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { readFile, stat } from 'node:fs/promises';
|
|
2
|
+
import * as path from 'node:path';
|
|
3
|
+
import * as os from 'node:os';
|
|
4
|
+
/**
|
|
5
|
+
* Inject standard AI-agent context files into the system prompt.
|
|
6
|
+
*
|
|
7
|
+
* Walks up from the agent's workingDir looking for AGENTS.md, CLAUDE.md,
|
|
8
|
+
* GEMINI.md (per-file first match wins). Also reads global ~/.caretaker/AGENTS.md
|
|
9
|
+
* if present.
|
|
10
|
+
*
|
|
11
|
+
* Each file is wrapped with a `Instructions from: <abspath>` header so the
|
|
12
|
+
* model knows where the rules came from.
|
|
13
|
+
*
|
|
14
|
+
* Caps:
|
|
15
|
+
* - per-file max 100 KB (silently skipped if larger)
|
|
16
|
+
* - total max 250 KB (further files dropped once budget hit)
|
|
17
|
+
*/
|
|
18
|
+
const CONTEXT_FILES = ['AGENTS.md', 'CLAUDE.md', 'GEMINI.md'];
|
|
19
|
+
const PER_FILE_MAX = 100 * 1024;
|
|
20
|
+
const TOTAL_MAX = 250 * 1024;
|
|
21
|
+
async function readIfExistsAndSmall(p) {
|
|
22
|
+
try {
|
|
23
|
+
const st = await stat(p);
|
|
24
|
+
if (!st.isFile())
|
|
25
|
+
return null;
|
|
26
|
+
if (st.size > PER_FILE_MAX)
|
|
27
|
+
return null;
|
|
28
|
+
return await readFile(p, 'utf-8');
|
|
29
|
+
}
|
|
30
|
+
catch {
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
async function walkUpFor(name, startDir) {
|
|
35
|
+
let dir = path.resolve(startDir);
|
|
36
|
+
const root = path.parse(dir).root;
|
|
37
|
+
while (true) {
|
|
38
|
+
const candidate = path.join(dir, name);
|
|
39
|
+
const content = await readIfExistsAndSmall(candidate);
|
|
40
|
+
if (content !== null)
|
|
41
|
+
return candidate;
|
|
42
|
+
if (dir === root)
|
|
43
|
+
return null;
|
|
44
|
+
const parent = path.dirname(dir);
|
|
45
|
+
if (parent === dir)
|
|
46
|
+
return null;
|
|
47
|
+
dir = parent;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
function globalCandidates() {
|
|
51
|
+
const home = os.homedir();
|
|
52
|
+
return [path.join(home, '.caretaker', 'AGENTS.md')];
|
|
53
|
+
}
|
|
54
|
+
/** Discover and read context files for a given workingDir. */
|
|
55
|
+
export async function loadContextFiles(workingDir) {
|
|
56
|
+
const out = [];
|
|
57
|
+
let total = 0;
|
|
58
|
+
const push = async (p) => {
|
|
59
|
+
if (total >= TOTAL_MAX)
|
|
60
|
+
return;
|
|
61
|
+
const content = await readIfExistsAndSmall(p);
|
|
62
|
+
if (content === null)
|
|
63
|
+
return;
|
|
64
|
+
if (total + content.length > TOTAL_MAX)
|
|
65
|
+
return;
|
|
66
|
+
out.push({ path: p, content });
|
|
67
|
+
total += content.length;
|
|
68
|
+
};
|
|
69
|
+
// Project-level: walk up from workingDir for each name; first hit per name wins.
|
|
70
|
+
for (const name of CONTEXT_FILES) {
|
|
71
|
+
const found = await walkUpFor(name, workingDir);
|
|
72
|
+
if (found)
|
|
73
|
+
await push(found);
|
|
74
|
+
}
|
|
75
|
+
// Global fallbacks.
|
|
76
|
+
for (const candidate of globalCandidates()) {
|
|
77
|
+
await push(candidate);
|
|
78
|
+
}
|
|
79
|
+
return out;
|
|
80
|
+
}
|
|
81
|
+
/** Format the loaded context entries as a single string block for the system prompt. */
|
|
82
|
+
export function formatContextBlock(entries) {
|
|
83
|
+
if (entries.length === 0)
|
|
84
|
+
return '';
|
|
85
|
+
return entries
|
|
86
|
+
.map((e) => `<context-file path="${e.path}">\n${e.content}\n</context-file>`)
|
|
87
|
+
.join('\n\n');
|
|
88
|
+
}
|
|
89
|
+
// ─── @<file> reference resolution ──────────────────────────────────────
|
|
90
|
+
/**
|
|
91
|
+
* Resolve `@<path>` references embedded in a system prompt.
|
|
92
|
+
*
|
|
93
|
+
* Syntax: `@path/to/file` or `@./relative/path` — the path is resolved
|
|
94
|
+
* relative to the agent's working directory (or CWD if none is set).
|
|
95
|
+
*
|
|
96
|
+
* Each reference is replaced inline with the file content wrapped in
|
|
97
|
+
* `<context-file>` tags. If a referenced file does not exist or exceeds
|
|
98
|
+
* PER_FILE_MAX, the reference is replaced with a graceful fallback message
|
|
99
|
+
* instead of causing an error.
|
|
100
|
+
*
|
|
101
|
+
* Nested @-references inside resolved files are NOT expanded (single pass).
|
|
102
|
+
*/
|
|
103
|
+
export async function resolveFileReferences(text, workingDir) {
|
|
104
|
+
// Match @path — must start with /, ./, or ~ for an absolute/relative path.
|
|
105
|
+
// This avoids false positives on email addresses, mentions, etc.
|
|
106
|
+
const re = /@((?:\.\/|\/|~)[^\s@]+)/g;
|
|
107
|
+
const matches = [...text.matchAll(re)];
|
|
108
|
+
if (matches.length === 0)
|
|
109
|
+
return text;
|
|
110
|
+
// Deduplicate paths to avoid reading the same file multiple times.
|
|
111
|
+
const uniquePaths = [...new Set(matches.map((m) => m[1]))];
|
|
112
|
+
const resolved = new Map();
|
|
113
|
+
for (const rawPath of uniquePaths) {
|
|
114
|
+
const expanded = rawPath.startsWith('~') ? path.join(os.homedir(), rawPath.slice(1)) : rawPath;
|
|
115
|
+
const absPath = path.resolve(workingDir, expanded);
|
|
116
|
+
const content = await readIfExistsAndSmall(absPath);
|
|
117
|
+
if (content !== null) {
|
|
118
|
+
resolved.set(rawPath, `<context-file path="${absPath}">\n${content}\n</context-file>`);
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
resolved.set(rawPath, `<!-- file not found or too large: ${absPath} -->`);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
// Replace all occurrences (including duplicates) in a single pass.
|
|
125
|
+
return text.replace(re, (_, p) => resolved.get(p) ?? '');
|
|
126
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"history.d.ts","sourceRoot":"","sources":["../../src/harness/history.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAiB,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAUjD,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,aAAa,EAAE,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,WAAW,EAAE,CA+F9F"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
// Map persisted MessageRecord[] (the canonical session-store shape) to
|
|
2
|
+
// OpenAI-compatible ChatMessage[] for replay against the provider.
|
|
3
|
+
//
|
|
4
|
+
// Ported from caretaker server's src/runner/chat_messages.ts
|
|
5
|
+
// (mapRowsToChatMessages). Behavior preserved 1:1:
|
|
6
|
+
// - user → {role:"user", content}
|
|
7
|
+
// - assistant with parts → {role:"assistant", content: text-only or null,
|
|
8
|
+
// tool_calls?: [...]}
|
|
9
|
+
// - assistant without parts (legacy) → {role:"assistant", content}
|
|
10
|
+
// - tool → {role:"tool", tool_call_id, content}; orphan tool rows (no
|
|
11
|
+
// matching tool_use id in any prior assistant row) are dropped.
|
|
12
|
+
import { readFileSync } from 'node:fs';
|
|
13
|
+
import { join } from 'node:path';
|
|
14
|
+
import { attachmentsDir } from '../session/store.js';
|
|
15
|
+
function textConcat(parts) {
|
|
16
|
+
return parts
|
|
17
|
+
.filter((p) => p.type === 'text')
|
|
18
|
+
.map((p) => p.text)
|
|
19
|
+
.join('');
|
|
20
|
+
}
|
|
21
|
+
export function mapMessagesToChat(messages, sessionId) {
|
|
22
|
+
const out = [];
|
|
23
|
+
const knownToolCallIds = new Set();
|
|
24
|
+
for (const m of messages) {
|
|
25
|
+
if (m.role === 'user') {
|
|
26
|
+
if (m.attachments && m.attachments.length > 0) {
|
|
27
|
+
let textContent = m.content;
|
|
28
|
+
const imageParts = [];
|
|
29
|
+
for (const att of m.attachments) {
|
|
30
|
+
const displayName = att.name || att.id;
|
|
31
|
+
textContent += `\n\n[Allegato: ${displayName} (ID: ${att.id})]`;
|
|
32
|
+
if (att.mime.startsWith('image/')) {
|
|
33
|
+
try {
|
|
34
|
+
const filePath = join(attachmentsDir(sessionId || 'default'), att.id);
|
|
35
|
+
const data = readFileSync(filePath);
|
|
36
|
+
const base64 = data.toString('base64');
|
|
37
|
+
imageParts.push({
|
|
38
|
+
type: 'image_url',
|
|
39
|
+
image_url: {
|
|
40
|
+
url: `data:${att.mime};base64,${base64}`,
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
catch (err) {
|
|
45
|
+
console.error(`[history] failed to read user image attachment ${att.id}:`, err);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
if (imageParts.length > 0) {
|
|
50
|
+
out.push({
|
|
51
|
+
role: 'user',
|
|
52
|
+
content: [
|
|
53
|
+
{ type: 'text', text: textContent },
|
|
54
|
+
...imageParts,
|
|
55
|
+
],
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
out.push({ role: 'user', content: textContent });
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
out.push({ role: 'user', content: m.content });
|
|
64
|
+
}
|
|
65
|
+
continue;
|
|
66
|
+
}
|
|
67
|
+
if (m.role === 'assistant') {
|
|
68
|
+
if (Array.isArray(m.parts)) {
|
|
69
|
+
const text = textConcat(m.parts);
|
|
70
|
+
const toolCalls = m.parts
|
|
71
|
+
.filter((p) => p.type === 'tool_use')
|
|
72
|
+
.map((p) => ({
|
|
73
|
+
id: p.id,
|
|
74
|
+
type: 'function',
|
|
75
|
+
function: { name: p.name, arguments: JSON.stringify(p.args ?? {}) },
|
|
76
|
+
}));
|
|
77
|
+
for (const tc of toolCalls)
|
|
78
|
+
knownToolCallIds.add(tc.id);
|
|
79
|
+
out.push({
|
|
80
|
+
role: 'assistant',
|
|
81
|
+
content: text.length > 0 ? text : null,
|
|
82
|
+
...(toolCalls.length > 0 ? { tool_calls: toolCalls } : {}),
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
out.push({ role: 'assistant', content: m.content });
|
|
87
|
+
}
|
|
88
|
+
continue;
|
|
89
|
+
}
|
|
90
|
+
if (m.role === 'tool') {
|
|
91
|
+
const id = m.toolCallId ?? '';
|
|
92
|
+
if (!id || !knownToolCallIds.has(id))
|
|
93
|
+
continue;
|
|
94
|
+
out.push({ role: 'tool', tool_call_id: id, content: m.content });
|
|
95
|
+
if (m.attachments && m.attachments.length > 0) {
|
|
96
|
+
const parts = [{ type: 'text', text: 'Attachment from tool:' }];
|
|
97
|
+
for (const att of m.attachments) {
|
|
98
|
+
try {
|
|
99
|
+
const filePath = join(attachmentsDir(sessionId || 'default'), att.id);
|
|
100
|
+
const data = readFileSync(filePath);
|
|
101
|
+
const base64 = data.toString('base64');
|
|
102
|
+
parts.push({
|
|
103
|
+
type: 'image_url',
|
|
104
|
+
image_url: {
|
|
105
|
+
url: `data:${att.mime};base64,${base64}`,
|
|
106
|
+
},
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
catch (err) {
|
|
110
|
+
console.error(`[history] failed to read attachment ${att.id}:`, err);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
if (parts.length > 1) {
|
|
114
|
+
out.push({ role: 'user', content: parts });
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
return out;
|
|
120
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { run } from './loop.js';
|
|
2
|
+
export type { RunOptions, RunCallbacks, RunResult, ConfirmDecision } from './loop.js';
|
|
3
|
+
export { resolveAgentTools, ToolRegistry, registerBuiltins, toOpenAiTool } from './tools/index.js';
|
|
4
|
+
export type { Tool, ToolContext, ToolResult, ConfirmGate, OpenAiFunctionTool, } from './tools/index.js';
|
|
5
|
+
export { tools } from './tools/instance.js';
|
|
6
|
+
export { fetchOpenAiStyleModels } from './models.js';
|
|
7
|
+
export type { ModelsResult } from './models.js';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/harness/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAChC,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAEtF,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACnG,YAAY,EACV,IAAI,EACJ,WAAW,EACX,UAAU,EACV,WAAW,EACX,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACrD,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Public API barrel for embedding the harness in external consumers
|
|
2
|
+
// (the VSCode extension, future desktop app, tests). Internal modules
|
|
3
|
+
// keep importing their specific files; only this barrel is part of the
|
|
4
|
+
// stable surface exposed via `caretaker-cli/harness`.
|
|
5
|
+
export { run } from './loop.js';
|
|
6
|
+
export { resolveAgentTools, ToolRegistry, registerBuiltins, toOpenAiTool } from './tools/index.js';
|
|
7
|
+
export { tools } from './tools/instance.js';
|
|
8
|
+
export { fetchOpenAiStyleModels } from './models.js';
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { AgentConfig, ProviderConfig } from '../types.js';
|
|
2
|
+
import type { MessageRecord, ToolAttachmentRecord } from '../session/types.js';
|
|
3
|
+
import { type AssistantUsage } from './provider.js';
|
|
4
|
+
import { type ConfirmGate, type ConfirmDecision as ToolConfirmDecision, type Tool } from './tools/index.js';
|
|
5
|
+
type FetchLike = (input: string, init: RequestInit) => Promise<Response>;
|
|
6
|
+
/** Testing hook — override the fetch used by the runner. */
|
|
7
|
+
export declare function __setFetch(f: FetchLike): void;
|
|
8
|
+
export declare function __resetFetch(): void;
|
|
9
|
+
export type ConfirmDecision = ToolConfirmDecision;
|
|
10
|
+
export interface RunCallbacks {
|
|
11
|
+
/** Streamed assistant text fragments as they arrive. */
|
|
12
|
+
onChunk?: (chunk: string) => void;
|
|
13
|
+
/** Streamed model "thinking" / reasoning fragments (provider-dependent). */
|
|
14
|
+
onThinking?: (text: string) => void;
|
|
15
|
+
/** Fired once per tool invocation, after arguments are fully decoded, before execution. */
|
|
16
|
+
onToolCall?: (id: string, name: string, args: unknown) => void;
|
|
17
|
+
/**
|
|
18
|
+
* Optional gate. When provided, the loop awaits the decision before
|
|
19
|
+
* executing each tool call. `"once"` and `"always"` both proceed (the
|
|
20
|
+
* caller is responsible for remembering "always" across subsequent
|
|
21
|
+
* calls); `"reject"` skips execution and the tool result is the string
|
|
22
|
+
* `Error: rejected by user`. The caller decides which tools to gate —
|
|
23
|
+
* this hook does not consult agent.confirmTools itself.
|
|
24
|
+
*/
|
|
25
|
+
confirmTool?: ConfirmGate;
|
|
26
|
+
/** Fired with the textual result of the tool. */
|
|
27
|
+
onToolResult?: (id: string, content: string) => void;
|
|
28
|
+
/** Per-turn usage breakdown from the provider. */
|
|
29
|
+
onUsage?: (usage: AssistantUsage) => void;
|
|
30
|
+
/**
|
|
31
|
+
* Emitted for each persistable MessageRecord produced by the loop:
|
|
32
|
+
* one assistant message per turn (with parts + usage), plus one tool
|
|
33
|
+
* message per dispatched tool call. The new user message is the caller's
|
|
34
|
+
* responsibility — it provided the prompt and should persist it before
|
|
35
|
+
* calling run().
|
|
36
|
+
*/
|
|
37
|
+
onMessage?: (msg: MessageRecord) => void | Promise<void>;
|
|
38
|
+
}
|
|
39
|
+
export interface RunOptions {
|
|
40
|
+
agent: AgentConfig;
|
|
41
|
+
provider: ProviderConfig;
|
|
42
|
+
tools: Tool[];
|
|
43
|
+
prompt: string;
|
|
44
|
+
/** Prior persisted messages (excluding the new user prompt). */
|
|
45
|
+
history?: MessageRecord[];
|
|
46
|
+
signal?: AbortSignal;
|
|
47
|
+
/** Working directory passed to fs/bash tools via ToolContext. Defaults to process.cwd(). */
|
|
48
|
+
workingDir?: string;
|
|
49
|
+
/** Frame counter for `invoke_agent` chains. The top-level user-driven
|
|
50
|
+
* run leaves this undefined (treated as 0). Each dispatched child
|
|
51
|
+
* passes parent depth + 1. */
|
|
52
|
+
dispatchDepth?: number;
|
|
53
|
+
/** The session ID of the current conversation run. */
|
|
54
|
+
sessionId?: string;
|
|
55
|
+
/** Attachments staged with the user's prompt. */
|
|
56
|
+
promptAttachments?: ToolAttachmentRecord[];
|
|
57
|
+
/** claude-code runner extras (ignored by the native loop): permission
|
|
58
|
+
* mode override, tool allow/deny rules, extra per-run MCP servers. */
|
|
59
|
+
claudeCode?: import('./claude_code_runner.js').ClaudeCodeRunExtras;
|
|
60
|
+
}
|
|
61
|
+
export interface RunResult {
|
|
62
|
+
/** Concatenated assistant text across all turns. */
|
|
63
|
+
text: string;
|
|
64
|
+
/** Number of tool calls executed (across all turns). */
|
|
65
|
+
toolCalls: number;
|
|
66
|
+
/** Cumulative usage across turns (sum of per-turn `usage` chunks). */
|
|
67
|
+
usage: AssistantUsage;
|
|
68
|
+
/** Reason the loop terminated: "done", "max_turns", or "aborted". */
|
|
69
|
+
stop: 'done' | 'max_turns' | 'aborted';
|
|
70
|
+
}
|
|
71
|
+
export declare function run(opts: RunOptions, cb?: RunCallbacks): Promise<RunResult>;
|
|
72
|
+
export {};
|
|
73
|
+
//# sourceMappingURL=loop.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loop.d.ts","sourceRoot":"","sources":["../../src/harness/loop.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE/D,OAAO,KAAK,EAAiB,aAAa,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC9F,OAAO,EAAgC,KAAK,cAAc,EAAoB,MAAM,eAAe,CAAC;AAEpG,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,eAAe,IAAI,mBAAmB,EAC3C,KAAK,IAAI,EAGV,MAAM,kBAAkB,CAAC;AAK1B,KAAK,SAAS,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;AAEzE,4DAA4D;AAC5D,wBAAgB,UAAU,CAAC,CAAC,EAAE,SAAS,GAAG,IAAI,CAE7C;AACD,wBAAgB,YAAY,IAAI,IAAI,CAEnC;AAED,MAAM,MAAM,eAAe,GAAG,mBAAmB,CAAC;AAElD,MAAM,WAAW,YAAY;IAC3B,wDAAwD;IACxD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,4EAA4E;IAC5E,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,2FAA2F;IAC3F,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/D;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,iDAAiD;IACjD,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACrD,kDAAkD;IAClD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IAC1C;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,aAAa,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1D;AAED,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,WAAW,CAAC;IACnB,QAAQ,EAAE,cAAc,CAAC;IACzB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,OAAO,CAAC,EAAE,aAAa,EAAE,CAAC;IAC1B,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,4FAA4F;IAC5F,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;mCAE+B;IAC/B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,sDAAsD;IACtD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iDAAiD;IACjD,iBAAiB,CAAC,EAAE,oBAAoB,EAAE,CAAC;IAC3C;2EACuE;IACvE,UAAU,CAAC,EAAE,OAAO,yBAAyB,EAAE,mBAAmB,CAAC;CACpE;AAED,MAAM,WAAW,SAAS;IACxB,oDAAoD;IACpD,IAAI,EAAE,MAAM,CAAC;IACb,wDAAwD;IACxD,SAAS,EAAE,MAAM,CAAC;IAClB,sEAAsE;IACtE,KAAK,EAAE,cAAc,CAAC;IACtB,qEAAqE;IACrE,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAAC;CACxC;AAED,wBAAsB,GAAG,CAAC,IAAI,EAAE,UAAU,EAAE,EAAE,GAAE,YAAiB,GAAG,OAAO,CAAC,SAAS,CAAC,CA8UrF"}
|