skillscript-runtime 0.22.0 → 0.23.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 +22 -0
- package/README.md +36 -26
- package/dist/connectors/http-mcp.d.ts +9 -1
- package/dist/connectors/http-mcp.d.ts.map +1 -1
- package/dist/connectors/http-mcp.js +26 -5
- package/dist/connectors/http-mcp.js.map +1 -1
- package/dist/connectors/mcp-remote.d.ts +10 -1
- package/dist/connectors/mcp-remote.d.ts.map +1 -1
- package/dist/connectors/mcp-remote.js +23 -3
- package/dist/connectors/mcp-remote.js.map +1 -1
- package/dist/connectors/types.d.ts +21 -0
- package/dist/connectors/types.d.ts.map +1 -1
- package/dist/connectors/types.js.map +1 -1
- package/dist/dashboard/spa/app.js +5 -4
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +20 -14
- package/dist/errors.js.map +1 -1
- package/dist/lint.d.ts +17 -1
- package/dist/lint.d.ts.map +1 -1
- package/dist/lint.js +168 -1
- package/dist/lint.js.map +1 -1
- package/dist/mcp-server.d.ts +7 -0
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/mcp-server.js +86 -2
- package/dist/mcp-server.js.map +1 -1
- package/dist/observed-shape.d.ts +36 -0
- package/dist/observed-shape.d.ts.map +1 -0
- package/dist/observed-shape.js +67 -0
- package/dist/observed-shape.js.map +1 -0
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +29 -0
- package/dist/runtime.js.map +1 -1
- package/dist/skill-surface.d.ts +12 -0
- package/dist/skill-surface.d.ts.map +1 -1
- package/dist/skill-surface.js +22 -0
- package/dist/skill-surface.js.map +1 -1
- package/dist/trace.d.ts +28 -0
- package/dist/trace.d.ts.map +1 -1
- package/dist/trace.js +56 -3
- package/dist/trace.js.map +1 -1
- package/docs/adopter-playbook.md +10 -0
- package/examples/skillscripts/hello-world.skill.provenance.json +1 -1
- package/package.json +1 -1
- package/scaffold/.env.example +55 -133
package/scaffold/.env.example
CHANGED
|
@@ -1,196 +1,119 @@
|
|
|
1
1
|
# Skillscript runtime — example .env file.
|
|
2
2
|
#
|
|
3
|
-
# Copy this to `.env` in
|
|
4
|
-
#
|
|
5
|
-
# populates `process.env` for any key not already set in the shell.
|
|
6
|
-
#
|
|
3
|
+
# Copy this to `.env` in $SKILLSCRIPT_HOME and uncomment the lines you want.
|
|
4
|
+
# The CLI auto-loads `.env` at startup for any key not already set in the shell.
|
|
7
5
|
# Precedence (most-specific wins):
|
|
8
|
-
#
|
|
9
|
-
# 2. Shell env var (e.g. `export SKILLSCRIPT_PORT=8080`)
|
|
10
|
-
# 3. This `.env` (the values you set below)
|
|
11
|
-
# 4. `skillscript.config.json` field
|
|
12
|
-
# 5. Built-in default
|
|
6
|
+
# CLI flag > shell env var > this .env > skillscript.config.json > default
|
|
13
7
|
#
|
|
14
|
-
#
|
|
15
|
-
#
|
|
8
|
+
# This file says what each setting does. The security reasoning behind the
|
|
9
|
+
# boundaries lives in docs/adopter-playbook.md.
|
|
16
10
|
|
|
17
11
|
|
|
18
12
|
# ─── Approval boundary (secured mode) ──────────────────────────────────
|
|
19
13
|
|
|
20
|
-
#
|
|
21
|
-
#
|
|
22
|
-
#
|
|
23
|
-
# (CLI, cron, /event, MCP, composition). Default OFF — the unkeyed
|
|
24
|
-
# convenience posture, where a bare `# Status: Approved` runs. Turn ON for
|
|
25
|
-
# any multi-author or networked deployment.
|
|
14
|
+
# Require a key-signed approval before a skill can run any effectful op
|
|
15
|
+
# ($ / shell / file_* / notify). Default OFF — a bare `# Status: Approved`
|
|
16
|
+
# runs. Turn ON for any multi-author or networked deployment.
|
|
26
17
|
# SKILLSCRIPT_SECURED_MODE=true
|
|
27
18
|
|
|
28
|
-
#
|
|
29
|
-
# auto-provisions one if the
|
|
30
|
-
#
|
|
31
|
-
#
|
|
32
|
-
# the deployment ONLY the public key (set the pub path, leave the private
|
|
33
|
-
# off-box), and sign operator-side — the runtime verifies with the public
|
|
34
|
-
# key and never needs the private one.
|
|
19
|
+
# Paths to the operator's Ed25519 approval keypair. In secured mode the runtime
|
|
20
|
+
# auto-provisions one on first run if the public key is missing. Hardened setup:
|
|
21
|
+
# give the box only the public key and sign operator-side. Defaults live outside
|
|
22
|
+
# SKILLSCRIPT_HOME.
|
|
35
23
|
# SKILLSCRIPT_APPROVAL_KEY_FILE=~/.config/skillscript/approval.key
|
|
36
24
|
# SKILLSCRIPT_APPROVAL_PUBLIC_KEY_FILE=~/.config/skillscript/approval.pub
|
|
37
25
|
|
|
38
|
-
#
|
|
39
|
-
#
|
|
40
|
-
#
|
|
41
|
-
# escape. KEEP YOUR APPROVAL-KEY DIRECTORY OUT OF IT.
|
|
26
|
+
# Directory roots a skill may file_read / file_write under. Comma-separated
|
|
27
|
+
# absolute paths. Unset = every file op refused. Keep your approval-key
|
|
28
|
+
# directory OUT of this list.
|
|
42
29
|
# SKILLSCRIPT_FS_ALLOWLIST=/srv/skillscript/workspace,/var/skillscript/events
|
|
43
30
|
|
|
44
|
-
#
|
|
45
|
-
#
|
|
46
|
-
#
|
|
47
|
-
# unset = open (localhost bind is the only gate). NOT an agent-forgery boundary
|
|
48
|
-
# (the dashboard holds no signing key) — that remains key custody.
|
|
31
|
+
# Shared secret for the dashboard (SPA + /rpc) when binding beyond localhost.
|
|
32
|
+
# Pass via `?token=`, the `skillscript_dash` cookie, or `Authorization: Bearer`.
|
|
33
|
+
# Default unset = open (the localhost bind is the only gate).
|
|
49
34
|
# SKILLSCRIPT_DASHBOARD_AUTH_TOKEN=change-me-to-random-hex
|
|
50
35
|
|
|
51
|
-
#
|
|
52
|
-
# the
|
|
53
|
-
#
|
|
54
|
-
#
|
|
55
|
-
# the `skillfile approve` command, sign at a terminal). SECURITY: enabling this
|
|
56
|
-
# gives the dashboard process key access — run it operator-side, isolated from
|
|
57
|
-
# the agent (no network path to it; agent can't read this passcode).
|
|
36
|
+
# Enable click-to-Approve in the dashboard. Needs secured mode + a readable key;
|
|
37
|
+
# the approver enters this passcode once per browser session to unlock signing.
|
|
38
|
+
# Default unset = dashboard is review-only. Run the dashboard operator-side when
|
|
39
|
+
# enabling — it gets key access.
|
|
58
40
|
# SKILLSCRIPT_APPROVAL_PASSCODE=change-me
|
|
59
41
|
|
|
60
42
|
|
|
61
43
|
# ─── Posture / security switches ───────────────────────────────────────
|
|
62
44
|
|
|
63
|
-
#
|
|
64
|
-
#
|
|
65
|
-
# wanting a human approval gate before any skill executes set this true.
|
|
66
|
-
# Default false.
|
|
45
|
+
# Make every skill an agent writes land as Draft, so a human must approve it
|
|
46
|
+
# before it can run. Default false.
|
|
67
47
|
# SKILLSCRIPT_FORCE_ALWAYS_DRAFT=true
|
|
68
48
|
|
|
69
|
-
#
|
|
70
|
-
#
|
|
71
|
-
# every unsafe-shell op in your skill corpus — lint tier-2 warning fires
|
|
72
|
-
# on every appearance regardless.
|
|
49
|
+
# Allow shell(unsafe=true) — full bash (pipes, $VAR, command substitution).
|
|
50
|
+
# Default false. Audit your unsafe-shell ops before enabling.
|
|
73
51
|
# SKILLSCRIPT_ENABLE_UNSAFE_SHELL=true
|
|
74
52
|
|
|
75
|
-
#
|
|
76
|
-
#
|
|
77
|
-
#
|
|
78
|
-
# `shell(command="X ...")` body must appear in the list.
|
|
79
|
-
#
|
|
80
|
-
# Two independent axes — separate from SKILLSCRIPT_ENABLE_UNSAFE_SHELL:
|
|
81
|
-
# - this var controls WHICH binaries (binary scope)
|
|
82
|
-
# - enable_unsafe_shell controls WHETHER bash interpretation is permitted
|
|
83
|
-
# (syntax scope)
|
|
84
|
-
# Both must allow for a `shell(..., unsafe=true)` op to dispatch:
|
|
85
|
-
# on-list + safe syntax → runs
|
|
86
|
-
# on-list + pipeline/unsafe → runs iff ENABLE_UNSAFE_SHELL=true
|
|
87
|
-
# off-list → refused, period (no author keyword escapes this)
|
|
88
|
-
#
|
|
89
|
-
# For unsafe ops the runtime invokes `bash -c <body>` — the literal first
|
|
90
|
-
# token is `bash`. So permitting any unsafe shell at all requires `bash`
|
|
91
|
-
# on the allowlist in addition to ENABLE_UNSAFE_SHELL=true. Per-binary
|
|
92
|
-
# scope on unsafe-mode bodies is NOT supported at runtime (parse-based
|
|
93
|
-
# enumeration is unsound; OS-level execve/seccomp/restricted-PATH is the
|
|
94
|
-
# proper layer — see docs/adopter-playbook.md).
|
|
95
|
-
#
|
|
96
|
-
# Discovery: run `skillfile shell-audit` to scan your skill corpus and emit
|
|
97
|
-
# the current set of binaries used. Paste the suggested value here. Skills
|
|
98
|
-
# using shell() will refuse to run until this is configured.
|
|
53
|
+
# Binaries a skill may run via shell(). Comma-separated names; unset = no shell
|
|
54
|
+
# op runs at all. Run `skillfile shell-audit` to list what your skills use.
|
|
55
|
+
# (Permitting an unsafe shell op also needs `bash` here + the switch above.)
|
|
99
56
|
# SKILLSCRIPT_SHELL_ALLOWLIST=curl,git,jq,grep
|
|
100
57
|
|
|
101
58
|
|
|
102
59
|
# ─── Network / bind config ─────────────────────────────────────────────
|
|
103
60
|
|
|
104
|
-
#
|
|
105
|
-
#
|
|
106
|
-
# reach the listener.
|
|
61
|
+
# HTTP bind address. Default 127.0.0.1 (localhost-only). Set 0.0.0.0 for
|
|
62
|
+
# containers that port-forward from the host.
|
|
107
63
|
# SKILLSCRIPT_HOST=0.0.0.0
|
|
108
64
|
|
|
109
|
-
#
|
|
110
|
-
#
|
|
111
|
-
# one HTTP server — no separate event port).
|
|
112
|
-
# SKILLSCRIPT_PORT=8080
|
|
65
|
+
# HTTP port for the SPA, /rpc, and /event. Default 7878.
|
|
66
|
+
# SKILLSCRIPT_PORT=7878
|
|
113
67
|
|
|
114
68
|
|
|
115
|
-
# ─── Event-trigger HTTP ingress
|
|
69
|
+
# ─── Event-trigger HTTP ingress ────────────────────────────────────────
|
|
116
70
|
|
|
117
|
-
# Enable POST /event
|
|
118
|
-
#
|
|
119
|
-
#
|
|
120
|
-
# asynchronously, returning 200 + {run_id, durability: "in-process"}.
|
|
121
|
-
# The route mounts on SKILLSCRIPT_PORT (above); no separate port.
|
|
122
|
-
# Localhost-only by default — set SKILLSCRIPT_HOST=0.0.0.0 to expose
|
|
123
|
-
# beyond loopback. "Enforce the DMZ assumption by the bind, not by hope."
|
|
71
|
+
# Enable POST /event so external services can fire event-triggered skills.
|
|
72
|
+
# Default false (route returns 404). Mounts on SKILLSCRIPT_PORT; localhost-only
|
|
73
|
+
# unless SKILLSCRIPT_HOST is opened.
|
|
124
74
|
# SKILLSCRIPT_EVENT_INGRESS_ENABLED=true
|
|
125
75
|
|
|
126
|
-
#
|
|
127
|
-
#
|
|
128
|
-
# 401 otherwise. Default unset = open-internally (still gated by the
|
|
129
|
-
# bind address). Cheap to wire early — turning it on later is just an
|
|
130
|
-
# env edit + restart, no refactor.
|
|
76
|
+
# Require `Authorization: Bearer <token>` on every POST /event. Default unset =
|
|
77
|
+
# no token check (still gated by the bind address).
|
|
131
78
|
# SKILLSCRIPT_EVENT_INGRESS_AUTH_TOKEN=your-secret-token-here
|
|
132
79
|
|
|
133
80
|
|
|
134
81
|
# ─── Runtime tuning ────────────────────────────────────────────────────
|
|
135
82
|
|
|
136
|
-
# Scheduler tick
|
|
137
|
-
#
|
|
138
|
-
# wanting less CPU churn at the cost of cron-edge timing accuracy.
|
|
83
|
+
# Scheduler tick interval, seconds. Default 30. Lower for faster trigger pickup
|
|
84
|
+
# in tests; higher for less CPU churn.
|
|
139
85
|
# SKILLSCRIPT_POLL_INTERVAL_SECONDS=30
|
|
140
86
|
|
|
141
|
-
#
|
|
142
|
-
#
|
|
143
|
-
# 300000 (5 minutes). Adopters tightening prod cancellation windows or
|
|
144
|
-
# raising for skills doing legitimately-long work (large $ llm runs)
|
|
145
|
-
# set this. Operator-grade kill switch; per-skill `# Timeout: N` header
|
|
146
|
-
# is the author-grade knob for the same intent.
|
|
87
|
+
# Fallback run timeout, milliseconds, when no per-op / `# Timeout:` / connector
|
|
88
|
+
# default applies. Default 300000 (5 min).
|
|
147
89
|
# SKILLSCRIPT_ABSOLUTE_TIMEOUT_MS=300000
|
|
148
90
|
|
|
149
|
-
#
|
|
150
|
-
#
|
|
151
|
-
# inline-composition chain exceeds this. Adopters with deeply composing
|
|
152
|
-
# skill suites (chaining 8+ levels) bump this; tightening below the
|
|
153
|
-
# default is a guardrail signal that the skill suite is composing
|
|
154
|
-
# too deeply.
|
|
91
|
+
# Max composition depth before the runtime throws. Default 10. Raise for
|
|
92
|
+
# deeply-composing skill suites.
|
|
155
93
|
# SKILLSCRIPT_MAX_RECURSION_DEPTH=10
|
|
156
94
|
|
|
157
95
|
|
|
158
96
|
# ─── Identity propagation (multi-agent hosts only) ─────────────────────
|
|
159
97
|
|
|
160
|
-
#
|
|
161
|
-
#
|
|
162
|
-
# and threads the value as `McpRequestCtx.callerIdentity`; the
|
|
163
|
-
# `skill_write` handler captures it as `SkillMeta.author`. Multi-agent
|
|
164
|
-
# MCP hosts (NanoClaw-style) configure this. Skip if single-user /
|
|
165
|
-
# single-tenant — author is captured from the runtime's own writer
|
|
166
|
-
# identity by default. See adopter playbook for the trust model.
|
|
98
|
+
# HTTP header carrying host-attested caller identity; captured as a skill's
|
|
99
|
+
# author on skill_write. For multi-agent MCP hosts; skip if single-tenant.
|
|
167
100
|
# SKILLSCRIPT_MCP_CALLER_IDENTITY_HEADER=X-Agent-Id
|
|
168
101
|
|
|
169
102
|
|
|
170
103
|
# ─── LocalModel (Ollama) ───────────────────────────────────────────────
|
|
171
104
|
|
|
172
|
-
#
|
|
105
|
+
# Ollama endpoint. Default http://localhost:11434.
|
|
173
106
|
# OLLAMA_BASE_URL=http://ollama.internal:11434
|
|
174
107
|
|
|
175
108
|
|
|
176
109
|
# ─── Substrate-specific tokens / endpoints ─────────────────────────────
|
|
177
110
|
#
|
|
178
|
-
# Any
|
|
179
|
-
#
|
|
180
|
-
#
|
|
181
|
-
# in JSON configs (committed).
|
|
182
|
-
#
|
|
183
|
-
# Example wiring in connectors.json:
|
|
111
|
+
# Any var set here is also usable as `${VAR}` in skillscript.config.json and
|
|
112
|
+
# connectors.json — the adopter pattern is secrets in `.env` (gitignored),
|
|
113
|
+
# declarative shape in JSON (committed). Example connectors.json wiring:
|
|
184
114
|
#
|
|
185
|
-
# {
|
|
186
|
-
#
|
|
187
|
-
# "class": "HttpMcpConnector",
|
|
188
|
-
# "config": {
|
|
189
|
-
# "endpoint": "${AMP_ENDPOINT}",
|
|
190
|
-
# "headers": { "Authorization": "Bearer ${AMP_TOKEN}" }
|
|
191
|
-
# }
|
|
192
|
-
# }
|
|
193
|
-
# }
|
|
115
|
+
# "config": { "endpoint": "${AMP_ENDPOINT}",
|
|
116
|
+
# "headers": { "Authorization": "Bearer ${AMP_TOKEN}" } }
|
|
194
117
|
#
|
|
195
118
|
# AMP_ENDPOINT=https://amp.internal/rpc
|
|
196
119
|
# AMP_TOKEN=your-token-here
|
|
@@ -198,6 +121,5 @@
|
|
|
198
121
|
|
|
199
122
|
# ─── NOT settable via .env (chicken-and-egg) ───────────────────────────
|
|
200
123
|
#
|
|
201
|
-
# SKILLSCRIPT_HOME
|
|
202
|
-
#
|
|
203
|
-
# directive instead.
|
|
124
|
+
# SKILLSCRIPT_HOME is read BEFORE this file loads (we need it to find the file).
|
|
125
|
+
# Set it in your shell, Docker `-e`, or systemd Environment=.
|