@sable-ai/sdk-core 0.1.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.
Files changed (46) hide show
  1. package/README.md +55 -0
  2. package/dist/esm/index.js +2431 -0
  3. package/dist/sable.iife.js +1486 -0
  4. package/dist/types/browser-bridge/actions.d.ts +27 -0
  5. package/dist/types/browser-bridge/dom-state.d.ts +37 -0
  6. package/dist/types/browser-bridge/index.d.ts +19 -0
  7. package/dist/types/connection/index.d.ts +26 -0
  8. package/dist/types/events/index.d.ts +15 -0
  9. package/dist/types/global.d.ts +26 -0
  10. package/dist/types/index.d.ts +23 -0
  11. package/dist/types/rpc.d.ts +22 -0
  12. package/dist/types/runtime/clipboard.d.ts +14 -0
  13. package/dist/types/runtime/index.d.ts +36 -0
  14. package/dist/types/runtime/video-overlay.d.ts +14 -0
  15. package/dist/types/session/debug-panel.d.ts +29 -0
  16. package/dist/types/session/index.d.ts +41 -0
  17. package/dist/types/types/index.d.ts +131 -0
  18. package/dist/types/version.d.ts +7 -0
  19. package/dist/types/vision/frame-source.d.ts +34 -0
  20. package/dist/types/vision/index.d.ts +29 -0
  21. package/dist/types/vision/publisher.d.ts +44 -0
  22. package/dist/types/vision/wireframe.d.ts +22 -0
  23. package/package.json +61 -0
  24. package/src/assets/visible-dom.js.txt +764 -0
  25. package/src/assets/wireframe.js.txt +678 -0
  26. package/src/assets.d.ts +24 -0
  27. package/src/browser-bridge/actions.ts +161 -0
  28. package/src/browser-bridge/dom-state.ts +103 -0
  29. package/src/browser-bridge/index.ts +99 -0
  30. package/src/connection/index.ts +49 -0
  31. package/src/events/index.ts +50 -0
  32. package/src/global.ts +35 -0
  33. package/src/index.test.ts +6 -0
  34. package/src/index.ts +43 -0
  35. package/src/rpc.ts +31 -0
  36. package/src/runtime/clipboard.ts +47 -0
  37. package/src/runtime/index.ts +138 -0
  38. package/src/runtime/video-overlay.ts +94 -0
  39. package/src/session/debug-panel.ts +254 -0
  40. package/src/session/index.ts +375 -0
  41. package/src/types/index.ts +176 -0
  42. package/src/version.ts +8 -0
  43. package/src/vision/frame-source.ts +111 -0
  44. package/src/vision/index.ts +70 -0
  45. package/src/vision/publisher.ts +106 -0
  46. package/src/vision/wireframe.ts +43 -0
package/README.md ADDED
@@ -0,0 +1,55 @@
1
+ # @sable-ai/sdk-core
2
+
3
+ v0 browser runtime for Sable: joins a LiveKit room and lets the user talk to an
4
+ agent worker. Voice-only. No DOM tools, no UI overlay, no events API.
5
+
6
+ ## Install
7
+
8
+ ```bash
9
+ bun add @sable-ai/sdk-core
10
+ ```
11
+
12
+ Or include the IIFE bundle directly:
13
+
14
+ ```html
15
+ <script src="./sable.iife.js"></script>
16
+ ```
17
+
18
+ ## Usage
19
+
20
+ ```js
21
+ await window.Sable.start({
22
+ agentPublicId: "agt_...",
23
+ apiUrl: "https://sable-api-gateway-9dfmhij9.wl.gateway.dev", // optional, this is the default
24
+ nickelRegion: "us-east1", // optional
25
+ });
26
+
27
+ // ... user talks to the agent ...
28
+
29
+ await window.Sable.stop();
30
+ ```
31
+
32
+ ## Local test
33
+
34
+ ```bash
35
+ bun install
36
+ bun run --filter @sable-ai/sdk-core build
37
+ python3 -m http.server 5173 --directory packages/sdk-core
38
+ ```
39
+
40
+ Open `http://localhost:5173/examples/test.html`, paste an agent public ID, click Start.
41
+ Grant mic permission when prompted. Observe the console for LiveKit session
42
+ events.
43
+
44
+ **Only `http://localhost:*` origins work in v0** — `sable-api`'s CORS policy
45
+ does not yet allow arbitrary origins. See the v0 spec at
46
+ `docs/superpowers/specs/2026-04-07-sdk-voice-integration-design.md` for the
47
+ deferred per-org allowed-origins work.
48
+
49
+ ## Known limitations (v0)
50
+
51
+ - Voice only. No DOM tools, no actions, no wireframe.
52
+ - Bundle is ~1 MB unminified because `livekit-client` is inlined into the IIFE.
53
+ - No session persistence across navigations.
54
+ - No push-to-talk; the mic stays open for the whole session.
55
+ - Errors from `start()` propagate; callers must catch and display them.