Skip to content

feat: add the agent-toolkit command for the Agent Toolkit (#12) - #13

Merged
Fedoseew merged 11 commits into
mainfrom
feature/12-ai-toolkit-command
Nov 23, 2026
Merged

Fedoseew merged 11 commits into
mainfrom
feature/12-ai-toolkit-command

Conversation

@Fedoseew

@Fedoseew Fedoseew commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

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 in AGENTS.md, and MCP server configs.

  • Choose a project, then check the steps to run. Each step shows its state, and the steps that are up to date start unchecked.
  • Every answer can be passed as an argument, so scripts and AI agents can run it without prompts.
  • The offered MCP servers and AI agents come from the toolkit itself; jmix new now uses the same data.

Tracks #12.

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.
@knstvk

knstvk commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

@Fedoseew - why ai-toolkit and not agent-toolkit?

@Fedoseew

Copy link
Copy Markdown
Collaborator Author

@Fedoseew - why ai-toolkit and not agent-toolkit?

I wanted to write an ai-agent-toolkit, but it looked too long compared to the other labels, and just ai-toolkit seemed more understandable than agent-toolkit, since agent without the AI prefix could be misleading.
But probably we can show ai-agent-toolkit label it is not a problem.

`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.
@Fedoseew Fedoseew changed the title feat: add the ai-toolkit command for the Agent Toolkit (#12) feat: add the agent-toolkit command for the Agent Toolkit (#12) Nov 19, 2026
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.
@Fedoseew
Fedoseew merged commit 35dd237 into main Nov 23, 2026
4 checks passed
@Fedoseew
Fedoseew deleted the feature/12-ai-toolkit-command branch November 23, 2026 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants