@toist/in 0.7.1 → 0.8.1
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 +46 -0
- package/README.md +42 -24
- package/package.json +10 -3
- package/src/cli.ts +1003 -0
- package/src/index.ts +1 -36
- package/src/runtime.ts +75 -0
- package/src/wizard.ts +67 -120
- package/templates/default/README.md +35 -0
- package/templates/default/_gitignore +7 -0
- package/templates/default/_package.json +13 -0
- package/templates/default/data/.gitkeep +0 -0
- package/templates/default/kinds/custom.ts +23 -0
- package/templates/default/pipelines/.gitkeep +0 -0
- package/templates/default/resources/.gitkeep +0 -0
- package/templates/default/start.ts +14 -0
- package/templates/default/toist.yml +2 -0
- package/templates/embedded/README.md +58 -0
- package/templates/embedded/_gitignore +5 -0
- package/templates/embedded/data/.gitkeep +0 -0
- package/templates/embedded/instance.json +4 -0
- package/templates/embedded/pipelines/.gitkeep +0 -0
- package/templates/embedded/resources/.gitkeep +0 -0
- package/templates/embedded/start.ts +24 -0
- package/templates/embedded/toist.yml +2 -0
- package/templates/embedded-memory/README.md +12 -0
- package/templates/embedded-memory/_gitignore +1 -0
- package/templates/embedded-memory/pipelines/hello.yml +12 -0
- package/templates/embedded-memory/start.ts +16 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,52 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@toist/in` are recorded here.
|
|
4
4
|
|
|
5
|
+
## 0.8.1 — 2026-05-08
|
|
6
|
+
|
|
7
|
+
Patch: normalize toist run --remote JSON shape to match local RunSpecResult (.output/.runId, projected suspendedAt, results map). HTTP API and @toist/core unchanged.
|
|
8
|
+
|
|
9
|
+
Scaffold template pins `@toist/aja` and `@toist/spec` to `^0.8.1`.
|
|
10
|
+
|
|
11
|
+
## 0.8.0 — 2026-05-08
|
|
12
|
+
|
|
13
|
+
`@toist/in` is now the user-facing package: ships the `toist` CLI binary
|
|
14
|
+
plus the scaffolding wizard. `bun add -g @toist/in` followed by
|
|
15
|
+
`toist <subcommand>` is the daily-use shape; `bunx @toist/in` runs the
|
|
16
|
+
wizard for first-touch scaffolding.
|
|
17
|
+
|
|
18
|
+
**`toist` CLI subcommands:**
|
|
19
|
+
|
|
20
|
+
- `toist init [dir]` — wizard scaffolds default / embedded / embedded-memory
|
|
21
|
+
template
|
|
22
|
+
- `toist run <file>` — execute a pipeline locally; durable storage at
|
|
23
|
+
`XDG_STATE_HOME/toist` (or `~/.toist/`) by default
|
|
24
|
+
- `--remote <url>` — execute against a remote runner
|
|
25
|
+
- `--spec-stdin` — read spec YAML from stdin
|
|
26
|
+
- `--payload '<json>' | @file.json | -stdin` — payload sources
|
|
27
|
+
- `--suspend-as-json` — emit `{runId,suspendedAt}` on suspension (no
|
|
28
|
+
interactive prompt)
|
|
29
|
+
- `--ephemeral` — in-memory only; no persistence
|
|
30
|
+
- `toist resume <runId>` — resume a suspended local run
|
|
31
|
+
- `toist serve` — start the durable runner (via `@toist/aja`'s `startRunner`)
|
|
32
|
+
- `toist tasks list/answer` — task queue inspection + answer+resume
|
|
33
|
+
one-shot, local or `--remote`
|
|
34
|
+
- `toist validate <file...>` — validate one or many specs
|
|
35
|
+
- `toist plan <file> [--format ascii|dot]` — render the DAG
|
|
36
|
+
- `toist upgrade` — bump local `@toist/*` deps
|
|
37
|
+
|
|
38
|
+
**Inline HITL prompt:** when a `human.input` task fires during `toist
|
|
39
|
+
run`, the CLI sniffs the schema (boolean / string / single-property
|
|
40
|
+
object / json / value) and prompts on stderr. Stdout stays pure JSON.
|
|
41
|
+
|
|
42
|
+
**Templates:** wizard offers three options — `default` (durable
|
|
43
|
+
runner), `embedded` (`.toist/` adoption inside an existing repo),
|
|
44
|
+
`embedded-memory` (library-only, no HTTP runner).
|
|
45
|
+
|
|
46
|
+
**New dependencies:** `@toist/aja@0.8.0`, `@toist/core@0.8.0`,
|
|
47
|
+
`@toist/spec@0.8.0`.
|
|
48
|
+
|
|
49
|
+
Scaffold template pins `@toist/aja` and `@toist/spec` to `^0.8.0`.
|
|
50
|
+
|
|
5
51
|
## 0.7.1 — 2026-05-06
|
|
6
52
|
|
|
7
53
|
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
|
-
|
|
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
|
-
|
|
10
|
-
|
|
9
|
+
That scaffolds a fresh Toist project in `./toist` by default.
|
|
10
|
+
|
|
11
|
+
## Install once, use everywhere
|
|
11
12
|
|
|
12
13
|
```sh
|
|
13
|
-
|
|
14
|
+
bun add -g @toist/in
|
|
15
|
+
toist run pipelines/hello.yml --payload '{"name":"world"}'
|
|
14
16
|
```
|
|
15
17
|
|
|
16
|
-
##
|
|
18
|
+
## Commands
|
|
17
19
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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
|
-
|
|
42
|
+
For pipes and generated specs:
|
|
30
43
|
|
|
31
|
-
|
|
32
|
-
|
|
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
|
-
|
|
49
|
+
For remote execution:
|
|
35
50
|
|
|
36
51
|
```sh
|
|
37
|
-
|
|
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
|
-
|
|
58
|
+
## Templates
|
|
41
59
|
|
|
42
|
-
|
|
60
|
+
The wizard ships three templates:
|
|
43
61
|
|
|
44
|
-
-
|
|
45
|
-
- `
|
|
46
|
-
-
|
|
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.
|
|
3
|
+
"version": "0.8.1",
|
|
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
|
|
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.1",
|
|
20
|
+
"@toist/core": "0.8.1",
|
|
21
|
+
"@toist/spec": "0.8.1"
|
|
22
|
+
}
|
|
16
23
|
}
|