lane-sdk 0.1.4 → 0.1.5
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 +2 -2
- package/SKILL.md +366 -0
- package/dist/adapters/crewai/index.cjs +3942 -0
- package/dist/adapters/crewai/index.cjs.map +1 -0
- package/dist/adapters/crewai/index.d.cts +15 -0
- package/dist/adapters/crewai/index.d.ts +15 -0
- package/dist/adapters/crewai/index.js +3940 -0
- package/dist/adapters/crewai/index.js.map +1 -0
- package/dist/adapters/langchain/index.cjs +3891 -0
- package/dist/adapters/langchain/index.cjs.map +1 -0
- package/dist/adapters/langchain/index.d.cts +16 -0
- package/dist/adapters/langchain/index.d.ts +16 -0
- package/dist/adapters/langchain/index.js +3889 -0
- package/dist/adapters/langchain/index.js.map +1 -0
- package/dist/adapters/openai/index.cjs +3953 -0
- package/dist/adapters/openai/index.cjs.map +1 -0
- package/dist/adapters/openai/index.d.cts +30 -0
- package/dist/adapters/openai/index.d.ts +30 -0
- package/dist/adapters/openai/index.js +3950 -0
- package/dist/adapters/openai/index.js.map +1 -0
- package/dist/adapters/vercel-ai/index.cjs +3894 -0
- package/dist/adapters/vercel-ai/index.cjs.map +1 -0
- package/dist/adapters/vercel-ai/index.d.cts +15 -0
- package/dist/adapters/vercel-ai/index.d.ts +15 -0
- package/dist/adapters/vercel-ai/index.js +3892 -0
- package/dist/adapters/vercel-ai/index.js.map +1 -0
- package/dist/cli/index.js +5020 -6122
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/postinstall.js +524 -0
- package/dist/cli/postinstall.js.map +1 -0
- package/dist/index.cjs +1902 -729
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +137 -1671
- package/dist/index.d.ts +137 -1671
- package/dist/index.js +1889 -724
- package/dist/index.js.map +1 -1
- package/dist/lane-DcrwjgWf.d.cts +2129 -0
- package/dist/lane-DcrwjgWf.d.ts +2129 -0
- package/dist/server/index.js +5789 -895
- package/dist/server/index.js.map +1 -1
- package/dist/server-http.cjs +1849 -622
- package/dist/server-http.cjs.map +1 -1
- package/dist/server-http.js +1849 -622
- package/dist/server-http.js.map +1 -1
- package/dist/server-stdio.cjs +1849 -622
- package/dist/server-stdio.cjs.map +1 -1
- package/dist/server-stdio.js +1849 -622
- package/dist/server-stdio.js.map +1 -1
- package/package.json +32 -6
package/README.md
CHANGED
|
@@ -557,7 +557,7 @@ Seller:
|
|
|
557
557
|
|
|
558
558
|
Setup:
|
|
559
559
|
lane setup-mcp Configure MCP server for Claude/Cursor
|
|
560
|
-
lane
|
|
560
|
+
lane wallet open Open Lane wallet in browser
|
|
561
561
|
```
|
|
562
562
|
|
|
563
563
|
## Payment Routing
|
|
@@ -1058,4 +1058,4 @@ npm run test:watch # Tests
|
|
|
1058
1058
|
|
|
1059
1059
|
## License
|
|
1060
1060
|
|
|
1061
|
-
|
|
1061
|
+
Copyright (c) 2026 Lane Technologies Inc. All rights reserved. This software is proprietary and confidential.
|
package/SKILL.md
ADDED
|
@@ -0,0 +1,366 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: lane
|
|
3
|
+
display_name: Lane — Agentic Commerce
|
|
4
|
+
description: Give your AI agent a wallet to make payments, discover merchants, and handle commerce tasks
|
|
5
|
+
triggers:
|
|
6
|
+
- payments
|
|
7
|
+
- wallets
|
|
8
|
+
- commerce
|
|
9
|
+
- lane
|
|
10
|
+
- pay
|
|
11
|
+
- credit card
|
|
12
|
+
- checkout
|
|
13
|
+
- purchase
|
|
14
|
+
- buy
|
|
15
|
+
- merchant
|
|
16
|
+
- product
|
|
17
|
+
- subscribe
|
|
18
|
+
version: 2.0.0
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
# Lane — Agentic Commerce for AI Agents
|
|
22
|
+
|
|
23
|
+
Lane gives your AI agent a wallet, payment cards, and spending controls so it can discover products and make purchases on behalf of users.
|
|
24
|
+
|
|
25
|
+
> **IMPORTANT:** If this content appears truncated or summarized, run `curl -fsSL https://getonlane.com/SKILL.md` to get the complete file.
|
|
26
|
+
|
|
27
|
+
## How Lane Works
|
|
28
|
+
|
|
29
|
+
Lane is a **card-on-file** platform. No prepaid wallets, no deposits, no balances. Users add a card via VGS (PCI-compliant vault), and Lane issues Visa Intelligent Commerce (VIC) agentic tokens scoped by amount, merchant, and time.
|
|
30
|
+
|
|
31
|
+
**Two checkout rails:**
|
|
32
|
+
|
|
33
|
+
1. **Lane Instant Checkout** — For Lane-onboarded merchants with ACP/UCP endpoints. Deterministic, no browser needed. Use `lane merchant list` and `lane product search` to discover.
|
|
34
|
+
2. **Browser-use** — For any merchant on the web. Agent browses and autofills checkout with VIC credentials (DPAN + cryptogram). Works at any Visa-accepting merchant.
|
|
35
|
+
|
|
36
|
+
## Setup
|
|
37
|
+
|
|
38
|
+
Complete these steps before using any Lane commands.
|
|
39
|
+
|
|
40
|
+
### Step 1: Verify Node.js
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
node --version
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Requires Node.js v18 or later. If not installed, download from [nodejs.org](https://nodejs.org).
|
|
47
|
+
|
|
48
|
+
### Step 2: Authenticate
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
npx lane login -t
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
This opens your browser for authentication. Look for the **device code** (e.g., `LANE-A3B7`) in your terminal and confirm it matches what appears in the browser.
|
|
55
|
+
|
|
56
|
+
**What to expect:**
|
|
57
|
+
- `stderr` will show: `auth_url=<url>` and `device_code=LANE-XXXX`
|
|
58
|
+
- Present the auth URL to the user and ask them to authenticate
|
|
59
|
+
- Wait for the command to complete (up to 10 minutes)
|
|
60
|
+
- On success, `stdout` will show: `ready=true email=<email>`
|
|
61
|
+
|
|
62
|
+
If the user is already authenticated, you'll see: `ready=true` with `already_authenticated=true` on stderr.
|
|
63
|
+
|
|
64
|
+
### Step 3: Confirm
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
npx lane whoami -t
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
**Expected output:** `authenticated=true email=<email> plan=<plan> id=<id> mode=<test|live>`
|
|
71
|
+
|
|
72
|
+
If `authenticated=false`, re-run `npx lane login -t`.
|
|
73
|
+
|
|
74
|
+
## After Setup
|
|
75
|
+
|
|
76
|
+
Report the user's status and suggest what they can do:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
npx lane status -t
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
This returns a full readiness check:
|
|
83
|
+
- `ready=true/false` — overall readiness
|
|
84
|
+
- `email`, `plan`, `mode` — account info
|
|
85
|
+
- `wallet_id` — wallet state
|
|
86
|
+
- `has_card` — whether a payment card is linked (card-on-file)
|
|
87
|
+
- `next_step` — what to do next (`add_card` or `none`)
|
|
88
|
+
|
|
89
|
+
**Starter prompts to suggest:**
|
|
90
|
+
- "Search for cloud hosting products"
|
|
91
|
+
- "Show me Lane-onboarded merchants"
|
|
92
|
+
- "Pay $5 to replicate.com for API credits"
|
|
93
|
+
- "Add a payment card"
|
|
94
|
+
- "Show my recent transactions"
|
|
95
|
+
- "Set a daily spending limit of $50"
|
|
96
|
+
|
|
97
|
+
## Discover Merchants & Products
|
|
98
|
+
|
|
99
|
+
### List Lane-Onboarded Merchants (Instant Checkout)
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
npx lane merchant list -t [--protocol <acp|ucp|x402>] [--vertical <saas|hosting|...>]
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
**Output (per merchant):** `merchant_id=<id> name=<name> domain=<domain> protocol=<acp|ucp> vertical=<vertical>`
|
|
106
|
+
|
|
107
|
+
These merchants support **Lane Instant Checkout** — deterministic, no browser needed.
|
|
108
|
+
|
|
109
|
+
### Discover Checkout Capabilities for a Domain
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
npx lane merchant discover <domain> -t
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Checks if a domain supports ACP, UCP, or x402 protocols. If found, you can use Lane Instant Checkout. If not, use browser-use with VIC credentials.
|
|
116
|
+
|
|
117
|
+
### List Merchant Verticals
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
npx lane merchant verticals -t
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Search Products
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
npx lane product search "<query>" -t [--limit <n>] [--merchant <id>]
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Semantic search across all Lane-onboarded merchant product feeds. Natural language works best.
|
|
130
|
+
|
|
131
|
+
**Output (per product):** `product_id=<id> title=<title> price=<price> merchant=<name> merchant_id=<id>`
|
|
132
|
+
|
|
133
|
+
### Get Product Details
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
npx lane product get <product_id> -t
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## Make Payments
|
|
140
|
+
|
|
141
|
+
### Direct Payment (Lane Instant Checkout)
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
npx lane pay --amount <dollars> --recipient <merchant> -t [--test] [--dry-run]
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
**Arguments:**
|
|
148
|
+
- `--amount <dollars>` — Payment amount in dollars (required)
|
|
149
|
+
- `--recipient <merchant>` — Merchant or service to pay (required)
|
|
150
|
+
- `--description <text>` — What the payment is for
|
|
151
|
+
- `--currency <code>` — Currency code (default: USD)
|
|
152
|
+
- `--idempotency-key <key>` — Prevent duplicate charges
|
|
153
|
+
- `--test` — Force test mode
|
|
154
|
+
- `--dry-run` — Validate without executing
|
|
155
|
+
|
|
156
|
+
**Success output:** `txn_id=<id> status=success amount=<cents> currency=<code> recipient=<merchant>`
|
|
157
|
+
|
|
158
|
+
**Always confirm with the user before executing a payment.** Show the amount, recipient, and currency, and wait for explicit approval.
|
|
159
|
+
|
|
160
|
+
### Provision VIC Credentials (for Browser-Use Checkout)
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
npx lane pay --amount <dollars> --recipient <merchant> --provision -t
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Returns a DPAN (Visa network token) + single-use cryptogram that can be used at **any Visa-accepting merchant's checkout**. Use this when the merchant doesn't support Lane Instant Checkout.
|
|
167
|
+
|
|
168
|
+
**Output:** `token_id=<id> dpan_last4=<last4> cryptogram=<masked> eci=05 expires_at=<iso>`
|
|
169
|
+
|
|
170
|
+
### Checkout from Catalog
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
npx lane checkout --product <product_id> -t [--plan <plan_id>] [--dry-run]
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
For software subscriptions, the output includes `api_key` and `endpoint`.
|
|
177
|
+
|
|
178
|
+
## Manage Cards
|
|
179
|
+
|
|
180
|
+
### List Cards
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
npx lane card list -t
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
**Output (per card):** `card_id=<id> last4=<last4> brand=<brand> status=<active|inactive>`
|
|
187
|
+
|
|
188
|
+
### Add a Card
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
npx lane card add -t
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
This opens the browser for secure card entry via VGS Collect. The CLI polls for card addition (up to 5 minutes). Card numbers never touch the CLI or Lane servers — they go directly to the VGS vault.
|
|
195
|
+
|
|
196
|
+
### Remove a Card
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
npx lane card remove <card_id> -t
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### Get Card Details
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
npx lane card get <card_id> -t
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
## Wallet Status
|
|
209
|
+
|
|
210
|
+
```bash
|
|
211
|
+
npx lane wallet status -t
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
Shows your wallet ID, card on file, and account status. Lane uses a **card-on-file** model — no deposits or balances. Your card is charged per transaction.
|
|
215
|
+
|
|
216
|
+
## Agentic Tokens & Instructions
|
|
217
|
+
|
|
218
|
+
### Provision an Agentic Token
|
|
219
|
+
|
|
220
|
+
```bash
|
|
221
|
+
npx lane token provision --wallet-id <id> --amount <cents> -t [--merchant <name>] [--expires-in <duration>]
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
Creates a scoped Visa network token with spend limits and time bounds.
|
|
225
|
+
|
|
226
|
+
### List Tokens
|
|
227
|
+
|
|
228
|
+
```bash
|
|
229
|
+
npx lane token list -t [--limit <n>]
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
### Create a Purchase Instruction
|
|
233
|
+
|
|
234
|
+
```bash
|
|
235
|
+
npx lane instruction create -t [--wallet-id <id>] [--amount <cents>] [--merchant <name>] [--expires-in <duration>]
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
Creates a VIC instruction — a standing authorization for a specific purchase scope.
|
|
239
|
+
|
|
240
|
+
### List Instructions
|
|
241
|
+
|
|
242
|
+
```bash
|
|
243
|
+
npx lane instruction list -t [--limit <n>]
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
## Budget Controls
|
|
247
|
+
|
|
248
|
+
### View Budget
|
|
249
|
+
|
|
250
|
+
```bash
|
|
251
|
+
npx lane budget get -t
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
**Output:** `daily_limit=<cents|none> weekly_limit=<cents|none> monthly_limit=<cents|none> per_task_limit=<cents|none>`
|
|
255
|
+
|
|
256
|
+
### Set Budget
|
|
257
|
+
|
|
258
|
+
```bash
|
|
259
|
+
npx lane budget set --daily <dollars> --monthly <dollars> --per-task <dollars> -t
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
## Transactions
|
|
263
|
+
|
|
264
|
+
### List Transactions
|
|
265
|
+
|
|
266
|
+
```bash
|
|
267
|
+
npx lane transaction list -t [--limit <n>]
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
### Get Transaction Details
|
|
271
|
+
|
|
272
|
+
```bash
|
|
273
|
+
npx lane transaction get <txn_id> -t
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
### Refund a Transaction
|
|
277
|
+
|
|
278
|
+
```bash
|
|
279
|
+
npx lane transaction refund <txn_id> -t [--amount <cents>] [--reason <text>]
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
**Never initiate a refund without explicit user request.**
|
|
283
|
+
|
|
284
|
+
## SDK Integration (for Developers)
|
|
285
|
+
|
|
286
|
+
If you're building an agent app, use the Lane SDK instead of the CLI:
|
|
287
|
+
|
|
288
|
+
```typescript
|
|
289
|
+
import Lane from 'lane'
|
|
290
|
+
|
|
291
|
+
const lane = await Lane.create()
|
|
292
|
+
|
|
293
|
+
// Discover merchants
|
|
294
|
+
const merchants = await lane.merchants.list()
|
|
295
|
+
const products = await lane.products.search({ query: 'cloud hosting' })
|
|
296
|
+
|
|
297
|
+
// Manage wallets & cards
|
|
298
|
+
const wallet = await lane.wallets.create({ label: 'My Agent', userId: 'user_123' })
|
|
299
|
+
const cards = await lane.wallets.listCards(wallet.id)
|
|
300
|
+
|
|
301
|
+
// Provision agentic token (VIC)
|
|
302
|
+
const token = await lane.tokens.provision({ walletId: wallet.id, amount: 9900 })
|
|
303
|
+
|
|
304
|
+
// Create purchase instruction
|
|
305
|
+
const instruction = await lane.instructions.create({
|
|
306
|
+
walletId: wallet.id,
|
|
307
|
+
amount: 9900,
|
|
308
|
+
merchant: 'Legendary SaaS',
|
|
309
|
+
})
|
|
310
|
+
|
|
311
|
+
// Get Visa payment credentials
|
|
312
|
+
const credential = await lane.instructions.getCredential(instruction.id)
|
|
313
|
+
// credential.credentialData → { tokenNumber (DPAN), cryptogram, eci }
|
|
314
|
+
|
|
315
|
+
// Confirm after merchant processes payment
|
|
316
|
+
await lane.instructions.createConfirmation(instruction.id, { transactionId: 'txn_...' })
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
## Response Handling
|
|
320
|
+
|
|
321
|
+
All commands in terse mode (`-t`) output `key=value` pairs on stdout (one per line). Parse these to determine the result.
|
|
322
|
+
|
|
323
|
+
### Error Codes
|
|
324
|
+
|
|
325
|
+
| Error Code | Meaning | What To Do |
|
|
326
|
+
|------------|---------|------------|
|
|
327
|
+
| `not_authenticated` | No valid credentials | Run `npx lane login -t` |
|
|
328
|
+
| `invalid_key` | API key rejected | Run `npx lane login -t` |
|
|
329
|
+
| `budget_exceeded` | Spending limit hit | Report the limit to the user |
|
|
330
|
+
| `no_payment_method` | No card on file | Run `npx lane card add` |
|
|
331
|
+
| `merchant_blocked` | Merchant on blocklist | Inform the user |
|
|
332
|
+
| `rate_limited` | Too many requests | Wait, then retry once |
|
|
333
|
+
| `network` | Connection failed | Retry up to 2 times |
|
|
334
|
+
| `server` | Lane API error | Retry up to 2 times |
|
|
335
|
+
| `timeout` | Operation timed out | Re-run the command |
|
|
336
|
+
| `confirmation_required` | Amount exceeds threshold | Ask the user to confirm |
|
|
337
|
+
|
|
338
|
+
### Retry Logic
|
|
339
|
+
|
|
340
|
+
- **Network errors:** Retry up to 2 times with backoff (1s, 3s)
|
|
341
|
+
- **429 (rate limited):** Retry once after `retry_after` seconds
|
|
342
|
+
- **5xx (server error):** Retry up to 2 times with backoff
|
|
343
|
+
- **4xx (client error):** **Never retry** — these are deterministic failures
|
|
344
|
+
|
|
345
|
+
## Security Rules
|
|
346
|
+
|
|
347
|
+
1. **Never retry payment declines** — 402 errors are deterministic
|
|
348
|
+
2. **Never raise budget limits** to make a payment succeed
|
|
349
|
+
3. **Never split payments** to bypass per-task limits
|
|
350
|
+
4. **Always confirm payments** with the user before executing
|
|
351
|
+
5. **Never store or log** API keys, card numbers, or session tokens
|
|
352
|
+
6. If `confirmation_required` error, **always ask the user** before proceeding
|
|
353
|
+
7. Card data is handled by VGS — Lane never sees, stores, or logs raw PANs
|
|
354
|
+
|
|
355
|
+
## Common Issues
|
|
356
|
+
|
|
357
|
+
| Symptom | Fix |
|
|
358
|
+
|---------|-----|
|
|
359
|
+
| `error=not_authenticated` | Run `npx lane login -t` |
|
|
360
|
+
| `error=timeout` on login | User didn't complete browser auth — try again |
|
|
361
|
+
| `error=no_payment_method` | Run `npx lane card add` to add a card |
|
|
362
|
+
| `ready=false step=create_wallet` | Run `npx lane wallet create -t` |
|
|
363
|
+
| `has_card=false` | Run `npx lane card add` |
|
|
364
|
+
| Payment succeeds but `test_mode=true` | Remove `--test` flag for live payments |
|
|
365
|
+
| `error=budget_exceeded` | Check limits with `npx lane budget get -t` |
|
|
366
|
+
| No merchants found | Try `npx lane merchant verticals -t` to see available categories |
|