Commit Graph

1260 Commits

Author SHA1 Message Date
Peter Steinberger
67b9b0ef1f fix: honor tools.exec ask/security in approvals 2026-01-24 04:53:44 +00:00
Peter Steinberger
e74768b428 feat: add node browser proxy routing 2026-01-24 04:21:47 +00:00
Peter Steinberger
857ae47203 fix: align service path tests with platform delimiters 2026-01-24 02:34:54 +00:00
Peter Steinberger
9f4c893785 fix: add readability fallback extraction 2026-01-24 02:15:13 +00:00
Peter Steinberger
76313f7e5e fix: stabilize embedded runner queueing 2026-01-24 02:05:41 +00:00
Peter Steinberger
b9cbce9f4b fix: publish llm-task docs and harden tool 2026-01-24 01:44:51 +00:00
Peter Steinberger
2cecf28971 fix: honor wildcard tool allowlists 2026-01-24 01:30:44 +00:00
Peter Steinberger
77bb342301 fix: refine bedrock discovery defaults (#1543) (thanks @fal3) 2026-01-24 01:18:33 +00:00
Alex Fallah
212b602921 feat: add dynamic Bedrock model discovery
Add automatic discovery of AWS Bedrock models using ListFoundationModels API.
When AWS credentials are detected, models that support streaming and text output
are automatically discovered and made available.

- Add @aws-sdk/client-bedrock dependency
- Add discoverBedrockModels() with caching (default 1 hour)
- Add resolveImplicitBedrockProvider() for auto-registration
- Add BedrockDiscoveryConfig for optional filtering by provider/region
- Filter to active, streaming, text-output models only
- Update docs/bedrock.md with auto-discovery documentation
2026-01-24 01:15:06 +00:00
google-labs-jules[bot]
ec23a856fe chore(tests): remove reproduction test
Removed the test file `src/agents/sandbox/docker.test.ts` as requested in code review.
2026-01-24 00:30:24 +00:00
google-labs-jules[bot]
ff233678a6 fix(sandbox): simplify docker image check
Simplify the stderr check in `dockerImageExists` to only look for "No such image", as requested in code review.
2026-01-24 00:30:24 +00:00
google-labs-jules[bot]
8d797d4a2b fix(sandbox): improve docker image existence check error handling
Previously, `dockerImageExists` assumed any error from `docker image inspect` meant the image did not exist. This masked other errors like socket permission issues.

This change:
- Modifies `dockerImageExists` to inspect stderr when the exit code is non-zero.
- Returns `false` only if the error explicitly indicates "No such image" or "No such object".
- Throws an error with the stderr content for all other failures.
- Adds a reproduction test in `src/agents/sandbox/docker.test.ts`.
2026-01-24 00:30:24 +00:00
Peter Steinberger
c60cedaafc fix: stabilize tests and sync protocol models 2026-01-24 00:25:58 +00:00
Peter Steinberger
f3029e1e3a fix: silence probe timeouts 2026-01-24 00:11:04 +00:00
Peter Steinberger
11469046f1 fix: align compaction summary message types 2026-01-23 23:03:04 +00:00
Peter Steinberger
333df812a3 test(compaction): cover staged pruning 2026-01-23 22:25:07 +00:00
Peter Steinberger
ee341fa491 feat(compaction): apply staged pruning 2026-01-23 22:23:23 +00:00
Peter Steinberger
56c0dc21ab feat(compaction): add staged helpers 2026-01-23 22:23:23 +00:00
Peter Steinberger
a530eebe29 fix: quiet auth probe diagnostics 2026-01-23 19:53:01 +00:00
Peter Steinberger
885b9f4fbc test: stub heavy tools in agent tests 2026-01-23 18:34:33 +00:00
Peter Steinberger
1c51871903 fix: normalize session lock path 2026-01-23 18:34:33 +00:00
Peter Steinberger
a42f924a14 chore: speed up tests and update opencode models 2026-01-23 11:36:32 +00:00
Peter Steinberger
d5a382a8d9 fix: stabilize ci tests 2026-01-23 09:52:22 +00:00
Peter Steinberger
d6d36df9a0 Merge origin/main into fix-discord-accountId 2026-01-23 09:15:44 +00:00
Sergii Kozak
82baf58263 Discord Actions: Update tests for optional config parameter 2026-01-23 01:11:54 -08:00
Peter Steinberger
62a3e08012 test: fix discord action mocks 2026-01-23 09:06:04 +00:00
Peter Steinberger
1118b98947 fix: honor accountId in message actions 2026-01-23 09:06:04 +00:00
Peter Steinberger
be3cb5776c fix: keep core tools when allowlist is plugin-only 2026-01-23 09:02:17 +00:00
Sergii Kozak
b629fe6ded Discord: honor accountId across channel actions (refs #1489) 2026-01-23 00:50:50 -08:00
Sergii Kozak
b683a3c933 Discord: preserve accountId in message actions (refs #1489) 2026-01-22 23:51:58 -08:00
Peter Steinberger
36d5748061 test: consolidate pi-tools shards 2026-01-23 07:34:57 +00:00
Peter Steinberger
bc34d22972 test: streamline slow suites 2026-01-23 07:26:19 +00:00
Peter Steinberger
de455683af Revert "fix: improve GitHub Copilot integration"
This reverts commit b69e70668d.
2026-01-23 07:14:00 +00:00
Peter Steinberger
fb4bbfe6ec Revert "fix: set Copilot user agent header"
This reverts commit 86c40e5dca.
2026-01-23 07:14:00 +00:00
Peter Steinberger
2473ea5e94 Revert "fix: treat copilot oauth tokens as non-expiring"
This reverts commit 486dd8e071.
2026-01-23 07:14:00 +00:00
Peter Steinberger
9c9bd7bfdc fix: sanitize assistant session text (#1456) (thanks @zerone0x) 2026-01-23 07:05:31 +00:00
zerone0x
668f8a1f29 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
0c045bf135 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
ea165b6fac fix: fall back to non-PTY exec 2026-01-23 06:27:26 +00:00
Peter Steinberger
35e20753e7 test(agents): merge sessions_spawn group announce coverage 2026-01-23 06:22:09 +00:00
Neo
e1f68407fb 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
b5bf4716c7 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
c23ecdc487 docs: add changelog entry for #1432 2026-01-23 03:31:42 +00:00
Peter Steinberger
7a745840e1 fix: honor user-pinned profiles and search ranking 2026-01-23 03:28:47 +00:00
Tobias Bischoff
e6f9333275 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
486dd8e071 fix: treat copilot oauth tokens as non-expiring 2026-01-23 02:51:33 +00:00
Peter Steinberger
86c40e5dca fix: set Copilot user agent header 2026-01-23 02:51:33 +00:00
Peter Steinberger
b69e70668d fix: improve GitHub Copilot integration 2026-01-23 02:51:33 +00:00
Peter Steinberger
8e702290f2 fix: honor send path/filePath inputs (#1444) (thanks @hopyky) 2026-01-23 02:27:47 +00:00
Peter Steinberger
04122e4440 test: speed up test suite 2026-01-23 02:22:02 +00:00