skillscript-runtime 0.4.4 → 0.7.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.
@@ -5,36 +5,36 @@
5
5
  # Output: text
6
6
 
7
7
  last_tag:
8
- @ git describe --tags --abbrev=0 -> PREV_TAG
8
+ shell(command="git describe --tags --abbrev=0") -> PREV_TAG
9
9
  else:
10
10
  $set PREV_TAG = "(no prior tags)"
11
- ! no previous tag found; treating this as the first release
11
+ emit(text="no previous tag found; treating this as the first release")
12
12
 
13
13
  commits_since:
14
14
  needs: last_tag
15
- @ git log --oneline $(PREV_TAG)..HEAD -> COMMITS
15
+ shell(command="git log --oneline ${PREV_TAG}..HEAD") -> COMMITS
16
16
  else:
17
17
  $set COMMITS = "(unable to read commit log; proceeding without preview)"
18
18
 
19
19
  propose:
20
20
  needs: commits_since
21
- ~ prompt="Propose the next semver tag given prev tag '$(PREV_TAG)', bump kind '$(BUMP_KIND)', and commits below. Return ONLY the new tag string (e.g. v1.4.3). No commentary.\n\nCommits:\n$(COMMITS)" model=qwen maxTokens=30 -> PROPOSED_TAG
21
+ $ llm prompt="Propose the next semver tag given prev tag '${PREV_TAG}', bump kind '${BUMP_KIND}', and commits below. Return ONLY the new tag string (e.g. v1.4.3). No commentary.\n\nCommits:\n${COMMITS}" model=qwen maxTokens=30 -> PROPOSED_TAG
22
22
 
23
23
  confirm:
24
24
  needs: propose
25
- ! Previous tag: $(PREV_TAG)
26
- ! Commits since:
27
- ! $(COMMITS)
28
- ! Proposed new tag: $(PROPOSED_TAG|trim)
29
- ?? "Cut tag $(PROPOSED_TAG|trim)?" -> APPROVED
25
+ emit(text="Previous tag: ${PREV_TAG}")
26
+ emit(text="Commits since:")
27
+ emit(text="${COMMITS}")
28
+ emit(text="Proposed new tag: ${PROPOSED_TAG|trim}")
29
+ ask(prompt="Cut tag ${PROPOSED_TAG|trim}?") -> APPROVED
30
30
 
31
31
  apply:
32
32
  needs: confirm
33
- @ git tag $(PROPOSED_TAG|trim) -> TAG_OUT
34
- @ git push origin $(PROPOSED_TAG|trim) -> PUSH_OUT
35
- ! Tagged and pushed $(PROPOSED_TAG|trim)
33
+ shell(command="git tag ${PROPOSED_TAG|trim}") -> TAG_OUT
34
+ shell(command="git push origin ${PROPOSED_TAG|trim}") -> PUSH_OUT
35
+ emit(text="Tagged and pushed ${PROPOSED_TAG|trim}")
36
36
  else:
37
- ! Tag/push failed; rolling back local tag
38
- @ git tag -d $(PROPOSED_TAG|trim) -> ROLLBACK
37
+ emit(text="Tag/push failed; rolling back local tag")
38
+ shell(command="git tag -d ${PROPOSED_TAG|trim}") -> ROLLBACK
39
39
 
40
40
  default: apply
@@ -5,8 +5,8 @@
5
5
  # Output: text
6
6
 
7
7
  answer:
8
- > mode=rerank query="$(QUESTION)" limit=$(K) -> HITS (fallback: [])
9
- ~ prompt="Answer the question using ONLY the supplied passages. Cite each claim inline as [id:<memory-id>]. Question: $(QUESTION). Passages: $(HITS|json)" maxTokens=900 -> RESPONSE
10
- ! $(RESPONSE)
8
+ $ memory mode=rerank query="${QUESTION}" limit=${K} -> HITS (fallback: [])
9
+ $ llm prompt="Answer the question using ONLY the supplied passages. Cite each claim inline as [id:<memory-id>]. Question: ${QUESTION}. Passages: ${HITS|json}" maxTokens=900 -> RESPONSE
10
+ emit(text="${RESPONSE}")
11
11
 
12
12
  default: answer
@@ -7,23 +7,23 @@
7
7
  # Output: prompt-context: support-lead
8
8
 
9
9
  fetch_new:
10
- > mode=fts query="customer feedback" limit=$(SCAN_LIMIT) created_after=$(EVENT.fired_at_unix) -> FEEDBACK
10
+ $ memory mode=fts query="customer feedback" limit=${SCAN_LIMIT} created_after=${EVENT.fired_at_unix} -> FEEDBACK
11
11
 
12
12
  fetch_seen:
13
- > mode=fts query="sentiment-scan seen marker" limit=200 domain_tags=["sentiment-scan-seen"] -> SEEN_MARKERS
13
+ $ memory mode=fts query="sentiment-scan seen marker" limit=200 domain_tags=["sentiment-scan-seen"] -> SEEN_MARKERS
14
14
 
15
15
  classify_and_emit:
16
16
  needs: fetch_new, fetch_seen
17
- ! Sentiment scan results for $(NOW):
18
- foreach F in $(FEEDBACK):
19
- if $(F.id|trim) in $(SEEN_MARKERS):
20
- ! - skipped (already classified): $(F.id|trim)
21
- elif $(F.id|trim) not in $(SEEN_MARKERS):
22
- ~ 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)" model=gemma2 maxTokens=10 -> VERDICT
23
- if $(VERDICT|trim) == "frustrated":
24
- ! - FRUSTRATED [$(F.id|trim)] $(F.summary)
25
- elif $(VERDICT|trim) == "blocking":
26
- ! - BLOCKING [$(F.id|trim)] $(F.summary)
27
- $ memorystore.write summary="sentiment-scan seen $(F.id|trim)" detail="verdict=$(VERDICT|trim) on $(EVENT.fired_at_unix)" knowledge_type=common vault=private domain_tags=["sentiment-scan-seen"] expires_at=$(EVENT.fired_at_plus_7d_unix)
17
+ emit(text="Sentiment scan results for ${NOW}:")
18
+ foreach F in ${FEEDBACK}:
19
+ if ${F.id|trim} in ${SEEN_MARKERS}:
20
+ emit(text="- skipped (already classified): ${F.id|trim}")
21
+ elif ${F.id|trim} not in ${SEEN_MARKERS}:
22
+ $ 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}" model=gemma2 maxTokens=10 -> VERDICT
23
+ if ${VERDICT|trim} == "frustrated":
24
+ emit(text="- FRUSTRATED [${F.id|trim}] ${F.summary}")
25
+ elif ${VERDICT|trim} == "blocking":
26
+ emit(text="- BLOCKING [${F.id|trim}] ${F.summary}")
27
+ $ memorystore.write summary="sentiment-scan seen ${F.id|trim}" detail="verdict=${VERDICT|trim} on ${EVENT.fired_at_unix}" knowledge_type=common vault=private domain_tags=["sentiment-scan-seen"] expires_at=${EVENT.fired_at_plus_7d_unix}
28
28
 
29
29
  default: classify_and_emit
@@ -3,7 +3,7 @@
3
3
  # Vars: WHO=world
4
4
 
5
5
  greet:
6
- ! Hello, $(WHO)!
7
- ! Welcome to Skillscript. You ran a skill end-to-end with three commands.
6
+ emit(text="Hello, ${WHO}!")
7
+ emit(text="Welcome to Skillscript. You ran a skill end-to-end with three commands.")
8
8
 
9
9
  default: greet
@@ -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-05-24T22:16:05.624Z",
5
+ "compiled_at": "2026-05-25T17:20:14.209Z",
6
6
  "source_skill": {
7
7
  "name": "hello"
8
8
  },
@@ -5,20 +5,20 @@
5
5
  # Requires: user-var:morning-brief-channel -> CHANNEL (fallback: dev-null)
6
6
  # Triggers: cron: 0 7 * * *
7
7
  # OnError: morning-brief-degraded
8
- # Output: slack: $(CHANNEL)
8
+ # Output: slack: ${CHANNEL}
9
9
  # Output: prompt-context: perry
10
10
 
11
11
  calendar:
12
- $ calendar.list_events horizon_hours=$(BRIEF_HORIZON_HOURS) -> EVENTS
12
+ $ calendar.list_events horizon_hours=${BRIEF_HORIZON_HOURS} -> EVENTS
13
13
 
14
14
  mailbox:
15
- > mode=fts query="addressed:$(AGENT) created_after:$(EVENT.fired_at_unix)" limit=10 -> MAIL
15
+ $ memory mode=fts query="addressed:${AGENT} created_after:${EVENT.fired_at_unix}" limit=10 -> MAIL
16
16
 
17
17
  overnight:
18
- > mode=rerank query="overnight writes since:$(EVENT.fired_at_plus_1d_unix)" limit=15 -> NOTES
18
+ $ memory mode=rerank query="overnight writes since:${EVENT.fired_at_plus_1d_unix}" limit=15 -> NOTES
19
19
 
20
20
  compose: needs: calendar, mailbox, overnight
21
- ~ 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
22
- ! $(BRIEF)
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
22
+ emit(text="${BRIEF}")
23
23
 
24
24
  default: compose
@@ -10,13 +10,13 @@
10
10
  # needed for the count — the filter is deterministic + free.
11
11
 
12
12
  fetch:
13
- @ cat $(QUEUE_PATH) -> ITEMS (fallback: "[]")
13
+ shell(command="cat ${QUEUE_PATH}") -> ITEMS (fallback: "[]")
14
14
 
15
15
  evaluate:
16
16
  needs: fetch
17
- if $(ITEMS|length) > $(THRESHOLD):
18
- ! Queue backlog: $(ITEMS|length) items pending (threshold $(THRESHOLD)). Action required.
17
+ if ${ITEMS|length} > ${THRESHOLD}:
18
+ emit(text="Queue backlog: ${ITEMS|length} items pending (threshold ${THRESHOLD}). Action required.")
19
19
  else:
20
- ! Queue healthy: $(ITEMS|length) items pending (under $(THRESHOLD)).
20
+ emit(text="Queue healthy: ${ITEMS|length} items pending (under ${THRESHOLD}).")
21
21
 
22
22
  default: evaluate
@@ -6,13 +6,13 @@
6
6
  # Output: none
7
7
 
8
8
  probe:
9
- foreach SVC in $(SERVICES):
10
- @ curl -s -o /dev/null -w "%{http_code} %{time_total}" https://status.internal/$(SVC|url) -> RAW
11
- ~ prompt="From the line '$(RAW|trim)' (http_code time_seconds), and budget $(LATENCY_BUDGET_MS) ms, answer ok or degraded only." -> STATUS
12
- if $(STATUS|trim) == "degraded":
13
- $ memorystore.write summary="service degradation: $(SVC)" detail="probe at $(NOW): $(RAW|trim)" domain_tags=[ops, service-health, degraded:$(SVC)] vault=private knowledge_type=common expires_at=$(EVENT.fired_at_plus_1d_unix) -> ACK
14
- ! $(SVC) degraded — wrote signal
9
+ foreach SVC in ${SERVICES}:
10
+ shell(command="curl -s -o /dev/null -w \"%{http_code} %{time_total}\" https://status.internal/${SVC|url}") -> RAW
11
+ $ llm prompt="From the line '${RAW|trim}' (http_code time_seconds), and budget ${LATENCY_BUDGET_MS} ms, answer ok or degraded only." -> STATUS
12
+ if ${STATUS|trim} == "degraded":
13
+ $ memorystore.write summary="service degradation: ${SVC}" detail="probe at ${NOW}: ${RAW|trim}" domain_tags=[ops, service-health, degraded:${SVC}] vault=private knowledge_type=common expires_at=${EVENT.fired_at_plus_1d_unix} -> ACK
14
+ emit(text="${SVC} degraded — wrote signal")
15
15
  else:
16
- ! $(SVC) ok
16
+ emit(text="${SVC} ok")
17
17
 
18
18
  default: probe
@@ -9,9 +9,9 @@ fetch_issues: fetch_me
9
9
  $ youtrack.search_issues query="for: me" limit=5 -> RAW
10
10
 
11
11
  report: fetch_issues
12
- ! Morning sweep for $(ME.login):
13
- ! Open issues assigned: $(RAW.issuesPage|length)
14
- foreach I in $(RAW.issuesPage):
15
- ! - $(I.id): $(I.summary)
12
+ emit(text="Morning sweep for ${ME.login}:")
13
+ emit(text="Open issues assigned: ${RAW.issuesPage|length}")
14
+ foreach I in ${RAW.issuesPage}:
15
+ emit(text="- ${I.id}: ${I.summary}")
16
16
 
17
17
  default: report
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skillscript-runtime",
3
- "version": "0.4.4",
3
+ "version": "0.7.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>",