Skip to content

Agent Integrations [1/3]: Server foundation - #157

Merged
hardtack merged 1 commit into
mainfrom
feat/agent-integrations-foundation
Nov 27, 2026
Merged

hardtack merged 1 commit into
mainfrom
feat/agent-integrations-foundation

Conversation

@azents-dev-app

Copy link
Copy Markdown
Contributor

Summary

Adds the server foundation for Agent integrations, starting with external MCP. This phase does not expose settings or external tool execution to users.

  • Stores typed MCP settings under a private Agent and protects Bearer credentials with the installation key, bound to the Agent and integration. Management results reconcile repeated requests without replaying saves or recreating deleted integrations.
  • Tests the current editor values by listing tools through strict MCP 2026-07-28 discovery. It reports a complete catalogue count (including zero) or a redacted failure, without invoking a tool or writing settings.
  • Restricts outbound connections to public HTTPS with normal certificate verification, no proxy inheritance or redirect following, and bounded discovery.

Review focus

  • Agent owner and current Team authorization, transaction-owned receipts, and the endpoint restriction on retained Bearer credentials.
  • Additive migration parity and refusal to downgrade while integration data or receipts exist.
  • The outbound transport and SDK lifecycle. Existing native tool registration and built-in send are unchanged.

Test Plan

  • cargo test --locked -p chapchoo-crypto -p chapchoo-persistence using SQLite and a disposable PostgreSQL database.
  • cargo test --locked -p chapchoo-service --lib, including HTTPS JSON/SSE fixtures, pagination, empty and incomplete catalogues, protocol/authentication errors, redirects, and rejection before dialing loopback.
  • Clippy with warnings denied for all three affected crates; cargo check --locked -p chapchoo --all-targets; documentation validator and its unit tests.

Spec Impact

The approved mcp-261126 Requirements, ADR, and Design define the feature. The next phase adds the Client and runtime contracts. Living Specs will be updated after the actual native and settings journeys are verified; this PR does not establish external tool availability in Chat.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-26T11:37:14.302661Z 9c06160 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9c061604a7

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

_ => return Err(failure()),
}
};
Ok(StreamableHttpPostResponse::Json(parsed, None))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve Streamable HTTP session IDs

When a stateful MCP server returns Mcp-Session-Id from server/discover, both response branches discard it by returning None, while post_message also rejects the non-None session ID that the SDK would provide on tools/list. The follow-up request therefore lacks the required session header and discovery fails, unintentionally limiting the Streamable HTTP integration to stateless servers. Return the validated response session ID and permit it on subsequent discovery requests.

Useful? React with 👍 / 👎.

@hardtack
hardtack merged commit 6c97321 into main Nov 27, 2026
13 checks passed
@hardtack
hardtack deleted the feat/agent-integrations-foundation branch November 27, 2026 16:44
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