@toist/in 0.6.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,75 @@
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
+
45
+ ## 0.7.1 — 2026-05-06
46
+
47
+ Fix @toist/aja cross-package dependency versions not being bumped by release script
48
+
49
+ Scaffold template pins `@toist/aja` and `@toist/spec` to `^0.7.1`.
50
+
51
+ ## 0.7.0 — 2026-05-06
52
+
53
+ Add @toist/aja CLI (bunx @toist/aja --config toist.yml) and @toist/in interactive setup wizard (bunx @toist/in). Establishes aja=runner, in=adoption tool split. No forced directory layout — user chooses paths via wizard, config drives the runner.
54
+
55
+ Scaffold template pins `@toist/aja` and `@toist/spec` to `^0.7.0`.
56
+
57
+ ## Unreleased
58
+
59
+ Clarify `@toist/in` as the Toist adoption tool, not only a scaffold CLI.
60
+
61
+ - `bunx @toist/in` scaffolds `.toist/` in the current repo — one clear
62
+ action, no silent branching.
63
+ - `bunx @toist/in upgrade` is now the explicit upgrade subcommand.
64
+ - `bunx @toist/in <path>` scaffolds a dedicated Toist home at `<path>`.
65
+ - Added a dedicated embedded template for repo-owned `.toist/` layout
66
+ (no nested `package.json`, kinds import examples pointing to host
67
+ source tree, `instance.json` stub, `TOIST_PORT` env var).
68
+ - `bunx @toist/in upgrade` from inside `.toist/` resolves the host
69
+ repo's `package.json` automatically.
70
+ - Template/docs language now distinguishes dedicated instance
71
+ directories from embedded existing-project mode.
72
+ - Added package README documenting the two adoption modes.
73
+
5
74
  ## 0.6.1 — 2026-05-05
6
75
 
7
76
  Fix published @toist/aja dependency resolution for embedded runners and include the typed runner client/smoke-test surface.
package/README.md ADDED
@@ -0,0 +1,64 @@
1
+ # `@toist/in`
2
+
3
+ The user-facing Toist package. It ships the `toist` CLI and the project scaffolding templates.
4
+
5
+ ```sh
6
+ bunx @toist/in
7
+ ```
8
+
9
+ That scaffolds a fresh Toist project in `./toist` by default.
10
+
11
+ ## Install once, use everywhere
12
+
13
+ ```sh
14
+ bun add -g @toist/in
15
+ toist run pipelines/hello.yml --payload '{"name":"world"}'
16
+ ```
17
+
18
+ ## Commands
19
+
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}'
40
+ ```
41
+
42
+ For pipes and generated specs:
43
+
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
+ ```
48
+
49
+ For remote execution:
50
+
51
+ ```sh
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}'
56
+ ```
57
+
58
+ ## Templates
59
+
60
+ The wizard ships three templates:
61
+
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.6.1",
3
+ "version": "0.8.0",
4
4
  "type": "module",
5
- "description": "Scaffold a new toist instance: bunx @toist/in <path>",
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/",
13
14
  "templates/",
14
- "CHANGELOG.md"
15
- ]
15
+ "CHANGELOG.md",
16
+ "README.md"
17
+ ],
18
+ "dependencies": {
19
+ "@toist/aja": "0.8.0",
20
+ "@toist/core": "0.8.0",
21
+ "@toist/spec": "0.8.0"
22
+ }
16
23
  }