glove-foundry 0.0.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.
@@ -0,0 +1,14 @@
1
+ export { b2 as FoundryClient, b3 as FoundryClientOptions, bb as FoundryHealth, bK as FoundryRunHandle, cP as WaitOptions, cY as createFoundryClient } from './client-CLkZREDr.js';
2
+ import 'glove-core';
3
+ import 'effect';
4
+ import 'zod';
5
+ import 'glove-mesh';
6
+ import 'glove-mcp';
7
+ import 'glove-memory';
8
+ import 'glove-memory/tools';
9
+ import 'glove-working-environment';
10
+ import 'glove-js';
11
+ import 'glove-lisp';
12
+ import 'glove-python';
13
+ import 'effect/Brand';
14
+ import './config.js';
package/dist/client.js ADDED
@@ -0,0 +1,10 @@
1
+ import {
2
+ FoundryClient,
3
+ FoundryRunHandle,
4
+ createFoundryClient
5
+ } from "./chunk-3GCUECPA.js";
6
+ export {
7
+ FoundryClient,
8
+ FoundryRunHandle,
9
+ createFoundryClient
10
+ };
@@ -0,0 +1,49 @@
1
+ /** Framework-level execution policy. The underlying runner is deliberately private. */
2
+ interface FoundryExecutionConfig {
3
+ readonly pollIntervalMs?: number;
4
+ readonly idlePollIntervalMs?: number;
5
+ readonly maxConcurrent?: number;
6
+ readonly maxAttempts?: number;
7
+ readonly retryBackoffMs?: number;
8
+ }
9
+ interface FoundryConfig {
10
+ readonly agentsDir?: string;
11
+ readonly applicationFile?: string;
12
+ readonly server?: {
13
+ readonly host?: string;
14
+ readonly port?: number;
15
+ };
16
+ readonly execution?: FoundryExecutionConfig;
17
+ readonly observability?: {
18
+ readonly maxEvents?: number;
19
+ };
20
+ readonly strictFileRoutes?: boolean;
21
+ }
22
+ type NoUnknownKeys<T, Shape> = T & Record<Exclude<keyof T, keyof Shape>, never>;
23
+ type ExactFoundryConfig<T extends FoundryConfig> = NoUnknownKeys<T, FoundryConfig> & {
24
+ readonly server?: T["server"] extends object ? NoUnknownKeys<T["server"], NonNullable<FoundryConfig["server"]>> : T["server"];
25
+ readonly execution?: T["execution"] extends object ? NoUnknownKeys<T["execution"], FoundryExecutionConfig> : T["execution"];
26
+ readonly observability?: T["observability"] extends object ? NoUnknownKeys<T["observability"], NonNullable<FoundryConfig["observability"]>> : T["observability"];
27
+ };
28
+ declare function defineConfig<const TConfig extends FoundryConfig>(config: ExactFoundryConfig<TConfig>): TConfig;
29
+ declare const DEFAULT_FOUNDRY_CONFIG: Readonly<{
30
+ readonly agentsDir: "agents";
31
+ readonly applicationFile: "foundry.application.ts";
32
+ readonly server: {
33
+ readonly host: "127.0.0.1";
34
+ readonly port: 4141;
35
+ };
36
+ readonly execution: {
37
+ readonly pollIntervalMs: 100;
38
+ readonly idlePollIntervalMs: 1000;
39
+ readonly maxConcurrent: 5;
40
+ readonly maxAttempts: 1;
41
+ readonly retryBackoffMs: 1000;
42
+ };
43
+ readonly observability: {
44
+ readonly maxEvents: 10000;
45
+ };
46
+ readonly strictFileRoutes: true;
47
+ }>;
48
+
49
+ export { DEFAULT_FOUNDRY_CONFIG, type FoundryConfig, type FoundryExecutionConfig, defineConfig };
package/dist/config.js ADDED
@@ -0,0 +1,8 @@
1
+ import {
2
+ DEFAULT_FOUNDRY_CONFIG,
3
+ defineConfig
4
+ } from "./chunk-ZFNMFE3T.js";
5
+ export {
6
+ DEFAULT_FOUNDRY_CONFIG,
7
+ defineConfig
8
+ };
@@ -0,0 +1,122 @@
1
+ type Node = Record<string, any>;
2
+ type RuleContext = {
3
+ report(input: {
4
+ node: Node;
5
+ messageId: string;
6
+ data?: Record<string, string>;
7
+ }): void;
8
+ };
9
+ declare const foundryEslintPlugin: Readonly<{
10
+ rules: Readonly<{
11
+ "no-agent-contracts": {
12
+ meta: {
13
+ type: string;
14
+ docs: {
15
+ description: string;
16
+ };
17
+ schema: never[];
18
+ messages: {
19
+ forbidden: string;
20
+ };
21
+ };
22
+ create(context: RuleContext): {
23
+ CallExpression(node: Node): void;
24
+ ExportNamedDeclaration(node: Node): void;
25
+ };
26
+ };
27
+ "no-file-definition-id": {
28
+ meta: {
29
+ type: string;
30
+ docs: {
31
+ description: string;
32
+ };
33
+ schema: never[];
34
+ messages: {
35
+ filename: string;
36
+ };
37
+ };
38
+ create(context: RuleContext): {
39
+ CallExpression(node: Node): void;
40
+ };
41
+ };
42
+ "no-raw-definition-references": {
43
+ meta: {
44
+ type: string;
45
+ docs: {
46
+ description: string;
47
+ };
48
+ schema: never[];
49
+ messages: {
50
+ direct: string;
51
+ };
52
+ };
53
+ create(context: RuleContext): {
54
+ CallExpression(node: Node): void;
55
+ };
56
+ };
57
+ }>;
58
+ }>;
59
+ /** Flat-config preset. Spread it after typescript-eslint's recommended config. */
60
+ declare const foundryEslintConfig: Readonly<{
61
+ name: "glove-foundry/recommended";
62
+ files: string[];
63
+ plugins: {
64
+ "glove-foundry": Readonly<{
65
+ rules: Readonly<{
66
+ "no-agent-contracts": {
67
+ meta: {
68
+ type: string;
69
+ docs: {
70
+ description: string;
71
+ };
72
+ schema: never[];
73
+ messages: {
74
+ forbidden: string;
75
+ };
76
+ };
77
+ create(context: RuleContext): {
78
+ CallExpression(node: Node): void;
79
+ ExportNamedDeclaration(node: Node): void;
80
+ };
81
+ };
82
+ "no-file-definition-id": {
83
+ meta: {
84
+ type: string;
85
+ docs: {
86
+ description: string;
87
+ };
88
+ schema: never[];
89
+ messages: {
90
+ filename: string;
91
+ };
92
+ };
93
+ create(context: RuleContext): {
94
+ CallExpression(node: Node): void;
95
+ };
96
+ };
97
+ "no-raw-definition-references": {
98
+ meta: {
99
+ type: string;
100
+ docs: {
101
+ description: string;
102
+ };
103
+ schema: never[];
104
+ messages: {
105
+ direct: string;
106
+ };
107
+ };
108
+ create(context: RuleContext): {
109
+ CallExpression(node: Node): void;
110
+ };
111
+ };
112
+ }>;
113
+ }>;
114
+ };
115
+ rules: {
116
+ "glove-foundry/no-agent-contracts": string;
117
+ "glove-foundry/no-file-definition-id": string;
118
+ "glove-foundry/no-raw-definition-references": string;
119
+ };
120
+ }>;
121
+
122
+ export { foundryEslintConfig as default, foundryEslintConfig, foundryEslintPlugin };
package/dist/eslint.js ADDED
@@ -0,0 +1,172 @@
1
+ // src/eslint.ts
2
+ function propertyName(property) {
3
+ if (property.computed) return void 0;
4
+ return property.key?.name ?? property.key?.value;
5
+ }
6
+ var noAgentContracts = {
7
+ meta: {
8
+ type: "problem",
9
+ docs: { description: "Keep transport input/output contracts out of agent definitions." },
10
+ schema: [],
11
+ messages: {
12
+ forbidden: "Agent definitions cannot export or pass '{{name}}'. Foundry owns invocation and result contracts."
13
+ }
14
+ },
15
+ create(context) {
16
+ return {
17
+ CallExpression(node) {
18
+ if (node.callee?.type !== "Identifier" || node.callee.name !== "defineAgent") return;
19
+ const object = node.arguments?.[0];
20
+ if (object?.type !== "ObjectExpression") return;
21
+ for (const property of object.properties ?? []) {
22
+ const name = propertyName(property);
23
+ if (name === "input" || name === "output") {
24
+ context.report({ node: property, messageId: "forbidden", data: { name } });
25
+ }
26
+ }
27
+ },
28
+ ExportNamedDeclaration(node) {
29
+ const declaration = node.declaration;
30
+ if (declaration?.type !== "VariableDeclaration") return;
31
+ for (const item of declaration.declarations ?? []) {
32
+ const name = item.id?.name;
33
+ if (name === "input" || name === "output") {
34
+ context.report({ node: item, messageId: "forbidden", data: { name } });
35
+ }
36
+ }
37
+ }
38
+ };
39
+ }
40
+ };
41
+ var noRawDefinitionReferences = {
42
+ meta: {
43
+ type: "problem",
44
+ docs: {
45
+ description: "Require imported definition values for code-authored Foundry relationships."
46
+ },
47
+ schema: [],
48
+ messages: {
49
+ direct: "Use the imported {{replacement}} definition instead of '{{name}}'. String ids belong at JSON/API/storage reconstruction boundaries."
50
+ }
51
+ },
52
+ create(context) {
53
+ const inspectPlaybookValues = (node) => {
54
+ if (!node || typeof node !== "object") return;
55
+ if (node.type === "Property") {
56
+ const name = propertyName(node);
57
+ const replacement = name === "event" ? "event" : name === "action" ? "action" : name === "applicationAccountId" ? "applicationAccount" : void 0;
58
+ if (name && replacement && (node.value?.type === "Literal" || name === "applicationAccountId")) {
59
+ context.report({ node, messageId: "direct", data: { name, replacement } });
60
+ }
61
+ }
62
+ for (const key of ["properties", "elements"]) {
63
+ for (const child of node[key] ?? []) inspectPlaybookValues(child);
64
+ }
65
+ if (node.type === "Property") inspectPlaybookValues(node.value);
66
+ };
67
+ return {
68
+ CallExpression(node) {
69
+ if (node.callee?.type !== "Identifier") return;
70
+ const helper = node.callee.name;
71
+ if (helper === "install") {
72
+ const config = node.arguments?.[1];
73
+ if (config?.type === "ObjectExpression") {
74
+ for (const property of config.properties ?? []) {
75
+ if (propertyName(property) === "accountId") {
76
+ context.report({
77
+ node: property,
78
+ messageId: "direct",
79
+ data: { name: "accountId", replacement: "account" }
80
+ });
81
+ }
82
+ }
83
+ }
84
+ return;
85
+ }
86
+ const object = node.arguments?.[0];
87
+ if (object?.type !== "ObjectExpression") return;
88
+ if (helper === "composePlaybook") inspectPlaybookValues(object);
89
+ const forbidden = helper === "composePlaybook" ? /* @__PURE__ */ new Map([
90
+ ["transmissionId", "transmission"],
91
+ ["applicationId", "application"],
92
+ ["routeId", "route"],
93
+ ["routeIds", "routes"]
94
+ ]) : null;
95
+ if (!forbidden) return;
96
+ for (const property of object.properties ?? []) {
97
+ const name = propertyName(property);
98
+ const replacement = name ? forbidden.get(name) : void 0;
99
+ if (!name || !replacement) continue;
100
+ context.report({
101
+ node: property,
102
+ messageId: "direct",
103
+ data: { name, replacement }
104
+ });
105
+ }
106
+ }
107
+ };
108
+ }
109
+ };
110
+ var FILE_ROUTED_HELPERS = /* @__PURE__ */ new Set([
111
+ "defineAgent",
112
+ "definePlaybookAction",
113
+ "defineAgentApplication",
114
+ "defineApp",
115
+ "defineConnection",
116
+ "defineLayer",
117
+ "defineMcp",
118
+ "defineMemory",
119
+ "definePlaybookSubscription",
120
+ "defineSharedTool",
121
+ "defineSubscriber",
122
+ "defineTransmission",
123
+ "defineTransmissionEvent",
124
+ "defineTransmissionPredicate"
125
+ ]);
126
+ var noFileDefinitionId = {
127
+ meta: {
128
+ type: "problem",
129
+ docs: { description: "Let convention filenames own static definition identities." },
130
+ schema: [],
131
+ messages: {
132
+ filename: "Remove this id. Default-export the definition and Foundry will derive its stable identity from the convention filename."
133
+ }
134
+ },
135
+ create(context) {
136
+ return {
137
+ CallExpression(node) {
138
+ if (node.callee?.type !== "Identifier" || !FILE_ROUTED_HELPERS.has(node.callee.name)) return;
139
+ const object = node.arguments?.[0];
140
+ if (object?.type !== "ObjectExpression") return;
141
+ for (const property of object.properties ?? []) {
142
+ if (propertyName(property) === "id") {
143
+ context.report({ node: property, messageId: "filename" });
144
+ }
145
+ }
146
+ }
147
+ };
148
+ }
149
+ };
150
+ var foundryEslintPlugin = Object.freeze({
151
+ rules: Object.freeze({
152
+ "no-agent-contracts": noAgentContracts,
153
+ "no-file-definition-id": noFileDefinitionId,
154
+ "no-raw-definition-references": noRawDefinitionReferences
155
+ })
156
+ });
157
+ var foundryEslintConfig = Object.freeze({
158
+ name: "glove-foundry/recommended",
159
+ files: ["**/*.{ts,tsx,mts,js,mjs}"],
160
+ plugins: { "glove-foundry": foundryEslintPlugin },
161
+ rules: {
162
+ "glove-foundry/no-agent-contracts": "error",
163
+ "glove-foundry/no-file-definition-id": "error",
164
+ "glove-foundry/no-raw-definition-references": "error"
165
+ }
166
+ });
167
+ var eslint_default = foundryEslintConfig;
168
+ export {
169
+ eslint_default as default,
170
+ foundryEslintConfig,
171
+ foundryEslintPlugin
172
+ };
@@ -0,0 +1,6 @@
1
+ import * as station_signal from 'station-signal';
2
+
3
+ /** Private execution-backend entrypoint; application modules remain definitions. */
4
+ declare const _default: station_signal.AnySignal;
5
+
6
+ export { _default as default };
@@ -0,0 +1,23 @@
1
+ import {
2
+ FOUNDRY_AGENT_FILE_ENV,
3
+ FOUNDRY_AGENT_ROUTE_ENV,
4
+ bindAgentLocalDefinitions,
5
+ compileAgentModule
6
+ } from "./chunk-CRWY7M66.js";
7
+
8
+ // src/execution-agent.ts
9
+ import { pathToFileURL } from "node:url";
10
+ import { dirname } from "node:path";
11
+ var route = process.env[FOUNDRY_AGENT_ROUTE_ENV];
12
+ var file = process.env[FOUNDRY_AGENT_FILE_ENV];
13
+ if (!route || !file) {
14
+ throw new Error(
15
+ "The Foundry execution entrypoint requires GLOVE_FOUNDRY_AGENT_ROUTE and GLOVE_FOUNDRY_AGENT_FILE."
16
+ );
17
+ }
18
+ var module = await import(pathToFileURL(file).href);
19
+ await bindAgentLocalDefinitions(dirname(file));
20
+ var execution_agent_default = compileAgentModule(route, module);
21
+ export {
22
+ execution_agent_default as default
23
+ };
@@ -0,0 +1,103 @@
1
+ import { A as AgentPlaybook, F as FoundryRuntime, D as DiscoveredAgent, a as FoundryManifest, b as AnyFoundryTransmission, c as AccountReference, I as InferAccountMetadata, d as AgentBinding, e as AgentInstance, f as FoundryAgentApplication, g as InboundRoute, O as OutboundRoute, C as CapabilityDefinition, h as InferInboundConfig, i as InferOutboundConfig } from './client-CLkZREDr.js';
2
+ export { j as AccountContract, k as AccountDirectory, l as AccountFilter, m as AccountId, n as AccountNotFound, o as AccountSessionAdapter, p as AccountSessionRequest, q as AccountSessionUnavailable, r as AccountSummary, s as AgentApplicationContribution, t as AgentApplicationInstallContext, u as AgentApplicationOptions, v as AgentAssemblyContext, w as AgentAssemblyOptions, x as AgentDefinitionId, y as AgentDefinitionSurfaceContext, z as AgentFactoryContext, B as AgentHandlerContext, E as AgentId, G as AgentInstallContext, H as AgentInstallation, J as AgentInstallationKind, K as AgentPlaybookInput, L as AgentProvisioningPolicy, M as AgentRuntimeControls, N as AnyFoundryAgent, P as ApplicationConnectionContext, Q as ApplicationConnectionState, R as ApplicationConnectionStatus, S as BindingFilter, T as BindingId, U as BindingNotFound, V as CapabilityId, W as ComposedAgentPlaybook, X as ComposedAgentPlaybookInput, Y as ConnectionReceiveInput, Z as Conversation, _ as CreateAgentInstanceOptions, $ as CreateConversationOptions, a0 as CustomProvisionedAgent, a1 as CustomProvisioningContext, a2 as DefineAgentOptions, a3 as DefineConnectionOptions, a4 as DefineFoundryReplOptions, a5 as DefineFoundryScheduleOptions, a6 as DefineFoundrySubagentOptions, a7 as DefineFoundryWorkingEnvironmentOptions, a8 as DefinePlaybookSubscriptionOptions, a9 as DefinitionConfigInput, aa as EMPTY_AGENT_COMPOSITION, ab as EMPTY_CAPABILITY_REGISTRY, ac as EMPTY_FOUNDRY_APPLICATION, ad as EMPTY_NATIVE_REGISTRY, ae as EgressAdapter, af as EgressContext, ag as EnvironmentValue, ah as EventFilter, ai as EventId, aj as EventNotFound, ak as EventReference, al as EventStore, am as FOUNDRY_AGENT_APPLICATION_BRAND, an as FOUNDRY_AGENT_BRAND, ao as FOUNDRY_AGENT_DEFINITION_BRAND, ap as FOUNDRY_AGENT_FILE_ENV, aq as FOUNDRY_AGENT_ROUTE_ENV, ar as FOUNDRY_APPLICATION_BRAND, as as FOUNDRY_APPLICATION_ENV, at as FOUNDRY_COMPOSED_PLAYBOOK_BRAND, au as FOUNDRY_CONNECTION_BRAND, av as FOUNDRY_CORE_COMMAND_EVENT, aw as FOUNDRY_EVENT_PREFIX, ax as FOUNDRY_EXECUTION_MARKER, ay as FOUNDRY_LAYER_BRAND, az as FOUNDRY_MCP_BRAND, aA as FOUNDRY_MEMORY_BRAND, aB as FOUNDRY_PLAYBOOK_ACTION_BRAND, aC as FOUNDRY_REPL_BRAND, aD as FOUNDRY_SCHEDULE_BRAND, aE as FOUNDRY_SHARED_TOOL_BRAND, aF as FOUNDRY_SUBSCRIBER_BRAND, aG as FOUNDRY_TRANSMISSION_BRAND, aH as FOUNDRY_TRANSMISSION_EVENT_BRAND, aI as FOUNDRY_TRANSMISSION_PREDICATE_BRAND, aJ as FOUNDRY_WORKING_ENVIRONMENT_BRAND, aK as FoundryAccountSessionAdapter, aL as FoundryActivationRecord, aM as FoundryAgent, aN as FoundryAgentComponent, aO as FoundryAgentComposition, aP as FoundryAgentConventionModule, aQ as FoundryAgentDefinition, aR as FoundryAgentMode, aS as FoundryApp, aT as FoundryApplication, aU as FoundryApplicationConnection, aV as FoundryApplicationManifest, aW as FoundryApplicationOptions, aX as FoundryCall, aY as FoundryCallContext, aZ as FoundryCallOptions, a_ as FoundryCapabilityKind, a$ as FoundryCapabilityManifest, b0 as FoundryCapabilityManifestEntry, b1 as FoundryCapabilityRegistry, b2 as FoundryClient, b3 as FoundryClientOptions, b4 as FoundryCompositionSource, b5 as FoundryCoreCommand, b6 as FoundryDataAdapter, b7 as FoundryDomainError, b8 as FoundryEvent, b9 as FoundryEventCategory, ba as FoundryExecutionContext, bb as FoundryHealth, bc as FoundryHookDefinition, bd as FoundryInstallable, be as FoundryInstanceProvisioner, bf as FoundryJavaScriptReplDefinition, bg as FoundryLayer, bh as FoundryLayerOptions, bi as FoundryLayerReference, bj as FoundryLayerSelection, bk as FoundryLispReplDefinition, bl as FoundryListResolver, bm as FoundryManifestAgent, bn as FoundryManifestCapability, bo as FoundryManifestTransmission, bp as FoundryMcp, bq as FoundryMcpOptions, br as FoundryMemoryProfile, bs as FoundryMemoryProfileOptions, bt as FoundryMemoryReference, bu as FoundryMemorySelection, bv as FoundryMeshConfig, bw as FoundryMessageInput, bx as FoundryMountedRepl, by as FoundryNativeManifest, bz as FoundryNativeManifestEntry, bA as FoundryNativeRegistry, bB as FoundryObservabilityAdapter, bC as FoundryPlaybookAction, bD as FoundryPythonReplDefinition, bE as FoundryReplDefinition, bF as FoundryRequest, bG as FoundryResolver, bH as FoundryResult, bI as FoundryRouteMap, bJ as FoundryRun, bK as FoundryRunHandle, bL as FoundryRuntimeError, bM as FoundryRuntimeOptions, bN as FoundryScheduleDefinition, bO as FoundryScheduleTiming, bP as FoundryScheduleTimingInput, bQ as FoundrySharedTool, bR as FoundrySubscriber, bS as FoundrySubscriberOptions, bT as FoundrySubscriberSelection, bU as FoundrySurfaceContext, bV as FoundryTask, bW as FoundryTransmission, bX as FoundryTransmissionEvent, bY as FoundryTransmissionPredicate, bZ as FoundryVfs, b_ as FoundryVfsHandle, b$ as FoundryWorkingEnvironmentCreateContext, c0 as FoundryWorkingEnvironmentDefinition, c1 as FoundryWorkingEnvironmentPersistenceAdapter, c2 as FoundryWorkingEnvironmentPersistenceContext, c3 as FoundryWorkingEnvironmentSnapshotOwner, c4 as GrantResolutionError, c5 as GrantResolver, c6 as InboundContract, c7 as InboundDeliveryClaim, c8 as InferAgentInput, c9 as InferAgentOutput, ca as InferInboundEvent, cb as InferOutboundInput, cc as InferOutboundOutput, cd as IngressAdapter, ce as IngressContext, cf as InstallationSelection, cg as ManifestCompilationError, ch as McpAdapterFactory, ci as MemoryFoundryDataAdapter, cj as MemoryObservabilityAdapter, ck as OutboundContract, cl as PlaybookActionOptions, cm as PlaybookDirective, cn as PlaybookDirectiveInput, co as PlaybookMatch, cp as PlaybookMatchInput, cq as PlaybookOutboundDirective, cr as PlaybookOutboundInput, cs as PlaybookSubscription, ct as PlaybookSubscriptionTarget, cu as PlaybookSubscriptionTargetInput, cv as ProvisionAgentOptions, cw as ReplyPolicy, cx as ResolveGrantRequest, cy as Route, cz as RouteFilter, cA as RouteId, cB as RouteNotFound, cC as RunGrant, cD as RunId, cE as SharedInboxItem, cF as SharedToolOptions, cG as TopologyConflict, cH as TopologyStore, cI as TransmissionEventDirection, cJ as TransmissionEventOptions, cK as TransmissionId, cL as TransmissionOptions, cM as TransmissionPredicateOptions, cN as TransmissionSerializationContext, cO as UpdateAgentInstanceOptions, cP as WaitOptions, cQ as WorkspaceEntry, cR as compileApplicationManifest, cS as composeAgent, cT as composePlaybook, cU as configureLayer, cV as configureMemory, cW as createAgentInstance, cX as createConversation, cY as createFoundryClient, cZ as createFoundryCoreTools, c_ as createInstalledApplicationTransmissionTools, c$ as createManifest, d0 as defineAgent, d1 as defineAgentApplication, d2 as defineAgentFromModule, d3 as defineAgentInstance, d4 as defineApp, d5 as defineApplication, d6 as defineCall, d7 as defineConnection, d8 as defineLayer, d9 as defineMcp, da as defineMemory, db as definePlaybookAction, dc as definePlaybookSubscription, dd as defineRepl, de as defineRoutes, df as defineSchedule, dg as defineSharedTool, dh as defineSubagent, di as defineSubscriber, dj as defineTransmission, dk as defineTransmissionEvent, dl as defineTransmissionPredicate, dm as defineWorkingEnvironment, dn as discoverAgents, dp as findAgentFiles, dq as foundryDataEnvironmentPersistence, dr as grantResolverLive, ds as install, dt as installRegistry, du as installationKey, dv as internalAgentName, dw as isFoundryAgent, dx as isFoundryAgentDefinition, dy as isFoundryApplication, dz as isFoundryCapability, dA as isFoundryLayer, dB as isFoundrySchedule, dC as isFoundrySubscriber, dD as isFoundryTransmission, dE as isInboxCapableStore, dF as memoryAccountDirectory, dG as memoryEventStore, dH as memoryTopologyStore, dI as mountAgentDefinitionMemory, dJ as mountFoundrySurfaces, dK as reconstructAgentInstance, dL as reconstructPlaybook, dM as reconstructPlaybookSubscription, dN as routeFromAgentFile, dO as routeFromInternalAgentName, dP as toGloveMessage, dQ as toGloveRequestInput, dR as transmissionPredicate } from './client-CLkZREDr.js';
3
+ import { AddressInfo } from 'node:net';
4
+ export { FoundryConfig, FoundryExecutionConfig, defineConfig } from './config.js';
5
+ import 'glove-core';
6
+ import 'effect';
7
+ import 'zod';
8
+ import 'glove-mesh';
9
+ import 'glove-mcp';
10
+ import 'glove-memory';
11
+ import 'glove-memory/tools';
12
+ import 'glove-working-environment';
13
+ import 'glove-js';
14
+ import 'glove-lisp';
15
+ import 'glove-python';
16
+ import 'effect/Brand';
17
+
18
+ /** Deterministic default rendering for an event merged into a Glove conversation. */
19
+ declare function serializeInboundTransmissionXml(input: {
20
+ readonly transmissionId: string;
21
+ readonly routeId: string;
22
+ readonly eventId: string;
23
+ readonly eventName: string;
24
+ readonly threadKey: string;
25
+ readonly event: unknown;
26
+ readonly playbooks: ReadonlyArray<AgentPlaybook>;
27
+ }): string;
28
+
29
+ interface FoundryServerOptions {
30
+ host?: string;
31
+ port?: number;
32
+ }
33
+ declare class FoundryServer {
34
+ private readonly runtime;
35
+ private readonly options;
36
+ private readonly server;
37
+ private readonly eventStreams;
38
+ private addressInfo;
39
+ constructor(runtime: FoundryRuntime, options?: FoundryServerOptions);
40
+ listen(): Promise<{
41
+ host: string;
42
+ port: number;
43
+ url: string;
44
+ }>;
45
+ close(): Promise<void>;
46
+ address(): AddressInfo | null;
47
+ private handle;
48
+ private streamEvents;
49
+ }
50
+
51
+ declare function writeGeneratedTypes(options: {
52
+ rootDir: string;
53
+ agents: readonly DiscoveredAgent[];
54
+ manifest: FoundryManifest;
55
+ }): Promise<{
56
+ routesFile: string;
57
+ manifestFile: string;
58
+ }>;
59
+
60
+ type DefineAccountOptions<TTransmission extends AnyFoundryTransmission = AnyFoundryTransmission> = Omit<AccountReference, "id" | "transmissionId" | "metadata"> & {
61
+ readonly id: string;
62
+ readonly transmission: TTransmission;
63
+ readonly metadata: InferAccountMetadata<TTransmission>;
64
+ };
65
+ declare function defineAccount<TTransmission extends AnyFoundryTransmission>(options: DefineAccountOptions<TTransmission>): AccountReference & {
66
+ readonly metadata: InferAccountMetadata<TTransmission>;
67
+ };
68
+ interface RouteReferenceOptions<TTransmission extends AnyFoundryTransmission> {
69
+ readonly transmission: TTransmission;
70
+ readonly account?: AccountReference;
71
+ }
72
+ type DefineInboundRouteOptions<TTransmission extends AnyFoundryTransmission = AnyFoundryTransmission> = Omit<InboundRoute, "id" | "direction" | "transmissionId" | "accountId" | "config"> & RouteReferenceOptions<TTransmission> & {
73
+ readonly id: string;
74
+ readonly config: InferInboundConfig<TTransmission>;
75
+ };
76
+ declare function defineInboundRoute<TTransmission extends AnyFoundryTransmission>(options: DefineInboundRouteOptions<TTransmission>): InboundRoute & {
77
+ readonly config: InferInboundConfig<TTransmission>;
78
+ };
79
+ type DefineOutboundRouteOptions<TTransmission extends AnyFoundryTransmission = AnyFoundryTransmission> = Omit<OutboundRoute, "id" | "direction" | "transmissionId" | "accountId" | "config"> & RouteReferenceOptions<TTransmission> & {
80
+ readonly id: string;
81
+ readonly config: InferOutboundConfig<TTransmission>;
82
+ };
83
+ declare function defineOutboundRoute<TTransmission extends AnyFoundryTransmission>(options: DefineOutboundRouteOptions<TTransmission>): OutboundRoute & {
84
+ readonly config: InferOutboundConfig<TTransmission>;
85
+ };
86
+ interface DefineBindingOptions extends Omit<AgentBinding, "id" | "agentId" | "transmissionId" | "accountId" | "routeId" | "capabilities" | "reply"> {
87
+ readonly id: string;
88
+ readonly agent: AgentInstance;
89
+ readonly application?: FoundryAgentApplication;
90
+ readonly transmission: AnyFoundryTransmission;
91
+ readonly account?: AccountReference;
92
+ readonly route?: InboundRoute | OutboundRoute;
93
+ readonly capabilities: ReadonlyArray<CapabilityDefinition>;
94
+ readonly reply?: {
95
+ readonly mode: "none" | "origin";
96
+ } | {
97
+ readonly mode: "route";
98
+ readonly route: OutboundRoute;
99
+ };
100
+ }
101
+ declare function defineBinding(options: DefineBindingOptions): AgentBinding;
102
+
103
+ export { AccountReference, AgentBinding, AgentInstance, AgentPlaybook, AnyFoundryTransmission, CapabilityDefinition, type DefineAccountOptions, type DefineBindingOptions, type DefineInboundRouteOptions, type DefineOutboundRouteOptions, DiscoveredAgent, FoundryAgentApplication, FoundryManifest, FoundryRuntime, FoundryServer, type FoundryServerOptions, InboundRoute, InferAccountMetadata, InferInboundConfig, InferOutboundConfig, OutboundRoute, defineAccount, defineBinding, defineInboundRoute, defineOutboundRoute, serializeInboundTransmissionXml, writeGeneratedTypes };