glove-foundry 0.4.1 → 0.5.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.
- package/README.md +17 -1
- package/dist/chunk-5NFLGHOC.js +281 -0
- package/dist/chunk-J7ZBJM54.js +6 -0
- package/dist/{chunk-5LDW2N2E.js → chunk-KBMD4RYU.js} +1980 -3464
- package/dist/chunk-LW5PJ2FN.js +546 -0
- package/dist/{chunk-25BGNRJN.js → chunk-SGF3CFUR.js} +248 -120
- package/dist/chunk-TH5ETCG2.js +730 -0
- package/dist/cli.js +7 -3
- package/dist/{client-D0-pKEZM.d.ts → client-DcsnudMI.d.ts} +9 -3
- package/dist/client.d.ts +3 -1
- package/dist/config.d.ts +1 -0
- package/dist/execution-agent.js +9 -4
- package/dist/execution-daemon.d.ts +2 -0
- package/dist/execution-daemon.js +157 -0
- package/dist/execution-loader.d.ts +6 -0
- package/dist/execution-loader.js +20 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.js +32 -27
- package/dist/station.d.ts +35 -0
- package/dist/station.js +9 -0
- package/docs/architecture.md +1 -1
- package/docs/building-with-foundry.md +7 -1
- package/docs/execution-release.md +57 -0
- package/docs/execution.md +97 -0
- package/docs/release-verification.md +3 -1
- package/package.json +23 -15
- package/templates/minimal/README.md +1 -1
- package/templates/travel-concierge/README.md +1 -1
package/dist/cli.js
CHANGED
|
@@ -3,14 +3,16 @@ import {
|
|
|
3
3
|
FoundryRuntime,
|
|
4
4
|
FoundryServer,
|
|
5
5
|
writeGeneratedTypes
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-SGF3CFUR.js";
|
|
7
7
|
import {
|
|
8
8
|
DEFAULT_FOUNDRY_CONFIG
|
|
9
9
|
} from "./chunk-ZFNMFE3T.js";
|
|
10
|
+
import "./chunk-J7ZBJM54.js";
|
|
10
11
|
import {
|
|
11
12
|
EMPTY_FOUNDRY_APPLICATION,
|
|
12
13
|
isFoundryApplication
|
|
13
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-KBMD4RYU.js";
|
|
15
|
+
import "./chunk-5NFLGHOC.js";
|
|
14
16
|
|
|
15
17
|
// src/cli.ts
|
|
16
18
|
import { watch } from "node:fs";
|
|
@@ -318,7 +320,8 @@ export default defineConfig({
|
|
|
318
320
|
private: true,
|
|
319
321
|
// Foundry and the Glove packages are ESM. This scopes that to the
|
|
320
322
|
// agents, so the surrounding app keeps its own module system.
|
|
321
|
-
type: "module"
|
|
323
|
+
type: "module",
|
|
324
|
+
engines: { node: ">=22" }
|
|
322
325
|
},
|
|
323
326
|
null,
|
|
324
327
|
2
|
|
@@ -337,6 +340,7 @@ export default defineConfig({
|
|
|
337
340
|
version: "0.1.0",
|
|
338
341
|
private: true,
|
|
339
342
|
type: "module",
|
|
343
|
+
engines: { node: ">=22" },
|
|
340
344
|
scripts: {
|
|
341
345
|
dev: "glove foundry dev",
|
|
342
346
|
start: "glove foundry start",
|
|
@@ -13,6 +13,7 @@ import { FactAdapter, FactScope, FactStore, FactInput } from 'glove-facts';
|
|
|
13
13
|
import { GoalAdapter, GoalScope, GoalProgram, GoalRunner } from 'glove-memory/goals';
|
|
14
14
|
import { FormAdapter, FormRunner } from 'glove-memory/forms';
|
|
15
15
|
import * as effect_Brand from 'effect/Brand';
|
|
16
|
+
import { FoundryStationDaemonAdapter } from './station.js';
|
|
16
17
|
import { FoundryConfig } from './config.js';
|
|
17
18
|
|
|
18
19
|
declare const TransmissionId: Schema.brand<Schema.refine<string, typeof Schema.String>, "FoundryTransmissionId">;
|
|
@@ -1560,6 +1561,8 @@ type FoundryCall<TInputSchema extends z.ZodType = z.ZodType, TOutputSchema exten
|
|
|
1560
1561
|
declare function defineCall<TInputSchema extends z.ZodType, TOutputSchema extends z.ZodType>(options: FoundryCallOptions<TInputSchema, TOutputSchema>): FoundryCall<TInputSchema, TOutputSchema>;
|
|
1561
1562
|
interface FoundryExecutionContext<TInput = unknown> extends FoundrySurfaceContext<TInput>, FoundryGuidanceHandles {
|
|
1562
1563
|
readonly installations: ReadonlyArray<AgentInstallation>;
|
|
1564
|
+
/** Register run-scoped teardown for an explicitly mounted capability. Runs in reverse order, even if assembly fails. */
|
|
1565
|
+
readonly onCleanup: (cleanup: () => void | Promise<void>) => void;
|
|
1563
1566
|
/** Native persistent environment mounted for this run, when configured. */
|
|
1564
1567
|
readonly workingEnvironment?: WorkingEnvironment;
|
|
1565
1568
|
/** Guarded VFS handle for host-side handlers and layers. */
|
|
@@ -2011,6 +2014,8 @@ interface FoundryRequestAuthorizationAdapter<TError = never> {
|
|
|
2011
2014
|
/** Process infrastructure only; agent files own runtime capabilities. */
|
|
2012
2015
|
interface FoundryApplicationOptions {
|
|
2013
2016
|
readonly name: string;
|
|
2017
|
+
/** Optional configuration of the managed daemon; loaded from the application file in its process. */
|
|
2018
|
+
readonly daemon?: FoundryStationDaemonAdapter;
|
|
2014
2019
|
readonly accounts?: ReadonlyArray<AccountReference>;
|
|
2015
2020
|
readonly routes?: ReadonlyArray<Route>;
|
|
2016
2021
|
readonly bindings?: ReadonlyArray<AgentBinding>;
|
|
@@ -2188,12 +2193,12 @@ declare class FoundryRuntime {
|
|
|
2188
2193
|
private readonly execution;
|
|
2189
2194
|
private readonly observer;
|
|
2190
2195
|
private readonly signalRunner;
|
|
2191
|
-
private readonly envStore;
|
|
2192
|
-
private readonly envProvider;
|
|
2193
2196
|
private readonly scheduleAdapter;
|
|
2194
2197
|
private readonly services;
|
|
2195
2198
|
private readonly runnerLoops;
|
|
2196
2199
|
private readonly materializedActivations;
|
|
2200
|
+
private readonly activationTransitions;
|
|
2201
|
+
private readonly activationDispatches;
|
|
2197
2202
|
private readonly activationTimers;
|
|
2198
2203
|
private readonly approvalDirectory;
|
|
2199
2204
|
private readonly coreCommandDirectory;
|
|
@@ -2364,12 +2369,13 @@ declare class FoundryRuntime {
|
|
|
2364
2369
|
private validatePlaybooks;
|
|
2365
2370
|
private validateRoute;
|
|
2366
2371
|
private validateBinding;
|
|
2367
|
-
private executionSignal;
|
|
2368
2372
|
private seedTopology;
|
|
2369
2373
|
private runInBackground;
|
|
2370
2374
|
private settleRunnerLoops;
|
|
2371
2375
|
private enqueueCoreRequest;
|
|
2376
|
+
private withActivationTransition;
|
|
2372
2377
|
private executeCoreCommand;
|
|
2378
|
+
private executeCoreCommandUnlocked;
|
|
2373
2379
|
private syncAgentPlaybooks;
|
|
2374
2380
|
private assertActivationOwnership;
|
|
2375
2381
|
private backendScheduleId;
|
package/dist/client.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { bf as FoundryClient, bg as FoundryClientAuthorizationAdapter, bh as FoundryClientOptions, bu as FoundryHealth, c7 as FoundryRunHandle, ce as FoundrySteerHandleResult, db as WaitOptions, dk as createFoundryClient } from './client-
|
|
1
|
+
export { bf as FoundryClient, bg as FoundryClientAuthorizationAdapter, bh as FoundryClientOptions, bu as FoundryHealth, c7 as FoundryRunHandle, ce as FoundrySteerHandleResult, db as WaitOptions, dk as createFoundryClient } from './client-DcsnudMI.js';
|
|
2
2
|
import 'glove-core';
|
|
3
3
|
import 'effect';
|
|
4
4
|
import 'zod';
|
|
@@ -14,4 +14,6 @@ import 'glove-facts';
|
|
|
14
14
|
import 'glove-memory/goals';
|
|
15
15
|
import 'glove-memory/forms';
|
|
16
16
|
import 'effect/Brand';
|
|
17
|
+
import './station.js';
|
|
18
|
+
import 'station-daemon';
|
|
17
19
|
import './config.js';
|
package/dist/config.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/** Framework-level execution policy. The underlying runner is deliberately private. */
|
|
2
2
|
interface FoundryExecutionConfig {
|
|
3
3
|
readonly pollIntervalMs?: number;
|
|
4
|
+
/** @deprecated Station 3 daemon owns idle backoff; retained for source compatibility. */
|
|
4
5
|
readonly idlePollIntervalMs?: number;
|
|
5
6
|
readonly maxConcurrent?: number;
|
|
6
7
|
readonly maxAttempts?: number;
|
package/dist/execution-agent.js
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
|
-
FOUNDRY_AGENT_FILE_ENV,
|
|
3
|
-
FOUNDRY_AGENT_ROUTE_ENV,
|
|
4
|
-
bindAgentLocalDefinitions,
|
|
5
2
|
compileAgentModule
|
|
6
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TH5ETCG2.js";
|
|
4
|
+
import "./chunk-LW5PJ2FN.js";
|
|
5
|
+
import {
|
|
6
|
+
bindAgentLocalDefinitions
|
|
7
|
+
} from "./chunk-KBMD4RYU.js";
|
|
8
|
+
import {
|
|
9
|
+
FOUNDRY_AGENT_FILE_ENV,
|
|
10
|
+
FOUNDRY_AGENT_ROUTE_ENV
|
|
11
|
+
} from "./chunk-5NFLGHOC.js";
|
|
7
12
|
|
|
8
13
|
// src/execution-agent.ts
|
|
9
14
|
import { pathToFileURL } from "node:url";
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import {
|
|
2
|
+
executionEvents
|
|
3
|
+
} from "./chunk-J7ZBJM54.js";
|
|
4
|
+
import {
|
|
5
|
+
FOUNDRY_APPLICATION_ENV,
|
|
6
|
+
internalAgentName
|
|
7
|
+
} from "./chunk-5NFLGHOC.js";
|
|
8
|
+
|
|
9
|
+
// src/execution-daemon.ts
|
|
10
|
+
import { randomBytes } from "node:crypto";
|
|
11
|
+
import { mkdir, writeFile } from "node:fs/promises";
|
|
12
|
+
import { createServer } from "node:net";
|
|
13
|
+
import { join } from "node:path";
|
|
14
|
+
import { pathToFileURL } from "node:url";
|
|
15
|
+
import { createStation, MemoryKeyStorage, MemoryLogStorage } from "station-daemon/server";
|
|
16
|
+
import { resolveConfig } from "station-daemon";
|
|
17
|
+
import { StationClient, StationApiError } from "station-client";
|
|
18
|
+
import { MemoryAdapter, configure } from "station-signal";
|
|
19
|
+
import { ScheduleMemoryAdapter } from "station-schedules";
|
|
20
|
+
import { MemoryEnvStorage } from "station-env";
|
|
21
|
+
var station;
|
|
22
|
+
var client;
|
|
23
|
+
var queue = new MemoryAdapter();
|
|
24
|
+
var schedules = new ScheduleMemoryAdapter();
|
|
25
|
+
var definitions = /* @__PURE__ */ new Map();
|
|
26
|
+
var stopping;
|
|
27
|
+
var resources;
|
|
28
|
+
function send(message) {
|
|
29
|
+
if (process.connected) process.send?.(message);
|
|
30
|
+
}
|
|
31
|
+
async function stop() {
|
|
32
|
+
return stopping ??= (async () => {
|
|
33
|
+
if (station) await station.stop();
|
|
34
|
+
else await Promise.allSettled([resources?.browser?.close(), resources?.sandbox?.close()]);
|
|
35
|
+
})();
|
|
36
|
+
}
|
|
37
|
+
async function freePort() {
|
|
38
|
+
const server = createServer();
|
|
39
|
+
await new Promise((resolve, reject) => {
|
|
40
|
+
server.once("error", reject);
|
|
41
|
+
server.listen(0, "127.0.0.1", resolve);
|
|
42
|
+
});
|
|
43
|
+
const address = server.address();
|
|
44
|
+
if (!address || typeof address === "string") throw new Error("No daemon port available.");
|
|
45
|
+
await new Promise((resolve, reject) => server.close((error) => error ? reject(error) : resolve()));
|
|
46
|
+
return address.port;
|
|
47
|
+
}
|
|
48
|
+
process.on("message", (message) => {
|
|
49
|
+
void (async () => {
|
|
50
|
+
const command = message.command;
|
|
51
|
+
let value;
|
|
52
|
+
switch (command.method) {
|
|
53
|
+
case "init": {
|
|
54
|
+
if (station) throw new Error("Execution daemon is already initialized.");
|
|
55
|
+
const options = command.options;
|
|
56
|
+
const signals = join(options.directory, "signals");
|
|
57
|
+
await mkdir(signals, { recursive: true, mode: 448 });
|
|
58
|
+
await writeFile(join(signals, "package.json"), '{"type":"module"}', { mode: 384 });
|
|
59
|
+
for (const [index, agent] of options.agents.entries()) {
|
|
60
|
+
const entry = join(signals, `${index}.js`);
|
|
61
|
+
await writeFile(
|
|
62
|
+
entry,
|
|
63
|
+
`import { loadExecutionAgent } from ${JSON.stringify(pathToFileURL(options.loader).href)};
|
|
64
|
+
export default await loadExecutionAgent(${JSON.stringify(agent.route)}, ${JSON.stringify(agent.filePath)});
|
|
65
|
+
`,
|
|
66
|
+
{ mode: 384 }
|
|
67
|
+
);
|
|
68
|
+
const signal = (await import(pathToFileURL(entry).href)).default;
|
|
69
|
+
definitions.set(signal.name, signal);
|
|
70
|
+
}
|
|
71
|
+
const subscribers = Object.fromEntries(executionEvents.map((event) => [event, (value2) => send({ event, value: value2 })]));
|
|
72
|
+
const applicationFile = process.env[FOUNDRY_APPLICATION_ENV];
|
|
73
|
+
const application = applicationFile ? (await import(pathToFileURL(applicationFile).href)).default : void 0;
|
|
74
|
+
const daemon = application?.daemon;
|
|
75
|
+
if (daemon && daemon.kind !== "station") throw new Error("Unsupported daemon adapter.");
|
|
76
|
+
const settings = daemon?.options;
|
|
77
|
+
resources = await settings?.resources?.();
|
|
78
|
+
const port = settings?.port ?? await freePort();
|
|
79
|
+
station = await createStation(resolveConfig({
|
|
80
|
+
host: "127.0.0.1",
|
|
81
|
+
port,
|
|
82
|
+
stationDir: join(options.directory, "station"),
|
|
83
|
+
signalsDir: signals,
|
|
84
|
+
adapter: queue,
|
|
85
|
+
scheduleAdapter: schedules,
|
|
86
|
+
...settings ? { network: { stationId: settings.stationId, name: settings.name ?? settings.stationId } } : {},
|
|
87
|
+
...resources ? { execution: { ...resources, token: randomBytes(32).toString("hex") } } : {},
|
|
88
|
+
envStorage: new MemoryEnvStorage(),
|
|
89
|
+
logStorage: new MemoryLogStorage(),
|
|
90
|
+
auth: { username: "foundry", password: randomBytes(32).toString("hex"), keyStorage: new MemoryKeyStorage() },
|
|
91
|
+
subscribers: { signal: [subscribers] },
|
|
92
|
+
runner: options.runner
|
|
93
|
+
}), options.rootDir);
|
|
94
|
+
const key = await station.keyStore.create("foundry-execution", ["trigger", "read", "cancel"]);
|
|
95
|
+
client = new StationClient({ url: `http://127.0.0.1:${port}`, token: key.key });
|
|
96
|
+
await station.start();
|
|
97
|
+
await client.connect();
|
|
98
|
+
for (const agent of options.agents) {
|
|
99
|
+
const name = internalAgentName(agent.route);
|
|
100
|
+
await client.request("GET", `/signals/${encodeURIComponent(name)}`);
|
|
101
|
+
}
|
|
102
|
+
if (settings?.onReady) {
|
|
103
|
+
const resourceKey = await station.keyStore.create("foundry-resources", ["admin"]);
|
|
104
|
+
await settings.onReady({ url: `http://127.0.0.1:${port}`, stationId: settings.stationId, token: resourceKey.key });
|
|
105
|
+
}
|
|
106
|
+
configure({ adapter: queue });
|
|
107
|
+
value = { pid: process.pid };
|
|
108
|
+
break;
|
|
109
|
+
}
|
|
110
|
+
case "trigger": {
|
|
111
|
+
const definition = definitions.get(command.name);
|
|
112
|
+
if (!definition) throw new Error("Unknown agent definition.");
|
|
113
|
+
value = await definition.trigger(command.input);
|
|
114
|
+
break;
|
|
115
|
+
}
|
|
116
|
+
case "get":
|
|
117
|
+
value = await queue.getRun(command.id);
|
|
118
|
+
break;
|
|
119
|
+
case "list":
|
|
120
|
+
value = await queue.listAllRuns({ signalName: command.signalName });
|
|
121
|
+
break;
|
|
122
|
+
case "cancel":
|
|
123
|
+
try {
|
|
124
|
+
await client.request("POST", `/runs/${encodeURIComponent(command.id)}/cancel`, {});
|
|
125
|
+
value = true;
|
|
126
|
+
} catch (error) {
|
|
127
|
+
if (error instanceof StationApiError && ["cannot_cancel", "not_found"].includes(error.code)) value = false;
|
|
128
|
+
else throw error;
|
|
129
|
+
}
|
|
130
|
+
break;
|
|
131
|
+
case "schedule.add":
|
|
132
|
+
await schedules.add(command.schedule);
|
|
133
|
+
value = null;
|
|
134
|
+
break;
|
|
135
|
+
case "schedule.delete":
|
|
136
|
+
value = await schedules.delete(command.id);
|
|
137
|
+
break;
|
|
138
|
+
case "ping":
|
|
139
|
+
value = Boolean(client && (await client.health()).ok);
|
|
140
|
+
break;
|
|
141
|
+
case "stop":
|
|
142
|
+
await stop();
|
|
143
|
+
value = null;
|
|
144
|
+
break;
|
|
145
|
+
}
|
|
146
|
+
send({ id: message.id, value });
|
|
147
|
+
if (command.method === "stop") process.disconnect?.();
|
|
148
|
+
})().catch(() => {
|
|
149
|
+
send({ id: message.id, error: `Execution daemon ${message.command.method} failed. Inspect daemon health before repeating mutations.` });
|
|
150
|
+
});
|
|
151
|
+
});
|
|
152
|
+
process.once("disconnect", () => {
|
|
153
|
+
void stop().finally(() => process.exit(0));
|
|
154
|
+
});
|
|
155
|
+
process.once("SIGTERM", () => {
|
|
156
|
+
void stop().finally(() => process.exit(0));
|
|
157
|
+
});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as station_signal from 'station-signal';
|
|
2
|
+
|
|
3
|
+
/** Private Station signal module loader. Explicit identity avoids process-global discovery races. */
|
|
4
|
+
declare function loadExecutionAgent(route: string, file: string): Promise<station_signal.AnySignal>;
|
|
5
|
+
|
|
6
|
+
export { loadExecutionAgent };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
compileAgentModule
|
|
3
|
+
} from "./chunk-TH5ETCG2.js";
|
|
4
|
+
import "./chunk-LW5PJ2FN.js";
|
|
5
|
+
import {
|
|
6
|
+
bindAgentLocalDefinitions
|
|
7
|
+
} from "./chunk-KBMD4RYU.js";
|
|
8
|
+
import "./chunk-5NFLGHOC.js";
|
|
9
|
+
|
|
10
|
+
// src/execution-loader.ts
|
|
11
|
+
import { dirname } from "node:path";
|
|
12
|
+
import { pathToFileURL } from "node:url";
|
|
13
|
+
async function loadExecutionAgent(route, file) {
|
|
14
|
+
const module = await import(pathToFileURL(file).href);
|
|
15
|
+
await bindAgentLocalDefinitions(dirname(file));
|
|
16
|
+
return compileAgentModule(route, module);
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
loadExecutionAgent
|
|
20
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as FoundryDataAdapter, E as EnvironmentValue, A as AgentInstance, C as Conversation, P as PlaybookSubscription, a as FoundryActivationRecord, b as ProvisionAgentOptions, I as InboundDeliveryClaim, W as WorkspaceEntry, c as FoundryWorkingEnvironmentSnapshotOwner, S as SharedInboxItem, d as FoundryTask, e as AgentPlaybook, f as FoundryRuntime, D as DiscoveredAgent, g as FoundryManifest, h as AnyFoundryTransmission, i as AccountReference, j as InferAccountMetadata, k as AgentBinding, l as FoundryAgentApplication, m as InboundRoute, O as OutboundRoute, n as CapabilityDefinition, o as InferInboundConfig, p as InferOutboundConfig } from './client-
|
|
2
|
-
export { q as AccountContract, r as AccountDirectory, s as AccountFilter, t as AccountId, u as AccountNotFound, v as AccountSessionAdapter, w as AccountSessionRequest, x as AccountSessionUnavailable, y as AccountSummary, z as AgentApplicationContribution, B as AgentApplicationInstallContext, G as AgentApplicationOptions, H as AgentAssemblyContext, J as AgentAssemblyOptions, K as AgentDefinitionId, L as AgentDefinitionSurfaceContext, M as AgentFactoryContext, N as AgentHandlerContext, Q as AgentId, R as AgentInstallContext, T as AgentInstallation, U as AgentInstallationKind, V as AgentPlaybookInput, X as AgentProvisioningPolicy, Y as AgentRuntimeControls, Z as AnyFoundryAgent, _ as ApplicationConnectionContext, $ as ApplicationConnectionState, a0 as ApplicationConnectionStatus, a1 as BindingFilter, a2 as BindingId, a3 as BindingNotFound, a4 as CapabilityId, a5 as ComposedAgentPlaybook, a6 as ComposedAgentPlaybookInput, a7 as ConnectionReceiveInput, a8 as CreateAgentInstanceOptions, a9 as CreateConversationOptions, aa as CustomProvisionedAgent, ab as CustomProvisioningContext, ac as DefineAgentOptions, ad as DefineConnectionOptions, ae as DefineFoundryReplOptions, af as DefineFoundryScheduleOptions, ag as DefineFoundrySubagentOptions, ah as DefineFoundryWorkingEnvironmentOptions, ai as DefinePlaybookSubscriptionOptions, aj as DefinitionConfigInput, ak as EMPTY_AGENT_COMPOSITION, al as EMPTY_CAPABILITY_REGISTRY, am as EMPTY_FOUNDRY_APPLICATION, an as EMPTY_NATIVE_REGISTRY, ao as EgressAdapter, ap as EgressContext, aq as EventFilter, ar as EventId, as as EventNotFound, at as EventReference, au as EventStore, av as FOUNDRY_AGENT_APPLICATION_BRAND, aw as FOUNDRY_AGENT_BRAND, ax as FOUNDRY_AGENT_DEFINITION_BRAND, ay as FOUNDRY_AGENT_FILE_ENV, az as FOUNDRY_AGENT_ROUTE_ENV, aA as FOUNDRY_APPLICATION_BRAND, aB as FOUNDRY_APPLICATION_ENV, aC as FOUNDRY_APPROVAL_DIRECTORY_ENV, aD as FOUNDRY_COMPOSED_PLAYBOOK_BRAND, aE as FOUNDRY_CONNECTION_BRAND, aF as FOUNDRY_CORE_COMMAND_EVENT, aG as FOUNDRY_EVENT_PREFIX, aH as FOUNDRY_EXECUTION_MARKER, aI as FOUNDRY_LAYER_BRAND, aJ as FOUNDRY_MCP_BRAND, aK as FOUNDRY_MEMORY_BRAND, aL as FOUNDRY_PLAYBOOK_ACTION_BRAND, aM as FOUNDRY_REPL_BRAND, aN as FOUNDRY_SCHEDULE_BRAND, aO as FOUNDRY_SHARED_TOOL_BRAND, aP as FOUNDRY_SUBSCRIBER_BRAND, aQ as FOUNDRY_TRANSMISSION_BRAND, aR as FOUNDRY_TRANSMISSION_EVENT_BRAND, aS as FOUNDRY_TRANSMISSION_PREDICATE_BRAND, aT as FOUNDRY_WORKING_ENVIRONMENT_BRAND, aU as FoundryAccountSessionAdapter, aV as FoundryAgent, aW as FoundryAgentComponent, aX as FoundryAgentComposition, aY as FoundryAgentConventionModule, aZ as FoundryAgentDefinition, a_ as FoundryAgentMode, a$ as FoundryApp, b0 as FoundryApplication, b1 as FoundryApplicationConnection, b2 as FoundryApplicationManifest, b3 as FoundryApplicationOptions, b4 as FoundryApproval, b5 as FoundryApprovalDecision, b6 as FoundryApprovalDisplayManager, b7 as FoundryApprovalStatus, b8 as FoundryCall, b9 as FoundryCallContext, ba as FoundryCallOptions, bb as FoundryCapabilityKind, bc as FoundryCapabilityManifest, bd as FoundryCapabilityManifestEntry, be as FoundryCapabilityRegistry, bf as FoundryClient, bg as FoundryClientAuthorizationAdapter, bh as FoundryClientOptions, bi as FoundryCompositionSource, bj as FoundryConversationTranscript, bk as FoundryCoreCommand, bl as FoundryDomainError, bm as FoundryEvent, bn as FoundryEventCategory, bo as FoundryExecutionContext, bp as FoundryFactsOptions, bq as FoundryFormsOptions, br as FoundryGoalsOptions, bs as FoundryGuidanceHandles, bt as FoundryGuidanceScope, bu as FoundryHealth, bv as FoundryHookDefinition, bw as FoundryInstallable, bx as FoundryInstanceProvisioner, by as FoundryJavaScriptReplDefinition, bz as FoundryLayer, bA as FoundryLayerOptions, bB as FoundryLayerReference, bC as FoundryLayerSelection, bD as FoundryLispReplDefinition, bE as FoundryListResolver, bF as FoundryManifestAgent, bG as FoundryManifestCapability, bH as FoundryManifestTransmission, bI as FoundryMcp, bJ as FoundryMcpOptions, bK as FoundryMemoryProfile, bL as FoundryMemoryProfileOptions, bM as FoundryMemoryReference, bN as FoundryMemorySelection, bO as FoundryMeshConfig, bP as FoundryMessageInput, bQ as FoundryMountedRepl, bR as FoundryNativeManifest, bS as FoundryNativeManifestEntry, bT as FoundryNativeRegistry, bU as FoundryObservabilityAdapter, bV as FoundryPlaybookAction, bW as FoundryProgrammaticToolContext, bX as FoundryProgrammaticToolSelection, bY as FoundryProgrammaticTools, bZ as FoundryPythonReplDefinition, b_ as FoundryReplDefinition, b$ as FoundryRequest, c0 as FoundryRequestAuthorizationAdapter, c1 as FoundryRequestAuthorizationInput, c2 as FoundryResolvedMcp, c3 as FoundryResolver, c4 as FoundryResult, c5 as FoundryRouteMap, c6 as FoundryRun, c7 as FoundryRunHandle, c8 as FoundryRuntimeError, c9 as FoundryRuntimeOptions, ca as FoundryScheduleDefinition, cb as FoundryScheduleTiming, cc as FoundryScheduleTimingInput, cd as FoundrySharedTool, ce as FoundrySteerHandleResult, cf as FoundrySteerResult, cg as FoundrySubagentToolContext, ch as FoundrySubscriber, ci as FoundrySubscriberOptions, cj as FoundrySubscriberSelection, ck as FoundrySurfaceContext, cl as FoundryToolBody, cm as FoundryTransmission, cn as FoundryTransmissionEvent, co as FoundryTransmissionPredicate, cp as FoundryVfs, cq as FoundryVfsHandle, cr as FoundryWorkingEnvironmentCreateContext, cs as FoundryWorkingEnvironmentDefinition, ct as FoundryWorkingEnvironmentPersistenceAdapter, cu as FoundryWorkingEnvironmentPersistenceContext, cv as GrantResolutionError, cw as GrantResolver, cx as InboundContract, cy as InferAgentInput, cz 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 PlaybookSubscriptionTarget, cT as PlaybookSubscriptionTargetInput, cU as ReplyPolicy, cV as ResolveGrantRequest, cW as Route, cX as RouteFilter, cY as RouteId, cZ as RouteNotFound, c_ as RunGrant, c$ as RunId, d0 as SharedToolOptions, d1 as TopologyConflict, d2 as TopologyStore, d3 as TransmissionEventDirection, d4 as TransmissionEventOptions, d5 as TransmissionId, d6 as TransmissionOptions, d7 as TransmissionPredicateOptions, d8 as TransmissionSerializationContext, d9 as UpdateAgentInstanceOptions, da as UpdateConversationOptions, db as WaitOptions, dc as compileApplicationManifest, dd as composeAgent, de as composePlaybook, df as configureLayer, dg as configureMemory, dh as createAgentInstance, di as createConversation, dj as createFoundryApproval, dk as createFoundryClient, dl as createFoundryCoreTools, dm as createInstalledApplicationTransmissionTools, dn as createManifest, dp as defineAgent, dq as defineAgentApplication, dr as defineAgentFromModule, ds as defineAgentInstance, dt as defineApp, du as defineApplication, dv as defineCall, dw as defineConnection, dx as defineFacts, dy as defineForms, dz as defineGoals, dA as defineLayer, dB as defineMcp, dC as defineMemory, dD as definePlaybookAction, dE as definePlaybookSubscription, dF as defineRepl, dG as defineRoutes, dH as defineSchedule, dI as defineSharedTool, dJ as defineSubagent, dK as defineSubscriber, dL as defineTransmission, dM as defineTransmissionEvent, dN as defineTransmissionPredicate, dO as defineWorkingEnvironment, dP as discoverAgents, dQ as findAgentFiles, dR as foundryDataEnvironmentPersistence, dS as foundryGuidanceSubject, dT as grantResolverLive, dU as install, dV as installRegistry, dW as installationKey, dX as installedApplicationTransmissionToolName, dY as internalAgentName, dZ as isFoundryAgent, d_ as isFoundryAgentDefinition, d$ as isFoundryApplication, e0 as isFoundryCapability, e1 as isFoundryLayer, e2 as isFoundrySchedule, e3 as isFoundrySubscriber, e4 as isFoundryTransmission, e5 as isInboxCapableStore, e6 as listFoundryApprovals, e7 as memoryAccountDirectory, e8 as memoryEventStore, e9 as memoryTopologyStore, ea as mountAgentDefinitionMemory, eb as mountFoundrySurfaces, ec as reconstructAgentInstance, ed as reconstructPlaybook, ee as reconstructPlaybookSubscription, ef as resolveFoundryApproval, eg as routeFromAgentFile, eh as routeFromInternalAgentName, ei as toGloveMessage, ej as toGloveRequestInput, ek as transmissionPredicate, el as withFoundryPermissions } from './client-
|
|
1
|
+
import { F as FoundryDataAdapter, E as EnvironmentValue, A as AgentInstance, C as Conversation, P as PlaybookSubscription, a as FoundryActivationRecord, b as ProvisionAgentOptions, I as InboundDeliveryClaim, W as WorkspaceEntry, c as FoundryWorkingEnvironmentSnapshotOwner, S as SharedInboxItem, d as FoundryTask, e as AgentPlaybook, f as FoundryRuntime, D as DiscoveredAgent, g as FoundryManifest, h as AnyFoundryTransmission, i as AccountReference, j as InferAccountMetadata, k as AgentBinding, l as FoundryAgentApplication, m as InboundRoute, O as OutboundRoute, n as CapabilityDefinition, o as InferInboundConfig, p as InferOutboundConfig } from './client-DcsnudMI.js';
|
|
2
|
+
export { q as AccountContract, r as AccountDirectory, s as AccountFilter, t as AccountId, u as AccountNotFound, v as AccountSessionAdapter, w as AccountSessionRequest, x as AccountSessionUnavailable, y as AccountSummary, z as AgentApplicationContribution, B as AgentApplicationInstallContext, G as AgentApplicationOptions, H as AgentAssemblyContext, J as AgentAssemblyOptions, K as AgentDefinitionId, L as AgentDefinitionSurfaceContext, M as AgentFactoryContext, N as AgentHandlerContext, Q as AgentId, R as AgentInstallContext, T as AgentInstallation, U as AgentInstallationKind, V as AgentPlaybookInput, X as AgentProvisioningPolicy, Y as AgentRuntimeControls, Z as AnyFoundryAgent, _ as ApplicationConnectionContext, $ as ApplicationConnectionState, a0 as ApplicationConnectionStatus, a1 as BindingFilter, a2 as BindingId, a3 as BindingNotFound, a4 as CapabilityId, a5 as ComposedAgentPlaybook, a6 as ComposedAgentPlaybookInput, a7 as ConnectionReceiveInput, a8 as CreateAgentInstanceOptions, a9 as CreateConversationOptions, aa as CustomProvisionedAgent, ab as CustomProvisioningContext, ac as DefineAgentOptions, ad as DefineConnectionOptions, ae as DefineFoundryReplOptions, af as DefineFoundryScheduleOptions, ag as DefineFoundrySubagentOptions, ah as DefineFoundryWorkingEnvironmentOptions, ai as DefinePlaybookSubscriptionOptions, aj as DefinitionConfigInput, ak as EMPTY_AGENT_COMPOSITION, al as EMPTY_CAPABILITY_REGISTRY, am as EMPTY_FOUNDRY_APPLICATION, an as EMPTY_NATIVE_REGISTRY, ao as EgressAdapter, ap as EgressContext, aq as EventFilter, ar as EventId, as as EventNotFound, at as EventReference, au as EventStore, av as FOUNDRY_AGENT_APPLICATION_BRAND, aw as FOUNDRY_AGENT_BRAND, ax as FOUNDRY_AGENT_DEFINITION_BRAND, ay as FOUNDRY_AGENT_FILE_ENV, az as FOUNDRY_AGENT_ROUTE_ENV, aA as FOUNDRY_APPLICATION_BRAND, aB as FOUNDRY_APPLICATION_ENV, aC as FOUNDRY_APPROVAL_DIRECTORY_ENV, aD as FOUNDRY_COMPOSED_PLAYBOOK_BRAND, aE as FOUNDRY_CONNECTION_BRAND, aF as FOUNDRY_CORE_COMMAND_EVENT, aG as FOUNDRY_EVENT_PREFIX, aH as FOUNDRY_EXECUTION_MARKER, aI as FOUNDRY_LAYER_BRAND, aJ as FOUNDRY_MCP_BRAND, aK as FOUNDRY_MEMORY_BRAND, aL as FOUNDRY_PLAYBOOK_ACTION_BRAND, aM as FOUNDRY_REPL_BRAND, aN as FOUNDRY_SCHEDULE_BRAND, aO as FOUNDRY_SHARED_TOOL_BRAND, aP as FOUNDRY_SUBSCRIBER_BRAND, aQ as FOUNDRY_TRANSMISSION_BRAND, aR as FOUNDRY_TRANSMISSION_EVENT_BRAND, aS as FOUNDRY_TRANSMISSION_PREDICATE_BRAND, aT as FOUNDRY_WORKING_ENVIRONMENT_BRAND, aU as FoundryAccountSessionAdapter, aV as FoundryAgent, aW as FoundryAgentComponent, aX as FoundryAgentComposition, aY as FoundryAgentConventionModule, aZ as FoundryAgentDefinition, a_ as FoundryAgentMode, a$ as FoundryApp, b0 as FoundryApplication, b1 as FoundryApplicationConnection, b2 as FoundryApplicationManifest, b3 as FoundryApplicationOptions, b4 as FoundryApproval, b5 as FoundryApprovalDecision, b6 as FoundryApprovalDisplayManager, b7 as FoundryApprovalStatus, b8 as FoundryCall, b9 as FoundryCallContext, ba as FoundryCallOptions, bb as FoundryCapabilityKind, bc as FoundryCapabilityManifest, bd as FoundryCapabilityManifestEntry, be as FoundryCapabilityRegistry, bf as FoundryClient, bg as FoundryClientAuthorizationAdapter, bh as FoundryClientOptions, bi as FoundryCompositionSource, bj as FoundryConversationTranscript, bk as FoundryCoreCommand, bl as FoundryDomainError, bm as FoundryEvent, bn as FoundryEventCategory, bo as FoundryExecutionContext, bp as FoundryFactsOptions, bq as FoundryFormsOptions, br as FoundryGoalsOptions, bs as FoundryGuidanceHandles, bt as FoundryGuidanceScope, bu as FoundryHealth, bv as FoundryHookDefinition, bw as FoundryInstallable, bx as FoundryInstanceProvisioner, by as FoundryJavaScriptReplDefinition, bz as FoundryLayer, bA as FoundryLayerOptions, bB as FoundryLayerReference, bC as FoundryLayerSelection, bD as FoundryLispReplDefinition, bE as FoundryListResolver, bF as FoundryManifestAgent, bG as FoundryManifestCapability, bH as FoundryManifestTransmission, bI as FoundryMcp, bJ as FoundryMcpOptions, bK as FoundryMemoryProfile, bL as FoundryMemoryProfileOptions, bM as FoundryMemoryReference, bN as FoundryMemorySelection, bO as FoundryMeshConfig, bP as FoundryMessageInput, bQ as FoundryMountedRepl, bR as FoundryNativeManifest, bS as FoundryNativeManifestEntry, bT as FoundryNativeRegistry, bU as FoundryObservabilityAdapter, bV as FoundryPlaybookAction, bW as FoundryProgrammaticToolContext, bX as FoundryProgrammaticToolSelection, bY as FoundryProgrammaticTools, bZ as FoundryPythonReplDefinition, b_ as FoundryReplDefinition, b$ as FoundryRequest, c0 as FoundryRequestAuthorizationAdapter, c1 as FoundryRequestAuthorizationInput, c2 as FoundryResolvedMcp, c3 as FoundryResolver, c4 as FoundryResult, c5 as FoundryRouteMap, c6 as FoundryRun, c7 as FoundryRunHandle, c8 as FoundryRuntimeError, c9 as FoundryRuntimeOptions, ca as FoundryScheduleDefinition, cb as FoundryScheduleTiming, cc as FoundryScheduleTimingInput, cd as FoundrySharedTool, ce as FoundrySteerHandleResult, cf as FoundrySteerResult, cg as FoundrySubagentToolContext, ch as FoundrySubscriber, ci as FoundrySubscriberOptions, cj as FoundrySubscriberSelection, ck as FoundrySurfaceContext, cl as FoundryToolBody, cm as FoundryTransmission, cn as FoundryTransmissionEvent, co as FoundryTransmissionPredicate, cp as FoundryVfs, cq as FoundryVfsHandle, cr as FoundryWorkingEnvironmentCreateContext, cs as FoundryWorkingEnvironmentDefinition, ct as FoundryWorkingEnvironmentPersistenceAdapter, cu as FoundryWorkingEnvironmentPersistenceContext, cv as GrantResolutionError, cw as GrantResolver, cx as InboundContract, cy as InferAgentInput, cz 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 PlaybookSubscriptionTarget, cT as PlaybookSubscriptionTargetInput, cU as ReplyPolicy, cV as ResolveGrantRequest, cW as Route, cX as RouteFilter, cY as RouteId, cZ as RouteNotFound, c_ as RunGrant, c$ as RunId, d0 as SharedToolOptions, d1 as TopologyConflict, d2 as TopologyStore, d3 as TransmissionEventDirection, d4 as TransmissionEventOptions, d5 as TransmissionId, d6 as TransmissionOptions, d7 as TransmissionPredicateOptions, d8 as TransmissionSerializationContext, d9 as UpdateAgentInstanceOptions, da as UpdateConversationOptions, db as WaitOptions, dc as compileApplicationManifest, dd as composeAgent, de as composePlaybook, df as configureLayer, dg as configureMemory, dh as createAgentInstance, di as createConversation, dj as createFoundryApproval, dk as createFoundryClient, dl as createFoundryCoreTools, dm as createInstalledApplicationTransmissionTools, dn as createManifest, dp as defineAgent, dq as defineAgentApplication, dr as defineAgentFromModule, ds as defineAgentInstance, dt as defineApp, du as defineApplication, dv as defineCall, dw as defineConnection, dx as defineFacts, dy as defineForms, dz as defineGoals, dA as defineLayer, dB as defineMcp, dC as defineMemory, dD as definePlaybookAction, dE as definePlaybookSubscription, dF as defineRepl, dG as defineRoutes, dH as defineSchedule, dI as defineSharedTool, dJ as defineSubagent, dK as defineSubscriber, dL as defineTransmission, dM as defineTransmissionEvent, dN as defineTransmissionPredicate, dO as defineWorkingEnvironment, dP as discoverAgents, dQ as findAgentFiles, dR as foundryDataEnvironmentPersistence, dS as foundryGuidanceSubject, dT as grantResolverLive, dU as install, dV as installRegistry, dW as installationKey, dX as installedApplicationTransmissionToolName, dY as internalAgentName, dZ as isFoundryAgent, d_ as isFoundryAgentDefinition, d$ as isFoundryApplication, e0 as isFoundryCapability, e1 as isFoundryLayer, e2 as isFoundrySchedule, e3 as isFoundrySubscriber, e4 as isFoundryTransmission, e5 as isInboxCapableStore, e6 as listFoundryApprovals, e7 as memoryAccountDirectory, e8 as memoryEventStore, e9 as memoryTopologyStore, ea as mountAgentDefinitionMemory, eb as mountFoundrySurfaces, ec as reconstructAgentInstance, ed as reconstructPlaybook, ee as reconstructPlaybookSubscription, ef as resolveFoundryApproval, eg as routeFromAgentFile, eh as routeFromInternalAgentName, ei as toGloveMessage, ej as toGloveRequestInput, ek as transmissionPredicate, el as withFoundryPermissions } from './client-DcsnudMI.js';
|
|
3
3
|
import { Effect } from 'effect';
|
|
4
4
|
import { EnvSnapshot } from 'glove-working-environment';
|
|
5
5
|
import { AddressInfo } from 'node:net';
|
|
@@ -18,6 +18,8 @@ import 'glove-facts';
|
|
|
18
18
|
import 'glove-memory/goals';
|
|
19
19
|
import 'glove-memory/forms';
|
|
20
20
|
import 'effect/Brand';
|
|
21
|
+
import './station.js';
|
|
22
|
+
import 'station-daemon';
|
|
21
23
|
|
|
22
24
|
interface FileFoundryDataAdapterOptions {
|
|
23
25
|
/** JSON state file. Writes use a same-directory atomic rename. */
|
package/dist/index.js
CHANGED
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
memoryTopologyStore,
|
|
44
44
|
serializeInboundTransmissionXml,
|
|
45
45
|
writeGeneratedTypes
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-SGF3CFUR.js";
|
|
47
47
|
import {
|
|
48
48
|
FoundryClient,
|
|
49
49
|
FoundryRunHandle,
|
|
@@ -52,36 +52,39 @@ import {
|
|
|
52
52
|
import {
|
|
53
53
|
defineConfig
|
|
54
54
|
} from "./chunk-ZFNMFE3T.js";
|
|
55
|
+
import "./chunk-J7ZBJM54.js";
|
|
56
|
+
import {
|
|
57
|
+
FOUNDRY_REPL_BRAND,
|
|
58
|
+
FOUNDRY_WORKING_ENVIRONMENT_BRAND,
|
|
59
|
+
defineFacts,
|
|
60
|
+
defineForms,
|
|
61
|
+
defineGoals,
|
|
62
|
+
defineRepl,
|
|
63
|
+
defineWorkingEnvironment,
|
|
64
|
+
foundryDataEnvironmentPersistence,
|
|
65
|
+
foundryGuidanceSubject
|
|
66
|
+
} from "./chunk-LW5PJ2FN.js";
|
|
55
67
|
import {
|
|
56
68
|
EMPTY_AGENT_COMPOSITION,
|
|
57
69
|
EMPTY_CAPABILITY_REGISTRY,
|
|
58
70
|
EMPTY_FOUNDRY_APPLICATION,
|
|
59
71
|
EMPTY_NATIVE_REGISTRY,
|
|
60
72
|
FOUNDRY_AGENT_APPLICATION_BRAND,
|
|
61
|
-
FOUNDRY_AGENT_BRAND,
|
|
62
|
-
FOUNDRY_AGENT_DEFINITION_BRAND,
|
|
63
|
-
FOUNDRY_AGENT_FILE_ENV,
|
|
64
|
-
FOUNDRY_AGENT_ROUTE_ENV,
|
|
65
73
|
FOUNDRY_APPLICATION_BRAND,
|
|
66
|
-
FOUNDRY_APPLICATION_ENV,
|
|
67
74
|
FOUNDRY_APPROVAL_DIRECTORY_ENV,
|
|
68
75
|
FOUNDRY_COMPOSED_PLAYBOOK_BRAND,
|
|
69
76
|
FOUNDRY_CONNECTION_BRAND,
|
|
70
77
|
FOUNDRY_CORE_COMMAND_EVENT,
|
|
71
|
-
FOUNDRY_EVENT_PREFIX,
|
|
72
|
-
FOUNDRY_EXECUTION_MARKER,
|
|
73
78
|
FOUNDRY_LAYER_BRAND,
|
|
74
79
|
FOUNDRY_MCP_BRAND,
|
|
75
80
|
FOUNDRY_MEMORY_BRAND,
|
|
76
81
|
FOUNDRY_PLAYBOOK_ACTION_BRAND,
|
|
77
|
-
FOUNDRY_REPL_BRAND,
|
|
78
82
|
FOUNDRY_SCHEDULE_BRAND,
|
|
79
83
|
FOUNDRY_SHARED_TOOL_BRAND,
|
|
80
84
|
FOUNDRY_SUBSCRIBER_BRAND,
|
|
81
85
|
FOUNDRY_TRANSMISSION_BRAND,
|
|
82
86
|
FOUNDRY_TRANSMISSION_EVENT_BRAND,
|
|
83
87
|
FOUNDRY_TRANSMISSION_PREDICATE_BRAND,
|
|
84
|
-
FOUNDRY_WORKING_ENVIRONMENT_BRAND,
|
|
85
88
|
FoundryApprovalDisplayManager,
|
|
86
89
|
MemoryFoundryDataAdapter,
|
|
87
90
|
composeAgent,
|
|
@@ -94,43 +97,28 @@ import {
|
|
|
94
97
|
createFoundryCoreTools,
|
|
95
98
|
createInstalledApplicationTransmissionTools,
|
|
96
99
|
createManifest,
|
|
97
|
-
defineAgent,
|
|
98
100
|
defineAgentApplication,
|
|
99
|
-
defineAgentFromModule,
|
|
100
101
|
defineAgentInstance,
|
|
101
102
|
defineApp,
|
|
102
103
|
defineApplication,
|
|
103
|
-
defineCall,
|
|
104
104
|
defineConnection,
|
|
105
|
-
defineFacts,
|
|
106
|
-
defineForms,
|
|
107
|
-
defineGoals,
|
|
108
105
|
defineLayer,
|
|
109
106
|
defineMcp,
|
|
110
107
|
defineMemory,
|
|
111
108
|
definePlaybookAction,
|
|
112
109
|
definePlaybookSubscription,
|
|
113
|
-
defineRepl,
|
|
114
|
-
defineRoutes,
|
|
115
110
|
defineSchedule,
|
|
116
111
|
defineSharedTool,
|
|
117
|
-
defineSubagent,
|
|
118
112
|
defineSubscriber,
|
|
119
113
|
defineTransmission,
|
|
120
114
|
defineTransmissionEvent,
|
|
121
115
|
defineTransmissionPredicate,
|
|
122
|
-
defineWorkingEnvironment,
|
|
123
116
|
discoverAgents,
|
|
124
117
|
findAgentFiles,
|
|
125
|
-
foundryDataEnvironmentPersistence,
|
|
126
|
-
foundryGuidanceSubject,
|
|
127
118
|
install,
|
|
128
119
|
installRegistry,
|
|
129
120
|
installationKey,
|
|
130
121
|
installedApplicationTransmissionToolName,
|
|
131
|
-
internalAgentName,
|
|
132
|
-
isFoundryAgent,
|
|
133
|
-
isFoundryAgentDefinition,
|
|
134
122
|
isFoundryApplication,
|
|
135
123
|
isFoundryCapability,
|
|
136
124
|
isFoundryLayer,
|
|
@@ -146,12 +134,29 @@ import {
|
|
|
146
134
|
reconstructPlaybookSubscription,
|
|
147
135
|
resolveFoundryApproval,
|
|
148
136
|
routeFromAgentFile,
|
|
149
|
-
routeFromInternalAgentName,
|
|
150
137
|
toGloveMessage,
|
|
151
138
|
toGloveRequestInput,
|
|
152
139
|
transmissionPredicate,
|
|
153
140
|
withFoundryPermissions
|
|
154
|
-
} from "./chunk-
|
|
141
|
+
} from "./chunk-KBMD4RYU.js";
|
|
142
|
+
import {
|
|
143
|
+
FOUNDRY_AGENT_BRAND,
|
|
144
|
+
FOUNDRY_AGENT_DEFINITION_BRAND,
|
|
145
|
+
FOUNDRY_AGENT_FILE_ENV,
|
|
146
|
+
FOUNDRY_AGENT_ROUTE_ENV,
|
|
147
|
+
FOUNDRY_APPLICATION_ENV,
|
|
148
|
+
FOUNDRY_EVENT_PREFIX,
|
|
149
|
+
FOUNDRY_EXECUTION_MARKER,
|
|
150
|
+
defineAgent,
|
|
151
|
+
defineAgentFromModule,
|
|
152
|
+
defineCall,
|
|
153
|
+
defineRoutes,
|
|
154
|
+
defineSubagent,
|
|
155
|
+
internalAgentName,
|
|
156
|
+
isFoundryAgent,
|
|
157
|
+
isFoundryAgentDefinition,
|
|
158
|
+
routeFromInternalAgentName
|
|
159
|
+
} from "./chunk-5NFLGHOC.js";
|
|
155
160
|
|
|
156
161
|
// src/file-data.ts
|
|
157
162
|
import { randomUUID } from "node:crypto";
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ExecutionConfig } from 'station-daemon';
|
|
2
|
+
|
|
3
|
+
/** Private host connection. Never put this value in agent context or manifests. */
|
|
4
|
+
interface FoundryStationConnection {
|
|
5
|
+
readonly url: string;
|
|
6
|
+
readonly stationId: string;
|
|
7
|
+
readonly token: string;
|
|
8
|
+
}
|
|
9
|
+
interface FoundryStationResources {
|
|
10
|
+
readonly browser?: ExecutionConfig["browser"];
|
|
11
|
+
readonly sandbox?: ExecutionConfig["sandbox"];
|
|
12
|
+
}
|
|
13
|
+
interface FoundryStationDaemonOptions {
|
|
14
|
+
/** Stable identity when exposing resource capabilities. */
|
|
15
|
+
readonly stationId: string;
|
|
16
|
+
readonly name?: string;
|
|
17
|
+
/** Optional loopback port; omitted means an automatically allocated port. */
|
|
18
|
+
readonly port?: number;
|
|
19
|
+
/** Runs once inside the managed daemon, never during agent assembly. */
|
|
20
|
+
readonly resources?: () => FoundryStationResources | Promise<FoundryStationResources>;
|
|
21
|
+
/** Host-only callback after startup. The application owns connection storage. */
|
|
22
|
+
readonly onReady?: (connection: FoundryStationConnection) => void | Promise<void>;
|
|
23
|
+
}
|
|
24
|
+
interface FoundryStationDaemonAdapter {
|
|
25
|
+
readonly kind: "station";
|
|
26
|
+
readonly options: FoundryStationDaemonOptions;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Configure the Station instance Foundry already owns. Provider adapters remain
|
|
30
|
+
* application dependencies. Successfully returned resources belong to Station;
|
|
31
|
+
* a factory that fails partway through acquisition must release its own resources.
|
|
32
|
+
*/
|
|
33
|
+
declare function stationDaemon(options: FoundryStationDaemonOptions): FoundryStationDaemonAdapter;
|
|
34
|
+
|
|
35
|
+
export { type FoundryStationConnection, type FoundryStationDaemonAdapter, type FoundryStationDaemonOptions, type FoundryStationResources, stationDaemon };
|
package/dist/station.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// src/station.ts
|
|
2
|
+
function stationDaemon(options) {
|
|
3
|
+
if (!/^[a-zA-Z0-9_-]{1,128}$/.test(options.stationId)) throw new Error("A valid Station identity is required.");
|
|
4
|
+
if (options.port !== void 0 && (!Number.isInteger(options.port) || options.port < 1 || options.port > 65535)) throw new Error("Station port must be between 1 and 65535.");
|
|
5
|
+
return Object.freeze({ kind: "station", options: Object.freeze({ ...options }) });
|
|
6
|
+
}
|
|
7
|
+
export {
|
|
8
|
+
stationDaemon
|
|
9
|
+
};
|
package/docs/architecture.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Boundary rule
|
|
4
4
|
|
|
5
|
-
Foundry exposes concepts that belong to an agentic application. Its execution engine is private and replaceable.
|
|
5
|
+
Foundry exposes concepts that belong to an agentic application. Its execution engine is private and replaceable. Agent jobs run in a separate managed Station 3 daemon process; the Foundry control process does not construct a runner. See [execution](execution.md) for the process boundary and lifecycle.
|
|
6
6
|
|
|
7
7
|
```text
|
|
8
8
|
file-routed code definitions durable data
|
|
@@ -4,7 +4,7 @@ Foundry uses the filesystem for code identity and imported values for code relat
|
|
|
4
4
|
|
|
5
5
|
## Create and run
|
|
6
6
|
|
|
7
|
-
Use Node
|
|
7
|
+
Use Node 22 or newer; Node 22.13+ is recommended and required by optional SQLite memory adapters. In a terminal, `init` opens a guided wizard: choose a directory, standalone or Next.js integration, guided or minimal starter, package manager, and dependency installation. Review the plan before any files are written. Arrow keys select, Enter confirms, and Ctrl+C cancels without creating the project. The wizard never requests credentials.
|
|
8
8
|
|
|
9
9
|
For CI or repeatable setup, use explicit choices:
|
|
10
10
|
|
|
@@ -261,6 +261,12 @@ servers from stalling a run indefinitely.
|
|
|
261
261
|
Stdio-only idle and lifetime limits can recycle memory-heavy children without
|
|
262
262
|
interrupting in-flight calls; adapter environment values are resolved again on reopen.
|
|
263
263
|
|
|
264
|
+
## Mount optional capabilities
|
|
265
|
+
|
|
266
|
+
Use `configure(agent, context)` to call capability packages' mount functions on the assembled agent. Register resource teardown with `context.onCleanup(() => handle.close())`; callbacks run in reverse order after execution, including failed setup or cancellation. Register cleanup as soon as you acquire a resource, before any later setup can fail.
|
|
267
|
+
|
|
268
|
+
Browser and persistent sandbox capabilities follow this pattern through the optional `glove-execution` package and its `mountBrowser` / `mountSandbox` functions. See the [execution guide](./execution.md#optional-capability-mounts) for Station adapter examples. These capabilities add no browser or sandbox API to `glove-core` or Foundry agent definitions.
|
|
269
|
+
|
|
264
270
|
## Mount a working environment, VFS, and REPL
|
|
265
271
|
|
|
266
272
|
Foundry mounts the native Glove packages; it does not reimplement their sandboxes. A working environment supplies a persistent virtual filesystem, named scripts, checkpoints, history, artifact export, and a closed model-facing verb set. A REPL is a separate computation surface over registered functions.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Station 3 and execution mounts — release handoff
|
|
2
|
+
|
|
3
|
+
Verified on 23 September 2026 with Node 22.18 and pnpm 10.28.2. The complete pending Changesets plan has been applied, including package versions and changelogs. npm publication and production documentation deployment have not been performed.
|
|
4
|
+
|
|
5
|
+
## What ships
|
|
6
|
+
|
|
7
|
+
- `glove-execution`: optional, adapter-backed browser and sandbox mounts. The default entrypoint is portable; Station adapters live under `glove-execution/station`. Mounts attach tools and transient screenshot context without taking or replacing the agent model.
|
|
8
|
+
- `glove-core`: runtime context providers accept native content parts alongside text. Browser and sandbox implementation dependencies remain outside core. Runtime-context telemetry omits media payloads and URLs.
|
|
9
|
+
- `glove-foundry`: agent jobs run in a managed local Station 3 daemon. Optional `stationDaemon` application configuration starts browser/sandbox providers in that same daemon. Generic mount cleanup handles success, failure and cancellation. Scheduled activation transitions are serialized so delayed daemon acknowledgements cannot overwrite a pause or cancellation.
|
|
10
|
+
- Foundry Operator: a general-purpose example with Steel proxy sessions, Docker sandboxes and server previews, native per-conversation memory, application-owned continuity/compaction prompts, and native Foundry sleep. Telegram is a user request, not a preloaded workflow.
|
|
11
|
+
- Existing Station room examples use Station 3's daemon and separate dashboard rather than the retired `station-kit` entrypoint.
|
|
12
|
+
|
|
13
|
+
The versioned candidate contains `glove-core` 4.2.0, `glove-foundry` 0.5.0 and the initial `glove-execution` 0.2.0 publication. It also applies the existing VFS changesets and the dependency-driven version bumps computed by Changesets. The pending notes have been consumed into package changelogs; no second Version Packages PR is needed for this candidate. The workspace lockfile was validated after versioning.
|
|
14
|
+
|
|
15
|
+
## Documentation and illustrations
|
|
16
|
+
|
|
17
|
+
- [Execution architecture and migration](./execution.md)
|
|
18
|
+
- [Package guide](../../glove-execution/README.md)
|
|
19
|
+
- [Operator setup and verification](../../../examples/foundry-operator/README.md)
|
|
20
|
+
- Site guide: `/docs/execution`
|
|
21
|
+
- Illustrated walkthrough: `/foundry/docs/browser-and-sandbox`
|
|
22
|
+
- Blog: `/blog/agents-with-browsers-and-sandboxes`
|
|
23
|
+
- Updated package catalog, Foundry landing page, documentation navigation and repository agent skills.
|
|
24
|
+
- Both `/llms.txt` and `/llms-full.txt`, and both `/foundry/llms.txt` and `/foundry/llms-full.txt`, include the new package and shared Station configuration. The full references include the Operator documentation once, including ownership and lifecycle limits.
|
|
25
|
+
|
|
26
|
+
The family diagram explains core, Foundry, mounts and adapters. The architecture diagram shows jobs and optional resources sharing one Station daemon. Public demo screenshots illustrate browser scripting and a sandbox-hosted server without exposing credentials or private conversations.
|
|
27
|
+
|
|
28
|
+
## Verification
|
|
29
|
+
|
|
30
|
+
The repository's complete publish build graph (legacy dependency first), package typechecks and site production build passed. The affected suites passed: core 25, execution 11 (one separately verified real-browser integration is opt-in), Foundry 97 and Operator 5. Delayed-acknowledgement regressions exercise pause and cancel while a real daemon run is already visible; existing tests cover updates, recurrence, overdue reconstruction and resumption.
|
|
31
|
+
|
|
32
|
+
Additional checks cover:
|
|
33
|
+
|
|
34
|
+
- Registry version preflight and the complete Changesets version plan. After applying that plan, all planned publishable releases are ahead of npm or first publications; the frozen lockfile check and full publish build passed again. Versioned tarballs have valid exports and reference the new dependency versions.
|
|
35
|
+
- Tarball contents, declared export/type targets, daemon/loader entrypoints, packaged imports and CLI scaffolding using the tested workspace dependency closure. This is not a fresh registry install of unpublished versions.
|
|
36
|
+
- Desktop and mobile views of both guides, the blog, package catalog, Foundry landing page and blog index: no JavaScript errors, horizontal overflow or broken images.
|
|
37
|
+
- HTTP 200 responses and new API coverage in all four LLM reference endpoints.
|
|
38
|
+
- Real Chromium integration, and a live Operator run creating a proxied Steel browser, reading a public page, taking a screenshot, closing the browser and checking an existing Docker-hosted server over HTTP.
|
|
39
|
+
- An earlier isolated memory verifier checked compaction and recall. Memory is per agent conversation by default; cross-conversation retrieval and continuity policy belong to the application.
|
|
40
|
+
|
|
41
|
+
Telegram authentication is **not verified**: its login page remained on a loading state and no QR login completed. Public browser and sandbox verification must not be represented as successful Telegram account control.
|
|
42
|
+
|
|
43
|
+
## Operational boundaries
|
|
44
|
+
|
|
45
|
+
Foundry owns the managed local daemon process. Its current job queue is in memory; interrupted live jobs are not restored after process loss. Durable conversation, activation and memory adapters have their own persistence behavior. This release does not add distributed execution or high availability.
|
|
46
|
+
|
|
47
|
+
Application resource factories run once per daemon and must release partially acquired resources if they throw before returning. Foundry closes returned providers on shutdown and startup failure. Retention across turns is an explicit adapter/application policy; choose scope identities, resource grants, credentials and expiration accordingly.
|
|
48
|
+
|
|
49
|
+
The private `onReady` connection has Station 3 operator/admin authority. Keep it in trusted host code, never in model context or public UI responses. Steel proxy configuration is an application/provider setting, and still depends on account availability. Foundry requires Node 22+; the portable mount entrypoint does not acquire that requirement.
|
|
50
|
+
|
|
51
|
+
## Release procedure
|
|
52
|
+
|
|
53
|
+
1. Review and merge the versioned PR, including generated changelogs and dependent-package bumps.
|
|
54
|
+
2. Pull the merged `main` and run `pnpm install --frozen-lockfile`.
|
|
55
|
+
3. With maintainer npm authentication available, run `pnpm release` from the repository root. This runs the registry preflight, builds the publishable packages and invokes Changesets publication. Version application is already complete.
|
|
56
|
+
4. Verify the published exports and a clean consumer installation.
|
|
57
|
+
5. Deploy the site and verify the new guide, blog, diagrams and four LLM endpoints at their production URLs.
|