* fix(invites): preserve active organization for external access
Keep organization activation server-owned so failed membership checks cannot clear a valid session context.
* feat(admin, billing, settings): cleanup settings visibility, billing actor resolution, new admin routes
* address comments
* chore(db): reset pending migrations before staging merge
Remove locally generated migrations so they can be regenerated against the latest staging schema without preserving stale snapshots or numbering.
* regen migrations
* address comments
* chore(db): reset generated migrations before staging merge
Remove this branch's generated migrations so they can be regenerated against the latest staging schema with fresh numbering.
* upgrade global work
* fix lint
* address comments
* legacy callbacks correctness
* address comments
* update
* guardrail attribution
* feat(vfs): add lazy vfs + remove dynamic fields for prompt caching hits
* feat(vfs): send typed workspace snapshot for append-only deltas
Build the workspace inventory from the primary db (fixes replica-lag staleness)
and emit it as a typed VfsSnapshotV1 `vfs` payload alongside the markdown, so the
mothership can diff it into append-only baseline/delta messages. Generate the TS
contract mirror from the Go-owned JSON schema (sync-vfs-snapshot-contract) and
sort connector types so diffs stay byte-stable.
* fix(lint): fix lint
* fix(vfs): forward the typed snapshot through the branch payload builder
The branch buildPayload implementations hand-list the params they pass to
buildCopilotRequestPayload and forwarded workspaceContext but dropped vfs, so the
typed snapshot never reached the Go request (req.Vfs was always nil and the
append-only delta path never engaged). Forward vfs in both the workflow and
workspace branches, and add a regression guard asserting the branch threads it
through (the bug slipped past tests because post.test mocked the payload builder
and payload.test called it directly, bypassing the branch).
* improvement(contracts): update vfs contracts
* feat(feature-flags): AppConfig-backed gated feature flags
* fix(ci): repoint 'Validate feature flags' step to env-flags.ts after rename
* improvement(feature-flags): drop in-code defaults; fallback resolves a per-flag secret, gating is AppConfig-only
* improvement(feature-flags): make flag names a closed set so every flag requires a fallback secret
* improvement(feature-flags): single FEATURE_FLAGS registry — each entry defines name, description, and fallback in one place
* improvement(feature-flags): fallback is the env secret key (keyof typeof env), resolved to a boolean
* feat(mothership): add enrichment_run server tool for one-off lookups
Implement the Sim-side handler for the copilot enrichment_run tool: runs the
enrichment provider cascade for a single entity and returns the result inline,
surfacing the hosted-key cost as _serviceCost for per-round billing (matching
the media tools). Registered in the server-tool router.
Regenerate the copilot tool catalog/schemas to include enrichment_run.
* fix(mothership): remove leftover touch_plan tool references
touch_plan was removed from the copilot tool catalog earlier, but the Sim side
still referenced it. Regenerating the generated tool catalog (for enrichment_run)
synced it to the current contract and dropped the stale TouchPlan export, which
broke the build where router.ts still imported it.
Remove the dead touch_plan server tool and its test, drop its router
registration and WRITE_ACTIONS entry, simplify getServerToolRegistry (no more
beta-gated server tools), and clean up stale "use touch_plan" guidance strings.
* chore(mothership): trigger dev redeploy
* improvement(mothership): log billed cost on enrichment_run lookups
* fix(contracts): regenerate mship contracts
* fix(contracts): fix mship contracts