@deepagents/experimental 7.7.2 → 7.8.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 +306 -103
- package/dist/index.js.map +4 -4
- package/dist/zukhruf/index.d.ts +1 -0
- package/dist/zukhruf/index.d.ts.map +1 -1
- package/dist/zukhruf/index.js +306 -103
- package/dist/zukhruf/index.js.map +4 -4
- package/dist/zukhruf/mailbox/communication-schema.d.ts +26 -0
- package/dist/zukhruf/mailbox/communication-schema.d.ts.map +1 -0
- package/dist/zukhruf/mailbox/ddl.postgres.d.ts +2 -0
- package/dist/zukhruf/mailbox/ddl.postgres.d.ts.map +1 -0
- package/dist/zukhruf/mailbox/postgres.store.d.ts +23 -0
- package/dist/zukhruf/mailbox/postgres.store.d.ts.map +1 -0
- package/dist/zukhruf/mailbox/sqlite.store.d.ts.map +1 -1
- package/package.json +13 -4
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** One `InterAgentCommunication` as a mailbox store persists it. */
|
|
3
|
+
export declare const communicationSchema: z.ZodObject<{
|
|
4
|
+
id: z.ZodString;
|
|
5
|
+
type: z.ZodEnum<{
|
|
6
|
+
readonly Message: "MESSAGE";
|
|
7
|
+
readonly NewTask: "NEW_TASK";
|
|
8
|
+
readonly FinalAnswer: "FINAL_ANSWER";
|
|
9
|
+
}>;
|
|
10
|
+
author: z.ZodObject<{
|
|
11
|
+
chatId: z.ZodString;
|
|
12
|
+
userId: z.ZodString;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
recipient: z.ZodObject<{
|
|
15
|
+
chatId: z.ZodString;
|
|
16
|
+
userId: z.ZodString;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
otherRecipients: z.ZodArray<z.ZodObject<{
|
|
19
|
+
chatId: z.ZodString;
|
|
20
|
+
userId: z.ZodString;
|
|
21
|
+
}, z.core.$strip>>;
|
|
22
|
+
content: z.ZodString;
|
|
23
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
24
|
+
triggerTurn: z.ZodBoolean;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
//# sourceMappingURL=communication-schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"communication-schema.d.ts","sourceRoot":"","sources":["../../../src/zukhruf/mailbox/communication-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAYxB,oEAAoE;AACpE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;iBASe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ddl.postgres.d.ts","sourceRoot":"","sources":["../../../src/zukhruf/mailbox/ddl.postgres.ts"],"names":[],"mappings":"AAAA,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CA0BjD"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Pool } from 'pg';
|
|
2
|
+
import { type MailboxEndTurnResult, type MailboxEnqueueResult, MailboxStore } from './store.ts';
|
|
3
|
+
import { type ConversationId, type InterAgentCommunication } from './types.ts';
|
|
4
|
+
export interface PostgresMailboxStoreOptions {
|
|
5
|
+
/** Borrowed: the host owns the pool and the store never ends it. */
|
|
6
|
+
pool: Pool;
|
|
7
|
+
/** PostgreSQL schema the mailbox tables live in. Default: `public`. */
|
|
8
|
+
schema?: string;
|
|
9
|
+
}
|
|
10
|
+
/** PostgreSQL-backed mailbox that every worker on the database shares. */
|
|
11
|
+
export declare class PostgresMailboxStore extends MailboxStore {
|
|
12
|
+
#private;
|
|
13
|
+
private constructor();
|
|
14
|
+
/** Opens the store: creates its schema objects before it returns. */
|
|
15
|
+
static create(options: PostgresMailboxStoreOptions): Promise<PostgresMailboxStore>;
|
|
16
|
+
beginTurn(recipient: ConversationId, turnId: string): Promise<void>;
|
|
17
|
+
enqueue(communication: InterAgentCommunication): Promise<MailboxEnqueueResult>;
|
|
18
|
+
endTurn(recipient: ConversationId, turnId: string): Promise<MailboxEndTurnResult>;
|
|
19
|
+
hasPending(recipient: ConversationId): Promise<boolean>;
|
|
20
|
+
drain(recipient: ConversationId): Promise<InterAgentCommunication[]>;
|
|
21
|
+
drainLeadingQueueOnly(recipient: ConversationId): Promise<InterAgentCommunication[]>;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=postgres.store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postgres.store.d.ts","sourceRoot":"","sources":["../../../src/zukhruf/mailbox/postgres.store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAc,MAAM,IAAI,CAAC;AAO3C,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,YAAY,EACb,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,uBAAuB,EAE7B,MAAM,YAAY,CAAC;AAWpB,MAAM,WAAW,2BAA2B;IAC1C,oEAAoE;IACpE,IAAI,EAAE,IAAI,CAAC;IACX,uEAAuE;IACvE,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,0EAA0E;AAC1E,qBAAa,oBAAqB,SAAQ,YAAY;;IAIpD,OAAO;IAMP,qEAAqE;WACxD,MAAM,CACjB,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,oBAAoB,CAAC;IA8BjB,SAAS,CACtB,SAAS,EAAE,cAAc,EACzB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,IAAI,CAAC;IAaP,OAAO,CACd,aAAa,EAAE,uBAAuB,GACrC,OAAO,CAAC,oBAAoB,CAAC;IA8BvB,OAAO,CACd,SAAS,EAAE,cAAc,EACzB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,oBAAoB,CAAC;IAgBvB,UAAU,CAAC,SAAS,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC;IAIvD,KAAK,CACZ,SAAS,EAAE,cAAc,GACxB,OAAO,CAAC,uBAAuB,EAAE,CAAC;IAI5B,qBAAqB,CAC5B,SAAS,EAAE,cAAc,GACxB,OAAO,CAAC,uBAAuB,EAAE,CAAC;CAsFtC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sqlite.store.d.ts","sourceRoot":"","sources":["../../../src/zukhruf/mailbox/sqlite.store.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sqlite.store.d.ts","sourceRoot":"","sources":["../../../src/zukhruf/mailbox/sqlite.store.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,YAAY,EACb,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,uBAAuB,EAE7B,MAAM,YAAY,CAAC;AAcpB,gEAAgE;AAChE,qBAAa,kBAAmB,SAAQ,YAAa,YAAW,UAAU;;gBAG5D,IAAI,EAAE,MAAM;IAOT,SAAS,CACtB,SAAS,EAAE,cAAc,EACzB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,IAAI,CAAC;IAoBD,OAAO,CACpB,aAAa,EAAE,uBAAuB,GACrC,OAAO,CAAC,oBAAoB,CAAC;IA8BjB,OAAO,CACpB,SAAS,EAAE,cAAc,EACzB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,oBAAoB,CAAC;IAqBjB,UAAU,CAAC,SAAS,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC;IA0CvD,KAAK,CAClB,SAAS,EAAE,cAAc,GACxB,OAAO,CAAC,uBAAuB,EAAE,CAAC;IAItB,qBAAqB,CAClC,SAAS,EAAE,cAAc,GACxB,OAAO,CAAC,uBAAuB,EAAE,CAAC;IA0DrC,KAAK,IAAI,IAAI;IAKb,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,IAAI;CAGzB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepagents/experimental",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.8.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -106,9 +106,9 @@
|
|
|
106
106
|
"@ai-sdk/openai": "^4.0.111",
|
|
107
107
|
"@ai-sdk/provider": "^4.0.37",
|
|
108
108
|
"@ai-sdk/provider-utils": "^5.0.76",
|
|
109
|
-
"@deepagents/compaction": "7.
|
|
110
|
-
"@deepagents/context": "7.
|
|
111
|
-
"@deepagents/elements": "7.
|
|
109
|
+
"@deepagents/compaction": "7.8.0",
|
|
110
|
+
"@deepagents/context": "7.8.0",
|
|
111
|
+
"@deepagents/elements": "7.8.0",
|
|
112
112
|
"@iarna/toml": "^2.2.5",
|
|
113
113
|
"@napi-rs/keyring": "^2.1.0",
|
|
114
114
|
"@opencoredev/loginwithchatgpt-core": "^0.2.0",
|
|
@@ -137,9 +137,18 @@
|
|
|
137
137
|
"@ai-sdk/provider": "^4.0.37",
|
|
138
138
|
"@electric-sql/pglite": "^0.5.4",
|
|
139
139
|
"@sinonjs/fake-timers": "^15.4.0",
|
|
140
|
+
"@types/pg": "^8.20.0",
|
|
140
141
|
"@zukhruf/fs": "^0.8.37",
|
|
141
142
|
"just-bash": "^3.6.0",
|
|
142
143
|
"msw": "^3.0.3",
|
|
143
144
|
"undici": "^8.12.4"
|
|
145
|
+
},
|
|
146
|
+
"peerDependencies": {
|
|
147
|
+
"pg": "^8.22.0"
|
|
148
|
+
},
|
|
149
|
+
"peerDependenciesMeta": {
|
|
150
|
+
"pg": {
|
|
151
|
+
"optional": true
|
|
152
|
+
}
|
|
144
153
|
}
|
|
145
154
|
}
|