//extensions/nushell:e2e-json runs isolated Pi JSON-mode module exercises using the fresh nu tool only.
Each case retains invocation, events, diagnostics, analysis, result, final text, stderr, and generated modules/fixtures under <OS temp>/pi-ext-nushell-json/<run>/ in a private directory.
The trace case retains validation.json, comparing the generated Nu module against an independent JS oracle over completed fresh-call debug logs.
--verify <run-directory> repeats trace validation for a retained run.
Current contract
Every extension shell request starts a fresh Nu process.
Active E2E prompts, tool allowlists, trace fixtures, oracle, and verification require nu; none claim persistent shell state or test the retired nu_session tool.
Pi's native nu --mcp server is separate MCP configuration, not a wrapper supplied by this extension.
Historical evidence
The observations below document earlier implementation experiments; MCP-wrapper and persistent-state evidence is retired and does not describe the current extension contract.
The first restricted invocation at .pi/tmp/nushell-json/2026-09-26T18-18-39-460Z/ exposed a Pi CLI allowlist conflict: --tools bash,read,write,edit excluded both Nu tools despite --nushell.
Activation then checked Pi's configured registry before displacing shell tools and reported excluded tools instead of claiming success.
An unrestricted pilot at .pi/tmp/nushell-json/2026-09-26T18-19-45-271Z/ demonstrated a model invoking ^nu -c inside nu, adding an avoidable second process.
Tool guidance then directed agents to pass Nu source directly, avoid nested Nu processes, and prefer Nu builtins for suitable work.
The five module exercises plus a session-state probe in .pi/tmp/nushell-json/2026-09-26T18-43-52-847Z/ settled with Nu tool calls and no nested Nu invocations.
That six-case run cost $0.4304 in projected API pricing and took 473 seconds; code-generation errors were corrected by agents before their final checks.
The first generated trace.nu consumed an invented JSONL schema despite passing its synthetic fixture, so those agent claims alone did not prove actual logger compatibility.
The earlier generated diagnostics correlated interleaved spans by spanId, paired starts with terminal events, and recorded the Pi process ID without command bodies or raw errors.
Earlier tests covered overlapping fresh calls, preflight failures, worker startup failures, private file permissions, error-code redaction, session state, and abort/reset handling.
The trace and state probes in .pi/tmp/nushell-json/2026-09-26T19-02-22-798Z/ used real diagnostic fields and generated fixtures.
The independent verifier initially failed because its stripped environment made Mise's already-configured file appear untrusted; trace/validation-failed-mise.json retains the exact failure.
Restoring the existing Mise environment made verification run, then a generated-result field naming difference caused a strict equality failure retained in trace/validation-schema-diff.json.
Semantic normalization then compared generated-module summaries with independent counts and nearest-rank percentiles over two completed real logs; trace/validation.json recorded two passes.
bench-current.txt measured 36.25 ms cold, 36.72 ms fresh, and 822 µs warm, 25 runs each.
Later correlated-logger samples were 10–20% slower, but bench-load.txt documents substantial concurrent compiler load; no causal performance claim follows from that comparison.
Limits
These are bounded integration probes, not proof of zero bugs or universal agent optimality.
Historical live tests do not verify the current extension on every operating system or with diverse model behavior.
Generated Nu modules in historical evidence workspaces are prototypes, not promoted packages.
# Nushell JSON-mode evidence
`//extensions/nushell:e2e-json` runs isolated Pi JSON-mode module exercises using the fresh `nu` tool only.
Each case retains invocation, events, diagnostics, analysis, result, final text, stderr, and generated modules/fixtures under `<OS temp>/pi-ext-nushell-json/<run>/` in a private directory.
The trace case retains `validation.json`, comparing the generated Nu module against an independent JS oracle over completed fresh-call debug logs.
`--verify <run-directory>` repeats trace validation for a retained run.
## Current contract
Every extension shell request starts a fresh Nu process.
Active E2E prompts, tool allowlists, trace fixtures, oracle, and verification require `nu`; none claim persistent shell state or test the retired `nu_session` tool.
Pi's native `nu --mcp` server is separate MCP configuration, not a wrapper supplied by this extension.
## Historical evidence
The observations below document earlier implementation experiments; MCP-wrapper and persistent-state evidence is retired and does not describe the current extension contract.
The first restricted invocation at `.pi/tmp/nushell-json/2026-09-26T18-18-39-460Z/` exposed a Pi CLI allowlist conflict: `--tools bash,read,write,edit` excluded both Nu tools despite `--nushell`.
Activation then checked Pi's configured registry before displacing shell tools and reported excluded tools instead of claiming success.
An unrestricted pilot at `.pi/tmp/nushell-json/2026-09-26T18-19-45-271Z/` demonstrated a model invoking `^nu -c` inside `nu`, adding an avoidable second process.
Tool guidance then directed agents to pass Nu source directly, avoid nested Nu processes, and prefer Nu builtins for suitable work.
The five module exercises plus a session-state probe in `.pi/tmp/nushell-json/2026-09-26T18-43-52-847Z/` settled with Nu tool calls and no nested Nu invocations.
That six-case run cost $0.4304 in projected API pricing and took 473 seconds; code-generation errors were corrected by agents before their final checks.
The first generated `trace.nu` consumed an invented JSONL schema despite passing its synthetic fixture, so those agent claims alone did not prove actual logger compatibility.
The earlier generated diagnostics correlated interleaved spans by `spanId`, paired starts with terminal events, and recorded the Pi process ID without command bodies or raw errors.
Earlier tests covered overlapping fresh calls, preflight failures, worker startup failures, private file permissions, error-code redaction, session state, and abort/reset handling.
The trace and state probes in `.pi/tmp/nushell-json/2026-09-26T19-02-22-798Z/` used real diagnostic fields and generated fixtures.
The independent verifier initially failed because its stripped environment made Mise's already-configured file appear untrusted; `trace/validation-failed-mise.json` retains the exact failure.
Restoring the existing Mise environment made verification run, then a generated-result field naming difference caused a strict equality failure retained in `trace/validation-schema-diff.json`.
Semantic normalization then compared generated-module summaries with independent counts and nearest-rank percentiles over two completed real logs; `trace/validation.json` recorded two passes.
`bench-current.txt` measured 36.25 ms cold, 36.72 ms fresh, and 822 µs warm, 25 runs each.
Later correlated-logger samples were 10–20% slower, but `bench-load.txt` documents substantial concurrent compiler load; no causal performance claim follows from that comparison.
## Limits
These are bounded integration probes, not proof of zero bugs or universal agent optimality.
Historical live tests do not verify the current extension on every operating system or with diverse model behavior.
Generated Nu modules in historical evidence workspaces are prototypes, not promoted packages.