agent-deeplinks 0.1.26 → 0.1.28
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 +12 -1
- package/dist/catalog.d.ts +17 -10
- package/dist/catalog.js +22 -8
- package/dist/index.js +46 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ On npm 12, add `--allow-remote=root` when installing the tarball URL. [npm 12 in
|
|
|
21
21
|
You can also download the ZIP from GitHub Releases and install its bundled npm tarball. The ZIP includes a static demo and the SVG files.
|
|
22
22
|
|
|
23
23
|
```sh
|
|
24
|
-
npm install ./agent-deeplinks-0.1.
|
|
24
|
+
npm install ./agent-deeplinks-0.1.28.tgz
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
## Usage
|
|
@@ -90,8 +90,19 @@ ZCode's web, iOS, and Android links open its versioned Remote Control sign-in pa
|
|
|
90
90
|
Kimi Code Desktop accepts a local `directory` and opens a fresh draft. Hosted Remote Control uses the same Kimi account as the running host. Supply `server` for another region or for a local address from `kimi web`, then enter the local server token in the browser.
|
|
91
91
|
|
|
92
92
|
Call `getAgentLink("openclaw", "desktop")` or choose `"ios"` to open the dashboard. With a connected Gateway, supplying a prompt opens OpenClaw's run confirmation.
|
|
93
|
+
For the macOS [Add Gateway form](https://docs.openclaw.ai/platforms/mac/remote#open-the-mac-app-from-a-website), supply the Gateway HTTPS base address in `server`. The address can include a port and path. The user reviews it and chooses **Connect** in OpenClaw.
|
|
94
|
+
On iOS, pass a Gateway origin in `server` to stage the host, port, and TLS for review. Use HTTPS or WSS for TLS. HTTP and WS are limited to local hosts. Omitted ports use 443 for TLS and 18789 for plaintext. Enter credentials in the app if prompted. [iOS Gateway review](https://github.com/openclaw/openclaw/blob/v2026.11.8/apps/ios/Sources/Onboarding/OnboardingWizardView.swift#L938-L985)
|
|
93
95
|
On Android, pass the configured Gateway address in `server` to open its Control UI in a browser.
|
|
94
96
|
|
|
97
|
+
```ts
|
|
98
|
+
const gatewaySetup = getAgentLink("openclaw", "desktop", {
|
|
99
|
+
server: "https://gateway.example.com/openclaw/",
|
|
100
|
+
})
|
|
101
|
+
const mobileGatewaySetup = getAgentLink("openclaw", "ios", {
|
|
102
|
+
server: "https://gateway.example.com:18443",
|
|
103
|
+
})
|
|
104
|
+
```
|
|
105
|
+
|
|
95
106
|
Use `getHermesSkillLink("official/security/1password")` or pass a direct skill URL to open Hermes Desktop's [skill install review](https://hermes-agent.nousresearch.com/docs/user-guide/features/skills#desktop-install-links). The signed macOS canary displayed the requested skill and destination before installation.
|
|
96
107
|
|
|
97
108
|
### shadcn/ui
|
package/dist/catalog.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ export interface AgentRoute {
|
|
|
20
20
|
readonly modes?: readonly string[];
|
|
21
21
|
readonly encodeQueryValuesTwice?: boolean;
|
|
22
22
|
readonly serverBehavior?: LinkBehavior;
|
|
23
|
+
readonly serverSource?: string;
|
|
23
24
|
readonly promptLimit?: number;
|
|
24
25
|
readonly promptLimitUnit?: "grapheme";
|
|
25
26
|
readonly urlLimit?: number;
|
|
@@ -55,11 +56,11 @@ declare const catalog: {
|
|
|
55
56
|
};
|
|
56
57
|
readonly desktop: {
|
|
57
58
|
readonly url: "cursor://anysphere.cursor-deeplink/prompt";
|
|
59
|
+
readonly evidence: "verified";
|
|
58
60
|
readonly encodeQueryValuesTwice: true;
|
|
59
|
-
readonly sources: readonly ["https://cursor.com/docs/reference/deeplinks", "https://github.com/lalalune/agent-deeplinks/actions/runs/45460026095/job/138679769952", "https://github.com/lalalune/agent-deeplinks/actions/runs/45460380555/job/138681026834", "https://github.com/lalalune/agent-deeplinks/actions/runs/45489023213/artifacts/14966850011"];
|
|
60
|
-
readonly note: "Cursor
|
|
61
|
+
readonly sources: readonly ["https://cursor.com/docs/reference/deeplinks", "https://github.com/lalalune/agent-deeplinks/actions/runs/45491150004/job/138789493816", "https://github.com/lalalune/agent-deeplinks/actions/runs/45491628951/job/138791208997", "https://github.com/lalalune/agent-deeplinks/actions/runs/45492105855/artifacts/14968450079", "https://github.com/lalalune/agent-deeplinks/actions/runs/45460026095/job/138679769952", "https://github.com/lalalune/agent-deeplinks/actions/runs/45460380555/job/138681026834", "https://github.com/lalalune/agent-deeplinks/actions/runs/45489023213/artifacts/14966850011"];
|
|
62
|
+
readonly note: "Cursor 3.31.15 opened Create chat with prompt in the running classic editor on macOS, Ubuntu, and Windows. All three renderers showed the exact multiline Unicode prompt.";
|
|
61
63
|
readonly behavior: "confirm";
|
|
62
|
-
readonly evidence: "documented";
|
|
63
64
|
readonly fields: {
|
|
64
65
|
readonly prompt: "text";
|
|
65
66
|
};
|
|
@@ -70,7 +71,7 @@ declare const catalog: {
|
|
|
70
71
|
readonly url: "https://cursor.com/agents";
|
|
71
72
|
readonly behavior: "launch";
|
|
72
73
|
readonly evidence: "source";
|
|
73
|
-
readonly sources: readonly ["https://cursor.com/.well-known/apple-app-site-association", "https://cursor.com/docs/cloud-agent/mobile"];
|
|
74
|
+
readonly sources: readonly ["https://cursor.com/.well-known/apple-app-site-association", "https://cursor.com/docs/cloud-agent/mobile", "https://github.com/lalalune/agent-deeplinks/actions/runs/45493929967/artifacts/14966133706"];
|
|
74
75
|
readonly note: "Universal Link for the Cursor Cloud Agents inbox. The iPhone browser fallback reached Cursor sign-in.";
|
|
75
76
|
};
|
|
76
77
|
readonly android: {
|
|
@@ -127,7 +128,7 @@ declare const catalog: {
|
|
|
127
128
|
readonly url: "https://cursor.com/grok-bot/link/v1/prompt";
|
|
128
129
|
readonly behavior: "handoff";
|
|
129
130
|
readonly evidence: "verified";
|
|
130
|
-
readonly sources: readonly ["https://docs.x.ai/grok-bot/deep-links", "https://github.com/lalalune/agent-deeplinks/actions/runs/45488932416/artifacts/14966115165"];
|
|
131
|
+
readonly sources: readonly ["https://docs.x.ai/grok-bot/deep-links", "https://github.com/lalalune/agent-deeplinks/actions/runs/45488932416/artifacts/14966115165", "https://github.com/lalalune/agent-deeplinks/actions/runs/45493929967/artifacts/14966133706"];
|
|
131
132
|
readonly note: "The published Playground opened the native Grok Bot sign-in screen through stock Chrome on Ubuntu after the browser’s one-time approval. The mobile browser preview also produced the exact native URL.";
|
|
132
133
|
readonly fields: {
|
|
133
134
|
readonly prompt: "text";
|
|
@@ -645,7 +646,7 @@ declare const catalog: {
|
|
|
645
646
|
readonly url: "https://kimi.onelink.me/BZg1/";
|
|
646
647
|
readonly behavior: "handoff";
|
|
647
648
|
readonly evidence: "source";
|
|
648
|
-
readonly sources: readonly ["https://kimi.onelink.me/.well-known/apple-app-site-association", "https://kimi.onelink.me/BZg1/"];
|
|
649
|
+
readonly sources: readonly ["https://kimi.onelink.me/.well-known/apple-app-site-association", "https://kimi.onelink.me/BZg1/", "https://github.com/lalalune/agent-deeplinks/actions/runs/45493929967/artifacts/14966133706"];
|
|
649
650
|
readonly note: "Associated with Kimi for iOS. The browser fallback opens the App Store.";
|
|
650
651
|
};
|
|
651
652
|
readonly android: {
|
|
@@ -941,29 +942,35 @@ declare const catalog: {
|
|
|
941
942
|
readonly url: "openclaw://agent";
|
|
942
943
|
readonly behavior: "confirm";
|
|
943
944
|
readonly evidence: "verified";
|
|
944
|
-
readonly sources: readonly ["https://github.com/openclaw/openclaw/blob/v2026.11.7/apps/macos/Sources/OpenClaw/DeepLinks.swift", "https://github.com/lalalune/agent-deeplinks/actions/runs/45473423005/job/138727187042", "https://github.com/lalalune/agent-deeplinks/actions/runs/45476772927/job/138738941929"];
|
|
945
|
+
readonly sources: readonly ["https://github.com/openclaw/openclaw/blob/v2026.11.7/apps/macos/Sources/OpenClaw/DeepLinks.swift", "https://github.com/lalalune/agent-deeplinks/actions/runs/45473423005/job/138727187042", "https://github.com/lalalune/agent-deeplinks/actions/runs/45476772927/job/138738941929", "https://docs.openclaw.ai/platforms/mac/remote#open-the-mac-app-from-a-website", "https://github.com/lalalune/agent-deeplinks/actions/runs/45491339853/job/138790178318"];
|
|
945
946
|
readonly fields: {
|
|
946
947
|
readonly prompt: "message";
|
|
948
|
+
readonly server: "";
|
|
947
949
|
};
|
|
950
|
+
readonly serverBehavior: "confirm";
|
|
951
|
+
readonly serverSource: "https://docs.openclaw.ai/platforms/mac/remote#open-the-mac-app-from-a-website";
|
|
948
952
|
readonly required: readonly ["prompt"];
|
|
949
953
|
readonly launchUrl: "openclaw://dashboard";
|
|
950
954
|
readonly promptLimit: 240;
|
|
951
955
|
readonly promptLimitUnit: "grapheme";
|
|
952
|
-
readonly note: "With a connected Gateway,
|
|
956
|
+
readonly note: "With a connected Gateway, signed macOS 2026.11.7 showed the exact message and Run confirmation. A blank link opened its Control UI. Version 2026.11.8 displayed the exact HTTPS address in Add Gateway.";
|
|
953
957
|
};
|
|
954
958
|
readonly ios: {
|
|
955
959
|
readonly url: "openclaw://agent";
|
|
956
960
|
readonly behavior: "confirm";
|
|
957
961
|
readonly evidence: "verified";
|
|
958
|
-
readonly sources: readonly ["https://github.com/openclaw/openclaw/blob/v2026.11.8/apps/ios/Sources/Model/NodeAppModel.swift", "https://github.com/lalalune/agent-deeplinks/actions/runs/45448771787/job/138639754996", "https://github.com/lalalune/agent-deeplinks/actions/runs/45454334627/job/138659607326", "https://github.com/lalalune/agent-deeplinks/actions/runs/45465579013/job/138699488297"];
|
|
962
|
+
readonly sources: readonly ["https://github.com/openclaw/openclaw/blob/v2026.11.8/apps/ios/Sources/Model/NodeAppModel.swift", "https://github.com/lalalune/agent-deeplinks/actions/runs/45448771787/job/138639754996", "https://github.com/lalalune/agent-deeplinks/actions/runs/45454334627/job/138659607326", "https://github.com/lalalune/agent-deeplinks/actions/runs/45465579013/job/138699488297", "https://github.com/openclaw/openclaw/blob/v2026.11.8/apps/ios/Sources/Onboarding/OnboardingWizardView.swift#L938-L985"];
|
|
959
963
|
readonly fields: {
|
|
960
964
|
readonly prompt: "message";
|
|
965
|
+
readonly server: "";
|
|
961
966
|
};
|
|
967
|
+
readonly serverBehavior: "confirm";
|
|
968
|
+
readonly serverSource: "https://github.com/openclaw/openclaw/blob/v2026.11.8/apps/ios/Sources/Onboarding/OnboardingWizardView.swift#L938-L985";
|
|
962
969
|
readonly required: readonly ["prompt"];
|
|
963
970
|
readonly launchUrl: "openclaw://dashboard";
|
|
964
971
|
readonly promptLimit: 240;
|
|
965
972
|
readonly promptLimitUnit: "grapheme";
|
|
966
|
-
readonly note: "The blank link opens native Overview. With a paired Gateway, the prompt link showed the exact message and Run confirmation in a source-built OpenClaw 2026.11.8 app on an iOS 27.2 simulator.
|
|
973
|
+
readonly note: "The blank link opens native Overview. With a paired Gateway, the prompt link showed the exact message and Run confirmation in a source-built OpenClaw 2026.11.8 app on an iOS 27.2 simulator. A Gateway address stages the host, port, and TLS for review.";
|
|
967
974
|
};
|
|
968
975
|
readonly android: {
|
|
969
976
|
readonly url: "http://127.0.0.1:18789/";
|
package/dist/catalog.js
CHANGED
|
@@ -10,6 +10,8 @@ export const platformNames = {
|
|
|
10
10
|
const cursorDocs = "https://cursor.com/docs/reference/deeplinks";
|
|
11
11
|
const cursorCloudDocs = "https://cursor.com/docs/cloud-agent";
|
|
12
12
|
const cursorCloud = "https://cursor.com/agents";
|
|
13
|
+
const openClawMacGatewaySource = "https://docs.openclaw.ai/platforms/mac/remote#open-the-mac-app-from-a-website";
|
|
14
|
+
const openClawIosGatewaySource = "https://github.com/openclaw/openclaw/blob/v2026.11.8/apps/ios/Sources/Onboarding/OnboardingWizardView.swift#L938-L985";
|
|
13
15
|
const claudeCodeDocs = "https://code.claude.com/docs/en/deep-links";
|
|
14
16
|
const claudeDesktopDocs = "https://support.claude.com/en/articles/14729294-open-claude-desktop-with-a-link";
|
|
15
17
|
const claudeDesktopChecks = [
|
|
@@ -36,6 +38,7 @@ const slopDate = "https://slop.date/";
|
|
|
36
38
|
const slopCash = "https://slop.cash/";
|
|
37
39
|
const vibestack = "https://vibestack.fun/";
|
|
38
40
|
const cursorIosAssociation = "https://cursor.com/.well-known/apple-app-site-association";
|
|
41
|
+
const iosAssociationCheck = "https://github.com/lalalune/agent-deeplinks/actions/runs/45493929967/artifacts/14966133706";
|
|
39
42
|
const grokIosAssociation = "https://grok.com/.well-known/apple-app-site-association";
|
|
40
43
|
const grokAndroidAssociation = "https://grok.com/.well-known/assetlinks.json";
|
|
41
44
|
const geminiIos = "https://gemini.google.com/app/download/ios";
|
|
@@ -158,20 +161,24 @@ const catalog = {
|
|
|
158
161
|
desktop: {
|
|
159
162
|
...cursorRoute,
|
|
160
163
|
url: "cursor://anysphere.cursor-deeplink/prompt",
|
|
164
|
+
evidence: "verified",
|
|
161
165
|
encodeQueryValuesTwice: true,
|
|
162
166
|
sources: [
|
|
163
167
|
cursorDocs,
|
|
168
|
+
"https://github.com/lalalune/agent-deeplinks/actions/runs/45491150004/job/138789493816",
|
|
169
|
+
"https://github.com/lalalune/agent-deeplinks/actions/runs/45491628951/job/138791208997",
|
|
170
|
+
"https://github.com/lalalune/agent-deeplinks/actions/runs/45492105855/artifacts/14968450079",
|
|
164
171
|
"https://github.com/lalalune/agent-deeplinks/actions/runs/45460026095/job/138679769952",
|
|
165
172
|
"https://github.com/lalalune/agent-deeplinks/actions/runs/45460380555/job/138681026834",
|
|
166
173
|
"https://github.com/lalalune/agent-deeplinks/actions/runs/45489023213/artifacts/14966850011",
|
|
167
174
|
],
|
|
168
|
-
note: "Cursor
|
|
175
|
+
note: "Cursor 3.31.15 opened Create chat with prompt in the running classic editor on macOS, Ubuntu, and Windows. All three renderers showed the exact multiline Unicode prompt.",
|
|
169
176
|
},
|
|
170
177
|
ios: {
|
|
171
178
|
url: cursorCloud,
|
|
172
179
|
behavior: "launch",
|
|
173
180
|
evidence: "source",
|
|
174
|
-
sources: [cursorIosAssociation, "https://cursor.com/docs/cloud-agent/mobile"],
|
|
181
|
+
sources: [cursorIosAssociation, "https://cursor.com/docs/cloud-agent/mobile", iosAssociationCheck],
|
|
175
182
|
note: "Universal Link for the Cursor Cloud Agents inbox. The iPhone browser fallback reached Cursor sign-in.",
|
|
176
183
|
},
|
|
177
184
|
android: {
|
|
@@ -225,7 +232,7 @@ const catalog = {
|
|
|
225
232
|
url: "https://cursor.com/grok-bot/link/v1/prompt",
|
|
226
233
|
behavior: "handoff",
|
|
227
234
|
evidence: "verified",
|
|
228
|
-
sources: [grokBotDocs, "https://github.com/lalalune/agent-deeplinks/actions/runs/45488932416/artifacts/14966115165"],
|
|
235
|
+
sources: [grokBotDocs, "https://github.com/lalalune/agent-deeplinks/actions/runs/45488932416/artifacts/14966115165", iosAssociationCheck],
|
|
229
236
|
note: "The published Playground opened the native Grok Bot sign-in screen through stock Chrome on Ubuntu after the browser’s one-time approval. The mobile browser preview also produced the exact native URL.",
|
|
230
237
|
},
|
|
231
238
|
desktop: {
|
|
@@ -623,7 +630,7 @@ const catalog = {
|
|
|
623
630
|
url: kimiMobile,
|
|
624
631
|
behavior: "handoff",
|
|
625
632
|
evidence: "source",
|
|
626
|
-
sources: ["https://kimi.onelink.me/.well-known/apple-app-site-association", kimiMobile],
|
|
633
|
+
sources: ["https://kimi.onelink.me/.well-known/apple-app-site-association", kimiMobile, iosAssociationCheck],
|
|
627
634
|
note: "Associated with Kimi for iOS. The browser fallback opens the App Store.",
|
|
628
635
|
},
|
|
629
636
|
android: {
|
|
@@ -843,13 +850,17 @@ const catalog = {
|
|
|
843
850
|
"https://github.com/openclaw/openclaw/blob/v2026.11.7/apps/macos/Sources/OpenClaw/DeepLinks.swift",
|
|
844
851
|
"https://github.com/lalalune/agent-deeplinks/actions/runs/45473423005/job/138727187042",
|
|
845
852
|
"https://github.com/lalalune/agent-deeplinks/actions/runs/45476772927/job/138738941929",
|
|
853
|
+
openClawMacGatewaySource,
|
|
854
|
+
"https://github.com/lalalune/agent-deeplinks/actions/runs/45491339853/job/138790178318",
|
|
846
855
|
],
|
|
847
|
-
fields: { prompt: "message" },
|
|
856
|
+
fields: { prompt: "message", server: "" },
|
|
857
|
+
serverBehavior: "confirm",
|
|
858
|
+
serverSource: openClawMacGatewaySource,
|
|
848
859
|
required: ["prompt"],
|
|
849
860
|
launchUrl: "openclaw://dashboard",
|
|
850
861
|
promptLimit: 240,
|
|
851
862
|
promptLimitUnit: "grapheme",
|
|
852
|
-
note: "With a connected Gateway,
|
|
863
|
+
note: "With a connected Gateway, signed macOS 2026.11.7 showed the exact message and Run confirmation. A blank link opened its Control UI. Version 2026.11.8 displayed the exact HTTPS address in Add Gateway.",
|
|
853
864
|
},
|
|
854
865
|
ios: {
|
|
855
866
|
url: "openclaw://agent",
|
|
@@ -860,13 +871,16 @@ const catalog = {
|
|
|
860
871
|
"https://github.com/lalalune/agent-deeplinks/actions/runs/45448771787/job/138639754996",
|
|
861
872
|
"https://github.com/lalalune/agent-deeplinks/actions/runs/45454334627/job/138659607326",
|
|
862
873
|
"https://github.com/lalalune/agent-deeplinks/actions/runs/45465579013/job/138699488297",
|
|
874
|
+
openClawIosGatewaySource,
|
|
863
875
|
],
|
|
864
|
-
fields: { prompt: "message" },
|
|
876
|
+
fields: { prompt: "message", server: "" },
|
|
877
|
+
serverBehavior: "confirm",
|
|
878
|
+
serverSource: openClawIosGatewaySource,
|
|
865
879
|
required: ["prompt"],
|
|
866
880
|
launchUrl: "openclaw://dashboard",
|
|
867
881
|
promptLimit: 240,
|
|
868
882
|
promptLimitUnit: "grapheme",
|
|
869
|
-
note: "The blank link opens native Overview. With a paired Gateway, the prompt link showed the exact message and Run confirmation in a source-built OpenClaw 2026.11.8 app on an iOS 27.2 simulator.
|
|
883
|
+
note: "The blank link opens native Overview. With a paired Gateway, the prompt link showed the exact message and Run confirmation in a source-built OpenClaw 2026.11.8 app on an iOS 27.2 simulator. A Gateway address stages the host, port, and TLS for review.",
|
|
870
884
|
},
|
|
871
885
|
android: {
|
|
872
886
|
url: "http://127.0.0.1:18789/",
|
package/dist/index.js
CHANGED
|
@@ -21,6 +21,49 @@ function parseServerUrl(value) {
|
|
|
21
21
|
return null;
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
+
function isOpenClawLocalHost(hostname) {
|
|
25
|
+
// Apply OpenClaw's plaintext policy to the canonical hostname returned by URL.
|
|
26
|
+
const host = hostname.replace(/\.$/u, "");
|
|
27
|
+
if (["localhost", "0.0.0.0", "::", "::1"].includes(host) || host.endsWith(".local"))
|
|
28
|
+
return true;
|
|
29
|
+
if (/^(?:f[cd][\da-f]{2}:|fe[89ab][\da-f]:|::ffff:7f[\da-f]{2}:)/u.test(host))
|
|
30
|
+
return true;
|
|
31
|
+
if (!/^(?:\d{1,3}\.){3}\d{1,3}$/u.test(host))
|
|
32
|
+
return false;
|
|
33
|
+
const [first, second = 0] = host.split(".").map(Number);
|
|
34
|
+
return first === 10 || first === 127 || (first === 192 && second === 168) ||
|
|
35
|
+
(first === 169 && second === 254) || (first === 172 && second >= 16 && second <= 31);
|
|
36
|
+
}
|
|
37
|
+
function getOpenClawGatewayLink(address, platform) {
|
|
38
|
+
const match = /^(?:https?|wss?):\/\/([^/\s@\\?#]+)(\/[^\\?#]*)?$/iu.exec(address);
|
|
39
|
+
if (!match || hiddenPathCharacters.test(address))
|
|
40
|
+
return null;
|
|
41
|
+
let gateway;
|
|
42
|
+
try {
|
|
43
|
+
gateway = new URL(address);
|
|
44
|
+
}
|
|
45
|
+
catch {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
if (gateway.port === "0")
|
|
49
|
+
return null;
|
|
50
|
+
if (platform === "desktop") {
|
|
51
|
+
return gateway.protocol === "https:"
|
|
52
|
+
? `openclaw://gateway/add?url=${encodeURIComponent(gateway.href)}`
|
|
53
|
+
: null;
|
|
54
|
+
}
|
|
55
|
+
const [, authority = "", path] = match;
|
|
56
|
+
if (path && path !== "/")
|
|
57
|
+
return null;
|
|
58
|
+
const tls = gateway.protocol === "https:" || gateway.protocol === "wss:";
|
|
59
|
+
const host = gateway.hostname.replace(/^\[|\]$/gu, "");
|
|
60
|
+
if (!tls && !isOpenClawLocalHost(host))
|
|
61
|
+
return null;
|
|
62
|
+
// The URL parser removes an explicit default scheme port, which the native setup form still needs.
|
|
63
|
+
const explicitPort = /:(\d+)$/u.exec(authority)?.[1];
|
|
64
|
+
const port = explicitPort === undefined ? (tls ? 443 : 18789) : Number(explicitPort);
|
|
65
|
+
return `openclaw://gateway?host=${encodeURIComponent(host)}&port=${port}&tls=${tls ? 1 : 0}`;
|
|
66
|
+
}
|
|
24
67
|
function getOpenCodeOrigin(url) {
|
|
25
68
|
const local = ["localhost", "127.0.0.1", "[::1]"].includes(url.hostname);
|
|
26
69
|
return url.pathname === "/" && (url.protocol === "https:" || local) ? url.origin : null;
|
|
@@ -135,6 +178,9 @@ export function getAgentLink(agent, platform, options = {}) {
|
|
|
135
178
|
if ((route.experimental && !options.allowExperimental) ||
|
|
136
179
|
(route.behavior === "send" && !options.allowSend))
|
|
137
180
|
return null;
|
|
181
|
+
if (agent === "openclaw" && (platform === "desktop" || platform === "ios") && fields.server) {
|
|
182
|
+
return fields.prompt ? null : getOpenClawGatewayLink(fields.server, platform);
|
|
183
|
+
}
|
|
138
184
|
if (route.required?.some((field) => !fields[field]?.trim()))
|
|
139
185
|
return null;
|
|
140
186
|
if (agent === "github-copilot" && platform !== "vscode" &&
|