Commit Graph

1227 Commits (bc75d58e9eb4e9d5d6d94eb62c7c1a2b6c094125)

Author SHA1 Message Date
Peter Steinberger bc75d58e9e Revert "fix: set Copilot user agent header"
This reverts commit cfcc4548bb.
2026-01-23 07:14:00 +00:00
Peter Steinberger 2efd265697 Revert "fix: treat copilot oauth tokens as non-expiring"
This reverts commit 35228ecae9.
2026-01-23 07:14:00 +00:00
Peter Steinberger 551685351f fix: sanitize assistant session text (#1456) (thanks @zerone0x) 2026-01-23 07:05:31 +00:00
zerone0x 03bec49299 fix: sanitize tool call text in sessions-helpers extractAssistantText
Adds sanitization to extractAssistantText in sessions-helpers.ts to
prevent tool call text from leaking to users. Previously, messages
retrieved from chat history via sessions-helpers.ts could expose:

- Minimax XML tool calls (<invoke>...</invoke>)
- Downgraded tool call markers ([Tool Call: name (ID: ...)])
- Thinking tags (<think>...</think>)

This fix:
- Exports the stripping functions from pi-embedded-utils.ts
- Adds a new sanitizeTextContent helper in sessions-helpers.ts
- Updates extractAssistantText to sanitize before returning
- Updates extractMessageText in commands-subagents.ts to sanitize

Fixes #1269

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-23 07:03:26 +00:00
Dave Lauer d03c404cb4
feat(compaction): add adaptive chunk sizing, progressive fallback, and UI indicator (#1466)
* fix(ui): allow relative URLs in avatar validation

The isAvatarUrl check only accepted http://, https://, or data: URLs,
but the /avatar/{agentId} endpoint returns relative paths like /avatar/main.
This caused local file avatars to display as text instead of images.

Fixes avatar display for locally configured avatar files.

* fix(gateway): resolve local avatars to URL in HTML injection and RPC

The frontend fix alone wasn't enough because:
1. serveIndexHtml() was injecting the raw avatar filename into HTML
2. agent.identity.get RPC was returning raw filename, overwriting the
   HTML-injected value

Now both paths resolve local file avatars (*.png, *.jpg, etc.) to the
/avatar/{agentId} endpoint URL.

* feat(compaction): add adaptive chunk sizing and progressive fallback

- Add computeAdaptiveChunkRatio() to reduce chunk size for large messages
- Add isOversizedForSummary() to detect messages too large to summarize
- Add summarizeWithFallback() with progressive fallback:
  - Tries full summarization first
  - Falls back to partial summarization excluding oversized messages
  - Notes oversized messages in the summary output
- Add SAFETY_MARGIN (1.2x) buffer for token estimation inaccuracy
- Reduce MIN_CHUNK_RATIO to 0.15 for very large messages

This prevents compaction failures when conversations contain
unusually large tool outputs or responses that exceed the
summarization model's context window.

* feat(ui): add compaction indicator and improve event error handling

Compaction indicator:
- Add CompactionStatus type and handleCompactionEvent() in app-tool-stream.ts
- Show '🧹 Compacting context...' toast while active (with pulse animation)
- Show '🧹 Context compacted' briefly after completion
- Auto-clear toast after 5 seconds
- Add CSS styles for .callout.info, .callout.success, .compaction-indicator

Error handling improvements:
- Wrap onEvent callback in try/catch in gateway.ts to prevent errors
  from breaking the WebSocket message handler
- Wrap handleGatewayEvent in try/catch with console.error logging
  to isolate errors and make them visible in devtools

These changes address UI freezes during heavy agent activity by:
1. Showing users when compaction is happening
2. Preventing uncaught errors from silently breaking the event loop

* fix(control-ui): add agentId to DEFAULT_ASSISTANT_IDENTITY

TypeScript inferred the union type without agentId when falling back to
DEFAULT_ASSISTANT_IDENTITY, causing build errors at control-ui.ts:222-223.
2026-01-23 06:32:30 +00:00
Peter Steinberger 4912e85ac8 fix: fall back to non-PTY exec 2026-01-23 06:27:26 +00:00
Peter Steinberger d4db45e8a9 test(agents): merge sessions_spawn group announce coverage 2026-01-23 06:22:09 +00:00
Neo 2accb47e4d
fix: follow soul.md more closely (#1434)
* Agents: honor SOUL.md persona guidance

* fix: harden SOUL.md detection (#1434) (thanks @neooriginal)

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-01-23 05:00:13 +00:00
Rodrigo Uroz dd2400fb2a
fix: read Slack thread replies for message reads (#1450) (#1450)
Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: Rodrigo Uroz <rodrigouroz@users.noreply.github.com>
2026-01-23 04:17:45 +00:00
Peter Steinberger 1e9ae7649d docs: add changelog entry for #1432 2026-01-23 03:31:42 +00:00
Peter Steinberger 5cb9026541 fix: honor user-pinned profiles and search ranking 2026-01-23 03:28:47 +00:00
Tobias Bischoff 565944ec71 fix(auth): skip auth profiles in cooldown during selection and rotation
Auth profiles in cooldown (due to rate limiting) were being attempted,
causing unnecessary retries and delays. This fix ensures:

1. Initial profile selection skips profiles in cooldown
2. Profile rotation (after failures) skips cooldown profiles
3. Clear error message when all profiles are unavailable

Tests added:
- Skips profiles in cooldown during initial selection
- Skips profiles in cooldown when rotating after failure

Fixes #1316
2026-01-23 03:28:18 +00:00
Peter Steinberger 35228ecae9 fix: treat copilot oauth tokens as non-expiring 2026-01-23 02:51:33 +00:00
Peter Steinberger cfcc4548bb fix: set Copilot user agent header 2026-01-23 02:51:33 +00:00
Peter Steinberger 21a9b3b66f fix: improve GitHub Copilot integration 2026-01-23 02:51:33 +00:00
Peter Steinberger 837749dced fix: honor send path/filePath inputs (#1444) (thanks @hopyky) 2026-01-23 02:27:47 +00:00
Peter Steinberger 59a8eecd7e test: speed up test suite 2026-01-23 02:22:02 +00:00
Peter Steinberger 542cf011a0
Merge pull request #1444 from hopyky/fix-message-path-parameter
Fix: Support path and filePath parameters in message send action
2026-01-23 02:10:54 +00:00
Peter Steinberger 0396b678fa docs: note transcript hygiene sync 2026-01-23 01:38:05 +00:00
Peter Steinberger 5689d7fb98 refactor: remove transcript sanitize extension 2026-01-23 01:34:33 +00:00
Peter Steinberger 2424404fb4 docs: add transcript hygiene reference 2026-01-23 01:34:21 +00:00
Peter Steinberger 52b6bf04af fix: improve tool summaries 2026-01-23 01:00:24 +00:00
Peter Steinberger 51a9053387 feat: add OpenProse plugin skills 2026-01-23 00:49:40 +00:00
Peter Steinberger db0235a26a fix: gate transcript sanitization by provider 2026-01-23 00:42:45 +00:00
Peter Steinberger e872f5335b fix: allow chained exec allowlists
Co-authored-by: Lucas Czekaj <1464539+czekaj@users.noreply.github.com>
2026-01-23 00:11:58 +00:00
Peter Steinberger a23e272877
Merge pull request #1440 from robbyczgw-cla/fix/token-count-after-compaction
fix: update token count display after compaction
2026-01-23 00:10:46 +00:00
Peter Steinberger 870bfa94ed fix: skip tool id sanitization for openai responses 2026-01-22 23:51:59 +00:00
Peter Steinberger c0c8ee217f fix: clarify session_status model-use guidance 2026-01-22 22:42:37 +00:00
Peter Steinberger 411ce7e231 fix: surface concrete ai error details 2026-01-22 22:24:25 +00:00
Matt mini 57e81d3c24 Fix: Support path and filePath parameters in message send action
The message tool accepts path and filePath parameters in its schema,
but these were never converted to mediaUrl, causing local files to
be ignored when sending messages.

Changes:
- src/agents/tools/message-tool.ts: Convert path/filePath to media with file:// URL
- src/infra/outbound/message-action-runner.ts: Allow hydrateSendAttachmentParams for "send" action

Fixes issue where local audio files (and other media) couldn't be sent
via the message tool with the path parameter.

Users can now use:
  message({ path: "/tmp/file.ogg" })
  message({ filePath: "/tmp/file.ogg" })
2026-01-22 13:15:48 +01:00
Robby 0873351401 fix: update token count display after compaction (#1299) 2026-01-22 09:58:07 +00:00
Peter Steinberger 7a283f86a8 fix: omit skills section in minimal prompt 2026-01-22 09:32:49 +00:00
Peter Steinberger 646ea6ef0b test: use absolute exec path for allowlist 2026-01-22 09:20:38 +00:00
Peter Steinberger 4c8806ad38
Merge pull request #1431 from robbyczgw-cla/fix/subagent-skills-inheritance
fix: include skills in minimal prompt mode for subagents
2026-01-22 09:02:28 +00:00
Peter Steinberger 0824bc0236 test: isolate exec allowlist env 2026-01-22 08:58:55 +00:00
Peter Steinberger e344b7df9c fix: preserve antigravity thinking block types 2026-01-22 08:31:07 +00:00
Robby 256fdcb3cf fix: include skills in minimal prompt mode for subagents 2026-01-22 08:28:55 +00:00
Peter Steinberger acdfbee4f9 fix: detect antigravity claude by provider 2026-01-22 08:26:08 +00:00
Peter Steinberger ff69a9bd9c fix: sanitize antigravity thinking signatures 2026-01-22 08:17:49 +00:00
Peter Steinberger 1a8b106f34 style: format agent workspace and prompts 2026-01-22 08:05:55 +00:00
Peter Steinberger 388d302472 fix: carry reply tags across streamed chunks 2026-01-22 08:01:34 +00:00
Peter Steinberger bc8e5ad6b3 fix: stabilize avatar tests on Windows 2026-01-22 07:24:12 +00:00
Lucas Czekaj 4b3e9c0f33 fix(exec): align node exec approvals (#1425)
Thanks @czekaj.

Co-authored-by: Lucas Czekaj <lukasz@czekaj.us>
2026-01-22 07:22:43 +00:00
Peter Steinberger 8544df36b8 feat: extend Control UI assistant identity 2026-01-22 07:08:13 +00:00
AJ 862f34ade7 fix: read account_id from Codex CLI auth for workspace billing 2026-01-22 07:01:10 +00:00
Peter Steinberger 319b4d02a0 fix: load workspace templates from docs 2026-01-22 06:39:28 +00:00
Peter Steinberger b63175d822 Merge remote-tracking branch 'origin/main' into feature/agent-avatar-support 2026-01-22 06:27:45 +00:00
Peter Steinberger 6539c09a93 Merge remote-tracking branch 'origin/main' into feature/agent-avatar-support 2026-01-22 06:03:56 +00:00
Peter Steinberger 23ea4a21e0 fix: skip elevated defaults when not allowed 2026-01-22 06:03:23 +00:00
Peter Steinberger a2981c5a2c feat: add elevated ask/full modes 2026-01-22 05:41:11 +00:00