Commit graph

1181 commits

Author SHA1 Message Date
stevef
f7c4820a84 feat(k3s): support env:// credentials and improve stale config cleanup on security_shield_v2 2026-04-13 19:55:58 +02:00
stevef
6b040ef853 fix(agent): defer InvokeTypingStop until runTurn completion 2026-04-13 08:26:45 +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
d37d6e6871 chore: fixes for userAgent support and host detection after rebase stabilization 2026-04-03 21:40:07 +02:00
stevef
42dfb5bdae chore: final stabilization fixes for security_shield after rebase 2026-04-03 21:40:07 +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
2a153bff02 Synchronize hardening: added onboard purge, non-interactive mode, and diagnostic startup logs 2026-04-03 21:32:00 +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
d4e329f703 made /chat asynchronous 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
47cfd059ca chore: fixes for userAgent support and host detection after rebase stabilization 2026-04-03 15:01:12 +02:00
stevef
7347a27754 chore: final stabilization fixes for security_shield after rebase 2026-04-03 15:01:12 +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
cb717011ba Synchronize hardening: added onboard purge, non-interactive mode, and diagnostic startup logs 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
54fc66fa27 made /chat asynchronous 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
linhaolin1
b5ce6209fd
feat: add VK channel support (#2276)
* feat: add VK channel support

- Add VK channel implementation using vksdk
- Support text messages and media attachments
- Implement Long Poll API for real-time messaging
- Add group chat support with trigger prefixes
- Add user whitelist (allow_from) configuration
- Add VK channel documentation

Files:
- pkg/channels/vk/: VK channel implementation
- pkg/config/config.go: Add VKConfig structure
- pkg/channels/manager.go: Register VK channel
- pkg/gateway/gateway.go: Import VK channel package
- docs/channels/vk/: Usage documentation

* test: add unit tests for VK channel

- Test channel initialization with various configurations
- Test allow_from whitelist functionality
- Test group trigger configuration
- Test max message length (4000 chars)
- Test message splitting logic
- Test attachment processing

All tests passing ✓

* fix: resolve linting issues in VK channel

- Format VKConfig struct tags to comply with golines
- Remove unused mu sync.Mutex field
- Remove unused stripPrefix method

All tests passing ✓

* style: format VKConfig with golines

- Align struct tags to match project style
- Match formatting with other channel configs (Telegram, etc.)
- Fix golines linting error

* style: fix struct tag formatting in config.go

* docs: update VK channel docs to use secure token storage

* feat(vk): add voice capabilities support

- Implement VoiceCapabilities() method for VK channel
- Add audio_message attachment handling in processAttachments
- Add comprehensive tests for voice capabilities
- Support both ASR (speech-to-text) and TTS (text-to-speech)

* docs: add VK channel to documentation and update voice support

- Add VK channel to README.md and README.zh.md channel lists
- Update VK channel documentation with voice message support
- Document ASR and TTS capabilities for VK channel
- Add voice transcription configuration reference
2026-04-03 10:56:26 +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
wenjie
dad5dcc30f
refactor(web): load channel configs without exposing secret values (#2277)
* refactor(web): load channel configs without exposing secret values

- add a dedicated channel config API that returns sanitized config plus
  configured secret metadata
- update channel config pages and forms to use secret presence for
  placeholders, validation, reset, and save behavior
- refresh the channel settings layout and clean up related i18n copy
- add backend tests for the new channel config endpoint

* fix(config): restore missing strings import
2026-04-02 19:09:33 +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
SakoroYou
257aa0ff57
fix(channels): fail fast when all channel startups fail (#2262)
* fix(channels): fail fast when all channel startups fail

* fix(channels): preserve startup errors and cover fail-fast semantics
2026-04-02 14:14:47 +08:00
Cytown
2c446e1e07
feat: add userAgent config for ModelConfig (#2242)
* feat: add userAgent config for ModelConfig

* update docs for ModelConfig.userAgent

* make defaut userAgent to PicoClaw and add test case
2026-04-02 11:44:13 +08:00
Badgerbees
33ce6ed482 resolve conflicts 2026-04-02 04:33:08 +07: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
LC
bbcfeaa361
feat(provider): add Venice AI support and update related documentation (#2238)
* feat(provider): add Venice AI support and update related documentation

* revert(asr): restore asr files to previous commit

* feat(config): add Venice API base URL and local LM Studio configuration

* fix(config): update Venice API base URL to correct endpoint
2026-04-01 23:50:29 +08:00
Cytown
9ac21c5908
add missing recover panic in subturn.go (#2253) 2026-04-01 23:44:41 +08:00
sky5454
49e61fa07f
feat(updater): robust self-update selection & extraction (nightly default) (#2201)
* feat(updater): add web self-update endpoint and updater package

* feat(selfupgrade): when url empty, using GetTestReleaseAPIURL for test .

* feat(selfupgrade):  only GetTestReleaseAPIURL  .

* feat(upgrade): cli  $0 update work well!

* fix(ci): fix ci err

* fix(test): fix ci test

* fix(ci): fix ci  lint fmt err

* test(updater): add test for updater

* fix(ci): fix ci  lint var copy err

* fix(ci): retry ci

* updater: require checksum verification, prefer API digest, verify SHA256, fix zip extraction, update tests

* fix(lint): lint fixed

* fix(lint): lint fixed2

* updater: stream download and verify sha256; add http client timeout and progress

Avoid double-download by streaming asset into temp file while computing SHA256 and verifying against checksum; replace http.Get with shared httpClient (2m timeout) to prevent hangs; add simple stderr progress display; remove unused helpers.
2026-04-01 23:41:32 +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
Cytown
a9c76eca21
bug: fix picoToken is empty when gateway started by launcher (#2241) 2026-04-01 14:59:18 +08:00