@nomad-e/bluma-cli 0.1.41 → 0.1.43

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.
@@ -40,32 +40,73 @@
40
40
  "type": "function",
41
41
  "function": {
42
42
  "name": "edit_tool",
43
- "description": "Replaces exact text in a file or creates a new file. Prefer **one** well-scoped edit over many tiny edits.\n\n**Critical avoid line-by-line surgery:**\n- Do **not** change the same file in a dozen sequential calls with one line each; that drifts, breaks whitespace, and often fails.\n- After `read_file_lines`, copy a **single contiguous block** (whole function, whole component, or 5–20 lines with unique context) into `old_string`, then replace with your revised block in `new_string`.\n- If the tool reports no match or ambiguous match, **widen** `old_string` (more surrounding lines) or fix indentation to match the file **exactly** — do not blindly retry a one-line fragment.\n\n**CLI note:** The user may press Ctrl+O to see more lines of a **truncated** read/shell preview in the terminal. That view is UI-only and may still omit lines; always trust `read_file_lines` for exact text and whitespace before calling `edit_tool`.\n\n**Checklist:**\n1. Read the file first; use literal newlines in `old_string`/`new_string` (not the two-character sequence backslash-n).\n2. `expected_replacements` must match how many times `old_string` appears (default 1).\n3. New file: `old_string` empty, `new_string` full content.",
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": "The absolute or relative path to the file. The tool will correctly resolve the path for the current operating system."
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": "The exact text to be replaced. To ensure accuracy, this should be a unique, multi-line segment from the file, including all original indentation and whitespace. Do not manually escape newlines (use literal newlines, not '\\n'). For creating a new file, this must be an empty string."
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": "The new text that will replace `old_string`. Match the indentation and formatting of the surrounding code to maintain code quality. Do not manually escape newlines."
57
+ "description": "Replacement text (single-edit mode). Omit when using `edits[]`."
58
58
  },
59
59
  "expected_replacements": {
60
60
  "type": "integer",
61
- "description": "Optional. The number of occurrences to replace. Defaults to 1. If you expect to replace multiple instances of `old_string`, set this value accordingly.",
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
+ }
63
95
  }
64
96
  },
65
- "required": [
66
- "file_path",
67
- "old_string",
68
- "new_string"
97
+ "anyOf": [
98
+ {
99
+ "required": [
100
+ "file_path",
101
+ "old_string",
102
+ "new_string"
103
+ ]
104
+ },
105
+ {
106
+ "required": [
107
+ "edits"
108
+ ]
109
+ }
69
110
  ]
70
111
  }
71
112
  }
@@ -190,13 +231,13 @@
190
231
  "type": "function",
191
232
  "function": {
192
233
  "name": "message",
193
- "description": "Send messages to user. CRITICAL: After sending a message, you MUST use result to end your turn and wait for user response. Use info ONLY for mid-task updates when you will continue working immediately after.",
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.",
194
235
  "parameters": {
195
236
  "type": "object",
196
237
  "properties": {
197
238
  "content": {
198
239
  "type": "string",
199
- "description": "Message content in Markdown format."
240
+ "description": "Markdown body shown in the chat (user's language when appropriate)."
200
241
  },
201
242
  "message_type": {
202
243
  "type": "string",
@@ -204,7 +245,7 @@
204
245
  "info",
205
246
  "result"
206
247
  ],
207
- "description": "info = mid-task update (you continue working). result = end turn and wait for user (use this after questions, completions, or when you need user input)."
248
+ "description": "Prefer \"info\" often while working (does not end turn). Use \"result\" only once to end the turn."
208
249
  },
209
250
  "attachments": {
210
251
  "type": "array",