skillscript-runtime 0.18.4 → 0.18.5
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/dist/composition.d.ts +6 -0
- package/dist/composition.d.ts.map +1 -1
- package/dist/composition.js +2 -0
- package/dist/composition.js.map +1 -1
- package/dist/connectors/agent.d.ts +11 -0
- package/dist/connectors/agent.d.ts.map +1 -1
- package/dist/lint.d.ts.map +1 -1
- package/dist/lint.js +47 -0
- package/dist/lint.js.map +1 -1
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/mcp-server.js +1 -0
- package/dist/mcp-server.js.map +1 -1
- package/dist/runtime.d.ts +34 -1
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +115 -49
- package/dist/runtime.js.map +1 -1
- package/docs/adopter-playbook.md +3 -1
- package/docs/connector-contract-reference.md +24 -7
- package/docs/language-reference.md +15 -6
- package/examples/skillscripts/hello-world.skill.provenance.json +1 -1
- package/package.json +1 -1
|
@@ -125,6 +125,18 @@ interface WakeReceipt {
|
|
|
125
125
|
|
|
126
126
|
The substrate decomposes the composite if it cares; non-session substrates ignore the suffix or treat the whole string as the address. This keeps the contract substrate-neutral while preserving session-granular routing — every messaging substrate either addresses a bare identity OR a specific live session, and the opaque-composite form covers both without locking adopters into a particular session model.
|
|
127
127
|
|
|
128
|
+
**Address-routed dispatch (v0.18.5)**: the runtime uses the presence of `@` in `agent_id` to decide between `deliver()` and `wake()` for skill-author surfaces (`notify()` op + `# Output: agent:` / `# Output: template:` lifecycle hooks):
|
|
129
|
+
|
|
130
|
+
| Skill-author syntax | Address shape | Connector method called |
|
|
131
|
+
|---|---|---|
|
|
132
|
+
| `notify(agent="perry", …)` | bare | `deliver()` |
|
|
133
|
+
| `notify(agent="perry@kitchen-terminal", …)` | composite | `wake()` |
|
|
134
|
+
| `# Output: agent: perry` | bare | `deliver()` |
|
|
135
|
+
| `# Output: agent: perry@kitchen-terminal` | composite | `wake()` |
|
|
136
|
+
| `# Output: template: perry@browser-tab-3` | composite | `wake()` |
|
|
137
|
+
|
|
138
|
+
The runtime threads the FULL composite to `wake()` — substrate decomposes per the rule above. For wake-routed dispatches, the skill's content (notify message or accumulated emissions) rides as `WakeOpts.context`. Per Perry's design call (thread `c453afa2`): "the address encodes delivery class" — same rule as the broader `waiting_on` / mailbox / broker convention. No `wake=true` kwarg exists; the `@` IS the signal.
|
|
139
|
+
|
|
128
140
|
**Two forms, one wire**:
|
|
129
141
|
|
|
130
142
|
```typescript
|
|
@@ -159,12 +171,17 @@ The distinction `wake-capability` vs `network-fault` matters. The former is stru
|
|
|
159
171
|
|
|
160
172
|
## Use-site cross-reference table
|
|
161
173
|
|
|
162
|
-
| Language surface | Runtime method | DeliveryPayload kind | meta sourced from |
|
|
163
|
-
|
|
164
|
-
| `# Output: agent: X` lifecycle hook | `AgentConnector.deliver()` | `augment` | Frontmatter `# Event-type:` (if set); `event_type` & `correlation_id` always undefined |
|
|
165
|
-
| `# Output:
|
|
166
|
-
|
|
|
167
|
-
|
|
|
174
|
+
| Language surface | Address shape | Runtime method | DeliveryPayload kind | meta sourced from |
|
|
175
|
+
|---|---|---|---|---|
|
|
176
|
+
| `# Output: agent: X` lifecycle hook | bare | `AgentConnector.deliver()` | `augment` | Frontmatter `# Event-type:` (if set); `event_type` & `correlation_id` always undefined |
|
|
177
|
+
| `# Output: agent: X@session` lifecycle hook | composite | `AgentConnector.wake()` | n/a (joined emissions as `WakeOpts.context`) | n/a (wake has no envelope) |
|
|
178
|
+
| `# Output: template: X` lifecycle hook | bare | `AgentConnector.deliver()` | `template` | Same as agent-bare |
|
|
179
|
+
| `# Output: template: X@session` lifecycle hook | composite | `AgentConnector.wake()` | n/a | n/a |
|
|
180
|
+
| `notify(agent=X, message=..., event_type=..., correlation_id=...)` op | bare | `AgentConnector.deliver()` | `augment` | Kwargs override frontmatter for `event_type`; `correlation_id` from kwarg only |
|
|
181
|
+
| `notify(agent=X@session, message=..., ...)` op | composite | `AgentConnector.wake()` | n/a (message as `WakeOpts.context`) | n/a |
|
|
182
|
+
| `exchange(agent=X, message=..., timeout=...)` op (locked-shape, runtime support pending) | bare | `AgentConnector.request_response()` | `augment` | Same as notify; correlation_id required |
|
|
183
|
+
|
|
184
|
+
The address-routing rule (v0.18.5) is uniform across all skill-author surfaces: `@session` present → wake-class; bare → deliver-class. See *agent@session targeting* below for the contract-level convention.
|
|
168
185
|
|
|
169
186
|
---
|
|
170
187
|
|
|
@@ -269,4 +286,4 @@ The shape-vs-semantics split is deliberate (see [[ARCHITECTURE INVARIANT 88df79c
|
|
|
269
286
|
|
|
270
287
|
---
|
|
271
288
|
|
|
272
|
-
*This doc reflects the v0.9.6 AgentConnector interface lock, v0.13.8 storage-conventions addition, v0.18.2 receipt-shape refinements (woken-honesty + session targeting + graceful degradation),
|
|
289
|
+
*This doc reflects the v0.9.6 AgentConnector interface lock, v0.13.8 storage-conventions addition, v0.18.2 receipt-shape refinements (woken-honesty + session targeting + graceful degradation), v0.18.4 caller-identity-threading + `DeliveryReceipt.warnings`, and v0.18.5 address-routed dispatch (skill-author surfaces route deliver vs. wake on `@session` presence) + `WakeReceipt.warnings`. Future contract changes update this file alongside the code.*
|
|
@@ -418,17 +418,20 @@ Per-output-kind consumption semantics: presentation surfaces (`# Output: agent:
|
|
|
418
418
|
```
|
|
419
419
|
notify(agent="oncall", message="Threshold breached at ${COUNT}")
|
|
420
420
|
notify(agent="ops", message="ticket TR-1234 is a showstopper", event_type="ticket-911", correlation_id="${INCIDENT_ID}")
|
|
421
|
+
notify(agent="cc@kitchen-terminal", message="look here now")
|
|
421
422
|
```
|
|
422
423
|
|
|
423
424
|
Synchronous alert to a named agent via wired AgentConnector(s). **Contrast with `emit`:** `emit` accumulates into end-of-skill bulk delivery via the `# Output: agent: <name>` lifecycle hook; `notify` fires mid-execution to interrupt or page an agent before the skill completes.
|
|
424
425
|
|
|
425
|
-
- `agent` — target agent id (required)
|
|
426
|
-
- `message` — alert body (optional; defaults to accumulated emissions so far)
|
|
427
|
-
- `event_type` — adopter-defined routing label (optional; flows to `DeliveryMeta.event_type
|
|
428
|
-
- `correlation_id` — reply-correlation id (optional; required for future `exchange()` / `request_response()` paths)
|
|
429
|
-
- `connectors` — JSON array restricting which wired AgentConnector(s) receive the dispatch (optional)
|
|
426
|
+
- `agent` — target agent id (required). **Address-routing**: a bare identifier (`"perry"`) routes to `AgentConnector.deliver()` (mailbox-class — the agent's inbox); an `agent@session` composite (`"cc@kitchen-terminal"`) routes to `AgentConnector.wake()` (session-targeted interrupt). The `@session` suffix IS the wake signal — there's no `wake=true` kwarg. Substrate sees the opaque composite on `wake()` and decomposes per the v0.18.2 contract.
|
|
427
|
+
- `message` — alert body (optional; defaults to accumulated emissions so far). For wake-routed dispatches, the message rides as `WakeOpts.context` (preamble for the interrupt signal).
|
|
428
|
+
- `event_type` — adopter-defined routing label (optional; flows to `DeliveryMeta.event_type` on deliver-class dispatches; ignored on wake-class since wake has no envelope).
|
|
429
|
+
- `correlation_id` — reply-correlation id (optional; required for future `exchange()` / `request_response()` paths).
|
|
430
|
+
- `connectors` — JSON array restricting which wired AgentConnector(s) receive the dispatch (optional).
|
|
430
431
|
|
|
431
|
-
Returns ACK `{agent, dispatched: [{connector, ok, error?}]}` —
|
|
432
|
+
Returns ACK `{agent, dispatched: [{connector, ok, route?, error?}]}` — `route` is `"deliver"` or `"wake"` per address-routing. Fire-and-forget callers ignore the binding; check-delivery callers inspect ACK.
|
|
433
|
+
|
|
434
|
+
The same address rule applies to lifecycle hooks: `# Output: agent: perry` routes to deliver; `# Output: agent: cc@kitchen-terminal` routes to wake. See Output targets below.
|
|
432
435
|
|
|
433
436
|
### `shell` — sandboxed or unsafe shell exec
|
|
434
437
|
|
|
@@ -1340,20 +1343,26 @@ The Augmenting-kind delivery. Output prepends to the named agent's next-turn pro
|
|
|
1340
1343
|
|
|
1341
1344
|
```
|
|
1342
1345
|
# Output: agent: <agent-name>
|
|
1346
|
+
# Output: agent: cc@kitchen-terminal
|
|
1343
1347
|
```
|
|
1344
1348
|
|
|
1345
1349
|
Used to bring an agent into the next turn pre-shaped — context that would normally require a session-start retrieval is pre-positioned. Wired end-to-end via the runtime host's prompt-prepend surface + a synchronous trigger-fire endpoint with timeout-fallback so the next-turn dispatch isn't blocked on slow skill execution.
|
|
1346
1350
|
|
|
1351
|
+
**Address-routing** — same rule as `notify()`. A bare `<agent-name>` routes to `AgentConnector.deliver()` (mailbox-class). An `<agent>@<session>` composite routes to `AgentConnector.wake()` (session-targeted interrupt); the joined emit stream rides as `WakeOpts.context`. The `@session` suffix IS the wake signal — no separate `wake=true` form.
|
|
1352
|
+
|
|
1347
1353
|
### `template: <agent-name>` — playbook delivered to a named agent
|
|
1348
1354
|
|
|
1349
1355
|
The Template-kind delivery. Output renders as a playbook the named agent executes itself — the runtime doesn't dispatch the ops, it hands the agent a recipe to follow.
|
|
1350
1356
|
|
|
1351
1357
|
```
|
|
1352
1358
|
# Output: template: <agent-name>
|
|
1359
|
+
# Output: template: cc@browser-tab-3
|
|
1353
1360
|
```
|
|
1354
1361
|
|
|
1355
1362
|
Used for reusable recipes: a skill that, when compiled, produces instructions another agent follows.
|
|
1356
1363
|
|
|
1364
|
+
**Address-routing**: same as `agent:` above. Bare → deliver(); `@session` → wake().
|
|
1365
|
+
|
|
1357
1366
|
### `file: <path>` — write to file
|
|
1358
1367
|
|
|
1359
1368
|
Header parses; file router not yet implemented. See "Not yet implemented, but planned" at top.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skillscript-runtime",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.5",
|
|
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>",
|