deepline 0.2.58 → 0.2.60
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 +28 -337
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/cli/index.js +30 -10
- package/dist/cli/index.mjs +31 -11
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +2 -6
package/README.md
CHANGED
|
@@ -1,358 +1,49 @@
|
|
|
1
|
-
# Deepline
|
|
1
|
+
# Deepline
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Deepline gives your coding agent the GTM data it needs to do useful work.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Give it a list of people or companies and ask it to find contact details,
|
|
6
|
+
LinkedIn profiles, hiring signals, job postings, or a company's tech stack. It
|
|
7
|
+
can enrich a CSV, research a market, or help you build a prospect list from
|
|
8
|
+
Claude Code, Codex, or your terminal.
|
|
6
9
|
|
|
7
|
-
|
|
10
|
+
## What you can ask Deepline to do
|
|
8
11
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
Wait for health: `curl http://localhost:3000/api/v2/health`
|
|
12
|
+
- Find the right people at a list of companies.
|
|
13
|
+
- Add work emails, phone numbers, and LinkedIn profiles to a CSV.
|
|
14
|
+
- Find companies that match your ideal customer profile.
|
|
15
|
+
- Research a market, its companies, and their recent signals.
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
## Install
|
|
16
18
|
|
|
17
19
|
```bash
|
|
18
|
-
|
|
20
|
+
npm install -g deepline@latest
|
|
21
|
+
deepline setup --json
|
|
19
22
|
```
|
|
20
23
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
### Making changes
|
|
26
|
-
|
|
27
|
-
Edit any file in `sdk/src/` and re-run. No build step needed — `deepline-dev.ts` runs source directly via Bun.
|
|
28
|
-
|
|
29
|
-
```bash
|
|
30
|
-
# Edit sdk/src/cli/commands/play.ts
|
|
31
|
-
# Then immediately:
|
|
32
|
-
./cli-env sdk-worktree deepline plays run --file my-play.play.ts --watch
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
The root `package.json` has an alias, `bun run deepline`, that runs the same
|
|
36
|
-
source CLI without selecting a host. Use `./cli-env sdk-worktree deepline ...`
|
|
37
|
-
for local app/worktree development so the binary and `DEEPLINE_HOST_URL` move
|
|
38
|
-
together.
|
|
39
|
-
|
|
40
|
-
### When you need to build
|
|
24
|
+
Setup opens your browser so you can sign in, then installs Deepline's skills
|
|
25
|
+
for your coding agent. If global skill setup is unavailable, Deepline retries
|
|
26
|
+
with project-local skills automatically.
|
|
41
27
|
|
|
42
|
-
|
|
28
|
+
## Use it with an agent
|
|
43
29
|
|
|
44
|
-
|
|
45
|
-
2. **Testing the published artifact** — verifying `dist/cli/index.mjs` works
|
|
46
|
-
|
|
47
|
-
```bash
|
|
48
|
-
cd sdk && bun run build # or: npm run sdk:build from root
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
The published npm package is intentionally thin: it ships the SDK, CLI, and the
|
|
52
|
-
minimal local play bundler required for `plays run --file`, `plays publish`, and
|
|
53
|
-
`enrich`, without shipping Convex or broad app/provider source snapshots.
|
|
54
|
-
|
|
55
|
-
## Env files
|
|
56
|
-
|
|
57
|
-
| File | Set by | Contains |
|
|
58
|
-
| ------------------------------------ | ------------------- | --------------------------------------- |
|
|
59
|
-
| `~/.local/deepline/<host-slug>/.env` | SDK `auth register` | `DEEPLINE_HOST_URL`, `DEEPLINE_API_KEY` |
|
|
60
|
-
| `.env.deepline` | Developer/agent | `DEEPLINE_HOST_URL`, `DEEPLINE_API_KEY` |
|
|
61
|
-
|
|
62
|
-
The SDK CLI env contract is only `DEEPLINE_HOST_URL` and `DEEPLINE_API_KEY`.
|
|
63
|
-
Do not route the SDK CLI through `.env`, `.env.local`, or `.env.worktree`.
|
|
64
|
-
|
|
65
|
-
Config resolution order:
|
|
30
|
+
Paste this into Claude Code, Codex, or another coding agent:
|
|
66
31
|
|
|
67
32
|
```text
|
|
68
|
-
|
|
69
|
-
key: explicit SDK option -> DEEPLINE_API_KEY -> matching nearest .env.deepline -> matching Cowork workspace .env.deepline -> saved auth for the resolved host
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
## CLI commands
|
|
73
|
-
|
|
74
|
-
```bash
|
|
75
|
-
./cli-env sdk-worktree deepline health
|
|
76
|
-
./cli-env sdk-worktree deepline auth register
|
|
77
|
-
./cli-env sdk-worktree deepline auth status
|
|
78
|
-
./cli-env sdk-worktree deepline tools list
|
|
79
|
-
./cli-env sdk-worktree deepline tools get test_rate_limit
|
|
80
|
-
./cli-env sdk-worktree deepline tools describe test_rate_limit
|
|
81
|
-
./cli-env sdk-worktree deepline tools execute test_rate_limit --input '{"key":"stripe.com"}'
|
|
82
|
-
./cli-env sdk-worktree deepline plays run my-play.play.ts --input '{}' --watch
|
|
83
|
-
./cli-env sdk-worktree deepline plays run company-lookup --input '{}' --watch
|
|
84
|
-
./cli-env sdk-worktree deepline plays get company-lookup --json
|
|
85
|
-
./cli-env sdk-worktree deepline plays versions company-lookup --json
|
|
86
|
-
./cli-env sdk-worktree deepline runs list --play company-lookup --status failed --json
|
|
87
|
-
./cli-env sdk-worktree deepline runs get run_123 --json
|
|
88
|
-
./cli-env sdk-worktree deepline runs tail run_123 --json
|
|
89
|
-
./cli-env sdk-worktree deepline runs stop run_123 --reason "no longer needed" --json
|
|
90
|
-
./cli-env sdk-worktree deepline plays publish my-play.play.ts --latest --json
|
|
91
|
-
./cli-env sdk-worktree deepline update
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
`tools describe` is the compact tool contract, `tools get` is a compatibility
|
|
95
|
-
alias for `tools describe`, and `tools execute` runs an atomic tool. The SDK CLI
|
|
96
|
-
does not expose the legacy `tools run` alias. Unknown `plays run` flags such as
|
|
97
|
-
`--limit 5` are passed into the play input object. CSV file inputs should be
|
|
98
|
-
passed through `--input`, matching the play contract, for example
|
|
99
|
-
`--input '{"file":"leads.csv"}'` for `ctx.csv(input.file)`.
|
|
100
|
-
|
|
101
|
-
## Public play entrypoints
|
|
102
|
-
|
|
103
|
-
These are the public ways to run plays. They intentionally map to the external
|
|
104
|
-
surfaces we exercise in CI:
|
|
105
|
-
|
|
106
|
-
1. CLI
|
|
107
|
-
- Repo-local Bun/source CLI: `bun sdk/bin/deepline-dev.ts plays run ...`
|
|
108
|
-
- Repo script alias: `bun run deepline -- plays run ...`
|
|
109
|
-
- Installed CLI: `deepline plays run ...`
|
|
110
|
-
2. Programmatic SDK convenience client
|
|
111
|
-
- `client.runPlay(...)`
|
|
112
|
-
- `client.runs.get(runId)`
|
|
113
|
-
- `client.runs.list({ play: name })`
|
|
114
|
-
- `client.runs.tail(runId)`
|
|
115
|
-
- `client.runs.stop(runId, { reason })`
|
|
116
|
-
3. Connected SDK context (outside a running play)
|
|
117
|
-
- `ctx.play(name).run(...)`
|
|
118
|
-
- `ctx.play(name).runSync(...)`
|
|
119
|
-
- `ctx.runPlay(name, input)`
|
|
120
|
-
4. Raw HTTP API
|
|
121
|
-
- `POST /api/v2/plays/run`
|
|
122
|
-
- `GET /api/v2/runs/:runId`
|
|
123
|
-
- `GET /api/v2/runs/:runId/tail`
|
|
124
|
-
5. In-play composition
|
|
125
|
-
- `ctx.runPlay(key, playRef, input, { description })`
|
|
126
|
-
- Org-owned `playRef` accepts a bare name, `self/<play>`, or the canonical
|
|
127
|
-
`<orgSlug>/<play>` returned by `plays get`.
|
|
128
|
-
|
|
129
|
-
Internal / advanced only:
|
|
130
|
-
|
|
131
|
-
- `registerPlayArtifact()`
|
|
132
|
-
- `stagePlayFiles()`
|
|
133
|
-
- `startPlayRun()`
|
|
134
|
-
- `getPlayStatus()`
|
|
135
|
-
- `getPlayTailStatus()`
|
|
136
|
-
- `listPlayRuns()`
|
|
137
|
-
- `stopPlay()`
|
|
138
|
-
|
|
139
|
-
Those low-level primitives are still available for callers that explicitly need
|
|
140
|
-
to own the package-submit-poll flow, but they are not the primary public SDK
|
|
141
|
-
surface.
|
|
142
|
-
|
|
143
|
-
## SDK usage (programmatic)
|
|
144
|
-
|
|
145
|
-
```typescript
|
|
146
|
-
import { Deepline, definePlay } from 'deepline';
|
|
147
|
-
|
|
148
|
-
const ctx = await Deepline.connect();
|
|
149
|
-
|
|
150
|
-
// Tools
|
|
151
|
-
const tools = await ctx.tools.list();
|
|
152
|
-
const toolResult = await ctx.tools.execute('test_company_search', {
|
|
153
|
-
domain: 'stripe.com',
|
|
154
|
-
});
|
|
155
|
-
const company = toolResult.toolOutput.raw;
|
|
156
|
-
|
|
157
|
-
// Named play (already live)
|
|
158
|
-
const job = await ctx.play('my-play').run({ domain: 'example.com' });
|
|
159
|
-
const status = await job.status();
|
|
160
|
-
const output = await job.get(); // polls until complete
|
|
161
|
-
|
|
162
|
-
// Define + run a play
|
|
163
|
-
const myPlay = definePlay('my-play', async (ctx, input: { domain: string }) => {
|
|
164
|
-
const company = await ctx.tools.execute({
|
|
165
|
-
id: 'company_search',
|
|
166
|
-
tool: 'test_company_search',
|
|
167
|
-
input: { domain: input.domain },
|
|
168
|
-
description: 'Look up company details by domain.',
|
|
169
|
-
});
|
|
170
|
-
return { company: company.toolOutput.raw };
|
|
171
|
-
});
|
|
172
|
-
|
|
173
|
-
const detail = await myPlay.get();
|
|
174
|
-
const playResult = await myPlay.runSync({ domain: 'example.com' });
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
## Testing
|
|
178
|
-
|
|
179
|
-
```bash
|
|
180
|
-
# Unit tests (no server needed)
|
|
181
|
-
bun run vitest run tests/lib/plays tests/api/plays-get-route.test.ts
|
|
182
|
-
|
|
183
|
-
# SDK + CLI integration (needs running dev server)
|
|
184
|
-
bash scripts/test-sdk-play-cli.sh
|
|
185
|
-
|
|
186
|
-
# V2 plays e2e — all free test tools, real Temporal (needs running dev server)
|
|
187
|
-
bun tests/v2-plays/runner.ts --top 10
|
|
188
|
-
bun tests/v2-plays/runner.ts --shard 1/4
|
|
189
|
-
bun tests/v2-plays/runner.ts --file tests/v2-plays/plays/07-waterfall-basic.play.ts
|
|
190
|
-
```
|
|
191
|
-
|
|
192
|
-
## Repro: rate limit handling (end-to-end)
|
|
193
|
-
|
|
194
|
-
Full sequence from zero to hitting + surviving rate limits via v2 plays.
|
|
195
|
-
|
|
196
|
-
### 1. Install + auth
|
|
197
|
-
|
|
198
|
-
```bash
|
|
199
|
-
# Production
|
|
200
|
-
bash <(curl -fsSL https://deepline.com/api/v2/sdk/install)
|
|
201
|
-
|
|
202
|
-
# Local dev (no install needed)
|
|
203
|
-
bun run dev # start server
|
|
204
|
-
bun sdk/bin/deepline-dev.ts auth register
|
|
205
|
-
```
|
|
206
|
-
|
|
207
|
-
### 2. Write a play that hammers the rate-limited test tool
|
|
208
|
-
|
|
209
|
-
```bash
|
|
210
|
-
cat > rate-limit-repro.play.ts << 'TS'
|
|
211
|
-
import { definePlay } from 'deepline';
|
|
212
|
-
|
|
213
|
-
// test_rate_limit has a 5 req/s shared window — this play fires 20 calls
|
|
214
|
-
// to force 429s and prove the runtime retries + backs off correctly.
|
|
215
|
-
export default definePlay('rate-limit-repro', async (ctx) => {
|
|
216
|
-
const items = Array.from({ length: 20 }, (_, i) => ({
|
|
217
|
-
key: `probe-${i}`,
|
|
218
|
-
row_number: i + 1,
|
|
219
|
-
}));
|
|
220
|
-
|
|
221
|
-
const results = await ctx.dataset('rate_limit_probes', items)
|
|
222
|
-
.withColumn("result", (row, ctx) =>
|
|
223
|
-
ctx.tools.execute({
|
|
224
|
-
id: 'rate_limit_probe',
|
|
225
|
-
tool: 'test_rate_limit',
|
|
226
|
-
input: {
|
|
227
|
-
key: 'redis-shared-scenario',
|
|
228
|
-
row_number: row.row_number,
|
|
229
|
-
},
|
|
230
|
-
description: 'Exercise the shared rate-limit retry path.',
|
|
231
|
-
}))
|
|
232
|
-
.run();
|
|
233
|
-
|
|
234
|
-
return { total: results.length, results };
|
|
235
|
-
});
|
|
236
|
-
TS
|
|
237
|
-
```
|
|
238
|
-
|
|
239
|
-
### 3. Run it
|
|
240
|
-
|
|
241
|
-
```bash
|
|
242
|
-
# Dev
|
|
243
|
-
bun sdk/bin/deepline-dev.ts plays run --file rate-limit-repro.play.ts --watch
|
|
244
|
-
|
|
245
|
-
# Production
|
|
246
|
-
deepline plays run --file rate-limit-repro.play.ts --watch
|
|
33
|
+
Set up https://code.deepline.com/INSTALL.md
|
|
247
34
|
```
|
|
248
35
|
|
|
249
|
-
|
|
36
|
+
Once setup is complete, tell your agent what you want to do:
|
|
250
37
|
|
|
251
|
-
|
|
252
|
-
|
|
38
|
+
- "Find 5 NYC CTOs with work emails."
|
|
39
|
+
- "Enrich the contacts in leads.csv."
|
|
40
|
+
- "Upload a CSV of accounts and add emails, phones, LinkedIn profiles, job postings, or tech stack."
|
|
41
|
+
- "Research this market and the companies in it."
|
|
253
42
|
|
|
254
|
-
|
|
255
|
-
cat > rate-limit-waterfall.play.ts << 'TS'
|
|
256
|
-
import { definePlay, steps } from 'deepline';
|
|
257
|
-
|
|
258
|
-
export default definePlay('rate-limit-waterfall', async (ctx) => {
|
|
259
|
-
const leads = Array.from({ length: 24 }, (_, i) => ({
|
|
260
|
-
lead_id: `lead-${String(i + 1).padStart(3, '0')}`,
|
|
261
|
-
row_number: i + 1,
|
|
262
|
-
}));
|
|
263
|
-
|
|
264
|
-
const probeFallback = steps<{ lead_id: string; row_number: number }>()
|
|
265
|
-
.step("primary_probe", (row, ctx) =>
|
|
266
|
-
ctx.tools.execute({
|
|
267
|
-
id: 'rate_limit_probe',
|
|
268
|
-
tool: 'test_rate_limit',
|
|
269
|
-
input: {
|
|
270
|
-
key: 'redis-shared-scenario',
|
|
271
|
-
lead_id: row.lead_id,
|
|
272
|
-
row_number: row.row_number,
|
|
273
|
-
},
|
|
274
|
-
description: 'Exercise primary rate-limit behavior.',
|
|
275
|
-
}))
|
|
276
|
-
.step(
|
|
277
|
-
"backup_probe",
|
|
278
|
-
(row, ctx) =>
|
|
279
|
-
ctx.tools.execute({
|
|
280
|
-
id: 'rate_limit_probe_backup',
|
|
281
|
-
tool: 'test_rate_limit',
|
|
282
|
-
input: {
|
|
283
|
-
key: 'redis-shared-scenario',
|
|
284
|
-
lead_id: row.lead_id,
|
|
285
|
-
row_number: row.row_number,
|
|
286
|
-
},
|
|
287
|
-
description: 'Exercise fallback rate-limit behavior.',
|
|
288
|
-
}),
|
|
289
|
-
{ runIf: (row) => !row.primary_probe },
|
|
290
|
-
)
|
|
291
|
-
.return((row) => row.primary_probe ?? row.backup_probe ?? null);
|
|
292
|
-
|
|
293
|
-
// Fan out over leads — each gets a row-level fallback sequence
|
|
294
|
-
const results = await ctx.dataset('leads', leads)
|
|
295
|
-
.withColumn("probe", probeFallback)
|
|
296
|
-
.run();
|
|
297
|
-
|
|
298
|
-
return results;
|
|
299
|
-
});
|
|
300
|
-
TS
|
|
301
|
-
```
|
|
43
|
+
## Check your setup
|
|
302
44
|
|
|
303
45
|
```bash
|
|
304
|
-
|
|
46
|
+
deepline doctor --json
|
|
305
47
|
```
|
|
306
48
|
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
- `test_rate_limit` has a Redis-backed rate limit: **5 req/s, 3 max concurrency**.
|
|
310
|
-
- The SDK HTTP client auto-retries 429s with exponential backoff (1s → 2s → 4s, capped at 30s, up to 4 attempts).
|
|
311
|
-
- The play rate limit scheduler (`PlayRateLimitScheduler`) paces tool calls using `queue_hint` metadata from rate limit definitions.
|
|
312
|
-
- All 20/24 rows should complete — no terminal rate limit errors in the output.
|
|
313
|
-
- The waterfall variant proves that short-circuiting (skipping later steps when earlier steps match) works correctly under rate pressure.
|
|
314
|
-
|
|
315
|
-
### V1 equivalent
|
|
316
|
-
|
|
317
|
-
The v1 repro scripts use `deepline enrich` (Python CLI) with `--with` JSON specs. The v2 plays replace this with typed TypeScript — same backend rate limit infrastructure, better DX.
|
|
318
|
-
|
|
319
|
-
```bash
|
|
320
|
-
# V1 (still works)
|
|
321
|
-
scripts/repro-rate-limit-enrich.sh redis_429
|
|
322
|
-
scripts/repro-rate-limit-enrich.sh redis_429_waterfall
|
|
323
|
-
```
|
|
324
|
-
|
|
325
|
-
## Prebuilt plays
|
|
326
|
-
|
|
327
|
-
V2 prebuilt play sources are authored directly in `src/lib/plays/v2/`. After
|
|
328
|
-
editing them, regenerate the committed Workers and share-page artifacts:
|
|
329
|
-
|
|
330
|
-
```bash
|
|
331
|
-
bun scripts/regen.ts prebuilt-share-pages
|
|
332
|
-
```
|
|
333
|
-
|
|
334
|
-
## File structure
|
|
335
|
-
|
|
336
|
-
```
|
|
337
|
-
sdk/
|
|
338
|
-
bin/deepline-dev.ts # Dev entry (bun, no build, points at localhost)
|
|
339
|
-
src/
|
|
340
|
-
index.ts # Public exports
|
|
341
|
-
config.ts # Config + env resolution
|
|
342
|
-
http.ts # Fetch client with retries
|
|
343
|
-
client.ts # DeeplineClient (tools, plays API)
|
|
344
|
-
play.ts # definePlay, Deepline.connect, job handles
|
|
345
|
-
types.ts # TypeScript interfaces
|
|
346
|
-
errors.ts # DeeplineError, AuthError, RateLimitError
|
|
347
|
-
cli/
|
|
348
|
-
index.ts # CLI router
|
|
349
|
-
commands/
|
|
350
|
-
auth.ts # auth register/status
|
|
351
|
-
play.ts # plays run/get/tail/runs/publish
|
|
352
|
-
tools.ts # tools list/describe/execute
|
|
353
|
-
enrich.ts # CSV enrichment (delegates to Python CLI)
|
|
354
|
-
plays/
|
|
355
|
-
bundle-play-file.ts # esbuild bundler for .play.ts files
|
|
356
|
-
local-file-discovery.ts # ctx.csv() file resolution + packaging
|
|
357
|
-
dist/ # Build output (gitignored)
|
|
358
|
-
```
|
|
49
|
+
Need help? Visit [code.deepline.com](https://code.deepline.com).
|
|
@@ -160,7 +160,7 @@ export const SDK_RELEASE = {
|
|
|
160
160
|
// 0.2.0 makes Dataset Handles uniformly async-only after 0.1.320 briefly
|
|
161
161
|
// exposed storage-dependent synchronous access. This deliberate minor
|
|
162
162
|
// release keeps lazy paging semantics independent of row residency.
|
|
163
|
-
version: '0.2.
|
|
163
|
+
version: '0.2.60',
|
|
164
164
|
contracts: {
|
|
165
165
|
api: {
|
|
166
166
|
name: 'sdk-http-api',
|
package/dist/cli/index.js
CHANGED
|
@@ -1044,7 +1044,7 @@ var SDK_RELEASE = {
|
|
|
1044
1044
|
// 0.2.0 makes Dataset Handles uniformly async-only after 0.1.320 briefly
|
|
1045
1045
|
// exposed storage-dependent synchronous access. This deliberate minor
|
|
1046
1046
|
// release keeps lazy paging semantics independent of row residency.
|
|
1047
|
-
version: "0.2.
|
|
1047
|
+
version: "0.2.60",
|
|
1048
1048
|
contracts: {
|
|
1049
1049
|
api: {
|
|
1050
1050
|
name: "sdk-http-api",
|
|
@@ -37051,9 +37051,9 @@ var install_commands_default = {
|
|
|
37051
37051
|
npx_binary: "npx",
|
|
37052
37052
|
npx_add_args_template: [
|
|
37053
37053
|
"--yes",
|
|
37054
|
-
"skills@
|
|
37054
|
+
"skills@1.5.18",
|
|
37055
37055
|
"add",
|
|
37056
|
-
"{
|
|
37056
|
+
"{skills_source_url}",
|
|
37057
37057
|
"--agent",
|
|
37058
37058
|
"{agents}",
|
|
37059
37059
|
"--global",
|
|
@@ -37072,6 +37072,9 @@ var install_commands_default = {
|
|
|
37072
37072
|
// src/cli/install-commands.ts
|
|
37073
37073
|
var INSTALL_COMMANDS = install_commands_default;
|
|
37074
37074
|
var DEFAULT_SKILL_AGENTS = INSTALL_COMMANDS.skills.default_agents;
|
|
37075
|
+
var SKILLS_NPX_PACKAGE = INSTALL_COMMANDS.skills.npx_add_args_template.find(
|
|
37076
|
+
(arg) => arg.startsWith("skills@")
|
|
37077
|
+
) ?? "skills@1.5.18";
|
|
37075
37078
|
var DEFAULT_V1_SKILL_NAMES = [
|
|
37076
37079
|
"build-tam",
|
|
37077
37080
|
"clay-to-deepline",
|
|
@@ -37106,12 +37109,16 @@ function shellJoin(args) {
|
|
|
37106
37109
|
function skillsIndexUrl(baseUrl) {
|
|
37107
37110
|
return `${normalizeBaseUrl2(baseUrl)}${INSTALL_COMMANDS.skills.index_path}`;
|
|
37108
37111
|
}
|
|
37112
|
+
function skillsSourceUrl(baseUrl) {
|
|
37113
|
+
return normalizeBaseUrl2(baseUrl);
|
|
37114
|
+
}
|
|
37109
37115
|
function buildSkillsAddArgs(baseUrl, skillName, options = {}) {
|
|
37110
37116
|
const skillNames = Array.isArray(skillName) ? skillName : [skillName];
|
|
37111
37117
|
const [firstSkillName, ...extraSkillNames] = skillNames;
|
|
37112
37118
|
const agents = options.agents ?? INSTALL_COMMANDS.skills.default_agents;
|
|
37113
37119
|
const values = {
|
|
37114
37120
|
skills_index_url: skillsIndexUrl(baseUrl),
|
|
37121
|
+
skills_source_url: skillsSourceUrl(baseUrl),
|
|
37115
37122
|
agents: agents.join(" "),
|
|
37116
37123
|
skill_name: firstSkillName ?? ""
|
|
37117
37124
|
};
|
|
@@ -37278,7 +37285,7 @@ function buildSkillsPlan(input2) {
|
|
|
37278
37285
|
args: [
|
|
37279
37286
|
"exec",
|
|
37280
37287
|
"--yes",
|
|
37281
|
-
|
|
37288
|
+
`--package=${SKILLS_NPX_PACKAGE}`,
|
|
37282
37289
|
"--",
|
|
37283
37290
|
"skills",
|
|
37284
37291
|
"remove",
|
|
@@ -37294,11 +37301,11 @@ function buildSkillsPlan(input2) {
|
|
|
37294
37301
|
args: [
|
|
37295
37302
|
"exec",
|
|
37296
37303
|
"--yes",
|
|
37297
|
-
|
|
37304
|
+
`--package=${SKILLS_NPX_PACKAGE}`,
|
|
37298
37305
|
"--",
|
|
37299
37306
|
"skills",
|
|
37300
37307
|
"add",
|
|
37301
|
-
|
|
37308
|
+
skillsSourceUrl(input2.baseUrl),
|
|
37302
37309
|
"--agent",
|
|
37303
37310
|
...input2.agents,
|
|
37304
37311
|
...scopeArgs,
|
|
@@ -37350,7 +37357,7 @@ function runProcess(command, args, cwd) {
|
|
|
37350
37357
|
child.once("error", reject);
|
|
37351
37358
|
child.once("close", (code) => {
|
|
37352
37359
|
if (code && stderr.trim()) {
|
|
37353
|
-
process.stderr.write(
|
|
37360
|
+
process.stderr.write(`${SKILLS_NPX_PACKAGE} exited ${code}.
|
|
37354
37361
|
`);
|
|
37355
37362
|
}
|
|
37356
37363
|
resolve19(code ?? 1);
|
|
@@ -37535,7 +37542,7 @@ function registerSkillsCommand(program) {
|
|
|
37535
37542
|
`
|
|
37536
37543
|
Notes:
|
|
37537
37544
|
This command removes and reinstalls only Deepline-managed skill names using
|
|
37538
|
-
skills@
|
|
37545
|
+
skills@1.5.18. Local scope writes into the resolved persistent project.
|
|
37539
37546
|
|
|
37540
37547
|
Examples:
|
|
37541
37548
|
deepline skills --json
|
|
@@ -38667,6 +38674,10 @@ function removeKnownLegacyPaths(baseUrl) {
|
|
|
38667
38674
|
const installerCommandPath = safeRead(
|
|
38668
38675
|
(0, import_node_path24.join)(hostDir, "sdk", ".command-path")
|
|
38669
38676
|
).trim();
|
|
38677
|
+
const relativeInstallerCommandPath = installerCommandPath ? (0, import_node_path24.relative)((0, import_node_path24.resolve)(hostDir), (0, import_node_path24.resolve)(installerCommandPath)) : "";
|
|
38678
|
+
const isOwnedInstallerCommand = Boolean(installerCommandPath) && relativeInstallerCommandPath !== "" && !relativeInstallerCommandPath.startsWith(
|
|
38679
|
+
`..${process.platform === "win32" ? "\\" : "/"}`
|
|
38680
|
+
) && relativeInstallerCommandPath !== ".." && (0, import_node_path24.basename)(installerCommandPath) === "deepline";
|
|
38670
38681
|
const candidates = [
|
|
38671
38682
|
...isInstallerManagedLegacyLauncher(legacyLauncherPath) ? [legacyLauncherPath] : [],
|
|
38672
38683
|
(0, import_node_path24.join)(home, ".local", "bin", "deepline-real"),
|
|
@@ -38676,7 +38687,7 @@ function removeKnownLegacyPaths(baseUrl) {
|
|
|
38676
38687
|
(0, import_node_path24.join)(hostDir, "cli", ".version"),
|
|
38677
38688
|
(0, import_node_path24.join)(hostDir, "sdk", ".install-method"),
|
|
38678
38689
|
(0, import_node_path24.join)(hostDir, "sdk", ".command-path"),
|
|
38679
|
-
...
|
|
38690
|
+
...isOwnedInstallerCommand ? [
|
|
38680
38691
|
installerCommandPath,
|
|
38681
38692
|
(0, import_node_path24.join)((0, import_node_path24.dirname)(installerCommandPath), "deepline-sdk")
|
|
38682
38693
|
] : []
|
|
@@ -38854,7 +38865,7 @@ function reportSetupPhaseFailure(input2) {
|
|
|
38854
38865
|
failedPhase: input2.phase,
|
|
38855
38866
|
retry,
|
|
38856
38867
|
statePath,
|
|
38857
|
-
next: retry.command,
|
|
38868
|
+
next: input2.next ?? retry.command,
|
|
38858
38869
|
...input2.extra ?? {}
|
|
38859
38870
|
},
|
|
38860
38871
|
{ json: input2.json }
|
|
@@ -39168,6 +39179,14 @@ async function runSetupCommand(options) {
|
|
|
39168
39179
|
);
|
|
39169
39180
|
skillsPayload = parseCapturedJson(skills.stdout);
|
|
39170
39181
|
if (skills.exitCode !== 0) {
|
|
39182
|
+
if (scope === "global") {
|
|
39183
|
+
phases.skills = { status: "failed", code: "SKILLS_INSTALL_FAILED" };
|
|
39184
|
+
persistSetupProgress({ baseUrl, scope, root, phases });
|
|
39185
|
+
process.stderr.write(
|
|
39186
|
+
"Global skill setup failed. Trying project-local skills instead.\n"
|
|
39187
|
+
);
|
|
39188
|
+
return runSetupCommand({ scope: "local", json: options.json });
|
|
39189
|
+
}
|
|
39171
39190
|
return reportSetupPhaseFailure({
|
|
39172
39191
|
baseUrl,
|
|
39173
39192
|
scope,
|
|
@@ -39178,6 +39197,7 @@ async function runSetupCommand(options) {
|
|
|
39178
39197
|
exitCode: skills.exitCode,
|
|
39179
39198
|
message: typeof skillsPayload?.message === "string" ? skillsPayload.message : "Deepline skills could not be installed.",
|
|
39180
39199
|
json: options.json,
|
|
39200
|
+
next: `! ${setupResumeCommand(baseUrl, scope)}`,
|
|
39181
39201
|
extra: { detail: skillsPayload }
|
|
39182
39202
|
});
|
|
39183
39203
|
}
|
package/dist/cli/index.mjs
CHANGED
|
@@ -1030,7 +1030,7 @@ var SDK_RELEASE = {
|
|
|
1030
1030
|
// 0.2.0 makes Dataset Handles uniformly async-only after 0.1.320 briefly
|
|
1031
1031
|
// exposed storage-dependent synchronous access. This deliberate minor
|
|
1032
1032
|
// release keeps lazy paging semantics independent of row residency.
|
|
1033
|
-
version: "0.2.
|
|
1033
|
+
version: "0.2.60",
|
|
1034
1034
|
contracts: {
|
|
1035
1035
|
api: {
|
|
1036
1036
|
name: "sdk-http-api",
|
|
@@ -37131,9 +37131,9 @@ var install_commands_default = {
|
|
|
37131
37131
|
npx_binary: "npx",
|
|
37132
37132
|
npx_add_args_template: [
|
|
37133
37133
|
"--yes",
|
|
37134
|
-
"skills@
|
|
37134
|
+
"skills@1.5.18",
|
|
37135
37135
|
"add",
|
|
37136
|
-
"{
|
|
37136
|
+
"{skills_source_url}",
|
|
37137
37137
|
"--agent",
|
|
37138
37138
|
"{agents}",
|
|
37139
37139
|
"--global",
|
|
@@ -37152,6 +37152,9 @@ var install_commands_default = {
|
|
|
37152
37152
|
// src/cli/install-commands.ts
|
|
37153
37153
|
var INSTALL_COMMANDS = install_commands_default;
|
|
37154
37154
|
var DEFAULT_SKILL_AGENTS = INSTALL_COMMANDS.skills.default_agents;
|
|
37155
|
+
var SKILLS_NPX_PACKAGE = INSTALL_COMMANDS.skills.npx_add_args_template.find(
|
|
37156
|
+
(arg) => arg.startsWith("skills@")
|
|
37157
|
+
) ?? "skills@1.5.18";
|
|
37155
37158
|
var DEFAULT_V1_SKILL_NAMES = [
|
|
37156
37159
|
"build-tam",
|
|
37157
37160
|
"clay-to-deepline",
|
|
@@ -37186,12 +37189,16 @@ function shellJoin(args) {
|
|
|
37186
37189
|
function skillsIndexUrl(baseUrl) {
|
|
37187
37190
|
return `${normalizeBaseUrl2(baseUrl)}${INSTALL_COMMANDS.skills.index_path}`;
|
|
37188
37191
|
}
|
|
37192
|
+
function skillsSourceUrl(baseUrl) {
|
|
37193
|
+
return normalizeBaseUrl2(baseUrl);
|
|
37194
|
+
}
|
|
37189
37195
|
function buildSkillsAddArgs(baseUrl, skillName, options = {}) {
|
|
37190
37196
|
const skillNames = Array.isArray(skillName) ? skillName : [skillName];
|
|
37191
37197
|
const [firstSkillName, ...extraSkillNames] = skillNames;
|
|
37192
37198
|
const agents = options.agents ?? INSTALL_COMMANDS.skills.default_agents;
|
|
37193
37199
|
const values = {
|
|
37194
37200
|
skills_index_url: skillsIndexUrl(baseUrl),
|
|
37201
|
+
skills_source_url: skillsSourceUrl(baseUrl),
|
|
37195
37202
|
agents: agents.join(" "),
|
|
37196
37203
|
skill_name: firstSkillName ?? ""
|
|
37197
37204
|
};
|
|
@@ -37358,7 +37365,7 @@ function buildSkillsPlan(input2) {
|
|
|
37358
37365
|
args: [
|
|
37359
37366
|
"exec",
|
|
37360
37367
|
"--yes",
|
|
37361
|
-
|
|
37368
|
+
`--package=${SKILLS_NPX_PACKAGE}`,
|
|
37362
37369
|
"--",
|
|
37363
37370
|
"skills",
|
|
37364
37371
|
"remove",
|
|
@@ -37374,11 +37381,11 @@ function buildSkillsPlan(input2) {
|
|
|
37374
37381
|
args: [
|
|
37375
37382
|
"exec",
|
|
37376
37383
|
"--yes",
|
|
37377
|
-
|
|
37384
|
+
`--package=${SKILLS_NPX_PACKAGE}`,
|
|
37378
37385
|
"--",
|
|
37379
37386
|
"skills",
|
|
37380
37387
|
"add",
|
|
37381
|
-
|
|
37388
|
+
skillsSourceUrl(input2.baseUrl),
|
|
37382
37389
|
"--agent",
|
|
37383
37390
|
...input2.agents,
|
|
37384
37391
|
...scopeArgs,
|
|
@@ -37430,7 +37437,7 @@ function runProcess(command, args, cwd) {
|
|
|
37430
37437
|
child.once("error", reject);
|
|
37431
37438
|
child.once("close", (code) => {
|
|
37432
37439
|
if (code && stderr.trim()) {
|
|
37433
|
-
process.stderr.write(
|
|
37440
|
+
process.stderr.write(`${SKILLS_NPX_PACKAGE} exited ${code}.
|
|
37434
37441
|
`);
|
|
37435
37442
|
}
|
|
37436
37443
|
resolve19(code ?? 1);
|
|
@@ -37615,7 +37622,7 @@ function registerSkillsCommand(program) {
|
|
|
37615
37622
|
`
|
|
37616
37623
|
Notes:
|
|
37617
37624
|
This command removes and reinstalls only Deepline-managed skill names using
|
|
37618
|
-
skills@
|
|
37625
|
+
skills@1.5.18. Local scope writes into the resolved persistent project.
|
|
37619
37626
|
|
|
37620
37627
|
Examples:
|
|
37621
37628
|
deepline skills --json
|
|
@@ -38555,7 +38562,7 @@ import {
|
|
|
38555
38562
|
writeFileSync as writeFileSync16
|
|
38556
38563
|
} from "fs";
|
|
38557
38564
|
import { homedir as homedir13 } from "os";
|
|
38558
|
-
import { dirname as dirname17, join as join20, resolve as resolve18 } from "path";
|
|
38565
|
+
import { basename as basename6, dirname as dirname17, join as join20, relative as relative6, resolve as resolve18 } from "path";
|
|
38559
38566
|
var SETUP_PHASE_NAMES = [
|
|
38560
38567
|
"cli",
|
|
38561
38568
|
"cleanup",
|
|
@@ -38755,6 +38762,10 @@ function removeKnownLegacyPaths(baseUrl) {
|
|
|
38755
38762
|
const installerCommandPath = safeRead(
|
|
38756
38763
|
join20(hostDir, "sdk", ".command-path")
|
|
38757
38764
|
).trim();
|
|
38765
|
+
const relativeInstallerCommandPath = installerCommandPath ? relative6(resolve18(hostDir), resolve18(installerCommandPath)) : "";
|
|
38766
|
+
const isOwnedInstallerCommand = Boolean(installerCommandPath) && relativeInstallerCommandPath !== "" && !relativeInstallerCommandPath.startsWith(
|
|
38767
|
+
`..${process.platform === "win32" ? "\\" : "/"}`
|
|
38768
|
+
) && relativeInstallerCommandPath !== ".." && basename6(installerCommandPath) === "deepline";
|
|
38758
38769
|
const candidates = [
|
|
38759
38770
|
...isInstallerManagedLegacyLauncher(legacyLauncherPath) ? [legacyLauncherPath] : [],
|
|
38760
38771
|
join20(home, ".local", "bin", "deepline-real"),
|
|
@@ -38764,7 +38775,7 @@ function removeKnownLegacyPaths(baseUrl) {
|
|
|
38764
38775
|
join20(hostDir, "cli", ".version"),
|
|
38765
38776
|
join20(hostDir, "sdk", ".install-method"),
|
|
38766
38777
|
join20(hostDir, "sdk", ".command-path"),
|
|
38767
|
-
...
|
|
38778
|
+
...isOwnedInstallerCommand ? [
|
|
38768
38779
|
installerCommandPath,
|
|
38769
38780
|
join20(dirname17(installerCommandPath), "deepline-sdk")
|
|
38770
38781
|
] : []
|
|
@@ -38942,7 +38953,7 @@ function reportSetupPhaseFailure(input2) {
|
|
|
38942
38953
|
failedPhase: input2.phase,
|
|
38943
38954
|
retry,
|
|
38944
38955
|
statePath,
|
|
38945
|
-
next: retry.command,
|
|
38956
|
+
next: input2.next ?? retry.command,
|
|
38946
38957
|
...input2.extra ?? {}
|
|
38947
38958
|
},
|
|
38948
38959
|
{ json: input2.json }
|
|
@@ -39256,6 +39267,14 @@ async function runSetupCommand(options) {
|
|
|
39256
39267
|
);
|
|
39257
39268
|
skillsPayload = parseCapturedJson(skills.stdout);
|
|
39258
39269
|
if (skills.exitCode !== 0) {
|
|
39270
|
+
if (scope === "global") {
|
|
39271
|
+
phases.skills = { status: "failed", code: "SKILLS_INSTALL_FAILED" };
|
|
39272
|
+
persistSetupProgress({ baseUrl, scope, root, phases });
|
|
39273
|
+
process.stderr.write(
|
|
39274
|
+
"Global skill setup failed. Trying project-local skills instead.\n"
|
|
39275
|
+
);
|
|
39276
|
+
return runSetupCommand({ scope: "local", json: options.json });
|
|
39277
|
+
}
|
|
39259
39278
|
return reportSetupPhaseFailure({
|
|
39260
39279
|
baseUrl,
|
|
39261
39280
|
scope,
|
|
@@ -39266,6 +39285,7 @@ async function runSetupCommand(options) {
|
|
|
39266
39285
|
exitCode: skills.exitCode,
|
|
39267
39286
|
message: typeof skillsPayload?.message === "string" ? skillsPayload.message : "Deepline skills could not be installed.",
|
|
39268
39287
|
json: options.json,
|
|
39288
|
+
next: `! ${setupResumeCommand(baseUrl, scope)}`,
|
|
39269
39289
|
extra: { detail: skillsPayload }
|
|
39270
39290
|
});
|
|
39271
39291
|
}
|
package/dist/index.js
CHANGED
|
@@ -763,7 +763,7 @@ var SDK_RELEASE = {
|
|
|
763
763
|
// 0.2.0 makes Dataset Handles uniformly async-only after 0.1.320 briefly
|
|
764
764
|
// exposed storage-dependent synchronous access. This deliberate minor
|
|
765
765
|
// release keeps lazy paging semantics independent of row residency.
|
|
766
|
-
version: "0.2.
|
|
766
|
+
version: "0.2.60",
|
|
767
767
|
contracts: {
|
|
768
768
|
api: {
|
|
769
769
|
name: "sdk-http-api",
|
package/dist/index.mjs
CHANGED
|
@@ -689,7 +689,7 @@ var SDK_RELEASE = {
|
|
|
689
689
|
// 0.2.0 makes Dataset Handles uniformly async-only after 0.1.320 briefly
|
|
690
690
|
// exposed storage-dependent synchronous access. This deliberate minor
|
|
691
691
|
// release keeps lazy paging semantics independent of row residency.
|
|
692
|
-
version: "0.2.
|
|
692
|
+
version: "0.2.60",
|
|
693
693
|
contracts: {
|
|
694
694
|
api: {
|
|
695
695
|
name: "sdk-http-api",
|
package/package.json
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "deepline",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.2.60",
|
|
4
|
+
"description": "GTM data CLI and TypeScript SDK for coding agents",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"repository": {
|
|
7
|
-
"type": "git",
|
|
8
|
-
"url": "git+https://github.com/deeplineai/deepline.git"
|
|
9
|
-
},
|
|
10
6
|
"homepage": "https://code.deepline.com",
|
|
11
7
|
"keywords": [
|
|
12
8
|
"deepline",
|