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.
- package/CHANGELOG.md +27 -0
- package/README.md +6 -4
- package/dist/bootstrap-from-env.d.ts.map +1 -1
- package/dist/bootstrap-from-env.js +12 -0
- package/dist/bootstrap-from-env.js.map +1 -1
- package/dist/bootstrap.d.ts +19 -0
- package/dist/bootstrap.d.ts.map +1 -1
- package/dist/bootstrap.js +24 -0
- package/dist/bootstrap.js.map +1 -1
- package/dist/cli.js +6 -0
- package/dist/cli.js.map +1 -1
- package/dist/composition.d.ts +4 -0
- package/dist/composition.d.ts.map +1 -1
- package/dist/composition.js +12 -0
- package/dist/composition.js.map +1 -1
- package/dist/connectors/registry.d.ts.map +1 -1
- package/dist/connectors/registry.js +11 -0
- package/dist/connectors/registry.js.map +1 -1
- package/dist/connectors/types.d.ts +36 -0
- package/dist/connectors/types.d.ts.map +1 -1
- package/dist/connectors/types.js.map +1 -1
- package/dist/dashboard/spa/app.js +53 -12
- package/dist/errors.d.ts +64 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +60 -0
- package/dist/errors.js.map +1 -1
- package/dist/help-content.d.ts +1 -1
- package/dist/help-content.d.ts.map +1 -1
- package/dist/help-content.js +5 -1
- package/dist/help-content.js.map +1 -1
- package/dist/lint.d.ts.map +1 -1
- package/dist/lint.js +38 -0
- package/dist/lint.js.map +1 -1
- package/dist/mcp-server.d.ts +15 -0
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/mcp-server.js +17 -1
- package/dist/mcp-server.js.map +1 -1
- package/dist/metrics.d.ts +10 -0
- package/dist/metrics.d.ts.map +1 -1
- package/dist/metrics.js +10 -0
- package/dist/metrics.js.map +1 -1
- package/dist/parser.d.ts +11 -0
- package/dist/parser.d.ts.map +1 -1
- package/dist/parser.js +17 -0
- package/dist/parser.js.map +1 -1
- package/dist/runtime-config.d.ts +16 -0
- package/dist/runtime-config.d.ts.map +1 -1
- package/dist/runtime-config.js +18 -0
- package/dist/runtime-config.js.map +1 -1
- package/dist/runtime-env-resolver.d.ts +6 -0
- package/dist/runtime-env-resolver.d.ts.map +1 -1
- package/dist/runtime-env-resolver.js +18 -0
- package/dist/runtime-env-resolver.js.map +1 -1
- package/dist/runtime.d.ts +86 -0
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +296 -73
- package/dist/runtime.js.map +1 -1
- package/dist/scheduler.d.ts +28 -0
- package/dist/scheduler.d.ts.map +1 -1
- package/dist/scheduler.js +113 -0
- package/dist/scheduler.js.map +1 -1
- package/dist/supervisor.d.ts +41 -0
- package/dist/supervisor.d.ts.map +1 -0
- package/dist/supervisor.js +124 -0
- package/dist/supervisor.js.map +1 -0
- package/dist/trace.d.ts +30 -2
- package/dist/trace.d.ts.map +1 -1
- package/dist/trace.js +9 -1
- package/dist/trace.js.map +1 -1
- package/docs/adopter-agent-guide.md +2 -0
- package/docs/adopter-playbook.md +43 -0
- package/docs/configuration.md +3 -0
- package/docs/language-reference.md +20 -1
- package/examples/skillscripts/classify-support-ticket.skill.provenance.json +1 -1
- package/examples/skillscripts/data-store-roundtrip.skill.provenance.json +1 -1
- package/examples/skillscripts/doc-qa-with-citations.skill.provenance.json +1 -1
- package/examples/skillscripts/feedback-sentiment-scan.skill.provenance.json +1 -1
- package/examples/skillscripts/hello-world.skill.provenance.json +1 -1
- package/examples/skillscripts/morning-brief.skill.provenance.json +1 -1
- package/examples/skillscripts/queue-length-monitor.skill.provenance.json +1 -1
- package/examples/skillscripts/service-health-watch.skill.provenance.json +1 -1
- package/examples/skillscripts/skill-store-roundtrip.skill.provenance.json +1 -1
- package/examples/skillscripts/supervisor-notify.skill.md +20 -0
- package/examples/skillscripts/supervisor-notify.skill.provenance.json +10 -0
- package/examples/skillscripts/youtrack-morning-sweep.skill.provenance.json +1 -1
- package/package.json +1 -1
- package/scaffold/.env.example +30 -0
|
@@ -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.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skillscript-runtime",
|
|
3
|
-
"version": "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>",
|
package/scaffold/.env.example
CHANGED
|
@@ -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
|