Commit Graph

260 Commits

Author SHA1 Message Date
yuchou87 24610693e4 chore(docker): add execute permission to test script
Make scripts/test-docker-mcp.sh executable
2026-02-16 16:40:35 +08:00
yuchou87 87e0336d62 chore(deps): format go.mod
Add blank line for better formatting consistency
2026-02-16 16:38:21 +08:00
yuchou87 acb974fcf1 Merge branch 'main' into mcp-tools-support 2026-02-16 16:37:24 +08:00
Tzufucius 8d757fbb6f Feat issue 183 (#189)
* feat: add slash command support (e.g., /show model, /help)

* style: fix code formatting

* feat: implement robust context compression and error recovery with user notifications
2026-02-16 16:30:54 +08:00
Goksu Ceylan e3f65fc3d6 fix(security): block critical symlink workspace escape (#188) 2026-02-16 16:20:35 +08:00
is-Xiaoen 5c321a90de fix: tighten file perms and enforce Slack ACL checks (#186)
- write config and cron store with 0600 instead of 0644
- check allow list in Slack slash commands and app mentions
- pass workspace restrict flag to cron exec tool

Closes #179
2026-02-16 16:06:39 +08:00
yuchou87 e91e716958 fix(docker): use service names instead of --profile flag for build
Replace --profile flags with explicit service names in build commands.
The 'docker compose build' command does not support --profile flag;
profiles are only used for runtime operations like 'up' and 'run'.

Changes:
- docker-build: specify picoclaw-agent picoclaw-gateway
- docker-build-full: specify picoclaw-agent picoclaw-gateway

Fixes: unknown flag: --profile error
2026-02-16 16:02:10 +08:00
yuchou87 fcedba1c9d fix(docker): add profiles to build commands
Add --profile gateway --profile agent flags to docker build commands
to ensure services are built even when using profiles in compose files.

Without profiles specified, docker compose build skips all services
that have a profile defined, resulting in 'No services to build' warning.

Changes:
- docker-build: add --profile flags
- docker-build-full: add --profile flags

Fixes: WARN[0000] No services to build
2026-02-16 15:59:34 +08:00
yuchou87 1764181e6f fix(docker): correct uv installation path
Fix uv symlink path from /root/.cargo/bin to /root/.local/bin.
The uv installer puts binaries in ~/.local/bin, not ~/.cargo/bin.

Changes:
- Update uv symlink source: /root/.local/bin/uv
- Add uvx symlink as well (installed alongside uv)

Fixes: /bin/sh: 1: uv: not found error during build
2026-02-16 15:57:30 +08:00
yuchou87 1c9c32022e fix(docker): ensure uv is accessible in system PATH
Symlink uv from /root/.cargo/bin to /usr/local/bin to make it
accessible without relying on ENV PATH setting. Add version check
to verify successful installation during build.

Changes:
- Symlink uv to /usr/local/bin/uv
- Add 'uv --version' validation step
- Remove ENV PATH setting (no longer needed)

Fixes: uv: not found error in test script
2026-02-16 15:52:59 +08:00
yuchou87 c05742330d refactor(docker): migrate to docker compose v2 syntax
Replace docker-compose (v1) with docker compose (v2) command syntax
across all files. Docker Compose v2 is now the default in modern
Docker installations and uses 'docker compose' instead of 'docker-compose'.

Changes:
- scripts/test-docker-mcp.sh: update all 8 docker-compose commands
- Makefile: update all 8 docker-compose commands in docker-* targets
- No changes to file names (docker-compose.full.yml remains as-is)

Compatibility: Requires Docker with Compose v2 plugin (Docker Desktop
or docker-compose-plugin package)
2026-02-16 15:50:46 +08:00
yuchou87 b9c2b3555a fix(docker): override entrypoint in test script to avoid interactive mode
Add --entrypoint sh flag to docker-compose run commands in test script
to bypass picoclaw agent's interactive mode. This allows direct command
execution for testing MCP tools.

Changes:
- Add --entrypoint sh to all docker-compose run commands
- Use SERVICE variable for better maintainability
- Simplify command syntax: sh -c 'cmd' → -c 'cmd'
2026-02-16 15:49:14 +08:00
lxowalle 17685da584 feat: update the make deps logic to prevent the project from frequently updating dependency package versions (#277) 2026-02-16 15:48:02 +08:00
yuchou87 51ed54a414 refactor(docker): switch to node:24-bookworm-slim base image
Replace debian:bookworm-slim with node:24-bookworm-slim to:
- Use latest Node.js 24 LTS and npm
- Fix npm version compatibility issues (npm@11 requires node >=20.17)
- Simplify Dockerfile by removing nodejs/npm installation
- Better optimization from official Node.js image

Changes:
- Dockerfile.full: use node:24-bookworm-slim base
- Remove nodejs, npm installation steps
- Remove npm upgrade step (included in base image)
- Update Makefile descriptions to reflect Node.js 24
2026-02-16 15:40:07 +08:00
WÁNG Xuěruì 159a954122 build: support building for linux/loong64 (#272)
This platform has a growing desktop and embedded user base, and is fully
supported by Go. The only necessary change is the mapping between
`uname -m` output and GOARCH.

Due to non-technical reasons [1], there is currently no Docker official
image that provides linux/loong64 support, so Docker-based builds are
not included in this commit for now.

[1]: https://github.com/docker-library/official-images/issues/16404
2026-02-16 15:08:27 +08:00
mattn a371d53438 Prevent panic on publish after MessageBus is closed (#223) 2026-02-16 15:04:25 +08:00
yuchou87 ce3fc4bc67 feat(docker): add full-featured Docker image with MCP tools support
Add Dockerfile.full with Debian-based runtime including git, nodejs, npm, python3, and uv for MCP servers. Add docker-compose.full.yml with npm cache optimization. Add Makefile targets for docker-build-full, docker-run-full, and docker-test. Add test script for MCP tools validation.
2026-02-16 14:48:40 +08:00
Avisek Ray 9d5728ec5b feat: implement structured Telegram command handling with a dedicated command service and telegohandler integration. (#164) 2026-02-16 14:20:16 +08:00
Huaaudio 32cb8fdc12 Feat: Discord message length check and auto split (#143)
* feat: discord message auto split

* make fmt

* chore: remove failing discord_test.go

---------

Co-authored-by: Hua <zhangmikoto@gmail.com>
2026-02-16 13:39:26 +08:00
fahadahmadansari111 341dbd3007 Add health check endpoints (/health and /ready) for container orchestration liveness and readiness probes. (#104)
* added health endpoint

* formatted files

---------

Co-authored-by: lxowalle <83055338+lxowalle@users.noreply.github.com>
2026-02-16 11:53:11 +08:00
Zenix 0cb9387cf8 fix: codex agent 400 error (#102) 2026-02-16 11:46:02 +08:00
Leandro Barbosa e77b0a6755 feat: add Codex CLI provider for subprocess integration (#80)
* feat: add Codex CLI provider for OpenAI subprocess integration

Add CodexCliProvider that wraps `codex exec --json` as a subprocess,
analogous to the existing ClaudeCliProvider pattern. This enables using
OpenAI's Codex CLI tool as a local LLM backend.

- CodexCliProvider: subprocess wrapper parsing JSONL event stream
- Credential reader for ~/.codex/auth.json with token expiry detection
- Factory integration: provider "codex-cli" and auth_method "codex-cli"
- Fix tilde expansion in workspace path for CLI providers
- 37 unit tests covering parsing, prompt building, credentials, and mocks

* fix: add tool call extraction to Codex CLI provider

- Extract shared tool call parsing into tool_call_extract.go
  (extractToolCallsFromText, stripToolCallsFromText, findMatchingBrace)
- Both ClaudeCliProvider and CodexCliProvider now share the same
  tool call extraction logic for PicoClaw-specific tools
- Fix cache token accounting: include cached_input_tokens in total
- Add 2 new tests for tool call extraction from JSONL events
- Update existing tests for corrected token calculations

* fix(docker): update Go version to match go.mod requirement

Dockerfile used golang:1.24-alpine but go.mod requires go >= 1.25.7.
This caused Docker builds to fail on all branches with:
  "go: go.mod requires go >= 1.25.7 (running go 1.24.13)"

Update to golang:1.25-alpine to match the project requirement.

* fix: handle codex CLI stderr noise without losing valid stdout

Codex writes diagnostic messages to stderr (e.g. rollout errors) which
cause non-zero exit codes even when valid JSONL output exists on stdout.
Parse stdout first before checking exit code to avoid false errors.

* style: fix gofmt formatting and update web search API in tests

- Remove trailing whitespace in web.go and base_test.go
- Update config_test.go and web_test.go for WebSearchToolOptions API
2026-02-16 11:40:17 +08:00
Guoguo a5503aea36 build: temporary disable UPX compression (#257)
Signed-off-by: Guoguo <i@qwq.trade>
2026-02-16 11:29:04 +08:00
trungtt6 cd638fff6c Add local AI ollama for security purpose (#226)
Co-authored-by: PhotoPortfolio Developer <developer@photportfolio.local>
2026-02-16 11:28:38 +08:00
Guoguo 0d18210803 ci: use goreleaser to release docker and binary (#180)
Signed-off-by: Guoguo <i@qwq.trade>
2026-02-16 10:35:31 +08:00
mattn 1d748fb742 Remove duplicate file extension in DownloadFile (#230) 2026-02-16 02:20:20 +08:00
ian c6c82b3c44 feat(skills): add validation for skill info and test cases (#231)
Add validation logic for SkillInfo to ensure name and description meet requirements
Include test cases covering various validation scenarios
Add testify dependency for testing assertions
2026-02-16 02:12:50 +08:00
Luke Milby 811e4f8728 add when picoclaw responsed to discord message will show its typing (#236) 2026-02-16 01:37:32 +08:00
zepan 214b201bfa update wechat group qrcode 2026-02-15 20:49:58 +08:00
yuchou87 91c168db20 feat(mcp): add Model Context Protocol integration
Implement comprehensive MCP support with stdio/HTTP/SSE transports, environment variable configuration (env and envFile), custom headers, tool registration, and automatic resource cleanup. Includes full test coverage and VSCode-compatible configuration.

- Added pkg/mcp/manager.go for server lifecycle management
- Added pkg/tools/mcp_tool.go for tool wrapping
- Integrated into agent loop with cleanup
- Support for envFile loading (.env format)
- Headers injection for HTTP/SSE authentication
- Example configs for filesystem, github, brave-search, postgres
2026-02-15 17:26:36 +08:00
Meng Zhuo 9a3f3611c3 ci: init goreleaser 2026-02-15 09:54:32 +08:00
Meng Zhuo 8eb9dcd99a Merge pull request #173 from is-Xiaoen/fix/code-review-bugs-116
fix: resolve multiple bugs from code review #116
2026-02-15 09:42:26 +08:00
xiaoen 0a88ff0817 fix: resolve multiple bugs from code review #116
Fixes four issues identified in the community code review:

- Session persistence broken on Windows: session keys like
  "telegram:123456" contain ':', which is illegal in Windows
  filenames. filepath.Base() strips drive-letter prefixes on Windows,
  causing Save() to silently fail. Added sanitizeFilename() to
  replace invalid chars in the filename while keeping the original
  key in the JSON payload.

- HTTP client with no timeout: HTTPProvider used Timeout: 0 (infinite
  wait), which can hang the entire agent if an API endpoint becomes
  unresponsive. Set a 120s safety timeout.

- Slack AllowFrom type mismatch: SlackConfig used plain []string
  while every other channel uses FlexibleStringSlice, so numeric
  user IDs in Slack config would fail to parse.

- Token estimation wrong for CJK: estimateTokens() divided byte
  length by 4, but CJK characters are 3 bytes each, causing ~3x
  overestimation and premature summarization. Switched to
  utf8.RuneCountInString() / 3 for better cross-language accuracy.

Also added unit tests for the session filename sanitization.

Ref #116
2026-02-15 09:36:59 +08:00
Meng Zhuo ddd73cad48 Merge pull request #151 from qiaoborui/codex/fix-openai-oauth-authorize-url
fix(auth): align OpenAI OAuth browser login URL
2026-02-15 09:27:19 +08:00
Meng Zhuo 3334595859 Merge pull request #134 from Sethispr/patch-1
chore: lint readme.md
2026-02-15 09:23:13 +08:00
seth 25a47b50ef Merge branch 'main' into patch-1 2026-02-14 17:21:18 -08:00
Meng Zhuo 0f506d4202 Merge pull request #165 from alexhoshina/feat/onebot
feat: add OneBot channel support
2026-02-15 09:12:00 +08:00
Meng Zhuo 6ce7659090 Merge pull request #172 from mymmrac/docker-curl
feat(docker): Added curl for Docker image
2026-02-15 09:08:27 +08:00
Meng Zhuo 6f2e730eba Merge pull request #178 from Lixeer/main
feat: Add `GitHub Copilot` provider support
2026-02-15 09:04:05 +08:00
Lixeer 16e5a02953 fix(http_provider): Remove extra parameter from CreateProvider function. 2026-02-15 08:06:29 +08:00
Lixeer 4b886b6573 fix: not used result 2026-02-15 08:02:23 +08:00
Lixeer 0a4bf32e81 try after workflow fix 2026-02-15 07:54:04 +08:00
lxowalle 9eb1a53fb8 fix: PR workflow execution failure 2026-02-15 07:43:46 +08:00
Lixeer 5a6ad37dab code fmt 2026-02-15 07:34:12 +08:00
Lixeer f6d6221c09 make fmt 2026-02-15 07:00:40 +08:00
Lixeer 7a9659971d make fmt 2026-02-15 06:55:20 +08:00
Lixeer ecbe31599e chore: remove redundant debug output 2026-02-15 06:30:31 +08:00
Lixeer 6c392c3387 fix: openclaw crash because of empty config 2026-02-15 06:11:07 +08:00
Lixeer 0aab8d8afc feat:add github_copilot to providers factory 2026-02-15 06:10:00 +08:00
Lixeer 5faa67b77d feat: add Github Copilot provider 2026-02-15 05:23:42 +08:00