@standardagents/vue 0.12.9 → 0.13.0

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
@@ -52,6 +52,7 @@ function useThreadSetup(threadIdInput, options = {}) {
52
52
  preload = true,
53
53
  live = true,
54
54
  useWorkblocks = false,
55
+ useSubagentBlocks = false,
55
56
  depth = 0,
56
57
  includeSilent = false,
57
58
  endpoint: endpointOverride
@@ -63,6 +64,7 @@ function useThreadSetup(threadIdInput, options = {}) {
63
64
  preload,
64
65
  live,
65
66
  useWorkblocks,
67
+ useSubagentBlocks,
66
68
  depth,
67
69
  includeSilent
68
70
  };
@@ -86,6 +88,23 @@ function useThreadSetup(threadIdInput, options = {}) {
86
88
  }
87
89
  return client.transformToWorkblocks(messages.value);
88
90
  });
91
+ const subagentBlocks = vue.computed(() => {
92
+ if (!useSubagentBlocks) {
93
+ return messages.value;
94
+ }
95
+ return client.transformToSubagentBlocks(messages.value, {
96
+ includeWorkblocks: useWorkblocks
97
+ });
98
+ });
99
+ const groupedMessages = vue.computed(() => {
100
+ if (useSubagentBlocks) {
101
+ return subagentBlocks.value;
102
+ }
103
+ if (useWorkblocks) {
104
+ return workblocks.value;
105
+ }
106
+ return messages.value;
107
+ });
89
108
  async function loadMessages() {
90
109
  isLoading.value = true;
91
110
  error.value = null;
@@ -404,6 +423,8 @@ function useThreadSetup(threadIdInput, options = {}) {
404
423
  options: resolvedOptions,
405
424
  messages,
406
425
  workblocks,
426
+ subagentBlocks,
427
+ groupedMessages,
407
428
  status,
408
429
  connectionStatus: status,
409
430
  // alias
@@ -464,6 +485,13 @@ var ThreadProvider = vue.defineComponent({
464
485
  type: Boolean,
465
486
  default: void 0
466
487
  },
488
+ /**
489
+ * Transform messages to subagent blocks (default: false)
490
+ */
491
+ useSubagentBlocks: {
492
+ type: Boolean,
493
+ default: void 0
494
+ },
467
495
  /**
468
496
  * Message depth to fetch (default: 0)
469
497
  */
@@ -491,6 +519,9 @@ var ThreadProvider = vue.defineComponent({
491
519
  if (props.preload !== void 0) options.preload = props.preload;
492
520
  if (props.live !== void 0) options.live = props.live;
493
521
  if (props.useWorkblocks !== void 0) options.useWorkblocks = props.useWorkblocks;
522
+ if (props.useSubagentBlocks !== void 0) {
523
+ options.useSubagentBlocks = props.useSubagentBlocks;
524
+ }
494
525
  if (props.depth !== void 0) options.depth = props.depth;
495
526
  if (props.includeSilent !== void 0) options.includeSilent = props.includeSilent;
496
527
  if (props.endpoint !== void 0) options.endpoint = props.endpoint;
@@ -541,6 +572,10 @@ Object.defineProperty(exports, "readFileAsDataUrl", {
541
572
  enumerable: true,
542
573
  get: function () { return client.readFileAsDataUrl; }
543
574
  });
575
+ Object.defineProperty(exports, "transformToSubagentBlocks", {
576
+ enumerable: true,
577
+ get: function () { return client.transformToSubagentBlocks; }
578
+ });
544
579
  Object.defineProperty(exports, "transformToWorkblocks", {
545
580
  enumerable: true,
546
581
  get: function () { return client.transformToWorkblocks; }
package/dist/index.d.cts CHANGED
@@ -2,7 +2,7 @@ import * as vue from 'vue';
2
2
  import { ComputedRef, Ref, InjectionKey, Plugin, PropType } from 'vue';
3
3
  import * as _standardagents_client from '@standardagents/client';
4
4
  import { AgentBuilderClient, SendMessagePayload, Message, ThreadFile, PendingAttachment } from '@standardagents/client';
5
- export { AgentBuilderClient, AttachmentPayload, AttachmentRef, ConnectionStatus, FileUploadManager, GetMessagesOptions, Message, PendingAttachment, SendMessagePayload, Thread, ThreadConnectionCallbacks, ThreadConnectionManager, ThreadConnectionOptions, ThreadFile, ThreadMessage, WorkItem, WorkMessage, generatePendingFileId, isImageMimeType, messagesToFiles, parseAttachments, readFileAsDataUrl, transformToWorkblocks } from '@standardagents/client';
5
+ export { AgentBuilderClient, AttachmentPayload, AttachmentRef, ConnectionStatus, FileUploadManager, GetMessagesOptions, GroupedThreadMessage, Message, PendingAttachment, SendMessagePayload, StatusMessage, SubagentBlockMessage, SubagentThreadMessage, Thread, ThreadConnectionCallbacks, ThreadConnectionManager, ThreadConnectionOptions, ThreadFile, ThreadMessage, WorkItem, WorkMessage, generatePendingFileId, isImageMimeType, messagesToFiles, parseAttachments, readFileAsDataUrl, transformToSubagentBlocks, transformToWorkblocks } from '@standardagents/client';
6
6
 
7
7
  /**
8
8
  * Configuration for the StandardAgents plugin
@@ -30,6 +30,8 @@ interface ThreadProviderOptions {
30
30
  live?: boolean;
31
31
  /** Transform messages to workblocks (default: false) */
32
32
  useWorkblocks?: boolean;
33
+ /** Transform messages to subagent blocks (default: false) */
34
+ useSubagentBlocks?: boolean;
33
35
  /** Message depth to fetch (default: 0) */
34
36
  depth?: number;
35
37
  /** Include silent messages (default: false) */
@@ -47,6 +49,10 @@ interface ThreadContext {
47
49
  messages: Ref<_standardagents_client.Message[]>;
48
50
  /** Messages transformed to workblocks (if useWorkblocks is true) */
49
51
  workblocks: ComputedRef<_standardagents_client.ThreadMessage[]>;
52
+ /** Messages transformed to subagent blocks (if useSubagentBlocks is true) */
53
+ subagentBlocks: ComputedRef<_standardagents_client.SubagentThreadMessage[]>;
54
+ /** Active grouped message view based on options (subagent blocks > workblocks > raw) */
55
+ groupedMessages: ComputedRef<_standardagents_client.GroupedThreadMessage[]>;
50
56
  /** Connection status */
51
57
  status: Ref<_standardagents_client.ConnectionStatus>;
52
58
  /** Connection status (alias for status) */
@@ -98,6 +104,8 @@ interface UseThreadOptions {
98
104
  live?: boolean;
99
105
  /** Transform messages to workblocks (default: false) */
100
106
  useWorkblocks?: boolean;
107
+ /** Transform messages to subagent blocks (default: false) */
108
+ useSubagentBlocks?: boolean;
101
109
  /** Message depth to fetch (default: 0) */
102
110
  depth?: number;
103
111
  /** Include silent messages (default: false) */
@@ -175,6 +183,13 @@ declare const ThreadProvider: vue.DefineComponent<vue.ExtractPropTypes<{
175
183
  type: PropType<boolean>;
176
184
  default: undefined;
177
185
  };
186
+ /**
187
+ * Transform messages to subagent blocks (default: false)
188
+ */
189
+ useSubagentBlocks: {
190
+ type: PropType<boolean>;
191
+ default: undefined;
192
+ };
178
193
  /**
179
194
  * Message depth to fetch (default: 0)
180
195
  */
@@ -227,6 +242,13 @@ declare const ThreadProvider: vue.DefineComponent<vue.ExtractPropTypes<{
227
242
  type: PropType<boolean>;
228
243
  default: undefined;
229
244
  };
245
+ /**
246
+ * Transform messages to subagent blocks (default: false)
247
+ */
248
+ useSubagentBlocks: {
249
+ type: PropType<boolean>;
250
+ default: undefined;
251
+ };
230
252
  /**
231
253
  * Message depth to fetch (default: 0)
232
254
  */
@@ -252,6 +274,7 @@ declare const ThreadProvider: vue.DefineComponent<vue.ExtractPropTypes<{
252
274
  preload: boolean;
253
275
  live: boolean;
254
276
  useWorkblocks: boolean;
277
+ useSubagentBlocks: boolean;
255
278
  depth: number;
256
279
  includeSilent: boolean;
257
280
  endpoint: string;
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import * as vue from 'vue';
2
2
  import { ComputedRef, Ref, InjectionKey, Plugin, PropType } from 'vue';
3
3
  import * as _standardagents_client from '@standardagents/client';
4
4
  import { AgentBuilderClient, SendMessagePayload, Message, ThreadFile, PendingAttachment } from '@standardagents/client';
5
- export { AgentBuilderClient, AttachmentPayload, AttachmentRef, ConnectionStatus, FileUploadManager, GetMessagesOptions, Message, PendingAttachment, SendMessagePayload, Thread, ThreadConnectionCallbacks, ThreadConnectionManager, ThreadConnectionOptions, ThreadFile, ThreadMessage, WorkItem, WorkMessage, generatePendingFileId, isImageMimeType, messagesToFiles, parseAttachments, readFileAsDataUrl, transformToWorkblocks } from '@standardagents/client';
5
+ export { AgentBuilderClient, AttachmentPayload, AttachmentRef, ConnectionStatus, FileUploadManager, GetMessagesOptions, GroupedThreadMessage, Message, PendingAttachment, SendMessagePayload, StatusMessage, SubagentBlockMessage, SubagentThreadMessage, Thread, ThreadConnectionCallbacks, ThreadConnectionManager, ThreadConnectionOptions, ThreadFile, ThreadMessage, WorkItem, WorkMessage, generatePendingFileId, isImageMimeType, messagesToFiles, parseAttachments, readFileAsDataUrl, transformToSubagentBlocks, transformToWorkblocks } from '@standardagents/client';
6
6
 
7
7
  /**
8
8
  * Configuration for the StandardAgents plugin
@@ -30,6 +30,8 @@ interface ThreadProviderOptions {
30
30
  live?: boolean;
31
31
  /** Transform messages to workblocks (default: false) */
32
32
  useWorkblocks?: boolean;
33
+ /** Transform messages to subagent blocks (default: false) */
34
+ useSubagentBlocks?: boolean;
33
35
  /** Message depth to fetch (default: 0) */
34
36
  depth?: number;
35
37
  /** Include silent messages (default: false) */
@@ -47,6 +49,10 @@ interface ThreadContext {
47
49
  messages: Ref<_standardagents_client.Message[]>;
48
50
  /** Messages transformed to workblocks (if useWorkblocks is true) */
49
51
  workblocks: ComputedRef<_standardagents_client.ThreadMessage[]>;
52
+ /** Messages transformed to subagent blocks (if useSubagentBlocks is true) */
53
+ subagentBlocks: ComputedRef<_standardagents_client.SubagentThreadMessage[]>;
54
+ /** Active grouped message view based on options (subagent blocks > workblocks > raw) */
55
+ groupedMessages: ComputedRef<_standardagents_client.GroupedThreadMessage[]>;
50
56
  /** Connection status */
51
57
  status: Ref<_standardagents_client.ConnectionStatus>;
52
58
  /** Connection status (alias for status) */
@@ -98,6 +104,8 @@ interface UseThreadOptions {
98
104
  live?: boolean;
99
105
  /** Transform messages to workblocks (default: false) */
100
106
  useWorkblocks?: boolean;
107
+ /** Transform messages to subagent blocks (default: false) */
108
+ useSubagentBlocks?: boolean;
101
109
  /** Message depth to fetch (default: 0) */
102
110
  depth?: number;
103
111
  /** Include silent messages (default: false) */
@@ -175,6 +183,13 @@ declare const ThreadProvider: vue.DefineComponent<vue.ExtractPropTypes<{
175
183
  type: PropType<boolean>;
176
184
  default: undefined;
177
185
  };
186
+ /**
187
+ * Transform messages to subagent blocks (default: false)
188
+ */
189
+ useSubagentBlocks: {
190
+ type: PropType<boolean>;
191
+ default: undefined;
192
+ };
178
193
  /**
179
194
  * Message depth to fetch (default: 0)
180
195
  */
@@ -227,6 +242,13 @@ declare const ThreadProvider: vue.DefineComponent<vue.ExtractPropTypes<{
227
242
  type: PropType<boolean>;
228
243
  default: undefined;
229
244
  };
245
+ /**
246
+ * Transform messages to subagent blocks (default: false)
247
+ */
248
+ useSubagentBlocks: {
249
+ type: PropType<boolean>;
250
+ default: undefined;
251
+ };
230
252
  /**
231
253
  * Message depth to fetch (default: 0)
232
254
  */
@@ -252,6 +274,7 @@ declare const ThreadProvider: vue.DefineComponent<vue.ExtractPropTypes<{
252
274
  preload: boolean;
253
275
  live: boolean;
254
276
  useWorkblocks: boolean;
277
+ useSubagentBlocks: boolean;
255
278
  depth: number;
256
279
  includeSilent: boolean;
257
280
  endpoint: string;
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { FileUploadManager, AgentBuilderClient, transformToWorkblocks, ThreadConnectionManager } from '@standardagents/client';
2
- export { AgentBuilderClient, FileUploadManager, ThreadConnectionManager, generatePendingFileId, isImageMimeType, messagesToFiles, parseAttachments, readFileAsDataUrl, transformToWorkblocks } from '@standardagents/client';
1
+ import { FileUploadManager, AgentBuilderClient, transformToWorkblocks, transformToSubagentBlocks, ThreadConnectionManager } from '@standardagents/client';
2
+ export { AgentBuilderClient, FileUploadManager, ThreadConnectionManager, generatePendingFileId, isImageMimeType, messagesToFiles, parseAttachments, readFileAsDataUrl, transformToSubagentBlocks, transformToWorkblocks } from '@standardagents/client';
3
3
  import { defineComponent, provide, computed, toValue, ref, watch, onMounted, onUnmounted, inject } from 'vue';
4
4
 
5
5
  // src/plugin.ts
@@ -51,6 +51,7 @@ function useThreadSetup(threadIdInput, options = {}) {
51
51
  preload = true,
52
52
  live = true,
53
53
  useWorkblocks = false,
54
+ useSubagentBlocks = false,
54
55
  depth = 0,
55
56
  includeSilent = false,
56
57
  endpoint: endpointOverride
@@ -62,6 +63,7 @@ function useThreadSetup(threadIdInput, options = {}) {
62
63
  preload,
63
64
  live,
64
65
  useWorkblocks,
66
+ useSubagentBlocks,
65
67
  depth,
66
68
  includeSilent
67
69
  };
@@ -85,6 +87,23 @@ function useThreadSetup(threadIdInput, options = {}) {
85
87
  }
86
88
  return transformToWorkblocks(messages.value);
87
89
  });
90
+ const subagentBlocks = computed(() => {
91
+ if (!useSubagentBlocks) {
92
+ return messages.value;
93
+ }
94
+ return transformToSubagentBlocks(messages.value, {
95
+ includeWorkblocks: useWorkblocks
96
+ });
97
+ });
98
+ const groupedMessages = computed(() => {
99
+ if (useSubagentBlocks) {
100
+ return subagentBlocks.value;
101
+ }
102
+ if (useWorkblocks) {
103
+ return workblocks.value;
104
+ }
105
+ return messages.value;
106
+ });
88
107
  async function loadMessages() {
89
108
  isLoading.value = true;
90
109
  error.value = null;
@@ -403,6 +422,8 @@ function useThreadSetup(threadIdInput, options = {}) {
403
422
  options: resolvedOptions,
404
423
  messages,
405
424
  workblocks,
425
+ subagentBlocks,
426
+ groupedMessages,
406
427
  status,
407
428
  connectionStatus: status,
408
429
  // alias
@@ -463,6 +484,13 @@ var ThreadProvider = defineComponent({
463
484
  type: Boolean,
464
485
  default: void 0
465
486
  },
487
+ /**
488
+ * Transform messages to subagent blocks (default: false)
489
+ */
490
+ useSubagentBlocks: {
491
+ type: Boolean,
492
+ default: void 0
493
+ },
466
494
  /**
467
495
  * Message depth to fetch (default: 0)
468
496
  */
@@ -490,6 +518,9 @@ var ThreadProvider = defineComponent({
490
518
  if (props.preload !== void 0) options.preload = props.preload;
491
519
  if (props.live !== void 0) options.live = props.live;
492
520
  if (props.useWorkblocks !== void 0) options.useWorkblocks = props.useWorkblocks;
521
+ if (props.useSubagentBlocks !== void 0) {
522
+ options.useSubagentBlocks = props.useSubagentBlocks;
523
+ }
493
524
  if (props.depth !== void 0) options.depth = props.depth;
494
525
  if (props.includeSilent !== void 0) options.includeSilent = props.includeSilent;
495
526
  if (props.endpoint !== void 0) options.endpoint = props.endpoint;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@standardagents/vue",
3
- "version": "0.12.9",
3
+ "version": "0.13.0",
4
4
  "description": "Vue SDK for Standard Agents",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -22,7 +22,7 @@
22
22
  "dist"
23
23
  ],
24
24
  "dependencies": {
25
- "@standardagents/client": "0.12.9"
25
+ "@standardagents/client": "0.13.0"
26
26
  },
27
27
  "peerDependencies": {
28
28
  "vue": "^3.3.0"