@silverprotocol/core 0.2.0 → 0.2.1

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 (2) hide show
  1. package/README.md +6 -2
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -78,12 +78,16 @@ framework-neutral, ready to send over the wire, persist, or feed straight to the
78
78
  `Reducer` above:
79
79
 
80
80
  ```ts
81
+ // `query` is the Claude Agent SDK's own streaming call — you keep using
82
+ // your framework as-is; the normalizer just translates what it emits.
83
+ import { query } from "@anthropic-ai/claude-agent-sdk";
81
84
  import { createClaudeNormalizer } from "@silverprotocol/claude-agent-sdk";
82
85
 
83
86
  const n = createClaudeNormalizer();
84
87
  const agEvents = [];
85
- for await (const native of claudeStream) agEvents.push(...n.push(native));
86
- agEvents.push(...n.flush());
88
+ for await (const native of query({ prompt: "call the echo tool" }))
89
+ agEvents.push(...n.push(native)); // one native event → 0+ AgEvents
90
+ agEvents.push(...n.flush()); // seal anything still open
87
91
  ```
88
92
 
89
93
  ## Learn more
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@silverprotocol/core",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "AgJSON core — the typed schema (AgInput / AgEvent / AgMessage), the Normalizer interface, and the normative reduce().",
5
5
  "license": "MIT",
6
6
  "repository": {