skillscript-runtime 0.34.0 → 0.36.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.
Files changed (87) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +6 -4
  3. package/dist/bootstrap-from-env.d.ts.map +1 -1
  4. package/dist/bootstrap-from-env.js +12 -0
  5. package/dist/bootstrap-from-env.js.map +1 -1
  6. package/dist/bootstrap.d.ts +19 -0
  7. package/dist/bootstrap.d.ts.map +1 -1
  8. package/dist/bootstrap.js +24 -0
  9. package/dist/bootstrap.js.map +1 -1
  10. package/dist/cli.js +6 -0
  11. package/dist/cli.js.map +1 -1
  12. package/dist/composition.d.ts +4 -0
  13. package/dist/composition.d.ts.map +1 -1
  14. package/dist/composition.js +12 -0
  15. package/dist/composition.js.map +1 -1
  16. package/dist/connectors/registry.d.ts.map +1 -1
  17. package/dist/connectors/registry.js +11 -0
  18. package/dist/connectors/registry.js.map +1 -1
  19. package/dist/connectors/types.d.ts +36 -0
  20. package/dist/connectors/types.d.ts.map +1 -1
  21. package/dist/connectors/types.js.map +1 -1
  22. package/dist/dashboard/spa/app.js +53 -12
  23. package/dist/errors.d.ts +64 -0
  24. package/dist/errors.d.ts.map +1 -1
  25. package/dist/errors.js +60 -0
  26. package/dist/errors.js.map +1 -1
  27. package/dist/help-content.d.ts +1 -1
  28. package/dist/help-content.d.ts.map +1 -1
  29. package/dist/help-content.js +5 -1
  30. package/dist/help-content.js.map +1 -1
  31. package/dist/lint.d.ts.map +1 -1
  32. package/dist/lint.js +38 -0
  33. package/dist/lint.js.map +1 -1
  34. package/dist/mcp-server.d.ts +15 -0
  35. package/dist/mcp-server.d.ts.map +1 -1
  36. package/dist/mcp-server.js +17 -1
  37. package/dist/mcp-server.js.map +1 -1
  38. package/dist/metrics.d.ts +10 -0
  39. package/dist/metrics.d.ts.map +1 -1
  40. package/dist/metrics.js +10 -0
  41. package/dist/metrics.js.map +1 -1
  42. package/dist/parser.d.ts +11 -0
  43. package/dist/parser.d.ts.map +1 -1
  44. package/dist/parser.js +17 -0
  45. package/dist/parser.js.map +1 -1
  46. package/dist/runtime-config.d.ts +16 -0
  47. package/dist/runtime-config.d.ts.map +1 -1
  48. package/dist/runtime-config.js +18 -0
  49. package/dist/runtime-config.js.map +1 -1
  50. package/dist/runtime-env-resolver.d.ts +6 -0
  51. package/dist/runtime-env-resolver.d.ts.map +1 -1
  52. package/dist/runtime-env-resolver.js +18 -0
  53. package/dist/runtime-env-resolver.js.map +1 -1
  54. package/dist/runtime.d.ts +86 -0
  55. package/dist/runtime.d.ts.map +1 -1
  56. package/dist/runtime.js +296 -73
  57. package/dist/runtime.js.map +1 -1
  58. package/dist/scheduler.d.ts +28 -0
  59. package/dist/scheduler.d.ts.map +1 -1
  60. package/dist/scheduler.js +113 -0
  61. package/dist/scheduler.js.map +1 -1
  62. package/dist/supervisor.d.ts +41 -0
  63. package/dist/supervisor.d.ts.map +1 -0
  64. package/dist/supervisor.js +124 -0
  65. package/dist/supervisor.js.map +1 -0
  66. package/dist/trace.d.ts +30 -2
  67. package/dist/trace.d.ts.map +1 -1
  68. package/dist/trace.js +9 -1
  69. package/dist/trace.js.map +1 -1
  70. package/docs/adopter-agent-guide.md +2 -0
  71. package/docs/adopter-playbook.md +43 -0
  72. package/docs/configuration.md +3 -0
  73. package/docs/language-reference.md +20 -1
  74. package/examples/skillscripts/classify-support-ticket.skill.provenance.json +1 -1
  75. package/examples/skillscripts/data-store-roundtrip.skill.provenance.json +1 -1
  76. package/examples/skillscripts/doc-qa-with-citations.skill.provenance.json +1 -1
  77. package/examples/skillscripts/feedback-sentiment-scan.skill.provenance.json +1 -1
  78. package/examples/skillscripts/hello-world.skill.provenance.json +1 -1
  79. package/examples/skillscripts/morning-brief.skill.provenance.json +1 -1
  80. package/examples/skillscripts/queue-length-monitor.skill.provenance.json +1 -1
  81. package/examples/skillscripts/service-health-watch.skill.provenance.json +1 -1
  82. package/examples/skillscripts/skill-store-roundtrip.skill.provenance.json +1 -1
  83. package/examples/skillscripts/supervisor-notify.skill.md +20 -0
  84. package/examples/skillscripts/supervisor-notify.skill.provenance.json +10 -0
  85. package/examples/skillscripts/youtrack-morning-sweep.skill.provenance.json +1 -1
  86. package/package.json +1 -1
  87. package/scaffold/.env.example +30 -0
@@ -2,7 +2,7 @@
2
2
  "provenance_version": "1.0",
3
3
  "language_version": "1.0",
4
4
  "compiler_version": "0.1.0-dev",
5
- "compiled_at": "2026-07-16T23:02:43.732Z",
5
+ "compiled_at": "2026-07-18T22:19:17.823Z",
6
6
  "source_skill": {
7
7
  "name": "morning-brief"
8
8
  },
@@ -2,7 +2,7 @@
2
2
  "provenance_version": "1.0",
3
3
  "language_version": "1.0",
4
4
  "compiler_version": "0.1.0-dev",
5
- "compiled_at": "2026-07-16T23:02:43.927Z",
5
+ "compiled_at": "2026-07-18T22:19:17.965Z",
6
6
  "source_skill": {
7
7
  "name": "queue-length-monitor"
8
8
  },
@@ -2,7 +2,7 @@
2
2
  "provenance_version": "1.0",
3
3
  "language_version": "1.0",
4
4
  "compiler_version": "0.1.0-dev",
5
- "compiled_at": "2026-07-16T23:02:44.128Z",
5
+ "compiled_at": "2026-07-18T22:19:18.095Z",
6
6
  "source_skill": {
7
7
  "name": "service-health-watch"
8
8
  },
@@ -2,7 +2,7 @@
2
2
  "provenance_version": "1.0",
3
3
  "language_version": "1.0",
4
4
  "compiler_version": "0.1.0-dev",
5
- "compiled_at": "2026-07-16T23:02:44.357Z",
5
+ "compiled_at": "2026-07-18T22:19:18.214Z",
6
6
  "source_skill": {
7
7
  "name": "skill-store-roundtrip"
8
8
  },
@@ -0,0 +1,20 @@
1
+ # Skill: supervisor-notify
2
+ # Status: Draft
3
+ # Description: Example failure-supervisor handler. When SKILLSCRIPT_SUPERVISOR_SKILL points at a skill like this one, the scheduler's trace-sweeper routes every NON-CLEAN autonomous fire (errored / deadline-exceeded / uncertain-effects) to it, with the failure details as vars. Copy it, adapt the DELIVERY to your channel, and APPROVE it — it lands Draft, a human approves it (that IS the governed-skill story). This version delivers to ${SUPERVISOR_AGENT} via `# Output: agent:`; for email / Slack / a webhook, replace the `# Output:` line with a `run:` block that dispatches a `$ connector.tool` or `shell(command="curl ...")`. NOTE: if THIS handler itself fails, the runtime does NOT re-route it (loop guard) — it logs to stderr only. Keep it simple and its delivery reliable.
4
+ # Autonomous: true
5
+ # Tags: supervisor, observability, ops
6
+ # Vars: FAILED_SKILL=unknown, OUTCOME=unknown, TRACE_ID=none, TRIGGER=none, ERROR_SUMMARY=, UNCERTAIN_EFFECTS=, DEADLINE_EXCEEDED=false, FIRED_AT_MS=0, SUPERVISOR_AGENT=ops-oncall
7
+ # Output: agent: ${SUPERVISOR_AGENT}
8
+
9
+ ⚠ An autonomous fire needs attention.
10
+
11
+ Skill: ${FAILED_SKILL}
12
+ Outcome: ${OUTCOME}
13
+ Trigger: ${TRIGGER}
14
+ Trace: ${TRACE_ID} (full detail: fires({trace_id: "${TRACE_ID}"}))
15
+
16
+ Errors: ${ERROR_SUMMARY}
17
+ Uncertain effects: ${UNCERTAIN_EFFECTS}
18
+
19
+ If "Uncertain effects" is non-empty, an external mutation was issued but its outcome is
20
+ UNKNOWN — it may have partially landed. Reconcile it by hand; the runtime never retried it.
@@ -0,0 +1,10 @@
1
+ {
2
+ "provenance_version": "1.0",
3
+ "language_version": "1.0",
4
+ "compiler_version": "0.1.0-dev",
5
+ "compiled_at": "2026-07-18T22:19:18.326Z",
6
+ "source_skill": {
7
+ "name": "supervisor-notify"
8
+ },
9
+ "data_skills_inlined": []
10
+ }
@@ -2,7 +2,7 @@
2
2
  "provenance_version": "1.0",
3
3
  "language_version": "1.0",
4
4
  "compiler_version": "0.1.0-dev",
5
- "compiled_at": "2026-07-16T23:02:44.568Z",
5
+ "compiled_at": "2026-07-18T22:19:18.483Z",
6
6
  "source_skill": {
7
7
  "name": "youtrack-morning-sweep"
8
8
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skillscript-runtime",
3
- "version": "0.34.0",
3
+ "version": "0.36.0",
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>",
@@ -101,11 +101,41 @@
101
101
  # default applies. Default 300000 (5 min).
102
102
  # SKILLSCRIPT_ABSOLUTE_TIMEOUT_MS=300000
103
103
 
104
+ # Operator run-deadline CEILING, seconds — a hard maximum on EVERY run
105
+ # (execute_skill + trigger-fired), enforced even when a skill declares no
106
+ # `# Deadline:`. A skill's own `# Deadline:` can only make its bound tighter,
107
+ # never exceed this. The guard against an untrusted (agent) skill author evading
108
+ # the time bound. Unset = no ceiling (a skill without `# Deadline:` is unbounded).
109
+ # Set it to your deployment's tolerance — e.g. a latency-sensitive / robotic host
110
+ # wants a small value so no run (or motion) can hang.
111
+ # SKILLSCRIPT_MAX_DEADLINE_SECONDS=120
112
+
104
113
  # Max composition depth before the runtime throws. Default 10. Raise for
105
114
  # deeply-composing skill suites.
106
115
  # SKILLSCRIPT_MAX_RECURSION_DEPTH=10
107
116
 
108
117
 
118
+ # ─── Autonomous-fire failure supervision ──────────────────────────────
119
+ #
120
+ # A cron/event-fired skill has no caller watching it — a 3am fire that errored,
121
+ # or a run cut mid-effect leaving a mutation "outcome uncertain," is invisible
122
+ # unless you go query the trace. Configure a supervisor and the scheduler's
123
+ # trace-sweeper PUSHES those failures to an approved handler skill (which you
124
+ # write — mechanism is a script) so you actually get notified.
125
+ #
126
+ # SKILLSCRIPT_SUPERVISOR_SKILL alone turns the feature ON. When set, autonomous-
127
+ # fire tracing MUST be on (the sweeper reads the durable trace) — the runtime
128
+ # hard-refuses at boot otherwise. Copy the example handler from examples/ and
129
+ # approve it. The handler decides HOW to notify (email, Slack, agent, a webhook)
130
+ # — that's your script, not the runtime's concern.
131
+ # SKILLSCRIPT_SUPERVISOR_SKILL=supervisor-notify
132
+ #
133
+ # OPTIONAL. An agent id passed to the handler as ${SUPERVISOR_AGENT}, for a
134
+ # handler that routes to an agent. Leave unset for an email-/webhook-only handler
135
+ # — no agent is required.
136
+ # SKILLSCRIPT_SUPERVISOR_AGENT=ops-oncall
137
+
138
+
109
139
  # ─── Identity propagation (multi-agent hosts only) ─────────────────────
110
140
 
111
141
  # HTTP header carrying host-attested caller identity; captured as a skill's