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.
- package/README.md +195 -4
- package/dist/{chunk-P65RT7H5.js → chunk-25BGNRJN.js} +1452 -178
- package/dist/{chunk-CRWY7M66.js → chunk-5LDW2N2E.js} +1086 -91
- package/dist/{chunk-3GCUECPA.js → chunk-GKZLWD5M.js} +66 -2
- package/dist/cli.js +186 -40
- package/dist/{client-CLkZREDr.d.ts → client-D0-pKEZM.d.ts} +365 -12
- package/dist/client.d.ts +4 -1
- package/dist/client.js +1 -1
- package/dist/config.d.ts +15 -1
- package/dist/execution-agent.js +1 -1
- package/dist/index.d.ts +91 -5
- package/dist/index.js +428 -6
- package/docs/architecture.md +51 -0
- package/docs/building-with-foundry.md +336 -4
- package/docs/evaluation-checklist.md +10 -1
- package/docs/guidance.md +146 -0
- package/docs/inspector.md +39 -1
- package/docs/release-verification.md +74 -0
- package/package.json +14 -12
- package/templates/minimal/README.md +30 -2
- package/templates/travel-concierge/README.md +33 -5
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Foundry production integration — release handoff
|
|
2
|
+
|
|
3
|
+
Verified on 9 September 2026 with Node 22.18. This is a **tested release candidate, not a published release or a guarantee for an untested production application**.
|
|
4
|
+
|
|
5
|
+
## Source and scope
|
|
6
|
+
|
|
7
|
+
The goals/facts/forms follow-up is included in this candidate. Merge and publication
|
|
8
|
+
remain paused for review. It adds typed lazy fields, native custom context
|
|
9
|
+
providers, execution handles, scoped preparation, durable goal/form/fact adapters,
|
|
10
|
+
the inspector guidance summary, and the guided-intake example. Both repository
|
|
11
|
+
agent skills now describe these first-class fields instead of requiring custom hooks.
|
|
12
|
+
|
|
13
|
+
Follow-up validation: Foundry **89 tests passed**; memory **202 tests passed**;
|
|
14
|
+
the new preparation tests reuse one verified fact for both a goal and a form.
|
|
15
|
+
The real-worker guided-intake verifier passes before and after stopping and
|
|
16
|
+
reconstructing Foundry, preserving progress, facts and form answers without
|
|
17
|
+
duplicates. Concurrent fact writers and process-death lock recovery pass.
|
|
18
|
+
The canonical architecture/runtime verifiers, package/example typechecks,
|
|
19
|
+
documentation production build, and a freshly generated starter typecheck pass.
|
|
20
|
+
The fresh starter uses the tested workspace dependency closure, not unpublished
|
|
21
|
+
registry versions. The inspector was exercised in the browser; its completed
|
|
22
|
+
progress and corrected final reply were verified. No new live-provider or
|
|
23
|
+
telephony acceptance test is claimed for this follow-up.
|
|
24
|
+
|
|
25
|
+
- Candidate branch: `codex/foundry-production-release`, built on upstream `main` at `7f6b97b8`.
|
|
26
|
+
- The original `codex/glove-foundry-release` checkout and its dirty Hercules work were preserved. Do not publish that older checkout by mistake.
|
|
27
|
+
- Reconciles reusable Foundry work with upstream `glove-core` 4 and `glove-memory` 2, retaining native runtime context, tasks, facts/forms, voice and document surfaces.
|
|
28
|
+
- Excludes Hercules application updates. Includes durable Foundry instance/conversation data, SQLite structured memory, MCP lifecycle controls, tool approvals, steering, bounded programmatic tools, and multimodal conversation integration.
|
|
29
|
+
- Foundry now requires Station `^2.3.0`; the lockfile resolves the completed-child drain and cancellation escalation fixes in `station-env`, `station-signal`, and `station-schedules` 2.3.0.
|
|
30
|
+
- The Clack setup wizard adds project/target/template/package-manager choices, confirmation, optional installation, and non-interactive flags. Node 20.12+ is required; use Node 22.13+ for SQLite memory.
|
|
31
|
+
- The package README, both generated starter READMEs, handbook, website setup-and-CLI page, navigation, and machine-readable Foundry docs cover setup, commands, troubleshooting, and production boundaries.
|
|
32
|
+
|
|
33
|
+
The Glove Foundry and Glove skills guided integration against native primitives rather than introducing parallel memory, voice, or workspace systems.
|
|
34
|
+
|
|
35
|
+
## Verification evidence
|
|
36
|
+
|
|
37
|
+
| Surface | Result |
|
|
38
|
+
| --- | --- |
|
|
39
|
+
| Entire publish build graph | Passed, including ordered legacy Glovebox dependencies; no publishing command run |
|
|
40
|
+
| Foundry runtime suite | 80 passed, including real completed/cancelled worker process cleanup |
|
|
41
|
+
| New initializer and existing scaffold tests | 11 passed; terminal policy, flags, piped setup, invalid options, Next.js preservation, versions, and all four package-manager dispatch paths |
|
|
42
|
+
| Interactive terminal | Selected minimal starter and npm; confirmed generation; separately cancelled with Ctrl+C and verified no output directory |
|
|
43
|
+
| Packaged CLI | Packed tarball scaffolds a project; generated project type-checks against the tested workspace dependency closure |
|
|
44
|
+
| Real dependency installation | Initializer ran `pnpm install` to completion in a fresh minimal project; registry-installed project type-check passed and next steps correctly omitted reinstalling |
|
|
45
|
+
| Core / JS / Python / Lisp | 24 / 83 / 87 / 99 tests passed |
|
|
46
|
+
| Structured memory | 198 passed, including 10 SQLite durability/isolation/concurrency/corruption tests |
|
|
47
|
+
| MCP | 50 passed with deterministic recycling clock and serialized stdio integration tests |
|
|
48
|
+
| Native working environment / documents | 427 / 98 tests passed |
|
|
49
|
+
| Voice S2S / avatar / LiveKit | 48 / 16 / 10 tests passed; native, React and Next voice hosts type-checked |
|
|
50
|
+
| Facts | 23 tests passed |
|
|
51
|
+
| Canonical Foundry example | Type-check, architecture verifier, and end-to-end runtime verifier passed |
|
|
52
|
+
| Live Gemini integration | Real provider session invoked direction-recording and briefing tools and returned spoken confirmation |
|
|
53
|
+
| Documentation website | Production Next.js build passed, including setup page and Foundry machine-readable routes |
|
|
54
|
+
| Release metadata | Changeset preview, published-version preflight, frozen-lockfile install and whitespace checks passed |
|
|
55
|
+
|
|
56
|
+
The packed-consumer check uses the tested workspace dependency closure, not a fresh registry-only installation of unreleased packages. The live voice check does not certify a browser microphone, phone carrier, Discord/Telegram installation, or application-specific deployment. Those need acceptance testing with the eventual production application's adapters and credentials. Windows installation dispatch is implemented but was not exercised on this macOS host.
|
|
57
|
+
|
|
58
|
+
## Release procedure
|
|
59
|
+
|
|
60
|
+
1. Review and merge the candidate into `main`; let CI run on the merged result.
|
|
61
|
+
2. Review and merge the automated **Version Packages** PR. The pending changeset schedules minor releases for Foundry, core, memory, MCP and the three REPL packages.
|
|
62
|
+
3. Inspect the generated dependent bumps. The existing Changesets peer-dependency policy currently schedules a **major Scratchpad bump** because its optional MCP peer uses `workspace:*`, plus dependent patch bumps. This policy was not silently changed.
|
|
63
|
+
4. From a clean, updated checkout of the repository root, with npm release access configured, run `npx release`. The wrapper builds and publishes already-versioned packages; it does not apply pending changesets itself.
|
|
64
|
+
5. Verify published versions and install a new project from the registry. Exercise the production application's actual voice, documents, persistence, authorization and external integrations before rollout.
|
|
65
|
+
|
|
66
|
+
No npm publication, main-branch merge, or production deployment was performed. Current tarballs retain pre-release-bump manifest versions and are only local verification artifacts; do not manually publish them over existing versions.
|
|
67
|
+
|
|
68
|
+
## Day-one production configuration
|
|
69
|
+
|
|
70
|
+
- Keep credential acquisition and refresh in user-owned adapters. The initializer never asks for API keys.
|
|
71
|
+
- Separate durable Foundry instance/conversation data, agent memory, scheduler/runtime state, and working-environment VFS storage; persisting one does not persist the others. Starter storage is disposable demo storage.
|
|
72
|
+
- SQLite memory is opt-in and single-host. Select different adapters for distributed production requirements.
|
|
73
|
+
- Preserve loopback defaults unless a request-authorization adapter protects the control plane. Set bounded multimodal request limits for documents/media.
|
|
74
|
+
- Maintain application-specific health checks and a rollback plan. Successful framework tests cannot guarantee the behavior of an application that has not yet been provided.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "glove-foundry",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "An Effect-native, file-routed framework for typed, observable Glove agent applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -54,22 +54,24 @@
|
|
|
54
54
|
"agent-applications"
|
|
55
55
|
],
|
|
56
56
|
"engines": {
|
|
57
|
-
"node": ">=20"
|
|
57
|
+
"node": ">=20.12.0"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
+
"@clack/prompts": "^1.8.0",
|
|
60
61
|
"effect": "^3.22.1",
|
|
61
|
-
"station-env": "^2.
|
|
62
|
-
"station-signal": "^2.
|
|
63
|
-
"station-schedules": "^2.
|
|
62
|
+
"station-env": "^2.3.0",
|
|
63
|
+
"station-signal": "^2.3.0",
|
|
64
|
+
"station-schedules": "^2.3.0",
|
|
64
65
|
"tsx": "^4.21.0",
|
|
65
66
|
"zod": "^4.3.6",
|
|
66
|
-
"glove-core": "
|
|
67
|
-
"glove-
|
|
68
|
-
"glove-
|
|
69
|
-
"glove-
|
|
70
|
-
"glove-
|
|
71
|
-
"glove-
|
|
72
|
-
"glove-
|
|
67
|
+
"glove-core": "4.1.0",
|
|
68
|
+
"glove-facts": "0.1.2",
|
|
69
|
+
"glove-lisp": "0.5.0",
|
|
70
|
+
"glove-js": "0.5.0",
|
|
71
|
+
"glove-mcp": "1.2.0",
|
|
72
|
+
"glove-memory": "2.1.0",
|
|
73
|
+
"glove-python": "0.4.0",
|
|
74
|
+
"glove-mesh": "0.1.5",
|
|
73
75
|
"glove-working-environment": "0.6.1"
|
|
74
76
|
},
|
|
75
77
|
"devDependencies": {
|
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
A [Glove Foundry](https://github.com/porkytheblack/glove/tree/main/packages/glove-foundry) application.
|
|
4
4
|
|
|
5
|
+
## First run
|
|
6
|
+
|
|
7
|
+
Use Node.js 22.13+ (recommended; minimum 20.12). This minimal starter needs an
|
|
8
|
+
OpenRouter key. For a keyless first look, choose the guided travel-concierge
|
|
9
|
+
template instead. Run these commands from this project's directory; skip
|
|
10
|
+
installation if you already accepted it in the setup wizard.
|
|
11
|
+
|
|
5
12
|
```bash
|
|
6
13
|
cp .env.example .env.local # add your OPENROUTER_API_KEY
|
|
7
14
|
{{installCommand}}
|
|
@@ -10,6 +17,24 @@ cp .env.example .env.local # add your OPENROUTER_API_KEY
|
|
|
10
17
|
|
|
11
18
|
Then open **http://127.0.0.1:4141** and press **Start a run**.
|
|
12
19
|
|
|
20
|
+
Choose **assistant**, send a short request, and open the run to inspect its events.
|
|
21
|
+
Edit `agents/assistant/agent.ts`, save, and run again. The dev server reloads your
|
|
22
|
+
definition. Run `{{typecheckCommand}}` and `{{lintCommand}}` after changes.
|
|
23
|
+
|
|
24
|
+
The initializer never asks for secrets. Add `OPENROUTER_API_KEY` to `.env.local`
|
|
25
|
+
yourself and restart the dev server. Do not commit the key. If a run fails, check
|
|
26
|
+
the trace for authentication or rate-limit errors. If port 4141 is occupied, use
|
|
27
|
+
the local `glove foundry dev --port 4142` command.
|
|
28
|
+
|
|
29
|
+
## Before using real data
|
|
30
|
+
|
|
31
|
+
The starter uses disposable in-memory storage. Configure durable Foundry runtime
|
|
32
|
+
data, a durable Glove conversation store, native memory adapters, and VFS
|
|
33
|
+
persistence independently. For a single host, Foundry includes
|
|
34
|
+
`FileFoundryDataAdapter`; `glove-memory/sqlite` supports Node 22.13+. Use your own
|
|
35
|
+
transactional adapters across hosts. A non-loopback listener requires an
|
|
36
|
+
application-owned `requestAuthorization` adapter and a deliberate network boundary.
|
|
37
|
+
|
|
13
38
|
## The one idea to understand first
|
|
14
39
|
|
|
15
40
|
Foundry separates a **definition** (code — what an agent can assemble, at `agents/assistant/agent.ts`) from an **instance** (data — one persisted identity with its own context, installed apps, and conversations). One definition serves many instances.
|
|
@@ -32,10 +57,13 @@ Any file matching these names under an agent folder is discovered automatically.
|
|
|
32
57
|
| `memory/*.memory.ts` | A memory profile | `defineMemory` |
|
|
33
58
|
| `layers/*.layer.ts` | Native Glove setup | `defineLayer` |
|
|
34
59
|
| `subscribers/*.subscriber.ts` | An observer | `defineSubscriber` |
|
|
35
|
-
| `schedules/*.ts` | Recurring or future work | `defineSchedule` |
|
|
36
60
|
|
|
37
61
|
Create the file, add it to `composeAgent(...)`, and the dev server picks it up and regenerates types.
|
|
38
62
|
|
|
63
|
+
Schedules are data, not auto-discovered file routes. You may keep a `defineSchedule`
|
|
64
|
+
value in an ordinary colocated module and import it into the agent's lazy
|
|
65
|
+
`schedules` field, or create future work dynamically with Foundry's scheduling tools.
|
|
66
|
+
|
|
39
67
|
Want a worked example with a calendar application, a chat transport, memory, a schedule, and a sandboxed REPL? Scaffold the travel concierge:
|
|
40
68
|
|
|
41
69
|
```bash
|
|
@@ -46,7 +74,7 @@ npx glove-foundry init my-concierge --template travel-concierge
|
|
|
46
74
|
|
|
47
75
|
| Command | What it does |
|
|
48
76
|
| --- | --- |
|
|
49
|
-
| `{{devCommand}}` | Discover agents,
|
|
77
|
+
| `{{devCommand}}` | Discover agents, generate routes, serve the runtime and inspector |
|
|
50
78
|
| `{{startCommand}}` | Run without file watching |
|
|
51
79
|
| `{{lintCommand}}` | Lint, including the Foundry file-routing rules |
|
|
52
80
|
| `{{typecheckCommand}}` | `tsc --noEmit` |
|
|
@@ -4,6 +4,12 @@ A [Glove Foundry](https://github.com/porkytheblack/glove/tree/main/packages/glov
|
|
|
4
4
|
|
|
5
5
|
It runs before you configure anything — there is a built-in demo model, so you get real runs and a real event trace with no API key.
|
|
6
6
|
|
|
7
|
+
## First run, step by step
|
|
8
|
+
|
|
9
|
+
Use Node.js 22.13+ (recommended); the CLI requires Node 20.12 or newer. Open a
|
|
10
|
+
terminal in this project's directory. If the setup wizard already installed
|
|
11
|
+
dependencies, you can skip the install command below.
|
|
12
|
+
|
|
7
13
|
```bash
|
|
8
14
|
cp .env.example .env.local # optional: add OPENROUTER_API_KEY for real answers
|
|
9
15
|
{{installCommand}}
|
|
@@ -12,6 +18,23 @@ cp .env.example .env.local # optional: add OPENROUTER_API_KEY for real answe
|
|
|
12
18
|
|
|
13
19
|
Then open **http://127.0.0.1:4141** and press **Start a run**.
|
|
14
20
|
|
|
21
|
+
Choose **concierge** and send “Find a flight to Nairobi.” Open the resulting run
|
|
22
|
+
to follow its model calls, tool calls and result. This is a deterministic demo:
|
|
23
|
+
flights, calendar and messaging are examples, not live provider integrations.
|
|
24
|
+
Change `agents/concierge/agent.ts`, save, and try another run to see the reload.
|
|
25
|
+
|
|
26
|
+
To get live model answers, put your own `OPENROUTER_API_KEY` in `.env.local`, then
|
|
27
|
+
restart the dev server. Never commit that file. The wizard does not collect keys.
|
|
28
|
+
Setting a model key does not connect a real calendar or messenger by itself.
|
|
29
|
+
|
|
30
|
+
## If something goes wrong
|
|
31
|
+
|
|
32
|
+
- Check `node --version` if you get an engine or SQLite error.
|
|
33
|
+
- Run `{{installCommand}}` again if installation was interrupted; project files are retained.
|
|
34
|
+
- If port 4141 is occupied, run the local `glove foundry dev --port 4142` command and open that address.
|
|
35
|
+
- If a run fails, open its event trace; a provider rate limit is different from a typecheck failure.
|
|
36
|
+
- In-memory demo state resets across workers/restarts. Read **Going to production** before storing real user work.
|
|
37
|
+
|
|
15
38
|
---
|
|
16
39
|
|
|
17
40
|
## The one idea to understand first
|
|
@@ -71,11 +94,10 @@ Any file matching these names under an agent folder is discovered automatically.
|
|
|
71
94
|
| `memory/*.memory.ts` | A memory profile | `defineMemory` |
|
|
72
95
|
| `layers/*.layer.ts` | Native Glove setup | `defineLayer` |
|
|
73
96
|
| `subscribers/*.subscriber.ts` | An observer | `defineSubscriber` |
|
|
74
|
-
| `schedules/*.ts` | Recurring or future work | `defineSchedule` |
|
|
75
97
|
| `connections/*.connection.ts` | A long-lived inbound worker | `defineConnection` |
|
|
76
98
|
| `actions/*.action.ts` | A playbook action | `definePlaybookAction` |
|
|
77
99
|
|
|
78
|
-
|
|
100
|
+
Assembly fields such as tools, memory, and schedules accept **a value or a function**. A resolver receives the current assembly context, including the message and instance, so one definition can adapt its capabilities to the request.
|
|
79
101
|
|
|
80
102
|
---
|
|
81
103
|
|
|
@@ -124,7 +146,12 @@ For inbound, point the provider's webhook at your own HTTP handler and call `dis
|
|
|
124
146
|
|
|
125
147
|
### Schedule work
|
|
126
148
|
|
|
127
|
-
|
|
149
|
+
Use Foundry's scheduling tools for durable future work instead of `setTimeout`.
|
|
150
|
+
Schedules are data, not auto-discovered file routes. This example imports an
|
|
151
|
+
ordinary `schedules/trip-countdown.ts` module and returns its value from the agent's
|
|
152
|
+
lazy `schedules` field. You can also let the agent create schedules at runtime.
|
|
153
|
+
Foundry persists the activation so it can wake the instance later; inspect these
|
|
154
|
+
under **Automations**.
|
|
128
155
|
|
|
129
156
|
### Call agents from your own code
|
|
130
157
|
|
|
@@ -163,11 +190,12 @@ Filters live in the URL, so `/runs?status=failed` is a link you can send. Press
|
|
|
163
190
|
|
|
164
191
|
## Going to production
|
|
165
192
|
|
|
166
|
-
1. **
|
|
193
|
+
1. **Persist each store.** `MemoryFoundryDataAdapter` in `foundry.application.ts` is disposable. Use `FileFoundryDataAdapter` for single-host runtime data or a transactional database adapter for multiple hosts. Also replace the agent's `MemoryStore` with a durable conversation store, provide durable native memory adapters (such as `glove-memory/sqlite` on Node 22.13+), and persist the working-environment VFS. Persisting one does not persist the others.
|
|
167
194
|
2. **Delete `lib/demo-model.ts`** and the fallback in `agent.ts` once `OPENROUTER_API_KEY` is set.
|
|
168
195
|
3. **Own your credentials.** Foundry stores account *references*, never secrets. Keep tokens in your own adapter or secret manager.
|
|
169
196
|
4. **Run `{{startCommand}}`** rather than `dev` — no file watching, no restart-on-change.
|
|
170
197
|
5. **Keep the ESLint preset.** `glove-foundry/eslint` rejects patterns that break file routing, such as a hand-written `id` on a file-routed definition.
|
|
198
|
+
6. **Protect the control plane.** A non-loopback bind requires an application-owned `requestAuthorization` adapter. Put TLS and network/rate policy in front of it.
|
|
171
199
|
|
|
172
200
|
---
|
|
173
201
|
|
|
@@ -191,7 +219,7 @@ Add an environment package when you need it — `glove-env-documents`, `glove-en
|
|
|
191
219
|
|
|
192
220
|
| Command | What it does |
|
|
193
221
|
| --- | --- |
|
|
194
|
-
| `{{devCommand}}` | Discover agents,
|
|
222
|
+
| `{{devCommand}}` | Discover agents, generate routes, serve the runtime and inspector |
|
|
195
223
|
| `{{startCommand}}` | Run without file watching |
|
|
196
224
|
| `{{lintCommand}}` | Lint, including the Foundry file-routing rules |
|
|
197
225
|
| `{{typecheckCommand}}` | `tsc --noEmit` |
|