feat: agent-native Connectors + integration marketplace (0196) - #160
Merged
Conversation
…rketplace Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The agent-native Connector framework's foundation: a first-class `agentTools` contribution point (model-facing tools not tied to a UI command, unlike 0194's contributionsAsAiTools). AiSurfaceService gains `extraTools` as the single merge point — getTools() lists them and callTool() dispatches them — so a contributed tool surfaces in the in-app AI AND the MCP server with one registration. MCP server gains an `agentTools` config; contributed tools are deferred (not in MCP_CORE_TOOL_NAMES). Built-in xnet_* names always win over colliding extras. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
defineConnector produces a FeatureModule (hub feature wired by convention at <id>.sync) bundling capabilities + a sync adapter + agentTools. runConnectorSync composes the guards so an author writes plain store/fetch calls while the framework guarantees: egress containment (guardedFetch), schema-write containment (guardStore), required-target-space + space-stamp (no cross-space leak), and a write budget on a new dedicated `connector` AbuseSurface (separate from the agent's localApi budget). 12 governance tests cover each guarantee. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The server-side half of a Connector, generic over an injected `run` so the hub takes no @xnetjs/plugins edge. mountFeatures scopes env to the connector's declared secrets before mount, so the token never escapes the hub; the authed POST /x/<id>.sync/run runs one sync pass with the scoped env + the session DID + a body-supplied target space. 3 tests: secret scoping, 401 unauth, error→400. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…fold` (0196) Adds a `connector` scaffold template that emits a defineConnector(...) project (capabilities + sync.pull + an agent tool, with schemaWrite/sync.schemas sharing one SCHEMA const so the coherence check passes) and the `xnet connector scaffold <id>` CLI command reusing the shared scaffold file-writer. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…-gate, CLI-wrap (0196) One definition → every surface: emitConnectorArtifacts produces tool descriptors + a SKILL.md fragment + a `connectors`-category marketplace entry; connectorAsImporter generalizes the dormant 0189 importers point; evaluateConnectorInstall hard-blocks secret-holding AI-generated connectors from auto-install (manual promotion required); wrapCliConnector turns an external agent-native CLI (Printing Press et al.) into a governed Connector by mapping its output into space-stamped nodes (egress caveat documented). 7 tests. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
All implementation-checklist items shipped on this branch; check off the inline checklists, add an Implementation Status table (what shipped vs. seams), and mark the filename [x]. Bridge-advertising is satisfied via `xnet mcp serve`; a Connectors marketplace view and per-user OAuth are documented as deferred. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…nectors-0196 # Conflicts: # packages/cli/src/cli.ts
Contributor
|
Preview removed for PR #160. |
Contributor
🖼️ UI changes in this PRNo visual differences detected in the changed UI. |
crs48
added a commit
that referenced
this pull request
Jun 18, 2026
Backfills the notable user-facing PRs that merged before the changelog automation existed (or were flagged `needs-changelog`): | Entry | PR | |---|---| | A richer, interactive changelog | #151 | | xNet adapts to your phone (mobile workbench) | #156 | | See your local agent in the AI panel | #163 | | Paid plugins | #157 | | Agent-native Connectors | #160 | | A new look — cosmic-web app icons | #153 | Each fragment carries its **original** PR number, so `resolve-prs` leaves it untouched and the gallery/link point at the right PR. The **#156 entry auto-pulls its real mobile-vs-desktop before/after sliders** from `visuals/pr/156/` — confirming the auto-gallery works on a backfilled entry. This PR also exercises the new flow itself: it **adds fragments**, so the required `changelog-section` check passes via the fragment-present path (no `skip-changelog` label). Verified locally: `validate:changelog` → 19 fragments valid; `astro build` clean; all 6 articles + the #156 before/after gallery render. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
crs48
added a commit
that referenced
this pull request
Jun 18, 2026
## What Backfills the changelog so it reflects what's live on `main`. The per-PR fragment system (exploration 0197) was current through PR #163 (PR #178 backfilled #151/#153/#156/#157/#160/#163), but the recent **0198/0199 batch** and a couple of stragglers shipped without entries. This adds 7 fragments, with prose lifted from each PR's own `## Changelog` block where present. | PR | Entry | Tags | |---|---|---| | #143 | AI chat that knows your workspace | `ai` | | #167 | Linear-grade Tasks | `tasks` `app` | | #169 | Cleaner page editor typography | `editor` | | #170 | Bring your Slack data into xNet | `plugins` `platform` | | #171 | Smoother, more consistent motion | `app` | | #173 | Airtable-grade database grids | `app` | | #174 | A redesigned chat & channels experience | `app` | ## Deliberately excluded - **In-editor AI (#154 / #158)** — shipped the transform engine + diff/approval logic, but both PRs state the `/ai` UI wiring into the running app is **deferred**, so it isn't user-visible yet. An entry would overclaim. - **Slack (#170)** — entry scoped to the migration connector + compatibility layer (genuinely live); avoids claiming the webhook/slash-command hub endpoints work, since they're generic-over-an-injected-sink and not mounted in a running server yet. - Pure infra/ops/docs PRs (cloud M1/M2, CI, runbooks) — not user-facing. ## Verification - `validate-changelog.ts` → **26 fragments valid** (19 existing + 7 new) - `prettier --check` on all new files → clean - Newest-first ordering confirmed — the 7 entries slot in at the top ## Changelog <!-- This PR only adds changelog fragments for already-merged work; it ships no user-facing change of its own. --> 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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.
Agent-Native Connectors (exploration 0196)
xNet's answer to the OpenClaw / Printing Press "agent-native CLI" pattern — but instead of giving an agent a credentialed shell, a Connector syncs an external service into governed XNet nodes and exposes agent-callable tools over them. The agent operates on a policy-evaluated data plane; the service credential never leaves the hub. Implements docs/explorations/0196.
What shipped (package-layer vertical slice, all tested)
agentToolscontribution point (@xnetjs/plugins) — first-class model-facing tools, not tied to a UI command.AiSurfaceServicegainsextraToolsas the single merge point, so one registration surfaces a tool in the in-app AI andxnet mcp serve(deferred, per progressive disclosure). Built-inxnet_*names always win over collisions.defineConnectorproduces aFeatureModule(hub feature wired at<id>.sync) bundling capabilities + a sync adapter + agentTools.runConnectorSynccomposes the guards so an author writes plainstore/fetchcalls while the framework guarantees: egress containment (guardedFetch), schema-write containment (guardStore), required target space + space-stamp (no cross-space leak), and a write budget on a new dedicatedconnectorAbuseSurface.@xnetjs/hub) —connectorSyncFeature, generic over an injected runner (no@xnetjs/pluginsedge);mountFeaturesscopes env to the connector's declared secrets, so the token never escapes the hub.connectorscaffold template +xnet connector scaffold <id>.emitConnectorArtifacts(tool descriptors + a SKILL.md fragment + aconnectors-category marketplace entry),connectorAsImporter(generalizes the dormant 0189 importers point),evaluateConnectorInstall(hard-blocks secret-holding AI-generated connectors from auto-install), andwrapCliConnector(turns an existing Printing Press CLI into a governed Connector).Tests
New:
agent-tools.test.ts(7),connectors.test.ts(12 governance),connectors-artifacts.test.ts(7), hubconnectors.test.ts(3), scaffold + CLI connector tests. Full suites green locally: integration 921, plus cli/abuse unit. Workspacetypecheck83/83,prettier --checkclean,eslint0 errors.Deferred / seams (documented in the doc's Implementation Status)
xnet mcp serve(theagentToolsconfig) — the spawned harness gets tools from the MCP server, so no bridge-server change was needed.wrapCliConnectorgoverns the output mapping, not the wrapped CLI's own egress (honest caveat in code + doc).🤖 Generated with Claude Code