@myagentroam/protocol 0.10.34 → 0.10.36

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.js CHANGED
@@ -10,6 +10,7 @@ export * from './chatgpt-oauth.js';
10
10
  export const XAI_SUBSCRIPTION_PROXY_BASE_URL = 'https://cli-chat-proxy.grok.com/v1';
11
11
  export const XAI_SUBSCRIPTION_BASE_URL = XAI_SUBSCRIPTION_PROXY_BASE_URL;
12
12
  export * from './composer-tags.js';
13
+ export * from './session-shares.js';
13
14
  export * from './enterprise.js';
14
15
  export * from './skill.js';
15
16
  export * from './mcp.js';
@@ -597,6 +598,9 @@ export const scheduledRunAuthorizeRequestSchema = z
597
598
  model: z.string().max(256).nullable()
598
599
  })
599
600
  .strict();
601
+ export const restartRunAuthorizeRequestSchema = scheduledRunAuthorizeRequestSchema
602
+ .omit({ taskId: true, revision: true, occurrenceId: true })
603
+ .extend({ handoffId: boundedIdentifierSchema, runner: z.literal('mar-agent') });
600
604
  export const scheduledRunAuthorizeResponseSchema = z.union([
601
605
  z
602
606
  .object({
@@ -624,6 +628,7 @@ export const scheduledRunAuthorizeResponseSchema = z.union([
624
628
  })
625
629
  .strict()
626
630
  ]);
631
+ export const restartRunAuthorizeResponseSchema = scheduledRunAuthorizeResponseSchema;
627
632
  const marAgentInlineApiKeyCredentialSchema = z
628
633
  .object({
629
634
  type: z.literal('INLINE_API_KEY'),
@@ -2944,6 +2949,7 @@ export const workbenchNodeOperationSchema = z.enum([
2944
2949
  'session.metadata.update',
2945
2950
  'session.schedule.get',
2946
2951
  'session.cli.context',
2952
+ 'session.graph',
2947
2953
  'session.goal.get',
2948
2954
  'session.schedule.save',
2949
2955
  'session.schedule.remove',
@@ -3128,6 +3134,8 @@ const ERROR_SUBJECT_WORDS = {
3128
3134
  WORKSPACE: 'Workspace'
3129
3135
  };
3130
3136
  const FIXED_PUBLIC_ERROR_MESSAGES = {
3137
+ SESSION_RESTART_PENDING: 'This session is being restored after a system restart. Wait before changing it.',
3138
+ NODE_STOPPED: 'This Node has stopped and cannot accept new operations.',
3131
3139
  GIT_CONFIGURATION_INVALID: 'Check the Git identity, credential fields, and unique matching scopes.',
3132
3140
  GIT_CREDENTIAL_NOT_FOUND: 'This personal Git credential no longer exists.',
3133
3141
  GIT_CONFIGURATION_NODE_UNSUPPORTED: 'Update this Node to use personal Git configuration.',
@@ -0,0 +1,128 @@
1
+ import { z } from 'zod';
2
+ export declare const sessionShareTargetSchema: z.ZodObject<{
3
+ nodeId: z.ZodString;
4
+ workspaceId: z.ZodString;
5
+ sessionId: z.ZodString;
6
+ }, "strict", z.ZodTypeAny, {
7
+ workspaceId: string;
8
+ nodeId: string;
9
+ sessionId: string;
10
+ }, {
11
+ workspaceId: string;
12
+ nodeId: string;
13
+ sessionId: string;
14
+ }>;
15
+ export type SessionShareTarget = z.infer<typeof sessionShareTargetSchema>;
16
+ export declare const sessionShareSchema: z.ZodObject<{
17
+ nodeId: z.ZodString;
18
+ workspaceId: z.ZodString;
19
+ sessionId: z.ZodString;
20
+ } & {
21
+ id: z.ZodString;
22
+ createdAt: z.ZodNumber;
23
+ expiresAt: z.ZodNullable<z.ZodNumber>;
24
+ }, "strip", z.ZodTypeAny, {
25
+ expiresAt: number | null;
26
+ workspaceId: string;
27
+ id: string;
28
+ nodeId: string;
29
+ createdAt: number;
30
+ sessionId: string;
31
+ }, {
32
+ expiresAt: number | null;
33
+ workspaceId: string;
34
+ id: string;
35
+ nodeId: string;
36
+ createdAt: number;
37
+ sessionId: string;
38
+ }>;
39
+ export type SessionShare = z.infer<typeof sessionShareSchema>;
40
+ export declare const sessionShareCreateInputSchema: z.ZodObject<{
41
+ nodeId: z.ZodString;
42
+ workspaceId: z.ZodString;
43
+ expiresAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
44
+ }, "strict", z.ZodTypeAny, {
45
+ expiresAt: string | null;
46
+ workspaceId: string;
47
+ nodeId: string;
48
+ }, {
49
+ workspaceId: string;
50
+ nodeId: string;
51
+ expiresAt?: string | null | undefined;
52
+ }>;
53
+ export declare const sessionSharePasswordSchema: z.ZodString;
54
+ export declare const sessionShareCredentialSchema: z.ZodString;
55
+ export declare const sessionShareAuthInputSchema: z.ZodUnion<[z.ZodObject<{
56
+ password: z.ZodString;
57
+ }, "strict", z.ZodTypeAny, {
58
+ password: string;
59
+ }, {
60
+ password: string;
61
+ }>, z.ZodObject<{
62
+ credential: z.ZodString;
63
+ }, "strict", z.ZodTypeAny, {
64
+ credential: string;
65
+ }, {
66
+ credential: string;
67
+ }>]>;
68
+ export declare const sessionShareAuthResultSchema: z.ZodObject<{
69
+ share: z.ZodObject<{
70
+ nodeId: z.ZodString;
71
+ workspaceId: z.ZodString;
72
+ sessionId: z.ZodString;
73
+ } & {
74
+ id: z.ZodString;
75
+ createdAt: z.ZodNumber;
76
+ expiresAt: z.ZodNullable<z.ZodNumber>;
77
+ }, "strip", z.ZodTypeAny, {
78
+ expiresAt: number | null;
79
+ workspaceId: string;
80
+ id: string;
81
+ nodeId: string;
82
+ createdAt: number;
83
+ sessionId: string;
84
+ }, {
85
+ expiresAt: number | null;
86
+ workspaceId: string;
87
+ id: string;
88
+ nodeId: string;
89
+ createdAt: number;
90
+ sessionId: string;
91
+ }>;
92
+ credential: z.ZodString;
93
+ sharerName: z.ZodString;
94
+ }, "strip", z.ZodTypeAny, {
95
+ credential: string;
96
+ share: {
97
+ expiresAt: number | null;
98
+ workspaceId: string;
99
+ id: string;
100
+ nodeId: string;
101
+ createdAt: number;
102
+ sessionId: string;
103
+ };
104
+ sharerName: string;
105
+ }, {
106
+ credential: string;
107
+ share: {
108
+ expiresAt: number | null;
109
+ workspaceId: string;
110
+ id: string;
111
+ nodeId: string;
112
+ createdAt: number;
113
+ sessionId: string;
114
+ };
115
+ sharerName: string;
116
+ }>;
117
+ export type SessionShareAuthResult = z.infer<typeof sessionShareAuthResultSchema>;
118
+ export declare const sessionShareVisitorSchema: z.ZodObject<{
119
+ visitorId: z.ZodString;
120
+ name: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
121
+ }, "strict", z.ZodTypeAny, {
122
+ visitorId: string;
123
+ name?: string | undefined;
124
+ }, {
125
+ visitorId: string;
126
+ name?: string | undefined;
127
+ }>;
128
+ export type SessionShareVisitor = z.infer<typeof sessionShareVisitorSchema>;
@@ -0,0 +1,35 @@
1
+ import { z } from 'zod';
2
+ import { channelDisplayNameSchema } from './composer-tags.js';
3
+ const id = z.string().min(1).max(128);
4
+ const timestamp = z.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER);
5
+ export const sessionShareTargetSchema = z
6
+ .object({ nodeId: id, workspaceId: id, sessionId: id })
7
+ .strict();
8
+ export const sessionShareSchema = sessionShareTargetSchema
9
+ .extend({
10
+ id,
11
+ createdAt: timestamp,
12
+ expiresAt: timestamp.nullable()
13
+ })
14
+ .strip();
15
+ export const sessionShareCreateInputSchema = z
16
+ .object({
17
+ nodeId: id,
18
+ workspaceId: id,
19
+ expiresAt: z.string().datetime().nullable().default(null)
20
+ })
21
+ .strict();
22
+ export const sessionSharePasswordSchema = z.string().regex(/^[0-9]{6}$/u);
23
+ export const sessionShareCredentialSchema = z.string().regex(/^[A-Za-z0-9_-]{43}$/u);
24
+ export const sessionShareAuthInputSchema = z.union([
25
+ z.object({ password: sessionSharePasswordSchema }).strict(),
26
+ z.object({ credential: sessionShareCredentialSchema }).strict()
27
+ ]);
28
+ export const sessionShareAuthResultSchema = z.object({
29
+ share: sessionShareSchema,
30
+ credential: sessionShareCredentialSchema,
31
+ sharerName: z.string().min(1).max(512)
32
+ });
33
+ export const sessionShareVisitorSchema = z
34
+ .object({ visitorId: id, name: channelDisplayNameSchema.optional() })
35
+ .strict();
@@ -24,19 +24,19 @@ export declare const toolResultResourcePageSchema: z.ZodObject<{
24
24
  nextCursor: z.ZodOptional<z.ZodString>;
25
25
  }, "strict", z.ZodTypeAny, {
26
26
  type: "file_changes";
27
+ sha256: string;
27
28
  resourceRef: string;
28
29
  version: 1;
29
30
  format: "unified-diff";
30
- sha256: string;
31
31
  byteSize: number;
32
32
  content: string;
33
33
  nextCursor?: string | undefined;
34
34
  }, {
35
35
  type: "file_changes";
36
+ sha256: string;
36
37
  resourceRef: string;
37
38
  version: 1;
38
39
  format: "unified-diff";
39
- sha256: string;
40
40
  byteSize: number;
41
41
  content: string;
42
42
  nextCursor?: string | undefined;
@@ -52,16 +52,16 @@ export declare const fileChangeDiffSchema: z.ZodDiscriminatedUnion<"status", [z.
52
52
  }, "strict", z.ZodTypeAny, {
53
53
  status: "available";
54
54
  source: "TOOL_CHANGE";
55
+ sha256: string;
55
56
  resourceRef: string;
56
57
  format: "unified-diff";
57
- sha256: string;
58
58
  byteSize: number;
59
59
  }, {
60
60
  status: "available";
61
61
  source: "TOOL_CHANGE";
62
+ sha256: string;
62
63
  resourceRef: string;
63
64
  format: "unified-diff";
64
- sha256: string;
65
65
  byteSize: number;
66
66
  }>, z.ZodObject<{
67
67
  status: z.ZodLiteral<"unavailable">;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myagentroam/protocol",
3
- "version": "0.10.34",
3
+ "version": "0.10.36",
4
4
  "description": "Shared runtime protocol schemas for MyAgentRoam.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",