@soulcraft/sdk 3.1.0 → 3.2.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.
- package/dist/client/index.d.ts +1 -0
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +2 -0
- package/dist/client/index.js.map +1 -1
- package/dist/modules/kits/index.d.ts +45 -14
- package/dist/modules/kits/index.d.ts.map +1 -1
- package/dist/modules/kits/index.js +359 -35
- package/dist/modules/kits/index.js.map +1 -1
- package/dist/modules/kits/types.d.ts +133 -38
- package/dist/modules/kits/types.d.ts.map +1 -1
- package/dist/modules/kits/types.js +15 -5
- package/dist/modules/kits/types.js.map +1 -1
- package/dist/venue/index.d.ts +11 -7
- package/dist/venue/index.d.ts.map +1 -1
- package/dist/venue/index.js +11 -7
- package/dist/venue/index.js.map +1 -1
- package/dist/venue/proxy.d.ts +54 -0
- package/dist/venue/proxy.d.ts.map +1 -0
- package/dist/venue/proxy.js +326 -0
- package/dist/venue/proxy.js.map +1 -0
- package/package.json +1 -1
|
@@ -2,12 +2,22 @@
|
|
|
2
2
|
* @module kits/types
|
|
3
3
|
* @description Type definitions for sdk.kits.* — the kit loader and registry module.
|
|
4
4
|
*
|
|
5
|
-
* Kits
|
|
6
|
-
* and
|
|
7
|
-
* workflow. They contain no TypeScript logic, no server
|
|
5
|
+
* Kits are pure configuration packages: `kit.json` manifests, `SKILL.md` prompt
|
|
6
|
+
* files, template files, and optional station bundles that describe a domain,
|
|
7
|
+
* persona, glossary, and workflow. They contain no TypeScript logic, no server
|
|
8
|
+
* code, and no SDK imports.
|
|
8
9
|
*
|
|
9
|
-
* The `KitsModule` provides read-only access to the kit registry
|
|
10
|
-
*
|
|
10
|
+
* The `KitsModule` provides read-only access to the kit registry. It supports
|
|
11
|
+
* two backing stores:
|
|
12
|
+
*
|
|
13
|
+
* 1. **Registry mode** — when `registryUrl` is provided, kits are fetched from
|
|
14
|
+
* the Forge Kit Registry (`forge.soulcraft.com`) over HTTP. Archives (.sck)
|
|
15
|
+
* are unpacked to a local disk cache for filesystem access. ETag-based cache
|
|
16
|
+
* validation avoids re-downloading unchanged kits.
|
|
17
|
+
*
|
|
18
|
+
* 2. **Bundled mode** (legacy) — when no `registryUrl` is provided, kits are
|
|
19
|
+
* loaded from the `@soulcraft/kits` npm package via `createRequire()`. This
|
|
20
|
+
* is the backwards-compatible fallback used during migration.
|
|
11
21
|
*
|
|
12
22
|
* Kit initialization (populating a workspace's Brainy and VFS from a kit's
|
|
13
23
|
* `starterFiles`) is a product-level concern and lives in each product's
|
|
@@ -49,14 +59,94 @@ export interface SoulcraftKitConfig {
|
|
|
49
59
|
[key: string]: unknown;
|
|
50
60
|
}
|
|
51
61
|
/**
|
|
52
|
-
*
|
|
53
|
-
*
|
|
62
|
+
* Internal cache entry for a kit fetched from the registry.
|
|
63
|
+
* Stored in-memory with its ETag for conditional revalidation.
|
|
64
|
+
*/
|
|
65
|
+
export interface CachedKitEntry {
|
|
66
|
+
/** Parsed kit.json manifest. */
|
|
67
|
+
manifest: SoulcraftKitConfig;
|
|
68
|
+
/** ETag from the registry for conditional requests (If-None-Match). */
|
|
69
|
+
etag: string | null;
|
|
70
|
+
/** Absolute path to the unpacked kit directory on local disk. */
|
|
71
|
+
localPath: string;
|
|
72
|
+
/** Timestamp (ms) when this entry was last fetched or validated. */
|
|
73
|
+
fetchedAt: number;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Options for `createKitsModule()`.
|
|
77
|
+
*
|
|
78
|
+
* Two modes of operation:
|
|
79
|
+
*
|
|
80
|
+
* **Registry mode** — set `registryUrl` to fetch kits from the Forge Kit Registry.
|
|
81
|
+
* The SDK downloads `.sck` archives, unpacks them to `cachePath`, and serves
|
|
82
|
+
* filesystem paths from the local cache. ETag-based revalidation avoids
|
|
83
|
+
* re-downloading unchanged kits.
|
|
84
|
+
*
|
|
85
|
+
* **Bundled mode** (legacy) — omit `registryUrl` to load kits from the
|
|
86
|
+
* `@soulcraft/kits` npm package. This is the backwards-compatible default
|
|
87
|
+
* used during migration. Set `bundledRegistry` to inject a mock registry
|
|
88
|
+
* for testing.
|
|
89
|
+
*
|
|
90
|
+
* @example Registry mode (production)
|
|
91
|
+
* ```typescript
|
|
92
|
+
* const kits = createKitsModule({
|
|
93
|
+
* registryUrl: 'https://forge.soulcraft.com',
|
|
94
|
+
* cachePath: '/home/app/.soulcraft/kits-cache',
|
|
95
|
+
* })
|
|
96
|
+
* ```
|
|
97
|
+
*
|
|
98
|
+
* @example Bundled mode (legacy)
|
|
99
|
+
* ```typescript
|
|
100
|
+
* const kits = createKitsModule() // uses @soulcraft/kits if installed
|
|
101
|
+
* ```
|
|
102
|
+
*
|
|
103
|
+
* @example Test mode
|
|
104
|
+
* ```typescript
|
|
105
|
+
* const kits = createKitsModule({
|
|
106
|
+
* bundledRegistry: { 'test-kit': { id: 'test-kit', name: 'Test', ... } }
|
|
107
|
+
* })
|
|
108
|
+
* ```
|
|
54
109
|
*/
|
|
55
110
|
export interface CreateKitsModuleOptions {
|
|
56
111
|
/**
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
* the
|
|
112
|
+
* Base URL of the Forge Kit Registry (e.g. `'https://forge.soulcraft.com'`).
|
|
113
|
+
*
|
|
114
|
+
* When set, the module operates in **registry mode**: kits are fetched over
|
|
115
|
+
* HTTP, cached locally as unpacked `.sck` archives, and revalidated via ETags.
|
|
116
|
+
* The `@soulcraft/kits` npm package is not needed.
|
|
117
|
+
*
|
|
118
|
+
* When omitted, the module falls back to **bundled mode** using the
|
|
119
|
+
* `@soulcraft/kits` package.
|
|
120
|
+
*/
|
|
121
|
+
registryUrl?: string;
|
|
122
|
+
/**
|
|
123
|
+
* Absolute path to the local disk cache for unpacked kit archives.
|
|
124
|
+
*
|
|
125
|
+
* Defaults to `~/.soulcraft/kits-cache` when `registryUrl` is set.
|
|
126
|
+
* Each kit is stored at `{cachePath}/{kitId}/` with its full directory tree.
|
|
127
|
+
*
|
|
128
|
+
* **Important:** This path must NOT be inside a Brainy data directory to
|
|
129
|
+
* avoid interfering with entity storage and indexing.
|
|
130
|
+
*/
|
|
131
|
+
cachePath?: string;
|
|
132
|
+
/**
|
|
133
|
+
* Cache freshness duration in milliseconds.
|
|
134
|
+
*
|
|
135
|
+
* When a kit is loaded, the SDK checks if the cached copy is younger than
|
|
136
|
+
* this TTL. If so, it returns the cached manifest without a network request.
|
|
137
|
+
* When the TTL expires, the SDK sends an `If-None-Match` request — if the
|
|
138
|
+
* registry returns 304, the cache is refreshed without re-downloading.
|
|
139
|
+
*
|
|
140
|
+
* Defaults to `300_000` (5 minutes).
|
|
141
|
+
*/
|
|
142
|
+
cacheTtlMs?: number;
|
|
143
|
+
/**
|
|
144
|
+
* Override the kit registry with a static in-memory map. Used in tests to
|
|
145
|
+
* avoid both the registry and the `@soulcraft/kits` package.
|
|
146
|
+
*
|
|
147
|
+
* Set to `null` to simulate no kits being available.
|
|
148
|
+
*
|
|
149
|
+
* **Note:** When `bundledRegistry` is set, `registryUrl` is ignored.
|
|
60
150
|
*/
|
|
61
151
|
bundledRegistry?: Record<string, SoulcraftKitConfig> | null;
|
|
62
152
|
}
|
|
@@ -64,10 +154,14 @@ export interface CreateKitsModuleOptions {
|
|
|
64
154
|
* The `sdk.kits.*` namespace — read-only access to the Soulcraft kit registry
|
|
65
155
|
* and template file paths.
|
|
66
156
|
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
157
|
+
* In **registry mode** (recommended), kits are fetched from the Forge Kit
|
|
158
|
+
* Registry at `forge.soulcraft.com`, cached locally, and served from disk.
|
|
159
|
+
* In **bundled mode** (legacy), kits are loaded from the `@soulcraft/kits`
|
|
160
|
+
* npm package.
|
|
161
|
+
*
|
|
162
|
+
* The interface is identical in both modes — callers don't know or care
|
|
163
|
+
* where kits come from. The `registryUrl` option in `createKitsModule()`
|
|
164
|
+
* controls the backing store.
|
|
71
165
|
*
|
|
72
166
|
* @example Load a kit and run AI with its persona
|
|
73
167
|
* ```typescript
|
|
@@ -83,14 +177,17 @@ export interface CreateKitsModuleOptions {
|
|
|
83
177
|
* @example Locate kit template files on disk
|
|
84
178
|
* ```typescript
|
|
85
179
|
* const dir = await sdk.kits.resolveFilesPath('blog-series', 'workshop')
|
|
86
|
-
* //
|
|
180
|
+
* // Registry mode: '~/.soulcraft/kits-cache/blog-series/workshop/files'
|
|
181
|
+
* // Bundled mode: '/path/to/node_modules/@soulcraft/kits/kits/blog-series/workshop/files'
|
|
87
182
|
* ```
|
|
88
183
|
*/
|
|
89
184
|
export interface KitsModule {
|
|
90
185
|
/**
|
|
91
186
|
* Load a single kit configuration by ID.
|
|
92
187
|
*
|
|
93
|
-
*
|
|
188
|
+
* In registry mode, this fetches the manifest from the registry (or returns
|
|
189
|
+
* a cached copy if within the TTL). In bundled mode, it reads from the
|
|
190
|
+
* `@soulcraft/kits` package.
|
|
94
191
|
*
|
|
95
192
|
* @param kitId - The kit identifier (e.g. `'wicks-and-whiskers'`).
|
|
96
193
|
* @returns The kit configuration, or `null` if not found.
|
|
@@ -105,69 +202,67 @@ export interface KitsModule {
|
|
|
105
202
|
/**
|
|
106
203
|
* List all available kits from the registry.
|
|
107
204
|
*
|
|
108
|
-
*
|
|
205
|
+
* In registry mode, this fetches the full kit listing from the registry.
|
|
206
|
+
* In bundled mode, it returns all kits from the `@soulcraft/kits` package.
|
|
109
207
|
*
|
|
110
208
|
* @returns All kit configurations as an array.
|
|
111
209
|
*
|
|
112
210
|
* @example
|
|
113
211
|
* ```typescript
|
|
114
212
|
* const kits = await sdk.kits.list()
|
|
115
|
-
* console.log(kits.
|
|
213
|
+
* console.log(`${kits.length} kits available`)
|
|
116
214
|
* ```
|
|
117
215
|
*/
|
|
118
216
|
list(): Promise<SoulcraftKitConfig[]>;
|
|
119
217
|
/**
|
|
120
218
|
* Resolve the absolute path to a kit's product-specific template files directory.
|
|
121
219
|
*
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
*
|
|
220
|
+
* In registry mode, the path points into the local cache at
|
|
221
|
+
* `{cachePath}/{kitId}/{product}/files/`. The kit is downloaded and unpacked
|
|
222
|
+
* if not already cached. In bundled mode, the path points into the npm package.
|
|
125
223
|
*
|
|
126
|
-
*
|
|
127
|
-
* Use it instead of hard-coding `node_modules` paths or maintaining per-product
|
|
128
|
-
* filesystem layouts.
|
|
224
|
+
* Returns `null` if the kit is not found or the files directory doesn't exist.
|
|
129
225
|
*
|
|
130
|
-
* @param kitId - Kit identifier (e.g. `'blog-series'
|
|
226
|
+
* @param kitId - Kit identifier (e.g. `'blog-series'`).
|
|
131
227
|
* @param product - Product consuming the files: `'workshop'` or `'venue'`.
|
|
132
|
-
* @returns Absolute path to the files directory, or `null` if
|
|
228
|
+
* @returns Absolute path to the files directory, or `null` if not found.
|
|
133
229
|
*
|
|
134
230
|
* @example
|
|
135
231
|
* ```typescript
|
|
136
232
|
* const dir = await sdk.kits.resolveFilesPath('blog-series', 'workshop')
|
|
137
|
-
* // → '
|
|
233
|
+
* // → '~/.soulcraft/kits-cache/blog-series/workshop/files'
|
|
138
234
|
* ```
|
|
139
235
|
*/
|
|
140
236
|
resolveFilesPath(kitId: string, product: 'workshop' | 'venue'): Promise<string | null>;
|
|
141
237
|
/**
|
|
142
238
|
* Resolve the absolute path to a kit's skills directory.
|
|
143
239
|
*
|
|
144
|
-
*
|
|
145
|
-
*
|
|
240
|
+
* In registry mode, the path points into the local cache at
|
|
241
|
+
* `{cachePath}/{kitId}/skills/`. In bundled mode, the path points into
|
|
242
|
+
* the npm package.
|
|
146
243
|
*
|
|
147
244
|
* @param kitId - Kit identifier.
|
|
148
|
-
* @returns Absolute path to the skills directory, or `null` if
|
|
245
|
+
* @returns Absolute path to the skills directory, or `null` if not found.
|
|
149
246
|
*
|
|
150
247
|
* @example
|
|
151
248
|
* ```typescript
|
|
152
249
|
* const dir = await sdk.kits.resolveSkillsPath('blog-series')
|
|
153
|
-
* // → '
|
|
250
|
+
* // → '~/.soulcraft/kits-cache/blog-series/skills'
|
|
154
251
|
* ```
|
|
155
252
|
*/
|
|
156
253
|
resolveSkillsPath(kitId: string): Promise<string | null>;
|
|
157
254
|
/**
|
|
158
|
-
* Resolve the absolute path to the root
|
|
159
|
-
*
|
|
160
|
-
* Useful when enumerating all available kits on the filesystem rather than relying
|
|
161
|
-
* on the `kitRegistry` in-memory list (e.g. build tooling, validators).
|
|
255
|
+
* Resolve the absolute path to the root kits cache or package directory.
|
|
162
256
|
*
|
|
163
|
-
*
|
|
257
|
+
* In registry mode, returns the `cachePath` directory. In bundled mode,
|
|
258
|
+
* returns the `kits/` directory inside the npm package.
|
|
164
259
|
*
|
|
165
|
-
* @returns Absolute path to the
|
|
260
|
+
* @returns Absolute path to the kits root, or `null` if unavailable.
|
|
166
261
|
*
|
|
167
262
|
* @example
|
|
168
263
|
* ```typescript
|
|
169
264
|
* const root = await sdk.kits.resolveKitsRoot()
|
|
170
|
-
* // → '
|
|
265
|
+
* // → '~/.soulcraft/kits-cache'
|
|
171
266
|
* ```
|
|
172
267
|
*/
|
|
173
268
|
resolveKitsRoot(): Promise<string | null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/modules/kits/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/modules/kits/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAMH;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IACjC,qFAAqF;IACrF,EAAE,EAAE,MAAM,CAAA;IACV,+BAA+B;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,wDAAwD;IACxD,WAAW,EAAE,MAAM,CAAA;IACnB,gDAAgD;IAChD,OAAO,EAAE,MAAM,CAAA;IACf,6BAA6B;IAC7B,IAAI,EAAE,OAAO,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,GAAG,WAAW,CAAA;IAC3D,0CAA0C;IAC1C,MAAM,CAAC,EAAE;QACP,gCAAgC;QAChC,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,+CAA+C;QAC/C,WAAW,CAAC,EAAE,KAAK,CAAC;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAA;SAAE,CAAC,CAAA;KACvD,CAAA;IACD,wDAAwD;IACxD,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB;AAMD;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,gCAAgC;IAChC,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,uEAAuE;IACvE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,iEAAiE;IACjE,SAAS,EAAE,MAAM,CAAA;IACjB,oEAAoE;IACpE,SAAS,EAAE,MAAM,CAAA;CAClB;AAMD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;;;;;;;OASG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;;;;;;;;OASG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IAEnB;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,GAAG,IAAI,CAAA;CAC5D;AAMD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,WAAW,UAAU;IACzB;;;;;;;;;;;;;;;OAeG;IACH,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC,CAAA;IAEvD;;;;;;;;;;;;;OAaG;IACH,IAAI,IAAI,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAA;IAErC;;;;;;;;;;;;;;;;;;OAkBG;IACH,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,GAAG,OAAO,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;IAEtF;;;;;;;;;;;;;;;OAeG;IACH,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;IAExD;;;;;;;;;;;;;OAaG;IACH,eAAe,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;CAC1C"}
|
|
@@ -2,12 +2,22 @@
|
|
|
2
2
|
* @module kits/types
|
|
3
3
|
* @description Type definitions for sdk.kits.* — the kit loader and registry module.
|
|
4
4
|
*
|
|
5
|
-
* Kits
|
|
6
|
-
* and
|
|
7
|
-
* workflow. They contain no TypeScript logic, no server
|
|
5
|
+
* Kits are pure configuration packages: `kit.json` manifests, `SKILL.md` prompt
|
|
6
|
+
* files, template files, and optional station bundles that describe a domain,
|
|
7
|
+
* persona, glossary, and workflow. They contain no TypeScript logic, no server
|
|
8
|
+
* code, and no SDK imports.
|
|
8
9
|
*
|
|
9
|
-
* The `KitsModule` provides read-only access to the kit registry
|
|
10
|
-
*
|
|
10
|
+
* The `KitsModule` provides read-only access to the kit registry. It supports
|
|
11
|
+
* two backing stores:
|
|
12
|
+
*
|
|
13
|
+
* 1. **Registry mode** — when `registryUrl` is provided, kits are fetched from
|
|
14
|
+
* the Forge Kit Registry (`forge.soulcraft.com`) over HTTP. Archives (.sck)
|
|
15
|
+
* are unpacked to a local disk cache for filesystem access. ETag-based cache
|
|
16
|
+
* validation avoids re-downloading unchanged kits.
|
|
17
|
+
*
|
|
18
|
+
* 2. **Bundled mode** (legacy) — when no `registryUrl` is provided, kits are
|
|
19
|
+
* loaded from the `@soulcraft/kits` npm package via `createRequire()`. This
|
|
20
|
+
* is the backwards-compatible fallback used during migration.
|
|
11
21
|
*
|
|
12
22
|
* Kit initialization (populating a workspace's Brainy and VFS from a kit's
|
|
13
23
|
* `starterFiles`) is a product-level concern and lives in each product's
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/modules/kits/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/modules/kits/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG"}
|
package/dist/venue/index.d.ts
CHANGED
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module @soulcraft/sdk/venue
|
|
3
|
-
* @description
|
|
3
|
+
* @description Type-only entry point for Venue platform service interfaces.
|
|
4
4
|
*
|
|
5
5
|
* Re-exports all typed service interfaces from `./services.ts`. Kit authors
|
|
6
|
-
* and station developers import from this path:
|
|
6
|
+
* and station developers import types from this path:
|
|
7
7
|
*
|
|
8
8
|
* ```ts
|
|
9
9
|
* import type { VenueServicesContext, VenueBookingsService } from '@soulcraft/sdk/venue';
|
|
10
10
|
* ```
|
|
11
11
|
*
|
|
12
|
-
*
|
|
13
|
-
* - `service-proxies.ts` — HTTP proxy implementation (browser)
|
|
14
|
-
* - `sdk/venue/*.ts` — handler implementation (server)
|
|
12
|
+
* For the runtime proxy factory, import from `@soulcraft/sdk/client`:
|
|
15
13
|
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
14
|
+
* ```ts
|
|
15
|
+
* import { createVenueProxy } from '@soulcraft/sdk/client';
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* This follows the SDK's established split:
|
|
19
|
+
* - `@soulcraft/sdk` and `@soulcraft/sdk/venue` — types only, environment-agnostic
|
|
20
|
+
* - `@soulcraft/sdk/client` — browser runtime (transports, proxy factories)
|
|
21
|
+
* - `@soulcraft/sdk/server` — server runtime (RPC handlers, instance pool)
|
|
18
22
|
*/
|
|
19
23
|
export type { VenueServicesContext, DashboardData, VenueDashboardService, VenueSettingsService, VenueThemeService, VenueStationOrderService, BookingSummary, VenueBookingsService, VenueCheckinService, VenueScheduleService, VenueStaffService, VenueExperiencesService, VenueWaiversService, VenuePosService, VenueKittensService, VenueAdoptionsService, VenueMemoriesService, VenueTransactionsService, VenueInventoryService, VenueProductsService, VenueGiftCardsService, VenueLoyaltyService, VenueSubscriptionsService, VenueCustomersService, OrderStatus, OrderFilters, OrderSummary, OrderDetail, VenueOrdersService, VenueCartService, FulfillmentStatus, FulfillmentFilters, VenueFulfillmentService, DiscountType, VenueDiscountsService, VenueContentService, VenueBlogService, VenuePartnersService, CmsPageMeta, VenuePagesService, BlueprintField, BlueprintSection, BlueprintDefinition, VenueBlueprintsService, BlockTypeDefinition, VenueBlocksService, MediaItem, MediaFilters, VenueMediaService, VenueAnalyticsService, VenueAuditService, VenueFinancialsService, VenueDomainsService, VenueWebhooksService, VenueScheduledJobsService, VenueDeploymentsService, VenueFranchiseService, VenueKitsService, VenueBillingService, EntityFilters, VenueEntitiesService, } from './services.js';
|
|
20
24
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/venue/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/venue/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,YAAY,EAEX,oBAAoB,EAGpB,aAAa,EACb,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,wBAAwB,EAGxB,cAAc,EACd,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,uBAAuB,EACvB,mBAAmB,EACnB,eAAe,EACf,mBAAmB,EACnB,qBAAqB,EACrB,oBAAoB,EAGpB,wBAAwB,EACxB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,yBAAyB,EACzB,qBAAqB,EACrB,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,uBAAuB,EACvB,YAAY,EACZ,qBAAqB,EAGrB,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,EACpB,WAAW,EACX,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EACnB,kBAAkB,EAClB,SAAS,EACT,YAAY,EACZ,iBAAiB,EAGjB,qBAAqB,EACrB,iBAAiB,EACjB,sBAAsB,EACtB,mBAAmB,EACnB,oBAAoB,EACpB,yBAAyB,EACzB,uBAAuB,EACvB,qBAAqB,EACrB,gBAAgB,EAChB,mBAAmB,EAGnB,aAAa,EACb,oBAAoB,GACpB,MAAM,eAAe,CAAC"}
|
package/dist/venue/index.js
CHANGED
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module @soulcraft/sdk/venue
|
|
3
|
-
* @description
|
|
3
|
+
* @description Type-only entry point for Venue platform service interfaces.
|
|
4
4
|
*
|
|
5
5
|
* Re-exports all typed service interfaces from `./services.ts`. Kit authors
|
|
6
|
-
* and station developers import from this path:
|
|
6
|
+
* and station developers import types from this path:
|
|
7
7
|
*
|
|
8
8
|
* ```ts
|
|
9
9
|
* import type { VenueServicesContext, VenueBookingsService } from '@soulcraft/sdk/venue';
|
|
10
10
|
* ```
|
|
11
11
|
*
|
|
12
|
-
*
|
|
13
|
-
* - `service-proxies.ts` — HTTP proxy implementation (browser)
|
|
14
|
-
* - `sdk/venue/*.ts` — handler implementation (server)
|
|
12
|
+
* For the runtime proxy factory, import from `@soulcraft/sdk/client`:
|
|
15
13
|
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
14
|
+
* ```ts
|
|
15
|
+
* import { createVenueProxy } from '@soulcraft/sdk/client';
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* This follows the SDK's established split:
|
|
19
|
+
* - `@soulcraft/sdk` and `@soulcraft/sdk/venue` — types only, environment-agnostic
|
|
20
|
+
* - `@soulcraft/sdk/client` — browser runtime (transports, proxy factories)
|
|
21
|
+
* - `@soulcraft/sdk/server` — server runtime (RPC handlers, instance pool)
|
|
18
22
|
*/
|
|
19
23
|
export {};
|
|
20
24
|
//# sourceMappingURL=index.js.map
|
package/dist/venue/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/venue/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/venue/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module @soulcraft/sdk/venue/proxy
|
|
3
|
+
* @description Transport-agnostic proxy factory for the Venue service surface.
|
|
4
|
+
*
|
|
5
|
+
* Creates a fully typed {@link VenueServicesContext} backed by any
|
|
6
|
+
* {@link NamespaceTransport}. Consumers call typed methods like
|
|
7
|
+
* `services.bookings.list('2026-03-20')` — the proxy serializes each call as
|
|
8
|
+
* `transport.callNs('venue', 'listBookings', ['2026-03-20'])`.
|
|
9
|
+
*
|
|
10
|
+
* This design makes transport selection a deployment decision, not a code decision:
|
|
11
|
+
*
|
|
12
|
+
* ```ts
|
|
13
|
+
* // HTTP (default for browser stations)
|
|
14
|
+
* const services = createVenueProxy(httpTransport);
|
|
15
|
+
*
|
|
16
|
+
* // WebSocket (default for real-time stations)
|
|
17
|
+
* const services = createVenueProxy(wsTransport);
|
|
18
|
+
*
|
|
19
|
+
* // Local (same process — zero overhead)
|
|
20
|
+
* const services = createVenueProxy(localTransport);
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* Station components never know or care which transport is active. The interface
|
|
24
|
+
* is identical across all three.
|
|
25
|
+
*
|
|
26
|
+
* @see {@link VenueServicesContext} — the typed interface this factory implements
|
|
27
|
+
* @see {@link NamespaceTransport} — the transport abstraction from `@soulcraft/sdk/client`
|
|
28
|
+
*/
|
|
29
|
+
import type { NamespaceTransport } from '../client/namespace-proxy.js';
|
|
30
|
+
import type { VenueServicesContext } from './services.js';
|
|
31
|
+
/**
|
|
32
|
+
* Creates a fully typed {@link VenueServicesContext} backed by a {@link NamespaceTransport}.
|
|
33
|
+
*
|
|
34
|
+
* Every method on the returned object delegates to `transport.callNs('venue', ...)`.
|
|
35
|
+
* The transport handles serialization, authentication, and error surfacing.
|
|
36
|
+
*
|
|
37
|
+
* @param transport - Any {@link NamespaceTransport} implementation (HTTP, WS, local).
|
|
38
|
+
* @returns A complete {@link VenueServicesContext} proxy.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* import { createVenueProxy } from '@soulcraft/sdk/venue';
|
|
43
|
+
* import { HttpNamespaceTransport } from '@soulcraft/sdk/client';
|
|
44
|
+
*
|
|
45
|
+
* const transport = new HttpNamespaceTransport({ baseUrl: 'https://myshop.venue.soulcraft.com' });
|
|
46
|
+
* const services = createVenueProxy(transport);
|
|
47
|
+
*
|
|
48
|
+
* // Full autocomplete and type safety:
|
|
49
|
+
* const { bookings } = await services.bookings.list('2026-03-20');
|
|
50
|
+
* const stats = await services.dashboard.getStats();
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
export declare function createVenueProxy(transport: NamespaceTransport): VenueServicesContext;
|
|
54
|
+
//# sourceMappingURL=proxy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proxy.d.ts","sourceRoot":"","sources":["../../src/venue/proxy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAiB1D;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,kBAAkB,GAAG,oBAAoB,CA6TpF"}
|