glove-foundry 0.7.0 → 0.9.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.
@@ -1,8 +1,8 @@
1
1
  import * as glove_core from 'glove-core';
2
- import { Message, IGloveRunnable, StoreAdapter, GloveFoldArgs, Tool, SubscriberAdapter, RuntimeContextProvider, RuntimeContextOptions, ModelAdapter, DisplayManagerAdapter, HookHandler, DefineSkillArgs, DefineSubAgentArgs, InboxItem, ContentPart, AgentEvent } from 'glove-core';
2
+ import { Displaymanager, DisplayManagerAdapter, Slot, StoreAdapter, Message, IGloveRunnable, GloveFoldArgs, Tool, SubscriberAdapter, RuntimeContextProvider, RuntimeContextOptions, ModelAdapter, HookHandler, DefineSkillArgs, DefineSubAgentArgs, InboxItem, ContentPart, AgentEvent } from 'glove-core';
3
3
  import { Schema, Effect } from 'effect';
4
4
  import { z } from 'zod';
5
- import { MeshAdapter, AgentIdentity } from 'glove-mesh';
5
+ import { AgentIdentity, MeshAdapter } from 'glove-mesh';
6
6
  import { McpCatalogueEntry, McpAdapter } from 'glove-mcp';
7
7
  import { EntityMemoryAdapter, EpisodicMemoryAdapter, ResourceFsAdapter, ContextAdapter } from 'glove-memory';
8
8
  import { MemoryToolOptions, UseGoalRunnerConfig, UseFormRunnerConfig } from 'glove-memory/tools';
@@ -14,6 +14,94 @@ import { FactAdapter, FactScope, FactStore, FactInput } from 'glove-facts';
14
14
  import { GoalAdapter, GoalScope, GoalProgram, GoalRunner } from 'glove-memory/goals';
15
15
  import { FormAdapter, FormRunner } from 'glove-memory/forms';
16
16
 
17
+ declare const FOUNDRY_APPROVAL_DIRECTORY_ENV = "GLOVE_FOUNDRY_APPROVAL_DIRECTORY";
18
+ /** Default live wait before a run with durable approvals suspends. */
19
+ declare const DEFAULT_APPROVAL_WAIT_MS = 60000;
20
+ /** Default lifetime of a durable approval nobody has decided. */
21
+ declare const DEFAULT_APPROVAL_EXPIRES_AFTER_MS: number;
22
+ /** How a run treats approvals. Durable ones outlive the run; the others expire with it. */
23
+ interface FoundryApprovalPolicy {
24
+ readonly durable: boolean;
25
+ /** How long the run waits for a decision before it suspends (durable) or the approval expires. */
26
+ readonly waitMs: number;
27
+ /** How long a durable approval stays open. */
28
+ readonly expiresAfterMs: number;
29
+ }
30
+ type FoundryApprovalDecision = "approve" | "deny";
31
+ type FoundryApprovalStatus = "pending" | "approved" | "denied" | "expired" | "cancelled";
32
+ interface FoundryApproval {
33
+ readonly id: string;
34
+ /** The run that asked. A resumed approval continues in a later run (`resumeRunId`). */
35
+ readonly runId: string;
36
+ readonly definitionId: string;
37
+ readonly agentId: string;
38
+ readonly conversationId: string;
39
+ readonly workspaceId: string;
40
+ readonly toolName: string;
41
+ readonly toolInput: unknown;
42
+ /** The tool call waiting for this decision, as the model made it. */
43
+ readonly toolCallId?: string;
44
+ readonly status: FoundryApprovalStatus;
45
+ readonly requestedAt: string;
46
+ readonly expiresAt: string;
47
+ readonly resolvedAt?: string;
48
+ /** Where a person decides it: from the application's `approvals.url`. */
49
+ readonly url?: string;
50
+ /** When the run stopped waiting for it. A decision after this resumes the run. */
51
+ readonly suspendedAt?: string;
52
+ /** When the decision was handed to the conversation, and the run that took it. */
53
+ readonly resumedAt?: string;
54
+ readonly resumeRunId?: string;
55
+ /** The run that asked read the decision itself, so no resume is owed. */
56
+ readonly settledInRun?: boolean;
57
+ }
58
+ declare function createFoundryApproval(directory: string, input: {
59
+ readonly runId: string;
60
+ readonly definitionId: string;
61
+ readonly agentId: string;
62
+ readonly conversationId: string;
63
+ readonly workspaceId: string;
64
+ readonly toolName: string;
65
+ readonly toolInput: unknown;
66
+ readonly toolCallId?: string;
67
+ readonly timeoutMs?: number;
68
+ /** A durable approval's lifetime, beyond the live wait. Overrides `timeoutMs`. */
69
+ readonly expiresAfterMs?: number;
70
+ }): Promise<FoundryApproval>;
71
+ declare function listFoundryApprovals(directory: string, filter?: {
72
+ readonly runId?: string;
73
+ readonly status?: FoundryApprovalStatus;
74
+ }): Promise<ReadonlyArray<FoundryApproval>>;
75
+ declare function resolveFoundryApproval(directory: string, id: string, decision: FoundryApprovalDecision): Promise<FoundryApproval>;
76
+ declare class FoundryApprovalDisplayManager extends Displaymanager implements DisplayManagerAdapter {
77
+ private readonly context;
78
+ constructor(context: {
79
+ readonly directory?: string;
80
+ readonly runId: string;
81
+ readonly definitionId: string;
82
+ readonly agentId: string;
83
+ readonly conversationId: string;
84
+ readonly workspaceId: string;
85
+ readonly signal: AbortSignal;
86
+ readonly emit: (event: {
87
+ readonly type: string;
88
+ readonly data?: unknown;
89
+ }) => void;
90
+ /** With durable approvals the run suspends after `waitMs` instead of the approval expiring. */
91
+ readonly policy?: FoundryApprovalPolicy;
92
+ });
93
+ pushAndWait<I, O>(slot: Omit<Slot<I>, "id">): Promise<O>;
94
+ /**
95
+ * A durable approval: wait a while for the decision in this run. If nobody
96
+ * decides in time, or the run is stopping, the approval stays open and the
97
+ * turn suspends at this tool call (`ToolPermissionDeferred`), with no
98
+ * result recorded for it. The runtime resumes it when someone decides.
99
+ */
100
+ private durableDecision;
101
+ }
102
+ /** Add fail-closed per-input permissions to a custom store that omitted them. */
103
+ declare function withFoundryPermissions(store: StoreAdapter): StoreAdapter;
104
+
17
105
  declare const TransmissionId: Schema.brand<Schema.refine<string, typeof Schema.String>, "FoundryTransmissionId">;
18
106
  type TransmissionId = typeof TransmissionId.Type;
19
107
  declare const AgentDefinitionId: Schema.brand<Schema.refine<string, typeof Schema.String>, "FoundryAgentDefinitionId">;
@@ -569,7 +657,53 @@ type FoundrySharedTool<TInput = unknown, TConfigSchema extends z.ZodType | undef
569
657
  readonly [FOUNDRY_SHARED_TOOL_BRAND]: true;
570
658
  };
571
659
  declare function defineSharedTool<TInput, const TConfigSchema extends z.ZodType | undefined = undefined>(options: SharedToolOptions<TInput, TConfigSchema>): FoundrySharedTool<TInput, TConfigSchema>;
660
+ /** What an installed app does with one of its MCP server's tools. */
661
+ type FoundryAppToolDecision = "allow" | "ask" | "hide";
662
+ /** One tool on an app's MCP server, as the app's tool policy sees it. */
663
+ interface FoundryAppMcpTool {
664
+ /** The tool's name on the server. */
665
+ readonly name: string;
666
+ readonly description?: string;
667
+ /** The server marks the tool read-only. */
668
+ readonly readOnly: boolean;
669
+ /** The server marks the tool destructive. */
670
+ readonly destructive: boolean;
671
+ }
672
+ /**
673
+ * Back an app with an MCP server. The app stays the unit a person connects:
674
+ * the server's tools reach the agent through the app, opened with the
675
+ * installation's account and filtered by the app's tool policy.
676
+ */
677
+ interface FoundryAppMcp<TConfig = unknown> {
678
+ /** Where the server is: a static entry, or one resolved from the installation. */
679
+ readonly entry: McpCatalogueEntryWithoutId | ((context: AgentApplicationInstallContext<TConfig>) => McpCatalogueEntryWithoutId | Promise<McpCatalogueEntryWithoutId> | Effect.Effect<McpCatalogueEntryWithoutId, unknown, never>);
680
+ /**
681
+ * Turn the installation's account session into credentials for the
682
+ * connection: HTTP headers for an HTTP server, environment variables for a
683
+ * stdio one. It runs inside the agent's `accountSessions` boundary, so
684
+ * Foundry never holds the credential. Omit it for a server that needs none.
685
+ */
686
+ readonly auth?: (session: unknown, context: AgentApplicationInstallContext<TConfig>) => Record<string, string> | Promise<Record<string, string>>;
687
+ /**
688
+ * Decide each tool: run it, ask the person first, or leave it out. The
689
+ * default runs read-only tools and asks before everything else.
690
+ */
691
+ readonly tools?: (tool: FoundryAppMcpTool, context: AgentApplicationInstallContext<TConfig>) => FoundryAppToolDecision;
692
+ }
693
+ /** One installed app and the tools it mounted for this run. */
694
+ interface FoundryInstalledApp {
695
+ readonly id: string;
696
+ readonly description: string;
697
+ readonly accountId?: string;
698
+ /** The app's live tool names, with whether each only reads. */
699
+ readonly tools: ReadonlyArray<{
700
+ readonly name: string;
701
+ readonly readOnly?: boolean;
702
+ }>;
703
+ }
572
704
  interface AgentApplicationOptions<TConfigSchema extends z.ZodType | undefined = undefined> extends ConfiguredCapability<TConfigSchema> {
705
+ /** Tools from an MCP server, connected with the installation's account. */
706
+ readonly mcp?: FoundryAppMcp<TConfigSchema extends z.ZodType ? z.output<TConfigSchema> : unknown>;
573
707
  /** Inbound transmission mechanisms owned by this application. */
574
708
  readonly inbound?: ReadonlyArray<AnyFoundryTransmission>;
575
709
  /** Outbound transmission mechanisms mounted as tools when installed. */
@@ -701,6 +835,10 @@ interface InstallRegistryOptions {
701
835
  readonly context: Omit<AgentInstallContext, "installation" | "config">;
702
836
  readonly mcpAdapter?: McpAdapterFactory;
703
837
  readonly accountSessions?: FoundryAccountSessionAdapter;
838
+ /** Receives each installed app and its tools. */
839
+ readonly onApp?: (app: FoundryInstalledApp) => void;
840
+ /** Receives work to do when the run ends, such as closing app connections. */
841
+ readonly onCleanup?: (cleanup: () => Promise<void>) => void;
704
842
  }
705
843
  interface FoundryAccountSessionAdapter {
706
844
  readonly identifier: string;
@@ -766,9 +904,13 @@ declare function defineWorkingEnvironment(options?: DefineFoundryWorkingEnvironm
766
904
  /**
767
905
  * Convenience persistence over the configured FoundryDataAdapter's private
768
906
  * snapshot seam. VFS contents never become public workspace entries.
907
+ * Scope "agent" (default) keeps one snapshot per instance, "conversation" one
908
+ * per conversation, and "workspace" one shared by every agent in the
909
+ * workspace. Saves replace the snapshot, so with "workspace" the last run to
910
+ * finish wins; give agents that write at the same time a live machine instead.
769
911
  */
770
912
  declare function foundryDataEnvironmentPersistence(options?: {
771
- readonly scope?: "agent" | "conversation";
913
+ readonly scope?: "agent" | "conversation" | "workspace";
772
914
  }): FoundryWorkingEnvironmentPersistenceAdapter;
773
915
  interface FoundryReplBase {
774
916
  readonly [FOUNDRY_REPL_BRAND]: true;
@@ -794,11 +936,21 @@ interface FoundryProgrammaticToolSelection {
794
936
  readonly serverDescription?: string;
795
937
  readonly resultShape?: string;
796
938
  }
939
+ /** An installed app, with its live tools ready to select into the REPL. */
940
+ interface FoundryReplApp {
941
+ readonly id: string;
942
+ readonly description: string;
943
+ readonly accountId?: string;
944
+ /** Each tool grouped under the app, named for code, and marked when it only reads. */
945
+ readonly tools: ReadonlyArray<FoundryProgrammaticToolSelection>;
946
+ }
797
947
  interface FoundryProgrammaticToolContext {
798
948
  readonly assembly: AgentAssemblyContext<FoundryRequest>;
799
949
  readonly glove: IGloveRunnable;
800
950
  /** Snapshot of every tool mounted before the programmatic surface itself. */
801
951
  readonly tools: ReadonlyArray<Tool<unknown>>;
952
+ /** The apps installed on this agent, one group per app. */
953
+ readonly apps: ReadonlyArray<FoundryReplApp>;
802
954
  readonly workingEnvironment?: WorkingEnvironment;
803
955
  readonly vfs?: EnvFsHandle;
804
956
  }
@@ -810,6 +962,12 @@ interface FoundryProgrammaticTools {
810
962
  readonly select: (context: FoundryProgrammaticToolContext) => Resolvable<ReadonlyArray<Tool<unknown> | FoundryProgrammaticToolSelection>>;
811
963
  /** Total underlying calls permitted during this assembled run. Default 50. */
812
964
  readonly maxCalls?: number;
965
+ /**
966
+ * Keep selected tools in the model's direct tool list as well. Default true.
967
+ * Pass false to reach them only from code, which keeps a large app
968
+ * catalogue out of context. A tool that needs approval always stays direct.
969
+ */
970
+ readonly keepDirect?: boolean;
813
971
  }
814
972
  type FoundryJavaScriptReplDefinition = FoundryReplBase & Readonly<{
815
973
  readonly language: "javascript";
@@ -948,6 +1106,117 @@ type FoundryCompositionSource = FoundryAgentComponent | FoundryToolBody | Foundr
948
1106
  declare function composeAgent(...sources: ReadonlyArray<FoundryCompositionSource>): FoundryAgentComposition;
949
1107
  declare const EMPTY_AGENT_COMPOSITION: FoundryAgentComposition;
950
1108
 
1109
+ /**
1110
+ * Put an agent on the mesh. Its peers are the other agent instances in its
1111
+ * workspace, found from data: a person's bots, a team's agents, whatever the
1112
+ * application created.
1113
+ */
1114
+ interface FoundryMeshOptions {
1115
+ /**
1116
+ * Which agents this one may see and message, decided from data. Default:
1117
+ * every other agent in its workspace. An agent can always answer whoever
1118
+ * messaged it.
1119
+ */
1120
+ readonly peers?: (self: AgentInstance, peer: AgentInstance) => boolean;
1121
+ /** How long a blocking send waits in the same run for the reply. Default 90 s. */
1122
+ readonly waitMs?: number;
1123
+ /**
1124
+ * Whether this run gets the mesh tools. Default: every run. Use it to keep a
1125
+ * run that must only read, such as scheduled research, from messaging anyone.
1126
+ */
1127
+ readonly mount?: (context: AgentAssemblyContext) => boolean;
1128
+ }
1129
+ /** How an agent appears to its peers: from its instance data. */
1130
+ declare function meshIdentity(agent: AgentInstance): AgentIdentity;
1131
+ type FoundryMeshThreadStatus = "working" | "waiting" | "replied" | "failed" | "cancelled";
1132
+ interface FoundryMeshParty {
1133
+ readonly agentId: string;
1134
+ readonly name: string;
1135
+ readonly definitionId: string;
1136
+ }
1137
+ /**
1138
+ * A conversation between two agents. Its id is also the recipient's
1139
+ * conversation id, and the record lives on that conversation's
1140
+ * `context.meshThread`.
1141
+ */
1142
+ interface FoundryMeshThread {
1143
+ readonly id: string;
1144
+ readonly workspaceId: string;
1145
+ /** Who started it, and the conversation its messages go back to. */
1146
+ readonly from: FoundryMeshParty & {
1147
+ readonly conversationId: string;
1148
+ readonly runId: string;
1149
+ };
1150
+ /** Who it was sent to. Their side of the thread is this conversation. */
1151
+ readonly to: FoundryMeshParty;
1152
+ /** The first message, shortened. */
1153
+ readonly subject: string;
1154
+ readonly status: FoundryMeshThreadStatus;
1155
+ /** Every message id in the thread, so either side can reply to one. */
1156
+ readonly messageIds: ReadonlyArray<string>;
1157
+ /** The recipient's open question, while status is "waiting". */
1158
+ readonly question?: string;
1159
+ /** The recipient's last reply. */
1160
+ readonly reply?: string;
1161
+ readonly error?: string;
1162
+ /**
1163
+ * Older records only: messages not handed over yet, for the starter's
1164
+ * conversation and for this one. On start Foundry moves them to the event
1165
+ * journal and drops these lists.
1166
+ */
1167
+ readonly undelivered?: ReadonlyArray<FoundryMeshMessage>;
1168
+ readonly pending?: ReadonlyArray<FoundryMeshMessage>;
1169
+ readonly createdAt: string;
1170
+ readonly updatedAt: string;
1171
+ }
1172
+ /** One message between agents, as it reaches a conversation. */
1173
+ interface FoundryMeshMessage {
1174
+ /**
1175
+ * "message": anything an agent sent. "reply": the recipient's final answer,
1176
+ * sent when its run finished. "failed": the recipient's run stopped.
1177
+ * "ack": a read receipt, which only reaches a run that is waiting.
1178
+ */
1179
+ readonly kind: "message" | "reply" | "failed" | "ack";
1180
+ readonly id: string;
1181
+ readonly threadId: string;
1182
+ readonly from: {
1183
+ readonly agentId: string;
1184
+ readonly name: string;
1185
+ };
1186
+ readonly to: string;
1187
+ readonly content: string;
1188
+ readonly inReplyTo?: string;
1189
+ readonly createdAt: string;
1190
+ }
1191
+ interface MeshCommandBase {
1192
+ readonly id: string;
1193
+ readonly definitionId: string;
1194
+ readonly agentId: string;
1195
+ readonly conversationId: string;
1196
+ readonly workspaceId: string;
1197
+ }
1198
+ type FoundryMeshCommand = (MeshCommandBase & {
1199
+ readonly type: "mesh.list";
1200
+ readonly name?: string;
1201
+ }) | (MeshCommandBase & {
1202
+ readonly type: "mesh.send";
1203
+ /**
1204
+ * The message. `threadId` is used when it starts a new thread; a reply
1205
+ * in an existing thread takes that thread's id.
1206
+ */
1207
+ readonly message: {
1208
+ readonly id: string;
1209
+ readonly threadId: string;
1210
+ readonly to: string;
1211
+ readonly content: string;
1212
+ readonly inReplyTo?: string;
1213
+ };
1214
+ }) | (MeshCommandBase & {
1215
+ readonly type: "mesh.ack";
1216
+ readonly messageId: string;
1217
+ readonly note: string;
1218
+ });
1219
+
951
1220
  declare const FOUNDRY_SCHEDULE_BRAND: unique symbol;
952
1221
  type FoundryScheduleTimingInput = {
953
1222
  readonly kind: "at";
@@ -1111,7 +1380,7 @@ type FoundryCoreCommand = {
1111
1380
  readonly observability?: unknown;
1112
1381
  readonly applicationId?: string;
1113
1382
  readonly transmissionId?: string;
1114
- } | FoundryDelegationCommand | DurableMessageCommand;
1383
+ } | FoundryDelegationCommand | DurableMessageCommand | FoundryMeshCommand;
1115
1384
  /** Resolve an installed app's generated outbound tool without duplicating ids. */
1116
1385
  declare function installedApplicationTransmissionToolName(application: {
1117
1386
  readonly id: string;
@@ -1126,10 +1395,20 @@ declare function installedApplicationTransmissionToolName(application: {
1126
1395
  * agent subprocess.
1127
1396
  */
1128
1397
  declare function createInstalledApplicationTransmissionTools(context: AgentAssemblyContext, applications: ReadonlyArray<FoundryAgentApplication>, installations: ReadonlyArray<AgentInstallation>, playbooks?: ReadonlyArray<AgentPlaybook>): ReadonlyArray<GloveFoldArgs<any>>;
1398
+ /** An application as the transmit tool sees it: its id and the transmissions it owns. */
1399
+ interface OutboundOwner {
1400
+ readonly id: string;
1401
+ readonly transmissions?: ReadonlyArray<AnyFoundryTransmission>;
1402
+ }
1129
1403
  /** Framework-owned orchestration tools. They emit commands for Foundry's runtime adapters. */
1130
1404
  declare function createFoundryCoreTools(context: AgentAssemblyContext, desiredSchedules?: Extract<FoundryCoreCommand, {
1131
1405
  readonly type: "schedule.sync";
1132
- }>["schedules"]): ReadonlyArray<GloveFoldArgs<any>>;
1406
+ }>["schedules"], outbound?: {
1407
+ /** The playbooks resolved for this run. Default: the instance's stored ones. */
1408
+ readonly playbooks?: ReadonlyArray<AgentPlaybook>;
1409
+ /** The definition's applications, so the approval rule of a route's transmission applies. */
1410
+ readonly applications?: ReadonlyArray<OutboundOwner>;
1411
+ }): ReadonlyArray<GloveFoldArgs<any>>;
1133
1412
 
1134
1413
  /** Conversation isolation is the default. Instance scope deliberately shares conversations. */
1135
1414
  type FoundryGuidanceScope = "conversation" | "instance";
@@ -1214,6 +1493,10 @@ interface AgentAssemblyContext<TInput = unknown> {
1214
1493
  readonly delegations: ReadonlyArray<FoundryDelegation>;
1215
1494
  /** The task this run works on, when another agent delegated it. */
1216
1495
  readonly delegation?: FoundryDelegation;
1496
+ /** Mesh threads this conversation started that were still open when the run began. */
1497
+ readonly threads: ReadonlyArray<FoundryMeshThread>;
1498
+ /** The thread this conversation answers, when a peer on the mesh messaged this one. */
1499
+ readonly thread?: FoundryMeshThread;
1217
1500
  readonly data: FoundryDataAdapter;
1218
1501
  readonly input: TInput;
1219
1502
  /** Native Glove representation of the current inbound user turn. */
@@ -1253,6 +1536,10 @@ interface FoundryCallOptions<TInputSchema extends z.ZodType, TOutputSchema exten
1253
1536
  type FoundryCall<TInputSchema extends z.ZodType = z.ZodType, TOutputSchema extends z.ZodType = z.ZodType> = Readonly<FoundryCallOptions<TInputSchema, TOutputSchema>>;
1254
1537
  declare function defineCall<TInputSchema extends z.ZodType, TOutputSchema extends z.ZodType>(options: FoundryCallOptions<TInputSchema, TOutputSchema>): FoundryCall<TInputSchema, TOutputSchema>;
1255
1538
  interface FoundryExecutionContext<TInput = unknown> extends FoundrySurfaceContext<TInput>, FoundryGuidanceHandles {
1539
+ /** The instance being run, as resolvers see it. */
1540
+ readonly agentInstance: AgentInstance;
1541
+ readonly conversation: Conversation;
1542
+ readonly data: FoundryDataAdapter;
1256
1543
  readonly installations: ReadonlyArray<AgentInstallation>;
1257
1544
  readonly events?: ReadonlyArray<glove_core.AgentEvent>;
1258
1545
  readonly delegations?: ReadonlyArray<FoundryDelegation>;
@@ -1273,6 +1560,13 @@ interface FoundryExecutionContext<TInput = unknown> extends FoundrySurfaceContex
1273
1560
  * anything that arrives after it goes to that turn, or to a new run.
1274
1561
  */
1275
1562
  readonly onDelegationUpdate: (handler: (updates: ReadonlyArray<FoundryDelegationUpdate>) => void | Promise<void>) => () => Promise<void>;
1563
+ /**
1564
+ * Receive messages from peers on the mesh Foundry hosts inside this run
1565
+ * while it stays live, such as a voice call. Without a handler, a message
1566
+ * joins the run's turn at its next tool step. Returns a function that stops
1567
+ * listening; anything that arrives after it goes to that turn, or to a new run.
1568
+ */
1569
+ readonly onMeshMessage: (handler: (messages: ReadonlyArray<FoundryMeshMessage>) => void | Promise<void>) => () => Promise<void>;
1276
1570
  }
1277
1571
  interface AgentHandlerContext<TInput = unknown> extends FoundryExecutionContext<TInput> {
1278
1572
  /** Run the standard Glove loop, optionally with a handler-enriched message. */
@@ -1336,7 +1630,20 @@ interface AgentAssemblyOptions<TInput = unknown> {
1336
1630
  readonly schedules?: FoundryListResolver<FoundryScheduleDefinition, TInput>;
1337
1631
  /** Runtime policy composed from transmission primitives and persisted on the instance. */
1338
1632
  readonly playbooks?: FoundryListResolver<ComposedAgentPlaybook, TInput>;
1339
- readonly mesh?: FoundryResolver<FoundryMeshConfig | undefined, TInput>;
1633
+ /**
1634
+ * Put this agent on Glove Mesh, in one of two ways.
1635
+ *
1636
+ * - Hosted by Foundry: `true` or `{ peers, waitMs, mount }`. The agent gets
1637
+ * glove_mesh_list_agents, glove_mesh_send_message, glove_mesh_broadcast and
1638
+ * glove_mesh_acknowledge, and messages peers that are existing instances
1639
+ * in its workspace, by instance id. Their names come from data. Messages
1640
+ * travel through Foundry's durable event delivery.
1641
+ * - Your own transport: a `FoundryMeshConfig` with an `adapter` (or a
1642
+ * resolver returning one). Foundry mounts glove-mesh on it as is.
1643
+ *
1644
+ * For workers an agent owns, use `durableSubagents` or `delegates`.
1645
+ */
1646
+ readonly mesh?: true | FoundryMeshOptions | FoundryResolver<FoundryMeshConfig | undefined, TInput>;
1340
1647
  /** Sandboxed persistent files + named script execution, assembled per context. */
1341
1648
  readonly workingEnvironment?: FoundryResolver<FoundryWorkingEnvironmentDefinition | undefined, TInput>;
1342
1649
  /** One native Glove JavaScript, Python, or Lisp REPL mounted for this run. */
@@ -1360,6 +1667,13 @@ interface FoundryMeshConfig {
1360
1667
  readonly id?: string;
1361
1668
  };
1362
1669
  }
1670
+ /**
1671
+ * Whether a definition's `mesh` names your own transport (a config with an
1672
+ * adapter, or a resolver for one) rather than the mesh Foundry hosts.
1673
+ */
1674
+ declare function isMeshTransport<TInput>(mesh: true | FoundryMeshOptions | FoundryResolver<FoundryMeshConfig | undefined, TInput> | undefined): mesh is FoundryResolver<FoundryMeshConfig | undefined, TInput>;
1675
+ /** The hosted-mesh options a definition asks for, if it asks for the hosted mesh. */
1676
+ declare function hostedMeshOptions<TInput>(mesh: true | FoundryMeshOptions | FoundryResolver<FoundryMeshConfig | undefined, TInput> | undefined): FoundryMeshOptions | undefined;
1363
1677
  interface DefineAgentOptions extends AgentAssemblyOptions<FoundryRequest> {
1364
1678
  /** @deprecated File-routed agents derive identity from agents/<route>/agent.ts. */
1365
1679
  readonly id?: string;
@@ -1601,6 +1915,14 @@ interface AgentInstance {
1601
1915
  readonly id: string;
1602
1916
  readonly definitionId: string;
1603
1917
  readonly workspaceId: string;
1918
+ /**
1919
+ * Who this agent is, to people and to its peers on the mesh: "Sales
1920
+ * Outbound", "Maya's assistant". Data like the rest of the instance, so it
1921
+ * can change at any time without touching code. Defaults to the id.
1922
+ */
1923
+ readonly name?: string;
1924
+ /** What this agent does, in a sentence its peers can read to choose it. */
1925
+ readonly description?: string;
1604
1926
  /** Stable adapter-enforced key used by lazy subscription provisioning. */
1605
1927
  readonly provisioningKey?: string;
1606
1928
  readonly context: Readonly<Record<string, unknown>>;
@@ -1679,7 +2001,12 @@ interface FoundryPendingInbound {
1679
2001
  readonly createdAt: string;
1680
2002
  }
1681
2003
  interface FoundryWorkingEnvironmentSnapshotOwner {
1682
- readonly scope: "agent" | "conversation";
2004
+ /**
2005
+ * "agent": one snapshot per instance. "conversation": one per conversation.
2006
+ * "workspace": one for every agent in the workspace, such as a computer a
2007
+ * person's agents share; definitionId and agentId are empty.
2008
+ */
2009
+ readonly scope: "agent" | "conversation" | "workspace";
1683
2010
  readonly definitionId: string;
1684
2011
  readonly agentId: string;
1685
2012
  readonly conversationId: string;
@@ -1737,6 +2064,16 @@ interface FoundryDataAdapter {
1737
2064
  putPendingInbound?(record: FoundryPendingInbound): Effect.Effect<void, unknown, never>;
1738
2065
  deletePendingInbound?(id: string): Effect.Effect<void, unknown, never>;
1739
2066
  listPendingInbound?(): Effect.Effect<ReadonlyArray<FoundryPendingInbound>, unknown, never>;
2067
+ /**
2068
+ * Approvals (optional). With these and the event journal, an approval is
2069
+ * kept until someone decides: the run that asked suspends after a short
2070
+ * wait, the approval survives a restart, and a decision made later resumes
2071
+ * the run at the tool call that asked. Without them, an approval nobody
2072
+ * answers expires while its run waits.
2073
+ */
2074
+ putApproval?(approval: FoundryApproval): Effect.Effect<void, unknown, never>;
2075
+ getApproval?(id: string): Effect.Effect<FoundryApproval | null, unknown, never>;
2076
+ listApprovals?(): Effect.Effect<ReadonlyArray<FoundryApproval>, unknown, never>;
1740
2077
  getActivation(id: string): Effect.Effect<FoundryActivationRecord | null, unknown, never>;
1741
2078
  putActivation(activation: FoundryActivationRecord): Effect.Effect<void, unknown, never>;
1742
2079
  listActivations(workspaceId?: string): Effect.Effect<ReadonlyArray<FoundryActivationRecord>, unknown, never>;
@@ -1771,7 +2108,7 @@ interface FoundryRequest {
1771
2108
  readonly payload?: unknown;
1772
2109
  readonly context?: Readonly<Record<string, unknown>>;
1773
2110
  readonly source?: {
1774
- readonly kind: "direct" | "transmission" | "activation" | "spawn" | "background" | "delegation" | "agent-message";
2111
+ readonly kind: "direct" | "transmission" | "activation" | "spawn" | "background" | "delegation" | "agent-message" | "mesh";
1775
2112
  readonly id?: string;
1776
2113
  readonly provider?: string;
1777
2114
  readonly eventId?: string;
@@ -1796,7 +2133,11 @@ interface FoundryResult {
1796
2133
  readonly workspaceId: string;
1797
2134
  readonly suspension?: FoundrySuspension;
1798
2135
  }
1799
- /** Why a run ended without finishing: it went to sleep, or it asked a question. */
2136
+ /**
2137
+ * Why a run ended without finishing: it went to sleep, it asked a question
2138
+ * about a task delegated to it, it is waiting for a peer's reply on the mesh,
2139
+ * or a tool call waits for an approval.
2140
+ */
1800
2141
  type FoundrySuspension = {
1801
2142
  readonly kind?: "sleep";
1802
2143
  readonly commandId: string;
@@ -1806,12 +2147,24 @@ type FoundrySuspension = {
1806
2147
  readonly commandId: string;
1807
2148
  readonly delegationId: string;
1808
2149
  readonly question: string;
2150
+ } | {
2151
+ readonly kind: "mesh";
2152
+ readonly commandId: string;
2153
+ readonly threadId: string;
2154
+ readonly messageId: string;
2155
+ } | {
2156
+ /** Its tool call waits for a decision; the decision resumes it in a new run. */
2157
+ readonly kind: "approval";
2158
+ readonly approvalId: string;
2159
+ readonly toolName: string;
1809
2160
  };
1810
2161
  interface CreateAgentInstanceOptions {
1811
2162
  /** @internal Set only by durable worker provisioning. */
1812
2163
  readonly durableSubagent?: DurableSubagentOwnership;
1813
2164
  readonly id?: string;
1814
2165
  readonly workspaceId?: string;
2166
+ readonly name?: string;
2167
+ readonly description?: string;
1815
2168
  readonly context?: Readonly<Record<string, unknown>>;
1816
2169
  readonly installations?: ReadonlyArray<AgentInstallation>;
1817
2170
  readonly playbooks?: ReadonlyArray<AgentPlaybook>;
@@ -1821,6 +2174,8 @@ interface ProvisionAgentOptions extends CreateAgentInstanceOptions {
1821
2174
  readonly provisioningKey: string;
1822
2175
  }
1823
2176
  interface UpdateAgentInstanceOptions {
2177
+ readonly name?: string;
2178
+ readonly description?: string;
1824
2179
  readonly context?: Readonly<Record<string, unknown>>;
1825
2180
  readonly installations?: ReadonlyArray<AgentInstallation>;
1826
2181
  readonly playbooks?: ReadonlyArray<AgentPlaybook>;
@@ -1843,6 +2198,7 @@ declare class MemoryFoundryDataAdapter implements FoundryDataAdapter {
1843
2198
  private readonly inboundDeliveries;
1844
2199
  private readonly events;
1845
2200
  private readonly pendingInbound;
2201
+ private readonly approvals;
1846
2202
  private readonly activations;
1847
2203
  private readonly conversations;
1848
2204
  private readonly workspace;
@@ -1881,6 +2237,9 @@ declare class MemoryFoundryDataAdapter implements FoundryDataAdapter {
1881
2237
  putPendingInbound(record: FoundryPendingInbound): Effect.Effect<void, never, never>;
1882
2238
  deletePendingInbound(id: string): Effect.Effect<void, never, never>;
1883
2239
  listPendingInbound(): Effect.Effect<FoundryPendingInbound[], never, never>;
2240
+ putApproval(approval: FoundryApproval): Effect.Effect<void, never, never>;
2241
+ getApproval(id: string): Effect.Effect<FoundryApproval | null, never, never>;
2242
+ listApprovals(): Effect.Effect<FoundryApproval[], never, never>;
1884
2243
  getActivation(id: string): Effect.Effect<FoundryActivationRecord | null, never, never>;
1885
2244
  putActivation(activation: FoundryActivationRecord): Effect.Effect<void, never, never>;
1886
2245
  listActivations(workspaceId?: string): Effect.Effect<FoundryActivationRecord[], never, never>;
@@ -2004,7 +2363,7 @@ type FoundryConversationDelivery = (FoundryDelegationUpdate | FoundryDelegationR
2004
2363
  readonly kind: "agent-message";
2005
2364
  readonly pendingId: string;
2006
2365
  readonly message: string;
2007
- }) & {
2366
+ } | FoundryMeshDelivery) & {
2008
2367
  readonly deliveryId?: string;
2009
2368
  readonly request?: FoundryRequest;
2010
2369
  /** Durable journal identity; the filesystem mailbox is only a live transport. */
@@ -2014,6 +2373,15 @@ type FoundryConversationDelivery = (FoundryDelegationUpdate | FoundryDelegationR
2014
2373
  readonly policy: FoundryEventPolicy;
2015
2374
  };
2016
2375
  };
2376
+ /**
2377
+ * A message on the mesh Foundry hosts, for one side of a thread: the
2378
+ * recipient (the thread's own conversation) or the agent that started it.
2379
+ */
2380
+ interface FoundryMeshDelivery {
2381
+ readonly kind: "mesh";
2382
+ readonly side: "recipient" | "starter";
2383
+ readonly message: FoundryMeshMessage;
2384
+ }
2017
2385
  interface DelegationCommandBase {
2018
2386
  readonly id: string;
2019
2387
  readonly definitionId: string;
@@ -2066,4 +2434,4 @@ interface FoundryEventRecord {
2066
2434
  readonly createdAt: string;
2067
2435
  }
2068
2436
 
2069
- export { BindingId as $, type AgentHandlerContext as A, type AgentAssemblyContext as B, type Conversation as C, type AgentAssemblyOptions as D, type EnvironmentValue as E, type FoundryDelegationUpdate as F, AgentDefinitionId as G, type AgentDefinitionSurfaceContext as H, type InboundDeliveryClaim as I, type AgentFactoryContext as J, AgentId as K, type AgentInstallContext as L, type AgentInstallation as M, type AgentInstallationKind as N, OutboundRoute as O, type PlaybookSubscription as P, type AgentMessageReceipt as Q, type AgentPlaybookInput as R, type SharedInboxItem as S, type AgentProvisioningPolicy as T, type AgentRuntimeControls as U, type AnyFoundryAgent as V, type WorkspaceEntry as W, type AppRestrictions as X, type ApplicationConnectionContext as Y, type ApplicationConnectionState as Z, type ApplicationConnectionStatus as _, type FoundryDataAdapter as a, type FoundryCapabilityKind as a$, BindingNotFound as a0, CapabilityId as a1, type ComposedAgentPlaybook as a2, type ComposedAgentPlaybookInput as a3, type ConnectionReceiveInput as a4, type CreateAgentInstanceOptions as a5, type CreateConversationOptions as a6, type CustomProvisionedAgent as a7, type CustomProvisioningContext as a8, type DefineAgentOptions as a9, FOUNDRY_CORE_COMMAND_EVENT as aA, FOUNDRY_EVENT_PREFIX as aB, FOUNDRY_EXECUTION_MARKER as aC, FOUNDRY_LAYER_BRAND as aD, FOUNDRY_MCP_BRAND as aE, FOUNDRY_MEMORY_BRAND as aF, FOUNDRY_PLAYBOOK_ACTION_BRAND as aG, FOUNDRY_REPL_BRAND as aH, FOUNDRY_SCHEDULE_BRAND as aI, FOUNDRY_SHARED_TOOL_BRAND as aJ, FOUNDRY_SUBSCRIBER_BRAND as aK, FOUNDRY_TRANSMISSION_BRAND as aL, FOUNDRY_TRANSMISSION_EVENT_BRAND as aM, FOUNDRY_TRANSMISSION_PREDICATE_BRAND as aN, FOUNDRY_WORKING_ENVIRONMENT_BRAND as aO, type FoundryAccountSessionAdapter as aP, type FoundryAgent as aQ, type FoundryAgentComponent as aR, type FoundryAgentComposition as aS, type FoundryAgentConventionModule as aT, type FoundryAgentDefinition as aU, type FoundryAgentMode as aV, type FoundryApp as aW, type FoundryApplicationConnection as aX, type FoundryCall as aY, type FoundryCallContext as aZ, type FoundryCallOptions as a_, type DefineConnectionOptions as aa, type DefineFoundryReplOptions as ab, type DefineFoundryScheduleOptions as ac, type DefineFoundrySubagentOptions as ad, type DefineFoundryWorkingEnvironmentOptions as ae, type DefinePlaybookSubscriptionOptions as af, type DefinitionConfigInput as ag, type DurableSubagentOptions as ah, type DurableSubagentOwnership as ai, type DurableSubagents as aj, EMPTY_AGENT_COMPOSITION as ak, EMPTY_CAPABILITY_REGISTRY as al, EMPTY_NATIVE_REGISTRY as am, type EgressAdapter as an, type EgressContext as ao, EventId as ap, EventNotFound as aq, EventReference as ar, FOUNDRY_AGENT_APPLICATION_BRAND as as, FOUNDRY_AGENT_BRAND as at, FOUNDRY_AGENT_DEFINITION_BRAND as au, FOUNDRY_AGENT_FILE_ENV as av, FOUNDRY_AGENT_ROUTE_ENV as aw, FOUNDRY_APPLICATION_ENV as ax, FOUNDRY_COMPOSED_PLAYBOOK_BRAND as ay, FOUNDRY_CONNECTION_BRAND as az, type AgentInstance as b, type FoundrySuspension as b$, type FoundryCapabilityManifest as b0, type FoundryCapabilityManifestEntry as b1, type FoundryCapabilityRegistry as b2, type FoundryCompositionSource as b3, type FoundryContextProvider as b4, type FoundryCoreCommand as b5, type FoundryDelegate as b6, type FoundryDelegateOptions as b7, type FoundryDelegation as b8, type FoundryDelegationReply as b9, type FoundryMeshConfig as bA, type FoundryMessageInput as bB, type FoundryMessageOptions as bC, type FoundryMountedRepl as bD, type FoundryNativeManifest as bE, type FoundryNativeManifestEntry as bF, type FoundryNativeRegistry as bG, type FoundryPlaybookAction as bH, type FoundryProgrammaticToolContext as bI, type FoundryProgrammaticToolSelection as bJ, type FoundryProgrammaticTools as bK, type FoundryPythonReplDefinition as bL, type FoundryReplDefinition as bM, type FoundryRequest as bN, type FoundryResolvedMcp as bO, type FoundryResolver as bP, type FoundryResult as bQ, type FoundryRouteMap as bR, type FoundryScheduleDefinition as bS, type FoundryScheduleTiming as bT, type FoundryScheduleTimingInput as bU, type FoundrySharedTool as bV, type FoundrySubagentToolContext as bW, type FoundrySubscriber as bX, type FoundrySubscriberOptions as bY, type FoundrySubscriberSelection as bZ, type FoundrySurfaceContext as b_, type FoundryDelegationStatus as ba, type FoundryDomainError as bb, type FoundryEventPolicy as bc, type FoundryEventTarget as bd, type FoundryExecutionContext as be, type FoundryFactsOptions as bf, type FoundryFormsOptions as bg, type FoundryGoalsOptions as bh, type FoundryGuidanceHandles as bi, type FoundryGuidanceScope as bj, type FoundryHookDefinition as bk, type FoundryInstallable as bl, type FoundryInstanceProvisioner as bm, type FoundryJavaScriptReplDefinition as bn, type FoundryLayer as bo, type FoundryLayerOptions as bp, type FoundryLayerReference as bq, type FoundryLayerSelection as br, type FoundryLispReplDefinition as bs, type FoundryListResolver as bt, type FoundryMcp as bu, type FoundryMcpOptions as bv, type FoundryMemoryProfile as bw, type FoundryMemoryProfileOptions as bx, type FoundryMemoryReference as by, type FoundryMemorySelection as bz, type FoundryActivationRecord as c, defineConnection as c$, type FoundryToolBody as c0, type FoundryTransmission as c1, type FoundryTransmissionDelivery as c2, type FoundryTransmissionEvent as c3, type FoundryTransmissionPredicate as c4, type FoundryVfs as c5, type FoundryVfsHandle as c6, type FoundryWorkingEnvironmentCreateContext as c7, type FoundryWorkingEnvironmentDefinition as c8, type FoundryWorkingEnvironmentPersistenceAdapter as c9, RouteNotFound as cA, RunGrant as cB, RunId as cC, type SharedToolOptions as cD, TopologyConflict as cE, type TransmissionEventDirection as cF, type TransmissionEventOptions as cG, TransmissionId as cH, type TransmissionOptions as cI, type TransmissionPredicateOptions as cJ, type TransmissionSerializationContext as cK, type UpdateAgentInstanceOptions as cL, type UpdateConversationOptions as cM, composeAgent as cN, composePlaybook as cO, configureLayer as cP, configureMemory as cQ, createAgentInstance as cR, createConversation as cS, createFoundryCoreTools as cT, createInstalledApplicationTransmissionTools as cU, defineAgent as cV, defineAgentApplication as cW, defineAgentFromModule as cX, defineAgentInstance as cY, defineApp as cZ, defineCall as c_, type FoundryWorkingEnvironmentPersistenceContext as ca, GrantResolutionError as cb, type InboundContract as cc, type InferAgentInput as cd, type InferAgentOutput as ce, type InferInboundEvent as cf, type InferOutboundInput as cg, type InferOutboundOutput as ch, type IngressAdapter as ci, type IngressContext as cj, type InstallationSelection as ck, type McpAdapterFactory as cl, MemoryFoundryDataAdapter as cm, type OutboundContract as cn, type PlaybookActionOptions as co, type PlaybookDirective as cp, type PlaybookDirectiveInput as cq, type PlaybookMatch as cr, type PlaybookMatchInput as cs, type PlaybookOutboundDirective as ct, type PlaybookOutboundInput as cu, type PlaybookSubscriptionTarget as cv, type PlaybookSubscriptionTargetInput as cw, ReplyPolicy as cx, Route as cy, RouteId as cz, type ProvisionAgentOptions as d, defineFacts as d0, defineForms as d1, defineGoals as d2, defineLayer as d3, defineMcp as d4, defineMemory as d5, definePlaybookAction as d6, definePlaybookSubscription as d7, defineRepl as d8, defineRoutes as d9, reconstructAgentInstance as dA, reconstructPlaybook as dB, reconstructPlaybookSubscription as dC, restrictApp as dD, routeFromInternalAgentName as dE, toGloveMessage as dF, toGloveRequestInput as dG, transmissionPredicate as dH, defineSchedule as da, defineSharedTool as db, defineSubagent as dc, defineSubscriber as dd, defineTransmission as de, defineTransmissionEvent as df, defineTransmissionPredicate as dg, defineWorkingEnvironment as dh, foundryDataEnvironmentPersistence as di, foundryGuidanceSubject as dj, install as dk, installRegistry as dl, installationKey as dm, installedApplicationTransmissionToolName as dn, internalAgentName as dp, isFoundryAgent as dq, isFoundryAgentDefinition as dr, isFoundryCapability as ds, isFoundryLayer as dt, isFoundrySchedule as du, isFoundrySubscriber as dv, isFoundryTransmission as dw, isInboxCapableStore as dx, mountAgentDefinitionMemory as dy, mountFoundrySurfaces as dz, type FoundryEventRecord as e, type FoundryPendingInbound as f, type FoundryWorkingEnvironmentSnapshotOwner as g, type FoundryTask as h, type AgentPlaybook as i, type AnyFoundryTransmission as j, AccountReference as k, type InferAccountMetadata as l, AgentBinding as m, type FoundryAgentApplication as n, InboundRoute as o, type CapabilityDefinition as p, type InferInboundConfig as q, type InferOutboundConfig as r, type AccountContract as s, AccountId as t, AccountNotFound as u, AccountSessionUnavailable as v, AccountSummary as w, type AgentApplicationContribution as x, type AgentApplicationInstallContext as y, type AgentApplicationOptions as z };
2437
+ export { type ApplicationConnectionState as $, type AgentHandlerContext as A, type AgentApplicationInstallContext as B, type Conversation as C, type AgentApplicationOptions as D, type EnvironmentValue as E, type FoundryDelegationUpdate as F, type AgentAssemblyContext as G, type AgentAssemblyOptions as H, type InboundDeliveryClaim as I, AgentDefinitionId as J, type AgentDefinitionSurfaceContext as K, type AgentFactoryContext as L, AgentId as M, type AgentInstallContext as N, OutboundRoute as O, type PlaybookSubscription as P, type AgentInstallation as Q, type AgentInstallationKind as R, type SharedInboxItem as S, type AgentMessageReceipt as T, type AgentPlaybookInput as U, type AgentProvisioningPolicy as V, type WorkspaceEntry as W, type AgentRuntimeControls as X, type AnyFoundryAgent as Y, type AppRestrictions as Z, type ApplicationConnectionContext as _, type FoundryMeshMessage as a, type FoundryApp as a$, type ApplicationConnectionStatus as a0, BindingId as a1, BindingNotFound as a2, CapabilityId as a3, type ComposedAgentPlaybook as a4, type ComposedAgentPlaybookInput as a5, type ConnectionReceiveInput as a6, type CreateAgentInstanceOptions as a7, type CreateConversationOptions as a8, type CustomProvisionedAgent as a9, FOUNDRY_AGENT_ROUTE_ENV as aA, FOUNDRY_APPLICATION_ENV as aB, FOUNDRY_APPROVAL_DIRECTORY_ENV as aC, FOUNDRY_COMPOSED_PLAYBOOK_BRAND as aD, FOUNDRY_CONNECTION_BRAND as aE, FOUNDRY_CORE_COMMAND_EVENT as aF, FOUNDRY_EVENT_PREFIX as aG, FOUNDRY_EXECUTION_MARKER as aH, FOUNDRY_LAYER_BRAND as aI, FOUNDRY_MCP_BRAND as aJ, FOUNDRY_MEMORY_BRAND as aK, FOUNDRY_PLAYBOOK_ACTION_BRAND as aL, FOUNDRY_REPL_BRAND as aM, FOUNDRY_SCHEDULE_BRAND as aN, FOUNDRY_SHARED_TOOL_BRAND as aO, FOUNDRY_SUBSCRIBER_BRAND as aP, FOUNDRY_TRANSMISSION_BRAND as aQ, FOUNDRY_TRANSMISSION_EVENT_BRAND as aR, FOUNDRY_TRANSMISSION_PREDICATE_BRAND as aS, FOUNDRY_WORKING_ENVIRONMENT_BRAND as aT, type FoundryAccountSessionAdapter as aU, type FoundryAgent as aV, type FoundryAgentComponent as aW, type FoundryAgentComposition as aX, type FoundryAgentConventionModule as aY, type FoundryAgentDefinition as aZ, type FoundryAgentMode as a_, type CustomProvisioningContext as aa, DEFAULT_APPROVAL_EXPIRES_AFTER_MS as ab, DEFAULT_APPROVAL_WAIT_MS as ac, type DefineAgentOptions as ad, type DefineConnectionOptions as ae, type DefineFoundryReplOptions as af, type DefineFoundryScheduleOptions as ag, type DefineFoundrySubagentOptions as ah, type DefineFoundryWorkingEnvironmentOptions as ai, type DefinePlaybookSubscriptionOptions as aj, type DefinitionConfigInput as ak, type DurableSubagentOptions as al, type DurableSubagentOwnership as am, type DurableSubagents as an, EMPTY_AGENT_COMPOSITION as ao, EMPTY_CAPABILITY_REGISTRY as ap, EMPTY_NATIVE_REGISTRY as aq, type EgressAdapter as ar, type EgressContext as as, EventId as at, EventNotFound as au, EventReference as av, FOUNDRY_AGENT_APPLICATION_BRAND as aw, FOUNDRY_AGENT_BRAND as ax, FOUNDRY_AGENT_DEFINITION_BRAND as ay, FOUNDRY_AGENT_FILE_ENV as az, type FoundryDataAdapter as b, type FoundryProgrammaticTools as b$, type FoundryAppMcp as b0, type FoundryAppMcpTool as b1, type FoundryAppToolDecision as b2, type FoundryApplicationConnection as b3, type FoundryApprovalDecision as b4, FoundryApprovalDisplayManager as b5, type FoundryApprovalPolicy as b6, type FoundryApprovalStatus as b7, type FoundryCall as b8, type FoundryCallContext as b9, type FoundryJavaScriptReplDefinition as bA, type FoundryLayer as bB, type FoundryLayerOptions as bC, type FoundryLayerReference as bD, type FoundryLayerSelection as bE, type FoundryLispReplDefinition as bF, type FoundryListResolver as bG, type FoundryMcp as bH, type FoundryMcpOptions as bI, type FoundryMemoryProfile as bJ, type FoundryMemoryProfileOptions as bK, type FoundryMemoryReference as bL, type FoundryMemorySelection as bM, type FoundryMeshConfig as bN, type FoundryMeshOptions as bO, type FoundryMeshParty as bP, type FoundryMeshThread as bQ, type FoundryMeshThreadStatus as bR, type FoundryMessageInput as bS, type FoundryMessageOptions as bT, type FoundryMountedRepl as bU, type FoundryNativeManifest as bV, type FoundryNativeManifestEntry as bW, type FoundryNativeRegistry as bX, type FoundryPlaybookAction as bY, type FoundryProgrammaticToolContext as bZ, type FoundryProgrammaticToolSelection as b_, type FoundryCallOptions as ba, type FoundryCapabilityKind as bb, type FoundryCapabilityManifest as bc, type FoundryCapabilityManifestEntry as bd, type FoundryCapabilityRegistry as be, type FoundryCompositionSource as bf, type FoundryContextProvider as bg, type FoundryCoreCommand as bh, type FoundryDelegate as bi, type FoundryDelegateOptions as bj, type FoundryDelegation as bk, type FoundryDelegationReply as bl, type FoundryDelegationStatus as bm, type FoundryDomainError as bn, type FoundryEventPolicy as bo, type FoundryEventTarget as bp, type FoundryExecutionContext as bq, type FoundryFactsOptions as br, type FoundryFormsOptions as bs, type FoundryGoalsOptions as bt, type FoundryGuidanceHandles as bu, type FoundryGuidanceScope as bv, type FoundryHookDefinition as bw, type FoundryInstallable as bx, type FoundryInstalledApp as by, type FoundryInstanceProvisioner as bz, type AgentInstance as c, type TransmissionPredicateOptions as c$, type FoundryPythonReplDefinition as c0, type FoundryReplApp as c1, type FoundryReplDefinition as c2, type FoundryRequest as c3, type FoundryResolvedMcp as c4, type FoundryResolver as c5, type FoundryResult as c6, type FoundryRouteMap as c7, type FoundryScheduleDefinition as c8, type FoundryScheduleTiming as c9, type IngressAdapter as cA, type IngressContext as cB, type InstallationSelection as cC, type McpAdapterFactory as cD, MemoryFoundryDataAdapter as cE, type OutboundContract as cF, type PlaybookActionOptions as cG, type PlaybookDirective as cH, type PlaybookDirectiveInput as cI, type PlaybookMatch as cJ, type PlaybookMatchInput as cK, type PlaybookOutboundDirective as cL, type PlaybookOutboundInput as cM, type PlaybookSubscriptionTarget as cN, type PlaybookSubscriptionTargetInput as cO, ReplyPolicy as cP, Route as cQ, RouteId as cR, RouteNotFound as cS, RunGrant as cT, RunId as cU, type SharedToolOptions as cV, TopologyConflict as cW, type TransmissionEventDirection as cX, type TransmissionEventOptions as cY, TransmissionId as cZ, type TransmissionOptions as c_, type FoundryScheduleTimingInput as ca, type FoundrySharedTool as cb, type FoundrySubagentToolContext as cc, type FoundrySubscriber as cd, type FoundrySubscriberOptions as ce, type FoundrySubscriberSelection as cf, type FoundrySurfaceContext as cg, type FoundrySuspension as ch, type FoundryToolBody as ci, type FoundryTransmission as cj, type FoundryTransmissionDelivery as ck, type FoundryTransmissionEvent as cl, type FoundryTransmissionPredicate as cm, type FoundryVfs as cn, type FoundryVfsHandle as co, type FoundryWorkingEnvironmentCreateContext as cp, type FoundryWorkingEnvironmentDefinition as cq, type FoundryWorkingEnvironmentPersistenceAdapter as cr, type FoundryWorkingEnvironmentPersistenceContext as cs, GrantResolutionError as ct, type InboundContract as cu, type InferAgentInput as cv, type InferAgentOutput as cw, type InferInboundEvent as cx, type InferOutboundInput as cy, type InferOutboundOutput as cz, type FoundryActivationRecord as d, restrictApp as d$, type TransmissionSerializationContext as d0, type UpdateAgentInstanceOptions as d1, type UpdateConversationOptions as d2, composeAgent as d3, composePlaybook as d4, configureLayer as d5, configureMemory as d6, createAgentInstance as d7, createConversation as d8, createFoundryApproval as d9, defineTransmissionPredicate as dA, defineWorkingEnvironment as dB, foundryDataEnvironmentPersistence as dC, foundryGuidanceSubject as dD, hostedMeshOptions as dE, install as dF, installRegistry as dG, installationKey as dH, installedApplicationTransmissionToolName as dI, internalAgentName as dJ, isFoundryAgent as dK, isFoundryAgentDefinition as dL, isFoundryCapability as dM, isFoundryLayer as dN, isFoundrySchedule as dO, isFoundrySubscriber as dP, isFoundryTransmission as dQ, isInboxCapableStore as dR, isMeshTransport as dS, listFoundryApprovals as dT, meshIdentity as dU, mountAgentDefinitionMemory as dV, mountFoundrySurfaces as dW, reconstructAgentInstance as dX, reconstructPlaybook as dY, reconstructPlaybookSubscription as dZ, resolveFoundryApproval as d_, createFoundryCoreTools as da, createInstalledApplicationTransmissionTools as db, defineAgent as dc, defineAgentApplication as dd, defineAgentFromModule as de, defineAgentInstance as df, defineApp as dg, defineCall as dh, defineConnection as di, defineFacts as dj, defineForms as dk, defineGoals as dl, defineLayer as dm, defineMcp as dn, defineMemory as dp, definePlaybookAction as dq, definePlaybookSubscription as dr, defineRepl as ds, defineRoutes as dt, defineSchedule as du, defineSharedTool as dv, defineSubagent as dw, defineSubscriber as dx, defineTransmission as dy, defineTransmissionEvent as dz, type ProvisionAgentOptions as e, routeFromInternalAgentName as e0, toGloveMessage as e1, toGloveRequestInput as e2, transmissionPredicate as e3, withFoundryPermissions as e4, type FoundryEventRecord as f, type FoundryPendingInbound as g, type FoundryApproval as h, type FoundryWorkingEnvironmentSnapshotOwner as i, type FoundryTask as j, type AgentPlaybook as k, type AnyFoundryTransmission as l, AccountReference as m, type InferAccountMetadata as n, AgentBinding as o, type FoundryAgentApplication as p, InboundRoute as q, type CapabilityDefinition as r, type InferInboundConfig as s, type InferOutboundConfig as t, type AccountContract as u, AccountId as v, AccountNotFound as w, AccountSessionUnavailable as x, AccountSummary as y, type AgentApplicationContribution as z };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  FOUNDRY_AGENT_FILE_ENV,
3
3
  FOUNDRY_AGENT_ROUTE_ENV
4
- } from "./chunk-64UBLGYM.js";
4
+ } from "./chunk-CYOIHSUX.js";
5
5
 
6
6
  // src/execution-agent.ts
7
7
  var route = process.env[FOUNDRY_AGENT_ROUTE_ENV];