deepline 0.1.31 → 0.1.33

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 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
- bun sdk/bin/deepline-dev.ts auth register
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: `bun sdk/bin/deepline-dev.ts auth status --json`
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
- bun sdk/bin/deepline-dev.ts play run --file my-play.play.ts --watch
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: `bun run deepline` does the same thing.
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` | `DEEPLINE_ORIGIN_URL`, `DEEPLINE_API_KEY` |
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
- `deepline-dev.ts` hard-sets `DEEPLINE_ORIGIN_URL=http://localhost:3000` so you never need to configure it manually for local dev.
61
+ Config resolution order:
55
62
 
56
- Config resolution order: explicit options > env vars > checkout `.env.worktree` > SDK v2 `.env` > prod fallback.
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
- bun sdk/bin/deepline-dev.ts health
62
- bun sdk/bin/deepline-dev.ts auth register|status
63
- bun sdk/bin/deepline-dev.ts tools list|describe|execute
64
- bun sdk/bin/deepline-dev.ts plays run <file.play.ts> [--input '{}'] [--<input> value] [--watch]
65
- bun sdk/bin/deepline-dev.ts plays run <name> [--input '{}'] [--<input> value] [--watch]
66
- bun sdk/bin/deepline-dev.ts plays get <file.play.ts|name> [--json]
67
- bun sdk/bin/deepline-dev.ts plays versions --name <name> [--json]
68
- bun sdk/bin/deepline-dev.ts runs list --play <name> [--status failed] [--json]
69
- bun sdk/bin/deepline-dev.ts runs get <run-id> [--json]
70
- bun sdk/bin/deepline-dev.ts runs tail <run-id> [--json]
71
- bun sdk/bin/deepline-dev.ts runs stop <run-id> [--reason "..."] [--json]
72
- bun sdk/bin/deepline-dev.ts plays publish <play-file.ts|name> [--latest|--revision-id <id>] [--json]
73
- bun sdk/bin/deepline-dev.ts update
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`