@pellux/goodvibes-sdk 0.18.46 → 0.18.48
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/_internal/platform/core/orchestrator-turn-helpers.js +1 -1
- package/dist/_internal/platform/core/orchestrator-turn-loop.js +1 -1
- package/dist/_internal/platform/daemon/facade-composition.d.ts +24 -0
- package/dist/_internal/platform/daemon/facade-composition.d.ts.map +1 -1
- package/dist/_internal/platform/daemon/facade-composition.js +93 -0
- package/dist/_internal/platform/daemon/facade.d.ts +1 -0
- package/dist/_internal/platform/daemon/facade.d.ts.map +1 -1
- package/dist/_internal/platform/daemon/facade.js +3 -0
- package/dist/_internal/platform/providers/anthropic-compat.d.ts.map +1 -1
- package/dist/_internal/platform/providers/anthropic-compat.js +9 -6
- package/dist/_internal/platform/providers/anthropic-sdk-provider.d.ts.map +1 -1
- package/dist/_internal/platform/providers/anthropic-sdk-provider.js +9 -6
- package/dist/_internal/platform/providers/anthropic.d.ts.map +1 -1
- package/dist/_internal/platform/providers/anthropic.js +9 -6
- package/dist/_internal/platform/providers/gemini.d.ts.map +1 -1
- package/dist/_internal/platform/providers/gemini.js +5 -5
- package/dist/_internal/platform/providers/interface.d.ts +12 -1
- package/dist/_internal/platform/providers/interface.d.ts.map +1 -1
- package/dist/_internal/platform/providers/llama-cpp.d.ts.map +1 -1
- package/dist/_internal/platform/providers/llama-cpp.js +4 -3
- package/dist/_internal/platform/providers/lm-studio-helpers.d.ts +2 -3
- package/dist/_internal/platform/providers/lm-studio-helpers.d.ts.map +1 -1
- package/dist/_internal/platform/providers/lm-studio-helpers.js +0 -9
- package/dist/_internal/platform/providers/lm-studio.d.ts.map +1 -1
- package/dist/_internal/platform/providers/lm-studio.js +7 -3
- package/dist/_internal/platform/providers/ollama.d.ts.map +1 -1
- package/dist/_internal/platform/providers/ollama.js +3 -3
- package/dist/_internal/platform/providers/openai-codex.d.ts.map +1 -1
- package/dist/_internal/platform/providers/openai-codex.js +3 -10
- package/dist/_internal/platform/providers/openai-compat.d.ts.map +1 -1
- package/dist/_internal/platform/providers/openai-compat.js +11 -7
- package/dist/_internal/platform/providers/openai.d.ts.map +1 -1
- package/dist/_internal/platform/providers/openai.js +11 -7
- package/dist/_internal/platform/providers/stop-reason-maps.d.ts +30 -0
- package/dist/_internal/platform/providers/stop-reason-maps.d.ts.map +1 -0
- package/dist/_internal/platform/providers/stop-reason-maps.js +89 -0
- package/dist/_internal/platform/runtime/forensics/classifier.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/forensics/classifier.js +1 -4
- package/dist/_internal/platform/version.js +1 -1
- package/dist/_internal/transport-http/auth.d.ts +17 -0
- package/dist/_internal/transport-http/auth.d.ts.map +1 -1
- package/dist/_internal/transport-http/auth.js +22 -0
- package/dist/_internal/transport-http/http-core.d.ts.map +1 -1
- package/dist/_internal/transport-http/http-core.js +5 -3
- package/dist/_internal/transport-http/index.d.ts +2 -2
- package/dist/_internal/transport-http/index.d.ts.map +1 -1
- package/dist/_internal/transport-http/index.js +1 -1
- package/dist/_internal/transport-realtime/runtime-events.d.ts.map +1 -1
- package/dist/_internal/transport-realtime/runtime-events.js +4 -10
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +5 -2
- package/package.json +1 -1
package/dist/client.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ConfigurationError } from './_internal/errors/index.js';
|
|
2
2
|
import { createOperatorSdk, } from './_internal/operator/index.js';
|
|
3
3
|
import { createPeerSdk, } from './_internal/peer/index.js';
|
|
4
|
+
import { normalizeAuthToken } from './_internal/transport-http/index.js';
|
|
4
5
|
import { createEventSourceConnector, createRemoteRuntimeEvents, createWebSocketConnector, } from './_internal/transport-realtime/index.js';
|
|
5
6
|
import { createGoodVibesAuthClient, createMemoryTokenStore, } from './auth.js';
|
|
6
7
|
function requireBaseUrl(baseUrl) {
|
|
@@ -59,6 +60,8 @@ export function createGoodVibesSdk(options) {
|
|
|
59
60
|
const getAuthToken = tokenStore
|
|
60
61
|
? () => tokenStore.getToken()
|
|
61
62
|
: options.getAuthToken;
|
|
63
|
+
// Single normalized resolver used by realtime connectors.
|
|
64
|
+
const tokenResolver = normalizeAuthToken(getAuthToken ?? options.authToken ?? undefined);
|
|
62
65
|
const fetchImpl = () => requireFetchImplementation(options.fetch);
|
|
63
66
|
const operator = createOperatorSdk(createOperatorOptions({
|
|
64
67
|
...options,
|
|
@@ -74,13 +77,13 @@ export function createGoodVibesSdk(options) {
|
|
|
74
77
|
auth: createGoodVibesAuthClient(operator, tokenStore, getAuthToken),
|
|
75
78
|
realtime: {
|
|
76
79
|
viaSse() {
|
|
77
|
-
return createRemoteRuntimeEvents(createEventSourceConnector(baseUrl,
|
|
80
|
+
return createRemoteRuntimeEvents(createEventSourceConnector(baseUrl, tokenResolver, fetchImpl(), {
|
|
78
81
|
reconnect: options.realtime?.sseReconnect,
|
|
79
82
|
onError: options.realtime?.onError,
|
|
80
83
|
}));
|
|
81
84
|
},
|
|
82
85
|
viaWebSocket(webSocketImpl) {
|
|
83
|
-
return createRemoteRuntimeEvents(createWebSocketConnector(baseUrl,
|
|
86
|
+
return createRemoteRuntimeEvents(createWebSocketConnector(baseUrl, tokenResolver, requireWebSocketImplementation(webSocketImpl ?? options.WebSocketImpl), {
|
|
84
87
|
reconnect: options.realtime?.webSocketReconnect,
|
|
85
88
|
onError: options.realtime?.onError,
|
|
86
89
|
}));
|