@myagentroam/protocol 0.9.133 → 0.9.135

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
@@ -2,6 +2,8 @@ import { z } from 'zod';
2
2
  import { resourceOwnershipSchema } from './enterprise.js';
3
3
  import { workspaceDirectTransferCapabilitySchema } from './direct-transfer.js';
4
4
  import { terminalDirectCapabilitySchema } from './terminal-direct.js';
5
+ import { chatgptLoginCapabilitySchema } from './chatgpt-oauth.js';
6
+ export * from './chatgpt-oauth.js';
5
7
  export * from './enterprise.js';
6
8
  export * from './skill.js';
7
9
  export * from './mcp.js';
@@ -25,11 +27,21 @@ const positiveSafeIntegerSchema = z.number().int().min(1).max(Number.MAX_SAFE_IN
25
27
  const boundedIdentifierSchema = z.string().trim().min(1).max(128);
26
28
  const utf8ByteLength = (value) => new TextEncoder().encode(value).byteLength;
27
29
  const runtimeCredentialHttpVersionSchema = z.enum(['1.1', '2']);
30
+ export const marAgentResponsesServiceTierSchema = z.enum([
31
+ 'auto',
32
+ 'default',
33
+ 'flex',
34
+ 'priority',
35
+ 'fast',
36
+ 'ultrafast'
37
+ ]);
28
38
  export const marAgentRuntimeCredentialCapabilitySchema = z
29
39
  .object({
30
40
  apiVersion: z.literal(1),
31
41
  websocket: z.boolean(),
32
42
  fastMode: z.boolean().optional(),
43
+ serviceTiers: z.array(marAgentResponsesServiceTierSchema).min(1).max(6).optional(),
44
+ namespacedTools: z.boolean().optional(),
33
45
  httpVersions: z
34
46
  .array(runtimeCredentialHttpVersionSchema)
35
47
  .min(1)
@@ -299,6 +311,7 @@ export const nodeCapabilitiesSchema = z
299
311
  conversationHosting: conversationHostingCapabilitySchema.optional(),
300
312
  computerUse: computerUseCapabilitySchema.optional(),
301
313
  marAgentRuntimeCredentials: marAgentRuntimeCredentialCapabilitySchema.optional(),
314
+ chatgptLogin: chatgptLoginCapabilitySchema.optional(),
302
315
  workspaceDirectTransfer: workspaceDirectTransferCapabilitySchema.optional(),
303
316
  terminalDirect: terminalDirectCapabilitySchema.optional()
304
317
  })
@@ -711,6 +724,7 @@ const marAgentModelShape = {
711
724
  codeMode: z.boolean().default(false),
712
725
  highDensityCompaction: z.boolean().default(false),
713
726
  fastMode: z.boolean().optional(),
727
+ serviceTier: marAgentResponsesServiceTierSchema.optional(),
714
728
  hostedWebSearch: z.boolean(),
715
729
  responsesTransport: marAgentResponsesTransportSchema.optional(),
716
730
  responsesEncoding: z.enum(['STANDARD', 'LITE']).optional(),
@@ -749,6 +763,8 @@ function refineMarAgentModel(schema) {
749
763
  context.addIssue({ code: 'custom', message: 'Responses encoding requires OpenAI Responses' });
750
764
  if (value.protocol !== 'OPENAI_RESPONSES' && value.fastMode === true)
751
765
  context.addIssue({ code: 'custom', message: 'Fast mode requires OpenAI Responses' });
766
+ if (value.protocol !== 'OPENAI_RESPONSES' && value.serviceTier !== undefined)
767
+ context.addIssue({ code: 'custom', message: 'Service tier requires OpenAI Responses' });
752
768
  });
753
769
  }
754
770
  const marAgentModelSummaryShape = {
@@ -784,9 +800,20 @@ export const marAgentRuntimeModelConfigurationSchema = refineMarAgentModel(z
784
800
  baseUrl: z.string().url().max(2048),
785
801
  apiKey: z.string().min(1).max(16_384).optional(),
786
802
  credential: marAgentRuntimeCredentialSchema.optional(),
803
+ responsesToolNamespace: z
804
+ .string()
805
+ .regex(/^[a-zA-Z][a-zA-Z0-9_]{0,63}$/u)
806
+ .optional(),
787
807
  imageGeneration: marAgentImageGenerationSchema.optional()
788
808
  })
789
809
  .strip()).superRefine((configuration, context) => {
810
+ if (configuration.responsesToolNamespace !== undefined &&
811
+ (configuration.protocol !== 'OPENAI_RESPONSES' || configuration.responsesEncoding === 'LITE'))
812
+ context.addIssue({
813
+ code: 'custom',
814
+ path: ['responsesToolNamespace'],
815
+ message: 'Tool namespaces require Standard OpenAI Responses'
816
+ });
790
817
  if ((configuration.apiKey === undefined) === (configuration.credential === undefined))
791
818
  context.addIssue({
792
819
  code: 'custom',
@@ -861,10 +888,12 @@ export const codexCredentialSummarySchema = z
861
888
  .object({
862
889
  id: boundedIdentifierSchema,
863
890
  name: z.string().trim().min(1).max(128),
864
- type: z.literal('CODEX_OAUTH'),
891
+ type: z.enum(['CODEX_OAUTH', 'CHATGPT_OAUTH']),
892
+ authorization: z.enum(['AUTHORIZED', 'UNAUTHORIZED']).optional(),
865
893
  ownership: codexCredentialOwnershipSchema,
866
894
  status: z.enum(['ACTIVE', 'DEGRADED', 'REAUTH_REQUIRED']),
867
895
  accessTokenExpiresAt: nonnegativeSafeIntegerSchema.nullable(),
896
+ earliestRefreshAt: nonnegativeSafeIntegerSchema.nullable().optional(),
868
897
  lastRefreshAt: nonnegativeSafeIntegerSchema.nullable(),
869
898
  lastCheckedAt: nonnegativeSafeIntegerSchema.nullable(),
870
899
  accountId: z.string().trim().min(1).max(512),
@@ -951,6 +980,7 @@ export const codexLoginAttemptSchema = z
951
980
  .object({
952
981
  id: boundedIdentifierSchema,
953
982
  status: z.enum(['PENDING', 'SUCCEEDED', 'FAILED', 'CANCELLED', 'EXPIRED']),
983
+ type: z.enum(['CODEX_OAUTH', 'CHATGPT_OAUTH']).optional(),
954
984
  userCode: z.string().trim().min(1).max(128).optional(),
955
985
  verificationUri: z.string().url().max(2048).optional(),
956
986
  expiresAt: nonnegativeSafeIntegerSchema.optional(),
@@ -965,7 +995,7 @@ export const codexLoginAttemptSchema = z
965
995
  .strict()
966
996
  .superRefine((attempt, context) => {
967
997
  if (attempt.status === 'PENDING' &&
968
- (attempt.userCode === undefined ||
998
+ ((attempt.type !== 'CHATGPT_OAUTH' && attempt.userCode === undefined) ||
969
999
  attempt.verificationUri === undefined ||
970
1000
  attempt.expiresAt === undefined ||
971
1001
  attempt.pollIntervalMs === undefined))
package/dist/mcp.d.ts CHANGED
@@ -6,26 +6,26 @@ export declare const mcpSourceInputSchema: z.ZodEffects<z.ZodObject<{
6
6
  locator: z.ZodEffects<z.ZodString, string, string>;
7
7
  enabled: z.ZodOptional<z.ZodBoolean>;
8
8
  }, "strict", z.ZodTypeAny, {
9
- name: string;
10
9
  scope: "PERSONAL" | "ENTERPRISE" | "ORGANIZATION";
10
+ name: string;
11
11
  locator: string;
12
12
  organizationId?: number | undefined;
13
13
  enabled?: boolean | undefined;
14
14
  }, {
15
- name: string;
16
15
  scope: "PERSONAL" | "ENTERPRISE" | "ORGANIZATION";
16
+ name: string;
17
17
  locator: string;
18
18
  organizationId?: number | undefined;
19
19
  enabled?: boolean | undefined;
20
20
  }>, {
21
- name: string;
22
21
  scope: "PERSONAL" | "ENTERPRISE" | "ORGANIZATION";
22
+ name: string;
23
23
  locator: string;
24
24
  organizationId?: number | undefined;
25
25
  enabled?: boolean | undefined;
26
26
  }, {
27
- name: string;
28
27
  scope: "PERSONAL" | "ENTERPRISE" | "ORGANIZATION";
28
+ name: string;
29
29
  locator: string;
30
30
  organizationId?: number | undefined;
31
31
  enabled?: boolean | undefined;
@@ -143,11 +143,11 @@ export declare const mcpCatalogEntrySchema: z.ZodEffects<z.ZodObject<{
143
143
  createdAt: z.ZodNumber;
144
144
  updatedAt: z.ZodNumber;
145
145
  }, "strict", z.ZodTypeAny, {
146
+ scope: "PERSONAL" | "ENTERPRISE" | "ORGANIZATION";
146
147
  id: string;
147
148
  createdAt: number;
148
149
  updatedAt: number;
149
150
  displayName: string;
150
- scope: "PERSONAL" | "ENTERPRISE" | "ORGANIZATION";
151
151
  sourceId: string;
152
152
  featured: boolean;
153
153
  tags: string[];
@@ -171,11 +171,11 @@ export declare const mcpCatalogEntrySchema: z.ZodEffects<z.ZodObject<{
171
171
  ownerUserId?: number | undefined;
172
172
  ownerOrganizationId?: number | undefined;
173
173
  }, {
174
+ scope: "PERSONAL" | "ENTERPRISE" | "ORGANIZATION";
174
175
  id: string;
175
176
  createdAt: number;
176
177
  updatedAt: number;
177
178
  displayName: string;
178
- scope: "PERSONAL" | "ENTERPRISE" | "ORGANIZATION";
179
179
  sourceId: string;
180
180
  featured: boolean;
181
181
  tags: string[];
@@ -199,11 +199,11 @@ export declare const mcpCatalogEntrySchema: z.ZodEffects<z.ZodObject<{
199
199
  ownerUserId?: number | undefined;
200
200
  ownerOrganizationId?: number | undefined;
201
201
  }>, {
202
+ scope: "PERSONAL" | "ENTERPRISE" | "ORGANIZATION";
202
203
  id: string;
203
204
  createdAt: number;
204
205
  updatedAt: number;
205
206
  displayName: string;
206
- scope: "PERSONAL" | "ENTERPRISE" | "ORGANIZATION";
207
207
  sourceId: string;
208
208
  featured: boolean;
209
209
  tags: string[];
@@ -227,11 +227,11 @@ export declare const mcpCatalogEntrySchema: z.ZodEffects<z.ZodObject<{
227
227
  ownerUserId?: number | undefined;
228
228
  ownerOrganizationId?: number | undefined;
229
229
  }, {
230
+ scope: "PERSONAL" | "ENTERPRISE" | "ORGANIZATION";
230
231
  id: string;
231
232
  createdAt: number;
232
233
  updatedAt: number;
233
234
  displayName: string;
234
- scope: "PERSONAL" | "ENTERPRISE" | "ORGANIZATION";
235
235
  sourceId: string;
236
236
  featured: boolean;
237
237
  tags: string[];
package/dist/skill.d.ts CHANGED
@@ -9,30 +9,30 @@ export declare const skillSourceInputSchema: z.ZodEffects<z.ZodObject<{
9
9
  locator: z.ZodUnion<[z.ZodLiteral<"skills.sh">, z.ZodEffects<z.ZodString, string, string>, z.ZodString]>;
10
10
  enabled: z.ZodOptional<z.ZodBoolean>;
11
11
  }, "strict", z.ZodTypeAny, {
12
- kind: "SKILLS_SH" | "REPOSITORY";
13
- name: string;
14
12
  scope: "PERSONAL" | "ENTERPRISE" | "ORGANIZATION";
13
+ name: string;
14
+ kind: "SKILLS_SH" | "REPOSITORY";
15
15
  locator: string;
16
16
  organizationId?: number | undefined;
17
17
  enabled?: boolean | undefined;
18
18
  }, {
19
- kind: "SKILLS_SH" | "REPOSITORY";
20
- name: string;
21
19
  scope: "PERSONAL" | "ENTERPRISE" | "ORGANIZATION";
20
+ name: string;
21
+ kind: "SKILLS_SH" | "REPOSITORY";
22
22
  locator: string;
23
23
  organizationId?: number | undefined;
24
24
  enabled?: boolean | undefined;
25
25
  }>, {
26
- kind: "SKILLS_SH" | "REPOSITORY";
27
- name: string;
28
26
  scope: "PERSONAL" | "ENTERPRISE" | "ORGANIZATION";
27
+ name: string;
28
+ kind: "SKILLS_SH" | "REPOSITORY";
29
29
  locator: string;
30
30
  organizationId?: number | undefined;
31
31
  enabled?: boolean | undefined;
32
32
  }, {
33
- kind: "SKILLS_SH" | "REPOSITORY";
34
- name: string;
35
33
  scope: "PERSONAL" | "ENTERPRISE" | "ORGANIZATION";
34
+ name: string;
35
+ kind: "SKILLS_SH" | "REPOSITORY";
36
36
  locator: string;
37
37
  organizationId?: number | undefined;
38
38
  enabled?: boolean | undefined;
@@ -46,30 +46,30 @@ export declare const skillSourceSchema: z.ZodIntersection<z.ZodEffects<z.ZodObje
46
46
  locator: z.ZodUnion<[z.ZodLiteral<"skills.sh">, z.ZodEffects<z.ZodString, string, string>, z.ZodString]>;
47
47
  enabled: z.ZodOptional<z.ZodBoolean>;
48
48
  }, "strict", z.ZodTypeAny, {
49
- kind: "SKILLS_SH" | "REPOSITORY";
50
- name: string;
51
49
  scope: "PERSONAL" | "ENTERPRISE" | "ORGANIZATION";
50
+ name: string;
51
+ kind: "SKILLS_SH" | "REPOSITORY";
52
52
  locator: string;
53
53
  organizationId?: number | undefined;
54
54
  enabled?: boolean | undefined;
55
55
  }, {
56
- kind: "SKILLS_SH" | "REPOSITORY";
57
- name: string;
58
56
  scope: "PERSONAL" | "ENTERPRISE" | "ORGANIZATION";
57
+ name: string;
58
+ kind: "SKILLS_SH" | "REPOSITORY";
59
59
  locator: string;
60
60
  organizationId?: number | undefined;
61
61
  enabled?: boolean | undefined;
62
62
  }>, {
63
- kind: "SKILLS_SH" | "REPOSITORY";
64
- name: string;
65
63
  scope: "PERSONAL" | "ENTERPRISE" | "ORGANIZATION";
64
+ name: string;
65
+ kind: "SKILLS_SH" | "REPOSITORY";
66
66
  locator: string;
67
67
  organizationId?: number | undefined;
68
68
  enabled?: boolean | undefined;
69
69
  }, {
70
- kind: "SKILLS_SH" | "REPOSITORY";
71
- name: string;
72
70
  scope: "PERSONAL" | "ENTERPRISE" | "ORGANIZATION";
71
+ name: string;
72
+ kind: "SKILLS_SH" | "REPOSITORY";
73
73
  locator: string;
74
74
  organizationId?: number | undefined;
75
75
  enabled?: boolean | undefined;
@@ -144,10 +144,10 @@ export declare const skillFavoriteSchema: z.ZodEffects<z.ZodObject<{
144
144
  createdAt: z.ZodNumber;
145
145
  updatedAt: z.ZodNumber;
146
146
  }, "strict", z.ZodTypeAny, {
147
+ scope: "PERSONAL" | "ENTERPRISE" | "ORGANIZATION";
147
148
  id: string;
148
149
  createdAt: number;
149
150
  updatedAt: number;
150
- scope: "PERSONAL" | "ENTERPRISE" | "ORGANIZATION";
151
151
  sourceId: string;
152
152
  repositoryIdentity: string;
153
153
  skillPath: string;
@@ -163,10 +163,10 @@ export declare const skillFavoriteSchema: z.ZodEffects<z.ZodObject<{
163
163
  ownerUserId?: number | undefined;
164
164
  ownerOrganizationId?: number | undefined;
165
165
  }, {
166
+ scope: "PERSONAL" | "ENTERPRISE" | "ORGANIZATION";
166
167
  id: string;
167
168
  createdAt: number;
168
169
  updatedAt: number;
169
- scope: "PERSONAL" | "ENTERPRISE" | "ORGANIZATION";
170
170
  sourceId: string;
171
171
  repositoryIdentity: string;
172
172
  skillPath: string;
@@ -182,10 +182,10 @@ export declare const skillFavoriteSchema: z.ZodEffects<z.ZodObject<{
182
182
  ownerUserId?: number | undefined;
183
183
  ownerOrganizationId?: number | undefined;
184
184
  }>, {
185
+ scope: "PERSONAL" | "ENTERPRISE" | "ORGANIZATION";
185
186
  id: string;
186
187
  createdAt: number;
187
188
  updatedAt: number;
188
- scope: "PERSONAL" | "ENTERPRISE" | "ORGANIZATION";
189
189
  sourceId: string;
190
190
  repositoryIdentity: string;
191
191
  skillPath: string;
@@ -201,10 +201,10 @@ export declare const skillFavoriteSchema: z.ZodEffects<z.ZodObject<{
201
201
  ownerUserId?: number | undefined;
202
202
  ownerOrganizationId?: number | undefined;
203
203
  }, {
204
+ scope: "PERSONAL" | "ENTERPRISE" | "ORGANIZATION";
204
205
  id: string;
205
206
  createdAt: number;
206
207
  updatedAt: number;
207
- scope: "PERSONAL" | "ENTERPRISE" | "ORGANIZATION";
208
208
  sourceId: string;
209
209
  repositoryIdentity: string;
210
210
  skillPath: string;
@@ -71,16 +71,16 @@ export declare const terminalDirectServerMessageSchema: z.ZodDiscriminatedUnion<
71
71
  expiresAt: z.ZodNumber;
72
72
  }, "strict", z.ZodTypeAny, {
73
73
  type: "terminal.direct.prepared";
74
+ expiresAt: number;
74
75
  requestId: string;
75
76
  directSessionId: string;
76
- expiresAt: number;
77
77
  grant: string;
78
78
  openExpiresAt: number;
79
79
  }, {
80
80
  type: "terminal.direct.prepared";
81
+ expiresAt: number;
81
82
  requestId: string;
82
83
  directSessionId: string;
83
- expiresAt: number;
84
84
  grant: string;
85
85
  openExpiresAt: number;
86
86
  }>, z.ZodObject<{
@@ -89,12 +89,12 @@ export declare const terminalDirectServerMessageSchema: z.ZodDiscriminatedUnion<
89
89
  expiresAt: z.ZodNumber;
90
90
  }, "strict", z.ZodTypeAny, {
91
91
  type: "terminal.direct.heartbeat";
92
- directSessionId: string;
93
92
  expiresAt: number;
93
+ directSessionId: string;
94
94
  }, {
95
95
  type: "terminal.direct.heartbeat";
96
- directSessionId: string;
97
96
  expiresAt: number;
97
+ directSessionId: string;
98
98
  }>, z.ZodObject<{
99
99
  type: z.ZodLiteral<"terminal.direct.closed">;
100
100
  directSessionId: z.ZodString;
@@ -145,10 +145,10 @@ export declare const terminalDirectNodeCommandSchema: z.ZodDiscriminatedUnion<"t
145
145
  expiresAt: z.ZodNumber;
146
146
  }, "strict", z.ZodTypeAny, {
147
147
  type: "terminal.direct.prepare";
148
+ expiresAt: number;
148
149
  nodeGeneration: string;
149
150
  transportSessionId: string;
150
151
  directSessionId: string;
151
- expiresAt: number;
152
152
  grant: string;
153
153
  openExpiresAt: number;
154
154
  workbenchConnectionId: string;
@@ -161,10 +161,10 @@ export declare const terminalDirectNodeCommandSchema: z.ZodDiscriminatedUnion<"t
161
161
  takeover?: false | undefined;
162
162
  }, {
163
163
  type: "terminal.direct.prepare";
164
+ expiresAt: number;
164
165
  nodeGeneration: string;
165
166
  transportSessionId: string;
166
167
  directSessionId: string;
167
- expiresAt: number;
168
168
  grant: string;
169
169
  openExpiresAt: number;
170
170
  workbenchConnectionId: string;
@@ -181,12 +181,12 @@ export declare const terminalDirectNodeCommandSchema: z.ZodDiscriminatedUnion<"t
181
181
  expiresAt: z.ZodNumber;
182
182
  }, "strict", z.ZodTypeAny, {
183
183
  type: "terminal.direct.heartbeat";
184
- directSessionId: string;
185
184
  expiresAt: number;
185
+ directSessionId: string;
186
186
  }, {
187
187
  type: "terminal.direct.heartbeat";
188
- directSessionId: string;
189
188
  expiresAt: number;
189
+ directSessionId: string;
190
190
  }>, z.ZodObject<{
191
191
  type: z.ZodLiteral<"terminal.direct.cancel">;
192
192
  directSessionId: z.ZodString;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myagentroam/protocol",
3
- "version": "0.9.133",
3
+ "version": "0.9.135",
4
4
  "description": "Shared runtime protocol schemas for MyAgentRoam.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",