@soulcraft/sdk 1.0.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 (149) hide show
  1. package/dist/client/index.d.ts +62 -0
  2. package/dist/client/index.d.ts.map +1 -0
  3. package/dist/client/index.js +60 -0
  4. package/dist/client/index.js.map +1 -0
  5. package/dist/index.d.ts +33 -0
  6. package/dist/index.d.ts.map +1 -0
  7. package/dist/index.js +17 -0
  8. package/dist/index.js.map +1 -0
  9. package/dist/modules/ai/index.d.ts +55 -0
  10. package/dist/modules/ai/index.d.ts.map +1 -0
  11. package/dist/modules/ai/index.js +263 -0
  12. package/dist/modules/ai/index.js.map +1 -0
  13. package/dist/modules/ai/types.d.ts +216 -0
  14. package/dist/modules/ai/types.d.ts.map +1 -0
  15. package/dist/modules/ai/types.js +30 -0
  16. package/dist/modules/ai/types.js.map +1 -0
  17. package/dist/modules/auth/backchannel.d.ts +85 -0
  18. package/dist/modules/auth/backchannel.d.ts.map +1 -0
  19. package/dist/modules/auth/backchannel.js +168 -0
  20. package/dist/modules/auth/backchannel.js.map +1 -0
  21. package/dist/modules/auth/config.d.ts +122 -0
  22. package/dist/modules/auth/config.d.ts.map +1 -0
  23. package/dist/modules/auth/config.js +158 -0
  24. package/dist/modules/auth/config.js.map +1 -0
  25. package/dist/modules/auth/middleware.d.ts +146 -0
  26. package/dist/modules/auth/middleware.d.ts.map +1 -0
  27. package/dist/modules/auth/middleware.js +204 -0
  28. package/dist/modules/auth/middleware.js.map +1 -0
  29. package/dist/modules/auth/types.d.ts +162 -0
  30. package/dist/modules/auth/types.d.ts.map +1 -0
  31. package/dist/modules/auth/types.js +14 -0
  32. package/dist/modules/auth/types.js.map +1 -0
  33. package/dist/modules/billing/types.d.ts +7 -0
  34. package/dist/modules/billing/types.d.ts.map +1 -0
  35. package/dist/modules/billing/types.js +7 -0
  36. package/dist/modules/billing/types.js.map +1 -0
  37. package/dist/modules/brainy/auth.d.ts +104 -0
  38. package/dist/modules/brainy/auth.d.ts.map +1 -0
  39. package/dist/modules/brainy/auth.js +144 -0
  40. package/dist/modules/brainy/auth.js.map +1 -0
  41. package/dist/modules/brainy/errors.d.ts +118 -0
  42. package/dist/modules/brainy/errors.d.ts.map +1 -0
  43. package/dist/modules/brainy/errors.js +142 -0
  44. package/dist/modules/brainy/errors.js.map +1 -0
  45. package/dist/modules/brainy/events.d.ts +63 -0
  46. package/dist/modules/brainy/events.d.ts.map +1 -0
  47. package/dist/modules/brainy/events.js +14 -0
  48. package/dist/modules/brainy/events.js.map +1 -0
  49. package/dist/modules/brainy/proxy.d.ts +48 -0
  50. package/dist/modules/brainy/proxy.d.ts.map +1 -0
  51. package/dist/modules/brainy/proxy.js +95 -0
  52. package/dist/modules/brainy/proxy.js.map +1 -0
  53. package/dist/modules/brainy/types.d.ts +83 -0
  54. package/dist/modules/brainy/types.d.ts.map +1 -0
  55. package/dist/modules/brainy/types.js +21 -0
  56. package/dist/modules/brainy/types.js.map +1 -0
  57. package/dist/modules/events/index.d.ts +41 -0
  58. package/dist/modules/events/index.d.ts.map +1 -0
  59. package/dist/modules/events/index.js +53 -0
  60. package/dist/modules/events/index.js.map +1 -0
  61. package/dist/modules/events/types.d.ts +129 -0
  62. package/dist/modules/events/types.d.ts.map +1 -0
  63. package/dist/modules/events/types.js +32 -0
  64. package/dist/modules/events/types.js.map +1 -0
  65. package/dist/modules/formats/types.d.ts +7 -0
  66. package/dist/modules/formats/types.d.ts.map +1 -0
  67. package/dist/modules/formats/types.js +7 -0
  68. package/dist/modules/formats/types.js.map +1 -0
  69. package/dist/modules/hall/types.d.ts +56 -0
  70. package/dist/modules/hall/types.d.ts.map +1 -0
  71. package/dist/modules/hall/types.js +16 -0
  72. package/dist/modules/hall/types.js.map +1 -0
  73. package/dist/modules/kits/types.d.ts +7 -0
  74. package/dist/modules/kits/types.d.ts.map +1 -0
  75. package/dist/modules/kits/types.js +7 -0
  76. package/dist/modules/kits/types.js.map +1 -0
  77. package/dist/modules/license/types.d.ts +7 -0
  78. package/dist/modules/license/types.d.ts.map +1 -0
  79. package/dist/modules/license/types.js +7 -0
  80. package/dist/modules/license/types.js.map +1 -0
  81. package/dist/modules/notifications/types.d.ts +7 -0
  82. package/dist/modules/notifications/types.d.ts.map +1 -0
  83. package/dist/modules/notifications/types.js +7 -0
  84. package/dist/modules/notifications/types.js.map +1 -0
  85. package/dist/modules/skills/index.d.ts +60 -0
  86. package/dist/modules/skills/index.d.ts.map +1 -0
  87. package/dist/modules/skills/index.js +253 -0
  88. package/dist/modules/skills/index.js.map +1 -0
  89. package/dist/modules/skills/types.d.ts +127 -0
  90. package/dist/modules/skills/types.d.ts.map +1 -0
  91. package/dist/modules/skills/types.js +23 -0
  92. package/dist/modules/skills/types.js.map +1 -0
  93. package/dist/modules/versions/types.d.ts +31 -0
  94. package/dist/modules/versions/types.d.ts.map +1 -0
  95. package/dist/modules/versions/types.js +9 -0
  96. package/dist/modules/versions/types.js.map +1 -0
  97. package/dist/modules/vfs/types.d.ts +26 -0
  98. package/dist/modules/vfs/types.d.ts.map +1 -0
  99. package/dist/modules/vfs/types.js +11 -0
  100. package/dist/modules/vfs/types.js.map +1 -0
  101. package/dist/server/create-sdk.d.ts +70 -0
  102. package/dist/server/create-sdk.d.ts.map +1 -0
  103. package/dist/server/create-sdk.js +125 -0
  104. package/dist/server/create-sdk.js.map +1 -0
  105. package/dist/server/hall-handlers.d.ts +195 -0
  106. package/dist/server/hall-handlers.d.ts.map +1 -0
  107. package/dist/server/hall-handlers.js +239 -0
  108. package/dist/server/hall-handlers.js.map +1 -0
  109. package/dist/server/handlers.d.ts +216 -0
  110. package/dist/server/handlers.d.ts.map +1 -0
  111. package/dist/server/handlers.js +214 -0
  112. package/dist/server/handlers.js.map +1 -0
  113. package/dist/server/index.d.ts +52 -0
  114. package/dist/server/index.d.ts.map +1 -0
  115. package/dist/server/index.js +50 -0
  116. package/dist/server/index.js.map +1 -0
  117. package/dist/server/instance-pool.d.ts +299 -0
  118. package/dist/server/instance-pool.d.ts.map +1 -0
  119. package/dist/server/instance-pool.js +359 -0
  120. package/dist/server/instance-pool.js.map +1 -0
  121. package/dist/transports/http.d.ts +86 -0
  122. package/dist/transports/http.d.ts.map +1 -0
  123. package/dist/transports/http.js +134 -0
  124. package/dist/transports/http.js.map +1 -0
  125. package/dist/transports/local.d.ts +76 -0
  126. package/dist/transports/local.d.ts.map +1 -0
  127. package/dist/transports/local.js +101 -0
  128. package/dist/transports/local.js.map +1 -0
  129. package/dist/transports/sse.d.ts +99 -0
  130. package/dist/transports/sse.d.ts.map +1 -0
  131. package/dist/transports/sse.js +192 -0
  132. package/dist/transports/sse.js.map +1 -0
  133. package/dist/transports/transport.d.ts +68 -0
  134. package/dist/transports/transport.d.ts.map +1 -0
  135. package/dist/transports/transport.js +14 -0
  136. package/dist/transports/transport.js.map +1 -0
  137. package/dist/transports/ws.d.ts +135 -0
  138. package/dist/transports/ws.d.ts.map +1 -0
  139. package/dist/transports/ws.js +331 -0
  140. package/dist/transports/ws.js.map +1 -0
  141. package/dist/types.d.ts +152 -0
  142. package/dist/types.d.ts.map +1 -0
  143. package/dist/types.js +8 -0
  144. package/dist/types.js.map +1 -0
  145. package/docs/ADR-001-sdk-design.md +282 -0
  146. package/docs/IMPLEMENTATION-PLAN.md +708 -0
  147. package/docs/USAGE.md +646 -0
  148. package/docs/kit-sdk-guide.md +474 -0
  149. package/package.json +61 -0
@@ -0,0 +1,129 @@
1
+ /**
2
+ * @module modules/events/types
3
+ * @description Type definitions for `sdk.events.*` — the platform event bus.
4
+ *
5
+ * The event bus carries two classes of event:
6
+ *
7
+ * **Built-in platform events** — emitted automatically by the SDK when Brainy
8
+ * or VFS mutations occur:
9
+ * - `brainy:change` — any entity or relation mutation in Brainy
10
+ * - `vfs:write` — a VFS file was created or updated
11
+ * - `vfs:delete` — a VFS file or directory was removed
12
+ * - `vfs:rename` — a VFS file or directory was renamed/moved
13
+ *
14
+ * **Application events** — arbitrary string keys emitted by product or kit code:
15
+ * - `kit:session-completed`, `venue:booking-created`, etc.
16
+ *
17
+ * All event payloads are typed via the `SoulcraftEventMap` interface. Extend it
18
+ * with declaration merging in your project to get typed `on()`/`emit()` for
19
+ * your own events.
20
+ *
21
+ * @example Declaring custom events
22
+ * ```typescript
23
+ * declare module '@soulcraft/sdk' {
24
+ * interface SoulcraftEventMap {
25
+ * 'kit:session-completed': { userId: string; sessionId: string; kitId: string }
26
+ * 'venue:booking-created': { bookingId: string; tenantId: string }
27
+ * }
28
+ * }
29
+ * ```
30
+ */
31
+ import type { BrainyChangeEvent } from '../brainy/events.js';
32
+ /**
33
+ * Emitted when a VFS file is created or overwritten.
34
+ */
35
+ export interface VfsWriteEvent {
36
+ /** Absolute VFS path, e.g. `/projects/my-project/README.md`. */
37
+ path: string;
38
+ /** The file content as a UTF-8 string. */
39
+ content: string;
40
+ }
41
+ /**
42
+ * Emitted when a VFS file or directory is deleted.
43
+ */
44
+ export interface VfsDeleteEvent {
45
+ /** Absolute VFS path that was removed. */
46
+ path: string;
47
+ }
48
+ /**
49
+ * Emitted when a VFS file or directory is renamed or moved.
50
+ */
51
+ export interface VfsRenameEvent {
52
+ /** The original path. */
53
+ from: string;
54
+ /** The new path. */
55
+ to: string;
56
+ }
57
+ /**
58
+ * The canonical map of all platform event names to their payload types.
59
+ *
60
+ * Extend this interface in your project with declaration merging to add
61
+ * type-safe custom events:
62
+ * ```typescript
63
+ * declare module '@soulcraft/sdk' {
64
+ * interface SoulcraftEventMap {
65
+ * 'kit:session-completed': { userId: string; sessionId: string; kitId: string }
66
+ * }
67
+ * }
68
+ * ```
69
+ */
70
+ export interface SoulcraftEventMap {
71
+ /** Any entity or relation was mutated in Brainy. */
72
+ 'brainy:change': BrainyChangeEvent;
73
+ /** A VFS file was created or overwritten. */
74
+ 'vfs:write': VfsWriteEvent;
75
+ /** A VFS file or directory was removed. */
76
+ 'vfs:delete': VfsDeleteEvent;
77
+ /** A VFS file or directory was renamed or moved. */
78
+ 'vfs:rename': VfsRenameEvent;
79
+ }
80
+ /** All event names in the platform event map (built-in and custom). */
81
+ export type SoulcraftEventName = keyof SoulcraftEventMap;
82
+ /**
83
+ * The `sdk.events` namespace.
84
+ *
85
+ * Provides a typed publish/subscribe event bus for coordinating platform
86
+ * events across modules, products, and kit applications.
87
+ *
88
+ * @example Subscribing to entity changes
89
+ * ```typescript
90
+ * sdk.events.on('brainy:change', (event) => {
91
+ * if (event.entity.type === 'Product') {
92
+ * updateInventoryCache(event.entity)
93
+ * }
94
+ * })
95
+ * ```
96
+ *
97
+ * @example Emitting a custom application event
98
+ * ```typescript
99
+ * await sdk.events.emit('kit:session-completed', {
100
+ * userId: user.id,
101
+ * sessionId,
102
+ * kitId: 'wicks-and-whiskers',
103
+ * })
104
+ * ```
105
+ */
106
+ export interface EventsModule {
107
+ /**
108
+ * Subscribe to a platform or application event.
109
+ *
110
+ * @param event - The event name to listen for.
111
+ * @param handler - Called with the event payload each time the event fires.
112
+ */
113
+ on<K extends keyof SoulcraftEventMap>(event: K, handler: (payload: SoulcraftEventMap[K]) => void): void;
114
+ /**
115
+ * Unsubscribe a previously registered handler.
116
+ *
117
+ * @param event - The event name.
118
+ * @param handler - The same function reference passed to {@link EventsModule.on}.
119
+ */
120
+ off<K extends keyof SoulcraftEventMap>(event: K, handler: (payload: SoulcraftEventMap[K]) => void): void;
121
+ /**
122
+ * Emit a platform or application event to all registered listeners.
123
+ *
124
+ * @param event - The event name.
125
+ * @param payload - The event payload.
126
+ */
127
+ emit<K extends keyof SoulcraftEventMap>(event: K, payload: SoulcraftEventMap[K]): void;
128
+ }
129
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/modules/events/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAM5D;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,gEAAgE;IAChE,IAAI,EAAE,MAAM,CAAA;IACZ,0CAA0C;IAC1C,OAAO,EAAE,MAAM,CAAA;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,0CAA0C;IAC1C,IAAI,EAAE,MAAM,CAAA;CACb;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,yBAAyB;IACzB,IAAI,EAAE,MAAM,CAAA;IACZ,oBAAoB;IACpB,EAAE,EAAE,MAAM,CAAA;CACX;AAMD;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,iBAAiB;IAChC,oDAAoD;IACpD,eAAe,EAAE,iBAAiB,CAAA;IAClC,6CAA6C;IAC7C,WAAW,EAAE,aAAa,CAAA;IAC1B,2CAA2C;IAC3C,YAAY,EAAE,cAAc,CAAA;IAC5B,oDAAoD;IACpD,YAAY,EAAE,cAAc,CAAA;CAC7B;AAED,uEAAuE;AACvE,MAAM,MAAM,kBAAkB,GAAG,MAAM,iBAAiB,CAAA;AAExD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;;OAKG;IACH,EAAE,CAAC,CAAC,SAAS,MAAM,iBAAiB,EAClC,KAAK,EAAE,CAAC,EACR,OAAO,EAAE,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC,CAAC,KAAK,IAAI,GAC/C,IAAI,CAAA;IAEP;;;;;OAKG;IACH,GAAG,CAAC,CAAC,SAAS,MAAM,iBAAiB,EACnC,KAAK,EAAE,CAAC,EACR,OAAO,EAAE,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC,CAAC,KAAK,IAAI,GAC/C,IAAI,CAAA;IAEP;;;;;OAKG;IACH,IAAI,CAAC,CAAC,SAAS,MAAM,iBAAiB,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAAG,IAAI,CAAA;CACvF"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * @module modules/events/types
3
+ * @description Type definitions for `sdk.events.*` — the platform event bus.
4
+ *
5
+ * The event bus carries two classes of event:
6
+ *
7
+ * **Built-in platform events** — emitted automatically by the SDK when Brainy
8
+ * or VFS mutations occur:
9
+ * - `brainy:change` — any entity or relation mutation in Brainy
10
+ * - `vfs:write` — a VFS file was created or updated
11
+ * - `vfs:delete` — a VFS file or directory was removed
12
+ * - `vfs:rename` — a VFS file or directory was renamed/moved
13
+ *
14
+ * **Application events** — arbitrary string keys emitted by product or kit code:
15
+ * - `kit:session-completed`, `venue:booking-created`, etc.
16
+ *
17
+ * All event payloads are typed via the `SoulcraftEventMap` interface. Extend it
18
+ * with declaration merging in your project to get typed `on()`/`emit()` for
19
+ * your own events.
20
+ *
21
+ * @example Declaring custom events
22
+ * ```typescript
23
+ * declare module '@soulcraft/sdk' {
24
+ * interface SoulcraftEventMap {
25
+ * 'kit:session-completed': { userId: string; sessionId: string; kitId: string }
26
+ * 'venue:booking-created': { bookingId: string; tenantId: string }
27
+ * }
28
+ * }
29
+ * ```
30
+ */
31
+ export {};
32
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/modules/events/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @module formats/types
3
+ * @description Type definitions for sdk.formats.*
4
+ * Implementation: Phase 4 per ADR-001.
5
+ */
6
+ export type {};
7
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/modules/formats/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,YAAY,EAAE,CAAA"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @module formats/types
3
+ * @description Type definitions for sdk.formats.*
4
+ * Implementation: Phase 4 per ADR-001.
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/modules/formats/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
@@ -0,0 +1,56 @@
1
+ /**
2
+ * @module modules/hall/types
3
+ * @description Hall module types for @soulcraft/sdk.
4
+ *
5
+ * Re-exports the full public API surface of @soulcraft/hall (HallServer, Room, and all
6
+ * supporting types) so consumers only need to import from @soulcraft/sdk.
7
+ *
8
+ * The HallModule interface defines the sdk.hall namespace exposed on SoulcraftSDK.
9
+ * Hall is server-only — the HallServer runs in-process with the product backend,
10
+ * and the SDK provides handler factories that products mount as WebSocket routes.
11
+ *
12
+ * @see createHallRoomHandler in @soulcraft/sdk/server for the signaling handler.
13
+ * @see @soulcraft/hall for the NAPI implementation.
14
+ */
15
+ export type { HallConfig, RoomOptions, RecordingManifest, ConceptEvent, RelationProposedEvent, AttentionEvent, RoomEventMap, } from '@soulcraft/hall';
16
+ export type { Room, HallServer } from '@soulcraft/hall';
17
+ /**
18
+ * @description The sdk.hall namespace on SoulcraftSDK (server mode only).
19
+ *
20
+ * Provides access to the running HallServer instance and room management utilities.
21
+ * In server mode, the SDK manages one HallServer per process. Products call
22
+ * createRoom/getRoom directly, then mount the signaling handler returned by
23
+ * createHallRoomHandler() at their WebSocket route.
24
+ */
25
+ export interface HallModule {
26
+ /**
27
+ * Creates a new room with the given ID and options. Errors if a room with the
28
+ * same ID already exists — check with getRoom() first.
29
+ * @param roomId - Unique room identifier (e.g. Brainy session entity ID).
30
+ * @param options - Room creation options (max peers, transcription, recording, etc.).
31
+ * @returns The Room instance, ready for peer connections.
32
+ */
33
+ createRoom(roomId: string, options: import('@soulcraft/hall').RoomOptions): Promise<import('@soulcraft/hall').Room>;
34
+ /**
35
+ * Returns an existing room by ID, or null if it does not exist.
36
+ * @param roomId - The room ID to look up.
37
+ * @returns The Room or null.
38
+ */
39
+ getRoom(roomId: string): Promise<import('@soulcraft/hall').Room | null>;
40
+ /**
41
+ * Close a specific room and disconnect all its peers.
42
+ * @param roomId - The room ID to close.
43
+ */
44
+ closeRoom(roomId: string): Promise<void>;
45
+ /**
46
+ * Return IDs of all currently active rooms.
47
+ * @returns Array of room ID strings.
48
+ */
49
+ roomIds(): Promise<string[]>;
50
+ /**
51
+ * Shuts down the Hall server and all active rooms, releasing NAPI resources.
52
+ * Called automatically by sdk.shutdown() in server mode.
53
+ */
54
+ close(): Promise<void>;
55
+ }
56
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/modules/hall/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,YAAY,EACV,UAAU,EACV,WAAW,EACX,iBAAiB,EACjB,YAAY,EACZ,qBAAqB,EACrB,cAAc,EACd,YAAY,GACb,MAAM,iBAAiB,CAAA;AAExB,YAAY,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEvD;;;;;;;GAOG;AACH,MAAM,WAAW,UAAU;IACzB;;;;;;OAMG;IACH,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,iBAAiB,EAAE,WAAW,GAAG,OAAO,CAAC,OAAO,iBAAiB,EAAE,IAAI,CAAC,CAAA;IAEnH;;;;OAIG;IACH,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,iBAAiB,EAAE,IAAI,GAAG,IAAI,CAAC,CAAA;IAEvE;;;OAGG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAExC;;;OAGG;IACH,OAAO,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAAA;IAE5B;;;OAGG;IACH,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;CACvB"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @module modules/hall/types
3
+ * @description Hall module types for @soulcraft/sdk.
4
+ *
5
+ * Re-exports the full public API surface of @soulcraft/hall (HallServer, Room, and all
6
+ * supporting types) so consumers only need to import from @soulcraft/sdk.
7
+ *
8
+ * The HallModule interface defines the sdk.hall namespace exposed on SoulcraftSDK.
9
+ * Hall is server-only — the HallServer runs in-process with the product backend,
10
+ * and the SDK provides handler factories that products mount as WebSocket routes.
11
+ *
12
+ * @see createHallRoomHandler in @soulcraft/sdk/server for the signaling handler.
13
+ * @see @soulcraft/hall for the NAPI implementation.
14
+ */
15
+ export {};
16
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/modules/hall/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @module kits/types
3
+ * @description Type definitions for sdk.kits.*
4
+ * Implementation: Phase 4 per ADR-001.
5
+ */
6
+ export type {};
7
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/modules/kits/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,YAAY,EAAE,CAAA"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @module kits/types
3
+ * @description Type definitions for sdk.kits.*
4
+ * Implementation: Phase 4 per ADR-001.
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/modules/kits/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @module license/types
3
+ * @description Type definitions for sdk.license.*
4
+ * Implementation: Phase 3 per ADR-001.
5
+ */
6
+ export type {};
7
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/modules/license/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,YAAY,EAAE,CAAA"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @module license/types
3
+ * @description Type definitions for sdk.license.*
4
+ * Implementation: Phase 3 per ADR-001.
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/modules/license/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @module notifications/types
3
+ * @description Type definitions for sdk.notifications.*
4
+ * Implementation: Phase 5 per ADR-001.
5
+ */
6
+ export type {};
7
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/modules/notifications/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,YAAY,EAAE,CAAA"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @module notifications/types
3
+ * @description Type definitions for sdk.notifications.*
4
+ * Implementation: Phase 5 per ADR-001.
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/modules/notifications/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
@@ -0,0 +1,60 @@
1
+ /**
2
+ * @module modules/skills
3
+ * @description Skill loading and registry for @soulcraft/sdk.
4
+ *
5
+ * Skills are SKILL.md files that define an AI persona, capabilities, and workflow
6
+ * for a kit domain. This module provides a unified `load()`/`list()`/`install()`
7
+ * API backed by two sources:
8
+ *
9
+ * 1. **VFS** (priority) — `/skills/{kitId}/{skillId}.md` in the Brainy VFS.
10
+ * Managed at runtime via `install()` or the kit initialization pipeline.
11
+ * 2. **Bundled** (fallback) — skills shipped with `@soulcraft/kits`.
12
+ * Loaded dynamically via `require` so the kits package is an optional dependency.
13
+ *
14
+ * ## VFS path convention
15
+ * ```
16
+ * /skills/{kitId}/{skillId}.md
17
+ * ```
18
+ * Example: `/skills/wicks-and-whiskers/inventory-health.md`
19
+ *
20
+ * ## Bundled fallback
21
+ *
22
+ * If `@soulcraft/kits` is installed, `skillRegistry[kitId]` is a Record mapping
23
+ * skill IDs to their raw SKILL.md content strings. The skills module reads from
24
+ * this registry when VFS lookup misses. If `@soulcraft/kits` is not installed,
25
+ * bundled lookup silently returns nothing.
26
+ */
27
+ import type { Brainy } from '@soulcraft/brainy';
28
+ import type { SkillsModule } from './types.js';
29
+ /**
30
+ * Options for {@link createSkillsModule}.
31
+ */
32
+ export interface CreateSkillsModuleOptions {
33
+ /**
34
+ * Override the bundled skill registry.
35
+ *
36
+ * When provided, this is used instead of the `@soulcraft/kits` package registry.
37
+ * Primarily used in tests to avoid requiring the kits package to be installed.
38
+ */
39
+ bundledRegistry?: Record<string, Record<string, string>> | null;
40
+ }
41
+ /**
42
+ * Creates a `SkillsModule` backed by a Brainy VFS instance and the bundled
43
+ * `@soulcraft/kits` skill registry.
44
+ *
45
+ * @param brain - An initialized Brainy instance. Required for VFS operations.
46
+ * Pass `null` to disable VFS skill loading (bundled registry only).
47
+ * @param options - Optional configuration including a registry override for tests.
48
+ * @returns A configured {@link SkillsModule}.
49
+ *
50
+ * @example
51
+ * ```typescript
52
+ * const brain = await pool.forUser(user.emailHash, workspaceId)
53
+ * const skills = createSkillsModule(brain)
54
+ *
55
+ * const skill = await skills.load('inventory-health', 'wicks-and-whiskers')
56
+ * ```
57
+ */
58
+ export declare function createSkillsModule(brain: Brainy | null, options?: CreateSkillsModuleOptions): SkillsModule;
59
+ export type { SkillsModule, Skill, SkillListOptions, SkillInstallOptions, } from './types.js';
60
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/skills/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAgD,MAAM,YAAY,CAAA;AAS5F;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC;;;;;OAKG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,IAAI,CAAA;CAChE;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,MAAM,GAAG,IAAI,EACpB,OAAO,GAAE,yBAA8B,GACtC,YAAY,CAgDd;AAmLD,YAAY,EACV,YAAY,EACZ,KAAK,EACL,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,YAAY,CAAA"}