@myagentroam/protocol 0.11.39 → 0.11.40
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/composer-tags.d.ts +28 -2
- package/dist/composer-tags.js +8 -3
- package/dist/index.d.ts +2523 -2
- package/dist/index.js +66 -5
- package/dist/marctl-execution-credential.d.ts +50 -0
- package/dist/marctl-execution-credential.js +26 -0
- package/dist/model-usage.d.ts +16 -16
- package/package.json +1 -1
package/dist/composer-tags.d.ts
CHANGED
|
@@ -17,21 +17,34 @@ export declare const channelOriginSchema: z.ZodObject<{
|
|
|
17
17
|
senderId: string;
|
|
18
18
|
}>;
|
|
19
19
|
export type ChannelOrigin = z.infer<typeof channelOriginSchema>;
|
|
20
|
-
export declare const sessionMessageOriginSchema: z.ZodEffects<z.ZodObject<{
|
|
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
24
|
}, "strict", z.ZodTypeAny, {
|
|
24
25
|
name?: string | undefined;
|
|
25
26
|
sessionId?: string | undefined;
|
|
27
|
+
relation?: "parent" | "other" | undefined;
|
|
26
28
|
}, {
|
|
27
29
|
name?: string | undefined;
|
|
28
30
|
sessionId?: string | undefined;
|
|
31
|
+
relation?: "parent" | "other" | undefined;
|
|
29
32
|
}>, {
|
|
30
33
|
name?: string | undefined;
|
|
31
34
|
sessionId?: string | undefined;
|
|
35
|
+
relation?: "parent" | "other" | undefined;
|
|
32
36
|
}, {
|
|
33
37
|
name?: string | undefined;
|
|
34
38
|
sessionId?: string | undefined;
|
|
39
|
+
relation?: "parent" | "other" | undefined;
|
|
40
|
+
}>, {
|
|
41
|
+
name?: string | undefined;
|
|
42
|
+
sessionId?: string | undefined;
|
|
43
|
+
relation?: "parent" | "other" | undefined;
|
|
44
|
+
}, {
|
|
45
|
+
name?: string | undefined;
|
|
46
|
+
sessionId?: string | undefined;
|
|
47
|
+
relation?: "parent" | "other" | undefined;
|
|
35
48
|
}>;
|
|
36
49
|
export type SessionMessageOrigin = z.infer<typeof sessionMessageOriginSchema>;
|
|
37
50
|
export declare function isComposerAttachmentResourcePath(value: string): boolean;
|
|
@@ -59,21 +72,34 @@ export declare const composerTagSchemas: {
|
|
|
59
72
|
channelId: string;
|
|
60
73
|
senderId: string;
|
|
61
74
|
}>;
|
|
62
|
-
readonly mar_session_origin: z.ZodEffects<z.ZodObject<{
|
|
75
|
+
readonly mar_session_origin: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
63
76
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
64
77
|
name: z.ZodOptional<z.ZodString>;
|
|
78
|
+
relation: z.ZodOptional<z.ZodEnum<["parent", "other"]>>;
|
|
65
79
|
}, "strict", z.ZodTypeAny, {
|
|
66
80
|
name?: string | undefined;
|
|
67
81
|
sessionId?: string | undefined;
|
|
82
|
+
relation?: "parent" | "other" | undefined;
|
|
83
|
+
}, {
|
|
84
|
+
name?: string | undefined;
|
|
85
|
+
sessionId?: string | undefined;
|
|
86
|
+
relation?: "parent" | "other" | undefined;
|
|
87
|
+
}>, {
|
|
88
|
+
name?: string | undefined;
|
|
89
|
+
sessionId?: string | undefined;
|
|
90
|
+
relation?: "parent" | "other" | undefined;
|
|
68
91
|
}, {
|
|
69
92
|
name?: string | undefined;
|
|
70
93
|
sessionId?: string | undefined;
|
|
94
|
+
relation?: "parent" | "other" | undefined;
|
|
71
95
|
}>, {
|
|
72
96
|
name?: string | undefined;
|
|
73
97
|
sessionId?: string | undefined;
|
|
98
|
+
relation?: "parent" | "other" | undefined;
|
|
74
99
|
}, {
|
|
75
100
|
name?: string | undefined;
|
|
76
101
|
sessionId?: string | undefined;
|
|
102
|
+
relation?: "parent" | "other" | undefined;
|
|
77
103
|
}>;
|
|
78
104
|
readonly mar_goal_start: z.ZodObject<{
|
|
79
105
|
objective: z.ZodString;
|
package/dist/composer-tags.js
CHANGED
|
@@ -18,9 +18,14 @@ export const channelOriginSchema = z
|
|
|
18
18
|
})
|
|
19
19
|
.strict();
|
|
20
20
|
export const sessionMessageOriginSchema = z
|
|
21
|
-
.object({
|
|
21
|
+
.object({
|
|
22
|
+
sessionId: z.string().min(1).max(512).optional(),
|
|
23
|
+
name: name.optional(),
|
|
24
|
+
relation: z.enum(['parent', 'other']).optional()
|
|
25
|
+
})
|
|
22
26
|
.strict()
|
|
23
|
-
.refine((value) => (value.sessionId === undefined) === (value.name === undefined))
|
|
27
|
+
.refine((value) => (value.sessionId === undefined) === (value.name === undefined))
|
|
28
|
+
.refine((value) => value.relation === undefined || value.sessionId !== undefined);
|
|
24
29
|
const relativePath = path.refine((value) => !/^(?:[\\/]|[A-Za-z]:)/u.test(value));
|
|
25
30
|
const workspacePath = relativePath.refine((value) => !value.split(/[\\/]/u).includes('..'));
|
|
26
31
|
export function isComposerAttachmentResourcePath(value) {
|
|
@@ -124,7 +129,7 @@ export function serializeComposerTag(kind, payload) {
|
|
|
124
129
|
if (kind === 'mar_steer')
|
|
125
130
|
children.unshift(` <instruction>${STEER_INSTRUCTION}</instruction>`);
|
|
126
131
|
if (kind === 'mar_session_origin')
|
|
127
|
-
children.push(` <instruction>${value.sessionId === undefined ? 'Message sent via marctl.' : 'Message from another session
|
|
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>`);
|
|
128
133
|
const opening = `<${kind}${markupAttributes(attributes)}`;
|
|
129
134
|
const encoded = children.length
|
|
130
135
|
? `${opening}>
|