Commit Graph
1795 Commits
Author SHA1 Message Date
Clark Cant e3fae8e88d Merge pull request #452 from ducconit/chore/configurable-docker-ports
chore(docker): make host ports customizable via environment variables
2026-08-17 18:47:40 +07:00
TJFandtommylauren 713faf2ab0 feat(tracing): sign exported spans as verifiable receipts (#1505)
Implements #688.

Adds a SpanExporter that signs exported spans as Ed25519 receipts, chains them,
and anchors the sequence with a signed checkpoint, so a third party can verify
what a run did without trusting the collector, the database, or the operator.

Standard library crypto only. No new dependencies, and no existing file is
modified: it attaches through SetExporter the same way OTLP does.

Design notes worth reviewing:

- Coverage counts spans this exporter received, never spans the runtime
  executed. Collector.EmitSpan drops spans when its buffer fills, which is
  correct for observability and means an exporter can only sign what reaches
  it. Every checkpoint carries a note saying so, so a receipt set reads as a
  floor on what happened rather than a complete record.
- The checkpoint is not optional. A hash chain cannot detect truncation:
  removing the newest receipts leaves every remaining link valid. Verification
  reports Valid=false when no checkpoint is supplied, because without one it
  can only say nothing was altered, never that nothing is missing.
- A checkpoint stored beside its receipts is deletable by whoever deletes the
  receipts, so Sink keeps the two destinations separate to make publishing the
  anchor elsewhere straightforward.
- Content is committed by digest rather than copied, since the package redacts
  previews and a second store of that content would widen a leak.
- Ordering comes from an exporter sequence rather than a clock.
- Revocation is not retroactive; RevokedAt covers the compromise case.
- Signature and chain failures are reported separately, and a failed sink write
  does not advance the chain head.

26 tests, most adversarial: tampering, forged signatures under a claimed kid,
cross-domain signature replay, validity windows, revocation ordering, middle
deletion, reordering, end truncation, empty bundles, sink failure, and
concurrent export. go vet and go test -race clean.

Co-authored-by: tommylauren <tfarley@utexas.edu>
2026-08-10 06:15:03 +07:00
Stanley KaoandClaude Opus 4.6 cc510d924e fix(cmd): add --user flag to agent chat for user_id authentication (#714)
The CLI agent chat command connects via WebSocket but never sends
user_id in the connect params. The gateway requires user_id for
chat.send, making the CLI unusable for any agent interaction.

All other clients (browser, Telegram, LINE, etc.) send user_id
during connect. The CLI was the only channel missing it.

Adds --user / -u flag that passes user_id in the connect frame.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-08-07 01:31:02 +07:00
mdsandClaude Code 94d2799788 feat(http): support persistent sessions via X-GoClaw-User-Id header (#713)
When X-GoClaw-User-Id header is provided, build a stable session key
using BuildSessionKey() — same canonical format as Telegram, Discord,
Slack channels. This allows HTTP API clients to maintain conversation
history across multiple requests.

Without the header, behavior is unchanged (random session per request).

Session key format:
  With userId: agent:{id}:http:direct:{userId}  (persistent)
  Without:     agent:{id}:http-{random}          (stateless)

Co-authored-by: Claude Code <claude@anthropic.com>
2026-08-06 22:32:00 +07:00
badgerbees 3ed1d5f9d8 fix(feishu): harden API client with defensive HTTP status checks (#407)
- Check resp.StatusCode range (2xx) before JSON decoding
- Provide clear actionable errors with HTTP status codes for 5xx failures
- Prevent cryptic JSON parse errors from HTML error pages
2026-08-05 23:02:41 +07:00
Du Hoang Dinh 519df3dd17 feat(store): add Upsert() to BuiltinToolStore for additive tool seeding (#554)
Approved by github-maintain automation. Clean implementation of additive Upsert() for fork-specific tool seeding. Solves #336.
2026-07-09 22:54:37 +07:00
daotriandTrí Đào Nguyễn Minh dc4cfddd31 fix(mcp): refresh per-user credentials without restart (#1375)
Co-authored-by: Trí Đào Nguyễn Minh <tri.dao@buymed.com>
2026-07-07 12:23:11 +07:00
ナムandCollective Developer 099ff853a2 fix(background): clear stale provider alerts (#1362)
Co-authored-by: Collective Developer <man@collective.dev>
2026-07-05 18:59:52 +07:00
Zezae Oh 360fe30a8e fix(providers): retry transient Codex response failures (#1332)
* fix(providers): retry transient Codex response failures

* test(cron): tolerate nil session store in handler tests
2026-07-03 07:54:40 +07:00
codebit0andClaude Opus 4.7 fabe86b3de fix(cron): invert stateless gate to match UI label (#1139)
The cron job handler reset the session when stateless=false and skipped
reset when stateless=true — the opposite of what every UI locale labels
the field (en/ko/zh/vi all describe stateless as "each run starts fresh
without loading previous messages").

The buggy gate caused stateless=true crons to silently accumulate session
history across every execution, leading to context bloat and increasing
the chance of LLMs short-circuiting tool calls in favor of replaying
prior assistant turns. One affected daily ETL cron grew to 38 messages
over 18 days before the regression was noticed.

Fix: gate the Reset on `if job.Stateless` so the runtime matches the UI
contract. No DB migration is required — existing values were set by users
based on the UI label, so they already encode the intended behavior.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-21 07:36:28 +07:00
codebit0andClaude Opus 4.7 d5033b4aaf fix(exec): exempt venv python interpreter from .goclaw/ path deny (#1140)
The ExecTool path-deny rule blocks any token containing `.goclaw/` unless
it matches one of the AllowPathExemptions prefixes (skills-store, tenants).
This silently rejected legitimate commands invoking the goclaw-managed
Python interpreter via its absolute path:

    /home/user/.goclaw/venv/bin/python3 .../script.py

The first token `/home/user/.goclaw/venv/bin/python3` matched the deny
pattern but no exemption, so the entire command was denied.

Naive exemption (".goclaw/venv/bin/") does not work: matchesAnyPathExemption
resolves both tokens and exemption candidates via EvalSymlinks, and the
venv's python3 is a symlink into the host's python cellar (e.g. linuxbrew).
The token canonicalizes to /home/linuxbrew/.../python3.14 while a literal
".goclaw/venv/bin/" prefix never gets touched.

Fix: resolve venv/bin/python3 once at startup and exempt the dirname of
the resolved target. Failure to resolve (no venv present) silently falls
through.

Without this, ACP-driven agents either fail outright or work only via
fragile heuristics (cwd-local symlinks generated on the fly by the LLM).

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-21 07:03:48 +07:00
codebit0andClaude Opus 4.7 05d790662a feat(acp): surface session/update tool_call notifications at Info level (#1141)
session/update notifications carrying a ToolCall (or inline tool_call /
tool_call_update kind) were only dumped at Debug level inside the params
blob. Operators could see `security.tool_granted` (permission granted) but
had no way to tell whether the tool actually executed successfully — both
"permission granted then failed silently" and "permission granted and
succeeded" looked identical in journalctl.

Add a structured Info log emitting toolCallId, name/title, status, and a
content preview (truncated at 400 chars) whenever the notification
contains tool-call state. This is what made it possible to diagnose the
recent .goclaw/-path-deny regression — `status=failed` immediately after
`security.tool_granted` revealed the gap that the granted-only log hid.

No behavior change beyond logging volume; preview is bounded.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-21 06:33:15 +07:00
nguyenha935andGoClaw Operator 6c8ad12858 fix: unify NO_REPLY detection (#1233)
Co-authored-by: GoClaw Operator <operator@goclaw>
2026-06-21 06:03:08 +07:00
Duy /zuey/ 2f3d68e806 Merge pull request #1231 from nextlevelbuilder/dev
release: promote dev to stable
2026-06-15 15:50:36 +07:00
Duy /zuey/ c70324f032 Merge pull request #1230 from digitopvn/dev
Sync digitop dev changes into upstream dev
v3.15.0-beta.1
2026-06-15 15:03:26 +07:00
Duy /zuey/ 3b15d7e69a Merge pull request #1197 from zezaeoh/fix/bridge-agent-key
fix(gateway): inject agent key in MCP bridge so session tools resolve identity
2026-06-15 14:50:41 +07:00
Goon 591d809779 Merge remote-tracking branch 'upstream/dev' into dev
# Conflicts:
#	internal/cron/service.go
2026-06-15 14:14:16 +07:00
Goon faf3e282a3 fix(cron): return job snapshots safely 2026-06-15 11:33:46 +07:00
Jaegeon Oh 36c88fdd6e fix(gateway): inject agent key in MCP bridge so session tools resolve identity
bridgeContextMiddleware injects the agent UUID (store.WithAgentID) but never the
agent key, so session tools (sessions_list/history/send/status) that resolve the
caller via tools.ToolAgentKeyFromCtx always get "" and fail with "agent context
required" when invoked over /mcp/bridge (e.g. by a claude-cli provider agent).
Session keys are namespaced by agent key (agent:<key>:...), not UUID, and the
bridge has no RunContext fallback.

Inject the key in the same block that already fetches the agent for shell-deny
overrides — symmetric with store.WithShellDenyGroups, no extra DB call, no new
imports.

#1094 makes the same fix at this site but bundles it into a large, stale
(CONFLICTING) ACP/i18n refactor; this is the minimal extraction of that slice.
It omits #1094's companion store.WithAgentKey write, which nothing on dev reads
(every session tool reads tools.ToolAgentKeyFromCtx).

Add internal/gateway/bridge_context_test.go: a regression guard asserting a
signed X-Agent-ID lands the agent key in tools.ToolAgentKeyFromCtx, plus a
no-store negative control.

Signed-off-by: Jaegeon Oh <zezaeoh@gmail.com>
2026-06-15 13:17:02 +09:00
Duy /zuey/ 4dd2a0ce28 Merge pull request #1210 from keithy/feature/pkg-helper-fallback
feat: implement pkg-helper fallback execution
2026-06-15 10:41:17 +07:00
Duy /zuey/ 9c1c572298 Merge pull request #1172 from raihan0824/feat/provider-kimi-coding
Feat/provider kimi coding
2026-06-15 10:40:45 +07:00
Duy /zuey/ 417eae02b9 Merge pull request #1191 from thotam/feat/read-image-from-url
feat(multimodal): support analyzing images and videos via URLs & streaming upload for Gemini
2026-06-15 10:39:36 +07:00
Duy /zuey/ 00c25635e5 Merge pull request #1176 from dataplanelabs/upstream-fix/tts-timeout-wire
fix(tts): wire dashboard tts.timeout_ms through ApplySystemConfigs + seed
2026-06-15 10:36:50 +07:00
Duy /zuey/ f333706642 Merge pull request #1220 from bclermont/fix/setup-page-scrolling
fix(setup): enable scrolling on mobile setup page
2026-06-15 10:35:42 +07:00
Goon 1dea4a21cf fix: harden media URL handling 2026-06-15 10:20:21 +07:00
Goon 540dc11301 fix(providers): send Kimi headers when listing models 2026-06-15 10:16:47 +07:00
Raihan Afiandi cc9334fdd9 fix(providers): kimi_coding requires reasoning_content on assistant tool-call
Upstream returns HTTP 400 `thinking is enabled but reasoning_content
is missing in assistant tool call message at index N` when an
assistant message with tool_calls is replayed in history without a
reasoning_content field. Kimi has server-side thinking enabled by
default for kimi-k2-turbo-preview, so the field is required even when
goclaw doesn't have captured reasoning content to send (e.g. the model
emitted a tool_call without any thinking, or the stream chunk that
carried it was lost).

The existing branch already gates on
openAIWireAssistantReasoningContent(model) (kimi/deepseek/o-series)
and emits the field only when Thinking != "". Extend so kimi_coding
also emits an empty string when Thinking is unset — satisfies Kimi's
"must be present" check without inventing reasoning content. Other
providers in the allowlist keep today's behavior: omit when empty.

Three new tests:
  - kimi_coding always carries reasoning_content on assistant
  - kimi_coding preserves real Thinking content when set
  - non-kimi providers (deepseek) do NOT inject empty reasoning_content

Reference: NousResearch/hermes-agent plugins/model-providers/kimi-coding
documents the same upstream behavior (thinking enabled by default,
reasoning_content roundtrip required).
2026-06-15 10:16:47 +07:00
Raihan Afiandi b844af8d25 feat(providers): add kimi_coding provider with fixed User-Agent + temp lock
Moonshot's Kimi Coding endpoint is OpenAI-compatible on the wire but
has two non-standard rules:

  1. Every request must carry `User-Agent: claude-code/0.1.0` — without
     it the upstream rejects the call outright.
  2. `temperature` is locked to the server default; passing any other
     value returns HTTP 400 `invalid temperature: only 1 is allowed for
     this model`.

Rather than special-case either, this commit generalises both:

  - WithExtraHeaders on OpenAIProvider — static headers attached to
    every outgoing request. Reusable by any future provider that needs
    pinned identity headers; mirrored in adapter_openai.ToRequest so
    callers using the adapter path see the same shape.
  - The existing skipTemp branch in openai_request.go gets a
    provider_type check — kimi_coding joins o1/o3/o4/gpt-5-mini in
    omitting `temperature` from the request body.

Provider wiring:
  - store.ProviderKimiCoding constant + ValidProviderTypes entry +
    KimiCoding{DefaultAPIBase,DefaultModel,RequiredUserAgent}.
  - case store.ProviderKimiCoding in both registration switches
    (cmd/gateway_providers.go and internal/http/providers.go).
  - UI dropdown entry with the API base pre-filled.

5 unit tests cover: real outgoing header injection, adapter-path
header mirroring, empty-map WithExtraHeaders no-op, kimi_coding
strips temperature, and the negative control (other providers still
forward temperature).

Admin flow: Providers → Add → "Kimi Coding (Moonshot)" → paste API
key → save.
2026-06-15 10:16:47 +07:00
Goon 9b16a57a4a fix(pkg-helper): harden direct fallback parsing 2026-06-15 10:15:50 +07:00
Goon 000731131c fix(bitrix): update domain validation copy 2026-06-15 10:10:39 +07:00
Goon 05f0357ee6 Merge commit '4c500055d2c96e84b4cfb225c51be7b4beaf8e1b' into codex/merge-pr-1209 2026-06-15 10:10:38 +07:00
Duy /zuey/ 2677e32624 Merge pull request #179 from digitopvn/codex/issue-141-cron-no-reply-contains
fix(cron): suppress deliveries containing NO_REPLY
2026-06-13 09:09:06 +07:00
Goon cd7c812b3d fix(cron): suppress no-reply deliveries by token 2026-06-13 09:01:56 +07:00
Bruno ClermontandClaude Haiku 4.5 edcccfba23 fix(setup): enable scrolling on mobile setup page
- Change outer container from items-center to items-start sm:items-center for mobile-first layout
- Add overflow-y-auto and max-h-dvh constraints to inner content div on mobile
- Desktop (sm breakpoint) retains centered layout with no scroll constraint
- Fixes issue where setup page content exceeds viewport on mobile without zoom

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-06-12 18:53:12 -04:00
Duy /zuey/ c4a927e087 Merge pull request #178 from digitopvn/codex/fix-cron-test-tempdir-cleanup
fix(cron): wait for in-flight jobs on shutdown
2026-06-12 22:53:18 +07:00
Goon 3ec20dfb55 fix(cron): wait for in-flight jobs on shutdown 2026-06-12 22:44:45 +07:00
Duy /zuey/ 8761ce5401 Merge pull request #177 from digitopvn/codex/issue-175-bundled-goclaw-skill
feat(skills): add bundled goclaw gateway skill
2026-06-12 22:26:07 +07:00
Goon 25b039dbe9 feat(skills): add bundled goclaw gateway skill 2026-06-12 22:17:41 +07:00
Duy /zuey/ c32d6b3279 Merge pull request #176 from digitopvn/codex/issue-107-usage-analytics-plan
feat(usage): add event analytics dashboard
2026-06-12 18:28:35 +07:00
Goon 41bead2a07 fix(usage): remove stale team table migration reference 2026-06-12 18:16:20 +07:00
Goon 06877365c4 merge: sync dev into usage analytics branch 2026-06-12 17:58:22 +07:00
Duy /zuey/ 4f87b93dbd feat: add qwen3.7-plus to Bailian Coding catalog
Closes #169
2026-06-12 17:57:48 +07:00
Goon 4002bb4c13 feat(usage): add event analytics dashboard 2026-06-12 17:51:12 +07:00
Duy /zuey/ 85fe1b8e81 Merge pull request #174 from digitopvn/codex/issue-172-multi-attachment-delivery
feat: add multi-attachment delivery batching
2026-06-12 17:45:16 +07:00
Goon 9cd57a920c feat: add multi-attachment delivery batching 2026-06-12 17:33:54 +07:00
Duy /zuey/ 515596c44c Merge pull request #167 from digitopvn/codex/issue-161-skill-self-evolution
feat(skills): add skill self-evolution metrics
2026-06-12 15:55:18 +07:00
Goon dd6ee64f23 fix(skills): harden evolution mutations 2026-06-12 15:38:23 +07:00
Duy /zuey/ 99e8b67e8b Merge pull request #168 from digitopvn/codex/issue-166-delivery-persona-context
feat: add persona context to delivery messages
2026-06-12 15:36:55 +07:00
Goon a76f443411 feat: add persona context to delivery messages 2026-06-12 15:17:57 +07:00
Duy /zuey/ 79bc490786 Merge pull request #165 from digitopvn/codex/issue-160-first-agent-gateway-operator
feat: grant first setup agent gateway operator access
2026-06-12 15:12:06 +07:00