Skip to content

New terminal - #70

Merged
LeeEirc merged 10 commits into
masterfrom
new_terminal
Aug 26, 2026
Merged

New terminal#70
LeeEirc merged 10 commits into
masterfrom
new_terminal

Conversation

@LeeEirc

@LeeEirc LeeEirc commented Aug 26, 2026

Copy link
Copy Markdown
Member

No description provided.

Copilot AI lite review requested due to automatic review settings August 26, 2026 09:10
@fit2bot
fit2bot requested a review from a team August 26, 2026 09:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a new bidirectional gRPC “AgentSession” stream to support an AI-assisted terminal surface (currently SQL), including provider integrations (OpenAI/DeepSeek-compatible), request limiting/queueing, and optional audit logging.

Changes:

  • Add AgentSession bidi-stream RPC + related protobuf messages, plus regenerated Go/Java stubs.
  • Implement an agent runtime (SurfaceSession) and SQL surface with tool-call policy/loop protection and validation flow.
  • Add terminal AI provider layer (OpenAI Responses + chat-completions fallback, DeepSeek support), config knobs, and basic tests.

Reviewed changes

Copilot reviewed 38 out of 40 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
protos/service.proto Adds AgentSession RPC and stream message contract.
protos/common.proto Adds chat_ai_enabled to ComponentSetting.
protobuf-java/org/jumpserver/wisp/ServiceGrpc.java Regenerated gRPC Java bindings including AgentSession.
protobuf-java/org/jumpserver/wisp/Common.java Regenerated Java protobuf with chat_ai_enabled.
protobuf-go/protobuf/service_grpc.pb.go Regenerated Go gRPC bindings including AgentSession.
protobuf-go/protobuf/agent_protocol_test.go Tests stream descriptor + proto roundtrip for open event.
pkg/config/config.go Adds AI audit/limiter config fields + default queue size.
pkg/agent/* Adds agent runtime, SQL surface, auditing, and supporting helpers/tests.
pkg/agent/provider/* Adds provider abstraction + OpenAI/DeepSeek/compatible transports + tests.
cmd/impl/* Wires AgentSession into JMServer, adds limiter/registry and pb conversion updates/tests.
cmd/common/forward_service.go Tweaks gateway error logging.
cmd/common/beat_service.go Adds GetSession helper for agent session validation.
go.mod / go.sum Adds OpenAI SDK + dependency bumps and Go version update.
config_example.yml Documents new AI env config knobs.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

domain.Name, gateway.Name, err)
}
logger.Errorf("Domain %s find available gateway failed: %s", domain.Name)
logger.Errorf("Domain %s find available gateway failed: %s", domain.Name, ErrNoAvailable)
Comment thread pkg/agent/audit.go
Comment thread pkg/agent/sql_surface.go
Comment on lines +181 to +190
calls := make([]SurfaceToolCall, 0, 1)
tables := uniqueSQLTables(editor.ReferencedTables, maxSQLInspectTables)
if len(tables) > 0 {
arguments, err := json.Marshal(sqlToolArguments{Schema: editor.Schema, Tables: tables})
if err != nil {
return nil, err
}
calls = append(calls, SurfaceToolCall{Name: "inspect_schema", Arguments: arguments})
}
return calls, nil
Comment thread go.mod
module github.com/jumpserver/wisp

go 1.24.6
go 1.25.0
@LeeEirc
LeeEirc merged commit 7398c53 into master Aug 26, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants