@myagentroam/protocol 0.11.47 → 0.11.49

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.
@@ -20,31 +20,31 @@ export type ChannelOrigin = z.infer<typeof channelOriginSchema>;
20
20
  export declare const sessionMessageOriginSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
21
21
  sessionId: z.ZodOptional<z.ZodString>;
22
22
  name: z.ZodOptional<z.ZodString>;
23
- relation: z.ZodOptional<z.ZodEnum<["parent", "other"]>>;
23
+ relation: z.ZodOptional<z.ZodEnum<["parent", "child", "descendant", "other"]>>;
24
24
  }, "strict", z.ZodTypeAny, {
25
25
  name?: string | undefined;
26
26
  sessionId?: string | undefined;
27
- relation?: "parent" | "other" | undefined;
27
+ relation?: "parent" | "child" | "descendant" | "other" | undefined;
28
28
  }, {
29
29
  name?: string | undefined;
30
30
  sessionId?: string | undefined;
31
- relation?: "parent" | "other" | undefined;
31
+ relation?: "parent" | "child" | "descendant" | "other" | undefined;
32
32
  }>, {
33
33
  name?: string | undefined;
34
34
  sessionId?: string | undefined;
35
- relation?: "parent" | "other" | undefined;
35
+ relation?: "parent" | "child" | "descendant" | "other" | undefined;
36
36
  }, {
37
37
  name?: string | undefined;
38
38
  sessionId?: string | undefined;
39
- relation?: "parent" | "other" | undefined;
39
+ relation?: "parent" | "child" | "descendant" | "other" | undefined;
40
40
  }>, {
41
41
  name?: string | undefined;
42
42
  sessionId?: string | undefined;
43
- relation?: "parent" | "other" | undefined;
43
+ relation?: "parent" | "child" | "descendant" | "other" | undefined;
44
44
  }, {
45
45
  name?: string | undefined;
46
46
  sessionId?: string | undefined;
47
- relation?: "parent" | "other" | undefined;
47
+ relation?: "parent" | "child" | "descendant" | "other" | undefined;
48
48
  }>;
49
49
  export type SessionMessageOrigin = z.infer<typeof sessionMessageOriginSchema>;
50
50
  export declare function isComposerAttachmentResourcePath(value: string): boolean;
@@ -75,31 +75,31 @@ export declare const composerTagSchemas: {
75
75
  readonly mar_session_origin: z.ZodEffects<z.ZodEffects<z.ZodObject<{
76
76
  sessionId: z.ZodOptional<z.ZodString>;
77
77
  name: z.ZodOptional<z.ZodString>;
78
- relation: z.ZodOptional<z.ZodEnum<["parent", "other"]>>;
78
+ relation: z.ZodOptional<z.ZodEnum<["parent", "child", "descendant", "other"]>>;
79
79
  }, "strict", z.ZodTypeAny, {
80
80
  name?: string | undefined;
81
81
  sessionId?: string | undefined;
82
- relation?: "parent" | "other" | undefined;
82
+ relation?: "parent" | "child" | "descendant" | "other" | undefined;
83
83
  }, {
84
84
  name?: string | undefined;
85
85
  sessionId?: string | undefined;
86
- relation?: "parent" | "other" | undefined;
86
+ relation?: "parent" | "child" | "descendant" | "other" | undefined;
87
87
  }>, {
88
88
  name?: string | undefined;
89
89
  sessionId?: string | undefined;
90
- relation?: "parent" | "other" | undefined;
90
+ relation?: "parent" | "child" | "descendant" | "other" | undefined;
91
91
  }, {
92
92
  name?: string | undefined;
93
93
  sessionId?: string | undefined;
94
- relation?: "parent" | "other" | undefined;
94
+ relation?: "parent" | "child" | "descendant" | "other" | undefined;
95
95
  }>, {
96
96
  name?: string | undefined;
97
97
  sessionId?: string | undefined;
98
- relation?: "parent" | "other" | undefined;
98
+ relation?: "parent" | "child" | "descendant" | "other" | undefined;
99
99
  }, {
100
100
  name?: string | undefined;
101
101
  sessionId?: string | undefined;
102
- relation?: "parent" | "other" | undefined;
102
+ relation?: "parent" | "child" | "descendant" | "other" | undefined;
103
103
  }>;
104
104
  readonly mar_goal_start: z.ZodObject<{
105
105
  objective: z.ZodString;
@@ -208,7 +208,7 @@ export declare const composerTagSchemas: {
208
208
  }[];
209
209
  }>;
210
210
  readonly mar_references: z.ZodObject<{
211
- references: z.ZodArray<z.ZodObject<{
211
+ references: z.ZodArray<z.ZodUnion<[z.ZodObject<{
212
212
  type: z.ZodEnum<["file", "directory"]>;
213
213
  path: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
214
214
  label: z.ZodString;
@@ -223,21 +223,41 @@ export declare const composerTagSchemas: {
223
223
  type: "file" | "directory";
224
224
  label: string;
225
225
  runnerPath?: string | undefined;
226
- }>, "many">;
226
+ }>, z.ZodObject<{
227
+ type: z.ZodLiteral<"session">;
228
+ sessionId: z.ZodString;
229
+ label: z.ZodString;
230
+ }, "strict", z.ZodTypeAny, {
231
+ type: "session";
232
+ sessionId: string;
233
+ label: string;
234
+ }, {
235
+ type: "session";
236
+ sessionId: string;
237
+ label: string;
238
+ }>]>, "many">;
227
239
  }, "strict", z.ZodTypeAny, {
228
- references: {
240
+ references: ({
229
241
  path: string;
230
242
  type: "file" | "directory";
231
243
  label: string;
232
244
  runnerPath?: string | undefined;
233
- }[];
245
+ } | {
246
+ type: "session";
247
+ sessionId: string;
248
+ label: string;
249
+ })[];
234
250
  }, {
235
- references: {
251
+ references: ({
236
252
  path: string;
237
253
  type: "file" | "directory";
238
254
  label: string;
239
255
  runnerPath?: string | undefined;
240
- }[];
256
+ } | {
257
+ type: "session";
258
+ sessionId: string;
259
+ label: string;
260
+ })[];
241
261
  }>;
242
262
  };
243
263
  export type ComposerTagName = keyof typeof composerTagSchemas;
@@ -245,7 +265,10 @@ export type ComposerTagPayloads = {
245
265
  [K in ComposerTagName]: z.infer<(typeof composerTagSchemas)[K]>;
246
266
  };
247
267
  export type ComposerAttachmentFile = ComposerTagPayloads['mar_attachments']['files'][number];
248
- export type ComposerFileReference = ComposerTagPayloads['mar_references']['references'][number];
268
+ export type ComposerReference = ComposerTagPayloads['mar_references']['references'][number];
269
+ export type ComposerFileReference = Exclude<ComposerReference, {
270
+ type: 'session';
271
+ }>;
249
272
  export type ComposerTagPart = {
250
273
  readonly kind: 'text';
251
274
  readonly text: string;
@@ -21,7 +21,7 @@ export const sessionMessageOriginSchema = z
21
21
  .object({
22
22
  sessionId: z.string().min(1).max(512).optional(),
23
23
  name: name.optional(),
24
- relation: z.enum(['parent', 'other']).optional()
24
+ relation: z.enum(['parent', 'child', 'descendant', 'other']).optional()
25
25
  })
26
26
  .strict()
27
27
  .refine((value) => (value.sessionId === undefined) === (value.name === undefined))
@@ -80,14 +80,23 @@ export const composerTagSchemas = {
80
80
  mar_references: z
81
81
  .object({
82
82
  references: z
83
- .array(z
84
- .object({
85
- type: z.enum(['file', 'directory']),
86
- path: workspacePath,
87
- label: name,
88
- runnerPath: relativePath.optional()
89
- })
90
- .strict())
83
+ .array(z.union([
84
+ z
85
+ .object({
86
+ type: z.enum(['file', 'directory']),
87
+ path: workspacePath,
88
+ label: name,
89
+ runnerPath: relativePath.optional()
90
+ })
91
+ .strict(),
92
+ z
93
+ .object({
94
+ type: z.literal('session'),
95
+ sessionId: z.string().min(1).max(512),
96
+ label: name
97
+ })
98
+ .strict()
99
+ ]))
91
100
  .min(1)
92
101
  .max(128)
93
102
  })
@@ -129,7 +138,7 @@ export function serializeComposerTag(kind, payload) {
129
138
  if (kind === 'mar_steer')
130
139
  children.unshift(` <instruction>${STEER_INSTRUCTION}</instruction>`);
131
140
  if (kind === 'mar_session_origin')
132
- children.push(` <instruction>${value.sessionId === undefined ? 'Message sent via marctl.' : value.relation === 'parent' ? 'Message from the parent session.' : value.relation === 'other' ? 'Message from another session.' : 'Message from a session.'}</instruction>`);
141
+ children.push(` <instruction>${value.sessionId === undefined ? 'Message sent via marctl.' : value.relation === 'parent' ? 'Message from the parent session.' : value.relation === 'child' ? 'Message from a child session.' : value.relation === 'descendant' ? 'Message from a descendant session.' : value.relation === 'other' ? 'Message from another session.' : 'Message from a session.'}</instruction>`);
133
142
  const opening = `<${kind}${markupAttributes(attributes)}`;
134
143
  const encoded = children.length
135
144
  ? `${opening}>
package/dist/index.d.ts CHANGED
@@ -8161,11 +8161,11 @@ export declare const workbenchEventSchema: z.ZodObject<{
8161
8161
  payload: z.ZodUnknown;
8162
8162
  }, "strip", z.ZodTypeAny, {
8163
8163
  sequence: number;
8164
- category: "conversation" | "run" | "node" | "session" | "hosted-conversation" | "queue" | "workspace";
8164
+ category: "session" | "conversation" | "run" | "node" | "hosted-conversation" | "queue" | "workspace";
8165
8165
  payload?: unknown;
8166
8166
  }, {
8167
8167
  sequence: number;
8168
- category: "conversation" | "run" | "node" | "session" | "hosted-conversation" | "queue" | "workspace";
8168
+ category: "session" | "conversation" | "run" | "node" | "hosted-conversation" | "queue" | "workspace";
8169
8169
  payload?: unknown;
8170
8170
  }>;
8171
8171
  export type WorkbenchEvent = z.infer<typeof workbenchEventSchema>;
@@ -8276,11 +8276,11 @@ export declare const watchEventSchema: z.ZodUnion<[z.ZodObject<{
8276
8276
  payload: z.ZodUnknown;
8277
8277
  }, "strip", z.ZodTypeAny, {
8278
8278
  sequence: number;
8279
- category: "conversation" | "run" | "node" | "session" | "hosted-conversation" | "queue" | "workspace";
8279
+ category: "session" | "conversation" | "run" | "node" | "hosted-conversation" | "queue" | "workspace";
8280
8280
  payload?: unknown;
8281
8281
  }, {
8282
8282
  sequence: number;
8283
- category: "conversation" | "run" | "node" | "session" | "hosted-conversation" | "queue" | "workspace";
8283
+ category: "session" | "conversation" | "run" | "node" | "hosted-conversation" | "queue" | "workspace";
8284
8284
  payload?: unknown;
8285
8285
  }>;
8286
8286
  }, "strict", z.ZodTypeAny, {
@@ -8294,7 +8294,7 @@ export declare const watchEventSchema: z.ZodUnion<[z.ZodObject<{
8294
8294
  watchId: string;
8295
8295
  event: {
8296
8296
  sequence: number;
8297
- category: "conversation" | "run" | "node" | "session" | "hosted-conversation" | "queue" | "workspace";
8297
+ category: "session" | "conversation" | "run" | "node" | "hosted-conversation" | "queue" | "workspace";
8298
8298
  payload?: unknown;
8299
8299
  };
8300
8300
  }, {
@@ -8308,7 +8308,7 @@ export declare const watchEventSchema: z.ZodUnion<[z.ZodObject<{
8308
8308
  watchId: string;
8309
8309
  event: {
8310
8310
  sequence: number;
8311
- category: "conversation" | "run" | "node" | "session" | "hosted-conversation" | "queue" | "workspace";
8311
+ category: "session" | "conversation" | "run" | "node" | "hosted-conversation" | "queue" | "workspace";
8312
8312
  payload?: unknown;
8313
8313
  };
8314
8314
  }>, z.ZodObject<{
@@ -8366,11 +8366,11 @@ export declare const watchEventSchema: z.ZodUnion<[z.ZodObject<{
8366
8366
  payload: z.ZodUnknown;
8367
8367
  }, "strip", z.ZodTypeAny, {
8368
8368
  sequence: number;
8369
- category: "conversation" | "run" | "node" | "session" | "hosted-conversation" | "queue" | "workspace";
8369
+ category: "session" | "conversation" | "run" | "node" | "hosted-conversation" | "queue" | "workspace";
8370
8370
  payload?: unknown;
8371
8371
  }, {
8372
8372
  sequence: number;
8373
- category: "conversation" | "run" | "node" | "session" | "hosted-conversation" | "queue" | "workspace";
8373
+ category: "session" | "conversation" | "run" | "node" | "hosted-conversation" | "queue" | "workspace";
8374
8374
  payload?: unknown;
8375
8375
  }>;
8376
8376
  }, "strict", z.ZodTypeAny, {
@@ -8384,7 +8384,7 @@ export declare const watchEventSchema: z.ZodUnion<[z.ZodObject<{
8384
8384
  watchId: string;
8385
8385
  event: {
8386
8386
  sequence: number;
8387
- category: "conversation" | "run" | "node" | "session" | "hosted-conversation" | "queue" | "workspace";
8387
+ category: "session" | "conversation" | "run" | "node" | "hosted-conversation" | "queue" | "workspace";
8388
8388
  payload?: unknown;
8389
8389
  };
8390
8390
  }, {
@@ -8398,7 +8398,7 @@ export declare const watchEventSchema: z.ZodUnion<[z.ZodObject<{
8398
8398
  watchId: string;
8399
8399
  event: {
8400
8400
  sequence: number;
8401
- category: "conversation" | "run" | "node" | "session" | "hosted-conversation" | "queue" | "workspace";
8401
+ category: "session" | "conversation" | "run" | "node" | "hosted-conversation" | "queue" | "workspace";
8402
8402
  payload?: unknown;
8403
8403
  };
8404
8404
  }>, z.ZodEffects<z.ZodObject<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myagentroam/protocol",
3
- "version": "0.11.47",
3
+ "version": "0.11.49",
4
4
  "description": "Shared runtime protocol schemas for MyAgentRoam.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",