Skip to content

Commit 1d32334

Browse files
author
Test
committed
Merge develop into global memory defaults and preserve terminal settings
2 parents 02c25cd + cf36379 commit 1d32334

564 files changed

Lines changed: 43981 additions & 5090 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.env.example‎

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,15 @@ OCTOP_PORT=8088
88
OCTOP_LOG_LEVEL=info
99
OCTOP_BIND_HOST=0.0.0.0
1010

11-
# Docker Compose only: host directory bind-mounted to /data/.octop
12-
# OCTOP_DATA=~/.octop
11+
# Optional memory service. For a shared ingress, forward /mcp/ to Memory,
12+
# keep its admin API private, and advertise the dashboard origin to MCP clients.
13+
# OCTOP_MEMORY_SERVICE_URL=http://127.0.0.1:8790
14+
# OCTOP_MEMORY_SAME_ORIGIN=1
15+
16+
# Docker Compose only: host directory bind-mounted to /data/.octop.
17+
# Leave unset to keep the historical default (the invoking user's ~/.octop).
18+
# Set an absolute path only when the data dir should move.
19+
# OCTOP_DATA=
1320

1421
# Docker first-run bootstrap (only used when ~/.octop/octop.db is absent)
1522
# Password must be ≥8 chars with letters and digits (same policy as change-password).
@@ -56,6 +63,18 @@ LANGFUSE_PUBLIC_KEY=
5663
LANGFUSE_SECRET_KEY=
5764
LANGFUSE_BASE_URL=
5865

66+
# Tencent Cloud CLS / AgentObs observability (optional env-var fallback).
67+
# Prefer configuring in Dashboard → Settings → Advanced → Observability (supports
68+
# encrypted SecretId/SecretKey storage, auto-creating CLS apps via CreateAgentApplication,
69+
# or binding an existing Topic ID). Restart after changing env vars.
70+
# OCTOP_AGENTOBS_ENABLED=true
71+
# CLS_DEFAULT_REGION=ap-guangzhou
72+
# CLS_TOPIC_ID=
73+
# CLS_ACCESS_TYPE=Langfuse
74+
# TENCENTCLOUD_SECRET_ID=
75+
# TENCENTCLOUD_SECRET_KEY=
76+
# TENCENTCLOUD_TOKEN= # Optional, required only for STS credentials
77+
5978
# ---------------------------------------------------------------------------
6079
# Live integration tests (tests/live/*): REAL credentials.
6180
#

‎.gitattributes‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Shell scripts run in Linux images, fnOS packages and the curl installers.
2+
# Keep LF on every checkout so a Windows clone with core.autocrlf=true
3+
# does not build images whose scripts fail with "/bin/sh^M".
4+
*.sh text eol=lf
5+
fnos/*/cmd/* text eol=lf
6+
# Extensionless launchers packaged into the native fnOS FPK.
7+
fnos/native/app/bin/* text eol=lf
8+
# Git hooks run through sh, including Git for Windows.
9+
.githooks/* text eol=lf

‎.github/pull_request_template.md‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,4 @@
2525

2626
## Checklist
2727

28-
- [ ] Updated `CHANGELOG.md` (if user-facing)
2928
- [ ] README / docs updated (if needed)

‎.github/workflows/ci.yml‎

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,89 @@ jobs:
4141
- name: Test
4242
run: make test
4343

44+
dashboard:
45+
name: Dashboard
46+
runs-on: ubuntu-latest
47+
if: ${{ !startsWith(github.head_ref, 'chore/sync-develop-after-') }}
48+
defaults:
49+
run:
50+
working-directory: dashboard
51+
steps:
52+
- uses: actions/checkout@v4
53+
54+
- uses: actions/setup-node@v5
55+
with:
56+
# Same Node as deploy/docker/Dockerfile and release.yml.
57+
node-version: "20"
58+
cache: npm
59+
cache-dependency-path: dashboard/package-lock.json
60+
61+
- name: Install dependencies
62+
run: npm ci
63+
64+
- name: Type check
65+
run: npx tsc -b
66+
67+
- name: Test
68+
run: npm test
69+
70+
# `make install` follows uv.lock. A merged PR can still fail
71+
# `pip install octop` when dependency ranges resolve differently in a clean
72+
# environment. Build the wheel, install it with pip, and verify the
73+
# published console command from an empty environment.
74+
command-install:
75+
name: Command install (${{ matrix.os }})
76+
runs-on: ${{ matrix.os }}
77+
if: ${{ !startsWith(github.head_ref, 'chore/sync-develop-after-') }}
78+
strategy:
79+
fail-fast: false
80+
matrix:
81+
os: [ubuntu-latest, windows-latest]
82+
steps:
83+
- uses: actions/checkout@v4
84+
85+
- uses: astral-sh/setup-uv@v4
86+
with:
87+
python-version: "3.12"
88+
89+
- name: Build wheel
90+
run: uv build --wheel
91+
92+
- name: Install the wheel with pip (Linux)
93+
if: runner.os == 'Linux'
94+
run: |
95+
set -euo pipefail
96+
uv venv --no-project --python 3.12 --seed /tmp/octop-install
97+
wheels=(dist/octop-*.whl)
98+
if [ "${#wheels[@]}" -ne 1 ]; then
99+
echo "expected one wheel, found: ${wheels[*]}"
100+
exit 1
101+
fi
102+
/tmp/octop-install/bin/python -m pip install --upgrade pip
103+
/tmp/octop-install/bin/python -m pip install "${wheels[0]}"
104+
105+
- name: Install the wheel with pip (Windows)
106+
if: runner.os == 'Windows'
107+
shell: pwsh
108+
run: |
109+
$ErrorActionPreference = "Stop"
110+
uv venv --no-project --python 3.12 --seed .octop-install
111+
$wheels = @(Get-ChildItem -Path dist -Filter "octop-*.whl")
112+
if ($wheels.Count -ne 1) {
113+
throw "expected one wheel, found: $($wheels.Name -join ', ')"
114+
}
115+
.\.octop-install\Scripts\python.exe -m pip install --upgrade pip
116+
.\.octop-install\Scripts\python.exe -m pip install $wheels[0].FullName
117+
118+
- name: Verify the installed command (Linux)
119+
if: runner.os == 'Linux'
120+
run: /tmp/octop-install/bin/octop --help
121+
122+
- name: Verify the installed command (Windows)
123+
if: runner.os == 'Windows'
124+
shell: pwsh
125+
run: .\.octop-install\Scripts\octop.exe --help
126+
44127
helm:
45128
name: Helm chart
46129
runs-on: ubuntu-latest

‎CHANGELOG.md‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,46 @@
11
# Changelog
22

3+
## Unreleased
4+
5+
- 修复插件安装失败时错误正文泄漏到界面:普通请求、上传及安装 SSE 统一保留结构化错误与翻译,非 JSON 响应仅展示 HTTP 状态与请求编号,错误读取限制为 16 KiB / 2 秒。
6+
- 插件下载、解压和依赖安装移至后台,注册和运行时刷新保留在事件循环;加入下载超时、大小及总时间预算,同插件并发冲突和取消保护,更新失败恢复旧文件与注册,禁用插件更新后保持禁用。
7+
8+
39
本文件记录项目的所有重要变更。
410

511
格式遵循 [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),版本号遵循 [语义化版本规范](https://semver.org/spec/v2.0.0.html)。
612

713
## [Unreleased]
814

915
### 新增
16+
- 新增 `octop db doctor` 与 `octop db recover` 离线诊断修复命令,可扫描 `OCTOP_HOME` 下所有 SQLite 库执行完整性检查,并在备份后通过 `sqlite3 .recover` / Python 回退或重置修复损坏库(#2998)。
17+
- 可观测设置新增腾讯云 CLS(AgentObs)接入:支持填写腾讯云 SecretId / SecretKey 通过 Langfuse SDK(OTLP/HTTP Basic Auth)直接上报 Trace,支持自动调用 `CreateAgentApplication` 创建/复用 CLS 应用获取 Topic ID,也支持拉取或直接填写已有应用的 Topic ID,并提供内网接入点、内容脱敏及连通性校验。
18+
- 知识库设置新增「分块与检索」标签页,可配置分块大小、分块重叠、默认检索条数和上下文字符预算。
19+
- 用户管理支持创建限次邀请链接。链接在注册满员后自动停用,管理员也可以提前停用并查看已注册的用户。邀请管理 API 移除了 `used_at`、`used_by_user_id` 和 `revoked_at`,可通过注册记录和邀请状态查看使用情况。
20+
- 自托管可用环境变量放行内网出站目标:`OCTOP_SSRF_ALLOWLIST`(主机名、`.后缀` 或 CIDR)让语音服务、OAuth MCP 发现与令牌请求等指向内网服务,`OCTOP_SSRF_ALLOW_HTTP` 允许这些目标走 http;仍做 DNS 解析并固定连接 IP 防重绑定,不配置时行为不变(#2016)
1021
- 定时任务新增脚本类型,可执行 Python、Bash 或 PowerShell。脚本可以写在任务里,也可以选择专家工作区中的脚本文件;有可执行沙箱时在沙箱里跑,否则在服务器上跑,标准输出会推进会话。
1122
- 智能体定时任务可以打开「放通所有」。只作用于这一次运行,不改变对话里已保存的审批设置。原生专家放通除提问外的工具;托管专家使用无人值守模式。
23+
- 对话页新增独立 Git 面板:查看工作区改动与单文件 diff、暂存/取消暂存/丢弃、用当前模型生成提交信息、提交或提交并推送,以及带 merge 图、提交者与 OpenPGP 签名状态的提交历史。Git 在宿主机或 Docker 工作区内就地执行,并支持自定义 git 路径。
24+
- 每轮对话记录本轮写入过的文件;回合卡片可以打开本轮 diff,并在文件未被后续改动时撤销本轮写入。
1225
- 备份与恢复支持以「存储管理」中的 WebDAV / 腾讯云 COS / S3 后端作为备份目标;占用中的备份目标不可删除或改类型。远端路径由存储后端高级配置里的 `base_dir`(S3/COS 亦可用 `prefix`)决定:归档文件直接落在该目录下,不会再自动拼接固定子路径,也不会自动创建目录——请先在远端建好 `base_dir` 再选用。列表、创建、恢复、自动备份与保留清理都只作用于所选后端的该 `base_dir`。多副本部署时,每台 Octop 应使用各自的 `base_dir`(或不同后端),避免共用同一目录导致互写、互删;单机用一个 `base_dir` 即可。选远端时本地备份目录仅作缓存。
1326
- 会话可以生成只读分享链接。打开后能看到对话、思考和工具调用;用 localhost 或 127.0.0.1 打开时不提供分享
1427
- ACP 协作新增内置 Qwen Code Runner(`qwen --acp`),含主机探测、安装脚本与托管专家会话模式
28+
- 新增内置 Gitea 连接器:填写自建实例地址与个人访问令牌(按用户加密保存)后,智能体可浏览仓库、查询 Issue 与评论、查看 PR、读取文件并发表评论。
1529

1630
### 修复
31+
- 修复 SQLite 损坏时的报错与恢复闭环:`format_stream_error` 不再将 `database disk image is malformed` 误显示为「模型调用失败」;`memory/storage/restore` 支持恢复已损坏的 `memory.sqlite` 并识别自动裁剪备份 `memory.sqlite.pre-prune.bak`;为控制面与知识库 SQLite 补齐 `busy_timeout` / WAL 及关机 checkpoint,并延长飞牛原生 FPK 停服等待时间且在 btrfs 首次建目录时尝试 `chattr +C`(#2998)。
32+
- 删除 Dashboard 默认会话后,绑定该会话的定时任务会在下次运行时自动重建会话。
33+
- 修复模型把一个 emoji 拆到多个流式分片时,重新打开对话可能看不到历史的问题。
34+
- Dashboard 对话报错:以 HTTP 429 / 403 返回的余额不足与欠费(OpenAI `insufficient_quota`、智谱 1113、Moonshot、Anthropic、硅基流动、火山方舟)不再提示「被限流,请稍后重试」,改为提示充值;DashScope 借用额度文案的 TPM/RPM 限流仍按限流提示
35+
- 向量模型页可识别对话提供商中启用的 BGE 等向量模型。知识库的在线 Embedding 和 Rerank 分别列出可用模型,并复用已有提供商配置。
36+
- 个性化页只展示和编辑当前用户自己的专家:新账号未创建专家时不再显示其他用户共享专家的技能、工具与记忆,改为引导创建专家(Fixes #1097)
1737
- 修复 PostgreSQL 控制面凭证在配置保存重载时被重复编码的问题,并保留用户名和密码中的空格。
1838

1939
## [1.0.3b7] - 2026-11-17
2040

2141
### 新增
42+
- 共享记忆接入独立的 octop-memory 1.0.7 服务。面板按空间管理终端凭据,安装时在终端隐藏输入 Token。Codex 可以跟随聊天模型提取,也可在面板选择 HY4 等模型并应用到终端,分别查看终端回执和实际运行结果。
43+
- 工作台「云服务器」页的地域筛选器改为控制台风格下拉面板:按大区分组展示各地域并标注节点数量,只有有节点的地域才显示红点,同时记住最近访问的地域
2244
- 托管专家可选会话模式,并能使用连接器、知识库、专家回调和已启用的插件
2345
- 云服务器页的地域筛选改为按大区分组的下拉面板
2446

@@ -36,6 +58,8 @@
3658
## [1.0.3b6] - 2026-11-15
3759

3860
### 新增
61+
- 专家市场默认打开「精选」,用书签标出接入市场前随安装包提供的 22 个专家模板
62+
- 通道卡片与 `/api/health` 展示每个通道的入站、出站、重连和丢弃计数;记忆存储页显示 checkpoint 保留窗口与 VACUUM 提示
3963
- 支持 Helm 集群部署。多实例共用一个 PostgreSQL
4064
- 管理员可以限制创建专家时能选的存储后端
4165
- 新增托管专家,对话可以交给后端 Agent,如 OpenCode

‎CONTRIBUTING.md‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@ hotfix/* ──PR──► main (+ tag) and ──PR──► develop
6161
2. Open the PR with base **`develop`** (not `main`, unless it is a release or hotfix)
6262
3. Add or update tests for behavior changes — CI runs on **Linux and Windows**; follow the cross-platform rules in [AGENTS.md](AGENTS.md) §7 (prefer `tmp_path` / `pathlib`, `fake_bin_path` for mocked binaries, `posix_only` for Unix-only cases)
6363
4. Ensure `make install-hooks` is enabled locally; run `make all` (backend) or `make check-all` (full stack) before submitting — pre-commit enforces the same gate
64-
5. Update `CHANGELOG.md` when user-facing behavior changes
65-
6. Open a PR with a clear description and test plan
64+
5. Open a PR with a clear description and test plan
6665

6766
See [AGENTS.md](AGENTS.md) for module boundaries and coding conventions.
6867

@@ -149,7 +148,7 @@ When using AI-assisted coding, **make sure both sides understand the same thing*
149148
150149
## Releases
151150

152-
1. Cut `release/x.y.z` from latest `develop` (version bump + CHANGELOG on that branch)
151+
1. Cut `release/x.y.z` from latest `develop` (version bump on that branch)
153152
2. Open PR: `release/x.y.z` → `main` and merge when green
154153
3. Tag `v<version>` on **main tip** and push — GitHub Actions builds, publishes to PyPI, and creates the GitHub Release
155154
4. Delete `release/x.y.z`; Actions syncs `main` → `develop` (or opens `chore/sync-develop-after-*` if merge conflicts / branch protection)
@@ -207,8 +206,7 @@ make check-all # 全栈质量门禁
207206
2. PR 的 base 选 **`develop`**(release / hotfix 除外)
208207
3. 补充测试(CI 同时跑 **Linux / Windows**,路径与假二进制遵循 [AGENTS.md](AGENTS.md) §7)
209208
4. 本地执行过 `make install-hooks`;提交前 `make all` 或 `make check-all` 必须绿(hooks 会强制执行)
210-
5. 用户可见变更时更新 `CHANGELOG.md`
211-
6. 提交 Pull Request
209+
5. 提交 Pull Request
212210

213211
模块边界与编码规范见 [AGENTS.md](AGENTS.md)。
214212

@@ -299,7 +297,7 @@ make check-all # 全栈质量门禁
299297
300298
## 发版
301299

302-
1. 从最新 `develop` 切 `release/x.y.z`(在该分支 bump 版本与 CHANGELOG)
300+
1. 从最新 `develop` 切 `release/x.y.z`(在该分支 bump 版本)
303301
2. PR:`release/x.y.z` → `main`,合并通过后
304302
3. 在 **main tip** 打并推送 `v<version>`,由 Actions 构建并发布
305303
4. 删除 `release/x.y.z`;Actions 自动 sync `main` → `develop`(冲突或分支保护时会开 `chore/sync-develop-after-*` PR)

‎Makefile‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ help:
4949
@echo " publish-test Build + upload to TestPyPI"
5050
@echo ""
5151
@echo "Development targets:"
52-
@echo " dev Start frontend + backend dev servers"
52+
@echo " dev Start frontend + backend with auto-reload"
5353
@echo " dev-frontend Start Vite dev server only"
54-
@echo " dev-backend Start octop run only"
54+
@echo " dev-backend Start backend with auto-reload"
5555
@echo ""
5656
@echo "Online-deps targets (local Octop source + PyPI harness components):"
5757
@echo " install-online Create .venv-online: Octop editable + harness-* from PyPI"
@@ -156,12 +156,14 @@ publish-test:
156156

157157
# ─── Development ─────────────────────────────────────────────────────────────
158158

159+
DEV_BACKEND := $(RUN) watchfiles --filter python "octop run" src/octop
160+
159161
.PHONY: dev
160162
dev:
161163
@echo "[dev] Starting frontend and backend dev servers (Ctrl-C to stop both)..."
162164
@trap 'kill 0' SIGINT; \
163165
(cd $(DASHBOARD_DIR) && npm run dev) & \
164-
($(RUN) octop run) & \
166+
($(DEV_BACKEND)) & \
165167
wait
166168

167169
.PHONY: dev-frontend
@@ -170,7 +172,7 @@ dev-frontend:
170172

171173
.PHONY: dev-backend
172174
dev-backend:
173-
$(RUN) octop run
175+
$(DEV_BACKEND)
174176

175177
# ─── Online-deps dev (local Octop source + PyPI harness components) ───────────
176178
# Keeps a dedicated .venv-online alongside .venv. Octop itself is installed

0 commit comments

Comments
 (0)