Add verifiable organism foundry - #33
Merged
Merged
Conversation
Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
0thernet
enabled auto-merge (squash)
September 17, 2026 23:00
Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Manifests can name host-admitted tools as explicit cells or as agent-requested capabilities during bounded turns. Each tool has a typed signature, effect class, modeled cost, output bound, timeout, and idempotency key; results and failures are digest-bound receipts that replay without live IO and route through ordinary fail edges. Generated organisms remain capability-limited: they can name admitted tools but cannot supply implementations, credentials, or new authority. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
A bench runs one workload through several systems — each an admitted organism plus a host-resolved executor list — so a lone cheap call, a lone frontier call, and a decomposed organism with a guarded escalation branch are the same kind of contender. Case results are replayable run receipts; the report embeds the case list, per-model effect attribution, and the non-dominated pareto set on quality versus tokens. Verification recomputes digests, pass claims, aggregates, and the pareto set, confirms each receipt ran the claimed manifest and args, and replays every receipt offline. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Prompted abstention proved unreliable in the live triage bench — cheap models answer confidently instead of declaring "unsure". The ensemble organism encodes uncertainty structurally instead: two decorrelated cheap classifiers vote, assert.v1 compares, and only disagreement fires the frontier cell through an on:fail edge. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
The batch workload compares one call over a ticket list against an each cell mapping items through focused organisms, including a per-item disagreement ensemble. The bench command now loads --modules so each/organism cells resolve sub-manifests. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…udy. The CLI now accepts --tools <file> for run, verify, bench, and foundry commands. A tool registry declares typed signatures plus either a scripted:<data> or cmd:<shell> executor, so tool cells and agent-requested tools can be supplied from a file without ambient authority in manifests. Also strengthens the benchmark Pareto frontier with a third axis: total effect calls, so scripted baselines report honest tradeoffs even when no live tokens are measured. Adds examples/invest/: a billing-dispute workload where the deciding evidence lives behind a typed ledger lookup. The deterministic run and a live Vercel AI Gateway run both show the tool-grounded Qwen organism outperforming a lone Claude Opus call on accuracy while remaining on the Pareto frontier. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
README.md: - New 'Where it wins' section with structural wins and billing-dispute live numbers. - Updated bench section with the three-axis Pareto and --tools. - New 'Plug it into your agent or provider' quick-start for code, CLI, tools, and verification. Docs: - Add docs/when-morphogen-wins.md with the full case study, Pareto interpretation, and reproduction commands. - Extend docs/executors.md with --tools CLI registries and a ToolRegistry example. Site: - Add a case-study section to the homepage. - Update site/llms.txt with the win and integration quickstart. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…hmarks. - `src/bench.ts` and `src/bench-verify.ts`: - optional `prices` map in bench config and report; - `usage.cost` per case, system, and attribution; - Pareto axis switches from tokens to cost when prices are provided; - `morphogen bench verify` recomputes cost from recorded tokens and prices. - `cli.ts`: - parse `prices` from `morphogen.bench.config.v1`; - pass it to `runBenchmark`. - `examples/invest/bench-invest-priced.config.json`: - live gateway benchmark with aicharts.io / AI//COST / OpenRouter prices. - `docs/when-morphogen-wins.md`: updated case-study table with dollar Pareto. - `docs/agent-loop-and-organism.md`: design note on layering organisms and agent loops. - `README.md`, `site/index.html`, `site/llms.txt`: public surfaces lead with the dollar-denominated result. Live result: Qwen 3.5 Flash + ledger tool is 6/6 for $0.00131; Claude Opus 5 without the tool is 4/6 for $0.02625. The organism is both more accurate and ~20x cheaper. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…agent tools.
- `morphogen pack` a manifest into a digest-verified bundle.
- `morphogen tool-def` generates an OpenAI or Anthropic function tool
definition from a manifest's declared interface.
- `morphogen call` unpacks a bundle, runs it with the requested executors,
tools, and args, and returns compact `{ ok, outputs, receiptDigest,
manifestDigest }` output for easy agent consumption.
- `docs/agent-tool.md` shows how to pack, register, and call an organism
from an agent.
- README, `site/index.html`, and `site/llms.txt` lead with the agent-tool
story.
- `portToJsonSchema` and `deriveInputs` helpers convert Morphogen port types
to draft-07 JSON Schema.
Generated with [Devin](https://devin.ai)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
- `morphogen call` now reads arguments from stdin when `--args -` is passed, making it a first-class stdio agent tool that can be piped. - `docs/why-unique.md` argues why a Morphogen organism is a new primitive: a bounded, typed, content-addressed probabilistic program between deterministic programs and open-ended agents. - README, `site/index.html`, and `site/llms.txt` now lead with the "new primitive" framing. - `docs/agent-tool.md` updated with the stdin example. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
- `docs/habitats.md` teases apart a long-term design: a Morphogen habitat is a shared `Store` + `FnRegistry` + `ToolRegistry` + `Executor` where organisms live as content-addressed values, reproduce through `spawn`, and evolve through foundry search and host admission. - Emphasizes the safety invariants that make it possible: no code in manifests, host-owned registries, content-addressed everything, and bounded execution. - README, `site/index.html`, and `site/llms.txt` surface the habitats concept. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
- `examples/habitat.morphogen.json` is a parent organism that: - receives a `goal`; - an agent `designer` outputs a child manifest as JSON; - a `spawn` cell admits and runs the child under the parent's budgets; - `push.v1` appends the child digest to a durable `population` slot; - a `write` slot cell persists the new population. - `examples/habitat.responses.json` and `examples/habitat.args.json` let it pass through `morphogen suite` and `morphogen verify`. - `docs/habitats.md` now documents the runnable example. - README links to the example. This proves the core habitat loop without changing the runtime: an organism can propose a child, but the host still owns admission, registries, and execution bounds. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
A parent organism (`examples/habitat/live.morphogen.json`) now calls a live model to design a child manifest, falls back to a safe default if the proposal fails, and spawns the selected child. The host script `examples/habitat/promote.ts` packs the fallback, runs the live habitat, compares the spawned child digest to the fallback, and promotes a valid non-fallback child to `promoted/<digest>.bundle.json`. First live run with `alibaba/qwen3.7-flash` produced and promoted: sha256:f73c4ef9f89a3c55595f773c5a86c89780cfaf202cf29284005e76a5ad7e751c Also: - Add `examples/habitat/fallback.morphogen.json` and `live.responses.json`. - Add `promoted/` to `.gitignore`. - Update `docs/habitats.md`, README, site, and `site/llms.txt` with the live steel thread. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Dynamic property assignments in `caseArgs`, `caseOutputs`, `generateFoundryCandidates`, `attribute`, and `mergeAttribution` could write to `Object.prototype` if a manifest or config used `__proto__` as a cell id, port name, or output name. Use `Object.create(null)` for all map-like objects so `__proto__` is an ordinary property, not a prototype chain accessor. This resolves the open CodeQL review threads on PR #33. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan
bun run checkGenerated with Devin