skillscript-runtime 0.15.2 → 0.15.3
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/docs/adopter-playbook.md +8 -0
- package/examples/connectors/DataStoreTemplate/README.md +4 -0
- package/examples/connectors/SkillStoreTemplate/README.md +14 -0
- package/examples/skillscripts/data-store-roundtrip.skill.md +5 -4
- package/examples/skillscripts/hello-world.skill.provenance.json +1 -1
- package/package.json +5 -1
- package/scaffold/skills/data-store-roundtrip.skill.md +5 -4
package/docs/adopter-playbook.md
CHANGED
|
@@ -129,6 +129,14 @@ skillfile init --here
|
|
|
129
129
|
|
|
130
130
|
This creates `~/.skillscript/` with `skills/`, `traces/`, an empty `connectors.json`, and a `config.toml` stub.
|
|
131
131
|
|
|
132
|
+
**If you're writing a custom bootstrap (not just using the bundled CLI):** the package is ESM-only. `npm init -y` produces a CJS `package.json` by default, which will fail your first bootstrap run with top-level-await / ESM-import errors. Switch your adopter project to ESM before authoring bootstrap code:
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
npm pkg set type=module
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
(Phase 2 cold-adopter dogfood, 2026-06-01: first improvisation an adopter hit was this exact gap — surfaced after a `bootstrap.ts` failed at module load. One-sentence flag saves the trip.)
|
|
139
|
+
|
|
132
140
|
### 2. Decide on substrate wiring
|
|
133
141
|
|
|
134
142
|
For each of the four substrates (data store, LLM, agent harness, MCP tools), decide Case 1 or Case 2. The onboarding scaffold (`examples/onboarding-scaffold/`) is Case 1 end-to-end against a file-backed data store + OpenAI + tmux.
|
|
@@ -60,6 +60,10 @@ cp -r examples/connectors/DataStoreTemplate examples/connectors/MyDataStore
|
|
|
60
60
|
|
|
61
61
|
The conformance suite verifies your impl honors the contract: method presence, return-type shape, capability flag self-consistency. Passes → runtime treats your impl interchangeably with `SqliteDataStore`.
|
|
62
62
|
|
|
63
|
+
### Running conformance against a shared persistent substrate
|
|
64
|
+
|
|
65
|
+
Same discipline as the `SkillStoreTemplate` README's section of the same name: the suite's `build()` callback is invoked **per fixture**, and the first stateful test expects `query()` on an empty store to return `[]`. For shared persistent substrates (hosted vector DBs, multi-tenant Postgres, anything where state survives across `build()` calls), your `build()` must namespace each fixture into an isolatable + wipeable subspace (tag marker, per-test schema, per-test prefix) and clear before returning the instance. The conformance suite doesn't (and can't) know what isolation your substrate supports.
|
|
66
|
+
|
|
63
67
|
## Reference implementation
|
|
64
68
|
|
|
65
69
|
When in doubt about semantics, read the bundled impl:
|
|
@@ -60,6 +60,20 @@ cp -r examples/connectors/SkillStoreTemplate examples/connectors/MyDatabaseSkill
|
|
|
60
60
|
|
|
61
61
|
The conformance suite verifies your impl honors the contract: method presence, return-type shape, error-class throw conditions, capability flag self-consistency. If it passes, the runtime treats your impl interchangeably with the bundled defaults.
|
|
62
62
|
|
|
63
|
+
### Running conformance against a shared persistent substrate
|
|
64
|
+
|
|
65
|
+
The suite's `build()` callback is invoked **per fixture** — every test rebuilds. The first stateful assertion expects `query()` on an empty store to return `[]`. For bundled-default substrates that's trivial (fresh tmpdir + new instance), but for shared persistent substrates (AMP, Postgres, MongoDB, hosted memory APIs — anything where state survives across `build()` calls), a naive `build()` that returns a wrapper over the live store fails immediately because state from prior tests leaks in.
|
|
66
|
+
|
|
67
|
+
The fix: your `build()` callback should namespace each fixture into an **isolatable + wipeable subspace** and wipe before returning the instance. Common patterns:
|
|
68
|
+
|
|
69
|
+
- **Tag-marker isolation.** Each fixture gets a unique marker tag (`fixture-${randomUUID()}`); your impl filters every operation by that tag; teardown removes everything carrying the tag.
|
|
70
|
+
- **Per-test database/schema.** Open a fresh schema/database per fixture; drop on teardown.
|
|
71
|
+
- **Per-test prefix.** Prefix every key/name with a fixture-unique string; teardown deletes by prefix.
|
|
72
|
+
|
|
73
|
+
The shared-substrate handling is your impl's responsibility — the conformance suite doesn't (and can't) know what isolation your substrate supports. If your impl can't isolate, your conformance pass is unreliable.
|
|
74
|
+
|
|
75
|
+
Phase 2 cold-adopter dogfood (2026-06-01): adopter built `AmpSkillStore` against AMP's shared skills vault, used a marker-domain-tag namespace per fixture + wiped before/after. 20/20 conformance.
|
|
76
|
+
|
|
63
77
|
## Reference implementations
|
|
64
78
|
|
|
65
79
|
When in doubt about semantics, read the bundled impls:
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
# Skill: data-store-roundtrip
|
|
2
|
-
# Status: Approved v1:
|
|
2
|
+
# Status: Approved v1:b6e1bfb1
|
|
3
3
|
# Autonomous: true
|
|
4
|
-
# Description: Round-trips the DataStore — writes a record, reads it back via full-text search. If this skill executes and emits
|
|
4
|
+
# Description: Round-trips the DataStore — writes a record tagged with a per-run marker, reads it back via full-text search against the same marker. The marker makes the read deterministic (count == 1) regardless of prior runs accumulated in the store. If this skill executes and emits "read back 1 items", your DataStore substrate is wired correctly.
|
|
5
5
|
|
|
6
6
|
run:
|
|
7
|
-
$
|
|
8
|
-
$
|
|
7
|
+
$set MARKER = "probe-${NOW}"
|
|
8
|
+
$ data_write content="${MARKER} adopter dogfood probe record" tags=["phase1","probe"] -> W
|
|
9
|
+
$ data_read mode="fts" query="${MARKER}" limit=5 -> R
|
|
9
10
|
emit(text="wrote record '${W.id}'; read back ${R.items|length} items")
|
|
10
11
|
|
|
11
12
|
default: run
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skillscript-runtime",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.3",
|
|
4
4
|
"description": "Runtime, compiler, lint, CLI, and dashboard for Skillscript — a small declarative language for authoring agent workflows.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Scott Shwarts <scotts@pobox.com>",
|
|
@@ -48,6 +48,10 @@
|
|
|
48
48
|
"types": "./dist/mcp-server.d.ts",
|
|
49
49
|
"import": "./dist/mcp-server.js"
|
|
50
50
|
},
|
|
51
|
+
"./dashboard": {
|
|
52
|
+
"types": "./dist/dashboard/server.d.ts",
|
|
53
|
+
"import": "./dist/dashboard/server.js"
|
|
54
|
+
},
|
|
51
55
|
"./testing": {
|
|
52
56
|
"types": "./dist/testing/index.d.ts",
|
|
53
57
|
"import": "./dist/testing/index.js"
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
# Skill: data-store-roundtrip
|
|
2
|
-
# Status: Approved v1:
|
|
2
|
+
# Status: Approved v1:b6e1bfb1
|
|
3
3
|
# Autonomous: true
|
|
4
|
-
# Description: Round-trips the DataStore — writes a record, reads it back via full-text search. If this skill executes and emits
|
|
4
|
+
# Description: Round-trips the DataStore — writes a record tagged with a per-run marker, reads it back via full-text search against the same marker. The marker makes the read deterministic (count == 1) regardless of prior runs accumulated in the store. If this skill executes and emits "read back 1 items", your DataStore substrate is wired correctly.
|
|
5
5
|
|
|
6
6
|
run:
|
|
7
|
-
$
|
|
8
|
-
$
|
|
7
|
+
$set MARKER = "probe-${NOW}"
|
|
8
|
+
$ data_write content="${MARKER} adopter dogfood probe record" tags=["phase1","probe"] -> W
|
|
9
|
+
$ data_read mode="fts" query="${MARKER}" limit=5 -> R
|
|
9
10
|
emit(text="wrote record '${W.id}'; read back ${R.items|length} items")
|
|
10
11
|
|
|
11
12
|
default: run
|