@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
|
@@ -4,61 +4,208 @@ import { z as z12 } from "zod";
|
|
|
4
4
|
|
|
5
5
|
// packages/experimental/src/zukhruf/runtime/agent-runtime.ts
|
|
6
6
|
import {
|
|
7
|
-
ContextEngine as
|
|
7
|
+
ContextEngine as ContextEngine6
|
|
8
8
|
} from "@deepagents/context";
|
|
9
9
|
|
|
10
|
+
// packages/experimental/src/zukhruf/collaboration/message-tools.ts
|
|
11
|
+
import { tool } from "ai";
|
|
12
|
+
import { z } from "zod";
|
|
13
|
+
var agentMessageInputSchema = z.object({
|
|
14
|
+
target: z.string().trim().min(1).describe(
|
|
15
|
+
"The canonical /root/... path, or a descendant-relative target name."
|
|
16
|
+
),
|
|
17
|
+
message: z.string().trim().min(1).describe("The message or follow-up task.")
|
|
18
|
+
});
|
|
19
|
+
var sendMessageTool = tool({
|
|
20
|
+
description: "Queue a message for another agent. Address siblings with their canonical /root/... path.",
|
|
21
|
+
inputSchema: agentMessageInputSchema,
|
|
22
|
+
execute: async (input, { context }) => {
|
|
23
|
+
await context.controlPlane.sendMessage(context.actor, input);
|
|
24
|
+
return "";
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
var followupTaskTool = tool({
|
|
28
|
+
description: "Send a follow-up task to an existing non-root agent and wake its thread.",
|
|
29
|
+
inputSchema: agentMessageInputSchema,
|
|
30
|
+
execute: async (input, { context }) => {
|
|
31
|
+
await context.controlPlane.followupTask(context.actor, input);
|
|
32
|
+
return "";
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
// packages/experimental/src/zukhruf/collaboration/spawn-agent.ts
|
|
37
|
+
import { tool as tool2 } from "ai";
|
|
38
|
+
import { z as z2 } from "zod";
|
|
39
|
+
|
|
40
|
+
// packages/experimental/src/zukhruf/control-plane/fork-turns.ts
|
|
41
|
+
var forkTurnsError = "fork_turns must be `none` or `all`";
|
|
42
|
+
function parseForkTurns(value) {
|
|
43
|
+
const normalized = value?.trim().toLowerCase() || "all";
|
|
44
|
+
return normalized === "none" || normalized === "all" ? normalized : void 0;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// packages/experimental/src/zukhruf/collaboration/spawn-agent.ts
|
|
48
|
+
var spawnAgentInputSchema = z2.object({
|
|
49
|
+
agent_type: z2.string().trim().min(1).describe("The name of one available subagent declaration."),
|
|
50
|
+
task_name: z2.string().trim().min(1).refine(
|
|
51
|
+
(value) => value !== "." && value !== ".." && !value.includes("/"),
|
|
52
|
+
"task_name must be one non-empty path segment"
|
|
53
|
+
).describe("One path segment naming this independent agent task."),
|
|
54
|
+
message: z2.string().refine((value) => value.trim().length > 0, "message cannot be empty").describe("The initial task for the spawned agent."),
|
|
55
|
+
fork_turns: z2.string({ error: forkTurnsError }).optional().refine((value) => parseForkTurns(value) !== void 0, forkTurnsError).describe(
|
|
56
|
+
"Parent history to inherit. Defaults to `all`; use `none` to start without parent history. Only `all` and `none` are supported."
|
|
57
|
+
)
|
|
58
|
+
});
|
|
59
|
+
var spawnAgentOutputSchema = z2.object({ task_name: z2.string() }).strict();
|
|
60
|
+
|
|
61
|
+
// packages/experimental/src/zukhruf/collaboration/interrupt-agent.ts
|
|
62
|
+
import { tool as tool3 } from "ai";
|
|
63
|
+
import { z as z4 } from "zod";
|
|
64
|
+
|
|
65
|
+
// packages/experimental/src/zukhruf/control-plane/agent-status-projector.ts
|
|
66
|
+
import { isTextUIPart } from "ai";
|
|
67
|
+
import { z as z3 } from "zod";
|
|
68
|
+
import {
|
|
69
|
+
ContextEngine
|
|
70
|
+
} from "@deepagents/context";
|
|
71
|
+
var listedAgentStatusSchema = z3.union([
|
|
72
|
+
z3.enum(["pending_init", "running", "interrupted", "shutdown", "not_found"]),
|
|
73
|
+
z3.object({ completed: z3.string().nullable() }).strict(),
|
|
74
|
+
z3.object({ errored: z3.string() }).strict()
|
|
75
|
+
]);
|
|
76
|
+
var listedAgentSchema = z3.object({
|
|
77
|
+
agent_name: z3.string(),
|
|
78
|
+
agent_status: listedAgentStatusSchema
|
|
79
|
+
}).strict();
|
|
80
|
+
|
|
81
|
+
// packages/experimental/src/zukhruf/collaboration/interrupt-agent.ts
|
|
82
|
+
var interruptAgentInputSchema = z4.object({
|
|
83
|
+
target: z4.string().trim().min(1).describe(
|
|
84
|
+
"The canonical /root/... path, or a descendant-relative target name."
|
|
85
|
+
)
|
|
86
|
+
});
|
|
87
|
+
var interruptAgentOutputSchema = z4.object({ previous_status: listedAgentStatusSchema }).strict();
|
|
88
|
+
var interruptAgentTool = tool3({
|
|
89
|
+
description: "Interrupt an agent's current turn, if any, and return its previous status. The agent remains available for messages and follow-up tasks.",
|
|
90
|
+
inputSchema: interruptAgentInputSchema,
|
|
91
|
+
outputSchema: interruptAgentOutputSchema,
|
|
92
|
+
execute: async (input, { context }) => context.controlPlane.interruptAgent(context.actor, input)
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
// packages/experimental/src/zukhruf/collaboration/list-agents.ts
|
|
96
|
+
import { tool as tool4 } from "ai";
|
|
97
|
+
import { z as z5 } from "zod";
|
|
98
|
+
var listAgentsInputSchema = z5.object({
|
|
99
|
+
path_prefix: z5.string().trim().min(1).describe(
|
|
100
|
+
"Task-path prefix without a trailing slash. Omit to list the whole tree."
|
|
101
|
+
).optional()
|
|
102
|
+
});
|
|
103
|
+
var listAgentsOutputSchema = z5.object({ agents: z5.array(listedAgentSchema) }).strict();
|
|
104
|
+
var listAgentsTool = tool4({
|
|
105
|
+
description: "List live agents in the current root thread tree. Optionally filter by task-path prefix.",
|
|
106
|
+
inputSchema: listAgentsInputSchema,
|
|
107
|
+
outputSchema: listAgentsOutputSchema,
|
|
108
|
+
execute: async ({ path_prefix }, { context }) => context.controlPlane.listAgents(context.actor, path_prefix)
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
// packages/experimental/src/zukhruf/collaboration/wait-agent.ts
|
|
112
|
+
import { tool as tool5 } from "ai";
|
|
113
|
+
import { z as z6 } from "zod";
|
|
114
|
+
var waitAgentOutputSchema = z6.object({ message: z6.string(), timed_out: z6.boolean() }).strict();
|
|
115
|
+
|
|
116
|
+
// packages/experimental/src/zukhruf/collaboration/team.ts
|
|
117
|
+
var USE_CLAUSES = new Intl.ListFormat("en", { type: "conjunction" });
|
|
118
|
+
|
|
10
119
|
// packages/experimental/src/zukhruf/control-plane/agent-control-plane.ts
|
|
11
120
|
import { v5 as uuidv54 } from "uuid";
|
|
12
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 ContextEngine3
|
|
128
|
+
} from "@deepagents/context";
|
|
129
|
+
|
|
130
|
+
// packages/experimental/src/zukhruf/runtime/approval-controller.ts
|
|
131
|
+
import {
|
|
132
|
+
getToolName,
|
|
133
|
+
isToolUIPart
|
|
134
|
+
} from "ai";
|
|
135
|
+
import {
|
|
136
|
+
ContextEngine as ContextEngine2,
|
|
137
|
+
assistant
|
|
138
|
+
} from "@deepagents/context";
|
|
139
|
+
|
|
140
|
+
// packages/experimental/src/zukhruf/runtime/conversation-status/child-progress.ts
|
|
141
|
+
import { z as z7 } from "zod";
|
|
142
|
+
var childActivitySchema = z7.object({
|
|
143
|
+
id: z7.string(),
|
|
144
|
+
type: z7.enum(["spawn", "message", "followup", "interrupt", "completion"]),
|
|
145
|
+
at: z7.number(),
|
|
146
|
+
actorPath: z7.string(),
|
|
147
|
+
targetPath: z7.string(),
|
|
148
|
+
streamId: z7.string(),
|
|
149
|
+
outcome: z7.enum(["completed", "failed", "cancelled"]).optional()
|
|
150
|
+
});
|
|
151
|
+
var childActivitiesSchema = z7.partialRecord(
|
|
152
|
+
childActivitySchema.shape.type,
|
|
153
|
+
childActivitySchema
|
|
154
|
+
);
|
|
155
|
+
var childActivityMetadataSchema = z7.looseObject({
|
|
156
|
+
childActivities: childActivitiesSchema.default({})
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
// packages/experimental/src/zukhruf/runtime/conversation-status/projector.ts
|
|
160
|
+
var Detached = class {
|
|
161
|
+
// A private member keeps the type nominal: an empty class would also
|
|
162
|
+
// describe RemoteAttachment, and `instanceof` could not narrow the union.
|
|
163
|
+
#detached = true;
|
|
164
|
+
};
|
|
165
|
+
var DETACHED = new Detached();
|
|
166
|
+
|
|
13
167
|
// packages/experimental/src/zukhruf/control-plane/agent-directory.ts
|
|
14
168
|
import { v5 as uuidv5 } from "uuid";
|
|
15
169
|
|
|
170
|
+
// packages/experimental/src/zukhruf/control-plane/agent-thread.ts
|
|
171
|
+
import { isRecord } from "@deepagents/context";
|
|
172
|
+
|
|
16
173
|
// packages/experimental/src/zukhruf/control-plane/agent-history-forker.ts
|
|
17
174
|
import { validateUIMessages } from "ai";
|
|
18
175
|
import { v5 as uuidv52 } from "uuid";
|
|
19
176
|
import {
|
|
177
|
+
isRecord as isRecord2,
|
|
20
178
|
isSyntheticReminderMessage
|
|
21
179
|
} from "@deepagents/context";
|
|
22
180
|
|
|
23
|
-
// packages/experimental/src/zukhruf/control-plane/agent-status-projector.ts
|
|
24
|
-
import { isTextUIPart } from "ai";
|
|
25
|
-
import { z } from "zod";
|
|
26
|
-
import {
|
|
27
|
-
ContextEngine
|
|
28
|
-
} from "@deepagents/context";
|
|
29
|
-
var listedAgentStatusSchema = z.union([
|
|
30
|
-
z.enum(["pending_init", "running", "interrupted", "shutdown", "not_found"]),
|
|
31
|
-
z.object({ completed: z.string().nullable() }).strict(),
|
|
32
|
-
z.object({ errored: z.string() }).strict()
|
|
33
|
-
]);
|
|
34
|
-
var listedAgentSchema = z.object({
|
|
35
|
-
agent_name: z.string(),
|
|
36
|
-
agent_status: listedAgentStatusSchema
|
|
37
|
-
}).strict();
|
|
38
|
-
|
|
39
181
|
// packages/experimental/src/zukhruf/control-plane/agent-turn-id.ts
|
|
40
182
|
import { v5 as uuidv53, validate as validateUuid } from "uuid";
|
|
41
|
-
import { z as
|
|
183
|
+
import { z as z8 } from "zod";
|
|
42
184
|
var prefix = "zukhruf-turn";
|
|
43
|
-
var agentTurnIdSchema =
|
|
185
|
+
var agentTurnIdSchema = z8.string().refine((value) => {
|
|
44
186
|
const [head, scope, turn, ...rest] = value.split(":");
|
|
45
187
|
return head === prefix && rest.length === 0 && validateUuid(scope) && validateUuid(turn);
|
|
46
188
|
});
|
|
47
189
|
|
|
190
|
+
// packages/experimental/src/zukhruf/control-plane/agent-residency.ts
|
|
191
|
+
import {
|
|
192
|
+
ContextEngine as ContextEngine4
|
|
193
|
+
} from "@deepagents/context";
|
|
194
|
+
|
|
48
195
|
// packages/experimental/src/zukhruf/mailbox/coordinator.ts
|
|
49
196
|
import pMemoize from "p-memoize";
|
|
50
197
|
|
|
51
198
|
// packages/experimental/src/zukhruf/runtime/agent-turn-executor.ts
|
|
52
|
-
import { experimental_codeModeTool } from "@ai-sdk/code-mode";
|
|
53
199
|
import {
|
|
54
200
|
jsonSchema,
|
|
55
|
-
tool
|
|
201
|
+
tool as tool6
|
|
56
202
|
} from "ai";
|
|
57
203
|
import {
|
|
58
|
-
ContextEngine as
|
|
204
|
+
ContextEngine as ContextEngine5,
|
|
59
205
|
agent,
|
|
60
|
-
assistant,
|
|
206
|
+
assistant as assistant2,
|
|
61
207
|
chat,
|
|
208
|
+
isRecord as isRecord4,
|
|
62
209
|
role,
|
|
63
210
|
user
|
|
64
211
|
} from "@deepagents/context";
|
|
@@ -73,7 +220,7 @@ import {
|
|
|
73
220
|
asSchema,
|
|
74
221
|
modelMessageSchema as modelMessageSchema2
|
|
75
222
|
} from "ai";
|
|
76
|
-
import { z as
|
|
223
|
+
import { z as z9 } from "zod";
|
|
77
224
|
|
|
78
225
|
// packages/compaction/dist/index.js
|
|
79
226
|
import {
|
|
@@ -82,21 +229,24 @@ import {
|
|
|
82
229
|
} from "ai";
|
|
83
230
|
|
|
84
231
|
// packages/experimental/src/zukhruf/runtime/compaction.ts
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
232
|
+
import {
|
|
233
|
+
isRecord as isRecord3
|
|
234
|
+
} from "@deepagents/context";
|
|
235
|
+
var checkpointSchema = z9.object({
|
|
236
|
+
sourceCount: z9.number().int().positive(),
|
|
237
|
+
sourceHash: z9.string(),
|
|
238
|
+
replacement: z9.array(z9.unknown()).transform(
|
|
89
239
|
(messages) => messages.map((message) => modelMessageSchema2.parse(message))
|
|
90
240
|
)
|
|
91
241
|
});
|
|
92
|
-
var cacheObservationSchema =
|
|
93
|
-
scope:
|
|
94
|
-
prefixLength:
|
|
95
|
-
prefixHash:
|
|
96
|
-
startedAt:
|
|
97
|
-
retentionMs:
|
|
242
|
+
var cacheObservationSchema = z9.object({
|
|
243
|
+
scope: z9.string(),
|
|
244
|
+
prefixLength: z9.number().int().nonnegative(),
|
|
245
|
+
prefixHash: z9.string(),
|
|
246
|
+
startedAt: z9.number().int().nonnegative(),
|
|
247
|
+
retentionMs: z9.number().int().positive().optional()
|
|
98
248
|
});
|
|
99
|
-
var inputUsageSchema = cacheObservationSchema.pick({ scope: true, prefixLength: true, prefixHash: true }).extend({ inputTokens:
|
|
249
|
+
var inputUsageSchema = cacheObservationSchema.pick({ scope: true, prefixLength: true, prefixHash: true }).extend({ inputTokens: z9.number().int().nonnegative() });
|
|
100
250
|
|
|
101
251
|
// packages/experimental/src/zukhruf/runtime/plugin/agent-skills.ts
|
|
102
252
|
import {
|
|
@@ -104,142 +254,6 @@ import {
|
|
|
104
254
|
skills
|
|
105
255
|
} from "@deepagents/context";
|
|
106
256
|
|
|
107
|
-
// packages/experimental/src/zukhruf/runtime/approval-controller.ts
|
|
108
|
-
import {
|
|
109
|
-
getToolName,
|
|
110
|
-
isToolUIPart
|
|
111
|
-
} from "ai";
|
|
112
|
-
import {
|
|
113
|
-
ContextEngine as ContextEngine3,
|
|
114
|
-
assistant as assistant2
|
|
115
|
-
} from "@deepagents/context";
|
|
116
|
-
|
|
117
|
-
// packages/experimental/src/zukhruf/runtime/conversation-status/projector.ts
|
|
118
|
-
import { Future, Latch } from "@zukhruf/async";
|
|
119
|
-
import { Mutex } from "@zukhruf/mutex";
|
|
120
|
-
import { MemoryStore } from "@zukhruf/mutex/memory";
|
|
121
|
-
import {
|
|
122
|
-
ContextEngine as ContextEngine4
|
|
123
|
-
} from "@deepagents/context";
|
|
124
|
-
|
|
125
|
-
// packages/experimental/src/zukhruf/runtime/conversation-status/child-progress.ts
|
|
126
|
-
import { z as z4 } from "zod";
|
|
127
|
-
var childActivitySchema = z4.object({
|
|
128
|
-
id: z4.string(),
|
|
129
|
-
type: z4.enum(["spawn", "message", "followup", "interrupt", "completion"]),
|
|
130
|
-
at: z4.number(),
|
|
131
|
-
actorPath: z4.string(),
|
|
132
|
-
targetPath: z4.string(),
|
|
133
|
-
streamId: z4.string(),
|
|
134
|
-
outcome: z4.enum(["completed", "failed", "cancelled"]).optional()
|
|
135
|
-
});
|
|
136
|
-
var childActivitiesSchema = z4.partialRecord(
|
|
137
|
-
childActivitySchema.shape.type,
|
|
138
|
-
childActivitySchema
|
|
139
|
-
);
|
|
140
|
-
var childActivityMetadataSchema = z4.looseObject({
|
|
141
|
-
childActivities: childActivitiesSchema.default({})
|
|
142
|
-
});
|
|
143
|
-
|
|
144
|
-
// packages/experimental/src/zukhruf/runtime/conversation-status/projector.ts
|
|
145
|
-
var Detached = class {
|
|
146
|
-
// A private member keeps the type nominal: an empty class would also
|
|
147
|
-
// describe RemoteAttachment, and `instanceof` could not narrow the union.
|
|
148
|
-
#detached = true;
|
|
149
|
-
};
|
|
150
|
-
var DETACHED = new Detached();
|
|
151
|
-
|
|
152
|
-
// packages/experimental/src/zukhruf/collaboration/interrupt-agent.ts
|
|
153
|
-
import { tool as tool2 } from "ai";
|
|
154
|
-
import { z as z5 } from "zod";
|
|
155
|
-
var interruptAgentInputSchema = z5.object({
|
|
156
|
-
target: z5.string().trim().min(1).describe(
|
|
157
|
-
"The canonical /root/... path, or a descendant-relative target name."
|
|
158
|
-
)
|
|
159
|
-
});
|
|
160
|
-
var interruptAgentOutputSchema = z5.object({ previous_status: listedAgentStatusSchema }).strict();
|
|
161
|
-
var interruptAgentTool = tool2({
|
|
162
|
-
description: "Interrupt an agent's current turn, if any, and return its previous status. The agent remains available for messages and follow-up tasks.",
|
|
163
|
-
inputSchema: interruptAgentInputSchema,
|
|
164
|
-
outputSchema: interruptAgentOutputSchema,
|
|
165
|
-
execute: async (input, { context }) => context.controlPlane.interruptAgent(context.actor, input)
|
|
166
|
-
});
|
|
167
|
-
|
|
168
|
-
// packages/experimental/src/zukhruf/collaboration/list-agents.ts
|
|
169
|
-
import { tool as tool3 } from "ai";
|
|
170
|
-
import { z as z6 } from "zod";
|
|
171
|
-
var listAgentsInputSchema = z6.object({
|
|
172
|
-
path_prefix: z6.string().trim().min(1).describe(
|
|
173
|
-
"Task-path prefix without a trailing slash. Omit to list the whole tree."
|
|
174
|
-
).optional()
|
|
175
|
-
});
|
|
176
|
-
var listAgentsOutputSchema = z6.object({ agents: z6.array(listedAgentSchema) }).strict();
|
|
177
|
-
var listAgentsTool = tool3({
|
|
178
|
-
description: "List live agents in the current root thread tree. Optionally filter by task-path prefix.",
|
|
179
|
-
inputSchema: listAgentsInputSchema,
|
|
180
|
-
outputSchema: listAgentsOutputSchema,
|
|
181
|
-
execute: async ({ path_prefix }, { context }) => context.controlPlane.listAgents(context.actor, path_prefix)
|
|
182
|
-
});
|
|
183
|
-
|
|
184
|
-
// packages/experimental/src/zukhruf/collaboration/message-tools.ts
|
|
185
|
-
import { tool as tool4 } from "ai";
|
|
186
|
-
import { z as z7 } from "zod";
|
|
187
|
-
var agentMessageInputSchema = z7.object({
|
|
188
|
-
target: z7.string().trim().min(1).describe(
|
|
189
|
-
"The canonical /root/... path, or a descendant-relative target name."
|
|
190
|
-
),
|
|
191
|
-
message: z7.string().trim().min(1).describe("The message or follow-up task.")
|
|
192
|
-
});
|
|
193
|
-
var sendMessageTool = tool4({
|
|
194
|
-
description: "Queue a message for another agent. Address siblings with their canonical /root/... path.",
|
|
195
|
-
inputSchema: agentMessageInputSchema,
|
|
196
|
-
execute: async (input, { context }) => {
|
|
197
|
-
await context.controlPlane.sendMessage(context.actor, input);
|
|
198
|
-
return "";
|
|
199
|
-
}
|
|
200
|
-
});
|
|
201
|
-
var followupTaskTool = tool4({
|
|
202
|
-
description: "Send a follow-up task to an existing non-root agent and wake its thread.",
|
|
203
|
-
inputSchema: agentMessageInputSchema,
|
|
204
|
-
execute: async (input, { context }) => {
|
|
205
|
-
await context.controlPlane.followupTask(context.actor, input);
|
|
206
|
-
return "";
|
|
207
|
-
}
|
|
208
|
-
});
|
|
209
|
-
|
|
210
|
-
// packages/experimental/src/zukhruf/collaboration/spawn-agent.ts
|
|
211
|
-
import { tool as tool5 } from "ai";
|
|
212
|
-
import { z as z8 } from "zod";
|
|
213
|
-
|
|
214
|
-
// packages/experimental/src/zukhruf/control-plane/fork-turns.ts
|
|
215
|
-
var forkTurnsError = "fork_turns must be `none`, `all`, or a positive integer string";
|
|
216
|
-
function parseForkTurns(value) {
|
|
217
|
-
const normalized = value.trim().toLowerCase();
|
|
218
|
-
if (normalized === "none" || normalized === "all") return normalized;
|
|
219
|
-
if (!/^\d+$/.test(normalized)) return void 0;
|
|
220
|
-
const turns = Number(normalized);
|
|
221
|
-
return Number.isSafeInteger(turns) && turns > 0 ? turns : void 0;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
// packages/experimental/src/zukhruf/collaboration/spawn-agent.ts
|
|
225
|
-
var spawnAgentInputSchema = z8.object({
|
|
226
|
-
agent_type: z8.string().trim().min(1).describe("The name of one available subagent declaration."),
|
|
227
|
-
task_name: z8.string().trim().min(1).refine(
|
|
228
|
-
(value) => value !== "." && value !== ".." && !value.includes("/"),
|
|
229
|
-
"task_name must be one non-empty path segment"
|
|
230
|
-
).describe("One path segment naming this independent agent task."),
|
|
231
|
-
message: z8.string().refine((value) => value.trim().length > 0, "message cannot be empty").describe("The initial task for the spawned agent."),
|
|
232
|
-
fork_turns: z8.string().trim().refine((value) => parseForkTurns(value) !== void 0, forkTurnsError).describe(
|
|
233
|
-
"Required number of parent turns to fork. Use `none`, `all`, or a positive integer string such as `3`."
|
|
234
|
-
)
|
|
235
|
-
});
|
|
236
|
-
var spawnAgentOutputSchema = z8.object({ task_name: z8.string() }).strict();
|
|
237
|
-
|
|
238
|
-
// packages/experimental/src/zukhruf/collaboration/wait-agent.ts
|
|
239
|
-
import { tool as tool6 } from "ai";
|
|
240
|
-
import { z as z9 } from "zod";
|
|
241
|
-
var waitAgentOutputSchema = z9.object({ message: z9.string(), timed_out: z9.boolean() }).strict();
|
|
242
|
-
|
|
243
257
|
// packages/experimental/src/zukhruf/runtime/plugin/plugin-agents.ts
|
|
244
258
|
import { parseFrontmatter as parseFrontmatter2, role as role2 } from "@deepagents/context";
|
|
245
259
|
|
|
@@ -996,7 +1010,7 @@ var ScheduledTasks = class {
|
|
|
996
1010
|
async archiveRun(ownerId, runId) {
|
|
997
1011
|
return this.#setReviewStatus(ownerId, runId, "archived");
|
|
998
1012
|
}
|
|
999
|
-
async work(options
|
|
1013
|
+
async work(options) {
|
|
1000
1014
|
const workOptions = { ...options, includeMetadata: true };
|
|
1001
1015
|
const workerId = await this.#boss.work(
|
|
1002
1016
|
this.#queue,
|
|
@@ -1006,7 +1020,7 @@ var ScheduledTasks = class {
|
|
|
1006
1020
|
}
|
|
1007
1021
|
);
|
|
1008
1022
|
return {
|
|
1009
|
-
[Symbol.asyncDispose]: () => this.#boss.offWork(this.#queue, { id: workerId, wait:
|
|
1023
|
+
[Symbol.asyncDispose]: () => this.#boss.offWork(this.#queue, { id: workerId, wait: true })
|
|
1010
1024
|
};
|
|
1011
1025
|
}
|
|
1012
1026
|
async #handle(job) {
|
|
@@ -1792,8 +1806,8 @@ var RunningSchedules = class _RunningSchedules {
|
|
|
1792
1806
|
}
|
|
1793
1807
|
});
|
|
1794
1808
|
}
|
|
1795
|
-
work(
|
|
1796
|
-
return this.#scheduled.work(this.#workerOptions
|
|
1809
|
+
work() {
|
|
1810
|
+
return this.#scheduled.work(this.#workerOptions);
|
|
1797
1811
|
}
|
|
1798
1812
|
async create(ownerId, input) {
|
|
1799
1813
|
const executionConfig = normalizeExecutionConfig(input.executionConfig);
|