Repository navigation
feat(core): machine.list tool in Code Mode - #65349
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Looks sound. bun test test/tool-machine.test.ts (3/3, run through the real Code Mode execute path), bun test test/plugin (666/666) and tsc -b in packages/core all pass. The flag-gate pattern matches the other flagged tool plugins. Machines.node is global, so the tool reads the same registry the machine routes use.
Public API: the HTTP API, SDK and config are unchanged. It adds one built-in Code Mode tool, machine.list (machine_list as a direct tool), only when the machines flag is on. Nothing existing changes.
No blocking concerns.
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.
A script in Code Mode can now ask which machines exist.
Until now the model knew machine names only from a note, so a script could not pick a machine by what it is or run something on several at once.
🚦 Flag:
machines. With the flag off nothing is registered.🔧 What it adds
One tool group,
machine, with one tool. It followsautomation.ts, and the output is core'sMachines.Info, the same record the machine routes return, so it carries no keys or join strings.executeis not availablemachine_listThe registry is the process-wide one (
Machines.nodeis a global node), the same instance the routes and the file tools read.📊 Proof
tool-machine.test.ts×5)bun typecheckinpackages/core, oxlint, prettier👀 Read:
packages/core/src/tool/plugin/machine.ts(36 lines).Follows #65347