You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NimbleBrain's bundle lifecycle supports install, uninstall, start, stop — but no upgrade. Once a registry-based bundle ({name: "@nimblebraininc/foo"}) is installed in a workspace, there's no mechanism that pulls a newer version from mpak. The workspace keeps running whatever was fetched on initial install, indefinitely.
This works but has real downsides (see below). More importantly, it's not discoverable — users don't know "upgrade = uninstall + install" is the incantation.
Why this matters
Concrete scenario from this week:
We cut synapse-crm v0.2.0 and synapse-todo-board v0.2.0 to fix a user-visible tool bug (agents orphaning tasks into undefined columns) and migrate to a new tool contract (flat kwargs).
For every tenant / local install currently running v0.1.0 of these bundles, NimbleBrain doesn't know the newer version exists. There's no "updates available" signal, no reconcile, no prompt.
The tenant keeps running a known-bad version until someone manually intervenes with the uninstall/install dance.
Multiply by every bundle in the registry and every tenant running them. The answer to "how do I upgrade?" shouldn't require reading the lifecycle source.
Downsides of uninstall+install as the upgrade path
Not atomic: between uninstall and install, the bundle is unavailable. Any agent turn in that window fails.
Loses installed state: if configure-style credentials or env allowlists live alongside the bundle entry, uninstall wipes them.
Not discoverable: neither the agent nor a human user has an obvious way to express "move to latest."
No rollback: if the new version is broken, getting back requires another uninstall + install pinned to an older version — and we don't support version pinning either (see below).
No "check for updates": you can't ask NimbleBrain "is there a newer version than what I have?" without manually inspecting the mpak registry.
Proposed
Three independent-ish pieces. Ship in any order; each is useful alone.
A read-only tool nb__updates_available (or part of existing nb__search output) that lists installed bundles whose mpak latest exceeds their installed version and respects any pin
Surfaces in a dashboard widget or as a notification
No automatic action — just visibility
Deliberately no automatic background reconcile / auto-upgrade. Upgrades should be user-triggered. Too easy to break a workspace with a silent auto-update at the wrong moment.
Out of scope for this issue
Path-based bundles ({path: ...}) — these are dev-mode references and intentionally have no upgrade concept. Changes are picked up on bundle-process restart. The upgrade flow here is "pull + restart the bundle server", handled at the git layer.
Remote-URL bundles ({url: ...}) — could support versioned URLs but treating them as always-latest is probably correct.
Problem
NimbleBrain's bundle lifecycle supports
install,uninstall,start,stop— but noupgrade. Once a registry-based bundle ({name: "@nimblebraininc/foo"}) is installed in a workspace, there's no mechanism that pulls a newer version from mpak. The workspace keeps running whatever was fetched on initial install, indefinitely.Today the only way to get a newer version is:
This works but has real downsides (see below). More importantly, it's not discoverable — users don't know "upgrade = uninstall + install" is the incantation.
Why this matters
Concrete scenario from this week:
Multiply by every bundle in the registry and every tenant running them. The answer to "how do I upgrade?" shouldn't require reading the lifecycle source.
Downsides of uninstall+install as the upgrade path
Proposed
Three independent-ish pieces. Ship in any order; each is useful alone.
1.
nb__manage action=upgradeactionBehavior:
allowedEnv, credentials refs, etc.)Implementation notes:
BundleLifecycleManagergets anupgrade(name, wsId, registry)method that composes the existinginstallNamed+ diff logicuninstall + installworking as a fallback;upgradeis additive2. Version pinning in
workspace.jsonToday:
{ "name": "@nimblebraininc/foo" }Proposed (all valid, backward-compat):
{ "name": "@nimblebraininc/foo" } // implicit latest (current behavior) { "name": "@nimblebraininc/foo", "version": "latest" } // explicit latest { "name": "@nimblebraininc/foo", "version": "^0.2" } // semver range { "name": "@nimblebraininc/foo", "version": "0.2.1" } // exact pinOn install / upgrade, resolve the spec against mpak's published versions. Matches npm / pip conventions; no surprises for consumers used to those.
Opens the door to:
nb__manage action=upgradehonors the pin (won't cross a major boundary unless you widen the range)nb__manage action=rollbackto previous installed version3. Optional: "updates available" surface
Not required but cheap to add once #1 is in:
nb__updates_available(or part of existingnb__searchoutput) that lists installed bundles whose mpaklatestexceeds their installed version and respects any pinDeliberately no automatic background reconcile / auto-upgrade. Upgrades should be user-triggered. Too easy to break a workspace with a silent auto-update at the wrong moment.
Out of scope for this issue
{path: ...}) — these are dev-mode references and intentionally have no upgrade concept. Changes are picked up on bundle-process restart. The upgrade flow here is "pull + restart the bundle server", handled at the git layer.{url: ...}) — could support versioned URLs but treating them as always-latest is probably correct.Related
BundleLifecycleManagerinsrc/bundles/lifecycle.tssrc/tools/system-tools.ts(wherenb__manageis wired)Severity
Medium-to-high. Every bundle update beyond v0.1.0 hits this gap. As the mpak ecosystem grows, the pain scales linearly.