@deepagents/experimental 7.3.0 → 7.4.0
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/index.js +8 -9
- package/dist/index.js.map +3 -3
- package/dist/providers/claude/index.js +5 -3
- package/dist/providers/claude/index.js.map +2 -2
- package/dist/providers/claude/local-credentials.d.ts.map +1 -1
- package/dist/providers/codex/index.js +3 -1
- package/dist/providers/codex/index.js.map +2 -2
- package/dist/providers/codex/local-credentials.d.ts.map +1 -1
- package/dist/zukhruf/agent.d.ts +3 -1
- package/dist/zukhruf/agent.d.ts.map +1 -1
- package/dist/zukhruf/index.js +8 -9
- package/dist/zukhruf/index.js.map +3 -3
- package/dist/zukhruf/mailbox/ddl.sqlite.d.ts +1 -1
- package/dist/zukhruf/mailbox/ddl.sqlite.d.ts.map +1 -1
- package/dist/zukhruf/mailbox/sqlite.store.d.ts.map +1 -1
- package/dist/zukhruf/plugins/conversation-scheduling/index.d.ts.map +1 -1
- package/dist/zukhruf/plugins/conversation-scheduling/index.js +8 -11
- package/dist/zukhruf/plugins/conversation-scheduling/index.js.map +2 -2
- package/dist/zukhruf/plugins/http/index.d.ts.map +1 -1
- package/dist/zukhruf/plugins/http/index.js +40 -20
- package/dist/zukhruf/plugins/http/index.js.map +2 -2
- package/dist/zukhruf/plugins/schedules/http.js.map +1 -1
- package/dist/zukhruf/plugins/schedules/index.d.ts.map +1 -1
- package/dist/zukhruf/plugins/schedules/index.js +15 -16
- package/dist/zukhruf/plugins/schedules/index.js.map +3 -3
- package/dist/zukhruf/plugins/uploads/http.js.map +1 -1
- package/dist/zukhruf/plugins/uploads/index.js +7 -8
- package/dist/zukhruf/plugins/uploads/index.js.map +2 -2
- package/dist/zukhruf/runtime/agent-turn-executor.d.ts.map +1 -1
- package/package.json +9 -8
package/dist/index.js
CHANGED
|
@@ -533,13 +533,12 @@ function defineInstructions(...fragments) {
|
|
|
533
533
|
|
|
534
534
|
// packages/experimental/src/zukhruf/mailbox/sqlite.store.ts
|
|
535
535
|
import { Declaration } from "@zukhruf/sqlite-drift";
|
|
536
|
+
import { open } from "@zukhruf/sqlite-open";
|
|
536
537
|
import { transaction } from "@zukhruf/sqlite-transaction";
|
|
537
|
-
import { DatabaseSync } from "node:sqlite";
|
|
538
538
|
import { z } from "zod";
|
|
539
539
|
|
|
540
540
|
// packages/experimental/src/zukhruf/mailbox/ddl.sqlite.ts
|
|
541
541
|
var SETUP = `
|
|
542
|
-
PRAGMA journal_mode = WAL;
|
|
543
542
|
PRAGMA synchronous = NORMAL;
|
|
544
543
|
`;
|
|
545
544
|
var statements = [
|
|
@@ -623,7 +622,6 @@ function assertConversationId(value, label) {
|
|
|
623
622
|
|
|
624
623
|
// packages/experimental/src/zukhruf/mailbox/sqlite.store.ts
|
|
625
624
|
var tables = new Declaration(statements, { rows: "keep" });
|
|
626
|
-
var BUSY_TIMEOUT_MS = 5e3;
|
|
627
625
|
var conversationIdSchema = z.object({
|
|
628
626
|
chatId: z.string(),
|
|
629
627
|
userId: z.string()
|
|
@@ -648,7 +646,7 @@ var SqliteMailboxStore = class extends MailboxStore {
|
|
|
648
646
|
#database;
|
|
649
647
|
constructor(path3) {
|
|
650
648
|
super();
|
|
651
|
-
this.#database =
|
|
649
|
+
this.#database = open(path3);
|
|
652
650
|
this.#database.exec(SETUP);
|
|
653
651
|
tables.apply(this.#database);
|
|
654
652
|
}
|
|
@@ -2415,12 +2413,12 @@ function replacementRange(messages, keepLastMessages) {
|
|
|
2415
2413
|
while (messages[start]?.role === "system") start++;
|
|
2416
2414
|
let limit = messages.length - keepLastMessages;
|
|
2417
2415
|
const links = /* @__PURE__ */ new Map();
|
|
2418
|
-
const link = (key, index,
|
|
2416
|
+
const link = (key, index, open2) => {
|
|
2419
2417
|
const previous = links.get(key);
|
|
2420
2418
|
links.set(key, {
|
|
2421
2419
|
first: previous?.first ?? index,
|
|
2422
2420
|
last: index,
|
|
2423
|
-
open:
|
|
2421
|
+
open: open2 ?? previous?.open ?? false
|
|
2424
2422
|
});
|
|
2425
2423
|
};
|
|
2426
2424
|
for (const [index, message] of messages.entries()) {
|
|
@@ -2449,8 +2447,8 @@ function replacementRange(messages, keepLastMessages) {
|
|
|
2449
2447
|
}
|
|
2450
2448
|
}
|
|
2451
2449
|
const crossings = new Int32Array(messages.length + 1);
|
|
2452
|
-
for (const { first, last, open } of links.values()) {
|
|
2453
|
-
if (
|
|
2450
|
+
for (const { first, last, open: open2 } of links.values()) {
|
|
2451
|
+
if (open2) limit = Math.min(limit, first);
|
|
2454
2452
|
crossings[first + 1]++;
|
|
2455
2453
|
crossings[last + 1]--;
|
|
2456
2454
|
}
|
|
@@ -2541,7 +2539,7 @@ ${options.instructions}` : SUMMARY_PROMPT,
|
|
|
2541
2539
|
abortSignal
|
|
2542
2540
|
});
|
|
2543
2541
|
abortSignal?.throwIfAborted();
|
|
2544
|
-
const usage = generated
|
|
2542
|
+
const { usage } = generated;
|
|
2545
2543
|
if (generated.finishReason !== "stop" || generated.content.some(
|
|
2546
2544
|
(part) => part.type !== "text" && part.type !== "reasoning"
|
|
2547
2545
|
)) {
|
|
@@ -3158,6 +3156,7 @@ var AgentTurnExecutor = class {
|
|
|
3158
3156
|
reasoning: declaration.reasoning,
|
|
3159
3157
|
maxOutputTokens: declaration.maxOutputTokens,
|
|
3160
3158
|
timeout: declaration.timeout,
|
|
3159
|
+
stopWhen: declaration.stopWhen,
|
|
3161
3160
|
toolCallConcurrency: declaration.toolCallConcurrency,
|
|
3162
3161
|
experimental_toolApprovalSecret: declaration.experimental_toolApprovalSecret,
|
|
3163
3162
|
sandbox,
|