{"_id":"@ageflow/core","_rev":"18-3890557f18804be8010491521ac8e2c9","name":"@ageflow/core","dist-tags":{"latest":"0.6.6"},"versions":{"0.1.0":{"name":"@ageflow/core","version":"0.1.0","_id":"@ageflow/core@0.1.0","maintainers":[{"name":"neftedollar","email":"oildollar@gmail.com"}],"dist":{"shasum":"da2ad7a35a4eef3a7fad5c9f0451bbf950819469","tarball":"https://registry.npmjs.org/@ageflow/core/-/core-0.1.0.tgz","fileCount":22,"integrity":"sha512-VAOFnlODo54GtmlUi6KO2N5zzNQut3miHg5U7e8BTXJhkK2WTWxV82lPI/z9JkuOhhCHW94XZE8PwTT2oBcbIg==","signatures":[{"sig":"MEUCIQDLwrwc8wX0u/PtPREFXbDNzQ7uWhD1X/TLayYSQvACegIgZut4YONPa2e3gU/Dzl5l8CKxJC76RazzRIPrPTDXWYg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":107189},"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"eae9a8649a06fea53d806b347241c2855d71a6ba","private":false,"scripts":{"lint":"biome check src/","test":"vitest run","build":"tsc","typecheck":"tsc --noEmit && tsc --noEmit -p tsconfig.test.json"},"_npmUser":{"name":"neftedollar","email":"oildollar@gmail.com"},"_npmVersion":"11.11.0","directories":{},"sideEffects":false,"_nodeVersion":"25.8.1","_hasShrinkwrap":false,"devDependencies":{"zod":"^3.23.0","vitest":"^2.1.0","@types/node":"^22.0.0"},"peerDependencies":{"zod":">=3.23.0 <4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.1.0_1776288847368_0.8619827227295482","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@ageflow/core","version":"0.2.0","keywords":["ai","agents","workflow","llm","dsl","typescript","claude","openai","multi-agent"],"license":"MIT","_id":"@ageflow/core@0.2.0","maintainers":[{"name":"neftedollar","email":"oildollar@gmail.com"}],"homepage":"https://github.com/Neftedollar/ageflow/tree/master/agentflow/packages/core","bugs":{"url":"https://github.com/Neftedollar/ageflow/issues"},"dist":{"shasum":"b11ce1673034d6f9ded91dbfa233caeb8d98393d","tarball":"https://registry.npmjs.org/@ageflow/core/-/core-0.2.0.tgz","fileCount":27,"integrity":"sha512-6UX+hsyykKaRFtlg9TRIpsqRhK/x/lWdCR2XDiNN/XYP6dQSad+xFCuAYJCkgZtOMrNmhlWAXFmMXiTrvv6S7A==","signatures":[{"sig":"MEYCIQCtFeogO74fWMDYF4oDtT26IAw6L3TlnUIw4LCQ5zjH1QIhAPXRfT5MTnl5Iph+J3HsKwAJrUl9K6lWPDmgjlQLZ+SR","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":129862},"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"c9ec02fd33cba8108a1255623ba329097acfe908","private":false,"scripts":{"lint":"biome check src/","test":"vitest run","build":"tsc","typecheck":"tsc --noEmit && tsc --noEmit -p tsconfig.test.json"},"_npmUser":{"name":"neftedollar","email":"oildollar@gmail.com"},"repository":{"url":"git+https://github.com/Neftedollar/ageflow.git","type":"git"},"_npmVersion":"11.11.0","description":"Type-safe DSL for multi-agent AI workflows — defineAgent, defineWorkflow, loop, sessionToken","directories":{},"sideEffects":false,"_nodeVersion":"25.8.1","_hasShrinkwrap":false,"devDependencies":{"zod":"^3.23.0","vitest":"^2.1.0","@types/node":"^22.0.0"},"peerDependencies":{"zod":">=3.23.0 <4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.2.0_1776330778885_0.7105593088667623","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@ageflow/core","version":"0.3.0","keywords":["ai","agents","workflow","llm","dsl","typescript","claude","openai","multi-agent"],"license":"MIT","_id":"@ageflow/core@0.3.0","maintainers":[{"name":"neftedollar","email":"oildollar@gmail.com"}],"homepage":"https://github.com/Neftedollar/ageflow/tree/master/packages/core","bugs":{"url":"https://github.com/Neftedollar/ageflow/issues"},"dist":{"shasum":"defbc0182fe71ff8a17c3d3e0cea1a1ea7d4b6a9","tarball":"https://registry.npmjs.org/@ageflow/core/-/core-0.3.0.tgz","fileCount":31,"integrity":"sha512-nKAonZsjE0XQOGJVHSrE5aXrERxnFodhts0jlBoDHccq5Hlp49v2fF+kHUi7bKHM8mPPoHbR6WfRgZjG85M2cA==","signatures":[{"sig":"MEUCIDE3AxP9L3U1QZ21GYk2a7u7pwSQVjckRN+mQTxqFLFjAiEA4ZOLvZNrpKQgQHQd8ffhcuZGg8niv7Z7h56O/E2Ks/o=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":155993},"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"f055450765c4b4f8e6a06d3bcedb2e337395adb8","private":false,"scripts":{"lint":"biome check src/","test":"vitest run","build":"tsc","typecheck":"tsc --noEmit && tsc --noEmit -p tsconfig.test.json"},"_npmUser":{"name":"neftedollar","email":"oildollar@gmail.com"},"repository":{"url":"git+https://github.com/Neftedollar/ageflow.git","type":"git"},"_npmVersion":"11.11.0","description":"Type-safe DSL for multi-agent AI workflows — defineAgent, defineWorkflow, loop, sessionToken","directories":{},"sideEffects":false,"_nodeVersion":"25.8.1","_hasShrinkwrap":false,"devDependencies":{"zod":"^3.23.0","vitest":"^2.1.0","@types/node":"^22.0.0"},"peerDependencies":{"zod":">=3.23.0 <4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.3.0_1776377980339_0.5522035839599062","host":"s3://npm-registry-packages-npm-production"}},"0.3.2":{"name":"@ageflow/core","version":"0.3.2","keywords":["ai","agents","workflow","llm","dsl","typescript","claude","openai","multi-agent"],"license":"MIT","_id":"@ageflow/core@0.3.2","maintainers":[{"name":"neftedollar","email":"oildollar@gmail.com"}],"homepage":"https://github.com/Neftedollar/ageflow/tree/master/packages/core","bugs":{"url":"https://github.com/Neftedollar/ageflow/issues"},"dist":{"shasum":"d711885931b5a7dba4a7696db51d67c4d7116d61","tarball":"https://registry.npmjs.org/@ageflow/core/-/core-0.3.2.tgz","fileCount":39,"integrity":"sha512-Uk5HlnB2FCL9c9+z3+RdkROaogzPcmHiH01L6P7iVAZ2AEWz9wgOa0GLGVPa14IppNhjji+aTAnwW/KisnRZuA==","signatures":[{"sig":"MEQCIFS7TwRXHObm3al9ElfWZfrjHLLJjv6XBcG68zn3uIrqAiB3gpPrEbFxDMhCzUnuHr+2poLEVYOl8ZaOgSMzawSb7g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":196085},"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"67e25292e8f64b4c7643f1ac12164e771122c632","private":false,"scripts":{"lint":"biome check src/","test":"vitest run","build":"tsc","typecheck":"tsc --noEmit && tsc --noEmit -p tsconfig.test.json"},"_npmUser":{"name":"neftedollar","email":"oildollar@gmail.com"},"repository":{"url":"git+https://github.com/Neftedollar/ageflow.git","type":"git"},"_npmVersion":"11.11.0","description":"Type-safe DSL for multi-agent AI workflows — defineAgent, defineWorkflow, loop, sessionToken","directories":{},"sideEffects":false,"_nodeVersion":"25.8.1","_hasShrinkwrap":false,"devDependencies":{"zod":"^3.23.0","vitest":"^2.1.0","@types/node":"^22.0.0"},"peerDependencies":{"zod":">=3.23.0 <4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.3.2_1776395142809_0.8982528735422861","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@ageflow/core","version":"0.4.0","keywords":["ai","agents","workflow","llm","dsl","typescript","claude","openai","multi-agent"],"license":"MIT","_id":"@ageflow/core@0.4.0","maintainers":[{"name":"neftedollar","email":"oildollar@gmail.com"}],"homepage":"https://github.com/Neftedollar/ageflow/tree/master/packages/core","bugs":{"url":"https://github.com/Neftedollar/ageflow/issues"},"dist":{"shasum":"5a8b809746fd826ae2a905c8d30033dd60f2889f","tarball":"https://registry.npmjs.org/@ageflow/core/-/core-0.4.0.tgz","fileCount":39,"integrity":"sha512-tNa6ph5bg/qhiBqPbY3keMXz/IzjhronY6T2g47Bv+gdRuG0RAJuSN3AHLklwMJ1gqmquj8LE+Sa+JOJTH7mkQ==","signatures":[{"sig":"MEUCIQCgSbhkN48QriUsD8xu++QYIk600a0Bo4bYMJ3PqnJokgIgO3SocoHRoJu8EsluxPNv4R374W5l0+XNNf5mSDB+Osk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":197251},"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"851b81650cf44de771efd77ed12f8f85b089218a","private":false,"scripts":{"lint":"biome check src/","test":"vitest run","build":"tsc","typecheck":"tsc --noEmit && tsc --noEmit -p tsconfig.test.json"},"_npmUser":{"name":"neftedollar","email":"oildollar@gmail.com"},"repository":{"url":"git+https://github.com/Neftedollar/ageflow.git","type":"git"},"_npmVersion":"11.11.0","description":"Type-safe DSL for multi-agent AI workflows — defineAgent, defineWorkflow, loop, sessionToken","directories":{},"sideEffects":false,"_nodeVersion":"25.8.1","_hasShrinkwrap":false,"devDependencies":{"zod":"^3.23.0","vitest":"^2.1.0","@types/node":"^22.0.0"},"peerDependencies":{"zod":">=3.23.0 <4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.4.0_1776396706850_0.5644755407785733","host":"s3://npm-registry-packages-npm-production"}},"0.4.1":{"name":"@ageflow/core","version":"0.4.1","keywords":["ai","agents","workflow","llm","dsl","typescript","claude","openai","multi-agent"],"license":"MIT","_id":"@ageflow/core@0.4.1","maintainers":[{"name":"neftedollar","email":"oildollar@gmail.com"}],"homepage":"https://github.com/Neftedollar/ageflow/tree/master/packages/core","bugs":{"url":"https://github.com/Neftedollar/ageflow/issues"},"dist":{"shasum":"8763790cf20f077884a5f7f8713a1e5b96f4c0b8","tarball":"https://registry.npmjs.org/@ageflow/core/-/core-0.4.1.tgz","fileCount":39,"integrity":"sha512-m0VDvcLoKscT4G1PPIHqa9doz0bLmmcdgaz0u3nW0otSx7+bfTB+zvA51Ol6pm4hzT1ieVcOakB+4DrZ5XfloA==","signatures":[{"sig":"MEUCIFFPyE3KO/BZ9F2oxcVf+m+2dY+dsmV4nd0MBe4/XI+EAiEA7svz0f2A9hQWj80OnrcjmASMzolFrPlD/tPJqhh7VUY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":197901},"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"01da9620fd0735083a98df61604d9d6e8df0d488","private":false,"scripts":{"lint":"biome check src/","test":"vitest run","build":"tsc","typecheck":"tsc --noEmit && tsc --noEmit -p tsconfig.test.json"},"_npmUser":{"name":"neftedollar","email":"oildollar@gmail.com"},"repository":{"url":"git+https://github.com/Neftedollar/ageflow.git","type":"git"},"_npmVersion":"11.11.0","description":"Type-safe DSL for multi-agent AI workflows — defineAgent, defineWorkflow, loop, sessionToken","directories":{},"sideEffects":false,"_nodeVersion":"25.8.1","_hasShrinkwrap":false,"devDependencies":{"zod":"^3.23.0","vitest":"^2.1.0","@types/node":"^22.0.0"},"peerDependencies":{"zod":">=3.23.0 <4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.4.1_1776397912207_0.4175353277171441","host":"s3://npm-registry-packages-npm-production"}},"0.4.2":{"name":"@ageflow/core","version":"0.4.2","keywords":["ai","agents","workflow","llm","dsl","typescript","claude","openai","multi-agent"],"license":"MIT","_id":"@ageflow/core@0.4.2","maintainers":[{"name":"neftedollar","email":"oildollar@gmail.com"}],"homepage":"https://github.com/Neftedollar/ageflow/tree/master/packages/core","bugs":{"url":"https://github.com/Neftedollar/ageflow/issues"},"dist":{"shasum":"339d663f90ff09140514d1965665238512bbd868","tarball":"https://registry.npmjs.org/@ageflow/core/-/core-0.4.2.tgz","fileCount":47,"integrity":"sha512-x7HpCyEe1s8cDEmnPPKslOeRMJ5nfVV0+BCBORNo8WPrYp5yBcPCgHcyEqcD0tVVJJHFtSzbkvp0k5wIBTWbkQ==","signatures":[{"sig":"MEUCIFDPEUvmbkgpgUqSiXjtt/W+ZoJblEqXA32Tg6Ue+dq8AiEA/6O7XnwVslBi9/c852R1XMmy4/+K3XEQP5cv8TQECmY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":258443},"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"b6cca72c82dbfea565fd3ae2fe77126bfbda245e","private":false,"scripts":{"lint":"biome check src/","test":"vitest run","build":"tsc","typecheck":"tsc --noEmit && tsc --noEmit -p tsconfig.test.json"},"_npmUser":{"name":"neftedollar","email":"oildollar@gmail.com"},"repository":{"url":"git+https://github.com/Neftedollar/ageflow.git","type":"git"},"_npmVersion":"11.11.0","description":"Type-safe DSL for multi-agent AI workflows — defineAgent, defineWorkflow, loop, sessionToken","directories":{},"sideEffects":false,"_nodeVersion":"25.8.1","_hasShrinkwrap":false,"devDependencies":{"zod":"^3.23.0","vitest":"^2.1.0","@types/node":"^22.0.0"},"peerDependencies":{"zod":">=3.23.0 <4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.4.2_1776400850824_0.33215895746946056","host":"s3://npm-registry-packages-npm-production"}},"0.4.3":{"name":"@ageflow/core","version":"0.4.3","keywords":["ai","agents","workflow","llm","dsl","typescript","claude","openai","multi-agent"],"license":"MIT","_id":"@ageflow/core@0.4.3","maintainers":[{"name":"neftedollar","email":"oildollar@gmail.com"}],"homepage":"https://github.com/Neftedollar/ageflow/tree/master/packages/core","bugs":{"url":"https://github.com/Neftedollar/ageflow/issues"},"dist":{"shasum":"2dcd05b8808e114e77a33d5fc217d6ba4adf8943","tarball":"https://registry.npmjs.org/@ageflow/core/-/core-0.4.3.tgz","fileCount":55,"integrity":"sha512-np7z5+Lnr7M8YW2SUqiu/US26T3UqvT1ThC+NF1zaM9RKLNNfCZ65LNKOvAypKvKNoZ6Z02/thNXXTL9Ou3DcQ==","signatures":[{"sig":"MEUCIEEoBCHCBtN6+jqFIp6TfWkZf5ibk4hVnAvo5TjiNdhHAiEAsvTEZhY2OGeQ6BOoKKQLkHtjchcXHbnCfC/9bSAo+Vc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":299516},"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"22ad5cfcec2d0bef38b76781a152ad1c40d44836","private":false,"scripts":{"lint":"biome check src/","test":"vitest run","build":"tsc","typecheck":"tsc --noEmit && tsc --noEmit -p tsconfig.test.json"},"_npmUser":{"name":"neftedollar","email":"oildollar@gmail.com"},"repository":{"url":"git+https://github.com/Neftedollar/ageflow.git","type":"git"},"_npmVersion":"11.11.0","description":"Type-safe DSL for multi-agent AI workflows — defineAgent, defineWorkflow, loop, sessionToken","directories":{},"sideEffects":false,"_nodeVersion":"25.8.1","_hasShrinkwrap":false,"devDependencies":{"zod":"^3.23.0","vitest":"^2.1.0","@types/node":"^22.0.0"},"peerDependencies":{"zod":">=3.23.0 <4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.4.3_1776401945249_0.6410724505362129","host":"s3://npm-registry-packages-npm-production"}},"0.4.4":{"name":"@ageflow/core","version":"0.4.4","keywords":["ai","agents","workflow","llm","dsl","typescript","claude","openai","multi-agent"],"license":"MIT","_id":"@ageflow/core@0.4.4","maintainers":[{"name":"neftedollar","email":"oildollar@gmail.com"}],"homepage":"https://github.com/Neftedollar/ageflow/tree/master/packages/core","bugs":{"url":"https://github.com/Neftedollar/ageflow/issues"},"dist":{"shasum":"9dc051338d091b0bd46ae6a32b89bf547d7df356","tarball":"https://registry.npmjs.org/@ageflow/core/-/core-0.4.4.tgz","fileCount":31,"integrity":"sha512-IlAUSqKIgNtCyy0t3/6+kbBEWz9ze7JXrWwTPWZeAQiMjOlidrZuDQynXwXJmjEMuGUZA0fgnWfTIS64ayqy8A==","signatures":[{"sig":"MEUCIQCnw39467fsm0dlVz9ePkwPuSX+Fy10QP8uVg3JC6zHUgIgfTj6UHJ44JApzGVE1BQHVkkZrJf7MOp+wTXp6w4fTZM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":165055},"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json"},"private":false,"scripts":{"lint":"biome check src/","test":"vitest run","build":"tsc","typecheck":"tsc --noEmit && tsc --noEmit -p tsconfig.test.json"},"_npmUser":{"name":"neftedollar","email":"oildollar@gmail.com"},"repository":{"url":"git+https://github.com/Neftedollar/ageflow.git","type":"git"},"_npmVersion":"11.11.0","description":"Type-safe DSL for multi-agent AI workflows — defineAgent, defineWorkflow, loop, sessionToken","directories":{},"sideEffects":false,"_nodeVersion":"25.8.1","_hasShrinkwrap":false,"devDependencies":{"zod":"^3.23.0","vitest":"^2.1.0","@types/node":"^22.0.0"},"peerDependencies":{"zod":">=3.23.0 <4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.4.4_1776417306643_0.10041082288763681","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@ageflow/core","version":"0.5.0","keywords":["ai","agents","workflow","llm","dsl","typescript","claude","openai","multi-agent"],"license":"MIT","_id":"@ageflow/core@0.5.0","maintainers":[{"name":"neftedollar","email":"oildollar@gmail.com"}],"homepage":"https://github.com/Neftedollar/ageflow/tree/master/packages/core","bugs":{"url":"https://github.com/Neftedollar/ageflow/issues"},"dist":{"shasum":"fec19a442b4e895845d3fcef84b9aa74fd9baf38","tarball":"https://registry.npmjs.org/@ageflow/core/-/core-0.5.0.tgz","fileCount":31,"integrity":"sha512-/MF8oXTchIV0NPjRuPPkzBzHWjz35OuObFuGVUqAOxwtrq5C9Ad62zLM5Ko1U0OUrL+EccJfK41y/pbt4xYjNA==","signatures":[{"sig":"MEUCIE8re9MCqL5j2oLv5G9aeq2DQEIP4Jq/3JvSOHsNZxjZAiEA9OIYOFr7FrtBtjnYHM7UHEO3C9npMPvDv5qNeMDyPto=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":175471},"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json"},"private":false,"scripts":{"lint":"biome check src/","test":"vitest run","build":"tsc","typecheck":"tsc --noEmit && tsc --noEmit -p tsconfig.test.json"},"_npmUser":{"name":"neftedollar","email":"oildollar@gmail.com"},"repository":{"url":"git+https://github.com/Neftedollar/ageflow.git","type":"git"},"_npmVersion":"11.11.0","description":"Type-safe DSL for multi-agent AI workflows — defineAgent, defineWorkflow, loop, sessionToken","directories":{},"sideEffects":false,"_nodeVersion":"25.8.1","_hasShrinkwrap":false,"devDependencies":{"zod":"^3.23.0","vitest":"^2.1.0","@types/node":"^22.0.0"},"peerDependencies":{"zod":">=3.23.0 <4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.5.0_1776422102298_0.7121248641822375","host":"s3://npm-registry-packages-npm-production"}},"0.5.1":{"name":"@ageflow/core","version":"0.5.1","keywords":["ai","agents","workflow","llm","dsl","typescript","claude","openai","multi-agent"],"license":"MIT","_id":"@ageflow/core@0.5.1","maintainers":[{"name":"neftedollar","email":"oildollar@gmail.com"}],"homepage":"https://github.com/Neftedollar/ageflow/tree/master/packages/core","bugs":{"url":"https://github.com/Neftedollar/ageflow/issues"},"dist":{"shasum":"44fa235377f091a0a55c69f635bee0e3aeb5f1ac","tarball":"https://registry.npmjs.org/@ageflow/core/-/core-0.5.1.tgz","fileCount":31,"integrity":"sha512-EFJB5BHOoU21QMsItlzrOOaimbccM6DzY+6DCEjT+G+1zjKRTxS8zU96cK9qnnBbAUr1HpANqtjOwJa3XQIjyA==","signatures":[{"sig":"MEYCIQCrPvQYkyoNn9BtNJh5Cf4gdz5kDHo/LjhhBWoJIvI+GAIhALzgAlN+Tf44D1sTl6LB22lAdpwoOLrYYRD+zYHt1kpU","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":176225},"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json"},"private":false,"scripts":{"lint":"biome check src/","test":"vitest run","build":"tsc","typecheck":"tsc --noEmit && tsc --noEmit -p tsconfig.test.json"},"_npmUser":{"name":"neftedollar","email":"oildollar@gmail.com"},"repository":{"url":"git+https://github.com/Neftedollar/ageflow.git","type":"git"},"_npmVersion":"11.11.0","description":"Type-safe DSL for multi-agent AI workflows — defineAgent, defineWorkflow, loop, sessionToken","directories":{},"sideEffects":false,"_nodeVersion":"25.8.1","_hasShrinkwrap":false,"devDependencies":{"zod":"^3.23.0","vitest":"^2.1.0","@types/node":"^22.0.0"},"peerDependencies":{"zod":">=3.23.0 <4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.5.1_1776430648110_0.43670469878651574","host":"s3://npm-registry-packages-npm-production"}},"0.6.0":{"name":"@ageflow/core","version":"0.6.0","keywords":["ai","agents","workflow","llm","dsl","typescript","claude","openai","multi-agent"],"license":"MIT","_id":"@ageflow/core@0.6.0","maintainers":[{"name":"neftedollar","email":"oildollar@gmail.com"}],"homepage":"https://github.com/Neftedollar/ageflow/tree/master/packages/core","bugs":{"url":"https://github.com/Neftedollar/ageflow/issues"},"dist":{"shasum":"76232fa773e984d70284492814ff5ff207317afd","tarball":"https://registry.npmjs.org/@ageflow/core/-/core-0.6.0.tgz","fileCount":31,"integrity":"sha512-wenn9QnuOXbz8AU3iznyC2ewqA99l9qamX2gdlkVykFJIBiOsjAuA5szzVN5LD2K93tOYOfguUM38i1PCLEk/A==","signatures":[{"sig":"MEUCIBYmVVEW3zCTi1pd378g3j8O6dQl6kgFpySsixLn4rNMAiEAurCZtVhiMPa/9J5ENWSux29+a/7ajc9t7zA7wTOpRlw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":181515},"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json"},"private":false,"scripts":{"lint":"biome check src/","test":"vitest run","build":"tsc","typecheck":"tsc --noEmit && tsc --noEmit -p tsconfig.test.json"},"_npmUser":{"name":"neftedollar","email":"oildollar@gmail.com"},"repository":{"url":"git+https://github.com/Neftedollar/ageflow.git","type":"git"},"_npmVersion":"11.11.0","description":"Type-safe DSL for multi-agent AI workflows — defineAgent, defineWorkflow, loop, sessionToken","directories":{},"sideEffects":false,"_nodeVersion":"25.8.1","_hasShrinkwrap":false,"devDependencies":{"zod":"^3.23.0","vitest":"^2.1.0","@types/node":"^22.0.0"},"peerDependencies":{"zod":">=3.23.0 <4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.6.0_1776434931693_0.6250727586418043","host":"s3://npm-registry-packages-npm-production"}},"0.6.1":{"name":"@ageflow/core","version":"0.6.1","keywords":["ai","agents","workflow","llm","dsl","typescript","claude","openai","multi-agent"],"license":"MIT","_id":"@ageflow/core@0.6.1","maintainers":[{"name":"neftedollar","email":"oildollar@gmail.com"}],"homepage":"https://github.com/Neftedollar/ageflow/tree/master/packages/core","bugs":{"url":"https://github.com/Neftedollar/ageflow/issues"},"dist":{"shasum":"ba338249fed28e05838454ee3090893dff7fe3e7","tarball":"https://registry.npmjs.org/@ageflow/core/-/core-0.6.1.tgz","fileCount":31,"integrity":"sha512-sKSH3woMT2mJqcrUmZQcN/cOPepSjzlW+CeGhr2rmhkll/T2a97pUd3Lg7XreqXYZQtkWpwabreY8AS3BalCzQ==","signatures":[{"sig":"MEQCIH3jiQ2lrUHijKIUlkY6V49IbBjxwyz4qmFENNSQAlWAAiB1k29pNTpnEmNIJFDutjs/QRTcSRSifNi2UTM8kkioYQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":182108},"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json"},"private":false,"scripts":{"lint":"biome check src/","test":"vitest run","build":"tsc","typecheck":"tsc --noEmit && tsc --noEmit -p tsconfig.test.json"},"_npmUser":{"name":"neftedollar","email":"oildollar@gmail.com"},"repository":{"url":"git+https://github.com/Neftedollar/ageflow.git","type":"git"},"_npmVersion":"11.11.0","description":"Type-safe DSL for multi-agent AI workflows — defineAgent, defineWorkflow, loop, sessionToken","directories":{},"sideEffects":false,"_nodeVersion":"25.8.1","_hasShrinkwrap":false,"devDependencies":{"zod":"^3.23.0","vitest":"^2.1.0","@types/node":"^22.0.0"},"peerDependencies":{"zod":">=3.23.0 <4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.6.1_1776453728105_0.4858318415765466","host":"s3://npm-registry-packages-npm-production"}},"0.6.2":{"name":"@ageflow/core","version":"0.6.2","keywords":["ai","agents","workflow","llm","dsl","typescript","claude","openai","multi-agent"],"license":"MIT","_id":"@ageflow/core@0.6.2","maintainers":[{"name":"neftedollar","email":"oildollar@gmail.com"}],"homepage":"https://github.com/Neftedollar/ageflow/tree/master/packages/core","bugs":{"url":"https://github.com/Neftedollar/ageflow/issues"},"dist":{"shasum":"f7fdacc3aa26b982919f40c439818fab4314559e","tarball":"https://registry.npmjs.org/@ageflow/core/-/core-0.6.2.tgz","fileCount":31,"integrity":"sha512-ebn62LkqKSlM7MsMmRAWol7OwpII4UdZ/Ff+3k+7dXu/eoHf0yux9cTrMHGyEPKlYUuNzz47/fwtI9HMejalJw==","signatures":[{"sig":"MEUCIQC7g8ZVNLMZMOk7uGvqMHiRRtR1TXpc9zo2XEJWMXb6ewIgdMT4L4htMfufn3t8RNrOxokZDj3eO+uo76Zr+6bCtfo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":183127},"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json"},"private":false,"scripts":{"lint":"biome check src/","test":"vitest run","build":"tsc","typecheck":"tsc --noEmit && tsc --noEmit -p tsconfig.test.json"},"_npmUser":{"name":"neftedollar","email":"oildollar@gmail.com"},"repository":{"url":"git+https://github.com/Neftedollar/ageflow.git","type":"git"},"_npmVersion":"11.11.0","description":"Type-safe DSL for multi-agent AI workflows — defineAgent, defineWorkflow, loop, sessionToken","directories":{},"sideEffects":false,"_nodeVersion":"25.8.1","_hasShrinkwrap":false,"devDependencies":{"zod":"^3.23.0","vitest":"^2.1.0","@types/node":"^22.0.0"},"peerDependencies":{"zod":">=3.23.0 <4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.6.2_1776465209233_0.019281335468010807","host":"s3://npm-registry-packages-npm-production"}},"0.6.3":{"name":"@ageflow/core","version":"0.6.3","keywords":["ai","agents","workflow","llm","dsl","typescript","claude","openai","multi-agent"],"license":"MIT","_id":"@ageflow/core@0.6.3","maintainers":[{"name":"neftedollar","email":"oildollar@gmail.com"}],"homepage":"https://github.com/Neftedollar/ageflow/tree/master/packages/core","bugs":{"url":"https://github.com/Neftedollar/ageflow/issues"},"dist":{"shasum":"0fe992884d7864f01e072bba0453789a85a58995","tarball":"https://registry.npmjs.org/@ageflow/core/-/core-0.6.3.tgz","fileCount":31,"integrity":"sha512-+6bwPNDsmK+qkNPkcdLqwDwMciUQ+zBxFIEO7+vLKfbgmoIuDzEI8DtQEzqnLGAM/QL6TNhExXxiIQR9rlsvQg==","signatures":[{"sig":"MEUCIH3MsJGLdKTs1hxMwoA8Z74KXEB3BYMtwx7K5DxBDC9OAiEAj2rS+QaJkuvq/W1A+5K68Tvo3H2jJw+HZwmmSjF0KQY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":183407},"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json"},"private":false,"scripts":{"lint":"biome check src/","test":"vitest run","build":"tsc","typecheck":"tsc --noEmit && tsc --noEmit -p tsconfig.test.json"},"_npmUser":{"name":"neftedollar","email":"oildollar@gmail.com"},"repository":{"url":"git+https://github.com/Neftedollar/ageflow.git","type":"git"},"_npmVersion":"11.11.0","description":"Type-safe DSL for multi-agent AI workflows — defineAgent, defineWorkflow, loop, sessionToken","directories":{},"sideEffects":false,"_nodeVersion":"25.8.1","_hasShrinkwrap":false,"devDependencies":{"zod":"^3.23.0","vitest":"^2.1.0","@types/node":"^22.0.0"},"peerDependencies":{"zod":">=3.23.0 <4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.6.3_1776471380666_0.5952448352666104","host":"s3://npm-registry-packages-npm-production"}},"0.6.4":{"name":"@ageflow/core","version":"0.6.4","keywords":["ai","agents","workflow","llm","dsl","typescript","claude","openai","multi-agent"],"license":"MIT","_id":"@ageflow/core@0.6.4","maintainers":[{"name":"neftedollar","email":"oildollar@gmail.com"}],"homepage":"https://github.com/Neftedollar/ageflow/tree/master/packages/core","bugs":{"url":"https://github.com/Neftedollar/ageflow/issues"},"dist":{"shasum":"b2926d6ae964e5447bbbfe2d5329c340d0d83d75","tarball":"https://registry.npmjs.org/@ageflow/core/-/core-0.6.4.tgz","fileCount":31,"integrity":"sha512-QO7Z/osmEs88XxhK+ex6inp356bjRHdJOxfQDwfhmfLnYaagJOTChqVg9RIX62UMrRwuRV58SdxeGvHN3I7WOg==","signatures":[{"sig":"MEQCIBW6+VmXUmCx3iJ8ogjEsYA3bxTPiaqXU6NQbEFeJUFiAiBz8h0Vy74I9b8m3G9LGMiR7QTf08GYJ9Wk6dBdFZTP2Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":187003},"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json"},"private":false,"scripts":{"lint":"biome check src/","test":"vitest run","build":"tsc","typecheck":"tsc --noEmit && tsc --noEmit -p tsconfig.test.json"},"_npmUser":{"name":"neftedollar","email":"oildollar@gmail.com"},"repository":{"url":"git+https://github.com/Neftedollar/ageflow.git","type":"git"},"_npmVersion":"11.11.0","description":"Type-safe DSL for multi-agent AI workflows — defineAgent, defineWorkflow, loop, sessionToken","directories":{},"sideEffects":false,"_nodeVersion":"25.8.1","_hasShrinkwrap":false,"devDependencies":{"zod":"^3.23.0","vitest":"^2.1.0","@types/node":"^22.0.0"},"peerDependencies":{"zod":">=3.23.0 <4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.6.4_1776475958281_0.3601953407172498","host":"s3://npm-registry-packages-npm-production"}},"0.6.5":{"name":"@ageflow/core","version":"0.6.5","keywords":["ai","agents","workflow","llm","dsl","typescript","claude","openai","multi-agent"],"license":"MIT","_id":"@ageflow/core@0.6.5","maintainers":[{"name":"neftedollar","email":"oildollar@gmail.com"}],"homepage":"https://github.com/Neftedollar/ageflow/tree/master/packages/core","bugs":{"url":"https://github.com/Neftedollar/ageflow/issues"},"dist":{"shasum":"e4587b2d1de2b0774951917a438ccb58fabfe718","tarball":"https://registry.npmjs.org/@ageflow/core/-/core-0.6.5.tgz","fileCount":31,"integrity":"sha512-bxmlgmcYwR4wZIbagKjv6FElEV9iq9da2yMYjaxV3inBS92EsnpOl4Czttic/xaWmTK6LjApK3RtVbu+wO736A==","signatures":[{"sig":"MEYCIQCCez7pdhFQrskqZWiWNYjKJhWNDlMvrG4HpHJPRXp+cgIhAPzbp0eBtb37W3iJGFpIrSf8SQJYWVYh8OWoCd+tWsrY","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":187474},"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json"},"private":false,"scripts":{"lint":"biome check src/","test":"vitest run","build":"tsc","typecheck":"tsc --noEmit && tsc --noEmit -p tsconfig.test.json"},"_npmUser":{"name":"neftedollar","email":"oildollar@gmail.com"},"repository":{"url":"git+https://github.com/Neftedollar/ageflow.git","type":"git"},"_npmVersion":"11.11.0","description":"Type-safe DSL for multi-agent AI workflows — defineAgent, defineWorkflow, loop, sessionToken","directories":{},"sideEffects":false,"_nodeVersion":"25.8.1","_hasShrinkwrap":false,"devDependencies":{"zod":"^3.23.0","vitest":"^2.1.0","@types/node":"^22.0.0"},"peerDependencies":{"zod":">=3.23.0 <4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.6.5_1776478699116_0.5442494808315914","host":"s3://npm-registry-packages-npm-production"}},"0.6.6":{"name":"@ageflow/core","version":"0.6.6","description":"Type-safe DSL for multi-agent AI workflows — defineAgent, defineWorkflow, loop, sessionToken","homepage":"https://github.com/Neftedollar/ageflow/tree/master/packages/core","type":"module","private":false,"sideEffects":false,"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json"},"scripts":{"build":"tsc","typecheck":"tsc --noEmit && tsc --noEmit -p tsconfig.test.json","test":"vitest run","lint":"biome check src/"},"peerDependencies":{"zod":">=3.23.0 <4.0.0"},"devDependencies":{"@types/node":"^22.0.0","vitest":"^2.1.0","zod":"^3.23.0"},"repository":{"type":"git","url":"git+https://github.com/Neftedollar/ageflow.git"},"keywords":["ai","agents","workflow","llm","dsl","typescript","claude","openai","multi-agent"],"license":"MIT","_id":"@ageflow/core@0.6.6","bugs":{"url":"https://github.com/Neftedollar/ageflow/issues"},"_nodeVersion":"25.8.1","_npmVersion":"11.11.0","dist":{"integrity":"sha512-iB7Y52edbjfvrv6YGnoVfpZU/QQiKyMaE9ZcOy6+ldCoUN4eOtE3n0r2rbQ6XaAdJcFv2vTDo9OMpYrnrToEMw==","shasum":"0f982f1520192ec992bc233c92df9455032a7c9f","tarball":"https://registry.npmjs.org/@ageflow/core/-/core-0.6.6.tgz","fileCount":31,"unpackedSize":187272,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIF9MpN+bdgRqjwOeA/dIlQwMSV8xRL2IWKDcJGZiyqqJAiB7cL9GRg9jLc1ZGibJWJG9f6Kp64fJSnvf2D2Rt8viqw=="}]},"_npmUser":{"name":"neftedollar","email":"oildollar@gmail.com"},"directories":{},"maintainers":[{"name":"neftedollar","email":"oildollar@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/core_0.6.6_1776481363012_0.6087522600993793"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-15T21:34:07.285Z","modified":"2026-04-18T03:02:43.343Z","0.1.0":"2026-04-15T21:34:07.516Z","0.2.0":"2026-04-16T09:12:59.076Z","0.3.0":"2026-04-16T22:19:40.523Z","0.3.2":"2026-04-17T03:05:42.980Z","0.4.0":"2026-04-17T03:31:47.007Z","0.4.1":"2026-04-17T03:51:52.352Z","0.4.2":"2026-04-17T04:40:50.979Z","0.4.3":"2026-04-17T04:59:05.407Z","0.4.4":"2026-04-17T09:15:06.771Z","0.5.0":"2026-04-17T10:35:02.449Z","0.5.1":"2026-04-17T12:57:28.256Z","0.6.0":"2026-04-17T14:08:51.861Z","0.6.1":"2026-04-17T19:22:08.252Z","0.6.2":"2026-04-17T22:33:29.398Z","0.6.3":"2026-04-18T00:16:20.856Z","0.6.4":"2026-04-18T01:32:38.409Z","0.6.5":"2026-04-18T02:18:19.272Z","0.6.6":"2026-04-18T03:02:43.175Z"},"bugs":{"url":"https://github.com/Neftedollar/ageflow/issues"},"license":"MIT","homepage":"https://github.com/Neftedollar/ageflow/tree/master/packages/core","keywords":["ai","agents","workflow","llm","dsl","typescript","claude","openai","multi-agent"],"repository":{"type":"git","url":"git+https://github.com/Neftedollar/ageflow.git"},"description":"Type-safe DSL for multi-agent AI workflows — defineAgent, defineWorkflow, loop, sessionToken","maintainers":[{"name":"neftedollar","email":"oildollar@gmail.com"}],"readme":"# @ageflow/core\n\n[![npm](https://img.shields.io/npm/v/@ageflow/core)](https://www.npmjs.com/package/@ageflow/core)\n\nCore DSL for [ageflow](../../README.md) — types, Zod schemas, and builders for defining agents and workflows.\n\n## Install\n\n```bash\nbun add @ageflow/core zod\n```\n\n## API\n\n### `defineAgent(def)`\n\nDefine a typed agent. The `input` and `output` Zod schemas are the contract — ageflow validates every call.\n\n```ts\nimport { defineAgent } from \"@ageflow/core\";\nimport { z } from \"zod\";\n\nconst summaryAgent = defineAgent({\n  runner: \"claude\",            // matches a registered Runner\n  model: \"claude-sonnet-4-6\",\n  input: z.object({\n    text: z.string(),\n    maxWords: z.number().optional(),\n  }),\n  output: z.object({\n    summary: z.string(),\n    wordCount: z.number(),\n  }),\n  prompt: ({ text, maxWords }) =>\n    `Summarize in ${maxWords ?? 100} words:\\n\\n${text}`,\n});\n```\n\n### `defineWorkflow(def)`\n\nCompose agents into a DAG. Tasks with no `dependsOn` run in parallel.\n\n```ts\nimport { defineWorkflow } from \"@ageflow/core\";\n\nexport default defineWorkflow({\n  name: \"summarize-and-translate\",\n  tasks: {\n    summarize: {\n      agent: summaryAgent,\n      input: { text: \"...\", maxWords: 50 },\n    },\n    translate: {\n      agent: translateAgent,\n      dependsOn: [\"summarize\"],   // runs after summarize\n      input: (ctx) => ({\n        text: ctx.summarize.output.summary,\n        targetLang: \"es\",\n      }),\n    },\n  },\n});\n```\n\n### `loop(def)`\n\nRun a sub-workflow repeatedly until a condition is met.\n\n```ts\nimport { loop } from \"@ageflow/core\";\n\nconst refineLoop = loop({\n  dependsOn: [\"draft\"] as const,\n  max: 5,\n  until: (ctx) => ctx.grade?.output?.score >= 9,\n  tasks: {\n    improve: { agent: improveAgent, dependsOn: [], input: ... },\n    grade:   { agent: gradeAgent,   dependsOn: [\"improve\"], input: ... },\n  },\n});\n```\n\n## Deterministic steps with `defineFunction`\n\nNot every task in a workflow is an LLM call. Use `defineFunction` to put a deterministic, non-LLM step in the DAG — fetching data, transforming JSON, validating, persisting. It participates in the DAG like an agent: `dependsOn`, `skipIf`, retry, loop, event emission, Zod validation in and out.\n\n```ts\nimport { z } from \"zod\";\nimport { defineFunction, defineWorkflow } from \"@ageflow/core\";\n\nconst snapshotStep = defineFunction({\n  input: z.object({ userId: z.string() }),\n  output: z.object({ orders: z.array(z.any()), total: z.number() }),\n  execute: async (input) => {\n    const orders = await db.orders.findAll({ userId: input.userId });\n    return { orders, total: orders.reduce((s, o) => s + o.amount, 0) };\n  },\n});\n\nconst wf = defineWorkflow({\n  name: \"orders-recap\",\n  tasks: {\n    snapshot: { fn: snapshotStep, input: (ctx) => ({ userId: \"u1\" }) },\n    interpret: {\n      agent: interpretAgent,\n      dependsOn: [\"snapshot\"],\n      input: (ctx) => ({ snapshot: ctx.snapshot.output }),\n    },\n    persist: {\n      fn: persistStep,\n      dependsOn: [\"interpret\"],\n      input: (ctx) => ({ insights: ctx.interpret.output }),\n    },\n  },\n});\n```\n\n### Differences from agent tasks\n\n- No runner, no token usage, no budget accounting — cost metrics are always 0.\n- No session — fn tasks cannot participate in session sharing.\n- Retries: fn tasks honor `retry.on` the same as agent tasks. Errors from `execute()` are classified as `\"transient\"` (generic) or `\"timeout\"` (`TimeoutError`). To retry, include the matching kind in `retry.on` (e.g. `on: [\"transient\"]`). Zod validation errors (input or output) never retry regardless of config — the data contract is wrong and retrying won't fix it.\n- Preflight: agent-specific checks (runner brand, session cross-provider, MCP config) skip fn tasks. Topology checks still apply.\n\n### `sessionToken(name, runner)`\n\nShare conversation context between agents. Both agents send messages to the same model session.\n\n```ts\nimport { sessionToken } from \"@ageflow/core\";\n\nconst sharedCtx = sessionToken(\"my-session\", \"claude\");\n\n// Use in agent definitions:\nconst agentA = defineAgent({ ..., session: sharedCtx });\nconst agentB = defineAgent({ ..., session: sharedCtx }); // same conversation\n```\n\n### `registerRunner(name, runner)` / `getRunner(name)`\n\nRegister CLI subprocess runners before running a workflow.\n\n```ts\nimport { registerRunner } from \"@ageflow/core\";\nimport { ClaudeRunner } from \"@ageflow/runner-claude\";\n\nregisterRunner(\"claude\", new ClaudeRunner());\n```\n\n### `safePath`\n\nZod refinement that rejects path traversal (`../`, absolute paths). Use it on any file path input.\n\n```ts\nimport { safePath } from \"@ageflow/core\";\nimport { z } from \"zod\";\n\nconst input = z.object({\n  filePath: z.string().superRefine(safePath),\n});\n```\n\n### `CtxFor<Tasks, TaskName>`\n\nType-safe context accessor — infer the exact output type of upstream tasks.\n\n```ts\nimport type { CtxFor } from \"@ageflow/core\";\n\ntype MyCtx = CtxFor<WorkflowTasks, \"summarize\">;\n// → { draft: { output: DraftOutput }, translate: { output: TranslateOutput } }\n```\n\n## ctx in task-input-callbacks\n\nThe `ctx` argument passed to a task's `input` function contains **only the outputs of completed tasks from earlier batches** in the current workflow. It is a flat map keyed by task name.\n\n```ts\nctx.summarize.output  // output of the \"summarize\" task\nctx.translate.output  // output of the \"translate\" task\n```\n\nTwo things `ctx` does NOT contain:\n\n- **Workflow-level input** — the value passed to `executor.stream(input)` is emitted as the `workflow:start` event but is not injected into `ctx`. Use the **closure pattern** to pass workflow-level data into tasks:\n\n```ts\nimport { WorkflowExecutor } from \"@ageflow/executor\";\n\n// Closure pattern: wrap defineWorkflow in a factory function\nfunction buildWorkflow(input: { text: string; targetLang: string }) {\n  return defineWorkflow({\n    name: \"translate-pipeline\",\n    tasks: {\n      summarize: {\n        agent: summaryAgent,\n        // Close over `input` from the outer function\n        input: { text: input.text, maxWords: 50 },\n      },\n      translate: {\n        agent: translateAgent,\n        dependsOn: [\"summarize\"],\n        input: (ctx) => ({\n          // Prior task output from ctx\n          text: ctx.summarize.output as string,\n          // Workflow-level data from closure\n          targetLang: input.targetLang,\n        }),\n      },\n    },\n  });\n}\n\nconst workflow = buildWorkflow({ text: \"...\", targetLang: \"es\" });\nconst executor = new WorkflowExecutor(workflow);\nawait executor.run();\n```\n\nSee also [`defineWorkflowFactory`](#defineworkflowfactoryi) — a helper that codifies this closure pattern.\n\n- **Special keys like `$input`, `$parent`, or `$prev`** — these do not exist. See below for loop-specific context access.\n\n## `defineWorkflowFactory<I>`\n\nA typed helper that codifies the [closure pattern](#ctx-in-task-input-callbacks) shown above. Instead of manually writing a factory function, pass the config-builder callback to `defineWorkflowFactory` and get back a typed factory function.\n\n```ts\n// Before (manual factory):\nexport function createPipeline(input: PipelineInput): WorkflowDef {\n  return defineWorkflow({\n    name: \"pipeline\",\n    tasks: {\n      analyze: { agent: analyzeAgent, input: { repoPath: input.repoPath } },\n    },\n  });\n}\n\n// After (using helper):\nexport const createPipeline = defineWorkflowFactory<PipelineInput>(\n  (input) => ({\n    name: \"pipeline\",\n    tasks: {\n      analyze: { agent: analyzeAgent, input: { repoPath: input.repoPath } },\n    },\n  }),\n);\n```\n\nBoth produce an identical `WorkflowDef`. The helper version:\n- enforces the return type automatically (no manual `: WorkflowDef<...>` annotation needed)\n- makes the factory-closure pattern visible at a glance\n- is compatible with any consumer that calls `createPipeline(input)`\n\n## Accessing outer ctx and previous iteration inside loop\n\nInside a `loop`, the inner task `ctx` is built as follows:\n\n1. **Outer workflow's completed-task outputs** are flat-merged into the inner ctx. Access them the same way as any other task output — by their task name:\n\n```ts\n// Outer task named \"draft\" → available as ctx.draft inside the loop\nctx.draft.output  // NOT ctx.$parent.draft\n```\n\n2. **Previous iteration's output** is available at `ctx.__loop_feedback__?.output` starting from the second iteration. It is `undefined` on the first iteration.\n\n```ts\nctx.__loop_feedback__?.output  // NOT ctx.$prev\n```\n\nExample — a loop that uses the previous iteration's verify-gate reason to refine the build prompt:\n\n```ts\nimport { loop, defineWorkflow } from \"@ageflow/core\";\n\nexport default defineWorkflow({\n  name: \"build-verify-loop\",\n  tasks: {\n    scaffold: {\n      agent: scaffoldAgent,\n      input: { spec: \"...\" },\n    },\n    refine: loop({\n      dependsOn: [\"scaffold\"],\n      max: 5,\n      until: (ctx: unknown) => {\n        const c = ctx as Record<string, { output: { passed: boolean } }>;\n        return c.verify?.output?.passed === true;\n      },\n      tasks: {\n        build: {\n          agent: buildAgent,\n          dependsOn: [],\n          input: (ctx) => {\n            // Outer workflow's \"scaffold\" output is flat-merged into inner ctx\n            const spec = (ctx as Record<string, { output: { code: string } }>)\n              .scaffold?.output?.code ?? \"\";\n            // Previous iteration's full output is at __loop_feedback__.output,\n            // which is a task-name-keyed map: Record<string, { output, _source }>\n            const feedback = (\n              ctx as Record<string, { output: Record<string, { output: unknown }> }>\n            ).__loop_feedback__?.output;\n            const prevReason = (feedback?.verify?.output as { reason?: string } | undefined)\n              ?.reason;\n            return {\n              spec,\n              refinementHint: prevReason ?? \"First attempt — build from spec.\",\n            };\n          },\n        },\n        verify: {\n          agent: verifyAgent,\n          dependsOn: [\"build\"],\n          input: (ctx) => ({\n            code: (ctx as Record<string, { output: { code: string } }>)\n              .build.output.code,\n          }),\n        },\n      },\n    }),\n  },\n});\n```\n\n> **Note on types**: `__loop_feedback__` is not part of `BoundCtx<D>` — cast `ctx` to `unknown` or use a type assertion when accessing it. A typed helper will be added in a future version.\n\n> **See also**: canonical `__loop_feedback__` usage in [`dogfooding/workflow.ts`](../../dogfooding/workflow.ts) and [`examples/bug-fix-pipeline/workflow.ts`](../../examples/bug-fix-pipeline/workflow.ts).\n\n## Error types\n\nAll errors extend `AgentFlowError`. Import individually or catch by base class:\n\n```ts\nimport {\n  BudgetExceededError,\n  LoopMaxIterationsError,\n  NodeMaxRetriesError,\n  ValidationError,\n} from \"@ageflow/core\";\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}