Repository navigation
feat: add the agent-toolkit command for the Agent Toolkit (#12) - #13
Merged
Merged
Conversation
The interactive command now starts with a project list: the current directory when it is a Gradle project, the Jmix projects one level below it and in ~/IdeaProjects, or a typed directory. --path skips it. Review fixes: a run whose input ends before the questions are answered fails instead of exiting 0; the list does not look into the home directory's own folders; the shell starts by its absolute path and steps get a PATH without empty or relative entries; version detection reads each build file once; the --path help and the guides describe the list; a test pins the order of the command menu.
Contributor
|
@Fedoseew - why |
Collaborator
Author
I wanted to write an |
`jmix ai-toolkit` asks for the steps in a checklist instead of one action: skills, guidelines and mcp, each with its state. A step starts checked unless it is up to date; with everything up to date nothing is checked and the checklist says so, and an empty choice changes nothing. The steps are a multi-value argument now, `all` is gone, and `--non-interactive` without steps runs all three. MCP gets a state from the toolkit metadata: each mcpAgents choice names its project config (projectConfig) and the servers it never gets (skipServers), so the CLI keeps no list of these files. The three status requests run at once, and the MCP questions reuse the metadata they fetched. `--servers` and `--agents` keep mcp checked, the MCP lists are asked whenever mcp is chosen, Back to the checklist keeps the earlier choice, and Ctrl+D in the numbered checklist of an IDE console aborts.
The command menu, `jmix agent-toolkit`, its messages, the `jmix new` warning that names it, the tests and the guides use the new name.
The command menu now lists agent-toolkit, the wizard offers Jmix 3.1.1, and the run installs the Agent Toolkit before it initializes Git. With five commands the menu keeps its banner from 21 rows, so the recording uses an 80x21 terminal.
The demo opens each feature with a title card: jmix new, now shorter (the project id, locale and location screens are cut), and a new scene for jmix agent-toolkit in an existing project, from the steps and their state to the toolkit's report. The menu logo reveals itself as in the CLI.
The demo opens on the install card and builds it again at the end, so the loop has no seam. The terminal screens and the progress lines stay longer, the title cards are half a second shorter, and the first title card arrives with a crossfade.
The link guard follows what the toolkit writes: a dangling link passes when its target would land in the project, the skills step also checks every `.<folder>/skills` holding a `jmix*` entry (names kept as listed paths, `..`-prefixed ones included for install.ps1), a Windows junction counts as a link, and an MCP config name that differs in letter case alone is no link. The step gets a fallback PATH when it has none. The status reads AGENTS.md leniently and only inside the project, and never reads a link in a skill folder. A metadata text input matches a server by its letters and digits. `jmix agent-toolkit` rejects a malformed --jmix-version before any question, Back offers the version typed before and keeps the MCP lists chosen before, also through the steps checklist. The headline of a run of some steps names them, notes wrap under their bullet in a terminal with a size, and control characters are removed from the version and the directory in messages. The menu descriptions of agent-toolkit, trial and update fit an 80-column terminal.
Windows PowerShell 5.1 writes the installer's redirected output in the code page of the windowless console Java starts it in, the OEM code page, not UTF-8. A project path with non-ASCII letters came out garbled: its changes were shown as absolute paths with replacement characters, and notes and errors were garbled too. The step log is now read as UTF-8 when it is valid UTF-8, else in the OEM code page from GetOEMCP. A Windows-only test runs PowerShell in a folder named café and checks the child's code page against GetOEMCP; the guide lists the limits. The menu width test renders the numbered command menu at 80 columns, signed out and signed in, instead of computing the row width. The test of an MCP config name in another letter case runs only on a case-insensitive disk, where it can fail.
The menu shows the shorter command descriptions, and the toolkit report names the steps that ran and wraps its notes at words.
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.
Adds
jmix agent-toolkit, also available from the command menu, to add or update the Jmix Agent Toolkit in an existing project: agent skills, Jmix guidelines inAGENTS.md, and MCP server configs.jmix newnow uses the same data.Tracks #12.