Skip to content

[3532 by Claude Opus 5.5] Local MCP servers: add pinned npm or PyPI package servers from Settings, run in the task container - #3537

Merged
integry merged 5 commits into
3509-epic-extensions-library-14jfrom
3532/claude-opus-5-5-local-mcp-servers-add-pin-20261113-1640-r7e
Nov 13, 2026
Merged

integry merged 5 commits into
3509-epic-extensions-library-14jfrom
3532/claude-opus-5-5-local-mcp-servers-add-pin-20261113-1640-r7e

Conversation

@propr-dev

@propr-dev propr-dev Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

AI Implementation Summary

Closes #3532

Branch: 3532/claude-opus-5-5-local-mcp-servers-add-pin-20261113-1640-r7e
Commits: ✅ Changes committed (b94e9f8)


AI Processing Completed

Execution Details:

Summary:
Administrators can now add a Local package MCP server from Settings. It is an npm package at an exact version, pinned by its registry integrity value and run through the existing stdio bridge in the task container. All new and existing extension tests pass, but no real agent container and the public npm registry were never used: the end-to-end tests run against a local registry fixture.

Scope decision: npm only. The issue allowed this to keep the image change small, and Dockerfile.agent is unchanged. The form and docs both say PyPI isn't supported yet.

How it works

  • Contract: kind: 'package' with ecosystem, package, exact version, integrity, optional bin, args, env and secretEnv. Ranges and tags are rejected. Unknown fields such as command, argv, paths, mounts and images are rejected because the schema accepts only its own fields. Variable names that change how Node loads code (PATH, NODE_OPTIONS, LD_*, PROPR_* and similar) are also refused.
  • Check and save: both look the exact version up in the registry and store its SHA-512 integrity value. Nothing is downloaded or executed. A client-sent integrity is ignored. A save that keeps the same package, version and executable skips the registry request. Packages with install scripts are reported as unsupported. The new route is POST /api/instance/extensions/v1/packages/resolve.
  • Install: the worker installs each pinned package once with npm install --ignore-scripts and no user npm config. The cache sits beside the skill staging area, outside every task workspace. Installed files are made read-only, and their digest is recorded in a manifest signed with the instance's credential key. The install is refused if npm reports a different integrity.
  • Launch:
    • The run checks the files against that manifest and the stored integrity, then mounts the install read-only at /opt/propr/packages/<n>.
    • Claude and Codex start it with Node through the stdio bridge.
    • A changed or uninstallable package is dropped: the run continues and the task event records package_integrity_mismatch or package_unavailable.
    • The Core gateway refuses package servers.
  • Secrets:
    • Values are stored as server/VARIABLE, write-only, and reach the server only through environment variables.
    • Saving a server with secret variables needs acknowledgements: [name]. The revision records who acknowledged it, when, and the package, version and variables it covers.
    • The acknowledgement carries over until any of those change. Changing the package or renaming the server clears the stored values.
  • Task event: it lists packages with name, ecosystem, package and version, never values. The field appears only when a package server applied, so the existing event shape is unchanged.
  • UI: "Local package (npm)" sits under Server type with Check, arguments, variables and secret variables. The trust-boundary warning and its acknowledgement checkbox appear only when there are secret variables. The row reads "Local · package@version".

Things you might not expect

  • The stdio bridge script was modified to pass plain variables to the server, with reserved names filtered.
  • PROPR_EXTENSION_NPM_REGISTRY lets an operator point installs at a registry mirror. Tests use it to reach the local fixture.
  • If an installed copy is tampered with, ProPR does not reinstall it automatically; an operator has to delete the cache directory. The docs say this.
  • I split some logic out of extensionProfileStore.ts and the UI form to stay within the 400-line and complexity lint limits.

Tests

  • Core: 96 extension tests pass. They include a new suite against a local registry fixture covering:
    • real install, and reuse on later runs.
    • a dependency's postinstall script not running.
    • listing and calling allowed tools through the bridge.
    • Claude and Codex launch arguments carrying no secret.
    • tamper refusal.
    • write authorization, opt-out labels, disable/re-enable and the 8-server limit.
    • the effect of a native export.
  • Negative checks: removing --ignore-scripts and skipping the file check each make the matching test fail.
  • API: the new and existing route tests pass (23 plus 1). The OpenAPI spec and client types were regenerated.
  • UI: 287 Settings tests pass, including 6 new ones. Typecheck and zero-warning lint are clean.
  • Playwright: all 7 tests in agent-extensions.pw.ts pass, including the new local-server test.
  • Root: the bridge, tool-policy and Docker environment suites pass.

Docs (agent-extensions.md, new "Local package servers" section) and a CHANGELOG entry are added. Preview images of the new form and row were captured from the Playwright test.

Detailed Logs:

  • Conversation: 96 messages
  • Session: 8e41186c-cea1-4962-b2a7-7c400cae2454

Log files stored at:

  • conversation: /usr/src/app/logs/executions/issue-3532-2026-11-13T17-21-28-736Z-conversation.json
  • output: /usr/src/app/logs/executions/issue-3532-2026-11-13T17-21-28-736Z-output.txt
Latest Conversation Messages
ASSISTANT: [content unavailable]

ASSISTANT: Administrators can now add a **Local package** MCP server from Settings. It is an npm package at an exact version, pinned by its registry integrity value and run through the existing stdio bridge in t...


This PR was created automatically by ProPR after processing issue #3532.


💡 Need changes?

Comment on this PR to request refinements — the AI agent monitors comments and will update the implementation based on your feedback. Keep iterating until you're satisfied!


Visual preview

Add a local package server

Add a local package server

The Local package (npm) form after Check: resolved version, executable and integrity value, arguments, variables, a secret variable with the task-container warning and its acknowledgement, which is required before saving.

Connect sign-in required. Original retained until 2027-02-11T17:21:33.935Z.

View the full-resolution original in ProPR Connect

Local server row

Local server row

The saved server listed as Local with its package and pinned version.

Connect sign-in required. Original retained until 2027-02-11T17:21:35.250Z.

View the full-resolution original in ProPR Connect

…It is an npm package at an exact version, pinned by its registry integrity value and run through the existing stdio bridge in the task container. All new and existing extension tests pass, but no real agent container and the public npm registry were never used: the end-to-end tests run against a local registry fixture.

Scope decision: npm only. The issue allowed this to keep the image change small, and `Dockerfile.agent` is unchanged. The form and docs both say PyPI isn't supported yet.

How it works
- Contract: `kind: 'package'` with `ecosystem`, `package`, exact `version`, `integrity`, optional `bin`, `args`, `env` and `secretEnv`. Ranges and tags are rejected. Unknown fields such as `command`, `argv`, paths, mounts and images are rejected because the schema accepts only its own fields. Variable names that change how Node loads code (`PATH`, `NODE_OPTIONS`, `LD_*`, `PROPR_*` and similar) are also refused.
- Check and save: both look the exact version up in the registry and store its SHA-512 integrity value. Nothing is downloaded or executed. A client-sent integrity is ignored. A save that keeps the same package, version and executable skips the registry request. Packages with install scripts are reported as unsupported. The new route is `POST /api/instance/extensions/v1/packages/resolve`.
- Install: the worker installs each pinned package once with `npm install --ignore-scripts` and no user npm config. The cache sits beside the skill staging area, outside every task workspace. Installed files are made read-only, and their digest is recorded in a manifest signed with the instance's credential key. The install is refused if npm reports a different integrity.
- Launch:
  - The run checks the files against that manifest and the stored integrity, then mounts the install read-only at `/opt/propr/packages/<n>`.
  - Claude and Codex start it with Node through the stdio bridge.
  - A changed or uninstallable package is dropped: the run continues and the task event records `package_integrity_mismatch` or `package_unavailable`.
  - The Core gateway refuses package servers.
- Secrets:
  - Values are stored as `server/VARIABLE`, write-only, and reach the server only through environment variables.
  - Saving a server with secret variables needs `acknowledgements: [name]`. The revision records who acknowledged it, when, and the package, version and variables it covers.
  - The acknowledgement carries over until any of those change. Changing the package or renaming the server clears the stored values.
- Task event: it lists `packages` with name, ecosystem, package and version, never values. The field appears only when a package server applied, so the existing event shape is unchanged.
- UI: "Local package (npm)" sits under Server type with Check, arguments, variables and secret variables. The trust-boundary warning and its acknowledgement checkbox appear only when there are secret variables. The row reads "Local · package@version".

Things you might not expect
- The stdio bridge script was modified to pass plain variables to the server, with reserved names filtered.
- `PROPR_EXTENSION_NPM_REGISTRY` lets an operator point installs at a registry mirror. Tests use it to reach the local fixture.
- If an installed copy is tampered with, ProPR does not reinstall it automatically; an operator has to delete the cache directory. The docs say this.
- I split some logic out of `extensionProfileStore.ts` and the UI form to stay within the 400-line and complexity lint limits.

Tests
- Core: 96 extension tests pass. They include a new suite against a local registry fixture covering:
  - real install, and reuse on later runs.
  - a dependency's postinstall script not running.
  - listing and calling allowed tools through the bridge.
  - Claude and Codex launch arguments carrying no secret.
  - tamper refusal.
  - write authorization, opt-out labels, disable/re-enable and the 8-server limit.
  - the effect of a native export.
- Negative checks: removing `--ignore-scripts` and skipping the file check each make the matching test fail.
- API: the new and existing route tests pass (23 plus 1). The OpenAPI spec and client types were regenerated.
- UI: 287 Settings tests pass, including 6 new ones. Typecheck and zero-warning lint are clean.
- Playwright: all 7 tests in `agent-extensions.pw.ts` pass, including the new local-server test.
- Root: the bridge, tool-policy and Docker environment suites pass.

Docs (`agent-extensions.md`, new "Local package servers" section) and a CHANGELOG entry are added. Preview images of the new form and row were captured from the Playwright test.
@propr-dev

propr-dev Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor Author

🔀 Resolved merge conflicts from 3509-epic-extensions-library-14j into 3532/claude-opus-5-5-local-mcp-servers-add-pin-20261113-1640-r7e in commit 9c9ef14

Conflicting Files

  • CHANGELOG.md
  • docs/static/openapi/propr-api.yaml

Resolution Summary

Both conflicts are resolved and no conflict markers remain anywhere in the repository.

1. CHANGELOG.md, the ## [Unreleased] → ### Added list

  • What conflicted: both branches added new entries at the top of the same list. This PR added "Local MCP servers from npm packages". The 3509-epic-extensions-library-14j branch added:
    • Gemini 4 Hydrogen (Antigravity)
    • Review quality by effort
    • LLM cost export
    • Claude goals can ask you a question
    • Automation templates
    • Instruction learning loop template
    • MCP get_pull_request_discussion review sources
    • Weekly codebase drift report template
  • How I resolved it: I kept every entry from both sides, unchanged. The PR's entry comes first, then the epic branch's entries, then the existing list.
  • Why: these are separate features that happened to land in the same spot, so nothing needed to be dropped or merged.

2. docs/static/openapi/propr-api.yaml, the info.x-route-coverage counts

  • What conflicted: each side changed the route totals. This PR had total: 316 / documented: 78 and the epic branch had 321 / 83. Each side had added routes the other didn't have; this PR's is POST /api/instance/extensions/v1/packages/resolve.
  • How I resolved it: this file is generated, so I rebuilt it from the merged source with npm run gen:openapi rather than picking either side by hand. The result is total: 322 / documented: 84 / undocumented: 238: the epic branch's routes plus this PR's new one. The new route appears once in the spec. The generated client types (packages/client/src/generated/apiTypes.ts) came out identical to what was already there.
  • Why: regenerating makes the spec match all routes on both sides, and neither side's numbers would have been correct alone.

Checks:

  • npm run gen:openapi:check reports the spec and client types as up to date and valid (322 routes).
  • packages/api/test/openapiRouteCoverage.test.ts passes (16 tests, 0 failures).

🤖 Resolution Details

  • Model: Claude Opus 5.5
  • Time: 3m 10s

View Task Execution


System-triggered merge conflict resolution

integry commented Nov 13, 2026

Copy link
Copy Markdown
Owner

/ultrafix goal=8 max=10

@propr-dev propr-dev Bot added the ultrafix label Nov 13, 2026
@propr-dev

propr-dev Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor Author

🔄 Ultrafix loop started (goal: 8/10, max cycles: 10)

First action: /review

💡 Tip: Remove the ultrafix label from this PR to stop further ultrafix cycles.

…532/claude-opus-5-5-local-mcp-servers-add-pin-20261113-1640-r7e

Automatically resolved merge conflicts after merging target branch into PR branch.
Resolved conflicts in:
- CHANGELOG.md
- docs/static/openapi/propr-api.yaml

PR: #3537
Model: Claude Opus 5.5
@propr-dev

propr-dev Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR adds npm package resolution, caching, container launches, secret storage, and Settings controls with substantial fixture coverage. It needs changes before merge because editing an existing server silently reuses its acknowledgement for a different consent scope.

✅ Server-controlled integrity — Saves replace client-supplied integrity values with registry-resolved values; cached manifests authenticate installed file digests.

✅ Separate secret transport — Package secrets travel through environment variables, while bridge configuration and task events exclude their values.

This review is a static analysis of the supplied code; no commands were run. The authoritative checks show 32 passed, two pending, and no failures.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F1: 🔴 Require renewed acknowledgement after scope changes

  • Required behavior: Changing a package, version, or secret-variable set must require a new explicit acknowledgement, rather than silently extending the saved acknowledgement.

  • Evidence: propr-ui/src/pages/SettingsPage/extensions/ExtensionServerForm.tsx, acknowledged initialization and submit; propr-ui/src/pages/SettingsPage/extensions/ExtensionPackageFields.tsx, package/version handlers and SecretVariables.

    1. Edit a saved package server with secret variables and a recorded acknowledgement. The form initializes acknowledged to true.
    2. Change its version, package, or secret-variable names. Those handlers update the draft but never reset acknowledged.
    3. Submit without touching the acknowledgement checkbox. acknowledgedNames(draft, acknowledged) sends the server name as a fresh acknowledgement.
    4. secretAcknowledgements in packages/core/src/extensions/extensionPackageLibrary.ts detects that the old binding differs, but accepts the submitted name and records new consent under the current actor and timestamp.

    The resulting audit record asserts renewed acknowledgement that the administrator never explicitly gave. Changing the version also carries existing secret values to that version. Backend binding checks cannot prevent this because the UI supplies the acknowledgement automatically.

    static trace: The new test “lists a local server as Local with its package and version, and saves edits with the recorded acknowledgement” explicitly changes the version and expects an acknowledgement submission without another checkbox interaction.

  • Minimum fix: Reset acknowledgement when the package, version, or secret-variable set changes. Update the existing edit test to require another explicit checkbox interaction and cover package and variable-set changes too.

Suggestions

These are optional follow-ups and are not sent to /fix.

S1: 🟢 Exercise a real container launch

The fixture tests replace container mount paths with worker paths before running the bridge. A container integration test would additionally verify mount visibility, permissions, and worker/image compatibility. This is additional validation, rather than a demonstrated runtime defect.

S2: 🟢 Correct installation timing documentation

The new documentation says installation happens “never at task start,” but executeWithExtensions awaits preparePackageServers, which installs on a cache miss. Clarify that the first matching run installs the package before container launch; subsequent runs reuse it. This is a documentation clarification.

Score

The implementation has strong validation and useful coverage, but the acknowledgement defect undermines an explicit secret-handling requirement. Current checks have no reported failures, with two still pending.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 1m 21s
  • Tokens: 96,007 (94,394 in / 1,613 out)
  • Cost: $0.92

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix F1 S1 S2

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 10df17b

Addressed 1 AI review comment (IDs: 6860527912)

Addressed finding F1

Summary of Changes

I fixed F1: editing a saved package server no longer reuses its saved acknowledgement once the package, version or secret-variable set changes. The checkbox clears, and saving shows "Confirm that the secret values are readable…" until the administrator ticks it again. The Settings tests, zero-warning lint and the UI typecheck pass. I didn't run the Playwright suite.

Change (propr-ui/src/pages/SettingsPage/extensions/)

  • How the tick is tracked: a tick now counts only for the exact name, package, version and secret variables it was given for. A tick from the saved revision counts only for the saved values. The fix is a new helper, acknowledgementScope, in packageServerUi.ts and a small hook in ExtensionServerForm.tsx.
  • Submitting: the form sends the server name as acknowledged only when the box was ticked for what is being saved, so the backend can't record consent nobody gave.
  • Renaming a server, a related case I also fixed: the backend stores acknowledgements by server name. A renamed server has no saved record, so the form was sending a fresh acknowledgement for it automatically. Renaming now clears the box too, and the "Acknowledged by user … on …" line is hidden after a rename.
  • What stays the same: edits that don't touch those fields, such as arguments, plain variables, tools or limits, keep the saved acknowledgement and need no new tick.

Tests (ExtensionPackageServer.test.tsx)

  • Version change: the existing edit test now changes the version and checks that the box is cleared, that the save is refused, and that it goes through only after the box is ticked again.
  • New cases: changing the package, adding a secret variable, removing one after ticking for the larger set, and renaming the server each clear the box and block the save. Another test checks that changing only the arguments keeps the saved acknowledgement.
  • Negative check: with the fix reverted, four of the new or updated tests fail. The case that removes a variable after re-ticking still passes, so it doesn't catch this defect.
  • Results: all 292 Settings tests pass, and the existing Playwright flow ticks the box only after its last edit, so it shouldn't be affected.

I didn't capture a new preview. The form looks the same; the only visible difference is that the box is unticked after one of these edits.

Separate observation, not changed: if you add a variable, tick the box, then remove the variable again, the saved "Acknowledged by user 1" line comes back but the box stays unticked. You have to tick it once more, which is strict but safe.


🤖 Implementation Details

  • Model: Claude Opus 5.5 (medium)
  • Requested By: @propr-ultrafix
  • Time: 5m 29s
  • Tokens: 746,384 (737,208 in / 9,176 out)
  • Cost: $0.60

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR

… its saved acknowledgement once the package, version or secret-variable set changes. The checkbox clears, and saving shows "Confirm that the secret values are readable…" until the administrator ticks it again. The Settings tests, zero-warning lint and the UI typecheck pass. I didn't run the Playwright suite.

I fixed F1: editing a saved package server no longer reuses its saved acknowledgement once the package, version or secret-variable set changes. The checkbox clears, and saving shows "Confirm that the secret values are readable…" until the administrator ticks it again. The Settings tests, zero-warning lint and the UI typecheck pass. I didn't run the Playwright suite.

**Change** (`propr-ui/src/pages/SettingsPage/extensions/`)
- **How the tick is tracked:** a tick now counts only for the exact name, package, version and secret variables it was given for. A tick from the saved revision counts only for the saved values. The fix is a new helper, `acknowledgementScope`, in `packageServerUi.ts` and a small hook in `ExtensionServerForm.tsx`.
- **Submitting:** the form sends the server name as acknowledged only when the box was ticked for what is being saved, so the backend can't record consent nobody gave.
- **Renaming a server, a related case I also fixed:** the backend stores acknowledgements by server name. A renamed server has no saved record, so the form was sending a fresh acknowledgement for it automatically. Renaming now clears the box too, and the "Acknowledged by user … on …" line is hidden after a rename.
- **What stays the same:** edits that don't touch those fields, such as arguments, plain variables, tools or limits, keep the saved acknowledgement and need no new tick.

**Tests** (`ExtensionPackageServer.test.tsx`)
- **Version change:** the existing edit test now changes the version and checks that the box is cleared, that the save is refused, and that it goes through only after the box is ticked again.
- **New cases:** changing the package, adding a secret variable, removing one after ticking for the larger set, and renaming the server each clear the box and block the save. Another test checks that changing only the arguments keeps the saved acknowledgement.
- **Negative check:** with the fix reverted, four of the new or updated tests fail. The case that removes a variable after re-ticking still passes, so it doesn't catch this defect.
- **Results:** all 292 Settings tests pass, and the existing Playwright flow ticks the box only after its last edit, so it shouldn't be affected.

I didn't capture a new preview. The form looks the same; the only visible difference is that the box is unticked after one of these edits.

**Separate observation, not changed:** if you add a variable, tick the box, then remove the variable again, the saved "Acknowledged by user 1" line comes back but the box stays unticked. You have to tick it once more, which is strict but safe.

PR: #3537
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Opus 5.5
@propr-dev

propr-dev Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR adds npm package servers across the contract, Settings UI, credential storage, installation cache and launch path. It needs a localized correction before merge.

✅ Credential boundaries — Package secrets are stored separately, require a scoped acknowledgement and reach launchers through environment variables rather than serialized arguments.

✅ Cache verification — Installed trees are checked against authenticated manifests, and initial preparation records refused packages without stopping the task.

This review is a static analysis of the supplied diff and context; no commands were run. Current checks show 29 passed, five pending and no failures.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F2: 🔴 Show when package credentials will be cleared

  • Required behavior: The secret editor must accurately indicate whether leaving a value blank preserves a configured credential.

  • Evidence: propr-ui/src/pages/SettingsPage/extensions/ExtensionServerForm.tsx, PackageServerFields invocation; propr-ui/src/pages/SettingsPage/extensions/ExtensionPackageFields.tsx, SecretVariables; packages/core/src/extensions/extensionCredentials.ts, nextCredentials.

    1. Edit a saved package server with a configured secret variable.
    2. Change its package name or server name. The form continues passing the original server’s secret status through ownEntry(secrets, initial?.name ?? '').
    3. The secret input still says “configured” and “Leave blank to keep the configured value.” Follow that instruction, acknowledge the changed scope and save.
    4. writeOnlyValues sends no replacement for the blank input. nextCredentials correctly rejects the old credential binding and drops the stored value.
    5. Subsequent runs skip the server with secret_not_configured, despite the editor having indicated that the value would be retained.

    The acknowledgement protects the container trust boundary; it does not explain that the credential will be erased. The existing HTTPS credential-change handling does not cover package servers. static trace: followed the supplied form, secret serialization, credential binding and missing-secret resolution paths. Existing UI tests check acknowledgement invalidation but do not check this misleading retained-credential status.

  • Minimum fix: Detect package credential-binding changes, show the affected values as not configured, and explain that they must be entered again. Preserve the configured indication for version-only changes, which retain credentials.

Suggestions

These are optional follow-ups and are not sent to /fix.

S3: 🟢 Clarify first-install timing

The new documentation says installation happens “never at task start,” but executeWithExtensions awaits preparePackageServers, which installs on a cache miss. Describe the first-run installation delay and subsequent cache reuse. This is a documentation correction rather than a runtime blocker.

S4: 🟢 Exercise the actual container boundary

The fixture tests provide useful coverage, but replace the mounted executable path with a worker path when exercising the bridge. A follow-up smoke test using the qualified agent image would validate Docker mount visibility, permissions and Node execution together. The supplied summary explicitly identifies this verification gap; it does not independently demonstrate a defect.

Score

The implementation has substantial targeted coverage and explicit credential protections. The misleading credential-retention UI needs correction; the remaining checks are pending, not failed.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 1m 26s
  • Tokens: 97,383 (95,404 in / 1,979 out)
  • Cost: $0.94

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix F2 S3 S4

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit e321e75

Addressed 1 AI review comment (IDs: 6861017122)

Addressed finding F2

Summary of Changes

I fixed F2. If you edit a saved package server and change its server name or package, each secret variable now reads "not configured" and asks for the value. A note under the empty input says: "Changing the server name or package clears the stored value. Enter it again." Changing only the version still shows "configured" and "Leave blank to keep the configured value", because the stored credential is kept in that case.

What changed

  • packageServerUi.ts: a new packageSecretsDropped(saved, draft) check uses the same fields as the core credential binding for package servers (credentialBinding in extensionCredentials.ts): server name, registry and package. The version isn't one of them.
  • ExtensionServerForm.tsx: passes that result to PackageServerFields, the same way the HTTPS form already handles a cleared token.
  • ExtensionPackageFields.tsx: when the binding has changed, SecretVariables treats nothing as configured and shows the note for each variable that had a stored value, until a new value is typed.

I checked the related paths for the same mistake. The HTTPS form already handles a cleared token, and the server's own handling (nextCredentials) was already correct. The only problem was what the form displayed.

Tests

  • I added three tests to ExtensionPackageServer.test.tsx:
    • After changing the package, the secret shows "not configured" with the note. Saving with a new value sends it under the right key.
    • The same check after renaming the server.
    • After changing only the version, the secret still shows as configured.
  • When I disabled the fix, the two package and rename tests failed, so they do catch the bug.
  • All 295 Settings tests pass, and the UI typecheck and zero-warning lint are clean.
  • I ran a temporary Playwright test against the built UI to capture two preview images, one after a package change and one after a version-only change, then deleted that test. I didn't run the full Playwright suite.

Visual preview

Package changed: secret must be entered again

Package changed: secret must be entered again

Editing a saved local package server and changing its package: the secret variable now reads "not configured", asks for the value, and explains that changing the server name or package clears the stored value.

Connect sign-in required. Original retained until 2027-02-11T18:14:07.167Z.

View the full-resolution original in ProPR Connect

Version changed: secret kept

Version changed: secret kept

Changing only the version keeps the stored secret, so it still reads "configured" with "Leave blank to keep the configured value".

Connect sign-in required. Original retained until 2027-02-11T18:14:08.738Z.

View the full-resolution original in ProPR Connect


🤖 Implementation Details

  • Model: Claude Opus 5.5 (medium)
  • Requested By: @propr-ultrafix
  • Time: 5m 30s
  • Tokens: 1,082,025 (1,074,527 in / 7,498 out)
  • Cost: $0.68
  • Subscription usage: Fable +1%

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR

…ts **server name** or **package**, each secret variable now reads "not configured" and asks for the value. A note under the empty input says: "Changing the server name or package clears the stored value. Enter it again." Changing only the **version** still shows "configured" and "Leave blank to keep the configured value", because the stored credential is kept in that case.

I fixed F2. If you edit a saved package server and change its **server name** or **package**, each secret variable now reads "not configured" and asks for the value. A note under the empty input says: "Changing the server name or package clears the stored value. Enter it again." Changing only the **version** still shows "configured" and "Leave blank to keep the configured value", because the stored credential is kept in that case.

**What changed**
- `packageServerUi.ts`: a new `packageSecretsDropped(saved, draft)` check uses the same fields as the core credential binding for package servers (`credentialBinding` in `extensionCredentials.ts`): server name, registry and package. The version isn't one of them.
- `ExtensionServerForm.tsx`: passes that result to `PackageServerFields`, the same way the HTTPS form already handles a cleared token.
- `ExtensionPackageFields.tsx`: when the binding has changed, `SecretVariables` treats nothing as configured and shows the note for each variable that had a stored value, until a new value is typed.

I checked the related paths for the same mistake. The HTTPS form already handles a cleared token, and the server's own handling (`nextCredentials`) was already correct. The only problem was what the form displayed.

**Tests**
- I added three tests to `ExtensionPackageServer.test.tsx`:
  - After changing the package, the secret shows "not configured" with the note. Saving with a new value sends it under the right key.
  - The same check after renaming the server.
  - After changing only the version, the secret still shows as configured.
- When I disabled the fix, the two package and rename tests failed, so they do catch the bug.
- All 295 Settings tests pass, and the UI typecheck and zero-warning lint are clean.
- I ran a temporary Playwright test against the built UI to capture two preview images, one after a package change and one after a version-only change, then deleted that test. I didn't run the full Playwright suite.

PR: #3537
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Opus 5.5
@propr-dev

propr-dev Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR implements npm package servers across Settings, credential storage, installation, launch, and task events. It needs changes before merge because package installation introduces an unchecked worker-network access path.

✅ Explicit secret consent — Acknowledgements are bound to the package, version, and secret-variable names; credential bindings prevent transferring stored values to another package.

✅ Authenticated cache verification — Installed trees receive an authenticated manifest, and subsequent launches check their contents before mounting them read-only.

✅ Focused integration coverage — The fixture tests exercise actual npm installation, lifecycle-script suppression, bridge calls, secret redaction, and tamper refusal.

This review uses the supplied code only; no commands or tests were run. The authoritative checks show 30 passed, four pending, and no failures.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F3: 🔴 Constrain dependency downloads on workers

  • Required behavior: Installing a public package must not give package-controlled metadata access to private worker-network resources outside the task container’s network policy.

  • Evidence: packages/core/src/extensions/packageCache.ts:install, specifically the this.npm(...) invocation; packages/core/src/extensions/packageRegistry.ts:registryGet.

    1. An administrator selects a public npm MCP package with an exact version, a valid executable, and no installation scripts. Its dependencies include a tarball URL such as http://internal-service/private-package.tgz.
    2. Check and save validate the top-level registry document and record its integrity. Neither operation validates dependency destinations.
    3. On the first matching task, install runs npm directly on the worker. npm resolves URL dependencies using their declared URLs; --registry selects the registry for registry dependencies and does not restrict URL dependencies.
    4. The worker therefore requests the internal destination. If it returns a valid package archive, its contents enter the installation tree and are subsequently exposed through the task-container mount.

    The observable consequence is package-directed access to the worker’s private network and potential disclosure of internal package contents to the task. --ignore-scripts prevents lifecycle execution, but does not prevent these requests. The top-level integrity comparison happens afterward and does not reject this dependency: the selected top-level package still matches its pin. The public-address checks in registryGet cover only Check/save, while the task’s network policy applies to the later container.

    static trace: Traced the registry lookup, worker npm invocation, post-install validation, and package mount in the supplied diff. No exploit was executed; the existing registry fixture contains only ordinary registry dependencies.

  • Minimum fix: Apply an enforced download policy to the installer that blocks private destinations and unauthorized dependency sources, including redirects and subsequent DNS resolution. Preserve explicitly configured operator mirrors as deliberate exceptions. Add a fixture dependency pointing at a private tarball endpoint and verify that installation cannot request it.

Suggestions

These are optional follow-ups and are not sent to /fix.

S5: 🟢 Clarify transitive dependency pinning

The cache authenticates the installed dependency tree, but a fresh installation resolves dependencies from a newly generated package manifest without a previously recorded lockfile. Consequently, different workers or cache rebuilds can install different dependency versions for the same top-level integrity value. Document this boundary and consider retaining a resolved lockfile for reproducibility. This is a follow-up because the stated contract explicitly pins the selected package, without clearly promising a globally identical dependency graph.

S6: 🟢 Exercise the actual container mount

The integration test replaces /opt/propr/packages/<n> with a worker path before exercising the bridge. A real task-container smoke test would additionally validate Docker-host path mapping, mount compatibility, permissions, and execution using the image’s Node runtime. This is useful additional qualification rather than evidence of a demonstrated container-launch defect.

S7: 🟢 Correct installation timing documentation

The new documentation says installation occurs “never at task start,” but executeWithExtensions awaits preparePackageServers, which installs on a cache miss before executing the task. Describe this as installation during first-use launch preparation, followed by cache reuse. This wording correction is non-blocking.

Score

The implementation has substantial coverage and clear credential handling, but the worker-side dependency download boundary needs correction before merge. Pending checks remain outstanding.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 1m 27s
  • Tokens: 97,505 (95,563 in / 1,942 out)
  • Cost: $0.94

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix F3 S5 S6 S7

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit a778245

Addressed 1 AI review comment (IDs: 6861615603)

Addressed finding F3

Summary of Changes

I've fixed F3. The worker's package install can now reach only the registry's host and port. A dependency that points at a private tarball endpoint is never requested; the internal service in the new test saw no requests and no connections. The new and existing package suites pass (11 of 11), and tsc and zero-warning lint on src/extensions are clean.

What changed (packages/core/src/extensions/packageInstallEgress.ts, new, used by packageCache.ts:install)

  • One allowed destination: every request npm makes now goes through the worker's existing egress proxy, set to admit only the registry's host and port. That proxy looks up the name itself and connects only to the address it checked, so a second DNS answer can't redirect the connection. Redirects are covered too, because each hop is a new request through the proxy.
  • Public registry: it must resolve to public addresses.
  • Operator mirror: a mirror set with PROPR_EXTENSION_NPM_REGISTRY stays a deliberate exception. It may resolve to a private address, but only its own host and port are reachable.
  • Worker proxy settings: the worker's HTTP_PROXY/HTTPS_PROXY/NO_PROXY are no longer passed to npm. They now only control how the egress proxy connects outward.
  • Git dependencies: npm's git setting points at a path that doesn't exist, so git dependencies can't be fetched. This matters because git ignores npm's proxy: with the flag removed, git connected straight to the internal service even with the proxy on.
  • Lockfile check: before anything is frozen or signed, every installed dependency must come from the registry URL with an integrity value; bundled dependencies are the only exception. This refuses file:, link, URL and git sources. Any refusal ends as package_unavailable and leaves nothing in the cache to mount.

Tests (packages/core/test/extensionPackageInstallEgress.test.ts, new)

  • Blocked sources: fixture packages depend on a private tarball endpoint four ways: directly, through a redirect from the registry host, as git+http, and as git+ssh. All four installs are refused, and the internal service gets no request and no connection. The ordinary package still installs.
  • Worker files: a file: dependency on the worker's filesystem is refused and leaves no work directory behind.
  • Policy: only the registry's host and port are admitted. A public registry name that resolves to 10.0.0.7 is refused, and so are other hosts, private IP addresses and the metadata address.
  • Negative checks: removing the proxy flags, the lockfile check, or the --git flag each makes the matching test fail. Without the proxy, the lockfile check alone does not catch the redirect case.
  • Fixture change: the registry fixture now starts listening before it packs, so dependencies can point back at it, and it has a redirect route.

extensionProfiles and extensionTaskAutoApply fail unless PROPR_DEMO_MODE=true is set, because they exit on the GitHub-auth banner. With it set they pass (45 and 11).

The docs ("Where it runs" and the mirror paragraph in agent-extensions.md) and the CHANGELOG entry describe the new limits. One requirement is new for operators: a mirror must serve its tarballs from its own host and port. There are no preview images because nothing visible changed.

Separate observation, not changed: a dependency URL on the registry host itself, at a non-standard path, still passes, since the registry is the allowed source. Any redirect from such a URL is still checked by the proxy.


🤖 Implementation Details

  • Model: Claude Opus 5.5 (high)
  • Requested By: @propr-ultrafix
  • Time: 11m 36s
  • Tokens: 4,337,998 (4,304,310 in / 33,688 out)
  • Cost: $2.10

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR

…nly the registry's host and port. A dependency that points at a private tarball endpoint is never requested; the internal service in the new test saw no requests and no connections. The new and existing package suites pass (11 of 11), and `tsc` and zero-warning lint on `src/extensions` are clean.

I've fixed F3. The worker's package install can now reach only the registry's host and port. A dependency that points at a private tarball endpoint is never requested; the internal service in the new test saw no requests and no connections. The new and existing package suites pass (11 of 11), and `tsc` and zero-warning lint on `src/extensions` are clean.

**What changed** (`packages/core/src/extensions/packageInstallEgress.ts`, new, used by `packageCache.ts:install`)
- **One allowed destination:** every request npm makes now goes through the worker's existing egress proxy, set to admit only the registry's host and port. That proxy looks up the name itself and connects only to the address it checked, so a second DNS answer can't redirect the connection. Redirects are covered too, because each hop is a new request through the proxy.
- **Public registry:** it must resolve to public addresses.
- **Operator mirror:** a mirror set with `PROPR_EXTENSION_NPM_REGISTRY` stays a deliberate exception. It may resolve to a private address, but only its own host and port are reachable.
- **Worker proxy settings:** the worker's `HTTP_PROXY`/`HTTPS_PROXY`/`NO_PROXY` are no longer passed to npm. They now only control how the egress proxy connects outward.
- **Git dependencies:** npm's `git` setting points at a path that doesn't exist, so git dependencies can't be fetched. This matters because git ignores npm's proxy: with the flag removed, git connected straight to the internal service even with the proxy on.
- **Lockfile check:** before anything is frozen or signed, every installed dependency must come from the registry URL with an integrity value; bundled dependencies are the only exception. This refuses `file:`, link, URL and git sources. Any refusal ends as `package_unavailable` and leaves nothing in the cache to mount.

**Tests** (`packages/core/test/extensionPackageInstallEgress.test.ts`, new)
- **Blocked sources:** fixture packages depend on a private tarball endpoint four ways: directly, through a redirect from the registry host, as `git+http`, and as `git+ssh`. All four installs are refused, and the internal service gets no request and no connection. The ordinary package still installs.
- **Worker files:** a `file:` dependency on the worker's filesystem is refused and leaves no work directory behind.
- **Policy:** only the registry's host and port are admitted. A public registry name that resolves to `10.0.0.7` is refused, and so are other hosts, private IP addresses and the metadata address.
- **Negative checks:** removing the proxy flags, the lockfile check, or the `--git` flag each makes the matching test fail. Without the proxy, the lockfile check alone does not catch the redirect case.
- **Fixture change:** the registry fixture now starts listening before it packs, so dependencies can point back at it, and it has a redirect route.

`extensionProfiles` and `extensionTaskAutoApply` fail unless `PROPR_DEMO_MODE=true` is set, because they exit on the GitHub-auth banner. With it set they pass (45 and 11).

The docs ("Where it runs" and the mirror paragraph in `agent-extensions.md`) and the CHANGELOG entry describe the new limits. One requirement is new for operators: a mirror must serve its tarballs from its own host and port. There are no preview images because nothing visible changed.

**Separate observation, not changed:** a dependency URL on the registry host itself, at a non-standard path, still passes, since the registry is the allowed source. Any redirect from such a URL is still checked by the proxy.

PR: #3537
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Opus 5.5
@propr-dev

propr-dev Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor Author

⏳ Ultrafix is waiting for CI before the next /review.

These blocking checks on a778245 are holding the loop back:

  • Full Test Suite Shard 3/4 — not finished
  • Full Test Suite Shard 1/4 — not finished
  • Full Test Suite Shard 2/4 — not finished
  • Full Test Suite Shard 4/4 — not finished
  • Classify changed surfaces — not finished
  • Classify changed surfaces — not finished
  • Validate Changes — not finished
  • Classify changed surfaces — not finished
  • Classify changed surfaces — not finished
  • Classify changed surfaces — not finished

Checks matching this repository's non-blocking checks never gate Ultrafix. The loop continues automatically once the blocking checks pass; if they have not settled within 2 hours, Ultrafix stops.

@propr-dev

propr-dev Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR implements pinned npm MCP servers across Settings, credential storage, installation, and task launch. Static review found no verified merge blocker. It is merge-ready within the reviewed scope, conditional on the pending validation check.

✅ Explicit credential consent — Secret acknowledgements bind to the package, version, and variable names; changing the package or server name drops stored credentials.

✅ Verified cache reuse — Installs disable lifecycle scripts, authenticate cache manifests, and verify installed content before use. Failed preparation removes the server and records a skip reason.

✅ Consistent runtime integration — Package servers use the existing stdio bridge for Claude and Codex, receive read-only mounts, and are explicitly refused by the Core gateway.

This review used the supplied code and context only; no commands or tests were run. The authoritative status reports 34 passed checks, no failures, and one pending check.

Merge blockers

No merge blockers.

Suggestions

These are optional follow-ups and are not sent to /fix.

S8: 🟢 Exercise a real container launch

Add a container integration test covering package installation, the host-to-container mount mapping, and an actual tool call. The new fixture tests replace the mounted entry path with the worker path, so they do not exercise that boundary. This would strengthen deployment confidence; the supplied launch wiring does not demonstrate a defect.

S9: 🟢 Clarify cold-cache installation timing

The “Where it runs” documentation says installation happens “never at task start,” but executeWithExtensions awaits preparePackageServers, which installs missing packages before execution. Describe this as installation during launch preparation on a cache miss, followed by reuse. This is an optional documentation clarification.

Score

The implementation provides substantial validation, credential protections, and focused regression coverage. No actionable defect was established; actual container execution remains a useful follow-up, and final validation is pending.

Score: 8/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 57s
  • Tokens: 101,454 (100,337 in / 1,117 out)
  • Cost: $0.95

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix S8 S9

🤖 Review by ProPR

@propr-dev propr-dev Bot removed the ultrafix label Nov 13, 2026
@integry
integry merged commit 240b5d6 into 3509-epic-extensions-library-14j Nov 13, 2026
50 checks passed
propr-dev Bot pushed a commit that referenced this pull request Nov 18, 2026
… **Added** section of `CHANGELOG.md`, placed just before the related "Local MCP servers from npm packages" entry. I only edited the changelog, and `npm run release:verify` still passes ("Release metadata is consistent for v0.9.2").

I've added the missing extension library entry to the 0.9.2 **Added** section of `CHANGELOG.md`, placed just before the related "Local MCP servers from npm packages" entry. I only edited the changelog, and `npm run release:verify` still passes ("Release metadata is consistent for v0.9.2").

The wording comes from `docs/docs/features/agent-extensions.md`. It includes everything you listed: the single library with per-item limits and **Apply automatically**, which runs it applies to, the three opt-out labels, the **Run without extensions** switch, the flat Settings lists with enable checkboxes, automation items, and OAuth with tokens held and refreshed by Core. The upgrade note is in the same entry, ends with the line that extension profiles can no longer be selected on New Task, and links to the docs page.

The docs gave a few more precise points than your comment, so the entry uses those:
- **Upgrade:** the docs add that queued New Task submissions keep their profile selection for their first task, so the entry says that too.
- **Opt-out labels:** they apply to issue tasks and pull request follow-ups only, never add items, and don't affect automation runs. The switch works by adding `disable-extensions` to the issue it creates.
- **Automation items:** automations can also add items that have **Apply automatically** off.

From the epic merge #3520, I also added these, since the 0.9.2 section had none of them:
- A run carries at most 8 MCP servers and 8 skill bundles.
- Write servers reach only automation action phases and the first task of a New Task submission that opts in.
- A Codex run with a custom operator config or a workspace `.codex/config.toml` launches without its auto-applied items instead of failing.
- New Task shows, read-only, which items will apply.
- OAuth servers that aren't connected are skipped, and a refused token refresh moves the server to **Needs sign-in** with one Inbox notification.
- Each run records its items in an `extensions.resolved` task event.

I didn't add anything for #3541 or the rest of the epic, because the section already covers them: the plan issue cap of 50 and the 15,000-element argument budget (#3541), Local package servers (#3537), and the `hono` advisory bump.

PR: #3683
Comment by: @integry (ID: 6965476127)
Model: Claude Opus 5.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant