pactive 0.0.1-alpha.1 → 0.0.3-alpha.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/.opcteam-plugin/plugin.json +4 -4
- package/BREAKING-CHANGES.md +23 -7
- package/README.md +57 -49
- package/agents/{acti-observer.md → pactive-observer.md} +4 -4
- package/bin/pactive.mjs +720 -0
- package/commands/pactive.md +49 -0
- package/dsh/cordis.patch.yml +4 -4
- package/dsh/index.js +77 -25
- package/hooks/post-tool-use.mjs +1 -1
- package/hooks/session-end.mjs +1 -1
- package/hooks/session-start.mjs +1 -1
- package/hooks/stop.mjs +2 -2
- package/hooks/user-prompt-submit.mjs +2 -2
- package/mcp/server.mjs +4 -4
- package/mcp/tools/_core.mjs +6 -6
- package/mcp/tools/definitions.mjs +65 -14
- package/package.json +4 -5
- package/pi/extension.ts +98 -36
- package/pi/skills/pactive/SKILL.md +70 -0
- package/skills/pactive/SKILL.md +70 -0
- package/src/core/config.mjs +2 -2
- package/src/core/errors.mjs +1 -1
- package/src/core/identity.mjs +2 -2
- package/src/core/lineage.mjs +2 -2
- package/src/core/lock.mjs +2 -2
- package/src/core/paths.mjs +6 -6
- package/src/core/scheduler.mjs +11 -7
- package/src/core/state.mjs +7 -7
- package/src/hosts/dsh/index.mjs +12 -12
- package/src/hosts/errors.mjs +5 -5
- package/src/hosts/pi/index.mjs +1 -1
- package/src/hosts/shared/index.mjs +3 -3
- package/bin/acti.mjs +0 -439
- package/commands/acti.md +0 -46
- package/pi/skills/acti/SKILL.md +0 -47
- package/skills/acti/SKILL.md +0 -47
package/skills/acti/SKILL.md
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: acti
|
|
3
|
-
description: >-
|
|
4
|
-
Correct usage of the acti proactive-assistant extension (tools acti_status / acti_schedule /
|
|
5
|
-
acti_tell / acti_history and the "/acti" command family). Use when the task involves checking
|
|
6
|
-
whether the idle trigger fired or why it did not, scheduling work for later (one-shot or
|
|
7
|
-
repeating), reading the acti event ledger, or sending a message to another session on the same
|
|
8
|
-
machine. Covers the semantics traps (queued is not delivered, idle is disabled by default,
|
|
9
|
-
human-gated config needs CLI --confirm, the Stop hook blocks at most once per turn) and the
|
|
10
|
-
"when" syntax (10m / 18:30 / ISO 8601 / every 1h).
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
# acti:怎么正确用它
|
|
14
|
-
|
|
15
|
-
acti 给会话加**主动机制**:空闲判定(到点才动手)、**定时任务**、**跨会话消息**与**事件账本**。
|
|
16
|
-
|
|
17
|
-
## 工具与命令
|
|
18
|
-
|
|
19
|
-
| 入口 | 作用 |
|
|
20
|
-
|---|---|
|
|
21
|
-
| `acti_status` / `/acti status` | 空闲判定与 `reason`、护栏四闸门、定时任务数、最近活动(只读) |
|
|
22
|
-
| `acti_schedule` / `/acti schedule <when> <prompt>` | 登记一个定时任务(真正落盘,重启后仍在) |
|
|
23
|
-
| `acti_tell <to> <body>` | 给同机另一个会话投递消息(离线时排队,不伪装成功) |
|
|
24
|
-
| `acti_history [n]` | 读事件账本尾部:触发 → 投递 → 回应 → 结账 |
|
|
25
|
-
| `/acti tasks` | 列出待触发的定时任务 |
|
|
26
|
-
|
|
27
|
-
## 关键语义(别踩)
|
|
28
|
-
|
|
29
|
-
- **默认不打扰**:`idle.enabled` 默认 `false`。没打开开关,空闲永远不会触发主动行为。
|
|
30
|
-
- **`reason` 是枚举**:`idle | disabled | no-control | busy | threshold | quiet | hourly-limit | min-interval | cooldown | requires-action`。
|
|
31
|
-
没触发时先看 `reason`,不要猜。
|
|
32
|
-
- **四闸门缺一不可**:控制权已交回 + 不忙 + 超过阈值 + 护栏通过,才可能触发。
|
|
33
|
-
- **`queued` ≠ 已送达**:对端离线时消息进 outbox,等对端上线再补投;回执写 `queued` 就是还没送到。
|
|
34
|
-
- **配置是人工闸门**:`config` 只能由人用 CLI `--confirm` 改;模型/MCP 侧改配置一律得到
|
|
35
|
-
`need_human_confirmation`,且配置不变。
|
|
36
|
-
- **Stop hook 最多阻断一次**:同一轮里只阻断一次,避免死循环;`UserPromptSubmit` 会重置这个计数。
|
|
37
|
-
|
|
38
|
-
## `when` 语法
|
|
39
|
-
|
|
40
|
-
`10m` / `2h` / `30s`(相对时长)、`18:30`(当天时刻,已过则顺延到明天)、
|
|
41
|
-
ISO 8601 时间戳(绝对时刻)、`every 1h`(周期)。缺省 `10m`。
|
|
42
|
-
|
|
43
|
-
## 排障
|
|
44
|
-
|
|
45
|
-
- 状态面板里 `reason=disabled` → 开关没开;`reason=busy` → 宿主还在忙;`reason=threshold` → 还没到阈值。
|
|
46
|
-
- 任务登记了但没触发 → 先看 `acti_history` 里有没有 `triggered` 记录;没有说明调度器没跑到。
|
|
47
|
-
- 消息一直是 `queued` → 对端不在线;看 `acti_status` 的 peers。
|