@standardagents/skill 0.45.5 → 0.45.7

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.45.5",
3
+ "version": "0.45.7",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -781,7 +781,7 @@ By default, `runCode()` executes the `default` export with no args. Use `execute
781
781
  - **`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`.
782
782
  - **`state.getValue` / `state.setValue`** are durable per-thread JSON storage. Use them for small structured state; use files for larger content or artifacts.
783
783
  - **`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.
784
- - **`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.
784
+ - **`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. The sandbox memory limit is 128 MB; `memoryLimitBytes` cannot lower it, and a higher value is clamped to it.
785
785
  - **`state.scheduleEffect`** runs a named effect after a delay. It survives restarts. This is your cron, your queue, and your retry timer all in one.
786
786
  - **`state.invokeTool` vs `state.queueTool`** — `invokeTool` runs synchronously and returns the result; `queueTool` schedules the call to run later in the normal tool-call flow. Prefer `queueTool` when the model should see the result as a regular tool call.
787
787
  - **`state.notifyParent`** — for children whose relationship sets `parentCommunication: 'explicit'`, this is the main way the child talks to the parent. Use it sparingly; every delivered notification interrupts the parent. If there is no parent, nothing is queued externally.
@@ -871,7 +871,7 @@ PromptDefinition
871
871
  model ModelName references agents/models/<name>
872
872
  includeChat boolean (default false) pass full chat history to this LLM step
873
873
  includePastTools boolean (default false) include tool calls and results in later requests
874
- parallelToolCalls boolean (default false) allow multiple tool calls per turn
874
+ parallelToolCalls boolean (provider default) allow multiple tool calls per turn
875
875
  toolChoice 'auto' | 'none' | 'required' tool calling strategy (default 'auto')
876
876
  requiredSchema ZodSchema validate args when called as a tool
877
877
  variables VariableDefinition[] declared text/secret variables
@@ -1139,7 +1139,7 @@ Undeclared thread-only env keys are treated as write-only secrets when scanned f
1139
1139
 
1140
1140
  ## Platform terms
1141
1141
 
1142
- If `git push` prints lines that start with `remote: Standard Agents:`, the platform stored the push but started no build. Tell the user what the lines say. For the terms notice, the user runs `npx @standardagents/cli terms accept`. An acceptance starts no build: the command lists the deploy that waits and starts it (with `--agree`, with no second question). To start it later, run `npx @standardagents/cli builds retry` on the pushed branch.
1142
+ If `git push` prints lines that start with `remote: Standard Agents:`, the platform stored the push but started no build. Tell the user what the lines say. For the terms notice, the user runs `npx @standardagents/cli@latest terms accept`. An acceptance starts no build: the command lists the deploy that waits and starts it (with `--agree`, with no second question). To start it later, run `npx @standardagents/cli@latest builds retry` on the pushed branch.
1143
1143
 
1144
1144
  The platform can ask an account member to accept updated terms.
1145
1145
 
@@ -1168,7 +1168,8 @@ new yes.
1168
1168
 
1169
1169
  Add `--json` for stable output; a code 2 result holds the command in
1170
1170
  `accept_command`. Exit codes: 0 success, 1 failure, 2
1171
- confirmation needed, 3 not signed in (the user runs `login` or `git-login`).
1171
+ confirmation needed, 3 not signed in (the user runs
1172
+ `npx @standardagents/cli@latest login`, the one sign-in command, in any directory).
1172
1173
  After acceptance the command lists each deploy that started.
1173
1174
 
1174
1175
  ---
@@ -1189,9 +1190,10 @@ destination.
1189
1190
 
1190
1191
  ### `agents diag` (CLI)
1191
1192
 
1192
- All subcommands accept `--endpoint <instance-url>` and `--token <api-key>`
1193
- (defaults: `$STANDARD_AGENTS_INSTANCE_URL` / `$STANDARD_AGENTS_INSTANCE_TOKEN`,
1194
- falling back to `http://localhost:5173` for local dev). The token must belong
1193
+ All subcommands read `$STANDARD_AGENTS_INSTANCE_URL` and
1194
+ `$STANDARD_AGENTS_INSTANCE_TOKEN` (falling back to `http://localhost:5173` for
1195
+ local dev). Set the token in the environment: `--token <api-key>` is accepted,
1196
+ but an argument is visible to other users in the process list. The token must belong
1195
1197
  to a user with the `logs` permission (admin keys qualify; customer `api`-role
1196
1198
  keys do not).
1197
1199
 
@@ -1204,6 +1206,15 @@ agents diag tail 050d96f1 # live-tail the log stream — are bytes f
1204
1206
  agents diag revive 050d96f1 # run a watchdog check NOW: finalize + resume
1205
1207
  ```
1206
1208
 
1209
+ Every subcommand accepts `--json`: stdout then holds one JSON document
1210
+ (`diag tail --json` prints one frame per line), and errors go to stderr. A
1211
+ failure exits 1 and prints `{ "error": { "code", "message", "status",
1212
+ "request_id" } }`. `diag threads` reports how many threads it could not read
1213
+ (`unreadable` in JSON); `diag threads --stuck` exits 1 when it could not read
1214
+ every thread. Exit 0 means the scan was complete, not that the instance is
1215
+ healthy: read the returned threads to see whether any are stuck. `diag tail`
1216
+ exits 1 when the stream closes abnormally.
1217
+
1207
1218
  ### Interpretation guide
1208
1219
 
1209
1220
  - `diag instance` → `builder version` answers "is the fix deployed?" without
@@ -1234,7 +1245,7 @@ All three are gated by the `logs` permission on hosted deployments.
1234
1245
 
1235
1246
  ## After a push
1236
1247
 
1237
- A project on Standard Agents hosting deploys from git: the platform builds each pushed commit. A push that git accepts is not a deploy, and the build can fail after the push. Check every push with the CLI. The commands use the project key in `.dev.vars`, or the account sign-in from `agents login`; `agents rollback` and `agents redeploy` need that sign-in. Each command accepts `--json` and never prompts.
1248
+ A project on Standard Agents hosting deploys from git: the platform builds each pushed commit. A push that git accepts is not a deploy, and the build can fail after the push. Check every push with the CLI. The commands use the project key in `.dev.vars`, or the account sign-in from `npx @standardagents/cli@latest login`, which is saved once for the machine; `agents rollback` and `agents redeploy` need that sign-in. Each command accepts `--json` and never prompts.
1238
1249
 
1239
1250
  ```bash
1240
1251
  agents deploy # push, then follow the build; exits 0 only when the commit was deployed
@@ -1260,8 +1271,8 @@ Without a global install, use `npx @standardagents/cli@latest <command>`.
1260
1271
  | 0 | Done. For a wait: the commit was deployed. | None. |
1261
1272
  | 1 | The build failed, or the platform refused the request. | Read `agents builds logs`. |
1262
1273
  | 2 | The command line, the checkout, or the named build is not usable. | Read the message. |
1263
- | 3 | Not signed in, or the command needs an account sign-in. | Ask the user to run `agents login`. |
1264
- | 4 | The platform needs the terms accepted before it builds. | Ask the user to run `npx @standardagents/cli terms accept`. It starts the refused build after the acceptance; `npx @standardagents/cli builds retry` starts it later. |
1274
+ | 3 | Not signed in, or the command needs an account sign-in. | Ask the user to run `npx @standardagents/cli@latest login`. |
1275
+ | 4 | The platform needs the terms accepted before it builds. | Ask the user to run `npx @standardagents/cli@latest terms accept`. It starts the refused build after the acceptance; `npx @standardagents/cli@latest builds retry` starts it later. |
1265
1276
  | 5 | The time limit passed while the build was still in progress. | Run `agents builds status --wait` again, or raise `--timeout <seconds>`. |
1266
1277
 
1267
1278
  Only a person can sign in or accept the terms. Do not try to do either for the user.
@@ -1275,16 +1286,15 @@ When you edit `agents/`, `prompts/`, `handlers/`, `models/`, `tools/`, `hooks/`,
1275
1286
  Validation order:
1276
1287
 
1277
1288
  1. Read `package.json` and prefer project scripts if they exist.
1278
- 2. Refresh Cloudflare types:
1279
- - use `pnpm cf-typegen` if that script exists
1280
- - otherwise run `npx wrangler types`
1281
- 3. Regenerate Standard Agents Builder types by starting the dev server:
1289
+ 2. Generate the project's types by starting the dev server. This is the only type-generation command:
1282
1290
  - usually `pnpm dev`, `npm run dev`, or equivalent
1291
+ - the dev server writes `.agents/types.d.ts` and `.agents/virtual-module.d.ts` when it starts, and again after each change under `agents/`; the type checker fails while they are missing
1292
+ - do not run `wrangler types`: a generated project has no Wrangler config, because the `builder()` plugin generates the Cloudflare configuration
1283
1293
  - do not run the `build` script of a generated project; it stops with a message on purpose, because builds run on the Standard Agents platform
1284
- 4. Run the project's type checker:
1285
- - prefer `pnpm type-check` / `npm run type-check` if present
1294
+ 3. Run the project's type checker:
1295
+ - prefer the project's script: `pnpm typecheck` / `npm run typecheck` in a generated project, or `type-check` if that is the script name
1286
1296
  - otherwise use the installed checker directly: `pnpm exec vue-tsc --build`, `pnpm exec tsc -b`, or `pnpm exec tsc --noEmit`
1287
- 5. If any validation step cannot run, state exactly what is missing.
1297
+ 4. If any validation step cannot run, state exactly what is missing.
1288
1298
 
1289
1299
  ## Hosting
1290
1300