New terminal - #70
Merged
Merged
Conversation
…ptions_forwarding feat(protocol): forward generic connect options
# Conflicts: # cmd/impl/jms.go # go.mod # protobuf-go/protobuf/common.pb.go # protobuf-java/org/jumpserver/wisp/Common.java
There was a problem hiding this comment.
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
AgentSessionbidi-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 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 |
| module github.com/jumpserver/wisp | ||
|
|
||
| go 1.24.6 | ||
| go 1.25.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.