@toist/in 0.7.1 → 0.8.0

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/CHANGELOG.md CHANGED
@@ -2,6 +2,46 @@
2
2
 
3
3
  All notable changes to `@toist/in` are recorded here.
4
4
 
5
+ ## 0.8.0 — 2026-05-08
6
+
7
+ `@toist/in` is now the user-facing package: ships the `toist` CLI binary
8
+ plus the scaffolding wizard. `bun add -g @toist/in` followed by
9
+ `toist <subcommand>` is the daily-use shape; `bunx @toist/in` runs the
10
+ wizard for first-touch scaffolding.
11
+
12
+ **`toist` CLI subcommands:**
13
+
14
+ - `toist init [dir]` — wizard scaffolds default / embedded / embedded-memory
15
+ template
16
+ - `toist run <file>` — execute a pipeline locally; durable storage at
17
+ `XDG_STATE_HOME/toist` (or `~/.toist/`) by default
18
+ - `--remote <url>` — execute against a remote runner
19
+ - `--spec-stdin` — read spec YAML from stdin
20
+ - `--payload '<json>' | @file.json | -stdin` — payload sources
21
+ - `--suspend-as-json` — emit `{runId,suspendedAt}` on suspension (no
22
+ interactive prompt)
23
+ - `--ephemeral` — in-memory only; no persistence
24
+ - `toist resume <runId>` — resume a suspended local run
25
+ - `toist serve` — start the durable runner (via `@toist/aja`'s `startRunner`)
26
+ - `toist tasks list/answer` — task queue inspection + answer+resume
27
+ one-shot, local or `--remote`
28
+ - `toist validate <file...>` — validate one or many specs
29
+ - `toist plan <file> [--format ascii|dot]` — render the DAG
30
+ - `toist upgrade` — bump local `@toist/*` deps
31
+
32
+ **Inline HITL prompt:** when a `human.input` task fires during `toist
33
+ run`, the CLI sniffs the schema (boolean / string / single-property
34
+ object / json / value) and prompts on stderr. Stdout stays pure JSON.
35
+
36
+ **Templates:** wizard offers three options — `default` (durable
37
+ runner), `embedded` (`.toist/` adoption inside an existing repo),
38
+ `embedded-memory` (library-only, no HTTP runner).
39
+
40
+ **New dependencies:** `@toist/aja@0.8.0`, `@toist/core@0.8.0`,
41
+ `@toist/spec@0.8.0`.
42
+
43
+ Scaffold template pins `@toist/aja` and `@toist/spec` to `^0.8.0`.
44
+
5
45
  ## 0.7.1 — 2026-05-06
6
46
 
7
47
  Fix @toist/aja cross-package dependency versions not being bumped by release script
package/README.md CHANGED
@@ -1,46 +1,64 @@
1
1
  # `@toist/in`
2
2
 
3
- Interactive setup wizard for Toist.
3
+ The user-facing Toist package. It ships the `toist` CLI and the project scaffolding templates.
4
4
 
5
5
  ```sh
6
6
  bunx @toist/in
7
7
  ```
8
8
 
9
- Asks a few questions, writes `toist.yml`, creates your chosen directories.
10
- Then start the runner with:
9
+ That scaffolds a fresh Toist project in `./toist` by default.
10
+
11
+ ## Install once, use everywhere
11
12
 
12
13
  ```sh
13
- bunx @toist/aja
14
+ bun add -g @toist/in
15
+ toist run pipelines/hello.yml --payload '{"name":"world"}'
14
16
  ```
15
17
 
16
- ## What the wizard asks
18
+ ## Commands
17
19
 
18
- ```
19
- Instance name? [my-project]
20
- Pipelines dir? [pipelines]
21
- Resources dir? [resources]
22
- Data dir? [data]
23
- Port? [3000]
24
- Register custom TypeScript kinds? [y/N]
25
- Kind file path? [src/kinds/index.ts]
26
- Add another? [y/N]
20
+ | Command | Purpose |
21
+ |---|---|
22
+ | `toist init [dir]` | scaffold a project or embedded `.toist/` home |
23
+ | `toist run <file>` | run a spec locally |
24
+ | `toist run <file> --remote <url>` | run a spec against a runner |
25
+ | `toist resume <runId>` | resume a suspended local run |
26
+ | `toist serve` | start the durable runner |
27
+ | `toist tasks list` | list open local tasks |
28
+ | `toist tasks answer <id>` | answer a task and resume its run |
29
+ | `toist validate <file...>` | validate specs |
30
+ | `toist plan <file>` | render the DAG as ASCII or DOT |
31
+ | `toist upgrade` | bump local `@toist/*` dependencies |
32
+
33
+ ## Run modes
34
+
35
+ Local `toist run` defaults to durable CLI storage under `XDG_STATE_HOME/toist` or `~/.toist/`.
36
+
37
+ ```sh
38
+ toist run approval.yml --payload '{"amount":50}'
39
+ toist resume 1 --response '{"approved":true}'
27
40
  ```
28
41
 
29
- ## What it produces
42
+ For pipes and generated specs:
30
43
 
31
- `toist.yml` in the current directory — that's it. All paths are yours
32
- to choose. There is no enforced layout.
44
+ ```sh
45
+ cat payload.json | toist run pipelines/hello.yml
46
+ echo 'apiVersion: "2121.fi/v1"\nid: hello\n...' | toist run --spec-stdin --payload '{}'
47
+ ```
33
48
 
34
- ## Upgrade
49
+ For remote execution:
35
50
 
36
51
  ```sh
37
- bunx @toist/in upgrade
52
+ toist serve
53
+ toist run pipelines/hello.yml --remote :5172 --payload '{"name":"world"}'
54
+ toist tasks list --remote :5172
55
+ toist tasks answer 1 --remote :5172 --response '{"approved":true}'
38
56
  ```
39
57
 
40
- Finds `package.json` and bumps every `@toist/*` dep to latest.
58
+ ## Templates
41
59
 
42
- ## See also
60
+ The wizard ships three templates:
43
61
 
44
- - `@toist/aja` — the runner: `bunx @toist/aja --config toist.yml`
45
- - `context/instance-spec.md`
46
- - https://toist.in
62
+ - `default`durable runner
63
+ - `embedded` — repo-owned `.toist/` runner
64
+ - `embedded-memory` — library-only `runSpec()` example
package/package.json CHANGED
@@ -1,16 +1,23 @@
1
1
  {
2
2
  "name": "@toist/in",
3
- "version": "0.7.1",
3
+ "version": "0.8.0",
4
4
  "type": "module",
5
5
  "description": "Adopt Toist into a repo: scaffold a Toist home or embedded .toist layout",
6
6
  "main": "./src/index.ts",
7
7
  "types": "./src/index.ts",
8
8
  "bin": {
9
- "toist-in": "./src/index.ts"
9
+ "toist": "./src/cli.ts",
10
+ "toist-in": "./src/cli.ts"
10
11
  },
11
12
  "files": [
12
13
  "src/",
14
+ "templates/",
13
15
  "CHANGELOG.md",
14
16
  "README.md"
15
- ]
17
+ ],
18
+ "dependencies": {
19
+ "@toist/aja": "0.8.0",
20
+ "@toist/core": "0.8.0",
21
+ "@toist/spec": "0.8.0"
22
+ }
16
23
  }