agent-deeplinks 0.0.0-stage → 0.1.14
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/LICENSE +21 -0
- package/README.md +120 -2
- package/dist/catalog.d.ts +918 -0
- package/dist/catalog.js +755 -0
- package/dist/generated-icons.d.ts +1 -0
- package/dist/generated-icons.js +22 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +143 -0
- package/dist/react.d.ts +14 -0
- package/dist/react.js +16 -0
- package/icons/README.md +12 -0
- package/icons/antigravity.svg +76 -0
- package/icons/chatgpt.svg +3 -0
- package/icons/claude-code.svg +7 -0
- package/icons/claude.svg +26 -0
- package/icons/codex.svg +6 -0
- package/icons/cursor.svg +12 -0
- package/icons/gemini.svg +1 -0
- package/icons/grok-bot.svg +1 -0
- package/icons/grok.svg +31 -0
- package/icons/hermes.svg +104 -0
- package/icons/kimi-code.svg +17 -0
- package/icons/kimi.svg +1 -0
- package/icons/meta-ai.svg +649 -0
- package/icons/meta-muse.svg +16 -0
- package/icons/openclaw.svg +22 -0
- package/icons/opencode.svg +16 -0
- package/icons/perplexity.svg +1 -0
- package/icons/t3-code.svg +4 -0
- package/icons/zcode.svg +5 -0
- package/package.json +76 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Shaw
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,121 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Agent Deeplinks
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Open AI agents from a website, a README, or an app. The package builds provider URLs, includes SVG brand marks, and ships a React link that works with shadcn/ui.
|
|
4
|
+
|
|
5
|
+
[Demo](https://agent-deeplinks.pages.dev/) · [Download ZIP](https://github.com/lalalune/agent-deeplinks/releases/latest/download/agent-deeplinks.zip) · [Evidence and source notes](research/README.md)
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
Once the first version is on npm, install it by name.
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
npm install agent-deeplinks
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
You can install the tarball directly from GitHub Releases today.
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
npm install https://github.com/lalalune/agent-deeplinks/releases/latest/download/agent-deeplinks.tgz
|
|
19
|
+
```
|
|
20
|
+
|
|
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
|
+
|
|
23
|
+
```sh
|
|
24
|
+
npm install ./agent-deeplinks-0.1.14.tgz
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Usage
|
|
28
|
+
|
|
29
|
+
The TypeScript API works without React.
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
import { agents, getAgentLink, getAgentRoute } from "agent-deeplinks"
|
|
33
|
+
|
|
34
|
+
const url = getAgentLink("cursor", "web", { prompt: "Explain this project." })
|
|
35
|
+
const route = getAgentRoute("cursor", "web")
|
|
36
|
+
console.log(url, route?.behavior, agents.cursor.name)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
`getAgentLink(agent, platform, options)` returns a URL or `null` if the route is unavailable, its parameters are invalid, or it needs an opt-in. Platform IDs are `web`, `desktop`, `ios`, `android`, `cli`, and `vscode`. Call `getAgentRoute` to see the accepted fields, behavior, constraints, sources, and evidence. `agents[id].home` is a product-site fallback.
|
|
40
|
+
|
|
41
|
+
Experimental routes require `allowExperimental: true`. Routes that auto-submit require `allowSend: true`. Prompt text goes into the URL and can appear in browser history and logs. Keep credentials and private data out of shareable links.
|
|
42
|
+
|
|
43
|
+
Claude Code's iOS, Android, and HTTPS draft links support a prompt, a session `mode` of `plan` or `code`, an optional GitHub `repo` in `owner/name` format, and an optional `branch` when a repository is supplied.
|
|
44
|
+
|
|
45
|
+
Use `getAgentLink("claude-code", "vscode", { prompt: "Review my changes." })` to prefill a draft in the Claude Code extension for VS Code. Pass `session` to resume a session from the current workspace.
|
|
46
|
+
|
|
47
|
+
For Claude and Claude Code web links, use `browserOnly: true` to keep the link in the browser on iOS. Leave it unset for the usual Universal Link handoff.
|
|
48
|
+
|
|
49
|
+
Codex desktop links can carry both an absolute `path` and an `originUrl`. The desktop app tries the local path first and then matches the remote if the path does not resolve to a directory.
|
|
50
|
+
|
|
51
|
+
For Hermes and OpenClaw, set `server` to the URL of your Webapp or Control UI when opening from another device. With no address supplied, the Web links use each product's localhost default. In a fresh local browser tab, Hermes shows how to sign in with the host's `hermes webapp` command. Hermes on iOS and Android requires your configured Web Access address.
|
|
52
|
+
|
|
53
|
+
For OpenCode 2.x on the web or in an iPhone browser, supply the server origin in `server` and select your project after sign-in. The Web route's optional `directory` parameter builds the older OpenCode 1.x project URL. OpenCode Desktop accepts the local directory and an optional prompt.
|
|
54
|
+
|
|
55
|
+
T3 Code accepts an optional server origin on the web. Leave it unset for the hosted chooser. For a self-hosted link, pair that browser with your T3 server and let the workspace connect first.
|
|
56
|
+
|
|
57
|
+
ZCode's web, iOS, and Android links open its versioned Remote Control sign-in page in a browser. Connecting requires the same account and region as an online desktop with Remote Control enabled. [ZCode Remote Control instructions](https://zcode.z.ai/en/docs/remote-control)
|
|
58
|
+
|
|
59
|
+
Kimi Code Desktop accepts a local `directory` and opens a fresh draft. The browser routes open the Remote Control device picker and use the same Kimi account as the running host. Supply `server` for another region or for a LAN Web address from `kimi web` without the login token.
|
|
60
|
+
|
|
61
|
+
Call `getAgentLink("openclaw", "desktop")` or choose `"ios"` to open the dashboard. Supplying a prompt opens OpenClaw's run confirmation.
|
|
62
|
+
On Android, pass the configured Gateway address in `server` to open its Control UI in a browser.
|
|
63
|
+
|
|
64
|
+
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).
|
|
65
|
+
|
|
66
|
+
### shadcn/ui
|
|
67
|
+
|
|
68
|
+
For your existing [shadcn/ui Button](https://ui.shadcn.com/docs/components/radix/button), use `asChild` to keep a regular anchor and keyboard navigation.
|
|
69
|
+
|
|
70
|
+
```tsx
|
|
71
|
+
import { Button } from "@/components/ui/button"
|
|
72
|
+
import { AgentLink } from "agent-deeplinks/react"
|
|
73
|
+
|
|
74
|
+
const options = { prompt: "Explain this project." }
|
|
75
|
+
|
|
76
|
+
export function OpenInCodex() {
|
|
77
|
+
return (
|
|
78
|
+
<>
|
|
79
|
+
<Button asChild variant="outline">
|
|
80
|
+
<AgentLink agent="codex" platform="desktop" options={options} />
|
|
81
|
+
</Button>
|
|
82
|
+
<Button asChild variant="outline" size="icon">
|
|
83
|
+
<AgentLink agent="codex" platform="desktop" options={options} iconOnly />
|
|
84
|
+
</Button>
|
|
85
|
+
</>
|
|
86
|
+
)
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Check `getAgentLink` before showing a button if you offer dynamic agent and platform choices. `AgentLink` renders nothing for invalid or unavailable links. Supply `aria-label` to customize the default accessible name of an icon-only link. The demo also shows a product-site fallback for unavailable routes.
|
|
91
|
+
|
|
92
|
+
Use `getAgentIcon(id)` for an SVG data URL, `AgentIcon` from the React entry point, or import a standalone SVG with a bundler that supports SVG assets.
|
|
93
|
+
|
|
94
|
+
```ts
|
|
95
|
+
import cursorIcon from "agent-deeplinks/icons/cursor.svg"
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
See [SVG sources and trademark notes](icons/README.md).
|
|
99
|
+
|
|
100
|
+
## Develop and deploy
|
|
101
|
+
|
|
102
|
+
```sh
|
|
103
|
+
npm ci
|
|
104
|
+
npm run dev
|
|
105
|
+
npm run check
|
|
106
|
+
npm test
|
|
107
|
+
npm run build
|
|
108
|
+
npm run release:zip
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
The npm package builds into `dist/` and the static site builds into `site/dist/`. Point a Cloudflare Pages Git project at the repository with build command `npm run build:site` and output directory `site/dist`. For a Direct Upload project, build locally and run `npx wrangler pages deploy site/dist --project-name agent-deeplinks`.
|
|
112
|
+
|
|
113
|
+
Pushing a version tag matching `package.json` builds and attaches the ZIP and npm tarball to a GitHub release.
|
|
114
|
+
|
|
115
|
+
### Publish to npm
|
|
116
|
+
|
|
117
|
+
For the first npm release, sign in to npm with a publisher account that has two-factor authentication. Download `agent-deeplinks.tgz` from the GitHub release for the version you want to publish and run `npm publish ./agent-deeplinks.tgz --access public`.
|
|
118
|
+
|
|
119
|
+
After the package exists on npm, register `lalalune/agent-deeplinks` and `npm-publish.yml` as its GitHub Actions trusted publisher and enable direct publishing. Set this up when the next tag is ready so its first trusted publish happens within npm's two-day activation window. [npm trusted publishing setup](https://docs.npmjs.com/trusted-publishers/)
|
|
120
|
+
|
|
121
|
+
Subsequent matching version tags run the package checks and publish the tarball through GitHub Actions using OpenID Connect.
|