Commit graph

6141 commits

Author SHA1 Message Date
Armin Ronacher
c30840c2eb fix(coding-agent): keep hidden tools out of prompt rules and skills hint
Rules and the tool list follow the declared tools (active minus
hiddenDeclarations). The skills hint names no tool when the reader is
hidden. Codemode shows each tool's prompt guidelines with its
declaration, via the new ToolLoadout.getPromptGuidelines().

closes #10343
2026-10-05 18:50:17 +02:00
Mario Zechner
68c22123be feat(durable): powershell tool over argv exec 2026-10-05 18:37:25 +02:00
Armin Ronacher
8c911797c3 fix(coding-agent): close MCP connections that are still connecting on shutdown
close() now aborts a per-connection signal that closes the in-flight
client, cancels the retry wait, and waits for the connect attempt to
settle before returning.

closes #10249
2026-10-05 18:05:45 +02:00
Mario Zechner
b7dfc049e9 fix(env): upload to Windows as base64 lines through PowerShell's input 2026-10-05 17:32:22 +02:00
Mario Zechner
9a193ff7e2 fix(env): upload to Windows without relying on the end of stdin 2026-10-05 17:32:22 +02:00
Mario Zechner
6fa21f2a37 fix(env): time out stuck ssh calls and daemon starts 2026-10-05 17:32:22 +02:00
Mario Zechner
4bf5a6bc5c fix(env): detect Windows when its shell garbles the POSIX probe 2026-10-05 17:32:22 +02:00
Mario Zechner
97a600395e fix(env): Windows watcher identity from file indexes 2026-10-05 17:32:22 +02:00
Mario Zechner
956e81504c fix(env): ENOTDIR for listing a file on Windows, pinned NDK install, protocol docs 2026-10-05 17:32:22 +02:00
Mario Zechner
ed94330a20 feat(env): hardened SSH bootstrap and release daemon tests 2026-10-05 17:32:22 +02:00
Mario Zechner
46d0ff9365 fix(env): daemon robustness, output windows, native watching and Node read semantics 2026-10-05 17:32:22 +02:00
Mario Zechner
cd60a5b990 fix(durable): watcher coverage, growing reads, output BOM and progress defaults 2026-10-05 17:32:22 +02:00
Armin Ronacher
b223082bb2 fix(codemode): survive scripts that patch built-ins
Freeze built-ins and make built-in globals read-only before the script
runs, keeping instance overrides working via accessors. Validate all
worker payloads on the host and fail malformed ones as sandbox errors
instead of crashing the host process.

closes #10444
2026-10-05 17:29:19 +02:00
Armin Ronacher
04b97ef000 fix(coding-agent): keep MCP tools with --tools, add tool patterns and --no-mcp
--tools no longer removes MCP tools unless an entry starts with mcp__, so
pi --tools codemode can reach MCP servers. Unnamed MCP tools are never
declared directly; only tool_search can load them. --no-tools still
removes everything.

--tools and --exclude-tools accept * patterns, for example
--tools read,codemode,'mcp__radius__*'. --no-mcp disables the built-in
MCP support for one run.
2026-10-05 17:21:55 +02:00
Armin Ronacher
147b502816 fix(mcp): send application_type in OAuth dynamic client registration
OpenID Connect authorization servers treat a registration without application_type as a web client and reject http loopback redirect URIs. Derive it from redirect_uris when unset (MCP SEP-837): native for loopback hosts and custom schemes, otherwise web.

closes #10493
2026-10-05 17:11:00 +02:00
Armin Ronacher
021eae60a7 fix(coding-agent): resolve codemode read calls on images to image blocks
read declares an output schema: text for text files, and an image block
with its note for images, which codemode's image() shows.

closes #10251
2026-10-05 16:58:05 +02:00
David Brailovsky
5b6c792b42 fix(ai): retry HTTP/2 pending stream cancellation
Bedrock's HTTP/2 connection can stall until the SDK's 5-minute session
timeout, which fails the request with "The pending stream has been
canceled" (ERR_HTTP2_STREAM_CANCEL). The request was never sent, so it
is safe to retry, but the message was only retried when a DNS cause was
appended.

closes #10379
2026-10-05 13:49:46 +02:00
Mario Zechner
b78e6a9085 feat(env): SSH bootstrap and daemons in the npm package
- connectSsh detects the remote system, deploys the packaged daemon
  verified by SHA-256 before it runs, and connects over ssh with strict
  host keys under a fixed alias; scanHostKey and acceptHostKey
- Windows detection and deployment through PowerShell
- release builds the daemon for every supported remote system and
  ships them in @earendil-works/pi-env's bin/
- end-to-end tests against a disposable sshd
2026-10-05 13:06:08 +02:00
Mario Zechner
ba03e03f2d feat(env): add @earendil-works/pi-env, remote execution environments over SSH
- RemoteExecutionEnv: a Durable ExecutionEnv on another machine whose
  results match NodeExecutionEnv there; Connection to the pi-env daemon
- packages/env/daemon: the Rust daemon for Linux, macOS, Android and
  Windows, following Node and libuv semantics
- env.yml runs Durable's env tests, the daemon's checks and pi-env's
  conformance and differential tests on Linux, macOS and Windows
2026-10-05 12:50:48 +02:00
Ramiz Wachtler
b9ab918c62
fix(coding-agent): keep syntax colors on multiline tokens (#10356)
* fix(coding-agent): keep syntax colors on multiline tokens

- format each line of a highlighted span separately
- add regression test for python docstrings
- fixes #10143

* fix(coding-agent): use text color for string interpolations

- map highlight.js `subst` scope to text color
2026-10-05 10:35:43 +02:00
Armin Ronacher
997d31f286 Add [Unreleased] section for next cycle 2026-10-05 10:21:24 +02:00
Armin Ronacher
d78dc83d63 Release v1.0.3 2026-10-05 10:21:10 +02:00
Armin Ronacher
2a12fa4e88 docs(coding-agent): add new features to changelog 2026-10-05 10:13:51 +02:00
Armin Ronacher
6100fe5a83 fix(tui): keep Home/End for the editor in fullscreen mode
Fullscreen transcript top/bottom moved to Ctrl+Home/Ctrl+End.

closes #10314
2026-10-05 09:53:54 +02:00
Justin Santer
a37306d437
feat(ai): support Azure Foundry Chat Completions deployments (#9714)
* feat(ai): support Azure Foundry Chat Completions deployments

The Azure provider only implemented the Responses API, so Foundry
deployments that speak Chat Completions could not be used. On Chat
Completions the deepseek/deepseek-v4-pro model sends `thinking` and
`prompt_cache_key`, both of which Azure rejects with 400.

The provider now dispatches openai-completions alongside
azure-openai-responses. A stream wrapper resolves the Azure endpoint
onto the model first, since the shared openai-completions
implementation reads it off the model.

The request-shape differences are catalog compat rather than api code:
reasoning_effort instead of DeepSeek's thinking field, no prompt cache
parameters, reasoning_content kept on assistant turns so the prefix
Foundry cached stays byte-identical, and effort clamped to the
low/medium/high the deployment accepts.

The provider is renamed from azure-openai-responses to azure, since it
now serves more than the Responses API. The azure-openai-responses api
id is unchanged. Breaking: auth.json and models.json entries keyed on
azure-openai-responses must move to azure, and existing sessions see a
different provider on their next turn.

closes #9645

* feat(ai): apply the Azure deployment name map to Chat Completions

The Responses path already sent the deployment name from
AZURE_OPENAI_DEPLOYMENT_NAME_MAP. The Chat Completions path sent the
catalog model id, so any deployment not named after the model 404'd.

The Azure provider now swaps the deployment name into the request via
onPayload before dispatch, then runs the caller's own onPayload on it.
model.id stays the catalog id. The map helpers move to
azure-openai-config.ts so the provider can share them without
importing the SDK.

* docs(ai,coding-agent): add changelog entries for the Azure provider rename

Breaking: the azure-openai-responses provider is now azure. Users rename
the key in auth.json, models.json, and settings.json; SDK users switch to
getModel("azure", ...) and providers/azure.

Also note Azure Foundry Chat Completions support (DeepSeek V4 Pro).

---------

Co-authored-by: David Brailovsky <davidbrai@gmail.com>
2026-10-05 09:46:48 +02:00
Armin Ronacher
b2b5c42f61
fix(coding-agent): expect saved image label in codemode MCP test (#10463)
The codemode image() output now names the saved temp file before each
image, so the MCP integration test must expect the extra text item.
2026-10-05 00:58:33 +02:00
Armin Ronacher
4c6b724ea6 fix(coding-agent): do not report dead terminal stdin errors as crashes
When the terminal goes away, stdin reads and setRawMode fail with EIO (pi left in an orphaned background process group) or ENOTTY (revoked tty on macOS). These were uncaught, recorded in crashes.json, and prompted users to run /bug. Handle them on stdin like stdout/stderr and skip crash recording for dead terminal errors.
2026-10-05 00:41:56 +02:00
Armin Ronacher
1965a80693 fix(coding-agent,durable): fix CI test stub and macOS watch startup race
The bug report hint test stubbed InteractiveMode without the new
maybeShowInstallChangeWarning method.

On macOS fs.watch returns before libuv's FSEvents stream is live, so
changes made right after starting a watch could be lost. Rescan once
after installing native watchers there.
2026-10-05 00:02:59 +02:00
Armin Ronacher
d677d0ee71 feat(coding-agent): save codemode image() output to temp files
image() output is also written to a temp file and the result names the
path before each image, so later turns can reference generated images.
Output files are now created through one helper (still tmpdir()) and
are readable only by the user.

closes #10310
2026-10-04 23:32:43 +02:00
Mario Zechner
be882f3fa3 fix(durable): give watch conformance cases a timeout that covers polling latency 2026-10-04 23:15:37 +02:00
Mario Zechner
864777ba64 fix(durable): poll watches on Windows, where open watched directories block renaming their parents 2026-10-04 23:15:37 +02:00
Mario Zechner
a845108195 feat(durable): FileSystem.watch
- required watch(targets, onChange): missing targets, recursive targets
  with excludes, paths/overflow/error changes, native or polling mode
- NodeExecutionEnv: fs.watch events trigger rescans; changes are snapshot
  differences plus event paths; watchers for new directories before rescans;
  polling on network and FUSE file systems; directory budget
- conformance cases in native and polling mode
2026-10-04 23:15:37 +02:00
Mario Zechner
a19c09d9b7 feat(durable): bounded read tool via BinaryReader.scanLines
- BinaryReader.scanLines(): one pass inside the environment locates and
  measures a span of lines, decoded exactly like the whole file
- read detects images from the header and PNG chunk headers, scans once,
  and decodes only the head it shows; differential test against the
  whole-file algorithm
- StreamDecoder: Node's streaming TextDecoder dropped a U+FEFF after a chunk
  boundary in shell output and line readers
- fix the harness test to pick its tool result by call id
2026-10-04 23:15:37 +02:00
Mario Zechner
cdf79797b3 feat(durable): windowed shell output with counted skips
- ShellExecOptions.window and ShellOutputInfo.skipped: environments may omit
  output outside the retained tail and report exact counts
- ToolExecutionApi.outputWindow (tail limits and progress pace) and
  output(chunk, skipped); the bash tool passes both through
- OutputBuffer counts skips; property tests against the unskipped stream
- fix: progress snapshots no longer change which tail is kept
2026-10-04 23:15:37 +02:00
Mario Zechner
acfc60198e fix(durable): wait for killed Windows commands in env test cleanup; fix progress test status 2026-10-04 23:15:37 +02:00
Mario Zechner
674d64f091 feat(durable): configurable progress commit intervals
settings.progress.partialIntervalMs and outputIntervalMs replace the hardcoded
100 ms throttles for generation partials and running tool output.

refs #10357
2026-10-04 23:15:37 +02:00
Armin Ronacher
1b094148b9 fix(coding-agent): keep codemode working after the install is updated or removed
Resolve the QuickJS wasm path once and spawn the bundled codemode worker
from an in-memory data: URL. Show a restart hint when errors occur after
the install changed on disk.

closes #10439
2026-10-04 22:49:20 +02:00
Mario Zechner
f5d20047b3 fix(durable): retry temp dir removal in env conformance tests on Windows 2026-10-04 21:52:21 +02:00
Mario Zechner
4748c627ae feat(durable): bounded binary and directory readers, argv exec with stream info
- FileSystem.openBinaryReader(): positional reads of one opened regular file, noFollow
- FileSystem.openDirReader(): paged listings, vanished entries skipped
- Shell.exec() accepts an argv array (no shell); onOutput reports the stream
- Env conformance suite in /testing, run for NodeExecutionEnv
- Work-branch workflow running env tests on Linux, macOS and Windows
2026-10-04 21:52:21 +02:00
Mario Zechner
2e63fcdfbf docs(durable): changelog entry for Windows flushFile fix 2026-10-04 21:51:54 +02:00
Mario Zechner
1543dd8f63 fix(durable): make env tests and flushFile pass on Windows
- flushFile() on a directory returns is_directory on Windows too
- cwd tests check a marker file; Git Bash reports $PWD as an MSYS path
- retry temp dir removal while taskkill finishes killing descendants
- workflow running the env tests on Linux, macOS and Windows for durable-env-* branches
2026-10-04 21:51:54 +02:00
Armin Ronacher
bde882c747 fix(ai,coding-agent): persist rotated OAuth tokens when a refresh is cancelled
Cancelling a request or model refresh while an OAuth token refresh was in
flight discarded the rotated credential. Providers that rotate refresh tokens
(e.g. Sign in with ChatGPT) had already invalidated the old token, so the next
request failed with refresh_token_invalidated.

The caller's signal now cancels only the wait for the credential lock. Once a
refresh starts, it completes and is persisted, bounded by the refresh timeout.
Request auth and model-list refresh share this path.
2026-10-04 21:48:12 +02:00
Armin Ronacher
200387122c Add [Unreleased] section for next cycle 2026-10-04 02:41:25 +02:00
Armin Ronacher
cd32f7725f Release v1.0.2 2026-10-04 02:41:16 +02:00
Armin Ronacher
750105c80e docs(ai,coding-agent): move #9776 changelog entries to Unreleased 2026-10-04 02:36:48 +02:00
Duncan Ogilvie
76dfb88f63
feat(ai): add per-thinking-level sampling parameters (#9776) 2026-10-04 01:29:01 +02:00
Mario Zechner
70eceaade6 fix(durable): persist provider session identities
Assign each conversation its own UUIDv7 and forward it to model requests for prompt-cache affinity. Lazily backfill legacy conversations and cover real Codex cache reuse.

Closes #10424
2026-10-04 00:59:08 +02:00
Armin Ronacher
4c6fb7cfe8 Add [Unreleased] section for next cycle 2026-10-03 14:21:11 +02:00
Armin Ronacher
a7229ddc21 Release v1.0.1 2026-10-03 14:20:57 +02:00
Armin Ronacher
49b9df4895 fix(coding-agent): default NVIDIA to Nemotron 3 Ultra
NVIDIA no longer serves nvidia/nemotron-3-super-120b-a12b, so the default model and the NVIDIA e2e test now use nvidia/nemotron-3-ultra-550b-a55b.
2026-10-03 14:14:51 +02:00