Repository navigation
[3808 by Claude Opus 5.5] Remote runtimes: support the Extension Library (skill bundles, URL and package MCP servers) on Sprites and Fly Machines - #3818
Conversation
I've implemented the parts of #3808 that can work now: library skill bundles and URL MCP servers run on Sprites and Fly Machines. Package (stdio) MCP servers are still not supported on either remote runtime. They now follow the interim rule from the issue: an auto-applied one is dropped with a note and the run continues, and an explicitly added one refuses the run with an error that names it. Nothing was tested live on Sprites or Fly Machines, so none of the live acceptance checks in the issue have been run. Capability model - The single `supportsExtensions` flag is replaced by `capabilities.extensions: { skills, remoteMcp, packageMcp }`. Docker has all three; Sprites and Fly Machines have skills and URL MCP but not package MCP. - The error now uses `skills`, `remote_mcp` or `package_mcp` as its capability and names the items. The launch check and the runtimes' own `start()` refuse only the classes a run actually carries. - The API's admission check now refuses only a runtime that supports no class at all. The worker refuses the rest at launch. Dropping or refusing items (`executeWithExtensions`) - Before anything is prepared, the run's runtime is looked up. Operator catalog stdio servers count as package servers. - Auto-applied, unsupported: the item is dropped and the run continues. The task timeline event lists it as skipped with the new reason `agent_runtime_unsupported` and carries a `runtimeUnsupported` note. The issue and PR follow-up comments get a `> [!NOTE]` naming the dropped items. - Explicitly added, unsupported: the run is refused with the capability error naming the item. This also settles the question the issue left open: auto-applied items no longer make every issue task and follow-up fail on a remote runtime. A unit test covers it. Skill bundles on remote runtimes - They appear at `/opt/propr/extensions/<bundle id>/`, the same path as on Docker, and the prompt is unchanged. - Deviation: I didn't use each provider's skills path, as the issue asked. Putting them there would mix them into the per-run credential copy that is written back after the run. Say if you want them moved. - Files are checked against the bundle's digest. On Sprites they go in the run upload and `scripts/sprites-launcher.py` installs them root-owned and read-only. On Fly Machines they are read-only Machine files fixed up by the wrapper. They disappear when the Sprite is restored or the Machine destroyed. - Both runtimes now activate the extension grant immediately before the upload (Sprites) or before the Machine is created (Fly). Fly also redacts the extension tokens from its output. - Changing the launcher script will likely make existing warm Sprites reprovision once after deploy. URL MCP servers on remote runtimes - They go through the ProPR extension gateway. Its address is the run's reachable ProPR MCP URL with `/api/mcp` replaced by `/api/extensions/mcp`. - A restricted Sprite now also allows the gateway host. - If there is no reachable URL, URL servers count as unsupported on that runtime. Not done from the issue - Installing package servers on Sprites, and adding them to the pool key so warm Sprites match the library revision. - Package servers on Fly Machines, whether installed at run start or built into the agent image. Docs: I added a per-runtime "Extensions by runtime" table to `agent-runtime.md` and a section to the Fly tutorial, and updated `agent-extensions.md`. Tests - New tests cover: auto-applied items don't refuse a remote run, explicit unsupported items are refused by name, the granular capability checks, skill files reaching the Sprite and the Fly Machine, unsafe bundle paths, the restricted-Sprite gateway host, and the comment note. - I updated the existing Sprites, Fly Machines, registry and API admission tests to the new behaviour. - All of those pass, as do `extensionPackageServers`, `extensionTaskAutoApply`, `extensionLaunchIntegration` and `agentRuntimeNetworkCapability`. The core, root, API and UI typechecks pass, and lint is clean on the changed source. - `extensionProfiles.test.ts` did not finish within 550 s. In that suite, "catalog stdio is callable…" fails with `stdio fixture closed`. It fails the same way on an untouched copy of the base commit, so it isn't caused by this change. ProPR-Agent: claude/claude-opus-5-5
Finish package (stdio) MCP servers on both remote runtimes in this PRThe capability split, the drop/refuse rule for auto-applied vs explicitly added items, skill bundles and URL servers through the gateway all look right. Keeping skills at The issue is about full Extension Library support on remote runtimes, and MCP compatibility matters (automations depend on it), so please close package MCP servers here as well:
Gateway reachability: #3817 (now in review) adds an SSH reverse forward for ProPR MCP on Sprites when there's no public URL ( Live check: I'll verify on Fly with one URL server and one package server from the library, auto-applied, on Sprites and Fly Machines. A one-line log per run with the extension digest and counts (skills / URL / package) would make that easy. |
|
✅ Applied the requested follow-up changes in commit 96f96c1 Summary of ChangesPackage (stdio) MCP servers now run on both Sprites and Fly Machines, and How the install works (both runtimes)
Sprites
Fly Machines
Interim rule
Log lines for your live check
Gateway reachability: #3817 isn't merged, so it isn't wired. I left a Docs: the tables in Merging with #3816: #3816 is also unmerged and edits the same spots: the Fly wrapper and probe states, Sprite provisioning and the compute usage fields. I used my own file names so the two installs can sit side by side, but whichever lands second will need its conflicts resolved. Updated tests cover:
Review digestRisk-tiered paths
Diff size: 23 files changed, +791/−86 lines 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
Package (stdio) MCP servers now run on both Sprites and Fly Machines, and `packageMcp` is `true` for both. Nothing was tested live. Locally, the related suites, the core and root typechecks, and lint on the changed source all pass. **How the install works (both runtimes)** - The worker first installs and verifies each package server exactly as it does for Docker: same registry, exact version, integrity value, no lifecycle scripts. - The worker sends its verified `package.json` and `package-lock.json` to the sandbox. The sandbox replays them as root with `npm ci --ignore-scripts` against the same registry, so npm checks every dependency against the integrity value in the lock file. - The installer refuses a lock that doesn't pin the package at its stored integrity value, or any dependency not from the registry. It then checks the installed package's name and version and makes the result root-owned and read-only at `/opt/propr/packages/<key>`. - The servers run next to the agent through the same stdio bridge as on Docker. Plain variables are passed the same way, secrets only by environment name, and output redaction is the same. - A new test does the full replay locally: real `npm ci` against the fixture registry, then a tool call through the bridge. It also checks that a lock with the wrong integrity value is refused before npm runs. - **Registry reach:** the Sprite or Machine must reach the npm registry. A private mirror set with `PROPR_EXTENSION_NPM_REGISTRY` has to be reachable from there too. **Sprites** - The install runs during provisioning, after the setup script and before the clean checkpoint. A failure fails provisioning with the end of npm's output, and the Sprite is deleted. - Each pool slot carries a digest of its package-server set. An idle Sprite with a different digest is retired, not reused, and so is a background replacement built for another set. - Matching is exact, so a run with no package servers won't reuse a Sprite built with some. If runs with different sets alternate, Sprites will be reprovisioned more often. Background replacements are built for the set the latest run asked for. - The stdio bridge wasn't on Sprites before. It's now uploaded with the setup scripts and installed at `/opt/propr/extension-stdio-bridge.mjs`. - The install time is recorded as `packageServerInstallMs` in compute usage. A warm Sprite reports none. **Fly Machines** - At Machine start the wrapper reports `installing` and runs the installer as root, before the agent and before the start gate opens. The time limit is 10 minutes. - A failed or timed-out install reports `install-failed`. The run fails with an error naming the servers and digest, followed by the end of npm's output. The Machine is destroyed and the agent never starts. - A run without package servers gets no installer files and no install step. - The install time is recorded in compute usage (`packageServerInstallMs`, also counted in `provisioningMs`). **Interim rule** - The drop/refuse rule no longer applies to package servers on Sprites and Fly. It still applies to custom runtimes that don't declare `packageMcp`. - **Decision for you:** I split operator catalog stdio servers into their own class (`catalogMcp`, error capability `catalog_mcp`), and Sprites and Fly keep the drop/refuse rule for them. They run an executable that must already be in the run's image, which neither runtime provides, so turning on `packageMcp` would otherwise have launched them broken with no note. For custom runtimes `catalogMcp` defaults to their `packageMcp` value. Say if you'd rather handle those differently. **Log lines for your live check** - Every run that applies library items logs `Extension Library items applied to this run`. It carries the runtime, library revision, `extensionDigest` of the applied items, the counts `skills`, `urlServers`, `packageServers` and `catalogStdioServers`, and `packageServersDigest`. - The installs log `Installed package MCP servers on Sprite` and `Installed package MCP servers at Fly Machine start`, with the same digest and the install time. **Gateway reachability:** #3817 isn't merged, so it isn't wired. I left a `TODO(#3817)` in `extensionRuntimeSupport.ts` where URL servers are marked unsupported when there's no reachable URL. That's where the reverse forward's `/api/extensions/mcp` should go. **Docs:** the tables in `agent-runtime.md`, `agent-extensions.md` and the Fly tutorial now show package servers as supported, list catalog stdio separately, and describe the installs, failures and log lines. **Merging with #3816:** #3816 is also unmerged and edits the same spots: the Fly wrapper and probe states, Sprite provisioning and the compute usage fields. I used my own file names so the two installs can sit side by side, but whichever lands second will need its conflicts resolved. Updated tests cover: - the Sprite install happening before the checkpoint - warm-pool reuse versus retirement by digest - a Sprite provisioning failure - a Fly install that succeeds (with compute usage), fails, or isn't needed - the wrapper's install states - the remote launch carrying the install - catalog stdio refusal on both runtimes PR: #3818 Comment by: @integry (ID: 7180544030) Model: Claude Opus 5.5 ProPR-Agent: claude/claude-opus-5-5
Live verification: an
|
|
✅ Applied the requested follow-up changes in commit ccc21a8 Summary of ChangesI added the How it turns on
One fixture change. The library API only accepts a stored administrator, and nothing signs in on the fixture. So in extensions mode the deploy step adds the 1. Setup, before the idle stop (new step)
2. The issue asks for 3. The verify step
Docs
One thing to check before you run it: if the fixture's env sets a GitHub user whitelist, the token user has to be on it, or the API calls get a 403. There's no visible UI change, so I made no previews. Review digestRisk-tiered paths
Diff size: 3 files changed, +151/−3 lines 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
I added the `extensions` mode to `.github/workflows/fly-e2e.yml`. It hasn't run live yet. Locally, the workflow parses as YAML and every step passes `bash -n`. I also ran the new parts against the repo's real validators and sample data: the skill archive, the library save body, the jq filters and the three-line check all pass. **#3816 isn't merged, so the mode is Sprites-only.** A comment at the `EXTENSIONS` env var says to combine it with `agent_runtime` once #3816 lands. **How it turns on** - **Manual runs:** a `workflow_dispatch` boolean input `extensions`, default `false`. - **Nightly runs:** only when the repo variable `FLY_E2E_NIGHTLY_EXTENSIONS` is `true`. **One fixture change.** The library API only accepts a stored administrator, and nothing signs in on the fixture. So in extensions mode the deploy step adds the `FLY_E2E_GITHUB_TOKEN` user's login to `PROPR_ADMIN_USERS`. The new step then claims the administrator role through `POST /api/admin/members/claim`. **1. Setup, before the idle stop (new step)** - It calls the Settings → Extensions API itself (`/api/instance/extensions/v1/…`), using the fixture GitHub token as a bearer token. - **Skill bundle:** a ustar archive holding one `SKILL.md` named `fixture-token`. When asked for the fixture skill token, it answers `SKILL-OK-<run id>-<attempt>`. It goes through the same archive upload route as Settings. - **Package MCP server:** `fixture-echo`, running `@modelcontextprotocol/server-everything` 2.3.1 with the `stdio` argument and the `echo` tool. - The integrity value is pinned in the workflow. Settings' "Check" lookup has to return that value, and so does the saved library. Otherwise the step fails. - I ran this version locally: `echo` with `MCP-OK-1` returns `Echo: MCP-OK-1`. - Both items are auto-applied and limited to the fixture repo. The step checks the saved revision afterwards. - **No URL MCP server.** The step summary says why: the fixture has no reachable URL MCP server of its own, and the gateway route from #3817 isn't merged. - Only the read requests retry. A repeated save would fail on the library revision check. **2. The issue** asks for `$APP.txt` with three lines: `$APP`, the skill token, and the `echo` output for `MCP-OK-<run id>-<attempt>`. Without the mode, the issue text is unchanged. **3. The verify step** - It checks all three lines, expecting line 3 to be `Echo: MCP-OK-…`, and that the file has exactly three lines. - It requires an `Extension Library items applied to this run` log line with runtime `sprites`, `skills>=1` and `packageServers>=1`. - It then requires an `Installed package MCP servers on Sprite` (or `… at Fly Machine start`) line with the same `packageServersDigest`. - It prints `extensionDigest`, `packageServersDigest`, the item counts and `installMs` to the log and the step summary. - The step streams app logs in the background from its start. `flyctl logs --no-tail` keeps only recent lines, and the install line could be gone by the time the PR exists. **Docs** - In `agent-runtime.md`, the operator catalog stdio row is now labelled `catalogMcp`. For Sprites and Fly it says "dropped with a note when auto-applied, run refused when added explicitly". - `setup-fly.md` has a new "Extension Library check" section covering the input, the nightly variable, the admin change, the pinned package and what gets verified. One thing to check before you run it: if the fixture's env sets a GitHub user whitelist, the token user has to be on it, or the API calls get a 403. There's no visible UI change, so I made no previews. PR: #3818 Comment by: @integry (ID: 7180949991) Model: Claude Opus 5.5 ProPR-Agent: claude/claude-opus-5-5
|
/ultrafix goal=8 max=3 |
|
🔄 Ultrafix loop started (goal: 8/10, max cycles: 3) First action:
|
|
✅ AI Code Review Complete requested by @integry Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR adds granular extension capabilities and remote delivery of skills, URL MCP servers, and package MCP servers. The implementation is cohesive, and I found no verified merge blocker in the supplied diff. It is ready to merge within scope, conditional on the five pending checks passing. ✅ Explicit capability handling — Unsupported explicit items fail by name; auto-applied items are filtered and surfaced in resolution events and completion comments. ✅ Controlled package installation — Remote installs validate lock-file integrity, disable lifecycle scripts, and finish before the agent starts. ✅ Meaningful coverage — Added tests cover installation failures, skill-path rejection, capability filtering, and Sprite reuse. The supplied live verification also demonstrates skill and package-tool use on Sprites. This assessment is a static review; no commands or tests were run during this review. Merge blockersNo merge blockers. SuggestionsThese are optional follow-ups and are not sent to S1: 🟢 Complete remote integration coverageThe supplied live verification exercises Sprites skills and package servers, while URL MCP and Fly Machines remain unverified live. Add those scenarios when their fixtures are available, particularly gateway authentication and installation failure cleanup. This would strengthen confidence beyond the existing unit tests without establishing a current code defect. S2: 🟢 Align provisioning timeout documentation
S3: 🟢 Consider lock-content cache identity
ScoreThe changed paths have substantial targeted coverage and successful live Sprites evidence. No verified blocker was found; broader live coverage remains limited, and current checks report 18 passed, five pending, and no failures. Score: 8/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
My own review (ccc21a8): please fix before mergeR1: Sprite pool churn across package-server sets (
Test: alternating runs A (packages) / B (none) / A reuse warm Sprites after the first two. R2: gateway URL validated for every extension run ( R3: remote package-server lock problems fail the whole run ( R4: Fly boot deadline after a long install (
Handle the install states inside R5: Fly compute usage ( R6: catalog servers resolved twice ( R7: Machine config size ( R8 (small): in After this, and once #3816 merges into the epic, please rebase and enable |
|
✅ Applied the requested follow-up changes in commit 838fcdc Summary of ChangesR1–R8 are fixed and the docs are updated. The new and changed tests pass, along with the core typecheck and zero-warning lint. I haven't done the last step (rebase and turn on R1, Sprite pool (
R2, gateway URL
R3, lock files on remote runtimes
R4, Fly boot wait
R5, Fly compute usage: every Fly run now reports R6, catalog servers: each catalog server is resolved once and the result is shared by the classifier and the launch loop. A failed lookup is now classed as "unavailable", not as a URL server. The run then fails with the catalog error, as it does on Docker. R7, Machine config size: a launch whose Machine config is over 4 MiB is refused before the create request. The message gives the size and how much of it is skill files and how much is lock files. R8: the Decision for you: on Sprites, Tests not run in full: There's no visual change, so I made no previews. Review digestRisk-tiered paths
Diff size: 17 files changed, +414/−127 lines 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
R1–R8 are fixed and the docs are updated. The new and changed tests pass, along with the core typecheck and zero-warning lint. I haven't done the last step (rebase and turn on `EXTENSIONS` with `agent_runtime=fly-machines`) because #3816 is still open against the epic. The Fly e2e workflow therefore stays Sprites-only with its note for now. **R1, Sprite pool (`spritesProvisioning.ts`)** - Idle Sprites are now kept per digest. A run takes the most recently used idle Sprite with a matching digest, or provisions a new one. - A Sprite built for another set is deleted only when `PROPR_SPRITES_MAX` is reached, and then the least recently used one goes first. The step that deleted every mismatched Sprite on acquire is gone. - The "another worker is waiting" handler now also gives up the least recently used idle Sprite. Before, it gave up the most recent one. - Each slot keeps its package-server set, so a background replacement is built with the set of the Sprite it replaces. Only a run with that digest picks it up, so the "discard a mismatched replacement" path is gone. - New tests: - runs alternating A/B/A/B/A provision only two Sprites and delete none. - with a cap of 1, the other set's idle Sprite is evicted to make room. - with a cap of 2, A/B/A/B reuse their own Sprites. - a replacement gets the replaced Sprite's set, and a run without servers doesn't take it. **R2, gateway URL** - The gateway URL is now worked out only when the run has URL servers. A run with only skills or package servers works with any MCP URL path. - `extensionRuntimeSupport` reports `remoteMcp` only if the gateway URL can actually be derived. With a proxy path that doesn't end in `/api/mcp`, auto-applied URL servers are dropped with the note. - To avoid a circular import, the URL function moved to a new `extensionGateway.ts`; `extensionLaunch.ts` still re-exports it. **R3, lock files on remote runtimes** - The new `prepareRemotePackageServers` runs right after `preparePackageServers`. An auto-applied server is skipped (`package_unavailable`) and named in the run's note. An explicitly added one refuses the run. - A missing file and a file over 2 MiB get separate messages, each naming the file and the runtime. **R4, Fly boot wait** - The separate install loop is removed; `waitForExit` handles the install states itself: - `installing` pushes the deadline out to the install limit, so an exec outage during the install no longer ends the wait. - `install-failed` fails the run with `flyPackageServerInstallError`. - neither state is treated as a running agent any more. - The first `ready` after the install gives a fresh boot window and resets the retry backoff. Without the backoff reset, a single failed `touch start` used up the whole window; the new test caught that. **R5, Fly compute usage:** every Fly run now reports `wallTimeMs` from Machine create to the end of the run. Runs without package servers didn't report compute usage before, so they now show up in usage and rate-table pricing. The install appears only in `packageServerInstallMs`, never in `provisioningMs`. **R6, catalog servers:** each catalog server is resolved once and the result is shared by the classifier and the launch loop. A failed lookup is now classed as "unavailable", not as a URL server. The run then fails with the catalog error, as it does on Docker. **R7, Machine config size:** a launch whose Machine config is over 4 MiB is refused before the create request. The message gives the size and how much of it is skill files and how much is lock files. **R8:** the `PACKAGE_SERVERS` paths are now defined in `wrapper.ts` and inserted into the wrapper script, and `launch.ts` re-exports them. Defining them in `launch.ts` would have caused a circular import, since `launch.ts` already imports `wrapper.ts`. The docs now say 32 minutes, and the warm-pool, gateway, lock-file, boot-window and compute-usage text is updated. **Decision for you:** on Sprites, `provisioningMs` still covers the whole cold build, including the package install. I left it as is because taking the install out would also change Sprites' `wallTimeMs`. If you want the Fly rule there too, it's a small change. **Tests not run in full:** `extensionProfiles.test.ts` still doesn't finish within the time limit here. I checked the moved URL function's cases separately instead. There's no visual change, so I made no previews. PR: #3818 Comment by: @integry (ID: 7184890346) Model: Claude Opus 5.5 ProPR-Agent: claude/claude-opus-5-5
|
/review |
|
✅ AI Code Review Complete requested by @integry Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR is merge-ready within the supplied review scope. It adds granular extension capabilities, remote skill delivery, package installation, and visible handling of unsupported items without requiring a broad runtime redesign. ✅ Capability-aware admission — Explicit unsupported items are refused by name; auto-applied items are removed and reported through resolution events and completion comments. ✅ Package installation before execution — Both remote runtimes install packages before starting the agent, replay verified lock files with lifecycle scripts disabled, and propagate installation failures. ✅ Warm-pool reuse — Sprite acquisition matches package-set digests, preserves other warm sets below capacity, and provisions background replacements with their original package set. The authoritative current-head status reports 24 passing checks and no failures. This review used static tracing of the supplied code; no commands or tests were run. Merge blockersNo merge blockers. SuggestionsThese are optional follow-ups and are not sent to S4: 🟢 Extend live runtime coverageThe supplied live verification covers Sprites skills and package MCP execution. URL MCP execution and the Fly Machines variant remain unverified live. Extend the smoke workflow when the referenced runtime-selection dependency lands, including an actual gateway tool call and a failed package installation. This is a follow-up because the current workflow explicitly documents its coverage, and the supplied tests exercise the additional launch and failure paths. S5: 🟢 Test lock-sensitive pool identity
ScoreThe implementation has substantial targeted coverage, addresses the earlier pool-reuse and gateway-validation concerns, and has no verified blocker in the supplied diff. Live verification is strongest for the Sprites path. Score: 8/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
Automatically resolved merge conflicts after merging target branch into PR branch. Resolved conflicts in: - .github/workflows/fly-e2e.yml - packages/core/src/agents/runtime/registry.ts - packages/core/src/agents/runtime/sprites/spritesNetwork.ts - packages/core/src/agents/runtime/sprites/spritesProvisioning.ts - packages/core/src/agents/runtime/spritesRuntime.ts - scripts/sprites-agent-setup.sh PR: #3818 Model: Claude Opus 5.5
|
✅ Applied the requested follow-up changes in commit f6085da Summary of ChangesOn Sprites with no public MCP URL, URL MCP servers now reach the gateway through #3817's forward, and 1. Rebase. The branch already contained 9d8892a: merge commit 983d1cc brought in the epic, so I didn't need to rebase again. The 2. Gateway through the forward
3. Tests
Docs: I updated There are no visual previews, since nothing in this change is visible in the UI. Review digestRisk-tiered paths
Diff size: 8 files changed, +120/−22 lines 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
On Sprites with no public MCP URL, URL MCP servers now reach the gateway through #3817's forward, and `remoteMcp` counts as supported there. The new tests and the neighbouring suites pass. Nothing was run live on Sprites; that waits for your check with #3816. **1. Rebase.** The branch already contained 9d8892a: merge commit 983d1cc brought in the epic, so I didn't need to rebase again. The `TODO(#3817)` in `extensionRuntimeSupport.ts` is gone. **2. Gateway through the forward** - **Transport decision:** `extensionRuntimeSupport` uses #3817's `planAgentRunMcpTransport`. When it returns `ssh-reverse-forward`, the plan's loopback URL becomes the gateway's endpoint. The gateway is then `http://127.0.0.1:39080/api/extensions/mcp`, or `http://127.0.0.1:39080<base>/api/extensions/mcp` if `PROPR_INTERNAL_API_URL` has a base path. A test confirms the relay carries `/api/extensions/mcp/docs` to the API stand-in. - **Restricted network policy:** the forward needs no extra host. The policy now skips the gateway host when the gateway is the forward listener, and the result is identical to the policy with no gateway. Any other loopback gateway URL is still refused, because nothing in the Sprite listens there. - **Change you didn't ask for:** the forward used to open only when the run had a ProPR MCP grant over it, but an issue task with auto-applied URL servers may carry no grant. Without a change, its agent would call a loopback port where nothing listens. `SpritesRuntime.start` now also opens the forward when the run's gateway URL is the forward listener. It refuses the run if that URL doesn't match the forward target. **3. Tests** - In `packages/core/test/extensionRemoteRuntime.test.ts`: a Sprites run with a URL server and no public URL gets `http://127.0.0.1:39080/api/extensions/mcp/docs`, with `remoteMcp` supported in both open and restricted mode. With `PROPR_SPRITES_MCP_FORWARD=0`, the same run drops the auto-applied server, records it as skipped (`agent_runtime_unsupported`) and returns the note. - In `test/spritesMcpForward.test.ts`: - a run with no ProPR MCP grant starts the forward before the agent, and a gateway call over it reaches the API. - a restricted Sprite adds no host for the loopback gateway. - a gateway URL that doesn't match the forward listener is refused. - The new tests fail against the previous source and pass with the change. - The forward, network-policy, Sprites runtime, registry, network-capability, runtime-notice, launch-integration and auto-apply suites pass: 85 tests in the Sprites suites and 52 in the rest. - Core typecheck and core lint are clean. **Docs:** I updated `agent-runtime.md` (the extensions section and the runtime table), the "Extensions on Fly runtimes" table in `setup-fly.md`, and the Sprites network-policy text in `execution-safety.md`. The Sprites restricted-network description string now also says the forward needs no gateway host. There are no visual previews, since nothing in this change is visible in the UI. PR: #3818 Comment by: @integry (ID: 7189751302) Model: Claude Opus 5.5 ProPR-Agent: claude/claude-opus-5-5
I've taken the derived Fly image out of this PR. Fly Machines install the runtime packages at every Machine start again, as in the version verified live on a1b7ea6, and the `PROPR_FLY_MACHINES_MAX` cap is back. I made no new code change for the `Sprite lease expired` regression, for the reason below. Type-check, lint and the affected suites pass locally; nothing was run live. **Sprite lease regression: why there's no new change.** Commit 25b5fdf, which landed about a minute before your two comments, already fixes it. I checked it against your run's worker log: - **Where the error came from:** the lease never actually expired. Provisioning failed in a step after the package install, which can only be checkpoint create, list or restore. The worker then deleted the Sprite. That deletion ended the run's lease, and the old error path reported "Sprite lease expired" instead of the real error. - **Why the log fits:** only one Sprite was created, it was deleted, and the error came 11 s after `Installed agent runtime packages`. Your run had `MCP: false`, so the MCP forward wasn't involved. - **What 25b5fdf changed:** the real error is now reported, a lost lease logs who holds it and when it expires, and a fake-clock test checks that setup plus install longer than the lease TTL still starts the agent on that Sprite. - **R4 isn't the cause:** it never touches the run's own reservation, so I kept it. - **Still unknown:** which checkpoint step failed. #3818 passes with the same SSH setup, and a537da7 passed with figlet, so I can't tell from here. Your next Sprites run will show the real message. **1. Removed** - `fly/derivedImage.ts`, `fly/registry.ts`, `fly/wrapperBuild.ts` and `test/flyDerivedImage.test.ts`. - Their wiring in `flyMachinesRuntime.ts`. The runtime registry needed no change: it just constructs `FlyMachinesRuntime`. - The Machine launcher script (`wrapper.ts`) and the Machines API client (`api.ts`) are back to their versions from before the derived image (f57bdfd). This drops the build mode, the build Machine cleanup and the `gone()`/`find()` lookups. - The `imageWaitMs` compute-usage field. - Every "Installed in a derived Fly Machine image" text. Settings now reads "Installed at every Fly Machine start", and the smoke workflow expects that text and the `Installed agent runtime packages at Fly Machine start` log line. **2. Fly Machines at start** - **Install:** as root before the agent, with the 15-minute limit. `packageInstallMs` is recorded. - **Compute usage:** measured from after any wait for a cap slot. `provisioningMs` runs until the agent starts. - **Cap:** `PROPR_FLY_MACHINES_MAX` is back, with its queue and `test/flyMachinesCapacity.test.ts`. It counts only agent Machines, and a Machine whose delete is still being retried keeps its slot. It's in `.env.example` and both docs again. **3. F12 (package index check)** - **Fly Machines:** every start installs, so every run with packages is checked against the index before its Machine is created. - **Sprites:** the check runs only before a new Sprite or a background replacement is provisioned. A warm Sprite with the same packages digest is reused without it. - **Syntax:** still checked every time the list is read. - **New tests:** - A Fly start is refused once the refreshed index has lost the name, after an earlier start went ahead, and no Machine is created. - A warm Sprite is reused after the index loses the package entirely, while a new Sprite for the same list is refused. **4. F13** is dropped and left to #3821. **Docs:** Sprites install during provisioning, into the clean checkpoint. Fly Machines install at every start, and each run pays that time. The derived image is described as planned in #3821. **Checks run:** - Core type-check and lint of the changed core files pass with zero warnings. - The Fly runtime, package, capacity and create-request suites, the package index suite (12/12), the remote package and Settings suites, the Sprites suites (including the lease tests), the compute usage suites, the runtime registry and `agentVersionManagement` all pass. - The two API route suites pass (3 and 16 tests), and so does the Settings UI test (9 tests). - These ran with `PROPR_DEMO_MODE=true`, which this container needs. There are no visual previews: nothing on screen changed except one note's wording in Settings. PR: #3816 Comment by: @integry (ID: 7195543320) Comment by: @integry (ID: 7195625635) Model: Claude Opus 5.5 ProPR-Agent: claude/claude-opus-5-5
|
🔀 Resolved merge conflicts from Conflicting Files
Resolution SummaryI resolved the conflicts in all 12 files and no conflict markers remain anywhere in the repo. Core typechecks, the zero-warning lint gate on What the conflicts were. This PR adds Extension Library support (skills, URL MCP and package MCP servers) to Sprites and Fly Machines. The epic branch adds instance runtime packages (apt) to the same two runtimes. Both sides edited the same capability flags, install steps, compute-usage fields and Sprite pool logic. I kept both features in every file. Where they overlapped, runtime packages install first and package MCP servers second, because a server may need a system package.
Changes beyond the conflict hunks:
Not tested: the live Fly e2e workflow. I only checked it parses and its shell steps are valid syntax, so the four-line extensions mode on Fly Machines is untested until it actually runs. 🤖 Resolution Details
System-triggered merge conflict resolution |
#3816 is merged into the epic: rebase and enable extensions on Fly Machines#3816 (instance runtime packages) merged into
I'll then run the extensions mode on Sprites and on Fly Machines. |
Automatically resolved merge conflicts after merging target branch into PR branch. Resolved conflicts in: - .github/workflows/fly-e2e.yml - docs/docs/architecture/agent-runtime.md - docs/docs/tutorials/setup-fly.md - packages/core/src/agents/runtime/computeUsage.ts - packages/core/src/agents/runtime/dockerRuntime.ts - packages/core/src/agents/runtime/fly/launch.ts - packages/core/src/agents/runtime/fly/wrapper.ts - packages/core/src/agents/runtime/flyMachinesRuntime.ts - packages/core/src/agents/runtime/registry.ts - packages/core/src/agents/runtime/sprites/spritesProvisioning.ts - packages/core/src/agents/runtime/spritesRuntime.ts - packages/core/src/agents/runtime/types.ts PR: #3818 Model: Claude Opus 5.5
|
✅ Applied the requested follow-up changes in commit e0ef184 Summary of ChangesThe epic (937768d) is merged in, and the Sprite pool now uses one key built from both digests. Nothing has run live; the Sprites and Fly Machines extension runs are still yours to do. The epic merge was already on the branch as e660300, from ProPR's automatic conflict resolution. I checked every conflicted file against your points, and only the pool needed more work. 1. Pool (
Fly boot wait (already correct after the merge, unchanged)
2. Smoke workflow (
3. The URL-server-through-the-forward change (f6085da) is intact. Checks: the Sprites pool, Sprites runtime, runtime packages, Fly Machines, Fly runtime packages, create request, the workflow test, extension notice and MCP forward suites all pass. There are no visual changes, so I made no previews. Review digestRisk-tiered paths
Diff size: 3 files changed, +63/−25 lines 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
The epic (937768d) is merged in, and the Sprite pool now uses one key built from both digests. Nothing has run live; the Sprites and Fly Machines extension runs are still yours to do. The epic merge was already on the branch as e660300, from ProPR's automatic conflict resolution. I checked every conflicted file against your points, and only the pool needed more work. **1. Pool (`spritesProvisioning.ts`, `spritesSlot.ts`)** - Before, the merged code still matched idle Sprites, cap evictions and background replacements on the package-server digest alone. They now all use one key built from the runtime-package digest plus the package-server digest. - R1's behaviour is kept for that key: - the most recently used matching Sprite is reused. - Sprites with other package-server sets stay warm. - at `PROPR_SPRITES_MAX`, the least recently used Sprite with another key is evicted. - a background replacement gets the server set of the Sprite it replaces and the current runtime packages. - When the instance's runtime-package list changes, idle Sprites built with the old list are still deleted straight away, as #3816 does. That list is instance-wide, so those Sprites can't match again. Under strict per-key LRU they would only go when the cap forced them out. Say if you'd rather have that. - New test in `test/spritesPool.test.ts`: runs A (servers), B (none), A, B on one runtime-package list reuse their own two Sprites. After the list changes, run A gets a new Sprite and the old two are deleted. **Fly boot wait (already correct after the merge, unchanged)** - `fly/wrapper.ts` installs runtime packages, then package servers. Both report `installing`, and the agent's boot window opens only after both finish. - The worker runs one state machine (`waitForExit`). It allows extra install time only for the installs a run actually has, and starts a fresh boot window when the Machine reports ready after installing. - Either `install-failed` fails the run with its own error, through `FlyStartInstalls.failure`. Compute usage reports `packageInstallMs` and `packageServerInstallMs` separately. **2. Smoke workflow (`fly-e2e.yml`, already correct, unchanged)** - `EXTENSIONS` has no runtime restriction; only `MCP` requires Sprites. - On Fly Machines the agent app, image and token come from #3816's step. - The same run checks the runtime package (file line 2 plus the install log for the chosen runtime), then the extension lines 3–4. It accepts the "applied to this run" record for that runtime and either the Sprite or the Fly Machine package-server install record. - I couldn't parse the YAML here (no `yaml` module), but I didn't edit the file and it passes its own workflow test, `flyE2eMcpAutomation`. **3.** The URL-server-through-the-forward change (f6085da) is intact. **Checks:** the Sprites pool, Sprites runtime, runtime packages, Fly Machines, Fly runtime packages, create request, the workflow test, extension notice and MCP forward suites all pass. `spritesRuntime` only passes with `PROPR_DEMO_MODE=1`, as before. The core typecheck and lint on the changed source are clean. There are no visual changes, so I made no previews. PR: #3818 Comment by: @integry (ID: 7203509507) Model: Claude Opus 5.5 ProPR-Agent: claude/claude-opus-5-5
|
/ultrafix goal=8 max=3 |
|
🔄 Ultrafix loop started (goal: 8/10, max cycles: 3) First action:
|
|
✅ AI Code Review Complete requested by @integry Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR adds remote skill delivery, URL MCP gateway routing, and package MCP installation on Sprites and Fly Machines. It needs changes before merge: package-set identity can reuse stale installations, and Docker’s preparation shortcut ignores declared capability overrides. ✅ Granular capability checks — Launch checks distinguish skills, URL servers, package servers, and catalog stdio servers, naming unsupported items. ✅ Remote launch coverage — Added tests cover installation failures, read-only skill delivery, gateway forwarding without a ProPR grant, and pool reuse. ✅ Passing current checks — The supplied current-head status reports 24 passed, 21 skipped, and no failures. This review uses static analysis of the supplied code; no commands or tests were run. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F1: 🔴 Pool identity excludes dependency locks
F2: 🔴 Docker shortcut ignores capability overrides
SuggestionsThese are optional follow-ups and are not sent to S6: 🟢 Extend live URL-server verificationThe supplied live runs verify skills and package servers, while URL routing has unit coverage. A controlled HTTPS MCP fixture would additionally verify gateway authentication and routing on both providers. This is optional because no live URL acceptance requirement is established in the supplied objective. S7: 🟢 Refresh the workflow summaryThe new ScoreThe implementation has substantial coverage and passing current checks, but the two capability and installation-identity defects require localized corrections before merge. Score: 6/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
✅ Applied the requested follow-up changes in commit 85f19e9
Summary of ChangesI fixed both findings, and each now has a regression test. The test for F2 fails when I take the fix out; I didn't do that check for F1's test. The core typecheck and lint on the changed core files are clean. Six related test files pass (162 tests, 0 failures): Sprites pool, runtime registry, remote-runtime extensions, package servers, Sprites runtime and Fly Machines runtime. The registry file only passes with F1 – a warm Sprite was reused after the dependency lock changed
F2 – preparation assumed the built-in Docker capabilities
Separately, and not changed here: There is no visual change, so I made no previews. Review digestRisk-tiered paths
Diff size: 7 files changed, +102/−16 lines 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
I fixed both findings, and each now has a regression test. The test for F2 fails when I take the fix out; I didn't do that check for F1's test. The core typecheck and lint on the changed core files are clean. Six related test files pass (162 tests, 0 failures): Sprites pool, runtime registry, remote-runtime extensions, package servers, Sprites runtime and Fly Machines runtime. The registry file only passes with `PROPR_DEMO_MODE=true`. Without it, all its tests pass but the run exits 1 on the "GitHub auth is not configured" warning, which is an environment issue, not a test failure. **F1 – a warm Sprite was reused after the dependency lock changed** - **Fix:** `packageServersDigest` in `remotePackageServers.ts` now hashes each replayed install's cache key, entry, `package.json` and `package-lock.json`, not just the cache key. A rebuilt worker install that resolves a dependency differently under the same key now gives a different pool key. - **Same identity everywhere:** picking an idle Sprite, evicting at the cap, background replacements and the provisioned slot's digest all go through this one function. The Sprites and Fly install log lines use it too. - **Run log line:** "Extension Library items applied to this run" now takes its digest from the replayed installs. On Docker, where nothing is replayed or pooled, that line no longer carries a package-server digest or package list, only the count. - **Regression** (`test/spritesPool.test.ts`): a run with the same cache key but a different lock gets a new Sprite instead of the warm one with the old lock. A background replacement keeps the new lock, and a run with the old lock still gets its original Sprite. **F2 – preparation assumed the built-in Docker capabilities** - **Fix:** `registerAgentRuntime` now records when the `docker` name has been replaced. `extensionRuntimeSupport` takes the Docker shortcut only while the built-in implementation is still in place. Otherwise it loads the registered runtime and reads its declared capabilities, as `runAgent` does at launch. - **Result:** an unsupported auto-applied item on a Docker replacement is now dropped with the note before launch, instead of failing the task at the launch check. - **Regression** (`packages/core/test/extensionRemoteRuntime.test.ts`): it registers a Docker replacement without URL MCP and runs the real preparation code, then the same launch check `runAgent` applies against the registered runtime. It does not start a container. The auto-applied URL server is dropped with the note and the skill still launches. An explicitly added URL server is refused during preparation, naming the item, before anything launches. - **Shortcut can't be turned back on:** once `docker` has been re-registered, preparation reads capabilities from the registry for the rest of the process, even if the built-in runtime is registered again. The answer is still correct, just without the shortcut. Separately, and not changed here: `registerAgentRuntime` stores a replacement without capabilities, so the API admission check skips its pre-check for custom or replaced runtimes. The worker still refuses at launch. This came before the PR and is outside F1/F2. There is no visual change, so I made no previews. PR: #3818 Comment by: @propr-ultrafix (ID: 0) Model: Claude Opus 5.5 ProPR-Agent: claude/claude-opus-5-5
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR adds remote extension support through granular capabilities, uploaded skill bundles, gateway routing, and pinned package installation. The implementation is cohesive despite its size. No merge blockers were verified in the supplied diff; merge readiness is conditional on the two pending test shards completing successfully. ✅ Explicit capability handling — Unsupported automatic items are dropped with visible notices, while explicitly selected unsupported items are refused by name. ✅ Reproducible remote installations — Package replay uses verified lock files, disables lifecycle scripts, checks integrity, and installs before agent startup. Sprite reuse includes lock contents in its pool identity. ✅ Failure-path coverage — Added tests cover installation failures, gateway forwarding without a ProPR MCP grant, unsafe skill paths, and package-specific Sprite reuse. This was a static review of the supplied code and context; no commands or tests were run. Merge blockersNo merge blockers. SuggestionsThese are optional follow-ups and are not sent to S8: 🟢 Reconcile runtime documentationIn S9: 🟢 Extend live URL coverageThe live fixture verifies skills and package servers, while URL servers have synthetic forwarding coverage. A future fixture with a reachable URL server would provide additional evidence for the complete remote gateway path. Also remove the stale statement in ScoreThe changed behavior has substantial targeted coverage and no verified blocker. Current checks report 21 passed, two pending, and no failures; live URL-server verification remains a useful follow-up. Score: 9/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
AI Implementation Summary
Closes #3808
Branch:
3808/claude-opus-5-5-remote-runtimes-support-t-20261126-0040-oabCommits: ✅ Changes committed (e075fc1)
AI Processing Completed
Execution Details:
Summary:
I've implemented the parts of #3808 that can work now: library skill bundles and URL MCP servers run on Sprites and Fly Machines. Package (stdio) MCP servers are still not supported on either remote runtime. They now follow the interim rule from the issue: an auto-applied one is dropped with a note and the run continues, and an explicitly added one refuses the run with an error that names it. Nothing was tested live on Sprites or Fly Machines, so none of the live acceptance checks in the issue have been run.
Capability model
supportsExtensionsflag is replaced bycapabilities.extensions: { skills, remoteMcp, packageMcp }. Docker has all three; Sprites and Fly Machines have skills and URL MCP but not package MCP.skills,remote_mcporpackage_mcpas its capability and names the items. The launch check and the runtimes' ownstart()refuse only the classes a run actually carries.Dropping or refusing items (
executeWithExtensions)agent_runtime_unsupportedand carries aruntimeUnsupportednote. The issue and PR follow-up comments get a> [!NOTE]naming the dropped items.This also settles the question the issue left open: auto-applied items no longer make every issue task and follow-up fail on a remote runtime. A unit test covers it.
Skill bundles on remote runtimes
/opt/propr/extensions/<bundle id>/, the same path as on Docker, and the prompt is unchanged.scripts/sprites-launcher.pyinstalls them root-owned and read-only. On Fly Machines they are read-only Machine files fixed up by the wrapper. They disappear when the Sprite is restored or the Machine destroyed.URL MCP servers on remote runtimes
/api/mcpreplaced by/api/extensions/mcp.Not done from the issue
Docs: I added a per-runtime "Extensions by runtime" table to
agent-runtime.mdand a section to the Fly tutorial, and updatedagent-extensions.md.Tests
extensionPackageServers,extensionTaskAutoApply,extensionLaunchIntegrationandagentRuntimeNetworkCapability. The core, root, API and UI typechecks pass, and lint is clean on the changed source.extensionProfiles.test.tsdid not finish within 550 s. In that suite, "catalog stdio is callable…" fails withstdio fixture closed. It fails the same way on an untouched copy of the base commit, so it isn't caused by this change.Review digest
Risk-tiered paths
packages/core/src/agents/runtime/dockerRuntime.ts(+1/−1)packages/core/src/agents/runtime/extensionCapabilities.ts(added, +72/−0)packages/core/src/agents/runtime/fly/launch.ts(+16/−4)packages/core/src/agents/runtime/fly/wrapper.ts(+8/−0)packages/core/src/agents/runtime/flyMachinesRuntime.ts(+13/−3)packages/core/src/agents/runtime/registry.ts(+11/−18)packages/core/src/agents/runtime/sprites/spritesNetwork.ts(+12/−7)packages/core/src/agents/runtime/sprites/spritesRun.ts(+19/−2)packages/core/src/agents/runtime/spritesRuntime.ts(+15/−4)packages/core/src/agents/runtime/types.ts(+17/−2)packages/core/src/agents/types.ts(+3/−0)packages/core/src/claude/claudeService.ts(+2/−0)packages/core/src/extensions/extensionLaunch.ts(+47/−17)packages/core/src/extensions/extensionLaunchContext.ts(+18/−1)packages/core/src/extensions/extensionRunResolution.ts(+4/−0)packages/core/src/extensions/extensionRuntimeSupport.ts(added, +97/−0)packages/core/src/utils/github/logFiles.ts(+4/−1)packages/shared/src/extensionLibrary.ts(+1/−1)scripts/sprites-launcher.py(+26/−0)src/jobs/issueJob/agent.ts(+1/−0)src/jobs/prCompletionComment.ts(+4/−4)src/jobs/prFileUtils.ts(+1/−0)docs/docs/architecture/agent-runtime.md(+26/−4)docs/docs/features/agent-extensions.md(+5/−0)docs/docs/tutorials/setup-fly.md(+15/−0)packages/core/test/extensionRemoteRuntime.test.ts(added, +134/−0)test/agentRunTrigger.test.ts(+5/−1)test/agentRuntimeRegistry.test.ts(+17/−3)test/extensionRuntimeNotice.test.ts(added, +51/−0)test/flyMachinesRuntime.test.ts(+39/−5)test/spritesNetworkPolicy.test.ts(+7/−0)test/spritesRuntime.test.ts(+44/−1)Diff size: 32 files changed, +735/−79 lines
View task for the run's logs and conversation.
This PR was created automatically by ProPR after processing issue #3808.
💡 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!
Live verification on Fly (Sprites)
Run https://github.com/integry/propr/actions/runs/45744538030 on ccc21a8,
EXTENSIONS=true: ✅propr deploy fly, idle stop, wake via the labeled issue (webhookRecovery.redelivered=1).Extension Library items applied to this run:skills=1, packageServers=1, urlServers=0,extensionDigest 9e7fe4af460bfc46. The fixture has no reachable URL server, so URL servers weren't tested here.Installed package MCP servers on Sprite:installMs=1811,packageServersDigest 695a3ad60f8d097b.compute_runtime: sprites. Teardown was clean: no apps, branches, PRs or issues left.The Fly Machines variant waits on #3816, whose Fly Machines create path is being fixed.
Live verification after merging the epic (with #3816 and #3817), e0ef184
EXTENSIONS=true: the auto-applied skill bundle and package MCP server, plus #3816's runtime packages, in one run. The agent's file had all four lines (app name, figlet banner,SKILL-OK-<run>,Echo: MCP-OK-<run>). Clean teardown both times.figlet libssl3t64), 6725 msskills=1, packageServers=1, urlServers=0on both. URL servers aren't tested live, because the fixture has no reachable one; unit tests cover the forward path on Sprites.Final head 85f19e9 (after F1 lock-aware pool identity and the F2 capability fix): Sprites https://github.com/integry/propr/actions/runs/45909574544 ✅. All four lines were present, and teardown was clean. Fly Machines doesn't use the pool; its pass on e0ef184 stands. Review 9/10 with no blockers, CI clean.