@nomad-e/bluma-cli 0.1.40 → 0.1.42
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/README.md +545 -1057
- package/dist/config/native_tools.json +192 -12
- package/dist/main.js +6182 -3531
- package/package.json +1 -2
|
@@ -40,47 +40,204 @@
|
|
|
40
40
|
"type": "function",
|
|
41
41
|
"function": {
|
|
42
42
|
"name": "edit_tool",
|
|
43
|
-
"description": "Replaces exact text in
|
|
43
|
+
"description": "Replaces exact text in file(s) or creates files. **Prefer batching:** use `edits` with multiple `{file_path, old_string, new_string}` entries in **one** call when you need several replacements (same or different files) to save model turns. Order matters: later entries see the result of earlier ones on the same path.\n\n**Single-file mode:** `file_path` + `old_string` + `new_string` (legacy).\n\n**Avoid line-by-line surgery:** do not chain dozens of one-line calls; batch related changes or use one wide `old_string` block.\n- After `read_file_lines`, copy a **contiguous block** with unique context into `old_string`.\n- If no match, widen `old_string` or fix indentation to match the file **exactly**.\n\n**CLI:** Ctrl+O expands truncated read/shell previews only; trust `read_file_lines` for exact bytes.\n\n**Checklist:** literal newlines in strings (not `\\\\n`). `expected_replacements` per entry. New file: `old_string` empty.",
|
|
44
44
|
"parameters": {
|
|
45
45
|
"type": "object",
|
|
46
46
|
"properties": {
|
|
47
47
|
"file_path": {
|
|
48
48
|
"type": "string",
|
|
49
|
-
"description": "
|
|
49
|
+
"description": "Path to the file (single-edit mode only). Omit when using `edits[]`."
|
|
50
50
|
},
|
|
51
51
|
"old_string": {
|
|
52
52
|
"type": "string",
|
|
53
|
-
"description": "
|
|
53
|
+
"description": "Exact text to replace (single-edit mode). Empty string only to create a new file. Omit when using `edits[]`."
|
|
54
54
|
},
|
|
55
55
|
"new_string": {
|
|
56
56
|
"type": "string",
|
|
57
|
-
"description": "
|
|
57
|
+
"description": "Replacement text (single-edit mode). Omit when using `edits[]`."
|
|
58
58
|
},
|
|
59
59
|
"expected_replacements": {
|
|
60
60
|
"type": "integer",
|
|
61
|
-
"description": "
|
|
61
|
+
"description": "Single-edit mode: occurrences to replace (default 1).",
|
|
62
62
|
"default": 1
|
|
63
|
+
},
|
|
64
|
+
"edits": {
|
|
65
|
+
"type": "array",
|
|
66
|
+
"maxItems": 64,
|
|
67
|
+
"description": "Batch mode: several edits in one tool invocation. Each item is one replacement. Same file: list edits in application order.",
|
|
68
|
+
"items": {
|
|
69
|
+
"type": "object",
|
|
70
|
+
"properties": {
|
|
71
|
+
"file_path": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"description": "Target file for this replacement."
|
|
74
|
+
},
|
|
75
|
+
"old_string": {
|
|
76
|
+
"type": "string",
|
|
77
|
+
"description": "Exact snippet to replace; empty only when creating that path as a new file."
|
|
78
|
+
},
|
|
79
|
+
"new_string": {
|
|
80
|
+
"type": "string",
|
|
81
|
+
"description": "New content for that replacement."
|
|
82
|
+
},
|
|
83
|
+
"expected_replacements": {
|
|
84
|
+
"type": "integer",
|
|
85
|
+
"description": "Occurrences to replace for this entry (default 1).",
|
|
86
|
+
"default": 1
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"required": [
|
|
90
|
+
"file_path",
|
|
91
|
+
"old_string",
|
|
92
|
+
"new_string"
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"anyOf": [
|
|
98
|
+
{
|
|
99
|
+
"required": [
|
|
100
|
+
"file_path",
|
|
101
|
+
"old_string",
|
|
102
|
+
"new_string"
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"required": [
|
|
107
|
+
"edits"
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
]
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"type": "function",
|
|
116
|
+
"function": {
|
|
117
|
+
"name": "file_write",
|
|
118
|
+
"description": "Writes full file contents directly into the workspace. Use this when creating a new file or replacing an entire file body is cleaner than edit_tool. In sandbox mode this is ideal for generated outputs, configs, and artifact staging.",
|
|
119
|
+
"parameters": {
|
|
120
|
+
"type": "object",
|
|
121
|
+
"properties": {
|
|
122
|
+
"filepath": {
|
|
123
|
+
"type": "string",
|
|
124
|
+
"description": "Absolute or relative path to the file inside the current workspace."
|
|
125
|
+
},
|
|
126
|
+
"content": {
|
|
127
|
+
"type": "string",
|
|
128
|
+
"description": "Full file content to write."
|
|
129
|
+
},
|
|
130
|
+
"overwrite": {
|
|
131
|
+
"type": "boolean",
|
|
132
|
+
"description": "Whether an existing file may be overwritten. Defaults to true.",
|
|
133
|
+
"default": true
|
|
134
|
+
},
|
|
135
|
+
"create_directories": {
|
|
136
|
+
"type": "boolean",
|
|
137
|
+
"description": "Create missing parent directories before writing. Defaults to true.",
|
|
138
|
+
"default": true
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
"required": [
|
|
142
|
+
"filepath",
|
|
143
|
+
"content"
|
|
144
|
+
]
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"type": "function",
|
|
150
|
+
"function": {
|
|
151
|
+
"name": "spawn_agent",
|
|
152
|
+
"description": "Spawns a background worker agent for a bounded subtask. Use this when work can run in parallel or should be delegated. The returned session_id can be used with wait_agent or list_agents.",
|
|
153
|
+
"parameters": {
|
|
154
|
+
"type": "object",
|
|
155
|
+
"properties": {
|
|
156
|
+
"task": {
|
|
157
|
+
"type": "string",
|
|
158
|
+
"description": "Concrete task for the worker agent to execute."
|
|
159
|
+
},
|
|
160
|
+
"title": {
|
|
161
|
+
"type": "string",
|
|
162
|
+
"description": "Optional short title for the worker session."
|
|
163
|
+
},
|
|
164
|
+
"agent_type": {
|
|
165
|
+
"type": "string",
|
|
166
|
+
"description": "Optional worker role label such as worker, verifier, or planner.",
|
|
167
|
+
"default": "worker"
|
|
168
|
+
},
|
|
169
|
+
"context": {
|
|
170
|
+
"type": "object",
|
|
171
|
+
"description": "Optional structured context to pass to the worker."
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
"required": [
|
|
175
|
+
"task"
|
|
176
|
+
]
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"type": "function",
|
|
182
|
+
"function": {
|
|
183
|
+
"name": "wait_agent",
|
|
184
|
+
"description": "Waits for a worker agent session to finish and returns its latest result event. Use this after spawn_agent when the next step depends on the worker output.",
|
|
185
|
+
"parameters": {
|
|
186
|
+
"type": "object",
|
|
187
|
+
"properties": {
|
|
188
|
+
"session_id": {
|
|
189
|
+
"type": "string",
|
|
190
|
+
"description": "Worker session id returned by spawn_agent."
|
|
191
|
+
},
|
|
192
|
+
"timeout_ms": {
|
|
193
|
+
"type": "integer",
|
|
194
|
+
"description": "Maximum time to wait before returning without completion.",
|
|
195
|
+
"default": 30000
|
|
196
|
+
},
|
|
197
|
+
"poll_interval_ms": {
|
|
198
|
+
"type": "integer",
|
|
199
|
+
"description": "Polling interval for checking worker completion.",
|
|
200
|
+
"default": 1000
|
|
63
201
|
}
|
|
64
202
|
},
|
|
65
203
|
"required": [
|
|
66
|
-
"
|
|
67
|
-
"old_string",
|
|
68
|
-
"new_string"
|
|
204
|
+
"session_id"
|
|
69
205
|
]
|
|
70
206
|
}
|
|
71
207
|
}
|
|
72
208
|
},
|
|
209
|
+
{
|
|
210
|
+
"type": "function",
|
|
211
|
+
"function": {
|
|
212
|
+
"name": "list_agents",
|
|
213
|
+
"description": "Lists known agent and worker sessions. Use this to inspect active or completed delegated work.",
|
|
214
|
+
"parameters": {
|
|
215
|
+
"type": "object",
|
|
216
|
+
"properties": {
|
|
217
|
+
"parent_session_id": {
|
|
218
|
+
"type": "string",
|
|
219
|
+
"description": "Optional parent session id to filter child workers."
|
|
220
|
+
},
|
|
221
|
+
"status": {
|
|
222
|
+
"type": "string",
|
|
223
|
+
"description": "Optional status filter such as running, completed, error, or cancelled."
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
"required": []
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
},
|
|
73
230
|
{
|
|
74
231
|
"type": "function",
|
|
75
232
|
"function": {
|
|
76
233
|
"name": "message",
|
|
77
|
-
"description": "
|
|
234
|
+
"description": "Primary user-visible channel — use it generously. Call message_type \"info\" frequently during a turn (progress, findings, errors, next steps); multiple info calls per turn are required for good UX. The turn does not stop on \"info\". Use message_type \"result\" once when you finish this turn (final answer, deliverable, or question for the user); then the agent waits.",
|
|
78
235
|
"parameters": {
|
|
79
236
|
"type": "object",
|
|
80
237
|
"properties": {
|
|
81
238
|
"content": {
|
|
82
239
|
"type": "string",
|
|
83
|
-
"description": "
|
|
240
|
+
"description": "Markdown body shown in the chat (user's language when appropriate)."
|
|
84
241
|
},
|
|
85
242
|
"message_type": {
|
|
86
243
|
"type": "string",
|
|
@@ -88,7 +245,7 @@
|
|
|
88
245
|
"info",
|
|
89
246
|
"result"
|
|
90
247
|
],
|
|
91
|
-
"description": "info
|
|
248
|
+
"description": "Prefer \"info\" often while working (does not end turn). Use \"result\" only once to end the turn."
|
|
92
249
|
},
|
|
93
250
|
"attachments": {
|
|
94
251
|
"type": "array",
|
|
@@ -507,6 +664,29 @@
|
|
|
507
664
|
}
|
|
508
665
|
}
|
|
509
666
|
},
|
|
667
|
+
{
|
|
668
|
+
"type": "function",
|
|
669
|
+
"function": {
|
|
670
|
+
"name": "web_fetch",
|
|
671
|
+
"description": "Fetch the contents of a remote URL and return cleaned text for analysis. Use this when you already know the exact page to inspect and want the content itself, not just search results.",
|
|
672
|
+
"parameters": {
|
|
673
|
+
"type": "object",
|
|
674
|
+
"properties": {
|
|
675
|
+
"url": {
|
|
676
|
+
"type": "string",
|
|
677
|
+
"description": "HTTP or HTTPS URL to fetch."
|
|
678
|
+
},
|
|
679
|
+
"max_chars": {
|
|
680
|
+
"type": "integer",
|
|
681
|
+
"description": "Optional response truncation limit in characters. Defaults to 12000."
|
|
682
|
+
}
|
|
683
|
+
},
|
|
684
|
+
"required": [
|
|
685
|
+
"url"
|
|
686
|
+
]
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
},
|
|
510
690
|
{
|
|
511
691
|
"type": "function",
|
|
512
692
|
"function": {
|
|
@@ -607,4 +787,4 @@
|
|
|
607
787
|
}
|
|
608
788
|
}
|
|
609
789
|
]
|
|
610
|
-
}
|
|
790
|
+
}
|