feat(mcp): make per-agent MCP connector OSS-core (trinity-enterprise#118 Part A)#1555
Merged
Conversation
…118 Part A) Relocate the per-agent MCP connector (ent#46/#55/#51, shipped v0.8.0 entitlement- gated as `mcp_connector`) from the private enterprise submodule into OSS core, and drop the entitlement gate front and back. Decision (Eugene, 2026-07-09): sharing agents via individual MCP connectors is a platform-adoption surface, not a paid module. Backend (router → service → db, Invariants #1/#2/#14): - routers/connector.py — /api/agents/{name}/connector* (config, mint/regenerate/ revoke key, playbooks), mounted unconditionally in main.py; no requires_entitlement. - services/connector_service.py — snippet builder + playbook resolution. - db/connector.py (ConnectorOperations) — config CRUD + scoped-key mint/revoke into mcp_api_keys (scope='connector'); facade delegators on database.py. - models.py — ConnectorConfigUpdate/Status/KeySecret/Playbook/ClientSnippet. Schema: enterprise_connectors table re-homed onto OSS dual-track (db/tables.py, db/schema.py, db/migrations.py:enterprise_connectors_table + Alembic 0015_enterprise_connectors). Name kept so existing enterprise installs adopt their data with zero migration (CREATE TABLE IF NOT EXISTS, no duplicate-table drift). Delete/rename cascade via an enterprise_connectors AGENT_REF. Frontend: ConnectorChannelPanel un-gated in SharingPanel.vue (dropped the isEntitled('mcp_connector') v-if + the now-unused enterprise store wiring). The MCP proxy tools (connector.ts), the connector-scope auth fence (dependencies.py), and ExposedToolsPanel.vue were already OSS and edition-agnostic. `mcp_connector` is removed from the entitlement registry by the paired enterprise PR (deletes register_module). Docs: requirements mcp.md §7.5 + feature-flows/mcp-connector.md + architecture/index. Tests: tests/unit/test_118_mcp_connector_oss.py (11) — service helpers, config CRUD, key mint/regenerate/revoke, scope='connector' validate contract. Part B (email-auth onboarding, #848) deferred pending design sign-off. Related to trinity-enterprise#118 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… double-mounted (#118) #1555 makes the per-agent MCP connector OSS-core. The enterprise submodule was pinned at 630cca9e, which still ships backend/mcp_connector/ and registers it via register_enterprise() — so an enterprise build would double-mount the connector router alongside the new OSS-core one. Bump the pin to f5d69be6 (enterprise main post trinity-enterprise#121), where the private module is removed. This forward-integrates two already-on-enterprise-main commits into the pin: - trinity-enterprise#121 — removes backend/mcp_connector/ (the intended pair) - trinity-enterprise#120 — ENTERPRISE_LOCAL_DEV docs (docs only) - trinity-enterprise#106 — client-portal umbrella (already on enterprise main) OSS-only CI is unaffected (submodule is update=none / "boots without enterprise"). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
vybe
approved these changes
Jul 9, 2026
vybe
left a comment
Contributor
There was a problem hiding this comment.
Validated via /validate-pr. Makes the per-agent MCP connector OSS-core (trinity-enterprise#118 Part A); paired with trinity-enterprise#121 (merged) which removes the private module. I pushed commit 2b592b8 bumping the enterprise submodule pin 630cca9e → f5d69be6 (post-#121) so an enterprise build won't double-mount the connector router. Required checks green; OSS-only CI unaffected (submodule is update=none). Security scan clean. Approving to complete the pair.
obasilakis
added a commit
that referenced
this pull request
Jul 12, 2026
…nto 0015_enterprise_connectors (#1081) Resolves the PR #1550 review blockers. Conflicts (all additive-vs-additive, both sides kept): - db/migrations.py — dev's enterprise_connectors_table (#118) + this branch's two pull migrations; MIGRATIONS list ordered to match the new Alembic chain. - canary/snapshot.py — dev's E-04/G-04 queued_meta collection (#1077) alongside this branch's lease_expires_at collection (#1081 Phase 3). Both columns are PRAGMA-guarded independently. - tests/test_canary_invariants.py — _add_execution helper takes both parameter sets (duration_ms/queued_at/backlog_metadata + lease_expires_at). - learnings.md — both sides' entries retained. Alembic re-chain (two heads after #1555 landed 0015_enterprise_connectors off 0014, which this branch also chained off): - 0015_schedule_executions_pull_claim_lease -> 0016, down_revision now 0015_enterprise_connectors. - 0016_schedule_executions_redelivery_count -> 0017. - Chain is linear again: 0014 -> 0015_enterprise_connectors -> 0016 -> 0017 (single head, verified via ScriptDirectory.get_heads()). - Rollback runbook downgrade target corrected: 0015_enterprise_connectors, NOT 0014 — the latter would also drop dev's enterprise_connectors table. SQLite track reconciled: enterprise_connectors_table + the two pull migrations all present in MIGRATIONS, in Alembic order.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Relocates the per-agent MCP connector (ent#46/#55/#51, shipped v0.8.0 entitlement-gated as
mcp_connector) from the private enterprise submodule into OSS core, un-gated. Per Eugene's decision (2026-07-09) this is a platform-adoption surface, not a paid module. Part A of trinity-enterprise#118; the paired enterprise removal istrinity-enterprisePR (linked below). Part B (email-auth onboarding, #848) is deferred pending design sign-off.What moved (mostly relocation + un-gate)
routers/connector.py(mounted unconditionally, norequires_entitlement),services/connector_service.py,db/connector.py(ConnectorOperations+ facade delegators), 5 models inmodels.py.enterprise_connectorsre-homed onto OSS dual-track —db/tables.py,db/schema.py,db/migrations.py:enterprise_connectors_table+ Alembic0015_enterprise_connectors. Name kept so existing enterprise installs adopt their data with zero migration (CREATE TABLE IF NOT EXISTS, no duplicate-table drift). Delete/rename cascade via anenterprise_connectorsAGENT_REF.ConnectorChannelPanelun-gated inSharingPanel.vue(droppedisEntitled('mcp_connector')+ now-unused enterprise-store wiring).connector.tsproxy tools, the connector-scope auth fence independencies.py,ExposedToolsPanel.vue.Acceptance criteria (Part A)
ConnectorChannelPanel.vueun-gated.mcp_connectorremoved from the entitlement registry (paired enterprise PR deletesregister_module).mcp.md§7.5 +feature-flows/mcp-connector.md+ architecture/index.Testing
tests/unit/test_118_mcp_connector_oss.py— 11 passed (service helpers, config CRUD, key mint/regenerate/revoke,scope='connector'validate contract). Guards green: schema-parity, alembic-parity, revision-id-length, models-centralized. SharingPanel.vue compiles.Coordination notes
mcp_connectorregistration) so the router isn't double-mounted at runtime.0015_enterprise_connectors(down_revision0014). The voice PR test(ci): auto-trigger frontend-e2e (nightly + frontend paths), keep ui opt-in (#1526) #1551... (correction) — the voice-replies branch also uses0015/0016; whichever merges second must rebase its revision'sdown_revision. Flagging for the merge order.Related to trinity-enterprise#118
🤖 Generated with Claude Code