skillscript-runtime 0.19.11 → 0.19.13
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/dist/help-content.d.ts.map +1 -1
- package/dist/help-content.js +11 -0
- package/dist/help-content.js.map +1 -1
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/mcp-server.js +22 -9
- package/dist/mcp-server.js.map +1 -1
- package/dist/parser.d.ts +0 -1
- package/dist/parser.d.ts.map +1 -1
- package/dist/parser.js +0 -4
- package/dist/parser.js.map +1 -1
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +89 -31
- package/dist/runtime.js.map +1 -1
- package/docs/adopter-playbook.md +100 -45
- package/docs/language-reference.md +56 -22
- package/examples/skillscripts/classify-support-ticket.skill.md +4 -4
- package/examples/skillscripts/feedback-sentiment-scan.skill.md +9 -20
- package/examples/skillscripts/hello-world.skill.provenance.json +1 -1
- package/examples/skillscripts/morning-brief.skill.md +4 -4
- package/examples/skillscripts/queue-length-monitor.skill.md +2 -2
- package/examples/skillscripts/service-health-watch.skill.md +2 -2
- package/package.json +1 -1
|
@@ -1,29 +1,18 @@
|
|
|
1
1
|
# Skill: feedback-sentiment-scan
|
|
2
|
-
# Status: Approved v1:
|
|
3
|
-
#
|
|
4
|
-
# Description: Each night, scan the previous 24h of customer feedback records, classify sentiment via local model, surface entries where sentiment is "frustrated" or "blocking" so the team sees them at start-of-day; skip entries already seen on prior nights
|
|
2
|
+
# Status: Approved v1:2b4868c1
|
|
3
|
+
# Description: Each night, scan the previous 24h of customer feedback records, classify sentiment via the local model, and surface entries that read 'frustrated' or 'blocking' so the team sees them at start-of-day.
|
|
5
4
|
# Triggers: cron: 0 3 * * *
|
|
6
5
|
# Vars: SCAN_LIMIT=50
|
|
7
6
|
# Output: agent: support-lead
|
|
8
7
|
|
|
9
|
-
|
|
8
|
+
scan:
|
|
10
9
|
$ data_read mode=fts query="customer feedback" limit=${SCAN_LIMIT} -> FEEDBACK
|
|
11
|
-
|
|
12
|
-
fetch_seen:
|
|
13
|
-
$ data_read mode=fts query="sentiment-scan seen marker" limit=200 domain_tags=["sentiment-scan-seen"] -> SEEN_MARKERS
|
|
14
|
-
|
|
15
|
-
classify_and_emit:
|
|
16
|
-
needs: fetch_new, fetch_seen
|
|
17
10
|
emit(text="Sentiment scan results for ${NOW}:")
|
|
18
11
|
foreach F in ${FEEDBACK.items}:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
emit(text="- FRUSTRATED [${F.id|trim}] ${F.summary}")
|
|
25
|
-
elif ${VERDICT|trim} == "blocking":
|
|
26
|
-
emit(text="- BLOCKING [${F.id|trim}] ${F.summary}")
|
|
27
|
-
$ data_write content="sentiment-scan seen ${F.id|trim} verdict=${VERDICT|trim} on ${EVENT.fired_at_unix}" tags=["sentiment-scan-seen"] expires_at=${EVENT.fired_at_plus_7d_unix} -> ACK
|
|
12
|
+
$ llm prompt="Classify the sentiment of this customer feedback. Respond with ONE word: 'frustrated', 'blocking', 'satisfied', 'neutral'. No explanation.\n\nFeedback: ${F.summary}\nDetail: ${F.detail}" maxTokens=10 -> VERDICT
|
|
13
|
+
if ${VERDICT|contains:"frustrated"}:
|
|
14
|
+
emit(text="- FRUSTRATED [${F.id|trim}] ${F.summary}")
|
|
15
|
+
elif ${VERDICT|contains:"blocking"}:
|
|
16
|
+
emit(text="- BLOCKING [${F.id|trim}] ${F.summary}")
|
|
28
17
|
|
|
29
|
-
default:
|
|
18
|
+
default: scan
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Skill: morning-brief
|
|
2
|
-
# Status: Approved v1:
|
|
3
|
-
# Description: Compose a daily morning brief from calendar, mailbox, and overnight
|
|
2
|
+
# Status: Approved v1:1530981d
|
|
3
|
+
# Description: Compose a daily morning brief from calendar, mailbox, and overnight notes when the cron trigger fires at 7am. Delivers via the agent: lifecycle hook to the receiving agent, who decides whether to surface to Slack / Discord / etc. Requires a `calendar` connector configured in connectors.json (the dotted `$ calendar.*` form). `model=qwen` is a representative LocalModel alias — adopters register one under whatever name fits (the bundled bootstrap registers `default`).
|
|
4
4
|
# Vars: AGENT, BRIEF_HORIZON_HOURS=24
|
|
5
5
|
# Triggers: cron: 0 7 * * *
|
|
6
6
|
# OnError: morning-brief-degraded
|
|
@@ -12,10 +12,10 @@ calendar:
|
|
|
12
12
|
$ calendar.list_events horizon_hours=${BRIEF_HORIZON_HOURS} -> EVENTS
|
|
13
13
|
|
|
14
14
|
mailbox:
|
|
15
|
-
$ data_read mode=fts query="
|
|
15
|
+
$ data_read mode=fts query="messages for ${AGENT}" limit=10 -> MAIL
|
|
16
16
|
|
|
17
17
|
overnight:
|
|
18
|
-
$ data_read mode=rerank query="overnight writes
|
|
18
|
+
$ data_read mode=rerank query="overnight notes and writes" limit=15 -> NOTES
|
|
19
19
|
|
|
20
20
|
compose: needs: calendar, mailbox, overnight
|
|
21
21
|
$ llm prompt="Compose a concise morning brief. Calendar: ${EVENTS|json}. Mailbox: ${MAIL|json}. Overnight notes: ${NOTES|json}. Three sections, six bullets max each." model=qwen maxTokens=1200 -> BRIEF
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Skill: queue-length-monitor
|
|
2
|
-
#
|
|
3
|
-
#
|
|
2
|
+
# Status: Approved v1:c6bc06df
|
|
3
|
+
# Description: Count pending items in a queue and alert when the count exceeds threshold. Requires `cat` on the operator's shell allowlist (default-deny: a non-allowlisted binary is refused).
|
|
4
4
|
# Vars: QUEUE_PATH=/var/queue/pending.json, THRESHOLD=10
|
|
5
5
|
# Triggers: cron: */5 * * * *
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Skill: service-health-watch
|
|
2
|
-
# Status: Approved v1:
|
|
2
|
+
# Status: Approved v1:5378fb77
|
|
3
3
|
# Autonomous: true
|
|
4
|
-
# Description: Every 5 minutes check named service endpoints — if latency or status degrades, write a signal record and alert
|
|
4
|
+
# Description: Every 5 minutes check named service endpoints — if latency or status degrades, write a signal record and alert. Requires `curl` on the operator's shell allowlist (default-deny: a non-allowlisted binary is refused).
|
|
5
5
|
# Vars: SERVICES=[auth-api, ledger-api, search-api], LATENCY_BUDGET_MS=400
|
|
6
6
|
# Triggers: cron: */5 * * * *
|
|
7
7
|
# Output: none
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skillscript-runtime",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.13",
|
|
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>",
|