You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .well-known/skills/dstack/SKILL.md
+20-11Lines changed: 20 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -101,27 +101,29 @@ If you need to prompt for next actions, be explicit about the dstack step and co
101
101
102
102
`dstack attach` runs until interrupted and blocks the terminal. **Agents must avoid indefinite blocking.** If a brief attach is needed, use a timeout to capture initial output (IDE link, SSH alias) and then detach.
103
103
104
-
Note: `dstack attach` writes SSH alias info under `~/.dstack/ssh/config` (and may update `~/.ssh/config`) to enable `ssh <run-name>`, IDE connections, port forwarding, and real-time logs (`dstack attach --logs`). If the sandbox cannot write there, the alias will not be created.
104
+
Note: `dstack attach` writes SSH alias info under `~/.dstack/ssh/config` (and may update `~/.ssh/config`) to enable `ssh <run name>`, IDE connections, port forwarding, and real-time logs (`dstack attach --logs`). If the sandbox cannot write there, the alias will not be created.
105
+
106
+
**Permissions guardrail:** If `dstack attach` fails due to sandbox permissions, request permission escalation to run it outside the sandbox. If escalation isn’t approved or attach still fails, ask the user to run `dstack attach` locally and share the IDE link/SSH alias output.
105
107
106
108
**Background attach (non-blocking default for agents):**
If the PID file is missing, fall back to a specific match (avoid killing all attaches):
123
125
```bash
124
-
pkill -f "dstack attach <run-name>"
126
+
pkill -f "dstack attach <runname>"
125
127
```
126
128
**Why this helps:** it keeps the attach session alive (including port forwarding) while the agent remains usable. IDE links and SSH instructions appear in the log file -- surface them and ask whether to open the link (`open "<link>"` on macOS, `xdg-open "<link>"` on Linux) only after explicit approval.
127
129
@@ -131,7 +133,7 @@ If background attach fails in the sandbox (permissions writing `~/.dstack` or `~
131
133
132
134
**"Run something":** When the user asks to run a workload (dev environment, task, service), use `dstack apply` with the appropriate configuration. Note: `dstack run` only supports `dstack run get --json` for retrieving run details -- it cannot start workloads.
133
135
134
-
**"Connect to" or "open" a dev environment:** If a dev environment is already running, use `dstack attach <run-name> --logs` (agent runs it in the background by default) to surface the IDE URL (`cursor://`, `vscode://`, etc.) and SSH alias. If sandboxed attach fails, request escalation or ask the user to run attach locally and share the link.
136
+
**"Connect to" or "open" a dev environment:** If a dev environment is already running, use `dstack attach <runname> --logs` (agent runs it in the background by default) to surface the IDE URL (`cursor://`, `vscode://`, etc.) and SSH alias. If sandboxed attach fails, request escalation or ask the user to run attach locally and share the link.
135
137
136
138
## Configuration types
137
139
@@ -187,7 +189,7 @@ resources:
187
189
gpu: A100:40GB:2
188
190
```
189
191
190
-
**Port forwarding:** When you specify `ports`, `dstack apply` forwards them to `localhost` while attached. Use `dstack attach <run-name>` to reconnect and restore port forwarding. The run name becomes an SSH alias (e.g., `ssh <run-name>`) for direct access.
192
+
**Port forwarding:** When you specify `ports`, `dstack apply` forwards them to `localhost` while attached. Use `dstack attach <runname>` to reconnect and restore port forwarding. The run name becomes an SSH alias (e.g., `ssh <runname>`) for direct access.
191
193
192
194
**Distributed training:** Multi-node tasks are supported (e.g., via `nodes`) and require fleets that support inter-node communication (see `placement: cluster` in fleets).
193
195
@@ -217,9 +219,16 @@ resources:
217
219
```
218
220
219
221
**Service endpoints:**
220
-
- Without gateway: `<dstack server URL>/proxy/services/<project name>/<run name>/`
222
+
- Without gateway: `<dstack server URL>/proxy/services/f/<run name>/`
221
223
- With gateway: `https://<run name>.<gateway domain>/`
222
-
- For OpenAI-compatible models, use the `/v1/...` paths under the service URL and pass the dstack token in the `Authorization` header.
224
+
- Authentication: Unless `auth` is `false`, include `Authorization: Bearer <DSTACK_TOKEN>` on all service requests.
225
+
- OpenAI-compatible models: Use `service.url` from `dstack run get <run name> --json` and append `/v1` as the base URL; do **not** use deprecated `service.model.base_url` for requests.
226
+
- Example (with gateway):
227
+
```bash
228
+
curl -sS -X POST "https://<run name>.<gateway domain>/v1/chat/completions" \
Copy file name to clipboardExpand all lines: SKILL.md
+20-11Lines changed: 20 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -101,27 +101,29 @@ If you need to prompt for next actions, be explicit about the dstack step and co
101
101
102
102
`dstack attach` runs until interrupted and blocks the terminal. **Agents must avoid indefinite blocking.** If a brief attach is needed, use a timeout to capture initial output (IDE link, SSH alias) and then detach.
103
103
104
-
Note: `dstack attach` writes SSH alias info under `~/.dstack/ssh/config` (and may update `~/.ssh/config`) to enable `ssh <run-name>`, IDE connections, port forwarding, and real-time logs (`dstack attach --logs`). If the sandbox cannot write there, the alias will not be created.
104
+
Note: `dstack attach` writes SSH alias info under `~/.dstack/ssh/config` (and may update `~/.ssh/config`) to enable `ssh <run name>`, IDE connections, port forwarding, and real-time logs (`dstack attach --logs`). If the sandbox cannot write there, the alias will not be created.
105
+
106
+
**Permissions guardrail:** If `dstack attach` fails due to sandbox permissions, request permission escalation to run it outside the sandbox. If escalation isn’t approved or attach still fails, ask the user to run `dstack attach` locally and share the IDE link/SSH alias output.
105
107
106
108
**Background attach (non-blocking default for agents):**
If the PID file is missing, fall back to a specific match (avoid killing all attaches):
123
125
```bash
124
-
pkill -f "dstack attach <run-name>"
126
+
pkill -f "dstack attach <runname>"
125
127
```
126
128
**Why this helps:** it keeps the attach session alive (including port forwarding) while the agent remains usable. IDE links and SSH instructions appear in the log file -- surface them and ask whether to open the link (`open "<link>"` on macOS, `xdg-open "<link>"` on Linux) only after explicit approval.
127
129
@@ -131,7 +133,7 @@ If background attach fails in the sandbox (permissions writing `~/.dstack` or `~
131
133
132
134
**"Run something":** When the user asks to run a workload (dev environment, task, service), use `dstack apply` with the appropriate configuration. Note: `dstack run` only supports `dstack run get --json` for retrieving run details -- it cannot start workloads.
133
135
134
-
**"Connect to" or "open" a dev environment:** If a dev environment is already running, use `dstack attach <run-name> --logs` (agent runs it in the background by default) to surface the IDE URL (`cursor://`, `vscode://`, etc.) and SSH alias. If sandboxed attach fails, request escalation or ask the user to run attach locally and share the link.
136
+
**"Connect to" or "open" a dev environment:** If a dev environment is already running, use `dstack attach <runname> --logs` (agent runs it in the background by default) to surface the IDE URL (`cursor://`, `vscode://`, etc.) and SSH alias. If sandboxed attach fails, request escalation or ask the user to run attach locally and share the link.
135
137
136
138
## Configuration types
137
139
@@ -187,7 +189,7 @@ resources:
187
189
gpu: A100:40GB:2
188
190
```
189
191
190
-
**Port forwarding:** When you specify `ports`, `dstack apply` forwards them to `localhost` while attached. Use `dstack attach <run-name>` to reconnect and restore port forwarding. The run name becomes an SSH alias (e.g., `ssh <run-name>`) for direct access.
192
+
**Port forwarding:** When you specify `ports`, `dstack apply` forwards them to `localhost` while attached. Use `dstack attach <runname>` to reconnect and restore port forwarding. The run name becomes an SSH alias (e.g., `ssh <runname>`) for direct access.
191
193
192
194
**Distributed training:** Multi-node tasks are supported (e.g., via `nodes`) and require fleets that support inter-node communication (see `placement: cluster` in fleets).
193
195
@@ -217,9 +219,16 @@ resources:
217
219
```
218
220
219
221
**Service endpoints:**
220
-
- Without gateway: `<dstack server URL>/proxy/services/<project name>/<run name>/`
222
+
- Without gateway: `<dstack server URL>/proxy/services/f/<run name>/`
221
223
- With gateway: `https://<run name>.<gateway domain>/`
222
-
- For OpenAI-compatible models, use the `/v1/...` paths under the service URL and pass the dstack token in the `Authorization` header.
224
+
- Authentication: Unless `auth` is `false`, include `Authorization: Bearer <DSTACK_TOKEN>` on all service requests.
225
+
- OpenAI-compatible models: Use `service.url` from `dstack run get <run name> --json` and append `/v1` as the base URL; do **not** use deprecated `service.model.base_url` for requests.
226
+
- Example (with gateway):
227
+
```bash
228
+
curl -sS -X POST "https://<run name>.<gateway domain>/v1/chat/completions" \
0 commit comments