@hellolynk-ai/codex-plugin 0.2.102-macos.1 → 0.2.103

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.
Files changed (26) hide show
  1. package/README.md +17 -17
  2. package/bin/hellolynk-client-setup.mjs +7 -2
  3. package/hellolynk-client-pack-manifest.json +36 -56
  4. package/hellolynk-client-pack-pin.json +1 -1
  5. package/package.json +4 -8
  6. package/plugins/hellolynk-codex/.codex-plugin/plugin.json +1 -1
  7. package/plugins/hellolynk-codex/.mcp.json +19 -20
  8. package/plugins/hellolynk-codex/package.json +1 -1
  9. package/plugins/hellolynk-codex/runtime/bootstrap/core/hellolynk-darwin-host.mjs +45 -32
  10. package/plugins/hellolynk-codex/runtime/core/hellolynk-client-update-entry.mjs +3 -3
  11. package/plugins/hellolynk-codex/runtime/core/hellolynk-client-update-runtime.mjs +47 -34
  12. package/plugins/hellolynk-codex/runtime/core/hellolynk-client-update.mjs +46 -16
  13. package/plugins/hellolynk-codex/runtime/core/hellolynk-darwin-host.mjs +45 -32
  14. package/plugins/hellolynk-codex/runtime/core/hellolynk-neutral-host-process.mjs +1 -1
  15. package/plugins/hellolynk-codex/runtime/core/hellolynk-release-retention.mjs +34 -11
  16. package/plugins/hellolynk-codex/runtime/neutral-host-release-manifest.json +11 -27
  17. package/plugins/hellolynk-codex/runtime/neutral-host-release-pin.json +1 -1
  18. package/plugins/hellolynk-codex/runtime/platform/windows/credential-store.ps1 +46 -10
  19. package/plugins/hellolynk-codex/server/codex-neutral-production.mjs +2 -2
  20. package/plugins/hellolynk-codex/server/mcp-server.mjs +1193 -1193
  21. package/plugins/hellolynk-codex/server/native-conversation-directory.mjs +33 -33
  22. package/plugins/hellolynk-codex/server/workbench-runtime.mjs +42 -42
  23. package/plugins/hellolynk-codex/runtime/bootstrap/platform/darwin/hellolynk-keychain-helper.bin +0 -0
  24. package/plugins/hellolynk-codex/runtime/bootstrap/platform/darwin/hellolynk-keychain-helper.swift +0 -149
  25. package/plugins/hellolynk-codex/runtime/platform/darwin/hellolynk-keychain-helper.bin +0 -0
  26. package/plugins/hellolynk-codex/runtime/platform/darwin/hellolynk-keychain-helper.swift +0 -149
package/README.md CHANGED
@@ -35,35 +35,35 @@
35
35
 
36
36
  Codex、OpenClaw、TRAE Work、WorkBuddy。装哪个客户端,就选哪个包。同一个账号下,它们共用你的灵信号。
37
37
 
38
- 源码见 [Codex 客户端源码](https://github.com/haoyun18881-beep/HelloLynk/tree/main/clients/codex-macos),完整介绍见 [HelloLynk on GitHub](https://github.com/haoyun18881-beep/HelloLynk)。
38
+ 源码见 [Codex 客户端源码](https://github.com/haoyun18881-beep/HelloLynk/tree/main/clients/codex),完整介绍见 [HelloLynk on GitHub](https://github.com/haoyun18881-beep/HelloLynk)。
39
39
 
40
40
  ## 前提
41
41
 
42
- Apple 芯片、macOS 13 或更高版本、Node.js 22.16 或更高版本,以及安装在「应用程序」中的 ChatGPT(已打开过 Codex)。
42
+ Windows 10/11、Node.js 22.16 或更高版本、PowerShell 7,以及打开过一次的 Codex。
43
43
 
44
44
  ## 安装
45
45
 
46
46
  1. 打开 [HelloLynk 官网(Official site)](https://hellolynk.com)。新用户注册账号;已有账号登录后,查看自己的公开灵信号。
47
47
  2. 两种装法任选一种。
48
48
 
49
- 推荐用 npm,在终端运行:
49
+ 用安装包,在官网或 [GitHub Release](https://github.com/haoyun18881-beep/HelloLynk/releases) 下载 Codex 安装包,完整解压,在包含 `package` 文件夹的目录打开 PowerShell,运行:
50
50
 
51
- ```sh
52
- npm install -g @hellolynk-ai/codex-plugin@macos
53
- hellolynk-codex init
51
+ ```powershell
52
+ node .\package\bin\hellolynk-client-setup.mjs init
54
53
  ```
55
54
 
56
- 用安装包,在官网或 [GitHub Release](https://github.com/haoyun18881-beep/HelloLynk/releases) 下载 Codex for Mac 安装包,完整解压,在包含 `package` 文件夹的目录打开 终端,运行:
55
+ 用 npm,在 PowerShell 运行:
57
56
 
58
- ```sh
59
- node ./package/bin/hellolynk-client-setup.mjs init
57
+ ```powershell
58
+ npm install -g @hellolynk-ai/codex-plugin
59
+ hellolynk-codex init
60
60
  ```
61
61
 
62
62
  3. 完全退出并重新打开 Codex。
63
63
 
64
64
  可以把本说明交给你的本地 AI,请它帮你安装;用安装包时,把解压目录也告诉它。
65
65
 
66
- 下文命令按安装包写法给出。用 npm 装的,把 `node ./package/bin/hellolynk-client-setup.mjs` 换成 `hellolynk-codex`,在任意目录运行。
66
+ 下文命令按安装包写法给出。用 npm 装的,把 `node .\package\bin\hellolynk-client-setup.mjs` 换成 `hellolynk-codex`,在任意目录运行。
67
67
 
68
68
  ## 首次连接
69
69
 
@@ -73,8 +73,8 @@ Apple 芯片、macOS 13 或更高版本、Node.js 22.16 或更高版本,以及
73
73
 
74
74
  也可以让 AI 用命令连接,把示例换成自己的公开灵信号:
75
75
 
76
- ```sh
77
- node ./package/bin/hellolynk-client-setup.mjs connect --hellolynk-id hellolynk:intl:your-name
76
+ ```powershell
77
+ node .\package\bin\hellolynk-client-setup.mjs connect --hellolynk-id hellolynk:intl:your-name
78
78
  ```
79
79
 
80
80
  首次连接这台电脑时,命令会给出官网确认链接。AI 把链接给用户;用户确认后,AI 继续执行同一条连接命令。
@@ -83,20 +83,20 @@ node ./package/bin/hellolynk-client-setup.mjs connect --hellolynk-id hellolynk:i
83
83
 
84
84
  插件会自动更新,不用操作。要手动更新,下载新版安装包,在包含 `package` 文件夹的目录运行:
85
85
 
86
- ```sh
87
- node ./package/bin/hellolynk-client-setup.mjs setup
86
+ ```powershell
87
+ node .\package\bin\hellolynk-client-setup.mjs setup
88
88
  ```
89
89
 
90
- 用 npm 装的,先运行 `npm install -g @hellolynk-ai/codex-plugin@macos` 装上新版,再运行 `hellolynk-codex setup`。
90
+ 用 npm 装的,先运行 `npm install -g @hellolynk-ai/codex-plugin` 装上新版,再运行 `hellolynk-codex setup`。
91
91
 
92
92
  ## 卸载
93
93
 
94
- 在包含 `package` 文件夹的目录运行 `node ./package/bin/hellolynk-client-setup.mjs uninstall`。账号、联系人和聊天记录留在这台电脑上,重新安装后不用重新连接。
94
+ 在包含 `package` 文件夹的目录运行 `node .\package\bin\hellolynk-client-setup.mjs uninstall`。账号、联系人和聊天记录留在这台电脑上,重新安装后不用重新连接。
95
95
 
96
96
  用 npm 装的,运行 `hellolynk-codex uninstall`,再运行 `npm uninstall -g @hellolynk-ai/codex-plugin`。
97
97
 
98
98
  ## 求助
99
99
 
100
- 运行 `node ./package/bin/hellolynk-client-setup.mjs doctor` 检查安装,把结果和错误码发到 [haoyun18881@gmail.com](mailto:haoyun18881@gmail.com)。
100
+ 运行 `node .\package\bin\hellolynk-client-setup.mjs doctor` 检查安装,把结果和错误码发到 [haoyun18881@gmail.com](mailto:haoyun18881@gmail.com)。
101
101
 
102
102
  许可:PolyForm Shield License 1.0.0,只覆盖本包内的客户端源码,完整条款见 LICENSE。
@@ -16,7 +16,8 @@ const PACK_PIN = "hellolynk-client-pack-pin.json";
16
16
 
17
17
  // A person at a terminal reads sentences in the system language; the updater, tests and other
18
18
  // programs read one JSON line.
19
- const jsonOutput = process.argv.includes("--json") || process.stdout.isTTY !== true;
19
+ const explicitJson = process.argv.includes("--json");
20
+ const jsonOutput = explicitJson || process.stdout.isTTY !== true;
20
21
  const CHINESE = /^zh\b/i.test(Intl.DateTimeFormat().resolvedOptions().locale);
21
22
  const CLIENT_NAMES = Object.freeze({ codex: "Codex", openclaw: "OpenClaw", "trae-work": "TRAE Work",
22
23
  workbuddy: "WorkBuddy", cursor: "Cursor", dsh: "DSH" });
@@ -258,6 +259,10 @@ try {
258
259
  await verifyExactBinding({ ...installed, locations, activation });
259
260
  await verifyClientConfiguration({ ...installed, locations });
260
261
  }
262
+ // A running unsigned updater asks the stable package for implicit JSON. A
263
+ // staged package may still prove its own first install after lost stdout.
264
+ const legacyUpdateProof = installed && !existingDoctor && !explicitJson && jsonOutput
265
+ && process.env.HELLOLYNK_NEUTRAL_STORE_ROOT && samePath(PACKAGE_ROOT, installed.packageRoot);
261
266
  print({
262
267
  ok: true,
263
268
  client: metadata.client,
@@ -268,7 +273,7 @@ try {
268
273
  activated: activation.ready,
269
274
  activationState: activation.state,
270
275
  stableReleaseVerified: installed != null,
271
- exactBindingVerified: installed != null,
276
+ ...(legacyUpdateProof ? {} : { exactBindingVerified: installed != null }),
272
277
  clientConfigurationVerified: installed != null,
273
278
  installsNode: false,
274
279
  installsGit: false,
@@ -2,7 +2,7 @@
2
2
  "contract": "hellolynk-client-npm-pack-manifest-v1",
3
3
  "client": "codex",
4
4
  "packageName": "@hellolynk-ai/codex-plugin",
5
- "version": "0.2.102-macos.1",
5
+ "version": "0.2.103",
6
6
  "workbench": {
7
7
  "path": "plugins/hellolynk-codex/runtime/workbench/hellolynk-workbench-build.json",
8
8
  "contract": "hellolynk-shared-workbench-build-v1",
@@ -17,8 +17,8 @@
17
17
  },
18
18
  {
19
19
  "path": "bin/hellolynk-client-setup.mjs",
20
- "bytes": 145198,
21
- "sha256": "d7ab5068d7c88f4cdcd056db0074431ea33811a538c2ede4a420d1ee15f4452c"
20
+ "bytes": 145615,
21
+ "sha256": "044321ea6c5757a985b92a826ffc1fb3ffa4fb8355b732abecc64210d4ac3399"
22
22
  },
23
23
  {
24
24
  "path": "bin/hellolynk-mcp-config-shape.mjs",
@@ -32,8 +32,8 @@
32
32
  },
33
33
  {
34
34
  "path": "package.json",
35
- "bytes": 1776,
36
- "sha256": "8b20a1dc094f4e846029478dfb1d4f11b827c0e6edd1d5646eea02459b6480c0"
35
+ "bytes": 1713,
36
+ "sha256": "8da850a861750ec8c5d0a09bace53fc5c3c8cb7a75d61ded9242c0c95e4bd3ad"
37
37
  },
38
38
  {
39
39
  "path": "plugins/hellolynk-codex/.app.json",
@@ -43,12 +43,12 @@
43
43
  {
44
44
  "path": "plugins/hellolynk-codex/.codex-plugin/plugin.json",
45
45
  "bytes": 1669,
46
- "sha256": "38d2a5204b66ec57368494e69ed71de655f798f9d37ab2af966b59c3ab07d0f2"
46
+ "sha256": "1de6bb823a304b733c0c75418389b1e32819191adea03c575f5c602f2e00631c"
47
47
  },
48
48
  {
49
49
  "path": "plugins/hellolynk-codex/.mcp.json",
50
- "bytes": 438,
51
- "sha256": "510ae3b6f417c1cd8e4712704d9e76643d30e7b3d1a8d3363dda19eb30fe4580"
50
+ "bytes": 373,
51
+ "sha256": "c349aeb9545e8ed97f2eb5b7f4809880dae2c545b01ec049057d8ebd3a2221cc"
52
52
  },
53
53
  {
54
54
  "path": "plugins/hellolynk-codex/assets/hellolynk-mark.png",
@@ -58,7 +58,7 @@
58
58
  {
59
59
  "path": "plugins/hellolynk-codex/package.json",
60
60
  "bytes": 1030,
61
- "sha256": "befbca064334e8ff7f9d192f095ac1bd786a3882385a450fc2c2d2a5c9b2b7dd"
61
+ "sha256": "f786baab2e9f35836813c6b77e1cbc0fb8c0a3c0a2055b2e6ea777f2428cd232"
62
62
  },
63
63
  {
64
64
  "path": "plugins/hellolynk-codex/runtime/bootstrap/core/hellolynk-client-account.mjs",
@@ -77,8 +77,8 @@
77
77
  },
78
78
  {
79
79
  "path": "plugins/hellolynk-codex/runtime/bootstrap/core/hellolynk-darwin-host.mjs",
80
- "bytes": 14704,
81
- "sha256": "0772d7a23280b18d5bc59383a6a14fd2ecfd9de1ec53b351be0250770e3e2e70"
80
+ "bytes": 15242,
81
+ "sha256": "ded97c3bc3dd65ca75305f5199a1340dffb987a5f283454d60586df8b6b55c09"
82
82
  },
83
83
  {
84
84
  "path": "plugins/hellolynk-codex/runtime/bootstrap/core/hellolynk-darwin-vault.mjs",
@@ -115,16 +115,6 @@
115
115
  "bytes": 24643,
116
116
  "sha256": "43d576d9f774409f4a735793c1503a6f397e787b10c59a4ac9cc9257299f5efe"
117
117
  },
118
- {
119
- "path": "plugins/hellolynk-codex/runtime/bootstrap/platform/darwin/hellolynk-keychain-helper.bin",
120
- "bytes": 110784,
121
- "sha256": "f1a782c08229ebc0e8d1704b6390e91c5695e084b4df0a1a6dc043f6b23700ab"
122
- },
123
- {
124
- "path": "plugins/hellolynk-codex/runtime/bootstrap/platform/darwin/hellolynk-keychain-helper.swift",
125
- "bytes": 7771,
126
- "sha256": "5d933589a1d739217bc164f73ab9afadc9e27cc512e1c00c0be4b38975fb6d5b"
127
- },
128
118
  {
129
119
  "path": "plugins/hellolynk-codex/runtime/bootstrap/platform/windows/hellolynk-host-protected-store.ps1",
130
120
  "bytes": 152700,
@@ -157,18 +147,18 @@
157
147
  },
158
148
  {
159
149
  "path": "plugins/hellolynk-codex/runtime/core/hellolynk-client-update-entry.mjs",
160
- "bytes": 1935,
161
- "sha256": "1e513a4a98437dc60b49f9f39fc3958808c3acfaeb6c5bb638efea2e61d4b1ee"
150
+ "bytes": 1939,
151
+ "sha256": "d9548eacda8632976e42aafc65f0cef2ec9c5233d2d53b31b02aec0a1702b5eb"
162
152
  },
163
153
  {
164
154
  "path": "plugins/hellolynk-codex/runtime/core/hellolynk-client-update-runtime.mjs",
165
- "bytes": 40918,
166
- "sha256": "96aa12ba21619a0cd78ef61c63be6f43fdb61f892201ce923ee35e0912ae2e52"
155
+ "bytes": 41618,
156
+ "sha256": "aa233e2cdbdfadb7da6aa489591bc12c4121101b94696f93f6e6cb5d3e7c7870"
167
157
  },
168
158
  {
169
159
  "path": "plugins/hellolynk-codex/runtime/core/hellolynk-client-update.mjs",
170
- "bytes": 28747,
171
- "sha256": "93bf5f2ecc72731d70367306989fa18c82fa7bf9e4b5f785a1376f0d55239428"
160
+ "bytes": 30894,
161
+ "sha256": "e57f7cc5e98519a014cef7cef68a97bb7e2beb33eb381c38d1751a3967904aaa"
172
162
  },
173
163
  {
174
164
  "path": "plugins/hellolynk-codex/runtime/core/hellolynk-contact-request-e2ee.mjs",
@@ -177,8 +167,8 @@
177
167
  },
178
168
  {
179
169
  "path": "plugins/hellolynk-codex/runtime/core/hellolynk-darwin-host.mjs",
180
- "bytes": 14704,
181
- "sha256": "0772d7a23280b18d5bc59383a6a14fd2ecfd9de1ec53b351be0250770e3e2e70"
170
+ "bytes": 15242,
171
+ "sha256": "ded97c3bc3dd65ca75305f5199a1340dffb987a5f283454d60586df8b6b55c09"
182
172
  },
183
173
  {
184
174
  "path": "plugins/hellolynk-codex/runtime/core/hellolynk-darwin-vault.mjs",
@@ -348,7 +338,7 @@
348
338
  {
349
339
  "path": "plugins/hellolynk-codex/runtime/core/hellolynk-neutral-host-process.mjs",
350
340
  "bytes": 225161,
351
- "sha256": "e744bacf65f7b86cbcf7d654189c0e07e09401083e2b6f9053b17c1c3bacd1b4"
341
+ "sha256": "7b237a1400c604da5decbb29ab3ce556fd1b744d0cfd7d28b5560b217da120b1"
352
342
  },
353
343
  {
354
344
  "path": "plugins/hellolynk-codex/runtime/core/hellolynk-neutral-host-store-adapters.mjs",
@@ -372,8 +362,8 @@
372
362
  },
373
363
  {
374
364
  "path": "plugins/hellolynk-codex/runtime/core/hellolynk-release-retention.mjs",
375
- "bytes": 24519,
376
- "sha256": "7cfd7e20c37ac1479f2472cc5fba8e830dcd1b83b91a86c340749cf145f0d661"
365
+ "bytes": 25616,
366
+ "sha256": "0ee150af5a9bcc1f636e3ff980ee90ce7d073ab5ed4a991920cd3472bc65529c"
377
367
  },
378
368
  {
379
369
  "path": "plugins/hellolynk-codex/runtime/core/hellolynk-runtime-safety.cjs",
@@ -407,23 +397,13 @@
407
397
  },
408
398
  {
409
399
  "path": "plugins/hellolynk-codex/runtime/neutral-host-release-manifest.json",
410
- "bytes": 14698,
411
- "sha256": "2cc4af5084d836c44b30aa3f747ab0562980991edf78aba149aaded974d32b3c"
400
+ "bytes": 14038,
401
+ "sha256": "7aff02867e6f806b2d20c060e4d6ba50c55ad9b23448e65e74a15aabcc99a4d5"
412
402
  },
413
403
  {
414
404
  "path": "plugins/hellolynk-codex/runtime/neutral-host-release-pin.json",
415
405
  "bytes": 146,
416
- "sha256": "ea352aec41635ec6e187bc3cfb76a0c35d0100a5628293b40c25ef049aa50650"
417
- },
418
- {
419
- "path": "plugins/hellolynk-codex/runtime/platform/darwin/hellolynk-keychain-helper.bin",
420
- "bytes": 110784,
421
- "sha256": "f1a782c08229ebc0e8d1704b6390e91c5695e084b4df0a1a6dc043f6b23700ab"
422
- },
423
- {
424
- "path": "plugins/hellolynk-codex/runtime/platform/darwin/hellolynk-keychain-helper.swift",
425
- "bytes": 7771,
426
- "sha256": "5d933589a1d739217bc164f73ab9afadc9e27cc512e1c00c0be4b38975fb6d5b"
406
+ "sha256": "e4668be2d4c5154c177b952bdf60aa487777c5475522e066b89dbde143d1fa6f"
427
407
  },
428
408
  {
429
409
  "path": "plugins/hellolynk-codex/runtime/platform/windows/configure-agent.ps1",
@@ -432,8 +412,8 @@
432
412
  },
433
413
  {
434
414
  "path": "plugins/hellolynk-codex/runtime/platform/windows/credential-store.ps1",
435
- "bytes": 38434,
436
- "sha256": "d00dae4af08205fffa52c4956d1c87d5c3423e8f20982ccfc1b76e3424fe442e"
415
+ "bytes": 40188,
416
+ "sha256": "8f288c91a1f6ecaf2651baab9bdfc55014c11ea9e165f203ca7a69f4d47d7917"
437
417
  },
438
418
  {
439
419
  "path": "plugins/hellolynk-codex/runtime/platform/windows/hellolynk-host-protected-store.ps1",
@@ -593,7 +573,7 @@
593
573
  {
594
574
  "path": "plugins/hellolynk-codex/server/codex-neutral-production.mjs",
595
575
  "bytes": 27551,
596
- "sha256": "2e09f95b8c15ac307d3be0e5b29fecd00e5eae95fd816e885c51484990e703cb"
576
+ "sha256": "e1106264be25cd79fc12f1b774726089eead0f7e237aff231cd739f40e0c1f40"
597
577
  },
598
578
  {
599
579
  "path": "plugins/hellolynk-codex/server/mcp-proxy.mjs",
@@ -602,13 +582,13 @@
602
582
  },
603
583
  {
604
584
  "path": "plugins/hellolynk-codex/server/mcp-server.mjs",
605
- "bytes": 59270,
606
- "sha256": "2333f154c55b629a4a789b640be7099bbb8a84e90a17f84b77830210b527387a"
585
+ "bytes": 60463,
586
+ "sha256": "d20e041d6ce63c52bbdf7faac7e7c2ed288444fca014f861f1a8eb15d8067497"
607
587
  },
608
588
  {
609
589
  "path": "plugins/hellolynk-codex/server/native-conversation-directory.mjs",
610
- "bytes": 2319,
611
- "sha256": "382ca445887ef518d9fd58c7fdf18c55e8865623102396822d73df5f987b1b3d"
590
+ "bytes": 2352,
591
+ "sha256": "d6e3c1bd6e338bb13518760e0d2a350d3c9a28ef0a493bcbd53b44c610bfd56d"
612
592
  },
613
593
  {
614
594
  "path": "plugins/hellolynk-codex/server/native-reply-routes.mjs",
@@ -632,8 +612,8 @@
632
612
  },
633
613
  {
634
614
  "path": "plugins/hellolynk-codex/server/workbench-runtime.mjs",
635
- "bytes": 8860,
636
- "sha256": "99e069a72a0be3e73a993b2092d55470fcb481eb381841a156b2756415a0a0a9"
615
+ "bytes": 8902,
616
+ "sha256": "1136c7ea50cc73065fe04094c5b5c19cb676c40a0a189979015766a9c4e908d8"
637
617
  },
638
618
  {
639
619
  "path": "plugins/hellolynk-codex/skills/hellolynk-open/agents/openai.yaml",
@@ -647,8 +627,8 @@
647
627
  },
648
628
  {
649
629
  "path": "README.md",
650
- "bytes": 4578,
651
- "sha256": "95cd3887026e6a275dce26e50667c1422fad356b59409ce15d6f84ef2207ed92"
630
+ "bytes": 4536,
631
+ "sha256": "6876323b3a86b6cce25b84f6c49232553ca4f8b9abd0c12f595a9b3b971f4e76"
652
632
  },
653
633
  {
654
634
  "path": "tools/hellolynk-activate-neutral-host-clients.mjs",
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "contract": "hellolynk-client-npm-pack-pin-v1",
3
- "manifestSha256": "20c169b5149efb01cd3ac7d550b61f2959a491fe9e5c5d44f6106643aefdf65d"
3
+ "manifestSha256": "065d511784341d8114d049a1c4331c9d94cb6a2b3c441bd173328a60637a4df0"
4
4
  }
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@hellolynk-ai/codex-plugin",
3
- "version": "0.2.102-macos.1",
3
+ "version": "0.2.103",
4
4
  "description": "HelloLynk Messaging for Codex: open conversations and let your AI message other people's AI assistants.",
5
5
  "homepage": "https://hellolynk.com",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/haoyun18881-beep/HelloLynk.git",
9
- "directory": "clients/codex-macos"
9
+ "directory": "clients/codex"
10
10
  },
11
11
  "bugs": {
12
12
  "url": "https://github.com/haoyun18881-beep/HelloLynk/issues"
@@ -20,10 +20,7 @@
20
20
  "license": "SEE LICENSE IN LICENSE",
21
21
  "type": "module",
22
22
  "os": [
23
- "darwin"
24
- ],
25
- "cpu": [
26
- "arm64"
23
+ "win32"
27
24
  ],
28
25
  "engines": {
29
26
  "node": ">=22.16.0"
@@ -50,8 +47,7 @@
50
47
  },
51
48
  "publishConfig": {
52
49
  "access": "public",
53
- "registry": "https://registry.npmjs.org/",
54
- "tag": "macos"
50
+ "registry": "https://registry.npmjs.org/"
55
51
  },
56
52
  "hellolynkClient": {
57
53
  "client": "codex",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hellolynk-codex",
3
- "version": "0.2.102",
3
+ "version": "0.2.103",
4
4
  "description": "HelloLynk 通讯、本地未读提醒与安全文字收发的 Codex 插件。",
5
5
  "author": {
6
6
  "name": "HelloLynk local project"
@@ -1,20 +1,19 @@
1
- {
2
- "mcpServers": {
3
- "hellolynk-codex": {
4
- "command": "/Applications/ChatGPT.app/Contents/Resources/cua_node/bin/node",
5
- "args": [
6
- "./server/mcp-proxy.mjs"
7
- ],
8
- "cwd": ".",
9
- "env": {
10
- "HELLOLYNK_HOST_MODE": "neutral",
11
- "TMPDIR": "/tmp"
12
- },
13
- "env_vars": [
14
- "HELLOLYNK_NEUTRAL_STORE_ROOT",
15
- "CODEX_APP_TOOLS_PIPE_PATH",
16
- "CODEX_THREAD_ID"
17
- ]
18
- }
19
- }
20
- }
1
+ {
2
+ "mcpServers": {
3
+ "hellolynk-codex": {
4
+ "command": "node",
5
+ "args": [
6
+ "./server/mcp-proxy.mjs"
7
+ ],
8
+ "cwd": ".",
9
+ "env": {
10
+ "HELLOLYNK_HOST_MODE": "neutral"
11
+ },
12
+ "env_vars": [
13
+ "HELLOLYNK_NEUTRAL_STORE_ROOT",
14
+ "CODEX_APP_TOOLS_PIPE_PATH",
15
+ "CODEX_THREAD_ID"
16
+ ]
17
+ }
18
+ }
19
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hellolynk-ai/codex-plugin",
3
- "version": "0.2.102",
3
+ "version": "0.2.103",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "description": "Project-local HelloLynk Messaging, unread notification, and secure messaging plugin for Codex.",
@@ -12,13 +12,13 @@ function unique(records, missing, ambiguous) {
12
12
  if (records.length !== 1) fail(records.length ? ambiguous : missing);
13
13
  return records[0];
14
14
  }
15
- function checkBindingPaths(b) {
15
+ function checkBindingPaths(b, code) {
16
16
  try {
17
17
  checkDarwinPath(b.runtimeRoot, { directory: true });
18
18
  checkDarwinPath(b.releaseRoot, { directory: true });
19
19
  if (checkDarwinPath(b.profileManifestPath).size > 65536 ||
20
- checkDarwinPath(join(b.releaseRoot, b.runnerRelativePath)).size > 1048576) fail("neutral_codex_launch_manifest_invalid");
21
- } catch { fail("neutral_codex_launch_manifest_invalid"); }
20
+ checkDarwinPath(join(b.releaseRoot, b.runnerRelativePath)).size > 1048576) fail(code);
21
+ } catch { fail(code); }
22
22
  }
23
23
  function capMatches(cap, b) {
24
24
  return cap.state === "active" && fieldsMatch(cap, b,
@@ -38,51 +38,60 @@ function revokeCapability(s, r) {
38
38
  }
39
39
  return { capabilityId: r.capabilityId, revokedAt: r.revokedAt, state: "revoked" };
40
40
  }
41
- function codexBinding(s, command, input, oldId) {
42
- const b = s.codex;
43
- if (command === "ResolveCodexNeutralBinding" || command === "VerifyCodexNeutralBinding") {
44
- if (!b) fail("neutral_codex_binding_configuration_required");
45
- checkBindingPaths(b);
46
- const active = s.caps.filter(c => c.adapterId === "codex" && c.state === "active");
41
+ function neutralBinding(s, adapter, action, input, oldId) {
42
+ const codex = adapter === "codex";
43
+ const key = codex ? "codex" : "claudeCode";
44
+ const error = suffix => `neutral_${adapter.replace("-", "_")}_${suffix}`;
45
+ const check = binding => checkBindingPaths(binding, error("launch_manifest_invalid"));
46
+ const b = s[key];
47
+ if (action === "Resolve" || action === "Verify") {
48
+ if (!b) fail(error("binding_configuration_required"));
49
+ // Claude retains its identity across uninstall; Verify can inspect a
50
+ // retained binding whose old release is gone. Resolve always needs it.
51
+ if (codex || action === "Resolve") check(b);
52
+ const active = s.caps.filter(c => c.adapterId === adapter && c.state === "active");
47
53
  const cap = unique(active.filter(c => capMatches(c, b)),
48
- active.length ? "neutral_codex_capability_binding_mismatch" : "neutral_codex_capability_missing", "neutral_codex_capability_ambiguous");
49
- if (command.startsWith("Resolve")) return { binding: b, record: cap };
54
+ error(active.length ? "capability_binding_mismatch" : "capability_missing"), error("capability_ambiguous"));
55
+ if (action === "Resolve") return { binding: b, record: cap };
50
56
  const {secret, ...record} = cap;
51
57
  return { binding: b, record };
52
58
  }
53
- if (command === "SaveCodexNeutralBinding" || command === "RemoveCodexNeutralBinding") {
54
- checkBindingPaths(input);
55
- if (command.startsWith("Remove")) {
56
- if (!equal(b, input)) fail("neutral_codex_binding_invalid");
57
- s.codex = null;
59
+ if (action === "Save" || action === "Remove") {
60
+ if (input.adapterId !== adapter) fail(error("binding_invalid"));
61
+ if (action === "Remove") {
62
+ if (codex) check(input);
63
+ if (!equal(b, input)) fail(error("binding_invalid"));
64
+ if (codex) s.codex = null;
65
+ else delete s.claudeCode;
58
66
  return { removed: true };
59
67
  }
60
- if (b && !equal(b, input)) fail("neutral_codex_binding_invalid");
61
- s.codex = input;
68
+ check(input);
69
+ if (b && !equal(b, input)) fail(error("binding_invalid"));
70
+ s[key] = input;
62
71
  return { binding: input };
63
72
  }
64
73
  const { previousBinding: previous, replacementBinding: next, replacementRecord } = input;
65
- checkBindingPaths(previous);
66
- checkBindingPaths(next);
67
- if (!fieldsMatch(previous, next, ["contract","region","principalId","delegateId","hostInstallationId","profileId","adapterId","version","runtimeRoot"])) {
68
- fail("neutral_codex_capability_binding_mismatch");
74
+ if (codex) check(previous);
75
+ check(next);
76
+ if (next.adapterId !== adapter || !fieldsMatch(previous, next, ["contract","region","principalId","delegateId","hostInstallationId","profileId","adapterId","version","runtimeRoot"])) {
77
+ fail(error("capability_binding_mismatch"));
69
78
  }
70
- if (!equal(b, previous)) fail("neutral_codex_binding_invalid");
79
+ if (!equal(b, previous)) fail(error("binding_invalid"));
71
80
  const active = s.caps.filter(c => capMatches(c, next));
72
- if (command === "ReplaceCodexNeutralBinding") {
73
- if (!equal(previous.scopes, next.scopes)) fail("neutral_codex_capability_binding_mismatch");
74
- if (active.length !== 1) fail("neutral_codex_capability_ambiguous");
75
- s.codex = next;
81
+ if (codex && action === "Replace") {
82
+ if (!equal(previous.scopes, next.scopes)) fail(error("capability_binding_mismatch"));
83
+ if (active.length !== 1) fail(error("capability_ambiguous"));
84
+ s[key] = next;
76
85
  return { binding: next };
77
86
  }
78
- if (command !== "MigrateCodexNeutralBinding") fail("host_protected_store_command_invalid");
87
+ if (action !== "Migrate") fail("host_protected_store_command_invalid");
79
88
  const old = s.caps.find(c => c.capabilityId === oldId);
80
- if (!old || !capMatches(old, previous) || !capMatches(replacementRecord, next)) fail("neutral_codex_capability_binding_mismatch");
89
+ if (!old || !capMatches(old, previous) || !capMatches(replacementRecord, next)) fail(error("capability_binding_mismatch"));
81
90
  const other = active.filter(c => c.capabilityId !== oldId);
82
- if (other.length > 1) fail("neutral_codex_capability_ambiguous");
91
+ if (other.length > 1) fail(error("capability_ambiguous"));
83
92
  if (!other.length) addCapability(s, replacementRecord);
84
93
  revokeCapability(s, old);
85
- s.codex = next;
94
+ s[key] = next;
86
95
  return { binding: next, record: other[0] || replacementRecord, replacedCapabilityId: oldId };
87
96
  }
88
97
 
@@ -247,9 +256,13 @@ export function invokeDarwinHost(q) {
247
256
  case "DisconnectLocalClient":
248
257
  for (const cap of s.caps.filter(c => c.adapterId === input.client && c.state === "active")) revokeCapability(s,cap);
249
258
  if (input.client === "codex") s.codex = null;
259
+ if (input.client === "claude-code") delete s.claudeCode;
250
260
  return {disconnected:true,client:input.client};
251
261
  }
252
- if (q.command.endsWith("CodexNeutralBinding")) return codexBinding(s,q.command,input,q.capabilityId);
262
+ const bindingCommand = /^(Resolve|Verify|Save|Remove|Replace|Migrate)(Codex|ClaudeCode)NeutralBinding$/.exec(q.command);
263
+ if (bindingCommand) {
264
+ return neutralBinding(s, bindingCommand[2] === "Codex" ? "codex" : "claude-code", bindingCommand[1], input, q.capabilityId);
265
+ }
253
266
  if (q.command.includes("Transport")) return transport(s,q,input);
254
267
  fail("host_protected_store_command_unsupported");
255
268
  });
@@ -2,7 +2,7 @@ import fs from "node:fs/promises";
2
2
  import path from "node:path";
3
3
  import { clientAccountBaseRoot } from "./hellolynk-client-account.mjs";
4
4
  import { startClientUpdateRuntime } from "./hellolynk-client-update-runtime.mjs";
5
- import { clientUpdateCatalogId, MAC_CODEX_VERSION } from "./hellolynk-client-update.mjs";
5
+ import { clientUpdateCatalogId, MAC_CLIENT_VERSION } from "./hellolynk-client-update.mjs";
6
6
 
7
7
  const running = new Map();
8
8
 
@@ -11,7 +11,7 @@ const running = new Map();
11
11
  export function startInstalledClientUpdate(options = {}) {
12
12
  const { client, packageRoot, storeRoot } = options;
13
13
  const catalogId = clientUpdateCatalogId(client, process.platform);
14
- const mac = catalogId === "codex-macos";
14
+ const mac = process.platform === "darwin";
15
15
  if (!catalogId || (mac && process.arch !== "arm64") || !path.isAbsolute(String(packageRoot || ""))) return Promise.resolve(null);
16
16
  let baseRoot;
17
17
  try { baseRoot = clientAccountBaseRoot(storeRoot); } catch { return Promise.resolve(null); }
@@ -24,7 +24,7 @@ export function startInstalledClientUpdate(options = {}) {
24
24
  const metadata = await fs.lstat(packageFile);
25
25
  if (!metadata.isFile() || metadata.isSymbolicLink() || metadata.nlink !== 1 || metadata.size > 64 * 1024) return null;
26
26
  const manifest = JSON.parse(await fs.readFile(packageFile, "utf8"));
27
- const version = mac ? MAC_CODEX_VERSION : /^\d+\.\d+\.\d+$/u;
27
+ const version = mac ? MAC_CLIENT_VERSION : /^\d+\.\d+\.\d+$/u;
28
28
  if (manifest.hellolynkClient?.client !== client || !version.test(manifest.version || "")
29
29
  || (mac && (manifest.os?.[0] !== "darwin" || manifest.cpu?.[0] !== "arm64"))) return null;
30
30
  return startClientUpdateRuntime({