{"_id":"@bitmonk8/pi-theta","_rev":"5-c37269656eb6aad8b1554d8dae28a66c","name":"@bitmonk8/pi-theta","dist-tags":{"latest":"0.12.0"},"versions":{"0.2.0":{"name":"@bitmonk8/pi-theta","version":"0.2.0","keywords":["pi-package","pi","pi-coding-agent","pi-extension","extension","theta","scripting-language","dsl","agent","subagent","prompt-engineering"],"author":{"name":"Thomas Andersen","email":"thomas.andersen@gmail.com"},"license":"MIT OR Apache-2.0","_id":"@bitmonk8/pi-theta@0.2.0","maintainers":[{"name":"bitmonk8","email":"thomas.andersen@gmail.com"}],"homepage":"https://github.com/bitmonk8/pi-theta#readme","bugs":{"url":"https://github.com/bitmonk8/pi-theta/issues"},"pi":{"skills":["./skills"],"extensions":["./extensions"]},"dist":{"shasum":"fa8b902d2e9f5df34284454062e2a24ab12ef746","tarball":"https://registry.npmjs.org/@bitmonk8/pi-theta/-/pi-theta-0.2.0.tgz","fileCount":140,"integrity":"sha512-su4APh+02l/bxl7dhRRWo0o19YIKfBSgGrJwno3+xGsX15mYTtjU5kGILhyUG2MqqTZhelNOUB6QFM0+JcYdHA==","signatures":[{"sig":"MEUCIQDCjN45DnbV/3/IREqGvnFIwz2KY//mZYyTeyixYiXIiAIgPxou3RCYP6ZNuAID7BmpRYeCpEugoNCEUP1J0ggJFa0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1983684},"type":"module","engines":{"node":">=22.19.0"},"gitHead":"63dd06b0fdb3fba015ba4f10b72a279ba0e9e46f","scripts":{"lint":"eslint --no-error-on-unmatched-pattern \"src/**/*.ts\"","test":"vitest run","build":"tsc -p tsconfig.json","test:live":"vitest run --config config/vitest/vitest.live.config.ts","typecheck":"tsc -p tsconfig.json --noEmit","test:acceptance":"vitest run --config config/vitest/vitest.acceptance.config.ts","test:conformance":"vitest run --config config/vitest/vitest.conformance.config.ts"},"_npmUser":{"name":"bitmonk8","email":"thomas.andersen@gmail.com"},"repository":{"url":"git+ssh://git@github.com/bitmonk8/pi-theta.git","type":"git"},"_npmVersion":"11.13.0","description":"A scripting language for Pi agents: write the predictable parts of an agent task as code and leave only the fuzzy parts to the model.","directories":{},"_nodeVersion":"24.16.0","dependencies":{"ajv":"^8.17.1","yaml":"^2.9.0","semver":"^7.6.0","chokidar":"^4.0.1","minimatch":"^10.0.1","ajv-formats":"^3.0.1"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.0.0","vitest":"^2.1.8","typescript":"^5.4.0","@types/node":"^22.0.0","@types/semver":"^7.5.0","@earendil-works/pi-ai":"~0.75.5","@earendil-works/pi-tui":"~0.75.5","@typescript-eslint/parser":"^8.0.0","eslint-plugin-theta-local":"file:./tools/eslint-plugin-theta-local","@earendil-works/pi-agent-core":"~0.75.5","@earendil-works/pi-coding-agent":"~0.75.5"},"peerDependencies":{"typebox":"*","@earendil-works/pi-ai":"~0.75.5","@earendil-works/pi-tui":"~0.75.5","@earendil-works/pi-agent-core":"~0.75.5","@earendil-works/pi-coding-agent":"~0.75.5"},"_npmOperationalInternal":{"tmp":"tmp/pi-theta_0.2.0_1784483803910_0.17494156514160908","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@bitmonk8/pi-theta","version":"0.3.0","keywords":["pi-package","pi","pi-coding-agent","pi-extension","extension","theta","scripting-language","dsl","agent","subagent","prompt-engineering"],"author":{"name":"Thomas Andersen","email":"thomas.andersen@gmail.com"},"license":"MIT OR Apache-2.0","_id":"@bitmonk8/pi-theta@0.3.0","maintainers":[{"name":"bitmonk8","email":"thomas.andersen@gmail.com"}],"homepage":"https://github.com/bitmonk8/pi-theta#readme","bugs":{"url":"https://github.com/bitmonk8/pi-theta/issues"},"pi":{"skills":["./skills"],"extensions":["./extensions"]},"dist":{"shasum":"5e33becdb2a0354ff4b2db7bfd6d4e000427f2c8","tarball":"https://registry.npmjs.org/@bitmonk8/pi-theta/-/pi-theta-0.3.0.tgz","fileCount":140,"integrity":"sha512-s+GnQPmv6hgP4ttEw2p0Qlmn9hJPQuIBmmQUP30qW3l3kinCBCn12R5dgK6OxUAzHXXAlmkkIoRkPWkw8637VA==","signatures":[{"sig":"MEQCIDFlgdOL3KERGtrDyQOSsyA/Yx7M/Htjar68+peh0K9eAiApKJfw1PAMUhLiNABDx5/1Yw5blk7eaKxJhtwMDQZohA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1985146},"type":"module","engines":{"node":">=22.19.0"},"gitHead":"d57ce767354efe88aa0d79e79b34b0b9a36b6863","scripts":{"lint":"eslint --no-error-on-unmatched-pattern \"src/**/*.ts\"","test":"vitest run","build":"tsc -p tsconfig.json","test:live":"vitest run --config config/vitest/vitest.live.config.ts","typecheck":"tsc -p tsconfig.json --noEmit","test:acceptance":"vitest run --config config/vitest/vitest.acceptance.config.ts","test:conformance":"vitest run --config config/vitest/vitest.conformance.config.ts"},"_npmUser":{"name":"bitmonk8","email":"thomas.andersen@gmail.com"},"repository":{"url":"git+ssh://git@github.com/bitmonk8/pi-theta.git","type":"git"},"_npmVersion":"11.13.0","description":"A scripting language for Pi agents: write the predictable parts of an agent task as code and leave only the fuzzy parts to the model.","directories":{},"_nodeVersion":"24.16.0","dependencies":{"ajv":"^8.17.1","yaml":"^2.9.0","semver":"^7.6.0","chokidar":"^4.0.1","minimatch":"^10.0.1","ajv-formats":"^3.0.1"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.0.0","vitest":"^2.1.8","typescript":"^5.4.0","@types/node":"^22.0.0","@types/semver":"^7.5.0","@earendil-works/pi-ai":"~0.80.10","@earendil-works/pi-tui":"~0.80.10","@typescript-eslint/parser":"^8.0.0","eslint-plugin-theta-local":"file:./tools/eslint-plugin-theta-local","@earendil-works/pi-agent-core":"~0.80.10","@earendil-works/pi-coding-agent":"~0.80.10"},"peerDependencies":{"typebox":"*","@earendil-works/pi-ai":">=0.80.8","@earendil-works/pi-tui":">=0.80.8","@earendil-works/pi-agent-core":">=0.80.8","@earendil-works/pi-coding-agent":">=0.80.8"},"_npmOperationalInternal":{"tmp":"tmp/pi-theta_0.3.0_1784497700906_0.4364199077167459","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@bitmonk8/pi-theta","version":"0.4.0","keywords":["pi-package","pi","pi-coding-agent","pi-extension","extension","theta","scripting-language","dsl","agent","subagent","prompt-engineering","loop-engineering"],"author":{"name":"Thomas Andersen","email":"thomas.andersen@gmail.com"},"license":"MIT OR Apache-2.0","_id":"@bitmonk8/pi-theta@0.4.0","maintainers":[{"name":"bitmonk8","email":"thomas.andersen@gmail.com"}],"homepage":"https://github.com/bitmonk8/pi-theta#readme","bugs":{"url":"https://github.com/bitmonk8/pi-theta/issues"},"pi":{"skills":["./skills"],"extensions":["./extensions"]},"dist":{"shasum":"c9793f7653bdd71751554b1c17824be087718f17","tarball":"https://registry.npmjs.org/@bitmonk8/pi-theta/-/pi-theta-0.4.0.tgz","fileCount":140,"integrity":"sha512-vkRlWptE3cFdunZUoTGzzAuAWcTAMePw6BOu8VpLkAaZxGE+6wzAMvNlIUJpXUPwUmgmT+uLG6RTGYAof7SvmQ==","signatures":[{"sig":"MEQCIHXlz0NX5j4/myonU4ezxd8lTVkDZrc7GVxlmvbqHt1NAiAuFFShhXPyQQoXSWfcrK5H4iqvwLNCdeYX2oxNwXtJtA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1985190},"type":"module","engines":{"node":">=22.19.0"},"gitHead":"09d39432276da6e4bcdbaf95fd3cec1c9b69d464","private":false,"scripts":{"lint":"eslint --no-error-on-unmatched-pattern \"src/**/*.ts\"","test":"vitest run","build":"tsc -p tsconfig.json","test:live":"vitest run --config config/vitest/vitest.live.config.ts","typecheck":"tsc -p tsconfig.json --noEmit","test:acceptance":"vitest run --config config/vitest/vitest.acceptance.config.ts","test:conformance":"vitest run --config config/vitest/vitest.conformance.config.ts"},"_npmUser":{"name":"bitmonk8","email":"thomas.andersen@gmail.com"},"repository":{"url":"git+ssh://git@github.com/bitmonk8/pi-theta.git","type":"git"},"_npmVersion":"11.13.0","description":"A scripting language for Pi agents: write the predictable parts of an agent task as code and leave only the fuzzy parts to the model.","directories":{},"_nodeVersion":"24.16.0","dependencies":{"ajv":"^8.17.1","yaml":"^2.9.0","semver":"^7.6.0","chokidar":"^4.0.1","minimatch":"^10.0.1","ajv-formats":"^3.0.1"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.0.0","vitest":"^2.1.8","typescript":"^5.4.0","@types/node":"^22.0.0","@types/semver":"^7.5.0","@earendil-works/pi-ai":"~0.80.10","@earendil-works/pi-tui":"~0.80.10","@typescript-eslint/parser":"^8.0.0","eslint-plugin-theta-local":"file:./tools/eslint-plugin-theta-local","@earendil-works/pi-agent-core":"~0.80.10","@earendil-works/pi-coding-agent":"~0.80.10"},"peerDependencies":{"typebox":"*","@earendil-works/pi-ai":">=0.80.8","@earendil-works/pi-tui":">=0.80.8","@earendil-works/pi-agent-core":">=0.80.8","@earendil-works/pi-coding-agent":">=0.80.8"},"_npmOperationalInternal":{"tmp":"tmp/pi-theta_0.4.0_1784535135935_0.02731217359413929","host":"s3://npm-registry-packages-npm-production"}},"0.7.1":{"name":"@bitmonk8/pi-theta","version":"0.7.1","keywords":["pi-package","pi","pi-coding-agent","pi-extension","extension","theta","scripting-language","dsl","agent","subagent","prompt-engineering","loop-engineering"],"author":{"name":"Thomas Andersen","email":"thomas.andersen@gmail.com"},"license":"MIT OR Apache-2.0","_id":"@bitmonk8/pi-theta@0.7.1","maintainers":[{"name":"bitmonk8","email":"thomas.andersen@gmail.com"}],"homepage":"https://github.com/bitmonk8/pi-theta#readme","bugs":{"url":"https://github.com/bitmonk8/pi-theta/issues"},"pi":{"skills":["./skills"],"extensions":["./extensions"]},"dist":{"shasum":"a91921b31b9517eb682523bf3bb53be8cb8ac118","tarball":"https://registry.npmjs.org/@bitmonk8/pi-theta/-/pi-theta-0.7.1.tgz","fileCount":141,"integrity":"sha512-S/NiZ1jFafTpz2ogB1K14SqdUwc7hSx0dMns2NVCjT31a6NfZVfDPWdjyYy7gUQJray1/ZK5Xz5i3OPNFtQEFw==","signatures":[{"sig":"MEUCIFpRsG6kM3/Sage4mav3rAnDLXg+yKOpOEEtHkiK0kn4AiEAtyfW3yujdwoScV/cRtoFi7e+HtjQstvsTyMmU769jcU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":2092550},"type":"module","engines":{"node":">=22.19.0"},"gitHead":"7e8f742aa0dfdde0be1a96cdc4269ee57e8f4a5f","private":false,"scripts":{"lint":"eslint --no-error-on-unmatched-pattern \"src/**/*.ts\"","test":"vitest run","build":"tsc -p tsconfig.json","test:live":"vitest run --config config/vitest/vitest.live.config.ts","typecheck":"tsc -p tsconfig.json --noEmit","test:acceptance":"vitest run --config config/vitest/vitest.acceptance.config.ts","test:conformance":"vitest run --config config/vitest/vitest.conformance.config.ts"},"_npmUser":{"name":"bitmonk8","email":"thomas.andersen@gmail.com"},"repository":{"url":"git+ssh://git@github.com/bitmonk8/pi-theta.git","type":"git"},"_npmVersion":"11.13.0","description":"A scripting language for Pi agents: write the predictable parts of an agent task as code and leave only the fuzzy parts to the model.","directories":{},"_nodeVersion":"24.16.0","dependencies":{"ajv":"^8.17.1","yaml":"^2.9.0","semver":"^7.6.0","chokidar":"^4.0.1","minimatch":"^10.0.1","ajv-formats":"^3.0.1"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.0.0","vitest":"^2.1.8","typescript":"^5.4.0","@types/node":"^22.0.0","@types/semver":"^7.5.0","@earendil-works/pi-ai":"~0.80.10","@earendil-works/pi-tui":"~0.80.10","@typescript-eslint/parser":"^8.0.0","eslint-plugin-theta-local":"file:./tools/eslint-plugin-theta-local","@earendil-works/pi-agent-core":"~0.80.10","@earendil-works/pi-coding-agent":"~0.80.10"},"peerDependencies":{"typebox":"*","@earendil-works/pi-ai":">=0.80.8","@earendil-works/pi-tui":">=0.80.8","@earendil-works/pi-agent-core":">=0.80.8","@earendil-works/pi-coding-agent":">=0.80.8"},"_npmOperationalInternal":{"tmp":"tmp/pi-theta_0.7.1_1784658510024_0.060590181055056425","host":"s3://npm-registry-packages-npm-production"}},"0.12.0":{"name":"@bitmonk8/pi-theta","version":"0.12.0","private":false,"description":"A scripting language for Pi agents: write the predictable parts of an agent task as code and leave only the fuzzy parts to the model.","keywords":["pi-package","pi","pi-coding-agent","pi-extension","extension","theta","scripting-language","dsl","agent","subagent","prompt-engineering","loop-engineering"],"author":{"name":"Thomas Andersen","email":"thomas.andersen@gmail.com"},"license":"MIT OR Apache-2.0","repository":{"type":"git","url":"git+ssh://git@github.com/bitmonk8/pi-theta.git"},"type":"module","pi":{"extensions":["./extensions"],"skills":["./skills"]},"engines":{"node":">=22.19.0"},"scripts":{"build":"tsc -p tsconfig.json","typecheck":"tsc -p tsconfig.json --noEmit","lint":"eslint --no-error-on-unmatched-pattern \"src/**/*.ts\"","test":"vitest run","test:live":"vitest run --config config/vitest/vitest.live.config.ts","test:acceptance":"vitest run --config config/vitest/vitest.acceptance.config.ts","test:conformance":"vitest run --config config/vitest/vitest.conformance.config.ts"},"dependencies":{"ajv":"^8.17.1","ajv-formats":"^3.0.1","chokidar":"^4.0.1","minimatch":"^10.0.1","semver":"^7.6.0","yaml":"^2.9.0"},"devDependencies":{"@earendil-works/pi-coding-agent":"~0.80.10","@earendil-works/pi-agent-core":"~0.80.10","@earendil-works/pi-ai":"~0.80.10","@earendil-works/pi-tui":"~0.80.10","@types/node":"^22.0.0","@types/semver":"^7.5.0","@typescript-eslint/parser":"^8.0.0","eslint":"^9.0.0","eslint-plugin-theta-local":"file:./tools/eslint-plugin-theta-local","typescript":"^5.4.0","vitest":"^2.1.8"},"peerDependencies":{"@earendil-works/pi-coding-agent":">=0.80.8","@earendil-works/pi-agent-core":">=0.80.8","@earendil-works/pi-ai":">=0.80.8","@earendil-works/pi-tui":">=0.80.8","typebox":"*"},"gitHead":"21937ef5b49758860a7a731a7bc5cdcf719e7f8e","_id":"@bitmonk8/pi-theta@0.12.0","bugs":{"url":"https://github.com/bitmonk8/pi-theta/issues"},"homepage":"https://github.com/bitmonk8/pi-theta#readme","_nodeVersion":"24.16.0","_npmVersion":"11.13.0","dist":{"integrity":"sha512-CQ3AEQa6+2gV7l68v4nKVIgTgkpvMG8l2j5JDCyMtUuWt6jdgNnEM2yo1EQbU77YpDkTq3vDoMNprt5hbWNspg==","shasum":"5085098d8e8634a8eee8377b814af4b73d803024","tarball":"https://registry.npmjs.org/@bitmonk8/pi-theta/-/pi-theta-0.12.0.tgz","fileCount":153,"unpackedSize":2252801,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDX5KgUs8u1GOXfWr7GX0P0fa6eiQdQhxSvhxnNwpO4VgIgWZVU5eyaRQ7VAlM7MAqlIRyZKVLw8Vc7HPG6cU7pxgU="}]},"_npmUser":{"name":"bitmonk8","email":"thomas.andersen@gmail.com"},"directories":{},"maintainers":[{"name":"bitmonk8","email":"thomas.andersen@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pi-theta_0.12.0_1785057210020_0.5494474518148114"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-19T17:56:43.766Z","modified":"2026-07-26T09:13:30.341Z","0.2.0":"2026-07-19T17:56:44.094Z","0.3.0":"2026-07-19T21:48:21.099Z","0.4.0":"2026-07-20T08:12:16.059Z","0.7.1":"2026-07-21T18:28:30.227Z","0.12.0":"2026-07-26T09:13:30.207Z"},"bugs":{"url":"https://github.com/bitmonk8/pi-theta/issues"},"author":{"name":"Thomas Andersen","email":"thomas.andersen@gmail.com"},"license":"MIT OR Apache-2.0","homepage":"https://github.com/bitmonk8/pi-theta#readme","keywords":["pi-package","pi","pi-coding-agent","pi-extension","extension","theta","scripting-language","dsl","agent","subagent","prompt-engineering","loop-engineering"],"repository":{"type":"git","url":"git+ssh://git@github.com/bitmonk8/pi-theta.git"},"description":"A scripting language for Pi agents: write the predictable parts of an agent task as code and leave only the fuzzy parts to the model.","maintainers":[{"name":"bitmonk8","email":"thomas.andersen@gmail.com"}],"readme":"<p align=\"center\">\n  <picture>\n    <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/bitmonk8/pi-theta/main/ThetaBlackLogo.jpg\">\n    <img alt=\"Theta\" src=\"https://raw.githubusercontent.com/bitmonk8/pi-theta/main/ThetaWhiteLogo.jpg\" width=\"220\">\n  </picture>\n</p>\n\n# pi-theta\n\n`pi-theta` is a [Pi Coding Agent](https://github.com/earendil-works/pi-mono)\nextension that adds **Theta**, a scripting language for Pi agents. Write the\npredictable parts of an agent task as code and leave only the genuinely fuzzy\nparts to the model — no custom extension required.\n\nA `.theta` file mixes ordinary code — variables, loops, conditionals, functions —\nwith the text you send to the model. Running a theta adds turns to a conversation:\neither the caller's current one (*prompt mode*) or a fresh, isolated one\n(*subagent mode*). When it succeeds it can also return a\n[*final value*](./docs/reference/errors-and-results.md#final-value-fn-5) — the\ntheta's last expression, or the value you `return` — which callers can use and pass\nback across the subagent boundary. Thetas can't write files, use the network, or\nspawn processes on their own; those effects happen only through the Pi tools a\ntheta is allowed to call (its\n[callable set](./docs/reference/frontmatter.md#tools-callable-set)).\n`.thetalib` files are library modules that share Theta's grammar and types and are\nimported by `.theta` files; they are never run directly.\n\n## The problem\n\nPi's built-in `prompt` and `subagent` features are just Markdown with some\nfill-in-the-blanks — static text with YAML frontmatter. They can't branch, loop,\nread a model's response, carry a conversation across several turns, or hand a\ntyped value back to the caller. Theta does all of that: your code decides what text\ngoes to the model, the model's replies come back as values, and every run ends in\none of three ways — success, failure, or cancellation — defined in\n[Errors and Results](./docs/reference/errors-and-results.md#terminal-outcomes-closed-set).\n\n## Example: an agent loop\n\nThe pattern people call an *agent loop* (or a *Ralph loop*) is: run the model,\ncheck the result, then stop or go again. The usual version is a shell loop that\nre-runs the model and hopes it eventually declares itself done. In Theta the loop\nis real code, so your code owns the stop condition and the model just does the\nwork inside each round.\n\nThe worker [`docs/examples/ralph-step.theta`](./docs/examples/ralph-step.theta) does\none round of work on a fresh context and hands back a typed result. State lives on\ndisk — the files it edits, the commits it makes — not in the conversation:\n\n```theta\n---\ndescription: Do the next task toward the objective on a fresh context, then report status\nmode: subagent\nparams:\n  objective: string\ntools:\n  - read\n  - bash\n---\nschema Progress {\n  done: boolean,\n  summary: string\n}\n\nlet status: Progress = @`Objective: ${objective}\n\nInspect the current state of the project, do the single most important unfinished\ntask toward the objective, run the test suite with bash, commit the result, and\nreport whether the objective is now fully met.`?\nstatus\n```\n\nThe loop [`docs/examples/ralph.theta`](./docs/examples/ralph.theta) takes an\nobjective, passes it to the worker, and re-runs the worker on a fresh context\nuntil it reports `done` — or hits the round ceiling:\n\n```theta\n---\ndescription: Re-run the worker on a fresh context until the objective is met (a Ralph loop)\nmode: subagent\nparams:\n  objective: string\ntools:\n  - ./ralph-step.theta\n---\nlet mut round = 0\nwhile round < 20 {\n  round += 1\n  let status = ralph_step(objective)?\n  if status.done {\n    return status.summary\n  }\n}\n\"stopped at the 20-round ceiling\"\n```\n\nPut both files on the discovery path with `--theta`, and `ralph.theta` is available\nas the `/ralph` slash command — the argument becomes its `objective`:\n\n```\npi --theta docs/examples -p \"/ralph get the integration tests passing\"\n```\n\nOr, from inside a running `pi` session (once the directory is on your theta\ndiscovery path), just type the slash command:\n\n```\n/ralph get the integration tests passing\n```\n\nThe `while` bound, the `done` check, and the round ceiling are ordinary code —\nnot a magic \"done\" string grepped out of the model's prose. The two files can also\nbe collapsed into one: a `subagent fn` (theta 1.2) is a `fn` whose body runs in a\nfresh isolated session per call, so the worker becomes an in-file function and the\nloop calls it by name — see\n[`docs/examples/ralph-inline.theta`](./docs/examples/ralph-inline.theta) and\n[How to write an agent loop](./docs/how-to/write-an-agent-loop.md), which also has\na second, self-contained example you can run without any external tools.\n\n## Status\n\nTheta is at **0.12.x**. The whole documented language works and is tested\nend-to-end, but this is an early release and may still contain bugs. As of\n0.9.0, a subagent-mode invocation runs the whole callee theta — interpreter\nincluded — in a spawned child `pi` process (params and the typed return value\ncross the process boundary structurally); as of 0.12.0 that child is spawned\nwith stdin already closed, fixing a startup deadlock that hung every real\nsubagent invocation under `pi -p` (bug 0002). As of 0.11.0 a theta's `tools:` list\ncan name extension-registered Pi tools in **both** modes, not only in a\nsubagent, and an admitted extension tool is reachable both by the theta's\nmodel and from theta **code** — a code-side call is dispatched\ndeterministically through a host agent loop (the child's own in subagent mode,\nsince 0.10.0; your live session's in prompt mode, since 0.11.0), zero model\ntokens. In prompt mode the code-side dispatch visibly appends tool-call cards\nto your own transcript — an accepted, documented cost — see the\n[CHANGELOG](./CHANGELOG.md) and\n[Guide — Extension tools](./docs/guide.md#extension-tools).\n\nReport issues against the behaviour the [Reference](./docs/reference/) defines.\n\n## Documentation\n\n- **[Guide](./docs/guide.md)** — how Theta works: mixing code with the text you\n  send to the model, prompt vs. subagent mode, `.theta` vs. `.thetalib`, and the final\n  value.\n- **[Tutorial](./docs/tutorial.md)** — build your first theta, from an empty file\n  to a working one.\n- **[How-to guides](./docs/how-to/)** — short recipes for specific tasks, including\n  [writing an agent loop](./docs/how-to/write-an-agent-loop.md) and\n  [fanning out in parallel](./docs/how-to/fan-out-in-parallel.md).\n- **[Reference](./docs/reference/)** — the full details: grammar, type system,\n  frontmatter fields, errors and results, limits, diagnostics, and the CLI.\n</content>\n</invoke>\n","readmeFilename":"README.md"}