@drisp/cli 0.6.6 → 0.6.7

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
@@ -130,7 +130,7 @@ drisp workflow install e2e-test-builder@lespaceman/athena-workflow-marketplace
130
130
 
131
131
  ### Permissions with no hub attached
132
132
 
133
- drisp has a single door. A permission request or a question is answered by whoever is attached to the Run: the interactive terminal, or a paired dashboard delivering decisions. With no hub attached (a headless `drisp run` with no dashboard paired) there is nobody to ask, so under `guarded` and `standard` the request **waits**: the Run holds on the pending decision, and nothing is auto-approved or auto-denied on its behalf. The hold ends one of two ways. If you set `--timeout-ms`, the run exits with the timeout exit code when it expires. If the Run belongs to a workflow, the request is **held, then parked, then replayed**:
133
+ drisp has a single door. A permission request or a question is answered by whoever is attached to the Run: the interactive terminal, or the hub delivering decisions through the Runner. With no hub attached (a headless `drisp run`) there is nobody to ask, so under `guarded` and `standard` the request **waits**: the Run holds on the pending decision, and nothing is auto-approved or auto-denied on its behalf. The hold ends one of two ways. If you set `--timeout-ms`, the run exits with the timeout exit code when it expires. If the Run belongs to a workflow, the request is **held, then parked, then replayed**:
134
134
 
135
135
  - **Hold.** A permission request no rule answers is held for the **grace window** — `permissionGraceMs` in `~/.config/athena/config.json` or `.athena/config.json` (project wins), `--permission-grace-ms` per run, default 60 000 ms — so an attached hub can answer it. With no hub attached there is nobody to wait for, and the request is deferred at once.
136
136
  - **Park.** When the window elapses unanswered, the tool call is refused with a _deferred_ result, the Turn ends, and the Run parks in `awaiting_attention` with the request recorded — its id, the tool, and a one-line input summary — in the Journal and on the run record. `drisp runs` shows the pending question and the hub receives it as a `needs_human` frame.
@@ -207,29 +207,38 @@ drisp_run:
207
207
 
208
208
  ## Runner
209
209
 
210
- `drisp runner` is the one long-lived process that pairs a machine with the hub, receives its Runs over the instance socket, and executes them. The instance socket is the default delivery path. Assignments can also request a per-run callback socket and artifact uploads; see the [delivery contract](docs/execution-contract.md#compatibility-and-delivery).
210
+ `drisp runner` is the long-lived process that connects a machine to a Team on the Hub, receives its Runs, and executes them. Its state is one `execution.sqlite` store in the configured data directory.
211
+
212
+ Connect a machine from **Settings → Runners** in the web console. It shows a one-use Connect code, valid for ten minutes, inside the command to paste on the machine:
213
+
214
+ ```bash
215
+ drisp runner connect K7QF-M2PX --hub https://hub.example.com # join the Team and start the Runner as a background service
216
+ drisp runner connect --hub https://hub.example.com # or print a code to approve in the web console
217
+ drisp runner status # the saved identity, without its credential, and the service's state
218
+ drisp runner disconnect [<team>] # leave a Team: stop its Runs there and delete that Team's credential
219
+ drisp runner recover <run-id> confirmed-stopped # record a failed outcome after an uncertain crash
220
+ ```
221
+
222
+ To start from the machine instead, run `drisp runner connect` without a code. It prints a Connect code and the page that approves it, and waits. A signed-in member opens the page, checks the machine's hostname, OS and drisp version, chooses the Team, and connects it. The code works once and expires in ten minutes; if it is denied or expires, connect exits with an error and writes nothing.
223
+
224
+ A machine is one Runner per Team. Connect writes that Team's Runner identity and credential to `~/.config/drisp/runners/<hub>/<team>.json` (under the Hub's host, since two Hubs can serve the same organization), readable only by you, beside the machine's installation identity in `~/.config/drisp/installation-id`. Connecting again to a Team the machine already serves reports `This machine is already connected to this Team as <name>` and leaves the credential alone, once the Hub has accepted that credential. When the machine can no longer serve that Runner (its identity file is gone, belongs to another Runner, or its credential lapsed), Connect exits 1 and says why without using a code; `drisp runner connect <code> --hub <url> --replace` then connects a new Runner in its place, and the old one stays listed, offline, until Runners can be Disconnected. An identity the Hub no longer recognises (installation identity reset, new Hub epoch) is moved aside to `<team>.json.replaced-<time>` when Connect writes the new one. A machine may serve several Teams, one Runner each: the background service and `drisp runner` run them all, and `drisp runner status` lists each Team. Nothing secret is downloaded or copied between machines. `DRISP_HUB_URL` can stand in for `--hub`, and `DRISP_RUNNER_CONFIG` instead names one identity file of a separate installation.
225
+
226
+ Any member of the Team can connect their own machine. It joins as a **Personal** Runner named after its hostname, which runs only its owner's Runs; a Team admin approving a printed code may make it a **Team** Runner instead.
227
+
228
+ Connect then installs and starts a user-level service, so the Runner keeps running when the terminal closes and starts again at login: a LaunchAgent `com.drisp.runner.<installationId>` on macOS (log in `~/Library/Logs/drisp/runner-<installationId>.log`), a systemd user unit `drisp-runner-<installationId>.service` on Linux (log in `journalctl --user -u drisp-runner-<installationId>`). `drisp runner status` prints the service's name. The service runs this drisp installation with the saved identity and the `PATH` you connected from, so it finds the same harnesses; there is no unit file to write. Each installation (a `DRISP_RUNNER_CONFIG` identity file is a separate one) gets its own service, so connecting one never stops another. On a Linux server, `loginctl enable-linger` keeps it running while you are logged out. Running Connect again where the identity file already exists is refused before the code is spent, and leaves the service as it is. So if the service cannot be installed or started, Connect exits with an error but keeps the identity: run `drisp runner` to run the Runner in the foreground. On macOS, a LaunchAgent that was installed but would not start still starts at your next login.
229
+
230
+ In a container or CI, or on a platform without launchd or systemd (where Connect says so and does this anyway), keep the Runner in the foreground instead:
211
231
 
212
232
  ```bash
213
- drisp runner pair <token> --url https://hub.example.com # pair, then start the runner in the background
214
- drisp runner # run it in the foreground (Ctrl-C stops it)
215
- drisp runner --detach # start it in the background
216
- drisp runner status # pairing, process, socket, token — non-zero on any unhealthy axis
217
- drisp runner runs --active # the Runs it has handled
218
- drisp runner logs --follow # tail its log
219
- drisp runner stop # SIGTERM to the pid in runner.pid
220
- drisp runner install # launchd / systemd unit so it starts on login
233
+ drisp runner connect K7QF-M2PX --hub https://hub.example.com --foreground # join the Team, then run in this terminal (Ctrl-C stops it)
234
+ drisp runner # run it in the foreground again later
221
235
  ```
222
236
 
223
- A second `drisp runner` on the same machine exits non-zero with `already running (pid N)`. Its state lives in `~/.local/state/drisp/`:
237
+ The Runner's credential renews whenever it connects, so a machine that slept over a weekend rejoins by itself; only 30 days without contact lapse it, and then it needs Connect again. A Runner leaves its Team only by **Disconnect**: `drisp runner disconnect` on the machine, or Disconnect in the web console by the member who connected it (an admin may Disconnect any Runner). The Hub Stops every Run on it ("Stopped: Runner disconnected"), and the machine deletes that Team's credential, at once from the box, or the next time it reaches the Hub when Disconnected from the console. The service is removed once the machine serves no Team; until then it runs on for the others. On a machine serving several Teams, name the one to leave by the id or Runner name `drisp runner status` shows.
224
238
 
225
- | File | What it is |
226
- | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
227
- | `runner.pid` | Liveness and the single-instance lock. |
228
- | `runner.status.json` | The runner's snapshot (socket, wire mode, active and recent Runs), rewritten on change; what `status` and `runs` read. Removed on a clean stop. |
229
- | `runner.db` | One SQLite database: the feed outbox the runner drains to the hub and the decision inbox the hub's answers wait in. A runner killed mid-Run drains and re-delivers both on restart. |
230
- | `runner.log` | The rotating log. |
239
+ `recover` never retries execution: stop the service and every harness first, then start the runner again to publish the outcome.
231
240
 
232
- `drisp dashboard <sub>` is a deprecated alias of `drisp runner` for one release (`dashboard daemon start` is `runner --detach`; `daemon foreground` / `connect` is bare `runner`). The pre-0.6 `dashboard-feed-outbox.db` and `dashboard-decision-inbox.db` are imported into `runner.db` on the first start and removed.
241
+ `drisp dashboard <sub>` is a deprecated alias of `drisp runner`, removed in 0.7.0.
233
242
 
234
243
  <br>
235
244
 
@@ -8,8 +8,8 @@ import {
8
8
  installWorkflowPlugins,
9
9
  resolveWorkflow,
10
10
  writeGlobalConfig
11
- } from "./chunk-7FYAABQ4.js";
12
- import "./chunk-PZ5AY32C.js";
11
+ } from "./chunk-CIPO2P2Q.js";
12
+ import "./chunk-G3PMV62Z.js";
13
13
 
14
14
  // src/setup/steps/WorkflowInstallWizard.tsx
15
15
  import { useState, useEffect, useCallback, useRef } from "react";
@@ -93,4 +93,4 @@ function WorkflowInstallWizard({ source, onDone }) {
93
93
  export {
94
94
  WorkflowInstallWizard as default
95
95
  };
96
- //# sourceMappingURL=WorkflowInstallWizard-R76OV74M.js.map
96
+ //# sourceMappingURL=WorkflowInstallWizard-TQ4SF5KB.js.map