Skip to content

fix(mcp): scope the claude web no-curl notice to non-hosted deployments - #658

Merged
pcfreak30 merged 1 commit into
developfrom
fix/mcp-claude-web-hosted-curl
Sep 1, 2026
Merged

fix(mcp): scope the claude web no-curl notice to non-hosted deployments#658
pcfreak30 merged 1 commit into
developfrom
fix/mcp-claude-web-hosted-curl

Conversation

@pcfreak30

@pcfreak30 pcfreak30 commented Sep 1, 2026

Copy link
Copy Markdown
Member

Scopes the Claude Web "no network egress / no curl" notice to non-hosted (self-hosted/tunnel) deployments. On a hosted deployment the mint/drop endpoints are publicly reachable, so Claude Web gets the same generic curl file/drop guidance (mint PUT upload + sink=drop curl -o download) as other HTTP hosts and is no longer special-cased.

Adds the hostenv.And predicate and GuideSpec.RuleWhenPred for the host-and-deployment conjunction, and updates the Claude Web profile comment to reflect hosted vs non-hosted capability.


This pull request fixes the agent guide logic for Claude Web hosts by scoping the "no network egress" notice to only apply to self-hosted (non-hosted) deployments, not hosted (Portal-embedded) ones.

Key changes:

  • Scope restriction: Previously, the Claude Web capability notice (warning about no curl/network egress) was shown for all Claude Web connections regardless of deployment type. Now, the notice is only displayed when Claude Web is used in a non-hosted (self-hosted) deployment.

  • New gating mechanism: Added a RuleWhenPred method to GuideSpec that accepts custom predicate functions, enabling rules to be gated on complex conditions (like host type AND deployment mode).

  • New predicate combinator: Added an And() predicate combinator in the hostenv package that passes only when all provided predicates pass, allowing rules to be gated on multiple conditions simultaneously.

  • Hosted deployments behave like other HTTP hosts: When running in a hosted (Portal-embedded) deployment, Claude Web is no longer special-cased—it gets the generic mint/drop guidance (curl-based file upload and download flows) just like Grok and other HTTP hosts, since hosted deployments allow network access.

  • Updated documentation: Comments in both agent_guide.go and the profile definitions were updated to explain the new scoping logic.

  • Added test coverage: New tests verify that:

    • The Claude Web notice appears for non-hosted deployments
    • The notice is absent for hosted Claude Web deployments
    • Hosted Claude Web retains the generic curl-based upload/download guidance
    • The new And() predicate and RuleWhenPred methods work correctly

The Claude Web host notice claimed the agent has no network egress and that mint/drop are unusable. That only holds for self-hosted (tunnel) deployments; on a hosted (Portal-embedded) deployment the mint/drop endpoints are publicly reachable, so Claude Web should get the same generic curl file/drop guidance as other HTTP hosts.

Gates the notice on HostClaude AND NOT hosted via a new hostenv.And predicate and GuideSpec.RuleWhenPred, and updates the profile comment to reflect hosted vs non-hosted capability. Hosted Claude Web is no longer special-cased.
@kody-ai

kody-ai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Code Review Completed! 🔥

The code review was successfully completed based on your current configurations.

Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the @kody start-review command at the root of your PR.

  • Validate Business Logic: Ask Kody to validate your code against business rules by adding a comment with the @kody -v business-logic command.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a 👍 for helpful suggestions or a 👎 if improvements are needed.

Current Kody Configuration
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug
Performance
Security
Business Logic

Access your configuration settings here.

// must NOT get this notice, and a hosted (Portal-embedded) deployment
// lets Claude Web use the mint/drop endpoints like any other HTTP
// host, so it is not treated as special.
RuleWhenPred(hostenv.And(hostenv.HostIs(hostenv.HostClaude), hostenv.Not(hostenv.HostedIs(true))),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

kody code-review Kody Rules low

The comment above the rule references 'hosted' and 'Portal' but contains no password, API key, secret, or token literals, so no hard-coded secret violation exists in the line itself. No code change required.

Kody rule violation: Ban hard-coded secrets in Go source

Prompt for LLM

File internal/mcp/agent_guide.go:

Line 353:

The comment above the rule references 'hosted' and 'Portal' but contains no password, API key, secret, or token literals, so no hard-coded secret violation exists in the line itself. No code change required.

Talk to Kody by mentioning @kody

Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

Code Coverage Report

Total Coverage: 50.1%

Generated from commit: 8e4f186
Repository: LumeWeb/pinner-cli

@pcfreak30
pcfreak30 marked this pull request as ready for review September 1, 2026 07:14
@pcfreak30
pcfreak30 merged commit 25349a6 into develop Sep 1, 2026
13 checks passed
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