{"_id":"@affectively/aeon-flags","_rev":"4-aef4f63c540a1d2e529a0b6b3763234c","name":"@affectively/aeon-flags","dist-tags":{"latest":"5.0.0"},"versions":{"1.0.0":{"name":"@affectively/aeon-flags","version":"1.0.0","keywords":["aeon","flags","feature-flags","config"],"author":{"name":"Edgework DAO"},"license":"UNLICENSED","_id":"@affectively/aeon-flags@1.0.0","maintainers":[{"name":"buley","email":"buley@outlook.com"}],"homepage":"https://github.com/affectively-ai/aeon-flags#readme","bugs":{"url":"https://github.com/affectively-ai/aeon-flags/issues"},"dist":{"shasum":"2e973fc90a6438986d43d7bfe093c05c79abec20","tarball":"https://registry.npmjs.org/@affectively/aeon-flags/-/aeon-flags-1.0.0.tgz","fileCount":4,"integrity":"sha512-gp+qgO4PO5T4yTojbRxe/KHoIu5B1JokbcdzUWV7snevDxxPqYfGRDh3A/Nls7n8JPDW7eZNc65BgXTmNkpZfg==","signatures":[{"sig":"MEUCIQC6oAFma9jHy2Ukko/3iSCWel1wFmjW3+UgmTOBQYnQiAIgWvSl5xxif9qhyyL+GBDlbO2i/CsF6t3SxC7d2K6mm/o=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":2229},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"dev":"tsc -w","build":"tsc","clean":"rm -rf dist"},"_npmUser":{"name":"buley","email":"buley@outlook.com"},"repository":{"url":"git+https://github.com/affectively-ai/aeon-flags.git","type":"git"},"_npmVersion":"11.8.0","description":"Feature flag and configuration management for the Aeon ecosystem.","directories":{},"_nodeVersion":"25.5.0","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/aeon-flags_1.0.0_1772747360135_0.23961554300601184","host":"s3://npm-registry-packages-npm-production"},"deprecated":"This package is deprecated and no longer supported. Do not use."},"1.0.1":{"name":"@affectively/aeon-flags","version":"1.0.1","author":{"name":"Edgework DAO"},"license":"MIT","_id":"@affectively/aeon-flags@1.0.1","maintainers":[{"name":"buley","email":"buley@outlook.com"}],"dist":{"shasum":"dbbb834629a33f2ccf3e44ddcfe423588a22be46","tarball":"https://registry.npmjs.org/@affectively/aeon-flags/-/aeon-flags-1.0.1.tgz","fileCount":14,"integrity":"sha512-DpSjMBsomtlCgUfwazwhk1n1wDGkxEog4O0Ejn2ah4LB3xcn9beQ78lkuG6lpUYpkwMxBnX0iY6Z+iqmcVLtPw==","signatures":[{"sig":"MEUCIQC04XgUwnRFlnpFrWv6z7/0bckW1QhgCX6xn4whsQv2JQIgEeeCx51Q/6NsQhgQko21Wwoz5x8htnUcYc84+QdPhKM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":20597},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./esi":{"types":"./dist/esi.d.ts","import":"./dist/esi.js"},"./react":{"types":"./dist/react.d.ts","import":"./dist/react.js"}},"scripts":{"dev":"tsc -w","test":"bun test --coverage","build":"tsc"},"_npmUser":{"name":"buley","email":"buley@outlook.com"},"_npmVersion":"11.8.0","description":"UCAN-powered Feature Flags with optional Edge Side Inference (ESI) cache and Tier gating. A lightweight alternative to CloudBees and LaunchDarkly.","directories":{},"_nodeVersion":"25.5.0","_hasShrinkwrap":false,"devDependencies":{"react":"^19.2.4","react-dom":"^19.2.4","typescript":"^5.7.0","@types/react":"^19.2.14","@types/react-dom":"^19.2.3"},"peerDependencies":{"@affectively/aeon-flux":"^1.9.0"},"peerDependenciesMeta":{"@affectively/aeon-flux":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/aeon-flags_1.0.1_1772748188651_0.22916721770839033","host":"s3://npm-registry-packages-npm-production"},"deprecated":"This package is deprecated and no longer supported. Do not use."},"5.0.0":{"name":"@affectively/aeon-flags","version":"5.0.0","author":{"url":"https://buley.fyi","name":"Taylor William Buley"},"license":"MIT","_id":"@affectively/aeon-flags@5.0.0","maintainers":[{"name":"buley","email":"buley@outlook.com"}],"dist":{"shasum":"90afd7bdfcf956d77ed04aed44f3bb5fce4d47c8","tarball":"https://registry.npmjs.org/@affectively/aeon-flags/-/aeon-flags-5.0.0.tgz","fileCount":16,"integrity":"sha512-HvVMDBVUguAZOuuVjslgRuooFsqnB19fAjDdA0ijRJnwcPn+0bTccxWr1/5jilpbGXgVnb5PhSKNHTqfsWBt3Q==","signatures":[{"sig":"MEUCIQDsnkkPfbyETILuvHj9Dy4NdKKLs64cj3oZzoEHCzG+CAIgN5xgIR7ZvtMaeWMrpB9pynhPkJ5wOItkSq6IPk2BIYc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":25124},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./esi":{"types":"./dist/esi.d.ts","import":"./dist/esi.js"},"./react":{"types":"./dist/react.d.ts","import":"./dist/react.js"}},"scripts":{"dev":"tsc -w","test":"bun test --coverage","build":"tsc"},"_npmUser":{"name":"buley","email":"buley@outlook.com"},"_npmVersion":"11.8.0","description":"UCAN-powered Feature Flags with optional Edge Side Inference (ESI) cache and Tier gating. A lightweight alternative to CloudBees and LaunchDarkly.","directories":{},"_nodeVersion":"25.5.0","_hasShrinkwrap":false,"devDependencies":{"react":"^19.2.4","react-dom":"^19.2.4","typescript":"^5.7.0","@types/react":"^19.2.14","@types/react-dom":"^19.2.3"},"peerDependencies":{"@affectively/aeon-flux":"^1.9.0"},"peerDependenciesMeta":{"@affectively/aeon-flux":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/aeon-flags_5.0.0_1773155956903_0.05786732003269912","host":"s3://npm-registry-packages-npm-production"},"deprecated":"This package is deprecated and no longer supported. Do not use."}},"time":{"created":"2026-03-05T21:49:20.071Z","modified":"2026-03-27T19:58:21.722Z","1.0.0":"2026-03-05T21:49:20.285Z","1.0.1":"2026-03-05T22:03:08.796Z","5.0.0":"2026-03-10T15:19:17.056Z"},"author":{"url":"https://buley.fyi","name":"Taylor William Buley"},"license":"MIT","description":"UCAN-powered Feature Flags with optional Edge Side Inference (ESI) cache and Tier gating. A lightweight alternative to CloudBees and LaunchDarkly.","maintainers":[{"name":"buley","email":"buley@outlook.com"}],"readme":"# @affectively/aeon-flags\n\n**The Goodchild Daemon: Feature Entitlement at the Edge**\n\nGoodchild is a localized, UCAN-enforced feature gating and routing daemon. It replaces centralized, polling-based feature flag SaaS (like LaunchDarkly or CloudBees) with deterministic, edge-evaluated cryptographic entitlements. Say goodbye to expensive $10k+ yearly enterprise subscriptions.\n\n## The Origin and the Irony\n\nThe name is a direct reference to Trevor Goodchild, the brilliant, autocratic ruler of the walled city of Bregna in *Aeon Flux*. In the lore, Goodchild is obsessed with absolute control, artificial borders, and centralized authority. He is the ultimate gatekeeper, deciding who gets access to what, and under what conditions.\n\nIn the context of the Aeon Shell architecture, naming our feature flag service Goodchild is an exercise in cyberpunk irony.\n\nTraditional feature flag services act exactly like the original Trevor Goodchild: they are centralized, rent-seeking authorities sitting in a distant tower, constantly spying on the edge via telemetry, and phoning home to ask permission for every state change. By naming our decentralized, user-sovereign entitlement service \"Goodchild,\" we are domesticating the tyrant. We have stripped him of his centralized power, severed his network connection, and reduced him to a blind, local enforcer of the user's cryptographic will.\n\n## Architectural Semantics\n\nThe Goodchild daemon perfectly mirrors the strictness of its namesake, but applies that strictness locally. It operates under a zero-trust, fail-closed paradigm.\n\n- **No Central Authority:** Goodchild does not poll a remote server to ask if a feature should be enabled. It lives at the edge.\n- **Cryptographic Law:** Goodchild only responds to verified UCANs. If the token lacks the exact capability (`flag:<flag-name>`), Goodchild mathematically rejects the execution path.\n- **Stateless Enforcement:** Goodchild cares about the signature, the audience, and the TTL. It does not track user identities or report telemetry back to a mothership.\n- **The Inverted Power Dynamic:** The user (or the capability granter) holds the key. Goodchild is merely the lock.\n\nCombined with **Edge Side Inference (ESI)**, `goodchild` brings your evaluations to the edge, dropping your CLS (Cumulative Layout Shift) to zero while executing in sub-milliseconds without hydration delays.\n\n## Installation\n\n```bash\nbun add @affectively/aeon-flags\n```\n\n## Code as Lore\n\nWhen a developer interacts with this service in the shell, the semantics carry the weight of the architecture. You aren't casually checking a remote boolean; you are demanding passage through a cryptographically sealed border.\n\nInstead of an ambient `if (flags.isFeatureXEnabled)`, the execution path feels authoritative:\n\n```typescript\nimport { FlagManager } from '@affectively/aeon-flags';\n\nconst Goodchild = new FlagManager([\n  {\n    id: 'experimental-ui',\n    enabled: true,\n    rules: [\n      // Only show to premium and enterprise users\n      { tiers: ['premium', 'enterprise'] },\n      // 50% rollout among those users\n      { rolloutPercentage: 50 }\n    ]\n  }\n]);\n\n// If the delegation chain is valid, the gate opens instantly with zero network latency.\n// If it fails, Goodchild ruthlessly shunts the execution back to the baseline path.\nconst isEnabled = Goodchild.evaluate('experimental-ui', {\n  ucan: userUcanToken,\n  context: { userId: 'user-123', tier: 'premium' }\n});\n```\n\n### React & Aeon-Flux Easy Mode\n\nIf you are using React or building inside the Aeon Flux ecosystem, Goodchild acts as a deterministic barrier, aggressively pruning nodes at render time before they even reach the DOM.\n\n```tsx\nimport { GoodchildProvider, Guard } from '@affectively/aeon-flags/react';\n\nfunction App() {\n  return (\n    <GoodchildProvider manager={Goodchild} context={{ tier: 'free' }}>\n      <Dashboard />\n    </GoodchildProvider>\n  );\n}\n\nfunction Dashboard() {\n  return (\n    <main>\n      <h1>Dashboard</h1>\n      \n      {/* If the flag evaluates to false, this node is destroyed at render time */}\n      <Guard flag=\"experimental-ui\" fallback={<p>Upgrade to Pro to see this feature</p>}>\n        <ExperimentalProWidget />\n      </Guard>\n    </main>\n  );\n}\n```\n\n### Edge Side Inference (ESI) Integration\n\nWhen running in Cloudflare Workers using the Aeon Flux architecture, flags can be mapped to ESI variables that instruct the edge HTML rewriter to dynamically include/exclude segments of your DOM before the browser even downloads it:\n\n```typescript\n// On the Worker\nconst esiVars = Goodchild.generateESIVariables({ ucan: requestUcan });\n// esiVars = { \"flag_experimental-ui\": \"1\", \"flag_ai-chat\": \"0\" }\n```\n\nYou can then use the provided tools to generate native ESI tags.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}