Commit Graph

6420 Commits

Author SHA1 Message Date
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 fc912904e1 feat(coding-agent/prompts): made oracle and reviewer prompts non-blocking
- Removed the blocking flag from the oracle agent prompt metadata.
- Removed the blocking flag from the reviewer agent prompt metadata.
2026-06-15 12:19:48 +02:00
can1357 3ab675a83b fix: added buffered worker inboxing and standardized worker selectors
- Added `WorkerInbox` and `installWorkerInbox(port)` to queue worker messages before bind.
- Added `consumeWorkerInbox()` to replay buffered messages and clear one active inbox.
- Added buffered inbox consumption in JS and tab worker transports before direct message handlers.
- Normalized worker selector arguments to the `__omp_worker_*` naming across workers and tests.
2026-06-15 11:59:44 +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 6385afdfb7 test(coding-agent): replaced Bun.sleep and wall-clock timing
- Replaced Bun.sleep and wall-clock timing with fake timers (vi.useFakeTimers), release gates, and deterministic polling across 15+ test files to eliminate flakiness and improve speed.
- Consolidated per-test fixture setup into beforeAll/afterAll lifecycle hooks across 20+ test files, reducing redundant initialization and improving test performance by reusing shared immutable fixtures.
- Stubbed network calls in ModelRegistry and test discovery to prevent unintended outbound requests during test execution.
- Replaced subprocess-based test coordination (file markers, Bun.sleep polling) with in-memory fakes (FakeWebSocket, FakeLspServer, VirtualClock) for deterministic, fast test execution.
2026-06-15 11:48:55 +02:00
can1357 9e65499e15 test(coding-agent): simplified agent hub row ordering test assertions
- Added a helper that renders hub output and extracts ordered agent IDs.
- Replaced positional string assertions with explicit row-order expectations.
- Awaited asynchronous theme initialization in test setup.
2026-06-15 11:43:33 +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 fc2ba5073a fix(coding-agent): fixed interactive input queueing during session race windows
- Added a streamingBehavior field to submitted user inputs and threaded it through interactive mode types and controller start-up.
- Updated interactive submission dispatch to default to followUp queueing while preserving explicit steer intent when provided.
- Changed tests to verify followUp and steer queueing behavior, preventing AgentBusyError from race-window busy sessions.
2026-06-15 11:38:31 +02:00
can1357 9566c22c77 fix(coding-agent): preserved row order in open agent hub
- Captured each row's initial position in AgentHubOverlayComponent on first refresh and reused it on later refreshes.
- Changed subsequent sorting to prioritize status then prior row position, so activity updates no longer reordered visible rows.
- Added a regression test that verifies row ordering stays stable when activity changes and new agents append at the end.
2026-06-15 11:08:15 +02:00
can1357 6a476a90cd fix(coding-agent/session): tracked agent_end as post-prompt task to avoid recovery race
- #handleAgentEvent now delegates non-`agent_end` events to a new `#processAgentEvent` routine.
- For `agent_end`, it tracked a resolver promise via `#trackPostPromptTask` before awaiting event handling and resolved it in `finally`.
- This kept `#waitForPostPromptRecovery()` from returning before deferred compaction or handoff work was registered.
2026-06-15 11:01:23 +02:00
can1357 d6c51fe69a feat: hashline .= as seperator 2026-06-15 10:46:45 +02:00
can1357 4d95a0e1dc feat(catalog/provider-models): added OpenAI model provider descriptors
- Updated default model identifiers across many catalog providers to newer model versions.
- Renamed a couple OpenAI compatibility provider descriptors, including Together and Zhipu coding-plan identifiers.
- Added multiple new OpenAI-compatible specialized provider descriptors for additional model provider families.
2026-06-15 10:40:48 +02:00
roboomp e9ea8a87d2 fix(agent): tracked non-message context deltas
Track the non-message token estimate used for provider-anchored assistant usage, then add only positive current system/tool growth during pre-prompt threshold checks. Restore released collab changelog entries to the immutable 15.13.1 section.

Fixes #2628
2026-06-15 09:47:28 +02:00
roboomp 6d063d5e2a fix(agent): preserved non-message pre-prompt tokens
Include the current system prompt and active tool schemas when provider-anchored pre-prompt checks estimate threshold pressure, and cover the case with a regression test.

Fixes #2628
2026-06-15 09:47:25 +02:00
roboomp 2f81862935 fix(agent): aligned pre-prompt context usage
Use provider-anchored context usage for pre-prompt context-full threshold checks when available, then add only pending prompt tokens. This keeps OpenAI Responses encrypted reasoning payloads from overcounting local prompt pressure while the visible context usage remains below threshold.

Fixes #2628
2026-06-15 09:47:20 +02:00
can1357 e805b34ecf feat(coding-agent): added unexpected-stop detection with automatic retries and a 3-retry cap
- Added `features.unexpectedStopDetection` and `unexpectedStopModel` settings for opt-in behavior.
- Added assistant-stop handling to classify stop reasons and resume generation with retry prompts.
- Added unexpected-stop classifier logic with candidate checks, model fallback, and YES/NO parsing.
- Added retry tracking that caps auto-continues at three attempts and logs a warning when exceeded.
2026-06-15 09:38:25 +02:00
can1357 b7b1b54f6a chore: bump version to 15.13.2 2026-06-15 08:49:41 +02:00
can1357 eaffa00177 fix(coding-agent/eval): routed JS worker ready signaling through init response
- Updated worker core so it emitted `ready` only after receiving an `init` message instead of on construction.
- Changed worker startup to send `init` before waiting for readiness, enabling startup errors to fail fast and trigger fallback.
- Expanded JS worker tests with startup-error simulation and verified execution falls back to the inline worker when spawning fails.
2026-06-15 08:49:00 +02:00
can1357 ebe05c3fc2 fix(coding-agent/eval): fixed JS eval worker initialization with inline fallback on failure
- Initialized JS workers through a new helper that attaches message and error listeners before initialization handshake and enforces the existing ready timeout.
- Handled startup failures by rejecting on init or error events, cleaning up listeners and replacing dead workers with a retry path.
- Retried session creation with an inline worker after non-inline init failure so requests no longer stall on worker startup timeouts.
2026-06-15 08:45:15 +02:00
can1357 d6471c2244 feat(coding-agent/tools): allowed flattened init for Gemini TODO calls
- Updated `init` handling to build a single-phase list from `items` when `list` is absent, using `phase` if provided or defaulting to `Tasks`.
- Kept the existing init validation behavior by emitting `Missing list for init operation` only when neither `list` nor `items` was supplied.
- Added tests for flattened init forms, including implicit phase defaulting, explicit phase use, and the missing-input error case.
2026-06-15 08:19:18 +02:00
can1357 5afe0e5832 fix(ai/grammar): updated grammar rendering for example tool-call output
- Added an `example` option to `GrammarRenderOptions` and threaded it through grammar tool-call renderers.
- Updated Harmony tool-call rendering to output raw argument JSON when example mode is enabled.
- Removed `string` attributes from generated XML `parameter` elements in tool invocation output.
2026-06-15 08:17:20 +02:00
can1357 8b7dd10a8a feat: added native tool inventory rendering with TypeScript signatures
- Added `jsonSchemaToTypeScript` and `renderToolInventory` to generate tool blocks with TypeScript signatures.
- Added `examples` and `TSchema` fields to dump-tool metadata and passed them through prompt rendering.
- Changed Harmony invocation rendering to omit `<|constrain|>json` markers in tool call payloads.
- Added compact native tool list-mode inventory rendering with full `# Tool:` output elsewhere.
2026-06-15 08:12:58 +02:00
can1357 ba82ed6e59 test: update hashline tests 2026-06-15 07:47:54 +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 4c786de933 feat(coding-agent/tui): added start-based truncation support for tree list rendering
- Added a `truncateFrom` option to `TreeListOptions` supporting `start` and `end` modes, defaulting to `end`.
- Updated `renderTreeList` to compute candidate items and summary placement based on truncation direction.
- Set the todo list renderer to use start-side truncation so collapsed todo output shows the tail entries first.
2026-06-15 07:33:25 +02:00
can1357 a1070d055e feat(coding-agent/modes): updated large-paste menu with explicit attachment actions
- Replaced large-paste wrap options with a single `<attachment>` wrapper action.
- Added explicit local-file attachment and inline paste choices to the selector.
- Updated the changelog to document the new large-paste action set.
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 907bc9979e feat: renamed opcodes to simplified variants
- Renamed line and block patch op verbs to XCHG, DEL, and INS in parsing and formatting.
- Updated grammar and tokenizer to support XCHG.BLK, DEL.BLK, and INS.PRE/POST/HEAD/TAIL forms.
- Updated diagnostics, docs, prompts, tests, and changelog to use XCHG/DEL/INS-based operators.
- Expanded session-stats parsing to normalize legacy op aliases to compact IDs.
2026-06-15 07:33:24 +02:00
can1357 6639d6e1f7 feat(coding-agent/modes): added conditional nerd-font tip for unicode welcome mode
- WelcomeComponent now lazily selected and cached a tip per instance, preserving it across re-renders.
- With the unicode preset, it showed a special nerdfont tip 10% of the time and otherwise used the regular tip rotation.
- Added tests that mocked theme preset and Math.random to verify standard and special tip selection behavior.
2026-06-15 06:10:52 +02:00
can1357 628809a09a fix(coding-agent): promote context before pre-prompt compaction and fall back from overflowing snapcompact
The pre-prompt context check ran compaction directly, so snapcompact (or
any strategy) fired before auto-promote ever got a chance — defeating
Auto-Promote Context. It now tries promotion to a larger-context model
first (mirroring the post-turn threshold path) and only compacts when no
target is available.

Auto and manual compaction now project a snapcompact result's
post-compaction size (kept history + frames at the image budget + summary
+ non-message overhead); when it still exceeds the model's usable window,
they downgrade to a context-full LLM summary instead of leaving the
session overflowing.
2026-06-15 05:45:42 +02:00
can1357 6c48b6224d chore: bump version to 15.13.1 2026-06-15 04:36:40 +02:00
can1357 35abd9ff71 chore: update changelogs 2026-06-15 04:35:55 +02:00
can1357 74d24e8917 Merge remote-tracking branch 'origin/farm/01e345d2/editor-windows-default-notepad' 2026-06-15 04:35:33 +02:00
roboomp fb75ba481d fix(editor): default to notepad on Windows when $VISUAL/$EDITOR are unset
The external editor flow (Ctrl+G, plan editor, /todo edit) warned 'No
editor configured' on Windows because getEditorCommand() returned
undefined whenever neither $VISUAL nor $EDITOR was set — the default
state for most Windows shells.

Fall back to 'notepad' on win32 after consulting $VISUAL/$EDITOR
(always present in %SystemRoot%\\System32) and trim env values so
accidentally padded strings still resolve. POSIX still returns
undefined so the warning continues to nudge users to configure an
editor.

Fixes #2604
2026-06-15 02:34:06 +00:00
can1357 a655953e7a fix(hashline): hardened hashline editing with seen-line and block-anchor validation
- Tracked seen-line provenance in snapshots and propagated it from read/search/ast-grep rows.
- Rejected hashline edits on unseen lines before patching, throwing unseen-line errors.
- Rejected single-line block anchors in strict mode and dropped them in unresolved lenient mode.
- Trimmed one-sided keeper-echo duplicates during multi-line replacements with warning output.
2026-06-15 04:25:33 +02:00
can1357 9cfefdedd4 fix(coding-agent/modes): allowed /tan dispatch to queue during streaming turns
- Removed the streaming guard that previously rejected /tan while the parent response was still generating.
- Passed "deliverAs: \"nextTurn\"" when sending the background dispatch breadcrumb and kept "triggerTurn: false" so an in-flight turn is not steered.
- Skipped rebuilding chat messages during streaming sessions and updated tests to cover the non-blocking dispatch path.
2026-06-15 04:21:11 +02:00
can1357 ca28fab3aa test(coding-agent): hardened retry fallback test assertion checks
- The AgentSession retry fallback test now validates the assistant message before reading it.
- It now verifies the first content block is text before checking the recovered message text.
2026-06-15 03:49:54 +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
can1357 3f82589ec1 fix: fixed OAuth and profile-boundary regressions across CLI and env handling
- Fixed OAuth credentials to keep unknown fields in schema while preserving existing shape checks.
- Fixed MCP OAuth IDs to be profile-scoped and avoid deleting credentials from non-active profiles.
- Fixed string-flag parsing so PROFILE_BOOTSTRAP_BOUNDARY tokens are not consumed as values.
- Fixed active-profile directory resolution to refresh after env updates so profile .env overrides apply.
2026-06-15 03:20:45 +02:00
can1357 6b26276505 Merge remote-tracking branch 'origin/farm/78f04ffd/fix-ctrl-c-extension-shutdown-timeout' 2026-06-15 03:17:00 +02:00
roboomp b0d0bd5bcb fix(coding-agent): cap session_shutdown extension handler at 2s
ExtensionRunner.emit shared the generic 30s EXTENSION_HANDLER_TIMEOUT_MS budget with every event, including the fire-and-forget session_shutdown teardown event extensions cannot observe. A hung third-party handler — observed on Windows with omp-discord-presence 0.1.2 waiting on a stuck Discord IPC pipe — held AgentSession.dispose() for the full window, making Ctrl+C look ignored for 30s.

session_shutdown now uses a dedicated 2s SESSION_SHUTDOWN_HANDLER_TIMEOUT_MS cap routed through a per-event handlerTimeoutForEvent() lookup so generic and shutdown budgets are independently configurable. The interactive-mode Ctrl+C path adds a defence-in-depth hard-exit: when isShuttingDown is true a fresh Ctrl+C exits with code 130 (the session JSONL has already been sync-flushed by the first press) instead of stacking another no-op shutdown() call.

Fixes #2600
2026-06-15 01:08:26 +00:00
can1357 7b319f0f02 fix(coding-agent/eval): routed process stdio writes to active runtime text sink
- Added runtime hook resolvers so each `JsRuntime` instance can expose hooks for its active run.
- Patched `process.stdout` and `process.stderr` writes once per stream to route output chunks through active run text hooks and preserve existing worker logging when no run is active.
- Added chunk-to-string conversion for write payloads and encoding-aware forwarding while keeping callback semantics intact.
2026-06-15 03:04:10 +02:00
can1357 05fd499551 Merge PR #1435: feat: added isolated profiles with --profile and --alias
Closes #1435

# Conflicts:
#	.github/actions/bun-install/action.yml
2026-06-15 02:47:12 +02:00
can1357 ab00631591 Merge PR #2594: fix(coding-agent): stopped todo reminders self-escalating without user input
Closes #2594
2026-06-15 02:39:47 +02:00
can1357 9741b91631 Merge PR #2587: fix(goals): retry turns failing with Gemini MALFORMED_FUNCTION_CALL
Closes #2587
2026-06-15 02:39:43 +02:00
can1357 1591179cbd Merge PR #2586: fix(goals): avoid deactivating goal mode on wall-clock-only updates
Closes #2586
2026-06-15 02:39:39 +02:00
can1357 05439419a8 Merge PR #2595: fix(coding-agent): render absolute mtimes in system-prompt workspace tree (prompt-cache stability)
Closes #2595
2026-06-15 02:39:34 +02:00
Ogrodev 932ebe9a48 Merge remote-tracking branch 'upstream/main' into feat/profiles-and-alias
# Conflicts:
#	.github/actions/build-native/action.yml
#	.github/workflows/ci.yml
2026-06-14 21:26:03 -03:00
Ogrodev bf562af9f9 test(coding-agent): relax browser stealth timing bound 2026-06-14 21:04:17 -03:00