@syntero/orca-cli 1.2.17-next.5 → 1.2.17-next.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/dist/assistant/prompts.d.ts.map +1 -1
- package/dist/assistant/prompts.js +22 -0
- package/dist/assistant/prompts.js.map +1 -1
- package/dist/components/ResumeMenu.d.ts.map +1 -1
- package/dist/components/ResumeMenu.js +24 -3
- package/dist/components/ResumeMenu.js.map +1 -1
- package/dist/tools/handler.d.ts.map +1 -1
- package/dist/tools/handler.js +11 -0
- package/dist/tools/handler.js.map +1 -1
- package/dist/tools/index.d.ts +152 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +2 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/inference.d.ts +127 -0
- package/dist/tools/inference.d.ts.map +1 -0
- package/dist/tools/inference.js +318 -0
- package/dist/tools/inference.js.map +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../src/assistant/prompts.ts"],"names":[],"mappings":"AAAA,wBAAgB,eAAe,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../src/assistant/prompts.ts"],"names":[],"mappings":"AAAA,wBAAgB,eAAe,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CA8PzD;AAGD,eAAO,MAAM,aAAa,QAAoB,CAAC;AAE/C;;;GAGG;AACH,eAAO,MAAM,oBAAoB,khCAiBF,CAAC;AAEhC;;GAEG;AACH,eAAO,MAAM,uBAAuB,yIAAyI,CAAC"}
|
|
@@ -217,6 +217,28 @@ When diagnosing issues:
|
|
|
217
217
|
2. Example: grep_file({ pattern: "502", path: "TROUBLESHOOTING.md", context_lines: 20 })
|
|
218
218
|
3. Follow documented solutions before attempting custom fixes
|
|
219
219
|
|
|
220
|
+
## On-Premise Inference Server Setup
|
|
221
|
+
When a user asks to deploy an agent locally or set up a local vLLM server:
|
|
222
|
+
|
|
223
|
+
### Flow
|
|
224
|
+
1. **list_exportable_agents** — Show agents with trained adapters ready to pull
|
|
225
|
+
2. **get_agent_export_info** — Get base model ID, adapter status, and vLLM launch commands
|
|
226
|
+
3. **download_adapter** — Stream adapter from platform to local disk (~/orca-adapters/{agent_id}/)
|
|
227
|
+
4. Guide user to run the vLLM Docker command from export-info
|
|
228
|
+
5. **test_inference_endpoint** — Confirm vLLM is responding
|
|
229
|
+
6. **configure_local_llm** — Point Orca at the local vLLM endpoint
|
|
230
|
+
|
|
231
|
+
### Key Details
|
|
232
|
+
- No HuggingFace login needed — adapters download through the authenticated platform API
|
|
233
|
+
- vLLM serves an OpenAI-compatible API at /v1/chat/completions
|
|
234
|
+
- LoRA hot-loading: \`--enable-lora --lora-modules name=path\`
|
|
235
|
+
|
|
236
|
+
### Troubleshooting
|
|
237
|
+
- **CUDA OOM**: Reduce --max-model-len or use --quantization awq
|
|
238
|
+
- **Slow first request**: Normal — model loads on first request (1-3 minutes)
|
|
239
|
+
- **Connection refused**: Check docker ps, ensure port 8000 is exposed
|
|
240
|
+
- **Adapter not found**: Verify path has adapter_config.json
|
|
241
|
+
|
|
220
242
|
## Critical Behaviors (MUST FOLLOW)
|
|
221
243
|
1. **NEVER ask users to run commands you can run yourself** - You have full shell access
|
|
222
244
|
2. **VERIFY each step before proceeding**:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../src/assistant/prompts.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,eAAe,CAAC,QAAiB;IAC/C,MAAM,YAAY,GAAG,QAAQ,KAAK,aAAa,CAAC;IAEhD,MAAM,aAAa,GAAG,YAAY;QAChC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;yDA2BmD;QACrD,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;kDAyB4C,CAAC;IAEjD,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkIP,aAAa
|
|
1
|
+
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../src/assistant/prompts.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,eAAe,CAAC,QAAiB;IAC/C,MAAM,YAAY,GAAG,QAAQ,KAAK,aAAa,CAAC;IAEhD,MAAM,aAAa,GAAG,YAAY;QAChC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;yDA2BmD;QACrD,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;kDAyB4C,CAAC;IAEjD,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkIP,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgEd,CAAC;AACF,CAAC;AAED,iFAAiF;AACjF,MAAM,CAAC,MAAM,aAAa,GAAG,eAAe,EAAE,CAAC;AAE/C;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;;;;;;;;;;;;;;;;;+BAiBL,CAAC;AAEhC;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,sIAAsI,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResumeMenu.d.ts","sourceRoot":"","sources":["../../src/components/ResumeMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAwClE,UAAU,eAAe;IACvB,+BAA+B;IAC/B,MAAM,EAAE,OAAO,CAAC;IAChB,uCAAuC;IACvC,aAAa,EAAE,gBAAgB,EAAE,CAAC;IAClC,6CAA6C;IAC7C,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,wCAAwC;IACxC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,mDAAmD;IACnD,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,EACzB,MAAM,EACN,aAAa,EACb,QAAQ,EACR,QAAQ,EACR,QAAQ,GACT,EAAE,eAAe,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"ResumeMenu.d.ts","sourceRoot":"","sources":["../../src/components/ResumeMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAwClE,UAAU,eAAe;IACvB,+BAA+B;IAC/B,MAAM,EAAE,OAAO,CAAC;IAChB,uCAAuC;IACvC,aAAa,EAAE,gBAAgB,EAAE,CAAC;IAClC,6CAA6C;IAC7C,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,wCAAwC;IACxC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,mDAAmD;IACnD,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,EACzB,MAAM,EACN,aAAa,EACb,QAAQ,EACR,QAAQ,EACR,QAAQ,GACT,EAAE,eAAe,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CA8N7C"}
|
|
@@ -124,11 +124,32 @@ export function ResumeMenu({ isOpen, conversations, onSelect, onCancel, onDelete
|
|
|
124
124
|
const toDelete = conversations.find(c => c.id === confirmingDelete);
|
|
125
125
|
return (_jsxs(Box, { flexDirection: "column", borderStyle: "single", borderColor: "yellow", paddingX: 1, marginTop: 0, children: [_jsx(Box, { marginBottom: 0, children: _jsx(Text, { bold: true, color: "yellow", children: "Delete Conversation?" }) }), _jsx(Box, { children: _jsxs(Text, { children: ["Delete \"", truncateText(toDelete?.title || '', 40), "\"?"] }) }), _jsx(Box, { marginTop: 0, children: _jsx(Text, { dimColor: true, children: " Press y to confirm, n or Escape to cancel" }) })] }));
|
|
126
126
|
}
|
|
127
|
+
// Pagination: show a sliding window of PAGE_SIZE items around the selection
|
|
128
|
+
const PAGE_SIZE = 10;
|
|
129
|
+
const total = conversations.length;
|
|
130
|
+
let windowStart;
|
|
131
|
+
let windowEnd;
|
|
132
|
+
if (total <= PAGE_SIZE) {
|
|
133
|
+
windowStart = 0;
|
|
134
|
+
windowEnd = total;
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
// Keep selected item roughly centered in the window
|
|
138
|
+
const half = Math.floor(PAGE_SIZE / 2);
|
|
139
|
+
windowStart = Math.max(0, selectedIndex - half);
|
|
140
|
+
windowEnd = windowStart + PAGE_SIZE;
|
|
141
|
+
if (windowEnd > total) {
|
|
142
|
+
windowEnd = total;
|
|
143
|
+
windowStart = total - PAGE_SIZE;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
const visibleConversations = conversations.slice(windowStart, windowEnd);
|
|
127
147
|
// Main menu
|
|
128
|
-
return (_jsxs(Box, { flexDirection: "column", borderStyle: "single", borderColor: "cyan", paddingX: 1, marginTop: 0, children: [
|
|
129
|
-
const
|
|
148
|
+
return (_jsxs(Box, { flexDirection: "column", borderStyle: "single", borderColor: "cyan", paddingX: 1, marginTop: 0, children: [_jsxs(Box, { marginBottom: 0, children: [_jsx(Text, { bold: true, children: "Resume Conversation" }), total > PAGE_SIZE && (_jsxs(Text, { dimColor: true, children: [" (", selectedIndex + 1, "/", total, ")"] }))] }), windowStart > 0 && (_jsx(Box, { children: _jsxs(Text, { dimColor: true, children: [" \u2191 ", windowStart, " more"] }) })), visibleConversations.map((conv, i) => {
|
|
149
|
+
const actualIndex = windowStart + i;
|
|
150
|
+
const isSelected = actualIndex === selectedIndex;
|
|
130
151
|
const timeAgo = formatRelativeTime(conv.updatedAt);
|
|
131
152
|
return (_jsx(Box, { children: isSelected ? (_jsxs(Box, { children: [_jsxs(Text, { inverse: true, bold: true, children: [' > ', truncateText(conv.title, 45)] }), _jsxs(Text, { dimColor: true, children: [" ", timeAgo] })] })) : (_jsxs(Box, { children: [_jsxs(Text, { children: [' ', truncateText(conv.title, 45)] }), _jsxs(Text, { dimColor: true, children: [" ", timeAgo] })] })) }, conv.id));
|
|
132
|
-
}), _jsx(Box, { marginTop: 0, children: _jsxs(Text, { dimColor: true, children: [' ', "Use arrows, Enter to select, Esc to cancel", onDelete ? ', d to delete' : ''] }) })] }));
|
|
153
|
+
}), windowEnd < total && (_jsx(Box, { children: _jsxs(Text, { dimColor: true, children: [" \u2193 ", total - windowEnd, " more"] }) })), _jsx(Box, { marginTop: 0, children: _jsxs(Text, { dimColor: true, children: [' ', "Use arrows, Enter to select, Esc to cancel", onDelete ? ', d to delete' : ''] }) })] }));
|
|
133
154
|
}
|
|
134
155
|
//# sourceMappingURL=ResumeMenu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResumeMenu.js","sourceRoot":"","sources":["../../src/components/ResumeMenu.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAG1C;;;GAGG;AACH,SAAS,kBAAkB,CAAC,SAAiB;IAC3C,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IACvB,MAAM,MAAM,GAAG,GAAG,GAAG,SAAS,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U,CAAC,CAAC,CAAC,CACZ,MAAC,GAAG,eACF,MAAC,IAAI,IAAC,OAAO,QAAC,IAAI,mBACf,KAAK,EAAE,YAAY,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,IAC/B,EACP,MAAC,IAAI,IAAC,QAAQ,yBAAI,OAAO,IAAQ,IAC7B,CACP,CAAC,CAAC,CAAC,CACF,MAAC,GAAG,eACF,MAAC,IAAI,eACF,KAAK,EAAE,YAAY,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,IAC/B,EACP,MAAC,IAAI,IAAC,QAAQ,yBAAI,OAAO,IAAQ,IAC7B,CACP,IAfO,IAAI,CAAC,EAAE,CAgBX,CACP,CAAC;YACJ,CAAC,CAAC,EAGD,SAAS,GAAG,KAAK,IAAI,CACpB,KAAC,GAAG,cACF,MAAC,IAAI,IAAC,QAAQ,iCAAO,KAAK,GAAG,SAAS,aAAa,GAC/C,CACP,EAGD,KAAC,GAAG,IAAC,SAAS,EAAE,CAAC,YACf,MAAC,IAAI,IAAC,QAAQ,mBACX,GAAG,gDAA4C,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,IAC1E,GACH,IACF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../src/tools/handler.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../src/tools/handler.ts"],"names":[],"mappings":"AAuBA;;GAEG;AACH,wBAAsB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,CA0E5H"}
|
package/dist/tools/handler.js
CHANGED
|
@@ -5,6 +5,7 @@ import { queryDatabase } from './database.js';
|
|
|
5
5
|
import { checkContainerHealth, searchLogs } from './docker.js';
|
|
6
6
|
import { handleDockerLoginGhcr, handleCheckAuthStatus } from './auth-tools.js';
|
|
7
7
|
import { handleDownloadDeploymentFiles, handleSaveDeploymentDir, handleGetDeploymentDir, logDeploymentEvent, getDeploymentHistory, listAvailableVersions, handleRecreateContainers, } from './deployment.js';
|
|
8
|
+
import { handleListExportableAgents, handleGetAgentExportInfo, handleDownloadAdapter, handleTestInferenceEndpoint, handleConfigureLocalLlm, } from './inference.js';
|
|
8
9
|
/**
|
|
9
10
|
* Handle a tool call and return the result.
|
|
10
11
|
*/
|
|
@@ -44,6 +45,16 @@ export async function handleToolCall(name, inputData, signal) {
|
|
|
44
45
|
return listAvailableVersions(inputData.include_prerelease ?? false);
|
|
45
46
|
case 'recreate_containers':
|
|
46
47
|
return handleRecreateContainers(inputData.org_id);
|
|
48
|
+
case 'list_exportable_agents':
|
|
49
|
+
return handleListExportableAgents();
|
|
50
|
+
case 'get_agent_export_info':
|
|
51
|
+
return handleGetAgentExportInfo(inputData.agent_id);
|
|
52
|
+
case 'download_adapter':
|
|
53
|
+
return handleDownloadAdapter(inputData.agent_id, inputData.target_dir);
|
|
54
|
+
case 'test_inference_endpoint':
|
|
55
|
+
return handleTestInferenceEndpoint(inputData.endpoint_url, inputData.model, inputData.prompt);
|
|
56
|
+
case 'configure_local_llm':
|
|
57
|
+
return handleConfigureLocalLlm(inputData.endpoint_url, inputData.model_name);
|
|
47
58
|
default:
|
|
48
59
|
return `Unknown tool: ${name}`;
|
|
49
60
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handler.js","sourceRoot":"","sources":["../../src/tools/handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,aAA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AS,CAAC,gBAAsC,EAChD,SAAS,CAAC,KAA2B,CACtC,CAAC;QACJ,KAAK,wBAAwB;YAC3B,OAAO,oBAAoB,CAAE,SAAS,CAAC,KAAgB,IAAI,EAAE,CAAC,CAAC;QACjE,KAAK,yBAAyB;YAC5B,OAAO,qBAAqB,CAAE,SAAS,CAAC,kBAA8B,IAAI,KAAK,CAAC,CAAC;QACnF,KAAK,qBAAqB;YACxB,OAAO,wBAAwB,CAAC,SAAS,CAAC,MAAgB,CAAC,CAAC;QAC9D,KAAK,wBAAwB;YAC3B,OAAO,0BAA0B,EAAE,CAAC;QACtC,KAAK,uBAAuB;YAC1B,OAAO,wBAAwB,CAAC,SAAS,CAAC,QAAkB,CAAC,CAAC;QAChE,KAAK,kBAAkB;YACrB,OAAO,qBAAqB,CAAC,SAAS,CAAC,QAAkB,EAAE,SAAS,CAAC,UAAgC,CAAC,CAAC;QACzG,KAAK,yBAAyB;YAC5B,OAAO,2BAA2B,CAChC,SAAS,CAAC,YAAsB,EAChC,SAAS,CAAC,KAAe,EACzB,SAAS,CAAC,MAA4B,CACvC,CAAC;QACJ,KAAK,qBAAqB;YACxB,OAAO,uBAAuB,CAC5B,SAAS,CAAC,YAAsB,EAChC,SAAS,CAAC,UAAoB,CAC/B,CAAC;QACJ;YACE,OAAO,iBAAiB,IAAI,EAAE,CAAC;IACnC,CAAC;AACH,CAAC"}
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -254,6 +254,90 @@ export declare const TOOLS_ANTHROPIC: ({
|
|
|
254
254
|
};
|
|
255
255
|
required: string[];
|
|
256
256
|
};
|
|
257
|
+
} | {
|
|
258
|
+
name: string;
|
|
259
|
+
description: string;
|
|
260
|
+
input_schema: {
|
|
261
|
+
type: string;
|
|
262
|
+
properties: {
|
|
263
|
+
agent_id: {
|
|
264
|
+
type: string;
|
|
265
|
+
description: string;
|
|
266
|
+
};
|
|
267
|
+
target_dir?: undefined;
|
|
268
|
+
endpoint_url?: undefined;
|
|
269
|
+
model?: undefined;
|
|
270
|
+
prompt?: undefined;
|
|
271
|
+
model_name?: undefined;
|
|
272
|
+
};
|
|
273
|
+
required: string[];
|
|
274
|
+
};
|
|
275
|
+
} | {
|
|
276
|
+
name: string;
|
|
277
|
+
description: string;
|
|
278
|
+
input_schema: {
|
|
279
|
+
type: string;
|
|
280
|
+
properties: {
|
|
281
|
+
agent_id: {
|
|
282
|
+
type: string;
|
|
283
|
+
description: string;
|
|
284
|
+
};
|
|
285
|
+
target_dir: {
|
|
286
|
+
type: string;
|
|
287
|
+
description: string;
|
|
288
|
+
};
|
|
289
|
+
endpoint_url?: undefined;
|
|
290
|
+
model?: undefined;
|
|
291
|
+
prompt?: undefined;
|
|
292
|
+
model_name?: undefined;
|
|
293
|
+
};
|
|
294
|
+
required: string[];
|
|
295
|
+
};
|
|
296
|
+
} | {
|
|
297
|
+
name: string;
|
|
298
|
+
description: string;
|
|
299
|
+
input_schema: {
|
|
300
|
+
type: string;
|
|
301
|
+
properties: {
|
|
302
|
+
endpoint_url: {
|
|
303
|
+
type: string;
|
|
304
|
+
description: string;
|
|
305
|
+
};
|
|
306
|
+
model: {
|
|
307
|
+
type: string;
|
|
308
|
+
description: string;
|
|
309
|
+
};
|
|
310
|
+
prompt: {
|
|
311
|
+
type: string;
|
|
312
|
+
description: string;
|
|
313
|
+
};
|
|
314
|
+
agent_id?: undefined;
|
|
315
|
+
target_dir?: undefined;
|
|
316
|
+
model_name?: undefined;
|
|
317
|
+
};
|
|
318
|
+
required: string[];
|
|
319
|
+
};
|
|
320
|
+
} | {
|
|
321
|
+
name: string;
|
|
322
|
+
description: string;
|
|
323
|
+
input_schema: {
|
|
324
|
+
type: string;
|
|
325
|
+
properties: {
|
|
326
|
+
endpoint_url: {
|
|
327
|
+
type: string;
|
|
328
|
+
description: string;
|
|
329
|
+
};
|
|
330
|
+
model_name: {
|
|
331
|
+
type: string;
|
|
332
|
+
description: string;
|
|
333
|
+
};
|
|
334
|
+
agent_id?: undefined;
|
|
335
|
+
target_dir?: undefined;
|
|
336
|
+
model?: undefined;
|
|
337
|
+
prompt?: undefined;
|
|
338
|
+
};
|
|
339
|
+
required: string[];
|
|
340
|
+
};
|
|
257
341
|
})[];
|
|
258
342
|
export declare const TOOLS_OPENAI: {
|
|
259
343
|
type: "function";
|
|
@@ -456,6 +540,74 @@ export declare const TOOLS_OPENAI: {
|
|
|
456
540
|
include_prerelease?: undefined;
|
|
457
541
|
};
|
|
458
542
|
required: string[];
|
|
543
|
+
} | {
|
|
544
|
+
type: string;
|
|
545
|
+
properties: {
|
|
546
|
+
agent_id: {
|
|
547
|
+
type: string;
|
|
548
|
+
description: string;
|
|
549
|
+
};
|
|
550
|
+
target_dir?: undefined;
|
|
551
|
+
endpoint_url?: undefined;
|
|
552
|
+
model?: undefined;
|
|
553
|
+
prompt?: undefined;
|
|
554
|
+
model_name?: undefined;
|
|
555
|
+
};
|
|
556
|
+
required: string[];
|
|
557
|
+
} | {
|
|
558
|
+
type: string;
|
|
559
|
+
properties: {
|
|
560
|
+
agent_id: {
|
|
561
|
+
type: string;
|
|
562
|
+
description: string;
|
|
563
|
+
};
|
|
564
|
+
target_dir: {
|
|
565
|
+
type: string;
|
|
566
|
+
description: string;
|
|
567
|
+
};
|
|
568
|
+
endpoint_url?: undefined;
|
|
569
|
+
model?: undefined;
|
|
570
|
+
prompt?: undefined;
|
|
571
|
+
model_name?: undefined;
|
|
572
|
+
};
|
|
573
|
+
required: string[];
|
|
574
|
+
} | {
|
|
575
|
+
type: string;
|
|
576
|
+
properties: {
|
|
577
|
+
endpoint_url: {
|
|
578
|
+
type: string;
|
|
579
|
+
description: string;
|
|
580
|
+
};
|
|
581
|
+
model: {
|
|
582
|
+
type: string;
|
|
583
|
+
description: string;
|
|
584
|
+
};
|
|
585
|
+
prompt: {
|
|
586
|
+
type: string;
|
|
587
|
+
description: string;
|
|
588
|
+
};
|
|
589
|
+
agent_id?: undefined;
|
|
590
|
+
target_dir?: undefined;
|
|
591
|
+
model_name?: undefined;
|
|
592
|
+
};
|
|
593
|
+
required: string[];
|
|
594
|
+
} | {
|
|
595
|
+
type: string;
|
|
596
|
+
properties: {
|
|
597
|
+
endpoint_url: {
|
|
598
|
+
type: string;
|
|
599
|
+
description: string;
|
|
600
|
+
};
|
|
601
|
+
model_name: {
|
|
602
|
+
type: string;
|
|
603
|
+
description: string;
|
|
604
|
+
};
|
|
605
|
+
agent_id?: undefined;
|
|
606
|
+
target_dir?: undefined;
|
|
607
|
+
model?: undefined;
|
|
608
|
+
prompt?: undefined;
|
|
609
|
+
};
|
|
610
|
+
required: string[];
|
|
459
611
|
};
|
|
460
612
|
};
|
|
461
613
|
}[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EACL,sBAAsB,EACtB,YAAY,EACZ,qBAAqB,EACrB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,SAAS,GACf,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EACL,sBAAsB,EACtB,YAAY,EACZ,qBAAqB,EACrB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,SAAS,GACf,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAa9C,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAS3B,CAAC;AAGF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAOtB,CAAC"}
|
package/dist/tools/index.js
CHANGED
|
@@ -16,6 +16,7 @@ import { DATABASE_TOOLS } from './database.js';
|
|
|
16
16
|
import { DOCKER_TOOLS } from './docker.js';
|
|
17
17
|
import { AUTH_TOOLS } from './auth-tools.js';
|
|
18
18
|
import { DEPLOYMENT_TOOLS } from './deployment.js';
|
|
19
|
+
import { INFERENCE_TOOLS } from './inference.js';
|
|
19
20
|
// Tool definitions for Anthropic format
|
|
20
21
|
export const TOOLS_ANTHROPIC = [
|
|
21
22
|
...COMMAND_TOOLS,
|
|
@@ -25,6 +26,7 @@ export const TOOLS_ANTHROPIC = [
|
|
|
25
26
|
...DOCKER_TOOLS,
|
|
26
27
|
...AUTH_TOOLS,
|
|
27
28
|
...DEPLOYMENT_TOOLS,
|
|
29
|
+
...INFERENCE_TOOLS,
|
|
28
30
|
];
|
|
29
31
|
// Convert to OpenAI format
|
|
30
32
|
export const TOOLS_OPENAI = TOOLS_ANTHROPIC.map((tool) => ({
|
package/dist/tools/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,kBAAkB;AAClB,OAAO,EACL,sBAAsB,EACtB,YAAY,EACZ,qBAAqB,GAItB,MAAM,YAAY,CAAC;AAEpB,8CAA8C;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,wDAAwD;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,kBAAkB;AAClB,OAAO,EACL,sBAAsB,EACtB,YAAY,EACZ,qBAAqB,GAItB,MAAM,YAAY,CAAC;AAEpB,8CAA8C;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,wDAAwD;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEjD,wCAAwC;AACxC,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,GAAG,aAAa;IAChB,GAAG,gBAAgB;IACnB,GAAG,SAAS;IACZ,GAAG,cAAc;IACjB,GAAG,YAAY;IACf,GAAG,UAAU;IACb,GAAG,gBAAgB;IACnB,GAAG,eAAe;CACnB,CAAC;AAEF,2BAA2B;AAC3B,MAAM,CAAC,MAAM,YAAY,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IACzD,IAAI,EAAE,UAAmB;IACzB,QAAQ,EAAE;QACR,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,WAAW,EAAE,IAAI,CAAC,WAAW;QAC7B,UAAU,EAAE,IAAI,CAAC,YAAY;KAC9B;CACF,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Inference tools — on-premise vLLM deployment assistance.
|
|
3
|
+
*
|
|
4
|
+
* Tools for listing exportable agents, getting deployment configs,
|
|
5
|
+
* downloading adapters, testing endpoints, and configuring local LLM.
|
|
6
|
+
*/
|
|
7
|
+
export declare const INFERENCE_TOOLS: ({
|
|
8
|
+
name: string;
|
|
9
|
+
description: string;
|
|
10
|
+
input_schema: {
|
|
11
|
+
type: string;
|
|
12
|
+
properties: {
|
|
13
|
+
agent_id?: undefined;
|
|
14
|
+
target_dir?: undefined;
|
|
15
|
+
endpoint_url?: undefined;
|
|
16
|
+
model?: undefined;
|
|
17
|
+
prompt?: undefined;
|
|
18
|
+
model_name?: undefined;
|
|
19
|
+
};
|
|
20
|
+
required?: undefined;
|
|
21
|
+
};
|
|
22
|
+
} | {
|
|
23
|
+
name: string;
|
|
24
|
+
description: string;
|
|
25
|
+
input_schema: {
|
|
26
|
+
type: string;
|
|
27
|
+
properties: {
|
|
28
|
+
agent_id: {
|
|
29
|
+
type: string;
|
|
30
|
+
description: string;
|
|
31
|
+
};
|
|
32
|
+
target_dir?: undefined;
|
|
33
|
+
endpoint_url?: undefined;
|
|
34
|
+
model?: undefined;
|
|
35
|
+
prompt?: undefined;
|
|
36
|
+
model_name?: undefined;
|
|
37
|
+
};
|
|
38
|
+
required: string[];
|
|
39
|
+
};
|
|
40
|
+
} | {
|
|
41
|
+
name: string;
|
|
42
|
+
description: string;
|
|
43
|
+
input_schema: {
|
|
44
|
+
type: string;
|
|
45
|
+
properties: {
|
|
46
|
+
agent_id: {
|
|
47
|
+
type: string;
|
|
48
|
+
description: string;
|
|
49
|
+
};
|
|
50
|
+
target_dir: {
|
|
51
|
+
type: string;
|
|
52
|
+
description: string;
|
|
53
|
+
};
|
|
54
|
+
endpoint_url?: undefined;
|
|
55
|
+
model?: undefined;
|
|
56
|
+
prompt?: undefined;
|
|
57
|
+
model_name?: undefined;
|
|
58
|
+
};
|
|
59
|
+
required: string[];
|
|
60
|
+
};
|
|
61
|
+
} | {
|
|
62
|
+
name: string;
|
|
63
|
+
description: string;
|
|
64
|
+
input_schema: {
|
|
65
|
+
type: string;
|
|
66
|
+
properties: {
|
|
67
|
+
endpoint_url: {
|
|
68
|
+
type: string;
|
|
69
|
+
description: string;
|
|
70
|
+
};
|
|
71
|
+
model: {
|
|
72
|
+
type: string;
|
|
73
|
+
description: string;
|
|
74
|
+
};
|
|
75
|
+
prompt: {
|
|
76
|
+
type: string;
|
|
77
|
+
description: string;
|
|
78
|
+
};
|
|
79
|
+
agent_id?: undefined;
|
|
80
|
+
target_dir?: undefined;
|
|
81
|
+
model_name?: undefined;
|
|
82
|
+
};
|
|
83
|
+
required: string[];
|
|
84
|
+
};
|
|
85
|
+
} | {
|
|
86
|
+
name: string;
|
|
87
|
+
description: string;
|
|
88
|
+
input_schema: {
|
|
89
|
+
type: string;
|
|
90
|
+
properties: {
|
|
91
|
+
endpoint_url: {
|
|
92
|
+
type: string;
|
|
93
|
+
description: string;
|
|
94
|
+
};
|
|
95
|
+
model_name: {
|
|
96
|
+
type: string;
|
|
97
|
+
description: string;
|
|
98
|
+
};
|
|
99
|
+
agent_id?: undefined;
|
|
100
|
+
target_dir?: undefined;
|
|
101
|
+
model?: undefined;
|
|
102
|
+
prompt?: undefined;
|
|
103
|
+
};
|
|
104
|
+
required: string[];
|
|
105
|
+
};
|
|
106
|
+
})[];
|
|
107
|
+
/**
|
|
108
|
+
* List agents ready for on-premise export.
|
|
109
|
+
*/
|
|
110
|
+
export declare function handleListExportableAgents(): Promise<string>;
|
|
111
|
+
/**
|
|
112
|
+
* Get detailed export/deployment info for an agent.
|
|
113
|
+
*/
|
|
114
|
+
export declare function handleGetAgentExportInfo(agentId: string): Promise<string>;
|
|
115
|
+
/**
|
|
116
|
+
* Download adapter from platform to local directory.
|
|
117
|
+
*/
|
|
118
|
+
export declare function handleDownloadAdapter(agentId: string, targetDir?: string): Promise<string>;
|
|
119
|
+
/**
|
|
120
|
+
* Test an OpenAI-compatible inference endpoint.
|
|
121
|
+
*/
|
|
122
|
+
export declare function handleTestInferenceEndpoint(endpointUrl: string, model: string, prompt?: string): Promise<string>;
|
|
123
|
+
/**
|
|
124
|
+
* Configure Orca to use a local vLLM endpoint.
|
|
125
|
+
*/
|
|
126
|
+
export declare function handleConfigureLocalLlm(endpointUrl: string, modelName: string): Promise<string>;
|
|
127
|
+
//# sourceMappingURL=inference.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inference.d.ts","sourceRoot":"","sources":["../../src/tools/inference.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAUH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAwF3B,CAAC;AAEF;;GAEG;AACH,wBAAsB,0BAA0B,IAAI,OAAO,CAAC,MAAM,CAAC,CAYlE;AAED;;GAEG;AACH,wBAAsB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAY/E;AAED;;GAEG;AACH,wBAAsB,qBAAqB,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAqEhG;AAED;;GAEG;AACH,wBAAsB,2BAA2B,CAC/C,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,MAAM,CAAC,CAyFjB;AAED;;GAEG;AACH,wBAAsB,uBAAuB,CAC3C,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,MAAM,CAAC,CAiCjB"}
|
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Inference tools — on-premise vLLM deployment assistance.
|
|
3
|
+
*
|
|
4
|
+
* Tools for listing exportable agents, getting deployment configs,
|
|
5
|
+
* downloading adapters, testing endpoints, and configuring local LLM.
|
|
6
|
+
*/
|
|
7
|
+
import * as fs from 'fs';
|
|
8
|
+
import * as path from 'path';
|
|
9
|
+
import * as os from 'os';
|
|
10
|
+
import * as https from 'https';
|
|
11
|
+
import * as http from 'http';
|
|
12
|
+
import { execSync } from 'child_process';
|
|
13
|
+
import { cloudRequest, loadCredentials } from '../auth.js';
|
|
14
|
+
export const INFERENCE_TOOLS = [
|
|
15
|
+
{
|
|
16
|
+
name: 'list_exportable_agents',
|
|
17
|
+
description: `List all agents that are ready for on-premise deployment.
|
|
18
|
+
Shows agents with successful training runs, including base model, adapter status,
|
|
19
|
+
VRAM requirements, and hardware recommendations.
|
|
20
|
+
Use this as the first step when helping a user set up on-premise inference.`,
|
|
21
|
+
input_schema: {
|
|
22
|
+
type: 'object',
|
|
23
|
+
properties: {},
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: 'get_agent_export_info',
|
|
28
|
+
description: `Get complete deployment configuration for an agent.
|
|
29
|
+
Returns base model details, adapter info, hardware requirements,
|
|
30
|
+
and ready-to-use vLLM launch commands (native and Docker).
|
|
31
|
+
Use after list_exportable_agents to get detailed setup instructions for a specific agent.`,
|
|
32
|
+
input_schema: {
|
|
33
|
+
type: 'object',
|
|
34
|
+
properties: {
|
|
35
|
+
agent_id: { type: 'string', description: 'The agent ID to get export info for' },
|
|
36
|
+
},
|
|
37
|
+
required: ['agent_id'],
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: 'download_adapter',
|
|
42
|
+
description: `Download a LoRA adapter from the platform to a local directory.
|
|
43
|
+
The adapter is streamed from the platform (which pulls from a private HuggingFace repo)
|
|
44
|
+
as a tar.gz archive and extracted locally. No HuggingFace account needed.
|
|
45
|
+
The adapter can then be loaded by vLLM using --lora-modules flag.`,
|
|
46
|
+
input_schema: {
|
|
47
|
+
type: 'object',
|
|
48
|
+
properties: {
|
|
49
|
+
agent_id: { type: 'string', description: 'The agent ID whose adapter to download' },
|
|
50
|
+
target_dir: {
|
|
51
|
+
type: 'string',
|
|
52
|
+
description: 'Directory to save the adapter to (default: ~/orca-adapters/<agent_id>)',
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
required: ['agent_id'],
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: 'test_inference_endpoint',
|
|
60
|
+
description: `Test an OpenAI-compatible inference endpoint (e.g. vLLM server).
|
|
61
|
+
Sends a simple chat completion request to verify the endpoint is running and responding.
|
|
62
|
+
Supports both base model and LoRA adapter testing.`,
|
|
63
|
+
input_schema: {
|
|
64
|
+
type: 'object',
|
|
65
|
+
properties: {
|
|
66
|
+
endpoint_url: {
|
|
67
|
+
type: 'string',
|
|
68
|
+
description: 'The vLLM endpoint URL (e.g. "http://192.168.1.100:8000/v1")',
|
|
69
|
+
},
|
|
70
|
+
model: {
|
|
71
|
+
type: 'string',
|
|
72
|
+
description: 'Model name to test (base model ID or LoRA adapter name)',
|
|
73
|
+
},
|
|
74
|
+
prompt: {
|
|
75
|
+
type: 'string',
|
|
76
|
+
description: 'Test prompt (default: "What is 2+2? Answer in one word.")',
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
required: ['endpoint_url', 'model'],
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
name: 'configure_local_llm',
|
|
84
|
+
description: `Point Orca at an on-premise vLLM server for inference.
|
|
85
|
+
Updates the organization's API keys configuration to use a local
|
|
86
|
+
OpenAI-compatible endpoint instead of cloud inference.`,
|
|
87
|
+
input_schema: {
|
|
88
|
+
type: 'object',
|
|
89
|
+
properties: {
|
|
90
|
+
endpoint_url: {
|
|
91
|
+
type: 'string',
|
|
92
|
+
description: 'The vLLM base URL (e.g. "http://192.168.1.100:8000/v1")',
|
|
93
|
+
},
|
|
94
|
+
model_name: {
|
|
95
|
+
type: 'string',
|
|
96
|
+
description: 'Model name as registered in vLLM (base model or adapter name)',
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
required: ['endpoint_url', 'model_name'],
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
];
|
|
103
|
+
/**
|
|
104
|
+
* List agents ready for on-premise export.
|
|
105
|
+
*/
|
|
106
|
+
export async function handleListExportableAgents() {
|
|
107
|
+
try {
|
|
108
|
+
const response = await cloudRequest('GET', '/api/v2/agent-store/exportable-agents');
|
|
109
|
+
if (response.status !== 200) {
|
|
110
|
+
return `Error: ${response.data?.message || `HTTP ${response.status}`}`;
|
|
111
|
+
}
|
|
112
|
+
return JSON.stringify(response.data, null, 2);
|
|
113
|
+
}
|
|
114
|
+
catch (e) {
|
|
115
|
+
return `Error: ${e instanceof Error ? e.message : String(e)}`;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Get detailed export/deployment info for an agent.
|
|
120
|
+
*/
|
|
121
|
+
export async function handleGetAgentExportInfo(agentId) {
|
|
122
|
+
try {
|
|
123
|
+
const response = await cloudRequest('GET', `/api/v2/agent-store/agents/${agentId}/export-info`);
|
|
124
|
+
if (response.status !== 200) {
|
|
125
|
+
return `Error: ${response.data?.message || `HTTP ${response.status}`}`;
|
|
126
|
+
}
|
|
127
|
+
return JSON.stringify(response.data, null, 2);
|
|
128
|
+
}
|
|
129
|
+
catch (e) {
|
|
130
|
+
return `Error: ${e instanceof Error ? e.message : String(e)}`;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Download adapter from platform to local directory.
|
|
135
|
+
*/
|
|
136
|
+
export async function handleDownloadAdapter(agentId, targetDir) {
|
|
137
|
+
try {
|
|
138
|
+
const creds = loadCredentials();
|
|
139
|
+
if (!creds) {
|
|
140
|
+
return 'Error: Not authenticated. Run /token first.';
|
|
141
|
+
}
|
|
142
|
+
const adapterDir = targetDir || path.join(os.homedir(), 'orca-adapters', agentId);
|
|
143
|
+
// Create directory if it doesn't exist
|
|
144
|
+
fs.mkdirSync(adapterDir, { recursive: true });
|
|
145
|
+
const url = `${creds.endpoint}/api/v2/agent-store/agents/${agentId}/download-adapter`;
|
|
146
|
+
return new Promise((resolve) => {
|
|
147
|
+
const protocol = url.startsWith('https') ? https : http;
|
|
148
|
+
const req = protocol.get(url, {
|
|
149
|
+
headers: { Authorization: `Bearer ${creds.token}` },
|
|
150
|
+
timeout: 300000, // 5 min — backend downloads from HF before responding
|
|
151
|
+
}, (res) => {
|
|
152
|
+
if (res.statusCode !== 200) {
|
|
153
|
+
let body = '';
|
|
154
|
+
res.on('data', (chunk) => { body += chunk; });
|
|
155
|
+
res.on('end', () => {
|
|
156
|
+
try {
|
|
157
|
+
const parsed = JSON.parse(body);
|
|
158
|
+
resolve(`Error: ${parsed.message || `HTTP ${res.statusCode}`}`);
|
|
159
|
+
}
|
|
160
|
+
catch {
|
|
161
|
+
resolve(`Error: HTTP ${res.statusCode}`);
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
// Save tar.gz to temp file, then extract
|
|
167
|
+
const tmpFile = path.join(os.tmpdir(), `orca-adapter-${agentId}.tar.gz`);
|
|
168
|
+
const writeStream = fs.createWriteStream(tmpFile);
|
|
169
|
+
res.pipe(writeStream);
|
|
170
|
+
writeStream.on('finish', () => {
|
|
171
|
+
// Extract using tar command
|
|
172
|
+
try {
|
|
173
|
+
execSync(`tar xzf "${tmpFile}" -C "${adapterDir}" --strip-components=1`, {
|
|
174
|
+
timeout: 120000,
|
|
175
|
+
});
|
|
176
|
+
fs.unlinkSync(tmpFile);
|
|
177
|
+
resolve(JSON.stringify({
|
|
178
|
+
status: 'success',
|
|
179
|
+
adapter_path: adapterDir,
|
|
180
|
+
message: `Adapter downloaded and extracted to ${adapterDir}`,
|
|
181
|
+
}));
|
|
182
|
+
}
|
|
183
|
+
catch (extractErr) {
|
|
184
|
+
resolve(`Error extracting adapter: ${extractErr instanceof Error ? extractErr.message : String(extractErr)}`);
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
writeStream.on('error', (err) => {
|
|
188
|
+
resolve(`Error writing adapter: ${err.message}`);
|
|
189
|
+
});
|
|
190
|
+
});
|
|
191
|
+
req.on('error', (err) => {
|
|
192
|
+
resolve(`Error downloading adapter: ${err.message}`);
|
|
193
|
+
});
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
catch (e) {
|
|
197
|
+
return `Error: ${e instanceof Error ? e.message : String(e)}`;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Test an OpenAI-compatible inference endpoint.
|
|
202
|
+
*/
|
|
203
|
+
export async function handleTestInferenceEndpoint(endpointUrl, model, prompt) {
|
|
204
|
+
const testPrompt = prompt || 'What is 2+2? Answer in one word.';
|
|
205
|
+
// Ensure URL ends properly
|
|
206
|
+
const baseUrl = endpointUrl.replace(/\/+$/, '');
|
|
207
|
+
const chatUrl = `${baseUrl}/chat/completions`;
|
|
208
|
+
const body = JSON.stringify({
|
|
209
|
+
model,
|
|
210
|
+
messages: [{ role: 'user', content: testPrompt }],
|
|
211
|
+
max_tokens: 100,
|
|
212
|
+
temperature: 0.1,
|
|
213
|
+
});
|
|
214
|
+
return new Promise((resolve) => {
|
|
215
|
+
const protocol = chatUrl.startsWith('https') ? https : http;
|
|
216
|
+
const parsedUrl = new URL(chatUrl);
|
|
217
|
+
const startTime = Date.now();
|
|
218
|
+
const req = protocol.request({
|
|
219
|
+
hostname: parsedUrl.hostname,
|
|
220
|
+
port: parsedUrl.port,
|
|
221
|
+
path: parsedUrl.pathname,
|
|
222
|
+
method: 'POST',
|
|
223
|
+
headers: {
|
|
224
|
+
'Content-Type': 'application/json',
|
|
225
|
+
'Content-Length': Buffer.byteLength(body),
|
|
226
|
+
},
|
|
227
|
+
timeout: 60000,
|
|
228
|
+
}, (res) => {
|
|
229
|
+
let data = '';
|
|
230
|
+
res.on('data', (chunk) => { data += chunk; });
|
|
231
|
+
res.on('end', () => {
|
|
232
|
+
const latencyMs = Date.now() - startTime;
|
|
233
|
+
try {
|
|
234
|
+
const parsed = JSON.parse(data);
|
|
235
|
+
if (parsed.choices && parsed.choices.length > 0) {
|
|
236
|
+
resolve(JSON.stringify({
|
|
237
|
+
status: 'success',
|
|
238
|
+
model: parsed.model,
|
|
239
|
+
response: parsed.choices[0].message?.content?.trim(),
|
|
240
|
+
latency_ms: latencyMs,
|
|
241
|
+
usage: parsed.usage,
|
|
242
|
+
}, null, 2));
|
|
243
|
+
}
|
|
244
|
+
else {
|
|
245
|
+
resolve(JSON.stringify({
|
|
246
|
+
status: 'error',
|
|
247
|
+
message: 'No choices in response',
|
|
248
|
+
raw: data.substring(0, 500),
|
|
249
|
+
latency_ms: latencyMs,
|
|
250
|
+
}));
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
catch {
|
|
254
|
+
resolve(JSON.stringify({
|
|
255
|
+
status: 'error',
|
|
256
|
+
message: `Invalid JSON response (HTTP ${res.statusCode})`,
|
|
257
|
+
raw: data.substring(0, 500),
|
|
258
|
+
latency_ms: latencyMs,
|
|
259
|
+
}));
|
|
260
|
+
}
|
|
261
|
+
});
|
|
262
|
+
});
|
|
263
|
+
req.on('error', (err) => {
|
|
264
|
+
resolve(JSON.stringify({
|
|
265
|
+
status: 'error',
|
|
266
|
+
message: err.message,
|
|
267
|
+
hint: err.message.includes('ECONNREFUSED')
|
|
268
|
+
? 'Connection refused. Is the vLLM server running? Check: docker ps or ps aux | grep vllm'
|
|
269
|
+
: undefined,
|
|
270
|
+
}));
|
|
271
|
+
});
|
|
272
|
+
req.on('timeout', () => {
|
|
273
|
+
req.destroy();
|
|
274
|
+
resolve(JSON.stringify({
|
|
275
|
+
status: 'error',
|
|
276
|
+
message: 'Request timed out after 60 seconds',
|
|
277
|
+
hint: 'The first request to vLLM may be slow while the model loads. Try again in a minute.',
|
|
278
|
+
}));
|
|
279
|
+
});
|
|
280
|
+
req.write(body);
|
|
281
|
+
req.end();
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Configure Orca to use a local vLLM endpoint.
|
|
286
|
+
*/
|
|
287
|
+
export async function handleConfigureLocalLlm(endpointUrl, modelName) {
|
|
288
|
+
try {
|
|
289
|
+
const creds = loadCredentials();
|
|
290
|
+
if (!creds) {
|
|
291
|
+
return 'Error: Not authenticated. Run /token first.';
|
|
292
|
+
}
|
|
293
|
+
const orgId = creds.org_id;
|
|
294
|
+
if (!orgId) {
|
|
295
|
+
return 'Error: No org_id in credentials.';
|
|
296
|
+
}
|
|
297
|
+
const response = await cloudRequest('PUT', `/api/v1/organizations/${orgId}/api-keys`, {
|
|
298
|
+
openai: {
|
|
299
|
+
api_key: 'not-needed',
|
|
300
|
+
endpoint: endpointUrl,
|
|
301
|
+
model: modelName,
|
|
302
|
+
},
|
|
303
|
+
});
|
|
304
|
+
if (response.status !== 200) {
|
|
305
|
+
return `Error: ${response.data?.message || `HTTP ${response.status}`}`;
|
|
306
|
+
}
|
|
307
|
+
return JSON.stringify({
|
|
308
|
+
status: 'success',
|
|
309
|
+
message: `Orca configured to use local vLLM at ${endpointUrl}`,
|
|
310
|
+
model: modelName,
|
|
311
|
+
endpoint: endpointUrl,
|
|
312
|
+
}, null, 2);
|
|
313
|
+
}
|
|
314
|
+
catch (e) {
|
|
315
|
+
return `Error: ${e instanceof Error ? e.message : String(e)}`;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
//# sourceMappingURL=inference.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inference.js","sourceRoot":"","sources":["../../src/tools/inference.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE3D,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B;QACE,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EAAE;;;4EAG2D;QACxE,YAAY,EAAE;YACZ,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,EAAE;SACf;KACF;IACD;QACE,IAAI,EAAE,uBAAuB;QAC7B,WAAW,EAAE;;;0FAGyE;QACtF,YAAY,EAAE;YACZ,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,QAAQ,EAAE,E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