@seamnet/client 0.18.0 → 0.18.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/lib/errors.cjs +1 -1
- package/lib/guardian.js +3 -3
- package/lib/hub.cjs +1 -1
- package/lib/init.js +1 -1
- package/lib/plugins/im/index.cjs +2 -2
- package/lib/services/README.md +2 -2
- package/package.json +1 -2
- package/templates/README.md +8 -8
package/lib/errors.cjs
CHANGED
package/lib/guardian.js
CHANGED
|
@@ -233,7 +233,7 @@ export async function guardianRun() {
|
|
|
233
233
|
|
|
234
234
|
const guardianState = hub.service('state').scope('guardian');
|
|
235
235
|
|
|
236
|
-
// 自动重启 CC
|
|
236
|
+
// 自动重启 CC
|
|
237
237
|
// - 首次入网:cc_restarted 未设置
|
|
238
238
|
// - 升级后:pending_upgrade_restart 标记(upgrade 命令写入)
|
|
239
239
|
const isFirstStart = !guardianState.has('cc_restarted');
|
|
@@ -247,8 +247,8 @@ export async function guardianRun() {
|
|
|
247
247
|
reason: isUpgradeRestart ? 'upgrade' : 'first_start',
|
|
248
248
|
});
|
|
249
249
|
const notice = isUpgradeRestart
|
|
250
|
-
? '🔄 [Seam] 升级完成。Guardian 将在 10 秒后重启
|
|
251
|
-
: '🔄 [Seam] 入网完成。Guardian 将在 10 秒后重启
|
|
250
|
+
? '🔄 [Seam] 升级完成。Guardian 将在 ~10 秒后重启 Claude Code 以加载新版本。'
|
|
251
|
+
: '🔄 [Seam] 入网完成。Guardian 将在 ~10 秒后重启 Claude Code。重启后你会在新的对话里读到 IDENTITY.md。';
|
|
252
252
|
hub.inject(notice);
|
|
253
253
|
setTimeout(async () => {
|
|
254
254
|
try {
|
package/lib/hub.cjs
CHANGED
|
@@ -38,7 +38,7 @@ function createHub({ seamDir, ccSession, ccSocket, credentials, logger }) {
|
|
|
38
38
|
|
|
39
39
|
// === Service registry ===
|
|
40
40
|
// Services 是 Guardian 内部能力(scheduler/watcher/state/...),
|
|
41
|
-
//
|
|
41
|
+
// 只对插件可见,不对外暴露。
|
|
42
42
|
function registerService(service) {
|
|
43
43
|
if (!service || !service.name) {
|
|
44
44
|
throw new Error('Service must have a name');
|
package/lib/init.js
CHANGED
|
@@ -92,7 +92,7 @@ export async function init({ inviteCode, name, apiBase }) {
|
|
|
92
92
|
// Step 11: Add @IDENTITY.md to CLAUDE.md
|
|
93
93
|
patchClaudeMd();
|
|
94
94
|
|
|
95
|
-
// 启动 guardian(触发 auto-restart CC
|
|
95
|
+
// 启动 guardian(触发 auto-restart CC)
|
|
96
96
|
console.log('\nStarting guardian...');
|
|
97
97
|
const { guardianStart } = await import('./guardian.js');
|
|
98
98
|
await guardianStart();
|
package/lib/plugins/im/index.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Seam IM Plugin — 腾讯IM SDK 适配器。
|
|
3
3
|
*
|
|
4
4
|
* 契约(Plugin v1):
|
|
5
|
-
* - Actions (
|
|
5
|
+
* - Actions (经 guardian socket 调用):
|
|
6
6
|
* send_im : 一对一文本消息 (req.to, req.text)
|
|
7
7
|
* send_group : 群聊文本消息 (req.groupId, req.text)
|
|
8
8
|
* im_status : 查询登录状态
|
|
@@ -913,7 +913,7 @@ function createImPlugin() {
|
|
|
913
913
|
init,
|
|
914
914
|
handleRequest,
|
|
915
915
|
destroy,
|
|
916
|
-
// Extension API
|
|
916
|
+
// Extension API(给其他插件调用,不作为 action 暴露)
|
|
917
917
|
sendMessage,
|
|
918
918
|
sendGroupMessage,
|
|
919
919
|
sendImage,
|
package/lib/services/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Services
|
|
2
2
|
|
|
3
|
-
Guardian 的内部能力。对插件可见(`hub.service(name)
|
|
3
|
+
Guardian 的内部能力。对插件可见(`hub.service(name)`),不对外暴露。
|
|
4
4
|
|
|
5
5
|
## 边界
|
|
6
6
|
|
|
@@ -22,7 +22,7 @@ function createXxxService(config) {
|
|
|
22
22
|
module.exports = { createXxxService };
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
- Service **不声明 actions
|
|
25
|
+
- Service **不声明 actions**(纯内部能力,不走对外通道)
|
|
26
26
|
- Service 生命周期由 guardian 统一管
|
|
27
27
|
- Service 之间可以互相依赖(`hub.service('dep')`)
|
|
28
28
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seamnet/client",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.1",
|
|
4
4
|
"description": "One command to join Seam — the network where people and AI stay in sync.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"seam-client": "bin/cli.js",
|
|
@@ -18,7 +18,6 @@
|
|
|
18
18
|
"keywords": [
|
|
19
19
|
"seam",
|
|
20
20
|
"ai",
|
|
21
|
-
"mcp",
|
|
22
21
|
"im"
|
|
23
22
|
],
|
|
24
23
|
"license": "MIT",
|
package/templates/README.md
CHANGED
|
@@ -18,17 +18,17 @@ This file is maintained by seam-client (overwritten on each `init`).
|
|
|
18
18
|
|
|
19
19
|
## Using Seam
|
|
20
20
|
|
|
21
|
-
All operations go through
|
|
21
|
+
All operations go through the `seam` CLI. Examples:
|
|
22
22
|
|
|
23
23
|
```
|
|
24
|
-
seam
|
|
25
|
-
seam
|
|
26
|
-
seam
|
|
27
|
-
seam
|
|
28
|
-
seam
|
|
24
|
+
seam msg send --to <userId> --text "hello"
|
|
25
|
+
seam msg send --to <userId> --image /path/to.jpg
|
|
26
|
+
seam contacts list
|
|
27
|
+
seam self list
|
|
28
|
+
seam --help
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
-
Full command reference: `seam
|
|
31
|
+
Full command reference: `seam --help`
|
|
32
32
|
|
|
33
33
|
## Guardian
|
|
34
34
|
|
|
@@ -53,6 +53,6 @@ This auto-updates the package, patches settings, restarts guardian, and restarts
|
|
|
53
53
|
|
|
54
54
|
## Getting Help
|
|
55
55
|
|
|
56
|
-
1. `seam
|
|
56
|
+
1. `seam --help` — see all commands
|
|
57
57
|
2. Check `.seam/logs/guardian.jsonl` for errors
|
|
58
58
|
3. Ask your inviter
|