@nylorun/core 0.15.0-beta → 0.17.0-beta

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.
@@ -470,46 +470,71 @@ export declare const CreateVaultRequestSchema: z.ZodObject<{
470
470
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
471
471
  }, z.core.$strict>;
472
472
  export type CreateVaultRequest = z.infer<typeof CreateVaultRequestSchema>;
473
+ /**
474
+ * `via` (R2b C2, Q11): where this installation reaches the credential's server, such as a
475
+ * gateway's endpoint for it. An absolute `https` URL (`http` only to a loopback host), with no
476
+ * userinfo, query string or fragment. Credentials are still matched by the URL the manifest
477
+ * names; `via` changes only where the request goes.
478
+ */
479
+ export declare const CredentialViaSchema: z.ZodString;
480
+ /**
481
+ * The identity header (R2b C2, Q1–Q3): each request carries the session owner's subject in
482
+ * `header`, for a gateway that keeps each person's accounts. A session with no person as its
483
+ * owner (the reserved `installation`) sends none.
484
+ */
485
+ export declare const CredentialIdentitySchema: z.ZodObject<{
486
+ header: z.ZodString;
487
+ }, z.core.$strict>;
488
+ export type CredentialIdentity = z.infer<typeof CredentialIdentitySchema>;
489
+ /**
490
+ * A credential for the server at `url` (the URL a manifest names): `bearer` sends
491
+ * `Authorization: Bearer <token>`, `headers` its header map (R2b C2). The header names may not be
492
+ * the MCP transport's headers or `Nylorun-*`.
493
+ */
473
494
  export declare const CreateCredentialRequestSchema: z.ZodObject<{
474
495
  requestId: z.ZodString;
475
496
  idempotencyKey: z.ZodString;
476
497
  name: z.ZodString;
477
498
  auth: z.ZodDiscriminatedUnion<[z.ZodObject<{
499
+ via: z.ZodOptional<z.ZodString>;
500
+ identity: z.ZodOptional<z.ZodObject<{
501
+ header: z.ZodString;
502
+ }, z.core.$strict>>;
478
503
  type: z.ZodLiteral<"bearer">;
479
504
  url: z.ZodString;
480
505
  token: z.ZodString;
481
506
  }, z.core.$strict>, z.ZodObject<{
482
- type: z.ZodLiteral<"oauth">;
483
- url: z.ZodString;
484
- accessToken: z.ZodString;
485
- expiresAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
486
- refresh: z.ZodOptional<z.ZodObject<{
487
- tokenEndpoint: z.ZodString;
488
- clientId: z.ZodString;
489
- refreshToken: z.ZodString;
490
- tokenEndpointAuth: z.ZodDiscriminatedUnion<[z.ZodObject<{
491
- type: z.ZodLiteral<"none">;
492
- }, z.core.$strict>, z.ZodObject<{
493
- type: z.ZodLiteral<"client_secret_basic">;
494
- clientSecret: z.ZodString;
495
- }, z.core.$strict>, z.ZodObject<{
496
- type: z.ZodLiteral<"client_secret_post">;
497
- clientSecret: z.ZodString;
498
- }, z.core.$strict>], "type">;
507
+ via: z.ZodOptional<z.ZodString>;
508
+ identity: z.ZodOptional<z.ZodObject<{
509
+ header: z.ZodString;
499
510
  }, z.core.$strict>>;
511
+ type: z.ZodLiteral<"headers">;
512
+ url: z.ZodString;
513
+ headers: z.ZodRecord<z.ZodString, z.ZodString>;
500
514
  }, z.core.$strict>], "type">;
501
515
  }, z.core.$strict>;
502
516
  export type CreateCredentialRequest = z.infer<typeof CreateCredentialRequestSchema>;
517
+ /**
518
+ * Replaces a credential's secret; its type and URL stay. `via` and `identity` are kept unless
519
+ * given (`null` removes one).
520
+ */
503
521
  export declare const RotateCredentialRequestSchema: z.ZodObject<{
504
522
  requestId: z.ZodString;
505
523
  idempotencyKey: z.ZodString;
506
524
  auth: z.ZodDiscriminatedUnion<[z.ZodObject<{
525
+ via: z.ZodOptional<z.ZodNullable<z.ZodString>>;
526
+ identity: z.ZodOptional<z.ZodNullable<z.ZodObject<{
527
+ header: z.ZodString;
528
+ }, z.core.$strict>>>;
507
529
  type: z.ZodLiteral<"bearer">;
508
530
  token: z.ZodString;
509
531
  }, z.core.$strict>, z.ZodObject<{
510
- type: z.ZodLiteral<"oauth">;
511
- accessToken: z.ZodString;
512
- expiresAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
532
+ via: z.ZodOptional<z.ZodNullable<z.ZodString>>;
533
+ identity: z.ZodOptional<z.ZodNullable<z.ZodObject<{
534
+ header: z.ZodString;
535
+ }, z.core.$strict>>>;
536
+ type: z.ZodLiteral<"headers">;
537
+ headers: z.ZodRecord<z.ZodString, z.ZodString>;
513
538
  }, z.core.$strict>], "type">;
514
539
  }, z.core.$strict>;
515
540
  export type RotateCredentialRequest = z.infer<typeof RotateCredentialRequestSchema>;
@@ -582,16 +607,80 @@ export declare const CredentialInfoSchema: z.ZodObject<{
582
607
  name: z.ZodString;
583
608
  type: z.ZodEnum<{
584
609
  bearer: "bearer";
585
- oauth: "oauth";
610
+ headers: "headers";
586
611
  }>;
587
612
  binding: z.ZodObject<{
588
613
  url: z.ZodString;
589
614
  }, z.core.$strict>;
590
- expiresAt: z.ZodOptional<z.ZodString>;
615
+ headerNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
616
+ via: z.ZodOptional<z.ZodString>;
617
+ identity: z.ZodOptional<z.ZodObject<{
618
+ header: z.ZodString;
619
+ }, z.core.$strict>>;
591
620
  createdAt: z.ZodString;
592
621
  rotatedAt: z.ZodOptional<z.ZodString>;
593
622
  }, z.core.$strict>;
594
623
  export type CredentialInfo = z.infer<typeof CredentialInfoSchema>;
624
+ /** The MCP transports a preview speaks: a manifest's remote server types. */
625
+ export declare const MCP_PREVIEW_TYPES: readonly ["streamable-http", "sse"];
626
+ /**
627
+ * `POST /v1/tenant/mcp/preview` (R2b C12): what a remote MCP server offers, before an agent
628
+ * names it. The Runtime connects with the installation vault's credential for `url` (one
629
+ * credential across the installation vaults, or the one in `vaultId`), lists the tools and
630
+ * closes the connection; it never calls a tool.
631
+ */
632
+ export declare const McpPreviewRequestSchema: z.ZodObject<{
633
+ requestId: z.ZodOptional<z.ZodString>;
634
+ url: z.ZodString;
635
+ type: z.ZodOptional<z.ZodEnum<{
636
+ sse: "sse";
637
+ "streamable-http": "streamable-http";
638
+ }>>;
639
+ name: z.ZodOptional<z.ZodString>;
640
+ vaultId: z.ZodOptional<z.ZodString>;
641
+ }, z.core.$strict>;
642
+ export type McpPreviewRequest = z.infer<typeof McpPreviewRequestSchema>;
643
+ /** One tool a preview found. */
644
+ export declare const McpPreviewToolSchema: z.ZodObject<{
645
+ serverToolName: z.ZodString;
646
+ modelName: z.ZodOptional<z.ZodString>;
647
+ description: z.ZodOptional<z.ZodString>;
648
+ annotations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
649
+ schemaBytes: z.ZodNumber;
650
+ }, z.core.$strict>;
651
+ export type McpPreviewTool = z.infer<typeof McpPreviewToolSchema>;
652
+ /**
653
+ * A preview (R2b C12). A server that answered `401` is `authRequired`, with its RFC 9728
654
+ * protected-resource metadata when it publishes any: it needs a person's sign-in or a key the
655
+ * installation vaults do not hold, so reach it with a key or through a gateway (`via`).
656
+ */
657
+ export declare const McpPreviewSchema: z.ZodObject<{
658
+ name: z.ZodString;
659
+ url: z.ZodString;
660
+ type: z.ZodEnum<{
661
+ sse: "sse";
662
+ "streamable-http": "streamable-http";
663
+ }>;
664
+ credentialSent: z.ZodBoolean;
665
+ serverInfo: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
666
+ instructions: z.ZodOptional<z.ZodString>;
667
+ tools: z.ZodArray<z.ZodObject<{
668
+ serverToolName: z.ZodString;
669
+ modelName: z.ZodOptional<z.ZodString>;
670
+ description: z.ZodOptional<z.ZodString>;
671
+ annotations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
672
+ schemaBytes: z.ZodNumber;
673
+ }, z.core.$strict>>;
674
+ renamed: z.ZodArray<z.ZodObject<{
675
+ serverToolName: z.ZodString;
676
+ name: z.ZodString;
677
+ }, z.core.$strict>>;
678
+ authRequired: z.ZodOptional<z.ZodObject<{
679
+ resourceMetadataUrl: z.ZodOptional<z.ZodString>;
680
+ resourceMetadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
681
+ }, z.core.$strict>>;
682
+ }, z.core.$strict>;
683
+ export type McpPreview = z.infer<typeof McpPreviewSchema>;
595
684
  /** The most parts one message may carry (protocol 6). */
596
685
  export declare const MAX_MESSAGE_PARTS = 32;
597
686
  /**
@@ -748,7 +837,7 @@ export declare const EventSourceKindSchema: z.ZodEnum<{
748
837
  loop: "loop";
749
838
  "model-gate": "model-gate";
750
839
  operator: "operator";
751
- sandboxd: "sandboxd";
840
+ sandboxes: "sandboxes";
752
841
  supervisor: "supervisor";
753
842
  "tool-gate": "tool-gate";
754
843
  }>;
@@ -799,7 +888,7 @@ declare const eventEnvelope: {
799
888
  loop: "loop";
800
889
  "model-gate": "model-gate";
801
890
  operator: "operator";
802
- sandboxd: "sandboxd";
891
+ sandboxes: "sandboxes";
803
892
  supervisor: "supervisor";
804
893
  "tool-gate": "tool-gate";
805
894
  }>;
@@ -857,7 +946,7 @@ export declare const LiveEventSchema: z.ZodObject<{
857
946
  loop: "loop";
858
947
  "model-gate": "model-gate";
859
948
  operator: "operator";
860
- sandboxd: "sandboxd";
949
+ sandboxes: "sandboxes";
861
950
  supervisor: "supervisor";
862
951
  "tool-gate": "tool-gate";
863
952
  }>;
@@ -900,6 +989,9 @@ export declare const RejectedResponseSchema: z.ZodObject<{
900
989
  status: z.ZodLiteral<"rejected">;
901
990
  code: z.ZodEnum<{
902
991
  connection_missing: "connection_missing";
992
+ credential_invalid: "credential_invalid";
993
+ credential_rejected: "credential_rejected";
994
+ credential_required: "credential_required";
903
995
  definition_files_missing: "definition_files_missing";
904
996
  host_rejected: "host_rejected";
905
997
  incompatible_host: "incompatible_host";
@@ -908,10 +1000,8 @@ export declare const RejectedResponseSchema: z.ZodObject<{
908
1000
  issuer_unavailable: "issuer_unavailable";
909
1001
  key_role_mismatch: "key_role_mismatch";
910
1002
  limit_exceeded: "limit_exceeded";
1003
+ mcp_preview_failed: "mcp_preview_failed";
911
1004
  not_found: "not_found";
912
- oauth_client_required: "oauth_client_required";
913
- oauth_failed: "oauth_failed";
914
- oauth_state_invalid: "oauth_state_invalid";
915
1005
  origin_rejected: "origin_rejected";
916
1006
  placement_refused: "placement_refused";
917
1007
  protocol_unsupported: "protocol_unsupported";
@@ -1011,7 +1101,14 @@ export declare const ToolCompletedPayloadSchema: z.ZodObject<{
1011
1101
  error: z.ZodOptional<z.ZodObject<{
1012
1102
  code: z.ZodString;
1013
1103
  message: z.ZodString;
1104
+ server: z.ZodOptional<z.ZodString>;
1105
+ vault: z.ZodOptional<z.ZodEnum<{
1106
+ installation: "installation";
1107
+ user: "user";
1108
+ }>>;
1109
+ retryable: z.ZodOptional<z.ZodBoolean>;
1014
1110
  }, z.core.$loose>>;
1111
+ redacted: z.ZodOptional<z.ZodNumber>;
1015
1112
  }, z.core.$loose>;
1016
1113
  export declare const EffectUncertainPayloadSchema: z.ZodObject<{
1017
1114
  effectId: z.ZodString;
@@ -1111,7 +1208,14 @@ declare const TRANSCRIPT_PAYLOADS: {
1111
1208
  error: z.ZodOptional<z.ZodObject<{
1112
1209
  code: z.ZodString;
1113
1210
  message: z.ZodString;
1211
+ server: z.ZodOptional<z.ZodString>;
1212
+ vault: z.ZodOptional<z.ZodEnum<{
1213
+ installation: "installation";
1214
+ user: "user";
1215
+ }>>;
1216
+ retryable: z.ZodOptional<z.ZodBoolean>;
1114
1217
  }, z.core.$loose>>;
1218
+ redacted: z.ZodOptional<z.ZodNumber>;
1115
1219
  }, z.core.$loose>;
1116
1220
  readonly "effect.uncertain": z.ZodObject<{
1117
1221
  effectId: z.ZodString;
@@ -1361,7 +1465,14 @@ export declare const McpServerOutcomeSchema: z.ZodObject<{
1361
1465
  }>;
1362
1466
  message: z.ZodString;
1363
1467
  tools: z.ZodNumber;
1468
+ deferred: z.ZodOptional<z.ZodNumber>;
1469
+ disabled: z.ZodOptional<z.ZodNumber>;
1470
+ unknownTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
1364
1471
  credentialIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1472
+ renamed: z.ZodOptional<z.ZodArray<z.ZodObject<{
1473
+ serverToolName: z.ZodString;
1474
+ name: z.ZodString;
1475
+ }, z.core.$loose>>>;
1365
1476
  }, z.core.$loose>;
1366
1477
  export type McpServerOutcome = z.infer<typeof McpServerOutcomeSchema>;
1367
1478
  /**
@@ -1381,7 +1492,14 @@ export declare const McpDiscoveredPayloadSchema: z.ZodObject<{
1381
1492
  }>;
1382
1493
  message: z.ZodString;
1383
1494
  tools: z.ZodNumber;
1495
+ deferred: z.ZodOptional<z.ZodNumber>;
1496
+ disabled: z.ZodOptional<z.ZodNumber>;
1497
+ unknownTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
1384
1498
  credentialIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1499
+ renamed: z.ZodOptional<z.ZodArray<z.ZodObject<{
1500
+ serverToolName: z.ZodString;
1501
+ name: z.ZodString;
1502
+ }, z.core.$loose>>>;
1385
1503
  }, z.core.$loose>>;
1386
1504
  }, z.core.$loose>;
1387
1505
  /**
@@ -1549,7 +1667,14 @@ export declare const EVENT_CATALOG: {
1549
1667
  error: z.ZodOptional<z.ZodObject<{
1550
1668
  code: z.ZodString;
1551
1669
  message: z.ZodString;
1670
+ server: z.ZodOptional<z.ZodString>;
1671
+ vault: z.ZodOptional<z.ZodEnum<{
1672
+ installation: "installation";
1673
+ user: "user";
1674
+ }>>;
1675
+ retryable: z.ZodOptional<z.ZodBoolean>;
1552
1676
  }, z.core.$loose>>;
1677
+ redacted: z.ZodOptional<z.ZodNumber>;
1553
1678
  }, z.core.$loose>;
1554
1679
  readonly source: "loop";
1555
1680
  readonly version: 1;
@@ -1599,7 +1724,14 @@ export declare const EVENT_CATALOG: {
1599
1724
  }>;
1600
1725
  message: z.ZodString;
1601
1726
  tools: z.ZodNumber;
1727
+ deferred: z.ZodOptional<z.ZodNumber>;
1728
+ disabled: z.ZodOptional<z.ZodNumber>;
1729
+ unknownTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
1602
1730
  credentialIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1731
+ renamed: z.ZodOptional<z.ZodArray<z.ZodObject<{
1732
+ serverToolName: z.ZodString;
1733
+ name: z.ZodString;
1734
+ }, z.core.$loose>>>;
1603
1735
  }, z.core.$loose>>;
1604
1736
  }, z.core.$loose>;
1605
1737
  readonly source: "loop";
@@ -2447,6 +2579,7 @@ export declare const SessionViewSchema: z.ZodObject<{
2447
2579
  agentId: z.ZodString;
2448
2580
  ownerUserId: z.ZodString;
2449
2581
  manifestHash: z.ZodString;
2582
+ definitionHash: z.ZodOptional<z.ZodString>;
2450
2583
  implementationVersion: z.ZodString;
2451
2584
  status: z.ZodEnum<{
2452
2585
  cancelled: "cancelled";
@@ -2786,35 +2919,21 @@ export declare const ListCredentialsResponseSchema: z.ZodObject<{
2786
2919
  name: z.ZodString;
2787
2920
  type: z.ZodEnum<{
2788
2921
  bearer: "bearer";
2789
- oauth: "oauth";
2922
+ headers: "headers";
2790
2923
  }>;
2791
2924
  binding: z.ZodObject<{
2792
2925
  url: z.ZodString;
2793
2926
  }, z.core.$strict>;
2794
- expiresAt: z.ZodOptional<z.ZodString>;
2927
+ headerNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
2928
+ via: z.ZodOptional<z.ZodString>;
2929
+ identity: z.ZodOptional<z.ZodObject<{
2930
+ header: z.ZodString;
2931
+ }, z.core.$strict>>;
2795
2932
  createdAt: z.ZodString;
2796
2933
  rotatedAt: z.ZodOptional<z.ZodString>;
2797
2934
  }, z.core.$strict>>;
2798
2935
  }, z.core.$strict>;
2799
2936
  export type ListCredentialsResponse = z.infer<typeof ListCredentialsResponseSchema>;
2800
- /**
2801
- * `POST /v1/vaults/{vaultId}/oauth/start` (F9 C2): sign the installation in to the remote MCP
2802
- * server at `url`, declared as `server`, and store its OAuth credential in the installation vault.
2803
- * `clientId` names a client registered with the authorization server; without one the Runtime
2804
- * registers itself (RFC 7591) when the server allows it.
2805
- */
2806
- export declare const StartOAuthRequestSchema: z.ZodObject<{
2807
- url: z.ZodString;
2808
- server: z.ZodString;
2809
- clientId: z.ZodOptional<z.ZodString>;
2810
- }, z.core.$strict>;
2811
- export type StartOAuthRequest = z.infer<typeof StartOAuthRequestSchema>;
2812
- /** Where to send the browser, and until when the sign-in can finish. */
2813
- export declare const StartOAuthResponseSchema: z.ZodObject<{
2814
- authorizeUrl: z.ZodString;
2815
- expiresAt: z.ZodString;
2816
- }, z.core.$strict>;
2817
- export type StartOAuthResponse = z.infer<typeof StartOAuthResponseSchema>;
2818
2937
  /** A deleted vault or credential. */
2819
2938
  export declare const DeletedResponseSchema: z.ZodObject<{
2820
2939
  id: z.ZodString;
@@ -2836,6 +2955,9 @@ export type StreamClosedFrame = z.infer<typeof StreamClosedFrameSchema>;
2836
2955
  */
2837
2956
  export declare const AgUiRunErrorCodeSchema: z.ZodEnum<{
2838
2957
  connection_missing: "connection_missing";
2958
+ credential_invalid: "credential_invalid";
2959
+ credential_rejected: "credential_rejected";
2960
+ credential_required: "credential_required";
2839
2961
  definition_files_missing: "definition_files_missing";
2840
2962
  host_rejected: "host_rejected";
2841
2963
  incompatible_host: "incompatible_host";
@@ -2844,10 +2966,8 @@ export declare const AgUiRunErrorCodeSchema: z.ZodEnum<{
2844
2966
  issuer_unavailable: "issuer_unavailable";
2845
2967
  key_role_mismatch: "key_role_mismatch";
2846
2968
  limit_exceeded: "limit_exceeded";
2969
+ mcp_preview_failed: "mcp_preview_failed";
2847
2970
  not_found: "not_found";
2848
- oauth_client_required: "oauth_client_required";
2849
- oauth_failed: "oauth_failed";
2850
- oauth_state_invalid: "oauth_state_invalid";
2851
2971
  origin_rejected: "origin_rejected";
2852
2972
  placement_refused: "placement_refused";
2853
2973
  protocol_unsupported: "protocol_unsupported";