Skip to content

feat: identity app surface — W1: remove nb__manage_app#273

Merged
mgoldsborough merged 2 commits into
stage-2/mainfrom
feat/identity-app-surface
May 25, 2026
Merged

feat: identity app surface — W1: remove nb__manage_app#273
mgoldsborough merged 2 commits into
stage-2/mainfrom
feat/identity-app-surface

Conversation

@mgoldsborough
Copy link
Copy Markdown
Contributor

@mgoldsborough mgoldsborough commented May 24, 2026

First slice of the identity app surface effort (stacked on #272 / stage-2/main; retarget to main if #272 merges first). This branch will accumulate the rest of the work — global tool dispatch (W3), identity host path + root /conversations route (A3/A4), and the Files/Automations migrations (Phases B/C). Design + sign-off live in nimblebrain-ops/research/delegation-model/IDENTITY_APP_SURFACE.md.

W1 — remove nb__manage_app

The conversational bundle install/uninstall/configure chat tool is removed (signed off), not redesigned. It was non-functional today, and conversational workspace mutation deserves real design later (single tool, explicit workspace param, per-call admin auth). The underlying install lifecycle, nb CLI, Apps catalog, and connector config UI are all unaffected.

Changes

  • system-tools.ts — drop the manage_app tool def + the configureBundle / installBundleInWorkspaceViaCtx / uninstallBundleFromWorkspaceViaCtx helpers + ManageBundleContext. gate / manageBundleCtx become reserved positional slots (_gate / _manageBundleCtx) so every call site's arity holds (the file's reserved-slot convention).
  • runtime.ts — drop the manageBundleCtx construction + its call-site arg.
  • features.ts / privilege.ts — drop the manage_app feature-map entries and privilege rule. The bundleManagement flag is kept as a reserved operator config knob for the bundle-management tool the design contemplates reintroducing.
  • bootstrap.md / skill-authoring.md — install and credential setup now happen in the Apps catalog / CLI, not chat.
  • CLI deprecation strings + stale comments across startup.ts, workspace-ops.ts, connector-tools.ts, workspace-credentials.ts repointed off manage_app.

Dead-code cleanup (addresses QA review)

Removing manage_app orphaned two helpers whose only caller was the deleted uninstallBundleFromWorkspaceViaCtx:

  • resolveBundleServerName (system-tools.ts) and uninstallBundleFromWorkspace (workspace-ops.ts) are both deleted — they had zero production callers after W1.
  • The canonical uninstall is BundleLifecycleManager.uninstall(), which is self-contained (resolves the server name via its instance map, runs the protected check, removes the source, clears workspace credentials, unregisters placements/config/automations). It never called either helper.
  • installBundleInWorkspace is kept — it's still live (connector install at connector-tools.ts).

Tests

  • Delete the two manage_app-only integration files (configure-credentials, bundles-workspace-bundle-mgmt) and the two unit files that pinned the now-deleted helpers (workspace-ops-uninstall, workspace-uninstall-credentials).
  • The live uninstall behaviors are covered against lifecycle.uninstall() in lifecycle.test.ts: protected reject, credential file removal + sibling untouched, data-dir preservation, idempotent no-op.
  • Repoint the privilege / audit / role-visibility tests to the surviving skills__create gate; assert nb__manage_app is absent.

Verification

  • verify:static clean (format, lint, tsc, cycles, code-style, codegen).
  • Unit 3069 / web 311 pass.
  • Integration 605 pass / 3 fail — the 3 are pre-existing instructions-rework failures (a separate compose.ts Layer-2-overlay bug), unchanged by this PR.

Follow-ups (not in this PR)

  • schemas.nimblebrain.ai (products/nimblebrain/schemas) still describes bundleManagement / protected in terms of nb__manage_app. That schema is fetched into src/config/nimblebrain-config.schema.json on postinstall, so it can't be fixed here.
  • forcePrompt on the credential resolver no longer has a caller (it was manage_app configure's); kept as a generic capability.

Rip out the conversational bundle install/uninstall/configure chat tool.
It was non-functional today, and conversational workspace mutation deserves
real design later (single tool, explicit workspace param, per-call admin
auth) — so remove rather than redesign. The install lifecycle, CLI, catalog,
and connector config UI are unaffected.

- system-tools.ts: drop the manage_app tool def + the configureBundle /
  install/uninstallBundleFromWorkspaceViaCtx helpers and ManageBundleContext.
  Keep the exported resolveBundleServerName (still consumed by uninstall).
  gate/manageBundleCtx become reserved positional slots (_gate /
  _manageBundleCtx) so every call site's arity holds.
- runtime.ts: drop the manageBundleCtx construction + call-site arg.
- features.ts / privilege.ts: drop the manage_app feature-map entries and
  privilege rule. bundleManagement flag kept as a reserved operator knob.
- bootstrap.md / skill-authoring.md: install + credential setup now happen
  in the Apps catalog / CLI, not chat.
- CLI deprecation strings + stale comments repointed off manage_app.
- Tests: delete the two manage_app-only integration files; repoint the
  privilege/audit/visibility tests to the surviving skills__create gate;
  assert manage_app is absent.
QA review caught that resolveBundleServerName (system-tools.ts) and
uninstallBundleFromWorkspace (workspace-ops.ts) had exactly one caller —
the uninstallBundleFromWorkspaceViaCtx helper this PR already removed — so
both are dead production code after W1, not "consumed by the uninstall
path" as the PR body wrongly claimed.

The canonical uninstall is BundleLifecycleManager.uninstall(), which is
self-contained: it resolves the server name via its instance map, runs the
protected check, removes the source, clears workspace credentials, and
unregisters placements/config/automations. It never touched either helper.

- Delete both functions and their two unit tests
  (workspace-ops-uninstall, workspace-uninstall-credentials). Those tests
  only pinned dead code; the live behaviors are covered against
  lifecycle.uninstall() in lifecycle.test.ts (protected reject, credential
  file removal + sibling untouched, data-dir preservation, idempotent
  no-op).
- installBundleInWorkspace stays — it's still live (connector install).
- Drop the stale comments that referenced the deleted sibling and a
  non-existent "catalog/connector uninstall" caller.
@mgoldsborough mgoldsborough merged commit eab163a into stage-2/main May 25, 2026
@mgoldsborough mgoldsborough deleted the feat/identity-app-surface branch May 25, 2026 18:49
mgoldsborough added a commit that referenced this pull request May 25, 2026
* feat(stage-2/identity-apps W1): remove nb__manage_app

Rip out the conversational bundle install/uninstall/configure chat tool.
It was non-functional today, and conversational workspace mutation deserves
real design later (single tool, explicit workspace param, per-call admin
auth) — so remove rather than redesign. The install lifecycle, CLI, catalog,
and connector config UI are unaffected.

- system-tools.ts: drop the manage_app tool def + the configureBundle /
  install/uninstallBundleFromWorkspaceViaCtx helpers and ManageBundleContext.
  Keep the exported resolveBundleServerName (still consumed by uninstall).
  gate/manageBundleCtx become reserved positional slots (_gate /
  _manageBundleCtx) so every call site's arity holds.
- runtime.ts: drop the manageBundleCtx construction + call-site arg.
- features.ts / privilege.ts: drop the manage_app feature-map entries and
  privilege rule. bundleManagement flag kept as a reserved operator knob.
- bootstrap.md / skill-authoring.md: install + credential setup now happen
  in the Apps catalog / CLI, not chat.
- CLI deprecation strings + stale comments repointed off manage_app.
- Tests: delete the two manage_app-only integration files; repoint the
  privilege/audit/visibility tests to the surviving skills__create gate;
  assert manage_app is absent.

* fix(W1): delete dead uninstall helpers orphaned by manage_app removal

QA review caught that resolveBundleServerName (system-tools.ts) and
uninstallBundleFromWorkspace (workspace-ops.ts) had exactly one caller —
the uninstallBundleFromWorkspaceViaCtx helper this PR already removed — so
both are dead production code after W1, not "consumed by the uninstall
path" as the PR body wrongly claimed.

The canonical uninstall is BundleLifecycleManager.uninstall(), which is
self-contained: it resolves the server name via its instance map, runs the
protected check, removes the source, clears workspace credentials, and
unregisters placements/config/automations. It never touched either helper.

- Delete both functions and their two unit tests
  (workspace-ops-uninstall, workspace-uninstall-credentials). Those tests
  only pinned dead code; the live behaviors are covered against
  lifecycle.uninstall() in lifecycle.test.ts (protected reject, credential
  file removal + sibling untouched, data-dir preservation, idempotent
  no-op).
- installBundleInWorkspace stays — it's still live (connector install).
- Drop the stale comments that referenced the deleted sibling and a
  non-existent "catalog/connector uninstall" caller.

---------

Co-authored-by: Mathew Goldsborough <1759329+mgoldsborough@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant