apex-dev 3.0.1 → 3.0.3
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/highlights-eq9cgrbb.scm +604 -0
- package/dist/highlights-ghv9g403.scm +205 -0
- package/dist/highlights-hk7bwhj4.scm +284 -0
- package/dist/highlights-r812a2qc.scm +150 -0
- package/dist/highlights-x6tmsnaa.scm +115 -0
- package/dist/index.js +62488 -0
- package/dist/injections-73j83es3.scm +27 -0
- package/dist/tree-sitter-javascript-nd0q4pe9.wasm +0 -0
- package/dist/tree-sitter-markdown-411r6y9b.wasm +0 -0
- package/dist/tree-sitter-markdown_inline-j5349f42.wasm +0 -0
- package/dist/tree-sitter-typescript-zxjzwt75.wasm +0 -0
- package/dist/tree-sitter-zig-e78zbjpm.wasm +0 -0
- package/package.json +10 -7
- package/.config/amp/settings.json +0 -3
- package/.config/opencode/oh-my-opencode.json +0 -58
- package/.config/opencode/opencode.json +0 -6
- package/.local/share/amp/device-id.json +0 -3
- package/.local/share/amp/history.jsonl +0 -74
- package/.local/share/amp/session.json +0 -6
- package/.local/share/amp/threads/T-019c93b8-fce7-7083-aab9-d5f1c88a9545.json +0 -2528
- package/.local/share/amp/threads/T-019c93c8-4b7a-71df-94ac-867d8236a288.json +0 -7
- package/.local/share/amp/threads/T-019c93cd-5a7d-728e-8289-02e0ef4ca2ff.json +0 -680
- package/.local/share/amp/threads/T-019c93e7-83ca-7633-9eed-12bdcc118163.json +0 -873
- package/.local/share/amp/threads/T-019c93ea-ccd3-765a-88c9-42d7b631e977.json +0 -620
- package/.local/share/amp/threads/T-019c93ee-5977-71af-9ab7-c4611004b703.json +0 -1000
- package/.local/share/amp/threads/T-019c93f0-8328-71ed-a250-6da169cebfe1.json +0 -829
- package/.local/share/amp/threads/T-019c93f5-7bdd-703b-b2cd-0a04da64441a.json +0 -459
- package/.local/share/amp/threads/T-019c93f8-2b2e-733b-8249-9876546d9b5b.json +0 -764
- package/.local/share/amp/threads/T-019c93fd-fade-7195-a3b7-358f180d40b8.json +0 -7
- package/.local/share/amp/threads/T-019c93fe-2e56-705e-827e-eb99bd02e257.json +0 -3593
- package/.local/share/amp/threads/T-019c9408-6e64-77e1-9519-b913e3b24a03.json +0 -1559
- package/.local/share/amp/threads/T-019c9409-feeb-736d-b92c-4f7a263a643c.json +0 -7
- package/.local/share/amp/threads/T-019c940b-8d11-755b-b9e1-f923d8a5e6ba.json +0 -7
- package/.local/share/amp/threads/T-019c943a-6c5e-76a5-bf4e-170f7ad452ce.json +0 -979
- package/.local/share/amp/threads/T-019c94b2-1c8f-76d8-96d0-82449a028849.json +0 -1584
- package/.local/share/amp/threads/T-019c94b6-68f0-726e-92dd-90c5411ca28c.json +0 -7
- package/.local/share/amp/threads/T-019c94bf-a589-72a3-b3c2-a81359d9e0a6.json +0 -7
- package/.local/share/amp/threads/T-019c94e1-1bd9-70ab-b6f2-abd5cab4f4ce.json +0 -1035
- package/.local/share/amp/threads/T-019c94fd-cc4a-714b-896a-74f94020f6eb.json +0 -1310
- package/.local/share/amp/threads/T-019c9501-8976-7138-aca6-245a01a8fe9b.json +0 -7
- package/.local/share/amp/threads/T-019c9504-4b51-763e-8a9f-5d4cdfcf0cfa.json +0 -496
- package/.local/share/amp/threads/T-019c9506-4e3b-74fd-8eda-cedbf3793598.json +0 -2679
- package/.local/share/amp/threads/T-019c9508-178c-718c-88d2-caf816d64f65.json +0 -965
- package/.local/share/amp/threads/T-019c9509-2812-71fd-8fd2-923e29ad34fa.json +0 -7
- package/.local/share/amp/threads/T-019c950e-69fe-77d6-9854-fc73b77a3148.json +0 -4570
- package/.local/share/amp/threads/T-019c9707-6e2b-741c-b4d4-117026a78449.json +0 -2899
- package/.local/share/amp/threads/T-019c971b-6bc0-77b8-8868-f8956d3e71a8.json +0 -7
- package/.local/share/amp/threads/T-019c971b-c87c-75f3-a61f-beb18a1cb25f.json +0 -474
- package/.local/share/amp/threads/T-019c971d-d371-70ac-9805-5c739908e73b.json +0 -802
- package/.local/share/amp/threads/T-019c9722-d73d-74f1-9d1d-8fafaad0ede7.json +0 -7
- package/.local/share/amp/threads/T-019c9761-858c-719b-911f-bc2e4c8cbdde.json +0 -188
- package/.local/share/amp/threads/T-019c9761-f5f3-7606-a900-ebe7f10d6e37.json +0 -121
- package/.local/share/amp/threads/T-019c9763-b1ae-729d-90aa-f59938ce912e.json +0 -799
- package/.local/share/amp/threads/T-019c9769-4a8a-77b8-beab-f48973276f9a.json +0 -1541
- package/.local/share/amp/threads/T-019c9772-edac-7075-b26e-0ada1f8697d2.json +0 -7
- package/.local/share/amp/threads/T-019c97e8-a9ab-71a1-a8f9-109c540c98bf.json +0 -111
- package/.local/share/amp/threads/T-019c97e9-2277-753c-8c5d-df745fa6cfff.json +0 -7
- package/.local/share/amp/threads/T-019c97e9-f28e-758d-9663-e37047a8ed95.json +0 -111
- package/.local/share/amp/threads/T-019c97ea-17c7-77b8-92b2-f641c069bcc9.json +0 -71
- package/.local/share/amp/threads/T-019c97ea-44c6-75b8-88bc-d88113194f6a.json +0 -1611
- package/.local/share/amp/threads/T-019c97ec-abae-7251-a5f6-693adf496a1c.json +0 -7
- package/.local/share/amp/threads/T-019c97f5-8e61-73ad-8c5d-2637abedcde6.json +0 -1341
- package/.local/share/amp/threads/T-019c989d-4f4e-7249-bde0-21d19455ccae.json +0 -163
- package/.local/share/amp/threads/T-019c989d-9024-73c4-bee8-e2ae45028a39.json +0 -124
- package/.local/share/amp/threads/T-019c989e-1394-74ad-8234-ac573fcdb4c7.json +0 -1260
- package/.local/share/amp/threads/T-019c989f-e3dd-772e-85ac-525d0fc88fda.json +0 -403
- package/.local/share/amp/threads/T-019c98a1-7b0c-778a-b311-2e1cff85d710.json +0 -3422
- package/.local/share/amp/threads/T-019c98c5-4b7f-7284-99e9-88aa8c18ba66.json +0 -1830
- package/.local/share/amp/threads/T-019c98d0-f27f-76ec-be10-6df96f22be99.json +0 -4061
- package/.local/share/amp/threads/T-019c98f9-d031-704d-a0c2-f2f395f68f2b.json +0 -509
- package/.local/share/amp/threads/T-019c9919-f9ee-766c-90be-af7a07f6a4c6.json +0 -2075
- package/.local/share/amp/threads/T-019c991c-b98b-7158-9083-cc52408beb13.json +0 -7
- package/.local/share/amp/threads/T-019c991d-66d6-72aa-a9a1-105f7df0ea06.json +0 -7
- package/.local/share/amp/threads/T-019c9c2e-71a4-77ff-bd7f-b053da7f9000.json +0 -1637
- package/.local/share/amp/threads/T-019c9c45-27ca-728b-ba77-835115dfa9b2.json +0 -3893
- package/.local/share/amp/threads/T-019c9c48-45dc-736a-9752-e4119fe698f9.json +0 -7
- package/.local/share/amp/threads/T-019c9c4d-266b-72d0-b56e-74a5777e6583.json +0 -7
- package/.local/share/amp/threads/T-019c9c52-ab89-758f-9178-bda99c39d10b.json +0 -7
- package/.local/share/amp/threads/T-019c9c56-5715-72e2-b8b4-87711a842dd1.json +0 -1799
- package/.local/share/kilo/kilo.db +0 -0
- package/.local/share/kilo/kilo.db-shm +0 -0
- package/.local/share/kilo/kilo.db-wal +0 -0
- package/.local/share/kilo/storage/migration +0 -1
- package/.local/share/kilo/storage/session_diff/ses_36bea4cb9ffe1b0j5HEL14KEaU.json +0 -1
- package/.local/share/kilo/storage/session_diff/ses_36beaa8f2ffeeZ3Y39SQ9UDWQQ.json +0 -1
- package/.local/share/kilo/telemetry-id +0 -1
- package/.local/share/opencode/auth.json +0 -6
- package/.local/share/opencode/opencode.db +0 -0
- package/.local/share/opencode/opencode.db-shm +0 -0
- package/.local/share/opencode/opencode.db-wal +0 -0
- package/.local/share/opencode/storage/agent-usage-reminder/ses_36870ea98ffe8S5ZOCE4F11yFh.json +0 -6
- package/.local/share/opencode/storage/agent-usage-reminder/ses_3687a3e9affewUnHBzvpiPR6df.json +0 -6
- package/.local/share/opencode/storage/agent-usage-reminder/ses_36886e68dffeKVgUWf6lzXdEEt.json +0 -6
- package/.local/share/opencode/storage/agent-usage-reminder/ses_36bee9f1effeJbiHHLWLR6O3WJ.json +0 -6
- package/.local/share/opencode/storage/agent-usage-reminder/ses_36c25e50affef2nhaXq9aSgKH3.json +0 -6
- package/.local/share/opencode/storage/agent-usage-reminder/ses_36c260708ffel4wG4yhdo0knDD.json +0 -6
- package/.local/share/opencode/storage/agent-usage-reminder/ses_36c261531ffeoVcvqXxry2bN9H.json +0 -6
- package/.local/share/opencode/storage/agent-usage-reminder/ses_36c291bddffePWRiaFLLJAC1y7.json +0 -6
- package/.local/share/opencode/storage/migration +0 -1
- package/.local/share/opencode/storage/session_diff/ses_36870ea98ffe8S5ZOCE4F11yFh.json +0 -1
- package/.local/share/opencode/storage/session_diff/ses_3687a3e9affewUnHBzvpiPR6df.json +0 -1
- package/.local/share/opencode/storage/session_diff/ses_36886e68dffeKVgUWf6lzXdEEt.json +0 -1
- package/.local/share/opencode/storage/session_diff/ses_36bee9f1effeJbiHHLWLR6O3WJ.json +0 -1
- package/.local/share/opencode/storage/session_diff/ses_36c25e50affef2nhaXq9aSgKH3.json +0 -1
- package/.local/share/opencode/storage/session_diff/ses_36c260708ffel4wG4yhdo0knDD.json +0 -1
- package/.local/share/opencode/storage/session_diff/ses_36c261531ffeoVcvqXxry2bN9H.json +0 -1
- package/.local/share/opencode/storage/session_diff/ses_36c291bddffePWRiaFLLJAC1y7.json +0 -1
- package/.local/share/opencode/storage/session_diff/ses_36c2af1c5ffegxEaOZOGcVykyy.json +0 -1
- package/.local/share/opencode/storage/session_diff/ses_36c2be235ffeOa6x8UCk1HW4kU.json +0 -1
- package/.local/share/opencode/tool-output/tool_c93da840c0016GrdyAkOnHGezU +0 -2330
- package/.local/share/opencode/tool-output/tool_c9411e784001cRoQqwVDb1a6lY +0 -1017
- package/.local/state/replit/log-query.db +0 -0
- package/.local/state/replit/log-query.db-shm +0 -0
- package/.local/state/replit/log-query.db-wal +0 -0
- package/.replit +0 -41
- package/.upm/store.json +0 -1
- package/AGENTS.md +0 -32
- package/bun.lock +0 -271
- package/generated-icon.png +0 -0
- package/hello.txt +0 -1
- package/index.jsx +0 -24
- package/src/agent.js +0 -504
- package/src/app.jsx +0 -96
- package/src/commands.js +0 -133
- package/src/components/AssistantMessage.jsx +0 -83
- package/src/components/ChatArea.jsx +0 -84
- package/src/components/DiffView.jsx +0 -26
- package/src/components/Divider.jsx +0 -8
- package/src/components/Header.jsx +0 -44
- package/src/components/HelpModal.jsx +0 -81
- package/src/components/InputBar.jsx +0 -32
- package/src/components/Spinner.jsx +0 -23
- package/src/components/StatusBar.jsx +0 -44
- package/src/components/SystemMessage.jsx +0 -31
- package/src/components/ThinkBlock.jsx +0 -29
- package/src/components/ToolCallItem.jsx +0 -43
- package/src/components/UserMessage.jsx +0 -11
- package/src/components/Welcome.jsx +0 -14
- package/src/config.js +0 -196
- package/src/hooks/useLayout.js +0 -15
- package/src/hooks/useStore.js +0 -6
- package/src/prompt.js +0 -101
- package/src/store.js +0 -99
- package/src/theme.js +0 -19
- package/src/thinking.js +0 -54
- package/src/toolExecutors.js +0 -853
- package/src/tools.js +0 -335
- package/src/utils.js +0 -32
- package/tsconfig.json +0 -10
package/src/tools.js
DELETED
|
@@ -1,335 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const toolDefs = [
|
|
4
|
-
{
|
|
5
|
-
type: 'function',
|
|
6
|
-
function: {
|
|
7
|
-
name: 'Read',
|
|
8
|
-
description: 'Read the contents of a file. Returns line-numbered content. Always read a file before editing it.',
|
|
9
|
-
parameters: {
|
|
10
|
-
type: 'object',
|
|
11
|
-
properties: {
|
|
12
|
-
path: { type: 'string', description: 'File path to read (absolute or relative to project root).' },
|
|
13
|
-
start_line: { type: 'number', description: 'Start line (1-indexed). Omit to read from beginning.' },
|
|
14
|
-
end_line: { type: 'number', description: 'End line (1-indexed). Omit to read to end (max 500 lines).' },
|
|
15
|
-
},
|
|
16
|
-
required: ['path'],
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
type: 'function',
|
|
22
|
-
function: {
|
|
23
|
-
name: 'Write',
|
|
24
|
-
description: 'Create a new file or completely overwrite an existing file. For modifying existing files, prefer Edit instead.',
|
|
25
|
-
parameters: {
|
|
26
|
-
type: 'object',
|
|
27
|
-
properties: {
|
|
28
|
-
path: { type: 'string', description: 'File path to write.' },
|
|
29
|
-
content: { type: 'string', description: 'Full content to write.' },
|
|
30
|
-
},
|
|
31
|
-
required: ['path', 'content'],
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
type: 'function',
|
|
37
|
-
function: {
|
|
38
|
-
name: 'Edit',
|
|
39
|
-
description: 'Replace an exact string in a file with new content. The old_str must match exactly (including whitespace). For existing files, this is preferred over Write.',
|
|
40
|
-
parameters: {
|
|
41
|
-
type: 'object',
|
|
42
|
-
properties: {
|
|
43
|
-
path: { type: 'string', description: 'File path to edit.' },
|
|
44
|
-
old_str: { type: 'string', description: 'Exact string to find (must be unique in the file).' },
|
|
45
|
-
new_str: { type: 'string', description: 'Replacement string.' },
|
|
46
|
-
},
|
|
47
|
-
required: ['path', 'old_str', 'new_str'],
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
type: 'function',
|
|
53
|
-
function: {
|
|
54
|
-
name: 'Patch',
|
|
55
|
-
description: 'Apply multiple find-and-replace edits to a single file atomically. Use when you need to make several changes to the same file.',
|
|
56
|
-
parameters: {
|
|
57
|
-
type: 'object',
|
|
58
|
-
properties: {
|
|
59
|
-
path: { type: 'string', description: 'File path to patch.' },
|
|
60
|
-
edits: {
|
|
61
|
-
type: 'array',
|
|
62
|
-
description: 'Array of edits to apply in order.',
|
|
63
|
-
items: {
|
|
64
|
-
type: 'object',
|
|
65
|
-
properties: {
|
|
66
|
-
old_str: { type: 'string', description: 'Exact string to find.' },
|
|
67
|
-
new_str: { type: 'string', description: 'Replacement string.' },
|
|
68
|
-
},
|
|
69
|
-
required: ['old_str', 'new_str'],
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
},
|
|
73
|
-
required: ['path', 'edits'],
|
|
74
|
-
},
|
|
75
|
-
},
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
type: 'function',
|
|
79
|
-
function: {
|
|
80
|
-
name: 'Bash',
|
|
81
|
-
description: 'Execute a shell command. Use for running tests, builds, git commands, installing packages, checking syntax, etc. Commands have a 60-second timeout.',
|
|
82
|
-
parameters: {
|
|
83
|
-
type: 'object',
|
|
84
|
-
properties: {
|
|
85
|
-
command: { type: 'string', description: 'Shell command to execute.' },
|
|
86
|
-
cwd: { type: 'string', description: 'Working directory (defaults to project root).' },
|
|
87
|
-
},
|
|
88
|
-
required: ['command'],
|
|
89
|
-
},
|
|
90
|
-
},
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
type: 'function',
|
|
94
|
-
function: {
|
|
95
|
-
name: 'Grep',
|
|
96
|
-
description: 'Search for a pattern across files using regex. Returns matching lines with file paths and line numbers.',
|
|
97
|
-
parameters: {
|
|
98
|
-
type: 'object',
|
|
99
|
-
properties: {
|
|
100
|
-
pattern: { type: 'string', description: 'Regex pattern to search for.' },
|
|
101
|
-
path: { type: 'string', description: 'Directory or file to search in (defaults to project root).' },
|
|
102
|
-
include: { type: 'string', description: 'File glob pattern to include, e.g. "*.js" or "*.ts"' },
|
|
103
|
-
case_sensitive: { type: 'boolean', description: 'Case-sensitive search (default: false).' },
|
|
104
|
-
},
|
|
105
|
-
required: ['pattern'],
|
|
106
|
-
},
|
|
107
|
-
},
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
type: 'function',
|
|
111
|
-
function: {
|
|
112
|
-
name: 'Glob',
|
|
113
|
-
description: 'Find files matching a glob pattern. Returns file paths sorted by modification time.',
|
|
114
|
-
parameters: {
|
|
115
|
-
type: 'object',
|
|
116
|
-
properties: {
|
|
117
|
-
pattern: { type: 'string', description: 'Glob pattern like "**/*.js", "src/**/*.ts", "*.json"' },
|
|
118
|
-
cwd: { type: 'string', description: 'Base directory for the search (defaults to project root).' },
|
|
119
|
-
},
|
|
120
|
-
required: ['pattern'],
|
|
121
|
-
},
|
|
122
|
-
},
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
type: 'function',
|
|
126
|
-
function: {
|
|
127
|
-
name: 'ListDir',
|
|
128
|
-
description: 'List the contents of a directory. Shows files and subdirectories with type indicators.',
|
|
129
|
-
parameters: {
|
|
130
|
-
type: 'object',
|
|
131
|
-
properties: {
|
|
132
|
-
path: { type: 'string', description: 'Directory path to list (defaults to project root).' },
|
|
133
|
-
recursive: { type: 'boolean', description: 'If true, list recursively (max depth 3).' },
|
|
134
|
-
},
|
|
135
|
-
required: [],
|
|
136
|
-
},
|
|
137
|
-
},
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
type: 'function',
|
|
141
|
-
function: {
|
|
142
|
-
name: 'UndoEdit',
|
|
143
|
-
description: 'Undo the last edit made to a specific file, restoring its previous content.',
|
|
144
|
-
parameters: {
|
|
145
|
-
type: 'object',
|
|
146
|
-
properties: {
|
|
147
|
-
path: { type: 'string', description: 'File path to undo the last edit for.' },
|
|
148
|
-
},
|
|
149
|
-
required: ['path'],
|
|
150
|
-
},
|
|
151
|
-
},
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
type: 'function',
|
|
155
|
-
function: {
|
|
156
|
-
name: 'Task',
|
|
157
|
-
description: 'Spawn a sub-task by executing a sequence of shell commands for a complex multi-step operation. Useful for build-test-fix cycles.',
|
|
158
|
-
parameters: {
|
|
159
|
-
type: 'object',
|
|
160
|
-
properties: {
|
|
161
|
-
description: { type: 'string', description: 'Brief description of the task.' },
|
|
162
|
-
commands: {
|
|
163
|
-
type: 'array',
|
|
164
|
-
description: 'Shell commands to execute in sequence. Stops on first failure.',
|
|
165
|
-
items: { type: 'string' },
|
|
166
|
-
},
|
|
167
|
-
},
|
|
168
|
-
required: ['description', 'commands'],
|
|
169
|
-
},
|
|
170
|
-
},
|
|
171
|
-
},
|
|
172
|
-
{
|
|
173
|
-
type: 'function',
|
|
174
|
-
function: {
|
|
175
|
-
name: 'WebSearch',
|
|
176
|
-
description: 'Search the web using Exa AI. Returns relevant results with titles, URLs, and text snippets. Use this to find up-to-date information, documentation, or answers from the internet.',
|
|
177
|
-
parameters: {
|
|
178
|
-
type: 'object',
|
|
179
|
-
properties: {
|
|
180
|
-
query: { type: 'string', description: 'The search query to execute.' },
|
|
181
|
-
num_results: { type: 'number', description: 'Number of results to return (default: 5, max: 10).' },
|
|
182
|
-
type: { type: 'string', description: 'Search type: "auto" (default), "neural", or "keyword".' },
|
|
183
|
-
include_domains: {
|
|
184
|
-
type: 'array',
|
|
185
|
-
description: 'Only return results from these domains, e.g. ["github.com", "stackoverflow.com"].',
|
|
186
|
-
items: { type: 'string' },
|
|
187
|
-
},
|
|
188
|
-
category: { type: 'string', description: 'Filter by category: "news", "research paper", "tweet", "company", "personal site", etc.' },
|
|
189
|
-
},
|
|
190
|
-
required: ['query'],
|
|
191
|
-
},
|
|
192
|
-
},
|
|
193
|
-
},
|
|
194
|
-
{
|
|
195
|
-
type: 'function',
|
|
196
|
-
function: {
|
|
197
|
-
name: 'FilePickerMax',
|
|
198
|
-
description: 'Spawn a file-picker sub-agent that deeply explores the codebase to find files relevant to a prompt. It scans the full directory tree and previews every source file, then uses the most capable model to identify and rank the relevant files. Use this when you need to locate files related to a concept, feature, bug, or pattern. NEVER send generic prompts like "give me an overview of the codebase" — always specify the exact type of files you want.',
|
|
199
|
-
parameters: {
|
|
200
|
-
type: 'object',
|
|
201
|
-
properties: {
|
|
202
|
-
prompt: { type: 'string', description: 'Specify the exact type of files you need. NEVER ask for a generic overview. Be specific — e.g. "show me the main entry point and routing files", "files that handle user authentication", "all React components related to the dashboard", "where database migrations are defined".' },
|
|
203
|
-
},
|
|
204
|
-
required: ['prompt'],
|
|
205
|
-
},
|
|
206
|
-
},
|
|
207
|
-
},
|
|
208
|
-
{
|
|
209
|
-
type: 'function',
|
|
210
|
-
function: {
|
|
211
|
-
name: 'TodoList',
|
|
212
|
-
description: 'Manage a persistent todo list for tracking tasks. Supports adding, listing, completing, and removing items. The list is saved to .apex-todos.json in the project root.',
|
|
213
|
-
parameters: {
|
|
214
|
-
type: 'object',
|
|
215
|
-
properties: {
|
|
216
|
-
action: {
|
|
217
|
-
type: 'string',
|
|
218
|
-
enum: ['add', 'list', 'done', 'remove', 'clear'],
|
|
219
|
-
description: 'Action to perform: "add" a new item, "list" all items, "done" to mark complete, "remove" to delete, "clear" to remove all completed.',
|
|
220
|
-
},
|
|
221
|
-
text: { type: 'string', description: 'Text for the todo item (required for "add").' },
|
|
222
|
-
index: { type: 'number', description: 'Item index (1-based, required for "done" and "remove").' },
|
|
223
|
-
},
|
|
224
|
-
required: ['action'],
|
|
225
|
-
},
|
|
226
|
-
},
|
|
227
|
-
},
|
|
228
|
-
{
|
|
229
|
-
type: 'function',
|
|
230
|
-
function: {
|
|
231
|
-
name: 'Thinker',
|
|
232
|
-
description: 'Spawn a deep reasoning/planning sub-agent. It analyzes the problem, considers multiple approaches, and returns a structured plan. Use for complex tasks that benefit from careful planning before implementation.',
|
|
233
|
-
parameters: {
|
|
234
|
-
type: 'object',
|
|
235
|
-
properties: {
|
|
236
|
-
prompt: { type: 'string', description: 'The question or task to reason about deeply.' },
|
|
237
|
-
},
|
|
238
|
-
required: ['prompt'],
|
|
239
|
-
},
|
|
240
|
-
},
|
|
241
|
-
},
|
|
242
|
-
{
|
|
243
|
-
type: 'function',
|
|
244
|
-
function: {
|
|
245
|
-
name: 'ThinkerBestOfN',
|
|
246
|
-
description: 'Spawn N parallel thinking agents that each independently reason about the same problem, then a selector picks the best response. Use for critical decisions that benefit from multiple perspectives. Only available in MAX mode.',
|
|
247
|
-
parameters: {
|
|
248
|
-
type: 'object',
|
|
249
|
-
properties: {
|
|
250
|
-
prompt: { type: 'string', description: 'The question or task to reason about from multiple angles.' },
|
|
251
|
-
n: { type: 'number', description: 'Number of parallel thinking passes (default: 3, max: 5).' },
|
|
252
|
-
},
|
|
253
|
-
required: ['prompt'],
|
|
254
|
-
},
|
|
255
|
-
},
|
|
256
|
-
},
|
|
257
|
-
{
|
|
258
|
-
type: 'function',
|
|
259
|
-
function: {
|
|
260
|
-
name: 'EditorMultiPrompt',
|
|
261
|
-
description: 'Spawn multiple editor agents in parallel, each with a different implementation strategy, then a selector picks the best result and applies it. Only available in MAX mode. Use for important code changes where you want to explore multiple approaches.',
|
|
262
|
-
parameters: {
|
|
263
|
-
type: 'object',
|
|
264
|
-
properties: {
|
|
265
|
-
prompt: { type: 'string', description: 'The coding task to implement.' },
|
|
266
|
-
strategies: {
|
|
267
|
-
type: 'array',
|
|
268
|
-
description: 'Array of 2-3 different implementation strategies to try in parallel.',
|
|
269
|
-
items: { type: 'string' },
|
|
270
|
-
},
|
|
271
|
-
files: {
|
|
272
|
-
type: 'array',
|
|
273
|
-
description: 'File paths and their contents that each editor will work with.',
|
|
274
|
-
items: {
|
|
275
|
-
type: 'object',
|
|
276
|
-
properties: {
|
|
277
|
-
path: { type: 'string', description: 'File path.' },
|
|
278
|
-
content: { type: 'string', description: 'Current file content.' },
|
|
279
|
-
},
|
|
280
|
-
required: ['path', 'content'],
|
|
281
|
-
},
|
|
282
|
-
},
|
|
283
|
-
},
|
|
284
|
-
required: ['prompt', 'strategies', 'files'],
|
|
285
|
-
},
|
|
286
|
-
},
|
|
287
|
-
},
|
|
288
|
-
{
|
|
289
|
-
type: 'function',
|
|
290
|
-
function: {
|
|
291
|
-
name: 'CodeReviewMulti',
|
|
292
|
-
description: 'Spawn multiple code reviewers in parallel, each analyzing from a different perspective (correctness, security, performance, etc.). Only available in MAX mode.',
|
|
293
|
-
parameters: {
|
|
294
|
-
type: 'object',
|
|
295
|
-
properties: {
|
|
296
|
-
prompt: { type: 'string', description: 'Description of the changes to review.' },
|
|
297
|
-
perspectives: {
|
|
298
|
-
type: 'array',
|
|
299
|
-
description: 'Review perspectives, e.g. ["correctness and logic", "security vulnerabilities", "performance and efficiency"].',
|
|
300
|
-
items: { type: 'string' },
|
|
301
|
-
},
|
|
302
|
-
},
|
|
303
|
-
required: ['prompt'],
|
|
304
|
-
},
|
|
305
|
-
},
|
|
306
|
-
},
|
|
307
|
-
{
|
|
308
|
-
type: 'function',
|
|
309
|
-
function: {
|
|
310
|
-
name: 'Commander',
|
|
311
|
-
description: 'Spawn a terminal command specialist agent that determines and executes the right shell commands for a task. It plans the commands, explains them, then executes them in sequence.',
|
|
312
|
-
parameters: {
|
|
313
|
-
type: 'object',
|
|
314
|
-
properties: {
|
|
315
|
-
prompt: { type: 'string', description: 'Description of what needs to be accomplished via terminal commands.' },
|
|
316
|
-
},
|
|
317
|
-
required: ['prompt'],
|
|
318
|
-
},
|
|
319
|
-
},
|
|
320
|
-
},
|
|
321
|
-
{
|
|
322
|
-
type: 'function',
|
|
323
|
-
function: {
|
|
324
|
-
name: 'ContextPruner',
|
|
325
|
-
description: 'Summarize the current conversation history to free up context space. Automatically invoked in MAX mode but can be called manually. Replaces verbose conversation history with a concise summary preserving all critical information.',
|
|
326
|
-
parameters: {
|
|
327
|
-
type: 'object',
|
|
328
|
-
properties: {},
|
|
329
|
-
required: [],
|
|
330
|
-
},
|
|
331
|
-
},
|
|
332
|
-
},
|
|
333
|
-
];
|
|
334
|
-
|
|
335
|
-
module.exports = { toolDefs };
|
package/src/utils.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function toolDetailStr(name, args) {
|
|
4
|
-
if (!args) return '';
|
|
5
|
-
switch (name) {
|
|
6
|
-
case 'Bash': return args.command || '';
|
|
7
|
-
case 'Grep': return `"${args.pattern}"${args.path ? ` in ${args.path}` : ''}`;
|
|
8
|
-
case 'Glob': return args.pattern || '';
|
|
9
|
-
case 'ListDir': return args.path || '.';
|
|
10
|
-
case 'Read': {
|
|
11
|
-
let d = args.path || '';
|
|
12
|
-
if (args.start_line) d += `:${args.start_line}-${args.end_line || ''}`;
|
|
13
|
-
return d;
|
|
14
|
-
}
|
|
15
|
-
case 'Write': return args.path || '';
|
|
16
|
-
case 'Edit': return args.path || '';
|
|
17
|
-
case 'Patch': return `${args.path} (${(args.edits || []).length} edits)`;
|
|
18
|
-
case 'UndoEdit': return args.path || '';
|
|
19
|
-
case 'Task': return args.description || '';
|
|
20
|
-
case 'CodeReview': return 'reviewing changes';
|
|
21
|
-
case 'CodeReviewMulti': return `multi-review (${(args.perspectives || []).length} perspectives)`;
|
|
22
|
-
case 'FilePickerMax': return args.prompt ? args.prompt.slice(0, 40) : '';
|
|
23
|
-
case 'Thinker': return args.prompt ? args.prompt.slice(0, 40) : 'reasoning';
|
|
24
|
-
case 'ThinkerBestOfN': return `best-of-${args.n || 3}: ${(args.prompt || '').slice(0, 30)}`;
|
|
25
|
-
case 'EditorMultiPrompt': return `${(args.strategies || []).length} strategies`;
|
|
26
|
-
case 'Commander': return args.prompt ? args.prompt.slice(0, 40) : 'running commands';
|
|
27
|
-
case 'ContextPruner': return 'pruning context';
|
|
28
|
-
default: return JSON.stringify(args).slice(0, 60);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
module.exports = { toolDetailStr };
|