glove-foundry 0.6.1 → 0.8.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 +80 -4
- package/dist/chunk-CYOIHSUX.js +1365 -0
- package/dist/{chunk-X6EWEWWM.js → chunk-DTFCEX67.js} +2003 -200
- package/dist/{chunk-OBTOFA7W.js → chunk-EUGKVW3J.js} +470 -638
- package/dist/{chunk-B36BGF5R.js → chunk-J6NHL4SM.js} +370 -74
- package/dist/{chunk-7F7QVO6I.js → chunk-L5JQVTHD.js} +30 -0
- package/dist/{chunk-RSU7NEDK.js → chunk-X3HZYVZS.js} +36 -1
- package/dist/cli.js +4 -4
- package/dist/{client-DWPYe_Nc.d.ts → client-CekanYLW.d.ts} +252 -161
- package/dist/client.d.ts +3 -3
- package/dist/client.js +1 -1
- package/dist/config.d.ts +7 -0
- package/dist/{definition-A8o11aez.d.ts → event-delivery-CNCsVqi8.d.ts} +1380 -871
- package/dist/execution-agent.d.ts +0 -1
- package/dist/execution-agent.js +3 -14
- package/dist/execution-daemon.js +10 -5
- package/dist/execution-loader.js +1171 -8
- package/dist/index.d.ts +21 -6
- package/dist/index.js +178 -32
- package/dist/voice.d.ts +12 -8
- package/dist/voice.js +51 -10
- package/docs/README.md +1 -1
- package/docs/architecture.md +8 -0
- package/docs/building-with-foundry.md +137 -5
- package/docs/durable-subagents.md +337 -0
- package/docs/execution.md +4 -0
- package/docs/inspector.md +137 -29
- package/package.json +12 -11
- package/templates/travel-concierge/README.md +1 -1
- package/dist/chunk-K2EU63MB.js +0 -468
- package/dist/chunk-TFGETZYH.js +0 -917
package/dist/execution-agent.js
CHANGED
|
@@ -1,19 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
compileAgentModule
|
|
3
|
-
} from "./chunk-TFGETZYH.js";
|
|
4
|
-
import "./chunk-RSU7NEDK.js";
|
|
5
|
-
import {
|
|
6
|
-
bindAgentLocalDefinitions
|
|
7
|
-
} from "./chunk-OBTOFA7W.js";
|
|
8
|
-
import "./chunk-B36BGF5R.js";
|
|
9
1
|
import {
|
|
10
2
|
FOUNDRY_AGENT_FILE_ENV,
|
|
11
3
|
FOUNDRY_AGENT_ROUTE_ENV
|
|
12
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-CYOIHSUX.js";
|
|
13
5
|
|
|
14
6
|
// src/execution-agent.ts
|
|
15
|
-
import { pathToFileURL } from "node:url";
|
|
16
|
-
import { dirname } from "node:path";
|
|
17
7
|
var route = process.env[FOUNDRY_AGENT_ROUTE_ENV];
|
|
18
8
|
var file = process.env[FOUNDRY_AGENT_FILE_ENV];
|
|
19
9
|
if (!route || !file) {
|
|
@@ -21,9 +11,8 @@ if (!route || !file) {
|
|
|
21
11
|
"The Foundry execution entrypoint requires GLOVE_FOUNDRY_AGENT_ROUTE and GLOVE_FOUNDRY_AGENT_FILE."
|
|
22
12
|
);
|
|
23
13
|
}
|
|
24
|
-
var
|
|
25
|
-
await
|
|
26
|
-
var execution_agent_default = compileAgentModule(route, module);
|
|
14
|
+
var { loadExecutionAgent } = await import("./execution-loader.js");
|
|
15
|
+
var execution_agent_default = await loadExecutionAgent(route, file);
|
|
27
16
|
export {
|
|
28
17
|
execution_agent_default as default
|
|
29
18
|
};
|
package/dist/execution-daemon.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
FOUNDRY_APPLICATION_ENV,
|
|
6
6
|
internalAgentName
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-CYOIHSUX.js";
|
|
8
8
|
|
|
9
9
|
// src/execution-daemon.ts
|
|
10
10
|
import { randomBytes } from "node:crypto";
|
|
@@ -26,8 +26,12 @@ var schedules = new ScheduleMemoryAdapter();
|
|
|
26
26
|
var definitions = /* @__PURE__ */ new Map();
|
|
27
27
|
var stopping;
|
|
28
28
|
var resources;
|
|
29
|
-
function send(message) {
|
|
30
|
-
if (process.connected
|
|
29
|
+
function send(message, then) {
|
|
30
|
+
if (!process.connected || !process.send) {
|
|
31
|
+
then?.();
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
process.send(message, void 0, {}, () => then?.());
|
|
31
35
|
}
|
|
32
36
|
async function stop() {
|
|
33
37
|
return stopping ??= (async () => {
|
|
@@ -178,8 +182,9 @@ export default await loadExecutionAgent(${JSON.stringify(agent.route)}, ${JSON.s
|
|
|
178
182
|
value = null;
|
|
179
183
|
break;
|
|
180
184
|
}
|
|
181
|
-
send({ id: message.id, value })
|
|
182
|
-
|
|
185
|
+
send({ id: message.id, value }, command.method === "stop" ? () => {
|
|
186
|
+
if (process.connected) process.disconnect?.();
|
|
187
|
+
} : void 0);
|
|
183
188
|
})().catch(() => {
|
|
184
189
|
send({ id: message.id, error: `Execution daemon ${message.command.method} failed. Inspect daemon health before repeating mutations.` });
|
|
185
190
|
});
|