Commit Graph

1067 Commits

Author SHA1 Message Date
can1357 94a813788f chore: bump version to 16.0.4 2026-06-17 09:44:33 +02:00
can1357 8eeb707387 chore: bump version to 16.0.3 2026-06-17 01:58:36 +02:00
can1357 dc14689fc1 chore: bump version to 16.0.2 2026-06-16 15:33:47 +02:00
can1357 e24f789de4 chore: bump version to 16.0.1 2026-06-15 21:30:30 +02:00
can1357 b27737df9e chore: fix changelogs 2026-06-15 19:51:53 +02:00
can1357 af99ba4406 Merge PR #2687: fix(agent): stop retrying interrupted tool streams 2026-06-15 19:46:11 +02:00
can1357 c081eb22d9 Merge PR #1879: fix(agent): handle string systemPrompt in telemetry content capture 2026-06-15 19:46:11 +02:00
can1357 44f9867e0e chore: bump version to 16.0.0 2026-06-15 17:27:48 +02:00
can1357 dbf4c734fc feat(coding-agent): added advisor backlog sync and end-of-turn callback support
- Added awaited `onTurnEnd` and `setOnTurnEnd` wiring for turn-end callbacks.
- Added `advisor.syncBacklog` settings (off/1/3/5) and documented 30-second catch-up caps.
- Fixed advisor runtime backlog handling with failure counters, waiters, and retry requeue.
- Updated agent sessions to enqueue advisor updates on turn end and removed direct `turn_end` branch logic.
2026-06-15 17:25:04 +02:00
roboomp 25069ea594 fix(agent): stopped retrying interrupted tool streams
Prevented auto-retry from regenerating write calls after a provider stream timeout has already exposed assistant content or tool-call arguments.

Fixes #2683
2026-06-15 15:24:38 +00:00
can1357 c3d6c9d652 fix(agent): renamed owned dialect env var to PI_DIALECT
- Replaced `PI_OWNED_TOOLS` lookups and owned-dialect documentation in `agent-loop.ts` and `types.ts` with `PI_DIALECT`.
- Added `prompt-tools-loop.test.ts` coverage that an unset `config.dialect` still selects Hermes from `Bun.env.PI_DIALECT`.
- Documented the breaking `PI_DIALECT` rename in `packages/agent/CHANGELOG.md`.
2026-06-15 14:01:12 +02:00
can1357 e1814d9a08 refactor: renamed grammar module to dialect with unified transcript rendering
- Renamed ToolCallSyntax type to Dialect and Grammar interface to DialectDefinition across all packages.
- Moved grammar directory to dialect and updated all import paths in agent, ai, catalog, and coding-agent packages.
- Added renderTranscript and renderThinking methods to DialectDefinition, enabling native dialect-aware conversation serialization.
- Consolidated rendering utilities into new dialect/rendering.ts with shared helpers for ChatML, legacy text, and dialect-specific formatting.
- Updated conversation serialization in agent and coding-agent to use dialect.renderTranscript() for native turn envelope rendering.
2026-06-15 13:58:12 +02:00
can1357 789d4f6948 chore: bump version to 15.13.3 2026-06-15 12:47:58 +02:00
can1357 f40e528073 fix(agent/compaction): skipped truncating tiny tool outputs during pruning
- Added a 50-token minimum floor constant for pruning decisions.
- Allowed non-superseded, non-useless tool results below that floor to avoid truncation.
2026-06-15 12:45:21 +02:00
can1357 e8ef706abf fix: filtered out whitespace-only assistant and thinking blocks from output
- Canonicalized assistant and thinking messages by trimming and collapsing dot text.
- Skipped rendering assistant and thinking blocks when canonicalized content was empty.
- Filtered ACP thinking notifications and session outputs to ignore placeholder content.
- Added canonicalizeMessage tests for undefined, blank, whitespace, and dot-only inputs.
2026-06-15 12:40:00 +02:00
can1357 2a7cb56abd feat(agent): rendered conversation logs with preferred tool syntax
- Updated compaction, branch summarization, and session dump formatting to pass preferred model tool syntax into conversation serialization.
- Enhanced shared serializers to render assistant tool calls and tool results through grammar envelopes when syntax is available, with the prior compact format as fallback.
- Aligned prompt, preview, and test fixtures to the new transcript tags: `[Think]`, `[Tool Call]`, and `[Tool Result]`.
2026-06-15 12:32:47 +02:00
can1357 39f866fc73 feat(agent): added interruptible tool polling for queued steering
- Added an `interruptible` field to AgentTool and documented when it is honored.
- Updated immediate-mode tool execution to poll steering during in-flight interruptible calls and abort them when steering is queued.
- Marked the coding `job` tool as interruptible and added tests covering mid-wait aborts versus boundary-only steering drain.
2026-06-15 11:53:25 +02:00
can1357 2de2926320 feat: added Gemini and Gemma in-band tool syntax support in runtime
- Added Gemini and Gemma syntax routing by model family and owned syntax env values.
- Added Gemini and Gemma in-band parsers for tool_code and token-based tool_call streams.
- Added rendering support for Gemini fenced tool_code/tool_outputs and Gemma tool tokens.
- Fixed parsing edge cases for comments, string escapes, nested args, and truncated blocks.
2026-06-15 11:40:55 +02:00
can1357 b7b1b54f6a chore: bump version to 15.13.2 2026-06-15 08:49:41 +02:00
can1357 641be81478 feat: added control over fabricated tool-result stream handling
- Added an abortOnFabricatedToolResult option to Agent and AgentLoopConfig to choose whether in-band fabricated tool results are aborted or drained.
- Propagated the option through agent loop wiring into wrapInbandToolStream so fabrication is aborted only when enabled.
- Exposed the setting in coding-agent as tools.abortOnFabricatedResult and wired it through session creation with a true default.
2026-06-15 07:44:03 +02:00
can1357 7687810c5d feat: added syntax-aware tool example rendering across catalog, AI, and agent modules
- Added model-to-syntax mapping in catalog with preferred tool-call syntax API.
- Added `ToolExample` typing and `ToolCallSyntax` exports across tool/grammar interfaces.
- Added syntax-aware tool example rendering through provider-specific grammar invocations.
- Added `exampleSyntax` context flow and example metadata so rendered prompts include examples.
2026-06-15 07:33:25 +02:00
can1357 fbba331f8a feat(cross-cutting): added multi-syntax in-band tool-call support for runtime tool conversion
- Added optional Agent and SDK tool-call syntax controls (`toolCallSyntax`, `PI_OWNED_TOOLS`) for owned calls.
- Added in-band grammar scanners and renderers for Anthropic, DeepSeek, GLM, Hermes, Kimi, PI, and Qwen3.
- Added supportsTools propagation and model schema updates to route unsupported models to fallback syntax.
- Replaced stream-markup parsing with syntax-specific in-band scanners and event conversion.
2026-06-15 07:33:24 +02:00
can1357 6c48b6224d chore: bump version to 15.13.1 2026-06-15 04:36:40 +02:00
can1357 ecd9f3220f feat(scripts): added changelog recovery mode for historical duplicate cleanup
- Added --recover CLI option to rebuild changelog fixes from tagged history.
- Pruned Unreleased bullets that match historical released items across all tags.
- Normalized output by sorting release sections by version and compacting bullet spacing.
2026-06-15 03:43:24 +02:00
usr_bin_roygbiv 189d3287b7 feat(agent): add description constraint to _i schema to prevent raw newlines 2026-06-14 16:35:25 -05:00
can1357 77ea88e436 fix(coding-agent): fixed crashes when system prompts were provided as strings
- Normalized agent `setSystemPrompt` to wrap string inputs into one-item arrays.
- Updated session creation to accept string `systemPrompt` values and normalize callback or direct results to string arrays.
- Adjusted extension result handling and test fixtures to accept string `systemPrompt` and missing `assistant_message` fields without crashing.
2026-06-14 21:53:24 +02:00
roboomp d142652fbe style: bun run fix 2026-06-14 18:26:27 +00:00
can1357 7e8122000a chore: bump version to 15.13.0 2026-06-14 18:21:59 +02:00
can1357 3efebf8805 fix: harden merged provider, agent-loop, eager, and autolearn paths
- agent-loop: raise repetition-detection floor to 180 chars and clear thinking
  replay anchors when collapsing a detected loop.
- providers/google: ignore empty text parts, retain terminal thoughtSignatures,
  and stop function-call signatures clobbering the prior block.
- autolearn: capture goal-mode at the turn boundary; harden managed-skill writes
  against hard-links/symlinks (O_NOFOLLOW + nlink); refuse minting managed skills
  whose name an authored skill already claims.
- eager tasks: thread agentKind through the session so a custom top-level agentId
  still gets always-mode delegation; split Eager Tasks prompt into hard vs soft.
- title-generator: race the online title model against a local tiny-model fallback.
- eager-todo: keep the soft reminder aligned with the todo init schema.
- mcp/stdio: keep close() detaching the read loop instead of awaiting it.
- stream loop: fix collapsing and tool-call thought-signature handling.
2026-06-14 17:09:59 +02:00
usr_bin_roygbiv 865d7630be fix(agent-loop): abort provider stream on repetition and restrict to Gemini models 2026-06-14 00:08:12 -05:00
usr_bin_roygbiv 1f324fd4a5 style(agent-loop): format and sort imports for loop detection fix 2026-06-13 23:54:50 -05:00
usr-bin-roygbiv 48843f0ea3 fix(agent-loop): detect repetition loops during assistant stream and abort gracefully 2026-06-13 23:20:36 -05:00
can1357 19766762cd chore: bump version to 15.12.6 2026-06-14 02:35:06 +02:00
can1357 9a26a945a7 fix: dropped unavailable forced toolChoice and added runtime fallback recovery
- Validated queued toolChoice against active tools in agent and coding-agent sessions.
- Rejected queued forced choices with reason "unavailable" when selected tools were inactive.
- Dropped provider toolChoice payloads when requested function tools were not offered.
- Probed Tokio worker-thread support and fell back to current-thread runtime creation.
2026-06-14 01:32:47 +02:00
can1357 eac1d21f93 chore: bump version to 15.12.5 2026-06-13 21:51:43 +02:00
can1357 15b5c1397f chore: bump version to 15.12.4 2026-06-13 18:04:39 +02:00
can1357 6d534a3c54 fix(agent): corrected agent event listener errors to structured warnings
- Replaced `Agent` listener error reporting with structured `logger.warn` calls.
2026-06-13 18:03:39 +02:00
can1357 705750453d fix(coding-agent-turn-interrupt/queue-ux): resolved steering abort state
- Replaced queued-message interrupt flow with session abort calls on empty submit and escape.
- Removed interrupting state and notifyInterrupting teardown paths from abort handling.
- Updated AgentSession queue operations to use shared steering and follow-up queue views.
- Propagated isAborting through session state and collab payloads to suppress late updates.
2026-06-13 17:31:25 +02:00
can1357 d4d89fadb9 fix: resolved queued-message flush flow by coalescing in-flight calls
- Coalesced concurrent interruptAndFlushQueuedMessages() calls through one in-flight promise.
- Replaced continue()-retry logic with agent.prompt() to flush queued messages from empty contexts.
- Skipped queued-message flush replay while compacting or streaming to avoid turn overlap.
- Updated flush path to consume queued steering first, then follow-ups, via dequeuing helper.
- Added a regression test for empty-state interrupt-and-flush delivering queued steers safely.
2026-06-13 16:17:56 +02:00
can1357 f0c6a54f51 fix: handled unknown model limits as null to avoid artificial token caps
- Replaced unknown model contextWindow/maxTokens sentinels with nullable values across types and catalog data.
- Mapped request token calculations to treat null maxTokens as unlimited output caps.
- Updated remote compaction and context checks to ignore unknown limits by using Infinity/0 fallbacks.
- Adjusted CLI/model registry flows to skip cap enforcement for null limits and render unknown values as '-'.
2026-06-13 15:35:40 +02:00
can1357 8b8651529d fix(agent/compaction): fixed hanging remote compaction requests with request timeouts
- Added `REMOTE_COMPACTION_TIMEOUT_MS` and wrapped remote compaction fetch signals with a timeout-backed `AbortSignal` to prevent indefinite hangs.
- Extended `requestOpenAiRemoteCompaction` and `requestRemoteCompaction` options with `timeoutMs` so callers can customize or rely on the new default watchdog.
- Optimized `trimOpenAiCompactInput` by caching serialized item sizes and decrementing a running budget as entries are removed, avoiding repeated JSON re-stringification.
2026-06-13 00:43:40 +02:00
can1357 6e8a56e24e fix(deps): migrated OpenAI providers to wire-based streaming and removed SDK dependency
- Replaced Azure and OpenAI provider calls with `postOpenAIStream` flow.
- Fixed stream error handling by retaining status, headers, and body on failures.
- Fixed stream parsing by handling raw JSON SSE frames and `[DONE]` events.
- Added `OpenAIHttpError` with parsed messages and timeout-aware retry behavior.
- Added remote-compaction tests for timeout, abort, and 500-fallback behavior.
2026-06-13 00:43:24 +02:00
can1357 f573e17e21 fix(coding-agent/modes): fixed Esc handling for compaction, handoff, and retry cancellation
- InputController now dispatched Esc to active viewSession operations, aborting compaction, handoff, and retry directly.
- Removed competing onEscape handler swaps across command and event controllers so overlapping auto/manual flow events no longer overwrote cancellation callbacks.
- Compaction now propagated fetch options and rethrew aborted signals so cancellations were not treated as remote failures.
2026-06-13 00:33:07 +02:00
can1357 64aa558e62 chore: consistency 2026-06-13 00:03:27 +02:00
can1357 db421bb2ef chore: bump version to 15.12.3 2026-06-12 18:13:09 +02:00
can1357 7975ebea8c chore: bump version to 15.12.2 2026-06-12 17:03:05 +02:00
can1357 42ffc83b5d fix: re-polled steering after yield and drained queued follow-ups after turns
- Re-polled steering at the loop yield boundary and included it in the pre-stop pending batch so late messages are processed immediately.
- Added session-side draining for stranded queued messages, scheduling an auto-continue when a prompt settles and follow-ups or steers remain.
- Added a regression test for late steering injection at yield and updated mid-turn collab prompt handling to keep steering messages in the pending display queue until consumed.
2026-06-12 17:02:42 +02:00
can1357 ba27bbd3a3 chore: bump version to 15.12.1 2026-06-12 16:27:14 +02:00
can1357 28df38ed37 feat(agent): added useless-result tagging and compaction dropping of tool outputs
- Added optional `useless` flags to tool result types and payload builders.
- Added `pruneUseless` and `dropUeless` options to control uneventful result pruning.
- Changed compaction and shake passes to prune or ignore non-error useless tool results.
- Changed conversation serialization to omit useless toolCall/toolResult pairs from output.
- Added coverage for useless tagging, pruning, and serialization behavior.
2026-06-12 16:26:38 +02:00
can1357 89e0801a5d chore: bump version to 15.12.0 2026-06-12 15:50:06 +02:00