@hellolynk-ai/codex-plugin 0.0.0-stage → 0.2.100

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 (123) hide show
  1. package/.agents/plugins/marketplace.json +20 -0
  2. package/LICENSE +92 -0
  3. package/README.md +101 -2
  4. package/bin/hellolynk-client-setup.mjs +2748 -0
  5. package/bin/hellolynk-mcp-config-shape.mjs +23 -0
  6. package/hellolynk-client-pack-manifest.json +619 -0
  7. package/hellolynk-client-pack-pin.json +4 -0
  8. package/package.json +58 -4
  9. package/plugins/hellolynk-codex/.app.json +3 -0
  10. package/plugins/hellolynk-codex/.codex-plugin/plugin.json +38 -0
  11. package/plugins/hellolynk-codex/.mcp.json +19 -0
  12. package/plugins/hellolynk-codex/assets/hellolynk-mark.png +0 -0
  13. package/plugins/hellolynk-codex/package.json +11 -0
  14. package/plugins/hellolynk-codex/runtime/bootstrap/core/hellolynk-client-account.mjs +180 -0
  15. package/plugins/hellolynk-codex/runtime/bootstrap/core/hellolynk-client-core.mjs +770 -0
  16. package/plugins/hellolynk-codex/runtime/bootstrap/core/hellolynk-client-profile.mjs +191 -0
  17. package/plugins/hellolynk-codex/runtime/bootstrap/core/hellolynk-host-auth.mjs +347 -0
  18. package/plugins/hellolynk-codex/runtime/bootstrap/core/hellolynk-host-protected-store.mjs +2721 -0
  19. package/plugins/hellolynk-codex/runtime/bootstrap/core/hellolynk-local-process-lock.mjs +157 -0
  20. package/plugins/hellolynk-codex/runtime/bootstrap/core/hellolynk-neutral-host-installation-store.mjs +765 -0
  21. package/plugins/hellolynk-codex/runtime/bootstrap/core/hellolynk-platform-credential-store.mjs +773 -0
  22. package/plugins/hellolynk-codex/runtime/bootstrap/core/hellolynk-runtime-safety.cjs +471 -0
  23. package/plugins/hellolynk-codex/runtime/bootstrap/platform/windows/hellolynk-host-protected-store.ps1 +2866 -0
  24. package/plugins/hellolynk-codex/runtime/connect-activate.mjs +837 -0
  25. package/plugins/hellolynk-codex/runtime/core/hellolynk-agent-configurator.mjs +701 -0
  26. package/plugins/hellolynk-codex/runtime/core/hellolynk-client-account.mjs +180 -0
  27. package/plugins/hellolynk-codex/runtime/core/hellolynk-client-core.mjs +770 -0
  28. package/plugins/hellolynk-codex/runtime/core/hellolynk-client-profile.mjs +191 -0
  29. package/plugins/hellolynk-codex/runtime/core/hellolynk-client-update-entry.mjs +31 -0
  30. package/plugins/hellolynk-codex/runtime/core/hellolynk-client-update-runtime.mjs +600 -0
  31. package/plugins/hellolynk-codex/runtime/core/hellolynk-client-update.mjs +453 -0
  32. package/plugins/hellolynk-codex/runtime/core/hellolynk-contact-request-e2ee.mjs +867 -0
  33. package/plugins/hellolynk-codex/runtime/core/hellolynk-device-enrollment.mjs +435 -0
  34. package/plugins/hellolynk-codex/runtime/core/hellolynk-direct-text-e2ee-client.mjs +1964 -0
  35. package/plugins/hellolynk-codex/runtime/core/hellolynk-direct-text-e2ee.mjs +1207 -0
  36. package/plugins/hellolynk-codex/runtime/core/hellolynk-host-auth.mjs +347 -0
  37. package/plugins/hellolynk-codex/runtime/core/hellolynk-host-protected-store.mjs +2721 -0
  38. package/plugins/hellolynk-codex/runtime/core/hellolynk-host-transport-client.mjs +946 -0
  39. package/plugins/hellolynk-codex/runtime/core/hellolynk-host.mjs +2374 -0
  40. package/plugins/hellolynk-codex/runtime/core/hellolynk-human-confirmation-ledger.mjs +256 -0
  41. package/plugins/hellolynk-codex/runtime/core/hellolynk-human-relationship-controller.mjs +1234 -0
  42. package/plugins/hellolynk-codex/runtime/core/hellolynk-inbox-read-state.mjs +11 -0
  43. package/plugins/hellolynk-codex/runtime/core/hellolynk-indexed-message-store.mjs +1558 -0
  44. package/plugins/hellolynk-codex/runtime/core/hellolynk-instance-conversation.mjs +185 -0
  45. package/plugins/hellolynk-codex/runtime/core/hellolynk-local-contact-requests.mjs +1733 -0
  46. package/plugins/hellolynk-codex/runtime/core/hellolynk-local-contacts.mjs +1228 -0
  47. package/plugins/hellolynk-codex/runtime/core/hellolynk-local-data-migration.mjs +766 -0
  48. package/plugins/hellolynk-codex/runtime/core/hellolynk-local-data-protection.mjs +747 -0
  49. package/plugins/hellolynk-codex/runtime/core/hellolynk-local-identity-trust.mjs +274 -0
  50. package/plugins/hellolynk-codex/runtime/core/hellolynk-local-messaging.mjs +3043 -0
  51. package/plugins/hellolynk-codex/runtime/core/hellolynk-local-peer-transport.mjs +103 -0
  52. package/plugins/hellolynk-codex/runtime/core/hellolynk-local-process-lock.mjs +157 -0
  53. package/plugins/hellolynk-codex/runtime/core/hellolynk-model-inbox.mjs +230 -0
  54. package/plugins/hellolynk-codex/runtime/core/hellolynk-model-notices.cjs +60 -0
  55. package/plugins/hellolynk-codex/runtime/core/hellolynk-native-addressing-tools.cjs +231 -0
  56. package/plugins/hellolynk-codex/runtime/core/hellolynk-native-conversations.mjs +280 -0
  57. package/plugins/hellolynk-codex/runtime/core/hellolynk-native-human-confirmation-broker.mjs +1036 -0
  58. package/plugins/hellolynk-codex/runtime/core/hellolynk-native-inbox-runtime.mjs +553 -0
  59. package/plugins/hellolynk-codex/runtime/core/hellolynk-native-notice.mjs +50 -0
  60. package/plugins/hellolynk-codex/runtime/core/hellolynk-native-reply-routes.mjs +96 -0
  61. package/plugins/hellolynk-codex/runtime/core/hellolynk-native-worker-lease.mjs +84 -0
  62. package/plugins/hellolynk-codex/runtime/core/hellolynk-neutral-host-assembly.mjs +955 -0
  63. package/plugins/hellolynk-codex/runtime/core/hellolynk-neutral-host-installation-store.mjs +765 -0
  64. package/plugins/hellolynk-codex/runtime/core/hellolynk-neutral-host-launcher.mjs +665 -0
  65. package/plugins/hellolynk-codex/runtime/core/hellolynk-neutral-host-process.mjs +4374 -0
  66. package/plugins/hellolynk-codex/runtime/core/hellolynk-neutral-host-store-adapters.mjs +548 -0
  67. package/plugins/hellolynk-codex/runtime/core/hellolynk-neutral-host-workbench-read-model.mjs +1365 -0
  68. package/plugins/hellolynk-codex/runtime/core/hellolynk-platform-credential-store.mjs +773 -0
  69. package/plugins/hellolynk-codex/runtime/core/hellolynk-relay-client-cli.mjs +232 -0
  70. package/plugins/hellolynk-codex/runtime/core/hellolynk-release-retention.mjs +277 -0
  71. package/plugins/hellolynk-codex/runtime/core/hellolynk-runtime-safety.cjs +471 -0
  72. package/plugins/hellolynk-codex/runtime/core/hellolynk-workbench-action-grants.mjs +457 -0
  73. package/plugins/hellolynk-codex/runtime/core/hellolynk-workbench-connection.mjs +234 -0
  74. package/plugins/hellolynk-codex/runtime/neutral-host-bootstrap.mjs +64 -0
  75. package/plugins/hellolynk-codex/runtime/neutral-host-release-entry.mjs +70 -0
  76. package/plugins/hellolynk-codex/runtime/neutral-host-release-loader.mjs +156 -0
  77. package/plugins/hellolynk-codex/runtime/neutral-host-release-manifest.json +358 -0
  78. package/plugins/hellolynk-codex/runtime/neutral-host-release-pin.json +4 -0
  79. package/plugins/hellolynk-codex/runtime/platform/windows/configure-agent.ps1 +281 -0
  80. package/plugins/hellolynk-codex/runtime/platform/windows/credential-store.ps1 +844 -0
  81. package/plugins/hellolynk-codex/runtime/platform/windows/hellolynk-host-protected-store.ps1 +2866 -0
  82. package/plugins/hellolynk-codex/runtime/platform/windows/hellolynk-human-confirmation-ledger.ps1 +155 -0
  83. package/plugins/hellolynk-codex/runtime/platform/windows/hellolynk-local-data-key.ps1 +300 -0
  84. package/plugins/hellolynk-codex/runtime/platform/windows/hellolynk-native-human-confirmation-broker.ps1 +216 -0
  85. package/plugins/hellolynk-codex/runtime/workbench/candidate-bootstrap.mjs +54 -0
  86. package/plugins/hellolynk-codex/runtime/workbench/contract.mjs +1314 -0
  87. package/plugins/hellolynk-codex/runtime/workbench/hellolynk-workbench-build.json +215 -0
  88. package/plugins/hellolynk-codex/runtime/workbench/host-capabilities.mjs +80 -0
  89. package/plugins/hellolynk-codex/runtime/workbench/i18n.mjs +1127 -0
  90. package/plugins/hellolynk-codex/runtime/workbench/loopback-surface.mjs +740 -0
  91. package/plugins/hellolynk-codex/runtime/workbench/mcp-app-bundle.mjs +97 -0
  92. package/plugins/hellolynk-codex/runtime/workbench/service.mjs +485 -0
  93. package/plugins/hellolynk-codex/runtime/workbench/state.mjs +421 -0
  94. package/plugins/hellolynk-codex/runtime/workbench/transports.mjs +171 -0
  95. package/plugins/hellolynk-codex/runtime/workbench/ui/app.mjs +6120 -0
  96. package/plugins/hellolynk-codex/runtime/workbench/ui/connection-form.mjs +155 -0
  97. package/plugins/hellolynk-codex/runtime/workbench/ui/hellolynk-mark.png +0 -0
  98. package/plugins/hellolynk-codex/runtime/workbench/ui/http-transport.mjs +247 -0
  99. package/plugins/hellolynk-codex/runtime/workbench/ui/icons/arrow-left.svg +3 -0
  100. package/plugins/hellolynk-codex/runtime/workbench/ui/icons/close.svg +3 -0
  101. package/plugins/hellolynk-codex/runtime/workbench/ui/icons/contacts.svg +3 -0
  102. package/plugins/hellolynk-codex/runtime/workbench/ui/icons/inbox.svg +3 -0
  103. package/plugins/hellolynk-codex/runtime/workbench/ui/icons/refresh.svg +3 -0
  104. package/plugins/hellolynk-codex/runtime/workbench/ui/icons/search.svg +3 -0
  105. package/plugins/hellolynk-codex/runtime/workbench/ui/icons/security.svg +3 -0
  106. package/plugins/hellolynk-codex/runtime/workbench/ui/icons/settings.svg +3 -0
  107. package/plugins/hellolynk-codex/runtime/workbench/ui/index.html +139 -0
  108. package/plugins/hellolynk-codex/runtime/workbench/ui/loopback-entry.mjs +26 -0
  109. package/plugins/hellolynk-codex/runtime/workbench/ui/mcp-app-client.mjs +151 -0
  110. package/plugins/hellolynk-codex/runtime/workbench/ui/mcp-app-entry.mjs +452 -0
  111. package/plugins/hellolynk-codex/runtime/workbench/ui/styles.css +686 -0
  112. package/plugins/hellolynk-codex/server/codex-neutral-production.mjs +520 -0
  113. package/plugins/hellolynk-codex/server/mcp-proxy.mjs +306 -0
  114. package/plugins/hellolynk-codex/server/mcp-server.mjs +1193 -0
  115. package/plugins/hellolynk-codex/server/native-conversation-directory.mjs +33 -0
  116. package/plugins/hellolynk-codex/server/native-reply-routes.mjs +32 -0
  117. package/plugins/hellolynk-codex/server/native-task-client.mjs +382 -0
  118. package/plugins/hellolynk-codex/server/native-task-runtime.mjs +8 -0
  119. package/plugins/hellolynk-codex/server/neutral-host-adapter.mjs +649 -0
  120. package/plugins/hellolynk-codex/server/workbench-runtime.mjs +180 -0
  121. package/plugins/hellolynk-codex/skills/hellolynk-open/SKILL.md +11 -0
  122. package/plugins/hellolynk-codex/skills/hellolynk-open/agents/openai.yaml +4 -0
  123. package/tools/hellolynk-activate-neutral-host-clients.mjs +837 -0
@@ -0,0 +1,180 @@
1
+ import fs from "node:fs/promises";
2
+ import { createHash } from "node:crypto";
3
+ import { fileURLToPath } from "node:url";
4
+
5
+ // Codex uses resource metadata before the app can report its intrinsic size.
6
+ // Keep a usable frame when its initial container limit is echoed by the app.
7
+ export const CODEX_WORKBENCH_RESOURCE_META = Object.freeze({
8
+ ui: Object.freeze({ prefersBorder: true, domain: "hellolynk.local" }),
9
+ "openai/widgetPrefersBorder": true,
10
+ "openai/widgetHeightHint": 680,
11
+ "openai/widgetMinFrameHeight": 680,
12
+ });
13
+
14
+ const CODEX_RESOURCE_URI_SEED = "ui://hellolynk/workbench-codex-pending.html";
15
+ const OUTPUT_SHA256_RE = /^[a-f0-9]{64}$/;
16
+ const SHARED_ROOTS = Object.freeze([
17
+ new URL("../runtime/workbench/", import.meta.url),
18
+ new URL("../../../clients/workbench/", import.meta.url),
19
+ ]);
20
+ let sharedWorkbenchModulesPromise = null;
21
+
22
+ export async function bootstrapCodexWorkbenchRuntime(options = {}) {
23
+ const shared = options.sharedModules || await loadSharedWorkbenchModules();
24
+ if (typeof shared?.bootstrapWorkbenchCandidate !== "function"
25
+ || !shared.HELLOLYNK_WORKBENCH_COMMAND_TYPES
26
+ || typeof shared.HELLOLYNK_WORKBENCH_COMMAND_TYPES !== "object"
27
+ || Array.isArray(shared.HELLOLYNK_WORKBENCH_COMMAND_TYPES)
28
+ || typeof shared.HELLOLYNK_WORKBENCH_COMMAND_CONTRACT !== "string"
29
+ || typeof shared.HELLOLYNK_WORKBENCH_RESULT_CONTRACT !== "string"
30
+ || !Number.isSafeInteger(shared.HELLOLYNK_WORKBENCH_SCHEMA_VERSION)
31
+ || shared.HELLOLYNK_WORKBENCH_SCHEMA_VERSION <= 0
32
+ || typeof shared.HELLOLYNK_WORKBENCH_SNAPSHOT_CONTRACT !== "string"
33
+ || !Number.isSafeInteger(shared.HELLOLYNK_WORKBENCH_SNAPSHOT_SCHEMA_VERSION)
34
+ || shared.HELLOLYNK_WORKBENCH_SNAPSHOT_SCHEMA_VERSION <= 0
35
+ || typeof shared.validateWorkbenchReadRequest !== "function"
36
+ || typeof shared.validateWorkbenchSnapshot !== "function"
37
+ || typeof shared.validateWorkbenchCommand !== "function"
38
+ || typeof shared.validateWorkbenchCommandResult !== "function") {
39
+ throw codeError("workbench_codex_shared_bootstrap_invalid");
40
+ }
41
+ const explicitResourceUri = options.resourceUri == null ? null : options.resourceUri;
42
+ const bootstrapped = await shared.bootstrapWorkbenchCandidate("codex", {
43
+ resourceUri: explicitResourceUri || CODEX_RESOURCE_URI_SEED,
44
+ });
45
+ const resourceUri = explicitResourceUri || codexWorkbenchResourceUri(bootstrapped);
46
+ const candidate = resourceUri === bootstrapped.resourceUri
47
+ ? bootstrapped
48
+ : Object.freeze({ ...bootstrapped, resourceUri });
49
+ if (options.adapter === undefined) return candidate;
50
+ if (typeof options.adapter?.readWorkbenchSnapshot !== "function") {
51
+ throw codeError("workbench_codex_rpc_adapter_invalid");
52
+ }
53
+ const commandTypes = Object.freeze(Object.values(shared.HELLOLYNK_WORKBENCH_COMMAND_TYPES));
54
+ if (commandTypes.length === 0 || new Set(commandTypes).size !== commandTypes.length
55
+ || commandTypes.some((value) => typeof value !== "string")) {
56
+ throw codeError("workbench_codex_shared_commands_invalid");
57
+ }
58
+ const readOnlyCandidate = {
59
+ resourceUri: candidate.resourceUri,
60
+ html: candidate.html,
61
+ readSnapshot: (input = {}) => options.adapter.readWorkbenchSnapshot(input),
62
+ ...(typeof options.adapter.readWorkbenchChanges === "function"
63
+ ? { readChanges: (input) => options.adapter.readWorkbenchChanges(input) } : {}),
64
+ ...(typeof options.connectAccount === "function" ? { connectAccount: options.connectAccount } : {}),
65
+ validateReadRequest: shared.validateWorkbenchReadRequest,
66
+ validateSnapshot: shared.validateWorkbenchSnapshot,
67
+ };
68
+ if (!supportsF3ActionGrantTransport(shared, candidate, options.adapter)) {
69
+ return Object.freeze(readOnlyCandidate);
70
+ }
71
+ return Object.freeze({
72
+ ...readOnlyCandidate,
73
+ snapshotContractId: shared.HELLOLYNK_WORKBENCH_SNAPSHOT_CONTRACT,
74
+ snapshotSchemaVersion: shared.HELLOLYNK_WORKBENCH_SNAPSHOT_SCHEMA_VERSION,
75
+ commandContractId: shared.HELLOLYNK_WORKBENCH_COMMAND_CONTRACT,
76
+ commandSchemaVersion: shared.HELLOLYNK_WORKBENCH_SCHEMA_VERSION,
77
+ resultContractId: shared.HELLOLYNK_WORKBENCH_RESULT_CONTRACT,
78
+ resultSchemaVersion: shared.HELLOLYNK_WORKBENCH_SCHEMA_VERSION,
79
+ commandTypes,
80
+ issueActionGrant: (command) => options.adapter.issueWorkbenchActionGrant(command),
81
+ executeCommand: (command, context) => options.adapter.executeWorkbenchCommand(command, context),
82
+ validateCommand: shared.validateWorkbenchCommand,
83
+ validateCommandResult: shared.validateWorkbenchCommandResult,
84
+ });
85
+ }
86
+
87
+ function codexWorkbenchResourceUri(candidate) {
88
+ const outputSha256 = String(candidate?.manifest?.outputSha256 || "");
89
+ if (!OUTPUT_SHA256_RE.test(outputSha256)) throw codeError("workbench_codex_output_sha256_invalid");
90
+ // Metadata changes must also invalidate Codex's cached resource.
91
+ const resourceSha256 = createHash("sha256")
92
+ .update(JSON.stringify({ outputSha256, meta: CODEX_WORKBENCH_RESOURCE_META }))
93
+ .digest("hex");
94
+ return `ui://hellolynk/workbench-codex-${resourceSha256}.html`;
95
+ }
96
+
97
+ function supportsF3ActionGrantTransport(shared, candidate, adapter) {
98
+ return shared.HELLOLYNK_WORKBENCH_SNAPSHOT_CONTRACT === "hellolynk-workbench-snapshot-v12"
99
+ && shared.HELLOLYNK_WORKBENCH_SNAPSHOT_SCHEMA_VERSION === 12
100
+ && shared.HELLOLYNK_WORKBENCH_COMMAND_CONTRACT === "hellolynk-workbench-command-v6"
101
+ && shared.HELLOLYNK_WORKBENCH_RESULT_CONTRACT === "hellolynk-workbench-command-result-v6"
102
+ && shared.HELLOLYNK_WORKBENCH_SCHEMA_VERSION === 6
103
+ && candidate?.manifest?.sourceContract === shared.HELLOLYNK_WORKBENCH_SNAPSHOT_CONTRACT
104
+ && typeof candidate.html === "string"
105
+ && candidate.html.includes("hellolynk_workbench_action_grant")
106
+ && candidate.html.includes("hellolynk_workbench_command")
107
+ && candidate.html.includes("_hellolynkUiActionGrant")
108
+ && typeof adapter?.issueWorkbenchActionGrant === "function"
109
+ && adapter.issueWorkbenchActionGrant.length >= 1
110
+ && typeof adapter?.executeWorkbenchCommand === "function"
111
+ && adapter.executeWorkbenchCommand.length >= 2;
112
+ }
113
+
114
+ export async function loadCodexWorkbenchContract() {
115
+ const shared = await loadSharedWorkbenchModules();
116
+ for (const name of [
117
+ "validateWorkbenchReadRequest",
118
+ "validateWorkbenchSnapshot",
119
+ "validateWorkbenchCommand",
120
+ "validateWorkbenchCommandResult",
121
+ ]) {
122
+ if (typeof shared[name] !== "function") {
123
+ throw codeError("workbench_codex_shared_contract_invalid");
124
+ }
125
+ }
126
+ return shared;
127
+ }
128
+
129
+ async function loadSharedWorkbenchModules() {
130
+ if (!sharedWorkbenchModulesPromise) {
131
+ sharedWorkbenchModulesPromise = (async () => {
132
+ const root = await resolveSharedWorkbenchRoot();
133
+ const [bootstrap, contract] = await Promise.all([
134
+ import(new URL("candidate-bootstrap.mjs", root)),
135
+ import(new URL("contract.mjs", root)),
136
+ ]).catch(() => {
137
+ throw codeError("workbench_codex_shared_bootstrap_invalid");
138
+ });
139
+ return Object.freeze({
140
+ bootstrapWorkbenchCandidate: bootstrap.bootstrapWorkbenchCandidate,
141
+ HELLOLYNK_WORKBENCH_COMMAND_CONTRACT: contract.HELLOLYNK_WORKBENCH_COMMAND_CONTRACT,
142
+ HELLOLYNK_WORKBENCH_RESULT_CONTRACT: contract.HELLOLYNK_WORKBENCH_RESULT_CONTRACT,
143
+ HELLOLYNK_WORKBENCH_SCHEMA_VERSION: contract.HELLOLYNK_WORKBENCH_SCHEMA_VERSION,
144
+ HELLOLYNK_WORKBENCH_SNAPSHOT_CONTRACT: contract.HELLOLYNK_WORKBENCH_SNAPSHOT_CONTRACT,
145
+ HELLOLYNK_WORKBENCH_SNAPSHOT_SCHEMA_VERSION: contract.HELLOLYNK_WORKBENCH_SNAPSHOT_SCHEMA_VERSION,
146
+ HELLOLYNK_WORKBENCH_COMMAND_TYPES: contract.HELLOLYNK_WORKBENCH_COMMAND_TYPES,
147
+ validateWorkbenchReadRequest: contract.validateWorkbenchReadRequest,
148
+ validateWorkbenchSnapshot: contract.validateWorkbenchSnapshot,
149
+ validateWorkbenchCommand: contract.validateWorkbenchCommand,
150
+ validateWorkbenchCommandResult: contract.validateWorkbenchCommandResult,
151
+ });
152
+ })();
153
+ }
154
+ try {
155
+ return await sharedWorkbenchModulesPromise;
156
+ } catch (error) {
157
+ sharedWorkbenchModulesPromise = null;
158
+ throw error;
159
+ }
160
+ }
161
+
162
+ async function resolveSharedWorkbenchRoot() {
163
+ for (const root of SHARED_ROOTS) {
164
+ const required = ["candidate-bootstrap.mjs", "contract.mjs"]
165
+ .map((relative) => fileURLToPath(new URL(relative, root)));
166
+ try {
167
+ const metadata = await Promise.all(required.map((target) => fs.lstat(target)));
168
+ if (metadata.every((item) => item.isFile() && !item.isSymbolicLink())) return root;
169
+ } catch (error) {
170
+ if (error?.code !== "ENOENT") throw codeError("workbench_codex_shared_bootstrap_invalid");
171
+ }
172
+ }
173
+ throw codeError("workbench_codex_shared_bootstrap_unavailable");
174
+ }
175
+
176
+ function codeError(code) {
177
+ const error = new Error(code);
178
+ error.code = code;
179
+ return error;
180
+ }
@@ -0,0 +1,11 @@
1
+ ---
2
+ name: hellolynk-open
3
+ description: 在 Codex 中打开 HelloLynk 通讯,或按本人明确要求联系指定的人或 AI。不用于邮件。
4
+ ---
5
+ # 联系指定的人或 AI
6
+
7
+ 本人说「联系 Claude,让他跟你一起做」这类明确的联系请求时,从可用工具中找 HelloLynk。发起新通信用 `hellolynk_send_authorized_message`,`contact` 填对方名字。找不到授权联系人或有重名时,核对对象后再发。接着本聊天已有的来信用 `hellolynk_reply_authorized_message`,沿用来信的 `localMessageId` 和 `conversationKey`。
8
+
9
+ # 打开 HelloLynk
10
+ 1. 打开 HelloLynk:请用户点 Codex 左侧栏的 HelloLynk。
11
+ 2. 要在聊天里显示卡片:调用 hellolynk_open 一次。
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "HelloLynk 通讯"
3
+ short_description: "在 Codex 中打开 HelloLynk 通讯"
4
+ default_prompt: "使用 $hellolynk-open 打开 HelloLynk。"