Repository navigation
fix(files): gate proxy access on ACP initialization capability - #373
Merged
Merged
Conversation
Define the versioned filesystem extension and validator in the protocol package. Preserve the legacy command announcement and cover initialization and harness/bootstrap propagation with the existing Vitest runner. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…timing Use the existing ACP initialization result as the Files compatibility gate. Keep explicit upgrade errors for old or incompatible proxies, cover absent/delayed command announcements and lifecycle cleanup, and document the compatibility boundary. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Related: #371. The reported
Filesystem proxy does not advertise the required commandserror occurs before a filesystem prompt. Files previously inspected the optional session command catalogue immediately after session connection, even though its notification can arrive later. The timing failure is reproducible; its occurrence on the affected Windows machine has not yet been confirmed.initializeasagentCapabilities._meta["com.microsoft.agentlet/filesystem"] = { version: 1 }, with canonical constants and validation in@agentlet/protocol.available_commands_update.Compatibility and scope
New Servers require an updated Agentlet that advertises the initialization extension; there is no fallback to command-announcement readiness. New proxies continue emitting the legacy catalogue for older Servers, without claiming to fix timing behavior in those old Servers.
The Agentlet subtree and Huabu changes are separate commits. No Agenetes production changes, new RPCs, filesystem operations, path/UNC fixes, HTTP contract changes, Profile migrations or release changes are included.
Validation
pnpm typecheckpnpm format,pnpm lint:fix(no errors; existing warnings remain), and finalpnpm format:checkpnpm --filter @huabu/server exec vitest run src/modules/agent/acp/device-files.test.ts— 23 passed, including absent/delayed command announcements, incompatible initialization metadata, deadlines, reconnects and cleanup.pnpm --filter agentlet exec vitest run --root ../.. packages/protocol/tests/filesystem.test.ts packages/local/tests/fs-proxy.test.ts packages/local/tests/filesystem.test.ts— 34 passed on native Linux.pnpm --filter @huabu/server bundleAGENTLET_FS_PROXY_TEST_ENTRY="$PWD/apps/server/dist-bundle/agentlet/fs-proxy.js" pnpm --filter agentlet test— 24 passed, including the actual production proxy bundle through the trusted harness shell launch and daemon ACP bootstrap.node scripts/check-headers.mjsandgit diff --checkRemaining machine verification
The user will test the updated Server and Windows Agentlet together to determine whether this change removes the observed remote/cross-platform instability. Verify directory listing and UTF-8 reads on Windows, with Mac regression checks; record build identities if failures persist. Native Windows/macOS, Electron utility-process behavior and the affected deployment's actual notification timing have not been verified here. This PR does not claim that Windows-specific root cause has been conclusively established.