Skip to content

feat(adapter-x): use auth-sensitive session lifecycle#19

Merged
jolestar merged 2 commits intomainfrom
feat/x-auth-sensitive-session
Mar 22, 2026
Merged

feat(adapter-x): use auth-sensitive session lifecycle#19
jolestar merged 2 commits intomainfrom
feat/x-auth-sensitive-session

Conversation

@jolestar
Copy link
Contributor

Summary

  • switch the X adapter to authPolicy.mode = bootstrap_then_attach
  • update local-mcp site tests so the built-in X preset now requires the auth-sensitive session path
  • refresh README, migration notes, and bridge skill references to use managed-profile startup examples for X

Testing

  • pnpm --filter @webmcp-bridge/local-mcp test
  • pnpm --filter @webmcp-bridge/adapter-x test
  • pnpm lint

Copilot AI review requested due to automatic review settings March 21, 2026 14:43
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the X adapter and related docs/tests to use local-mcp’s auth-sensitive managed-profile lifecycle (authPolicy.mode = bootstrap_then_attach), aligning startup and skill guidance with the bootstrap/attach session control flow.

Changes:

  • Switch @webmcp-bridge/adapter-x to authPolicy.mode = bootstrap_then_attach (with allowAnonymousTools).
  • Update local-mcp tests to assert the built-in x preset exposes the expected authPolicy.
  • Refresh docs/skill references (README, migration notes, bridge skill references, adapter docs) to use managed-profile startup examples.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
skills/webmcp-bridge/references/usage-patterns.md Adds session-control usage (bridge.session.status / bootstrap) and notes about first-run sign-in.
skills/webmcp-bridge/references/link-patterns.md Documents that auth-sensitive sites must keep --user-data-dir for bootstrap/attach reuse.
packages/local-mcp/test/sites.test.ts Asserts built-in x manifest now includes the auth-sensitive authPolicy.
packages/local-mcp/test/cli.test.ts Asserts resolveSiteDefinition("x") returns the expected authPolicy.
packages/adapter-x/src/index.ts Changes X adapter manifest authPolicy.mode to bootstrap_then_attach and enables allowAnonymousTools.
docs/migration.md Updates X startup example to include headed managed-profile flags; adds migration note about auth-sensitive lifecycle.
docs/adapters/x.md Documents the auth-sensitive session model and recommended startup path for X.
README.md Updates quick start example(s) for X to use headed managed-profile invocation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

README.md Outdated

```bash
webmcp-local-mcp --site x --headless
webmcp-local-mcp --site x --no-headless --user-data-dir ~/.uxc/webmcp-profile/x
Copy link

Copilot AI Mar 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

README now shows the exact same webmcp-local-mcp --site x --no-headless --user-data-dir ... command twice (once under “Built-in fallback adapter mode” and again immediately under the auth-sensitive guidance). This duplication makes the quick-start harder to scan; consider removing one block or making the first example the “normal” invocation and the second specifically the initial headed bootstrap/sign-in step.

Suggested change
webmcp-local-mcp --site x --no-headless --user-data-dir ~/.uxc/webmcp-profile/x
webmcp-local-mcp --site x --headless --user-data-dir ~/.uxc/webmcp-profile/x

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the duplicate headed example. The generic built-in adapter example now stays headless, and the auth-sensitive note keeps the explicit headed bootstrap step.

Comment on lines 15 to +19
hostPatterns: ["x.com", "www.x.com", "*.x.com"],
authPolicy: {
mode: "none",
mode: "bootstrap_then_attach",
authProbeTool: "auth.get",
allowAnonymousTools: true,
Copy link

Copilot AI Mar 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@webmcp-bridge/adapter-x’s manifest reports version: "0.4.0", but the package.json version is 0.5.0. If consumers rely on manifest.version for diagnostics or compatibility checks, this mismatch can be misleading; consider keeping manifest.version in sync with the package version.

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aligned manifest.version with packages/adapter-x/package.json in follow-up commit 6a697be.

@jolestar jolestar merged commit 71f061b into main Mar 22, 2026
1 check passed
@jolestar jolestar deleted the feat/x-auth-sensitive-session branch March 22, 2026 09:22
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.

2 participants