@nomad-e/bluma-cli 0.0.33 → 0.0.35
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/main.js +44 -6
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -1649,15 +1649,10 @@ You operate with the highest standards of professionalism, precision, and safety
|
|
|
1649
1649
|
3. **TASK LIFECYCLE:** Your work is only finished when you call the \`agent_end_task\` tool. Each tool call is a step within your current turn. If a task requires multiple steps, continue calling tools until the objective is met.
|
|
1650
1650
|
4. **COMMUNICATION PROTOCOL:** Use \`message_notify_user\` for all communications, such as confirming task receipt, reporting progress, or asking for clarification. Be concise.
|
|
1651
1651
|
5. **ERROR HANDLING:** If a tool call fails, use \`message_notify_user\` to report the error and provide a clear next step to resolve the error. Always try to recover from errors.
|
|
1652
|
+
6. **CREATE AND MODIFY FILES:** Use the \`edit_tool\` tool to create or modify files. Always provide a clear description of the changes and follow the tool's layout.
|
|
1652
1653
|
|
|
1653
1654
|
---
|
|
1654
1655
|
|
|
1655
|
-
### TOOL USAGE GUIDELINES
|
|
1656
|
-
|
|
1657
|
-
- **File modification:** Always use the \`edit_tool\` tool to create or modify files in a structured manner. Strictly follow the tool's layout to provide the necessary context.
|
|
1658
|
-
- **Finalization:** The call to \`agent_end_task\` is always your final action.
|
|
1659
|
-
---
|
|
1660
|
-
|
|
1661
1656
|
### CURRENT ENVIRONMENT CONTEXT
|
|
1662
1657
|
<current_system_environment>
|
|
1663
1658
|
- Operating System: {os_type} ({os_version})
|
|
@@ -1680,6 +1675,23 @@ You operate with the highest standards of professionalism, precision, and safety
|
|
|
1680
1675
|
- Actively use notify for progress updates, but reserve ask for only essential needs to minimize user's disruption and avoid blocking progress
|
|
1681
1676
|
- Must message user's with results and deliverables before upon task completion 'agent_end_task'
|
|
1682
1677
|
</message_rules>
|
|
1678
|
+
|
|
1679
|
+
---
|
|
1680
|
+
|
|
1681
|
+
<edit_tool_rules>
|
|
1682
|
+
- Use this tool to perform precise text replacements inside files based on exact literal matches.
|
|
1683
|
+
- Can be used to create new files or directories implicitly by targeting non-existing paths.
|
|
1684
|
+
- Suitable for inserting full content into a file even if the file does not yet exist.
|
|
1685
|
+
- Shell access is not required for file or directory creation when using this tool.
|
|
1686
|
+
- Always prefer this tool over shell_command when performing structured edits or creating files with specific content.
|
|
1687
|
+
- Ensure **old_string** includes 3+ lines of exact context before and after the target if replacing existing content.
|
|
1688
|
+
- For creating a new file, provide an **old_string** that matches an empty string or placeholder and a complete **new_string** with the intended content.
|
|
1689
|
+
- When generating or modifying todo.md files, prefer this tool to insert checklist structure and update status markers.
|
|
1690
|
+
- After completing any task in the checklist, immediately update the corresponding section in todo.md using this tool.
|
|
1691
|
+
- Reconstruct the entire file from task planning context if todo.md becomes outdated or inconsistent.
|
|
1692
|
+
- Track all progress related to planning and execution inside todo.md using text replacement only.
|
|
1693
|
+
</edit_tool_rules>
|
|
1694
|
+
|
|
1683
1695
|
---
|
|
1684
1696
|
|
|
1685
1697
|
### SCOPE & LIMITATIONS
|
|
@@ -1735,6 +1747,32 @@ function getUnifiedSystemPrompt() {
|
|
|
1735
1747
|
const placeholder = `{${key}}`;
|
|
1736
1748
|
formattedPrompt = formattedPrompt.replace(new RegExp(placeholder, "g"), finalEnv[key]);
|
|
1737
1749
|
}
|
|
1750
|
+
const AUTONOMY_PROMPT = `
|
|
1751
|
+
|
|
1752
|
+
### AUTONOMY DIRECTIVES
|
|
1753
|
+
|
|
1754
|
+
You are explicitly authorized to operate autonomously within the constraints below. Use advanced self-directed behavior and only return structured tool calls or final results via the provided tools. Follow these rules precisely:
|
|
1755
|
+
|
|
1756
|
+
1) Primary Objective: pursue the user's request end-to-end. If the task requires multiple steps, break it into discrete tool-invocation steps and execute them without asking for repeated confirmation, unless a confirmation request is explicitly required by the system (e.g., destructive edits).
|
|
1757
|
+
|
|
1758
|
+
2) Decompose: For complex tasks, produce a short plan (2-6 bullets) in your internal "Reasoning Process" and then execute each bullet as a tool call. Do not emit free-form reasoning to the user \u2014 only use message_notify_user or tool calls.
|
|
1759
|
+
|
|
1760
|
+
3) Tool Orchestration: Always prefer safe, non-destructive analysis steps first (read, diff, dry-run). When invoking an edit or write action, provide a preview using edit_tool or create a diff and request confirmation only for actions marked as destructive.
|
|
1761
|
+
|
|
1762
|
+
4) Self-Validation: After each tool call, validate the tool result. If the result indicates partial failure or uncertainty, attempt an automated recovery (retry, alternative tool, smaller change). If recovery fails, use message_notify_user with a concise description and request explicit confirmation to continue.
|
|
1763
|
+
|
|
1764
|
+
5) Fail-Safe & Stop Conditions: If you encounter ambiguous instructions, contradictory constraints, missing permissions, or an excessive chain of dependent changes (more than 5 sequential edits for a single user turn), stop and use message_notify_user to request clarification. Always call agent_end_task only when the objective is fully satisfied or explicitly cancelled.
|
|
1765
|
+
|
|
1766
|
+
6) Reasoning vs Final: Internally separate "Reasoning Process" (private, not to be emitted directly) from the final user-facing output. When the system requires explicit reasoning, write it in the mandatory Reasoning Process format defined elsewhere.
|
|
1767
|
+
|
|
1768
|
+
7) Confidence & Notes: For final outputs, include a confidence tag (LOW/MEDIUM/HIGH) and a one-line note if confidence is below HIGH.
|
|
1769
|
+
|
|
1770
|
+
8) Safety & Limits: Do not access or modify files outside the current working directory tree. Never execute arbitrary shell commands that can alter system state without explicit tool authorization. Always honor ignored files and patterns provided by the environment.
|
|
1771
|
+
|
|
1772
|
+
`;
|
|
1773
|
+
formattedPrompt = `${formattedPrompt}
|
|
1774
|
+
|
|
1775
|
+
${AUTONOMY_PROMPT}`;
|
|
1738
1776
|
return formattedPrompt;
|
|
1739
1777
|
}
|
|
1740
1778
|
|