navada-edge-cli 3.5.4 → 3.5.6
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/lib/agent.js +10 -8
- package/package.json +1 -1
package/lib/agent.js
CHANGED
|
@@ -34,7 +34,7 @@ You also connect to the NAVADA Edge Network (4 nodes via Tailscale VPN):
|
|
|
34
34
|
When users ask you to DO something — DO IT. Use write_file to create files. Use shell to run commands. Never say "I can't" when you have a tool for it.
|
|
35
35
|
When asked to generate diagrams — use write_file to create Mermaid (.mmd), SVG, or HTML files. You can also use python_exec with matplotlib/graphviz for complex diagrams.
|
|
36
36
|
When asked to create, edit, or delete files — use the file tools directly. You are a terminal agent with FULL access.
|
|
37
|
-
PLATFORM: This machine runs ` + (process.platform === 'win32' ? `Windows. Use Windows paths (
|
|
37
|
+
PLATFORM: This machine runs ` + (process.platform === 'win32' ? `Windows. Use Windows paths. Desktop = ${fs.existsSync(path.join(os.homedir(), 'OneDrive', 'Desktop')) ? path.join(os.homedir(), 'OneDrive', 'Desktop') : path.join(os.homedir(), 'Desktop')}. Home = ${os.homedir()}.` : `${process.platform}. Home = ${os.homedir()}.`) + `
|
|
38
38
|
Keep responses short. Code blocks when needed. No fluff.`,
|
|
39
39
|
founder: {
|
|
40
40
|
name: 'Leslie (Lee) Akpareva',
|
|
@@ -801,6 +801,12 @@ function detectIntent(message) {
|
|
|
801
801
|
// Anthropic Claude API — conversational agent with tool use
|
|
802
802
|
// ---------------------------------------------------------------------------
|
|
803
803
|
async function chat(userMessage, conversationHistory = []) {
|
|
804
|
+
// Local action interceptor — file/folder ops work on ALL tiers without LLM
|
|
805
|
+
const localResult = tryLocalAction(userMessage);
|
|
806
|
+
if (localResult) {
|
|
807
|
+
return `${localResult}\n\nWhat would you like to do next?`;
|
|
808
|
+
}
|
|
809
|
+
|
|
804
810
|
const anthropicKey = config.get('anthropicKey') || process.env.ANTHROPIC_API_KEY || '';
|
|
805
811
|
const openaiKey = config.get('openaiKey') || process.env.OPENAI_API_KEY || '';
|
|
806
812
|
const nvidiaKey = config.get('nvidiaKey') || process.env.NVIDIA_API_KEY || '';
|
|
@@ -1074,7 +1080,9 @@ async function executeTool(name, input) {
|
|
|
1074
1080
|
function tryLocalAction(userMessage) {
|
|
1075
1081
|
const msg = userMessage.trim();
|
|
1076
1082
|
const home = os.homedir();
|
|
1077
|
-
|
|
1083
|
+
// Windows OneDrive redirects Desktop — check OneDrive first
|
|
1084
|
+
const oneDriveDesktop = path.join(home, 'OneDrive', 'Desktop');
|
|
1085
|
+
const desktop = (process.platform === 'win32' && fs.existsSync(oneDriveDesktop)) ? oneDriveDesktop : path.join(home, 'Desktop');
|
|
1078
1086
|
|
|
1079
1087
|
// Resolve a location phrase to an absolute path (use ORIGINAL case, not lowered)
|
|
1080
1088
|
function resolveLocation(phrase) {
|
|
@@ -1170,12 +1178,6 @@ function tryLocalAction(userMessage) {
|
|
|
1170
1178
|
}
|
|
1171
1179
|
|
|
1172
1180
|
async function grokChat(userMessage, conversationHistory = []) {
|
|
1173
|
-
// Try local action first — enables file ops on free tier
|
|
1174
|
-
const localResult = tryLocalAction(userMessage);
|
|
1175
|
-
if (localResult) {
|
|
1176
|
-
return `${localResult}\n\nWhat would you like to do next?`;
|
|
1177
|
-
}
|
|
1178
|
-
|
|
1179
1181
|
const messages = [
|
|
1180
1182
|
...conversationHistory.slice(-20).map(m => ({
|
|
1181
1183
|
role: m.role,
|
package/package.json
CHANGED