Repository navigation
Conversation
5 of 10 tasks
mlieberman85
left a comment
Contributor
There was a problem hiding this comment.
Nice, this works end to end for me. I registered via the tool-bin symlink and the server comes up as openssf-baseline with the full tool set. A few things:
- The reason you name the framework applies to the default entry too. With
darnit-mcpfrom PyPI the installed frameworks are gittuf, openssf-baseline and reproducibility, andservewithout--frameworkpicks the first sorted one, which is gittuf. Could you add--framework openssf-baselineto theuvxentry as well, or an--frameworkoption oninstalldefaulting to it? A follow-up issue is fine if you'd rather keep this PR narrow. from-source.md:66suggestsinstall --project --from-source, which commits a machine-specific absolute path into a shared.mcp.json, andSECURITY_GUIDE.mdalready discourages--project. I'd drop that line or point it at the security guide.- On naming: since this registers "the running installation" whatever it is, something like
--localmight age better once 0.2.0 is on PyPI. Your call. - Nit: resolve the executable before the backup/mkdir in
cmd_install, so the failure path doesn't touch the settings dir.
Drafted with Claude Code; reviewed and posted by me.
6 of 12 tasks
darnit install always registers 'uvx --from darnit-mcp darnit serve' as the MCP server command. From a source checkout that runs the PyPI package, not the code that was installed. --from-source registers the darnit executable of the running installation instead: the console script next to the running interpreter, falling back to darnit on PATH. The default entry is unchanged. Signed-off-by: Marc-cn <130138935+Marc-cn@users.noreply.github.com> Assisted-by: Claude:claude-fable-5-1
A source checkout installs every workspace plugin, and darnit serve without --framework takes the first one it finds (community-spec). Claude Code then connected to a server that had no OpenSSF Baseline tools. Register 'serve --framework openssf-baseline', the same arguments as the manual command in docs/install/from-source.md. Found by running the registered server from Claude Code. Signed-off-by: Marc-cn <130138935+Marc-cn@users.noreply.github.com> Assisted-by: Claude:claude-fable-5-1
Review on darnitdevorg#577: the uvx entry runs the darnit-mcp release on PyPI, and releases before 0.2.0 serve the first installed framework by name. Pass --framework openssf-baseline there as well, so clients set up the documented way get the Baseline tools whatever version uvx resolves. Assisted-by: Claude:claude-fable-5-1 Signed-off-by: Marc-cn <130138935+Marc-cn@users.noreply.github.com>
Collaborator
Author
|
@mlieberman85 rebased onto main, and added your point 1 from #577 here: the plain |
Marc-cn
force-pushed
the
fix/install-from-source
branch
from
October 13, 2026 20:08
5c0485f to
01d73c1
Compare
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
darnit installalways writesuvx --from darnit-mcp darnit serveas the MCP server command. From a source checkout, that registers the PyPI package and not the code that was just installed.docs/install/from-source.mdrecommends that command.This adds
darnit install --from-source. It registers thedarnitexecutable of the running installation: the console script next to the running interpreter, falling back todarniton PATH. Without the flag, the entry is unchanged.The entry names the framework because a source checkout installs every workspace plugin, and
darnit servewithout--frameworktakes the first one it finds (community-spec).cli.py: the flag and a small_local_darnit_executable()helper.tests/darnit/test_cli.py(registers the local executable, falls back to PATH, fails cleanly with exit 1 and no settings file when nothing is found).docs/install/from-source.mdanddocs/getting-started/using-skills.mdnow show the flag. CHANGELOG entry under Added.I found this while building a quick-start script (follow-up PR): the audit used the checkout, but the server registered for Claude Code was the PyPI one.
Type of Change
Framework Changes Checklist
docs/architecture/framework-design.md) if behavior changed (the spec does not mention the install command, so nothing to change)uv run python scripts/validate_sync.py --verboseand it passesTesting
uv run pytest tests/ -v): 5141 passed, 26 skipped (main: 5138)uv run ruff check .)Also run by hand on RHEL 10, with HOME pointed at an empty directory:
darnit install --mcp-onlystill writes theuvxentry.darnit install --mcp-only --force --from-sourcewrites<checkout>/.venv/bin/darnitwith args["serve", "--framework", "openssf-baseline"], both when started from the venv path and through a~/.local/bin/darnitsymlink.--version).Tested with Claude Code 2.1.168 on WSL (Ubuntu 24.04): the registered server connects, and Claude Code ran a level 1 audit of a real repository through it. An earlier version of this PR registered
servewith no framework; that test is what showed Claude Code getting only the CSL tools.Not tested: Windows (the helper looks for
darnit.exethere).AI assistance
Claude Fable 5.1 wrote the code change, the tests. I ran every step and checked the results myself. The commit carries an
Assisted-by: Claude:claude-fable-5-1trailer.Additional Notes
Open question for review: the flag name.
--from-sourcedescribes the common case, but it also fits any non-PyPI install (for exampleuv tool install --editable). We can rename.