Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,9 @@ jobs:
run: npm install -g pnpm@10.32.1

- name: Install dependencies
run: pnpm install --frozen-lockfile --filter liveagent...
# GUI frontend tests load shared Gateway WebUI modules (including STT adapters).
# Install that workspace and its transitive dependencies in this isolated job.
run: pnpm install --frozen-lockfile --filter liveagent... --filter @liveagent/gateway-webui...

- name: Typecheck and build GUI frontend
working-directory: crates/agent-gui
Expand All @@ -169,7 +171,7 @@ jobs:
tauri-rust:
name: Tauri Rust Check
runs-on: ubuntu-latest
timeout-minutes: 20
timeout-minutes: 30
steps:
- uses: actions/checkout@v6

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ chatroom
!.vscode/extensions.json
.idea
.DS_Store
._*
*.suo
*.ntvs*
*.njsproj
Expand Down
48 changes: 42 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 15 additions & 1 deletion crates/agent-gateway/cmd/gateway/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package main

import (
"context"
"encoding/json"
"errors"
"log/slog"
"net/http"
Expand All @@ -16,6 +17,7 @@ import (
"github.com/liveagent/agent-gateway/internal/observability"
"github.com/liveagent/agent-gateway/internal/server"
"github.com/liveagent/agent-gateway/internal/session"
"github.com/liveagent/agent-gateway/internal/stt"
)

// fatal 记录错误并以非零码退出(slog 没有 Fatal 级别,集中在此处理)。
Expand Down Expand Up @@ -43,10 +45,22 @@ func main() {
}
slog.Info("agent registry db ready", "path", cfg.AgentDB)
slog.Info("agent authentication accepts gateway token or per-agent token")
sttStore, err := stt.NewStore(database)
if err != nil {
fatal("init STT settings store failed", "err", err)
}
sm.SetSTTSettingsSyncHandler(func(ctx context.Context, raw json.RawMessage) (any, error) {
var settings stt.Settings
if err := json.Unmarshal(raw, &settings); err != nil {
return nil, err
}
return sttStore.SyncFromDesktop(ctx, settings)
})
sttManager := stt.NewManager(sttStore)

httpServer := &http.Server{
Addr: cfg.HTTPAddr,
Handler: server.NewHTTPServer(cfg, sm, tokens),
Handler: server.NewHTTPServer(cfg, sm, tokens, sttManager),
ReadHeaderTimeout: 10 * time.Second,
// 空闲 keep-alive 连接必须回收,否则 REST/静态资源访问方挂住连接会把 fd
// 慢性耗尽到 ulimit。刻意不设全局 Read/WriteTimeout:流式上传与隧道长响应
Expand Down
3 changes: 3 additions & 0 deletions crates/agent-gateway/internal/proto/v2/capabilities.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ package gatewayv2
// ChatIngressV1Capability is the capability identifier for reliable desktop
// chat mirroring into the gateway.
const ChatIngressV1Capability = "CHAT_INGRESS_V1"

// SttStreamV1Capability identifies the gateway-owned browser STT data plane.
const SttStreamV1Capability = "STT_STREAM_V1"
Loading
Loading