@myagentroam/protocol 0.11.17 → 0.11.19

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.d.ts CHANGED
@@ -16,6 +16,7 @@ export * from './mail-notification.js';
16
16
  export * from './notification-channels.js';
17
17
  export * from './web-push.js';
18
18
  export * from './workbench-notification.js';
19
+ export * from './session-group.js';
19
20
  export * from './model-usage.js';
20
21
  export * from './management-pagination.js';
21
22
  export declare const healthStatusSchema: z.ZodObject<{
@@ -1092,6 +1093,13 @@ export declare const nodeCapabilitiesSchema: z.ZodEffects<z.ZodObject<{
1092
1093
  apiVersion: 1;
1093
1094
  transport: true;
1094
1095
  }>>;
1096
+ sessionGroups: z.ZodOptional<z.ZodObject<{
1097
+ apiVersion: z.ZodLiteral<1>;
1098
+ }, "strict", z.ZodTypeAny, {
1099
+ apiVersion: 1;
1100
+ }, {
1101
+ apiVersion: 1;
1102
+ }>>;
1095
1103
  }, "strip", z.ZodTypeAny, {
1096
1104
  codex: {
1097
1105
  available: boolean;
@@ -1208,6 +1216,9 @@ export declare const nodeCapabilitiesSchema: z.ZodEffects<z.ZodObject<{
1208
1216
  apiVersion: 1;
1209
1217
  transport: true;
1210
1218
  } | undefined;
1219
+ sessionGroups?: {
1220
+ apiVersion: 1;
1221
+ } | undefined;
1211
1222
  }, {
1212
1223
  codex: {
1213
1224
  available: boolean;
@@ -1324,6 +1335,9 @@ export declare const nodeCapabilitiesSchema: z.ZodEffects<z.ZodObject<{
1324
1335
  apiVersion: 1;
1325
1336
  transport: true;
1326
1337
  } | undefined;
1338
+ sessionGroups?: {
1339
+ apiVersion: 1;
1340
+ } | undefined;
1327
1341
  }>, {
1328
1342
  codex: {
1329
1343
  available: boolean;
@@ -1440,6 +1454,9 @@ export declare const nodeCapabilitiesSchema: z.ZodEffects<z.ZodObject<{
1440
1454
  apiVersion: 1;
1441
1455
  transport: true;
1442
1456
  } | undefined;
1457
+ sessionGroups?: {
1458
+ apiVersion: 1;
1459
+ } | undefined;
1443
1460
  }, {
1444
1461
  codex: {
1445
1462
  available: boolean;
@@ -1556,6 +1573,9 @@ export declare const nodeCapabilitiesSchema: z.ZodEffects<z.ZodObject<{
1556
1573
  apiVersion: 1;
1557
1574
  transport: true;
1558
1575
  } | undefined;
1576
+ sessionGroups?: {
1577
+ apiVersion: 1;
1578
+ } | undefined;
1559
1579
  }>;
1560
1580
  export type NodeCapabilities = z.infer<typeof nodeCapabilitiesSchema>;
1561
1581
  export declare const workspaceKindSchema: z.ZodEnum<["DIRECTORY", "GIT_WORKSPACE"]>;
@@ -7517,6 +7537,7 @@ export declare const recentRunSchema: z.ZodObject<{
7517
7537
  workspaceName: z.ZodOptional<z.ZodString>;
7518
7538
  sessionId: z.ZodString;
7519
7539
  sessionTitle: z.ZodString;
7540
+ sessionGroup: z.ZodOptional<z.ZodEnum<["MAIN", "CHILD"]>>;
7520
7541
  userMessage: z.ZodOptional<z.ZodString>;
7521
7542
  runner: z.ZodEnum<["codex", "claude-code", "opencode", "mar-agent"]>;
7522
7543
  status: z.ZodEnum<["STARTING", "RUNNING", "CANCELLING", "SUCCEEDED", "FAILED", "CANCELLED", "INTERRUPTED"]>;
@@ -7542,6 +7563,7 @@ export declare const recentRunSchema: z.ZodObject<{
7542
7563
  sortAt: number;
7543
7564
  userMessage?: string | undefined;
7544
7565
  workspaceName?: string | undefined;
7566
+ sessionGroup?: "MAIN" | "CHILD" | undefined;
7545
7567
  }, {
7546
7568
  status: "SUCCEEDED" | "FAILED" | "CANCELLED" | "STARTING" | "RUNNING" | "CANCELLING" | "INTERRUPTED";
7547
7569
  sessionId: string;
@@ -7558,6 +7580,7 @@ export declare const recentRunSchema: z.ZodObject<{
7558
7580
  sortAt: number;
7559
7581
  userMessage?: string | undefined;
7560
7582
  workspaceName?: string | undefined;
7583
+ sessionGroup?: "MAIN" | "CHILD" | undefined;
7561
7584
  }>;
7562
7585
  export type RecentRun = z.infer<typeof recentRunSchema>;
7563
7586
  export declare const recentRunProjectionSchema: z.ZodObject<Omit<{
@@ -7567,6 +7590,7 @@ export declare const recentRunProjectionSchema: z.ZodObject<Omit<{
7567
7590
  workspaceName: z.ZodOptional<z.ZodString>;
7568
7591
  sessionId: z.ZodString;
7569
7592
  sessionTitle: z.ZodString;
7593
+ sessionGroup: z.ZodOptional<z.ZodEnum<["MAIN", "CHILD"]>>;
7570
7594
  userMessage: z.ZodOptional<z.ZodString>;
7571
7595
  runner: z.ZodEnum<["codex", "claude-code", "opencode", "mar-agent"]>;
7572
7596
  status: z.ZodEnum<["STARTING", "RUNNING", "CANCELLING", "SUCCEEDED", "FAILED", "CANCELLED", "INTERRUPTED"]>;
@@ -7594,6 +7618,7 @@ export declare const recentRunProjectionSchema: z.ZodObject<Omit<{
7594
7618
  completedAt: number | null;
7595
7619
  sortAt: number;
7596
7620
  userMessage?: string | undefined;
7621
+ sessionGroup?: "MAIN" | "CHILD" | undefined;
7597
7622
  }, {
7598
7623
  status: "SUCCEEDED" | "FAILED" | "CANCELLED" | "STARTING" | "RUNNING" | "CANCELLING" | "INTERRUPTED";
7599
7624
  sessionId: string;
@@ -7610,6 +7635,7 @@ export declare const recentRunProjectionSchema: z.ZodObject<Omit<{
7610
7635
  completedAt: number | null;
7611
7636
  sortAt: number;
7612
7637
  userMessage?: string | undefined;
7638
+ sessionGroup?: "MAIN" | "CHILD" | undefined;
7613
7639
  }>;
7614
7640
  export type RecentRunProjection = z.infer<typeof recentRunProjectionSchema>;
7615
7641
  export declare const recentRunProjectionMessageSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
@@ -7621,6 +7647,7 @@ export declare const recentRunProjectionMessageSchema: z.ZodDiscriminatedUnion<"
7621
7647
  workspaceName: z.ZodOptional<z.ZodString>;
7622
7648
  sessionId: z.ZodString;
7623
7649
  sessionTitle: z.ZodString;
7650
+ sessionGroup: z.ZodOptional<z.ZodEnum<["MAIN", "CHILD"]>>;
7624
7651
  userMessage: z.ZodOptional<z.ZodString>;
7625
7652
  runner: z.ZodEnum<["codex", "claude-code", "opencode", "mar-agent"]>;
7626
7653
  status: z.ZodEnum<["STARTING", "RUNNING", "CANCELLING", "SUCCEEDED", "FAILED", "CANCELLED", "INTERRUPTED"]>;
@@ -7648,6 +7675,7 @@ export declare const recentRunProjectionMessageSchema: z.ZodDiscriminatedUnion<"
7648
7675
  completedAt: number | null;
7649
7676
  sortAt: number;
7650
7677
  userMessage?: string | undefined;
7678
+ sessionGroup?: "MAIN" | "CHILD" | undefined;
7651
7679
  }, {
7652
7680
  status: "SUCCEEDED" | "FAILED" | "CANCELLED" | "STARTING" | "RUNNING" | "CANCELLING" | "INTERRUPTED";
7653
7681
  sessionId: string;
@@ -7664,6 +7692,7 @@ export declare const recentRunProjectionMessageSchema: z.ZodDiscriminatedUnion<"
7664
7692
  completedAt: number | null;
7665
7693
  sortAt: number;
7666
7694
  userMessage?: string | undefined;
7695
+ sessionGroup?: "MAIN" | "CHILD" | undefined;
7667
7696
  }>;
7668
7697
  }, "strip", z.ZodTypeAny, {
7669
7698
  kind: "UPDATE";
@@ -7683,6 +7712,7 @@ export declare const recentRunProjectionMessageSchema: z.ZodDiscriminatedUnion<"
7683
7712
  completedAt: number | null;
7684
7713
  sortAt: number;
7685
7714
  userMessage?: string | undefined;
7715
+ sessionGroup?: "MAIN" | "CHILD" | undefined;
7686
7716
  };
7687
7717
  }, {
7688
7718
  kind: "UPDATE";
@@ -7702,6 +7732,7 @@ export declare const recentRunProjectionMessageSchema: z.ZodDiscriminatedUnion<"
7702
7732
  completedAt: number | null;
7703
7733
  sortAt: number;
7704
7734
  userMessage?: string | undefined;
7735
+ sessionGroup?: "MAIN" | "CHILD" | undefined;
7705
7736
  };
7706
7737
  }>, z.ZodObject<{
7707
7738
  kind: z.ZodLiteral<"SNAPSHOT">;
@@ -7712,6 +7743,7 @@ export declare const recentRunProjectionMessageSchema: z.ZodDiscriminatedUnion<"
7712
7743
  workspaceName: z.ZodOptional<z.ZodString>;
7713
7744
  sessionId: z.ZodString;
7714
7745
  sessionTitle: z.ZodString;
7746
+ sessionGroup: z.ZodOptional<z.ZodEnum<["MAIN", "CHILD"]>>;
7715
7747
  userMessage: z.ZodOptional<z.ZodString>;
7716
7748
  runner: z.ZodEnum<["codex", "claude-code", "opencode", "mar-agent"]>;
7717
7749
  status: z.ZodEnum<["STARTING", "RUNNING", "CANCELLING", "SUCCEEDED", "FAILED", "CANCELLED", "INTERRUPTED"]>;
@@ -7739,6 +7771,7 @@ export declare const recentRunProjectionMessageSchema: z.ZodDiscriminatedUnion<"
7739
7771
  completedAt: number | null;
7740
7772
  sortAt: number;
7741
7773
  userMessage?: string | undefined;
7774
+ sessionGroup?: "MAIN" | "CHILD" | undefined;
7742
7775
  }, {
7743
7776
  status: "SUCCEEDED" | "FAILED" | "CANCELLED" | "STARTING" | "RUNNING" | "CANCELLING" | "INTERRUPTED";
7744
7777
  sessionId: string;
@@ -7755,6 +7788,7 @@ export declare const recentRunProjectionMessageSchema: z.ZodDiscriminatedUnion<"
7755
7788
  completedAt: number | null;
7756
7789
  sortAt: number;
7757
7790
  userMessage?: string | undefined;
7791
+ sessionGroup?: "MAIN" | "CHILD" | undefined;
7758
7792
  }>, "many">;
7759
7793
  }, "strip", z.ZodTypeAny, {
7760
7794
  kind: "SNAPSHOT";
@@ -7774,6 +7808,7 @@ export declare const recentRunProjectionMessageSchema: z.ZodDiscriminatedUnion<"
7774
7808
  completedAt: number | null;
7775
7809
  sortAt: number;
7776
7810
  userMessage?: string | undefined;
7811
+ sessionGroup?: "MAIN" | "CHILD" | undefined;
7777
7812
  }[];
7778
7813
  }, {
7779
7814
  kind: "SNAPSHOT";
@@ -7793,6 +7828,7 @@ export declare const recentRunProjectionMessageSchema: z.ZodDiscriminatedUnion<"
7793
7828
  completedAt: number | null;
7794
7829
  sortAt: number;
7795
7830
  userMessage?: string | undefined;
7831
+ sessionGroup?: "MAIN" | "CHILD" | undefined;
7796
7832
  }[];
7797
7833
  }>]>;
7798
7834
  export type RecentRunProjectionMessage = z.infer<typeof recentRunProjectionMessageSchema>;
@@ -8867,6 +8903,13 @@ export declare const nodeWorkbenchCapabilitiesSchema: z.ZodObject<{
8867
8903
  apiVersion: 1;
8868
8904
  transport: true;
8869
8905
  }>>;
8906
+ sessionGroups: z.ZodOptional<z.ZodObject<{
8907
+ apiVersion: z.ZodLiteral<1>;
8908
+ }, "strict", z.ZodTypeAny, {
8909
+ apiVersion: 1;
8910
+ }, {
8911
+ apiVersion: 1;
8912
+ }>>;
8870
8913
  git: z.ZodEffects<z.ZodObject<{
8871
8914
  available: z.ZodBoolean;
8872
8915
  reasonCode: z.ZodNullable<z.ZodString>;
@@ -9007,6 +9050,9 @@ export declare const nodeWorkbenchCapabilitiesSchema: z.ZodObject<{
9007
9050
  apiVersion: 1;
9008
9051
  transport: true;
9009
9052
  } | undefined;
9053
+ sessionGroups?: {
9054
+ apiVersion: 1;
9055
+ } | undefined;
9010
9056
  directTransfer?: {
9011
9057
  apiVersion: 2 | 3;
9012
9058
  transport: boolean;
@@ -9067,6 +9113,9 @@ export declare const nodeWorkbenchCapabilitiesSchema: z.ZodObject<{
9067
9113
  apiVersion: 1;
9068
9114
  transport: true;
9069
9115
  } | undefined;
9116
+ sessionGroups?: {
9117
+ apiVersion: 1;
9118
+ } | undefined;
9070
9119
  directTransfer?: {
9071
9120
  apiVersion: 2 | 3;
9072
9121
  transport: boolean;
package/dist/index.js CHANGED
@@ -21,6 +21,7 @@ export * from './mail-notification.js';
21
21
  export * from './notification-channels.js';
22
22
  export * from './web-push.js';
23
23
  export * from './workbench-notification.js';
24
+ export * from './session-group.js';
24
25
  export * from './model-usage.js';
25
26
  export * from './management-pagination.js';
26
27
  export const healthStatusSchema = z.object({
@@ -336,7 +337,11 @@ export const nodeCapabilitiesSchema = z
336
337
  promptCompletion: promptCompletionCapabilitySchema.optional(),
337
338
  chatgptLogin: chatgptLoginCapabilitySchema.optional(),
338
339
  workspaceDirectTransfer: workspaceDirectTransferCapabilitySchema.optional(),
339
- terminalDirect: terminalDirectCapabilitySchema.optional()
340
+ terminalDirect: terminalDirectCapabilitySchema.optional(),
341
+ sessionGroups: z
342
+ .object({ apiVersion: z.literal(1) })
343
+ .strict()
344
+ .optional()
340
345
  })
341
346
  .superRefine((capabilities, context) => {
342
347
  if (capabilities.platform !== 'linux' &&
@@ -1371,6 +1376,7 @@ export const recentRunSchema = z.object({
1371
1376
  workspaceName: z.string().max(128).optional(),
1372
1377
  sessionId: z.string().min(1).max(128),
1373
1378
  sessionTitle: z.string().min(1).max(160),
1379
+ sessionGroup: z.enum(['MAIN', 'CHILD']).optional(),
1374
1380
  userMessage: z.string().max(500).optional(),
1375
1381
  runner: runnerNameSchema,
1376
1382
  status: agentRunStatusSchema,
@@ -1673,6 +1679,10 @@ export const nodeWorkbenchCapabilitiesSchema = z.object({
1673
1679
  }),
1674
1680
  directTransfer: workspaceDirectTransferCapabilitySchema.optional(),
1675
1681
  terminalDirect: terminalDirectCapabilitySchema.optional(),
1682
+ sessionGroups: z
1683
+ .object({ apiVersion: z.literal(1) })
1684
+ .strict()
1685
+ .optional(),
1676
1686
  git: capabilitySchemaWith({
1677
1687
  supportsCurrentChanges: z.boolean(),
1678
1688
  supportsTurnChanges: z.boolean(),
@@ -42,6 +42,7 @@ export declare const notificationChannelsRequestSchema: z.ZodEffects<z.ZodObject
42
42
  kind: z.ZodLiteral<"AGENT_MESSAGE">;
43
43
  occurredAt: z.ZodNumber;
44
44
  sessionTitle: z.ZodString;
45
+ sessionGroup: z.ZodOptional<z.ZodEnum<["MAIN", "CHILD"]>>;
45
46
  source: z.ZodEnum<["MANUAL", "SCHEDULED"]>;
46
47
  sessionId: z.ZodString;
47
48
  workspaceId: z.ZodString;
@@ -65,6 +66,7 @@ export declare const notificationChannelsRequestSchema: z.ZodEffects<z.ZodObject
65
66
  templateId?: "" | "notification-en-US" | "notification-zh-CN" | undefined;
66
67
  title?: string | undefined;
67
68
  recipientEmail?: string | undefined;
69
+ sessionGroup?: "MAIN" | "CHILD" | undefined;
68
70
  }, {
69
71
  message: string;
70
72
  apiVersion: 1;
@@ -81,6 +83,7 @@ export declare const notificationChannelsRequestSchema: z.ZodEffects<z.ZodObject
81
83
  templateId?: "" | "notification-en-US" | "notification-zh-CN" | undefined;
82
84
  title?: string | undefined;
83
85
  recipientEmail?: string | undefined;
86
+ sessionGroup?: "MAIN" | "CHILD" | undefined;
84
87
  channels?: ("push" | "email")[] | undefined;
85
88
  }>, {
86
89
  message: string;
@@ -99,6 +102,7 @@ export declare const notificationChannelsRequestSchema: z.ZodEffects<z.ZodObject
99
102
  templateId?: "" | "notification-en-US" | "notification-zh-CN" | undefined;
100
103
  title?: string | undefined;
101
104
  recipientEmail?: string | undefined;
105
+ sessionGroup?: "MAIN" | "CHILD" | undefined;
102
106
  }, {
103
107
  message: string;
104
108
  apiVersion: 1;
@@ -115,6 +119,7 @@ export declare const notificationChannelsRequestSchema: z.ZodEffects<z.ZodObject
115
119
  templateId?: "" | "notification-en-US" | "notification-zh-CN" | undefined;
116
120
  title?: string | undefined;
117
121
  recipientEmail?: string | undefined;
122
+ sessionGroup?: "MAIN" | "CHILD" | undefined;
118
123
  channels?: ("push" | "email")[] | undefined;
119
124
  }>;
120
125
  export type NotificationChannelsRequest = z.infer<typeof notificationChannelsRequestSchema>;
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { sessionGroupSchema } from './session-group.js';
2
3
  import { mailNotificationRequestSchema } from './mail-notification.js';
3
4
  const notificationInput = z
4
5
  .object({
@@ -42,7 +43,8 @@ export const notificationChannelsRequestSchema = notificationInput
42
43
  eventType: z.literal('notification'),
43
44
  kind: z.literal('AGENT_MESSAGE'),
44
45
  occurredAt: z.number().int().nonnegative().safe(),
45
- sessionTitle: z.string().min(1).max(160)
46
+ sessionTitle: z.string().min(1).max(160),
47
+ sessionGroup: sessionGroupSchema.optional()
46
48
  })
47
49
  .superRefine(validateChannels);
48
50
  const count = z.number().int().min(0).max(32);
@@ -0,0 +1,31 @@
1
+ import { z } from 'zod';
2
+ export declare const sessionGroupSchema: z.ZodEnum<["MAIN", "CHILD"]>;
3
+ export type SessionGroup = z.infer<typeof sessionGroupSchema>;
4
+ export declare const sessionRunningCountsSchema: z.ZodObject<{
5
+ MAIN: z.ZodNumber;
6
+ CHILD: z.ZodNumber;
7
+ }, "strip", z.ZodTypeAny, {
8
+ MAIN: number;
9
+ CHILD: number;
10
+ }, {
11
+ MAIN: number;
12
+ CHILD: number;
13
+ }>;
14
+ export type SessionRunningCounts = z.infer<typeof sessionRunningCountsSchema>;
15
+ export declare const sessionGroupChangedSchema: z.ZodObject<{
16
+ nodeId: z.ZodString;
17
+ workspaceId: z.ZodString;
18
+ sessionId: z.ZodString;
19
+ sessionGroup: z.ZodLiteral<"MAIN">;
20
+ }, "strict", z.ZodTypeAny, {
21
+ sessionId: string;
22
+ workspaceId: string;
23
+ nodeId: string;
24
+ sessionGroup: "MAIN";
25
+ }, {
26
+ sessionId: string;
27
+ workspaceId: string;
28
+ nodeId: string;
29
+ sessionGroup: "MAIN";
30
+ }>;
31
+ export type SessionGroupChanged = z.infer<typeof sessionGroupChangedSchema>;
@@ -0,0 +1,14 @@
1
+ import { z } from 'zod';
2
+ export const sessionGroupSchema = z.enum(['MAIN', 'CHILD']);
3
+ export const sessionRunningCountsSchema = z.object({
4
+ MAIN: z.number().int().nonnegative().safe(),
5
+ CHILD: z.number().int().nonnegative().safe()
6
+ });
7
+ export const sessionGroupChangedSchema = z
8
+ .object({
9
+ nodeId: z.string().min(1).max(128),
10
+ workspaceId: z.string().min(1).max(128),
11
+ sessionId: z.string().min(1).max(128),
12
+ sessionGroup: z.literal('MAIN')
13
+ })
14
+ .strict();
@@ -21,7 +21,7 @@ export const terminalDirectBrowserMessageSchema = z.discriminatedUnion('type', [
21
21
  transportSessionId: id,
22
22
  terminalId: resourceId,
23
23
  workspaceId: resourceId.optional(),
24
- afterSequence: z.number().int().nonnegative(),
24
+ afterSequence: z.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER),
25
25
  readonly: z.boolean(),
26
26
  takeover: z.literal(false).optional()
27
27
  })
@@ -68,7 +68,7 @@ export const terminalDirectNodeCommandSchema = z.discriminatedUnion('type', [
68
68
  nodeGeneration: id,
69
69
  terminalId: resourceId,
70
70
  workspaceId: resourceId.optional(),
71
- afterSequence: z.number().int().nonnegative(),
71
+ afterSequence: z.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER),
72
72
  readonly: z.boolean(),
73
73
  takeover: z.literal(false).optional(),
74
74
  grant: z.string().min(32).max(4096),
@@ -101,6 +101,6 @@ export const terminalDirectAttachedFrameSchema = z
101
101
  .object({
102
102
  type: z.literal('ATTACHED'),
103
103
  terminalId: resourceId,
104
- afterSequence: z.number().int().nonnegative()
104
+ afterSequence: z.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER)
105
105
  })
106
106
  .strict();
@@ -20,7 +20,7 @@ export declare const toolResultResourcePageSchema: z.ZodObject<{
20
20
  format: z.ZodLiteral<"unified-diff">;
21
21
  sha256: z.ZodString;
22
22
  byteSize: z.ZodNumber;
23
- content: z.ZodString;
23
+ content: z.ZodEffects<z.ZodString, string, string>;
24
24
  nextCursor: z.ZodOptional<z.ZodString>;
25
25
  }, "strict", z.ZodTypeAny, {
26
26
  type: "file_changes";
@@ -23,7 +23,12 @@ export const toolResultResourcePageSchema = z
23
23
  .int()
24
24
  .min(0)
25
25
  .max(16 * 1024 * 1024),
26
- content: z.string().max(256 * 1024),
26
+ content: z
27
+ .string()
28
+ .max(256 * 1024)
29
+ .refine((value) => new TextEncoder().encode(value).byteLength <= 256 * 1024, {
30
+ message: 'Content must not exceed 256 KiB in UTF-8 bytes'
31
+ }),
27
32
  nextCursor: z.string().min(1).max(1024).optional()
28
33
  })
29
34
  .strict();
@@ -4,18 +4,21 @@ export declare const notificationTargetSchema: z.ZodDiscriminatedUnion<"targetTy
4
4
  nodeId: z.ZodString;
5
5
  workspaceId: z.ZodString;
6
6
  sessionId: z.ZodString;
7
+ sessionGroup: z.ZodOptional<z.ZodEnum<["MAIN", "CHILD"]>>;
7
8
  sessionName: z.ZodOptional<z.ZodString>;
8
9
  }, "strict", z.ZodTypeAny, {
9
10
  sessionId: string;
10
11
  workspaceId: string;
11
12
  nodeId: string;
12
13
  targetType: "WORKSPACE_SESSION";
14
+ sessionGroup?: "MAIN" | "CHILD" | undefined;
13
15
  sessionName?: string | undefined;
14
16
  }, {
15
17
  sessionId: string;
16
18
  workspaceId: string;
17
19
  nodeId: string;
18
20
  targetType: "WORKSPACE_SESSION";
21
+ sessionGroup?: "MAIN" | "CHILD" | undefined;
19
22
  sessionName?: string | undefined;
20
23
  }>, z.ZodObject<{
21
24
  targetType: z.ZodLiteral<"HOSTED_CONVERSATION">;
@@ -47,18 +50,21 @@ export declare const serverNotificationSchema: z.ZodObject<{
47
50
  nodeId: z.ZodString;
48
51
  workspaceId: z.ZodString;
49
52
  sessionId: z.ZodString;
53
+ sessionGroup: z.ZodOptional<z.ZodEnum<["MAIN", "CHILD"]>>;
50
54
  sessionName: z.ZodOptional<z.ZodString>;
51
55
  }, "strict", z.ZodTypeAny, {
52
56
  sessionId: string;
53
57
  workspaceId: string;
54
58
  nodeId: string;
55
59
  targetType: "WORKSPACE_SESSION";
60
+ sessionGroup?: "MAIN" | "CHILD" | undefined;
56
61
  sessionName?: string | undefined;
57
62
  }, {
58
63
  sessionId: string;
59
64
  workspaceId: string;
60
65
  nodeId: string;
61
66
  targetType: "WORKSPACE_SESSION";
67
+ sessionGroup?: "MAIN" | "CHILD" | undefined;
62
68
  sessionName?: string | undefined;
63
69
  }>, z.ZodObject<{
64
70
  targetType: z.ZodLiteral<"HOSTED_CONVERSATION">;
@@ -90,6 +96,7 @@ export declare const serverNotificationSchema: z.ZodObject<{
90
96
  workspaceId: string;
91
97
  nodeId: string;
92
98
  targetType: "WORKSPACE_SESSION";
99
+ sessionGroup?: "MAIN" | "CHILD" | undefined;
93
100
  sessionName?: string | undefined;
94
101
  } | {
95
102
  nodeId: string;
@@ -111,6 +118,7 @@ export declare const serverNotificationSchema: z.ZodObject<{
111
118
  workspaceId: string;
112
119
  nodeId: string;
113
120
  targetType: "WORKSPACE_SESSION";
121
+ sessionGroup?: "MAIN" | "CHILD" | undefined;
114
122
  sessionName?: string | undefined;
115
123
  } | {
116
124
  nodeId: string;
@@ -135,18 +143,21 @@ export declare const notificationCreatedSchema: z.ZodObject<{
135
143
  nodeId: z.ZodString;
136
144
  workspaceId: z.ZodString;
137
145
  sessionId: z.ZodString;
146
+ sessionGroup: z.ZodOptional<z.ZodEnum<["MAIN", "CHILD"]>>;
138
147
  sessionName: z.ZodOptional<z.ZodString>;
139
148
  }, "strict", z.ZodTypeAny, {
140
149
  sessionId: string;
141
150
  workspaceId: string;
142
151
  nodeId: string;
143
152
  targetType: "WORKSPACE_SESSION";
153
+ sessionGroup?: "MAIN" | "CHILD" | undefined;
144
154
  sessionName?: string | undefined;
145
155
  }, {
146
156
  sessionId: string;
147
157
  workspaceId: string;
148
158
  nodeId: string;
149
159
  targetType: "WORKSPACE_SESSION";
160
+ sessionGroup?: "MAIN" | "CHILD" | undefined;
150
161
  sessionName?: string | undefined;
151
162
  }>, z.ZodObject<{
152
163
  targetType: z.ZodLiteral<"HOSTED_CONVERSATION">;
@@ -178,6 +189,7 @@ export declare const notificationCreatedSchema: z.ZodObject<{
178
189
  workspaceId: string;
179
190
  nodeId: string;
180
191
  targetType: "WORKSPACE_SESSION";
192
+ sessionGroup?: "MAIN" | "CHILD" | undefined;
181
193
  sessionName?: string | undefined;
182
194
  } | {
183
195
  nodeId: string;
@@ -199,6 +211,7 @@ export declare const notificationCreatedSchema: z.ZodObject<{
199
211
  workspaceId: string;
200
212
  nodeId: string;
201
213
  targetType: "WORKSPACE_SESSION";
214
+ sessionGroup?: "MAIN" | "CHILD" | undefined;
202
215
  sessionName?: string | undefined;
203
216
  } | {
204
217
  nodeId: string;
@@ -223,6 +236,7 @@ export declare const notificationCreatedSchema: z.ZodObject<{
223
236
  workspaceId: string;
224
237
  nodeId: string;
225
238
  targetType: "WORKSPACE_SESSION";
239
+ sessionGroup?: "MAIN" | "CHILD" | undefined;
226
240
  sessionName?: string | undefined;
227
241
  } | {
228
242
  nodeId: string;
@@ -247,6 +261,7 @@ export declare const notificationCreatedSchema: z.ZodObject<{
247
261
  workspaceId: string;
248
262
  nodeId: string;
249
263
  targetType: "WORKSPACE_SESSION";
264
+ sessionGroup?: "MAIN" | "CHILD" | undefined;
250
265
  sessionName?: string | undefined;
251
266
  } | {
252
267
  nodeId: string;
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { sessionGroupSchema } from './session-group.js';
2
3
  const identity = z.string().min(1).max(256);
3
4
  const timestamp = z.number().int().nonnegative().safe();
4
5
  export const notificationTargetSchema = z.discriminatedUnion('targetType', [
@@ -8,6 +9,7 @@ export const notificationTargetSchema = z.discriminatedUnion('targetType', [
8
9
  nodeId: identity,
9
10
  workspaceId: identity,
10
11
  sessionId: identity,
12
+ sessionGroup: sessionGroupSchema.optional(),
11
13
  sessionName: z.string().optional()
12
14
  })
13
15
  .strict(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myagentroam/protocol",
3
- "version": "0.11.17",
3
+ "version": "0.11.19",
4
4
  "description": "Shared runtime protocol schemas for MyAgentRoam.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",