@myagentroam/protocol 0.9.107 → 0.9.109

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.d.ts CHANGED
@@ -4,6 +4,7 @@ export * from './skill.js';
4
4
  export * from './mcp.js';
5
5
  export * from './git-identity.js';
6
6
  export * from './direct-transfer.js';
7
+ export * from './terminal-direct.js';
7
8
  export declare const healthStatusSchema: z.ZodObject<{
8
9
  status: z.ZodLiteral<"ok">;
9
10
  }, "strip", z.ZodTypeAny, {
@@ -29,15 +30,18 @@ export declare const runnerAvailabilitySchema: z.ZodObject<{
29
30
  export declare const marAgentRuntimeCredentialCapabilitySchema: z.ZodObject<{
30
31
  apiVersion: z.ZodLiteral<1>;
31
32
  websocket: z.ZodBoolean;
33
+ fastMode: z.ZodOptional<z.ZodBoolean>;
32
34
  httpVersions: z.ZodEffects<z.ZodArray<z.ZodEnum<["1.1", "2"]>, "many">, ("2" | "1.1")[], ("2" | "1.1")[]>;
33
35
  }, "strict", z.ZodTypeAny, {
34
36
  apiVersion: 1;
35
37
  websocket: boolean;
36
38
  httpVersions: ("2" | "1.1")[];
39
+ fastMode?: boolean | undefined;
37
40
  }, {
38
41
  apiVersion: 1;
39
42
  websocket: boolean;
40
43
  httpVersions: ("2" | "1.1")[];
44
+ fastMode?: boolean | undefined;
41
45
  }>;
42
46
  export type MarAgentRuntimeCredentialCapability = z.infer<typeof marAgentRuntimeCredentialCapabilitySchema>;
43
47
  export declare const conversationHostingCapabilitySchema: z.ZodEffects<z.ZodObject<{
@@ -959,15 +963,18 @@ export declare const nodeCapabilitiesSchema: z.ZodEffects<z.ZodObject<{
959
963
  marAgentRuntimeCredentials: z.ZodOptional<z.ZodObject<{
960
964
  apiVersion: z.ZodLiteral<1>;
961
965
  websocket: z.ZodBoolean;
966
+ fastMode: z.ZodOptional<z.ZodBoolean>;
962
967
  httpVersions: z.ZodEffects<z.ZodArray<z.ZodEnum<["1.1", "2"]>, "many">, ("2" | "1.1")[], ("2" | "1.1")[]>;
963
968
  }, "strict", z.ZodTypeAny, {
964
969
  apiVersion: 1;
965
970
  websocket: boolean;
966
971
  httpVersions: ("2" | "1.1")[];
972
+ fastMode?: boolean | undefined;
967
973
  }, {
968
974
  apiVersion: 1;
969
975
  websocket: boolean;
970
976
  httpVersions: ("2" | "1.1")[];
977
+ fastMode?: boolean | undefined;
971
978
  }>>;
972
979
  workspaceDirectTransfer: z.ZodOptional<z.ZodObject<{
973
980
  apiVersion: z.ZodUnion<[z.ZodLiteral<2>, z.ZodLiteral<3>]>;
@@ -994,6 +1001,16 @@ export declare const nodeCapabilitiesSchema: z.ZodEffects<z.ZodObject<{
994
1001
  gitCommitBlob: boolean;
995
1002
  maxChunkBytes: number;
996
1003
  }>>;
1004
+ terminalDirect: z.ZodOptional<z.ZodObject<{
1005
+ apiVersion: z.ZodLiteral<1>;
1006
+ transport: z.ZodLiteral<true>;
1007
+ }, "strict", z.ZodTypeAny, {
1008
+ apiVersion: 1;
1009
+ transport: true;
1010
+ }, {
1011
+ apiVersion: 1;
1012
+ transport: true;
1013
+ }>>;
997
1014
  }, "strip", z.ZodTypeAny, {
998
1015
  platform: "windows" | "linux" | "macos";
999
1016
  architecture: string;
@@ -1081,6 +1098,7 @@ export declare const nodeCapabilitiesSchema: z.ZodEffects<z.ZodObject<{
1081
1098
  apiVersion: 1;
1082
1099
  websocket: boolean;
1083
1100
  httpVersions: ("2" | "1.1")[];
1101
+ fastMode?: boolean | undefined;
1084
1102
  } | undefined;
1085
1103
  workspaceDirectTransfer?: {
1086
1104
  apiVersion: 2 | 3;
@@ -1091,6 +1109,10 @@ export declare const nodeCapabilitiesSchema: z.ZodEffects<z.ZodObject<{
1091
1109
  gitCommitBlob: boolean;
1092
1110
  maxChunkBytes: number;
1093
1111
  } | undefined;
1112
+ terminalDirect?: {
1113
+ apiVersion: 1;
1114
+ transport: true;
1115
+ } | undefined;
1094
1116
  }, {
1095
1117
  platform: "windows" | "linux" | "macos";
1096
1118
  architecture: string;
@@ -1178,6 +1200,7 @@ export declare const nodeCapabilitiesSchema: z.ZodEffects<z.ZodObject<{
1178
1200
  apiVersion: 1;
1179
1201
  websocket: boolean;
1180
1202
  httpVersions: ("2" | "1.1")[];
1203
+ fastMode?: boolean | undefined;
1181
1204
  } | undefined;
1182
1205
  workspaceDirectTransfer?: {
1183
1206
  apiVersion: 2 | 3;
@@ -1188,6 +1211,10 @@ export declare const nodeCapabilitiesSchema: z.ZodEffects<z.ZodObject<{
1188
1211
  gitCommitBlob: boolean;
1189
1212
  maxChunkBytes: number;
1190
1213
  } | undefined;
1214
+ terminalDirect?: {
1215
+ apiVersion: 1;
1216
+ transport: true;
1217
+ } | undefined;
1191
1218
  }>, {
1192
1219
  platform: "windows" | "linux" | "macos";
1193
1220
  architecture: string;
@@ -1275,6 +1302,7 @@ export declare const nodeCapabilitiesSchema: z.ZodEffects<z.ZodObject<{
1275
1302
  apiVersion: 1;
1276
1303
  websocket: boolean;
1277
1304
  httpVersions: ("2" | "1.1")[];
1305
+ fastMode?: boolean | undefined;
1278
1306
  } | undefined;
1279
1307
  workspaceDirectTransfer?: {
1280
1308
  apiVersion: 2 | 3;
@@ -1285,6 +1313,10 @@ export declare const nodeCapabilitiesSchema: z.ZodEffects<z.ZodObject<{
1285
1313
  gitCommitBlob: boolean;
1286
1314
  maxChunkBytes: number;
1287
1315
  } | undefined;
1316
+ terminalDirect?: {
1317
+ apiVersion: 1;
1318
+ transport: true;
1319
+ } | undefined;
1288
1320
  }, {
1289
1321
  platform: "windows" | "linux" | "macos";
1290
1322
  architecture: string;
@@ -1372,6 +1404,7 @@ export declare const nodeCapabilitiesSchema: z.ZodEffects<z.ZodObject<{
1372
1404
  apiVersion: 1;
1373
1405
  websocket: boolean;
1374
1406
  httpVersions: ("2" | "1.1")[];
1407
+ fastMode?: boolean | undefined;
1375
1408
  } | undefined;
1376
1409
  workspaceDirectTransfer?: {
1377
1410
  apiVersion: 2 | 3;
@@ -1382,6 +1415,10 @@ export declare const nodeCapabilitiesSchema: z.ZodEffects<z.ZodObject<{
1382
1415
  gitCommitBlob: boolean;
1383
1416
  maxChunkBytes: number;
1384
1417
  } | undefined;
1418
+ terminalDirect?: {
1419
+ apiVersion: 1;
1420
+ transport: true;
1421
+ } | undefined;
1385
1422
  }>;
1386
1423
  export type NodeCapabilities = z.infer<typeof nodeCapabilitiesSchema>;
1387
1424
  export declare const workspaceKindSchema: z.ZodEnum<["DIRECTORY", "GIT_WORKSPACE"]>;
@@ -2335,6 +2372,7 @@ export declare const marAgentNodeModelSummarySchema: z.ZodEffects<z.ZodObject<{
2335
2372
  readonly titleGeneration: z.ZodDefault<z.ZodBoolean>;
2336
2373
  readonly codeMode: z.ZodDefault<z.ZodBoolean>;
2337
2374
  readonly highDensityCompaction: z.ZodDefault<z.ZodBoolean>;
2375
+ readonly fastMode: z.ZodOptional<z.ZodBoolean>;
2338
2376
  readonly hostedWebSearch: z.ZodBoolean;
2339
2377
  readonly responsesTransport: z.ZodOptional<z.ZodDiscriminatedUnion<"transport", [z.ZodObject<{
2340
2378
  transport: z.ZodLiteral<"WEBSOCKET">;
@@ -2373,6 +2411,7 @@ export declare const marAgentNodeModelSummarySchema: z.ZodEffects<z.ZodObject<{
2373
2411
  highDensityCompaction: boolean;
2374
2412
  hostedWebSearch: boolean;
2375
2413
  responsesPreviousResponseId: boolean;
2414
+ fastMode?: boolean | undefined;
2376
2415
  apiKeyConfigured?: boolean | undefined;
2377
2416
  credentialType?: "INLINE_API_KEY" | "CREDENTIAL_REF" | undefined;
2378
2417
  credentialConfigured?: boolean | undefined;
@@ -2401,6 +2440,7 @@ export declare const marAgentNodeModelSummarySchema: z.ZodEffects<z.ZodObject<{
2401
2440
  outputCapabilities: ["TEXT"];
2402
2441
  reasoningEfforts: ("low" | "medium" | "high" | "xhigh" | "max" | "ultra")[];
2403
2442
  hostedWebSearch: boolean;
2443
+ fastMode?: boolean | undefined;
2404
2444
  apiKeyConfigured?: boolean | undefined;
2405
2445
  credentialType?: "INLINE_API_KEY" | "CREDENTIAL_REF" | undefined;
2406
2446
  credentialConfigured?: boolean | undefined;
@@ -2447,6 +2487,7 @@ export declare const marAgentModelSummarySchema: z.ZodEffects<z.ZodObject<{
2447
2487
  titleGeneration: z.ZodDefault<z.ZodBoolean>;
2448
2488
  codeMode: z.ZodDefault<z.ZodBoolean>;
2449
2489
  highDensityCompaction: z.ZodDefault<z.ZodBoolean>;
2490
+ fastMode: z.ZodOptional<z.ZodBoolean>;
2450
2491
  hostedWebSearch: z.ZodBoolean;
2451
2492
  responsesTransport: z.ZodOptional<z.ZodDiscriminatedUnion<"transport", [z.ZodObject<{
2452
2493
  transport: z.ZodLiteral<"WEBSOCKET">;
@@ -2486,6 +2527,7 @@ export declare const marAgentModelSummarySchema: z.ZodEffects<z.ZodObject<{
2486
2527
  hostedWebSearch: boolean;
2487
2528
  responsesPreviousResponseId: boolean;
2488
2529
  access: "PUBLIC" | "RESTRICTED";
2530
+ fastMode?: boolean | undefined;
2489
2531
  apiKeyConfigured?: boolean | undefined;
2490
2532
  credentialType?: "INLINE_API_KEY" | "CREDENTIAL_REF" | undefined;
2491
2533
  credentialConfigured?: boolean | undefined;
@@ -2515,6 +2557,7 @@ export declare const marAgentModelSummarySchema: z.ZodEffects<z.ZodObject<{
2515
2557
  reasoningEfforts: ("low" | "medium" | "high" | "xhigh" | "max" | "ultra")[];
2516
2558
  hostedWebSearch: boolean;
2517
2559
  access: "PUBLIC" | "RESTRICTED";
2560
+ fastMode?: boolean | undefined;
2518
2561
  apiKeyConfigured?: boolean | undefined;
2519
2562
  credentialType?: "INLINE_API_KEY" | "CREDENTIAL_REF" | undefined;
2520
2563
  credentialConfigured?: boolean | undefined;
@@ -2553,6 +2596,7 @@ export interface MarAgentModelSummary {
2553
2596
  titleGeneration: boolean;
2554
2597
  codeMode: boolean;
2555
2598
  highDensityCompaction: boolean;
2599
+ fastMode?: boolean;
2556
2600
  hostedWebSearch: boolean;
2557
2601
  responsesTransport?: MarAgentResponsesTransport;
2558
2602
  responsesEncoding?: 'STANDARD' | 'LITE';
@@ -2942,6 +2986,7 @@ export declare const marAgentRuntimeModelConfigurationSchema: z.ZodEffects<z.Zod
2942
2986
  titleGeneration: z.ZodDefault<z.ZodBoolean>;
2943
2987
  codeMode: z.ZodDefault<z.ZodBoolean>;
2944
2988
  highDensityCompaction: z.ZodDefault<z.ZodBoolean>;
2989
+ fastMode: z.ZodOptional<z.ZodBoolean>;
2945
2990
  hostedWebSearch: z.ZodBoolean;
2946
2991
  responsesTransport: z.ZodOptional<z.ZodDiscriminatedUnion<"transport", [z.ZodObject<{
2947
2992
  transport: z.ZodLiteral<"WEBSOCKET">;
@@ -2962,7 +3007,7 @@ export declare const marAgentRuntimeModelConfigurationSchema: z.ZodEffects<z.Zod
2962
3007
  responsesEncoding: z.ZodOptional<z.ZodEnum<["STANDARD", "LITE"]>>;
2963
3008
  responsesPreviousResponseId: z.ZodDefault<z.ZodBoolean>;
2964
3009
  enabled: z.ZodBoolean;
2965
- }, "strict", z.ZodTypeAny, {
3010
+ }, "strip", z.ZodTypeAny, {
2966
3011
  id: string;
2967
3012
  name: string;
2968
3013
  modelId: string;
@@ -2979,6 +3024,7 @@ export declare const marAgentRuntimeModelConfigurationSchema: z.ZodEffects<z.Zod
2979
3024
  highDensityCompaction: boolean;
2980
3025
  hostedWebSearch: boolean;
2981
3026
  responsesPreviousResponseId: boolean;
3027
+ fastMode?: boolean | undefined;
2982
3028
  credential?: {
2983
3029
  value: string;
2984
3030
  type: "INLINE_API_KEY";
@@ -3051,6 +3097,7 @@ export declare const marAgentRuntimeModelConfigurationSchema: z.ZodEffects<z.Zod
3051
3097
  outputCapabilities: ["TEXT"];
3052
3098
  reasoningEfforts: ("low" | "medium" | "high" | "xhigh" | "max" | "ultra")[];
3053
3099
  hostedWebSearch: boolean;
3100
+ fastMode?: boolean | undefined;
3054
3101
  credential?: {
3055
3102
  value: string;
3056
3103
  type: "INLINE_API_KEY";
@@ -3501,6 +3548,7 @@ export declare const marAgentModelTransportTestInputSchema: z.ZodObject<{
3501
3548
  titleGeneration: z.ZodDefault<z.ZodBoolean>;
3502
3549
  codeMode: z.ZodDefault<z.ZodBoolean>;
3503
3550
  highDensityCompaction: z.ZodDefault<z.ZodBoolean>;
3551
+ fastMode: z.ZodOptional<z.ZodBoolean>;
3504
3552
  hostedWebSearch: z.ZodBoolean;
3505
3553
  responsesTransport: z.ZodOptional<z.ZodDiscriminatedUnion<"transport", [z.ZodObject<{
3506
3554
  transport: z.ZodLiteral<"WEBSOCKET">;
@@ -3521,7 +3569,7 @@ export declare const marAgentModelTransportTestInputSchema: z.ZodObject<{
3521
3569
  responsesEncoding: z.ZodOptional<z.ZodEnum<["STANDARD", "LITE"]>>;
3522
3570
  responsesPreviousResponseId: z.ZodDefault<z.ZodBoolean>;
3523
3571
  enabled: z.ZodBoolean;
3524
- }, "strict", z.ZodTypeAny, {
3572
+ }, "strip", z.ZodTypeAny, {
3525
3573
  id: string;
3526
3574
  name: string;
3527
3575
  modelId: string;
@@ -3538,6 +3586,7 @@ export declare const marAgentModelTransportTestInputSchema: z.ZodObject<{
3538
3586
  highDensityCompaction: boolean;
3539
3587
  hostedWebSearch: boolean;
3540
3588
  responsesPreviousResponseId: boolean;
3589
+ fastMode?: boolean | undefined;
3541
3590
  credential?: {
3542
3591
  value: string;
3543
3592
  type: "INLINE_API_KEY";
@@ -3610,6 +3659,7 @@ export declare const marAgentModelTransportTestInputSchema: z.ZodObject<{
3610
3659
  outputCapabilities: ["TEXT"];
3611
3660
  reasoningEfforts: ("low" | "medium" | "high" | "xhigh" | "max" | "ultra")[];
3612
3661
  hostedWebSearch: boolean;
3662
+ fastMode?: boolean | undefined;
3613
3663
  credential?: {
3614
3664
  value: string;
3615
3665
  type: "INLINE_API_KEY";
@@ -3762,6 +3812,7 @@ export declare const marAgentStoredModelConfigurationSchema: z.ZodEffects<z.ZodO
3762
3812
  titleGeneration: z.ZodDefault<z.ZodBoolean>;
3763
3813
  codeMode: z.ZodDefault<z.ZodBoolean>;
3764
3814
  highDensityCompaction: z.ZodDefault<z.ZodBoolean>;
3815
+ fastMode: z.ZodOptional<z.ZodBoolean>;
3765
3816
  hostedWebSearch: z.ZodBoolean;
3766
3817
  responsesTransport: z.ZodOptional<z.ZodDiscriminatedUnion<"transport", [z.ZodObject<{
3767
3818
  transport: z.ZodLiteral<"WEBSOCKET">;
@@ -3806,6 +3857,7 @@ export declare const marAgentStoredModelConfigurationSchema: z.ZodEffects<z.ZodO
3806
3857
  highDensityCompaction: boolean;
3807
3858
  hostedWebSearch: boolean;
3808
3859
  responsesPreviousResponseId: boolean;
3860
+ fastMode?: boolean | undefined;
3809
3861
  defaultReasoningEffort?: "low" | "medium" | "high" | "xhigh" | "max" | "ultra" | undefined;
3810
3862
  responsesTransport?: {
3811
3863
  transport: "WEBSOCKET";
@@ -3834,6 +3886,7 @@ export declare const marAgentStoredModelConfigurationSchema: z.ZodEffects<z.ZodO
3834
3886
  outputCapabilities: ["TEXT"];
3835
3887
  reasoningEfforts: ("low" | "medium" | "high" | "xhigh" | "max" | "ultra")[];
3836
3888
  hostedWebSearch: boolean;
3889
+ fastMode?: boolean | undefined;
3837
3890
  defaultReasoningEffort?: "low" | "medium" | "high" | "xhigh" | "max" | "ultra" | undefined;
3838
3891
  titleGeneration?: boolean | undefined;
3839
3892
  codeMode?: boolean | undefined;
@@ -6018,6 +6071,16 @@ export declare const nodeWorkbenchCapabilitiesSchema: z.ZodObject<{
6018
6071
  gitCommitBlob: boolean;
6019
6072
  maxChunkBytes: number;
6020
6073
  }>>;
6074
+ terminalDirect: z.ZodOptional<z.ZodObject<{
6075
+ apiVersion: z.ZodLiteral<1>;
6076
+ transport: z.ZodLiteral<true>;
6077
+ }, "strict", z.ZodTypeAny, {
6078
+ apiVersion: 1;
6079
+ transport: true;
6080
+ }, {
6081
+ apiVersion: 1;
6082
+ transport: true;
6083
+ }>>;
6021
6084
  git: z.ZodEffects<z.ZodObject<{
6022
6085
  available: z.ZodBoolean;
6023
6086
  reasonCode: z.ZodNullable<z.ZodString>;
@@ -6154,6 +6217,10 @@ export declare const nodeWorkbenchCapabilitiesSchema: z.ZodObject<{
6154
6217
  [x: string]: any;
6155
6218
  };
6156
6219
  nodeGeneration?: string | undefined;
6220
+ terminalDirect?: {
6221
+ apiVersion: 1;
6222
+ transport: true;
6223
+ } | undefined;
6157
6224
  directTransfer?: {
6158
6225
  apiVersion: 2 | 3;
6159
6226
  transport: boolean;
@@ -6210,6 +6277,10 @@ export declare const nodeWorkbenchCapabilitiesSchema: z.ZodObject<{
6210
6277
  [x: string]: any;
6211
6278
  };
6212
6279
  nodeGeneration?: string | undefined;
6280
+ terminalDirect?: {
6281
+ apiVersion: 1;
6282
+ transport: true;
6283
+ } | undefined;
6213
6284
  directTransfer?: {
6214
6285
  apiVersion: 2 | 3;
6215
6286
  transport: boolean;
@@ -13582,6 +13653,7 @@ export declare const hostedConversationSnapshotSchema: z.ZodEffects<z.ZodObject<
13582
13653
  readonly titleGeneration: z.ZodDefault<z.ZodBoolean>;
13583
13654
  readonly codeMode: z.ZodDefault<z.ZodBoolean>;
13584
13655
  readonly highDensityCompaction: z.ZodDefault<z.ZodBoolean>;
13656
+ readonly fastMode: z.ZodOptional<z.ZodBoolean>;
13585
13657
  readonly hostedWebSearch: z.ZodBoolean;
13586
13658
  readonly responsesTransport: z.ZodOptional<z.ZodDiscriminatedUnion<"transport", [z.ZodObject<{
13587
13659
  transport: z.ZodLiteral<"WEBSOCKET">;
@@ -13620,6 +13692,7 @@ export declare const hostedConversationSnapshotSchema: z.ZodEffects<z.ZodObject<
13620
13692
  highDensityCompaction: boolean;
13621
13693
  hostedWebSearch: boolean;
13622
13694
  responsesPreviousResponseId: boolean;
13695
+ fastMode?: boolean | undefined;
13623
13696
  apiKeyConfigured?: boolean | undefined;
13624
13697
  credentialType?: "INLINE_API_KEY" | "CREDENTIAL_REF" | undefined;
13625
13698
  credentialConfigured?: boolean | undefined;
@@ -13648,6 +13721,7 @@ export declare const hostedConversationSnapshotSchema: z.ZodEffects<z.ZodObject<
13648
13721
  outputCapabilities: ["TEXT"];
13649
13722
  reasoningEfforts: ("low" | "medium" | "high" | "xhigh" | "max" | "ultra")[];
13650
13723
  hostedWebSearch: boolean;
13724
+ fastMode?: boolean | undefined;
13651
13725
  apiKeyConfigured?: boolean | undefined;
13652
13726
  credentialType?: "INLINE_API_KEY" | "CREDENTIAL_REF" | undefined;
13653
13727
  credentialConfigured?: boolean | undefined;
@@ -24399,13 +24473,13 @@ export declare const terminalDataFrameSchema: z.ZodDiscriminatedUnion<"type", [z
24399
24473
  data: z.ZodString;
24400
24474
  }, "strip", z.ZodTypeAny, {
24401
24475
  type: "output";
24402
- sequence: number;
24403
24476
  terminalId: string;
24477
+ sequence: number;
24404
24478
  data: string;
24405
24479
  }, {
24406
24480
  type: "output";
24407
- sequence: number;
24408
24481
  terminalId: string;
24482
+ sequence: number;
24409
24483
  data: string;
24410
24484
  }>, z.ZodObject<{
24411
24485
  type: z.ZodLiteral<"close">;
@@ -24422,12 +24496,12 @@ export declare const terminalDataFrameSchema: z.ZodDiscriminatedUnion<"type", [z
24422
24496
  exitCode: z.ZodNullable<z.ZodNumber>;
24423
24497
  }, "strip", z.ZodTypeAny, {
24424
24498
  type: "exit";
24425
- exitCode: number | null;
24426
24499
  terminalId: string;
24500
+ exitCode: number | null;
24427
24501
  }, {
24428
24502
  type: "exit";
24429
- exitCode: number | null;
24430
24503
  terminalId: string;
24504
+ exitCode: number | null;
24431
24505
  }>, z.ZodObject<{
24432
24506
  type: z.ZodLiteral<"error">;
24433
24507
  terminalId: z.ZodString;
@@ -24452,30 +24526,30 @@ export declare const terminalAttachTicketSchema: z.ZodEffects<z.ZodObject<{
24452
24526
  }, "strip", z.ZodTypeAny, {
24453
24527
  nodeId: string;
24454
24528
  expiresAt: number;
24529
+ terminalId: string;
24455
24530
  issuedAt: number;
24456
24531
  ticket: string;
24457
- terminalId: string;
24458
24532
  userSessionFingerprint: string;
24459
24533
  }, {
24460
24534
  nodeId: string;
24461
24535
  expiresAt: number;
24536
+ terminalId: string;
24462
24537
  issuedAt: number;
24463
24538
  ticket: string;
24464
- terminalId: string;
24465
24539
  userSessionFingerprint: string;
24466
24540
  }>, {
24467
24541
  nodeId: string;
24468
24542
  expiresAt: number;
24543
+ terminalId: string;
24469
24544
  issuedAt: number;
24470
24545
  ticket: string;
24471
- terminalId: string;
24472
24546
  userSessionFingerprint: string;
24473
24547
  }, {
24474
24548
  nodeId: string;
24475
24549
  expiresAt: number;
24550
+ terminalId: string;
24476
24551
  issuedAt: number;
24477
24552
  ticket: string;
24478
- terminalId: string;
24479
24553
  userSessionFingerprint: string;
24480
24554
  }>;
24481
24555
  export type TerminalAttachTicket = z.infer<typeof terminalAttachTicketSchema>;
@@ -25514,7 +25588,7 @@ export declare const gitHistoryFileSchema: z.ZodObject<{
25514
25588
  previousPath?: string | undefined;
25515
25589
  }>;
25516
25590
  export type GitHistoryFile = z.infer<typeof gitHistoryFileSchema>;
25517
- export declare const workbenchNodeOperationSchema: z.ZodEnum<["workspace.git.settings.get", "workspace.git.settings.update", "node.workbench.capabilities", "runner.usage.status", "runner.usage.read", "workspace.directories.list", "workspace.remove", "workspace.watch", "workspace.unwatch", "session.unwatch", "session.metadata.update", "session.pin.move", "session.rewind", "session.rollback", "session.remove", "workspace.sessions.cleanup", "session.config.update", "session.turns.list", "session.events.read", "session.context.read", "session.command.execute", "runner.command.execute", "runner.profiles.list", "runner.defaults.save", "mar-agent.model.test", "workspace.files.list", "workspace.file.read", "workspace.file.write", "workspace.file.content.read", "workspace.file.direct.metadata", "workspace.files.search", "workspace.files.mutate", "workspace.content.search", "workspace.symbol.prepare", "workspace.symbol.definition", "workspace.files.upload.preflight", "workspace.files.upload.create", "workspace.files.upload.chunk", "workspace.files.upload.status", "workspace.files.upload.complete", "workspace.files.upload.cancel", "workspace.changes.current", "workspace.change.diff", "workspace.change.restore", "workspace.git.refs.list", "workspace.git.history.list", "workspace.git.commit.files", "workspace.git.commit.file.diff", "workspace.git.commit.file.content.read", "workspace.git.commit.file.direct.metadata", "run.image.read", "terminal.open", "terminal.list", "terminal.close", "terminal.attach.authorize", "node.upgrade.request", "node.upgrade.cancel", "node.skills.inspect", "node.skills.install", "node.skills.remove", "workspace.skills.inspect", "workspace.skills.install", "workspace.skills.remove", "workspace.skills.git-exclude-repair", "skill.install.job.get", "node.mcps.inspect", "node.mcps.install", "node.mcps.remove", "workspace.mcps.inspect", "workspace.mcps.install", "workspace.mcps.remove", "conversation.template.source.inspect", "conversation.template.publish", "conversation.template.publish.status", "conversation.template.version.inspect", "conversation.hosting.enable", "conversation.hosting.disable", "conversation.hosting.storage.inspect", "conversation.hosting.cleanup.preview", "conversation.hosting.cleanup.execute", "computer.use.enable", "computer.use.disable", "conversation.hosted.list", "conversation.hosted.create", "conversation.hosted.get", "conversation.hosted.history", "conversation.hosted.watch", "conversation.hosted.unwatch", "conversation.hosted.message", "conversation.hosted.rollback", "conversation.hosted.interrupt", "conversation.hosted.config.update", "conversation.hosted.metadata.update", "conversation.hosted.image.read", "conversation.hosted.files.list", "conversation.hosted.file.read", "conversation.hosted.file.delete", "conversation.hosted.files.upload.preflight", "conversation.hosted.files.upload.create", "conversation.hosted.files.upload.chunk", "conversation.hosted.files.upload.status", "conversation.hosted.files.upload.complete", "conversation.hosted.files.upload.cancel", "conversation.hosted.delete"]>;
25591
+ export declare const workbenchNodeOperationSchema: z.ZodEnum<["workspace.git.settings.get", "workspace.git.settings.update", "node.workbench.capabilities", "runner.usage.status", "runner.usage.read", "workspace.directories.list", "workspace.remove", "workspace.watch", "workspace.unwatch", "session.unwatch", "session.metadata.update", "session.pin.move", "session.rewind", "session.rollback", "session.remove", "workspace.sessions.cleanup", "session.config.update", "session.turns.list", "session.events.read", "session.context.read", "session.command.execute", "runner.command.execute", "runner.profiles.list", "runner.defaults.save", "mar-agent.model.test", "workspace.files.list", "workspace.file.read", "workspace.file.write", "workspace.file.content.read", "workspace.file.direct.metadata", "workspace.files.search", "workspace.files.mutate", "workspace.content.search", "workspace.symbol.prepare", "workspace.symbol.definition", "workspace.files.upload.preflight", "workspace.files.upload.create", "workspace.files.upload.chunk", "workspace.files.upload.status", "workspace.files.upload.complete", "workspace.files.upload.cancel", "workspace.changes.current", "workspace.change.diff", "workspace.change.restore", "workspace.git.refs.list", "workspace.git.history.list", "workspace.git.commit.files", "workspace.git.commit.file.diff", "workspace.git.commit.file.content.read", "workspace.git.commit.file.direct.metadata", "run.image.read", "terminal.open", "terminal.list", "terminal.close", "terminal.attach.authorize", "terminal.direct.preflight", "node.upgrade.request", "node.upgrade.cancel", "node.skills.inspect", "node.skills.install", "node.skills.remove", "workspace.skills.inspect", "workspace.skills.install", "workspace.skills.remove", "workspace.skills.git-exclude-repair", "skill.install.job.get", "node.mcps.inspect", "node.mcps.install", "node.mcps.remove", "workspace.mcps.inspect", "workspace.mcps.install", "workspace.mcps.remove", "conversation.template.source.inspect", "conversation.template.publish", "conversation.template.publish.status", "conversation.template.version.inspect", "conversation.hosting.enable", "conversation.hosting.disable", "conversation.hosting.storage.inspect", "conversation.hosting.cleanup.preview", "conversation.hosting.cleanup.execute", "computer.use.enable", "computer.use.disable", "conversation.hosted.list", "conversation.hosted.create", "conversation.hosted.get", "conversation.hosted.history", "conversation.hosted.watch", "conversation.hosted.unwatch", "conversation.hosted.message", "conversation.hosted.rollback", "conversation.hosted.interrupt", "conversation.hosted.config.update", "conversation.hosted.metadata.update", "conversation.hosted.image.read", "conversation.hosted.files.list", "conversation.hosted.file.read", "conversation.hosted.file.delete", "conversation.hosted.files.upload.preflight", "conversation.hosted.files.upload.create", "conversation.hosted.files.upload.chunk", "conversation.hosted.files.upload.status", "conversation.hosted.files.upload.complete", "conversation.hosted.files.upload.cancel", "conversation.hosted.delete"]>;
25518
25592
  export type WorkbenchNodeOperation = z.infer<typeof workbenchNodeOperationSchema>;
25519
25593
  /**
25520
25594
  * A small, explicit envelope keeps WebSocket messages independently parseable
package/dist/index.js CHANGED
@@ -1,10 +1,12 @@
1
1
  import { z } from 'zod';
2
2
  import { workspaceDirectTransferCapabilitySchema } from './direct-transfer.js';
3
+ import { terminalDirectCapabilitySchema } from './terminal-direct.js';
3
4
  export * from './enterprise.js';
4
5
  export * from './skill.js';
5
6
  export * from './mcp.js';
6
7
  export * from './git-identity.js';
7
8
  export * from './direct-transfer.js';
9
+ export * from './terminal-direct.js';
8
10
  export const healthStatusSchema = z.object({
9
11
  status: z.literal('ok')
10
12
  });
@@ -25,6 +27,7 @@ export const marAgentRuntimeCredentialCapabilitySchema = z
25
27
  .object({
26
28
  apiVersion: z.literal(1),
27
29
  websocket: z.boolean(),
30
+ fastMode: z.boolean().optional(),
28
31
  httpVersions: z
29
32
  .array(runtimeCredentialHttpVersionSchema)
30
33
  .min(1)
@@ -294,7 +297,8 @@ export const nodeCapabilitiesSchema = z
294
297
  conversationHosting: conversationHostingCapabilitySchema.optional(),
295
298
  computerUse: computerUseCapabilitySchema.optional(),
296
299
  marAgentRuntimeCredentials: marAgentRuntimeCredentialCapabilitySchema.optional(),
297
- workspaceDirectTransfer: workspaceDirectTransferCapabilitySchema.optional()
300
+ workspaceDirectTransfer: workspaceDirectTransferCapabilitySchema.optional(),
301
+ terminalDirect: terminalDirectCapabilitySchema.optional()
298
302
  })
299
303
  .superRefine((capabilities, context) => {
300
304
  if (capabilities.platform !== 'linux' &&
@@ -665,6 +669,7 @@ const marAgentModelShape = {
665
669
  titleGeneration: z.boolean().default(false),
666
670
  codeMode: z.boolean().default(false),
667
671
  highDensityCompaction: z.boolean().default(false),
672
+ fastMode: z.boolean().optional(),
668
673
  hostedWebSearch: z.boolean(),
669
674
  responsesTransport: marAgentResponsesTransportSchema.optional(),
670
675
  responsesEncoding: z.enum(['STANDARD', 'LITE']).optional(),
@@ -701,6 +706,8 @@ function refineMarAgentModel(schema) {
701
706
  context.addIssue({ code: 'custom', message: 'Responses continuation requires Responses' });
702
707
  if (value.protocol !== 'OPENAI_RESPONSES' && value.responsesEncoding !== undefined)
703
708
  context.addIssue({ code: 'custom', message: 'Responses encoding requires OpenAI Responses' });
709
+ if (value.protocol !== 'OPENAI_RESPONSES' && value.fastMode === true)
710
+ context.addIssue({ code: 'custom', message: 'Fast mode requires OpenAI Responses' });
704
711
  });
705
712
  }
706
713
  const marAgentModelSummaryShape = {
@@ -729,7 +736,7 @@ export const marAgentRuntimeModelConfigurationSchema = refineMarAgentModel(z
729
736
  credential: marAgentRuntimeCredentialSchema.optional(),
730
737
  imageGeneration: marAgentImageGenerationSchema.optional()
731
738
  })
732
- .strict()).superRefine((configuration, context) => {
739
+ .strip()).superRefine((configuration, context) => {
733
740
  if ((configuration.apiKey === undefined) === (configuration.credential === undefined))
734
741
  context.addIssue({
735
742
  code: 'custom',
@@ -1340,6 +1347,7 @@ export const nodeWorkbenchCapabilitiesSchema = z.object({
1340
1347
  maxSearchResults: z.number().int().positive().max(10000)
1341
1348
  }),
1342
1349
  directTransfer: workspaceDirectTransferCapabilitySchema.optional(),
1350
+ terminalDirect: terminalDirectCapabilitySchema.optional(),
1343
1351
  git: capabilitySchemaWith({
1344
1352
  supportsCurrentChanges: z.boolean(),
1345
1353
  supportsTurnChanges: z.boolean(),
@@ -2615,6 +2623,7 @@ export const workbenchNodeOperationSchema = z.enum([
2615
2623
  'terminal.list',
2616
2624
  'terminal.close',
2617
2625
  'terminal.attach.authorize',
2626
+ 'terminal.direct.preflight',
2618
2627
  'node.upgrade.request',
2619
2628
  'node.upgrade.cancel',
2620
2629
  'node.skills.inspect',
@@ -0,0 +1,248 @@
1
+ import { z } from 'zod';
2
+ export declare const terminalDirectCapabilitySchema: z.ZodObject<{
3
+ apiVersion: z.ZodLiteral<1>;
4
+ transport: z.ZodLiteral<true>;
5
+ }, "strict", z.ZodTypeAny, {
6
+ apiVersion: 1;
7
+ transport: true;
8
+ }, {
9
+ apiVersion: 1;
10
+ transport: true;
11
+ }>;
12
+ export declare const terminalDirectBrowserMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
13
+ type: z.ZodLiteral<"terminal.direct.prepare">;
14
+ requestId: z.ZodString;
15
+ nodeId: z.ZodString;
16
+ nodeGeneration: z.ZodString;
17
+ transportSessionId: z.ZodString;
18
+ terminalId: z.ZodString;
19
+ workspaceId: z.ZodOptional<z.ZodString>;
20
+ afterSequence: z.ZodNumber;
21
+ readonly: z.ZodBoolean;
22
+ takeover: z.ZodBoolean;
23
+ }, "strict", z.ZodTypeAny, {
24
+ type: "terminal.direct.prepare";
25
+ requestId: string;
26
+ nodeId: string;
27
+ nodeGeneration: string;
28
+ transportSessionId: string;
29
+ terminalId: string;
30
+ afterSequence: number;
31
+ readonly: boolean;
32
+ takeover: boolean;
33
+ workspaceId?: string | undefined;
34
+ }, {
35
+ type: "terminal.direct.prepare";
36
+ requestId: string;
37
+ nodeId: string;
38
+ nodeGeneration: string;
39
+ transportSessionId: string;
40
+ terminalId: string;
41
+ afterSequence: number;
42
+ readonly: boolean;
43
+ takeover: boolean;
44
+ workspaceId?: string | undefined;
45
+ }>, z.ZodObject<{
46
+ type: z.ZodLiteral<"terminal.direct.heartbeat">;
47
+ directSessionId: z.ZodString;
48
+ }, "strict", z.ZodTypeAny, {
49
+ type: "terminal.direct.heartbeat";
50
+ directSessionId: string;
51
+ }, {
52
+ type: "terminal.direct.heartbeat";
53
+ directSessionId: string;
54
+ }>, z.ZodObject<{
55
+ type: z.ZodLiteral<"terminal.direct.cancel">;
56
+ directSessionId: z.ZodString;
57
+ }, "strict", z.ZodTypeAny, {
58
+ type: "terminal.direct.cancel";
59
+ directSessionId: string;
60
+ }, {
61
+ type: "terminal.direct.cancel";
62
+ directSessionId: string;
63
+ }>]>;
64
+ export type TerminalDirectBrowserMessage = z.infer<typeof terminalDirectBrowserMessageSchema>;
65
+ export declare const terminalDirectServerMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
66
+ type: z.ZodLiteral<"terminal.direct.prepared">;
67
+ requestId: z.ZodString;
68
+ directSessionId: z.ZodString;
69
+ grant: z.ZodString;
70
+ openExpiresAt: z.ZodNumber;
71
+ expiresAt: z.ZodNumber;
72
+ }, "strict", z.ZodTypeAny, {
73
+ type: "terminal.direct.prepared";
74
+ requestId: string;
75
+ directSessionId: string;
76
+ expiresAt: number;
77
+ grant: string;
78
+ openExpiresAt: number;
79
+ }, {
80
+ type: "terminal.direct.prepared";
81
+ requestId: string;
82
+ directSessionId: string;
83
+ expiresAt: number;
84
+ grant: string;
85
+ openExpiresAt: number;
86
+ }>, z.ZodObject<{
87
+ type: z.ZodLiteral<"terminal.direct.heartbeat">;
88
+ directSessionId: z.ZodString;
89
+ expiresAt: z.ZodNumber;
90
+ }, "strict", z.ZodTypeAny, {
91
+ type: "terminal.direct.heartbeat";
92
+ directSessionId: string;
93
+ expiresAt: number;
94
+ }, {
95
+ type: "terminal.direct.heartbeat";
96
+ directSessionId: string;
97
+ expiresAt: number;
98
+ }>, z.ZodObject<{
99
+ type: z.ZodLiteral<"terminal.direct.closed">;
100
+ directSessionId: z.ZodString;
101
+ code: z.ZodString;
102
+ }, "strict", z.ZodTypeAny, {
103
+ code: string;
104
+ type: "terminal.direct.closed";
105
+ directSessionId: string;
106
+ }, {
107
+ code: string;
108
+ type: "terminal.direct.closed";
109
+ directSessionId: string;
110
+ }>, z.ZodObject<{
111
+ type: z.ZodLiteral<"terminal.direct.error">;
112
+ requestId: z.ZodOptional<z.ZodString>;
113
+ directSessionId: z.ZodOptional<z.ZodString>;
114
+ code: z.ZodString;
115
+ message: z.ZodString;
116
+ }, "strict", z.ZodTypeAny, {
117
+ code: string;
118
+ message: string;
119
+ type: "terminal.direct.error";
120
+ requestId?: string | undefined;
121
+ directSessionId?: string | undefined;
122
+ }, {
123
+ code: string;
124
+ message: string;
125
+ type: "terminal.direct.error";
126
+ requestId?: string | undefined;
127
+ directSessionId?: string | undefined;
128
+ }>]>;
129
+ export type TerminalDirectServerMessage = z.infer<typeof terminalDirectServerMessageSchema>;
130
+ export declare const terminalDirectNodeCommandSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
131
+ type: z.ZodLiteral<"terminal.direct.prepare">;
132
+ directSessionId: z.ZodString;
133
+ transportSessionId: z.ZodString;
134
+ workbenchConnectionId: z.ZodString;
135
+ nodeGeneration: z.ZodString;
136
+ terminalId: z.ZodString;
137
+ workspaceId: z.ZodOptional<z.ZodString>;
138
+ afterSequence: z.ZodNumber;
139
+ readonly: z.ZodBoolean;
140
+ takeover: z.ZodBoolean;
141
+ grant: z.ZodString;
142
+ browserFingerprint: z.ZodString;
143
+ nodeFingerprint: z.ZodString;
144
+ openExpiresAt: z.ZodNumber;
145
+ expiresAt: z.ZodNumber;
146
+ }, "strict", z.ZodTypeAny, {
147
+ type: "terminal.direct.prepare";
148
+ nodeGeneration: string;
149
+ transportSessionId: string;
150
+ directSessionId: string;
151
+ expiresAt: number;
152
+ grant: string;
153
+ openExpiresAt: number;
154
+ workbenchConnectionId: string;
155
+ browserFingerprint: string;
156
+ nodeFingerprint: string;
157
+ terminalId: string;
158
+ afterSequence: number;
159
+ readonly: boolean;
160
+ takeover: boolean;
161
+ workspaceId?: string | undefined;
162
+ }, {
163
+ type: "terminal.direct.prepare";
164
+ nodeGeneration: string;
165
+ transportSessionId: string;
166
+ directSessionId: string;
167
+ expiresAt: number;
168
+ grant: string;
169
+ openExpiresAt: number;
170
+ workbenchConnectionId: string;
171
+ browserFingerprint: string;
172
+ nodeFingerprint: string;
173
+ terminalId: string;
174
+ afterSequence: number;
175
+ readonly: boolean;
176
+ takeover: boolean;
177
+ workspaceId?: string | undefined;
178
+ }>, z.ZodObject<{
179
+ type: z.ZodLiteral<"terminal.direct.heartbeat">;
180
+ directSessionId: z.ZodString;
181
+ expiresAt: z.ZodNumber;
182
+ }, "strict", z.ZodTypeAny, {
183
+ type: "terminal.direct.heartbeat";
184
+ directSessionId: string;
185
+ expiresAt: number;
186
+ }, {
187
+ type: "terminal.direct.heartbeat";
188
+ directSessionId: string;
189
+ expiresAt: number;
190
+ }>, z.ZodObject<{
191
+ type: z.ZodLiteral<"terminal.direct.cancel">;
192
+ directSessionId: z.ZodString;
193
+ code: z.ZodString;
194
+ }, "strict", z.ZodTypeAny, {
195
+ code: string;
196
+ type: "terminal.direct.cancel";
197
+ directSessionId: string;
198
+ }, {
199
+ code: string;
200
+ type: "terminal.direct.cancel";
201
+ directSessionId: string;
202
+ }>]>;
203
+ export type TerminalDirectNodeCommand = z.infer<typeof terminalDirectNodeCommandSchema>;
204
+ export declare const terminalDirectNodeEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
205
+ type: z.ZodLiteral<"terminal.direct.ready">;
206
+ directSessionId: z.ZodString;
207
+ }, "strict", z.ZodTypeAny, {
208
+ type: "terminal.direct.ready";
209
+ directSessionId: string;
210
+ }, {
211
+ type: "terminal.direct.ready";
212
+ directSessionId: string;
213
+ }>, z.ZodObject<{
214
+ type: z.ZodLiteral<"terminal.direct.takeover">;
215
+ directSessionId: z.ZodString;
216
+ }, "strict", z.ZodTypeAny, {
217
+ type: "terminal.direct.takeover";
218
+ directSessionId: string;
219
+ }, {
220
+ type: "terminal.direct.takeover";
221
+ directSessionId: string;
222
+ }>]>;
223
+ export declare const terminalDirectOpenFrameSchema: z.ZodObject<{
224
+ type: z.ZodLiteral<"OPEN">;
225
+ directSessionId: z.ZodString;
226
+ grant: z.ZodString;
227
+ }, "strict", z.ZodTypeAny, {
228
+ type: "OPEN";
229
+ directSessionId: string;
230
+ grant: string;
231
+ }, {
232
+ type: "OPEN";
233
+ directSessionId: string;
234
+ grant: string;
235
+ }>;
236
+ export declare const terminalDirectAttachedFrameSchema: z.ZodObject<{
237
+ type: z.ZodLiteral<"ATTACHED">;
238
+ terminalId: z.ZodString;
239
+ afterSequence: z.ZodNumber;
240
+ }, "strict", z.ZodTypeAny, {
241
+ type: "ATTACHED";
242
+ terminalId: string;
243
+ afterSequence: number;
244
+ }, {
245
+ type: "ATTACHED";
246
+ terminalId: string;
247
+ afterSequence: number;
248
+ }>;
@@ -0,0 +1,103 @@
1
+ import { z } from 'zod';
2
+ const id = z
3
+ .string()
4
+ .min(8)
5
+ .max(128)
6
+ .regex(/^[A-Za-z0-9_-]+$/u);
7
+ const resourceId = z.string().min(1).max(512);
8
+ const expiresAt = z.number().int().positive();
9
+ const code = z.string().regex(/^[A-Z][A-Z0-9_]{0,127}$/u);
10
+ const fingerprint = z.string().regex(/^sha-256(?: [A-F0-9]{2}(?::[A-F0-9]{2}){31})$/u);
11
+ export const terminalDirectCapabilitySchema = z
12
+ .object({ apiVersion: z.literal(1), transport: z.literal(true) })
13
+ .strict();
14
+ export const terminalDirectBrowserMessageSchema = z.discriminatedUnion('type', [
15
+ z
16
+ .object({
17
+ type: z.literal('terminal.direct.prepare'),
18
+ requestId: id,
19
+ nodeId: resourceId,
20
+ nodeGeneration: id,
21
+ transportSessionId: id,
22
+ terminalId: resourceId,
23
+ workspaceId: resourceId.optional(),
24
+ afterSequence: z.number().int().nonnegative(),
25
+ readonly: z.boolean(),
26
+ takeover: z.boolean()
27
+ })
28
+ .strict(),
29
+ z.object({ type: z.literal('terminal.direct.heartbeat'), directSessionId: id }).strict(),
30
+ z.object({ type: z.literal('terminal.direct.cancel'), directSessionId: id }).strict()
31
+ ]);
32
+ export const terminalDirectServerMessageSchema = z.discriminatedUnion('type', [
33
+ z
34
+ .object({
35
+ type: z.literal('terminal.direct.prepared'),
36
+ requestId: id,
37
+ directSessionId: id,
38
+ grant: z.string().min(32).max(4096),
39
+ openExpiresAt: expiresAt,
40
+ expiresAt
41
+ })
42
+ .strict(),
43
+ z
44
+ .object({
45
+ type: z.literal('terminal.direct.heartbeat'),
46
+ directSessionId: id,
47
+ expiresAt
48
+ })
49
+ .strict(),
50
+ z.object({ type: z.literal('terminal.direct.closed'), directSessionId: id, code }).strict(),
51
+ z
52
+ .object({
53
+ type: z.literal('terminal.direct.error'),
54
+ requestId: id.optional(),
55
+ directSessionId: id.optional(),
56
+ code,
57
+ message: z.string().min(1).max(1000)
58
+ })
59
+ .strict()
60
+ ]);
61
+ export const terminalDirectNodeCommandSchema = z.discriminatedUnion('type', [
62
+ z
63
+ .object({
64
+ type: z.literal('terminal.direct.prepare'),
65
+ directSessionId: id,
66
+ transportSessionId: id,
67
+ workbenchConnectionId: id,
68
+ nodeGeneration: id,
69
+ terminalId: resourceId,
70
+ workspaceId: resourceId.optional(),
71
+ afterSequence: z.number().int().nonnegative(),
72
+ readonly: z.boolean(),
73
+ takeover: z.boolean(),
74
+ grant: z.string().min(32).max(4096),
75
+ browserFingerprint: fingerprint,
76
+ nodeFingerprint: fingerprint,
77
+ openExpiresAt: expiresAt,
78
+ expiresAt
79
+ })
80
+ .strict(),
81
+ z
82
+ .object({ type: z.literal('terminal.direct.heartbeat'), directSessionId: id, expiresAt })
83
+ .strict(),
84
+ z.object({ type: z.literal('terminal.direct.cancel'), directSessionId: id, code }).strict()
85
+ ]);
86
+ export const terminalDirectNodeEventSchema = z.discriminatedUnion('type', [
87
+ z.object({ type: z.literal('terminal.direct.ready'), directSessionId: id }).strict(),
88
+ z.object({ type: z.literal('terminal.direct.takeover'), directSessionId: id }).strict()
89
+ ]);
90
+ export const terminalDirectOpenFrameSchema = z
91
+ .object({
92
+ type: z.literal('OPEN'),
93
+ directSessionId: id,
94
+ grant: z.string().min(32).max(4096)
95
+ })
96
+ .strict();
97
+ export const terminalDirectAttachedFrameSchema = z
98
+ .object({
99
+ type: z.literal('ATTACHED'),
100
+ terminalId: resourceId,
101
+ afterSequence: z.number().int().nonnegative()
102
+ })
103
+ .strict();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myagentroam/protocol",
3
- "version": "0.9.107",
3
+ "version": "0.9.109",
4
4
  "description": "Shared runtime protocol schemas for MyAgentRoam.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",