{"_id":"@aiofm/apps-sdk","_rev":"6-eddc0f38ce46c3d6911dcf3dc7096a7e","name":"@aiofm/apps-sdk","dist-tags":{"latest":"0.3.0"},"versions":{"0.2.0":{"name":"@aiofm/apps-sdk","version":"0.2.0","keywords":["aio.fm","ai","workflow","sdk"],"license":"SEE LICENSE IN LICENSE","_id":"@aiofm/apps-sdk@0.2.0","maintainers":[{"name":"brennanai","email":"brennan@brennancheung.com"}],"homepage":"https://aio.fm/studio/apps/docs","bugs":{"url":"https://github.com/brennancheung/platform/issues"},"bin":{"aio-app":"dist/cli.js"},"dist":{"shasum":"06bc97b7186cbaaeae7b3e8b174fd57337509690","tarball":"https://registry.npmjs.org/@aiofm/apps-sdk/-/apps-sdk-0.2.0.tgz","fileCount":30,"integrity":"sha512-5eBVYnqWDSA9YtO2prz56pnFpjicoUiaN9gF8X75p2A+OuThpMLIjYhG795ZvBFLFfVxZ4AKfjZq7KWduqRMmg==","signatures":[{"sig":"MEUCIQCndooNvRfo5iqYVNyttBd38QaYUv1LdpqhKeRNmC+fEQIgN4hpiNWyvfvnYVSv1nwtlUR3GF2LkgbhS+ZTZjNTY9g=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":187943},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"5c12e48342c17bf2395b31d1f2be8a5baf6c8194","scripts":{"test":"vitest run","build":"node -e \"fs.rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.build.json","prepack":"npm run docs:llms && npm run build","docs:llms":"node ../scripts/build-llms.mjs","typecheck":"tsc --noEmit","release:check":"npm run docs:llms && npm run build && node scripts/check-release.mjs && node ../scripts/audit-contract.mjs && npm run typecheck && npm test","prepublishOnly":"npm run release:check"},"_npmUser":{"name":"brennanai","email":"brennan@brennancheung.com"},"repository":{"url":"git+https://github.com/brennancheung/platform.git","type":"git","directory":"app-devkit/sdk"},"_npmVersion":"11.14.1","description":"SDK + CLI for authoring durable AI-generation apps for aio.fm.","directories":{},"_nodeVersion":"24.14.0","dependencies":{"esbuild":"^0.28.1","typescript":"^5.6.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.0","typescript":"^5.6.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apps-sdk_0.2.0_1785800046792_0.7152015257223143","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@aiofm/apps-sdk","version":"0.2.1","keywords":["aio.fm","ai","workflow","sdk"],"license":"SEE LICENSE IN LICENSE","_id":"@aiofm/apps-sdk@0.2.1","maintainers":[{"name":"brennanai","email":"brennan@brennancheung.com"}],"homepage":"https://aio.fm/studio/apps/docs","bugs":{"url":"https://github.com/brennancheung/platform/issues"},"bin":{"aio-app":"dist/cli.js"},"dist":{"shasum":"7561b21f4656ab9fb2d8505ccc763a5b29d16395","tarball":"https://registry.npmjs.org/@aiofm/apps-sdk/-/apps-sdk-0.2.1.tgz","fileCount":30,"integrity":"sha512-hmpEVvw1HfZLqq+QPJD75nxMbBUVo4xlHU3h3wY3gLgS5q2/b2cqLuMTJWsl5rs0hRrOTaOPGPjU5y6NlCsRIw==","signatures":[{"sig":"MEUCIQCBfdsFY3zyzQxhHOzZM6edQc3yUBpx5J1Nz7ysglNhjQIgUycJ2JzxmsrIpVnS3rXv1nbjFMHIhBY7s6pHn2ch7Ts=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":189437},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"5c12e48342c17bf2395b31d1f2be8a5baf6c8194","scripts":{"test":"vitest run","build":"node -e \"fs.rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.build.json","prepack":"npm run docs:llms && npm run build","docs:llms":"node ../scripts/build-llms.mjs","typecheck":"tsc --noEmit","release:check":"npm run docs:llms && npm run build && node scripts/check-release.mjs && node ../scripts/audit-contract.mjs && npm run typecheck && npm test","prepublishOnly":"npm run release:check"},"_npmUser":{"name":"brennanai","email":"brennan@brennancheung.com"},"repository":{"url":"git+https://github.com/brennancheung/platform.git","type":"git","directory":"app-devkit/sdk"},"_npmVersion":"11.14.1","description":"SDK + CLI for authoring durable AI-generation apps for aio.fm.","directories":{},"_nodeVersion":"24.14.0","dependencies":{"esbuild":"^0.28.1","typescript":"^5.6.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.0","typescript":"^5.6.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apps-sdk_0.2.1_1785800242191_0.5296108748819117","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@aiofm/apps-sdk","version":"0.2.2","keywords":["aio.fm","ai","workflow","sdk"],"license":"SEE LICENSE IN LICENSE","_id":"@aiofm/apps-sdk@0.2.2","maintainers":[{"name":"brennanai","email":"brennan@brennancheung.com"}],"homepage":"https://aio.fm/studio/apps/docs","bugs":{"url":"https://github.com/brennancheung/platform/issues"},"bin":{"aio-app":"dist/cli.js"},"dist":{"shasum":"309df936581bcee6704b06dbc1915b83a947a71d","tarball":"https://registry.npmjs.org/@aiofm/apps-sdk/-/apps-sdk-0.2.2.tgz","fileCount":30,"integrity":"sha512-5WlNVpShbwJNKulqO+pN1wxFeb/8Ut9X8emTev61qUxiqBvoa0pfphFGW4Fbxvp3mKXhtUaFZZRcytzbNjIy3w==","signatures":[{"sig":"MEUCIE3edyZazPO8vPp5RygUfk3Tk4Ao/Kq1CipoYjZprGuLAiEAjCM93X4Kcs0zpUWwqfFKiY9bDi8FvRO5bopLptXR7cw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":192483},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"5c12e48342c17bf2395b31d1f2be8a5baf6c8194","scripts":{"test":"vitest run","build":"node -e \"fs.rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.build.json","prepack":"npm run docs:llms && npm run build","docs:llms":"node ../scripts/build-llms.mjs","typecheck":"tsc --noEmit","release:check":"npm run docs:llms && npm run build && node scripts/check-release.mjs && node ../scripts/audit-contract.mjs && npm run typecheck && npm test","prepublishOnly":"npm run release:check"},"_npmUser":{"name":"brennanai","email":"brennan@brennancheung.com"},"repository":{"url":"git+https://github.com/brennancheung/platform.git","type":"git","directory":"app-devkit/sdk"},"_npmVersion":"11.14.1","description":"SDK + CLI for authoring durable AI-generation apps for aio.fm.","directories":{},"_nodeVersion":"24.14.0","dependencies":{"esbuild":"^0.28.1","typescript":"^5.6.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.0","typescript":"^5.6.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apps-sdk_0.2.2_1785801483359_0.9860876869703403","host":"s3://npm-registry-packages-npm-production"}},"0.2.3":{"name":"@aiofm/apps-sdk","version":"0.2.3","keywords":["aio.fm","ai","workflow","sdk"],"license":"SEE LICENSE IN LICENSE","_id":"@aiofm/apps-sdk@0.2.3","maintainers":[{"name":"brennanai","email":"brennan@brennancheung.com"}],"homepage":"https://aio.fm/studio/apps/docs","bugs":{"url":"https://github.com/brennancheung/platform/issues"},"bin":{"aio-app":"dist/cli.js"},"dist":{"shasum":"9cf9c41ca096899a6837ea2cbde1a23b5902be45","tarball":"https://registry.npmjs.org/@aiofm/apps-sdk/-/apps-sdk-0.2.3.tgz","fileCount":30,"integrity":"sha512-8LsaYLo9P9KGwY7beJM1B0CpqWt/WS/gmrKKBqrFTpeUrGTBhwjgtqksOyFoViTx5zoU85/iTLEi+odLVgEl5g==","signatures":[{"sig":"MEUCICsjcQnLLbf9cnIdDZa48MO7fT754wCrZSOqWnTeYfIaAiEAsU9LVDG6ObA23CCfgjv+Doy17aFQs9OH90u8AHvX2Mw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":192801},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"5c12e48342c17bf2395b31d1f2be8a5baf6c8194","scripts":{"test":"vitest run","build":"node -e \"fs.rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.build.json","prepack":"npm run docs:llms && npm run build","docs:llms":"node ../scripts/build-llms.mjs","typecheck":"tsc --noEmit","release:check":"npm run docs:llms && npm run build && node scripts/check-release.mjs && node ../scripts/audit-contract.mjs && npm run typecheck && npm test","prepublishOnly":"npm run release:check"},"_npmUser":{"name":"brennanai","email":"brennan@brennancheung.com"},"repository":{"url":"git+https://github.com/brennancheung/platform.git","type":"git","directory":"app-devkit/sdk"},"_npmVersion":"11.14.1","description":"SDK + CLI for authoring durable AI-generation apps for aio.fm.","directories":{},"_nodeVersion":"24.14.0","dependencies":{"esbuild":"^0.28.1","typescript":"^5.6.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.0","typescript":"^5.6.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apps-sdk_0.2.3_1785801597980_0.09505171733611939","host":"s3://npm-registry-packages-npm-production"}},"0.2.5":{"name":"@aiofm/apps-sdk","version":"0.2.5","keywords":["aio.fm","ai","workflow","sdk"],"license":"SEE LICENSE IN LICENSE","_id":"@aiofm/apps-sdk@0.2.5","maintainers":[{"name":"brennanai","email":"brennan@brennancheung.com"}],"homepage":"https://aio.fm/studio/apps/docs","bugs":{"url":"https://github.com/brennancheung/platform/issues"},"bin":{"aio-app":"dist/cli.js"},"dist":{"shasum":"fef0925cc1e59547839b6347043d5fbc7c555cfd","tarball":"https://registry.npmjs.org/@aiofm/apps-sdk/-/apps-sdk-0.2.5.tgz","fileCount":32,"integrity":"sha512-VVVTe/sCU1i51nl3wBxVwYvZB9fCWwPKq2Dq3hGYU5jBVMcVbi6UKBkwnN+VBfCpMHfM6LOXV8KkI0C7nM4xfw==","signatures":[{"sig":"MEUCIGmp7alretN5AiCFsVNKb6tVQUZ8fw4r4WJ711+MpTwSAiEAtxwKXHMHQ8RfqcEG4MyOgnW8mJDwiqdUIBQxqcAovaU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":230135},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"2f8ce8bcca6d25e715bdffdf2c2c7686bb24b693","scripts":{"test":"vitest run","build":"node -e \"fs.rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.build.json","prepack":"npm run docs:llms && npm run build","docs:llms":"node ../scripts/build-llms.mjs","typecheck":"tsc --noEmit","release:check":"npm run docs:llms && npm run build && node scripts/check-release.mjs && node ../scripts/audit-contract.mjs && npm run typecheck && npm test","prepublishOnly":"npm run release:check"},"_npmUser":{"name":"brennanai","email":"brennan@brennancheung.com"},"repository":{"url":"git+https://github.com/brennancheung/platform.git","type":"git","directory":"app-devkit/sdk"},"_npmVersion":"11.14.1","description":"SDK + CLI for authoring durable AI-generation apps for aio.fm.","directories":{},"_nodeVersion":"24.14.0","dependencies":{"esbuild":"^0.28.1","typescript":"^5.6.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.0","typescript":"^5.6.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apps-sdk_0.2.5_1786659664472_0.19498981102779278","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@aiofm/apps-sdk","version":"0.3.0","type":"module","description":"SDK + CLI for authoring durable AI-generation apps for aio.fm.","license":"SEE LICENSE IN LICENSE","homepage":"https://aio.fm/studio/apps/docs","repository":{"type":"git","url":"git+https://github.com/brennancheung/platform.git","directory":"app-devkit/sdk"},"keywords":["aio.fm","ai","workflow","sdk"],"engines":{"node":">=22"},"main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./package.json":"./package.json"},"bin":{"aio-app":"dist/cli.js"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"scripts":{"build":"node -e \"fs.rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.build.json","docs:llms":"node ../scripts/build-llms.mjs","prepack":"npm run docs:llms && npm run build","prepublishOnly":"npm run release:check","release:check":"npm run docs:llms && npm run build && node scripts/check-release.mjs && node ../scripts/audit-contract.mjs && npm run typecheck && npm test","typecheck":"tsc --noEmit","test":"vitest run"},"dependencies":{"esbuild":"^0.28.1","typescript":"^5.6.0"},"devDependencies":{"@types/node":"^22.0.0","typescript":"^5.6.0","vitest":"^2.1.0"},"gitHead":"2fd62045101d5fdcbcb7a1af05f2d20c90616d0e","_id":"@aiofm/apps-sdk@0.3.0","bugs":{"url":"https://github.com/brennancheung/platform/issues"},"_nodeVersion":"24.14.0","_npmVersion":"11.14.1","dist":{"integrity":"sha512-8zCQ/Hi8EPUfq4E/8QbKnu8uPNEmWL50rgeW/pa8U18VzJFZFpbiQok4caSgpz+LUXXnV+mmlP14ikkVEiAbdg==","shasum":"21a3909cc86f27270cdab076c7642db47606e583","tarball":"https://registry.npmjs.org/@aiofm/apps-sdk/-/apps-sdk-0.3.0.tgz","fileCount":32,"unpackedSize":236482,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFLgOYumf5oKFjnY7Dfc3PNog3SrrN51FgRa1JsXblDqAiAwl435g7zHYiIn5BzCa+InXdeOt2daklW2NgB2Z4QvWA=="}]},"_npmUser":{"name":"brennanai","email":"brennan@brennancheung.com"},"directories":{},"maintainers":[{"name":"brennanai","email":"brennan@brennancheung.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/apps-sdk_0.3.0_1787957420131_0.05844682195769124"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-03T23:34:06.593Z","modified":"2026-08-28T22:50:20.489Z","0.2.0":"2026-08-03T23:34:06.927Z","0.2.1":"2026-08-03T23:37:22.360Z","0.2.2":"2026-08-03T23:58:03.606Z","0.2.3":"2026-08-03T23:59:58.123Z","0.2.5":"2026-08-13T22:21:04.603Z","0.3.0":"2026-08-28T22:50:20.269Z"},"bugs":{"url":"https://github.com/brennancheung/platform/issues"},"license":"SEE LICENSE IN LICENSE","homepage":"https://aio.fm/studio/apps/docs","keywords":["aio.fm","ai","workflow","sdk"],"repository":{"type":"git","url":"git+https://github.com/brennancheung/platform.git","directory":"app-devkit/sdk"},"description":"SDK + CLI for authoring durable AI-generation apps for aio.fm.","maintainers":[{"name":"brennanai","email":"brennan@brennancheung.com"}],"readme":"# @aiofm/apps-sdk\n\nBuild your own tools for aio.fm.\n\nAn App turns a creative process into an input form anyone on your team can run.\nYou define what it needs, what the App does, and what it returns. When a\ngeneration or a person's response is not ready, the App automatically waits and\ncontinues when it is ready.\n\n## Create a project\n\n```bash\nnpx --yes @aiofm/apps-sdk create\n```\n\nThe setup command creates a standalone npm project, installs dependencies, and\nadds an `AGENTS.md` file for your coding agent. It works on macOS, Windows, and\nLinux. No API key is required to build or validate locally.\n\nNo pnpm installation or workspace checkout is required.\n\n## App shape\n\n```ts\nimport { defineApp, t } from \"@aiofm/apps-sdk\"\n\nexport default defineApp({\n  slug: \"clothing-labeler\",\n  name: \"Clothing Labeler\",\n  description: \"Print custom text onto a person's clothing\",\n\n  input: t.object({\n    person: t.asset(\"image\", { label: \"Person photo\" }),\n    text: t.string({ label: \"Text to print\" })\n  }),\n\n  output: t.object({\n    image: t.asset(\"image\")\n  }),\n\n  async run(ctx, input) {\n    const result = await ctx.generate.image({\n      references: [input.person],\n      prompt:\n        `Keep the same person and outfit, but print \"${input.text}\" ` +\n        `clearly on the front of the clothing`\n    })\n\n    return { image: result.assetId }\n  }\n})\n```\n\nInside `run`, `ctx` contains the actions your App can use. If an action needs\ntime, the App automatically waits until it is ready.\n\nWhat `ctx` can do today:\n\n- generate images and video\n- read assets, persona models (with Telegram/Fanvue/Drive readiness), and collections\n- queue Telegram persona posts, Fanvue posts, and Google Drive exports\n- call OpenRouter chat and vision models with the team key\n- resolve a video's already-stored first frame as an addressable image\n- pause for human reviews\n- use recorded time and randomness\n\nUse `t.object` only for the input and output roots. TypeScript rejects nested\nobject fields and arrays of objects before the App is published.\n\nThe installed package includes the complete coding-agent reference at\n`node_modules/@aiofm/apps-sdk/llms.txt`. The human guide and API reference are\nalso available in the\n[aio.fm App documentation](https://aio.fm/studio/apps/docs).\n\n## Build and test\n\nCreate an `input.example.json` file containing one value for every input:\n\n```json\n{\n  \"person\": \"image_sample\",\n  \"text\": \"AIO\"\n}\n```\n\nThen build and validate the App locally:\n\n```bash\nnpx aio-app build app.ts\nnpx aio-app validate app.bundle.js --input input.example.json\n```\n\nLocal validation uses simulated results and does not start a paid generation.\n\n## Connect to aio.fm\n\nWhen you are ready to publish or start a real run, open **Settings → API Keys**\nin aio.fm and create a user API key with:\n\n- `apps:read` to find Apps and inspect their versions\n- `apps:write` to publish Apps and new versions\n- `app-runs:read` to follow run progress and results\n- `app-runs:write` to start runs\n\nPersonally store the server and key in the project's Git-ignored\n`.aio-app.json` file:\n\n```bash\nnpx aio-app configure\n```\n\nSelect all four scopes when you want to publish and test a real run with the\nsame key. Starting a run authorizes the published App to perform its documented\n`ctx` actions, including saving an asset to a collection. Resource scopes such\nas `collections:write` are only needed when your script calls those HTTP APIs\ndirectly. Human review steps are answered by the assigned user in the aio.fm\nReview inbox.\n\nEvery platform action is authorized and attributed as the user associated with\nthe API key that starts the run. Treat the key like a password and keep it out\nof your App, source control, and agent chat.\n\nFor the complete guide and API reference, visit\n[aio.fm App documentation](https://aio.fm/studio/apps/docs).\n\n## Requirements\n\n- Node 22 or newer (use a current LTS release)\n- npm (included with Node)\n","readmeFilename":"README.md"}