@pellux/goodvibes-sdk 0.18.49 → 0.18.51

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 (71) hide show
  1. package/dist/_internal/errors/index.d.ts +27 -2
  2. package/dist/_internal/errors/index.d.ts.map +1 -1
  3. package/dist/_internal/errors/index.js +44 -2
  4. package/dist/_internal/platform/auth/index.d.ts +4 -0
  5. package/dist/_internal/platform/auth/index.d.ts.map +1 -0
  6. package/dist/_internal/platform/auth/index.js +7 -0
  7. package/dist/_internal/platform/auth/oauth-client.d.ts +45 -0
  8. package/dist/_internal/platform/auth/oauth-client.d.ts.map +1 -0
  9. package/dist/_internal/platform/auth/oauth-client.js +45 -0
  10. package/dist/_internal/platform/auth/oauth-types.d.ts +21 -0
  11. package/dist/_internal/platform/auth/oauth-types.d.ts.map +1 -0
  12. package/dist/_internal/platform/auth/oauth-types.js +8 -0
  13. package/dist/_internal/platform/auth/permission-resolver.d.ts +35 -0
  14. package/dist/_internal/platform/auth/permission-resolver.d.ts.map +1 -0
  15. package/dist/_internal/platform/auth/permission-resolver.js +57 -0
  16. package/dist/_internal/platform/auth/session-manager.d.ts +31 -0
  17. package/dist/_internal/platform/auth/session-manager.d.ts.map +1 -0
  18. package/dist/_internal/platform/auth/session-manager.js +44 -0
  19. package/dist/_internal/platform/auth/token-store.d.ts +23 -0
  20. package/dist/_internal/platform/auth/token-store.d.ts.map +1 -0
  21. package/dist/_internal/platform/auth/token-store.js +34 -0
  22. package/dist/_internal/platform/config/openai-codex-auth.d.ts +1 -1
  23. package/dist/_internal/platform/config/openai-codex-auth.d.ts.map +1 -1
  24. package/dist/_internal/platform/config/openai-codex-auth.js +2 -2
  25. package/dist/_internal/platform/config/subscriptions.d.ts +2 -2
  26. package/dist/_internal/platform/config/subscriptions.d.ts.map +1 -1
  27. package/dist/_internal/platform/config/subscriptions.js +2 -2
  28. package/dist/_internal/platform/core/orchestrator.d.ts +75 -11
  29. package/dist/_internal/platform/core/orchestrator.d.ts.map +1 -1
  30. package/dist/_internal/platform/core/orchestrator.js +29 -8
  31. package/dist/_internal/platform/runtime/auth/crypto-adapter.d.ts +22 -0
  32. package/dist/_internal/platform/runtime/auth/crypto-adapter.d.ts.map +1 -0
  33. package/dist/_internal/platform/runtime/auth/crypto-adapter.js +40 -0
  34. package/dist/_internal/platform/runtime/auth/oauth-core.d.ts +4 -15
  35. package/dist/_internal/platform/runtime/auth/oauth-core.d.ts.map +1 -1
  36. package/dist/_internal/platform/runtime/auth/oauth-core.js +13 -8
  37. package/dist/_internal/platform/version.js +1 -1
  38. package/dist/_internal/transport-realtime/domain-events.d.ts +26 -0
  39. package/dist/_internal/transport-realtime/domain-events.d.ts.map +1 -1
  40. package/dist/_internal/transport-realtime/domain-events.js +63 -0
  41. package/dist/_internal/transport-realtime/index.d.ts +2 -2
  42. package/dist/_internal/transport-realtime/index.d.ts.map +1 -1
  43. package/dist/_internal/transport-realtime/index.js +2 -2
  44. package/dist/_internal/transport-realtime/runtime-events.d.ts +27 -1
  45. package/dist/_internal/transport-realtime/runtime-events.d.ts.map +1 -1
  46. package/dist/_internal/transport-realtime/runtime-events.js +27 -0
  47. package/dist/auth.d.ts +28 -0
  48. package/dist/auth.d.ts.map +1 -1
  49. package/dist/auth.js +6 -0
  50. package/dist/browser.d.ts +1 -0
  51. package/dist/browser.d.ts.map +1 -1
  52. package/dist/browser.js +1 -0
  53. package/dist/client.d.ts +50 -0
  54. package/dist/client.d.ts.map +1 -1
  55. package/dist/client.js +2 -0
  56. package/dist/expo.d.ts +1 -0
  57. package/dist/expo.d.ts.map +1 -1
  58. package/dist/expo.js +1 -0
  59. package/dist/node.d.ts +1 -0
  60. package/dist/node.d.ts.map +1 -1
  61. package/dist/node.js +1 -0
  62. package/dist/oauth.d.ts +26 -0
  63. package/dist/oauth.d.ts.map +1 -0
  64. package/dist/oauth.js +24 -0
  65. package/dist/react-native.d.ts +1 -0
  66. package/dist/react-native.d.ts.map +1 -1
  67. package/dist/react-native.js +1 -0
  68. package/dist/web.d.ts +1 -0
  69. package/dist/web.d.ts.map +1 -1
  70. package/dist/web.js +1 -0
  71. package/package.json +8 -1
package/dist/browser.d.ts CHANGED
@@ -27,5 +27,6 @@ export interface BrowserGoodVibesSdkOptions extends Omit<GoodVibesSdkOptions, 'b
27
27
  *
28
28
  * const agents = await sdk.operator.agents.list();
29
29
  */
30
+ export { forSession } from './transport-realtime.js';
30
31
  export declare function createBrowserGoodVibesSdk(options?: BrowserGoodVibesSdkOptions): GoodVibesSdk;
31
32
  //# sourceMappingURL=browser.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,YAAY,EAClB,MAAM,aAAa,CAAC;AAErB,MAAM,WAAW,0BACf,SAAQ,IAAI,CAAC,mBAAmB,EAAE,SAAS,GAAG,OAAO,GAAG,eAAe,CAAC;IACxE,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;IAC9B,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,SAAS,CAAC;CAC3C;AAaD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,GAAE,0BAA+B,GACvC,YAAY,CAiCd"}
1
+ {"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,YAAY,EAClB,MAAM,aAAa,CAAC;AAErB,MAAM,WAAW,0BACf,SAAQ,IAAI,CAAC,mBAAmB,EAAE,SAAS,GAAG,OAAO,GAAG,eAAe,CAAC;IACxE,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;IAC9B,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,SAAS,CAAC;CAC3C;AAaD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,wBAAgB,yBAAyB,CACvC,OAAO,GAAE,0BAA+B,GACvC,YAAY,CAiCd"}
package/dist/browser.js CHANGED
@@ -32,6 +32,7 @@ function resolveBrowserBaseUrl(baseUrl) {
32
32
  *
33
33
  * const agents = await sdk.operator.agents.list();
34
34
  */
35
+ export { forSession } from './transport-realtime.js';
35
36
  export function createBrowserGoodVibesSdk(options = {}) {
36
37
  return createGoodVibesSdk({
37
38
  baseUrl: resolveBrowserBaseUrl(options.baseUrl),
package/dist/client.d.ts CHANGED
@@ -48,6 +48,8 @@ export interface GoodVibesSdkOptions {
48
48
  *
49
49
  * Lowest-precedence auth option — ignored when `tokenStore` or `getAuthToken`
50
50
  * is also provided.
51
+ *
52
+ * @see https://github.com/mgd34msu/goodvibes-sdk/blob/main/docs/authentication.md
51
53
  */
52
54
  readonly authToken?: string | null;
53
55
  /**
@@ -59,6 +61,8 @@ export interface GoodVibesSdkOptions {
59
61
  * `setToken` / `clearToken` throws a `ConfigurationError`.
60
62
  *
61
63
  * Takes precedence over `authToken`; ignored when `tokenStore` is provided.
64
+ *
65
+ * @see https://github.com/mgd34msu/goodvibes-sdk/blob/main/docs/authentication.md
62
66
  */
63
67
  readonly getAuthToken?: AuthTokenResolver;
64
68
  /**
@@ -69,6 +73,8 @@ export interface GoodVibesSdkOptions {
69
73
  * Highest-precedence auth option — overrides both `getAuthToken` and
70
74
  * `authToken`. Use `createBrowserTokenStore()` (localStorage) or
71
75
  * `createMemoryTokenStore()` for common cases.
76
+ *
77
+ * @see https://github.com/mgd34msu/goodvibes-sdk/blob/main/docs/authentication.md
72
78
  */
73
79
  readonly tokenStore?: GoodVibesTokenStore;
74
80
  /**
@@ -114,6 +120,26 @@ export interface GoodVibesRealtimeOptions {
114
120
  /**
115
121
  * Realtime event subscriptions for the GoodVibes daemon.
116
122
  * Choose SSE for read-only event streams or WebSocket for bidirectional use.
123
+ *
124
+ * ### Filtering by session
125
+ *
126
+ * When multiple sessions share one SSE/WebSocket connection, use
127
+ * `forSession(events, sessionId)` to get a pre-filtered view instead of
128
+ * manually guarding every callback with `if (e.sessionId !== mine) return`.
129
+ *
130
+ * @example
131
+ * import { createNodeGoodVibesSdk, forSession } from '@pellux/goodvibes-sdk';
132
+ *
133
+ * const sdk = createNodeGoodVibesSdk({ baseUrl: 'http://127.0.0.1:3210' });
134
+ * const session = await sdk.operator.sessions.create({ title: 'demo' });
135
+ * const sessionId = session.session.id;
136
+ *
137
+ * const events = sdk.realtime.viaSse();
138
+ * const sessionEvents = forSession(events, sessionId);
139
+ *
140
+ * sessionEvents.turn.onEnvelope('STREAM_DELTA', (e) => {
141
+ * process.stdout.write(e.payload.content); // only fires for this session
142
+ * });
117
143
  */
118
144
  export interface GoodVibesRealtime {
119
145
  viaSse(): RemoteRuntimeEvents<RuntimeEventRecord>;
@@ -132,9 +158,31 @@ export interface GoodVibesRealtime {
132
158
  * - **`auth`** — login, logout, and token management helpers.
133
159
  */
134
160
  export interface GoodVibesSdk {
161
+ /**
162
+ * Full control-plane API: daemon admin, agent management, session lifecycle,
163
+ * config. Requires an operator-level auth token.
164
+ *
165
+ * @see https://github.com/mgd34msu/goodvibes-sdk/blob/main/docs/reference-operator.md
166
+ */
135
167
  readonly operator: OperatorSdk;
168
+ /**
169
+ * Peer-to-peer and collaboration APIs: pairing, channels, shared sessions.
170
+ * May be used with peer-scoped tokens.
171
+ *
172
+ * @see https://github.com/mgd34msu/goodvibes-sdk/blob/main/docs/reference-peer.md
173
+ */
136
174
  readonly peer: PeerSdk;
175
+ /**
176
+ * Login, logout, and token management helpers.
177
+ *
178
+ * @see https://github.com/mgd34msu/goodvibes-sdk/blob/main/docs/authentication.md
179
+ */
137
180
  readonly auth: GoodVibesAuthClient;
181
+ /**
182
+ * Subscribe to live daemon events via SSE or WebSocket.
183
+ *
184
+ * @see https://github.com/mgd34msu/goodvibes-sdk/blob/main/docs/realtime-and-telemetry.md
185
+ */
138
186
  readonly realtime: GoodVibesRealtime;
139
187
  }
140
188
  /**
@@ -145,6 +193,8 @@ export interface GoodVibesSdk {
145
193
  * `createNodeGoodVibesSdk`, `createBrowserGoodVibesSdk`,
146
194
  * `createReactNativeGoodVibesSdk`.
147
195
  *
196
+ * @see https://github.com/mgd34msu/goodvibes-sdk/blob/main/docs/getting-started.md
197
+ *
148
198
  * @example
149
199
  * // Example only: replace baseUrl and authToken with your own values.
150
200
  * import { createGoodVibesSdk } from '@pellux/goodvibes-sdk';
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,WAAW,EAEjB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAEL,KAAK,OAAO,EAEb,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EACV,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,qBAAqB,EACtB,MAAM,qCAAqC,CAAC;AAE7C,OAAO,EAIL,KAAK,mBAAmB,EACzB,MAAM,yCAAyC,CAAC;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8CAA8C,CAAC;AACpF,OAAO,EAGL,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACzB,MAAM,WAAW,CAAC;AAEnB;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,kBAAkB,GAAG,eAAe,CAAC;AAEjD;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB;;;;;;OAMG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEnC;;;;;;;;;OASG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,iBA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AE1C;;;OAGG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,wBAAwB,CAAC;CAC9C;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,YAAY,CAAC,EAAE,qBAAqB,CAAC;IAC9C,QAAQ,CAAC,kBAAkB,CAAC,EAAE,qBAAqB,CAAC;IACpD,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CAC7C;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,WAAW,iBAAiB;IAChC,MAAM,IAAI,mBAAmB,CAAC,kBAAkB,CAAC,CAAC;IAClD,YAAY,CAAC,aAAa,CAAC,EAAE,OAAO,SAAS,GAAG,mBAAmB,CAAC,kBAAkB,CAAC,CAAC;CACzF;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;;OAKG;IACH,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC;IAC/B;;;;;OAKG;IACH,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB;;;;OAIG;IACH,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC;IACnC;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAC;CACtC;AA4DD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,mBAAmB,GAC3B,YAAY,CA+Cd"}
package/dist/client.js CHANGED
@@ -61,6 +61,8 @@ function createPeerOptions(options) {
61
61
  * `createNodeGoodVibesSdk`, `createBrowserGoodVibesSdk`,
62
62
  * `createReactNativeGoodVibesSdk`.
63
63
  *
64
+ * @see https://github.com/mgd34msu/goodvibes-sdk/blob/main/docs/getting-started.md
65
+ *
64
66
  * @example
65
67
  * // Example only: replace baseUrl and authToken with your own values.
66
68
  * import { createGoodVibesSdk } from '@pellux/goodvibes-sdk';
package/dist/expo.d.ts CHANGED
@@ -15,5 +15,6 @@ export interface ExpoGoodVibesSdkOptions extends ReactNativeGoodVibesSdkOptions
15
15
  * authToken: await SecureStore.getItemAsync('gv-token'),
16
16
  * });
17
17
  */
18
+ export { forSession } from './transport-realtime.js';
18
19
  export declare function createExpoGoodVibesSdk(options: ExpoGoodVibesSdkOptions): ReactNativeGoodVibesSdk;
19
20
  //# sourceMappingURL=expo.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"expo.d.ts","sourceRoot":"","sources":["../src/expo.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,uBAAuB,EAC5B,KAAK,8BAA8B,EACpC,MAAM,mBAAmB,CAAC;AAE3B,MAAM,WAAW,uBAAwB,SAAQ,8BAA8B;CAAG;AAElF;;;;;;;;;;;;;GAaG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,uBAAuB,GAAG,uBAAuB,CAEhG"}
1
+ {"version":3,"file":"expo.d.ts","sourceRoot":"","sources":["../src/expo.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,uBAAuB,EAC5B,KAAK,8BAA8B,EACpC,MAAM,mBAAmB,CAAC;AAE3B,MAAM,WAAW,uBAAwB,SAAQ,8BAA8B;CAAG;AAElF;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,uBAAuB,GAAG,uBAAuB,CAEhG"}
package/dist/expo.js CHANGED
@@ -13,6 +13,7 @@ import { createReactNativeGoodVibesSdk, } from './react-native.js';
13
13
  * authToken: await SecureStore.getItemAsync('gv-token'),
14
14
  * });
15
15
  */
16
+ export { forSession } from './transport-realtime.js';
16
17
  export function createExpoGoodVibesSdk(options) {
17
18
  return createReactNativeGoodVibesSdk(options);
18
19
  }
package/dist/node.d.ts CHANGED
@@ -23,5 +23,6 @@ export interface NodeGoodVibesSdkOptions extends GoodVibesSdkOptions {
23
23
  * const session = await sdk.operator.sessions.create({ name: 'my-session' });
24
24
  * console.log(session.id);
25
25
  */
26
+ export { forSession } from './transport-realtime.js';
26
27
  export declare function createNodeGoodVibesSdk(options: NodeGoodVibesSdkOptions): GoodVibesSdk;
27
28
  //# sourceMappingURL=node.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../src/node.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,YAAY,EAClB,MAAM,aAAa,CAAC;AAErB,MAAM,WAAW,uBAAwB,SAAQ,mBAAmB;CAAG;AAEvE;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,uBAAuB,GAC/B,YAAY,CAwBd"}
1
+ {"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../src/node.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,YAAY,EAClB,MAAM,aAAa,CAAC;AAErB,MAAM,WAAW,uBAAwB,SAAQ,mBAAmB;CAAG;AAEvE;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,uBAAuB,GAC/B,YAAY,CAwBd"}
package/dist/node.js CHANGED
@@ -21,6 +21,7 @@ import { createGoodVibesSdk, } from './client.js';
21
21
  * const session = await sdk.operator.sessions.create({ name: 'my-session' });
22
22
  * console.log(session.id);
23
23
  */
24
+ export { forSession } from './transport-realtime.js';
24
25
  export function createNodeGoodVibesSdk(options) {
25
26
  return createGoodVibesSdk({
26
27
  ...options,
@@ -0,0 +1,26 @@
1
+ /**
2
+ * @pellux/goodvibes-sdk/oauth
3
+ *
4
+ * Node.js-only subpath export for OAuth 2.0 / PKCE flows.
5
+ *
6
+ * This entrypoint imports oauth-core.ts which depends on node:crypto.
7
+ * It is intentionally excluded from the RN/browser bundle graph.
8
+ * React Native and browser consumers should perform OAuth flows on a
9
+ * server-side proxy and exchange tokens via the standard auth flow instead.
10
+ *
11
+ * @example
12
+ * import { OAuthClient } from '@pellux/goodvibes-sdk/oauth';
13
+ *
14
+ * const client = new OAuthClient({
15
+ * clientId: process.env.OAUTH_CLIENT_ID!,
16
+ * authUrl: 'https://auth.example.com/authorize',
17
+ * tokenUrl: 'https://auth.example.com/token',
18
+ * redirectUri: 'http://localhost:4000/callback',
19
+ * scopes: ['openid', 'profile'],
20
+ * });
21
+ *
22
+ * const { authorizationUrl, state, verifier } = client.beginAuthorization();
23
+ */
24
+ export { OAuthClient } from './_internal/platform/auth/oauth-client.js';
25
+ export type { OAuthStartState, OAuthTokenPayload } from './_internal/platform/auth/oauth-types.js';
26
+ //# sourceMappingURL=oauth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oauth.d.ts","sourceRoot":"","sources":["../src/oauth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AACxE,YAAY,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC"}
package/dist/oauth.js ADDED
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @pellux/goodvibes-sdk/oauth
3
+ *
4
+ * Node.js-only subpath export for OAuth 2.0 / PKCE flows.
5
+ *
6
+ * This entrypoint imports oauth-core.ts which depends on node:crypto.
7
+ * It is intentionally excluded from the RN/browser bundle graph.
8
+ * React Native and browser consumers should perform OAuth flows on a
9
+ * server-side proxy and exchange tokens via the standard auth flow instead.
10
+ *
11
+ * @example
12
+ * import { OAuthClient } from '@pellux/goodvibes-sdk/oauth';
13
+ *
14
+ * const client = new OAuthClient({
15
+ * clientId: process.env.OAUTH_CLIENT_ID!,
16
+ * authUrl: 'https://auth.example.com/authorize',
17
+ * tokenUrl: 'https://auth.example.com/token',
18
+ * redirectUri: 'http://localhost:4000/callback',
19
+ * scopes: ['openid', 'profile'],
20
+ * });
21
+ *
22
+ * const { authorizationUrl, state, verifier } = client.beginAuthorization();
23
+ */
24
+ export { OAuthClient } from './_internal/platform/auth/oauth-client.js';
@@ -36,5 +36,6 @@ export type ReactNativeGoodVibesSdk = Omit<GoodVibesSdk, 'realtime'> & {
36
36
  * const events = sdk.realtime.runtime();
37
37
  * events.agents.on('AGENT_SPAWNING', ({ agentId }) => console.log(agentId));
38
38
  */
39
+ export { forSession } from './transport-realtime.js';
39
40
  export declare function createReactNativeGoodVibesSdk(options: ReactNativeGoodVibesSdkOptions): ReactNativeGoodVibesSdk;
40
41
  //# sourceMappingURL=react-native.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"react-native.d.ts","sourceRoot":"","sources":["../src/react-native.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,mBAAmB,EACzB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACxB,MAAM,aAAa,CAAC;AAErB,MAAM,WAAW,8BACf,SAAQ,IAAI,CAAC,mBAAmB,EAAE,eAAe,CAAC;IAClD,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,SAAS,CAAC;CAC3C;AAED,MAAM,WAAW,4BAA4B;IAC3C,OAAO,IAAI,mBAAmB,CAAC,kBAAkB,CAAC,CAAC;IACnD,YAAY,CAAC,aAAa,CAAC,EAAE,OAAO,SAAS,GAAG,mBAAmB,CAAC,kBAAkB,CAAC,CAAC;CACzF;AAED,MAAM,MAAM,uBAAuB,GACjC,IAAI,CAAC,YAAY,EAAE,UAAU,CAAC,GAAG;IAC/B,QAAQ,CAAC,QAAQ,EAAE,4BAA4B,CAAC;CACjD,CAAC;AAYJ;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,8BAA8B,GACtC,uBAAuB,CA0DzB"}
1
+ {"version":3,"file":"react-native.d.ts","sourceRoot":"","sources":["../src/react-native.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,mBAAmB,EACzB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACxB,MAAM,aAAa,CAAC;AAErB,MAAM,WAAW,8BACf,SAAQ,IAAI,CAAC,mBAAmB,EAAE,eAAe,CAAC;IAClD,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,SAAS,CAAC;CAC3C;AAED,MAAM,WAAW,4BAA4B;IAC3C,OAAO,IAAI,mBAAmB,CAAC,kBAAkB,CAAC,CAAC;IACnD,YAAY,CAAC,aAAa,CAAC,EAAE,OAAO,SAAS,GAAG,mBAAmB,CAAC,kBAAkB,CAAC,CAAC;CACzF;AAED,MAAM,MAAM,uBAAuB,GACjC,IAAI,CAAC,YAAY,EAAE,UAAU,CAAC,GAAG;IAC/B,QAAQ,CAAC,QAAQ,EAAE,4BAA4B,CAAC;CACjD,CAAC;AAYJ;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,8BAA8B,GACtC,uBAAuB,CA0DzB"}
@@ -34,6 +34,7 @@ function requireReactNativeWebSocket(webSocketImpl) {
34
34
  * const events = sdk.realtime.runtime();
35
35
  * events.agents.on('AGENT_SPAWNING', ({ agentId }) => console.log(agentId));
36
36
  */
37
+ export { forSession } from './transport-realtime.js';
37
38
  export function createReactNativeGoodVibesSdk(options) {
38
39
  const base = createGoodVibesSdk({
39
40
  ...options,
package/dist/web.d.ts CHANGED
@@ -14,5 +14,6 @@ export interface WebGoodVibesSdkOptions extends BrowserGoodVibesSdkOptions {
14
14
  * const events = sdk.realtime.viaSse();
15
15
  * events.agents.on('AGENT_SPAWNING', ({ agentId }) => console.log(agentId));
16
16
  */
17
+ export { forSession } from './transport-realtime.js';
17
18
  export declare function createWebGoodVibesSdk(options?: WebGoodVibesSdkOptions): GoodVibesSdk;
18
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;;;;;;;;;;;GAWG;AACH,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
@@ -11,6 +11,7 @@ import { createBrowserGoodVibesSdk, } from './browser.js';
11
11
  * const events = sdk.realtime.viaSse();
12
12
  * events.agents.on('AGENT_SPAWNING', ({ agentId }) => console.log(agentId));
13
13
  */
14
+ export { forSession } from './transport-realtime.js';
14
15
  export function createWebGoodVibesSdk(options = {}) {
15
16
  return createBrowserGoodVibesSdk(options);
16
17
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pellux/goodvibes-sdk",
3
- "version": "0.18.49",
3
+ "version": "0.18.51",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/mgd34msu/goodvibes-sdk.git"
@@ -52,6 +52,10 @@
52
52
  "types": "./dist/auth.d.ts",
53
53
  "import": "./dist/auth.js"
54
54
  },
55
+ "./oauth": {
56
+ "types": "./dist/oauth.d.ts",
57
+ "import": "./dist/oauth.js"
58
+ },
55
59
  "./errors": {
56
60
  "types": "./dist/errors.d.ts",
57
61
  "import": "./dist/errors.js"
@@ -129,6 +133,9 @@
129
133
  "publishConfig": {
130
134
  "access": "public"
131
135
  },
136
+ "engines": {
137
+ "node": ">=19"
138
+ },
132
139
  "sideEffects": false,
133
140
  "type": "module",
134
141
  "types": "./dist/index.d.ts"