@myagentroam/protocol 0.9.112 → 0.9.114

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.
@@ -65,10 +65,11 @@ export declare const resourceOwnershipSchema: z.ZodDiscriminatedUnion<"ownerType
65
65
  export type ResourceOwnership = z.infer<typeof resourceOwnershipSchema>;
66
66
  export declare const resourceGrantSchema: z.ZodEffects<z.ZodObject<{
67
67
  id: z.ZodString;
68
- resourceType: z.ZodEnum<["NODE", "WORKSPACE", "MODEL", "TEMPLATE"]>;
68
+ resourceType: z.ZodEnum<["NODE", "WORKSPACE", "MODEL", "IMAGE_MODEL", "TEMPLATE"]>;
69
69
  nodeId: z.ZodOptional<z.ZodString>;
70
70
  workspaceId: z.ZodOptional<z.ZodString>;
71
71
  modelId: z.ZodOptional<z.ZodString>;
72
+ imageModelId: z.ZodOptional<z.ZodString>;
72
73
  templateId: z.ZodOptional<z.ZodString>;
73
74
  targetType: z.ZodEnum<["USER", "ORGANIZATION", "ENTERPRISE"]>;
74
75
  targetUserId: z.ZodOptional<z.ZodNumber>;
@@ -80,13 +81,14 @@ export declare const resourceGrantSchema: z.ZodEffects<z.ZodObject<{
80
81
  }, "strict", z.ZodTypeAny, {
81
82
  id: string;
82
83
  createdAt: number;
83
- resourceType: "NODE" | "WORKSPACE" | "MODEL" | "TEMPLATE";
84
+ resourceType: "NODE" | "WORKSPACE" | "MODEL" | "IMAGE_MODEL" | "TEMPLATE";
84
85
  targetType: "ENTERPRISE" | "ORGANIZATION" | "USER";
85
86
  grantAuthority: "ENTERPRISE" | "ORG_SUBTREE";
86
87
  createdByUserId: number;
87
88
  workspaceId?: string | undefined;
88
89
  nodeId?: string | undefined;
89
90
  modelId?: string | undefined;
91
+ imageModelId?: string | undefined;
90
92
  templateId?: string | undefined;
91
93
  targetUserId?: number | undefined;
92
94
  targetOrganizationId?: number | undefined;
@@ -94,13 +96,14 @@ export declare const resourceGrantSchema: z.ZodEffects<z.ZodObject<{
94
96
  }, {
95
97
  id: string;
96
98
  createdAt: number;
97
- resourceType: "NODE" | "WORKSPACE" | "MODEL" | "TEMPLATE";
99
+ resourceType: "NODE" | "WORKSPACE" | "MODEL" | "IMAGE_MODEL" | "TEMPLATE";
98
100
  targetType: "ENTERPRISE" | "ORGANIZATION" | "USER";
99
101
  grantAuthority: "ENTERPRISE" | "ORG_SUBTREE";
100
102
  createdByUserId: number;
101
103
  workspaceId?: string | undefined;
102
104
  nodeId?: string | undefined;
103
105
  modelId?: string | undefined;
106
+ imageModelId?: string | undefined;
104
107
  templateId?: string | undefined;
105
108
  targetUserId?: number | undefined;
106
109
  targetOrganizationId?: number | undefined;
@@ -108,13 +111,14 @@ export declare const resourceGrantSchema: z.ZodEffects<z.ZodObject<{
108
111
  }>, {
109
112
  id: string;
110
113
  createdAt: number;
111
- resourceType: "NODE" | "WORKSPACE" | "MODEL" | "TEMPLATE";
114
+ resourceType: "NODE" | "WORKSPACE" | "MODEL" | "IMAGE_MODEL" | "TEMPLATE";
112
115
  targetType: "ENTERPRISE" | "ORGANIZATION" | "USER";
113
116
  grantAuthority: "ENTERPRISE" | "ORG_SUBTREE";
114
117
  createdByUserId: number;
115
118
  workspaceId?: string | undefined;
116
119
  nodeId?: string | undefined;
117
120
  modelId?: string | undefined;
121
+ imageModelId?: string | undefined;
118
122
  templateId?: string | undefined;
119
123
  targetUserId?: number | undefined;
120
124
  targetOrganizationId?: number | undefined;
@@ -122,13 +126,14 @@ export declare const resourceGrantSchema: z.ZodEffects<z.ZodObject<{
122
126
  }, {
123
127
  id: string;
124
128
  createdAt: number;
125
- resourceType: "NODE" | "WORKSPACE" | "MODEL" | "TEMPLATE";
129
+ resourceType: "NODE" | "WORKSPACE" | "MODEL" | "IMAGE_MODEL" | "TEMPLATE";
126
130
  targetType: "ENTERPRISE" | "ORGANIZATION" | "USER";
127
131
  grantAuthority: "ENTERPRISE" | "ORG_SUBTREE";
128
132
  createdByUserId: number;
129
133
  workspaceId?: string | undefined;
130
134
  nodeId?: string | undefined;
131
135
  modelId?: string | undefined;
136
+ imageModelId?: string | undefined;
132
137
  templateId?: string | undefined;
133
138
  targetUserId?: number | undefined;
134
139
  targetOrganizationId?: number | undefined;
@@ -38,10 +38,11 @@ export const resourceOwnershipSchema = z.discriminatedUnion('ownerType', [
38
38
  export const resourceGrantSchema = z
39
39
  .object({
40
40
  id: z.string().min(1).max(128),
41
- resourceType: z.enum(['NODE', 'WORKSPACE', 'MODEL', 'TEMPLATE']),
41
+ resourceType: z.enum(['NODE', 'WORKSPACE', 'MODEL', 'IMAGE_MODEL', 'TEMPLATE']),
42
42
  nodeId: z.string().min(1).max(128).optional(),
43
43
  workspaceId: z.string().min(1).max(128).optional(),
44
44
  modelId: z.string().min(1).max(128).optional(),
45
+ imageModelId: z.string().min(1).max(128).optional(),
45
46
  templateId: z.string().min(1).max(128).optional(),
46
47
  targetType: z.enum(['USER', 'ORGANIZATION', 'ENTERPRISE']),
47
48
  targetUserId: z.number().int().positive().optional(),
@@ -57,21 +58,31 @@ export const resourceGrantSchema = z
57
58
  grant.nodeId !== undefined &&
58
59
  grant.workspaceId === undefined &&
59
60
  grant.modelId === undefined &&
61
+ grant.imageModelId === undefined &&
60
62
  grant.templateId === undefined) ||
61
63
  (grant.resourceType === 'WORKSPACE' &&
62
64
  grant.nodeId !== undefined &&
63
65
  grant.workspaceId !== undefined &&
64
66
  grant.modelId === undefined &&
67
+ grant.imageModelId === undefined &&
65
68
  grant.templateId === undefined) ||
66
69
  (grant.resourceType === 'MODEL' &&
67
70
  grant.nodeId === undefined &&
68
71
  grant.workspaceId === undefined &&
69
72
  grant.modelId !== undefined &&
73
+ grant.imageModelId === undefined &&
74
+ grant.templateId === undefined) ||
75
+ (grant.resourceType === 'IMAGE_MODEL' &&
76
+ grant.nodeId === undefined &&
77
+ grant.workspaceId === undefined &&
78
+ grant.modelId === undefined &&
79
+ grant.imageModelId !== undefined &&
70
80
  grant.templateId === undefined) ||
71
81
  (grant.resourceType === 'TEMPLATE' &&
72
82
  grant.nodeId === undefined &&
73
83
  grant.workspaceId === undefined &&
74
84
  grant.modelId === undefined &&
85
+ grant.imageModelId === undefined &&
75
86
  grant.templateId !== undefined);
76
87
  if (!validResource) {
77
88
  context.addIssue({ code: 'custom', message: 'resource identifiers must match resourceType' });
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { type ResourceOwnership } from './enterprise.js';
2
3
  export * from './enterprise.js';
3
4
  export * from './skill.js';
4
5
  export * from './mcp.js';
@@ -2167,6 +2168,26 @@ export declare const imageGenerationModelSchema: z.ZodDiscriminatedUnion<"provid
2167
2168
  id: z.ZodString;
2168
2169
  name: z.ZodString;
2169
2170
  enabled: z.ZodBoolean;
2171
+ ownership: z.ZodOptional<z.ZodDiscriminatedUnion<"ownerType", [z.ZodObject<{
2172
+ ownerType: z.ZodLiteral<"PERSONAL">;
2173
+ ownerUserId: z.ZodNumber;
2174
+ }, "strict", z.ZodTypeAny, {
2175
+ ownerType: "PERSONAL";
2176
+ ownerUserId: number;
2177
+ }, {
2178
+ ownerType: "PERSONAL";
2179
+ ownerUserId: number;
2180
+ }>, z.ZodObject<{
2181
+ ownerType: z.ZodLiteral<"ORGANIZATION">;
2182
+ ownerOrganizationId: z.ZodNumber;
2183
+ }, "strict", z.ZodTypeAny, {
2184
+ ownerType: "ORGANIZATION";
2185
+ ownerOrganizationId: number;
2186
+ }, {
2187
+ ownerType: "ORGANIZATION";
2188
+ ownerOrganizationId: number;
2189
+ }>]>>;
2190
+ sortOrder: z.ZodOptional<z.ZodNumber>;
2170
2191
  }, "strict", z.ZodTypeAny, {
2171
2192
  id: string;
2172
2193
  name: string;
@@ -2176,6 +2197,14 @@ export declare const imageGenerationModelSchema: z.ZodDiscriminatedUnion<"provid
2176
2197
  modelId: string;
2177
2198
  credentialId: string;
2178
2199
  };
2200
+ ownership?: {
2201
+ ownerType: "PERSONAL";
2202
+ ownerUserId: number;
2203
+ } | {
2204
+ ownerType: "ORGANIZATION";
2205
+ ownerOrganizationId: number;
2206
+ } | undefined;
2207
+ sortOrder?: number | undefined;
2179
2208
  }, {
2180
2209
  id: string;
2181
2210
  name: string;
@@ -2185,6 +2214,14 @@ export declare const imageGenerationModelSchema: z.ZodDiscriminatedUnion<"provid
2185
2214
  modelId: string;
2186
2215
  credentialId: string;
2187
2216
  };
2217
+ ownership?: {
2218
+ ownerType: "PERSONAL";
2219
+ ownerUserId: number;
2220
+ } | {
2221
+ ownerType: "ORGANIZATION";
2222
+ ownerOrganizationId: number;
2223
+ } | undefined;
2224
+ sortOrder?: number | undefined;
2188
2225
  }>, z.ZodObject<{
2189
2226
  provider: z.ZodLiteral<"BYTED_ARK">;
2190
2227
  config: z.ZodObject<{
@@ -2207,6 +2244,26 @@ export declare const imageGenerationModelSchema: z.ZodDiscriminatedUnion<"provid
2207
2244
  id: z.ZodString;
2208
2245
  name: z.ZodString;
2209
2246
  enabled: z.ZodBoolean;
2247
+ ownership: z.ZodOptional<z.ZodDiscriminatedUnion<"ownerType", [z.ZodObject<{
2248
+ ownerType: z.ZodLiteral<"PERSONAL">;
2249
+ ownerUserId: z.ZodNumber;
2250
+ }, "strict", z.ZodTypeAny, {
2251
+ ownerType: "PERSONAL";
2252
+ ownerUserId: number;
2253
+ }, {
2254
+ ownerType: "PERSONAL";
2255
+ ownerUserId: number;
2256
+ }>, z.ZodObject<{
2257
+ ownerType: z.ZodLiteral<"ORGANIZATION">;
2258
+ ownerOrganizationId: z.ZodNumber;
2259
+ }, "strict", z.ZodTypeAny, {
2260
+ ownerType: "ORGANIZATION";
2261
+ ownerOrganizationId: number;
2262
+ }, {
2263
+ ownerType: "ORGANIZATION";
2264
+ ownerOrganizationId: number;
2265
+ }>]>>;
2266
+ sortOrder: z.ZodOptional<z.ZodNumber>;
2210
2267
  }, "strict", z.ZodTypeAny, {
2211
2268
  id: string;
2212
2269
  name: string;
@@ -2218,6 +2275,14 @@ export declare const imageGenerationModelSchema: z.ZodDiscriminatedUnion<"provid
2218
2275
  apiKey?: string | undefined;
2219
2276
  hasApiKey?: boolean | undefined;
2220
2277
  };
2278
+ ownership?: {
2279
+ ownerType: "PERSONAL";
2280
+ ownerUserId: number;
2281
+ } | {
2282
+ ownerType: "ORGANIZATION";
2283
+ ownerOrganizationId: number;
2284
+ } | undefined;
2285
+ sortOrder?: number | undefined;
2221
2286
  }, {
2222
2287
  id: string;
2223
2288
  name: string;
@@ -2229,6 +2294,14 @@ export declare const imageGenerationModelSchema: z.ZodDiscriminatedUnion<"provid
2229
2294
  apiKey?: string | undefined;
2230
2295
  hasApiKey?: boolean | undefined;
2231
2296
  };
2297
+ ownership?: {
2298
+ ownerType: "PERSONAL";
2299
+ ownerUserId: number;
2300
+ } | {
2301
+ ownerType: "ORGANIZATION";
2302
+ ownerOrganizationId: number;
2303
+ } | undefined;
2304
+ sortOrder?: number | undefined;
2232
2305
  }>]>;
2233
2306
  export type ImageGenerationModel = z.infer<typeof imageGenerationModelSchema>;
2234
2307
  export declare const imageGenerationCatalogSchema: z.ZodEffects<z.ZodArray<z.ZodDiscriminatedUnion<"provider", [z.ZodObject<{
@@ -2247,6 +2320,26 @@ export declare const imageGenerationCatalogSchema: z.ZodEffects<z.ZodArray<z.Zod
2247
2320
  id: z.ZodString;
2248
2321
  name: z.ZodString;
2249
2322
  enabled: z.ZodBoolean;
2323
+ ownership: z.ZodOptional<z.ZodDiscriminatedUnion<"ownerType", [z.ZodObject<{
2324
+ ownerType: z.ZodLiteral<"PERSONAL">;
2325
+ ownerUserId: z.ZodNumber;
2326
+ }, "strict", z.ZodTypeAny, {
2327
+ ownerType: "PERSONAL";
2328
+ ownerUserId: number;
2329
+ }, {
2330
+ ownerType: "PERSONAL";
2331
+ ownerUserId: number;
2332
+ }>, z.ZodObject<{
2333
+ ownerType: z.ZodLiteral<"ORGANIZATION">;
2334
+ ownerOrganizationId: z.ZodNumber;
2335
+ }, "strict", z.ZodTypeAny, {
2336
+ ownerType: "ORGANIZATION";
2337
+ ownerOrganizationId: number;
2338
+ }, {
2339
+ ownerType: "ORGANIZATION";
2340
+ ownerOrganizationId: number;
2341
+ }>]>>;
2342
+ sortOrder: z.ZodOptional<z.ZodNumber>;
2250
2343
  }, "strict", z.ZodTypeAny, {
2251
2344
  id: string;
2252
2345
  name: string;
@@ -2256,6 +2349,14 @@ export declare const imageGenerationCatalogSchema: z.ZodEffects<z.ZodArray<z.Zod
2256
2349
  modelId: string;
2257
2350
  credentialId: string;
2258
2351
  };
2352
+ ownership?: {
2353
+ ownerType: "PERSONAL";
2354
+ ownerUserId: number;
2355
+ } | {
2356
+ ownerType: "ORGANIZATION";
2357
+ ownerOrganizationId: number;
2358
+ } | undefined;
2359
+ sortOrder?: number | undefined;
2259
2360
  }, {
2260
2361
  id: string;
2261
2362
  name: string;
@@ -2265,6 +2366,14 @@ export declare const imageGenerationCatalogSchema: z.ZodEffects<z.ZodArray<z.Zod
2265
2366
  modelId: string;
2266
2367
  credentialId: string;
2267
2368
  };
2369
+ ownership?: {
2370
+ ownerType: "PERSONAL";
2371
+ ownerUserId: number;
2372
+ } | {
2373
+ ownerType: "ORGANIZATION";
2374
+ ownerOrganizationId: number;
2375
+ } | undefined;
2376
+ sortOrder?: number | undefined;
2268
2377
  }>, z.ZodObject<{
2269
2378
  provider: z.ZodLiteral<"BYTED_ARK">;
2270
2379
  config: z.ZodObject<{
@@ -2287,6 +2396,26 @@ export declare const imageGenerationCatalogSchema: z.ZodEffects<z.ZodArray<z.Zod
2287
2396
  id: z.ZodString;
2288
2397
  name: z.ZodString;
2289
2398
  enabled: z.ZodBoolean;
2399
+ ownership: z.ZodOptional<z.ZodDiscriminatedUnion<"ownerType", [z.ZodObject<{
2400
+ ownerType: z.ZodLiteral<"PERSONAL">;
2401
+ ownerUserId: z.ZodNumber;
2402
+ }, "strict", z.ZodTypeAny, {
2403
+ ownerType: "PERSONAL";
2404
+ ownerUserId: number;
2405
+ }, {
2406
+ ownerType: "PERSONAL";
2407
+ ownerUserId: number;
2408
+ }>, z.ZodObject<{
2409
+ ownerType: z.ZodLiteral<"ORGANIZATION">;
2410
+ ownerOrganizationId: z.ZodNumber;
2411
+ }, "strict", z.ZodTypeAny, {
2412
+ ownerType: "ORGANIZATION";
2413
+ ownerOrganizationId: number;
2414
+ }, {
2415
+ ownerType: "ORGANIZATION";
2416
+ ownerOrganizationId: number;
2417
+ }>]>>;
2418
+ sortOrder: z.ZodOptional<z.ZodNumber>;
2290
2419
  }, "strict", z.ZodTypeAny, {
2291
2420
  id: string;
2292
2421
  name: string;
@@ -2298,6 +2427,14 @@ export declare const imageGenerationCatalogSchema: z.ZodEffects<z.ZodArray<z.Zod
2298
2427
  apiKey?: string | undefined;
2299
2428
  hasApiKey?: boolean | undefined;
2300
2429
  };
2430
+ ownership?: {
2431
+ ownerType: "PERSONAL";
2432
+ ownerUserId: number;
2433
+ } | {
2434
+ ownerType: "ORGANIZATION";
2435
+ ownerOrganizationId: number;
2436
+ } | undefined;
2437
+ sortOrder?: number | undefined;
2301
2438
  }, {
2302
2439
  id: string;
2303
2440
  name: string;
@@ -2309,6 +2446,14 @@ export declare const imageGenerationCatalogSchema: z.ZodEffects<z.ZodArray<z.Zod
2309
2446
  apiKey?: string | undefined;
2310
2447
  hasApiKey?: boolean | undefined;
2311
2448
  };
2449
+ ownership?: {
2450
+ ownerType: "PERSONAL";
2451
+ ownerUserId: number;
2452
+ } | {
2453
+ ownerType: "ORGANIZATION";
2454
+ ownerOrganizationId: number;
2455
+ } | undefined;
2456
+ sortOrder?: number | undefined;
2312
2457
  }>]>, "many">, ({
2313
2458
  id: string;
2314
2459
  name: string;
@@ -2318,6 +2463,14 @@ export declare const imageGenerationCatalogSchema: z.ZodEffects<z.ZodArray<z.Zod
2318
2463
  modelId: string;
2319
2464
  credentialId: string;
2320
2465
  };
2466
+ ownership?: {
2467
+ ownerType: "PERSONAL";
2468
+ ownerUserId: number;
2469
+ } | {
2470
+ ownerType: "ORGANIZATION";
2471
+ ownerOrganizationId: number;
2472
+ } | undefined;
2473
+ sortOrder?: number | undefined;
2321
2474
  } | {
2322
2475
  id: string;
2323
2476
  name: string;
@@ -2329,6 +2482,14 @@ export declare const imageGenerationCatalogSchema: z.ZodEffects<z.ZodArray<z.Zod
2329
2482
  apiKey?: string | undefined;
2330
2483
  hasApiKey?: boolean | undefined;
2331
2484
  };
2485
+ ownership?: {
2486
+ ownerType: "PERSONAL";
2487
+ ownerUserId: number;
2488
+ } | {
2489
+ ownerType: "ORGANIZATION";
2490
+ ownerOrganizationId: number;
2491
+ } | undefined;
2492
+ sortOrder?: number | undefined;
2332
2493
  })[], ({
2333
2494
  id: string;
2334
2495
  name: string;
@@ -2338,6 +2499,14 @@ export declare const imageGenerationCatalogSchema: z.ZodEffects<z.ZodArray<z.Zod
2338
2499
  modelId: string;
2339
2500
  credentialId: string;
2340
2501
  };
2502
+ ownership?: {
2503
+ ownerType: "PERSONAL";
2504
+ ownerUserId: number;
2505
+ } | {
2506
+ ownerType: "ORGANIZATION";
2507
+ ownerOrganizationId: number;
2508
+ } | undefined;
2509
+ sortOrder?: number | undefined;
2341
2510
  } | {
2342
2511
  id: string;
2343
2512
  name: string;
@@ -2349,6 +2518,14 @@ export declare const imageGenerationCatalogSchema: z.ZodEffects<z.ZodArray<z.Zod
2349
2518
  apiKey?: string | undefined;
2350
2519
  hasApiKey?: boolean | undefined;
2351
2520
  };
2521
+ ownership?: {
2522
+ ownerType: "PERSONAL";
2523
+ ownerUserId: number;
2524
+ } | {
2525
+ ownerType: "ORGANIZATION";
2526
+ ownerOrganizationId: number;
2527
+ } | undefined;
2528
+ sortOrder?: number | undefined;
2352
2529
  })[]>;
2353
2530
  export declare const marAgentNodeModelSummarySchema: z.ZodEffects<z.ZodObject<{
2354
2531
  access: z.ZodOptional<z.ZodNever>;
@@ -2403,8 +2580,8 @@ export declare const marAgentNodeModelSummarySchema: z.ZodEffects<z.ZodObject<{
2403
2580
  modelId: string;
2404
2581
  protocol: "OPENAI_RESPONSES" | "ANTHROPIC_MESSAGES";
2405
2582
  enabled: boolean;
2406
- baseUrl: string;
2407
2583
  sortOrder: number;
2584
+ baseUrl: string;
2408
2585
  contextWindowTokens: number;
2409
2586
  maxOutputTokens: number;
2410
2587
  inputCapabilities: ("TEXT" | "IMAGE")[];
@@ -2440,8 +2617,8 @@ export declare const marAgentNodeModelSummarySchema: z.ZodEffects<z.ZodObject<{
2440
2617
  modelId: string;
2441
2618
  protocol: "OPENAI_RESPONSES" | "ANTHROPIC_MESSAGES";
2442
2619
  enabled: boolean;
2443
- baseUrl: string;
2444
2620
  sortOrder: number;
2621
+ baseUrl: string;
2445
2622
  contextWindowTokens: number;
2446
2623
  maxOutputTokens: number;
2447
2624
  inputCapabilities: ("TEXT" | "IMAGE")[];
@@ -2477,6 +2654,25 @@ export declare const marAgentNodeModelSummarySchema: z.ZodEffects<z.ZodObject<{
2477
2654
  [x: string]: any;
2478
2655
  }>;
2479
2656
  export declare const marAgentModelSummarySchema: z.ZodEffects<z.ZodObject<{
2657
+ ownership: z.ZodOptional<z.ZodDiscriminatedUnion<"ownerType", [z.ZodObject<{
2658
+ ownerType: z.ZodLiteral<"PERSONAL">;
2659
+ ownerUserId: z.ZodNumber;
2660
+ }, "strict", z.ZodTypeAny, {
2661
+ ownerType: "PERSONAL";
2662
+ ownerUserId: number;
2663
+ }, {
2664
+ ownerType: "PERSONAL";
2665
+ ownerUserId: number;
2666
+ }>, z.ZodObject<{
2667
+ ownerType: z.ZodLiteral<"ORGANIZATION">;
2668
+ ownerOrganizationId: z.ZodNumber;
2669
+ }, "strict", z.ZodTypeAny, {
2670
+ ownerType: "ORGANIZATION";
2671
+ ownerOrganizationId: number;
2672
+ }, {
2673
+ ownerType: "ORGANIZATION";
2674
+ ownerOrganizationId: number;
2675
+ }>]>>;
2480
2676
  access: z.ZodEnum<["PUBLIC", "RESTRICTED"]>;
2481
2677
  baseUrl: z.ZodString;
2482
2678
  sortOrder: z.ZodNumber;
@@ -2526,9 +2722,9 @@ export declare const marAgentModelSummarySchema: z.ZodEffects<z.ZodObject<{
2526
2722
  modelId: string;
2527
2723
  protocol: "OPENAI_RESPONSES" | "ANTHROPIC_MESSAGES";
2528
2724
  enabled: boolean;
2725
+ sortOrder: number;
2529
2726
  access: "PUBLIC" | "RESTRICTED";
2530
2727
  baseUrl: string;
2531
- sortOrder: number;
2532
2728
  contextWindowTokens: number;
2533
2729
  maxOutputTokens: number;
2534
2730
  inputCapabilities: ("TEXT" | "IMAGE")[];
@@ -2540,6 +2736,13 @@ export declare const marAgentModelSummarySchema: z.ZodEffects<z.ZodObject<{
2540
2736
  hostedWebSearch: boolean;
2541
2737
  responsesPreviousResponseId: boolean;
2542
2738
  fastMode?: boolean | undefined;
2739
+ ownership?: {
2740
+ ownerType: "PERSONAL";
2741
+ ownerUserId: number;
2742
+ } | {
2743
+ ownerType: "ORGANIZATION";
2744
+ ownerOrganizationId: number;
2745
+ } | undefined;
2543
2746
  apiKeyConfigured?: boolean | undefined;
2544
2747
  credentialType?: "INLINE_API_KEY" | "CREDENTIAL_REF" | undefined;
2545
2748
  credentialConfigured?: boolean | undefined;
@@ -2560,9 +2763,9 @@ export declare const marAgentModelSummarySchema: z.ZodEffects<z.ZodObject<{
2560
2763
  modelId: string;
2561
2764
  protocol: "OPENAI_RESPONSES" | "ANTHROPIC_MESSAGES";
2562
2765
  enabled: boolean;
2766
+ sortOrder: number;
2563
2767
  access: "PUBLIC" | "RESTRICTED";
2564
2768
  baseUrl: string;
2565
- sortOrder: number;
2566
2769
  contextWindowTokens: number;
2567
2770
  maxOutputTokens: number;
2568
2771
  inputCapabilities: ("TEXT" | "IMAGE")[];
@@ -2570,6 +2773,13 @@ export declare const marAgentModelSummarySchema: z.ZodEffects<z.ZodObject<{
2570
2773
  reasoningEfforts: ("low" | "medium" | "high" | "xhigh" | "max" | "ultra")[];
2571
2774
  hostedWebSearch: boolean;
2572
2775
  fastMode?: boolean | undefined;
2776
+ ownership?: {
2777
+ ownerType: "PERSONAL";
2778
+ ownerUserId: number;
2779
+ } | {
2780
+ ownerType: "ORGANIZATION";
2781
+ ownerOrganizationId: number;
2782
+ } | undefined;
2573
2783
  apiKeyConfigured?: boolean | undefined;
2574
2784
  credentialType?: "INLINE_API_KEY" | "CREDENTIAL_REF" | undefined;
2575
2785
  credentialConfigured?: boolean | undefined;
@@ -2622,6 +2832,7 @@ export interface MarAgentModelSummary {
2622
2832
  lastTestedAt?: number | null;
2623
2833
  lastTestStatus?: 'UNVERIFIED' | 'SUCCEEDED' | 'FAILED' | null;
2624
2834
  lastTestCode?: string | null;
2835
+ ownership?: ResourceOwnership;
2625
2836
  }
2626
2837
  export type MarAgentNodeModelSummary = Omit<MarAgentModelSummary, 'access'>;
2627
2838
  export declare const marAgentRuntimeModelConfigurationSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
@@ -2929,10 +3140,10 @@ export declare const marAgentRuntimeModelConfigurationSchema: z.ZodEffects<z.Zod
2929
3140
  };
2930
3141
  }>]>>;
2931
3142
  }, "strict", z.ZodTypeAny, {
3143
+ imageModelId: string;
2932
3144
  httpVersion: "2" | "1.1";
2933
3145
  generateEndpoint: string;
2934
3146
  editEndpoint: string;
2935
- imageModelId: string;
2936
3147
  credential?: {
2937
3148
  value: string;
2938
3149
  type: "INLINE_API_KEY";
@@ -2957,10 +3168,10 @@ export declare const marAgentRuntimeModelConfigurationSchema: z.ZodEffects<z.Zod
2957
3168
  provider?: string | undefined;
2958
3169
  config?: Record<string, string> | undefined;
2959
3170
  }, {
3171
+ imageModelId: string;
2960
3172
  httpVersion: "2" | "1.1";
2961
3173
  generateEndpoint: string;
2962
3174
  editEndpoint: string;
2963
- imageModelId: string;
2964
3175
  credential?: {
2965
3176
  value: string;
2966
3177
  type: "INLINE_API_KEY";
@@ -3060,10 +3271,10 @@ export declare const marAgentRuntimeModelConfigurationSchema: z.ZodEffects<z.Zod
3060
3271
  } | undefined;
3061
3272
  apiKey?: string | undefined;
3062
3273
  imageGeneration?: {
3274
+ imageModelId: string;
3063
3275
  httpVersion: "2" | "1.1";
3064
3276
  generateEndpoint: string;
3065
3277
  editEndpoint: string;
3066
- imageModelId: string;
3067
3278
  credential?: {
3068
3279
  value: string;
3069
3280
  type: "INLINE_API_KEY";
@@ -3133,10 +3344,10 @@ export declare const marAgentRuntimeModelConfigurationSchema: z.ZodEffects<z.Zod
3133
3344
  } | undefined;
3134
3345
  apiKey?: string | undefined;
3135
3346
  imageGeneration?: {
3347
+ imageModelId: string;
3136
3348
  httpVersion: "2" | "1.1";
3137
3349
  generateEndpoint: string;
3138
3350
  editEndpoint: string;
3139
- imageModelId: string;
3140
3351
  credential?: {
3141
3352
  value: string;
3142
3353
  type: "INLINE_API_KEY";
@@ -3491,10 +3702,10 @@ export declare const marAgentModelTransportTestInputSchema: z.ZodObject<{
3491
3702
  };
3492
3703
  }>]>>;
3493
3704
  }, "strict", z.ZodTypeAny, {
3705
+ imageModelId: string;
3494
3706
  httpVersion: "2" | "1.1";
3495
3707
  generateEndpoint: string;
3496
3708
  editEndpoint: string;
3497
- imageModelId: string;
3498
3709
  credential?: {
3499
3710
  value: string;
3500
3711
  type: "INLINE_API_KEY";
@@ -3519,10 +3730,10 @@ export declare const marAgentModelTransportTestInputSchema: z.ZodObject<{
3519
3730
  provider?: string | undefined;
3520
3731
  config?: Record<string, string> | undefined;
3521
3732
  }, {
3733
+ imageModelId: string;
3522
3734
  httpVersion: "2" | "1.1";
3523
3735
  generateEndpoint: string;
3524
3736
  editEndpoint: string;
3525
- imageModelId: string;
3526
3737
  credential?: {
3527
3738
  value: string;
3528
3739
  type: "INLINE_API_KEY";
@@ -3622,10 +3833,10 @@ export declare const marAgentModelTransportTestInputSchema: z.ZodObject<{
3622
3833
  } | undefined;
3623
3834
  apiKey?: string | undefined;
3624
3835
  imageGeneration?: {
3836
+ imageModelId: string;
3625
3837
  httpVersion: "2" | "1.1";
3626
3838
  generateEndpoint: string;
3627
3839
  editEndpoint: string;
3628
- imageModelId: string;
3629
3840
  credential?: {
3630
3841
  value: string;
3631
3842
  type: "INLINE_API_KEY";
@@ -3695,10 +3906,10 @@ export declare const marAgentModelTransportTestInputSchema: z.ZodObject<{
3695
3906
  } | undefined;
3696
3907
  apiKey?: string | undefined;
3697
3908
  imageGeneration?: {
3909
+ imageModelId: string;
3698
3910
  httpVersion: "2" | "1.1";
3699
3911
  generateEndpoint: string;
3700
3912
  editEndpoint: string;
3701
- imageModelId: string;
3702
3913
  credential?: {
3703
3914
  value: string;
3704
3915
  type: "INLINE_API_KEY";
@@ -4664,6 +4875,25 @@ export declare const codexModelCatalogSchema: z.ZodEffects<z.ZodObject<{
4664
4875
  export type CodexModelCatalog = z.infer<typeof codexModelCatalogSchema>;
4665
4876
  export declare const codexModelImportRequestSchema: z.ZodEffects<z.ZodObject<{
4666
4877
  catalogHash: z.ZodString;
4878
+ ownership: z.ZodOptional<z.ZodDiscriminatedUnion<"ownerType", [z.ZodObject<{
4879
+ ownerType: z.ZodLiteral<"PERSONAL">;
4880
+ ownerUserId: z.ZodNumber;
4881
+ }, "strict", z.ZodTypeAny, {
4882
+ ownerType: "PERSONAL";
4883
+ ownerUserId: number;
4884
+ }, {
4885
+ ownerType: "PERSONAL";
4886
+ ownerUserId: number;
4887
+ }>, z.ZodObject<{
4888
+ ownerType: z.ZodLiteral<"ORGANIZATION">;
4889
+ ownerOrganizationId: z.ZodNumber;
4890
+ }, "strict", z.ZodTypeAny, {
4891
+ ownerType: "ORGANIZATION";
4892
+ ownerOrganizationId: number;
4893
+ }, {
4894
+ ownerType: "ORGANIZATION";
4895
+ ownerOrganizationId: number;
4896
+ }>]>>;
4667
4897
  models: z.ZodArray<z.ZodObject<{
4668
4898
  upstreamModelId: z.ZodString;
4669
4899
  name: z.ZodOptional<z.ZodString>;
@@ -4688,6 +4918,13 @@ export declare const codexModelImportRequestSchema: z.ZodEffects<z.ZodObject<{
4688
4918
  name?: string | undefined;
4689
4919
  contextWindowTokens?: number | undefined;
4690
4920
  }[];
4921
+ ownership?: {
4922
+ ownerType: "PERSONAL";
4923
+ ownerUserId: number;
4924
+ } | {
4925
+ ownerType: "ORGANIZATION";
4926
+ ownerOrganizationId: number;
4927
+ } | undefined;
4691
4928
  }, {
4692
4929
  catalogHash: string;
4693
4930
  models: {
@@ -4696,6 +4933,13 @@ export declare const codexModelImportRequestSchema: z.ZodEffects<z.ZodObject<{
4696
4933
  name?: string | undefined;
4697
4934
  contextWindowTokens?: number | undefined;
4698
4935
  }[];
4936
+ ownership?: {
4937
+ ownerType: "PERSONAL";
4938
+ ownerUserId: number;
4939
+ } | {
4940
+ ownerType: "ORGANIZATION";
4941
+ ownerOrganizationId: number;
4942
+ } | undefined;
4699
4943
  }>, {
4700
4944
  catalogHash: string;
4701
4945
  models: {
@@ -4704,6 +4948,13 @@ export declare const codexModelImportRequestSchema: z.ZodEffects<z.ZodObject<{
4704
4948
  name?: string | undefined;
4705
4949
  contextWindowTokens?: number | undefined;
4706
4950
  }[];
4951
+ ownership?: {
4952
+ ownerType: "PERSONAL";
4953
+ ownerUserId: number;
4954
+ } | {
4955
+ ownerType: "ORGANIZATION";
4956
+ ownerOrganizationId: number;
4957
+ } | undefined;
4707
4958
  }, {
4708
4959
  catalogHash: string;
4709
4960
  models: {
@@ -4712,6 +4963,13 @@ export declare const codexModelImportRequestSchema: z.ZodEffects<z.ZodObject<{
4712
4963
  name?: string | undefined;
4713
4964
  contextWindowTokens?: number | undefined;
4714
4965
  }[];
4966
+ ownership?: {
4967
+ ownerType: "PERSONAL";
4968
+ ownerUserId: number;
4969
+ } | {
4970
+ ownerType: "ORGANIZATION";
4971
+ ownerOrganizationId: number;
4972
+ } | undefined;
4715
4973
  }>;
4716
4974
  export type CodexModelImportRequest = z.infer<typeof codexModelImportRequestSchema>;
4717
4975
  export declare const codexModelImportResultSchema: z.ZodObject<{
@@ -13696,8 +13954,8 @@ export declare const hostedConversationSnapshotSchema: z.ZodEffects<z.ZodObject<
13696
13954
  modelId: string;
13697
13955
  protocol: "OPENAI_RESPONSES" | "ANTHROPIC_MESSAGES";
13698
13956
  enabled: boolean;
13699
- baseUrl: string;
13700
13957
  sortOrder: number;
13958
+ baseUrl: string;
13701
13959
  contextWindowTokens: number;
13702
13960
  maxOutputTokens: number;
13703
13961
  inputCapabilities: ("TEXT" | "IMAGE")[];
@@ -13733,8 +13991,8 @@ export declare const hostedConversationSnapshotSchema: z.ZodEffects<z.ZodObject<
13733
13991
  modelId: string;
13734
13992
  protocol: "OPENAI_RESPONSES" | "ANTHROPIC_MESSAGES";
13735
13993
  enabled: boolean;
13736
- baseUrl: string;
13737
13994
  sortOrder: number;
13995
+ baseUrl: string;
13738
13996
  contextWindowTokens: number;
13739
13997
  maxOutputTokens: number;
13740
13998
  inputCapabilities: ("TEXT" | "IMAGE")[];
package/dist/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { resourceOwnershipSchema } from './enterprise.js';
2
3
  import { workspaceDirectTransferCapabilitySchema } from './direct-transfer.js';
3
4
  import { terminalDirectCapabilitySchema } from './terminal-direct.js';
4
5
  export * from './enterprise.js';
@@ -642,7 +643,9 @@ export const imageGenerationConfigurationSchema = z.discriminatedUnion('provider
642
643
  const imageGenerationModelFields = {
643
644
  id: boundedIdentifierSchema,
644
645
  name: z.string().trim().min(1).max(128),
645
- enabled: z.boolean()
646
+ enabled: z.boolean(),
647
+ ownership: resourceOwnershipSchema.optional(),
648
+ sortOrder: z.number().int().optional()
646
649
  };
647
650
  export const imageGenerationModelSchema = z.discriminatedUnion('provider', [
648
651
  imageGenerationConfigurationSchema.options[0].extend(imageGenerationModelFields),
@@ -733,6 +736,7 @@ export const marAgentNodeModelSummarySchema = refineMarAgentModel(z
733
736
  export const marAgentModelSummarySchema = refineMarAgentModel(z
734
737
  .object({
735
738
  ...marAgentModelSummaryShape,
739
+ ownership: resourceOwnershipSchema.optional(),
736
740
  access: z.enum(['PUBLIC', 'RESTRICTED'])
737
741
  })
738
742
  .strict());
@@ -1005,6 +1009,7 @@ const codexModelImportItemSchema = z
1005
1009
  export const codexModelImportRequestSchema = z
1006
1010
  .object({
1007
1011
  catalogHash: z.string().regex(/^[a-f0-9]{64}$/u),
1012
+ ownership: resourceOwnershipSchema.optional(),
1008
1013
  models: z.array(codexModelImportItemSchema).min(1).max(64)
1009
1014
  })
1010
1015
  .strict()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myagentroam/protocol",
3
- "version": "0.9.112",
3
+ "version": "0.9.114",
4
4
  "description": "Shared runtime protocol schemas for MyAgentRoam.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",