deepline 0.1.32 → 0.1.35
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 +33 -20
- package/dist/cli/index.js +1117 -381
- package/dist/cli/index.mjs +1058 -322
- package/dist/index.d.mts +131 -85
- package/dist/index.d.ts +131 -85
- package/dist/index.js +569 -124
- package/dist/index.mjs +570 -125
- package/dist/repo/apps/play-runner-workers/src/coordinator-entry.ts +212 -1
- package/dist/repo/apps/play-runner-workers/src/dedup-do.ts +129 -2
- package/dist/repo/apps/play-runner-workers/src/entry.ts +147 -64
- package/dist/repo/apps/play-runner-workers/src/workflow-retry.ts +50 -0
- package/dist/repo/sdk/src/client.ts +46 -33
- package/dist/repo/sdk/src/config.ts +109 -233
- package/dist/repo/sdk/src/http.ts +44 -4
- package/dist/repo/sdk/src/index.ts +8 -5
- package/dist/repo/sdk/src/play.ts +124 -45
- package/dist/repo/sdk/src/plays/harness-stub.ts +2 -2
- package/dist/repo/sdk/src/tool-output.ts +26 -7
- package/dist/repo/sdk/src/types.ts +48 -12
- package/dist/repo/sdk/src/version.ts +2 -2
- package/dist/repo/shared_libs/play-runtime/run-failure.ts +49 -0
- package/dist/repo/shared_libs/play-runtime/scheduler-backend.ts +1 -1
- package/dist/repo/shared_libs/play-runtime/tool-result.ts +138 -35
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -15,12 +15,12 @@ Wait for health: `curl http://localhost:3000/api/v2/health`
|
|
|
15
15
|
### Auth (one-time)
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
|
-
|
|
18
|
+
./cli-env sdk-worktree deepline auth register
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
Opens browser for approval. Stores SDK CLI auth in `~/.local/deepline/<host-slug>/.env`.
|
|
22
22
|
|
|
23
|
-
Check status:
|
|
23
|
+
Check status: `./cli-env sdk-worktree deepline auth status --json`
|
|
24
24
|
|
|
25
25
|
### Making changes
|
|
26
26
|
|
|
@@ -29,10 +29,13 @@ Edit any file in `sdk/src/` and re-run. No build step needed — `deepline-dev.t
|
|
|
29
29
|
```bash
|
|
30
30
|
# Edit sdk/src/cli/commands/play.ts
|
|
31
31
|
# Then immediately:
|
|
32
|
-
|
|
32
|
+
./cli-env sdk-worktree deepline plays run --file my-play.play.ts --watch
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
The root `package.json` has an alias
|
|
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.
|
|
36
39
|
|
|
37
40
|
### When you need to build
|
|
38
41
|
|
|
@@ -49,28 +52,38 @@ cd sdk && bun run build # or: npm run sdk:build from root
|
|
|
49
52
|
|
|
50
53
|
| File | Set by | Contains |
|
|
51
54
|
| ------------------------------------ | ------------------- | ----------------------------------------- |
|
|
52
|
-
| `~/.local/deepline/<host-slug>/.env` | SDK `auth register` | `
|
|
55
|
+
| `~/.local/deepline/<host-slug>/.env` | SDK `auth register` | `DEEPLINE_HOST_URL`, `DEEPLINE_API_KEY` |
|
|
56
|
+
| `.env.deepline` | Developer/agent | `DEEPLINE_HOST_URL`, `DEEPLINE_API_KEY` |
|
|
57
|
+
|
|
58
|
+
The SDK CLI env contract is only `DEEPLINE_HOST_URL` and `DEEPLINE_API_KEY`.
|
|
59
|
+
Do not route the SDK CLI through `.env`, `.env.local`, or `.env.worktree`.
|
|
53
60
|
|
|
54
|
-
|
|
61
|
+
Config resolution order:
|
|
55
62
|
|
|
56
|
-
|
|
63
|
+
```text
|
|
64
|
+
host: explicit SDK option -> DEEPLINE_HOST_URL -> nearest .env.deepline -> saved production auth -> https://code.deepline.com
|
|
65
|
+
key: explicit SDK option -> DEEPLINE_API_KEY -> matching nearest .env.deepline -> saved auth for the resolved host
|
|
66
|
+
```
|
|
57
67
|
|
|
58
68
|
## CLI commands
|
|
59
69
|
|
|
60
70
|
```bash
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
71
|
+
./cli-env sdk-worktree deepline health
|
|
72
|
+
./cli-env sdk-worktree deepline auth register
|
|
73
|
+
./cli-env sdk-worktree deepline auth status
|
|
74
|
+
./cli-env sdk-worktree deepline tools list
|
|
75
|
+
./cli-env sdk-worktree deepline tools describe test_rate_limit
|
|
76
|
+
./cli-env sdk-worktree deepline tools execute test_rate_limit --input '{"key":"stripe.com"}'
|
|
77
|
+
./cli-env sdk-worktree deepline plays run my-play.play.ts --input '{}' --watch
|
|
78
|
+
./cli-env sdk-worktree deepline plays run company-lookup --input '{}' --watch
|
|
79
|
+
./cli-env sdk-worktree deepline plays get company-lookup --json
|
|
80
|
+
./cli-env sdk-worktree deepline plays versions company-lookup --json
|
|
81
|
+
./cli-env sdk-worktree deepline runs list --play company-lookup --status failed --json
|
|
82
|
+
./cli-env sdk-worktree deepline runs get run_123 --json
|
|
83
|
+
./cli-env sdk-worktree deepline runs tail run_123 --json
|
|
84
|
+
./cli-env sdk-worktree deepline runs stop run_123 --reason "no longer needed" --json
|
|
85
|
+
./cli-env sdk-worktree deepline plays publish my-play.play.ts --latest --json
|
|
86
|
+
./cli-env sdk-worktree deepline update
|
|
74
87
|
```
|
|
75
88
|
|
|
76
89
|
`tools describe` and `tools execute` are canonical. `tools get` and `tools run`
|