Skip to content

feat: add HTTP and MCP transport adapters for protocol v0.1 - #19

Open
tim8es wants to merge 20 commits into
mainfrom
feature/transports-v0-1
Open

feat: add HTTP and MCP transport adapters for protocol v0.1#19
tim8es wants to merge 20 commits into
mainfrom
feature/transports-v0-1

Conversation

@tim8es

@tim8es tim8es commented Aug 29, 2026

Copy link
Copy Markdown
Owner

Scope

Implements issue #17 as a transport-only slice over the accepted MindRail v0.1 protocol.

This PR is being built with RED -> GREEN TDD. The current head intentionally contains only the transport contract tests; permanent Quality is expected to fail until the application/transport modules are added.

Planned boundaries:

  • transport-neutral application dispatch port;
  • injected authenticated-principal authorization seam;
  • Web-standard HTTP adapter;
  • explicit MCP semantic tool adapter without a framework/SDK dependency;
  • no lifecycle, persistence, permission-policy, IAM, Cloudflare, GitHub, shell/filesystem/browser, or arbitrary-action authority in transports.

Final verification evidence, exact temporarily unsupported accepted operations, and dependency justification will be added before completion.

@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: 2493778374

ℹ️ 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".

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

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +85 to +86
expect(names).not.toEqual(
expect.arrayContaining([

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reject every forbidden MCP tool independently

When an adapter exposes only one or several of these generic tools, this assertion still passes: negating arrayContaining fails only if the tool list contains every listed entry. For example, an adapter exposing execute_action and shell but not browser would remain green despite violating the test's explicit-tool boundary; check that each forbidden name is absent or that the intersection is empty.

AGENTS.md reference: AGENTS.md:L30-L30

Useful? React with 👍 / 👎.

Comment thread test/transports/mcp-adapter.test.ts Outdated
Comment on lines +104 to +107
const response = await transport.callTool(
'mindrail_create_goal',
createGoalArgs({ commandId: '', unexpectedAuthority: 'allow' }),
principal,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Test unknown MCP fields with otherwise valid arguments

When callTool rejects the empty commandId but silently accepts or forwards unexpectedAuthority, this test still passes, so it does not establish the claimed unknown-field rejection at the invocation boundary. Use a valid command ID for the unexpected-property case (and test the invalid ID separately) so an implementation cannot satisfy the test for the wrong validation failure.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@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: 389ef2be8f

ℹ️ 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".

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

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

}
if (!isReason(record.reason)) return 'reason must be a bounded Reason';
if (!isBoundedString(record.summary, 1, 4000)) return 'summary must be a bounded string';
if (!Array.isArray(record.evidence)) return 'evidence must be an array';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Validate every BlockTask evidence reference

When an HTTP or MCP caller supplies values such as evidence: [null], this check accepts the command and casts it to BlockTaskCommand, even though each item must be a canonical EvidenceRef with a uri, bounded optional fields, no unknown properties, and the array is limited to 32 entries. The malformed value therefore crosses the application boundary and can cause a handler to crash or attempt to create an invalid checkpoint; validate the array contents and bounds before dispatch.

AGENTS.md reference: AGENTS.md:L30-L30

Useful? React with 👍 / 👎.

Comment on lines +272 to +275
if (!isBoundedString(record.permission, 1, 128)) return 'permission must be a bounded string';
if (!isBoundedString(record.justification, 1, 4000)) {
return 'justification must be a bounded string';
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Enforce canonical permission request constraints

For RequestPermission, inputs such as permission: "NOT VALID" and a 3,000-character justification pass this validation and are dispatched, although the canonical PermissionRequest schema requires a NamespacedName permission and limits justification to 2,000 characters. This lets malformed transport input cross the typed boundary and either fail later for the wrong reason or reach a handler that assumes canonical data; use the schema's pattern and bounds here.

AGENTS.md reference: AGENTS.md:L30-L30

Useful? React with 👍 / 👎.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

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