weacpx 0.5.0 → 0.5.1
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/README.md +13 -5
- package/config.example.json +3 -7
- package/dist/bridge/bridge-main.js +1 -1
- package/dist/channels/types.d.ts +12 -0
- package/dist/cli.js +865 -342
- package/dist/config/types.d.ts +5 -0
- package/dist/orchestration/orchestration-types.d.ts +7 -0
- package/dist/weixin/agent/interface.d.ts +3 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -182,6 +182,8 @@ weacpx restart
|
|
|
182
182
|
| `weacpx workspace list` | 查看本机已注册的 workspace |
|
|
183
183
|
| `weacpx workspace add [name] [--raw]` | 把当前目录注册成 workspace;不传 `name` 时使用当前目录名,含特殊字符的名称会被自动规范化 |
|
|
184
184
|
| `weacpx workspace rm <name>` | 删除 workspace |
|
|
185
|
+
| `weacpx later list` / `weacpx lt list` | 在终端查看本机待执行定时任务 |
|
|
186
|
+
| `weacpx later cancel <id>` / `weacpx lt cancel <id>` | 在终端取消本机待执行定时任务 |
|
|
185
187
|
|
|
186
188
|
首次运行 `weacpx start` 或 `weacpx run` 时,如果没有会话、workspace 和插件,CLI 会询问是否把当前目录创建为 workspace,并选择一个内置 agent 模板;服务启动后会通过正常会话创建流程创建初始 acpx 会话。
|
|
187
189
|
|
|
@@ -325,27 +327,31 @@ opencode, qoder, qwen, trae
|
|
|
325
327
|
|
|
326
328
|
### 定时任务(/later)
|
|
327
329
|
|
|
328
|
-
让 agent
|
|
330
|
+
让 agent 在未来某个时间自动收到一条消息。**默认在一个为该任务新建的临时会话里执行**(沿用创建时当前会话的 agent 与工作区,对话历史全新,跑完即销毁);加 `--bind` 则发送到创建时绑定的当前会话。到点后把消息作为普通 prompt 投递,结果推回原聊天。
|
|
329
331
|
|
|
330
332
|
| 命令 | 说明 |
|
|
331
333
|
|------|------|
|
|
332
|
-
| `/lt <时间> <消息>` |
|
|
334
|
+
| `/lt <时间> <消息>` | 创建定时任务(默认临时会话执行;`/later` 同义) |
|
|
335
|
+
| `/lt --bind <时间> <消息>` | 改为发送到当前会话 |
|
|
333
336
|
| `/lt list` | 查看全局待执行任务 |
|
|
334
337
|
| `/lt cancel <id>` | 取消待执行任务 |
|
|
335
338
|
|
|
336
339
|
最常见例子:
|
|
337
340
|
|
|
338
341
|
```text
|
|
339
|
-
/lt in 2h 检查 CI 是否通过
|
|
340
|
-
/lt 明天 09:00 看 PR
|
|
342
|
+
/lt in 2h 检查 CI 是否通过 # 临时会话(默认)
|
|
343
|
+
/lt --bind 明天 09:00 看 PR # 绑定当前会话
|
|
341
344
|
/lt list
|
|
342
345
|
```
|
|
343
346
|
|
|
344
347
|
说明:
|
|
345
348
|
|
|
349
|
+
- 默认临时会话执行,`--bind` 绑定当前会话;默认模式可用配置 `later.defaultMode`(`temp` / `bind`,默认 `temp`)修改
|
|
346
350
|
- 只支持一次性任务,时间必须在 10 秒之后、7 天之内
|
|
347
351
|
- 时间格式是固定白名单(相对时间 / 今天·明天·后天 / 星期几 + 时刻),不支持自然语言
|
|
348
|
-
-
|
|
352
|
+
- 普通对话中 agent 也可以通过当前会话内部工具创建、查看与取消定时任务(`scheduled_create` / `scheduled_list` / `scheduled_cancel`);路由和权限由 daemon 从当前聊天会话解析,外部 `mcp-stdio` 不暴露这些工具
|
|
353
|
+
- 终端里也可以用 `weacpx later list` / `weacpx later cancel <id>` 管理待执行任务;CLI 只做查看和取消,不创建定时任务
|
|
354
|
+
- 完整时间格式、临时/绑定模式、任务状态与限制见 [docs/later-command.md](./docs/later-command.md)
|
|
349
355
|
|
|
350
356
|
### 配置与权限
|
|
351
357
|
|
|
@@ -407,6 +413,8 @@ README 里只保留用户视角的最常用命令。
|
|
|
407
413
|
|
|
408
414
|
`delegate_request` 支持 MCP Tasks:支持该能力的 host 可以让委派请求立即返回原生 task handle,之后通过 `tasks/get` / `tasks/result` / `tasks/cancel` 获取状态、结果或取消任务;worker 输出的 `[PROGRESS] ...` 会显示在 `tasks/get` / `tasks/list` 的 `statusMessage` 里;`input_required` 状态下的 `tasks/result` 会返回下一步操作提示并结束本次 result stream,而不是长时间阻塞;client 按提示调用 `task_get` / `task_approve` / `coordinator_answer_question` 等工具后,再继续 `tasks/get` / `tasks/result` 轮询。不支持 MCP Tasks 的 host 仍可使用兼容工具 `task_get` / `task_list` / `task_watch` / `task_cancel`。
|
|
409
415
|
|
|
416
|
+
定时任务的自然语言创建工具是 weacpx 当前会话内部能力,不会出现在外部 `weacpx mcp-stdio` 的工具列表里。
|
|
417
|
+
|
|
410
418
|
先启动 daemon:
|
|
411
419
|
|
|
412
420
|
```bash
|
package/config.example.json
CHANGED
|
@@ -36,13 +36,9 @@
|
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
"workspaces": {
|
|
39
|
-
"
|
|
40
|
-
"cwd": "
|
|
41
|
-
"description": "
|
|
42
|
-
},
|
|
43
|
-
"weacpx-console": {
|
|
44
|
-
"cwd": "/Users/your-name/Projects/weacpx/.worktrees/weacpx-console-v1",
|
|
45
|
-
"description": "weacpx console worktree"
|
|
39
|
+
"home": {
|
|
40
|
+
"cwd": "~",
|
|
41
|
+
"description": "用户主目录"
|
|
46
42
|
}
|
|
47
43
|
}
|
|
48
44
|
}
|
|
@@ -843,7 +843,7 @@ function buildWeacpxMcpServerSpec(input) {
|
|
|
843
843
|
"mcp-stdio",
|
|
844
844
|
"--coordinator-session",
|
|
845
845
|
input.coordinatorSession,
|
|
846
|
-
...input.sourceHandle ? ["--source-handle", input.sourceHandle] : []
|
|
846
|
+
...input.sourceHandle ? ["--source-handle", input.sourceHandle] : ["--internal-session-tools"]
|
|
847
847
|
]
|
|
848
848
|
};
|
|
849
849
|
}
|
package/dist/channels/types.d.ts
CHANGED
|
@@ -22,10 +22,22 @@ export interface CoordinatorMessageInput {
|
|
|
22
22
|
replyContextToken?: string;
|
|
23
23
|
text: string;
|
|
24
24
|
}
|
|
25
|
+
export interface ScheduledSessionDescriptor {
|
|
26
|
+
alias: string;
|
|
27
|
+
agent: string;
|
|
28
|
+
workspace: string;
|
|
29
|
+
transportSession: string;
|
|
30
|
+
}
|
|
25
31
|
export interface ScheduledChannelMessageInput {
|
|
26
32
|
chatKey: string;
|
|
27
33
|
taskId?: string;
|
|
28
34
|
sessionAlias: string;
|
|
35
|
+
/**
|
|
36
|
+
* When present, the scheduled prompt runs in a transient session described
|
|
37
|
+
* here (temp mode) instead of the persisted logical session named by
|
|
38
|
+
* `sessionAlias`. `sessionAlias` still records the origin session for display.
|
|
39
|
+
*/
|
|
40
|
+
sessionDescriptor?: ScheduledSessionDescriptor;
|
|
29
41
|
accountId?: string;
|
|
30
42
|
replyContextToken?: string;
|
|
31
43
|
noticeText: string;
|