@trailstep/core 0.1.0 → 0.2.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/README.md +34 -3
- package/dist/index.d.ts +797 -177
- package/dist/index.js +7718 -3662
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -2,14 +2,45 @@
|
|
|
2
2
|
|
|
3
3
|
`@trailstep/core` is the framework-neutral runtime package for TrailStep.
|
|
4
4
|
|
|
5
|
+
Most workflow authors should start with [`@trailstep/authoring`](../authoring/README.md), which re-exports common authoring helpers and adds `defineWorkflow(...)`.
|
|
6
|
+
|
|
5
7
|
## Install
|
|
6
8
|
|
|
7
9
|
```bash
|
|
8
|
-
|
|
10
|
+
npm install @trailstep/core
|
|
9
11
|
```
|
|
10
12
|
|
|
13
|
+
Use the equivalent command for your package manager if you use `pnpm`, `yarn`, or `bun`.
|
|
14
|
+
|
|
11
15
|
## Public role
|
|
12
16
|
|
|
13
|
-
Use this package for
|
|
17
|
+
Use this package for low-level TrailStep runtime integration:
|
|
18
|
+
|
|
19
|
+
- JSON-object input/output validation
|
|
20
|
+
- continuation runtime primitives
|
|
21
|
+
- `runWorkflow`
|
|
22
|
+
- workflow events
|
|
23
|
+
- retry state
|
|
24
|
+
- provider contracts
|
|
25
|
+
- local run artifact handling
|
|
26
|
+
|
|
27
|
+
TrailStep's key runtime boundary is the step: each step can run as a focused unit of work, receive structured output, persist events, and return the next continuation.
|
|
28
|
+
|
|
29
|
+
Runtime events are appended to `.trailstep/runs/<runName>/events.jsonl` by default. Set `TRAILSTEP_RUNS_ROOT` in CLI runs when you need artifacts somewhere else. Run directories are generated outputs for inspection and replay; do not manually edit them to recover workflow state.
|
|
30
|
+
|
|
31
|
+
## Provider package export convention
|
|
32
|
+
|
|
33
|
+
Provider packages expose their definition from the package root as an ESM export named `trailstepProvider`. The exported object must include a serializable `manifest`; optional hook functions belong beside the manifest, not inside it:
|
|
34
|
+
|
|
35
|
+
```ts
|
|
36
|
+
export const trailstepProvider = {
|
|
37
|
+
manifest: { schemaVersion: 1, id: "example", /* ... */ },
|
|
38
|
+
hooks: { /* optional hook functions */ },
|
|
39
|
+
};
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## More docs
|
|
14
43
|
|
|
15
|
-
|
|
44
|
+
- [Architecture](../../docs/architecture.md)
|
|
45
|
+
- [Authoring workflows](../../docs/authoring-workflows.md)
|
|
46
|
+
- [CLI reference](../../docs/cli-reference.md)
|