glove-foundry 0.3.2 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +1,17 @@
1
- import { ContentPart, Message, IGloveRunnable, StoreAdapter, GloveFoldArgs, SubscriberAdapter, ModelAdapter, DisplayManagerAdapter, HookHandler, DefineSkillArgs, DefineSubAgentArgs, InboxItem } from 'glove-core';
1
+ import { ContentPart, Message, IGloveRunnable, StoreAdapter, GloveFoldArgs, Tool, SubscriberAdapter, ModelAdapter, DisplayManagerAdapter, HookHandler, DefineSkillArgs, DefineSubAgentArgs, RuntimeContextProvider, InboxItem, Displaymanager, Slot, TokenConsumptionCounter } from 'glove-core';
2
2
  import { Schema, Effect, Context, Layer } from 'effect';
3
3
  import { z } from 'zod';
4
4
  import { MeshAdapter, AgentIdentity } from 'glove-mesh';
5
5
  import { McpCatalogueEntry, McpAdapter } from 'glove-mcp';
6
6
  import { EntityMemoryAdapter, EpisodicMemoryAdapter, ResourceFsAdapter, ContextAdapter } from 'glove-memory';
7
- import { MemoryToolOptions } from 'glove-memory/tools';
7
+ import { MemoryToolOptions, UseGoalRunnerConfig, UseFormRunnerConfig } from 'glove-memory/tools';
8
8
  import { EnvSnapshot, EnvFsHandle, WorkingEnvironment, CreateWorkingEnvironmentOptions, MountWorkingEnvironmentConfig, Vfs } from 'glove-working-environment';
9
9
  import { JsSession, MountJsConfig } from 'glove-js';
10
10
  import { LispSession, MountLispConfig } from 'glove-lisp';
11
11
  import { PySession, MountPyConfig } from 'glove-python';
12
+ import { FactAdapter, FactScope, FactStore, FactInput } from 'glove-facts';
13
+ import { GoalAdapter, GoalScope, GoalProgram, GoalRunner } from 'glove-memory/goals';
14
+ import { FormAdapter, FormRunner } from 'glove-memory/forms';
12
15
  import * as effect_Brand from 'effect/Brand';
13
16
  import { FoundryConfig } from './config.js';
14
17
 
@@ -345,6 +348,13 @@ interface EgressContext {
345
348
  readonly route: OutboundRoute;
346
349
  readonly account?: AccountReference;
347
350
  readonly grant: RunGrant;
351
+ /** Cancels provider work when an awaiting agent call is stopped or expires. */
352
+ readonly signal: AbortSignal;
353
+ /**
354
+ * Enter the agent definition's user-owned credential/session boundary for
355
+ * this delivery. Foundry never receives the credential value itself.
356
+ */
357
+ readonly withAccountSession?: <A>(operation: string, use: (session: unknown) => Effect.Effect<A, unknown, never>) => Effect.Effect<A, unknown, never>;
348
358
  }
349
359
  /** Provider ingress remains adapter-owned and returns typed Effects. */
350
360
  interface IngressAdapter<TEvent, TError = never, TRequirements = never> {
@@ -374,6 +384,21 @@ interface OutboundContract<TConfig extends Schema.Schema.AnyNoContext = Schema.S
374
384
  readonly config: TConfig;
375
385
  readonly input: TInput;
376
386
  readonly output: TOutput;
387
+ /** Require Glove's exact-input approval before this outbound effect is dispatched. */
388
+ readonly requiresPermission?: boolean | ((input: Schema.Schema.Type<TInput>) => boolean);
389
+ /**
390
+ * Project provider output into the model-visible tool result. Use this to
391
+ * omit large or sensitive presentation-only bytes without weakening the
392
+ * adapter's typed output contract.
393
+ */
394
+ readonly project?: (output: Schema.Schema.Type<TOutput>) => unknown;
395
+ /** Project provider output into UI-only render data retained with tool history. */
396
+ readonly render?: (output: Schema.Schema.Type<TOutput>) => unknown;
397
+ /**
398
+ * Project the validated outbound input into secret-safe observability data.
399
+ * The execution payload still reaches the adapter but is never retained.
400
+ */
401
+ readonly observe?: (input: Schema.Schema.Type<TInput>) => unknown;
377
402
  readonly adapter?: EgressAdapter<Schema.Schema.Type<TInput>, Schema.Schema.Type<TOutput>, TError, TRequirements>;
378
403
  }
379
404
  interface TransmissionOptions {
@@ -411,6 +436,16 @@ interface ConnectionReceiveInput {
411
436
  readonly route: InboundRoute;
412
437
  readonly eventId: string;
413
438
  readonly threadKey: string;
439
+ /** Optional durable conversation key, independent of the provider thread. */
440
+ readonly conversationKey?: string;
441
+ /** Route is the safe default; agent lets a trusted identity adapter join routes. */
442
+ readonly conversationScope?: "route" | "agent";
443
+ /**
444
+ * Keep this connection's receive effect open until every dispatched agent
445
+ * run reaches a terminal state. Stateful transports can use this to
446
+ * serialize turns that share a durable conversation.
447
+ */
448
+ readonly awaitCompletion?: boolean;
414
449
  readonly raw: unknown;
415
450
  }
416
451
  interface ApplicationConnectionContext {
@@ -653,7 +688,7 @@ interface FoundryActivationRecord {
653
688
  readonly scheduleName?: string;
654
689
  /** Hash of the last reconciled definition value; runtime edits remain overrides. */
655
690
  readonly definitionRevision?: string;
656
- readonly status: "pending" | "active" | "completed" | "cancelled";
691
+ readonly status: "pending" | "active" | "paused" | "completed" | "cancelled";
657
692
  readonly createdByRunId: string;
658
693
  readonly lastRunId?: string;
659
694
  readonly createdAt: string;
@@ -681,6 +716,8 @@ interface FoundryDataAdapter {
681
716
  listConversations(agentId: string): Effect.Effect<ReadonlyArray<Conversation>, unknown, never>;
682
717
  getWorkspaceEntry(workspaceId: string, key: string): Effect.Effect<WorkspaceEntry | null, unknown, never>;
683
718
  putWorkspaceEntry(entry: WorkspaceEntry): Effect.Effect<void, unknown, never>;
719
+ /** Atomic optimistic update. null requires absence; updates must advance updatedAt. */
720
+ compareAndSetWorkspaceEntry?(entry: WorkspaceEntry, expectedUpdatedAt: string | null): Effect.Effect<boolean, unknown, never>;
684
721
  listWorkspaceEntries(workspaceId: string): Effect.Effect<ReadonlyArray<WorkspaceEntry>, unknown, never>;
685
722
  /** Private VFS persistence; snapshots are never exposed as workspace entries. */
686
723
  getWorkingEnvironmentSnapshot(owner: FoundryWorkingEnvironmentSnapshotOwner): Effect.Effect<EnvSnapshot | null, unknown, never>;
@@ -753,6 +790,10 @@ interface CreateConversationOptions {
753
790
  readonly title?: string;
754
791
  readonly context?: Readonly<Record<string, unknown>>;
755
792
  }
793
+ interface UpdateConversationOptions {
794
+ readonly title?: string;
795
+ readonly context?: Readonly<Record<string, unknown>>;
796
+ }
756
797
  declare class MemoryFoundryDataAdapter implements FoundryDataAdapter {
757
798
  readonly identifier: string;
758
799
  private readonly agents;
@@ -798,6 +839,7 @@ declare class MemoryFoundryDataAdapter implements FoundryDataAdapter {
798
839
  listConversations(agentId: string): Effect.Effect<Conversation[], never, never>;
799
840
  getWorkspaceEntry(workspaceId: string, key: string): Effect.Effect<WorkspaceEntry | null, never, never>;
800
841
  putWorkspaceEntry(entry: WorkspaceEntry): Effect.Effect<void, never, never>;
842
+ compareAndSetWorkspaceEntry(entry: WorkspaceEntry, expectedUpdatedAt: string | null): Effect.Effect<boolean, never, never>;
801
843
  listWorkspaceEntries(workspaceId: string): Effect.Effect<WorkspaceEntry[], never, never>;
802
844
  getWorkingEnvironmentSnapshot(owner: FoundryWorkingEnvironmentSnapshotOwner): Effect.Effect<EnvSnapshot | null, never, never>;
803
845
  putWorkingEnvironmentSnapshot(owner: FoundryWorkingEnvironmentSnapshotOwner, snapshot: EnvSnapshot): Effect.Effect<void, never, never>;
@@ -922,8 +964,16 @@ interface FoundryMcpOptions<TConfigSchema extends z.ZodType | undefined = undefi
922
964
  readonly id?: string;
923
965
  readonly description?: string;
924
966
  readonly config?: TConfigSchema;
925
- readonly entry: Omit<McpCatalogueEntry, "id">;
967
+ /**
968
+ * Static catalogue metadata or a lazy, instance-configured resolver.
969
+ *
970
+ * The resolver receives decoded installation data but never credentials.
971
+ * Auth remains the responsibility of the agent-owned `mcpAdapter` and is
972
+ * resolved only when glove-mcp opens a connection.
973
+ */
974
+ readonly entry: McpCatalogueEntryWithoutId | ((context: AgentApplicationInstallContext<TConfigSchema extends z.ZodType ? z.output<TConfigSchema> : unknown>) => McpCatalogueEntryWithoutId | Promise<McpCatalogueEntryWithoutId> | Effect.Effect<McpCatalogueEntryWithoutId, unknown, never>);
926
975
  }
976
+ type McpCatalogueEntryWithoutId = McpCatalogueEntry extends infer Entry ? Entry extends unknown ? Omit<Entry, "id"> : never : never;
927
977
  type FoundryMcp<TConfigSchema extends z.ZodType | undefined = any> = Readonly<FoundryMcpOptions<TConfigSchema>> & {
928
978
  readonly id: string;
929
979
  readonly [FOUNDRY_MCP_BRAND]: true;
@@ -980,8 +1030,16 @@ declare const EMPTY_CAPABILITY_REGISTRY: FoundryCapabilityRegistry;
980
1030
  interface McpAdapterFactory {
981
1031
  (context: Omit<AgentInstallContext, "installation" | "config"> & {
982
1032
  readonly installed: ReadonlyArray<FoundryMcp>;
1033
+ /** Fully decoded, per-instance MCP selections for this assembly. */
1034
+ readonly resolved: ReadonlyArray<FoundryResolvedMcp>;
983
1035
  }): Effect.Effect<McpAdapter, unknown, never>;
984
1036
  }
1037
+ interface FoundryResolvedMcp {
1038
+ readonly definition: FoundryMcp;
1039
+ readonly installation: AgentInstallation;
1040
+ readonly config: unknown;
1041
+ readonly entry: McpCatalogueEntry;
1042
+ }
985
1043
  declare function isInboxCapableStore(store: StoreAdapter): store is StoreAdapter & Required<Pick<StoreAdapter, "getInboxItems" | "addInboxItem" | "updateInboxItem" | "getResolvedInboxItems">>;
986
1044
  interface FoundryMemoryReference<TProfile extends FoundryMemoryProfile<any> = FoundryMemoryProfile<any>> {
987
1045
  readonly profile: TProfile;
@@ -1074,6 +1132,44 @@ declare function foundryDataEnvironmentPersistence(options?: {
1074
1132
  }): FoundryWorkingEnvironmentPersistenceAdapter;
1075
1133
  interface FoundryReplBase {
1076
1134
  readonly [FOUNDRY_REPL_BRAND]: true;
1135
+ /**
1136
+ * Project an explicit set of the fully assembled agent's tools into the
1137
+ * sandbox as ordinary functions. Selection happens after applications,
1138
+ * installed capabilities, memory, mesh, calls, and `configure` have mounted.
1139
+ *
1140
+ * Returning the actual tool values keeps code relationships referential;
1141
+ * Foundry never accepts a second list of copied string ids here.
1142
+ */
1143
+ readonly programmaticTools?: FoundryProgrammaticTools;
1144
+ }
1145
+ interface FoundryProgrammaticToolSelection {
1146
+ /** One of the exact live tools supplied to the selector context. */
1147
+ readonly tool: Tool<unknown>;
1148
+ /** Optional valid interpreter identifier when the tool name is unsuitable. */
1149
+ readonly name?: string;
1150
+ /** Informational effect hint used by capability discovery. */
1151
+ readonly readOnly?: boolean;
1152
+ /** Optional capability group used by progressive discovery. */
1153
+ readonly server?: string;
1154
+ readonly serverDescription?: string;
1155
+ readonly resultShape?: string;
1156
+ }
1157
+ interface FoundryProgrammaticToolContext {
1158
+ readonly assembly: AgentAssemblyContext<FoundryRequest>;
1159
+ readonly glove: IGloveRunnable;
1160
+ /** Snapshot of every tool mounted before the programmatic surface itself. */
1161
+ readonly tools: ReadonlyArray<Tool<unknown>>;
1162
+ readonly workingEnvironment?: WorkingEnvironment;
1163
+ readonly vfs?: EnvFsHandle;
1164
+ }
1165
+ interface FoundryProgrammaticTools {
1166
+ /**
1167
+ * Select direct live tool references. A selection may decorate its callable
1168
+ * name and discovery metadata without replacing the underlying capability.
1169
+ */
1170
+ readonly select: (context: FoundryProgrammaticToolContext) => Resolvable<ReadonlyArray<Tool<unknown> | FoundryProgrammaticToolSelection>>;
1171
+ /** Total underlying calls permitted during this assembled run. Default 50. */
1172
+ readonly maxCalls?: number;
1077
1173
  }
1078
1174
  type FoundryJavaScriptReplDefinition = FoundryReplBase & Readonly<{
1079
1175
  readonly language: "javascript";
@@ -1193,11 +1289,17 @@ declare function isFoundryLayer(value: unknown): value is FoundryLayer;
1193
1289
  declare function isFoundrySubscriber(value: unknown): value is FoundrySubscriber;
1194
1290
 
1195
1291
  type FoundryAgentComponent = FoundrySharedTool<any> | FoundryAgentApplication | FoundryMcp | FoundryMemoryProfile | FoundryLayer<any> | FoundrySubscriber;
1292
+ /**
1293
+ * A colocated `*.tool.ts` may export the Glove tool body directly. Foundry
1294
+ * supplies the runtime tool name from the file route, so the authored module
1295
+ * never has to repeat its identity as a string.
1296
+ */
1297
+ type FoundryToolBody = Omit<GloveFoldArgs<any>, "name">;
1196
1298
  interface FoundryAgentComposition {
1197
1299
  readonly capabilities: FoundryCapabilityRegistry;
1198
1300
  readonly native: FoundryNativeRegistry;
1199
1301
  }
1200
- type FoundryCompositionSource = FoundryAgentComponent | FoundryAgentComposition | ReadonlyArray<FoundryCompositionSource> | (() => FoundryCompositionSource) | false | null | undefined;
1302
+ type FoundryCompositionSource = FoundryAgentComponent | FoundryToolBody | FoundryAgentComposition | ReadonlyArray<FoundryCompositionSource> | (() => FoundryCompositionSource) | false | null | undefined;
1201
1303
  /**
1202
1304
  * Compose colocated, headless agent parts into one immutable catalogue.
1203
1305
  * Functions are factories, not runtime installers: they return definitions and
@@ -1273,6 +1375,22 @@ type FoundryCoreCommand = {
1273
1375
  readonly payload?: unknown;
1274
1376
  readonly timing?: FoundryScheduleTiming;
1275
1377
  };
1378
+ } | {
1379
+ readonly id: string;
1380
+ readonly type: "schedule.pause";
1381
+ readonly definitionId: string;
1382
+ readonly agentId: string;
1383
+ readonly conversationId: string;
1384
+ readonly workspaceId: string;
1385
+ readonly activationId: string;
1386
+ } | {
1387
+ readonly id: string;
1388
+ readonly type: "schedule.resume";
1389
+ readonly definitionId: string;
1390
+ readonly agentId: string;
1391
+ readonly conversationId: string;
1392
+ readonly workspaceId: string;
1393
+ readonly activationId: string;
1276
1394
  } | {
1277
1395
  readonly id: string;
1278
1396
  readonly type: "schedule.cancel";
@@ -1309,13 +1427,22 @@ type FoundryCoreCommand = {
1309
1427
  readonly workspaceId: string;
1310
1428
  readonly routeId: string;
1311
1429
  readonly payload: unknown;
1430
+ readonly observability?: unknown;
1312
1431
  readonly applicationId?: string;
1313
1432
  readonly transmissionId?: string;
1314
1433
  };
1434
+ /** Resolve an installed app's generated outbound tool without duplicating ids. */
1435
+ declare function installedApplicationTransmissionToolName(application: {
1436
+ readonly id: string;
1437
+ }, transmission: {
1438
+ readonly id: string;
1439
+ }): string;
1315
1440
  /**
1316
1441
  * Installed apps expose one namespaced Glove tool per outbound transmission.
1317
- * The tool only queues a parent-runtime command; grants and delivery adapters
1318
- * remain authoritative outside the agent subprocess.
1442
+ * The parent runtime remains authoritative for grants, credentials, and the
1443
+ * delivery adapter. A private request/result bridge returns the adapter's
1444
+ * validated output to the calling tool without moving those concerns into the
1445
+ * agent subprocess.
1319
1446
  */
1320
1447
  declare function createInstalledApplicationTransmissionTools(context: AgentAssemblyContext, applications: ReadonlyArray<FoundryAgentApplication>, installations: ReadonlyArray<AgentInstallation>, playbooks?: ReadonlyArray<AgentPlaybook>): ReadonlyArray<GloveFoldArgs<any>>;
1321
1448
  /** Framework-owned orchestration tools. They emit commands for Foundry's runtime adapters. */
@@ -1323,6 +1450,46 @@ declare function createFoundryCoreTools(context: AgentAssemblyContext, desiredSc
1323
1450
  readonly type: "schedule.sync";
1324
1451
  }>["schedules"]): ReadonlyArray<GloveFoldArgs<any>>;
1325
1452
 
1453
+ /** Conversation isolation is the default. Instance scope deliberately shares conversations. */
1454
+ type FoundryGuidanceScope = "conversation" | "instance";
1455
+ interface FoundryFactsOptions {
1456
+ readonly adapter: FactAdapter;
1457
+ readonly scope?: FoundryGuidanceScope | FactScope;
1458
+ readonly maxRevisions?: number;
1459
+ readonly onUrgent?: ConstructorParameters<typeof FactStore>[1]["onUrgent"];
1460
+ /** A dedicated native runnable, never the conversational runnable. */
1461
+ readonly preparationAgent?: IGloveRunnable;
1462
+ readonly source?: () => {
1463
+ source: FactInput["source"];
1464
+ operationId: string;
1465
+ };
1466
+ }
1467
+ interface FoundryGoalsOptions extends Omit<UseGoalRunnerConfig<IGloveRunnable>, "scope" | "preparation"> {
1468
+ readonly adapter: GoalAdapter;
1469
+ readonly scope?: FoundryGuidanceScope | GoalScope;
1470
+ /** Starts only if absent. Revisions require the native runner's explicit CAS operation. */
1471
+ readonly program?: GoalProgram;
1472
+ readonly preparation?: Omit<NonNullable<UseGoalRunnerConfig["preparation"]>, "preparer">;
1473
+ }
1474
+ interface FoundryFormsOptions extends Omit<UseFormRunnerConfig, "subject" | "preparation"> {
1475
+ readonly adapter: FormAdapter;
1476
+ readonly scope?: FoundryGuidanceScope | {
1477
+ readonly subject: string;
1478
+ };
1479
+ readonly preparation?: Omit<NonNullable<UseFormRunnerConfig["preparation"]>, "preparer">;
1480
+ }
1481
+ /** Pure, composable configuration values; these helpers create no runtime state. */
1482
+ declare const defineFacts: <T extends FoundryFactsOptions>(options: T) => Readonly<T>;
1483
+ declare const defineGoals: <T extends FoundryGoalsOptions>(options: T) => Readonly<T>;
1484
+ declare const defineForms: <T extends FoundryFormsOptions>(options: T) => Readonly<T>;
1485
+ interface FoundryGuidanceHandles {
1486
+ readonly facts?: FactStore;
1487
+ readonly goals?: GoalRunner;
1488
+ readonly forms?: FormRunner;
1489
+ }
1490
+ /** Stable, bounded ownership key, unrelated to an execution/run id. */
1491
+ declare function foundryGuidanceSubject(context: Pick<AgentAssemblyContext, "workspaceId" | "agentId" | "conversationId">, scope?: FoundryGuidanceScope): string;
1492
+
1326
1493
  declare const FOUNDRY_AGENT_DEFINITION_BRAND: unique symbol;
1327
1494
  /** @deprecated Agent modules are definitions; execution contracts are internal. */
1328
1495
  declare const FOUNDRY_AGENT_BRAND: symbol;
@@ -1391,7 +1558,7 @@ interface FoundryCallOptions<TInputSchema extends z.ZodType, TOutputSchema exten
1391
1558
  }
1392
1559
  type FoundryCall<TInputSchema extends z.ZodType = z.ZodType, TOutputSchema extends z.ZodType = z.ZodType> = Readonly<FoundryCallOptions<TInputSchema, TOutputSchema>>;
1393
1560
  declare function defineCall<TInputSchema extends z.ZodType, TOutputSchema extends z.ZodType>(options: FoundryCallOptions<TInputSchema, TOutputSchema>): FoundryCall<TInputSchema, TOutputSchema>;
1394
- interface FoundryExecutionContext<TInput = unknown> extends FoundrySurfaceContext<TInput> {
1561
+ interface FoundryExecutionContext<TInput = unknown> extends FoundrySurfaceContext<TInput>, FoundryGuidanceHandles {
1395
1562
  readonly installations: ReadonlyArray<AgentInstallation>;
1396
1563
  /** Native persistent environment mounted for this run, when configured. */
1397
1564
  readonly workingEnvironment?: WorkingEnvironment;
@@ -1402,9 +1569,10 @@ interface FoundryExecutionContext<TInput = unknown> extends FoundrySurfaceContex
1402
1569
  readonly invoke: (name: string, input: unknown) => Promise<unknown>;
1403
1570
  }
1404
1571
  interface AgentHandlerContext<TInput = unknown> extends FoundryExecutionContext<TInput> {
1405
- readonly defaultRun: () => Promise<unknown>;
1572
+ /** Run the standard Glove loop, optionally with a handler-enriched message. */
1573
+ readonly defaultRun: (message?: FoundryMessageInput) => Promise<unknown>;
1406
1574
  /** @deprecated Use defaultRun. */
1407
- readonly defaultHandler: () => Promise<unknown>;
1575
+ readonly defaultHandler: (message?: FoundryMessageInput) => Promise<unknown>;
1408
1576
  readonly spawn: (message?: FoundryMessageInput) => Promise<unknown>;
1409
1577
  }
1410
1578
  type FoundryResolver<T, TInput> = T | ((agent: FoundryAgentDefinition, context: AgentAssemblyContext<TInput>) => Resolvable<T>);
@@ -1426,6 +1594,11 @@ interface AgentAssemblyOptions<TInput = unknown> {
1426
1594
  readonly subagents?: FoundryListResolver<DefineSubAgentArgs, TInput>;
1427
1595
  /** Definition-owned Glove memory surfaces; may resolve lazily from run context. */
1428
1596
  readonly memory?: FoundryListResolver<FoundryMemorySelection, TInput>;
1597
+ readonly goals?: FoundryResolver<FoundryGoalsOptions | undefined, TInput>;
1598
+ readonly facts?: FoundryResolver<FoundryFactsOptions | undefined, TInput>;
1599
+ readonly forms?: FoundryResolver<FoundryFormsOptions | undefined, TInput>;
1600
+ /** Native providers re-read transient context before each model iteration. */
1601
+ readonly contextProviders?: FoundryListResolver<RuntimeContextProvider, TInput>;
1429
1602
  /** Lazily load native Glove inbox items into this run's conversation store. */
1430
1603
  readonly inboxes?: (agent: FoundryAgentDefinition, context: AgentAssemblyContext<TInput>) => Resolvable<ReadonlyArray<InboxItem>>;
1431
1604
  readonly subscribers?: FoundryListResolver<FoundrySubscriberSelection | SubscriberAdapter, TInput>;
@@ -1506,6 +1679,10 @@ interface FoundryAgentConventionModule {
1506
1679
  readonly skills?: AgentAssemblyOptions["skills"];
1507
1680
  readonly subagents?: AgentAssemblyOptions["subagents"];
1508
1681
  readonly memory?: AgentAssemblyOptions["memory"];
1682
+ readonly goals?: AgentAssemblyOptions["goals"];
1683
+ readonly facts?: AgentAssemblyOptions["facts"];
1684
+ readonly forms?: AgentAssemblyOptions["forms"];
1685
+ readonly contextProviders?: AgentAssemblyOptions["contextProviders"];
1509
1686
  readonly inboxes?: AgentAssemblyOptions["inboxes"];
1510
1687
  readonly subscribers?: AgentAssemblyOptions["subscribers"];
1511
1688
  readonly layers?: AgentAssemblyOptions["layers"];
@@ -1545,7 +1722,12 @@ interface DefineFoundrySubagentOptions {
1545
1722
  readonly compactionInstructions?: string;
1546
1723
  readonly maxTurns?: number;
1547
1724
  readonly enableToolResultSummary?: boolean;
1548
- readonly tools?: ReadonlyArray<GloveFoldArgs<any>>;
1725
+ /**
1726
+ * A fixed tool set, or an invocation-time projection of the fully assembled
1727
+ * parent. The resolver makes least-privilege delegation possible without
1728
+ * copying application/MCP tools into static agent code.
1729
+ */
1730
+ readonly tools?: ReadonlyArray<GloveFoldArgs<any>> | ((context: FoundrySubagentToolContext) => Resolvable<ReadonlyArray<GloveFoldArgs<any>>>);
1549
1731
  readonly hooks?: ReadonlyArray<FoundryHookDefinition>;
1550
1732
  readonly skills?: ReadonlyArray<DefineSkillArgs>;
1551
1733
  readonly subagents?: ReadonlyArray<DefineSubAgentArgs>;
@@ -1553,6 +1735,11 @@ interface DefineFoundrySubagentOptions {
1553
1735
  readonly subscribers?: ReadonlyArray<FoundrySubscriber | SubscriberAdapter>;
1554
1736
  readonly configure?: (context: FoundrySurfaceContext<string>) => Resolvable<void>;
1555
1737
  }
1738
+ interface FoundrySubagentToolContext {
1739
+ readonly name: string;
1740
+ readonly prompt: string;
1741
+ readonly parent: IGloveRunnable;
1742
+ }
1556
1743
  declare function defineSubagent(options: DefineFoundrySubagentOptions): DefineSubAgentArgs;
1557
1744
  type FoundryRouteMap = Record<string, object>;
1558
1745
  declare function defineRoutes<const TRoutes extends FoundryRouteMap>(routes: TRoutes): TRoutes;
@@ -1798,6 +1985,29 @@ declare class MemoryObservabilityAdapter implements FoundryObservabilityAdapter
1798
1985
  }
1799
1986
 
1800
1987
  declare const FOUNDRY_APPLICATION_BRAND: unique symbol;
1988
+ /**
1989
+ * Secret-bearing HTTP request data passed only to the consumer-owned
1990
+ * authorization adapter. Foundry does not persist or observe this value.
1991
+ */
1992
+ interface FoundryRequestAuthorizationInput {
1993
+ readonly method: string;
1994
+ readonly path: string;
1995
+ readonly query: string;
1996
+ readonly authorization?: string;
1997
+ readonly cookie?: string;
1998
+ readonly remoteAddress?: string;
1999
+ }
2000
+ /**
2001
+ * Gate the Foundry HTTP surface without making credential acquisition or
2002
+ * refresh a framework concern. The adapter may validate a basic/bearer
2003
+ * credential, a session cookie, or an identity asserted by a trusted proxy.
2004
+ */
2005
+ interface FoundryRequestAuthorizationAdapter<TError = never> {
2006
+ readonly identifier: string;
2007
+ /** Value for WWW-Authenticate when access is denied. */
2008
+ readonly challenge?: string;
2009
+ readonly authorize: (input: FoundryRequestAuthorizationInput) => Effect.Effect<boolean, TError, never>;
2010
+ }
1801
2011
  /** Process infrastructure only; agent files own runtime capabilities. */
1802
2012
  interface FoundryApplicationOptions {
1803
2013
  readonly name: string;
@@ -1811,6 +2021,11 @@ interface FoundryApplicationOptions {
1811
2021
  readonly conversationId: string;
1812
2022
  readonly workspaceId: string;
1813
2023
  }) => Promise<StoreAdapter> | StoreAdapter;
2024
+ /**
2025
+ * User-owned HTTP authorization boundary. Required for non-loopback binds;
2026
+ * credential values never enter Foundry data, manifests, or observability.
2027
+ */
2028
+ readonly requestAuthorization?: FoundryRequestAuthorizationAdapter<unknown>;
1814
2029
  /** User-owned strategy for subscriptions using `provisioning.mode = "custom"`. */
1815
2030
  readonly provisioner?: FoundryInstanceProvisioner;
1816
2031
  readonly services?: Layer.Layer<AccountDirectory | TopologyStore | EventStore, unknown>;
@@ -1841,6 +2056,58 @@ interface DiscoveredFoundryRegistry {
1841
2056
  }>;
1842
2057
  }
1843
2058
 
2059
+ declare const FOUNDRY_APPROVAL_DIRECTORY_ENV = "GLOVE_FOUNDRY_APPROVAL_DIRECTORY";
2060
+ type FoundryApprovalDecision = "approve" | "deny";
2061
+ type FoundryApprovalStatus = "pending" | "approved" | "denied" | "expired" | "cancelled";
2062
+ interface FoundryApproval {
2063
+ readonly id: string;
2064
+ readonly runId: string;
2065
+ readonly definitionId: string;
2066
+ readonly agentId: string;
2067
+ readonly conversationId: string;
2068
+ readonly workspaceId: string;
2069
+ readonly toolName: string;
2070
+ readonly toolInput: unknown;
2071
+ readonly status: FoundryApprovalStatus;
2072
+ readonly requestedAt: string;
2073
+ readonly expiresAt: string;
2074
+ readonly resolvedAt?: string;
2075
+ }
2076
+ declare function createFoundryApproval(directory: string, input: {
2077
+ readonly runId: string;
2078
+ readonly definitionId: string;
2079
+ readonly agentId: string;
2080
+ readonly conversationId: string;
2081
+ readonly workspaceId: string;
2082
+ readonly toolName: string;
2083
+ readonly toolInput: unknown;
2084
+ readonly timeoutMs?: number;
2085
+ }): Promise<FoundryApproval>;
2086
+ declare function listFoundryApprovals(directory: string, filter?: {
2087
+ readonly runId?: string;
2088
+ readonly status?: FoundryApprovalStatus;
2089
+ }): Promise<ReadonlyArray<FoundryApproval>>;
2090
+ declare function resolveFoundryApproval(directory: string, id: string, decision: FoundryApprovalDecision): Promise<FoundryApproval>;
2091
+ declare class FoundryApprovalDisplayManager extends Displaymanager implements DisplayManagerAdapter {
2092
+ private readonly context;
2093
+ constructor(context: {
2094
+ readonly directory?: string;
2095
+ readonly runId: string;
2096
+ readonly definitionId: string;
2097
+ readonly agentId: string;
2098
+ readonly conversationId: string;
2099
+ readonly workspaceId: string;
2100
+ readonly signal: AbortSignal;
2101
+ readonly emit: (event: {
2102
+ readonly type: string;
2103
+ readonly data?: unknown;
2104
+ }) => void;
2105
+ });
2106
+ pushAndWait<I, O>(slot: Omit<Slot<I>, "id">): Promise<O>;
2107
+ }
2108
+ /** Add fail-closed per-input permissions to a custom store that omitted them. */
2109
+ declare function withFoundryPermissions(store: StoreAdapter): StoreAdapter;
2110
+
1844
2111
  interface FoundryRun<TOutput = unknown> {
1845
2112
  readonly id: string;
1846
2113
  readonly agent: string;
@@ -1859,6 +2126,31 @@ interface FoundryRun<TOutput = unknown> {
1859
2126
  readonly startedAt?: string;
1860
2127
  readonly completedAt?: string;
1861
2128
  }
2129
+ interface FoundrySteerResult<TOutput = unknown> {
2130
+ /** The run whose direction was changed. */
2131
+ readonly fromRunId: string;
2132
+ /** True when an active source run accepted cooperative cancellation. */
2133
+ readonly interrupted: boolean;
2134
+ /** The replacement run in the same instance and conversation. */
2135
+ readonly run: FoundryRun<TOutput>;
2136
+ }
2137
+ /** Exact native Glove history and counters for one persisted conversation. */
2138
+ interface FoundryConversationTranscript {
2139
+ readonly conversation: Conversation;
2140
+ readonly messages: ReadonlyArray<Message>;
2141
+ readonly turnCount: number;
2142
+ readonly tokenCount: number;
2143
+ readonly tokenConsumption?: TokenConsumptionCounter;
2144
+ readonly page: {
2145
+ readonly offset: number;
2146
+ readonly limit: number;
2147
+ readonly total: number;
2148
+ readonly hasEarlier: boolean;
2149
+ readonly hasLater: boolean;
2150
+ };
2151
+ /** False means the definition did not configure a durable conversation store. */
2152
+ readonly persisted: boolean;
2153
+ }
1862
2154
  declare const FoundryRuntimeError_base: Schema.TaggedErrorClass<FoundryRuntimeError, "FoundryRuntimeError", {
1863
2155
  readonly _tag: Schema.tag<"FoundryRuntimeError">;
1864
2156
  } & {
@@ -1902,6 +2194,9 @@ declare class FoundryRuntime {
1902
2194
  private readonly services;
1903
2195
  private readonly runnerLoops;
1904
2196
  private readonly materializedActivations;
2197
+ private readonly activationTimers;
2198
+ private readonly approvalDirectory;
2199
+ private readonly coreCommandDirectory;
1905
2200
  private started;
1906
2201
  private disposed;
1907
2202
  constructor(options: FoundryRuntimeOptions);
@@ -1933,6 +2228,16 @@ declare class FoundryRuntime {
1933
2228
  /** Atomically replace the persisted, frontend-editable instance configuration. */
1934
2229
  configureAgent(agentId: string, options: UpdateAgentInstanceOptions): Promise<AgentInstance>;
1935
2230
  listConversations(agentId: string): Promise<ReadonlyArray<Conversation>>;
2231
+ updateConversation(agentId: string, conversationId: string, options: UpdateConversationOptions): Promise<Conversation>;
2232
+ /**
2233
+ * Read the same StoreAdapter the child agent process uses. Foundry never
2234
+ * reconstructs chat history from runs or observability events: adapters stay
2235
+ * the single source of truth for durable conversations.
2236
+ */
2237
+ conversationTranscript(agentId: string, conversationId: string, options?: {
2238
+ readonly offset?: number;
2239
+ readonly limit?: number;
2240
+ }): Promise<FoundryConversationTranscript>;
1936
2241
  listWorkspaceEntries(workspaceId: string): Promise<ReadonlyArray<WorkspaceEntry>>;
1937
2242
  putWorkspaceEntry(workspaceId: string, key: string, value: unknown): Promise<WorkspaceEntry>;
1938
2243
  listSharedInbox(workspaceId: string): Promise<ReadonlyArray<SharedInboxItem>>;
@@ -1957,6 +2262,20 @@ declare class FoundryRuntime {
1957
2262
  timeoutMs?: number;
1958
2263
  }): Promise<FoundryRun<TOutput> | null>;
1959
2264
  cancel(runId: string): Promise<boolean>;
2265
+ /**
2266
+ * Change course at a run boundary.
2267
+ *
2268
+ * Foundry does not inject text into an arbitrary in-flight tool. If the
2269
+ * source is active, steering cooperatively cancels it first, waits for that
2270
+ * terminal boundary, then starts a replacement turn in the same durable
2271
+ * conversation with explicit lineage in the request context.
2272
+ */
2273
+ steer(runId: string, message: FoundryMessageInput): Promise<FoundrySteerResult<FoundryResult>>;
2274
+ listApprovals(filter?: {
2275
+ readonly runId?: string;
2276
+ readonly status?: FoundryApprovalStatus;
2277
+ }): Promise<ReadonlyArray<FoundryApproval>>;
2278
+ resolveApproval(approvalId: string, decision: FoundryApprovalDecision): Promise<FoundryApproval>;
1960
2279
  capabilityManifest(definitionId: string): FoundryCapabilityManifest;
1961
2280
  nativeManifest(definitionId: string): FoundryNativeManifest;
1962
2281
  listInstallations(agentId: string): Promise<ReadonlyArray<AgentInstallation>>;
@@ -2019,6 +2338,8 @@ declare class FoundryRuntime {
2019
2338
  readonly routeId: string;
2020
2339
  readonly eventId: string;
2021
2340
  readonly threadKey: string;
2341
+ readonly conversationKey?: string;
2342
+ readonly conversationScope?: "route" | "agent";
2022
2343
  readonly raw: unknown;
2023
2344
  }): Promise<ReadonlyArray<FoundryRun>>;
2024
2345
  dispatchOutbound(input: {
@@ -2029,6 +2350,7 @@ declare class FoundryRuntime {
2029
2350
  readonly commandId?: string;
2030
2351
  readonly applicationId?: string;
2031
2352
  readonly transmissionId?: string;
2353
+ readonly signal?: AbortSignal;
2032
2354
  }): Promise<unknown>;
2033
2355
  health(): Promise<Record<string, unknown>>;
2034
2356
  private runsFromIds;
@@ -2054,9 +2376,12 @@ declare class FoundryRuntime {
2054
2376
  private disarmActivation;
2055
2377
  private syncDefinitionSchedules;
2056
2378
  private updateScheduledActivation;
2379
+ private pauseScheduledActivation;
2380
+ private resumeScheduledActivation;
2057
2381
  private cancelScheduledActivation;
2058
2382
  private reconstructActivations;
2059
2383
  private materializeActivation;
2384
+ private armOneShotActivation;
2060
2385
  private deliverOutbound;
2061
2386
  private executionEnvelope;
2062
2387
  private toFoundryRun;
@@ -2065,12 +2390,26 @@ declare class FoundryRuntime {
2065
2390
  interface FoundryClientOptions {
2066
2391
  baseUrl?: string;
2067
2392
  fetch?: typeof globalThis.fetch;
2393
+ /** Resolve secret-bearing request headers outside Foundry data and state. */
2394
+ authorization?: FoundryClientAuthorizationAdapter;
2395
+ }
2396
+ interface FoundryClientAuthorizationAdapter {
2397
+ readonly identifier: string;
2398
+ readonly headers: (request: {
2399
+ readonly url: string;
2400
+ readonly method: string;
2401
+ }) => HeadersInit | Promise<HeadersInit>;
2068
2402
  }
2069
2403
  interface WaitOptions {
2070
2404
  pollMs?: number;
2071
2405
  timeoutMs?: number;
2072
2406
  signal?: AbortSignal;
2073
2407
  }
2408
+ interface FoundrySteerHandleResult<TOutput = unknown> {
2409
+ readonly fromRunId: string;
2410
+ readonly interrupted: boolean;
2411
+ readonly run: FoundryRunHandle<TOutput>;
2412
+ }
2074
2413
  interface FoundryHealth {
2075
2414
  readonly ok: boolean;
2076
2415
  readonly execution: boolean;
@@ -2087,6 +2426,7 @@ declare class FoundryRunHandle<TOutput> {
2087
2426
  constructor(id: string, initial: FoundryRun<TOutput>, client: FoundryClient<FoundryRouteMap>);
2088
2427
  get(): Promise<FoundryRun<TOutput>>;
2089
2428
  cancel(): Promise<boolean>;
2429
+ steer(message: FoundryMessageInput): Promise<FoundrySteerHandleResult<TOutput>>;
2090
2430
  events(): Promise<FoundryEvent[]>;
2091
2431
  wait(options?: WaitOptions): Promise<FoundryRun<TOutput>>;
2092
2432
  }
@@ -2105,6 +2445,11 @@ declare class FoundryClient<TRoutes extends FoundryRouteMap> {
2105
2445
  setAgentPlaybooks(agentId: string, playbooks: ReadonlyArray<AgentPlaybook>): Promise<AgentInstance>;
2106
2446
  createConversation(agentId: string, options?: CreateConversationOptions): Promise<Conversation>;
2107
2447
  conversations(agentId: string): Promise<ReadonlyArray<Conversation>>;
2448
+ updateConversation(agentId: string, conversationId: string, options: UpdateConversationOptions): Promise<Conversation>;
2449
+ conversationTranscript(agentId: string, conversationId: string, options?: {
2450
+ readonly offset?: number;
2451
+ readonly limit?: number;
2452
+ }): Promise<FoundryConversationTranscript>;
2108
2453
  workspaceEntries(workspaceId: string): Promise<ReadonlyArray<WorkspaceEntry>>;
2109
2454
  putWorkspaceEntry(workspaceId: string, key: string, value: unknown): Promise<WorkspaceEntry>;
2110
2455
  sharedInbox(workspaceId: string): Promise<ReadonlyArray<SharedInboxItem>>;
@@ -2131,6 +2476,8 @@ declare class FoundryClient<TRoutes extends FoundryRouteMap> {
2131
2476
  readonly routeId: string;
2132
2477
  readonly eventId: string;
2133
2478
  readonly threadKey: string;
2479
+ readonly conversationKey?: string;
2480
+ readonly conversationScope?: "route" | "agent";
2134
2481
  readonly raw: unknown;
2135
2482
  }): Promise<ReadonlyArray<FoundryRun>>;
2136
2483
  playbookSubscriptions(workspaceId?: string): Promise<ReadonlyArray<PlaybookSubscription>>;
@@ -2152,12 +2499,18 @@ declare class FoundryClient<TRoutes extends FoundryRouteMap> {
2152
2499
  getRun<TOutput = unknown>(runId: string): Promise<FoundryRun<TOutput>>;
2153
2500
  runs<TOutput = unknown>(route?: string): Promise<ReadonlyArray<FoundryRun<TOutput>>>;
2154
2501
  cancelRun(runId: string): Promise<boolean>;
2502
+ steerRun<TOutput = FoundryResult>(runId: string, message: FoundryMessageInput): Promise<FoundrySteerResult<TOutput>>;
2155
2503
  getEvents(filter?: {
2156
2504
  runId?: string;
2157
2505
  agent?: string;
2158
2506
  after?: number;
2159
2507
  category?: FoundryEvent["category"];
2160
2508
  }): Promise<FoundryEvent[]>;
2509
+ approvals(filter?: {
2510
+ readonly runId?: string;
2511
+ readonly status?: FoundryApprovalStatus;
2512
+ }): Promise<ReadonlyArray<FoundryApproval>>;
2513
+ resolveApproval(approvalId: string, decision: FoundryApprovalDecision): Promise<FoundryApproval>;
2161
2514
  manifest(): Promise<{
2162
2515
  agents: FoundryManifest;
2163
2516
  application: FoundryApplicationManifest;
@@ -2183,4 +2536,4 @@ declare class FoundryClient<TRoutes extends FoundryRouteMap> {
2183
2536
  }
2184
2537
  declare function createFoundryClient<TRoutes extends FoundryRouteMap = Record<string, AnyFoundryAgent>>(options?: FoundryClientOptions): FoundryClient<TRoutes>;
2185
2538
 
2186
- export { type CreateConversationOptions as $, type AgentPlaybook as A, type AgentHandlerContext as B, type CapabilityDefinition as C, type DiscoveredAgent as D, AgentId as E, FoundryRuntime as F, type AgentInstallContext as G, type AgentInstallation as H, type InferAccountMetadata as I, type AgentInstallationKind as J, type AgentPlaybookInput as K, type AgentProvisioningPolicy as L, type AgentRuntimeControls as M, type AnyFoundryAgent as N, OutboundRoute as O, type ApplicationConnectionContext as P, type ApplicationConnectionState as Q, type ApplicationConnectionStatus as R, type BindingFilter as S, BindingId as T, BindingNotFound as U, CapabilityId as V, type ComposedAgentPlaybook as W, type ComposedAgentPlaybookInput as X, type ConnectionReceiveInput as Y, type Conversation as Z, type CreateAgentInstanceOptions as _, type FoundryManifest as a, type FoundryCapabilityManifest as a$, type CustomProvisionedAgent as a0, type CustomProvisioningContext as a1, type DefineAgentOptions as a2, type DefineConnectionOptions as a3, type DefineFoundryReplOptions as a4, type DefineFoundryScheduleOptions as a5, type DefineFoundrySubagentOptions as a6, type DefineFoundryWorkingEnvironmentOptions as a7, type DefinePlaybookSubscriptionOptions as a8, type DefinitionConfigInput as a9, FOUNDRY_MEMORY_BRAND as aA, FOUNDRY_PLAYBOOK_ACTION_BRAND as aB, FOUNDRY_REPL_BRAND as aC, FOUNDRY_SCHEDULE_BRAND as aD, FOUNDRY_SHARED_TOOL_BRAND as aE, FOUNDRY_SUBSCRIBER_BRAND as aF, FOUNDRY_TRANSMISSION_BRAND as aG, FOUNDRY_TRANSMISSION_EVENT_BRAND as aH, FOUNDRY_TRANSMISSION_PREDICATE_BRAND as aI, FOUNDRY_WORKING_ENVIRONMENT_BRAND as aJ, type FoundryAccountSessionAdapter as aK, type FoundryActivationRecord as aL, type FoundryAgent as aM, type FoundryAgentComponent as aN, type FoundryAgentComposition as aO, type FoundryAgentConventionModule as aP, type FoundryAgentDefinition as aQ, type FoundryAgentMode as aR, type FoundryApp as aS, type FoundryApplication as aT, type FoundryApplicationConnection as aU, FoundryApplicationManifest as aV, type FoundryApplicationOptions as aW, type FoundryCall as aX, type FoundryCallContext as aY, type FoundryCallOptions as aZ, type FoundryCapabilityKind as a_, EMPTY_AGENT_COMPOSITION as aa, EMPTY_CAPABILITY_REGISTRY as ab, EMPTY_FOUNDRY_APPLICATION as ac, EMPTY_NATIVE_REGISTRY as ad, type EgressAdapter as ae, type EgressContext as af, type EnvironmentValue as ag, type EventFilter as ah, EventId as ai, EventNotFound as aj, EventReference as ak, EventStore as al, FOUNDRY_AGENT_APPLICATION_BRAND as am, FOUNDRY_AGENT_BRAND as an, FOUNDRY_AGENT_DEFINITION_BRAND as ao, FOUNDRY_AGENT_FILE_ENV as ap, FOUNDRY_AGENT_ROUTE_ENV as aq, FOUNDRY_APPLICATION_BRAND as ar, FOUNDRY_APPLICATION_ENV as as, FOUNDRY_COMPOSED_PLAYBOOK_BRAND as at, FOUNDRY_CONNECTION_BRAND as au, FOUNDRY_CORE_COMMAND_EVENT as av, FOUNDRY_EVENT_PREFIX as aw, FOUNDRY_EXECUTION_MARKER as ax, FOUNDRY_LAYER_BRAND as ay, FOUNDRY_MCP_BRAND as az, type AnyFoundryTransmission as b, type FoundryWorkingEnvironmentCreateContext as b$, type FoundryCapabilityManifestEntry as b0, type FoundryCapabilityRegistry as b1, FoundryClient as b2, type FoundryClientOptions as b3, type FoundryCompositionSource as b4, type FoundryCoreCommand as b5, type FoundryDataAdapter as b6, type FoundryDomainError as b7, type FoundryEvent as b8, type FoundryEventCategory as b9, type FoundryNativeRegistry as bA, type FoundryObservabilityAdapter as bB, type FoundryPlaybookAction as bC, type FoundryPythonReplDefinition as bD, type FoundryReplDefinition as bE, type FoundryRequest as bF, type FoundryResolver as bG, type FoundryResult as bH, type FoundryRouteMap as bI, type FoundryRun as bJ, FoundryRunHandle as bK, FoundryRuntimeError as bL, type FoundryRuntimeOptions as bM, type FoundryScheduleDefinition as bN, type FoundryScheduleTiming as bO, type FoundryScheduleTimingInput as bP, type FoundrySharedTool as bQ, type FoundrySubscriber as bR, type FoundrySubscriberOptions as bS, type FoundrySubscriberSelection as bT, type FoundrySurfaceContext as bU, type FoundryTask as bV, type FoundryTransmission as bW, type FoundryTransmissionEvent as bX, type FoundryTransmissionPredicate as bY, type FoundryVfs as bZ, type FoundryVfsHandle as b_, type FoundryExecutionContext as ba, type FoundryHealth as bb, type FoundryHookDefinition as bc, type FoundryInstallable as bd, type FoundryInstanceProvisioner as be, type FoundryJavaScriptReplDefinition as bf, type FoundryLayer as bg, type FoundryLayerOptions as bh, type FoundryLayerReference as bi, type FoundryLayerSelection as bj, type FoundryLispReplDefinition as bk, type FoundryListResolver as bl, type FoundryManifestAgent as bm, FoundryManifestCapability as bn, FoundryManifestTransmission as bo, type FoundryMcp as bp, type FoundryMcpOptions as bq, type FoundryMemoryProfile as br, type FoundryMemoryProfileOptions as bs, type FoundryMemoryReference as bt, type FoundryMemorySelection as bu, type FoundryMeshConfig as bv, type FoundryMessageInput as bw, type FoundryMountedRepl as bx, type FoundryNativeManifest as by, type FoundryNativeManifestEntry as bz, AccountReference as c, createManifest as c$, type FoundryWorkingEnvironmentDefinition as c0, type FoundryWorkingEnvironmentPersistenceAdapter as c1, type FoundryWorkingEnvironmentPersistenceContext as c2, type FoundryWorkingEnvironmentSnapshotOwner as c3, GrantResolutionError as c4, GrantResolver as c5, type InboundContract as c6, type InboundDeliveryClaim as c7, type InferAgentInput as c8, type InferAgentOutput as c9, RouteId as cA, RouteNotFound as cB, RunGrant as cC, RunId as cD, type SharedInboxItem as cE, type SharedToolOptions as cF, TopologyConflict as cG, TopologyStore as cH, type TransmissionEventDirection as cI, type TransmissionEventOptions as cJ, TransmissionId as cK, type TransmissionOptions as cL, type TransmissionPredicateOptions as cM, type TransmissionSerializationContext as cN, type UpdateAgentInstanceOptions as cO, type WaitOptions as cP, type WorkspaceEntry as cQ, compileApplicationManifest as cR, composeAgent as cS, composePlaybook as cT, configureLayer as cU, configureMemory as cV, createAgentInstance as cW, createConversation as cX, createFoundryClient as cY, createFoundryCoreTools as cZ, createInstalledApplicationTransmissionTools as c_, type InferInboundEvent as ca, type InferOutboundInput as cb, type InferOutboundOutput as cc, type IngressAdapter as cd, type IngressContext as ce, type InstallationSelection as cf, ManifestCompilationError as cg, type McpAdapterFactory as ch, MemoryFoundryDataAdapter as ci, MemoryObservabilityAdapter as cj, type OutboundContract as ck, type PlaybookActionOptions as cl, type PlaybookDirective as cm, type PlaybookDirectiveInput as cn, type PlaybookMatch as co, type PlaybookMatchInput as cp, type PlaybookOutboundDirective as cq, type PlaybookOutboundInput as cr, type PlaybookSubscription as cs, type PlaybookSubscriptionTarget as ct, type PlaybookSubscriptionTargetInput as cu, type ProvisionAgentOptions as cv, ReplyPolicy as cw, type ResolveGrantRequest as cx, Route as cy, type RouteFilter as cz, AgentBinding as d, defineAgent as d0, defineAgentApplication as d1, defineAgentFromModule as d2, defineAgentInstance as d3, defineApp as d4, defineApplication as d5, defineCall as d6, defineConnection as d7, defineLayer as d8, defineMcp as d9, isFoundryLayer as dA, isFoundrySchedule as dB, isFoundrySubscriber as dC, isFoundryTransmission as dD, isInboxCapableStore as dE, memoryAccountDirectory as dF, memoryEventStore as dG, memoryTopologyStore as dH, mountAgentDefinitionMemory as dI, mountFoundrySurfaces as dJ, reconstructAgentInstance as dK, reconstructPlaybook as dL, reconstructPlaybookSubscription as dM, routeFromAgentFile as dN, routeFromInternalAgentName as dO, toGloveMessage as dP, toGloveRequestInput as dQ, transmissionPredicate as dR, defineMemory as da, definePlaybookAction as db, definePlaybookSubscription as dc, defineRepl as dd, defineRoutes as de, defineSchedule as df, defineSharedTool as dg, defineSubagent as dh, defineSubscriber as di, defineTransmission as dj, defineTransmissionEvent as dk, defineTransmissionPredicate as dl, defineWorkingEnvironment as dm, discoverAgents as dn, findAgentFiles as dp, foundryDataEnvironmentPersistence as dq, grantResolverLive as dr, install as ds, installRegistry as dt, installationKey as du, internalAgentName as dv, isFoundryAgent as dw, isFoundryAgentDefinition as dx, isFoundryApplication as dy, isFoundryCapability as dz, type AgentInstance as e, type FoundryAgentApplication as f, InboundRoute as g, type InferInboundConfig as h, type InferOutboundConfig as i, type AccountContract as j, AccountDirectory as k, type AccountFilter as l, AccountId as m, AccountNotFound as n, type AccountSessionAdapter as o, type AccountSessionRequest as p, AccountSessionUnavailable as q, AccountSummary as r, type AgentApplicationContribution as s, type AgentApplicationInstallContext as t, type AgentApplicationOptions as u, type AgentAssemblyContext as v, type AgentAssemblyOptions as w, AgentDefinitionId as x, type AgentDefinitionSurfaceContext as y, type AgentFactoryContext as z };
2539
+ export { type ApplicationConnectionState as $, type AgentInstance as A, type AgentApplicationInstallContext as B, type Conversation as C, type DiscoveredAgent as D, type EnvironmentValue as E, type FoundryDataAdapter as F, type AgentApplicationOptions as G, type AgentAssemblyContext as H, type InboundDeliveryClaim as I, type AgentAssemblyOptions as J, AgentDefinitionId as K, type AgentDefinitionSurfaceContext as L, type AgentFactoryContext as M, type AgentHandlerContext as N, OutboundRoute as O, type PlaybookSubscription as P, AgentId as Q, type AgentInstallContext as R, type SharedInboxItem as S, type AgentInstallation as T, type AgentInstallationKind as U, type AgentPlaybookInput as V, type WorkspaceEntry as W, type AgentProvisioningPolicy as X, type AgentRuntimeControls as Y, type AnyFoundryAgent as Z, type ApplicationConnectionContext as _, type FoundryActivationRecord as a, type FoundryApp as a$, type ApplicationConnectionStatus as a0, type BindingFilter as a1, BindingId as a2, BindingNotFound as a3, CapabilityId as a4, type ComposedAgentPlaybook as a5, type ComposedAgentPlaybookInput as a6, type ConnectionReceiveInput as a7, type CreateAgentInstanceOptions as a8, type CreateConversationOptions as a9, FOUNDRY_APPLICATION_BRAND 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 CustomProvisionedAgent as aa, type CustomProvisioningContext as ab, type DefineAgentOptions as ac, type DefineConnectionOptions as ad, type DefineFoundryReplOptions as ae, type DefineFoundryScheduleOptions as af, type DefineFoundrySubagentOptions as ag, type DefineFoundryWorkingEnvironmentOptions as ah, type DefinePlaybookSubscriptionOptions as ai, type DefinitionConfigInput as aj, EMPTY_AGENT_COMPOSITION as ak, EMPTY_CAPABILITY_REGISTRY as al, EMPTY_FOUNDRY_APPLICATION as am, EMPTY_NATIVE_REGISTRY as an, type EgressAdapter as ao, type EgressContext as ap, type EventFilter as aq, EventId as ar, EventNotFound as as, EventReference as at, EventStore as au, FOUNDRY_AGENT_APPLICATION_BRAND as av, FOUNDRY_AGENT_BRAND as aw, FOUNDRY_AGENT_DEFINITION_BRAND as ax, FOUNDRY_AGENT_FILE_ENV as ay, FOUNDRY_AGENT_ROUTE_ENV as az, type ProvisionAgentOptions as b, type FoundryRequest as b$, type FoundryApplication as b0, type FoundryApplicationConnection as b1, FoundryApplicationManifest as b2, type FoundryApplicationOptions as b3, type FoundryApproval as b4, type FoundryApprovalDecision as b5, FoundryApprovalDisplayManager as b6, type FoundryApprovalStatus as b7, type FoundryCall as b8, type FoundryCallContext as b9, type FoundryLayerOptions as bA, type FoundryLayerReference as bB, type FoundryLayerSelection as bC, type FoundryLispReplDefinition as bD, type FoundryListResolver as bE, type FoundryManifestAgent as bF, FoundryManifestCapability as bG, FoundryManifestTransmission as bH, type FoundryMcp as bI, type FoundryMcpOptions as bJ, type FoundryMemoryProfile as bK, type FoundryMemoryProfileOptions as bL, type FoundryMemoryReference as bM, type FoundryMemorySelection as bN, type FoundryMeshConfig as bO, type FoundryMessageInput as bP, type FoundryMountedRepl as bQ, type FoundryNativeManifest as bR, type FoundryNativeManifestEntry as bS, type FoundryNativeRegistry as bT, type FoundryObservabilityAdapter as bU, type FoundryPlaybookAction as bV, type FoundryProgrammaticToolContext as bW, type FoundryProgrammaticToolSelection as bX, type FoundryProgrammaticTools as bY, type FoundryPythonReplDefinition as bZ, type FoundryReplDefinition as b_, type FoundryCallOptions as ba, type FoundryCapabilityKind as bb, type FoundryCapabilityManifest as bc, type FoundryCapabilityManifestEntry as bd, type FoundryCapabilityRegistry as be, FoundryClient as bf, type FoundryClientAuthorizationAdapter as bg, type FoundryClientOptions as bh, type FoundryCompositionSource as bi, type FoundryConversationTranscript as bj, type FoundryCoreCommand as bk, type FoundryDomainError as bl, type FoundryEvent as bm, type FoundryEventCategory as bn, type FoundryExecutionContext as bo, type FoundryFactsOptions as bp, type FoundryFormsOptions as bq, type FoundryGoalsOptions as br, type FoundryGuidanceHandles as bs, type FoundryGuidanceScope as bt, type FoundryHealth as bu, type FoundryHookDefinition as bv, type FoundryInstallable as bw, type FoundryInstanceProvisioner as bx, type FoundryJavaScriptReplDefinition as by, type FoundryLayer as bz, type FoundryWorkingEnvironmentSnapshotOwner as c, RunId as c$, type FoundryRequestAuthorizationAdapter as c0, type FoundryRequestAuthorizationInput as c1, type FoundryResolvedMcp as c2, type FoundryResolver as c3, type FoundryResult as c4, type FoundryRouteMap as c5, type FoundryRun as c6, FoundryRunHandle as c7, FoundryRuntimeError as c8, type FoundryRuntimeOptions as c9, type InferInboundEvent as cA, type InferOutboundInput as cB, type InferOutboundOutput as cC, type IngressAdapter as cD, type IngressContext as cE, type InstallationSelection as cF, ManifestCompilationError as cG, type McpAdapterFactory as cH, MemoryFoundryDataAdapter as cI, MemoryObservabilityAdapter as cJ, type OutboundContract as cK, type PlaybookActionOptions as cL, type PlaybookDirective as cM, type PlaybookDirectiveInput as cN, type PlaybookMatch as cO, type PlaybookMatchInput as cP, type PlaybookOutboundDirective as cQ, type PlaybookOutboundInput as cR, type PlaybookSubscriptionTarget as cS, type PlaybookSubscriptionTargetInput as cT, ReplyPolicy as cU, type ResolveGrantRequest as cV, Route as cW, type RouteFilter as cX, RouteId as cY, RouteNotFound as cZ, RunGrant as c_, type FoundryScheduleDefinition as ca, type FoundryScheduleTiming as cb, type FoundryScheduleTimingInput as cc, type FoundrySharedTool as cd, type FoundrySteerHandleResult as ce, type FoundrySteerResult as cf, type FoundrySubagentToolContext as cg, type FoundrySubscriber as ch, type FoundrySubscriberOptions as ci, type FoundrySubscriberSelection as cj, type FoundrySurfaceContext as ck, type FoundryToolBody as cl, type FoundryTransmission as cm, type FoundryTransmissionEvent as cn, type FoundryTransmissionPredicate as co, type FoundryVfs as cp, type FoundryVfsHandle as cq, type FoundryWorkingEnvironmentCreateContext as cr, type FoundryWorkingEnvironmentDefinition as cs, type FoundryWorkingEnvironmentPersistenceAdapter as ct, type FoundryWorkingEnvironmentPersistenceContext as cu, GrantResolutionError as cv, GrantResolver as cw, type InboundContract as cx, type InferAgentInput as cy, type InferAgentOutput as cz, type FoundryTask as d, isFoundryApplication as d$, type SharedToolOptions as d0, TopologyConflict as d1, TopologyStore as d2, type TransmissionEventDirection as d3, type TransmissionEventOptions as d4, TransmissionId as d5, type TransmissionOptions as d6, type TransmissionPredicateOptions as d7, type TransmissionSerializationContext as d8, type UpdateAgentInstanceOptions as d9, defineLayer as dA, defineMcp as dB, defineMemory as dC, definePlaybookAction as dD, definePlaybookSubscription as dE, defineRepl as dF, defineRoutes as dG, defineSchedule as dH, defineSharedTool as dI, defineSubagent as dJ, defineSubscriber as dK, defineTransmission as dL, defineTransmissionEvent as dM, defineTransmissionPredicate as dN, defineWorkingEnvironment as dO, discoverAgents as dP, findAgentFiles as dQ, foundryDataEnvironmentPersistence as dR, foundryGuidanceSubject as dS, grantResolverLive as dT, install as dU, installRegistry as dV, installationKey as dW, installedApplicationTransmissionToolName as dX, internalAgentName as dY, isFoundryAgent as dZ, isFoundryAgentDefinition as d_, type UpdateConversationOptions as da, type WaitOptions as db, compileApplicationManifest as dc, composeAgent as dd, composePlaybook as de, configureLayer as df, configureMemory as dg, createAgentInstance as dh, createConversation as di, createFoundryApproval as dj, createFoundryClient as dk, createFoundryCoreTools as dl, createInstalledApplicationTransmissionTools as dm, createManifest as dn, defineAgent as dp, defineAgentApplication as dq, defineAgentFromModule as dr, defineAgentInstance as ds, defineApp as dt, defineApplication as du, defineCall as dv, defineConnection as dw, defineFacts as dx, defineForms as dy, defineGoals as dz, type AgentPlaybook as e, isFoundryCapability as e0, isFoundryLayer as e1, isFoundrySchedule as e2, isFoundrySubscriber as e3, isFoundryTransmission as e4, isInboxCapableStore as e5, listFoundryApprovals as e6, memoryAccountDirectory as e7, memoryEventStore as e8, memoryTopologyStore as e9, mountAgentDefinitionMemory as ea, mountFoundrySurfaces as eb, reconstructAgentInstance as ec, reconstructPlaybook as ed, reconstructPlaybookSubscription as ee, resolveFoundryApproval as ef, routeFromAgentFile as eg, routeFromInternalAgentName as eh, toGloveMessage as ei, toGloveRequestInput as ej, transmissionPredicate as ek, withFoundryPermissions as el, FoundryRuntime as f, type FoundryManifest as g, type AnyFoundryTransmission as h, AccountReference as i, type InferAccountMetadata as j, AgentBinding as k, type FoundryAgentApplication as l, InboundRoute as m, type CapabilityDefinition as n, type InferInboundConfig as o, type InferOutboundConfig as p, type AccountContract as q, AccountDirectory as r, type AccountFilter as s, AccountId as t, AccountNotFound as u, type AccountSessionAdapter as v, type AccountSessionRequest as w, AccountSessionUnavailable as x, AccountSummary as y, type AgentApplicationContribution as z };