omnikey-cli 1.0.33 → 1.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.
|
@@ -268,7 +268,7 @@ async function getOrCreateSession(sessionId, subscription, platform, log, isCron
|
|
|
268
268
|
log.error('Failed to get system prompt for new agent session', { error: err });
|
|
269
269
|
return '';
|
|
270
270
|
});
|
|
271
|
-
const systemPrompt = (0, agentPrompts_1.getAgentPrompt)(platform, !!prompt);
|
|
271
|
+
const systemPrompt = (0, agentPrompts_1.getAgentPrompt)(platform, !isCronJob && !!prompt);
|
|
272
272
|
const entry = {
|
|
273
273
|
subscription,
|
|
274
274
|
history: [
|
|
@@ -444,10 +444,9 @@ async function runAgentTurn(sessionId, subscription, clientMessage, send, log, o
|
|
|
444
444
|
if (!content && result.finish_reason !== 'tool_calls') {
|
|
445
445
|
log.warn('Agent LLM returned empty content; sending generic error to client.');
|
|
446
446
|
const errorMessage = 'The agent returned an empty response. Please try again.';
|
|
447
|
-
|
|
448
|
-
// Evict from the in-memory cache; the DB record is kept so the session
|
|
449
|
-
// appears in the list and can be retried or deleted by the user.
|
|
447
|
+
await persistSessionToDB(sessionId, session);
|
|
450
448
|
sessionMessages.delete(sessionId);
|
|
449
|
+
(0, utils_1.sendFinalAnswer)(send, sessionId, errorMessage, true);
|
|
451
450
|
return;
|
|
452
451
|
}
|
|
453
452
|
// If the model requested web tool calls, execute them and get a follow-up
|
|
@@ -583,18 +582,17 @@ async function runAgentTurn(sessionId, subscription, clientMessage, send, log, o
|
|
|
583
582
|
log.warn('Agent returned empty content with no recognized tags; sending error', {
|
|
584
583
|
sessionId,
|
|
585
584
|
});
|
|
586
|
-
|
|
587
|
-
// Evict from in-memory cache; DB record is preserved.
|
|
585
|
+
await persistSessionToDB(sessionId, session);
|
|
588
586
|
sessionMessages.delete(sessionId);
|
|
587
|
+
(0, utils_1.sendFinalAnswer)(send, sessionId, 'The agent returned an empty response. Please try again.', true);
|
|
589
588
|
}
|
|
590
589
|
}
|
|
591
590
|
catch (err) {
|
|
592
591
|
log.error('Agent LLM call failed', { error: err });
|
|
593
592
|
const errorMessage = 'Agent failed to call language model. Please try again later.';
|
|
594
|
-
|
|
595
|
-
// Evict from in-memory cache; DB record is preserved so the user can
|
|
596
|
-
// review or delete the session from the client.
|
|
593
|
+
await persistSessionToDB(sessionId, session);
|
|
597
594
|
sessionMessages.delete(sessionId);
|
|
595
|
+
(0, utils_1.sendFinalAnswer)(send, sessionId, errorMessage, true);
|
|
598
596
|
}
|
|
599
597
|
}
|
|
600
598
|
function attachAgentWebSocketServer(server) {
|
package/backend-dist/index.js
CHANGED
|
@@ -74,8 +74,8 @@ app.get('/macos/appcast', (req, res) => {
|
|
|
74
74
|
const appcastUrl = `${baseUrl}/macos/appcast`;
|
|
75
75
|
// These should match the values embedded into the macOS app
|
|
76
76
|
// Info.plist in macOS/build_release_dmg.sh.
|
|
77
|
-
const bundleVersion = '
|
|
78
|
-
const shortVersion = '1.0.
|
|
77
|
+
const bundleVersion = '25';
|
|
78
|
+
const shortVersion = '1.0.24';
|
|
79
79
|
const xml = `<?xml version="1.0" encoding="utf-8"?>
|
|
80
80
|
<rss version="2.0"
|
|
81
81
|
xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle"
|
|
@@ -144,7 +144,7 @@ function runCronJob(job, subscription, sessionId) {
|
|
|
144
144
|
content: output,
|
|
145
145
|
is_terminal_output: true,
|
|
146
146
|
is_error: isError,
|
|
147
|
-
}, send, logger_1.logger, { maxTurns: MAX_CRON_TURNS }).catch((err) => settle(err instanceof Error ? err : new Error(String(err))));
|
|
147
|
+
}, send, logger_1.logger, { maxTurns: MAX_CRON_TURNS, isCronJob: true }).catch((err) => settle(err instanceof Error ? err : new Error(String(err))));
|
|
148
148
|
return;
|
|
149
149
|
}
|
|
150
150
|
if (FINAL_ANSWER_RE.test(content)) {
|
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.35",
|
|
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",
|