Skip to content

Commit 4e1cacc

Browse files
committed
chore: update package versions to 0.0.3 and refine documentation for saved results
- Bumped version numbers for all packages to 0.0.3, ensuring consistency across the project. - Updated documentation to clarify terminology, replacing "trace" with "saved result" for improved clarity. - Enhanced descriptions and examples to emphasize the significance of saved results and their URLs for both successful and failed runs. - Adjusted various sections to improve readability and user comprehension, aligning with recent changes in terminology.
1 parent cb9f96a commit 4e1cacc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+177
-140
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ agent writes code → Lab runs it → saved result (what happened) → age
1010

1111
**Try it now:** [lab.coey.dev/compose](https://lab.coey.dev/compose) — run a chain, click the saved-result link.
1212

13-
> **0.0.2** — API and trace shapes may still move. Pin to exact versions or self-host.
13+
> **0.0.3** — API and saved-result shapes may still move. Pin to exact versions or self-host.
1414
1515
## Quickstart
1616

@@ -34,7 +34,7 @@ const out = await lab.runChain([
3434
]);
3535

3636
console.log(out.result); // { valid: true, healed: true, users: 1 }
37-
console.log(out.traceId); // → $LAB_URL/t/<id> (shareable result URL)
37+
console.log(out.traceId); //machine JSON: $LAB_URL/t/<id>.json; viewer: $LAB_URL/t/<id>
3838
```
3939

4040
Each step runs in its own sandbox. Step 2's output flows to Step 3's `input`. The result is saved at a URL — share it to show what happened.
@@ -71,7 +71,7 @@ See all patterns: [lab.coey.dev/docs/patterns](https://lab.coey.dev/docs/pattern
7171

7272
No capabilities = pure compute, no I/O. Denied capabilities produce clear errors recorded in the saved result.
7373

74-
**Results** — every run saves a JSON document. Use `/t/:id` as the shareable result URL and `/t/:id.json` for the raw JSON. Successful runs include code, capabilities, return values, and timing. Failed or aborted runs include the top-level error and reason; chain step detail may be partial or empty. Share the URL. Fork it into a new run. Hand it to another agent.
74+
**Results** — every run saves a JSON document. Agents and scripts should read `/t/:id.json`. Humans can open `/t/:id` as the viewer over that same saved result. Successful runs include code, capabilities, return values, and timing. Failed or aborted runs include the top-level error and reason; chain step detail may be partial or empty. Share the URL. Fork it into a new run. Hand it to another agent.
7575

7676
## API
7777

@@ -87,8 +87,8 @@ No capabilities = pure compute, no I/O. Denied capabilities produce clear errors
8787
| `POST` | `/run/generate` | `{ prompt, capabilities }` |
8888
| `POST` | `/seed` | `{}` — writes demo KV data |
8989
| `GET` | `/lab/catalog` | capability + route metadata for agents |
90-
| `GET` | `/t/:id` | shareable saved-result URL |
91-
| `GET` | `/t/:id.json` | raw saved-result JSON |
90+
| `GET` | `/t/:id` | human saved-result viewer |
91+
| `GET` | `/t/:id.json` | canonical saved-result JSON |
9292

9393
### TypeScript client
9494

@@ -104,8 +104,8 @@ npm install @acoyfellow/lab
104104
| `runSpawn(payload)` | Nested isolates |
105105
| `runGenerate(payload)` | AI-generated code + run |
106106
| `seed()` | Seed demo KV data |
107-
| `getTrace(traceId)` | Fetch the saved result |
108-
| `getTraceJson(traceId)` | Fetch raw saved-result JSON |
107+
| `getTrace(traceId)` | Fetch canonical saved-result JSON |
108+
| `getTraceJson(traceId)` | Same JSON via the explicit `.json` path |
109109

110110
Effect client: `import { createLabEffectClient } from "@acoyfellow/lab/effect"` — same API, returns `Effect` instead of `Promise`.
111111

@@ -146,13 +146,13 @@ Requires Cloudflare Workers Paid ($5/mo). Provisions the public app, the private
146146

147147
```
148148
worker/ Sandbox engine (Effect v4, Worker Loaders)
149-
index.ts Routes, chain/spawn orchestration, trace storage
149+
index.ts Routes, chain/spawn orchestration, saved-result storage
150150
Loader.ts V8 sandbox lifecycle
151151
guest/templates.ts Guest module composition + capability shims
152152
capabilities/ Capability registry
153153
packages/lab/ TypeScript client (@acoyfellow/lab)
154154
packages/lab-mcp/ MCP server (@acoyfellow/lab-mcp)
155-
src/ SvelteKit app (compose, trace viewer, docs)
155+
src/ SvelteKit app (compose, saved-result viewer, docs)
156156
alchemy.run.ts Infrastructure-as-code
157157
```
158158

bun.lock

Lines changed: 6 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lab",
3-
"version": "0.0.2",
3+
"version": "0.0.3",
44
"private": false,
55
"packageManager": "bun@1.3.10",
66
"workspaces": [

packages/lab-cli/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@acoyfellow/lab-cli",
3-
"version": "0.0.2",
3+
"version": "0.0.3",
44
"description": "Minimal CLI for Lab — agents shell out, get saved results back",
55
"license": "MIT",
66
"type": "module",
@@ -28,7 +28,7 @@
2828
"typecheck": "tsc --noEmit"
2929
},
3030
"dependencies": {
31-
"@acoyfellow/lab": "^0.0.2",
31+
"@acoyfellow/lab": "^0.0.3",
3232
"effect": "4.0.0-beta.40"
3333
},
3434
"devDependencies": {

packages/lab-mcp/dist/main.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/lab-mcp/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@acoyfellow/lab-mcp",
3-
"version": "0.0.2",
3+
"version": "0.0.3",
44
"description": "MCP server for Lab: find (catalog/saved result) + execute (guest runs) via stdio",
55
"license": "MIT",
66
"type": "module",
@@ -29,7 +29,7 @@
2929
"typecheck": "tsc --noEmit"
3030
},
3131
"dependencies": {
32-
"@acoyfellow/lab": "^0.0.2",
32+
"@acoyfellow/lab": "^0.0.3",
3333
"@modelcontextprotocol/sdk": "1.28.0",
3434
"effect": "4.0.0-beta.40",
3535
"zod": "^4.0.0"

packages/lab-mcp/src/catalogPath.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { catalogAtPath } from './catalogPath.js';
55

66
/** Minimal shape for path tests only */
77
const cat = {
8-
version: '0.0.2',
8+
version: '0.0.3',
99
capabilities: [{ id: 'kvRead', binding: 'KV', summary: '', llmHint: '' }],
1010
templates: [],
1111
execute: {
@@ -21,7 +21,7 @@ const cat = {
2121

2222
describe('catalogAtPath', () => {
2323
test('scalar at top-level path', () => {
24-
expect(catalogAtPath(cat, 'version')).toBe('0.0.2');
24+
expect(catalogAtPath(cat, 'version')).toBe('0.0.3');
2525
});
2626

2727
test('nested path', () => {

packages/lab-mcp/src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ function mapHttpToError(err: HttpError): Error {
8181

8282
const mcpServer = new McpServer({
8383
name: 'lab',
84-
version: '0.0.2',
84+
version: '0.0.3',
8585
});
8686

8787
mcpServer.registerTool(

packages/lab-petri/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@acoyfellow/lab-petri",
3-
"version": "0.0.2",
3+
"version": "0.0.3",
44
"description": "Persistent substrate for Lab experiments - Durable Object backed state with real-time sync",
55
"type": "module",
66
"main": "./dist/index.js",

packages/lab/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Typed HTTP client for the [Lab](https://github.com/acoyfellow/lab) public app API — sandboxed isolates, capability chains, and saved results.
44

5-
> **0.0.2** — early feedback. API may change.
5+
> **0.0.3** — early feedback. API may change.
66
77
## Install
88

@@ -41,9 +41,11 @@ console.log(r.result); // [2, 4, 6]
4141
| `runSpawn({ body, capabilities, depth? })` | `POST /run/spawn` |
4242
| `runGenerate({ prompt, capabilities })` | `POST /run/generate` |
4343
| `seed()` | `POST /seed` |
44-
| `getTrace(id)` | `GET /t/:id` |
44+
| `getTrace(id)` | `GET /t/:id.json` |
4545
| `getTraceJson(id)` | `GET /t/:id.json` |
4646

47+
`GET /t/:id` is the human viewer on the public app. Agents and scripts should read `GET /t/:id.json`.
48+
4749
Use `body` for guest JavaScript. `code` is a legacy alias. Default template: `guest@v1`.
4850

4951
**Effect client:** `import { createLabEffectClient } from "@acoyfellow/lab/effect"` — same methods, returns `Effect` instead of `Promise`. Peer dependency: `effect@4.0.0-beta.40`.

0 commit comments

Comments
 (0)