Commit Graph

1607 Commits

Author SHA1 Message Date
Mauro 4d34824737 Merge pull request #2088 from badgerbees/fix/telegram-dm-policy-security
fix(channels): add security audit for open-by-default bots
2026-03-30 23:58:25 +02:00
Mauro a995a94990 Merge pull request #1826 from 3mp3ri0r/fix/container-run-app-stopped-on-sigint-sigterm
fix: container run but app stopped on SIGINT or SIGTERM
2026-03-30 23:47:05 +02:00
Mauro 4125f8ac14 Merge pull request #1849 from gaaralbakuu/main
Fix: Provider github copilot cannot create session
2026-03-30 23:37:26 +02:00
Mauro 7b3f47128f Merge pull request #2176 from Alix-007/fix/issue-2135-retry-after
fix(utils): honor Retry-After for 429 retries
2026-03-30 16:27:46 +02:00
Alix-007 711685192c utils: gofumpt http retry formatting 2026-03-30 22:08:21 +08:00
Alix-007 345d4fddc9 utils: make retry-after numeric clamp overflow-safe 2026-03-30 22:02:16 +08:00
Alix-007 9440bebca6 utils: anchor date retry-after to response date and cap delay 2026-03-30 21:58:12 +08:00
Mauro 187b2c2185 Merge pull request #2004 from Huangting-xy/docs-add-security-config-ref
docs(configuration): add security config reference at document start
2026-03-30 14:24:34 +02:00
Mauro ffa65b53ed Merge pull request #1982 from Kathent/fix-deny-pattern
fix: more accurate deny pattern for disk wiping
2026-03-30 14:24:17 +02:00
Mauro 34b4848214 Merge pull request #1838 from jonahzheng/patch-1
Update helpers.go
2026-03-30 14:23:38 +02:00
Mauro 174c4e5d3b Merge pull request #2000 from Alix-007/docs/issue-1868-cron-docs
docs: add cron job behavior guide
2026-03-30 14:18:43 +02:00
Mauro 0fb45505bf Merge pull request #1988 from loafoe/main
feat(bedrock): detect SSO token expiration and provide actionable error
2026-03-30 14:17:19 +02:00
Mauro 45582b0b52 Merge pull request #1510 from dim/matrix/improved-formatting
Improve white-space and general rendering of CommonMark in Matrix
2026-03-30 14:02:19 +02:00
daming大铭 a5f8b0f98d Merge pull request #2134 from cytown/t3
add pid file for gateway running and auth token for /reload and pico channel
2026-03-30 18:55:01 +08:00
Mauro 1154017563 Merge pull request #2129 from kunalk16/chore-azure-openai-responses-tests
chore(tests): update tests and error cases handling for azure openai provider
2026-03-30 12:29:41 +02:00
Cytown f9bfa6b9a8 Merge branch 'main' into t3 2026-03-30 18:07:20 +08:00
Cytown 50b8d9bf83 Merge branch 'main' into t3 2026-03-30 18:01:07 +08:00
Cytown 275c1012f1 make gateway reload use new loglevel (#2155) 2026-03-30 18:00:18 +08:00
Cytown 010d807e61 update docs according to newest config version 2 (#2186) 2026-03-30 17:59:56 +08:00
daming大铭 803b8bc02f Merge pull request #2131 from imalasong/pr/3
fix(feishu): skip empty random_reaction_emoji entries
2026-03-30 17:51:26 +08:00
Cytown 7a1f2aba03 add check for gateway port and fix logger.Fatal not record issue (#2185) 2026-03-30 17:43:10 +08:00
daming大铭 cbe92286e9 Merge pull request #2184 from cytown/config
refactor config and add ModelConfig.Enabled
2026-03-30 17:23:07 +08:00
LC ff0266a40e feat(web): display backend version info in sidebar (#2087)
* feat(web): display backend version info in sidebar

* fix(web): improve version parsing and timeout behavior

* refactor(web): remove useless --version fallback

* feat(web): implement version info caching and improve retrieval logic

* fix(web): clarify version timeout rationale

* fix(web): harden gateway version probing and tests

* style(web): split regexp to two lines for lint
2026-03-30 16:44:50 +08:00
Alix-007 e88df4ff9c feat(tools): add reaction tool and reply-aware message sends (#2156)
- Add `reaction` tool that reacts to a message (defaults to current inbound message via context)
- Extend `message` tool with optional `reply_to_message_id` parameter
- Introduce `WithToolInboundContext` to inject inbound message IDs into tool execution context
- Surface `MessageID` and `ReplyToMessageID` in `processOptions` for tool-surface consumption

Refs #2137
2026-03-30 16:31:34 +08:00
mattn 5e7545a22a perf: precompute BM25 index for repeated searches (#2177) 2026-03-30 16:30:25 +08:00
dependabot[bot] 5e1b6a3971 build(deps-dev): bump globals from 16.5.0 to 17.4.0 in /web/frontend (#2067)
Bumps [globals](https://github.com/sindresorhus/globals) from 16.5.0 to 17.4.0.
- [Release notes](https://github.com/sindresorhus/globals/releases)
- [Commits](https://github.com/sindresorhus/globals/compare/v16.5.0...v17.4.0)

---
updated-dependencies:
- dependency-name: globals
  dependency-version: 17.4.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-30 16:18:08 +08:00
dependabot[bot] 7dc0d02a5e build(deps): bump i18next from 25.8.20 to 25.10.10 in /web/frontend (#2065)
Bumps [i18next](https://github.com/i18next/i18next) from 25.8.20 to 25.10.10.
- [Release notes](https://github.com/i18next/i18next/releases)
- [Changelog](https://github.com/i18next/i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/i18next/compare/v25.8.20...v25.10.10)

---
updated-dependencies:
- dependency-name: i18next
  dependency-version: 25.10.10
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-30 16:14:20 +08:00
dependabot[bot] 5c6e13e188 build(deps): bump modernc.org/sqlite from 1.46.1 to 1.47.0 (#2063)
Bumps [modernc.org/sqlite](https://gitlab.com/cznic/sqlite) from 1.46.1 to 1.47.0.
- [Changelog](https://gitlab.com/cznic/sqlite/blob/master/CHANGELOG.md)
- [Commits](https://gitlab.com/cznic/sqlite/compare/v1.46.1...v1.47.0)

---
updated-dependencies:
- dependency-name: modernc.org/sqlite
  dependency-version: 1.47.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-30 16:05:11 +08:00
dependabot[bot] fd9914dd92 build(deps): bump github.com/aws/aws-sdk-go-v2/service/bedrockruntime (#2061)
Bumps [github.com/aws/aws-sdk-go-v2/service/bedrockruntime](https://github.com/aws/aws-sdk-go-v2) from 1.50.2 to 1.50.3.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.50.2...service/s3/v1.50.3)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/service/bedrockruntime
  dependency-version: 1.50.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-30 15:58:04 +08:00
dependabot[bot] 74dfd9364c build(deps): bump golang.org/x/time from 0.14.0 to 0.15.0 (#2059)
Bumps [golang.org/x/time](https://github.com/golang/time) from 0.14.0 to 0.15.0.
- [Commits](https://github.com/golang/time/compare/v0.14.0...v0.15.0)

---
updated-dependencies:
- dependency-name: golang.org/x/time
  dependency-version: 0.15.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-30 15:51:19 +08:00
dependabot[bot] d844bf3683 build(deps): bump github.com/github/copilot-sdk/go from 0.1.32 to 0.2.0 (#2058)
Bumps [github.com/github/copilot-sdk/go](https://github.com/github/copilot-sdk) from 0.1.32 to 0.2.0.
- [Release notes](https://github.com/github/copilot-sdk/releases)
- [Changelog](https://github.com/github/copilot-sdk/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/copilot-sdk/compare/v0.1.32...v0.2.0)

---
updated-dependencies:
- dependency-name: github.com/github/copilot-sdk/go
  dependency-version: 0.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-30 15:47:17 +08:00
wenjie f07a8a89d5 chore(web): patch vulnerable frontend tooling dependencies (#2182)
- upgrade Vite, ESLint, React plugin, and related frontend packages to secure versions
- refresh the pnpm lockfile to pull in patched transitive dependencies
- raise the required Node.js version to match the patched toolchain
- update the web README with the new frontend runtime requirement
2026-03-30 15:29:43 +08:00
wenjie edda02ce67 build(web): refactor launcher build flow and expand WebUI documentation (#2174)
- delegate root launcher builds to the web Makefile
- add dedicated frontend and dev picoclaw build targets
- document the WebUI architecture, runtime behavior, and build workflow
2026-03-30 14:45:52 +08:00
BeaconCat b67d3cfbd8 docs: document gateway.log_level in all READMEs and i18n configuration docs (#2178)
* docs: document gateway.log_level in all READMEs and i18n configuration docs

Add gateway log level note to Channels section in all 9 READMEs and
add Gateway Log Level section to zh/fr/ja/pt-br/vi configuration docs.

- gateway.log_level (default: fatal) controls log verbosity
- Supported values: debug, info, warn, error, fatal
- Can also be set via PICOCLAW_LOG_LEVEL env var
- English docs/configuration.md already had this section

* fix(docs): correct gateway.log_level default from fatal to warn

DefaultConfig() sets Gateway.LogLevel to "warn", not "fatal".
Update all READMEs and i18n configuration docs to reflect the
actual default value.

---------

Co-authored-by: BeaconCat <BeaconCat@users.noreply.github.com>
2026-03-30 14:44:32 +08:00
Cytown 93757812fc refactor config and add ModelConfig.Enabled 2026-03-30 14:01:20 +08:00
Alix-007 cd3f6600ca fix(utils): honor Retry-After for 429 retries 2026-03-30 13:04:51 +08:00
沈青川 93f4c4a843 fix(web): skills page uses theme colors for dark mode (#2166)
- Remove bg-white/80 override on skill cards so bg-card/text-card-foreground apply
- Use bg-muted + text-foreground for skill path block readability

Made-with: Cursor
2026-03-30 01:33:08 +08:00
daming大铭 1fc5345857 refactor(cron): remove deliver and type params, unify agent execution path (#2147)
The agent path now publishes to outbound bus directly (since #2100),
making the deliver=true direct-to-bus shortcut and the directive type
prompt wrapping redundant. All cron jobs now uniformly route through
the agent. This is an intentional behavior change: old jobs with
deliver=true will execute through the agent instead of bypassing it.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-29 22:52:34 +08:00
Cytown 1ef0553929 add logger test case for console log format for component (#2162) 2026-03-29 22:32:39 +08:00
Alix-007 a4574f72a3 fix(web/config): persist Discord token updates from channel settings (#2024)
* fix: save Discord token updates from channel settings

- preserve secret fields from PUT/PATCH /api/config payloads via setters

- include _token edit fields in channel save payload construction

- add regression test for Discord token patch flow (issue #2005)

* fix: resolve shadow lint warnings in config secret mapping

* fix(web/api): adapt config secret patch path after #2068

---------

Co-authored-by: Alix-007 <267018309+Alix-007@users.noreply.github.com>
2026-03-29 22:19:13 +08:00
daming大铭 e34c4f82e0 Merge pull request #2154 from cytown/logger
make logger more clear with highlight component and use package name for default component
2026-03-29 19:47:51 +08:00
Cytown 42e3aaff35 make logger more clear with highlight component and use package name for default component 2026-03-29 18:35:24 +08:00
Cytown f0c0219c4c fix for review 2026-03-29 16:58:48 +08:00
Cytown 9c28870e80 Merge branch 'main' into t3 2026-03-29 16:48:56 +08:00
李光春 e70928cc6f feat(mcp): support DisableStandaloneSSE for HTTP transport (#2108) 2026-03-29 14:37:22 +08:00
沈青川 e414b82ac3 fix(cron): publish agent response to outbound bus for cron-triggered jobs (#2100)
* fix(cron): publish agent response to outbound bus for cron-triggered jobs

When a cron job triggers agent execution via ProcessDirectWithChannel,
the agent response was silently discarded — the code assumed AgentLoop
would auto-publish it, but SendResponse is false on this path.

Delegate to PublishResponseIfNeeded (exported from AgentLoop) so the
response reaches the originating channel (e.g. Telegram) only when the
message tool did not already deliver content in the same round.

Also adds a "directive" message type to CronPayload, allowing cron jobs
to instruct the agent to execute a task rather than echo static text.

* fix(cron): add type validation and directive test coverage

Address reviewer blocking feedback:

1. Server-side whitelist for `type` parameter — the `enum` in
   Parameters() is only an LLM schema hint; any string was persisted.
   Now `addJob` rejects values other than "message" and "directive".

2. Comprehensive test coverage for the directive code path:
   - directive adds prompt prefix to ProcessDirectWithChannel
   - deliver=true + directive routes through agent (not direct publish)
   - directive prompt content, sessionKey, channel, chatID are correct
   - invalid type is rejected; valid types ("", "message", "directive") pass
   - deliver=true message type goes directly to bus (regression)
   - agent error path does not trigger publish (regression)

Also merge the two UpdateJob calls in addJob into one to avoid
redundant disk I/O (non-blocking suggestion from review).

* fix(cron): remove omitempty from CronPayload.Type for consistent JSON

Empty string and "message" are semantically equivalent defaults;
always serializing the field avoids asymmetric JSON output.

* test(cron): remove redundant test, strengthen error path coverage

- Remove ExecuteJobDirectivePassesCorrectContent: its assertions on
  sessionKey/channel/chatID duplicate ExecuteJobPublishesAgentResponse;
  its prompt check duplicates DirectiveAddsPromptPrefix.
- Strengthen DirectiveAddsPromptPrefix with exact prompt match and
  publish response assertion.
- Fix ReturnsErrorWithoutPublish: set non-empty stub response so the
  test verifies the error branch early-return, not the response==""
  guard.

* fix(ci): satisfy golines and gosmopolitan in cron code
2026-03-29 13:47:28 +08:00
zeed zhao 6ea364e67d feat(web): protect launcher dashboard with token and SPA login (#1953)
Add token-based authentication for the Launcher's embedded Web Dashboard.

- Ephemeral token generated in-memory each run (or via PICOCLAW_LAUNCHER_TOKEN env var)
- HMAC-SHA256 session cookie (HttpOnly, SameSite=Lax, Secure when HTTPS)
- Bearer token support for API/script access
- Rate limiting on login (10 attempts/IP/min)
- Referrer-Policy: no-referrer on all responses
- POST-only logout with JSON content-type (CSRF-safe)
- System tray "Copy dashboard token" action
- Login page shows contextual help (console/tray/log file path)
- Path traversal protection via path.Clean
- X-Forwarded-Host/Port/Proto support for reverse proxy deployments
- Full i18n support (English, Chinese)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-29 13:11:43 +08:00
Andy Lo-A-Foe 4f90909af3 feat(bedrock): detect SSO token expiration and provide actionable error
When AWS SSO credentials expire, provide a clear error message instructing
the user to run 'aws sso login' to refresh their session.
2026-03-28 22:18:45 +01:00
Cytown 475d377af1 Merge branch 'main' into t3 2026-03-29 01:25:20 +08:00
Cytown 0bb561548f add pid file for gateway running and auth token for /reload and pico channel 2026-03-29 01:14:39 +08:00