@standardagents/skill 0.19.3 → 0.20.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@standardagents/skill",
3
- "version": "0.19.3",
3
+ "version": "0.20.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -508,7 +508,7 @@ This is the single biggest gap in most coding-agent-built tools. **Do not write
508
508
  Discoverability reference. For full signatures, read the spec types from `node_modules/@standardagents/spec/dist/` (or browse `packages/spec/src/` on GitHub). Worked examples live in `agents/tools/AGENTS.md`.
509
509
 
510
510
  ```
511
- Identity threadId, agentId, userId, createdAt, children, terminated
511
+ Identity threadId, agentId, userId, createdAt, children, terminated, arguments
512
512
  Messages getMessages, getMessage, injectMessage, queueMessage, updateMessage
513
513
  Logs getLogs
514
514
  Resources loadModel, loadPrompt, loadAgent,
@@ -519,7 +519,7 @@ Parent notifyParent, setStatus, stopSession
519
519
  Tools queueTool, invokeTool
520
520
  Effects scheduleEffect, getScheduledEffects, removeScheduledEffect
521
521
  Events emit
522
- Context context (Record<string, unknown>, in-memory only)
522
+ Context context (Record<string, unknown>, current execution only)
523
523
  KV getValue, setValue
524
524
  Files writeFile, readFile, readFileStream, statFile, readdirFile,
525
525
  unlinkFile, mkdirFile, rmdirFile, getFileStats,
@@ -573,7 +573,8 @@ By default, `runCode()` executes the `default` export with no args. Use `execute
573
573
 
574
574
  ### Notes on a few that are easy to misuse
575
575
 
576
- - **`state.context`** is in-memory for the *current execution*. It is not durable across thread restarts. For durable structured state, use `state.getValue` / `state.setValue`.
576
+ - **`state.arguments`** is read-only invocation/creation data. Resumable `subagent_create.arguments` persists with the child thread, is visible to both child sides, and is also available as prompt variables.
577
+ - **`state.context`** is in-memory scratch data for the *current execution*. It is not durable across thread restarts and should not be used for invocation or subagent creation arguments. For durable structured state, use `state.getValue` / `state.setValue`.
577
578
  - **`state.getValue` / `state.setValue`** are durable per-thread JSON storage. Use them for small structured state; use files for larger content or artifacts.
578
579
  - **`state.env` / `state.envType` / `state.setEnv`** are for runtime configuration and secrets. `state.env(name)` resolves thread -> account -> instance -> agent -> prompt. `state.envType(name)` returns `'secret'` by default; `'text'` means the value may be shown in tool output. `state.setEnv(name, value, { type: 'text' | 'secret' })` writes thread-scoped env and propagates to active descendants. Omit `type` only when preserving the existing type is intentional; new keys default to secret.
579
580
  - **`state.runCode`** runs JavaScript or TypeScript in an isolated Dynamic Worker sandbox. The sandbox does not receive `ThreadState`, env, files, network, or host globals implicitly. Pass exact capabilities through `imports`, `globals`, `modules`, and `execute`. It executes exported values/functions; code such as `console.log(fibonacci(5))` can log, but it must still `export default ...` or export a named function/value for the host to receive a result.
@@ -756,6 +757,8 @@ SubagentToolConfig — entry on a parent prompt's `tools` array
756
757
  optional string (env name) subagent disabled unless this env resolves truthy
757
758
  ```
758
759
 
760
+ 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.
761
+
759
762
  A second tool-config form exists for plain callables (`{ name, env, options }`), and a third for subprompts (`{ name, includeTextResponse, includeToolCalls, includeErrors, initUserMessageProperty, initAttachmentsProperty }`). Both are documented in full at `agents/prompts/AGENTS.md`.
760
763
 
761
764
  ### Inter-agent communication rules