@castari/sdk 0.1.3 → 0.1.4
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.d.ts +1 -2
- package/dist/client.js +2 -1
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -26,8 +26,7 @@ export interface ClientOptions extends Partial<QueryConfig> {
|
|
|
26
26
|
resume?: string;
|
|
27
27
|
/**
|
|
28
28
|
* Use the platform API as a WebSocket proxy instead of connecting directly to the sandbox.
|
|
29
|
-
*
|
|
30
|
-
* Defaults to false.
|
|
29
|
+
* Defaults to true for reliability. Set to false to connect directly to the sandbox.
|
|
31
30
|
*/
|
|
32
31
|
useProxy?: boolean;
|
|
33
32
|
}
|
package/dist/client.js
CHANGED
|
@@ -152,7 +152,8 @@ export class CastariClient {
|
|
|
152
152
|
}
|
|
153
153
|
const { id, url, proxyUrl, authHeaders, authParams } = await response.json();
|
|
154
154
|
this.sandboxId = id;
|
|
155
|
-
|
|
155
|
+
// Default to proxy mode (true) unless explicitly disabled
|
|
156
|
+
const useProxy = this.options.useProxy ?? (process.env.CASTARI_USE_PROXY !== 'false');
|
|
156
157
|
if (this.options.debug) {
|
|
157
158
|
console.log(`✅ Sandbox started: ${id} at ${url}`);
|
|
158
159
|
if (useProxy && proxyUrl) {
|