@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.
- package/dist/client/index.d.ts +62 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +60 -0
- package/dist/client/index.js.map +1 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -0
- package/dist/modules/ai/index.d.ts +55 -0
- package/dist/modules/ai/index.d.ts.map +1 -0
- package/dist/modules/ai/index.js +263 -0
- package/dist/modules/ai/index.js.map +1 -0
- package/dist/modules/ai/types.d.ts +216 -0
- package/dist/modules/ai/types.d.ts.map +1 -0
- package/dist/modules/ai/types.js +30 -0
- package/dist/modules/ai/types.js.map +1 -0
- package/dist/modules/auth/backchannel.d.ts +85 -0
- package/dist/modules/auth/backchannel.d.ts.map +1 -0
- package/dist/modules/auth/backchannel.js +168 -0
- package/dist/modules/auth/backchannel.js.map +1 -0
- package/dist/modules/auth/config.d.ts +122 -0
- package/dist/modules/auth/config.d.ts.map +1 -0
- package/dist/modules/auth/config.js +158 -0
- package/dist/modules/auth/config.js.map +1 -0
- package/dist/modules/auth/middleware.d.ts +146 -0
- package/dist/modules/auth/middleware.d.ts.map +1 -0
- package/dist/modules/auth/middleware.js +204 -0
- package/dist/modules/auth/middleware.js.map +1 -0
- package/dist/modules/auth/types.d.ts +162 -0
- package/dist/modules/auth/types.d.ts.map +1 -0
- package/dist/modules/auth/types.js +14 -0
- package/dist/modules/auth/types.js.map +1 -0
- package/dist/modules/billing/types.d.ts +7 -0
- package/dist/modules/billing/types.d.ts.map +1 -0
- package/dist/modules/billing/types.js +7 -0
- package/dist/modules/billing/types.js.map +1 -0
- package/dist/modules/brainy/auth.d.ts +104 -0
- package/dist/modules/brainy/auth.d.ts.map +1 -0
- package/dist/modules/brainy/auth.js +144 -0
- package/dist/modules/brainy/auth.js.map +1 -0
- package/dist/modules/brainy/errors.d.ts +118 -0
- package/dist/modules/brainy/errors.d.ts.map +1 -0
- package/dist/modules/brainy/errors.js +142 -0
- package/dist/modules/brainy/errors.js.map +1 -0
- package/dist/modules/brainy/events.d.ts +63 -0
- package/dist/modules/brainy/events.d.ts.map +1 -0
- package/dist/modules/brainy/events.js +14 -0
- package/dist/modules/brainy/events.js.map +1 -0
- package/dist/modules/brainy/proxy.d.ts +48 -0
- package/dist/modules/brainy/proxy.d.ts.map +1 -0
- package/dist/modules/brainy/proxy.js +95 -0
- package/dist/modules/brainy/proxy.js.map +1 -0
- package/dist/modules/brainy/types.d.ts +83 -0
- package/dist/modules/brainy/types.d.ts.map +1 -0
- package/dist/modules/brainy/types.js +21 -0
- package/dist/modules/brainy/types.js.map +1 -0
- package/dist/modules/events/index.d.ts +41 -0
- package/dist/modules/events/index.d.ts.map +1 -0
- package/dist/modules/events/index.js +53 -0
- package/dist/modules/events/index.js.map +1 -0
- package/dist/modules/events/types.d.ts +129 -0
- package/dist/modules/events/types.d.ts.map +1 -0
- package/dist/modules/events/types.js +32 -0
- package/dist/modules/events/types.js.map +1 -0
- package/dist/modules/formats/types.d.ts +7 -0
- package/dist/modules/formats/types.d.ts.map +1 -0
- package/dist/modules/formats/types.js +7 -0
- package/dist/modules/formats/types.js.map +1 -0
- package/dist/modules/hall/types.d.ts +56 -0
- package/dist/modules/hall/types.d.ts.map +1 -0
- package/dist/modules/hall/types.js +16 -0
- package/dist/modules/hall/types.js.map +1 -0
- package/dist/modules/kits/types.d.ts +7 -0
- package/dist/modules/kits/types.d.ts.map +1 -0
- package/dist/modules/kits/types.js +7 -0
- package/dist/modules/kits/types.js.map +1 -0
- package/dist/modules/license/types.d.ts +7 -0
- package/dist/modules/license/types.d.ts.map +1 -0
- package/dist/modules/license/types.js +7 -0
- package/dist/modules/license/types.js.map +1 -0
- package/dist/modules/notifications/types.d.ts +7 -0
- package/dist/modules/notifications/types.d.ts.map +1 -0
- package/dist/modules/notifications/types.js +7 -0
- package/dist/modules/notifications/types.js.map +1 -0
- package/dist/modules/skills/index.d.ts +60 -0
- package/dist/modules/skills/index.d.ts.map +1 -0
- package/dist/modules/skills/index.js +253 -0
- package/dist/modules/skills/index.js.map +1 -0
- package/dist/modules/skills/types.d.ts +127 -0
- package/dist/modules/skills/types.d.ts.map +1 -0
- package/dist/modules/skills/types.js +23 -0
- package/dist/modules/skills/types.js.map +1 -0
- package/dist/modules/versions/types.d.ts +31 -0
- package/dist/modules/versions/types.d.ts.map +1 -0
- package/dist/modules/versions/types.js +9 -0
- package/dist/modules/versions/types.js.map +1 -0
- package/dist/modules/vfs/types.d.ts +26 -0
- package/dist/modules/vfs/types.d.ts.map +1 -0
- package/dist/modules/vfs/types.js +11 -0
- package/dist/modules/vfs/types.js.map +1 -0
- package/dist/server/create-sdk.d.ts +70 -0
- package/dist/server/create-sdk.d.ts.map +1 -0
- package/dist/server/create-sdk.js +125 -0
- package/dist/server/create-sdk.js.map +1 -0
- package/dist/server/hall-handlers.d.ts +195 -0
- package/dist/server/hall-handlers.d.ts.map +1 -0
- package/dist/server/hall-handlers.js +239 -0
- package/dist/server/hall-handlers.js.map +1 -0
- package/dist/server/handlers.d.ts +216 -0
- package/dist/server/handlers.d.ts.map +1 -0
- package/dist/server/handlers.js +214 -0
- package/dist/server/handlers.js.map +1 -0
- package/dist/server/index.d.ts +52 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +50 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/instance-pool.d.ts +299 -0
- package/dist/server/instance-pool.d.ts.map +1 -0
- package/dist/server/instance-pool.js +359 -0
- package/dist/server/instance-pool.js.map +1 -0
- package/dist/transports/http.d.ts +86 -0
- package/dist/transports/http.d.ts.map +1 -0
- package/dist/transports/http.js +134 -0
- package/dist/transports/http.js.map +1 -0
- package/dist/transports/local.d.ts +76 -0
- package/dist/transports/local.d.ts.map +1 -0
- package/dist/transports/local.js +101 -0
- package/dist/transports/local.js.map +1 -0
- package/dist/transports/sse.d.ts +99 -0
- package/dist/transports/sse.d.ts.map +1 -0
- package/dist/transports/sse.js +192 -0
- package/dist/transports/sse.js.map +1 -0
- package/dist/transports/transport.d.ts +68 -0
- package/dist/transports/transport.d.ts.map +1 -0
- package/dist/transports/transport.js +14 -0
- package/dist/transports/transport.js.map +1 -0
- package/dist/transports/ws.d.ts +135 -0
- package/dist/transports/ws.d.ts.map +1 -0
- package/dist/transports/ws.js +331 -0
- package/dist/transports/ws.js.map +1 -0
- package/dist/types.d.ts +152 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +8 -0
- package/dist/types.js.map +1 -0
- package/docs/ADR-001-sdk-design.md +282 -0
- package/docs/IMPLEMENTATION-PLAN.md +708 -0
- package/docs/USAGE.md +646 -0
- package/docs/kit-sdk-guide.md +474 -0
- package/package.json +61 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module transports/http
|
|
3
|
+
* @description HTTP transport — sends Brainy RPC calls as JSON POST requests.
|
|
4
|
+
*
|
|
5
|
+
* Posts to `{baseUrl}/api/brainy/rpc` with body `{ method, args }` and expects
|
|
6
|
+
* `{ result }` or `{ error: { code, message } }` in the response.
|
|
7
|
+
*
|
|
8
|
+
* Works isomorphically in both the browser and server-side Bun/Node environments.
|
|
9
|
+
* Uses `AbortController` for the configurable timeout (default 30 seconds).
|
|
10
|
+
*
|
|
11
|
+
* Change events are not supported by the HTTP transport — use the WebSocket
|
|
12
|
+
* transport (`'ws'`) if real-time push events are required.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```typescript
|
|
16
|
+
* import { createSDK } from '@soulcraft/sdk/client'
|
|
17
|
+
*
|
|
18
|
+
* const sdk = createSDK({
|
|
19
|
+
* mode: 'client',
|
|
20
|
+
* product: 'workshop',
|
|
21
|
+
* transport: 'http',
|
|
22
|
+
* baseUrl: 'https://workshop.soulcraft.com',
|
|
23
|
+
* auth: 'cookie', // send session cookies
|
|
24
|
+
* })
|
|
25
|
+
*
|
|
26
|
+
* const results = await sdk.brainy.find({ query: 'candle kits', limit: 10 })
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
import type { SDKTransport } from './transport.js';
|
|
30
|
+
import type { BrainyChangeEvent } from '../modules/brainy/events.js';
|
|
31
|
+
/**
|
|
32
|
+
* Transport that sends Brainy RPC calls over HTTP POST.
|
|
33
|
+
*
|
|
34
|
+
* Each `call()` invocation is an independent HTTP request.
|
|
35
|
+
* The transport is always considered "alive" — connectivity errors surface
|
|
36
|
+
* as rejected promises from individual calls rather than a persistent state.
|
|
37
|
+
*/
|
|
38
|
+
export declare class HttpTransport implements SDKTransport {
|
|
39
|
+
private readonly rpcUrl;
|
|
40
|
+
private readonly authToken;
|
|
41
|
+
private readonly credentials;
|
|
42
|
+
private readonly timeoutMs;
|
|
43
|
+
/**
|
|
44
|
+
* @param baseUrl - Base URL of the Brainy server, e.g. `'https://workshop.soulcraft.com'`.
|
|
45
|
+
* @param authToken - Optional capability token sent as `Authorization: Bearer <token>`.
|
|
46
|
+
* @param credentials - If `true`, include cookies with each request (same-origin browser use).
|
|
47
|
+
* @param timeoutMs - Request timeout in milliseconds. Default: 30 000.
|
|
48
|
+
*/
|
|
49
|
+
constructor(baseUrl: string, authToken?: string, credentials?: boolean, timeoutMs?: number);
|
|
50
|
+
/**
|
|
51
|
+
* Sends the RPC call as a JSON POST and returns the result.
|
|
52
|
+
*
|
|
53
|
+
* @param method - Dot-separated Brainy method name (e.g. `'find'`, `'vfs.readdir'`).
|
|
54
|
+
* @param args - Positional arguments forwarded to the server.
|
|
55
|
+
* @returns The deserialized return value from Brainy.
|
|
56
|
+
* @throws {@link SDKTimeoutError} if the request exceeds `timeoutMs`.
|
|
57
|
+
* @throws {@link SDKAuthError} on HTTP 401.
|
|
58
|
+
* @throws {@link SDKForbiddenError} on HTTP 403.
|
|
59
|
+
* @throws {@link SDKDisconnectedError} on network failure.
|
|
60
|
+
* @throws {@link SDKRpcError} if the server returns a Brainy-level error.
|
|
61
|
+
*/
|
|
62
|
+
call(method: string, args: unknown[]): Promise<unknown>;
|
|
63
|
+
/**
|
|
64
|
+
* No-op — HTTP transport does not support push change events.
|
|
65
|
+
*
|
|
66
|
+
* Use the WebSocket transport for real-time subscriptions.
|
|
67
|
+
*
|
|
68
|
+
* @param _handler - Unused.
|
|
69
|
+
*/
|
|
70
|
+
onEvent(_handler: (event: BrainyChangeEvent) => void): void;
|
|
71
|
+
/**
|
|
72
|
+
* No-op — no listeners to remove.
|
|
73
|
+
*
|
|
74
|
+
* @param _handler - Unused.
|
|
75
|
+
*/
|
|
76
|
+
offEvent(_handler: (event: BrainyChangeEvent) => void): void;
|
|
77
|
+
/**
|
|
78
|
+
* Always returns `true` — HTTP transport is stateless; errors surface per-call.
|
|
79
|
+
*/
|
|
80
|
+
isAlive(): boolean;
|
|
81
|
+
/**
|
|
82
|
+
* No-op — HTTP transport has no persistent connection to close.
|
|
83
|
+
*/
|
|
84
|
+
close(): Promise<void>;
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=http.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/transports/http.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;AA8BpE;;;;;;GAMG;AACH,qBAAa,aAAc,YAAW,YAAY;IAChD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAQ;IAC/B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAoB;IAC9C,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;IACrC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAQ;IAElC;;;;;OAKG;gBAED,OAAO,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,MAAM,EAClB,WAAW,UAAQ,EACnB,SAAS,SAAS;IAQpB;;;;;;;;;;;OAWG;IACG,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC;IAwC7D;;;;;;OAMG;IACH,OAAO,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,GAAG,IAAI;IAI3D;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,GAAG,IAAI;IAI5D;;OAEG;IACH,OAAO,IAAI,OAAO;IAIlB;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAG7B"}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module transports/http
|
|
3
|
+
* @description HTTP transport — sends Brainy RPC calls as JSON POST requests.
|
|
4
|
+
*
|
|
5
|
+
* Posts to `{baseUrl}/api/brainy/rpc` with body `{ method, args }` and expects
|
|
6
|
+
* `{ result }` or `{ error: { code, message } }` in the response.
|
|
7
|
+
*
|
|
8
|
+
* Works isomorphically in both the browser and server-side Bun/Node environments.
|
|
9
|
+
* Uses `AbortController` for the configurable timeout (default 30 seconds).
|
|
10
|
+
*
|
|
11
|
+
* Change events are not supported by the HTTP transport — use the WebSocket
|
|
12
|
+
* transport (`'ws'`) if real-time push events are required.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```typescript
|
|
16
|
+
* import { createSDK } from '@soulcraft/sdk/client'
|
|
17
|
+
*
|
|
18
|
+
* const sdk = createSDK({
|
|
19
|
+
* mode: 'client',
|
|
20
|
+
* product: 'workshop',
|
|
21
|
+
* transport: 'http',
|
|
22
|
+
* baseUrl: 'https://workshop.soulcraft.com',
|
|
23
|
+
* auth: 'cookie', // send session cookies
|
|
24
|
+
* })
|
|
25
|
+
*
|
|
26
|
+
* const results = await sdk.brainy.find({ query: 'candle kits', limit: 10 })
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
import { SDKDisconnectedError, SDKTimeoutError, SDKAuthError, SDKForbiddenError, SDKRpcError, } from '../modules/brainy/errors.js';
|
|
30
|
+
/**
|
|
31
|
+
* Transport that sends Brainy RPC calls over HTTP POST.
|
|
32
|
+
*
|
|
33
|
+
* Each `call()` invocation is an independent HTTP request.
|
|
34
|
+
* The transport is always considered "alive" — connectivity errors surface
|
|
35
|
+
* as rejected promises from individual calls rather than a persistent state.
|
|
36
|
+
*/
|
|
37
|
+
export class HttpTransport {
|
|
38
|
+
rpcUrl;
|
|
39
|
+
authToken;
|
|
40
|
+
credentials;
|
|
41
|
+
timeoutMs;
|
|
42
|
+
/**
|
|
43
|
+
* @param baseUrl - Base URL of the Brainy server, e.g. `'https://workshop.soulcraft.com'`.
|
|
44
|
+
* @param authToken - Optional capability token sent as `Authorization: Bearer <token>`.
|
|
45
|
+
* @param credentials - If `true`, include cookies with each request (same-origin browser use).
|
|
46
|
+
* @param timeoutMs - Request timeout in milliseconds. Default: 30 000.
|
|
47
|
+
*/
|
|
48
|
+
constructor(baseUrl, authToken, credentials = false, timeoutMs = 30_000) {
|
|
49
|
+
this.rpcUrl = `${baseUrl.replace(/\/$/, '')}/api/brainy/rpc`;
|
|
50
|
+
this.authToken = authToken;
|
|
51
|
+
this.credentials = credentials;
|
|
52
|
+
this.timeoutMs = timeoutMs;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Sends the RPC call as a JSON POST and returns the result.
|
|
56
|
+
*
|
|
57
|
+
* @param method - Dot-separated Brainy method name (e.g. `'find'`, `'vfs.readdir'`).
|
|
58
|
+
* @param args - Positional arguments forwarded to the server.
|
|
59
|
+
* @returns The deserialized return value from Brainy.
|
|
60
|
+
* @throws {@link SDKTimeoutError} if the request exceeds `timeoutMs`.
|
|
61
|
+
* @throws {@link SDKAuthError} on HTTP 401.
|
|
62
|
+
* @throws {@link SDKForbiddenError} on HTTP 403.
|
|
63
|
+
* @throws {@link SDKDisconnectedError} on network failure.
|
|
64
|
+
* @throws {@link SDKRpcError} if the server returns a Brainy-level error.
|
|
65
|
+
*/
|
|
66
|
+
async call(method, args) {
|
|
67
|
+
const abort = new AbortController();
|
|
68
|
+
const timer = setTimeout(() => abort.abort(), this.timeoutMs);
|
|
69
|
+
const headers = { 'Content-Type': 'application/json' };
|
|
70
|
+
if (this.authToken)
|
|
71
|
+
headers['Authorization'] = `Bearer ${this.authToken}`;
|
|
72
|
+
const body = { method, args };
|
|
73
|
+
let response;
|
|
74
|
+
try {
|
|
75
|
+
response = await fetch(this.rpcUrl, {
|
|
76
|
+
method: 'POST',
|
|
77
|
+
headers,
|
|
78
|
+
body: JSON.stringify(body),
|
|
79
|
+
credentials: this.credentials ? 'include' : 'omit',
|
|
80
|
+
signal: abort.signal,
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
catch (err) {
|
|
84
|
+
clearTimeout(timer);
|
|
85
|
+
if (err instanceof DOMException && err.name === 'AbortError') {
|
|
86
|
+
throw new SDKTimeoutError(method);
|
|
87
|
+
}
|
|
88
|
+
throw new SDKDisconnectedError();
|
|
89
|
+
}
|
|
90
|
+
finally {
|
|
91
|
+
clearTimeout(timer);
|
|
92
|
+
}
|
|
93
|
+
if (response.status === 401)
|
|
94
|
+
throw new SDKAuthError();
|
|
95
|
+
if (response.status === 403)
|
|
96
|
+
throw new SDKForbiddenError();
|
|
97
|
+
const json = (await response.json());
|
|
98
|
+
if ('error' in json && json.error) {
|
|
99
|
+
throw new SDKRpcError(json.error.code, json.error.message);
|
|
100
|
+
}
|
|
101
|
+
return json.result;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* No-op — HTTP transport does not support push change events.
|
|
105
|
+
*
|
|
106
|
+
* Use the WebSocket transport for real-time subscriptions.
|
|
107
|
+
*
|
|
108
|
+
* @param _handler - Unused.
|
|
109
|
+
*/
|
|
110
|
+
onEvent(_handler) {
|
|
111
|
+
// HTTP is stateless — no server push; use WsTransport for change events.
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* No-op — no listeners to remove.
|
|
115
|
+
*
|
|
116
|
+
* @param _handler - Unused.
|
|
117
|
+
*/
|
|
118
|
+
offEvent(_handler) {
|
|
119
|
+
// Nothing to remove for HTTP transport.
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Always returns `true` — HTTP transport is stateless; errors surface per-call.
|
|
123
|
+
*/
|
|
124
|
+
isAlive() {
|
|
125
|
+
return true;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* No-op — HTTP transport has no persistent connection to close.
|
|
129
|
+
*/
|
|
130
|
+
async close() {
|
|
131
|
+
// Stateless — no connection to close.
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
//# sourceMappingURL=http.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.js","sourceRoot":"","sources":["../../src/transports/http.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module transports/local
|
|
3
|
+
* @description Local transport — wraps a native Brainy instance with zero overhead.
|
|
4
|
+
*
|
|
5
|
+
* Used server-side when the Brainy instance lives in the same process as the
|
|
6
|
+
* caller. Method calls are dispatched by traversing the Brainy object's property
|
|
7
|
+
* chain (split on `.`) and invoking the resolved function directly — no
|
|
8
|
+
* serialization, no network, no latency.
|
|
9
|
+
*
|
|
10
|
+
* The server-mode `BrainyInstancePool` uses this transport internally: it resolves
|
|
11
|
+
* the correct Brainy instance for the authenticated user/tenant and wraps it in a
|
|
12
|
+
* `LocalTransport` before handing it to the Brainy proxy.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```typescript
|
|
16
|
+
* import { createSDK } from '@soulcraft/sdk/server'
|
|
17
|
+
*
|
|
18
|
+
* // Server mode creates a LocalTransport automatically via the instance pool.
|
|
19
|
+
* const sdk = await createSDK({ mode: 'server', product: 'workshop', ... })
|
|
20
|
+
* const results = await sdk.brainy.find({ query: 'candle kits', limit: 10 })
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
import type { Brainy } from '@soulcraft/brainy';
|
|
24
|
+
import type { SDKTransport } from './transport.js';
|
|
25
|
+
import type { BrainyChangeEvent } from '../modules/brainy/events.js';
|
|
26
|
+
/**
|
|
27
|
+
* Transport that wraps a local Brainy instance with zero overhead.
|
|
28
|
+
*
|
|
29
|
+
* Dispatches calls by splitting the dot-separated method name on `.` and
|
|
30
|
+
* traversing the Brainy object graph. Handles both top-level methods (`'find'`)
|
|
31
|
+
* and sub-API methods (`'vfs.readdir'`, `'versions.list'`).
|
|
32
|
+
*
|
|
33
|
+
* Change events are not emitted by the local transport — mutations are
|
|
34
|
+
* synchronous from the perspective of the in-process caller.
|
|
35
|
+
*/
|
|
36
|
+
export declare class LocalTransport implements SDKTransport {
|
|
37
|
+
private readonly brain;
|
|
38
|
+
/**
|
|
39
|
+
* @param brain - A fully initialized Brainy instance.
|
|
40
|
+
*/
|
|
41
|
+
constructor(brain: Brainy);
|
|
42
|
+
/**
|
|
43
|
+
* Resolves the method via property traversal and calls it with the given args.
|
|
44
|
+
*
|
|
45
|
+
* @param method - Dot-separated path into the Brainy object (e.g. `'vfs.readdir'`).
|
|
46
|
+
* @param args - Positional arguments forwarded to the resolved method.
|
|
47
|
+
* @returns Whatever the Brainy method returns.
|
|
48
|
+
* @throws {@link SDKMethodNotFoundError} if the method path does not resolve to a callable.
|
|
49
|
+
*/
|
|
50
|
+
call(method: string, args: unknown[]): Promise<unknown>;
|
|
51
|
+
/**
|
|
52
|
+
* No-op — local transport does not push change events.
|
|
53
|
+
*
|
|
54
|
+
* In-process mutations are synchronous; subscribers would be notified before
|
|
55
|
+
* the call even returns.
|
|
56
|
+
*
|
|
57
|
+
* @param _handler - Unused.
|
|
58
|
+
*/
|
|
59
|
+
onEvent(_handler: (event: BrainyChangeEvent) => void): void;
|
|
60
|
+
/**
|
|
61
|
+
* No-op — local transport does not push change events.
|
|
62
|
+
*
|
|
63
|
+
* @param _handler - Unused.
|
|
64
|
+
*/
|
|
65
|
+
offEvent(_handler: (event: BrainyChangeEvent) => void): void;
|
|
66
|
+
/**
|
|
67
|
+
* Always returns `true` — the local Brainy instance is always reachable.
|
|
68
|
+
*/
|
|
69
|
+
isAlive(): boolean;
|
|
70
|
+
/**
|
|
71
|
+
* No-op — the local Brainy instance lifecycle is managed by the server's
|
|
72
|
+
* instance pool, not by the transport.
|
|
73
|
+
*/
|
|
74
|
+
close(): Promise<void>;
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=local.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"local.d.ts","sourceRoot":"","sources":["../../src/transports/local.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;AAGpE;;;;;;;;;GASG;AACH,qBAAa,cAAe,YAAW,YAAY;IACjD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAQ;IAE9B;;OAEG;gBACS,KAAK,EAAE,MAAM;IAIzB;;;;;;;OAOG;IACG,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC;IAsB7D;;;;;;;OAOG;IACH,OAAO,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,GAAG,IAAI;IAI3D;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,GAAG,IAAI;IAI5D;;OAEG;IACH,OAAO,IAAI,OAAO;IAIlB;;;OAGG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAG7B"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module transports/local
|
|
3
|
+
* @description Local transport — wraps a native Brainy instance with zero overhead.
|
|
4
|
+
*
|
|
5
|
+
* Used server-side when the Brainy instance lives in the same process as the
|
|
6
|
+
* caller. Method calls are dispatched by traversing the Brainy object's property
|
|
7
|
+
* chain (split on `.`) and invoking the resolved function directly — no
|
|
8
|
+
* serialization, no network, no latency.
|
|
9
|
+
*
|
|
10
|
+
* The server-mode `BrainyInstancePool` uses this transport internally: it resolves
|
|
11
|
+
* the correct Brainy instance for the authenticated user/tenant and wraps it in a
|
|
12
|
+
* `LocalTransport` before handing it to the Brainy proxy.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```typescript
|
|
16
|
+
* import { createSDK } from '@soulcraft/sdk/server'
|
|
17
|
+
*
|
|
18
|
+
* // Server mode creates a LocalTransport automatically via the instance pool.
|
|
19
|
+
* const sdk = await createSDK({ mode: 'server', product: 'workshop', ... })
|
|
20
|
+
* const results = await sdk.brainy.find({ query: 'candle kits', limit: 10 })
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
import { SDKMethodNotFoundError } from '../modules/brainy/errors.js';
|
|
24
|
+
/**
|
|
25
|
+
* Transport that wraps a local Brainy instance with zero overhead.
|
|
26
|
+
*
|
|
27
|
+
* Dispatches calls by splitting the dot-separated method name on `.` and
|
|
28
|
+
* traversing the Brainy object graph. Handles both top-level methods (`'find'`)
|
|
29
|
+
* and sub-API methods (`'vfs.readdir'`, `'versions.list'`).
|
|
30
|
+
*
|
|
31
|
+
* Change events are not emitted by the local transport — mutations are
|
|
32
|
+
* synchronous from the perspective of the in-process caller.
|
|
33
|
+
*/
|
|
34
|
+
export class LocalTransport {
|
|
35
|
+
brain;
|
|
36
|
+
/**
|
|
37
|
+
* @param brain - A fully initialized Brainy instance.
|
|
38
|
+
*/
|
|
39
|
+
constructor(brain) {
|
|
40
|
+
this.brain = brain;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Resolves the method via property traversal and calls it with the given args.
|
|
44
|
+
*
|
|
45
|
+
* @param method - Dot-separated path into the Brainy object (e.g. `'vfs.readdir'`).
|
|
46
|
+
* @param args - Positional arguments forwarded to the resolved method.
|
|
47
|
+
* @returns Whatever the Brainy method returns.
|
|
48
|
+
* @throws {@link SDKMethodNotFoundError} if the method path does not resolve to a callable.
|
|
49
|
+
*/
|
|
50
|
+
async call(method, args) {
|
|
51
|
+
const parts = method.split('.');
|
|
52
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
53
|
+
let target = this.brain;
|
|
54
|
+
for (let i = 0; i < parts.length - 1; i++) {
|
|
55
|
+
const part = parts[i];
|
|
56
|
+
if (part === undefined || typeof target !== 'object' || target === null) {
|
|
57
|
+
throw new SDKMethodNotFoundError(method);
|
|
58
|
+
}
|
|
59
|
+
target = target[part];
|
|
60
|
+
}
|
|
61
|
+
const methodName = parts[parts.length - 1];
|
|
62
|
+
if (methodName === undefined || typeof target[methodName] !== 'function') {
|
|
63
|
+
throw new SDKMethodNotFoundError(method);
|
|
64
|
+
}
|
|
65
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
|
66
|
+
return target[methodName].apply(target, args);
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* No-op — local transport does not push change events.
|
|
70
|
+
*
|
|
71
|
+
* In-process mutations are synchronous; subscribers would be notified before
|
|
72
|
+
* the call even returns.
|
|
73
|
+
*
|
|
74
|
+
* @param _handler - Unused.
|
|
75
|
+
*/
|
|
76
|
+
onEvent(_handler) {
|
|
77
|
+
// Local transport: mutations are synchronous in-process; no push needed.
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* No-op — local transport does not push change events.
|
|
81
|
+
*
|
|
82
|
+
* @param _handler - Unused.
|
|
83
|
+
*/
|
|
84
|
+
offEvent(_handler) {
|
|
85
|
+
// Local transport: nothing to remove.
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Always returns `true` — the local Brainy instance is always reachable.
|
|
89
|
+
*/
|
|
90
|
+
isAlive() {
|
|
91
|
+
return true;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* No-op — the local Brainy instance lifecycle is managed by the server's
|
|
95
|
+
* instance pool, not by the transport.
|
|
96
|
+
*/
|
|
97
|
+
async close() {
|
|
98
|
+
// Instance lifecycle is managed externally by BrainyInstancePool.
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=local.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"local.js","sourceRoot":"","sources":["../../src/transports/local.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAKH,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AAEpE;;;;;;;;;GASG;AACH,MAAM,OAAO,cAAc;IACR,KAAK,CAAQ;IAE9B;;OAEG;IACH,YAAY,KAAa;QACvB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;IACpB,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,IAAI,CAAC,MAAc,EAAE,IAAe;QACxC,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;QAC/B,8DAA8D;QAC9D,IAAI,MAAM,GAAQ,IAAI,CAAC,KAAK,CAAA;QAE5B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YAC1C,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAA;YACrB,IAAI,IAAI,KAAK,SAAS,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,IAAI,EAAE,CAAC;gBACxE,MAAM,IAAI,sBAAsB,CAAC,MAAM,CAAC,CAAA;YAC1C,CAAC;YACD,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,CAAA;QACvB,CAAC;QAED,MAAM,UAAU,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;QAC1C,IAAI,UAAU,KAAK,SAAS,IAAI,OAAO,MAAM,CAAC,UAAU,CAAC,KAAK,UAAU,EAAE,CAAC;YACzE,MAAM,IAAI,sBAAsB,CAAC,MAAM,CAAC,CAAA;QAC1C,CAAC;QAED,6DAA6D;QAC7D,OAAQ,MAAM,CAAC,UAAU,CAAkC,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;IACjF,CAAC;IAED;;;;;;;OAOG;IACH,OAAO,CAAC,QAA4C;QAClD,yEAAyE;IAC3E,CAAC;IAED;;;;OAIG;IACH,QAAQ,CAAC,QAA4C;QACnD,sCAAsC;IACxC,CAAC;IAED;;OAEG;IACH,OAAO;QACL,OAAO,IAAI,CAAA;IACb,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,KAAK;QACT,kEAAkE;IACpE,CAAC;CACF"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module transports/sse
|
|
3
|
+
* @description SSE transport — receives server-pushed platform events via EventSource.
|
|
4
|
+
*
|
|
5
|
+
* Connects to `{baseUrl}/api/workspace/events` using the browser's native
|
|
6
|
+
* `EventSource` API and dispatches typed {@link BrainyChangeEvent} objects to
|
|
7
|
+
* registered listeners.
|
|
8
|
+
*
|
|
9
|
+
* This transport is **receive-only** — it does not support outbound RPC calls.
|
|
10
|
+
* Use it alongside the HTTP transport when you need live VFS and entity change
|
|
11
|
+
* events without the overhead of a persistent WebSocket.
|
|
12
|
+
*
|
|
13
|
+
* `EventSource` handles reconnection natively: the browser automatically
|
|
14
|
+
* retries after a connection drop using the server-sent `retry:` interval.
|
|
15
|
+
* Additional manual backoff is applied on error events to prevent thundering herd.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```typescript
|
|
19
|
+
* import { createSDK } from '@soulcraft/sdk/client'
|
|
20
|
+
*
|
|
21
|
+
* const sdk = createSDK({
|
|
22
|
+
* mode: 'client',
|
|
23
|
+
* product: 'venue',
|
|
24
|
+
* transport: 'sse',
|
|
25
|
+
* baseUrl: 'https://venue.soulcraft.com',
|
|
26
|
+
* })
|
|
27
|
+
*
|
|
28
|
+
* // Subscribe to live data changes (VFS writes, entity mutations, etc.)
|
|
29
|
+
* sdk.brainy.onDataChange((event) => {
|
|
30
|
+
* if (event.event === 'update' && event.entity?.nounType === 'Booking') {
|
|
31
|
+
* refreshBookingList()
|
|
32
|
+
* }
|
|
33
|
+
* })
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
import type { SDKTransport } from './transport.js';
|
|
37
|
+
import type { BrainyChangeEvent } from '../modules/brainy/events.js';
|
|
38
|
+
/**
|
|
39
|
+
* Transport that receives platform change events via Server-Sent Events.
|
|
40
|
+
*
|
|
41
|
+
* RPC calls are not supported — `call()` throws immediately. For outbound
|
|
42
|
+
* operations pair this transport with an `HttpTransport` instance.
|
|
43
|
+
*
|
|
44
|
+
* Connect by calling `connect()`. The underlying `EventSource` will reconnect
|
|
45
|
+
* automatically on drop; `close()` permanently disconnects and prevents reconnects.
|
|
46
|
+
*/
|
|
47
|
+
export declare class SseTransport implements SDKTransport {
|
|
48
|
+
private readonly eventsUrl;
|
|
49
|
+
private readonly workspaceId;
|
|
50
|
+
private eventSource;
|
|
51
|
+
private readonly changeListeners;
|
|
52
|
+
private closed;
|
|
53
|
+
private reconnectAttempts;
|
|
54
|
+
private readonly maxReconnectAttempts;
|
|
55
|
+
private reconnectTimer;
|
|
56
|
+
/**
|
|
57
|
+
* @param baseUrl - Base URL of the SDK server, e.g. `'https://venue.soulcraft.com'`.
|
|
58
|
+
* @param workspaceId - Optional workspace ID added as `?workspaceId=` query param.
|
|
59
|
+
*/
|
|
60
|
+
constructor(baseUrl: string, workspaceId?: string);
|
|
61
|
+
/**
|
|
62
|
+
* Not supported — SSE is a server-push-only transport.
|
|
63
|
+
*
|
|
64
|
+
* @throws {@link SDKError} always.
|
|
65
|
+
*/
|
|
66
|
+
call(_method: string, _args: unknown[]): Promise<unknown>;
|
|
67
|
+
/**
|
|
68
|
+
* Registers a listener for real-time change events received from the server.
|
|
69
|
+
*
|
|
70
|
+
* @param handler - Called with each {@link BrainyChangeEvent} as it arrives.
|
|
71
|
+
*/
|
|
72
|
+
onEvent(handler: (event: BrainyChangeEvent) => void): void;
|
|
73
|
+
/**
|
|
74
|
+
* Removes a previously registered change event listener.
|
|
75
|
+
*
|
|
76
|
+
* @param handler - The same function reference passed to {@link SseTransport.onEvent}.
|
|
77
|
+
*/
|
|
78
|
+
offEvent(handler: (event: BrainyChangeEvent) => void): void;
|
|
79
|
+
/**
|
|
80
|
+
* Returns `true` when the `EventSource` is in the `OPEN` state.
|
|
81
|
+
*/
|
|
82
|
+
isAlive(): boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Permanently closes the SSE connection and cancels any pending reconnect.
|
|
85
|
+
*/
|
|
86
|
+
close(): Promise<void>;
|
|
87
|
+
/**
|
|
88
|
+
* Opens the SSE connection to the server.
|
|
89
|
+
*
|
|
90
|
+
* Idempotent — calling `connect()` when already connected is a no-op.
|
|
91
|
+
* The SDK's `createSDK` client factory calls this automatically when
|
|
92
|
+
* `sdk.connect()` is invoked.
|
|
93
|
+
*/
|
|
94
|
+
connect(): void;
|
|
95
|
+
private _openEventSource;
|
|
96
|
+
private _scheduleReconnect;
|
|
97
|
+
private _clearReconnectTimer;
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=sse.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sse.d.ts","sourceRoot":"","sources":["../../src/transports/sse.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;AAWpE;;;;;;;;GAQG;AACH,qBAAa,YAAa,YAAW,YAAY;IAC/C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAQ;IAClC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAoB;IAChD,OAAO,CAAC,WAAW,CAA2B;IAC9C,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAgD;IAChF,OAAO,CAAC,MAAM,CAAQ;IAEtB,OAAO,CAAC,iBAAiB,CAAI;IAC7B,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAK;IAC1C,OAAO,CAAC,cAAc,CAA6C;IAEnE;;;OAGG;gBACS,OAAO,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM;IASjD;;;;OAIG;IACG,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC;IAO/D;;;;OAIG;IACH,OAAO,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,GAAG,IAAI;IAI1D;;;;OAIG;IACH,QAAQ,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,GAAG,IAAI;IAK3D;;OAEG;IACH,OAAO,IAAI,OAAO;IAIlB;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAW5B;;;;;;OAMG;IACH,OAAO,IAAI,IAAI;IAWf,OAAO,CAAC,gBAAgB;IA8CxB,OAAO,CAAC,kBAAkB;IAiB1B,OAAO,CAAC,oBAAoB;CAM7B"}
|