@standardagents/skill 0.25.7 → 0.26.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.25.7",
3
+ "version": "0.26.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -858,6 +858,63 @@ Undeclared thread-only env keys are treated as write-only secrets when scanned f
858
858
 
859
859
  ---
860
860
 
861
+ ## Production diagnostics & stuck threads
862
+
863
+ A thread that shows "working" forever has a precise signature: a request log
864
+ row stuck at `is_complete = 0`. The UI's Live badge reads that durable row; the
865
+ `isExecuting` flag is volatile and resets on every Durable Object restart, so
866
+ "Live badge on + executor actually dead" is the classic lost-execution state.
867
+ Since builder 0.26.0 every executing thread is monitored by a per-thread
868
+ watchdog companion (`ThreadWatchdog` DO) that probes it every 30s and
869
+ finalizes/resumes lost executions automatically — but when you need to see or
870
+ intervene, use the sanctioned tools below. Never guess from the UI alone, and
871
+ never reach for the raw `/rpc` passthrough first.
872
+
873
+ ### `agents diag` (CLI)
874
+
875
+ All subcommands accept `--endpoint <instance-url>` and `--token <api-key>`
876
+ (defaults: `$STANDARD_AGENTS_INSTANCE_URL` / `$STANDARD_AGENTS_INSTANCE_TOKEN`,
877
+ falling back to `http://localhost:5173` for local dev). The token must belong
878
+ to a user with the `logs` permission (admin keys qualify; customer `api`-role
879
+ keys do not).
880
+
881
+ ```bash
882
+ agents diag instance # deployed builder version, watchdog budgets, warnings
883
+ agents diag threads --stuck # scan recent threads for unrecovered open requests
884
+ agents diag thread 050d96f1 # doctor view (short id prefixes resolve)
885
+ agents diag logs 050d96f1 # recent request logs; add a logId for full detail
886
+ agents diag tail 050d96f1 # live-tail the log stream — are bytes flowing?
887
+ agents diag revive 050d96f1 # run a watchdog check NOW: finalize + resume
888
+ ```
889
+
890
+ ### Interpretation guide
891
+
892
+ - `diag instance` → `builder version` answers "is the fix deployed?" without
893
+ forensics. `watchdog companion: NOT BOUND` means the deployment predates the
894
+ 0.26 config — rebuild/redeploy to get the binding and migration.
895
+ - `diag thread` → the alarm-queue section is the ground truth the 2026-07-08
896
+ incident could not see: a turn item stuck `processing` means an execution
897
+ died mid-item; NO pending `watchdogCheck` row plus an open request log means
898
+ the thread has no internal recovery scheduled (the companion covers this).
899
+ - An open request past the watchdog ceiling (~3 minutes by default) with
900
+ `executing: false` is dead, full stop. `diag revive` finalizes it as
901
+ `execution_lost` and auto-resumes within the resume budget (2 per 15 min).
902
+ - Revive is safe on healthy threads: the assessment re-reads state before
903
+ acting, so a live execution always wins.
904
+ - The same data drives the UI: Thread Settings → Watchdog card shows the
905
+ companion's last check-ins and has a "Run check now" button (= revive).
906
+
907
+ ### HTTP equivalents (for scripts)
908
+
909
+ - `GET /api/diagnostics` → `{ warnings, runtime: { builderVersion, … } }`
910
+ - `GET /api/threads/:id/diagnostics` → execution flags, open logs, alarm queue,
911
+ message-queue depth, watchdog history
912
+ - `POST /api/threads/:id/revive` → one watchdog assessment, acted on, returned
913
+
914
+ All three are gated by the `logs` permission on hosted deployments.
915
+
916
+ ---
917
+
861
918
  ## Implementation checking
862
919
 
863
920
  When you edit `agents/`, `prompts/`, `models/`, `tools/`, `hooks/`, or `worker/`, validate before claiming the change is done.