@scarn/cli 0.8.12 → 0.8.15

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.
Files changed (3) hide show
  1. package/README.md +11 -1
  2. package/bin/scarn +5 -1
  3. package/package.json +6 -6
package/README.md CHANGED
@@ -14,7 +14,17 @@ npm i -g @scarn/cli
14
14
  ```sh
15
15
  scarn init # sign in and link this repo to a Scarn project
16
16
  scarn pipelines design # pick a work item; an agent interviews you and writes the pipeline
17
- scarn work # run a worker that executes your pipeline's steps
17
+ scarn work # start the background worker and add this project to it
18
+ ```
19
+
20
+ The worker runs in the background, one per machine, and can run several
21
+ projects at once. Manage it with `scarn worker`:
22
+
23
+ ```sh
24
+ scarn worker status # the worker, its projects and its runs
25
+ scarn worker logs -f # follow the worker log
26
+ scarn worker cancel <taskRunId>
27
+ scarn worker stop # let running runs finish, then exit (--force aborts them)
18
28
  ```
19
29
 
20
30
  The designer connects to an AI provider once, the first time it starts. The
package/bin/scarn CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  const { spawnSync } = require("node:child_process");
4
4
  const { existsSync, readFileSync } = require("node:fs");
5
- const { resolve } = require("node:path");
5
+ const { basename, resolve } = require("node:path");
6
6
  const pino = require("pino");
7
7
  const PinoPretty = require("pino-pretty");
8
8
 
@@ -144,6 +144,10 @@ const extraEnv = {
144
144
  // dist/devcontainer/, where build.ts also places scripts/updateUID.Dockerfile
145
145
  // (used on Linux when remapping the container user's UID/GID).
146
146
  SCARN_DEVCONTAINER_SCRIPT: devcontainerScriptPath,
147
+ // The name this wrapper was invoked as (e.g. `scarn` or the `scarn-dev`
148
+ // symlink). The worker uses it to pick its default instance, so a dev
149
+ // and a production install keep separate background workers.
150
+ SCARN_CLI_NAME: basename(process.argv[1]),
147
151
  };
148
152
  if (devSdkArtifactPath) extraEnv["SCARN_SDK_ARTIFACT_PATH"] = devSdkArtifactPath;
149
153
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scarn/cli",
3
- "version": "0.8.12",
3
+ "version": "0.8.15",
4
4
  "bin": {
5
5
  "scarn": "bin/scarn"
6
6
  },
@@ -17,11 +17,11 @@
17
17
  "pino-pretty": "^13.1.2"
18
18
  },
19
19
  "optionalDependencies": {
20
- "@scarn/cli-darwin-arm64": "0.8.12",
21
- "@scarn/cli-darwin-x64": "0.8.12",
22
- "@scarn/cli-linux-x64": "0.8.12",
23
- "@scarn/cli-linux-arm64": "0.8.12",
24
- "@scarn/cli-win32-x64": "0.8.12"
20
+ "@scarn/cli-darwin-arm64": "0.8.15",
21
+ "@scarn/cli-darwin-x64": "0.8.15",
22
+ "@scarn/cli-linux-x64": "0.8.15",
23
+ "@scarn/cli-linux-arm64": "0.8.15",
24
+ "@scarn/cli-win32-x64": "0.8.15"
25
25
  },
26
26
  "repository": {
27
27
  "type": "git",