Commit Graph

2474 Commits

Author SHA1 Message Date
Armin Ronacher
df84e3d22f feat(branding): corporate said we're professionals 2026-04-22 11:04:56 +02:00
Samuel Painter
ee462dd70d fix(coding-agent): sanitize markdown links in exported session HTML (#3532)
marked v15 does not filter dangerous URL protocols. The default link
renderer passes href values through verbatim, so markdown like
`[click](javascript:alert(1))` renders as a clickable XSS link in
shared/exported session HTML.

Add custom link and image renderers that:
- Block javascript:, vbscript:, and data: protocol URLs
- Escape href/title/alt attributes via escapeHtml()

Also escape img.mimeType in session image rendering to prevent
attribute breakout from crafted session JSONL.

Fixes #3531
2026-04-22 10:53:03 +02:00
Mario Zechner
9f91276a42 Add [Unreleased] section for next cycle 2026-04-22 02:15:04 +02:00
Mario Zechner
a2c183db0f Release v0.68.1 2026-04-22 02:14:13 +02:00
Mario Zechner
6cc4ad26e3 docs(coding-agent): audit unreleased changelog entries 2026-04-22 02:13:10 +02:00
Mario Zechner
0bb0a58466 feat(ai): add Fireworks provider support closes #3519 2026-04-22 01:09:11 +02:00
Mario Zechner
97a38bf652 fix(coding-agent): configure inline tool image width
closes #3508
2026-04-22 00:56:01 +02:00
Mario Zechner
60290b0d75 fix(coding-agent): expand ~ in sessionDir
closes #3514
2026-04-22 00:21:57 +02:00
Mario Zechner
759d551527 fix(agent): emit parallel tool completion eagerly\n\ncloses #3503 2026-04-22 00:15:56 +02:00
Mario Zechner
e58d631c89 Reapply "fix(ai): own Anthropic SSE parsing to avoid SDK JSON.parse hard-failures"
This reverts commit fc9220d2de.
2026-04-21 23:42:19 +02:00
Mario Zechner
fc9220d2de Revert "fix(ai): own Anthropic SSE parsing to avoid SDK JSON.parse hard-failures"
This reverts commit 4b926a30a2.
2026-04-21 23:19:52 +02:00
Aliou Diallo
81de426f96 test(coding-agent): fix showLoadedResources mocks (#3518)
Add getCommandDiagnostics and getShortcutDiagnostics mocks to fix
'Cannot read properties of undefined' errors in InteractiveMode tests.

regression from 32a305cb
2026-04-21 23:05:38 +02:00
Mario Zechner
4b926a30a2 fix(ai): own Anthropic SSE parsing to avoid SDK JSON.parse hard-failures
Bypass the Anthropic SDK streaming parser entirely. Use
client.messages.create().asResponse() and decode the SSE stream
ourselves with defensive JSON parsing that repairs invalid escape
sequences and control characters inside string literals.

- Switch from SDK .stream() to .asResponse() + pi-owned SSE decoder
- Add repairJson() / parseJsonWithRepair() to json-parse.ts
- Add anthropic-sse-parsing.test.ts regression for malformed tool deltas
- Update github-copilot-anthropic.test.ts mock to match new call path
- Update deprecated claude-3-5-haiku-20241022 refs to claude-haiku-4-5
- Remove stale non-reasoning model test

fixes #3175
2026-04-21 23:00:56 +02:00
Aliou Diallo
01ec6e2e7f docs(coding-agent): fix promptGuidelines examples to name tools explicitly (#3489)
promptGuidelines bullets are appended flat to the Guidelines section
with no tool name prefix. Using 'Use this tool when...' is ambiguous
because the LLM cannot tell which tool 'this' refers to. Updated docs
and examples to use explicit tool names instead.
2026-04-21 13:07:42 +02:00
Aliou Diallo
b2a1997ea0 fix(coding-agent): fix grep/find/ls HTML export rendering (#3491)
Rename BUILTIN_TOOLS to TEMPLATE_RENDERED_TOOLS to match what the set
actually represents: tools rendered directly by the HTML template instead of
pre-rendered through the TUI→ANSI→HTML pipeline.

Move grep and find off the template-rendered exclusion path so they use their
existing TUI renderCall/renderResult output in HTML export.

Add a dedicated HTML renderer for ls and keep it in the template-rendered set.
Unlike grep and find, rendering ls through the terminal-oriented Text component
introduced spacing artifacts in exported HTML due to full-width line padding,
so ls is rendered natively in the export template instead.
2026-04-21 13:06:49 +02:00
Mario Zechner
c6cef7c806 fix(coding-agent): render HTML-like message content verbatim in exports
closes #3484
2026-04-21 09:24:44 +02:00
Mario Zechner
19013265a8 Add [Unreleased] section for next cycle 2026-04-20 23:55:47 +02:00
Mario Zechner
6f345b78d5 Release v0.68.0 2026-04-20 23:54:54 +02:00
Mario Zechner
639da8a602 docs(changelog): audit unreleased entries 2026-04-20 23:53:53 +02:00
Mario Zechner
14ad636fb5 fix(coding-agent): initialize system prompt options lazily 2026-04-20 23:22:21 +02:00
Mario Zechner
12d7161884 fix(coding-agent): add session_shutdown reasons closes #2863 2026-04-20 23:11:08 +02:00
Douglas Stephen
1891b9ac01 feat: Expose BuildSystemPromptOptions on before-agent-start event. (#3473)
Resolves: #3463
2026-04-20 23:06:47 +02:00
Mario Zechner
e4f7fe7bb7 feat(coding-agent): batch package updates
closes #2980
2026-04-20 22:56:26 +02:00
Mario Zechner
c40efa9bab fix(coding-agent): resolve shell config from session settings
Stop shell resolution from consulting ambient process.cwd() during bash execution and use the active session's shellPath setting instead.

closes #3452
2026-04-20 22:32:11 +02:00
Mario Zechner
5a4e22ea44 fix(coding-agent): remove process-cwd tool singletons and use tool-name allowlists
- switch SDK/CLI tool selection to name-based allowlists
- apply allowlists across built-in, extension, and SDK tools
- remove ambient process.cwd defaults from core tooling and resource helpers
- update tests, examples, and TUI callers for explicit cwd plumbing
- add regression coverage for extension tool filtering

closes #3452
closes #2835
2026-04-20 22:05:28 +02:00
Mario Zechner
27c1544839 fix(coding-agent): use tool-name allowlists and remove cwd-bound singletons
- treat tools as a global allowlist across built-in, extension, and SDK tools
- remove process-cwd singleton tool usage from SDK and CLI paths
- add regression coverage for extension tool filtering

closes #3452
closes #2835
2026-04-20 22:05:28 +02:00
Mario Zechner
ed89480f20 docs(coding-agent): document async extension factories closes #3469 2026-04-20 22:02:03 +02:00
Mario Zechner
b73212616d fix(coding-agent): skip redundant npm package updates
closes #3000
2026-04-20 19:12:52 +02:00
Mario Zechner
3054fd7a3b fix(ai,coding-agent): support anthropic-style cache control for openai compatibles closes #3392 2026-04-20 17:12:05 +02:00
Mario Zechner
2f4f283cc2 fix(ai,coding-agent): preserve non-vision image placeholders closes #3429 2026-04-20 16:52:27 +02:00
Mario Zechner
74139c3f66 feat(coding-agent): add configurable working indicator closes #3413 2026-04-20 16:28:39 +02:00
Mario Zechner
61579214c8 fix(coding-agent): handle symlinked session selector paths closes #3364 2026-04-20 16:25:12 +02:00
Mario Zechner
860d67518c fix(coding-agent): clarify session ID docs closes #3390 2026-04-20 16:12:32 +02:00
Mario Zechner
d56e5aea0b fix(coding-agent): detect Windows pnpm global installs closes #3378 2026-04-20 15:59:57 +02:00
Mario Zechner
6b55d6859d fix(tui): restore shifted xterm input
closes #3436
2026-04-20 15:36:10 +02:00
Mario Zechner
da6a81d398 fix(coding-agent): reuse session thinking for compaction closes #3438 2026-04-20 15:09:50 +02:00
Mario Zechner
d66ef6dce8 fix(coding-agent): add missing typebox dependency
closes #3434
2026-04-20 15:08:34 +02:00
Mario Zechner
5ea8a276eb fix(coding-agent): preserve share page tool output indentation closes #3440 2026-04-20 14:46:37 +02:00
Marek Pazik
d4e2e563ae feat(coding-agent): make scoped models and tree filter shortcuts configurable (#3343)
- Add app.models.{save,enableAll,clearAll,toggleProvider,reorderUp,reorderDown}
- Add app.tree.filter.{default,noTools,userOnly,labeledOnly,all,cycleForward,cycleBackward}
- Migrate scoped-models-selector cancel to tui.select.cancel
- Prefer reserved actions on key collision in extension shortcut conflict check
2026-04-20 14:35:30 +02:00
Mario Zechner
d554409b1f fix(coding-agent): split /clone from /fork UX
closes #2962
2026-04-20 14:33:32 +02:00
Mario Zechner
62c1c4031c fix(coding-agent): add OpenRouter attribution headers
closes #3414
2026-04-20 14:14:36 +02:00
Armin Ronacher
23569e304b feat(coding-agent): add fork position and duplicate session option (#3431) 2026-04-20 14:13:34 +02:00
Ramiz Wachtler
2b45243817 fix(coding-agent): avoid duplicate symlinked skills in pi config (#3417)
- dedupe resolved skill entries by canonical path (realpathSync) with raw-path fallback matching loadSkills()

- preserve precedence by applying skill dedupe after resource precedence sorting (first winner retained)

- add tests to verify expected behavior

- closes #3405
2026-04-20 13:23:00 +02:00
Andrea Baccega
9b28e185db fix(coding-agent): use browser-safe share viewer shortcuts (#3374)
fixes #3358
2026-04-19 08:49:12 +02:00
Danila Poyarkov
a2ec01e12f fix(coding-agent): coerce stringified JSON edits in edit tool (#3370)
Some models (Opus 4.6, GLM-5.1) send the edits parameter as a JSON
string instead of a parsed array. This fails AJV validation with
'must be array' and models fall back to sed/python.

Parse stringified edits in prepareEditArguments before validation.
2026-04-18 18:29:23 +02:00
Neon
182d4ceea3 fix manifest glob expansion and add regression test (#3350) 2026-04-18 13:16:39 +02:00
Mario Zechner
00887125c0 Add [Unreleased] section for next cycle 2026-04-18 01:32:50 +02:00
Mario Zechner
a1edb8a463 Release v0.67.68 2026-04-18 01:31:38 +02:00
Aliou Diallo
bfa11a50e4 feat(agent,coding-agent): per-tool executionMode override for sequential tool execution (#3345)
* feat(agent,coding-agent): add per-tool executionMode field to AgentTool and ToolDefinition

Add optional executionMode?: ToolExecutionMode to AgentTool and
ToolDefinition interfaces. Propagate through wrapToolDefinition and
createToolDefinitionFromAgentTool. No behavioral change yet — agent
loop will read this field in a follow-up.

* feat(agent): support per-tool executionMode override for sequential execution

When a tool defines executionMode='sequential', the agent loop
forces sequential execution of all tool calls in that batch,
even if the global config is parallel.

* feat(coding-agent): re-export ToolExecutionMode from @mariozechner/pi-agent-core

Makes the type available to extensions that want to set
executionMode on tool definitions.

* feat(coding-agent): add tic-tac-toe extension example with executionMode: sequential

Demonstrates per-tool executionMode: the agent plays via move/play
tool calls that share a cursor. Without sequential execution, play
can resolve before earlier moves finish, landing on the wrong cell.
2026-04-18 00:45:57 +02:00
Mario Zechner
cbf0d1fbfa Add [Unreleased] section for next cycle 2026-04-17 23:06:48 +02:00