homeagent-runner 0.4.19 → 0.4.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +38 -0
- package/README.md +5 -4
- package/README.zh-CN.md +5 -4
- package/dist/runner/context.js +11 -1
- package/dist/runner/memory.js +169 -0
- package/dist/runner/tools.js +36 -7
- package/dist/shared/protocol.js +1 -1
- package/dist/shared/tools.js +13 -1
- package/docs/ARCHITECTURE.md +1 -1
- package/docs/ARCHITECTURE.zh-CN.md +1 -1
- package/docs/CLIENTS.md +1 -1
- package/docs/CLIENTS.zh-CN.md +1 -1
- package/docs/COMPARISON.md +1 -1
- package/docs/COMPARISON.zh-CN.md +1 -1
- package/docs/DEPLOYMENT.md +1 -1
- package/docs/DEPLOYMENT.zh-CN.md +1 -1
- package/docs/OPEN_SOURCE.md +8 -8
- package/docs/OPEN_SOURCE.zh-CN.md +8 -8
- package/docs/TOOLS.md +86 -1
- package/docs/TOOLS.zh-CN.md +71 -1
- package/docs/VALIDATION.md +2 -2
- package/docs/VALIDATION.zh-CN.md +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,43 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.21 — Web project Kanban and validated drag-and-drop
|
|
4
|
+
|
|
5
|
+
- Add a Project Kanban console view with four status columns, a list view, project,
|
|
6
|
+
device and client filters, file-path search, paginated history and mobile layouts.
|
|
7
|
+
Create and edit tasks, add comments, and inspect delivery evidence and activity in
|
|
8
|
+
a task detail drawer without leaving the board.
|
|
9
|
+
- Support dragging cards between valid states, with equivalent keyboard/mobile
|
|
10
|
+
controls. Assignment checks current client/device/project grants; submission,
|
|
11
|
+
approval, skipped review, release, rejection and reopening require the appropriate
|
|
12
|
+
input or confirmation. These actions do not run commands, wake AI clients or commit Git.
|
|
13
|
+
- Protect administrator task mutations with session/CSRF checks, audited actions,
|
|
14
|
+
explicit state transitions and optimistic task revisions. Preserve drafts on
|
|
15
|
+
concurrent updates and keep browser polling/comments from renewing worker leases.
|
|
16
|
+
- Track advisory review staleness after confirmed built-in file mutations, expose
|
|
17
|
+
bounded evidence/history totals, and distinguish client-reported evidence from
|
|
18
|
+
independent verification. Preserve loaded history and form focus during refreshes.
|
|
19
|
+
- Add API, authorization, pagination, transition and UI-model regressions; document
|
|
20
|
+
the Web workflow in English and Simplified Chinese.
|
|
21
|
+
|
|
22
|
+
## 0.4.20 — Project memory and authorized Kanban coordination
|
|
23
|
+
|
|
24
|
+
- Add six server-side Kanban tools for task creation, claiming, progress updates,
|
|
25
|
+
review submission and completion, with device/project-scoped OAuth and PAT checks.
|
|
26
|
+
Offline access still requires an authorized, non-revoked, non-paused device;
|
|
27
|
+
claiming resolves an unambiguous device rather than recording an empty assignee.
|
|
28
|
+
- Renew 30-minute task leases from the assigned worker's device/project activity,
|
|
29
|
+
record successful non-preview file mutations in `actualPaths`, and attach advisory
|
|
30
|
+
warnings when file tools touch paths awaiting review without changing their receipts.
|
|
31
|
+
- Add optional local project charters and glob-matched pitfall hints to project context
|
|
32
|
+
and single/batch file tools. Discover the workspace through an environment override,
|
|
33
|
+
a sibling `workspace.json`, or the default local workspace directory.
|
|
34
|
+
- Harden memory reads against invalid project IDs, traversal, Windows path aliases,
|
|
35
|
+
symlinks/junctions, hard links and malformed indexes; bound reads and preserve UTF-8
|
|
36
|
+
boundaries with accurate byte-based charter truncation metadata.
|
|
37
|
+
- Normalize Windows and relative paths for memory matching and Kanban path tracking;
|
|
38
|
+
expand the MCP catalog to 51 tools and add authorization, lease, receipt, memory
|
|
39
|
+
boundary and cross-platform regression coverage.
|
|
40
|
+
|
|
3
41
|
## 0.4.19 — XAuth OIDC administrator login and sole-administrator binding
|
|
4
42
|
|
|
5
43
|
- Add optional self-hosted [XAuth](https://github.com/jhxxr/XAuth) OIDC administrator
|
package/README.md
CHANGED
|
@@ -60,7 +60,7 @@ flowchart TB
|
|
|
60
60
|
|
|
61
61
|
- **Protocol Compatibility**: Built on the official MCP SDK v2 (`Streamable HTTP` at `/mcp`), supporting both `2026-07-28` discovery/envelopes and `2025` legacy protocol clients.
|
|
62
62
|
- **Authentication**: Supports Web Dashboard sign-in via admin password or [XAuth](https://github.com/jhxxr/XAuth) OIDC (binding the first XAuth account as the sole administrator), plus OAuth 2.1 authorization-code flow with `S256` PKCE, scoped Personal Access Tokens (`Bearer`), and one-time browser or pairing-code device enrollment.
|
|
63
|
-
- **Release Scope**: Current release **v0.4.
|
|
63
|
+
- **Release Scope**: Current release **v0.4.21** supports a single administrator and multiple devices/projects. Persistent interactive PTY shells, detached jobs surviving runner replacement, automatic worktree registration, and preview tunnels are intentionally out of scope.
|
|
64
64
|
|
|
65
65
|
## Interface Preview
|
|
66
66
|
|
|
@@ -116,7 +116,7 @@ Follow this sequence: **1. Deploy the Server → 2. Pair a Runner → 3. Connect
|
|
|
116
116
|
Requires Docker Engine, Docker Compose v2, and Git. Point your domain's DNS record to the server and open inbound TCP ports `80` and `443`. Replace `mcp.example.com` below with your own domain:
|
|
117
117
|
|
|
118
118
|
```sh
|
|
119
|
-
git clone --branch v0.4.
|
|
119
|
+
git clone --branch v0.4.21 --depth 1 https://github.com/jhxxr/HomeAgent.git
|
|
120
120
|
cd HomeAgent
|
|
121
121
|
|
|
122
122
|
# Generate random ADMIN_PASSWORD and SESSION_SECRET in .env without installing Node.js on the host
|
|
@@ -189,7 +189,7 @@ homeagent
|
|
|
189
189
|
|
|
190
190
|
- **OAuth 2.1**: Point your MCP client to `https://mcp.example.com/mcp` and approve the requested device, project, and scope permissions in your browser.
|
|
191
191
|
- **Personal Access Token (`Bearer`)**: Issue a scoped token (`read`, `write`, `execute`, `git`) in the Dashboard and configure your client with `Authorization: Bearer <token>`.
|
|
192
|
-
- **Version Alignment**: Keep `homeagent-server` and `homeagent-runner` on the same release (`v0.4.
|
|
192
|
+
- **Version Alignment**: Keep `homeagent-server` and `homeagent-runner` on the same release (`v0.4.21`). Check versions anytime with `homeagent-server --version`, `homeagent --version`, or in the Dashboard header.
|
|
193
193
|
- **Client Guides**: See [Connecting AI Clients](docs/CLIENTS.md) for step-by-step instructions across Claude, ChatGPT, Cursor, and the MCP SDK.
|
|
194
194
|
|
|
195
195
|
## AI Prompting Guide
|
|
@@ -263,7 +263,7 @@ Need a collaborator or teammate's AI agent to help debug a machine without givin
|
|
|
263
263
|
|
|
264
264
|
## MCP Tools
|
|
265
265
|
|
|
266
|
-
###
|
|
266
|
+
### 51 Built-In Tools
|
|
267
267
|
|
|
268
268
|
| Category | Tools |
|
|
269
269
|
| --- | --- |
|
|
@@ -271,6 +271,7 @@ Need a collaborator or teammate's AI agent to help debug a machine without givin
|
|
|
271
271
|
| **Files & Code Editing** | `list_directory`, `read_file`, `read_files`, `write_file`, `create_directory`, `move_file`, `get_file_info`, `search_files`, `edit_block`, `edit_files`, `apply_unified_diff`, `get_edit_transactions`, `recover_edit_transaction` |
|
|
272
272
|
| **LSP & Code Intelligence** | `lsp_document_symbols`, `lsp_workspace_symbols`, `lsp_definition`, `lsp_references`, `lsp_hover`, `lsp_diagnostics` |
|
|
273
273
|
| **Processes & Persistent Shells** | `start_process`, `run_command`, `wait_process`, `read_process_output`, `tail_process_output`, `write_process_input`, `list_processes`, `stop_process`, `start_shell`, `run_shell`, `list_shells`, `stop_shell` |
|
|
274
|
+
| **Project Kanban** | `kanban_list_tasks`, `kanban_create_task`, `kanban_claim_task`, `kanban_update_task`, `kanban_submit_review`, `kanban_complete_task` |
|
|
274
275
|
| **Git Workflow** | `git_status`, `git_diff`, `git_log`, `git_add`, `git_commit`, `git_commit_paths`, `git_branches`, `git_switch_branch`, `git_fetch`, `git_pull`, `git_push` |
|
|
275
276
|
|
|
276
277
|
Every machine tool targets an explicit `projectId` (and requires `deviceId` whenever multiple authorized devices are online). Processes are tracked by job UUIDs owned by the initiating client principal and project—never arbitrary OS PIDs—and supervised via Linux process groups or Windows Job Objects. See [Development Workflow](docs/DEVELOPMENT_WORKFLOW.md) and [Tool Reference](docs/TOOLS.md).
|
package/README.zh-CN.md
CHANGED
|
@@ -60,7 +60,7 @@ flowchart TB
|
|
|
60
60
|
|
|
61
61
|
- **协议兼容**:基于 MCP 官方 SDK v2 实现 Streamable HTTP(`/mcp`),同时支持 `2026-07-28` 发现与信封规范及 `2025` 协议兼容。
|
|
62
62
|
- **认证体系**:控制台支持管理员密码与 [XAuth](https://github.com/jhxxr/XAuth) OIDC 登录(首个登录的 XAuth 账号自动绑定为唯一管理员);客户端支持带 `S256` PKCE 的 OAuth 2.1 授权码流程、按范围受限的 Bearer 令牌(PAT),以及浏览器/配对码一次性设备绑定。
|
|
63
|
-
- **版本边界**:当前版本 **v0.4.
|
|
63
|
+
- **版本边界**:当前版本 **v0.4.21** 支持单管理员、多设备与多项目。持久交互式 PTY 终端、跨 Runner 重启保留脱离进程、自动 worktree 注册及预览隧道不在当前实现范围内。
|
|
64
64
|
|
|
65
65
|
## 界面预览
|
|
66
66
|
|
|
@@ -116,7 +116,7 @@ Server 与 Runner 拆分为两个独立的 npm 包,分别安装在中继服务
|
|
|
116
116
|
准备 Docker Engine、Docker Compose v2 和 Git,将域名解析到服务器并放行 TCP `80` / `443` 端口。将下方示例中的 `mcp.example.com` 替换为你的域名:
|
|
117
117
|
|
|
118
118
|
```sh
|
|
119
|
-
git clone --branch v0.4.
|
|
119
|
+
git clone --branch v0.4.21 --depth 1 https://github.com/jhxxr/HomeAgent.git
|
|
120
120
|
cd HomeAgent
|
|
121
121
|
|
|
122
122
|
# 使用容器生成随机密码和会话密钥,无需在宿主机安装 Node.js
|
|
@@ -189,7 +189,7 @@ homeagent
|
|
|
189
189
|
|
|
190
190
|
- **OAuth 2.1 连接**:在 MCP 客户端填入 `https://mcp.example.com/mcp`,在弹出的浏览器页面中勾选允许访问的设备、项目与权限范围。
|
|
191
191
|
- **Bearer 令牌(PAT)连接**:在控制台为已配对设备签发指定 `read / write / execute / git` 范围的客户端令牌,并以 `Authorization: Bearer <token>` 方式接入。
|
|
192
|
-
- **版本一致性**:升级时请保持 `homeagent-server` 与 `homeagent-runner` 版本一致(`v0.4.
|
|
192
|
+
- **版本一致性**:升级时请保持 `homeagent-server` 与 `homeagent-runner` 版本一致(`v0.4.21`),可通过 `homeagent-server --version`、`homeagent --version` 或控制台顶部查看。
|
|
193
193
|
- **客户端配置详情**:各客户端完整接入步骤见 [AI 客户端连接指南](docs/CLIENTS.zh-CN.md)。
|
|
194
194
|
|
|
195
195
|
## AI 远程开发教程与提示词模板
|
|
@@ -263,7 +263,7 @@ homeagent
|
|
|
263
263
|
|
|
264
264
|
## MCP 工具
|
|
265
265
|
|
|
266
|
-
###
|
|
266
|
+
### 51 个已实现工具
|
|
267
267
|
|
|
268
268
|
| 类别 | 工具列表 |
|
|
269
269
|
| --- | --- |
|
|
@@ -271,6 +271,7 @@ homeagent
|
|
|
271
271
|
| **文件与代码编辑** | `list_directory`, `read_file`, `read_files`, `write_file`, `create_directory`, `move_file`, `get_file_info`, `search_files`, `edit_block`, `edit_files`, `apply_unified_diff`, `get_edit_transactions`, `recover_edit_transaction` |
|
|
272
272
|
| **LSP 与代码智能** | `lsp_document_symbols`, `lsp_workspace_symbols`, `lsp_definition`, `lsp_references`, `lsp_hover`, `lsp_diagnostics` |
|
|
273
273
|
| **进程与持久终端** | `start_process`, `run_command`, `wait_process`, `read_process_output`, `tail_process_output`, `write_process_input`, `list_processes`, `stop_process`, `start_shell`, `run_shell`, `list_shells`, `stop_shell` |
|
|
274
|
+
| **项目看板** | `kanban_list_tasks`, `kanban_create_task`, `kanban_claim_task`, `kanban_update_task`, `kanban_submit_review`, `kanban_complete_task` |
|
|
274
275
|
| **Git 工作流** | `git_status`, `git_diff`, `git_log`, `git_add`, `git_commit`, `git_commit_paths`, `git_branches`, `git_switch_branch`, `git_fetch`, `git_pull`, `git_push` |
|
|
275
276
|
|
|
276
277
|
所有机器工具均通过 `projectId` 指定项目(当多台已授权设备同时在线时还须指定 `deviceId`)。进程采用由启动客户端主体和项目共同拥有的任务 UUID(不接受任意系统 PID),并通过 Linux 进程组或 Windows Job Object 管理子孙进程。详见 [日常开发工作流](docs/DEVELOPMENT_WORKFLOW.zh-CN.md) 与 [工具参考](docs/TOOLS.zh-CN.md)。
|
package/dist/runner/context.js
CHANGED
|
@@ -9,11 +9,13 @@ export class Context {
|
|
|
9
9
|
files;
|
|
10
10
|
git;
|
|
11
11
|
processes;
|
|
12
|
-
|
|
12
|
+
memory;
|
|
13
|
+
constructor(config, files, git, processes, memory) {
|
|
13
14
|
this.config = config;
|
|
14
15
|
this.files = files;
|
|
15
16
|
this.git = git;
|
|
16
17
|
this.processes = processes;
|
|
18
|
+
this.memory = memory;
|
|
17
19
|
}
|
|
18
20
|
noteFile(project, owner) { return path.join(this.config.stateDir, 'notes', `${sha256(JSON.stringify([project.root, project.id, owner]))}.json`); }
|
|
19
21
|
async executableAvailable(executable) {
|
|
@@ -59,6 +61,14 @@ export class Context {
|
|
|
59
61
|
}
|
|
60
62
|
catch { }
|
|
61
63
|
}
|
|
64
|
+
if (includeInstructions && this.memory) {
|
|
65
|
+
try {
|
|
66
|
+
const charter = await this.memory.charter(project.id);
|
|
67
|
+
if (charter)
|
|
68
|
+
instructions.push({ path: 'memory/charter.md', text: charter.text, truncated: charter.truncated, trust: 'project_guidance_only' });
|
|
69
|
+
}
|
|
70
|
+
catch { /* Memory is advisory; failures never block context retrieval. */ }
|
|
71
|
+
}
|
|
62
72
|
let git;
|
|
63
73
|
try {
|
|
64
74
|
git = await this.git.invoke(project, 'git_branches', {}, signal);
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { accessSync, constants } from 'node:fs';
|
|
2
|
+
import { lstat, open, realpath } from 'node:fs/promises';
|
|
3
|
+
import { StringDecoder } from 'node:string_decoder';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
import os from 'node:os';
|
|
6
|
+
import { inside } from './config.js';
|
|
7
|
+
const MAX_CHARTER_BYTES = 8192;
|
|
8
|
+
const MAX_HINT_BYTES = 4096;
|
|
9
|
+
const MAX_HINTS = 3;
|
|
10
|
+
const SEVERITY_ORDER = { critical: 0, warning: 1, info: 2 };
|
|
11
|
+
export function resolveWorkspacePath(configDir) {
|
|
12
|
+
if (process.env.HOMEAGENT_WORKSPACE)
|
|
13
|
+
return path.resolve(process.env.HOMEAGENT_WORKSPACE);
|
|
14
|
+
if (configDir) {
|
|
15
|
+
const candidate = path.join(configDir, 'workspace.json');
|
|
16
|
+
try {
|
|
17
|
+
accessSync(candidate);
|
|
18
|
+
return configDir;
|
|
19
|
+
}
|
|
20
|
+
catch { }
|
|
21
|
+
}
|
|
22
|
+
return path.join(os.homedir(), '.homeagent', 'workspace');
|
|
23
|
+
}
|
|
24
|
+
function safeFilename(value) {
|
|
25
|
+
return !!value && value !== '.' && value !== '..' && !/[<>:"/\\|?*\x00-\x1f]/.test(value)
|
|
26
|
+
&& !/[. ]$/.test(value) && !/^(con|prn|aux|nul|com[1-9]|lpt[1-9])(?:\.|$)/i.test(value);
|
|
27
|
+
}
|
|
28
|
+
// Streaming decoding leaves an incomplete final UTF-8 sequence buffered rather than emitting U+FFFD.
|
|
29
|
+
const utf8Prefix = (buffer, limit) => buffer.length > limit
|
|
30
|
+
? new StringDecoder('utf8').write(buffer.subarray(0, limit)) : buffer.toString('utf8');
|
|
31
|
+
export class Memory {
|
|
32
|
+
workspacePath;
|
|
33
|
+
indexCache = new Map();
|
|
34
|
+
constructor(workspacePath) {
|
|
35
|
+
this.workspacePath = workspacePath;
|
|
36
|
+
}
|
|
37
|
+
memoryDir(projectId) {
|
|
38
|
+
if (!/^[a-zA-Z0-9_-]{1,64}$/.test(projectId) || !safeFilename(projectId))
|
|
39
|
+
throw new Error('Invalid memory project ID');
|
|
40
|
+
return path.join(this.workspacePath, 'memory', projectId);
|
|
41
|
+
}
|
|
42
|
+
/** The configured workspace is trusted; no link underneath it may redirect memory reads. */
|
|
43
|
+
async checkedPath(projectId, parts) {
|
|
44
|
+
this.memoryDir(projectId); // Validate before constructing any filesystem path.
|
|
45
|
+
if (!parts.every(safeFilename))
|
|
46
|
+
throw new Error('Invalid memory filename');
|
|
47
|
+
const root = await realpath(this.workspacePath);
|
|
48
|
+
let current = root;
|
|
49
|
+
const components = ['memory', projectId, ...parts];
|
|
50
|
+
for (const [index, part] of components.entries()) {
|
|
51
|
+
current = path.join(current, part);
|
|
52
|
+
if (!inside(root, current))
|
|
53
|
+
throw new Error('Memory path escape');
|
|
54
|
+
const entry = await lstat(current);
|
|
55
|
+
if (entry.isSymbolicLink() || (index < components.length - 1 ? !entry.isDirectory() : !entry.isFile() || entry.nlink !== 1))
|
|
56
|
+
throw new Error('Unsafe memory file');
|
|
57
|
+
if (!inside(root, await realpath(current)))
|
|
58
|
+
throw new Error('Resolved memory path escape');
|
|
59
|
+
}
|
|
60
|
+
return current;
|
|
61
|
+
}
|
|
62
|
+
async readMemoryFile(projectId, parts, limit) {
|
|
63
|
+
const filename = await this.checkedPath(projectId, parts);
|
|
64
|
+
const handle = await open(filename, constants.O_RDONLY | (constants.O_NOFOLLOW ?? 0));
|
|
65
|
+
try {
|
|
66
|
+
const opened = await handle.stat();
|
|
67
|
+
if (!opened.isFile() || opened.nlink !== 1)
|
|
68
|
+
throw new Error('Unsafe memory file');
|
|
69
|
+
const checked = await lstat(await this.checkedPath(projectId, parts));
|
|
70
|
+
if (opened.dev !== checked.dev || opened.ino !== checked.ino)
|
|
71
|
+
throw new Error('Memory file changed');
|
|
72
|
+
const buffer = Buffer.alloc(limit + 1);
|
|
73
|
+
let size = 0;
|
|
74
|
+
while (size < buffer.length) {
|
|
75
|
+
const { bytesRead } = await handle.read(buffer, size, buffer.length - size, size);
|
|
76
|
+
if (!bytesRead)
|
|
77
|
+
break;
|
|
78
|
+
size += bytesRead;
|
|
79
|
+
}
|
|
80
|
+
return buffer.subarray(0, size);
|
|
81
|
+
}
|
|
82
|
+
finally {
|
|
83
|
+
await handle.close();
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
async charter(projectId) {
|
|
87
|
+
try {
|
|
88
|
+
const buffer = await this.readMemoryFile(projectId, ['charter.md'], MAX_CHARTER_BYTES);
|
|
89
|
+
const truncated = buffer.byteLength > MAX_CHARTER_BYTES;
|
|
90
|
+
const text = utf8Prefix(buffer, MAX_CHARTER_BYTES);
|
|
91
|
+
return text ? { text, truncated } : null;
|
|
92
|
+
}
|
|
93
|
+
catch {
|
|
94
|
+
return null;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
async loadIndex(projectId) {
|
|
98
|
+
try {
|
|
99
|
+
const filename = await this.checkedPath(projectId, ['pitfalls', '_index.json']);
|
|
100
|
+
const s = await lstat(filename);
|
|
101
|
+
const cached = this.indexCache.get(projectId);
|
|
102
|
+
if (cached && cached.mtimeMs === s.mtimeMs)
|
|
103
|
+
return cached.entries;
|
|
104
|
+
const buffer = await this.readMemoryFile(projectId, ['pitfalls', '_index.json'], 262144);
|
|
105
|
+
if (buffer.length > 262144)
|
|
106
|
+
return {};
|
|
107
|
+
const raw = JSON.parse(buffer.toString('utf8'));
|
|
108
|
+
if (!raw || typeof raw !== 'object' || Array.isArray(raw))
|
|
109
|
+
return {};
|
|
110
|
+
const entries = Object.create(null);
|
|
111
|
+
for (const [file, value] of Object.entries(raw)) {
|
|
112
|
+
if (!safeFilename(file) || !value || typeof value !== 'object' || Array.isArray(value))
|
|
113
|
+
continue;
|
|
114
|
+
const v = value;
|
|
115
|
+
if (!Array.isArray(v.globs) || !v.globs.every(g => typeof g === 'string'))
|
|
116
|
+
continue;
|
|
117
|
+
entries[file] = {
|
|
118
|
+
globs: v.globs,
|
|
119
|
+
severity: (['critical', 'warning', 'info'].includes(v.severity) ? v.severity : 'info'),
|
|
120
|
+
source: typeof v.source === 'string' ? v.source : '',
|
|
121
|
+
created: typeof v.created === 'string' ? v.created : undefined,
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
this.indexCache.set(projectId, { mtimeMs: s.mtimeMs, entries });
|
|
125
|
+
return entries;
|
|
126
|
+
}
|
|
127
|
+
catch {
|
|
128
|
+
return {};
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
async match(projectId, paths) {
|
|
132
|
+
if (!paths.length)
|
|
133
|
+
return [];
|
|
134
|
+
const index = await this.loadIndex(projectId);
|
|
135
|
+
const normalized = paths.map(p => path.posix.normalize(p.replaceAll('\\', '/')).replace(/^\.\//, ''));
|
|
136
|
+
const hits = [];
|
|
137
|
+
for (const [file, entry] of Object.entries(index)) {
|
|
138
|
+
const matched = normalized.filter(p => entry.globs.some(g => path.posix.matchesGlob(p, g)));
|
|
139
|
+
if (matched.length)
|
|
140
|
+
hits.push({ file, entry, matchedPaths: matched });
|
|
141
|
+
}
|
|
142
|
+
hits.sort((a, b) => (SEVERITY_ORDER[a.entry.severity] ?? 2) - (SEVERITY_ORDER[b.entry.severity] ?? 2));
|
|
143
|
+
const results = [];
|
|
144
|
+
let totalBytes = 0;
|
|
145
|
+
for (const hit of hits) {
|
|
146
|
+
if (results.length >= MAX_HINTS)
|
|
147
|
+
break;
|
|
148
|
+
try {
|
|
149
|
+
const remaining = MAX_HINT_BYTES - totalBytes;
|
|
150
|
+
if (remaining <= 0)
|
|
151
|
+
break;
|
|
152
|
+
const buffer = await this.readMemoryFile(projectId, ['pitfalls', hit.file], remaining);
|
|
153
|
+
const content = utf8Prefix(buffer, remaining);
|
|
154
|
+
totalBytes += Buffer.byteLength(content);
|
|
155
|
+
const prefix = hit.entry.severity === 'critical' ? '⚠️' : '💡';
|
|
156
|
+
results.push({
|
|
157
|
+
file: hit.file,
|
|
158
|
+
severity: hit.entry.severity,
|
|
159
|
+
source: hit.entry.source,
|
|
160
|
+
content: `${prefix} [${hit.entry.severity} · 来源: ${hit.entry.source}]\n${content}`,
|
|
161
|
+
matchedPaths: hit.matchedPaths,
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
catch { /* Missing memory file — skip silently. */ }
|
|
165
|
+
}
|
|
166
|
+
return results;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
//# sourceMappingURL=memory.js.map
|
package/dist/runner/tools.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
1
2
|
import { AppError, errorText, result } from '../shared/protocol.js';
|
|
2
3
|
import { toolSchemas, toolScope } from '../shared/tools.js';
|
|
3
4
|
import { Policy } from './policy.js';
|
|
@@ -9,6 +10,7 @@ import { Context } from './context.js';
|
|
|
9
10
|
import { parseUnifiedDiff } from './patch.js';
|
|
10
11
|
import { Shells } from './shells.js';
|
|
11
12
|
import { Lsp } from './lsp.js';
|
|
13
|
+
import { Memory, resolveWorkspacePath } from './memory.js';
|
|
12
14
|
/** Serialize each project's mutations so expected hashes and moves are meaningful across concurrent clients. */
|
|
13
15
|
export class Tools {
|
|
14
16
|
deviceId;
|
|
@@ -21,6 +23,7 @@ export class Tools {
|
|
|
21
23
|
context;
|
|
22
24
|
shells;
|
|
23
25
|
lsp;
|
|
26
|
+
memory;
|
|
24
27
|
locks = new Map();
|
|
25
28
|
constructor(config, deviceId, consent) {
|
|
26
29
|
this.deviceId = deviceId;
|
|
@@ -30,7 +33,9 @@ export class Tools {
|
|
|
30
33
|
this.processes = new Processes(config, this.policy);
|
|
31
34
|
this.git = new Git(this.policy);
|
|
32
35
|
this.editor = new Editor(config, this.files);
|
|
33
|
-
|
|
36
|
+
const configDir = config.stateDir ? path.dirname(config.stateDir) : undefined;
|
|
37
|
+
this.memory = new Memory(resolveWorkspacePath(configDir));
|
|
38
|
+
this.context = new Context(config, this.files, this.git, this.processes, this.memory);
|
|
34
39
|
this.shells = new Shells(this.policy, this.processes);
|
|
35
40
|
this.lsp = new Lsp(this.policy, this.files, this.git);
|
|
36
41
|
}
|
|
@@ -64,21 +69,40 @@ export class Tools {
|
|
|
64
69
|
switch (tool) {
|
|
65
70
|
case 'get_project_context': return { ...await this.context.get(project, principal.id, toolSchemas.get_project_context.parse(args).includeInstructions, signal), grantedScopes: principal.scopes, executionPolicy, filesystemPolicy };
|
|
66
71
|
case 'save_project_note': return this.context.note(project, principal.id, toolSchemas.save_project_note.parse(args).text);
|
|
67
|
-
case 'read_files':
|
|
72
|
+
case 'read_files': {
|
|
73
|
+
const input = toolSchemas.read_files.parse(args);
|
|
74
|
+
const output = await this.files.readFiles(project, input);
|
|
75
|
+
const hints = await this.memory.match(project.id, input.files.map(f => f.path)).catch(() => []);
|
|
76
|
+
return hints.length ? { ...output, memoryHints: hints } : output;
|
|
77
|
+
}
|
|
68
78
|
case 'edit_files': {
|
|
69
79
|
const input = toolSchemas.edit_files.parse(args);
|
|
70
|
-
|
|
80
|
+
const output = await this.editor.edit(project, principal.id, input.changes, input.dryRun, signal);
|
|
81
|
+
const hints = await this.memory.match(project.id, input.changes.map(c => c.path)).catch(() => []);
|
|
82
|
+
return hints.length ? { ...output, memoryHints: hints } : output;
|
|
71
83
|
}
|
|
72
84
|
case 'apply_unified_diff': {
|
|
73
85
|
const input = toolSchemas.apply_unified_diff.parse(args);
|
|
74
86
|
const parsed = await parseUnifiedDiff(this.files, project, input.diff, input.expectedSha256, { fuzz: input.fuzz, ignoreWhitespace: input.ignoreWhitespace });
|
|
75
|
-
|
|
87
|
+
const output = { ...await this.editor.edit(project, principal.id, parsed, input.dryRun, signal), relocatedHunks: parsed.relocatedHunks };
|
|
88
|
+
const hints = await this.memory.match(project.id, Object.keys(input.expectedSha256)).catch(() => []);
|
|
89
|
+
return hints.length ? { ...output, memoryHints: hints } : output;
|
|
76
90
|
}
|
|
77
91
|
case 'get_edit_transactions': return this.editor.list(project, principal.id);
|
|
78
92
|
case 'recover_edit_transaction': return this.editor.recover(project, principal.id, toolSchemas.recover_edit_transaction.parse(args).transactionId);
|
|
79
93
|
case 'list_directory': return this.files.list(project, toolSchemas.list_directory.parse(args));
|
|
80
|
-
case 'read_file':
|
|
81
|
-
|
|
94
|
+
case 'read_file': {
|
|
95
|
+
const input = toolSchemas.read_file.parse(args);
|
|
96
|
+
const output = await this.files.read(project, input);
|
|
97
|
+
const hints = await this.memory.match(project.id, [input.path]).catch(() => []);
|
|
98
|
+
return hints.length ? { ...output, memoryHints: hints } : output;
|
|
99
|
+
}
|
|
100
|
+
case 'write_file': {
|
|
101
|
+
const input = toolSchemas.write_file.parse(args);
|
|
102
|
+
const output = await this.files.write(project, input);
|
|
103
|
+
const hints = await this.memory.match(project.id, [input.path]).catch(() => []);
|
|
104
|
+
return hints.length ? { ...output, memoryHints: hints } : output;
|
|
105
|
+
}
|
|
82
106
|
case 'create_directory': return this.files.mkdir(project, toolSchemas.create_directory.parse(args).path);
|
|
83
107
|
case 'move_file': {
|
|
84
108
|
const a = toolSchemas.move_file.parse(args);
|
|
@@ -98,7 +122,12 @@ export class Tools {
|
|
|
98
122
|
}
|
|
99
123
|
return this.files.search(project, input, signal, source);
|
|
100
124
|
}
|
|
101
|
-
case 'edit_block':
|
|
125
|
+
case 'edit_block': {
|
|
126
|
+
const input = toolSchemas.edit_block.parse(args);
|
|
127
|
+
const output = await this.files.edit(project, input);
|
|
128
|
+
const hints = await this.memory.match(project.id, [input.path]).catch(() => []);
|
|
129
|
+
return hints.length ? { ...output, memoryHints: hints } : output;
|
|
130
|
+
}
|
|
102
131
|
case 'get_file_info': return this.files.info(project, toolSchemas.get_file_info.parse(args).path);
|
|
103
132
|
case 'start_process': return this.processes.start(project, principal.id, toolSchemas.start_process.parse(args), signal, executionAuthorization);
|
|
104
133
|
case 'run_command': return this.processes.run(project, principal.id, toolSchemas.run_command.parse(args), signal, executionAuthorization);
|
package/dist/shared/protocol.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { remotePermissionsSchema } from './permissions.js';
|
|
3
3
|
import { assistContextSchema, assistDescriptorSchema, assistMultiDescriptorSchema, assistCleanupSchema, ASSIST_FEATURE, ASSIST_MULTI_FEATURE } from './assist.js';
|
|
4
|
-
export const VERSION = '0.4.
|
|
4
|
+
export const VERSION = '0.4.21';
|
|
5
5
|
export const RUNNER_PROTOCOL = 2;
|
|
6
6
|
export const MAX_FRAME = 2 * 1024 * 1024;
|
|
7
7
|
export const SCOPES = ['read', 'write', 'execute', 'git'];
|
package/dist/shared/tools.js
CHANGED
|
@@ -63,6 +63,12 @@ const schemas = {
|
|
|
63
63
|
git_fetch: z.object({ ...gitTarget, remote: z.string().min(1).max(128).default('origin'), branch: z.string().min(1).max(200).optional() }).strict(),
|
|
64
64
|
git_pull: z.object({ ...gitTarget, remote: z.string().min(1).max(128).default('origin'), branch: z.string().min(1).max(200).optional() }).strict(),
|
|
65
65
|
git_push: z.object({ ...gitTarget, remote: z.string().min(1).max(128).default('origin'), branch: z.string().min(1).max(200).optional() }).strict(),
|
|
66
|
+
kanban_list_tasks: z.object({ ...target, status: z.enum(['todo', 'in_progress', 'review', 'done']).optional() }).strict(),
|
|
67
|
+
kanban_create_task: z.object({ ...target, title: z.string().min(1).max(256), description: z.string().max(4096).default(''), targetPaths: z.array(z.string().max(512)).max(32).default([]), requiresReview: z.boolean().default(true) }).strict(),
|
|
68
|
+
kanban_claim_task: z.object({ ...target, taskId: z.string().min(1).max(32) }).strict(),
|
|
69
|
+
kanban_update_task: z.object({ ...target, taskId: z.string().min(1).max(32), actualPaths: z.array(z.string().max(512)).max(64).optional(), message: z.string().max(1024).optional() }).strict(),
|
|
70
|
+
kanban_submit_review: z.object({ ...target, taskId: z.string().min(1).max(32), proposedCommitMessage: z.string().min(1).max(512), aiSummary: z.string().max(2048).default(''), fileHashes: z.record(z.string(), z.string().regex(/^[a-f0-9]{64}$/)).default({}) }).strict(),
|
|
71
|
+
kanban_complete_task: z.object({ ...target, taskId: z.string().min(1).max(32), skipReview: z.boolean().default(false) }).strict(),
|
|
66
72
|
};
|
|
67
73
|
export const toolSchemas = schemas;
|
|
68
74
|
const descriptions = {
|
|
@@ -110,9 +116,15 @@ const descriptions = {
|
|
|
110
116
|
git_fetch: 'Fetch a named configured HTTPS/SSH remote without submodules. Requires owner-enabled Git writes and network access. Use repository to select a nested repository.',
|
|
111
117
|
git_pull: 'Fast-forward a clean repository from a named configured HTTPS/SSH remote; never rebase, merge divergent history or recurse into submodules. Requires Git network access.',
|
|
112
118
|
git_push: 'Push HEAD to one branch on a named configured HTTPS/SSH remote, without force, deletion or tags. Requires the owner to separately enable Git push.',
|
|
119
|
+
kanban_list_tasks: 'List project Kanban tasks, optionally filtered by status.',
|
|
120
|
+
kanban_create_task: 'Create a Kanban task with title, description, expected file paths and review requirement.',
|
|
121
|
+
kanban_claim_task: 'Claim a todo task, acquiring a 30-minute renewable lease. Returns conflict warnings if paths overlap with in-progress work.',
|
|
122
|
+
kanban_update_task: 'Update task progress: report actual modified paths or leave a message.',
|
|
123
|
+
kanban_submit_review: 'Submit completed work for review with a proposed commit message, AI summary, and file hashes for fingerprint protection.',
|
|
124
|
+
kanban_complete_task: 'Mark a task as done. Use skipReview to bypass the review stage.',
|
|
113
125
|
};
|
|
114
126
|
export function toolScope(name) {
|
|
115
|
-
if (['write_file', 'create_directory', 'move_file', 'edit_block', 'edit_files', 'apply_unified_diff', 'recover_edit_transaction', 'save_project_note'].includes(name))
|
|
127
|
+
if (['write_file', 'create_directory', 'move_file', 'edit_block', 'edit_files', 'apply_unified_diff', 'recover_edit_transaction', 'save_project_note', 'kanban_create_task', 'kanban_claim_task', 'kanban_update_task', 'kanban_submit_review', 'kanban_complete_task'].includes(name))
|
|
116
128
|
return 'write';
|
|
117
129
|
if (['start_process', 'run_command', 'write_process_input', 'stop_process', 'start_shell', 'run_shell', 'stop_shell'].includes(name))
|
|
118
130
|
return 'execute';
|
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**English** · [简体中文](ARCHITECTURE.zh-CN.md)
|
|
4
4
|
|
|
5
|
-
HomeAgent v0.4.
|
|
5
|
+
HomeAgent v0.4.21 builds on the v0.3 context/editor/output-log/patch foundation with a permission protocol, a Dashboard permission editor, controlled Git network tools, fuzzy unified diffs, persistent stateful shell sessions and lightweight LSP integration. The MCP catalogue now contains **51 tools** (50 Zod schemas in `src/shared/tools.ts` plus the separately defined `list_devices`). Device capability ceilings and client authorizations are stored separately; temporary grants expire and trigger job revocation. Execution semantics and persistence/recovery of the newer tools are covered in the [Development Workflow](DEVELOPMENT_WORKFLOW.md).
|
|
6
6
|
|
|
7
7
|
## Data Flow and Trust Boundaries
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[English](ARCHITECTURE.md) · **简体中文**
|
|
4
4
|
|
|
5
|
-
HomeAgent v0.4.
|
|
5
|
+
HomeAgent v0.4.21 在 v0.3 的 context/editor/output-log/patch 基础上,增加权限协议、Dashboard 权限编辑器、受控 Git 网络工具、统一 diff 模糊重定位、持久状态化 Shell 会话与轻量 LSP 集成。MCP 目录当前共 **51 个工具**(`src/shared/tools.ts` 中的 50 个 Zod schema,加上单独定义的 `list_devices`)。设备能力上限与客户端授权分层保存,临时授权可过期并触发任务收回。新增工具的执行语义和持久化恢复详见 [日常开发工作流](DEVELOPMENT_WORKFLOW.zh-CN.md)。
|
|
6
6
|
|
|
7
7
|
## 数据流与信任边界
|
|
8
8
|
|
package/docs/CLIENTS.md
CHANGED
|
@@ -16,7 +16,7 @@ Make sure the Runner is paired and online, the client can reach `https://mcp.exa
|
|
|
16
16
|
|
|
17
17
|
The following is kept as a historical troubleshooting record. In v0.3.0 the authorization form redirected directly to an external callback, which Chrome could block under `form-action 'self'`; the authorization request was already consumed, so a second click showed `Authorization request expired`. **The fix was to upgrade the Server to v0.3.1**: that version first shows an on-site completion page before returning to the registered client, retains strict CSP, and shows a submitting state on the button to prevent double submits.
|
|
18
18
|
|
|
19
|
-
After upgrading, restart the Server and start a fresh OAuth authorization from the AI client; do not refresh or re-submit the old tab. For npm deployments upgrade the `homeagent-server` package and restart the corresponding service; the Runner uses the separate `homeagent-runner` package and both should be upgraded to the same version. For Compose deployments check out `v0.4.
|
|
19
|
+
After upgrading, restart the Server and start a fresh OAuth authorization from the AI client; do not refresh or re-submit the old tab. For npm deployments upgrade the `homeagent-server` package and restart the corresponding service; the Runner uses the separate `homeagent-runner` package and both should be upgraded to the same version. For Compose deployments check out `v0.4.21`, rebuild and start again, keeping the original `.env` and data volume. A Runner v0.3.0 did not need upgrading for the OAuth callback fix; to use v0.4 Web permission management, both Server and Runner should be on v0.4.21.
|
|
20
20
|
|
|
21
21
|
If the completion page does not return automatically, click "Continue back to client". A used or expired authorization code is never re-issued; if the client is still not connected, create a new authorization request from the client. Device credentials and completed client authorizations are not proactively cleared by an upgrade.
|
|
22
22
|
|
package/docs/CLIENTS.zh-CN.md
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
以下保留为历史排错记录。v0.3.0 的授权表单直接重定向到外部回调,Chrome 可能按 `form-action 'self'` 拦截该跳转;授权请求却已被消费,第二次点击便显示 `Authorization request expired`。**修复方式是升级 Server 到 v0.3.1**:新版本先进入站内完成页,再返回已注册客户端,保留严格 CSP;按钮显示提交状态并防止重复提交。
|
|
18
18
|
|
|
19
|
-
升级后重启 Server,回到 AI 客户端重新发起 OAuth 授权,不要刷新或重复提交旧标签页。npm 部署升级 `homeagent-server` 包后重启对应服务;Runner 使用独立的 `homeagent-runner` 包,两者应升级到相同版本。Compose 部署检出 `v0.4.
|
|
19
|
+
升级后重启 Server,回到 AI 客户端重新发起 OAuth 授权,不要刷新或重复提交旧标签页。npm 部署升级 `homeagent-server` 包后重启对应服务;Runner 使用独立的 `homeagent-runner` 包,两者应升级到相同版本。Compose 部署检出 `v0.4.21` 后重新构建并启动,保留原 `.env` 和数据卷。Runner v0.3.0 不需要为 OAuth 回调修复升级;要使用 v0.4 的 Web 权限管理,则 Server 和 Runner 都应升级到 v0.4.21。
|
|
20
20
|
|
|
21
21
|
若完成页没有自动返回,点击"继续返回客户端"。已使用或过期的授权码不会被重新签发;客户端仍未连接时,从客户端新建一次授权请求。设备凭据及已完成的客户端授权不因升级被主动清空。
|
|
22
22
|
|
package/docs/COMPARISON.md
CHANGED
|
@@ -23,7 +23,7 @@ The `https://github.com/better-remote-commander` URL supplied by the user is not
|
|
|
23
23
|
| Project boundary | A richer system of projects, capability grants, and job lifecycle | Device routing + allowedDirectories + blockedCommands | Per-project independent root/readOnly/commands/Git write switch, re-validated locally |
|
|
24
24
|
| Long jobs | A fuller model of jobs, persistent shells, observation, and session resumption | start_process, output reads, process management | Persistent process metadata, bounded output files, cursor reads, stdin, whole-group termination, ownership checks |
|
|
25
25
|
| Operations footprint | More comprehensive, but with more complex components, builds, and native-install acceptance | SQLite, Compose, Dashboard, reverse proxy/tunnel, autostart | Single-node SQLite, Compose, native Runner, Caddy/Nginx, optional tunnel |
|
|
26
|
-
| Tool coverage | Emphasizes real project development workflows and reviewable work results | Desktop Commander's broader file, search, edit, terminal capabilities, plus non-core document features | Uses pragmatic tool names directly, covering the file/terminal/Git needs of this project; now
|
|
26
|
+
| Tool coverage | Emphasizes real project development workflows and reviewable work results | Desktop Commander's broader file, search, edit, terminal capabilities, plus non-core document features | Uses pragmatic tool names directly, covering the file/terminal/Git needs of this project; now 51 tools including fuzzy diffs, persistent shell sessions, and lightweight LSP, but still not full parity — no PDF/browser-download dependencies are introduced |
|
|
27
27
|
|
|
28
28
|
WebCodex's strengths are fairly complete context, lifecycle, and project governance for development tasks, suited to sustained running and review. The cost is a larger system with a wider native-build and platform-install surface; its README itself explicitly distinguishes install-delivery targets from real platform acceptance still to be done, so planned capabilities must not be treated as verified ones. HomeAgent absorbs project boundaries, proactive Runner connection, long-job observation, multi-device support, and auditing, but does not rebuild its Desktop, workflow sessions, or QUIC stack.
|
|
29
29
|
|
package/docs/COMPARISON.zh-CN.md
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
| 项目边界 | 项目、能力授权、任务生命周期体系更丰富 | 设备路由 + allowedDirectories + blockedCommands | 每项目独立 root/readOnly/commands/Git 写入开关,本地再次验证 |
|
|
24
24
|
| 长任务 | Job、持久 shell、观察与会话接续等完整模型 | start_process、读取输出、进程管理 | 持久进程元数据、限额输出文件、游标读取、stdin、整组终止、归属校验 |
|
|
25
25
|
| 运维形态 | 更全面,但组件、构建与原生安装验收更复杂 | SQLite、Compose、Dashboard、反代/隧道、自启动 | SQLite 单节点、Compose、原生 Runner、Caddy/Nginx、可选隧道 |
|
|
26
|
-
| 工具覆盖 | 强调真实项目开发流程与可审查工作结果 | Desktop Commander 的文件、搜索、编辑、终端能力更广,还含非核心文档功能 | 直接使用实用工具名,覆盖本需求文件/终端/Git;当前共
|
|
26
|
+
| 工具覆盖 | 强调真实项目开发流程与可审查工作结果 | Desktop Commander 的文件、搜索、编辑、终端能力更广,还含非核心文档功能 | 直接使用实用工具名,覆盖本需求文件/终端/Git;当前共 51 个工具,含模糊 diff、持久 Shell 会话与轻量 LSP,但仍非全量对等——不引入 PDF/浏览器下载依赖 |
|
|
27
27
|
|
|
28
28
|
WebCodex 的优势是开发任务的上下文、生命周期和项目治理比较完整,适合持续运行与审查。代价是系统规模更大,原生构建和平台安装面更广;其 README 本身也明确区分安装交付目标与尚待完成的真实平台验收,不能把计划能力当作已验证能力。HomeAgent 吸收项目边界、Runner 主动连接、长任务观察、多设备与审计,但不重建它的 Desktop、工作流会话和 QUIC 栈。
|
|
29
29
|
|
package/docs/DEPLOYMENT.md
CHANGED
|
@@ -97,7 +97,7 @@ To keep running after logout and to start at boot, an administrator should run `
|
|
|
97
97
|
Check out the release source on a server with Docker Engine, Compose v2 and Git:
|
|
98
98
|
|
|
99
99
|
```sh
|
|
100
|
-
git clone --branch v0.4.
|
|
100
|
+
git clone --branch v0.4.21 --depth 1 https://github.com/jhxxr/HomeAgent.git
|
|
101
101
|
cd HomeAgent
|
|
102
102
|
```
|
|
103
103
|
|
package/docs/DEPLOYMENT.zh-CN.md
CHANGED
|
@@ -97,7 +97,7 @@ journalctl --user -u homeagent-server -f
|
|
|
97
97
|
先在有 Docker Engine、Compose v2 和 Git 的服务器检出发布源码:
|
|
98
98
|
|
|
99
99
|
```sh
|
|
100
|
-
git clone --branch v0.4.
|
|
100
|
+
git clone --branch v0.4.21 --depth 1 https://github.com/jhxxr/HomeAgent.git
|
|
101
101
|
cd HomeAgent
|
|
102
102
|
```
|
|
103
103
|
|
package/docs/OPEN_SOURCE.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**English** · [简体中文](OPEN_SOURCE.zh-CN.md)
|
|
4
4
|
|
|
5
|
-
This repository releases its original source under the MIT License at version 0.4.
|
|
5
|
+
This repository releases its original source under the MIT License at version 0.4.21; the npm release is split into two packages, `homeagent-server` and `homeagent-runner`. The Server package contains only the compiled Server, Dashboard and Server assets; the Runner package contains only the Runner, the shared protocol and the Windows process-tree helper. The CLI and source share the same license; both npm packages use file allowlists to include only files needed at runtime, documentation and licenses. Package-name availability and account publish permissions are as determined by the registry at release time.
|
|
6
6
|
|
|
7
7
|
## File Layout
|
|
8
8
|
|
|
@@ -57,7 +57,7 @@ npm run release:source
|
|
|
57
57
|
|
|
58
58
|
Output goes to the ignored `release/`:
|
|
59
59
|
|
|
60
|
-
- `HomeAgent-v0.4.
|
|
60
|
+
- `HomeAgent-v0.4.21-source.tar.gz`
|
|
61
61
|
- the corresponding `.sha256` checksum file
|
|
62
62
|
- the corresponding `.manifest.txt`, including version, Git commit and all release paths
|
|
63
63
|
|
|
@@ -69,8 +69,8 @@ If old Git/runtime data from before the rebuild was kept in a private backup out
|
|
|
69
69
|
|
|
70
70
|
`npm run release:npm` builds the JavaScript, packs the two packages separately with `--ignore-scripts`, checks archive file allowlists, runtime assets and SHA-512 integrity, and outputs:
|
|
71
71
|
|
|
72
|
-
- `release/homeagent-server-0.4.
|
|
73
|
-
- `release/homeagent-runner-0.4.
|
|
72
|
+
- `release/homeagent-server-0.4.21.tgz`
|
|
73
|
+
- `release/homeagent-runner-0.4.21.tgz`
|
|
74
74
|
- a `.sha256` for each archive
|
|
75
75
|
- `release/npm-packages.json`: both packages' names, versions, Git commit, checksum, dist-tag and path lists
|
|
76
76
|
|
|
@@ -80,20 +80,20 @@ If old Git/runtime data from before the rebuild was kept in a private backup out
|
|
|
80
80
|
|
|
81
81
|
`.github/workflows/release.yml` supports two entry points:
|
|
82
82
|
|
|
83
|
-
1. Push a version tag, for example `v0.4.
|
|
83
|
+
1. Push a version tag, for example `v0.4.21`.
|
|
84
84
|
2. In Actions → release → Run workflow, enter an **already existing** version tag.
|
|
85
85
|
|
|
86
86
|
Configure `NPM_TOKEN` as described in the next section. After the initial source push, configuring the real `origin` and confirming Actions are available, you can publish as follows:
|
|
87
87
|
|
|
88
88
|
```sh
|
|
89
89
|
# First commit this version's source and docs, keeping the working tree clean
|
|
90
|
-
git tag -a v0.4.
|
|
91
|
-
git push origin v0.4.
|
|
90
|
+
git tag -a v0.4.21 -m "HomeAgent v0.4.21"
|
|
91
|
+
git push origin v0.4.21
|
|
92
92
|
```
|
|
93
93
|
|
|
94
94
|
This document is release documentation only; the preparation scripts do not execute these commands for the operator.
|
|
95
95
|
|
|
96
|
-
The tag must match `package.json`, `package-lock.json` and the runtime VERSION, and `CHANGELOG.md` must have a non-empty entry for that version. A prerelease may use `v0.4.
|
|
96
|
+
The tag must match `package.json`, `package-lock.json` and the runtime VERSION, and `CHANGELOG.md` must have a non-empty entry for that version. A prerelease may use `v0.4.21-rc.1` (all related version files must then be `0.4.21-rc.1`). Do not disguise an ordinary branch or a mismatched version as a release.
|
|
97
97
|
|
|
98
98
|
The release pipeline runs in order:
|
|
99
99
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[English](OPEN_SOURCE.md) · **简体中文**
|
|
4
4
|
|
|
5
|
-
本仓库以 MIT 开放原始代码,版本为 0.4.
|
|
5
|
+
本仓库以 MIT 开放原始代码,版本为 0.4.21,npm 发布拆成 `homeagent-server` 和 `homeagent-runner` 两个包。Server 包只包含编译后的 Server、Dashboard 和 Server 资源;Runner 包只包含 Runner、共享协议和 Windows 进程树辅助代码。CLI 和源码采用相同许可证;两个 npm 包都通过文件白名单只包含运行所需文件、文档和许可证。包名是否可用及账号发布权限以发布当时的 registry 为准。
|
|
6
6
|
|
|
7
7
|
## 文件划分
|
|
8
8
|
|
|
@@ -57,7 +57,7 @@ npm run release:source
|
|
|
57
57
|
|
|
58
58
|
输出位于被忽略的 release/:
|
|
59
59
|
|
|
60
|
-
- `HomeAgent-v0.4.
|
|
60
|
+
- `HomeAgent-v0.4.21-source.tar.gz`
|
|
61
61
|
- 对应 `.sha256` 校验文件
|
|
62
62
|
- 对应 `.manifest.txt`,包括版本、Git 提交和全部发布路径
|
|
63
63
|
|
|
@@ -69,8 +69,8 @@ npm run release:source
|
|
|
69
69
|
|
|
70
70
|
`npm run release:npm` 构建 JavaScript、以 `--ignore-scripts` 分别打包两个包,并检查归档文件白名单、运行资源及 SHA-512 完整性,输出:
|
|
71
71
|
|
|
72
|
-
- `release/homeagent-server-0.4.
|
|
73
|
-
- `release/homeagent-runner-0.4.
|
|
72
|
+
- `release/homeagent-server-0.4.21.tgz`
|
|
73
|
+
- `release/homeagent-runner-0.4.21.tgz`
|
|
74
74
|
- 两个归档各自的 `.sha256`
|
|
75
75
|
- `release/npm-packages.json`:两个包的名称、版本、Git commit、校验、dist-tag 和路径清单
|
|
76
76
|
|
|
@@ -80,20 +80,20 @@ npm run release:source
|
|
|
80
80
|
|
|
81
81
|
`.github/workflows/release.yml` 支持两种入口:
|
|
82
82
|
|
|
83
|
-
1. 推送版本标签,例如 `v0.4.
|
|
83
|
+
1. 推送版本标签,例如 `v0.4.21`。
|
|
84
84
|
2. 在 Actions → release → Run workflow 中填写**已经存在**的版本标签。
|
|
85
85
|
|
|
86
86
|
先按下一节配置 `NPM_TOKEN`。首次推送源码、配置真实 `origin` 并确认 Actions 可用后,可以按下面方式发布:
|
|
87
87
|
|
|
88
88
|
```sh
|
|
89
89
|
# 先提交本次版本的源码和文档,工作区保持干净
|
|
90
|
-
git tag -a v0.4.
|
|
91
|
-
git push origin v0.4.
|
|
90
|
+
git tag -a v0.4.21 -m "HomeAgent v0.4.21"
|
|
91
|
+
git push origin v0.4.21
|
|
92
92
|
```
|
|
93
93
|
|
|
94
94
|
本文只是发布说明,准备脚本不会替操作者执行这些命令。
|
|
95
95
|
|
|
96
|
-
标签必须与 package.json、package-lock.json 及 runtime VERSION 一致,CHANGELOG.md 必须有对应版本的非空条目。预发布可用 `v0.4.
|
|
96
|
+
标签必须与 package.json、package-lock.json 及 runtime VERSION 一致,CHANGELOG.md 必须有对应版本的非空条目。预发布可用 `v0.4.21-rc.1`(相关版本文件也必须为 `0.4.21-rc.1`)。禁止把普通分支或不匹配版本伪装成发布。
|
|
97
97
|
|
|
98
98
|
发布流水线按次序执行:
|
|
99
99
|
|
package/docs/TOOLS.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**English** · [简体中文](TOOLS.zh-CN.md)
|
|
4
4
|
|
|
5
|
-
The 13 development tools introduced in v0.3, command aliases / environment profiles, batch-edit recovery and safe commits are fully described in the [Development Workflow](DEVELOPMENT_WORKFLOW.md). v0.4 added controlled Git network operations, a Web permission editor, fuzzy unified-diff hunk relocation, persistent shell sessions and lightweight LSP integration. The current release exposes **
|
|
5
|
+
The 13 development tools introduced in v0.3, command aliases / environment profiles, batch-edit recovery and safe commits are fully described in the [Development Workflow](DEVELOPMENT_WORKFLOW.md). v0.4 added controlled Git network operations, a Web permission editor, fuzzy unified-diff hunk relocation, persistent shell sessions and lightweight LSP integration. The current release exposes **51 MCP tools**. The v0.2 APIs below remain available; the exclusion strategies for Git add and diff were tightened.
|
|
6
6
|
|
|
7
7
|
## Permission Combinations
|
|
8
8
|
|
|
@@ -41,6 +41,91 @@ Device project directories, permissions, command aliases and environment profile
|
|
|
41
41
|
- `edit_block(path,oldText,newText,expectedSha256?)`: `oldText` must match exactly and uniquely; edits within a project are serialized so built-in edits from two clients cannot interleave. An external editor or a running command can still modify files concurrently; the application lock is not a filesystem transaction.
|
|
42
42
|
- `apply_unified_diff(diff,expectedSha256,dryRun=false,fuzz=20,ignoreWhitespace=false)`: applies a text unified diff through the journaled editor, with `fuzz` (0–200 lines) for bounded context-line relocation and `ignoreWhitespace` tolerance of leading/trailing horizontal whitespace. When several matches occur inside the fuzzy window it rejects with `ambiguous_patch`, and returns `relocatedHunks` describing offsets. Strict `fuzz: 0` mode is still available.
|
|
43
43
|
|
|
44
|
+
## Project Memory and Kanban
|
|
45
|
+
|
|
46
|
+
### Local advisory memory
|
|
47
|
+
|
|
48
|
+
The Runner discovers its memory workspace from `HOMEAGENT_WORKSPACE`, otherwise the
|
|
49
|
+
parent of `stateDir` when that directory contains `workspace.json`, otherwise
|
|
50
|
+
`~/.homeagent/workspace`. Memory is optional and managed locally; these tools do not
|
|
51
|
+
create or edit memory files. Use `memory/<projectId>/charter.md` for project guidance
|
|
52
|
+
(up to 8192 UTF-8 bytes, with an explicit `truncated` flag), and
|
|
53
|
+
`memory/<projectId>/pitfalls/_index.json` to map plain filenames to hints:
|
|
54
|
+
|
|
55
|
+
```json
|
|
56
|
+
{
|
|
57
|
+
"example.md": {
|
|
58
|
+
"globs": ["src/**/*.ts"],
|
|
59
|
+
"severity": "warning",
|
|
60
|
+
"source": "Local project notes"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Place the corresponding `example.md` in the same `pitfalls` directory. Index entries
|
|
66
|
+
must use plain filenames, not paths; linked files/directories and Windows aliases
|
|
67
|
+
are rejected. Paths are normalized before POSIX-glob matching. `read_file`,
|
|
68
|
+
`write_file`, `edit_block`, `read_files`, `edit_files` and `apply_unified_diff` can return
|
|
69
|
+
`memoryHints` (at most three hints with a shared 4096-byte content budget).
|
|
70
|
+
`get_project_context(includeInstructions=true)` includes the charter. Memory is
|
|
71
|
+
untrusted advisory guidance, not authorization; missing or invalid memory never
|
|
72
|
+
blocks file operations.
|
|
73
|
+
|
|
74
|
+
### Server-side task coordination
|
|
75
|
+
|
|
76
|
+
All six tools require `projectId` and respect the current token's tool, scope and
|
|
77
|
+
per-device project grants. They operate in the Server database without Runner
|
|
78
|
+
filesystem access, so an authorized offline device is sufficient; revoked, paused
|
|
79
|
+
and unknown devices are not. `kanban_list_tasks` requires `read`; all other Kanban
|
|
80
|
+
tools require `write`. These scopes govern task metadata, not permission to edit
|
|
81
|
+
Runner files. Tasks are shared by project ID among authorized clients, not private
|
|
82
|
+
to an assignee.
|
|
83
|
+
|
|
84
|
+
- `kanban_list_tasks(status?)`: list project tasks, optionally by status.
|
|
85
|
+
- `kanban_create_task(title,description="",targetPaths=[],requiresReview=true)`: create a todo task.
|
|
86
|
+
- `kanban_claim_task(taskId,deviceId?)`: claim a todo task with a 30-minute lease;
|
|
87
|
+
infer one authorized online device, or one authorized offline device when none are
|
|
88
|
+
online. Specify `deviceId` when selection is ambiguous. Returns path-overlap warnings.
|
|
89
|
+
- `kanban_update_task(taskId,actualPaths?,message?)`: merge reported paths, add progress
|
|
90
|
+
messages and renew the task lease.
|
|
91
|
+
- `kanban_submit_review(taskId,proposedCommitMessage,aiSummary="",fileHashes={})`:
|
|
92
|
+
store review evidence and enter review, or finish when review is not required.
|
|
93
|
+
- `kanban_complete_task(taskId,skipReview=false)`: complete a review task; explicit
|
|
94
|
+
`skipReview` also allows completing in-progress work. It does not create a Git commit.
|
|
95
|
+
|
|
96
|
+
Active tool calls renew unexpired leases only for matching assignee, device and
|
|
97
|
+
project. Runner heartbeat alone does not keep abandoned work leased. Successful
|
|
98
|
+
`write_file`, `edit_block`, `edit_files`, `apply_unified_diff` and `move_file` calls
|
|
99
|
+
record paths on that worker's active tasks; failed calls, reads and dry runs do not.
|
|
100
|
+
Shell commands and external editors do not provide automatic path tracking.
|
|
101
|
+
These file tools also return advisory `reviewWarnings` for paths awaiting review;
|
|
102
|
+
this is not an enforced lock or an independent verification of submitted hashes.
|
|
103
|
+
|
|
104
|
+
### Web project board
|
|
105
|
+
|
|
106
|
+
The administrator console's **Project Kanban** tab provides a four-column board,
|
|
107
|
+
a list view, project/device/client filters, search, creation, task editing, comments
|
|
108
|
+
and a detail drawer with submitted evidence and activity history. Desktop cards can
|
|
109
|
+
be dragged to another state; **Move to…** in task details provides the same actions
|
|
110
|
+
for keyboard and mobile users. Invalid transitions leave the task unchanged.
|
|
111
|
+
|
|
112
|
+
Moving a todo or completed task into progress requires selecting a currently
|
|
113
|
+
write-authorized client and device. This assigns metadata only; it does not wake an
|
|
114
|
+
AI client or run commands. Moving in-progress work into review requires a proposed
|
|
115
|
+
commit message and delivery summary, without fabricating verified hashes. Moving
|
|
116
|
+
reviewed work into done requires confirmation; finishing in-progress work explicitly
|
|
117
|
+
confirms skipping review. Release, rejection, revision and reopening require a reason.
|
|
118
|
+
None of these actions stops Runner processes, reverts files or creates a Git commit.
|
|
119
|
+
|
|
120
|
+
Visible boards refresh every five seconds. Comments and browser polling never renew
|
|
121
|
+
worker leases. All modifying requests use the administrator session, CSRF protection
|
|
122
|
+
and an expected task revision; a concurrent update returns `409 conflict`, preserving
|
|
123
|
+
the browser draft for explicit reload. Historical unavailable projects remain readable;
|
|
124
|
+
creating/editing tasks and assigning workers require current configured membership.
|
|
125
|
+
The UI labels bounded path/message/hash histories and distinguishes client-provided
|
|
126
|
+
evidence from independent verification. Review staleness reflects confirmed built-in
|
|
127
|
+
file-tool changes only, not arbitrary shell commands or external editors.
|
|
128
|
+
|
|
44
129
|
## LSP and Code-Intelligence Tools
|
|
45
130
|
|
|
46
131
|
- `lsp_document_symbols(path)`: extracts structured source symbols (classes, interfaces, types, enums, functions, methods, constants, variables, etc.), exact line/column ranges, doc comments and module import relations.
|
package/docs/TOOLS.zh-CN.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[English](TOOLS.md) · **简体中文**
|
|
4
4
|
|
|
5
|
-
v0.3 新增的 13 个开发工具、命令别名/环境配置、批量编辑恢复和安全提交的完整说明见 [日常开发工作流](DEVELOPMENT_WORKFLOW.zh-CN.md)。v0.4 增加受控 Git 网络操作、Web 权限编辑器、统一 diff 模糊重定位、持久 Shell 会话与轻量 LSP 集成,当前共 **
|
|
5
|
+
v0.3 新增的 13 个开发工具、命令别名/环境配置、批量编辑恢复和安全提交的完整说明见 [日常开发工作流](DEVELOPMENT_WORKFLOW.zh-CN.md)。v0.4 增加受控 Git 网络操作、Web 权限编辑器、统一 diff 模糊重定位、持久 Shell 会话与轻量 LSP 集成,当前共 **51 个 MCP 工具**。下列 v0.2 原有 API 继续保留;Git add 和 diff 的排除策略有所收紧。
|
|
6
6
|
|
|
7
7
|
## 权限组合
|
|
8
8
|
|
|
@@ -41,6 +41,76 @@ v0.3 新增的 13 个开发工具、命令别名/环境配置、批量编辑恢
|
|
|
41
41
|
- `edit_block(path,oldText,newText,expectedSha256?)`:`oldText` 必须唯一精确匹配;同项目内修改序列化,不让两个客户端的内置修改相互交错。外部编辑器或运行中的命令仍可能并发修改,不能把应用锁当作文件系统事务。
|
|
42
42
|
- `apply_unified_diff(diff,expectedSha256,dryRun=false,fuzz=20,ignoreWhitespace=false)`:通过带恢复日志的编辑器应用文本 unified diff,支持 `fuzz`(0–200 行)有界上下文行重定位及 `ignoreWhitespace` 行首尾水平空白容错;当模糊窗口内出现多处匹配时以 `ambiguous_patch` 拒绝,并返回 `relocatedHunks` 记录偏移详情。严格 `fuzz: 0` 模式仍可用。
|
|
43
43
|
|
|
44
|
+
## 项目记忆与看板
|
|
45
|
+
|
|
46
|
+
### 本地辅助记忆
|
|
47
|
+
|
|
48
|
+
Runner 优先使用 `HOMEAGENT_WORKSPACE` 指定的记忆工作区;否则,在 `stateDir`
|
|
49
|
+
的父目录包含 `workspace.json` 时使用该目录;最后回退到 `~/.homeagent/workspace`。
|
|
50
|
+
记忆是可选的本地配置,这些工具不会创建或编辑记忆文件。项目规则放在
|
|
51
|
+
`memory/<projectId>/charter.md`(最多 8192 个 UTF-8 字节,明确返回 `truncated`),
|
|
52
|
+
踩坑提示通过 `memory/<projectId>/pitfalls/_index.json` 将普通文件名映射到规则:
|
|
53
|
+
|
|
54
|
+
```json
|
|
55
|
+
{
|
|
56
|
+
"example.md": {
|
|
57
|
+
"globs": ["src/**/*.ts"],
|
|
58
|
+
"severity": "warning",
|
|
59
|
+
"source": "本地项目笔记"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
将对应的 `example.md` 放在同一个 `pitfalls` 目录。索引键必须是普通文件名而非路径;
|
|
65
|
+
拒绝链接文件/目录及 Windows 路径别名。输入路径统一后使用 POSIX glob 匹配。
|
|
66
|
+
`read_file`、`write_file`、`edit_block`、`read_files`、`edit_files`、
|
|
67
|
+
`apply_unified_diff` 可以返回 `memoryHints`(最多三条,共享 4096 字节正文预算)。
|
|
68
|
+
`get_project_context(includeInstructions=true)` 会包含项目规则。记忆只是不可信的
|
|
69
|
+
辅助指导,不能授予权限;缺失或无效的记忆不会阻断文件操作。
|
|
70
|
+
|
|
71
|
+
### Server 端任务协作
|
|
72
|
+
|
|
73
|
+
六个工具都要求 `projectId`,并检查当前令牌的工具集合、scope 和按设备划分的项目授权。
|
|
74
|
+
它们只操作 Server 数据库,不访问 Runner 文件系统,因此允许使用获授权的离线设备,
|
|
75
|
+
但拒绝已吊销、暂停或未知设备。`kanban_list_tasks` 要求 `read`,其余看板工具要求
|
|
76
|
+
`write`。这里的 scope 只授予任务元数据权限,不代表可以修改 Runner 文件。同一项目 ID
|
|
77
|
+
的任务在获授权客户端之间共享,并非认领者私有。
|
|
78
|
+
|
|
79
|
+
- `kanban_list_tasks(status?)`:列出项目任务,可按状态过滤。
|
|
80
|
+
- `kanban_create_task(title,description="",targetPaths=[],requiresReview=true)`:创建待办任务。
|
|
81
|
+
- `kanban_claim_task(taskId,deviceId?)`:认领待办任务并取得 30 分钟租约;优先推断唯一
|
|
82
|
+
获授权在线设备,没有在线设备时推断唯一获授权离线设备。有歧义时必须指定 `deviceId`。
|
|
83
|
+
返回路径重叠提醒。
|
|
84
|
+
- `kanban_update_task(taskId,actualPaths?,message?)`:合并上报路径、添加进度消息并续租。
|
|
85
|
+
- `kanban_submit_review(taskId,proposedCommitMessage,aiSummary="",fileHashes={})`:
|
|
86
|
+
保存审核证据并进入审核;不要求审核的任务直接完成。
|
|
87
|
+
- `kanban_complete_task(taskId,skipReview=false)`:完成审核中的任务;显式 `skipReview`
|
|
88
|
+
也允许完成进行中的任务。不会自动创建 Git 提交。
|
|
89
|
+
|
|
90
|
+
活跃工具调用仅为认领身份、设备、项目都匹配且未过期的任务续租。仅有 Runner 心跳
|
|
91
|
+
不会持续占用无人处理的任务。成功的 `write_file`、`edit_block`、`edit_files`、
|
|
92
|
+
`apply_unified_diff`、`move_file` 会将路径记录到该工作者的进行中任务;失败、读取和
|
|
93
|
+
预演不会记录。Shell 命令和外部编辑器的变更不自动追踪。这些文件工具命中待审核路径时
|
|
94
|
+
还会返回辅助性 `reviewWarnings`;这不是强制文件锁,也不独立验证上报的哈希。
|
|
95
|
+
|
|
96
|
+
### Web 项目看板
|
|
97
|
+
|
|
98
|
+
管理员控制台新增「项目看板」:提供四列看板、列表、项目/设备/客户端筛选、搜索、
|
|
99
|
+
新建与编辑任务、备注,以及包含交付证据和活动记录的详情抽屉。桌面端可拖拽卡片切换
|
|
100
|
+
状态;详情中的「移动到…」提供相同操作,供键盘与手机使用。非法流转不会改变任务。
|
|
101
|
+
|
|
102
|
+
待办或已完成任务进入进行中时,必须选择当前拥有项目写入权限的客户端和设备。
|
|
103
|
+
此操作只记录负责人,不会唤醒 AI 或执行命令。进行中进入待审核时需填写拟提交信息
|
|
104
|
+
和交付说明,不会伪造已验证的哈希。待审核进入已完成需确认;进行中直接完成需明确
|
|
105
|
+
确认跳过审核。释放、退回、继续修改及重新打开需要填写原因。这些操作不会停止
|
|
106
|
+
Runner 进程、回滚文件或创建 Git 提交。
|
|
107
|
+
|
|
108
|
+
看板可见时每五秒同步。浏览器轮询和备注不会延长工作者租约。所有修改都检查管理员
|
|
109
|
+
会话、CSRF 和预期任务版本;发生并发更新时返回 `409 conflict`,保留浏览器草稿,
|
|
110
|
+
由用户显式加载最新版本。不可用项目的历史仍可查看;创建/编辑和分配执行需要有效
|
|
111
|
+
项目配置。页面明确标注路径、消息及哈希历史的截断,区分客户端上报与独立验证。
|
|
112
|
+
审核失效提示只覆盖内置文件工具确认的修改,不覆盖任意 Shell 命令或外部编辑器。
|
|
113
|
+
|
|
44
114
|
## LSP 与代码智能工具
|
|
45
115
|
|
|
46
116
|
- `lsp_document_symbols(path)`:提取源文件结构化符号(类、接口、类型、枚举、函数、方法、常量、变量等)、精确行列范围、文档注释与模块导入关系。
|
package/docs/VALIDATION.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**English** · [简体中文](VALIDATION.zh-CN.md)
|
|
4
4
|
|
|
5
|
-
This file is a chronological verification record. Historical per-version counts, dates, environments and conclusions are preserved as written; the current release is v0.4.
|
|
5
|
+
This file is a chronological verification record. Historical per-version counts, dates, environments and conclusions are preserved as written; the current release is v0.4.21.
|
|
6
6
|
|
|
7
7
|
Date: 2026-10-27. Tests use temporary directories, temporary credentials and the project's own MCP SDK client, never real project keys.
|
|
8
8
|
|
|
@@ -167,7 +167,7 @@ The first manual probe of a non-default mapped port used a Host different from `
|
|
|
167
167
|
|
|
168
168
|
## Acceptance Still Outstanding
|
|
169
169
|
|
|
170
|
-
The repository now provides Linux/Windows CI and Docker build / Compose health-check workflows (`.github/workflows/ci.yml` and `release.yml`) with push/PR triggers, plus source archives and npm tarballs up to v0.4.
|
|
170
|
+
The repository now provides Linux/Windows CI and Docker build / Compose health-check workflows (`.github/workflows/ci.yml` and `release.yml`) with push/PR triggers, plus source archives and npm tarballs up to v0.4.21 under `release/`. However, the following environment acceptance is still outstanding:
|
|
171
171
|
|
|
172
172
|
- No interactive acceptance was performed with a real ChatGPT, Claude or Cursor account. Client docs reference official guides found on 2026-10-26; the protocol and OAuth chain use real SDK and HTTP/WS automated tests.
|
|
173
173
|
- Linux systemd and Windows Task Scheduler install/uninstall and reboot persistence have not been executed, to avoid modifying login tasks and services on test or development machines.
|
package/docs/VALIDATION.zh-CN.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[English](VALIDATION.md) · **简体中文**
|
|
4
4
|
|
|
5
|
-
本文件是按时间顺序的验证记录。各历史版本的计数、日期、环境与结论均按原文保留;当前发布版本为 v0.4.
|
|
5
|
+
本文件是按时间顺序的验证记录。各历史版本的计数、日期、环境与结论均按原文保留;当前发布版本为 v0.4.21。
|
|
6
6
|
|
|
7
7
|
日期:2026-10-27。测试使用临时目录、临时凭据和项目自己的 MCP SDK 客户端,不使用真实项目密钥。
|
|
8
8
|
|
|
@@ -167,7 +167,7 @@ v0.1 的 14 组测试覆盖:
|
|
|
167
167
|
|
|
168
168
|
## 尚未进行的环境验收
|
|
169
169
|
|
|
170
|
-
仓库现已提供 Linux/Windows CI 与 Docker 构建/Compose 健康检查工作流(`.github/workflows/ci.yml` 与 `release.yml`,带 push/PR 触发),`release/` 下也已有截至 v0.4.
|
|
170
|
+
仓库现已提供 Linux/Windows CI 与 Docker 构建/Compose 健康检查工作流(`.github/workflows/ci.yml` 与 `release.yml`,带 push/PR 触发),`release/` 下也已有截至 v0.4.21 的源码归档和 npm tgz。但以下环境验收仍未完成:
|
|
171
171
|
|
|
172
172
|
- 没有登录真实 ChatGPT、Claude 或 Cursor 账户做交互验收。客户端文档引用 2026-10-26 查到的官方指南;协议与 OAuth 链路使用真实 SDK 和 HTTP/WS 自动化测试。
|
|
173
173
|
- Linux systemd、Windows Task Scheduler 的安装/卸载与重启持久性未执行,以免修改测试机或开发机的登录任务和服务。
|
package/package.json
CHANGED