Commit graph

400 commits

Author SHA1 Message Date
stevef
ec63695956 feat(freeride): integrate freeride changes from upstream projects, excluding core config logic 2026-04-19 12:01:26 +02:00
stevef
399a3c8ef3 chore: formatting and minor fixes 2026-04-19 11:51:41 +02:00
stevef
b6d1ae637a feat(telegram): implement user-based isolation for persistent per-user memory across chats 2026-04-19 11:15:13 +02:00
stevef
31906c8f19 Revert "feat(agent): support global memory inheritance in isolated agents"
This reverts commit 8106d61011.
2026-04-19 11:02:51 +02:00
stevef
8106d61011 feat(agent): support global memory inheritance in isolated agents 2026-04-19 10:48:45 +02:00
stevef
94a2756b8e feat(agent): add FreeRide provenance marker 🦞 to responses 2026-04-19 10:19:42 +02:00
stevef
887f7d158c test: add FreeRideTool tests and fix NewAgentLoop calls 2026-04-19 08:39:44 +02:00
stevef
cd41d44085 feat: adapt FreeRide skill for PicoClaw 2026-04-19 08:37:27 +02:00
stevef
a8104eed05 closed gap in skills adding 2026-04-17 19:31:45 +02:00
stevef
9b9796e52f fix: enforce synchronous typing-stop signaling for Monitor UI stability 2026-04-13 21:52:26 +02:00
stevef
841bd0098a chore: address linter issues from PR review 2026-04-04 06:28:09 +02:00
stevef
f53e50c96a Final resolution of all merge conflicts and config cleanup 2026-04-03 22:49:25 +02:00
stevef
db2349cf4d feat(isolation): further hardening for agent loop and tools 2026-04-03 21:40:07 +02:00
stevef
afebbd3650 fixes 2026-04-03 21:40:07 +02:00
stevef
253412a526 fix(agent): inject media store in isolation and fix config unmarshal panic 2026-04-03 21:40:07 +02:00
stevef
3d621b6401 chore: minor configuration updates 2026-04-03 21:40:07 +02:00
stevef
5ca9b1c349 Remove deprecated /cgat and loop detection endpoints from server and docs 2026-04-03 21:35:55 +02:00
stevef
7dee43b0dc test: merge filesystem isolation validation into isolation_tools_test.go 2026-04-03 21:32:00 +02:00
stevef
5913149664 fix(agent): ensure isolated agents inherit manually registered tools to prevent test hangs 2026-04-03 21:32:00 +02:00
stevef
1bb3ca49ab made paths relative to workspace for sub-agents 2026-04-03 21:32:00 +02:00
stevef
3c6639517d azure skills whitelisting: fix skills loader, security config, and tests 2026-04-03 21:32:00 +02:00
stevef
8d95449084 added two new providers: NVIDIA and Azure plus Security enhancments to lock down skills if desired and added a configurable chat API 2026-04-03 21:32:00 +02:00
stevef
d8f440b7c5 Stabilize PicoClaw Security Integration and Agent Shield Features
Resolved rebase conflicts, fixed build errors across pkg/tools and pkg/providers, and fully integrated the Agent Shield security suite (Canary, PII, IPIA, Policy, Behavior).

Key stabilization:
- Fixed filesystem tool constructor signatures and tests.
- Re-implemented timing-safe authentication in health/server.go.
- Synchronized gateway and channel manager initialization.
- Cleaned up architecture leakage and deprecated endpoints (/cgat).
- Removed local/sensitive paths from logs and .dockerignore.
2026-04-03 21:23:57 +02:00
stevef
066a6bc727 chore: stabilize build pipeline, fix lints and test panics 2026-04-03 20:55:13 +02:00
Mauro
d8c5183d9a
feat(mcp): store oversized text results as artifacts (#2308)
* feat(mcp): store oversized text results as artifacts

* feat(mcp): fix doc

* fix(mcp): preserve raw MCP payload in text artifacts

* fix(mcp): avoid leaking large text when artifact persistence fails

* chore(mcp): clarify inline text limit and cover artifact edge cases
2026-04-04 01:30:36 +08:00
stevef
6c0f36a44d fix(test): update NewContextBuilder call to match new signature 2026-04-03 15:14:13 +02:00
stevef
6c277610df feat(isolation): further hardening for agent loop and tools 2026-04-03 15:01:12 +02:00
stevef
f2ffc6cc31 fixes 2026-04-03 15:01:12 +02:00
stevef
8dc92fdedc fix(agent): inject media store in isolation and fix config unmarshal panic 2026-04-03 15:01:12 +02:00
stevef
570be19935 chore: minor configuration updates 2026-04-03 15:01:12 +02:00
stevef
9479c65ebb test: merge filesystem isolation validation into isolation_tools_test.go 2026-04-03 15:01:12 +02:00
stevef
386a93a13c fix(agent): ensure isolated agents inherit manually registered tools to prevent test hangs 2026-04-03 15:01:12 +02:00
stevef
eaf61a1e8a made paths relative to workspace for sub-agents 2026-04-03 15:01:12 +02:00
stevef
c72f9fe47e azure skills whitelisting: fix skills loader, security config, and tests 2026-04-03 15:01:12 +02:00
stevef
d3c64bcc1e added two new providers: NVIDIA and Azure plus Security enhancments to lock down skills if desired and added a configurable chat API 2026-04-03 15:01:12 +02:00
wenjie
f2a19ab947
feat(web): support image messages in pico chat (#2299) 2026-04-03 14:15:20 +08:00
Mauro
b114dcaeb1
feat(model): llm rate limiting (#2198)
* feat(model): rate limiting

* fix(agent): preserve per-model identity in rate limiting and fallback

* fix test
2026-04-02 19:26:26 +08:00
Mauro
bae4342af1
Feat/tool read_file by lines (#1981)
* feat(tool): read_file tool by lines

* fix test

* restore old bytes read_file tool

* unified read_file tool

* revert

* fix doc

* fix test

* fix doc

* fix offset

* fix default start_line

* fix line format

* fix bug

* removed legacy test

* enhanced infos

* improvements

* feat(tool): read_file tool by lines
2026-04-02 18:49:08 +08:00
Liu Yuan
7eba27c3c4
feat: add ContextManager abstraction for pluggable context management (#2203)
- Define ContextManager interface with Assemble/Compact/Ingest methods
- Implement legacyContextManager wrapping existing summarization logic
- Wire Assemble (before BuildMessages), Compact (post-turn + overflow),
  and Ingest (after message persistence) into agent loop
- Add ContextManager config field and factory registry with config passthrough
- Remove old maybeSummarize/summarizeSession/summarizeBatch/etc from loop.go
- All existing tests pass with default (legacy) config

Co-authored-by: Liu Yuan <namei.unix@gmail.com>
2026-04-02 00:08:15 +08:00
Cytown
9ac21c5908
add missing recover panic in subturn.go (#2253) 2026-04-01 23:44:41 +08:00
Cytown
e2a9bb97c7
unify all panic event to panic log file (#2250) 2026-04-01 23:26:49 +08:00
reusu
31afad6e87
feat: add load_image tool for local file vision (#2116)
* feat: add load_image tool for local file vision

* fix: address load_image PR review feedback

- Exclude load_image from sub-agent tools via Unregister after Clone,
  since RunToolLoop does not call resolveMediaRefs
- Add ToolRegistry.Unregister() method
- Fix scope collision: use channel:chatID instead of filename
- Add channel/chatID context resolution matching send_file pattern
- Add comment explaining iteration > 1 guard on resolveMediaRefs
- Remove emoji from ForUser for consistency with send_file
- Add load_image_test.go

* feat: enable load_image for subagents via MediaResolver in RunToolLoop

Instead of removing load_image from sub-agent tools (28f69e71), inject a
MediaResolver into the legacy RunToolLoop fallback path so media:// refs
are resolved to base64 before each LLM call — matching the main agent
loop behavior.

- Add MediaResolver field to ToolLoopConfig and call it on iteration > 1
- Add SubagentManager.SetMediaResolver() and wire it through runTask
- Remove ToolRegistry.Unregister() (no longer needed)
- Restore load_image in sub-agent tool set (revert Clone+Unregister)
- Add TestSubagentManager_SetMediaResolver_StoresResolver

* refactor(load_image): remove prompt parameter from tool schema

* test(tools): add success-path test for LoadImageTool

Add TestLoadImage_SuccessPath that creates a real PNG file with valid
magic bytes, calls Execute with WithToolContext, and verifies:
- result.IsError == false
- ToolResult.Media contains a media:// ref
- ToolResult.ForLLM contains the [image: marker
- media ref is resolvable in the store

Add explanatory comment in loop.go for why Media and ArtifactTags
coexist on non-ResponseHandled tool results (e.g. load_image).

* fix: preallocate slice in tests and add ResponseHandled guard in toolloop

Fix prealloc linter failure in load_image_test.go.

Prevent double-resolving media by checking ResponseHandled in toolloop.go.

* Register TTS tool if provider is available

---------

Co-authored-by: Reusu <admin@yumao.name>
Co-authored-by: 美電球 <hoshina@evaz.org>
2026-04-01 21:32:10 +08:00
Hua Audio
0f395ce110
Refactor/asr tts (#1939)
* refactor: update ASR and TTS implementations

* fix lint

* Integrating asr/tts models w/ new security config

* update documents

* add arbitrary whisper transcriptor support

* update documents

* fix lint

* add mimo tts
2026-04-01 12:21:21 +08:00
Badgerbees
1a44752dc5 fix(agent): prevent double-counting system message tokens in estimator
Treat SystemParts as an alternative representation of message Content
rather than an additive one. This prevents systematic overestimation
of system message tokens which could trigger premature context
pruning or summarization.
- Picks the maximum of Content vs. SystemParts to stay conservative.
- Adds a per-part overhead (20 chars) to account for JSON metadata.
- Streamlines the ReasoningContent counting logic.
Fixes a deficiency where structured blocks for cache-aware adapters
caused overestimated budgets or hidden overflows.
2026-03-31 17:09:01 +07:00
stevef
fc2943cb1a fix: gracefully handle LLM content safety filter refusals to prevent 500 errors 2026-03-31 11:55:56 +02:00
Badgerbees
93f391a6bf fix(agent): include SystemParts in token estimation and add reasoning guards 2026-03-31 16:33:24 +07:00
stevef
dc52457826 feat: security hardening for pii redaction and isolation tests 2026-03-31 08:50:37 +02:00
DimonB
6c0798ca3f
feat(channels): make Channel.Send return delivered message IDs (#2190)
* feat(channels): Channel.Send and MediaSender.SendMedia return delivered message IDs

Change Channel.Send signature from (ctx, msg) error to (ctx, msg) ([]string, error)
and MediaSender.SendMedia similarly, so callers can capture platform message IDs
for threading, reactions, and history annotation.

Adapters that return real IDs: Telegram (per-chunk MessageID), Discord (Message.ID),
Slack Send (ts), QQ (sentMsg.ID), Matrix (EventID). Slack SendMedia returns nil
because UploadFileV2 does not expose the posted message timestamp in its response.
All other adapters return nil IDs.

preSend and sendWithRetry in manager.go updated to propagate ([]string, bool).
README examples updated for both English and Chinese docs.

* style: apply golangci-lint fixes (golines)

* docs: fix Send migration guide — restore old error-only signature in before/after example
2026-03-31 11:07:32 +08:00
stevef
bf6a2c3b4d fix: final test updates for inline guardrails 2026-03-30 17:18:21 +02:00
stevef
91e533fe60 fix: update hook tests for inline guardrails 2026-03-30 16:35:31 +02:00