trampoline-delta 0.1.5__tar.gz
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.
- trampoline_delta-0.1.5/.gitignore +13 -0
- trampoline_delta-0.1.5/.python-version +1 -0
- trampoline_delta-0.1.5/AGENTS.md +15 -0
- trampoline_delta-0.1.5/PKG-INFO +178 -0
- trampoline_delta-0.1.5/README.md +160 -0
- trampoline_delta-0.1.5/delta_cli/__init__.py +5 -0
- trampoline_delta-0.1.5/delta_cli/_contracts.py +3 -0
- trampoline_delta-0.1.5/delta_cli/_embedded_contracts/SHA256SUMS.json +16 -0
- trampoline_delta-0.1.5/delta_cli/_embedded_contracts/__init__.py +228 -0
- trampoline_delta-0.1.5/delta_cli/_embedded_contracts/environment.py +54 -0
- trampoline_delta-0.1.5/delta_cli/_embedded_contracts/ids.py +65 -0
- trampoline_delta-0.1.5/delta_cli/_embedded_contracts/invocation.py +69 -0
- trampoline_delta-0.1.5/delta_cli/_embedded_contracts/manifests.py +2411 -0
- trampoline_delta-0.1.5/delta_cli/_embedded_contracts/public_http_v2.py +2641 -0
- trampoline_delta-0.1.5/delta_cli/_embedded_contracts/run_activity.py +493 -0
- trampoline_delta-0.1.5/delta_cli/_embedded_contracts/run_lifecycle.py +68 -0
- trampoline_delta-0.1.5/delta_cli/_embedded_contracts/run_listing.py +10 -0
- trampoline_delta-0.1.5/delta_cli/_embedded_contracts/s3.py +46 -0
- trampoline_delta-0.1.5/delta_cli/_embedded_contracts/scheduling.py +66 -0
- trampoline_delta-0.1.5/delta_cli/_embedded_contracts/storage.py +153 -0
- trampoline_delta-0.1.5/delta_cli/_embedded_contracts/webhooks.py +88 -0
- trampoline_delta-0.1.5/delta_cli/_embedded_contracts/workspace.py +256 -0
- trampoline_delta-0.1.5/delta_cli/_embedded_git_remote_s3/SHA256SUMS.json +17 -0
- trampoline_delta-0.1.5/delta_cli/_embedded_git_remote_s3/__init__.py +65 -0
- trampoline_delta-0.1.5/delta_cli/_embedded_git_remote_s3/common.py +124 -0
- trampoline_delta-0.1.5/delta_cli/_embedded_git_remote_s3/enums.py +17 -0
- trampoline_delta-0.1.5/delta_cli/_embedded_git_remote_s3/gcs.py +445 -0
- trampoline_delta-0.1.5/delta_cli/_embedded_git_remote_s3/git.py +142 -0
- trampoline_delta-0.1.5/delta_cli/_embedded_git_remote_s3/lfs.py +237 -0
- trampoline_delta-0.1.5/delta_cli/_embedded_git_remote_s3/licenses/LICENSE +201 -0
- trampoline_delta-0.1.5/delta_cli/_embedded_git_remote_s3/licenses/NOTICE +2 -0
- trampoline_delta-0.1.5/delta_cli/_embedded_git_remote_s3/licenses/THIRD_PARTY_NOTICE.md +34 -0
- trampoline_delta-0.1.5/delta_cli/_embedded_git_remote_s3/manage.py +539 -0
- trampoline_delta-0.1.5/delta_cli/_embedded_git_remote_s3/object_store.py +265 -0
- trampoline_delta-0.1.5/delta_cli/_embedded_git_remote_s3/providers.py +75 -0
- trampoline_delta-0.1.5/delta_cli/_embedded_git_remote_s3/ref_lock.py +101 -0
- trampoline_delta-0.1.5/delta_cli/_embedded_git_remote_s3/remote.py +661 -0
- trampoline_delta-0.1.5/delta_cli/_embedded_git_remote_s3/s3.py +374 -0
- trampoline_delta-0.1.5/delta_cli/_embedded_object_store/__init__.py +58 -0
- trampoline_delta-0.1.5/delta_cli/_embedded_object_store/base.py +81 -0
- trampoline_delta-0.1.5/delta_cli/_embedded_object_store/factory.py +60 -0
- trampoline_delta-0.1.5/delta_cli/_embedded_object_store/gcs.py +56 -0
- trampoline_delta-0.1.5/delta_cli/_embedded_object_store/models.py +60 -0
- trampoline_delta-0.1.5/delta_cli/_embedded_object_store/s3.py +72 -0
- trampoline_delta-0.1.5/delta_cli/api.py +829 -0
- trampoline_delta-0.1.5/delta_cli/auth/__init__.py +19 -0
- trampoline_delta-0.1.5/delta_cli/auth/config.py +171 -0
- trampoline_delta-0.1.5/delta_cli/auth/credential_store.py +191 -0
- trampoline_delta-0.1.5/delta_cli/auth/flow.py +573 -0
- trampoline_delta-0.1.5/delta_cli/auth/pkce.py +21 -0
- trampoline_delta-0.1.5/delta_cli/auth/schema.py +81 -0
- trampoline_delta-0.1.5/delta_cli/auth/service.py +63 -0
- trampoline_delta-0.1.5/delta_cli/bundle.py +146 -0
- trampoline_delta-0.1.5/delta_cli/cli.py +335 -0
- trampoline_delta-0.1.5/delta_cli/client_storage.py +62 -0
- trampoline_delta-0.1.5/delta_cli/commands/__init__.py +3 -0
- trampoline_delta-0.1.5/delta_cli/commands/deploy.py +100 -0
- trampoline_delta-0.1.5/delta_cli/commands/discovery.py +163 -0
- trampoline_delta-0.1.5/delta_cli/commands/init.py +40 -0
- trampoline_delta-0.1.5/delta_cli/commands/runs.py +1008 -0
- trampoline_delta-0.1.5/delta_cli/commands/webhooks.py +141 -0
- trampoline_delta-0.1.5/delta_cli/config.py +177 -0
- trampoline_delta-0.1.5/delta_cli/deploy_producer.py +734 -0
- trampoline_delta-0.1.5/delta_cli/discovery.py +273 -0
- trampoline_delta-0.1.5/delta_cli/environment.py +363 -0
- trampoline_delta-0.1.5/delta_cli/errors.py +38 -0
- trampoline_delta-0.1.5/delta_cli/git_environment.py +87 -0
- trampoline_delta-0.1.5/delta_cli/git_source.py +313 -0
- trampoline_delta-0.1.5/delta_cli/project.py +171 -0
- trampoline_delta-0.1.5/delta_cli/storage.py +165 -0
- trampoline_delta-0.1.5/delta_cli/workspace_output.py +483 -0
- trampoline_delta-0.1.5/hatch_build.py +26 -0
- trampoline_delta-0.1.5/main.py +5 -0
- trampoline_delta-0.1.5/pyproject.toml +79 -0
- trampoline_delta-0.1.5/scripts/git-remote-gs+zip +3 -0
- trampoline_delta-0.1.5/scripts/git-remote-s3+zip +3 -0
- trampoline_delta-0.1.5/tests/__init__.py +1 -0
- trampoline_delta-0.1.5/tests/test_api_client.py +785 -0
- trampoline_delta-0.1.5/tests/test_artifact_scripts.py +182 -0
- trampoline_delta-0.1.5/tests/test_auth.py +567 -0
- trampoline_delta-0.1.5/tests/test_bundle.py +88 -0
- trampoline_delta-0.1.5/tests/test_cli.py +168 -0
- trampoline_delta-0.1.5/tests/test_config.py +114 -0
- trampoline_delta-0.1.5/tests/test_credential_store.py +144 -0
- trampoline_delta-0.1.5/tests/test_deploy_environment.py +593 -0
- trampoline_delta-0.1.5/tests/test_deploy_producer.py +714 -0
- trampoline_delta-0.1.5/tests/test_discovery.py +187 -0
- trampoline_delta-0.1.5/tests/test_discovery_command.py +326 -0
- trampoline_delta-0.1.5/tests/test_environment.py +447 -0
- trampoline_delta-0.1.5/tests/test_git_source.py +308 -0
- trampoline_delta-0.1.5/tests/test_pkce.py +19 -0
- trampoline_delta-0.1.5/tests/test_project.py +110 -0
- trampoline_delta-0.1.5/tests/test_release_tag.py +159 -0
- trampoline_delta-0.1.5/tests/test_runs_command.py +1110 -0
- trampoline_delta-0.1.5/tests/test_storage.py +320 -0
- trampoline_delta-0.1.5/tests/test_webhooks_command.py +250 -0
- trampoline_delta-0.1.5/tools/generate_embedded_contracts.py +187 -0
- trampoline_delta-0.1.5/tools/generate_embedded_git_remote.py +78 -0
- trampoline_delta-0.1.5/tools/validate_release_tag.py +98 -0
- trampoline_delta-0.1.5/tools/verify_artifact.py +197 -0
- trampoline_delta-0.1.5/tools/verify_installed_artifact.py +176 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
__pycache__/
|
|
2
|
+
.venv
|
|
3
|
+
.env.*
|
|
4
|
+
.env
|
|
5
|
+
.delta/
|
|
6
|
+
gha-creds-*.json
|
|
7
|
+
|
|
8
|
+
# Rust and maturin build artifacts. Keep Cargo.lock and toolchain manifests tracked.
|
|
9
|
+
target/
|
|
10
|
+
pkgs/mesa-fs/dist/
|
|
11
|
+
pkgs/mesa-fs/python/mesa_fs/_native*.so
|
|
12
|
+
pkgs/mesa-fs/python/mesa_fs/_native*.dylib
|
|
13
|
+
pkgs/mesa-fs/python/mesa_fs/_native*.pyd
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.13
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Agent Instructions
|
|
2
|
+
|
|
3
|
+
## Tooling
|
|
4
|
+
|
|
5
|
+
- Always use `uv` for Python commands, dependency management, test runs, and local execution.
|
|
6
|
+
- Do not document or introduce `python`, `python3`, or `pip` workflows unless the user explicitly asks for a non-uv escape hatch.
|
|
7
|
+
|
|
8
|
+
## Defensive Programming
|
|
9
|
+
|
|
10
|
+
- Do not add silent fallbacks for core behavior. If the expected dependency, service, credential store, schema, or configuration is unavailable, fail loudly.
|
|
11
|
+
- Do not store authentication secrets in plaintext fallback files. Auth credentials must use the intended secure store.
|
|
12
|
+
- Do not mask unexpected states with `getattr(x, None)`, broad `except Exception`, generic default values, or long chains of conditional recovery.
|
|
13
|
+
- Do not coerce external data into the type you hoped it had. Validate the type and fail if it is wrong.
|
|
14
|
+
- Use explicit types. Avoid `Any` unless the code is genuinely accepting an arbitrary object by design.
|
|
15
|
+
- Keep control flow direct. Prefer typed models and small validation functions over loose dictionaries and defensive branching.
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: trampoline-delta
|
|
3
|
+
Version: 0.1.5
|
|
4
|
+
Summary: Command line interface for the Delta service
|
|
5
|
+
Requires-Python: >=3.13
|
|
6
|
+
Requires-Dist: avalanche-ai==0.1.5rc1
|
|
7
|
+
Requires-Dist: boto3<1.43.1,>=1.42.24
|
|
8
|
+
Requires-Dist: botocore<1.43.1,>=1.42.24
|
|
9
|
+
Requires-Dist: cryptography>=48.0.1
|
|
10
|
+
Requires-Dist: google-auth>=2.38.0
|
|
11
|
+
Requires-Dist: google-cloud-storage<4.0.0,>=3.13.0
|
|
12
|
+
Requires-Dist: httpx<1.0,>=0.27.0
|
|
13
|
+
Requires-Dist: pydantic>=2.13.4
|
|
14
|
+
Requires-Dist: python-ulid>=3.1.0
|
|
15
|
+
Requires-Dist: urllib3<3.0.0,>=2.7.0
|
|
16
|
+
Requires-Dist: zstandard>=0.23.0
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
|
|
19
|
+
# Delta CLI
|
|
20
|
+
|
|
21
|
+
Delta CLI is a command line interface for the Delta service.
|
|
22
|
+
|
|
23
|
+
This repository contains the Delta command router, version output, and
|
|
24
|
+
browser-based CLI authentication.
|
|
25
|
+
|
|
26
|
+
## Features
|
|
27
|
+
|
|
28
|
+
- Built-in help via `delta --help` and per-command `--help`
|
|
29
|
+
- Version output via `delta version` and `delta --version`
|
|
30
|
+
- OAuth login with Authorization Code + PKCE
|
|
31
|
+
- One-shot `127.0.0.1:8400` callback server or an optional Console callback handoff
|
|
32
|
+
- Session storage in `~/.trampoline-ai/delta/auth.json` with owner-only permissions
|
|
33
|
+
- Automatic bearer authentication for service API commands
|
|
34
|
+
|
|
35
|
+
## Requirements
|
|
36
|
+
|
|
37
|
+
- Python 3.13+
|
|
38
|
+
- uv
|
|
39
|
+
|
|
40
|
+
## Installation
|
|
41
|
+
|
|
42
|
+
From this directory, install the CLI in editable mode:
|
|
43
|
+
|
|
44
|
+
~~~bash
|
|
45
|
+
uv tool install -e .
|
|
46
|
+
~~~
|
|
47
|
+
|
|
48
|
+
You can also run the CLI directly during development:
|
|
49
|
+
|
|
50
|
+
~~~bash
|
|
51
|
+
uv run --with-editable . delta --help
|
|
52
|
+
uv run --with-editable . delta version
|
|
53
|
+
~~~
|
|
54
|
+
|
|
55
|
+
## Authentication Setup
|
|
56
|
+
|
|
57
|
+
The CLI uses a public OAuth application. Do not use secret keys for interactive
|
|
58
|
+
CLI user login.
|
|
59
|
+
|
|
60
|
+
The local session is stored in `~/.trampoline-ai/delta/auth.json`. Delta creates the
|
|
61
|
+
containing directory with mode `0700` and writes the credential file atomically with
|
|
62
|
+
mode `0600`.
|
|
63
|
+
|
|
64
|
+
Create an OAuth application in the same auth project as `../console`:
|
|
65
|
+
|
|
66
|
+
- Default redirect URI: `http://127.0.0.1:8400/callback`
|
|
67
|
+
- Console callback URI for `--manual-callback`:
|
|
68
|
+
`https://cloud.avalanche.run/oauth/callback`
|
|
69
|
+
- Public client: enabled
|
|
70
|
+
- PKCE required: enabled
|
|
71
|
+
- Scopes: `profile email offline_access user:org:read`
|
|
72
|
+
|
|
73
|
+
A Clerk administrator must register the applicable redirect URI before its login mode
|
|
74
|
+
can succeed.
|
|
75
|
+
|
|
76
|
+
The production issuer, public OAuth client ID, and callback port are built in.
|
|
77
|
+
Sign in without configuration:
|
|
78
|
+
|
|
79
|
+
~~~bash
|
|
80
|
+
delta login
|
|
81
|
+
~~~
|
|
82
|
+
|
|
83
|
+
For another deployment, override the public auth configuration explicitly:
|
|
84
|
+
|
|
85
|
+
~~~bash
|
|
86
|
+
export DELTA_AUTH_ISSUER_URL="https://your-auth-issuer.example.com"
|
|
87
|
+
export DELTA_AUTH_CLIENT_ID="your_oauth_client_id"
|
|
88
|
+
~~~
|
|
89
|
+
|
|
90
|
+
For local development in this monorepo, the CLI can also derive the issuer from
|
|
91
|
+
`DELTA_AUTH_PUBLISHABLE_KEY`.
|
|
92
|
+
|
|
93
|
+
## Command Overview
|
|
94
|
+
|
|
95
|
+
### `delta version`
|
|
96
|
+
|
|
97
|
+
Shows the installed Delta CLI version.
|
|
98
|
+
|
|
99
|
+
### `delta auth login`
|
|
100
|
+
|
|
101
|
+
Signs in to Delta through your browser.
|
|
102
|
+
|
|
103
|
+
~~~bash
|
|
104
|
+
delta login
|
|
105
|
+
~~~
|
|
106
|
+
|
|
107
|
+
The CLI uses the registered callback port `8400`. Pass `--callback-port 0` for a
|
|
108
|
+
random loopback port when another provider supports RFC 8252 loopback redirects.
|
|
109
|
+
|
|
110
|
+
Use `--no-browser` to print the sign-in URL instead of opening it:
|
|
111
|
+
|
|
112
|
+
~~~bash
|
|
113
|
+
delta auth login --no-browser
|
|
114
|
+
~~~
|
|
115
|
+
|
|
116
|
+
Use the Console callback when the browser cannot reach the local loopback listener:
|
|
117
|
+
|
|
118
|
+
~~~bash
|
|
119
|
+
delta auth login --manual-callback
|
|
120
|
+
~~~
|
|
121
|
+
|
|
122
|
+
Complete sign-in in the browser, select **Copy response** at the Console callback
|
|
123
|
+
page, then paste that response into Delta's hidden terminal prompt. The response is
|
|
124
|
+
bound to the in-memory PKCE sign-in attempt; do not paste it into logs or chat.
|
|
125
|
+
|
|
126
|
+
### `delta auth status`
|
|
127
|
+
|
|
128
|
+
Shows whether you are signed in.
|
|
129
|
+
|
|
130
|
+
### `delta auth whoami`
|
|
131
|
+
|
|
132
|
+
Shows the signed-in account.
|
|
133
|
+
|
|
134
|
+
### `delta auth logout`
|
|
135
|
+
|
|
136
|
+
Signs out of Delta.
|
|
137
|
+
|
|
138
|
+
### `delta --help`
|
|
139
|
+
|
|
140
|
+
Shows available commands and global options.
|
|
141
|
+
|
|
142
|
+
### Portable Avalanche workspaces
|
|
143
|
+
|
|
144
|
+
Capture one or more local directories as typed `ava.Workspace` run inputs:
|
|
145
|
+
|
|
146
|
+
~~~bash
|
|
147
|
+
delta runs create demo-flow \
|
|
148
|
+
--workspace source=./input-tree \
|
|
149
|
+
--workspace config=./config-tree
|
|
150
|
+
~~~
|
|
151
|
+
|
|
152
|
+
Each field name must be unique across `--workspace` and JSON inputs. Delta
|
|
153
|
+
captures the directory with Avalanche's workspace manifest codec and uploads the
|
|
154
|
+
manifest through the run-scoped artifact path; workflow code receives
|
|
155
|
+
`ava.Workspace` when its declared input field uses that annotation. Manifests
|
|
156
|
+
are limited to 48 MiB; the CLI rejects oversized trees from directory metadata
|
|
157
|
+
before reading their file contents.
|
|
158
|
+
|
|
159
|
+
Materialize terminal workspace trees into a new local directory:
|
|
160
|
+
|
|
161
|
+
~~~bash
|
|
162
|
+
delta runs output run_01KCVST2FP4QC5NKZNN5NS0Z2W --output-dir ./downloaded
|
|
163
|
+
~~~
|
|
164
|
+
|
|
165
|
+
The destination must not already exist. Workspace values are written as
|
|
166
|
+
`workspace-0001`, `workspace-0002`, and so on in deterministic result order.
|
|
167
|
+
Mixed `ava.File` references remain in the result envelope. Without
|
|
168
|
+
`--output-dir`, `runs output` continues to print that standard Avalanche result
|
|
169
|
+
document unchanged.
|
|
170
|
+
|
|
171
|
+
Service API commands automatically load and refresh the signed-in session from
|
|
172
|
+
`~/.trampoline-ai/delta/auth.json`. An explicit `--token` wins, then a nonblank
|
|
173
|
+
`DELTA_TOKEN`, then the saved session; the user TOML configuration rejects plaintext
|
|
174
|
+
tokens.
|
|
175
|
+
|
|
176
|
+
The API enforces the selected Clerk organization and its role permissions. The
|
|
177
|
+
signed-in user must belong to the requested organization, and that role must
|
|
178
|
+
include the Delta action used by the service command.
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# Delta CLI
|
|
2
|
+
|
|
3
|
+
Delta CLI is a command line interface for the Delta service.
|
|
4
|
+
|
|
5
|
+
This repository contains the Delta command router, version output, and
|
|
6
|
+
browser-based CLI authentication.
|
|
7
|
+
|
|
8
|
+
## Features
|
|
9
|
+
|
|
10
|
+
- Built-in help via `delta --help` and per-command `--help`
|
|
11
|
+
- Version output via `delta version` and `delta --version`
|
|
12
|
+
- OAuth login with Authorization Code + PKCE
|
|
13
|
+
- One-shot `127.0.0.1:8400` callback server or an optional Console callback handoff
|
|
14
|
+
- Session storage in `~/.trampoline-ai/delta/auth.json` with owner-only permissions
|
|
15
|
+
- Automatic bearer authentication for service API commands
|
|
16
|
+
|
|
17
|
+
## Requirements
|
|
18
|
+
|
|
19
|
+
- Python 3.13+
|
|
20
|
+
- uv
|
|
21
|
+
|
|
22
|
+
## Installation
|
|
23
|
+
|
|
24
|
+
From this directory, install the CLI in editable mode:
|
|
25
|
+
|
|
26
|
+
~~~bash
|
|
27
|
+
uv tool install -e .
|
|
28
|
+
~~~
|
|
29
|
+
|
|
30
|
+
You can also run the CLI directly during development:
|
|
31
|
+
|
|
32
|
+
~~~bash
|
|
33
|
+
uv run --with-editable . delta --help
|
|
34
|
+
uv run --with-editable . delta version
|
|
35
|
+
~~~
|
|
36
|
+
|
|
37
|
+
## Authentication Setup
|
|
38
|
+
|
|
39
|
+
The CLI uses a public OAuth application. Do not use secret keys for interactive
|
|
40
|
+
CLI user login.
|
|
41
|
+
|
|
42
|
+
The local session is stored in `~/.trampoline-ai/delta/auth.json`. Delta creates the
|
|
43
|
+
containing directory with mode `0700` and writes the credential file atomically with
|
|
44
|
+
mode `0600`.
|
|
45
|
+
|
|
46
|
+
Create an OAuth application in the same auth project as `../console`:
|
|
47
|
+
|
|
48
|
+
- Default redirect URI: `http://127.0.0.1:8400/callback`
|
|
49
|
+
- Console callback URI for `--manual-callback`:
|
|
50
|
+
`https://cloud.avalanche.run/oauth/callback`
|
|
51
|
+
- Public client: enabled
|
|
52
|
+
- PKCE required: enabled
|
|
53
|
+
- Scopes: `profile email offline_access user:org:read`
|
|
54
|
+
|
|
55
|
+
A Clerk administrator must register the applicable redirect URI before its login mode
|
|
56
|
+
can succeed.
|
|
57
|
+
|
|
58
|
+
The production issuer, public OAuth client ID, and callback port are built in.
|
|
59
|
+
Sign in without configuration:
|
|
60
|
+
|
|
61
|
+
~~~bash
|
|
62
|
+
delta login
|
|
63
|
+
~~~
|
|
64
|
+
|
|
65
|
+
For another deployment, override the public auth configuration explicitly:
|
|
66
|
+
|
|
67
|
+
~~~bash
|
|
68
|
+
export DELTA_AUTH_ISSUER_URL="https://your-auth-issuer.example.com"
|
|
69
|
+
export DELTA_AUTH_CLIENT_ID="your_oauth_client_id"
|
|
70
|
+
~~~
|
|
71
|
+
|
|
72
|
+
For local development in this monorepo, the CLI can also derive the issuer from
|
|
73
|
+
`DELTA_AUTH_PUBLISHABLE_KEY`.
|
|
74
|
+
|
|
75
|
+
## Command Overview
|
|
76
|
+
|
|
77
|
+
### `delta version`
|
|
78
|
+
|
|
79
|
+
Shows the installed Delta CLI version.
|
|
80
|
+
|
|
81
|
+
### `delta auth login`
|
|
82
|
+
|
|
83
|
+
Signs in to Delta through your browser.
|
|
84
|
+
|
|
85
|
+
~~~bash
|
|
86
|
+
delta login
|
|
87
|
+
~~~
|
|
88
|
+
|
|
89
|
+
The CLI uses the registered callback port `8400`. Pass `--callback-port 0` for a
|
|
90
|
+
random loopback port when another provider supports RFC 8252 loopback redirects.
|
|
91
|
+
|
|
92
|
+
Use `--no-browser` to print the sign-in URL instead of opening it:
|
|
93
|
+
|
|
94
|
+
~~~bash
|
|
95
|
+
delta auth login --no-browser
|
|
96
|
+
~~~
|
|
97
|
+
|
|
98
|
+
Use the Console callback when the browser cannot reach the local loopback listener:
|
|
99
|
+
|
|
100
|
+
~~~bash
|
|
101
|
+
delta auth login --manual-callback
|
|
102
|
+
~~~
|
|
103
|
+
|
|
104
|
+
Complete sign-in in the browser, select **Copy response** at the Console callback
|
|
105
|
+
page, then paste that response into Delta's hidden terminal prompt. The response is
|
|
106
|
+
bound to the in-memory PKCE sign-in attempt; do not paste it into logs or chat.
|
|
107
|
+
|
|
108
|
+
### `delta auth status`
|
|
109
|
+
|
|
110
|
+
Shows whether you are signed in.
|
|
111
|
+
|
|
112
|
+
### `delta auth whoami`
|
|
113
|
+
|
|
114
|
+
Shows the signed-in account.
|
|
115
|
+
|
|
116
|
+
### `delta auth logout`
|
|
117
|
+
|
|
118
|
+
Signs out of Delta.
|
|
119
|
+
|
|
120
|
+
### `delta --help`
|
|
121
|
+
|
|
122
|
+
Shows available commands and global options.
|
|
123
|
+
|
|
124
|
+
### Portable Avalanche workspaces
|
|
125
|
+
|
|
126
|
+
Capture one or more local directories as typed `ava.Workspace` run inputs:
|
|
127
|
+
|
|
128
|
+
~~~bash
|
|
129
|
+
delta runs create demo-flow \
|
|
130
|
+
--workspace source=./input-tree \
|
|
131
|
+
--workspace config=./config-tree
|
|
132
|
+
~~~
|
|
133
|
+
|
|
134
|
+
Each field name must be unique across `--workspace` and JSON inputs. Delta
|
|
135
|
+
captures the directory with Avalanche's workspace manifest codec and uploads the
|
|
136
|
+
manifest through the run-scoped artifact path; workflow code receives
|
|
137
|
+
`ava.Workspace` when its declared input field uses that annotation. Manifests
|
|
138
|
+
are limited to 48 MiB; the CLI rejects oversized trees from directory metadata
|
|
139
|
+
before reading their file contents.
|
|
140
|
+
|
|
141
|
+
Materialize terminal workspace trees into a new local directory:
|
|
142
|
+
|
|
143
|
+
~~~bash
|
|
144
|
+
delta runs output run_01KCVST2FP4QC5NKZNN5NS0Z2W --output-dir ./downloaded
|
|
145
|
+
~~~
|
|
146
|
+
|
|
147
|
+
The destination must not already exist. Workspace values are written as
|
|
148
|
+
`workspace-0001`, `workspace-0002`, and so on in deterministic result order.
|
|
149
|
+
Mixed `ava.File` references remain in the result envelope. Without
|
|
150
|
+
`--output-dir`, `runs output` continues to print that standard Avalanche result
|
|
151
|
+
document unchanged.
|
|
152
|
+
|
|
153
|
+
Service API commands automatically load and refresh the signed-in session from
|
|
154
|
+
`~/.trampoline-ai/delta/auth.json`. An explicit `--token` wins, then a nonblank
|
|
155
|
+
`DELTA_TOKEN`, then the saved session; the user TOML configuration rejects plaintext
|
|
156
|
+
tokens.
|
|
157
|
+
|
|
158
|
+
The API enforces the selected Clerk organization and its role permissions. The
|
|
159
|
+
signed-in user must belong to the requested organization, and that role must
|
|
160
|
+
include the Delta action used by the service command.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"__init__.py": "ea868b1f0c99a0b0860ecf22265acbc8710433fc918c32938d7a45f112924f77",
|
|
3
|
+
"environment.py": "461f421e18deb66c6aaf93790ead6346e869471faa48c09bf914f6f296140130",
|
|
4
|
+
"ids.py": "519b8afd2b5ab7a6cc1ed449825498eeb190795c2bbf3d75a002988ee90d33e6",
|
|
5
|
+
"invocation.py": "2f3e68e3890201c375793295791b6e4077a25b8e8ec724a9f622a8c5fdcc5bf2",
|
|
6
|
+
"manifests.py": "3c2bf35db026cdda4f274860f9bc5c91bfae32ea2d656ee1ce6a46043a3d7703",
|
|
7
|
+
"public_http_v2.py": "010d37d54f674cc9b904397a1f43724c4a0d23702b6ac6de62aaa763c2c02a40",
|
|
8
|
+
"run_activity.py": "b0976579be5342dbf7cc6986f2211496474ea7aefd35bc9585977c887be8e146",
|
|
9
|
+
"run_lifecycle.py": "4970e702fb793788d0b3e600e2c8a93b1bdca0cde2b3cf5e18a37071eb1b3102",
|
|
10
|
+
"run_listing.py": "a3aa8296c8844e52fd970a566037f92ad4a6715278140c9d06fcba1c1c60198f",
|
|
11
|
+
"s3.py": "fb42613bf808e86dfae2125b8426b1e48d9c8bde190e63bfbe988ede96c040e1",
|
|
12
|
+
"scheduling.py": "3c340c9b03d5b0009e5f94d9d9bc63a628a535591459d3cd44db158a7939dad3",
|
|
13
|
+
"storage.py": "0fbf64af66b93590579e7dc3f87d8537966da302fab391894aa3e3abeaa07fe5",
|
|
14
|
+
"webhooks.py": "de509ace329823351a6162e69d3abb0e33a954cfc7652dac63f477b024aa44c9",
|
|
15
|
+
"workspace.py": "1cdf605b1d664404c28316e777c242f5c8410ef82d3e953e5297a45ebcfd529a"
|
|
16
|
+
}
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
"""Client-safe Delta wire contracts assembled from the canonical API-spec source."""
|
|
2
|
+
|
|
3
|
+
# ruff: noqa: F401
|
|
4
|
+
|
|
5
|
+
from .environment import (
|
|
6
|
+
DEPLOYMENT_ENVIRONMENT_RESERVED_NAMES,
|
|
7
|
+
DEPLOYMENT_ENVIRONMENT_RESERVED_PREFIXES,
|
|
8
|
+
is_reserved_deployment_environment_name,
|
|
9
|
+
)
|
|
10
|
+
from .ids import IdPrefix, artifact_upload_id, assert_typed_id, flow_id, run_id
|
|
11
|
+
from .invocation import assert_safe_system_context_aliases, validate_artifact_binding_name
|
|
12
|
+
from .manifests import (
|
|
13
|
+
AVALANCHE_WORKSPACE_MANIFEST_CONTENT_TYPE,
|
|
14
|
+
AVALANCHE_WORKSPACE_MANIFEST_MAX_BYTES,
|
|
15
|
+
AwsKmsDeploymentEnvironmentRecipient,
|
|
16
|
+
DEPLOYMENT_ENVIRONMENT_PLAINTEXT_MAX_BYTES,
|
|
17
|
+
BuildBundleManifest,
|
|
18
|
+
CreateRunRequestV2,
|
|
19
|
+
DeploymentEnvironmentAad,
|
|
20
|
+
DeploymentEnvironmentEnvelope,
|
|
21
|
+
DeploymentEnvironmentPin,
|
|
22
|
+
DeploymentEnvironmentRecipient,
|
|
23
|
+
DeploymentManifest,
|
|
24
|
+
DirectClientSourceTransport,
|
|
25
|
+
DirectObjectStoreClient,
|
|
26
|
+
DirectStorageOperation,
|
|
27
|
+
FinalizeDeploymentRequest,
|
|
28
|
+
FlowManifest,
|
|
29
|
+
FlowRecord,
|
|
30
|
+
GcpKmsDeploymentEnvironmentRecipient,
|
|
31
|
+
PrepareDeploymentRequest,
|
|
32
|
+
PrepareDeploymentResponse,
|
|
33
|
+
ProjectSummary,
|
|
34
|
+
RunEvent,
|
|
35
|
+
RunEventsPage,
|
|
36
|
+
RunInputArtifactRef,
|
|
37
|
+
RunManifest,
|
|
38
|
+
RunRerunSpecV2,
|
|
39
|
+
SetLiveDeploymentRequest,
|
|
40
|
+
SignStorageUploadRequest,
|
|
41
|
+
SignStorageUploadResponse,
|
|
42
|
+
SignedHttpSourceTransport,
|
|
43
|
+
SignedStorageOperation,
|
|
44
|
+
SourceManifest,
|
|
45
|
+
StorageAccessGrant,
|
|
46
|
+
StorageSessionCredentials,
|
|
47
|
+
StorageWriteOperation,
|
|
48
|
+
canonical_json_bytes,
|
|
49
|
+
deployment_flow_id,
|
|
50
|
+
validate_context_json_object,
|
|
51
|
+
validate_input_json_object,
|
|
52
|
+
)
|
|
53
|
+
from .run_listing import RUN_LIST_DEFAULT_LIMIT, validate_run_list_limit
|
|
54
|
+
from .run_activity import (
|
|
55
|
+
RUN_ACTIVITY_PAGE_MAX_ITEMS,
|
|
56
|
+
RunActivity,
|
|
57
|
+
RunActivityLifecycleFact,
|
|
58
|
+
RunActivityLifecycleFactV3,
|
|
59
|
+
RunActivityLogFact,
|
|
60
|
+
RunActivityPage,
|
|
61
|
+
RunActivityTerminalSealFact,
|
|
62
|
+
)
|
|
63
|
+
from .scheduling import _validate_cron, _validate_timezone
|
|
64
|
+
from .run_lifecycle import RunLifecyclePhase
|
|
65
|
+
from .s3 import JSON_CONTENT_TYPE, S3Uri
|
|
66
|
+
from .storage import (
|
|
67
|
+
ObjectUri,
|
|
68
|
+
bundle_build_log_key,
|
|
69
|
+
bundle_manifest_key,
|
|
70
|
+
deployment_environment_key,
|
|
71
|
+
deployment_flows_key,
|
|
72
|
+
deployment_source_git_remote_key,
|
|
73
|
+
object_uri,
|
|
74
|
+
project_uri,
|
|
75
|
+
source_manifest_key,
|
|
76
|
+
wheelhouse_artifact_key,
|
|
77
|
+
)
|
|
78
|
+
from .webhooks import WebhookInfo, WebhookTarget
|
|
79
|
+
from .public_http_v2 import (
|
|
80
|
+
ArtifactUploadContentResponseV2,
|
|
81
|
+
ArtifactUploadFileV2,
|
|
82
|
+
ArtifactUploadOperationV2,
|
|
83
|
+
AwsKmsDeploymentEnvironmentRecipientV2,
|
|
84
|
+
BuildBundleManifestV2,
|
|
85
|
+
CreateWorkflowScheduleRequestV2,
|
|
86
|
+
DeploymentEnvironmentPinV2,
|
|
87
|
+
DeploymentEnvironmentRecipientV2,
|
|
88
|
+
DeploymentListResponseV2,
|
|
89
|
+
DeploymentResponseV2,
|
|
90
|
+
DeploymentStorageTransportV2,
|
|
91
|
+
DeploymentViewV2,
|
|
92
|
+
DisableWorkflowScheduleRequestV2,
|
|
93
|
+
DirectClientSourceTransportV2,
|
|
94
|
+
DirectObjectStoreClientV2,
|
|
95
|
+
DirectStorageOperationV2,
|
|
96
|
+
FinalizeArtifactUploadResponseV2,
|
|
97
|
+
FinalizeDeploymentRequestV2,
|
|
98
|
+
FlowListResponseV2,
|
|
99
|
+
FlowManifestV2,
|
|
100
|
+
FlowRecordV2,
|
|
101
|
+
FlowResponseV2,
|
|
102
|
+
GcsScopedSourceGrantCredentialsV2,
|
|
103
|
+
GcpKmsDeploymentEnvironmentRecipientV2,
|
|
104
|
+
JsonObjectV2,
|
|
105
|
+
JsonValue,
|
|
106
|
+
PrepareArtifactUploadRequestV2,
|
|
107
|
+
PrepareArtifactUploadResponseV2,
|
|
108
|
+
PrepareDeploymentRequestV2,
|
|
109
|
+
PrepareDeploymentResponseV2,
|
|
110
|
+
PreparedArtifactUploadFileV2,
|
|
111
|
+
ProjectListResponseV2,
|
|
112
|
+
ProjectResponseV2,
|
|
113
|
+
ProjectSummaryV2,
|
|
114
|
+
RunActivityPageV2,
|
|
115
|
+
RunActivityResponseV2,
|
|
116
|
+
RunListResponseV2,
|
|
117
|
+
RunOutputArtifactBindingV2,
|
|
118
|
+
RunOutputArtifactDownloadResponseV2,
|
|
119
|
+
RunOutputArtifactFileV2,
|
|
120
|
+
RunOutputArtifactListingV2,
|
|
121
|
+
RunOutputArtifactsResponseV2,
|
|
122
|
+
RunOutputResponseV2,
|
|
123
|
+
RunRerunViewV2,
|
|
124
|
+
RunResponseV2,
|
|
125
|
+
RunViewV2,
|
|
126
|
+
ScheduleCreateRequestV2,
|
|
127
|
+
ScheduleDisableRequestV2,
|
|
128
|
+
ScheduleUpdateRequestV2,
|
|
129
|
+
ScopedSourceGrantCredentialsV2,
|
|
130
|
+
ScopedSourceGrantTransportV2,
|
|
131
|
+
SetLiveDeploymentRequestV2,
|
|
132
|
+
S3ScopedSourceGrantCredentialsV2,
|
|
133
|
+
SignStorageDownloadRequestV2,
|
|
134
|
+
SignStorageDownloadResponseV2,
|
|
135
|
+
SignStorageUploadRequestV2,
|
|
136
|
+
SignStorageUploadResponseV2,
|
|
137
|
+
SignedHttpSourceTransportV2,
|
|
138
|
+
SignedStorageOperationV2,
|
|
139
|
+
SourceManifestV2,
|
|
140
|
+
StorageAccessGrantV2,
|
|
141
|
+
StorageWriteOperationV2,
|
|
142
|
+
UpdateWorkflowScheduleRequestV2,
|
|
143
|
+
WebhookInfoV2,
|
|
144
|
+
WebhookListResponseV2,
|
|
145
|
+
WebhookPayloadV2,
|
|
146
|
+
WebhookResponseV2,
|
|
147
|
+
WebhookRunAcceptedV2,
|
|
148
|
+
WebhookTargetV2,
|
|
149
|
+
WEBHOOK_PAYLOAD_MAX_BYTES,
|
|
150
|
+
WorkflowScheduleListResponseV2,
|
|
151
|
+
WorkflowScheduleResponseAliasV2,
|
|
152
|
+
WorkflowScheduleResponseV2,
|
|
153
|
+
WorkflowScheduleV2,
|
|
154
|
+
WorkspaceBlobRefV2,
|
|
155
|
+
WorkspaceSnapshotRefV2,
|
|
156
|
+
assert_v2_scope,
|
|
157
|
+
artifact_upload_content_response_v2_from_internal,
|
|
158
|
+
artifact_upload_content_response_v2_to_internal,
|
|
159
|
+
deployment_view_v2_from_internal,
|
|
160
|
+
deployment_view_v2_to_internal,
|
|
161
|
+
finalize_artifact_upload_response_v2_from_internal,
|
|
162
|
+
finalize_artifact_upload_response_v2_to_internal,
|
|
163
|
+
finalize_deployment_request_v2_from_internal,
|
|
164
|
+
finalize_deployment_request_v2_to_internal,
|
|
165
|
+
flow_record_v2_from_internal,
|
|
166
|
+
flow_record_v2_to_internal,
|
|
167
|
+
prepare_artifact_upload_request_v2_from_internal,
|
|
168
|
+
prepare_artifact_upload_request_v2_to_internal,
|
|
169
|
+
prepare_artifact_upload_response_v2_from_internal,
|
|
170
|
+
prepare_artifact_upload_response_v2_to_internal,
|
|
171
|
+
prepare_deployment_request_v2_from_internal,
|
|
172
|
+
prepare_deployment_request_v2_to_internal,
|
|
173
|
+
prepare_deployment_response_v2_from_internal,
|
|
174
|
+
prepare_deployment_response_v2_to_internal,
|
|
175
|
+
project_summary_v2_from_internal,
|
|
176
|
+
project_summary_v2_to_internal,
|
|
177
|
+
require_v2_scope,
|
|
178
|
+
run_activity_page_v2_from_internal,
|
|
179
|
+
run_activity_page_v2_to_internal,
|
|
180
|
+
run_list_response_v2_from_internal,
|
|
181
|
+
run_list_response_v2_to_internal,
|
|
182
|
+
run_output_artifact_download_response_v2_to_internal,
|
|
183
|
+
run_output_artifact_download_response_v2_from_internal,
|
|
184
|
+
run_output_artifacts_response_v2_to_internal,
|
|
185
|
+
run_output_artifacts_response_v2_from_internal,
|
|
186
|
+
run_output_response_v2_from_internal,
|
|
187
|
+
run_response_v2_from_internal,
|
|
188
|
+
run_response_v2_to_internal,
|
|
189
|
+
run_view_v2_from_internal,
|
|
190
|
+
run_view_v2_to_internal,
|
|
191
|
+
schedule_create_request_v2_to_internal,
|
|
192
|
+
schedule_disable_request_v2_to_internal,
|
|
193
|
+
schedule_update_request_v2_to_internal,
|
|
194
|
+
set_live_deployment_request_v2_from_internal,
|
|
195
|
+
set_live_deployment_request_v2_to_internal,
|
|
196
|
+
sign_storage_upload_request_v2_from_internal,
|
|
197
|
+
sign_storage_upload_request_v2_to_internal,
|
|
198
|
+
sign_storage_upload_response_v2_from_internal,
|
|
199
|
+
sign_storage_upload_response_v2_to_internal,
|
|
200
|
+
sign_storage_download_request_v2_from_internal,
|
|
201
|
+
sign_storage_download_request_v2_to_internal,
|
|
202
|
+
sign_storage_download_response_v2_from_internal,
|
|
203
|
+
sign_storage_download_response_v2_to_internal,
|
|
204
|
+
storage_write_operation_v2_from_internal,
|
|
205
|
+
storage_write_operation_v2_to_internal,
|
|
206
|
+
validate_webhook_payload_v2,
|
|
207
|
+
webhook_info_v2_from_internal,
|
|
208
|
+
webhook_info_v2_to_internal,
|
|
209
|
+
webhook_payload_v2_to_internal,
|
|
210
|
+
webhook_run_accepted_v2_from_internal,
|
|
211
|
+
webhook_run_accepted_v2_to_internal,
|
|
212
|
+
webhook_target_v2_from_internal,
|
|
213
|
+
webhook_target_v2_to_internal,
|
|
214
|
+
workflow_schedule_v2_from_internal,
|
|
215
|
+
workflow_schedule_v2_to_internal,
|
|
216
|
+
)
|
|
217
|
+
from .workspace import (
|
|
218
|
+
ArtifactUploadContentResponse,
|
|
219
|
+
ArtifactUploadFile,
|
|
220
|
+
FinalizeArtifactUploadResponse,
|
|
221
|
+
PrepareArtifactUploadRequest,
|
|
222
|
+
PrepareArtifactUploadResponse,
|
|
223
|
+
PreparedArtifactUploadFile,
|
|
224
|
+
WorkspaceSnapshotRef,
|
|
225
|
+
workspace_blob_id,
|
|
226
|
+
)
|
|
227
|
+
|
|
228
|
+
__all__ = [name for name in globals() if not name.startswith("_")]
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
DEPLOYMENT_ENVIRONMENT_RESERVED_PREFIXES = (
|
|
4
|
+
"AVALANCHE_",
|
|
5
|
+
"AWS_",
|
|
6
|
+
"BOTO_",
|
|
7
|
+
"CLOUDSDK_",
|
|
8
|
+
"DELTA_",
|
|
9
|
+
"DYLD_",
|
|
10
|
+
"GCP_",
|
|
11
|
+
"GCLOUD_",
|
|
12
|
+
"GCS_",
|
|
13
|
+
"GOOGLE_",
|
|
14
|
+
"GRPC_",
|
|
15
|
+
"KMS_",
|
|
16
|
+
"KUBERNETES_",
|
|
17
|
+
"KUBERAY_",
|
|
18
|
+
"MESA_",
|
|
19
|
+
"RAY_",
|
|
20
|
+
"S3_",
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
DEPLOYMENT_ENVIRONMENT_RESERVED_NAMES = frozenset(
|
|
24
|
+
{
|
|
25
|
+
"ALL_PROXY",
|
|
26
|
+
"BASH_ENV",
|
|
27
|
+
"CURL_CA_BUNDLE",
|
|
28
|
+
"ENV",
|
|
29
|
+
"FTP_PROXY",
|
|
30
|
+
"HTTP_PROXY",
|
|
31
|
+
"HTTPS_PROXY",
|
|
32
|
+
"LD_LIBRARY_PATH",
|
|
33
|
+
"LD_PRELOAD",
|
|
34
|
+
"NO_PROXY",
|
|
35
|
+
"PATH",
|
|
36
|
+
"PS4",
|
|
37
|
+
"PYTHONHOME",
|
|
38
|
+
"PYTHONINSPECT",
|
|
39
|
+
"PYTHONPATH",
|
|
40
|
+
"PYTHONSTARTUP",
|
|
41
|
+
"REQUESTS_CA_BUNDLE",
|
|
42
|
+
"SHELLOPTS",
|
|
43
|
+
"SSL_CERT_DIR",
|
|
44
|
+
"SSL_CERT_FILE",
|
|
45
|
+
"SSLKEYLOGFILE",
|
|
46
|
+
"STORAGE_EMULATOR_HOST",
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
def is_reserved_deployment_environment_name(name: str) -> bool:
|
|
51
|
+
normalized = name.upper()
|
|
52
|
+
return normalized in DEPLOYMENT_ENVIRONMENT_RESERVED_NAMES or normalized.startswith(
|
|
53
|
+
DEPLOYMENT_ENVIRONMENT_RESERVED_PREFIXES
|
|
54
|
+
)
|