1215 Commits
Author SHA1 Message Date
Duy /zuey/andGitHub c70324f032 Merge pull request #1230 from digitopvn/dev
Sync digitop dev changes into upstream dev
2026-06-15 15:03:26 +07:00
Duy /zuey/andGitHub 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/andGitHub 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/andGitHub 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/andGitHub 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/andGitHub 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
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 AfiandiandGoon 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 AfiandiandGoon 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 3ec20dfb55 fix(cron): wait for in-flight jobs on shutdown 2026-06-12 22:44:45 +07:00
Goon 25b039dbe9 feat(skills): add bundled goclaw gateway skill 2026-06-12 22:17:41 +07:00
Duy /zuey/andGitHub 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 06877365c4 merge: sync dev into usage analytics branch 2026-06-12 17:58:22 +07:00
Duy /zuey/andGitHub 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
Goon 9cd57a920c feat: add multi-attachment delivery batching 2026-06-12 17:33:54 +07:00
Duy /zuey/andGitHub 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
Goon a76f443411 feat: add persona context to delivery messages 2026-06-12 15:17:57 +07:00
Goon 1e0ea7615d fix(skills): guard suggestion status updates by skill 2026-06-12 15:04:29 +07:00
Goon 248d591f52 fix: resolve dev merge conflicts 2026-06-12 15:01:38 +07:00
Goon 7692939d09 Merge remote-tracking branch 'origin/dev' into codex/issue-161-skill-self-evolution
# Conflicts:
#	cmd/skills_cmd.go
#	docs/project-changelog.md
#	internal/http/skills.go
#	internal/store/sqlitestore/schema.go
2026-06-12 14:57:09 +07:00
Goon f45bfa860c feat(skills): add skill self-evolution metrics 2026-06-12 14:47:51 +07:00
Goon c320de5a87 feat: grant first setup agent gateway operator access 2026-06-12 10:40:59 +07:00
Goon 0bf7f88054 feat(skills): add lifecycle API and CLI 2026-06-12 10:38:53 +07:00
Duy /zuey/andGitHub 95fd1f8f2d fix(providers): fallback on codex safety errors (#157) 2026-06-12 00:43:09 +07:00
Duy /zuey/andGitHub 8d664954e6 Merge pull request #156 from digitopvn/codex/issue-137-mid-flight-requests
fix(pipeline): preserve mid-flight follow-up requests
2026-06-12 00:36:28 +07:00
Goon 152b2ac0f7 fix(pipeline): preserve mid-flight follow-up requests 2026-06-12 00:28:00 +07:00
Duy /zuey/andGitHub 167b80e778 feat(traces): add search and advanced filters
Closes #152
2026-06-12 00:14:40 +07:00
Duy /zuey/andGitHub 9203782ae3 fix(tools): fail closed on github cli credentials (#154) 2026-06-11 23:57:56 +07:00
Thành Nguyễn 4c500055d2 fix(bitrix): validate ALL resolved IPs for SSRF + stub DNS in tests
- Iterate over all DNS responses instead of just the first IP to prevent
  multi-IP SSRF bypass where a blocked IP appears after a public one
- Make resolver injectable via package-level lookupHost variable
- Replace real-DNS test (google.com) with stubbed resolver covering:
  single public/private IP, DNS failure, empty results, invalid IP,
  multi-IP public→private, private→public, all public, metadata IP,
  IPv6 loopback
- Add fmt import to test file for stubbed error messages
2026-06-11 21:53:47 +07:00
Thành Nguyễn cf66df44ed fix(bitrix): use valid cloud domain for tests 2026-06-11 20:02:05 +07:00
Thành Nguyễn 56fce5d294 fix(bitrix): add SSRF-safe self-hosted domain check
- Add validateSelfHostedDomain() with SSRF protection (blocked CIDRs,
  hostname resolution, localhost/.local/.localhost rejection)
- Validate port range 1-65535 for self-hosted domains with ports
- Mirror SSRF + port validation in frontend form
- Add comprehensive tests: SSRF blocked IPs, invalid ports, valid public
domains
2026-06-11 19:45:14 +07:00
Keith Patrick 37e2d37cf4 feat: implement pkg-helper fallback execution
Add CLI argument support to pkg-helper and fallback execution via $PATH in dep_installer when the Unix socket is unavailable.

💘 Generated with Crush

Assisted-by: Crush:gemini-3.1-pro-preview-customtools
2026-06-11 13:34:49 +01:00
Thành Nguyễn e4f1d55e0c Add more support to cloud and self-hosted Bitrix 2026-06-11 18:04:18 +07:00
Thành Nguyễn ee26bc90bf fix: allow self-hosted Bitrix24 domains for portal registration
Split bitrixDomainRegex into bitrixCloudDomainRegex (cloud SaaS domains)
and selfHostedDomainRegex (custom FQDNs). Users can now register portals
with self-hosted Bitrix24 instances like bx.mycompany.com instead of
being restricted to *.bitrix24.{com,eu,...} domains.
2026-06-11 17:21:05 +07:00
Duy /zuey/andGitHub 50c8519f01 fix(channels): require generated delivery replies
Quick Ack and Intermediate Replies now require generated delivery text in generated modes, while fixed-template mode remains explicit. Includes provider/model resolution coverage and UI copy updates.
2026-06-10 16:29:39 +07:00
Goon 94d7bbc28a fix(vault): enforce team access on document updates 2026-06-09 23:04:59 +07:00
Goon 59a1773a18 Merge remote-tracking branch 'origin/dev' into codex/merge-nextlevelbuilder-goclaw 2026-06-09 22:49:30 +07:00
Goon a63080714a Merge remote-tracking branch 'upstream/dev' into codex/merge-nextlevelbuilder-goclaw
# Conflicts:
#	internal/pipeline/think_stage.go
#	internal/pipeline/tool_stage.go
#	tests/integration/git_adapter_ssh_test.go
2026-06-09 22:38:32 +07:00
Duy /zuey/andGitHub fdba1c2138 feat(channels): add sidecar delivery behavior overrides
Closes #144.

- Retire user-facing Tool Status Messages and deterministic tool-status channel text.
- Add sidecar-generated Quick Acknowledgement and Intermediate Replies with provider/model/timeout/token/char caps.
- Resolve delivery behavior as Channel > Agent > Workspace with agent overrides in other_config.delivery_behavior.
- Preserve legacy block_reply defaults for Intermediate Replies.
2026-06-09 22:24:24 +07:00
Duy /zuey/andGitHub 23b18fa6cd fix(channels): rely on generated intermediate progress (#143)
* fix(channels): add reasoning delivery modes

* fix(telegram): show tool status without placeholder

* docs(plans): mark issue 67 behavior plan complete

* feat(config): add behavior setting purpose tooltips

* fix(channels): rely on generated intermediate progress
2026-06-09 09:12:23 +07:00
90552531fb Fix/pipeline compaction pending loss (#1182)
* fix(pipeline): preserve pending messages during compaction

When PruneStage or ThinkStage triggers mid-loop compaction,
ReplaceHistory() clears the pending buffer. If the current
iteration's assistant(tool_calls) message is in pending, it gets
discarded. The next iteration then sends tool-result messages
without a preceding tool_calls message, causing DeepSeek/OpenAI
to reject the request with HTTP 400:

  Messages with role 'tool' must be a response to a preceding
  message with 'tool_calls'

Fix: save pending before ReplaceHistory and restore it after.

Reproduction:
- Agent with 64K context window
- 4-5 consecutive tool calls (e.g. read_file) in one session
- Token count exceeds soft budget during ToolStage
- PruneStage compaction clears pending including assistant(tool_calls)
- Next iteration fails with HTTP 400

* test(pipeline): regression guards for pending preservation during compaction

Add focused unit tests covering both ReplaceHistory call sites that previously
dropped the pending buffer:

- PruneStage mid-loop compaction must preserve the in-flight
  assistant(tool_calls) message so tool_calls -> tool_result pairing survives,
  preventing the OpenAI/DeepSeek 400 on the next provider call.
- ThinkStage emergency overflow compaction must preserve already-staged pending
  messages (e.g. iteration-budget nudges) across the retry.

Both tests fail without the preservation fix and pass with it.

Co-authored-by: ollielin <2137816+ollielin@users.noreply.github.com>

---------

Co-authored-by: Duy /zuey/ <duy@wearetopgroup.com>
Co-authored-by: ollielin <ollielin@tencent.com>
Co-authored-by: Thieu Nguyen <thieunguyen.tech@gmail.com>
Co-authored-by: ollielin <2137816+ollielin@users.noreply.github.com>
2026-06-07 10:16:15 +07:00
thotam fef98b4dd7 feat(tools): implement piping stream for Gemini File API from video URL 2026-06-06 19:14:13 +07:00
thotam abb0fab94c feat(providers): refactor media content representation to separate ImageContent and VideoContent 2026-06-06 18:42:54 +07:00