@nylorun/core 0.12.0-beta → 0.13.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.
- package/CHANGELOG.md +45 -0
- package/dist/compatibility.d.ts +47 -37
- package/dist/compatibility.js +48 -52
- package/dist/contracts.d.ts +132 -228
- package/dist/contracts.js +147 -190
- package/package.json +1 -1
package/dist/contracts.d.ts
CHANGED
|
@@ -44,10 +44,10 @@ export declare const SandboxInlineRequestSchema: z.ZodObject<{
|
|
|
44
44
|
export type SandboxInlineRequest = z.infer<typeof SandboxInlineRequestSchema>;
|
|
45
45
|
export declare const SANDBOX_ID_MAX_LENGTH = 200;
|
|
46
46
|
export declare function isSandboxId(value: unknown): value is string;
|
|
47
|
-
/**
|
|
47
|
+
/** A sandbox grant: an exact sandbox id, or a prefix ending in `/*` (`team-a/*`). */
|
|
48
48
|
export declare function isSandboxGrant(value: unknown): value is string;
|
|
49
49
|
/**
|
|
50
|
-
* Whether `grants` (a
|
|
50
|
+
* Whether `grants` (a token caller's sandbox grants) reach sandbox `id`: an exact entry, or a prefix
|
|
51
51
|
* entry `p/*` for any id below `p/`. No grants reach no sandbox.
|
|
52
52
|
*/
|
|
53
53
|
export declare function sandboxGranted(grants: readonly string[] | undefined, id: string): boolean;
|
|
@@ -456,11 +456,17 @@ export declare const PutTenantSandboxRequestSchema: z.ZodObject<{
|
|
|
456
456
|
}, z.core.$strict>;
|
|
457
457
|
export type PutTenantSandboxRequest = z.infer<typeof PutTenantSandboxRequestSchema>;
|
|
458
458
|
export type PutSessionRequest = z.infer<typeof PutSessionRequestSchema>;
|
|
459
|
+
/** The owner of every installation vault (`scope: "installation"`); a reserved subject. */
|
|
460
|
+
export declare const INSTALLATION_OWNER = "installation";
|
|
459
461
|
export declare const CreateVaultRequestSchema: z.ZodObject<{
|
|
460
462
|
requestId: z.ZodString;
|
|
461
463
|
idempotencyKey: z.ZodString;
|
|
462
464
|
name: z.ZodString;
|
|
463
|
-
|
|
465
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
466
|
+
installation: "installation";
|
|
467
|
+
user: "user";
|
|
468
|
+
}>>;
|
|
469
|
+
ownerUserId: z.ZodOptional<z.ZodString>;
|
|
464
470
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
465
471
|
}, z.core.$strict>;
|
|
466
472
|
export type CreateVaultRequest = z.infer<typeof CreateVaultRequestSchema>;
|
|
@@ -897,8 +903,12 @@ export declare const RejectedResponseSchema: z.ZodObject<{
|
|
|
897
903
|
incompatible_host: "incompatible_host";
|
|
898
904
|
internal_error: "internal_error";
|
|
899
905
|
invalid_request: "invalid_request";
|
|
906
|
+
issuer_unavailable: "issuer_unavailable";
|
|
900
907
|
limit_exceeded: "limit_exceeded";
|
|
901
908
|
not_found: "not_found";
|
|
909
|
+
oauth_client_required: "oauth_client_required";
|
|
910
|
+
oauth_failed: "oauth_failed";
|
|
911
|
+
oauth_state_invalid: "oauth_state_invalid";
|
|
902
912
|
origin_rejected: "origin_rejected";
|
|
903
913
|
placement_refused: "placement_refused";
|
|
904
914
|
protocol_unsupported: "protocol_unsupported";
|
|
@@ -2380,6 +2390,40 @@ export declare const AdminStatusSchema: z.ZodObject<{
|
|
|
2380
2390
|
}, z.core.$strict>>;
|
|
2381
2391
|
}, z.core.$strict>;
|
|
2382
2392
|
export type AdminStatus = z.infer<typeof AdminStatusSchema>;
|
|
2393
|
+
/**
|
|
2394
|
+
* An operator key (Host feature `operator-keys`): a revocable application key of the Tenant,
|
|
2395
|
+
* named by its id (`APPLICATION_KEY_ID_PATTERN`). The Runtime keeps only its hash.
|
|
2396
|
+
*/
|
|
2397
|
+
export declare const OperatorKeySchema: z.ZodObject<{
|
|
2398
|
+
id: z.ZodString;
|
|
2399
|
+
role: z.ZodString;
|
|
2400
|
+
createdAt: z.ZodString;
|
|
2401
|
+
}, z.core.$strict>;
|
|
2402
|
+
export type OperatorKey = z.infer<typeof OperatorKeySchema>;
|
|
2403
|
+
/** `GET /v1/admin/keys`: every key of the Tenant (Studio's and derived ones too), by id. */
|
|
2404
|
+
export declare const ListOperatorKeysResponseSchema: z.ZodObject<{
|
|
2405
|
+
keys: z.ZodArray<z.ZodObject<{
|
|
2406
|
+
id: z.ZodString;
|
|
2407
|
+
role: z.ZodString;
|
|
2408
|
+
createdAt: z.ZodString;
|
|
2409
|
+
}, z.core.$strict>>;
|
|
2410
|
+
}, z.core.$strict>;
|
|
2411
|
+
export type ListOperatorKeysResponse = z.infer<typeof ListOperatorKeysResponseSchema>;
|
|
2412
|
+
/** `PUT /v1/admin/keys/{id}`: the new key, shown this once; `rotated` when it replaced one. */
|
|
2413
|
+
export declare const PutOperatorKeyResponseSchema: z.ZodObject<{
|
|
2414
|
+
id: z.ZodString;
|
|
2415
|
+
role: z.ZodString;
|
|
2416
|
+
createdAt: z.ZodString;
|
|
2417
|
+
key: z.ZodString;
|
|
2418
|
+
rotated: z.ZodBoolean;
|
|
2419
|
+
}, z.core.$strict>;
|
|
2420
|
+
export type PutOperatorKeyResponse = z.infer<typeof PutOperatorKeyResponseSchema>;
|
|
2421
|
+
/** `DELETE /v1/admin/keys/{id}`: the key no longer authenticates. */
|
|
2422
|
+
export declare const DeleteOperatorKeyResponseSchema: z.ZodObject<{
|
|
2423
|
+
id: z.ZodString;
|
|
2424
|
+
deleted: z.ZodLiteral<true>;
|
|
2425
|
+
}, z.core.$strict>;
|
|
2426
|
+
export type DeleteOperatorKeyResponse = z.infer<typeof DeleteOperatorKeyResponseSchema>;
|
|
2383
2427
|
/**
|
|
2384
2428
|
* `.nylorun/link.json`: the installation a Project uses. Format 3 names the local `tenant`
|
|
2385
2429
|
* that `nylorun start` created or attached; `tenantId` is information only, since nothing in a
|
|
@@ -2599,11 +2643,12 @@ export declare const ResetTenantRequestSchema: z.ZodObject<{
|
|
|
2599
2643
|
export type ResetTenantRequest = z.infer<typeof ResetTenantRequestSchema>;
|
|
2600
2644
|
/**
|
|
2601
2645
|
* Acting for a subject (Host feature `subject-headers`): what an application principal may
|
|
2602
|
-
* narrow a request to. `sessions:own`
|
|
2603
|
-
*
|
|
2604
|
-
*
|
|
2646
|
+
* narrow a request to. `sessions:own` reaches only the subject's own sessions; the others reach
|
|
2647
|
+
* Tenant-wide resources. `sandboxes:write` creates and deletes sandboxes (Host feature
|
|
2648
|
+
* `sandboxes`); a token caller's reach only the ids its sandbox grants name. Vaults are the
|
|
2649
|
+
* installation's, managed by application keys acting for no one (protocol 7).
|
|
2605
2650
|
*/
|
|
2606
|
-
export declare const SUBJECT_SCOPES: readonly ["agents:read", "agents:write", "sessions:own", "
|
|
2651
|
+
export declare const SUBJECT_SCOPES: readonly ["agents:read", "agents:write", "sessions:own", "tenant:settings", "sandboxes:write"];
|
|
2607
2652
|
export type SubjectScope = (typeof SUBJECT_SCOPES)[number];
|
|
2608
2653
|
/** A valid subject: 1–200 visible ASCII characters, not reserved by the Runtime. */
|
|
2609
2654
|
export declare function isSubject(value: unknown): value is string;
|
|
@@ -2619,130 +2664,25 @@ export declare function parseSubjectHeaders(subject: string, scopes: string | un
|
|
|
2619
2664
|
ok: false;
|
|
2620
2665
|
message: string;
|
|
2621
2666
|
};
|
|
2622
|
-
/**
|
|
2623
|
-
|
|
2624
|
-
|
|
2667
|
+
/**
|
|
2668
|
+
* Scopes a token caller (a trusted issuer's token) may carry: never `agents:write` or
|
|
2669
|
+
* `tenant:settings`.
|
|
2670
|
+
*/
|
|
2671
|
+
export declare const TOKEN_SCOPES: readonly ["agents:read", "sessions:own", "sandboxes:write"];
|
|
2672
|
+
/** The most sandbox grants one token caller carries. */
|
|
2625
2673
|
export declare const TOKEN_SANDBOX_GRANTS_MAX = 16;
|
|
2626
2674
|
export type TokenScope = (typeof TOKEN_SCOPES)[number];
|
|
2627
|
-
/**
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
export declare function subjectTokenIssuer(tenantId: string): string;
|
|
2633
|
-
/** Token lifetimes, in seconds. */
|
|
2634
|
-
export declare const TOKEN_TTL_MIN_SECONDS = 60;
|
|
2675
|
+
/**
|
|
2676
|
+
* The longest a token the Runtime signs itself lives, in seconds (delivery tokens, capability
|
|
2677
|
+
* links): rotating signing keys revokes the previous key once the longest token it may have
|
|
2678
|
+
* signed has expired.
|
|
2679
|
+
*/
|
|
2635
2680
|
export declare const TOKEN_TTL_MAX_SECONDS = 900;
|
|
2636
|
-
export declare const TOKEN_TTL_DEFAULT_SECONDS = 600;
|
|
2637
|
-
/** A role's name in the access policy; `anon` is reserved for publishable keys. */
|
|
2638
|
-
export declare const ROLE_NAME_PATTERN: RegExp;
|
|
2639
|
-
export declare const RoleLimitsSchema: z.ZodObject<{
|
|
2640
|
-
turnsPerHour: z.ZodOptional<z.ZodNumber>;
|
|
2641
|
-
concurrentTurns: z.ZodOptional<z.ZodNumber>;
|
|
2642
|
-
}, z.core.$strict>;
|
|
2643
|
-
export type RoleLimits = z.infer<typeof RoleLimitsSchema>;
|
|
2644
|
-
export declare const AccessRoleSchema: z.ZodObject<{
|
|
2645
|
-
scopes: z.ZodArray<z.ZodEnum<{
|
|
2646
|
-
"agents:read": "agents:read";
|
|
2647
|
-
"sandboxes:write": "sandboxes:write";
|
|
2648
|
-
"sessions:own": "sessions:own";
|
|
2649
|
-
"vaults:own": "vaults:own";
|
|
2650
|
-
}>>;
|
|
2651
|
-
agents: z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodArray<z.ZodString>]>;
|
|
2652
|
-
limits: z.ZodOptional<z.ZodObject<{
|
|
2653
|
-
turnsPerHour: z.ZodOptional<z.ZodNumber>;
|
|
2654
|
-
concurrentTurns: z.ZodOptional<z.ZodNumber>;
|
|
2655
|
-
}, z.core.$strict>>;
|
|
2656
|
-
}, z.core.$strict>;
|
|
2657
|
-
export type AccessRole = z.infer<typeof AccessRoleSchema>;
|
|
2658
2681
|
/**
|
|
2659
|
-
* The
|
|
2660
|
-
*
|
|
2682
|
+
* The `iss` of every token a Tenant's Runtime signs itself: delivery tokens, capability links,
|
|
2683
|
+
* run, host and egress tokens.
|
|
2661
2684
|
*/
|
|
2662
|
-
export declare
|
|
2663
|
-
version: z.ZodLiteral<1>;
|
|
2664
|
-
roles: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
2665
|
-
scopes: z.ZodArray<z.ZodEnum<{
|
|
2666
|
-
"agents:read": "agents:read";
|
|
2667
|
-
"sandboxes:write": "sandboxes:write";
|
|
2668
|
-
"sessions:own": "sessions:own";
|
|
2669
|
-
"vaults:own": "vaults:own";
|
|
2670
|
-
}>>;
|
|
2671
|
-
agents: z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodArray<z.ZodString>]>;
|
|
2672
|
-
limits: z.ZodOptional<z.ZodObject<{
|
|
2673
|
-
turnsPerHour: z.ZodOptional<z.ZodNumber>;
|
|
2674
|
-
concurrentTurns: z.ZodOptional<z.ZodNumber>;
|
|
2675
|
-
}, z.core.$strict>>;
|
|
2676
|
-
}, z.core.$strict>>;
|
|
2677
|
-
anon: z.ZodObject<{
|
|
2678
|
-
scopes: z.ZodArray<z.ZodLiteral<"agents:read">>;
|
|
2679
|
-
agents: z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodArray<z.ZodString>]>;
|
|
2680
|
-
}, z.core.$strict>;
|
|
2681
|
-
tokens: z.ZodObject<{
|
|
2682
|
-
maxTtlSeconds: z.ZodNumber;
|
|
2683
|
-
}, z.core.$strict>;
|
|
2684
|
-
}, z.core.$strict>;
|
|
2685
|
-
export type AccessPolicy = z.infer<typeof AccessPolicySchema>;
|
|
2686
|
-
/** The policy of a Tenant that never set one: no roles, nothing for `anon`. */
|
|
2687
|
-
export declare const DEFAULT_ACCESS_POLICY: AccessPolicy;
|
|
2688
|
-
export declare const PutAccessPolicyRequestSchema: z.ZodObject<{
|
|
2689
|
-
requestId: z.ZodString;
|
|
2690
|
-
policy: z.ZodObject<{
|
|
2691
|
-
version: z.ZodLiteral<1>;
|
|
2692
|
-
roles: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
2693
|
-
scopes: z.ZodArray<z.ZodEnum<{
|
|
2694
|
-
"agents:read": "agents:read";
|
|
2695
|
-
"sandboxes:write": "sandboxes:write";
|
|
2696
|
-
"sessions:own": "sessions:own";
|
|
2697
|
-
"vaults:own": "vaults:own";
|
|
2698
|
-
}>>;
|
|
2699
|
-
agents: z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodArray<z.ZodString>]>;
|
|
2700
|
-
limits: z.ZodOptional<z.ZodObject<{
|
|
2701
|
-
turnsPerHour: z.ZodOptional<z.ZodNumber>;
|
|
2702
|
-
concurrentTurns: z.ZodOptional<z.ZodNumber>;
|
|
2703
|
-
}, z.core.$strict>>;
|
|
2704
|
-
}, z.core.$strict>>;
|
|
2705
|
-
anon: z.ZodObject<{
|
|
2706
|
-
scopes: z.ZodArray<z.ZodLiteral<"agents:read">>;
|
|
2707
|
-
agents: z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodArray<z.ZodString>]>;
|
|
2708
|
-
}, z.core.$strict>;
|
|
2709
|
-
tokens: z.ZodObject<{
|
|
2710
|
-
maxTtlSeconds: z.ZodNumber;
|
|
2711
|
-
}, z.core.$strict>;
|
|
2712
|
-
}, z.core.$strict>;
|
|
2713
|
-
}, z.core.$strict>;
|
|
2714
|
-
export type PutAccessPolicyRequest = z.infer<typeof PutAccessPolicyRequestSchema>;
|
|
2715
|
-
export declare const CreateTokenRequestSchema: z.ZodObject<{
|
|
2716
|
-
requestId: z.ZodString;
|
|
2717
|
-
subject: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
2718
|
-
role: z.ZodString;
|
|
2719
|
-
scopes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
2720
|
-
"agents:read": "agents:read";
|
|
2721
|
-
"sandboxes:write": "sandboxes:write";
|
|
2722
|
-
"sessions:own": "sessions:own";
|
|
2723
|
-
"vaults:own": "vaults:own";
|
|
2724
|
-
}>>>;
|
|
2725
|
-
agents: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2726
|
-
sandboxes: z.ZodOptional<z.ZodArray<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>>;
|
|
2727
|
-
ttlSeconds: z.ZodOptional<z.ZodNumber>;
|
|
2728
|
-
}, z.core.$strict>;
|
|
2729
|
-
export type CreateTokenRequest = z.infer<typeof CreateTokenRequestSchema>;
|
|
2730
|
-
export declare const CreateTokenResponseSchema: z.ZodObject<{
|
|
2731
|
-
token: z.ZodString;
|
|
2732
|
-
expiresAt: z.ZodString;
|
|
2733
|
-
subject: z.ZodString;
|
|
2734
|
-
role: z.ZodString;
|
|
2735
|
-
scopes: z.ZodArray<z.ZodEnum<{
|
|
2736
|
-
"agents:read": "agents:read";
|
|
2737
|
-
"sandboxes:write": "sandboxes:write";
|
|
2738
|
-
"sessions:own": "sessions:own";
|
|
2739
|
-
"vaults:own": "vaults:own";
|
|
2740
|
-
}>>;
|
|
2741
|
-
agents: z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodArray<z.ZodString>]>;
|
|
2742
|
-
sandboxes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2743
|
-
keyId: z.ZodString;
|
|
2744
|
-
}, z.core.$strict>;
|
|
2745
|
-
export type CreateTokenResponse = z.infer<typeof CreateTokenResponseSchema>;
|
|
2685
|
+
export declare function tenantTokenIssuer(tenantId: string): string;
|
|
2746
2686
|
export declare const SIGNING_KEY_STATES: readonly ["standby", "current", "previous", "revoked"];
|
|
2747
2687
|
export type SigningKeyState = (typeof SIGNING_KEY_STATES)[number];
|
|
2748
2688
|
/** A public JSON Web Key as the JWKS publishes it. */
|
|
@@ -2824,62 +2764,45 @@ export declare const RotateSigningKeysRequestSchema: z.ZodObject<{
|
|
|
2824
2764
|
export declare const RevokeSigningKeyRequestSchema: z.ZodObject<{
|
|
2825
2765
|
requestId: z.ZodString;
|
|
2826
2766
|
}, z.core.$strict>;
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
export declare const
|
|
2833
|
-
|
|
2834
|
-
|
|
2767
|
+
/**
|
|
2768
|
+
* Scopes a trusted issuer's tokens may carry (`allowedScopes` in the identity file): the
|
|
2769
|
+
* token scopes, and `studio`, an operator scope no Runtime route requires (Studio
|
|
2770
|
+
* admits a person who holds it, Tenant-wide).
|
|
2771
|
+
*/
|
|
2772
|
+
export declare const ISSUER_SCOPES: readonly ["agents:read", "sessions:own", "sandboxes:write", "studio"];
|
|
2773
|
+
export type IssuerScope = (typeof ISSUER_SCOPES)[number];
|
|
2774
|
+
/** Every scope a caller can hold: the subject scopes, and an issuer token's `studio`. */
|
|
2775
|
+
export declare const CALLER_SCOPES: readonly ["agents:read", "agents:write", "sessions:own", "tenant:settings", "sandboxes:write", "studio"];
|
|
2776
|
+
export type CallerScope = (typeof CALLER_SCOPES)[number];
|
|
2777
|
+
/**
|
|
2778
|
+
* `GET /v1/me`: who the Runtime takes the caller to be, for any credential.
|
|
2779
|
+
*
|
|
2780
|
+
* - `via` is how the caller authenticated: `application:<principalId>` (an application key,
|
|
2781
|
+
* acting as itself), `subject` (an application key acting for `Nylorun-Subject`) or
|
|
2782
|
+
* `issuer:<name>` (a token from the identity file's issuer `name`).
|
|
2783
|
+
* - `subject` is the person the request acts for; absent for an application key alone.
|
|
2784
|
+
* - `scopes`: what the caller holds. An application key alone holds every subject scope.
|
|
2785
|
+
* - `agents`: the agents it may reach, `*` for all.
|
|
2786
|
+
* - `sandboxes`: the sandbox grants of a token caller (empty reaches none); absent for an
|
|
2787
|
+
* application key, alone or acting for a subject, which no grant limits.
|
|
2788
|
+
*/
|
|
2789
|
+
export declare const MeResponseSchema: z.ZodObject<{
|
|
2790
|
+
subject: z.ZodOptional<z.ZodString>;
|
|
2791
|
+
scopes: z.ZodArray<z.ZodEnum<{
|
|
2792
|
+
"agents:read": "agents:read";
|
|
2793
|
+
"agents:write": "agents:write";
|
|
2794
|
+
"sandboxes:write": "sandboxes:write";
|
|
2795
|
+
"sessions:own": "sessions:own";
|
|
2796
|
+
studio: "studio";
|
|
2797
|
+
"tenant:settings": "tenant:settings";
|
|
2798
|
+
}>>;
|
|
2799
|
+
agents: z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodArray<z.ZodString>]>;
|
|
2800
|
+
sandboxes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2801
|
+
via: z.ZodString;
|
|
2835
2802
|
}, z.core.$strict>;
|
|
2836
|
-
|
|
2837
|
-
export interface SubjectTokenClaims {
|
|
2838
|
-
iss: string;
|
|
2839
|
-
aud: string;
|
|
2840
|
-
/** Tenant id. */
|
|
2841
|
-
tnt: string;
|
|
2842
|
-
sub: string;
|
|
2843
|
-
role: string;
|
|
2844
|
-
/** Space-separated token scopes. */
|
|
2845
|
-
scp: string;
|
|
2846
|
-
/** The agents the mint narrowed the role to; absent when not narrowed. */
|
|
2847
|
-
agt?: string[];
|
|
2848
|
-
/** The sandboxes the token reaches: exact ids, or prefixes ending in `/*`. */
|
|
2849
|
-
sbx?: string[];
|
|
2850
|
-
/** The subject's revocation epoch when minted. */
|
|
2851
|
-
epc: number;
|
|
2852
|
-
iat: number;
|
|
2853
|
-
exp: number;
|
|
2854
|
-
jti: string;
|
|
2855
|
-
}
|
|
2856
|
-
/** Loopback origins with any port, for development: `http://localhost:*`, `http://127.0.0.1:*`. */
|
|
2857
|
-
export declare const LOOPBACK_ORIGIN_WILDCARDS: readonly ["http://localhost:*", "http://127.0.0.1:*"];
|
|
2803
|
+
export type MeResponse = z.infer<typeof MeResponseSchema>;
|
|
2858
2804
|
/** True for a serialized web origin: `scheme://host[:port]`, lowercase, no path. */
|
|
2859
2805
|
export declare function isSerializedOrigin(value: string): boolean;
|
|
2860
|
-
/** An origin allowlist entry: an exact origin or a loopback wildcard. */
|
|
2861
|
-
export declare const OriginEntrySchema: z.ZodString;
|
|
2862
|
-
/** True when `origin` (a request's `Origin`) is allowed by `origins`. */
|
|
2863
|
-
export declare function originAllowed(origins: readonly string[], origin: string): boolean;
|
|
2864
|
-
export declare const PublishableKeySchema: z.ZodObject<{
|
|
2865
|
-
id: z.ZodString;
|
|
2866
|
-
name: z.ZodString;
|
|
2867
|
-
key: z.ZodString;
|
|
2868
|
-
origins: z.ZodArray<z.ZodString>;
|
|
2869
|
-
createdAt: z.ZodString;
|
|
2870
|
-
revokedAt: z.ZodNullable<z.ZodString>;
|
|
2871
|
-
}, z.core.$strict>;
|
|
2872
|
-
export type PublishableKey = z.infer<typeof PublishableKeySchema>;
|
|
2873
|
-
export declare const CreatePublishableKeyRequestSchema: z.ZodObject<{
|
|
2874
|
-
requestId: z.ZodString;
|
|
2875
|
-
name: z.ZodString;
|
|
2876
|
-
origins: z.ZodArray<z.ZodString>;
|
|
2877
|
-
}, z.core.$strict>;
|
|
2878
|
-
export type CreatePublishableKeyRequest = z.infer<typeof CreatePublishableKeyRequestSchema>;
|
|
2879
|
-
export declare const UpdatePublishableKeyRequestSchema: z.ZodObject<{
|
|
2880
|
-
requestId: z.ZodString;
|
|
2881
|
-
origins: z.ZodArray<z.ZodString>;
|
|
2882
|
-
}, z.core.$strict>;
|
|
2883
2806
|
/** `GET /v1/agents` with an application key: every definition, manifest included. */
|
|
2884
2807
|
export declare const AgentDefinitionViewSchema: z.ZodObject<{
|
|
2885
2808
|
agentId: z.ZodString;
|
|
@@ -2897,7 +2820,7 @@ export declare const ListAgentsResponseSchema: z.ZodObject<{
|
|
|
2897
2820
|
}, z.core.$strict>>;
|
|
2898
2821
|
}, z.core.$strict>;
|
|
2899
2822
|
export type ListAgentsResponse = z.infer<typeof ListAgentsResponseSchema>;
|
|
2900
|
-
/** `GET /v1/agents` with a
|
|
2823
|
+
/** `GET /v1/agents` with a token caller's credential: the allowed agents' names only. */
|
|
2901
2824
|
export declare const PublicAgentSchema: z.ZodObject<{
|
|
2902
2825
|
agentId: z.ZodString;
|
|
2903
2826
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -3457,55 +3380,38 @@ export declare const ListCredentialsResponseSchema: z.ZodObject<{
|
|
|
3457
3380
|
}, z.core.$strict>>;
|
|
3458
3381
|
}, z.core.$strict>;
|
|
3459
3382
|
export type ListCredentialsResponse = z.infer<typeof ListCredentialsResponseSchema>;
|
|
3383
|
+
/**
|
|
3384
|
+
* `POST /v1/vaults/{vaultId}/oauth/start` (F9 C2): sign the installation in to the remote MCP
|
|
3385
|
+
* server at `url`, declared as `server`, and store its OAuth credential in the installation vault.
|
|
3386
|
+
* `clientId` names a client registered with the authorization server; without one the Runtime
|
|
3387
|
+
* registers itself (RFC 7591) when the server allows it.
|
|
3388
|
+
*/
|
|
3389
|
+
export declare const StartOAuthRequestSchema: z.ZodObject<{
|
|
3390
|
+
url: z.ZodString;
|
|
3391
|
+
server: z.ZodString;
|
|
3392
|
+
clientId: z.ZodOptional<z.ZodString>;
|
|
3393
|
+
}, z.core.$strict>;
|
|
3394
|
+
export type StartOAuthRequest = z.infer<typeof StartOAuthRequestSchema>;
|
|
3395
|
+
/** Where to send the browser, and until when the sign-in can finish. */
|
|
3396
|
+
export declare const StartOAuthResponseSchema: z.ZodObject<{
|
|
3397
|
+
authorizeUrl: z.ZodString;
|
|
3398
|
+
expiresAt: z.ZodString;
|
|
3399
|
+
}, z.core.$strict>;
|
|
3400
|
+
export type StartOAuthResponse = z.infer<typeof StartOAuthResponseSchema>;
|
|
3460
3401
|
/** A deleted vault or credential. */
|
|
3461
3402
|
export declare const DeletedResponseSchema: z.ZodObject<{
|
|
3462
3403
|
id: z.ZodString;
|
|
3463
3404
|
}, z.core.$strict>;
|
|
3464
3405
|
export type DeletedResponse = z.infer<typeof DeletedResponseSchema>;
|
|
3465
|
-
export declare const AccessPolicyResponseSchema: z.ZodObject<{
|
|
3466
|
-
policy: z.ZodObject<{
|
|
3467
|
-
version: z.ZodLiteral<1>;
|
|
3468
|
-
roles: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
3469
|
-
scopes: z.ZodArray<z.ZodEnum<{
|
|
3470
|
-
"agents:read": "agents:read";
|
|
3471
|
-
"sandboxes:write": "sandboxes:write";
|
|
3472
|
-
"sessions:own": "sessions:own";
|
|
3473
|
-
"vaults:own": "vaults:own";
|
|
3474
|
-
}>>;
|
|
3475
|
-
agents: z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodArray<z.ZodString>]>;
|
|
3476
|
-
limits: z.ZodOptional<z.ZodObject<{
|
|
3477
|
-
turnsPerHour: z.ZodOptional<z.ZodNumber>;
|
|
3478
|
-
concurrentTurns: z.ZodOptional<z.ZodNumber>;
|
|
3479
|
-
}, z.core.$strict>>;
|
|
3480
|
-
}, z.core.$strict>>;
|
|
3481
|
-
anon: z.ZodObject<{
|
|
3482
|
-
scopes: z.ZodArray<z.ZodLiteral<"agents:read">>;
|
|
3483
|
-
agents: z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodArray<z.ZodString>]>;
|
|
3484
|
-
}, z.core.$strict>;
|
|
3485
|
-
tokens: z.ZodObject<{
|
|
3486
|
-
maxTtlSeconds: z.ZodNumber;
|
|
3487
|
-
}, z.core.$strict>;
|
|
3488
|
-
}, z.core.$strict>;
|
|
3489
|
-
}, z.core.$strict>;
|
|
3490
|
-
export type AccessPolicyResponse = z.infer<typeof AccessPolicyResponseSchema>;
|
|
3491
|
-
export declare const ListPublishableKeysResponseSchema: z.ZodObject<{
|
|
3492
|
-
keys: z.ZodArray<z.ZodObject<{
|
|
3493
|
-
id: z.ZodString;
|
|
3494
|
-
name: z.ZodString;
|
|
3495
|
-
key: z.ZodString;
|
|
3496
|
-
origins: z.ZodArray<z.ZodString>;
|
|
3497
|
-
createdAt: z.ZodString;
|
|
3498
|
-
revokedAt: z.ZodNullable<z.ZodString>;
|
|
3499
|
-
}, z.core.$strict>>;
|
|
3500
|
-
}, z.core.$strict>;
|
|
3501
|
-
export type ListPublishableKeysResponse = z.infer<typeof ListPublishableKeysResponseSchema>;
|
|
3502
3406
|
export declare const HostShutdownResponseSchema: z.ZodObject<{
|
|
3503
3407
|
status: z.ZodLiteral<"shutting_down">;
|
|
3504
3408
|
}, z.core.$strict>;
|
|
3505
|
-
/**
|
|
3409
|
+
/**
|
|
3410
|
+
* The last frame of a session stream the Runtime ends: `event: nylorun.closed`, when the
|
|
3411
|
+
* token caller's token expires.
|
|
3412
|
+
*/
|
|
3506
3413
|
export declare const StreamClosedFrameSchema: z.ZodObject<{
|
|
3507
3414
|
reason: z.ZodEnum<{
|
|
3508
|
-
revoked: "revoked";
|
|
3509
3415
|
token_expired: "token_expired";
|
|
3510
3416
|
}>;
|
|
3511
3417
|
}, z.core.$strict>;
|
|
@@ -3520,8 +3426,12 @@ export declare const AgUiRunErrorCodeSchema: z.ZodEnum<{
|
|
|
3520
3426
|
incompatible_host: "incompatible_host";
|
|
3521
3427
|
internal_error: "internal_error";
|
|
3522
3428
|
invalid_request: "invalid_request";
|
|
3429
|
+
issuer_unavailable: "issuer_unavailable";
|
|
3523
3430
|
limit_exceeded: "limit_exceeded";
|
|
3524
3431
|
not_found: "not_found";
|
|
3432
|
+
oauth_client_required: "oauth_client_required";
|
|
3433
|
+
oauth_failed: "oauth_failed";
|
|
3434
|
+
oauth_state_invalid: "oauth_state_invalid";
|
|
3525
3435
|
origin_rejected: "origin_rejected";
|
|
3526
3436
|
placement_refused: "placement_refused";
|
|
3527
3437
|
protocol_unsupported: "protocol_unsupported";
|
|
@@ -3542,10 +3452,7 @@ export declare const AgUiRunErrorCodeSchema: z.ZodEnum<{
|
|
|
3542
3452
|
export type AgUiRunErrorCode = z.infer<typeof AgUiRunErrorCodeSchema>;
|
|
3543
3453
|
/** The JWT `typ` of a delivery token (RFC 8725 explicit typing). */
|
|
3544
3454
|
export declare const DELIVERY_TOKEN_TYPE = "nylorun-delivery+jwt";
|
|
3545
|
-
/**
|
|
3546
|
-
* A delivery token lives no longer than a subject token: rotating signing keys revokes the
|
|
3547
|
-
* previous key once the longest token it may have signed has expired.
|
|
3548
|
-
*/
|
|
3455
|
+
/** A delivery token lives no longer than any token the Runtime signs (`TOKEN_TTL_MAX_SECONDS`). */
|
|
3549
3456
|
export declare const DELIVERY_TOKEN_MAX_TTL_SECONDS = 900;
|
|
3550
3457
|
/** Inline delivery timeouts, in milliseconds. The maximum keeps a token within its lifetime. */
|
|
3551
3458
|
export declare const ENDPOINT_TIMEOUT_DEFAULT_MS = 60000;
|
|
@@ -3928,7 +3835,7 @@ export declare const StudioEmbedMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObj
|
|
|
3928
3835
|
}, z.core.$strip>, z.ZodObject<{
|
|
3929
3836
|
type: z.ZodLiteral<"nylorun.studio">;
|
|
3930
3837
|
protocol: z.ZodNumber;
|
|
3931
|
-
kind: z.ZodLiteral<"open.
|
|
3838
|
+
kind: z.ZodLiteral<"open.session">;
|
|
3932
3839
|
sessionId: z.ZodString;
|
|
3933
3840
|
}, z.core.$strip>, z.ZodObject<{
|
|
3934
3841
|
type: z.ZodLiteral<"nylorun.studio">;
|
|
@@ -3948,10 +3855,7 @@ export declare function isFrameAncestor(value: string): boolean;
|
|
|
3948
3855
|
export declare function parseFrameAncestors(value: string): string[];
|
|
3949
3856
|
/** The JWT `typ` of a capability link's token (RFC 8725 explicit typing). */
|
|
3950
3857
|
export declare const ARTIFACT_LINK_TOKEN_TYPE = "nylorun-artifact+jwt";
|
|
3951
|
-
/**
|
|
3952
|
-
* A capability link lives no longer than a subject token: rotating signing keys revokes the
|
|
3953
|
-
* previous key once the longest token it may have signed has expired.
|
|
3954
|
-
*/
|
|
3858
|
+
/** A capability link lives no longer than any token the Runtime signs (`TOKEN_TTL_MAX_SECONDS`). */
|
|
3955
3859
|
export declare const ARTIFACT_LINK_MAX_TTL_SECONDS = 900;
|
|
3956
3860
|
export declare const ARTIFACT_LINK_DEFAULT_TTL_SECONDS = 300;
|
|
3957
3861
|
/** A Tenant's limits when it sets none: 100 MiB per file, 10 GiB in all. */
|