Public: anyone can read this; nobody can change it.
Absorb: an app becomes one of the forge's features #75
Closed without the crew
commented
Thanks Ben. Absorb is on the forge trunk now (forge.open-platform.sh/trevato/forge), with your commit kept as yours: 9e74449c. Two fixes on top: an unapproved guest preview gets no feature settings, and only production can rename the menu entry. The trunk lives at forge.open-platform.sh now, so send future work there, from your forge as a followed source or as a pull; this mirror is going away. Closing this one since it landed.
Sign in to join this conversation.
new above
offline
Absorb lets the forge take one of its own apps in as a feature, without a line of the app's code moving into the forge. The app keeps its repository, its cell, its data and its deploys. The forge gives it a place in the menu and keeps its settings, typed by what the app declares.
Ben is running this on his forge (forge-apps.benjivers.com) now, with his
radarapp absorbed. From the forge's settings he can change which days the radar runs, at what hour, and whether its web scout is on, with no change to the radar's code.How an app opts in
The types are
bool,int(min/max),string,choice,daysandlist. The block is fail-closed like the rest of forge.json: a wrong one is refused with the field named, including two keys that would collide on one env var.What absorbing does
PUT /api/v1/features/:slug, or thefeaturesMCP tool. The tool is on the ask-first list, since absorbing restarts the app and changes the menu./apps/open, so a private one needs no second sign-in. Absorbing widens no access./settings/features/:slugis a form typed by the declaration (alsoPATCH /api/v1/features/:slug/settings). A value that doesn't fit is refused with the setting named, and nothing is kept.FORGE_FEATURE=1and aFORGE_SETTING_<NAME>per setting, read from the commit being started.appEnvlets through only those names, never one the forge sets itself. The start, a wake and the app's terminal all get them. A change redeploys the app, the same way an env change does.app.absorbed,app.unabsorbed, andapp.feature_settings(which names the keys, never the values).What it adds
src/apps/feature.ts,src/apps/feature_env.ts,src/core/features.ts, and one additive migration (pinned)src/actions/features.tssrc/web/pages/features.tssrc/http/api/features.tswith 5 OpenAPI rows, andsrc/http/mcp/tools/features.tsprocess.ts,runtime.ts,tty.ts,layout.ts(the menu),settings_routes.ts,origins.ts(the sidebar),activity.tsandconversation_confirm.tsdocs/features/absorb.mdand the env rows indocs/APPS.mdTests
test/features.test.ts(14 tests) holds the rules:FORGE_TOKEN,PORTorFORGE_APP_DATAthrough a feature.On a Mac, on this branch (rebased onto 0.7.394):
tscis clean, andbun scripts/gate.tspasses against main.schema-migrationsfails 2 tests here exactly as on main: the Mac's Bun 1.3.9 banner, and main's unpinned20261104120000-flow-return.On Ben's forge, the same change ran the full suite on his box. The only failures were ones his main also has there (browser captures, git's date format).
Not in this
These would be the next slices if you want them: a schedule the forge fires instead of the app's own timer, feed items, the app's MCP tools inside the forge's
/mcp,secretsettings, and a health row on/system.🤖 Generated with Claude Code