skillscript-runtime 0.16.0 → 0.16.2

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 (40) hide show
  1. package/dist/bootstrap.d.ts.map +1 -1
  2. package/dist/bootstrap.js +4 -1
  3. package/dist/bootstrap.js.map +1 -1
  4. package/dist/connectors/local-model-mcp.d.ts +13 -3
  5. package/dist/connectors/local-model-mcp.d.ts.map +1 -1
  6. package/dist/connectors/local-model-mcp.js +36 -6
  7. package/dist/connectors/local-model-mcp.js.map +1 -1
  8. package/dist/connectors/mcp-remote.d.ts.map +1 -1
  9. package/dist/connectors/mcp-remote.js +7 -1
  10. package/dist/connectors/mcp-remote.js.map +1 -1
  11. package/dist/errors.d.ts +12 -1
  12. package/dist/errors.d.ts.map +1 -1
  13. package/dist/errors.js +20 -1
  14. package/dist/errors.js.map +1 -1
  15. package/dist/help-content.d.ts.map +1 -1
  16. package/dist/help-content.js +6 -2
  17. package/dist/help-content.js.map +1 -1
  18. package/dist/lint.d.ts.map +1 -1
  19. package/dist/lint.js +124 -14
  20. package/dist/lint.js.map +1 -1
  21. package/dist/parser.d.ts.map +1 -1
  22. package/dist/parser.js +50 -8
  23. package/dist/parser.js.map +1 -1
  24. package/dist/safe-path.d.ts +20 -0
  25. package/dist/safe-path.d.ts.map +1 -0
  26. package/dist/safe-path.js +49 -0
  27. package/dist/safe-path.js.map +1 -0
  28. package/dist/trace.d.ts.map +1 -1
  29. package/dist/trace.js +26 -9
  30. package/dist/trace.js.map +1 -1
  31. package/examples/README.md +1 -2
  32. package/examples/connectors/McpConnectorTemplate/McpConnectorTemplate.ts +4 -5
  33. package/examples/connectors/SkillStoreTemplate/SkillStoreTemplate.ts +9 -9
  34. package/examples/custom-bootstrap.example.ts +4 -4
  35. package/examples/onboarding-scaffold/bootstrap.ts +7 -7
  36. package/examples/onboarding-scaffold/file-data-store.ts +3 -5
  37. package/examples/onboarding-scaffold/openai-local-model.ts +7 -8
  38. package/examples/onboarding-scaffold/tmux-shell-agent-connector.ts +4 -4
  39. package/examples/skillscripts/hello-world.skill.provenance.json +1 -1
  40. package/package.json +1 -1
@@ -1,9 +1,9 @@
1
1
  // Worked example: writing a custom bootstrap that wires adopter-specific
2
- // substrates against skillscript-runtime's public APIs. v0.7.3.
2
+ // substrates against skillscript-runtime's public APIs.
3
3
  //
4
4
  // **When to write your own bootstrap.** The bundled `bootstrap()` from
5
5
  // `skillscript-runtime` wires `FilesystemSkillStore` + `OllamaLocalModel` +
6
- // `SqliteDataStore` + the v0.7.2 bridges. If your deployment uses
6
+ // `SqliteDataStore` + the typed-contract bridges. If your deployment uses
7
7
  // different substrates (your own data store, a hosted LLM API, an MCP
8
8
  // server for agent delivery, etc.), write your own bootstrap rather than
9
9
  // modifying the bundled one. Prevents merge conflicts on every upstream
@@ -52,7 +52,7 @@ class MyAdopterConnector implements McpConnector {
52
52
  constructor(private readonly config: Record<string, unknown>) {}
53
53
 
54
54
  async call(toolName: string, args: Record<string, unknown>, _ctx?: McpDispatchCtx): Promise<unknown> {
55
- // Dispatch to your substrate. Auth/credentials per the v0.8.x passthrough
55
+ // Dispatch to your substrate. Auth/credentials per the passthrough
56
56
  // model: the substrate enforces; runtime threads credentials via ctx.
57
57
  void toolName; void args;
58
58
  return { ok: true };
@@ -102,7 +102,7 @@ registry.registerSkillStore("primary", skillStore);
102
102
  // registry.registerMcpConnector("data_read", dataBridge);
103
103
  // registry.registerMcpConnector("data_write", dataBridge);
104
104
  // }
105
- // // v0.15.0 — SkillStore-as-bridge. Makes `$ skill_write` / `$ skill_read`
105
+ // // SkillStore-as-bridge. Makes `$ skill_write` / `$ skill_read`
106
106
  // // dispatchable from inside an executing skill (Lisp-shape: skills program
107
107
  // // skills). In-skill writes are Draft-forced at the bridge layer; outside-MCP
108
108
  // // skill_write keeps the existing "body declares status" behavior.
@@ -1,5 +1,5 @@
1
1
  // Onboarding scaffold: complete bootstrap wiring file-backed data store +
2
- // OpenAI LLM + tmux-shell AgentConnector. v0.7.3.
2
+ // OpenAI LLM + tmux-shell AgentConnector.
3
3
  //
4
4
  // Copy this file into your deployment and modify substrate choices to
5
5
  // match your environment. The shape is:
@@ -74,12 +74,12 @@ registry.registerMcpConnector("llm", new LocalModelMcpConnector(openai));
74
74
  const dataBridge = new DataStoreMcpConnector(dataStore);
75
75
  registry.registerMcpConnector("data_read", dataBridge);
76
76
  registry.registerMcpConnector("data_write", dataBridge);
77
- // v0.15.0 — SkillStore-as-bridge. Makes `$ skill_write` / `$ skill_read`
78
- // dispatchable from inside an executing skill (Lisp-shape: skills program
79
- // skills). In-skill writes are forced to `# Status: Draft` at the bridge
80
- // layer per the v0.15.0 trust boundary — see `src/connectors/skill-store-mcp.ts`
81
- // header for the threat-model rationale. Outside-MCP `skill_write` (via the
82
- // wire surface) keeps its existing "body declares status" behavior.
77
+ // SkillStore-as-bridge. Makes `$ skill_write` / `$ skill_read` dispatchable
78
+ // from inside an executing skill (Lisp-shape: skills program skills).
79
+ // In-skill writes are forced to `# Status: Draft` at the bridge layer —
80
+ // see `src/connectors/skill-store-mcp.ts` header for the threat-model
81
+ // rationale. Outside-MCP `skill_write` (via the wire surface) keeps its
82
+ // existing "body declares status" behavior.
83
83
  const skillBridge = new SkillStoreMcpConnector(skillStore);
84
84
  registry.registerMcpConnector("skill_read", skillBridge);
85
85
  registry.registerMcpConnector("skill_write", skillBridge);
@@ -1,13 +1,11 @@
1
- // Onboarding scaffold: file-backed DataStore. v0.7.3.
1
+ // Onboarding scaffold: file-backed DataStore.
2
2
  //
3
3
  // JSON file as the substrate; simple JS substring + token match for "fts"
4
4
  // queries; reranks by recency. Adopters copy this file and modify for
5
5
  // their concrete substrate (e.g., swap the JSON file for a Postgres
6
6
  // table, the substring match for actual full-text search, etc.).
7
7
  //
8
- // **Scope.** Read-only `query()` per the v0.7.2 DataStore contract.
9
- // `write()` is deferred to v0.8.x bundled with the auth model — when
10
- // that lands, extend this file with the matching `write()` method.
8
+ // **Scope.** Implements `query()` + `write()` per the DataStore contract.
11
9
 
12
10
  import { readFileSync, existsSync, writeFileSync } from "node:fs";
13
11
  import { randomUUID } from "node:crypto";
@@ -106,7 +104,7 @@ export class FileDataStore implements DataStore {
106
104
  file_path: this.config.filePath,
107
105
  record_count: this.loadFile().length,
108
106
  supports_write: true,
109
- // v0.14.1 strict-filters: the bridge enforces every non-base filter
107
+ // strict-filters: the bridge enforces every non-base filter
110
108
  // key in `query()` calls against this declared set, throwing
111
109
  // UnsupportedFilterError for unknowns. This reference impl's
112
110
  // substring scorer doesn't actually filter on any field (it
@@ -1,17 +1,16 @@
1
- // Onboarding scaffold: OpenAI-API-backed LocalModel. v0.7.3.
1
+ // Onboarding scaffold: OpenAI-API-backed LocalModel.
2
2
  //
3
3
  // HTTP client to OpenAI's Chat Completions endpoint. Implements the
4
- // `LocalModel.run(prompt, opts)` typed contract so the v0.7.2 bridge
5
- // (`LocalModelMcpConnector`) surfaces it as canonical `$ llm prompt=...`
6
- // for skills.
4
+ // `LocalModel.run(prompt, opts)` typed contract so the
5
+ // `LocalModelMcpConnector` bridge surfaces it as canonical
6
+ // `$ llm prompt=... [maxTokens=N] [model="..."] -> R` for skills.
7
7
  //
8
8
  // **Prompt-vs-messaging caveat.** `LocalModel.run()` takes a single
9
9
  // `prompt` string; Chat Completions expects a list of messages with roles.
10
10
  // This adapter wraps the prompt as a single `user` message. Skills that
11
- // need multi-turn or system-prompt isolation should treat this as a
12
- // limitation of the v0.7.x contract and pair the LLM dispatch with `$set`
13
- // + accumulation in the skill body for now. v0.8.x is a likely venue
14
- // for a richer message-shaped LocalModel contract.
11
+ // need multi-turn or system-prompt isolation should pair the LLM dispatch
12
+ // with `$set` + accumulation in the skill body the LocalModel contract
13
+ // is intentionally narrow (prompt-in, text-out).
15
14
 
16
15
  import type {
17
16
  LocalModel,
@@ -1,12 +1,12 @@
1
- // Onboarding scaffold: tmux-shell AgentConnector. v0.7.3.
1
+ // Onboarding scaffold: tmux-shell AgentConnector.
2
2
  //
3
3
  // Delivers skill output to a named tmux session via `tmux send-keys`.
4
4
  // Matches what nanoclaw-style agent harnesses do internally — adopters
5
- // with agents running in tmux sessions can wire `# Output: prompt-context:
6
- // <agent>` end-to-end against this impl.
5
+ // with agents running in tmux sessions can wire `# Output: agent: <agent>`
6
+ // end-to-end against this impl.
7
7
  //
8
8
  // **Scope.** Implements `deliver()` + `list_agents()` + `wake()` +
9
- // `manifest()` per the v0.7.x AgentConnector contract. `wake()` is a no-op
9
+ // `manifest()` per the AgentConnector contract. `wake()` is a no-op
10
10
  // here (tmux panes are always live; wake is for harnesses with sleep modes).
11
11
 
12
12
  import { spawn } from "node:child_process";
@@ -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-06-02T15:06:16.833Z",
5
+ "compiled_at": "2026-06-02T16:42:16.243Z",
6
6
  "source_skill": {
7
7
  "name": "hello-world"
8
8
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skillscript-runtime",
3
- "version": "0.16.0",
3
+ "version": "0.16.2",
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>",