@deepagents/experimental 7.9.0 → 7.10.1
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/README.md +16 -4
- package/dist/coding-agent-reminders/context.d.ts.map +1 -1
- package/dist/coding-agent-reminders/evaluate.d.ts.map +1 -1
- package/dist/coding-agent-reminders/index.d.ts.map +1 -1
- package/dist/coding-agent-reminders/io.d.ts.map +1 -1
- package/dist/coding-agent-reminders/predicates/classifier.d.ts.map +1 -1
- package/dist/coding-agent-reminders/predicates/combinators.d.ts.map +1 -1
- package/dist/coding-agent-reminders/predicates/content.d.ts +1 -1
- package/dist/coding-agent-reminders/predicates/content.d.ts.map +1 -1
- package/dist/coding-agent-reminders/predicates/count.d.ts.map +1 -1
- package/dist/coding-agent-reminders/predicates/environment.d.ts.map +1 -1
- package/dist/coding-agent-reminders/predicates/event.d.ts.map +1 -1
- package/dist/coding-agent-reminders/predicates/index.d.ts.map +1 -1
- package/dist/coding-agent-reminders/predicates/tool.d.ts.map +1 -1
- package/dist/coding-agent-reminders/types.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4010 -3686
- package/dist/index.js.map +4 -4
- package/dist/providers/account-tokens.d.ts.map +1 -1
- package/dist/providers/claude/accounts.d.ts.map +1 -1
- package/dist/providers/claude/errors.d.ts.map +1 -1
- package/dist/providers/claude/index.d.ts.map +1 -1
- package/dist/providers/claude/local-credentials.d.ts.map +1 -1
- package/dist/providers/claude/oauth.d.ts.map +1 -1
- package/dist/providers/claude/provider.d.ts.map +1 -1
- package/dist/providers/codex/accounts.d.ts.map +1 -1
- package/dist/providers/codex/errors.d.ts.map +1 -1
- package/dist/providers/codex/generate-via-stream.d.ts.map +1 -1
- package/dist/providers/codex/index.d.ts.map +1 -1
- package/dist/providers/codex/local-credentials.d.ts.map +1 -1
- package/dist/providers/codex/provider.d.ts.map +1 -1
- package/dist/providers/language-model-provider.d.ts.map +1 -1
- package/dist/providers/request-signal.d.ts.map +1 -1
- package/dist/zukhruf/agent.d.ts.map +1 -1
- package/dist/zukhruf/collaboration/agent-tool-context.d.ts.map +1 -1
- package/dist/zukhruf/collaboration/capability.d.ts +22 -0
- package/dist/zukhruf/collaboration/capability.d.ts.map +1 -0
- package/dist/zukhruf/collaboration/code-mode-tools.d.ts +13 -0
- package/dist/zukhruf/collaboration/code-mode-tools.d.ts.map +1 -0
- package/dist/zukhruf/collaboration/direct-messaging.d.ts +466 -0
- package/dist/zukhruf/collaboration/direct-messaging.d.ts.map +1 -0
- package/dist/zukhruf/collaboration/direct-tools.d.ts +14 -0
- package/dist/zukhruf/collaboration/direct-tools.d.ts.map +1 -0
- package/dist/zukhruf/collaboration/interrupt-agent.d.ts +4 -4
- package/dist/zukhruf/collaboration/interrupt-agent.d.ts.map +1 -1
- package/dist/zukhruf/collaboration/list-agents.d.ts +4 -4
- package/dist/zukhruf/collaboration/list-agents.d.ts.map +1 -1
- package/dist/zukhruf/collaboration/message-tools.d.ts +8 -8
- package/dist/zukhruf/collaboration/message-tools.d.ts.map +1 -1
- package/dist/zukhruf/collaboration/spawn-agent.d.ts +30 -30
- package/dist/zukhruf/collaboration/spawn-agent.d.ts.map +1 -1
- package/dist/zukhruf/collaboration/spawning.d.ts +325 -0
- package/dist/zukhruf/collaboration/spawning.d.ts.map +1 -0
- package/dist/zukhruf/collaboration/supervision.d.ts +478 -0
- package/dist/zukhruf/collaboration/supervision.d.ts.map +1 -0
- package/dist/zukhruf/collaboration/team.d.ts +1549 -0
- package/dist/zukhruf/collaboration/team.d.ts.map +1 -0
- package/dist/zukhruf/collaboration/tool-exposure.d.ts +29 -0
- package/dist/zukhruf/collaboration/tool-exposure.d.ts.map +1 -0
- package/dist/zukhruf/collaboration/tool-namespace.d.ts +7 -0
- package/dist/zukhruf/collaboration/tool-namespace.d.ts.map +1 -0
- package/dist/zukhruf/collaboration/wait-agent.d.ts +4 -4
- package/dist/zukhruf/collaboration/wait-agent.d.ts.map +1 -1
- package/dist/zukhruf/collaboration/wait-bounds.d.ts +12 -0
- package/dist/zukhruf/collaboration/wait-bounds.d.ts.map +1 -0
- package/dist/zukhruf/collaboration/waiting.d.ts +262 -0
- package/dist/zukhruf/collaboration/waiting.d.ts.map +1 -0
- package/dist/zukhruf/control-plane/agent-control-plane.d.ts +2 -4
- package/dist/zukhruf/control-plane/agent-control-plane.d.ts.map +1 -1
- package/dist/zukhruf/control-plane/agent-declaration-registry.d.ts.map +1 -1
- package/dist/zukhruf/control-plane/agent-directory.d.ts +2 -0
- package/dist/zukhruf/control-plane/agent-directory.d.ts.map +1 -1
- package/dist/zukhruf/control-plane/agent-history-forker.d.ts.map +1 -1
- package/dist/zukhruf/control-plane/agent-path.d.ts.map +1 -1
- package/dist/zukhruf/control-plane/agent-residency.d.ts +60 -0
- package/dist/zukhruf/control-plane/agent-residency.d.ts.map +1 -0
- package/dist/zukhruf/control-plane/agent-status-projector.d.ts +4 -4
- package/dist/zukhruf/control-plane/agent-status-projector.d.ts.map +1 -1
- package/dist/zukhruf/control-plane/agent-thread-limit-error.d.ts.map +1 -1
- package/dist/zukhruf/control-plane/agent-thread.d.ts.map +1 -1
- package/dist/zukhruf/control-plane/agent-turn-id.d.ts.map +1 -1
- package/dist/zukhruf/control-plane/conversation-not-found-error.d.ts.map +1 -1
- package/dist/zukhruf/control-plane/fork-turns.d.ts +4 -3
- package/dist/zukhruf/control-plane/fork-turns.d.ts.map +1 -1
- package/dist/zukhruf/control-plane/stale-turn-error.d.ts.map +1 -1
- package/dist/zukhruf/control-plane/turn-not-found-error.d.ts.map +1 -1
- package/dist/zukhruf/index.d.ts +11 -1
- package/dist/zukhruf/index.d.ts.map +1 -1
- package/dist/zukhruf/index.js +4010 -3686
- package/dist/zukhruf/index.js.map +4 -4
- package/dist/zukhruf/instructions.d.ts.map +1 -1
- package/dist/zukhruf/is-named-error.d.ts.map +1 -1
- package/dist/zukhruf/mailbox/communication-schema.d.ts +3 -3
- package/dist/zukhruf/mailbox/communication-schema.d.ts.map +1 -1
- package/dist/zukhruf/mailbox/coordinator.d.ts +8 -4
- package/dist/zukhruf/mailbox/coordinator.d.ts.map +1 -1
- package/dist/zukhruf/mailbox/ddl.postgres.d.ts.map +1 -1
- package/dist/zukhruf/mailbox/ddl.sqlite.d.ts +0 -1
- package/dist/zukhruf/mailbox/ddl.sqlite.d.ts.map +1 -1
- package/dist/zukhruf/mailbox/postgres.store.d.ts.map +1 -1
- package/dist/zukhruf/mailbox/sqlite.store.d.ts.map +1 -1
- package/dist/zukhruf/mailbox/store.d.ts.map +1 -1
- package/dist/zukhruf/mailbox/types.d.ts +5 -5
- package/dist/zukhruf/mailbox/types.d.ts.map +1 -1
- package/dist/zukhruf/plugins/conversation-scheduling/conversation-scheduler.d.ts +2 -2
- package/dist/zukhruf/plugins/conversation-scheduling/conversation-scheduler.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 +192 -178
- package/dist/zukhruf/plugins/conversation-scheduling/index.js.map +4 -4
- package/dist/zukhruf/plugins/conversation-scheduling/pg-boss.wake-scheduler.d.ts +1 -1
- package/dist/zukhruf/plugins/conversation-scheduling/pg-boss.wake-scheduler.d.ts.map +1 -1
- package/dist/zukhruf/plugins/conversation-scheduling/tools.d.ts +16 -16
- package/dist/zukhruf/plugins/conversation-scheduling/tools.d.ts.map +1 -1
- package/dist/zukhruf/plugins/conversation-scheduling/wake-scheduler.d.ts +1 -1
- package/dist/zukhruf/plugins/conversation-scheduling/wake-scheduler.d.ts.map +1 -1
- package/dist/zukhruf/plugins/http/index.d.ts.map +1 -1
- package/dist/zukhruf/plugins/http/index.js +2 -12
- package/dist/zukhruf/plugins/http/index.js.map +2 -2
- package/dist/zukhruf/plugins/mcp/index.d.ts.map +1 -1
- package/dist/zukhruf/plugins/schedules/http.d.ts.map +1 -1
- package/dist/zukhruf/plugins/schedules/http.js +0 -1
- package/dist/zukhruf/plugins/schedules/http.js.map +2 -2
- package/dist/zukhruf/plugins/schedules/index.d.ts.map +1 -1
- package/dist/zukhruf/plugins/schedules/index.js +189 -175
- package/dist/zukhruf/plugins/schedules/index.js.map +4 -4
- package/dist/zukhruf/plugins/schedules/schedule-files.d.ts.map +1 -1
- package/dist/zukhruf/plugins/schedules/scheduled-tasks.d.ts +1 -1
- package/dist/zukhruf/plugins/schedules/scheduled-tasks.d.ts.map +1 -1
- package/dist/zukhruf/plugins/uploads/http.d.ts.map +1 -1
- package/dist/zukhruf/plugins/uploads/http.js +9 -5
- package/dist/zukhruf/plugins/uploads/http.js.map +2 -2
- package/dist/zukhruf/plugins/uploads/index.d.ts +11 -11
- package/dist/zukhruf/plugins/uploads/index.d.ts.map +1 -1
- package/dist/zukhruf/plugins/uploads/index.js +1 -7
- package/dist/zukhruf/plugins/uploads/index.js.map +2 -2
- package/dist/zukhruf/queue/pg-boss-notifications.d.ts.map +1 -1
- package/dist/zukhruf/queue/pg-boss.turn-queue.d.ts.map +1 -1
- package/dist/zukhruf/queue/turn-queue.d.ts +2 -2
- package/dist/zukhruf/queue/turn-queue.d.ts.map +1 -1
- package/dist/zukhruf/runtime/agent-runtime.d.ts +5 -4
- package/dist/zukhruf/runtime/agent-runtime.d.ts.map +1 -1
- package/dist/zukhruf/runtime/agent-turn-executor.d.ts +3 -3
- package/dist/zukhruf/runtime/agent-turn-executor.d.ts.map +1 -1
- package/dist/zukhruf/runtime/approval-controller.d.ts +7 -3
- package/dist/zukhruf/runtime/approval-controller.d.ts.map +1 -1
- package/dist/zukhruf/runtime/compaction.d.ts +2 -2
- package/dist/zukhruf/runtime/compaction.d.ts.map +1 -1
- package/dist/zukhruf/runtime/conversation-sandboxes.d.ts.map +1 -1
- package/dist/zukhruf/runtime/conversation-status/change-source.d.ts.map +1 -1
- package/dist/zukhruf/runtime/conversation-status/child-progress.d.ts +18 -18
- package/dist/zukhruf/runtime/conversation-status/child-progress.d.ts.map +1 -1
- package/dist/zukhruf/runtime/conversation-status/pg-boss-change-source.d.ts.map +1 -1
- package/dist/zukhruf/runtime/conversation-status/projector.d.ts +5 -0
- package/dist/zukhruf/runtime/conversation-status/projector.d.ts.map +1 -1
- package/dist/zukhruf/runtime/plugin/agent-skills.d.ts.map +1 -1
- package/dist/zukhruf/runtime/plugin/plugin-agents.d.ts.map +1 -1
- package/dist/zukhruf/runtime/plugin/plugin-bindings.d.ts.map +1 -1
- package/dist/zukhruf/runtime/plugin/plugin-context-composition.d.ts.map +1 -1
- package/dist/zukhruf/runtime/plugin/plugin-manager.d.ts +4 -6
- package/dist/zukhruf/runtime/plugin/plugin-manager.d.ts.map +1 -1
- package/dist/zukhruf/runtime/plugin/plugin-tool-composition.d.ts.map +1 -1
- package/dist/zukhruf/sandbox/define.d.ts.map +1 -1
- package/dist/zukhruf/storage/agent-storage.d.ts.map +1 -1
- package/dist/zukhruf/storage/embedded-agent-storage.d.ts.map +1 -1
- package/dist/zukhruf/storage/postgres-agent-storage.d.ts.map +1 -1
- package/dist/zukhruf/storage/sqlite-admission-gate.d.ts.map +1 -1
- package/dist/zukhruf/storage/turn-outbox.d.ts.map +1 -1
- package/dist/zukhruf/tool.d.ts.map +1 -1
- package/package.json +6 -6
- package/dist/zukhruf/collaboration/collaboration-tools.d.ts +0 -1832
- package/dist/zukhruf/collaboration/collaboration-tools.d.ts.map +0 -1
- package/dist/zukhruf/multi-agent-config.d.ts +0 -37
- package/dist/zukhruf/multi-agent-config.d.ts.map +0 -1
- package/dist/zukhruf/runtime/conversation-status/status-publishing-turn-queue.d.ts +0 -20
- package/dist/zukhruf/runtime/conversation-status/status-publishing-turn-queue.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instructions.d.ts","
|
|
1
|
+
{"version":3,"file":"instructions.d.ts","sources":["../../src/zukhruf/instructions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,wBAAgB,kBAAkB,CAAC,GAAG,SAAS,EAAE,eAAe,EAAE,iEAEjE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-named-error.d.ts","
|
|
1
|
+
{"version":3,"file":"is-named-error.d.ts","sources":["../../src/zukhruf/is-named-error.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,UAAU,SAAS,KAAK,EACnD,KAAK,EAAE,OAAO,EACd,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,GACvB,KAAK,IAAI,UAAU,CAErB"}
|
|
@@ -3,9 +3,9 @@ import { z } from 'zod';
|
|
|
3
3
|
export declare const communicationSchema: z.ZodObject<{
|
|
4
4
|
id: z.ZodString;
|
|
5
5
|
type: z.ZodEnum<{
|
|
6
|
-
readonly Message:
|
|
7
|
-
readonly NewTask:
|
|
8
|
-
readonly FinalAnswer:
|
|
6
|
+
readonly Message: 'MESSAGE';
|
|
7
|
+
readonly NewTask: 'NEW_TASK';
|
|
8
|
+
readonly FinalAnswer: 'FINAL_ANSWER';
|
|
9
9
|
}>;
|
|
10
10
|
author: z.ZodObject<{
|
|
11
11
|
chatId: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"communication-schema.d.ts","
|
|
1
|
+
{"version":3,"file":"communication-schema.d.ts","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"}
|
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { AgentResidency } from '../control-plane/agent-residency.ts';
|
|
2
|
+
import type { TurnRef } from '../queue/turn-queue.ts';
|
|
3
3
|
import type { MailboxStore } from './store.ts';
|
|
4
4
|
import { type ConversationId, type InterAgentCommunication, type MessageDeliveryMode } from './types.ts';
|
|
5
5
|
export interface MailboxCoordinatorOptions {
|
|
6
6
|
store: MailboxStore;
|
|
7
|
-
|
|
8
|
-
streams: StreamManager;
|
|
7
|
+
residency: AgentResidency;
|
|
9
8
|
}
|
|
10
9
|
/** Owns durable mail delivery and the serialized turns that wake recipients. */
|
|
11
10
|
export declare class MailboxCoordinator {
|
|
12
11
|
#private;
|
|
13
12
|
constructor(options: MailboxCoordinatorOptions);
|
|
13
|
+
/**
|
|
14
|
+
* Writes the mail and, in the same admission, the wake it needs. Trigger
|
|
15
|
+
* mail to a sub-agent with no resident slot rejects with
|
|
16
|
+
* `AgentThreadLimitError` and writes nothing.
|
|
17
|
+
*/
|
|
14
18
|
deliver(communication: InterAgentCommunication, mode: MessageDeliveryMode): Promise<void>;
|
|
15
19
|
beginTurn(turn: TurnRef): Promise<void>;
|
|
16
20
|
endTurn(turn: TurnRef, options?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coordinator.d.ts","
|
|
1
|
+
{"version":3,"file":"coordinator.d.ts","sources":["../../../src/zukhruf/mailbox/coordinator.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAEV,cAAc,EACf,MAAM,qCAAqC,CAAC;AAG7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,uBAAuB,EAE5B,KAAK,mBAAmB,EAGzB,MAAM,YAAY,CAAC;AAEpB,MAAM,WAAW,yBAAyB;IACxC,KAAK,EAAE,YAAY,CAAC;IACpB,SAAS,EAAE,cAAc,CAAC;CAC3B;AAID,gFAAgF;AAChF,qBAAa,kBAAkB;;IAI7B,YAAY,OAAO,EAAE,yBAAyB,EAG7C;IAED;;;;OAIG;IACG,OAAO,CACX,aAAa,EAAE,uBAAuB,EACtC,IAAI,EAAE,mBAAmB,GACxB,OAAO,CAAC,IAAI,CAAC,CA+Bf;IAED,SAAS,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAEtC;IAEK,OAAO,CACX,IAAI,EAAE,OAAO,EACb,OAAO,GAAE;QAAE,MAAM,CAAC,EAAE,OAAO,CAAA;KAAO,GACjC,OAAO,CAAC,IAAI,CAAC,CAQf;IAED,qBAAqB,CACnB,SAAS,EAAE,cAAc,GACxB,OAAO,CAAC,uBAAuB,EAAE,CAAC,CAEpC;IAED,KAAK,CAAC,SAAS,EAAE,cAAc,GAAG,OAAO,CAAC,uBAAuB,EAAE,CAAC,CAEnE;IAEK,cAAc,CAClB,SAAS,EAAE,cAAc,EACzB,OAAO,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,WAAW,CAAA;KAAE,GACnD,OAAO,CAAC,OAAO,CAAC,CAWlB;CAiCF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ddl.postgres.d.ts","
|
|
1
|
+
{"version":3,"file":"ddl.postgres.d.ts","sources":["../../../src/zukhruf/mailbox/ddl.postgres.ts"],"names":[],"mappings":"AAAA,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CA0BjD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ddl.sqlite.d.ts","
|
|
1
|
+
{"version":3,"file":"ddl.sqlite.d.ts","sources":["../../../src/zukhruf/mailbox/ddl.sqlite.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,UAAU,UA2BtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postgres.store.d.ts","
|
|
1
|
+
{"version":3,"file":"postgres.store.d.ts","sources":["../../../src/zukhruf/mailbox/postgres.store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC;AAG/B,OAAO,EAEL,KAAK,mBAAmB,EAEzB,MAAM,qBAAqB,CAAC;AAI7B,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,YAAY,EACZ,KAAK,yBAAyB,EAC/B,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;;IAGpD,OAAO,eAGN;IAED,qEAAqE;IACrE,OAAa,MAAM,CACjB,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,oBAAoB,CAAC,CAM/B;IAED;;;;OAIG;IACH,IAAI,CAAC,EAAE,EAAE,mBAAmB,GAAG,yBAAyB,CAEvD;IAmBc,SAAS,CACtB,SAAS,EAAE,cAAc,EACzB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,IAAI,CAAC,CAWf;IAEQ,OAAO,CACd,aAAa,EAAE,uBAAuB,GACrC,OAAO,CAAC,oBAAoB,CAAC,CA4B/B;IAEQ,OAAO,CACd,SAAS,EAAE,cAAc,EACzB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,oBAAoB,CAAC,CAc/B;IAEQ,UAAU,CAAC,SAAS,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,CAE/D;IAEQ,qBAAqB,CAAC,SAAS,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,CAU1E;IAEQ,KAAK,CACZ,SAAS,EAAE,cAAc,GACxB,OAAO,CAAC,uBAAuB,EAAE,CAAC,CAEpC;IAEQ,qBAAqB,CAC5B,SAAS,EAAE,cAAc,GACxB,OAAO,CAAC,uBAAuB,EAAE,CAAC,CAEpC;CAoFF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sqlite.store.d.ts","
|
|
1
|
+
{"version":3,"file":"sqlite.store.d.ts","sources":["../../../src/zukhruf/mailbox/sqlite.store.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAKhD,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;;IAGxE,YAAY,QAAQ,EAAE,MAAM,GAAG,YAAY,EAI1C;IAEc,SAAS,CACtB,SAAS,EAAE,cAAc,EACzB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,IAAI,CAAC,CAkBf;IAEc,OAAO,CACpB,aAAa,EAAE,uBAAuB,GACrC,OAAO,CAAC,oBAAoB,CAAC,CA4B/B;IAEc,OAAO,CACpB,SAAS,EAAE,cAAc,EACzB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,oBAAoB,CAAC,CAmB/B;IAEc,UAAU,CAAC,SAAS,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,CAErE;IAEc,qBAAqB,CAClC,SAAS,EAAE,cAAc,GACxB,OAAO,CAAC,OAAO,CAAC,CAYlB;IAwCc,KAAK,CAClB,SAAS,EAAE,cAAc,GACxB,OAAO,CAAC,uBAAuB,EAAE,CAAC,CAEpC;IAEc,qBAAqB,CAClC,SAAS,EAAE,cAAc,GACxB,OAAO,CAAC,uBAAuB,EAAE,CAAC,CAEpC;IAwDD,KAAK,IAAI,IAAI,CAGZ;IAED,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,IAAI,CAEvB;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","
|
|
1
|
+
{"version":3,"file":"store.d.ts","sources":["../../../src/zukhruf/mailbox/store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAE1E,MAAM,WAAW,oBAAoB;IACnC,eAAe,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,iFAAiF;AACjF,8BAAsB,YAAY;IAChC,QAAQ,CAAC,SAAS,CAAC,SAAS,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE7E,QAAQ,CAAC,OAAO,CACd,aAAa,EAAE,uBAAuB,GACrC,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAEjC,QAAQ,CAAC,OAAO,CACd,SAAS,EAAE,cAAc,EACzB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAEjC,QAAQ,CAAC,UAAU,CAAC,SAAS,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEjE,qGAAqG;IACrG,QAAQ,CAAC,qBAAqB,CAAC,SAAS,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAE5E,oFAAoF;IACpF,QAAQ,CAAC,qBAAqB,CAC5B,SAAS,EAAE,cAAc,GACxB,OAAO,CAAC,uBAAuB,EAAE,CAAC,CAAC;IAEtC,mFAAmF;IACnF,QAAQ,CAAC,KAAK,CAAC,SAAS,EAAE,cAAc,GAAG,OAAO,CAAC,uBAAuB,EAAE,CAAC,CAAC;CAC/E;AAED,yEAAyE;AACzE,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAC1C,YAAY,EACZ,SAAS,GAAG,WAAW,GAAG,uBAAuB,CAClD,CAAC"}
|
|
@@ -4,14 +4,14 @@ export interface ConversationId {
|
|
|
4
4
|
userId: string;
|
|
5
5
|
}
|
|
6
6
|
export declare const MessageDeliveryModes: {
|
|
7
|
-
readonly QueueOnly:
|
|
8
|
-
readonly TriggerTurn:
|
|
7
|
+
readonly QueueOnly: 'queue-only';
|
|
8
|
+
readonly TriggerTurn: 'trigger-turn';
|
|
9
9
|
};
|
|
10
10
|
export type MessageDeliveryMode = (typeof MessageDeliveryModes)[keyof typeof MessageDeliveryModes];
|
|
11
11
|
export declare const InterAgentCommunicationTypes: {
|
|
12
|
-
readonly Message:
|
|
13
|
-
readonly NewTask:
|
|
14
|
-
readonly FinalAnswer:
|
|
12
|
+
readonly Message: 'MESSAGE';
|
|
13
|
+
readonly NewTask: 'NEW_TASK';
|
|
14
|
+
readonly FinalAnswer: 'FINAL_ANSWER';
|
|
15
15
|
};
|
|
16
16
|
export type InterAgentCommunicationType = (typeof InterAgentCommunicationTypes)[keyof typeof InterAgentCommunicationTypes];
|
|
17
17
|
/** A model-visible message sent from one independent agent thread to another. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","
|
|
1
|
+
{"version":3,"file":"types.d.ts","sources":["../../../src/zukhruf/mailbox/types.ts"],"names":[],"mappings":"AAEA,sEAAsE;AACtE,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,oBAAoB;aAC/B,SAAS,EAAE,YAAY;aACvB,WAAW,EAAE,cAAc;CACnB,CAAC;AAEX,MAAM,MAAM,mBAAmB,GAC7B,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,OAAO,oBAAoB,CAAC,CAAC;AAEnE,eAAO,MAAM,4BAA4B;aACvC,OAAO,EAAE,SAAS;aAClB,OAAO,EAAE,UAAU;aACnB,WAAW,EAAE,cAAc;CACnB,CAAC;AAEX,MAAM,MAAM,2BAA2B,GACrC,CAAC,OAAO,4BAA4B,CAAC,CAAC,MAAM,OAAO,4BAA4B,CAAC,CAAC;AAEnF,iFAAiF;AACjF,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,2BAA2B,CAAC;IAClC,MAAM,EAAE,cAAc,CAAC;IACvB,SAAS,EAAE,cAAc,CAAC;IAC1B,eAAe,EAAE,cAAc,EAAE,CAAC;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,MAAM,0BAA0B,GAAG,IAAI,CAC3C,uBAAuB,EACvB,IAAI,GAAG,iBAAiB,GAAG,aAAa,GAAG,MAAM,CAClD,GAAG;IACF,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,eAAe,CAAC,EAAE,cAAc,EAAE,CAAC;IACnC,IAAI,CAAC,EAAE,2BAA2B,CAAC;CACpC,CAAC;AAEF,wBAAgB,6BAA6B,CAC3C,aAAa,EAAE,0BAA0B,GACxC,uBAAuB,CAUzB;AAED,wBAAgB,mBAAmB,CACjC,aAAa,EAAE,uBAAuB,GACrC,IAAI,CAiBN"}
|
|
@@ -23,8 +23,8 @@ declare const schedulingStateSchema: z.ZodObject<{
|
|
|
23
23
|
}, z.core.$strict>>;
|
|
24
24
|
dispatching: z.ZodOptional<z.ZodObject<{
|
|
25
25
|
kind: z.ZodEnum<{
|
|
26
|
-
dynamic: "dynamic";
|
|
27
26
|
cron: "cron";
|
|
27
|
+
dynamic: "dynamic";
|
|
28
28
|
}>;
|
|
29
29
|
definitionId: z.ZodOptional<z.ZodUUID>;
|
|
30
30
|
generation: z.ZodNumber;
|
|
@@ -74,7 +74,7 @@ export declare class ConversationScheduler {
|
|
|
74
74
|
wasClamped: boolean;
|
|
75
75
|
}>;
|
|
76
76
|
stopDynamic(conversation: ConversationId): Promise<number>;
|
|
77
|
-
work(
|
|
77
|
+
work(): Promise<AsyncDisposable>;
|
|
78
78
|
materializeDueIfEligible(conversation: ConversationId): Promise<void>;
|
|
79
79
|
}
|
|
80
80
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation-scheduler.d.ts","
|
|
1
|
+
{"version":3,"file":"conversation-scheduler.d.ts","sources":["../../../../src/zukhruf/plugins/conversation-scheduling/conversation-scheduler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,KAAK,EAAQ,aAAa,EAAE,MAAM,qBAAqB,CAAC;AA0C/D,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA0BvB,CAAC;AAEL,KAAK,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAC7D,KAAK,cAAc,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;AAGtD,MAAM,WAAW,cAAc;IAC7B,YAAY,EAAE,cAAc,CAAC;IAC7B,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACtB;AAsBD,UAAU,4BAA4B;IACpC,SAAS,EAAE,aAAa,CAAC,cAAc,CAAC,CAAC;IACzC,IAAI,EAAE,eAAe,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE;QAAE,IAAI,EAAE;YAAE,GAAG,IAAI,MAAM,CAAA;SAAE,CAAA;KAAE,CAAC;CACpC;AAED,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,sEAAsE;AACtE,qBAAa,qBAAqB;;IAIhC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAE1B,YAAY,OAAO,EAAE,4BAA4B,EAKhD;IAEK,UAAU,CACd,YAAY,EAAE,cAAc,EAC5B,KAAK,EAAE,eAAe,EACtB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,cAAc,CAAC,CA0DzB;IAEK,QAAQ,CAAC,YAAY,EAAE,cAAc,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,CAKtE;IAEK,UAAU,CAAC,YAAY,EAAE,cAAc,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAexE;IAEK,eAAe,CACnB,YAAY,EAAE,cAAc,EAC5B,KAAK,EAAE;QAAE,YAAY,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,GAC9D,OAAO,CAAC;QACT,YAAY,EAAE,MAAM,CAAC;QACrB,mBAAmB,EAAE,MAAM,CAAC;QAC5B,UAAU,EAAE,OAAO,CAAC;KACrB,CAAC,CAiCD;IAEK,WAAW,CAAC,YAAY,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAgB/D;IAEK,IAAI,IAAI,OAAO,CAAC,eAAe,CAAC,CAErC;IAEK,wBAAwB,CAAC,YAAY,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CA2B1E;CAwUF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","
|
|
1
|
+
{"version":3,"file":"index.d.ts","sources":["../../../../src/zukhruf/plugins/conversation-scheduling/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,KAAK,qBAAqB,EAC3B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,6BAA6B,CAAC;AAErC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,YAAY,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAElE,eAAO,MAAM,kCAAkC;aAC7C,SAAS;aAGT,QAAQ;IAGR,iEAAiE;aACjE,KAAK;cAAoC;YAAE,GAAG,IAAI,MAAM,CAAA;SAAE;;CAGlD,CAAC;AAEX,+EAA+E;AAC/E,wBAAgB,sBAAsB,IAAI,qBAAqB,CAkC9D"}
|
|
@@ -1,42 +1,184 @@
|
|
|
1
1
|
// packages/experimental/src/zukhruf/runtime/agent-runtime.ts
|
|
2
2
|
import {
|
|
3
|
-
ContextEngine as
|
|
3
|
+
ContextEngine as ContextEngine6
|
|
4
4
|
} from "@deepagents/context";
|
|
5
5
|
|
|
6
|
+
// packages/experimental/src/zukhruf/collaboration/message-tools.ts
|
|
7
|
+
import { tool } from "ai";
|
|
8
|
+
import { z } from "zod";
|
|
9
|
+
var agentMessageInputSchema = z.object({
|
|
10
|
+
target: z.string().trim().min(1).describe(
|
|
11
|
+
"The canonical /root/... path, or a descendant-relative target name."
|
|
12
|
+
),
|
|
13
|
+
message: z.string().trim().min(1).describe("The message or follow-up task.")
|
|
14
|
+
});
|
|
15
|
+
var sendMessageTool = tool({
|
|
16
|
+
description: "Queue a message for another agent. Address siblings with their canonical /root/... path.",
|
|
17
|
+
inputSchema: agentMessageInputSchema,
|
|
18
|
+
execute: async (input, { context }) => {
|
|
19
|
+
await context.controlPlane.sendMessage(context.actor, input);
|
|
20
|
+
return "";
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
var followupTaskTool = tool({
|
|
24
|
+
description: "Send a follow-up task to an existing non-root agent and wake its thread.",
|
|
25
|
+
inputSchema: agentMessageInputSchema,
|
|
26
|
+
execute: async (input, { context }) => {
|
|
27
|
+
await context.controlPlane.followupTask(context.actor, input);
|
|
28
|
+
return "";
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
// packages/experimental/src/zukhruf/collaboration/spawn-agent.ts
|
|
33
|
+
import { tool as tool2 } from "ai";
|
|
34
|
+
import { z as z2 } from "zod";
|
|
35
|
+
|
|
36
|
+
// packages/experimental/src/zukhruf/control-plane/fork-turns.ts
|
|
37
|
+
var forkTurnsError = "fork_turns must be `none` or `all`";
|
|
38
|
+
function parseForkTurns(value) {
|
|
39
|
+
const normalized = value?.trim().toLowerCase() || "all";
|
|
40
|
+
return normalized === "none" || normalized === "all" ? normalized : void 0;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// packages/experimental/src/zukhruf/collaboration/spawn-agent.ts
|
|
44
|
+
var spawnAgentInputSchema = z2.object({
|
|
45
|
+
agent_type: z2.string().trim().min(1).describe("The name of one available subagent declaration."),
|
|
46
|
+
task_name: z2.string().trim().min(1).refine(
|
|
47
|
+
(value) => value !== "." && value !== ".." && !value.includes("/"),
|
|
48
|
+
"task_name must be one non-empty path segment"
|
|
49
|
+
).describe("One path segment naming this independent agent task."),
|
|
50
|
+
message: z2.string().refine((value) => value.trim().length > 0, "message cannot be empty").describe("The initial task for the spawned agent."),
|
|
51
|
+
fork_turns: z2.string({ error: forkTurnsError }).optional().refine((value) => parseForkTurns(value) !== void 0, forkTurnsError).describe(
|
|
52
|
+
"Parent history to inherit. Defaults to `all`; use `none` to start without parent history. Only `all` and `none` are supported."
|
|
53
|
+
)
|
|
54
|
+
});
|
|
55
|
+
var spawnAgentOutputSchema = z2.object({ task_name: z2.string() }).strict();
|
|
56
|
+
|
|
57
|
+
// packages/experimental/src/zukhruf/collaboration/interrupt-agent.ts
|
|
58
|
+
import { tool as tool3 } from "ai";
|
|
59
|
+
import { z as z4 } from "zod";
|
|
60
|
+
|
|
61
|
+
// packages/experimental/src/zukhruf/control-plane/agent-status-projector.ts
|
|
62
|
+
import { isTextUIPart } from "ai";
|
|
63
|
+
import { z as z3 } from "zod";
|
|
64
|
+
import {
|
|
65
|
+
ContextEngine
|
|
66
|
+
} from "@deepagents/context";
|
|
67
|
+
var listedAgentStatusSchema = z3.union([
|
|
68
|
+
z3.enum(["pending_init", "running", "interrupted", "shutdown", "not_found"]),
|
|
69
|
+
z3.object({ completed: z3.string().nullable() }).strict(),
|
|
70
|
+
z3.object({ errored: z3.string() }).strict()
|
|
71
|
+
]);
|
|
72
|
+
var listedAgentSchema = z3.object({
|
|
73
|
+
agent_name: z3.string(),
|
|
74
|
+
agent_status: listedAgentStatusSchema
|
|
75
|
+
}).strict();
|
|
76
|
+
|
|
77
|
+
// packages/experimental/src/zukhruf/collaboration/interrupt-agent.ts
|
|
78
|
+
var interruptAgentInputSchema = z4.object({
|
|
79
|
+
target: z4.string().trim().min(1).describe(
|
|
80
|
+
"The canonical /root/... path, or a descendant-relative target name."
|
|
81
|
+
)
|
|
82
|
+
});
|
|
83
|
+
var interruptAgentOutputSchema = z4.object({ previous_status: listedAgentStatusSchema }).strict();
|
|
84
|
+
var interruptAgentTool = tool3({
|
|
85
|
+
description: "Interrupt an agent's current turn, if any, and return its previous status. The agent remains available for messages and follow-up tasks.",
|
|
86
|
+
inputSchema: interruptAgentInputSchema,
|
|
87
|
+
outputSchema: interruptAgentOutputSchema,
|
|
88
|
+
execute: async (input, { context }) => context.controlPlane.interruptAgent(context.actor, input)
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
// packages/experimental/src/zukhruf/collaboration/list-agents.ts
|
|
92
|
+
import { tool as tool4 } from "ai";
|
|
93
|
+
import { z as z5 } from "zod";
|
|
94
|
+
var listAgentsInputSchema = z5.object({
|
|
95
|
+
path_prefix: z5.string().trim().min(1).describe(
|
|
96
|
+
"Task-path prefix without a trailing slash. Omit to list the whole tree."
|
|
97
|
+
).optional()
|
|
98
|
+
});
|
|
99
|
+
var listAgentsOutputSchema = z5.object({ agents: z5.array(listedAgentSchema) }).strict();
|
|
100
|
+
var listAgentsTool = tool4({
|
|
101
|
+
description: "List live agents in the current root thread tree. Optionally filter by task-path prefix.",
|
|
102
|
+
inputSchema: listAgentsInputSchema,
|
|
103
|
+
outputSchema: listAgentsOutputSchema,
|
|
104
|
+
execute: async ({ path_prefix }, { context }) => context.controlPlane.listAgents(context.actor, path_prefix)
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
// packages/experimental/src/zukhruf/collaboration/wait-agent.ts
|
|
108
|
+
import { tool as tool5 } from "ai";
|
|
109
|
+
import { z as z6 } from "zod";
|
|
110
|
+
var waitAgentOutputSchema = z6.object({ message: z6.string(), timed_out: z6.boolean() }).strict();
|
|
111
|
+
|
|
112
|
+
// packages/experimental/src/zukhruf/collaboration/team.ts
|
|
113
|
+
var USE_CLAUSES = new Intl.ListFormat("en", { type: "conjunction" });
|
|
114
|
+
|
|
6
115
|
// packages/experimental/src/zukhruf/control-plane/agent-control-plane.ts
|
|
7
116
|
import { v5 as uuidv54 } from "uuid";
|
|
8
117
|
|
|
118
|
+
// packages/experimental/src/zukhruf/runtime/conversation-status/projector.ts
|
|
119
|
+
import { Future, Latch } from "@zukhruf/async";
|
|
120
|
+
import { Mutex } from "@zukhruf/mutex";
|
|
121
|
+
import { MemoryStore } from "@zukhruf/mutex/memory";
|
|
122
|
+
import {
|
|
123
|
+
ContextEngine as ContextEngine3
|
|
124
|
+
} from "@deepagents/context";
|
|
125
|
+
|
|
126
|
+
// packages/experimental/src/zukhruf/runtime/approval-controller.ts
|
|
127
|
+
import {
|
|
128
|
+
getToolName,
|
|
129
|
+
isToolUIPart
|
|
130
|
+
} from "ai";
|
|
131
|
+
import {
|
|
132
|
+
ContextEngine as ContextEngine2,
|
|
133
|
+
assistant
|
|
134
|
+
} from "@deepagents/context";
|
|
135
|
+
|
|
136
|
+
// packages/experimental/src/zukhruf/runtime/conversation-status/child-progress.ts
|
|
137
|
+
import { z as z7 } from "zod";
|
|
138
|
+
var childActivitySchema = z7.object({
|
|
139
|
+
id: z7.string(),
|
|
140
|
+
type: z7.enum(["spawn", "message", "followup", "interrupt", "completion"]),
|
|
141
|
+
at: z7.number(),
|
|
142
|
+
actorPath: z7.string(),
|
|
143
|
+
targetPath: z7.string(),
|
|
144
|
+
streamId: z7.string(),
|
|
145
|
+
outcome: z7.enum(["completed", "failed", "cancelled"]).optional()
|
|
146
|
+
});
|
|
147
|
+
var childActivitiesSchema = z7.partialRecord(
|
|
148
|
+
childActivitySchema.shape.type,
|
|
149
|
+
childActivitySchema
|
|
150
|
+
);
|
|
151
|
+
var childActivityMetadataSchema = z7.looseObject({
|
|
152
|
+
childActivities: childActivitiesSchema.default({})
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
// packages/experimental/src/zukhruf/runtime/conversation-status/projector.ts
|
|
156
|
+
var Detached = class {
|
|
157
|
+
// A private member keeps the type nominal: an empty class would also
|
|
158
|
+
// describe RemoteAttachment, and `instanceof` could not narrow the union.
|
|
159
|
+
#detached = true;
|
|
160
|
+
};
|
|
161
|
+
var DETACHED = new Detached();
|
|
162
|
+
|
|
9
163
|
// packages/experimental/src/zukhruf/control-plane/agent-directory.ts
|
|
10
164
|
import { v5 as uuidv5 } from "uuid";
|
|
11
165
|
|
|
166
|
+
// packages/experimental/src/zukhruf/control-plane/agent-thread.ts
|
|
167
|
+
import { isRecord } from "@deepagents/context";
|
|
168
|
+
|
|
12
169
|
// packages/experimental/src/zukhruf/control-plane/agent-history-forker.ts
|
|
13
170
|
import { validateUIMessages } from "ai";
|
|
14
171
|
import { v5 as uuidv52 } from "uuid";
|
|
15
172
|
import {
|
|
173
|
+
isRecord as isRecord2,
|
|
16
174
|
isSyntheticReminderMessage
|
|
17
175
|
} from "@deepagents/context";
|
|
18
176
|
|
|
19
|
-
// packages/experimental/src/zukhruf/control-plane/agent-status-projector.ts
|
|
20
|
-
import { isTextUIPart } from "ai";
|
|
21
|
-
import { z } from "zod";
|
|
22
|
-
import {
|
|
23
|
-
ContextEngine
|
|
24
|
-
} from "@deepagents/context";
|
|
25
|
-
var listedAgentStatusSchema = z.union([
|
|
26
|
-
z.enum(["pending_init", "running", "interrupted", "shutdown", "not_found"]),
|
|
27
|
-
z.object({ completed: z.string().nullable() }).strict(),
|
|
28
|
-
z.object({ errored: z.string() }).strict()
|
|
29
|
-
]);
|
|
30
|
-
var listedAgentSchema = z.object({
|
|
31
|
-
agent_name: z.string(),
|
|
32
|
-
agent_status: listedAgentStatusSchema
|
|
33
|
-
}).strict();
|
|
34
|
-
|
|
35
177
|
// packages/experimental/src/zukhruf/control-plane/agent-turn-id.ts
|
|
36
178
|
import { v5 as uuidv53, validate as validateUuid } from "uuid";
|
|
37
|
-
import { z as
|
|
179
|
+
import { z as z8 } from "zod";
|
|
38
180
|
var prefix = "zukhruf-turn";
|
|
39
|
-
var agentTurnIdSchema =
|
|
181
|
+
var agentTurnIdSchema = z8.string().refine((value) => {
|
|
40
182
|
const [head, scope, turn, ...rest] = value.split(":");
|
|
41
183
|
return head === prefix && rest.length === 0 && validateUuid(scope) && validateUuid(turn);
|
|
42
184
|
});
|
|
@@ -50,20 +192,25 @@ function conversationNamespace(conversation) {
|
|
|
50
192
|
);
|
|
51
193
|
}
|
|
52
194
|
|
|
195
|
+
// packages/experimental/src/zukhruf/control-plane/agent-residency.ts
|
|
196
|
+
import {
|
|
197
|
+
ContextEngine as ContextEngine4
|
|
198
|
+
} from "@deepagents/context";
|
|
199
|
+
|
|
53
200
|
// packages/experimental/src/zukhruf/mailbox/coordinator.ts
|
|
54
201
|
import pMemoize from "p-memoize";
|
|
55
202
|
|
|
56
203
|
// packages/experimental/src/zukhruf/runtime/agent-turn-executor.ts
|
|
57
|
-
import { experimental_codeModeTool } from "@ai-sdk/code-mode";
|
|
58
204
|
import {
|
|
59
205
|
jsonSchema,
|
|
60
|
-
tool
|
|
206
|
+
tool as tool6
|
|
61
207
|
} from "ai";
|
|
62
208
|
import {
|
|
63
|
-
ContextEngine as
|
|
209
|
+
ContextEngine as ContextEngine5,
|
|
64
210
|
agent,
|
|
65
|
-
assistant,
|
|
211
|
+
assistant as assistant2,
|
|
66
212
|
chat,
|
|
213
|
+
isRecord as isRecord4,
|
|
67
214
|
role,
|
|
68
215
|
user
|
|
69
216
|
} from "@deepagents/context";
|
|
@@ -78,7 +225,7 @@ import {
|
|
|
78
225
|
asSchema,
|
|
79
226
|
modelMessageSchema as modelMessageSchema2
|
|
80
227
|
} from "ai";
|
|
81
|
-
import { z as
|
|
228
|
+
import { z as z9 } from "zod";
|
|
82
229
|
|
|
83
230
|
// packages/compaction/dist/index.js
|
|
84
231
|
import {
|
|
@@ -87,21 +234,24 @@ import {
|
|
|
87
234
|
} from "ai";
|
|
88
235
|
|
|
89
236
|
// packages/experimental/src/zukhruf/runtime/compaction.ts
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
237
|
+
import {
|
|
238
|
+
isRecord as isRecord3
|
|
239
|
+
} from "@deepagents/context";
|
|
240
|
+
var checkpointSchema = z9.object({
|
|
241
|
+
sourceCount: z9.number().int().positive(),
|
|
242
|
+
sourceHash: z9.string(),
|
|
243
|
+
replacement: z9.array(z9.unknown()).transform(
|
|
94
244
|
(messages) => messages.map((message) => modelMessageSchema2.parse(message))
|
|
95
245
|
)
|
|
96
246
|
});
|
|
97
|
-
var cacheObservationSchema =
|
|
98
|
-
scope:
|
|
99
|
-
prefixLength:
|
|
100
|
-
prefixHash:
|
|
101
|
-
startedAt:
|
|
102
|
-
retentionMs:
|
|
247
|
+
var cacheObservationSchema = z9.object({
|
|
248
|
+
scope: z9.string(),
|
|
249
|
+
prefixLength: z9.number().int().nonnegative(),
|
|
250
|
+
prefixHash: z9.string(),
|
|
251
|
+
startedAt: z9.number().int().nonnegative(),
|
|
252
|
+
retentionMs: z9.number().int().positive().optional()
|
|
103
253
|
});
|
|
104
|
-
var inputUsageSchema = cacheObservationSchema.pick({ scope: true, prefixLength: true, prefixHash: true }).extend({ inputTokens:
|
|
254
|
+
var inputUsageSchema = cacheObservationSchema.pick({ scope: true, prefixLength: true, prefixHash: true }).extend({ inputTokens: z9.number().int().nonnegative() });
|
|
105
255
|
|
|
106
256
|
// packages/experimental/src/zukhruf/runtime/plugin/agent-skills.ts
|
|
107
257
|
import {
|
|
@@ -109,142 +259,6 @@ import {
|
|
|
109
259
|
skills
|
|
110
260
|
} from "@deepagents/context";
|
|
111
261
|
|
|
112
|
-
// packages/experimental/src/zukhruf/runtime/approval-controller.ts
|
|
113
|
-
import {
|
|
114
|
-
getToolName,
|
|
115
|
-
isToolUIPart
|
|
116
|
-
} from "ai";
|
|
117
|
-
import {
|
|
118
|
-
ContextEngine as ContextEngine3,
|
|
119
|
-
assistant as assistant2
|
|
120
|
-
} from "@deepagents/context";
|
|
121
|
-
|
|
122
|
-
// packages/experimental/src/zukhruf/runtime/conversation-status/projector.ts
|
|
123
|
-
import { Future, Latch } from "@zukhruf/async";
|
|
124
|
-
import { Mutex } from "@zukhruf/mutex";
|
|
125
|
-
import { MemoryStore } from "@zukhruf/mutex/memory";
|
|
126
|
-
import {
|
|
127
|
-
ContextEngine as ContextEngine4
|
|
128
|
-
} from "@deepagents/context";
|
|
129
|
-
|
|
130
|
-
// packages/experimental/src/zukhruf/runtime/conversation-status/child-progress.ts
|
|
131
|
-
import { z as z4 } from "zod";
|
|
132
|
-
var childActivitySchema = z4.object({
|
|
133
|
-
id: z4.string(),
|
|
134
|
-
type: z4.enum(["spawn", "message", "followup", "interrupt", "completion"]),
|
|
135
|
-
at: z4.number(),
|
|
136
|
-
actorPath: z4.string(),
|
|
137
|
-
targetPath: z4.string(),
|
|
138
|
-
streamId: z4.string(),
|
|
139
|
-
outcome: z4.enum(["completed", "failed", "cancelled"]).optional()
|
|
140
|
-
});
|
|
141
|
-
var childActivitiesSchema = z4.partialRecord(
|
|
142
|
-
childActivitySchema.shape.type,
|
|
143
|
-
childActivitySchema
|
|
144
|
-
);
|
|
145
|
-
var childActivityMetadataSchema = z4.looseObject({
|
|
146
|
-
childActivities: childActivitiesSchema.default({})
|
|
147
|
-
});
|
|
148
|
-
|
|
149
|
-
// packages/experimental/src/zukhruf/runtime/conversation-status/projector.ts
|
|
150
|
-
var Detached = class {
|
|
151
|
-
// A private member keeps the type nominal: an empty class would also
|
|
152
|
-
// describe RemoteAttachment, and `instanceof` could not narrow the union.
|
|
153
|
-
#detached = true;
|
|
154
|
-
};
|
|
155
|
-
var DETACHED = new Detached();
|
|
156
|
-
|
|
157
|
-
// packages/experimental/src/zukhruf/collaboration/interrupt-agent.ts
|
|
158
|
-
import { tool as tool2 } from "ai";
|
|
159
|
-
import { z as z5 } from "zod";
|
|
160
|
-
var interruptAgentInputSchema = z5.object({
|
|
161
|
-
target: z5.string().trim().min(1).describe(
|
|
162
|
-
"The canonical /root/... path, or a descendant-relative target name."
|
|
163
|
-
)
|
|
164
|
-
});
|
|
165
|
-
var interruptAgentOutputSchema = z5.object({ previous_status: listedAgentStatusSchema }).strict();
|
|
166
|
-
var interruptAgentTool = tool2({
|
|
167
|
-
description: "Interrupt an agent's current turn, if any, and return its previous status. The agent remains available for messages and follow-up tasks.",
|
|
168
|
-
inputSchema: interruptAgentInputSchema,
|
|
169
|
-
outputSchema: interruptAgentOutputSchema,
|
|
170
|
-
execute: async (input, { context }) => context.controlPlane.interruptAgent(context.actor, input)
|
|
171
|
-
});
|
|
172
|
-
|
|
173
|
-
// packages/experimental/src/zukhruf/collaboration/list-agents.ts
|
|
174
|
-
import { tool as tool3 } from "ai";
|
|
175
|
-
import { z as z6 } from "zod";
|
|
176
|
-
var listAgentsInputSchema = z6.object({
|
|
177
|
-
path_prefix: z6.string().trim().min(1).describe(
|
|
178
|
-
"Task-path prefix without a trailing slash. Omit to list the whole tree."
|
|
179
|
-
).optional()
|
|
180
|
-
});
|
|
181
|
-
var listAgentsOutputSchema = z6.object({ agents: z6.array(listedAgentSchema) }).strict();
|
|
182
|
-
var listAgentsTool = tool3({
|
|
183
|
-
description: "List live agents in the current root thread tree. Optionally filter by task-path prefix.",
|
|
184
|
-
inputSchema: listAgentsInputSchema,
|
|
185
|
-
outputSchema: listAgentsOutputSchema,
|
|
186
|
-
execute: async ({ path_prefix }, { context }) => context.controlPlane.listAgents(context.actor, path_prefix)
|
|
187
|
-
});
|
|
188
|
-
|
|
189
|
-
// packages/experimental/src/zukhruf/collaboration/message-tools.ts
|
|
190
|
-
import { tool as tool4 } from "ai";
|
|
191
|
-
import { z as z7 } from "zod";
|
|
192
|
-
var agentMessageInputSchema = z7.object({
|
|
193
|
-
target: z7.string().trim().min(1).describe(
|
|
194
|
-
"The canonical /root/... path, or a descendant-relative target name."
|
|
195
|
-
),
|
|
196
|
-
message: z7.string().trim().min(1).describe("The message or follow-up task.")
|
|
197
|
-
});
|
|
198
|
-
var sendMessageTool = tool4({
|
|
199
|
-
description: "Queue a message for another agent. Address siblings with their canonical /root/... path.",
|
|
200
|
-
inputSchema: agentMessageInputSchema,
|
|
201
|
-
execute: async (input, { context }) => {
|
|
202
|
-
await context.controlPlane.sendMessage(context.actor, input);
|
|
203
|
-
return "";
|
|
204
|
-
}
|
|
205
|
-
});
|
|
206
|
-
var followupTaskTool = tool4({
|
|
207
|
-
description: "Send a follow-up task to an existing non-root agent and wake its thread.",
|
|
208
|
-
inputSchema: agentMessageInputSchema,
|
|
209
|
-
execute: async (input, { context }) => {
|
|
210
|
-
await context.controlPlane.followupTask(context.actor, input);
|
|
211
|
-
return "";
|
|
212
|
-
}
|
|
213
|
-
});
|
|
214
|
-
|
|
215
|
-
// packages/experimental/src/zukhruf/collaboration/spawn-agent.ts
|
|
216
|
-
import { tool as tool5 } from "ai";
|
|
217
|
-
import { z as z8 } from "zod";
|
|
218
|
-
|
|
219
|
-
// packages/experimental/src/zukhruf/control-plane/fork-turns.ts
|
|
220
|
-
var forkTurnsError = "fork_turns must be `none`, `all`, or a positive integer string";
|
|
221
|
-
function parseForkTurns(value) {
|
|
222
|
-
const normalized = value.trim().toLowerCase();
|
|
223
|
-
if (normalized === "none" || normalized === "all") return normalized;
|
|
224
|
-
if (!/^\d+$/.test(normalized)) return void 0;
|
|
225
|
-
const turns = Number(normalized);
|
|
226
|
-
return Number.isSafeInteger(turns) && turns > 0 ? turns : void 0;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
// packages/experimental/src/zukhruf/collaboration/spawn-agent.ts
|
|
230
|
-
var spawnAgentInputSchema = z8.object({
|
|
231
|
-
agent_type: z8.string().trim().min(1).describe("The name of one available subagent declaration."),
|
|
232
|
-
task_name: z8.string().trim().min(1).refine(
|
|
233
|
-
(value) => value !== "." && value !== ".." && !value.includes("/"),
|
|
234
|
-
"task_name must be one non-empty path segment"
|
|
235
|
-
).describe("One path segment naming this independent agent task."),
|
|
236
|
-
message: z8.string().refine((value) => value.trim().length > 0, "message cannot be empty").describe("The initial task for the spawned agent."),
|
|
237
|
-
fork_turns: z8.string().trim().refine((value) => parseForkTurns(value) !== void 0, forkTurnsError).describe(
|
|
238
|
-
"Required number of parent turns to fork. Use `none`, `all`, or a positive integer string such as `3`."
|
|
239
|
-
)
|
|
240
|
-
});
|
|
241
|
-
var spawnAgentOutputSchema = z8.object({ task_name: z8.string() }).strict();
|
|
242
|
-
|
|
243
|
-
// packages/experimental/src/zukhruf/collaboration/wait-agent.ts
|
|
244
|
-
import { tool as tool6 } from "ai";
|
|
245
|
-
import { z as z9 } from "zod";
|
|
246
|
-
var waitAgentOutputSchema = z9.object({ message: z9.string(), timed_out: z9.boolean() }).strict();
|
|
247
|
-
|
|
248
262
|
// packages/experimental/src/zukhruf/runtime/plugin/plugin-agents.ts
|
|
249
263
|
import { parseFrontmatter as parseFrontmatter2, role as role2 } from "@deepagents/context";
|
|
250
264
|
|
|
@@ -277,7 +291,7 @@ var AgentPluginCapability = class {
|
|
|
277
291
|
import { CronExpressionParser } from "cron-parser";
|
|
278
292
|
import { v5 as uuidv55 } from "uuid";
|
|
279
293
|
import { z as z10 } from "zod";
|
|
280
|
-
import { isRecord } from "@deepagents/context";
|
|
294
|
+
import { isRecord as isRecord5 } from "@deepagents/context";
|
|
281
295
|
var DAY_MS = 24 * 60 * 60 * 1e3;
|
|
282
296
|
var CRON_LIFETIME_MS = 7 * DAY_MS;
|
|
283
297
|
var MAX_CRON_JOBS = 50;
|
|
@@ -475,8 +489,8 @@ var ConversationScheduler = class _ConversationScheduler {
|
|
|
475
489
|
}
|
|
476
490
|
return 1;
|
|
477
491
|
}
|
|
478
|
-
async work(
|
|
479
|
-
return this.#scheduler.consume((wake) => this.#handle(wake)
|
|
492
|
+
async work() {
|
|
493
|
+
return this.#scheduler.consume((wake) => this.#handle(wake));
|
|
480
494
|
}
|
|
481
495
|
async materializeDueIfEligible(conversation) {
|
|
482
496
|
if (!await this.#host.isConversationAvailable(conversation)) return;
|
|
@@ -724,7 +738,7 @@ var ConversationScheduler = class _ConversationScheduler {
|
|
|
724
738
|
return parsed.data;
|
|
725
739
|
}
|
|
726
740
|
static #record(value) {
|
|
727
|
-
if (!
|
|
741
|
+
if (!isRecord5(value)) {
|
|
728
742
|
throw new Error("Invalid metadata.zukhruf state");
|
|
729
743
|
}
|
|
730
744
|
return value;
|
|
@@ -961,7 +975,7 @@ var PgBossWakeScheduler = class extends WakeScheduler {
|
|
|
961
975
|
if (!id.trim()) throw new Error("WakeScheduler wake id cannot be empty");
|
|
962
976
|
await this.#boss.cancel(this.#queue, id);
|
|
963
977
|
}
|
|
964
|
-
async consume(handler
|
|
978
|
+
async consume(handler) {
|
|
965
979
|
const workerId = await this.#boss.work(
|
|
966
980
|
this.#queue,
|
|
967
981
|
{
|
|
@@ -978,7 +992,7 @@ var PgBossWakeScheduler = class extends WakeScheduler {
|
|
|
978
992
|
}
|
|
979
993
|
);
|
|
980
994
|
return {
|
|
981
|
-
[Symbol.asyncDispose]: () => this.#boss.offWork(this.#queue, { id: workerId, wait:
|
|
995
|
+
[Symbol.asyncDispose]: () => this.#boss.offWork(this.#queue, { id: workerId, wait: true })
|
|
982
996
|
};
|
|
983
997
|
}
|
|
984
998
|
};
|
|
@@ -1022,7 +1036,7 @@ function conversationScheduling() {
|
|
|
1022
1036
|
});
|
|
1023
1037
|
return {
|
|
1024
1038
|
tools: createSchedulingTools(conversationScheduler),
|
|
1025
|
-
work: (
|
|
1039
|
+
work: () => conversationScheduler.work(),
|
|
1026
1040
|
conversationAvailable: (conversation) => conversationScheduler.materializeDueIfEligible(conversation)
|
|
1027
1041
|
};
|
|
1028
1042
|
}
|