@pellux/goodvibes-sdk 0.18.48 → 0.18.50
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/README.md +15 -13
- package/dist/_internal/errors/index.d.ts +111 -0
- package/dist/_internal/errors/index.d.ts.map +1 -1
- package/dist/_internal/errors/index.js +128 -0
- package/dist/_internal/platform/auth/index.d.ts +6 -0
- package/dist/_internal/platform/auth/index.d.ts.map +1 -0
- package/dist/_internal/platform/auth/index.js +4 -0
- package/dist/_internal/platform/auth/oauth-client.d.ts +45 -0
- package/dist/_internal/platform/auth/oauth-client.d.ts.map +1 -0
- package/dist/_internal/platform/auth/oauth-client.js +45 -0
- package/dist/_internal/platform/auth/permission-resolver.d.ts +35 -0
- package/dist/_internal/platform/auth/permission-resolver.d.ts.map +1 -0
- package/dist/_internal/platform/auth/permission-resolver.js +57 -0
- package/dist/_internal/platform/auth/session-manager.d.ts +31 -0
- package/dist/_internal/platform/auth/session-manager.d.ts.map +1 -0
- package/dist/_internal/platform/auth/session-manager.js +44 -0
- package/dist/_internal/platform/auth/token-store.d.ts +23 -0
- package/dist/_internal/platform/auth/token-store.d.ts.map +1 -0
- package/dist/_internal/platform/auth/token-store.js +34 -0
- package/dist/_internal/platform/core/orchestrator.d.ts +75 -11
- package/dist/_internal/platform/core/orchestrator.d.ts.map +1 -1
- package/dist/_internal/platform/core/orchestrator.js +29 -8
- package/dist/_internal/platform/version.js +1 -1
- package/dist/_internal/transport-http/http-core.d.ts +2 -0
- package/dist/_internal/transport-http/http-core.d.ts.map +1 -1
- package/dist/_internal/transport-http/http-core.js +29 -2
- package/dist/_internal/transport-http/http.d.ts.map +1 -1
- package/dist/_internal/transport-http/http.js +50 -2
- package/dist/_internal/transport-realtime/domain-events.d.ts +26 -0
- package/dist/_internal/transport-realtime/domain-events.d.ts.map +1 -1
- package/dist/_internal/transport-realtime/domain-events.js +63 -0
- package/dist/_internal/transport-realtime/index.d.ts +2 -2
- package/dist/_internal/transport-realtime/index.d.ts.map +1 -1
- package/dist/_internal/transport-realtime/index.js +2 -2
- package/dist/_internal/transport-realtime/runtime-events.d.ts +27 -1
- package/dist/_internal/transport-realtime/runtime-events.d.ts.map +1 -1
- package/dist/_internal/transport-realtime/runtime-events.js +27 -0
- package/dist/auth.d.ts +77 -0
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +52 -0
- package/dist/browser.d.ts +24 -0
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.js +24 -0
- package/dist/client.d.ts +158 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +22 -0
- package/dist/expo.d.ts +15 -0
- package/dist/expo.d.ts.map +1 -1
- package/dist/expo.js +15 -0
- package/dist/node.d.ts +23 -0
- package/dist/node.d.ts.map +1 -1
- package/dist/node.js +23 -0
- package/dist/react-native.d.ts +27 -0
- package/dist/react-native.d.ts.map +1 -1
- package/dist/react-native.js +27 -0
- package/dist/web.d.ts +13 -0
- package/dist/web.d.ts.map +1 -1
- package/dist/web.js +13 -0
- package/package.json +1 -1
package/dist/react-native.js
CHANGED
|
@@ -8,6 +8,33 @@ function requireReactNativeWebSocket(webSocketImpl) {
|
|
|
8
8
|
}
|
|
9
9
|
return resolved;
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* Create a GoodVibes SDK instance for React Native.
|
|
13
|
+
*
|
|
14
|
+
* Key differences from the browser factory:
|
|
15
|
+
* - Realtime is WebSocket-only (`realtime.runtime()` / `realtime.viaWebSocket()`).
|
|
16
|
+
* SSE is not available in React Native.
|
|
17
|
+
* - Requires a `WebSocket` implementation (e.g. the global provided by the
|
|
18
|
+
* React Native runtime or the `react-native` package). Pass
|
|
19
|
+
* `options.WebSocketImpl` when the global is not available.
|
|
20
|
+
* - Returns `ReactNativeGoodVibesSdk` (extends `GoodVibesSdk` with a
|
|
21
|
+
* React-Native-specific `realtime` namespace).
|
|
22
|
+
*
|
|
23
|
+
* `createExpoGoodVibesSdk` is an alias for this function.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* // Example only: replace baseUrl and authToken with your own values.
|
|
27
|
+
* import { createReactNativeGoodVibesSdk } from '@pellux/goodvibes-sdk/react-native';
|
|
28
|
+
*
|
|
29
|
+
* const sdk = createReactNativeGoodVibesSdk({
|
|
30
|
+
* baseUrl: 'https://daemon.example.com',
|
|
31
|
+
* authToken: await SecureStore.getItemAsync('token'),
|
|
32
|
+
* });
|
|
33
|
+
*
|
|
34
|
+
* const events = sdk.realtime.runtime();
|
|
35
|
+
* events.agents.on('AGENT_SPAWNING', ({ agentId }) => console.log(agentId));
|
|
36
|
+
*/
|
|
37
|
+
export { forSession } from './transport-realtime.js';
|
|
11
38
|
export function createReactNativeGoodVibesSdk(options) {
|
|
12
39
|
const base = createGoodVibesSdk({
|
|
13
40
|
...options,
|
package/dist/web.d.ts
CHANGED
|
@@ -2,5 +2,18 @@ import { type BrowserGoodVibesSdkOptions } from './browser.js';
|
|
|
2
2
|
import type { GoodVibesSdk } from './client.js';
|
|
3
3
|
export interface WebGoodVibesSdkOptions extends BrowserGoodVibesSdkOptions {
|
|
4
4
|
}
|
|
5
|
+
/**
|
|
6
|
+
* Alias for `createBrowserGoodVibesSdk`. Use this entry-point when importing
|
|
7
|
+
* from `@pellux/goodvibes-sdk/web`.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* // Example only: replace with your own auth strategy.
|
|
11
|
+
* import { createWebGoodVibesSdk } from '@pellux/goodvibes-sdk/web';
|
|
12
|
+
*
|
|
13
|
+
* const sdk = createWebGoodVibesSdk({ authToken: myToken });
|
|
14
|
+
* const events = sdk.realtime.viaSse();
|
|
15
|
+
* events.agents.on('AGENT_SPAWNING', ({ agentId }) => console.log(agentId));
|
|
16
|
+
*/
|
|
17
|
+
export { forSession } from './transport-realtime.js';
|
|
5
18
|
export declare function createWebGoodVibesSdk(options?: WebGoodVibesSdkOptions): GoodVibesSdk;
|
|
6
19
|
//# sourceMappingURL=web.d.ts.map
|
package/dist/web.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web.d.ts","sourceRoot":"","sources":["../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,0BAA0B,EAChC,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,WAAW,sBAAuB,SAAQ,0BAA0B;CAAG;AAE7E,wBAAgB,qBAAqB,CAAC,OAAO,GAAE,sBAA2B,GAAG,YAAY,CAExF"}
|
|
1
|
+
{"version":3,"file":"web.d.ts","sourceRoot":"","sources":["../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,0BAA0B,EAChC,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,WAAW,sBAAuB,SAAQ,0BAA0B;CAAG;AAE7E;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,wBAAgB,qBAAqB,CAAC,OAAO,GAAE,sBAA2B,GAAG,YAAY,CAExF"}
|
package/dist/web.js
CHANGED
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
import { createBrowserGoodVibesSdk, } from './browser.js';
|
|
2
|
+
/**
|
|
3
|
+
* Alias for `createBrowserGoodVibesSdk`. Use this entry-point when importing
|
|
4
|
+
* from `@pellux/goodvibes-sdk/web`.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* // Example only: replace with your own auth strategy.
|
|
8
|
+
* import { createWebGoodVibesSdk } from '@pellux/goodvibes-sdk/web';
|
|
9
|
+
*
|
|
10
|
+
* const sdk = createWebGoodVibesSdk({ authToken: myToken });
|
|
11
|
+
* const events = sdk.realtime.viaSse();
|
|
12
|
+
* events.agents.on('AGENT_SPAWNING', ({ agentId }) => console.log(agentId));
|
|
13
|
+
*/
|
|
14
|
+
export { forSession } from './transport-realtime.js';
|
|
2
15
|
export function createWebGoodVibesSdk(options = {}) {
|
|
3
16
|
return createBrowserGoodVibesSdk(options);
|
|
4
17
|
}
|