@standardagents/vue 0.37.3 → 0.37.5

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/index.cjs CHANGED
@@ -78,7 +78,8 @@ function useThreadSetup(threadIdInput, options = {}) {
78
78
  useSubagentBlocks = false,
79
79
  depth = 0,
80
80
  includeSilent = false,
81
- endpoint: endpointOverride
81
+ endpoint: endpointOverride,
82
+ reconnectAuthGate
82
83
  } = options;
83
84
  const threadId = vue.computed(() => vue.toValue(threadIdInput));
84
85
  const context = useStandardAgents();
@@ -336,7 +337,7 @@ function useThreadSetup(threadIdInput, options = {}) {
336
337
  onError: (err) => {
337
338
  error.value = err instanceof Error ? err : new Error(String(err));
338
339
  }
339
- }, { depth, includeSilent });
340
+ }, { depth, includeSilent, reconnectAuthGate });
340
341
  connectionManager.connect();
341
342
  }
342
343
  async function sendMessage(payload) {
@@ -631,6 +632,14 @@ var ThreadProvider = vue.defineComponent({
631
632
  endpoint: {
632
633
  type: String,
633
634
  default: void 0
635
+ },
636
+ /**
637
+ * Auth gate consulted after repeated never-opened socket failures;
638
+ * return false to stop reconnecting (see UseThreadOptions).
639
+ */
640
+ reconnectAuthGate: {
641
+ type: Function,
642
+ default: void 0
634
643
  }
635
644
  },
636
645
  setup(props, { slots }) {
@@ -644,6 +653,9 @@ var ThreadProvider = vue.defineComponent({
644
653
  if (props.depth !== void 0) options.depth = props.depth;
645
654
  if (props.includeSilent !== void 0) options.includeSilent = props.includeSilent;
646
655
  if (props.endpoint !== void 0) options.endpoint = props.endpoint;
656
+ if (props.reconnectAuthGate !== void 0) {
657
+ options.reconnectAuthGate = props.reconnectAuthGate;
658
+ }
647
659
  const context = useThreadSetup(() => props.threadId, options);
648
660
  vue.provide(ThreadKey, context);
649
661
  return () => slots.default?.();
package/dist/index.d.cts CHANGED
@@ -122,6 +122,13 @@ interface UseThreadOptions {
122
122
  includeSilent?: boolean;
123
123
  /** Optional endpoint override */
124
124
  endpoint?: string;
125
+ /**
126
+ * Consulted before reconnecting once the message socket has repeatedly
127
+ * failed without ever opening (a rejected upgrade hides its HTTP status).
128
+ * Return false to stop reconnecting until the next explicit connect —
129
+ * the hook for a shared application auth check.
130
+ */
131
+ reconnectAuthGate?: () => boolean | Promise<boolean>;
125
132
  }
126
133
  /**
127
134
  * Injection key for StandardAgents context
@@ -221,6 +228,14 @@ declare const ThreadProvider: vue.DefineComponent<vue.ExtractPropTypes<{
221
228
  type: PropType<string>;
222
229
  default: undefined;
223
230
  };
231
+ /**
232
+ * Auth gate consulted after repeated never-opened socket failures;
233
+ * return false to stop reconnecting (see UseThreadOptions).
234
+ */
235
+ reconnectAuthGate: {
236
+ type: PropType<() => boolean | Promise<boolean>>;
237
+ default: undefined;
238
+ };
224
239
  }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
225
240
  [key: string]: any;
226
241
  }>[] | undefined, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
@@ -280,6 +295,14 @@ declare const ThreadProvider: vue.DefineComponent<vue.ExtractPropTypes<{
280
295
  type: PropType<string>;
281
296
  default: undefined;
282
297
  };
298
+ /**
299
+ * Auth gate consulted after repeated never-opened socket failures;
300
+ * return false to stop reconnecting (see UseThreadOptions).
301
+ */
302
+ reconnectAuthGate: {
303
+ type: PropType<() => boolean | Promise<boolean>>;
304
+ default: undefined;
305
+ };
283
306
  }>> & Readonly<{}>, {
284
307
  preload: boolean;
285
308
  live: boolean;
@@ -288,6 +311,7 @@ declare const ThreadProvider: vue.DefineComponent<vue.ExtractPropTypes<{
288
311
  depth: number;
289
312
  includeSilent: boolean;
290
313
  endpoint: string;
314
+ reconnectAuthGate: () => boolean | Promise<boolean>;
291
315
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
292
316
 
293
317
  /**
package/dist/index.d.ts CHANGED
@@ -122,6 +122,13 @@ interface UseThreadOptions {
122
122
  includeSilent?: boolean;
123
123
  /** Optional endpoint override */
124
124
  endpoint?: string;
125
+ /**
126
+ * Consulted before reconnecting once the message socket has repeatedly
127
+ * failed without ever opening (a rejected upgrade hides its HTTP status).
128
+ * Return false to stop reconnecting until the next explicit connect —
129
+ * the hook for a shared application auth check.
130
+ */
131
+ reconnectAuthGate?: () => boolean | Promise<boolean>;
125
132
  }
126
133
  /**
127
134
  * Injection key for StandardAgents context
@@ -221,6 +228,14 @@ declare const ThreadProvider: vue.DefineComponent<vue.ExtractPropTypes<{
221
228
  type: PropType<string>;
222
229
  default: undefined;
223
230
  };
231
+ /**
232
+ * Auth gate consulted after repeated never-opened socket failures;
233
+ * return false to stop reconnecting (see UseThreadOptions).
234
+ */
235
+ reconnectAuthGate: {
236
+ type: PropType<() => boolean | Promise<boolean>>;
237
+ default: undefined;
238
+ };
224
239
  }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
225
240
  [key: string]: any;
226
241
  }>[] | undefined, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
@@ -280,6 +295,14 @@ declare const ThreadProvider: vue.DefineComponent<vue.ExtractPropTypes<{
280
295
  type: PropType<string>;
281
296
  default: undefined;
282
297
  };
298
+ /**
299
+ * Auth gate consulted after repeated never-opened socket failures;
300
+ * return false to stop reconnecting (see UseThreadOptions).
301
+ */
302
+ reconnectAuthGate: {
303
+ type: PropType<() => boolean | Promise<boolean>>;
304
+ default: undefined;
305
+ };
283
306
  }>> & Readonly<{}>, {
284
307
  preload: boolean;
285
308
  live: boolean;
@@ -288,6 +311,7 @@ declare const ThreadProvider: vue.DefineComponent<vue.ExtractPropTypes<{
288
311
  depth: number;
289
312
  includeSilent: boolean;
290
313
  endpoint: string;
314
+ reconnectAuthGate: () => boolean | Promise<boolean>;
291
315
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
292
316
 
293
317
  /**
package/dist/index.js CHANGED
@@ -77,7 +77,8 @@ function useThreadSetup(threadIdInput, options = {}) {
77
77
  useSubagentBlocks = false,
78
78
  depth = 0,
79
79
  includeSilent = false,
80
- endpoint: endpointOverride
80
+ endpoint: endpointOverride,
81
+ reconnectAuthGate
81
82
  } = options;
82
83
  const threadId = computed(() => toValue(threadIdInput));
83
84
  const context = useStandardAgents();
@@ -335,7 +336,7 @@ function useThreadSetup(threadIdInput, options = {}) {
335
336
  onError: (err) => {
336
337
  error.value = err instanceof Error ? err : new Error(String(err));
337
338
  }
338
- }, { depth, includeSilent });
339
+ }, { depth, includeSilent, reconnectAuthGate });
339
340
  connectionManager.connect();
340
341
  }
341
342
  async function sendMessage(payload) {
@@ -630,6 +631,14 @@ var ThreadProvider = defineComponent({
630
631
  endpoint: {
631
632
  type: String,
632
633
  default: void 0
634
+ },
635
+ /**
636
+ * Auth gate consulted after repeated never-opened socket failures;
637
+ * return false to stop reconnecting (see UseThreadOptions).
638
+ */
639
+ reconnectAuthGate: {
640
+ type: Function,
641
+ default: void 0
633
642
  }
634
643
  },
635
644
  setup(props, { slots }) {
@@ -643,6 +652,9 @@ var ThreadProvider = defineComponent({
643
652
  if (props.depth !== void 0) options.depth = props.depth;
644
653
  if (props.includeSilent !== void 0) options.includeSilent = props.includeSilent;
645
654
  if (props.endpoint !== void 0) options.endpoint = props.endpoint;
655
+ if (props.reconnectAuthGate !== void 0) {
656
+ options.reconnectAuthGate = props.reconnectAuthGate;
657
+ }
646
658
  const context = useThreadSetup(() => props.threadId, options);
647
659
  provide(ThreadKey, context);
648
660
  return () => slots.default?.();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@standardagents/vue",
3
- "version": "0.37.3",
3
+ "version": "0.37.5",
4
4
  "private": false,
5
5
  "description": "Vue SDK for Standard Agents",
6
6
  "type": "module",
@@ -30,7 +30,7 @@
30
30
  "typecheck": "tsc --noEmit"
31
31
  },
32
32
  "dependencies": {
33
- "@standardagents/client": "0.37.3"
33
+ "@standardagents/client": "0.37.5"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "vue": "^3.3.0"