Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
122 commits
Select commit Hold shift + click to select a range
64e6bc1
feat(runtime\provider):初步重构多模态机制
phantom5099 Apr 15, 2026
0728dc6
fix(tui): remove legacy compatibility path and restore multimodal/ses…
xgopilot Apr 15, 2026
6618ee6
fix(provider): validate parts and simplify message conversion
xgopilot Apr 16, 2026
9bdd63a
Merge pull request #19 from phantom5099/fork-pr-315-1776306016
phantom5099 Apr 16, 2026
7107222
fix(runtime): align todo integration test with parts input
xgopilot Apr 16, 2026
c300874
Merge pull request #20 from phantom5099/fork-pr-315-1776306016
phantom5099 Apr 16, 2026
e874d44
merge(main): resolve PR #315 conflicts for runtime parts/todo integra…
xgopilot Apr 16, 2026
13eec8c
Merge pull request #21 from phantom5099/fork-pr-315-1776306016
phantom5099 Apr 16, 2026
8472088
Merge remote-tracking branch 'upstream/main'
phantom5099 Apr 16, 2026
9e3c6fc
feat(gateway): 引入 ConnectionID 上下文与 JSON-RPC 会话提取规则
pionxe Apr 16, 2026
8104322
feat(gateway): 实现并发安全的流式中继器 (Stream Relay)
pionxe Apr 16, 2026
63fe363
feat(gateway): 贯通 IPC/WS/SSE 协议端点的流式中继接入
pionxe Apr 16, 2026
fdbb765
feat(gateway): [EPIC-GW-05] 补齐网关启动编排与流式分发链路
pionxe Apr 16, 2026
08e7af7
test(gateway): [EPIC-GW-05] 完善会话中继全链路测试覆盖与边界校验
pionxe Apr 16, 2026
061e26b
fix(gateway): harden stream relay lifecycle and binding limits
xgopilot Apr 16, 2026
b78883e
Merge pull request #15 from 1024XEngineer/codex/issue-266-header-rend…
creatang Apr 16, 2026
491af12
pref(runtime\provider):重构多模态机制
phantom5099 Apr 16, 2026
cff5541
test(gateway): add branch coverage tests for relay and rpc paths
xgopilot Apr 16, 2026
0232b2c
fix(provider): tighten multimodal part validation and empty message s…
xgopilot Apr 16, 2026
f917dbc
Merge pull request #22 from phantom5099/fork-pr-322-1776338584
phantom5099 Apr 16, 2026
50eb6d9
fix: 修复 IPC 解析失败分支的并发写竞争、容量统计未剔除过期项导致的误判和兜底 Session 选择顺序退化的不稳定问题
pionxe Apr 16, 2026
e71cf8d
Merge pull request #320 from pionxe/feat/gateway-epic-gw-05-session-s…
phantom5099 Apr 16, 2026
26fc9d4
fix(multimodal): redact transcript image identifiers and tighten memo…
xgopilot Apr 16, 2026
7383f19
fix(provider): prevent rollback data loss and utf8 truncation
xgopilot Apr 16, 2026
738ed47
Merge pull request #24 from phantom5099/fork-pr-322-1776338584
phantom5099 Apr 16, 2026
a154b10
fix(multimodal): preserve blocked input and validate blank image url
xgopilot Apr 16, 2026
88414d5
Merge pull request #25 from phantom5099/fork-pr-322-1776345239
phantom5099 Apr 16, 2026
b6982f2
Merge pull request #319 from creatang/codex/issue-266-header-render-fix
phantom5099 Apr 16, 2026
d27da6a
Merge branch 'main' into main
phantom5099 Apr 16, 2026
e3271a9
修复错误
phantom5099 Apr 16, 2026
75d670f
feat:引入CapabilityToken模型与权限引擎拦截
Cai-Tang-www Apr 16, 2026
52ecf3e
feat:工具管理器接入capability验签与审计
Cai-Tang-www Apr 16, 2026
80f8acd
feat:runtime透传子代理capability上下文到工具调用
Cai-Tang-www Apr 16, 2026
0f17022
feat:子代理支持路径能力并默认绑定任务工作区
Cai-Tang-www Apr 16, 2026
5b7a8c0
test(pr322): fix tui compile break and increase multimodal coverage
xgopilot Apr 16, 2026
8ac26e4
Merge pull request #26 from phantom5099/fork-pr-322-1776345239
phantom5099 Apr 16, 2026
3cb534c
Merge pull request #322 from phantom5099/main
phantom5099 Apr 16, 2026
6a9ddb5
fix(capability): close review gaps and add coverage
xgopilot Apr 16, 2026
852f0b2
Merge pull request #15 from Cai-Tang-www/fork-pr-326-1776346817
Cai-Tang-www Apr 16, 2026
ab0fd8e
Change repository from pionxe to 1024XEngineer
pionxe Apr 16, 2026
b24ef94
Update repository name in install script
pionxe Apr 16, 2026
c9ee292
Merge pull request #328 from pionxe/main
pionxe Apr 16, 2026
d4c032a
Rename project from 'neo-code' to 'neocode'
pionxe Apr 16, 2026
b944837
Rename PROJECT_NAME to 'neocode'
pionxe Apr 16, 2026
e480e64
feat(context): 微压缩引入按工具差异化的重要性感知摘要
wynxing Apr 16, 2026
00d72ba
pref(session): 会话目录化与 `session_asset` 发送链路落地
phantom5099 Apr 16, 2026
39a3c33
fix(session/provider/config): address review comments and raise coverage
xgopilot Apr 16, 2026
193f7b6
merge(main): resolve conflicts for PR #329
xgopilot Apr 16, 2026
741abd6
chore: fix gofmt issues causing CI conflict
xgopilot Apr 16, 2026
bad8bba
refactor(context/tools): simplify summarizer wiring and tests
xgopilot Apr 16, 2026
97d7211
feat(gateway): [EPIC-GW-06] 引入统一配置引擎与双轨观测指标
pionxe Apr 16, 2026
4f7ed64
test(coverage): 补齐 session 与 session_asset 关键异常分支测试
xgopilot Apr 16, 2026
5c3fd70
feat(gateway): [EPIC-GW-06] 实现 Default Deny 控制面 ACL 与静默认证机制
pionxe Apr 16, 2026
e297dee
feat(gateway): [EPIC-GW-06] 贯通鉴权与观测端点的网络面拦截
pionxe Apr 16, 2026
c75192d
docs(gateway): [EPIC-GW-06] 补齐详细设计文档并完成 CLI 组装
pionxe Apr 16, 2026
9c02579
chore(deps): [EPIC-GW-06] 更新项目依赖 (Prometheus SDK)
pionxe Apr 16, 2026
b8a796e
merge: resolve conflicts with origin/main for runtime capability inte…
xgopilot Apr 16, 2026
7d55ed5
fix: Metrics 开关失效与实例不一致的问题、封堵 URL Query 带来的 Token 泄漏风险、修复 ACL Mode 配置…
pionxe Apr 16, 2026
e1f2250
fix(context): harden micro-compact summarization and simplify flow
xgopilot Apr 17, 2026
c275a9c
test(gateway): extend coverage for config and auth/network helpers
xgopilot Apr 17, 2026
f3f3274
fix(gateway): enforce HTTP auth boundaries and strict gateway config …
xgopilot Apr 17, 2026
47cf4bc
test(context/tools): cover summarizer and manager edge branches
xgopilot Apr 17, 2026
507d14d
test(ci): raise patch gate and expand coverage for gateway changes
xgopilot Apr 17, 2026
75e4f1e
Merge pull request #17 from Cai-Tang-www/fork-pr-326-1776346817
Cai-Tang-www Apr 17, 2026
2273281
Adjust target coverage for PR new code
pionxe Apr 17, 2026
54bf046
fix(context): optimize micro compact summarizer paths and sanitize pr…
xgopilot Apr 17, 2026
1689255
feat(context): 微压缩引入按工具差异化的重要性感知摘要
wynxing Apr 16, 2026
2b9b945
merge: 解决 micro compact summarizer 功能的合并冲突
wynxing Apr 17, 2026
c0fb92e
test: boost coverage for capability and permission helpers
xgopilot Apr 17, 2026
35956b8
fix(context/tools): harden summary boundary and sanitize metadata
xgopilot Apr 17, 2026
b22e8e7
Merge pull request #18 from Cai-Tang-www/fork-pr-326-1776393352
Cai-Tang-www Apr 17, 2026
4f1873a
fix(context/tools): resolve unresolved simplify review items
xgopilot Apr 17, 2026
f0cfbe4
Merge pull request #18 from Yumiue/fork-pr-329-1776397383
wynxing Apr 17, 2026
62453cb
fix(security): harden capability isolation checks
xgopilot Apr 17, 2026
7927d2d
Merge pull request #19 from Cai-Tang-www/fork-pr-326-1776393352
Cai-Tang-www Apr 17, 2026
48043eb
fix(session,provider): add asset total budget, safe temp writes, and …
xgopilot Apr 17, 2026
5803c17
test(coverage): 补齐 session/session_asset 关键分支覆盖
xgopilot Apr 17, 2026
c2e9cca
Merge pull request #326 from Cai-Tang-www/feat(subagent)
phantom5099 Apr 17, 2026
ee095ef
Merge pull request #330 from phantom5099/main
phantom5099 Apr 17, 2026
4de12bd
merge: resolve conflicts with origin/main
xgopilot Apr 17, 2026
6fbf88b
fix(gateway): [EPIC-GW-06] 修复深度安全审计指出的高危漏洞与配置回归
pionxe Apr 17, 2026
cc5931a
fix(gateway): close auth gaps and simplify frame validation
xgopilot Apr 17, 2026
5000973
Merge pull request #331 from pionxe/feat/gateway-epic-gw-06-ops-secur…
phantom5099 Apr 17, 2026
f35e922
feat(subagent): 实现任务上下文切片与结构化结果契约
Cai-Tang-www Apr 17, 2026
6b46bdf
feat(TUI):增加图片输入入口
phantom5099 Apr 17, 2026
bbea126
Merge pull request #329 from Yumiue/main
phantom5099 Apr 17, 2026
20a5312
fix(tui,session,config): address review findings and add regression c…
xgopilot Apr 17, 2026
96d340b
refactor(runtime,tools): remove max-loop residue and harden permissio…
xgopilot Apr 17, 2026
5d5e51c
Merge pull request #27 from phantom5099/fork-pr-337-1776410957
phantom5099 Apr 17, 2026
56fb8c9
fix(runtime/session/tui): harden multimodal input safety and event is…
xgopilot Apr 17, 2026
523114e
fix(subagent): enforce descriptor rebuild contracts and trim context …
xgopilot Apr 17, 2026
6d9f3e8
Merge pull request #28 from phantom5099/fork-pr-337-1776410957
phantom5099 Apr 17, 2026
33d39a7
fix(webfetch): validate target IP on actual dial path
xgopilot Apr 17, 2026
acbaa19
Merge branch 'main' into xgopilot/issue-334-1776410758
phantom5099 Apr 17, 2026
dd7e3b9
test(coverage): 补充多模态输入与事件分支测试
xgopilot Apr 17, 2026
f6a8117
test(tools): 修复 manager_test 编译错误
xgopilot Apr 17, 2026
a2d685e
Merge pull request #29 from phantom5099/fork-pr-337-1776410957
phantom5099 Apr 17, 2026
ca909c6
fix(webfetch): remove unsafe bypass API and add dial fallback
xgopilot Apr 17, 2026
613182b
Merge pull request #338 from 1024XEngineer/xgopilot/issue-334-1776410758
phantom5099 Apr 17, 2026
ac5d75c
fix(subagent): resolve six review risks in context slice
xgopilot Apr 17, 2026
07e26c0
feat(cli): 支持应用启动静默检测新版本与平滑自动升级
pionxe Apr 17, 2026
dfa0299
fix(subagent): enforce descriptor related-files filtering and hard bu…
xgopilot Apr 17, 2026
2b90cf9
fix: resolve residual multimodal/session/provider review risks
xgopilot Apr 17, 2026
fedb351
Merge pull request #335 from Cai-Tang-www/feat(subagent)
pionxe Apr 17, 2026
4edc502
fix(cli): 修复自动更新并发冲突、终端注入风险及网络阻塞问题
pionxe Apr 17, 2026
fbc5f8a
test: improve updater and workspace coverage
xgopilot Apr 17, 2026
07f999c
fix(runtime/session/config): avoid prepare-event deadlock and improve…
xgopilot Apr 17, 2026
100ad8a
Merge branch 'fork-pr-337-1776410957' of https://github.com/phantom50…
xgopilot Apr 17, 2026
74f3248
refactor(session): migrate persistence to sqlite
wynxing Apr 17, 2026
a7e61a1
Merge pull request #30 from phantom5099/fork-pr-337-1776410957
phantom5099 Apr 17, 2026
6c0338a
fix(cli): harden update notice/output and simplify logic
xgopilot Apr 17, 2026
e814384
fix(session): make sqlite init retryable and harden symlink boundary …
xgopilot Apr 17, 2026
6a6e7eb
Merge pull request #340 from pionxe/main
phantom5099 Apr 17, 2026
f259ac8
test(session): add branch coverage for sqlite persistence helpers
xgopilot Apr 17, 2026
2bda024
chore(deps): resolve main merge conflicts in go modules
xgopilot Apr 17, 2026
4d49d5e
Merge pull request #337 from phantom5099/main
phantom5099 Apr 17, 2026
66ec304
merge: resolve conflicts with origin/main for sqlite persistence PR
xgopilot Apr 17, 2026
db79122
Merge pull request #19 from Yumiue/fork-pr-343-1776427778
wynxing Apr 17, 2026
9bb0ba4
fix:修复在运行中不可切换会话避免会话丢失
wynxing Apr 17, 2026
a642a54
fix:Prepare 阶段的 workdir 持久化从“整包回写会话头”改成“只更新 workdir + updated_at
wynxing Apr 17, 2026
e009864
Merge pull request #343 from Yumiue/refactor/sqlite-persistence
phantom5099 Apr 17, 2026
8a031a0
feat(tui): add demo todo panel and remove obsolete slash commands
creatang Apr 17, 2026
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
2 changes: 1 addition & 1 deletion .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ coverage:
target: 80% # 告诉裁判:整体覆盖率 80% 就给我亮绿灯
patch:
default:
target: 80% # 告诉裁判:这次 PR 新增的代码覆盖率达到 80% 也给我亮绿灯
target: 80% # 告诉裁判:这次 PR 新增的代码覆盖率达到 95% 才给我亮绿灯
3 changes: 2 additions & 1 deletion .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ before:
builds:
- env:
- CGO_ENABLED=0 # 禁用 CGO,确保生成纯静态链接的二进制文件
ldflags:
- -s -w -X 'neo-code/internal/version.Version={{.Version}}'
goos:
- linux
- windows
Expand Down Expand Up @@ -46,4 +48,3 @@ changelog:
exclude:
- '^docs:'
- '^test:'

22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ go run ./cmd/neocode --workdir /path/to/workspace
- [Context Compact 说明](docs/context-compact.md)
- [Tools 与 TUI 集成](docs/tools-and-tui-integration.md)
- [MCP 配置指南](docs/guides/mcp-configuration.md)
- [更新与升级](docs/guides/update.md)

## 如何参与

Expand All @@ -171,6 +172,27 @@ go run ./cmd/neocode --workdir /path/to/workspace
- 不提交明文密钥、个人配置或会话数据
- 不提交无关改动与临时文件

## 网关运维与安全(GW-06)

- 静默认证(Silent Auth):
- 启动 `neocode gateway` 时会自动读取 `~/.neocode/auth.json`。
- 若凭证不存在或损坏,会自动生成高强度 token 并写回该文件。
- `url-dispatch` 会自动读取同一 token 并先发送 `gateway.authenticate`,再发送业务请求。
- 认证与授权顺序:`Auth -> ACL -> Dispatch`。
- 未认证返回 `unauthorized`。
- 已认证但不允许的方法返回 `access_denied`。
- 运维端点:
- 免鉴权:`GET /healthz`、`GET /version`
- 需鉴权:`GET /metrics`、`GET /metrics.json`(`Authorization: Bearer <token>`)
- 关键默认治理参数(可通过 `config.yaml` 的 `gateway.*` 配置):
- `max_frame_bytes=1MiB`
- `ipc_max_connections=128`
- `http_max_request_bytes=1MiB`
- `http_max_stream_connections=128`
- `ipc_read/write_sec=30/30`
- `http_read/write/shutdown_sec=15/15/2`
- 详细设计文档:[`docs/gateway-detailed-design.md`](docs/gateway-detailed-design.md)

## License

MIT
3 changes: 3 additions & 0 deletions cmd/neocode/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,7 @@ func main() {
fmt.Fprintf(os.Stderr, "neocode: %v\n", err)
os.Exit(1)
}
if notice := cli.ConsumeUpdateNotice(); notice != "" {
fmt.Fprintln(os.Stdout, notice)
}
}
204 changes: 204 additions & 0 deletions docs/gateway-detailed-design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,204 @@
# Gateway 详细设计(EPIC-GW-06)

## 1. 目标与边界

Gateway 是 NeoCode 的协议与路由中枢,职责是:

- 生命周期管理(IPC + HTTP/WS/SSE 并行启动、优雅关闭)
- 协议归一化(外层 JSON-RPC 2.0,内层 `gateway.MessageFrame`)
- 鉴权与 ACL(`Auth -> ACL -> Dispatch`)
- 会话流式中继(session/run/channel 精准投递)

Gateway **不承载业务逻辑**,不会做模型推理、工具编排与 Provider 选择。业务执行仅由 Runtime 决定。

## 2. 架构图(含进程边界)

```mermaid
flowchart LR
subgraph ClientProcess["客户端进程边界"]
CLI["CLI / TUI"]
WEB["Web / Desktop UI"]
EXT["External Adapter\nURL Scheme / Clipboard"]
end

subgraph GatewayProcess["Gateway 进程边界"]
IPC["IPC Listener\nUDS / Named Pipe"]
NET["HTTP/WS/SSE Listener"]
AUTH["Auth + ACL"]
NORM["JSON-RPC -> MessageFrame\nNormalize"]
ROUTER["Dispatch + Stream Relay"]
OPS["Health / Version / Metrics"]
end

subgraph RuntimeProcess["Runtime 进程边界"]
RT["RuntimePort\n编排与事件流"]
TOOLS["Tools"]
PROVIDER["Provider Adapter"]
end

subgraph CloudBoundary["云端边界"]
CLOUD["Cloud LLM API"]
end

CLI --> IPC
WEB --> NET
EXT --> IPC
EXT --> NET

IPC --> AUTH
NET --> AUTH
AUTH --> NORM
NORM --> ROUTER
ROUTER --> RT
ROUTER --> OPS

RT --> TOOLS
RT --> PROVIDER
PROVIDER --> CLOUD
```

## 3. 核心时序图

### 3.1 本地控制面链路(Client -> Gateway -> Runtime -> Client)

```mermaid
sequenceDiagram
box rgb(238, 246, 255) 客户端进程
participant C as "Client (CLI/WS/SSE)"
end
box rgb(241, 255, 241) Gateway 进程
participant G as "Gateway Listener"
participant A as "Auth + ACL"
participant D as "Normalize + Dispatch"
participant R as "Stream Relay"
end
box rgb(255, 249, 238) Runtime 进程
participant RT as "RuntimePort"
end

C->>G: JSON-RPC request
G->>A: 校验 Token / ACL
A-->>G: allow
G->>D: Normalize(JSON-RPC -> MessageFrame)
D->>RT: RuntimePort 调用(无业务改写)
RT-->>D: 结果 / 事件
D->>R: MessageFrame(event/ack/error)
R-->>C: JSON-RPC response/notification
```

### 3.2 云端调用链路(Runtime -> Provider -> Cloud API)

```mermaid
sequenceDiagram
box rgb(238, 246, 255) 客户端进程
participant C as "Client"
end
box rgb(241, 255, 241) Gateway 进程
participant G as "Gateway"
end
box rgb(255, 249, 238) Runtime 进程
participant RT as "Runtime"
participant P as "Provider Adapter"
end
box rgb(255, 240, 245) 云端边界
participant LLM as "Cloud LLM API"
end

C->>G: gateway.run / wake.openUrl
G->>RT: 透传规范化请求
RT->>P: 选择并调用 Provider
P->>LLM: HTTP API
LLM-->>P: streaming/result
P-->>RT: 统一 Provider 结果
RT-->>G: runtime events
G-->>C: gateway.event / result
```

## 4. 数据流向(本地端与云端区别)

- 本地控制面:
- 客户端只与 Gateway 通信(IPC/HTTP/WS/SSE)。
- Gateway 负责协议、连接、鉴权、路由与中继。
- 本地控制面不直接触达云端。
- 云端调用:
- 仅 Runtime 与 Provider 层触达 Cloud API。
- Gateway 不感知模型厂商细节,不拼接 Provider 私有字段。

## 5. 对外接口清单

### 5.1 面向客户端接口

| 接口 | 方向 | 认证 | 说明 |
|---|---|---|---|
| IPC (UDS / Named Pipe) | Client -> Gateway | `gateway.authenticate` 握手后复用 | 本地控制面主入口 |
| `POST /rpc` | Client -> Gateway | `Authorization: Bearer <token>` | 单次 JSON-RPC 请求 |
| `GET /ws` | Client <-> Gateway | `gateway.authenticate` 握手后复用 | 双向流式请求与通知 |
| `GET /sse` | Client <- Gateway | `?token=<token>` | 单向流式通知与心跳 |
| `GET /healthz` | Client -> Gateway | 无 | 健康检查 |
| `GET /version` | Client -> Gateway | 无 | 版本信息 |
| `GET /metrics` | Client -> Gateway | Bearer Token | Prometheus 指标 |
| `GET /metrics.json` | Client -> Gateway | Bearer Token | JSON 指标快照 |

### 5.2 JSON-RPC 方法

| Method | 方向 | 说明 |
|---|---|---|
| `gateway.authenticate` | request/response | 连接级鉴权,成功后复用认证态 |
| `gateway.ping` | request/response | 健康探针 |
| `gateway.bindStream` | request/response | 会话流绑定 |
| `wake.openUrl` | request/response | URL Scheme 唤醒入口 |
| `gateway.event` | notification | Gateway 推送运行时事件 |

### 5.3 面向 Runtime 接口(`RuntimePort`)

| 方法 | 说明 |
|---|---|
| `Run(ctx, input)` | 发起一次运行编排 |
| `Compact(ctx, input)` | 执行会话压缩 |
| `ResolvePermission(ctx, input)` | 回填权限审批结果 |
| `CancelActiveRun()` | 取消活动运行 |
| `Events()` | 订阅运行时事件流 |
| `ListSessions(ctx)` | 获取会话摘要 |
| `LoadSession(ctx, id)` | 加载会话详情 |

## 6. 安全与治理基线

### 6.1 Silent Auth

- Token 文件:`~/.neocode/auth.json`
- 启动网关时自动加载;缺失或损坏自动重建
- 文件结构:`version`, `token`, `created_at`, `updated_at`

### 6.2 ACL 与错误模型

- 执行顺序:`Auth -> ACL -> Dispatch`
- 错误返回统一:
- JSON-RPC:`error.code`
- Gateway 稳定码:`error.data.gateway_code`
- 关键稳定码:`unauthorized`, `access_denied`, `invalid_frame`, `unsupported_action`

### 6.3 默认治理参数

| 配置项 | 默认值 |
|---|---|
| `gateway.limits.max_frame_bytes` | `1048576` |
| `gateway.limits.ipc_max_connections` | `128` |
| `gateway.limits.http_max_request_bytes` | `1048576` |
| `gateway.limits.http_max_stream_connections` | `128` |
| `gateway.timeouts.ipc_read_sec` | `30` |
| `gateway.timeouts.ipc_write_sec` | `30` |
| `gateway.timeouts.http_read_sec` | `15` |
| `gateway.timeouts.http_write_sec` | `15` |
| `gateway.timeouts.http_shutdown_sec` | `2` |
| `gateway.observability.metrics_enabled` | `true` |

## 7. 配置优先级

- `flags > config.yaml > default constants`
- 当前支持通过 `~/.neocode/config.yaml` 的 `gateway.*` 段配置治理参数。

## 8. 非目标(本期)

- 不新增 Provider/Tools 业务能力
- 不引入外网公开监听与 TLS
- 不在 Gateway 内实现 Runtime 业务决策
26 changes: 26 additions & 0 deletions docs/guides/update.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# 更新与升级

## 自动检测

- `neocode` 启动时会在后台静默检测最新版本(默认 3 秒超时)。
- 为避免干扰 Bubble Tea TUI 交互,更新提示会在应用退出、终端屏幕恢复后输出。
- `url-dispatch` 与 `update` 子命令会跳过该检测流程。

## 手动升级

使用以下命令升级到最新稳定版:

```bash
neocode update
```

如需包含预发布版本:

```bash
neocode update --prerelease
```

## 版本来源

- 发布构建会通过 `ldflags` 注入版本号到 `internal/version.Version`。
- 本地开发构建默认版本为 `dev`。
Loading
Loading