@operatorstack/yield 0.1.29 → 0.1.30
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/LICENSE +21 -0
- package/README.md +206 -0
- package/package.json +20 -9
- package/src/index.ts +1 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Operator Stack
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
# Yield
|
|
2
|
+
|
|
3
|
+
Yield is an open-source execution runtime for programmable Agent Skill workflows.
|
|
4
|
+
|
|
5
|
+
**Write one skill workflow. Run it from your coding agents.**
|
|
6
|
+
|
|
7
|
+
Skill workflows are portable, executable processes that combine agent skills
|
|
8
|
+
with deterministic code, state, and verification.
|
|
9
|
+
|
|
10
|
+
Write the workflow in TypeScript, Python, Go, or Rust. Combine agent judgment,
|
|
11
|
+
real commands, human input, checks, and saved state. Yield generates the small
|
|
12
|
+
adapter each coding agent expects.
|
|
13
|
+
|
|
14
|
+
The split is small:
|
|
15
|
+
|
|
16
|
+
| term | meaning |
|
|
17
|
+
|---|---|
|
|
18
|
+
| **skill** | one reusable capability |
|
|
19
|
+
| **workflow** | order, branches, checks, and saved state |
|
|
20
|
+
| **skill workflow** | an executable composition of skills, code, commands, and human input |
|
|
21
|
+
| **adapter** | a generated `SKILL.md` that lets one coding agent discover the workflow |
|
|
22
|
+
|
|
23
|
+
The canonical skill workflow stays beside your code. Generated adapters are
|
|
24
|
+
disposable. The model keeps reasoning, exploration, editing, and judgment;
|
|
25
|
+
normal code owns the repeatable control flow.
|
|
26
|
+
|
|
27
|
+
## Install
|
|
28
|
+
|
|
29
|
+
Choose one language package. TypeScript and Python include a package-local
|
|
30
|
+
runtime. Go and Rust install the matching runtime under `.yield/bin` in the
|
|
31
|
+
repository. Generated adapters never use a global `yskill` from `PATH`.
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
# TypeScript (public npm)
|
|
35
|
+
npm install --save-exact @operatorstack/yield@0.1.29
|
|
36
|
+
npm exec -- yskill --version
|
|
37
|
+
|
|
38
|
+
# Python, after creating and activating .venv
|
|
39
|
+
python -m pip install yieldskill==0.1.29 --index-url https://get.operatorstack.systems/pip/simple/
|
|
40
|
+
python -m yieldskill --version
|
|
41
|
+
|
|
42
|
+
# Go, from the repository root
|
|
43
|
+
mkdir -p .yield/bin
|
|
44
|
+
GOBIN="$PWD/.yield/bin" GOPROXY=https://get.operatorstack.systems/go,direct \
|
|
45
|
+
go install github.com/operatorstack/yield/cmd/yskill@v0.1.29
|
|
46
|
+
.yield/bin/yskill --version
|
|
47
|
+
|
|
48
|
+
# Rust, from the repository root
|
|
49
|
+
cargo install yieldskill@0.1.29 --root .yield \
|
|
50
|
+
--index sparse+https://get.operatorstack.systems/cargo/index/ --locked
|
|
51
|
+
.yield/bin/yskill --version
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Yield creates `.yield/.gitignore` when it registers a Go or Rust workflow, so
|
|
55
|
+
the local runtime and run state stay out of Git.
|
|
56
|
+
On Windows, run the local binary as `.\.yield\bin\yskill.exe`.
|
|
57
|
+
|
|
58
|
+
## Create and register a skill workflow
|
|
59
|
+
|
|
60
|
+
Keep the canonical workflow beside the language dependencies it uses. Yield writes
|
|
61
|
+
small adapters into each coding agent's project skill directory; it does not
|
|
62
|
+
copy the workflow or install its dependencies again.
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
# TypeScript example
|
|
66
|
+
npm exec -- yskill init skills/review \
|
|
67
|
+
--language typescript \
|
|
68
|
+
--description "Review changed code when the user wants a branch checked before shipping."
|
|
69
|
+
|
|
70
|
+
# Replace the intentionally incomplete starter and fixture, then check it.
|
|
71
|
+
npm exec -- yskill doctor skills/review --test
|
|
72
|
+
|
|
73
|
+
# Detect installed agents, or pass --agent cursor,codex,claude-code.
|
|
74
|
+
npm exec -- yskill register skills/review
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
`yskill agents` lists the available agent IDs and project paths. Cursor,
|
|
78
|
+
Codex, and Claude Code are verified. Remaining entries support explicit path
|
|
79
|
+
registration from the pinned open registry; they are not presented as
|
|
80
|
+
end-to-end verified.
|
|
81
|
+
|
|
82
|
+
## How a skill workflow runs
|
|
83
|
+
|
|
84
|
+
Deterministic re-execution: on every run/resume, `yskill` re-executes the
|
|
85
|
+
skill workflow from the top, feeding recorded responses back in order. At
|
|
86
|
+
the first unanswered operation the SDK emits a `yield.v1` request envelope
|
|
87
|
+
and the process exits — no daemon. A replayed step that produces a
|
|
88
|
+
different operation than the journal recorded is a divergence and fails
|
|
89
|
+
the run loudly; it never silently forks.
|
|
90
|
+
|
|
91
|
+
- **`yskill`** owns the append-only run log
|
|
92
|
+
(`.yield/runs/<id>.jsonl`), sequence and digest binding, response
|
|
93
|
+
validation, and every refusal (stale, duplicate, wrong-run,
|
|
94
|
+
schema-invalid, digest-mismatch, completion-unproven).
|
|
95
|
+
- **The skill workflow** is an ordinary program using one Yield SDK; every
|
|
96
|
+
side effect crosses a yielded primitive.
|
|
97
|
+
|
|
98
|
+
Five primitives, two exits:
|
|
99
|
+
|
|
100
|
+
| primitive | who acts |
|
|
101
|
+
|---|---|
|
|
102
|
+
| `AskUser` | the agent asks through its normal interface |
|
|
103
|
+
| `AgentTask` | the model reasons; the result must be schema-valid JSON |
|
|
104
|
+
| `RunCommand` | **yskill executes it itself** — results are observed fact, not transcription |
|
|
105
|
+
| `Require` | a claim bound to evidence; failure makes completion structurally unreachable |
|
|
106
|
+
| `Complete` / `Blocked` / `Refused` | honest terminals, always recorded |
|
|
107
|
+
|
|
108
|
+
## Four languages, one execution contract
|
|
109
|
+
|
|
110
|
+
Write the skill workflow in Go, TypeScript, Python, or Rust. Every SDK
|
|
111
|
+
implements the same certified execution contract, and the conformance suite
|
|
112
|
+
(`internal/conformance`) runs the same program in all four languages and
|
|
113
|
+
asserts identical observable behavior. The language-neutral schemas are
|
|
114
|
+
documented in the [runtime reference](docs/reference/sdk-parity.md).
|
|
115
|
+
|
|
116
|
+
| language | SDK | example |
|
|
117
|
+
|---|---|---|
|
|
118
|
+
| Go | `sdk/yield` | `examples/investigate` — bounded hypothesis loop |
|
|
119
|
+
| TypeScript | `sdk/typescript` (`@operatorstack/yield`) | `examples/release-checklist` — human-gated deploy |
|
|
120
|
+
| Python | `sdk/python` (`yieldskill`) | `examples/env-doctor` — probe, branch, resume after the human |
|
|
121
|
+
| Rust | `sdk/rust` (`yieldskill`) | `examples/data-migration` — dry-run → approve → apply → verify |
|
|
122
|
+
|
|
123
|
+
Skills declare their language and runner in `skill.json`:
|
|
124
|
+
`{"version": 1, "language": "typescript", "run": ["node", "main.ts"]}`.
|
|
125
|
+
|
|
126
|
+
## Ten skill workflows, every language
|
|
127
|
+
|
|
128
|
+
The [example library](examples/library/) implements ten common skill workflows
|
|
129
|
+
independently in all four SDKs: branch review, failure
|
|
130
|
+
investigation, web QA, package release, issue triage, CI repair, dependency
|
|
131
|
+
upgrade, database migration, security audit, and iOS publishing.
|
|
132
|
+
|
|
133
|
+
Each language has the same skill workflow, a thin adapter, and a scripted
|
|
134
|
+
fixture. Start from the work you already do instead of starting from a
|
|
135
|
+
framework tutorial.
|
|
136
|
+
|
|
137
|
+
## Documentation
|
|
138
|
+
|
|
139
|
+
Start with [what a skill workflow is](docs/skill-workflows.md), then build one
|
|
140
|
+
with the [ten-minute TypeScript quickstart](docs/quickstart.md). Continue with
|
|
141
|
+
the documentation for your job:
|
|
142
|
+
|
|
143
|
+
- [primitive guides](docs/primitives/README.md) — commands, model work,
|
|
144
|
+
human input, evidence gates, and outcomes;
|
|
145
|
+
- [tutorials](docs/tutorials/README.md) — review, approval, environment
|
|
146
|
+
repair, bounded debugging, and migration;
|
|
147
|
+
- [examples](docs/examples.md) — working programs in all four languages;
|
|
148
|
+
- [coding-agent setup](docs/agent-setup.md) — register one skill workflow with the
|
|
149
|
+
agents used by the project;
|
|
150
|
+
- [Agent Plugins and Yield](docs/agent-plugins.md) — where portable packaging ends
|
|
151
|
+
and workflow execution begins;
|
|
152
|
+
- [test workflow effects](docs/testing-fixtures.md) — deterministic fixture
|
|
153
|
+
setup, response effects, standard-input JSON, and cleanup;
|
|
154
|
+
- [evaluations](evals/README.md) — first-party workflow conformance and runtime
|
|
155
|
+
invariant results, including the exact claim boundary;
|
|
156
|
+
- [convert an existing skill](docs/convert-existing-skill.md) — move
|
|
157
|
+
control flow into code without claiming that fixture execution proves
|
|
158
|
+
every reading of the original prose;
|
|
159
|
+
- [CLI and runtime reference](docs/reference/cli.md).
|
|
160
|
+
|
|
161
|
+
## Try it
|
|
162
|
+
|
|
163
|
+
```
|
|
164
|
+
go build -o yskill ./cmd/yskill
|
|
165
|
+
./yskill test examples/library/typescript/review-branch
|
|
166
|
+
./yskill test examples/library/python/review-branch
|
|
167
|
+
./yskill test examples/library/go/review-branch
|
|
168
|
+
./yskill test examples/library/rust/review-branch
|
|
169
|
+
YSKILL="$PWD/yskill" bash ./examples/library/test-all.sh
|
|
170
|
+
./yskill test examples/investigate # Go: scripted fixture run to completion
|
|
171
|
+
./yskill test examples/release-checklist # TypeScript (Node >= 23.6)
|
|
172
|
+
./yskill test examples/env-doctor # Python 3.10+
|
|
173
|
+
./yskill test examples/data-migration # Rust (cargo)
|
|
174
|
+
./yskill run examples/investigate # prints the first operation envelope
|
|
175
|
+
./yskill init my-skill --description "Run this skill workflow when ..."
|
|
176
|
+
./yskill register my-skill --agent codex # write a thin project adapter
|
|
177
|
+
./yskill doctor my-skill --agent codex # verify package + adapter wiring
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
The reference skill, `examples/investigate`, encodes an investigation
|
|
181
|
+
discipline in code: at least three hypotheses, cheapest-to-disprove
|
|
182
|
+
first, at most three failed attempts, completion requires a causal chain
|
|
183
|
+
— or an honest `Blocked` at the frontier.
|
|
184
|
+
|
|
185
|
+
## What it guarantees — and what it doesn't
|
|
186
|
+
|
|
187
|
+
Guaranteed: deterministic control flow, typed requests/responses,
|
|
188
|
+
persistent state, replay (divergence fails loudly), stale/duplicate
|
|
189
|
+
rejection, evidence-bound completion.
|
|
190
|
+
|
|
191
|
+
Not guaranteed: that the agent performed *only* the requested operation,
|
|
192
|
+
or that a schema-valid `agent_task` result is true — schema validity is
|
|
193
|
+
not truth. `RunCommand` is the exception by construction: commands are
|
|
194
|
+
executed by the Yield CLI, so exit codes and output enter the log as
|
|
195
|
+
observed fact. Runtime and conformance tests enforce these guarantees.
|
|
196
|
+
|
|
197
|
+
## What it is not
|
|
198
|
+
|
|
199
|
+
Not a daemon, not a hosted runtime, not a workflow DSL, not a
|
|
200
|
+
marketplace, not a new agent loop, not a multi-agent orchestrator, not a
|
|
201
|
+
security sandbox.
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
This is Yield's canonical source repository. Changes, verification, release
|
|
206
|
+
intent, and publishing control all live here. MIT licensed.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@operatorstack/yield",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.30",
|
|
4
|
+
"description": "Yield skill-program SDK for TypeScript: turn SKILL.md workflows into resumable programs.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"files": [
|
|
@@ -29,20 +29,31 @@
|
|
|
29
29
|
},
|
|
30
30
|
"repository": {
|
|
31
31
|
"type": "git",
|
|
32
|
-
"url": "https://github.com/operatorstack/yield.git",
|
|
32
|
+
"url": "git+https://github.com/operatorstack/yield.git",
|
|
33
33
|
"directory": "sdk/typescript"
|
|
34
34
|
},
|
|
35
|
+
"homepage": "https://github.com/operatorstack/yield#readme",
|
|
36
|
+
"bugs": {
|
|
37
|
+
"url": "https://github.com/operatorstack/yield/issues"
|
|
38
|
+
},
|
|
39
|
+
"keywords": [
|
|
40
|
+
"agent",
|
|
41
|
+
"skills",
|
|
42
|
+
"workflow",
|
|
43
|
+
"resumable",
|
|
44
|
+
"cli"
|
|
45
|
+
],
|
|
35
46
|
"publishConfig": {
|
|
36
47
|
"access": "public",
|
|
37
48
|
"provenance": true,
|
|
38
49
|
"registry": "https://registry.npmjs.org/"
|
|
39
50
|
},
|
|
40
51
|
"optionalDependencies": {
|
|
41
|
-
"@operatorstack/yield-darwin-amd64": "0.1.
|
|
42
|
-
"@operatorstack/yield-darwin-arm64": "0.1.
|
|
43
|
-
"@operatorstack/yield-linux-amd64": "0.1.
|
|
44
|
-
"@operatorstack/yield-linux-arm64": "0.1.
|
|
45
|
-
"@operatorstack/yield-windows-amd64": "0.1.
|
|
46
|
-
"@operatorstack/yield-windows-arm64": "0.1.
|
|
52
|
+
"@operatorstack/yield-darwin-amd64": "0.1.30",
|
|
53
|
+
"@operatorstack/yield-darwin-arm64": "0.1.30",
|
|
54
|
+
"@operatorstack/yield-linux-amd64": "0.1.30",
|
|
55
|
+
"@operatorstack/yield-linux-arm64": "0.1.30",
|
|
56
|
+
"@operatorstack/yield-windows-amd64": "0.1.30",
|
|
57
|
+
"@operatorstack/yield-windows-arm64": "0.1.30"
|
|
47
58
|
}
|
|
48
59
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Yield skill-program SDK for TypeScript (yield.v1).
|
|
2
2
|
//
|
|
3
|
-
// Implements the
|
|
3
|
+
// Implements the tested SDK execution contract (see ir/README.md):
|
|
4
4
|
// load the journal, replay recorded operations with a digest comparison at
|
|
5
5
|
// EVERY replayed step before consuming its response, emit exactly one
|
|
6
6
|
// program output (request | terminal | diverged) on stdout, then exit.
|