Repository navigation
Reword job tag to job describe - #17496
Conversation
|
Hi, the CI is broken, can you fix it first? |
|
sure |
|
still one test that needs fixing @cosineblast btw |
|
yeah getting to it soon |
|
Oh, there is conflict.. |
cptpiepmatz
left a comment
There was a problem hiding this comment.
Looks reasonable to me, thank you
|
FYI, this breaks Atuin nushell integration Someone might want to fix it before the next release. |
|
We should maybe reintroduce the flag as a deprecated one so that the current code still works for now |
|
hooray |
I just realized that this is what broke my setup. Short tip for next person is to just change job spawn -d atuinSee console output below from opening a new terminal (and then running |
|
I wanted to add a deprecation warning, but I forgot, sorry |
|
Like happens, no worries. I included the error message in my post so hopefully it's easy for the next person to find. Not a hard fix. Just realised I didn't check on the atuin side to update. I'm a bit stretched today but we should check if a pr has already been done over there to update. Edit: I no longer see the message I was responding to but the note that we still need to check the ation side still holds. |
… time, and correct stale guidance in the MCP instructions and AGENTS.md (#19318) ## Description Once `$history` was full, each new evaluation shifted every older entry down by one. `History::push` returned the buffer length after evicting, so an index from an earlier response could point at a later result, while the instructions promised "indices do not shift, older ones simply become unavailable". This PR makes that promise true: indices only increase, and an evicted index reads as `null`. `push` also evicts until the buffer fits the limit instead of dropping one entry per push, so lowering `NU_MCP_HISTORY_LIMIT` trims `$history` to the new limit. Two `evaluate` calls sent at once (agents send parallel tool calls) each forked the same state, and the one that finished last overwrote the other. Both responses reported the same `history_index`, and the other call's `$history` entry and `$env` changes were lost. Evaluations now run one at a time, like lines typed into a REPL: a lock is held from fork to commit and released early when an evaluation is promoted to a background job. `list_commands` and `command_help` don't wait for it. The rest of the text `nu --mcp` sends to agents (`instructions.md`, `evaluate_tool.md`, and the `list_commands` / `command_help` descriptions) also gave advice that nushell contradicts. It said `ls **/*` walks hidden directories and `glob` avoids them, when the reverse is true. It used a `job spawn --tag` flag that was renamed in #17496, and said `command_help` shows input/output types, which it doesn't. The `evaluate` tool description still told agents to avoid large output, which contradicts the server instructions sent in the same session. This PR rewrites those passages to match nushell, tones down the all-caps "THE RULE" section while keeping the rule and its reason, and fills in the two short tool descriptions with their real output format and limits. In `AGENTS.md`, it fixes the claim that `cargo nuclippy-tests` runs all tests (it runs clippy), says how integration-test targets are named in crates without a `tests` target, states three wordy or hedged rules more plainly, and fixes a typo. ## User-facing changes (Release notes) - In `nu --mcp`, `$history` indices no longer shift when old entries are evicted. An evicted index reads as `null`, and `$history | length` counts every result stored in the session. Lowering `NU_MCP_HISTORY_LIMIT` now trims `$history` to the new limit. - `nu --mcp` now runs `evaluate` calls one at a time. Before, two calls sent together could get the same `history_index`, and one call's `$history` entry and `$env` changes were lost. - The MCP server's instructions and tool descriptions now match nushell's behavior for `ls` vs `glob` on hidden directories, `job spawn --description`, `command_help` output, and `\u{...}` escapes. - The `evaluate` tool description no longer tells agents to avoid large output. Output over the limit already comes back as a `note` pointing at `$history`. ## Additional notes <!-- Optional. Examples: - fixes #123 - closes #456 - related #789 Anything else reviewers should know. Remove this section if not needed. -->
This PR renames the job
tagterminology to jobdescribe.This partially addresses issue #17488 but there is still discussion to be made about allowing other value types for message tags, and tag pattern matching in general.
Release notes summary - What our users need to know
job tag, the--tagflag injob spawnand thetagcolumn injob list, astagwas renamed todescriptionfor these.Tasks after submitting
[ ] Update docs