@standardagents/skill 0.21.0 → 0.22.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/package.json +1 -1
- package/skills/agentbuilder/SKILL.md +15 -1
package/package.json
CHANGED
|
@@ -538,6 +538,10 @@ await state.setValue('invocation_count', count + 1);
|
|
|
538
538
|
|
|
539
539
|
`setValue(key, null)` and `setValue(key, undefined)` delete the key. For larger payloads, binary data, user-visible artifacts, or content that should be shared as a file, use `state.writeFile()` / `state.readFile()` instead.
|
|
540
540
|
|
|
541
|
+
### Agent Skills library
|
|
542
|
+
|
|
543
|
+
`state.skills` is the instance-GLOBAL Agent Skills library (agentskills.io SKILL.md format) — the deliberate exception to per-thread scoping: skills install once and every thread sees them. `list()` returns metadata (name + description), `get(name)` loads a SKILL.md body on demand (progressive disclosure), `readFile(name, path)` opens bundled files, and `install(files)` / `setEnabled` / `remove` manage the library. Identity always comes from SKILL.md frontmatter (`name`, `description`), validated on install.
|
|
544
|
+
|
|
541
545
|
### Sandboxed code execution
|
|
542
546
|
|
|
543
547
|
Use `state.runCode()` for model- or user-authored JavaScript/TypeScript instead of `eval` or `new Function`. The sandbox runs in Cloudflare Dynamic Workers, has no implicit thread state, filesystem, network, timers, or host globals, and only receives capabilities you explicitly bridge through `imports` or `globals`.
|
|
@@ -755,6 +759,16 @@ SubagentToolConfig — entry on a parent prompt's `tools` array
|
|
|
755
759
|
initAttachmentsProperty schema field name tool arg holding /attachments/* paths to copy to child
|
|
756
760
|
initAgentNameProperty schema field name tool arg used to tag the child thread (UI label)
|
|
757
761
|
optional string (env name) subagent disabled unless this env resolves truthy
|
|
762
|
+
parentCommunication 'implicit' | 'explicit' top-level form for NON-resumable subagents; explicit
|
|
763
|
+
means completion is not auto-queued to the parent
|
|
764
|
+
(so the parent is not woken). Use for background
|
|
765
|
+
children that deliver results via parent thread KV.
|
|
766
|
+
resumable.parentCommunication takes precedence.
|
|
767
|
+
hidden boolean relationship stays declared and spawnable by runtime
|
|
768
|
+
code (invokeTool/queueTool from hooks), but the tool
|
|
769
|
+
is excluded from every LLM request — the model can
|
|
770
|
+
never call it (infrastructure children, e.g. a
|
|
771
|
+
background compaction agent)
|
|
758
772
|
```
|
|
759
773
|
|
|
760
774
|
For resumable lifecycle creation, `subagent_create.arguments` is shaped by the prompt schema on the receiving child side (`resumable.receives_messages`). The runtime persists those values with the child thread and restores them as `ThreadState.arguments` for both child sides; top-level keys are also prompt variables during render, including included prompts.
|
|
@@ -770,7 +784,7 @@ These are correct as written in the spec — internalize them.
|
|
|
770
784
|
- Implicitly via `immediate: { ... }` — the child spawns the moment the parent prompt activates, before any LLM step.
|
|
771
785
|
2. **Children only communicate back to their parents.** Two flavors:
|
|
772
786
|
- **Implicit**: the child auto-queues a message to the parent when the session ends (via `sessionStop`, `sessionFail`, or `maxSessionTurns`). Default for all subagents.
|
|
773
|
-
- **Explicit**: only when code calls `state.notifyParent()`, `state.setStatus()`, or `state.stopSession({ result, notifyParent, status })`. Set with `resumable.parentCommunication: 'explicit'
|
|
787
|
+
- **Explicit**: only when code calls `state.notifyParent()`, `state.setStatus()`, or `state.stopSession({ result, notifyParent, status })`. Set with `resumable.parentCommunication: 'explicit'` (resumable) or top-level `parentCommunication: 'explicit'` (non-resumable). Use for high-traffic resumables (e.g., a Slack monitor) where you want control over when the parent is interrupted, or for non-resumable background workers (e.g., a compaction agent) whose completion should not wake the parent because results are delivered via the parent's thread KV.
|
|
774
788
|
3. **Resumable subagents can receive messages from their parents.** `resumable.receives_messages` chooses which side hears them.
|
|
775
789
|
4. **When a child sends back to the parent, it MUST indicate whether it needs a response** — in plain English, e.g. "After researching, you must respond so I can continue with the email." A research subagent providing FYI info doesn't need a response; a gmail subagent waiting on guidance does.
|
|
776
790
|
5. **File attachments use path strings.** `/attachments/{filename}.{ext}`. Use this convention everywhere — the runtime copies attachments across thread filesystems automatically when listed in `initAttachmentsProperty`.
|