Repository navigation
Native modules: Ruby, PHP, .NET, Swift, Zig and Deno (#364) - #370
Draft
raiseCatError wants to merge 5 commits into
Draft
raiseCatError wants to merge 5 commits into
raiseCatError wants to merge 5 commits into
Conversation
…e project's own files and the install location Same pattern as the existing runtimes: the requested version from the project's files (.ruby-version/Gemfile, .php-version/composer.json, global.json, .swift-version/Package.swift, build.zig.zon/.zigversion, .dvmrc, plus .tool-versions and mise), the active version from the install path, never by running the tool. Minimum versions (global.json, swift-tools-version, minimum_zig_version) are floors and are not judged as mismatches. A binary inside the workspace is not inspected.
4 of 21 tasks
- Package.swift: swift-tools-version comes from the first line only, as SwiftPM reads it, and manifests larger than 4 KiB are no longer skipped. - build.zig.zon: read up to the standard 64 KiB metadata bound. - go.mod/go.work: directives stay on one line (CRLF and a trailing comment allowed); a match can no longer span line breaks. - .tool-versions: asdf's .NET plugin name (dotnet-core) is recognized. - Install layouts: RVM and chruby/ruby-install rubies report their version. The linear-time regression now asserts the parsed values and a 250 ms bound that the previous Gemfile pattern (about 0.8 s on the same input) fails. The hostile-workspace test plants php, dotnet, swift and zig bait, hostile Ruby, .NET, Swift, Zig, Deno and PHP metadata, and checks every runtime's active version stays unknown for workspace binaries.
…re recommended from their project files The six modules named icon ids the core icon set did not have, so they showed their text label even with Nerd icons on. The code points match Starship's Nerd Font preset and Nerd Fonts' glyph names (provenance in icons.ts). Each module is now recommended when its own project files are present (Gemfile, composer.json, global.json, Package.swift, build.zig, deno.json and their version files); recommendations still enable nothing. A test keeps every first-party pack module on a core icon.
…ent the six modules The planted-binary checks passed home as the workspace, and a workspace that contains home is deliberately not a workspace (it holds the user's own tools), so the refusal path was never reached; the planted binaries also had no install layout to report. They now use a home outside the workspace and a Homebrew/rbenv-shaped layout that would report 6.6.6 if the boundary did not hold, and assert the refusal note. The Context Modules guide lists the new capabilities, what each reads, and which declarations are floors.
This was referenced Oct 11, 2026
This branch has not been deployed
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.
Native runtime modules for #364 (under #305), based on #345. Six new modules in the bundled
nmsh.projectpack: Ruby, PHP, .NET, Swift, Zig, Deno. This PR is the canonical owner of the native-runtime code; #368 carries an older copy of Ruby/PHP (see below)..ruby-version/Gemfile,.php-version/composer.json,global.json,.swift-version/Package.swift,build.zig.zon/.zigversion,.dvmrc, and.tool-versions/mise for all (asdf'sdotnet-coreincluded).global.jsonwithoutrollForward: disable,swift-tools-version,minimum_zig_version) show as≥xand are not judged as mismatches.Security review (this round)
^\s*ruby\s+…withmrescanned every line start: 730–817 ms on a 60 KB hostile Gemfile vs. 0.3 ms now. The regression test now asserts the parsed value and a 250 ms bound, and fails against the old pattern (checked).Package.swift: read from the first line only, as SwiftPM does; manifests over 4 KiB were silently skipped before (real packages often are), now read up to the standard bound.go.mod/go.work: directives can no longer match across line breaks (CRLF and trailing comments allowed).build.zig.zon: standard 64 KiB bound instead of 16 KiB.readMetadataText), values are sanitized at the fact boundary (controls, bidi). The hostile-workspace test now plantsphp/dotnet/swift/zigbait and hostile Ruby/.NET/Swift/Zig/Deno/PHP metadata, and asserts every runtime's active version stays unknown.homeas the workspace, which by design disables the workspace boundary, and the planted binaries had no install layout; they now use a real home and a layout that would report 6.6.6 if the boundary failed.Overlap with #368 (for the integration branch)
src/context/capabilities/runtimes.ts(Ruby/PHP),src/context/packs/builtin/nmsh.project.json(ruby/php modules),tests/contextCapabilities.test.ts,tests/moduleManager.test.ts(module count). #368's copy still has the quadratic Gemfile regex; take this PR's version. Details:docs/development/context-workspace-handoff.md(handoff PR).Verification
contextCapabilities,contextPacks,moduleManager,contextHostileWorkspace,contextKernel,agentContextall pass.npm run verifyat 417d105: 2111/2115; the four failures (live completion capture, a screensaver frame budget, a motion test, fuzzy capture) pass in isolation (63/63) and came from machine load (load average 24–48). An earlier run also failedlive fish: keys typed the moment a read finishes(Flaky: Fish can lose keys typed right after a handed-over read returns #356, workflow track), which passes in isolation.Tests (ubuntu-24.04, 2/2)was cancelled (a hung live test after ~9 minutes), so it was not a green result.Stacked follow-ups: #372 (Elixir, Dart, Flutter) → #373 (build module).