omnikey-cli 1.0.21 → 1.0.23
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.
|
@@ -110,6 +110,17 @@ async function runToolLoop(initialResult, session, sessionId, send, log, tools,
|
|
|
110
110
|
if (result.finish_reason === 'tool_calls') {
|
|
111
111
|
log.warn('Tool loop hit MAX_TOOL_ITERATIONS; forcing final conclusion', { sessionId });
|
|
112
112
|
session.history.push(result.assistantMessage);
|
|
113
|
+
// The API requires a tool_result for every tool_use in the preceding
|
|
114
|
+
// assistant message. Add synthetic results for any unexecuted calls so
|
|
115
|
+
// the history remains valid before we send the follow-up user message.
|
|
116
|
+
for (const tc of result.tool_calls ?? []) {
|
|
117
|
+
session.history.push({
|
|
118
|
+
role: 'tool',
|
|
119
|
+
tool_call_id: tc.id,
|
|
120
|
+
tool_name: tc.name,
|
|
121
|
+
content: 'Tool call limit reached. Result unavailable.',
|
|
122
|
+
});
|
|
123
|
+
}
|
|
113
124
|
session.history.push({
|
|
114
125
|
role: 'user',
|
|
115
126
|
content: 'You have reached the maximum number of tool calls. Do NOT make any further tool calls or web searches. You MUST now provide a final answer directly. If you still need to gather information from the system, generate a `<shell_scripts>` block instead of making tool calls.',
|
package/backend-dist/index.js
CHANGED
|
@@ -17,6 +17,7 @@ const config_1 = require("./config");
|
|
|
17
17
|
const agentServer_1 = require("./agent/agentServer");
|
|
18
18
|
const app = (0, express_1.default)();
|
|
19
19
|
const PORT = Number(config_1.config.port);
|
|
20
|
+
app.set('trust proxy', 1);
|
|
20
21
|
app.use((0, cors_1.default)());
|
|
21
22
|
app.use(express_1.default.json());
|
|
22
23
|
// Landing page
|
|
@@ -59,13 +60,13 @@ app.get('/macos/appcast', (req, res) => {
|
|
|
59
60
|
catch (error) {
|
|
60
61
|
logger_1.logger.error('Failed to stat OmniKeyAI.dmg for appcast.', { error });
|
|
61
62
|
}
|
|
62
|
-
const baseUrl =
|
|
63
|
+
const baseUrl = `https://${req.get('host')}`;
|
|
63
64
|
const downloadUrl = `${baseUrl}/macos/download`;
|
|
64
65
|
const appcastUrl = `${baseUrl}/macos/appcast`;
|
|
65
66
|
// These should match the values embedded into the macOS app
|
|
66
67
|
// Info.plist in macOS/build_release_dmg.sh.
|
|
67
|
-
const bundleVersion = '
|
|
68
|
-
const shortVersion = '1.0.
|
|
68
|
+
const bundleVersion = '18';
|
|
69
|
+
const shortVersion = '1.0.17';
|
|
69
70
|
const xml = `<?xml version="1.0" encoding="utf-8"?>
|
|
70
71
|
<rss version="2.0"
|
|
71
72
|
xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle"
|
|
@@ -93,7 +94,7 @@ app.get('/macos/appcast', (req, res) => {
|
|
|
93
94
|
// ── Windows distribution endpoints ───────────────────────────────────────────
|
|
94
95
|
// These should match the values in windows/OmniKey.Windows.csproj
|
|
95
96
|
// <Version> and windows/build_release_zip.ps1 $APP_VERSION.
|
|
96
|
-
const WIN_VERSION = '1.
|
|
97
|
+
const WIN_VERSION = '1.4';
|
|
97
98
|
const WIN_ZIP_FILENAME = 'OmniKeyAI-windows-win-x64.zip';
|
|
98
99
|
const WIN_ZIP_PATH = path_1.default.join(process.cwd(), 'windows', WIN_ZIP_FILENAME);
|
|
99
100
|
// Serves the pre-built ZIP produced by windows/build_release_zip.ps1.
|
|
@@ -122,7 +123,7 @@ app.get('/windows/download', (_req, res) => {
|
|
|
122
123
|
// Returns the latest version + download URL so the client can decide whether
|
|
123
124
|
// to prompt the user for an update.
|
|
124
125
|
app.get('/windows/update', (req, res) => {
|
|
125
|
-
const baseUrl =
|
|
126
|
+
const baseUrl = `https://${req.get('host')}`;
|
|
126
127
|
let fileSize = 0;
|
|
127
128
|
try {
|
|
128
129
|
fileSize = fs_1.default.statSync(WIN_ZIP_PATH).size;
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"access": "public",
|
|
5
5
|
"registry": "https://registry.npmjs.org/"
|
|
6
6
|
},
|
|
7
|
-
"version": "1.0.
|
|
7
|
+
"version": "1.0.23",
|
|
8
8
|
"description": "CLI for onboarding users to Omnikey AI and configuring OPENAI_API_KEY. Use Yarn for install/build.",
|
|
9
9
|
"engines": {
|
|
10
10
|
"node": ">=14.0.0",
|