@sylphx/sdk 0.21.1 → 0.22.0

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
@@ -1,5 +1,5 @@
1
1
  export { DEFAULT_MACHINE_SIZE, MACHINE_CONFIGS, MACHINE_MAX_INSTANCES, MACHINE_RESOURCE_REQUIREMENTS, MACHINE_SIZES, MachineConfig, MachineResourceRequirements, MachineTierResources, isMachineSize, parseMachineSize, resolveMachineConfig, resolveMachineMaxInstances, resolveMachineResources, resolveMachineTierResources, toPublicMachineSize } from '@sylphx/contract/compute';
2
- import { ManagedWorkspace, CreateWorkspaceInput, ForkWorkspaceInput, WorkspaceCapacitySnapshot, PinWorkspaceInput, PinWorkspaceResult, ReclaimWorkspaceInput, ReclaimWorkspaceResult, ReclaimWorkspaceSubpathInput, ReclaimWorkspaceSubpathResult, SdkBillingPlan, SdkBillingSubscription, BillingCheckoutRequest, BillingCheckoutResponse, BillingPortalRequest, BillingPortalResponse, BillingBalanceResponse, BillingUsageResponse, SdkConsentType, UserConsent as UserConsent$1, AIModel as AIModel$1, GetModelsResponse, GetRateLimitResponse, GetUsageResponse, ReferralLeaderboardEntry, ReferralRewardDefaults as ReferralRewardDefaults$1, WebhookDelivery as WebhookDelivery$1, OAuthTokenResponse, OAuthTokenErrorResponse, OAuthClientCredentialsResponse, LogoutInput, RefreshTokenInput, RefreshTokenResult, OAuthIntrospectResponse, PlatformPasswordChangeRequest, PlatformPasswordChangeResponse, PlatformPasswordSetRequest, PlatformPasswordSetResponse, PlatformPasswordStatusResponse, PlatformSessionRenameRequest, PlatformSessionRenameResponse, PlatformSessionRevokeAllResponse, PlatformSessionRevokeRequest, PlatformSessionRevokeOtherResponse, PlatformSessionRevokeResponse, PlatformSessionsListResponse, AuthUserDeleteRequest, AuthUserDeleteResponse, AuthUserExportResponse, DeviceApproveRequest, DeviceApproveResponse, DeviceDenyRequest, DeviceDenyResponse, DeviceInitResponse, DeviceInitRequest, DevicePollResponse, LoginRequest as LoginRequest$1, LoginResponse as LoginResponse$1, UserFullProfile as UserFullProfile$1, RegisterRequest as RegisterRequest$1, RegisterResponse as RegisterResponse$1, ResendEmailVerificationRequest as ResendEmailVerificationRequest$1, ResendEmailVerificationResponse as ResendEmailVerificationResponse$1, AuthTokensResponse, TwoFactorVerifyRequest as TwoFactorVerifyRequest$1, PlatformAuditQueryRequest, PlatformAuditQueryResponse, PlatformRateLimitStatusRequest, PlatformRateLimitStatusResponse, PlatformRateLimitStrategiesListRequest, PlatformRateLimitStrategiesListResponse, PlatformRateLimitStrategyDeleteRequest, PlatformRateLimitStrategyDeleteResponse, PlatformRateLimitStrategyUpsertRequest, PlatformRateLimitStrategyUpsertResponse, File as File$1, UploadId, FileId, TakedownFileRequest, TakedownFileResult, FileVersion, FileVersionId, MachineSize, DurableWorkGetTaskRunResponse, DurableWorkTaskRunStep, CreateOrgInput as CreateOrgInput$1, InviteMemberInput as InviteMemberInput$1, OrgSdkRole, OrgInvitation, OrgMember, MembershipInfo, Organization, UpdateOrgInput as UpdateOrgInput$1, UserOrganizationMembership, UserOrganizationsResponse, SandboxCapabilitiesReport, PublishArtifactRequest, ArtifactResult, ListArtifactsResult, ArtifactDetail, ArtifactContent, DeleteArtifactResult, RestoreArtifactResult, ReshareArtifactResult, RenderRequest, RenderResult, GrantRequest, Grant, BalanceSummary, ReserveRequest, Reservation, ConsumeRequest, LedgerEntry, ReleaseRequest, VoidGrantRequest, CreateDeviceSessionInput, DeviceSessionResult, ListDeviceSessionsQuery, ListDeviceSessionsResult, InstallDeviceSessionAppInput, InstallDeviceSessionAppResult, DeviceSessionInput, DeviceSessionInputResult, LaunchDeviceSessionAppInput, LaunchDeviceSessionAppResult, DeviceSessionScreenshotResult, DeviceSessionLogcatQuery, DeviceSessionLogcatResult, DeviceSessionStreamConnectInput, DeviceSessionStreamConnectResult, DeleteDeviceSessionResult, DurableWorkRunCompletionMode, DistributedRun, DistributedRunShard, DistributedRunAggregateStatus } from '@sylphx/contract';
2
+ import { ManagedWorkspace, CreateWorkspaceInput, ForkWorkspaceInput, WorkspaceCapacitySnapshot, PinWorkspaceInput, PinWorkspaceResult, ReclaimWorkspaceInput, ReclaimWorkspaceResult, ReclaimWorkspaceSubpathInput, ReclaimWorkspaceSubpathResult, SdkBillingPlan, SdkBillingSubscription, BillingCheckoutRequest, BillingCheckoutResponse, BillingPortalRequest, BillingPortalResponse, BillingBalanceResponse, BillingUsageResponse, ConsentHistoryResponse, SdkConsentType, LinkAnonymousConsentsRequest, UserConsent as UserConsent$1, AIModel as AIModel$1, GetModelsResponse, GetRateLimitResponse, GetUsageResponse, ReferralLeaderboardEntry, ReferralLeaderboardResponse, RedeemResponse, GetCodeResponse, GetStatsResponse, ReferralRewardDefaults as ReferralRewardDefaults$1, RegenerateCodeResponse as RegenerateCodeResponse$1, RuntimeWebhookDelivery, OAuthTokenResponse, OAuthTokenErrorResponse, OAuthClientCredentialsResponse, LogoutInput, RefreshTokenInput, RefreshTokenResult, OAuthIntrospectResponse, PlatformPasswordChangeRequest, PlatformPasswordChangeResponse, PlatformPasswordSetRequest, PlatformPasswordSetResponse, PlatformPasswordStatusResponse, PlatformSessionRenameRequest, PlatformSessionRenameResponse, PlatformSessionRevokeAllResponse, PlatformSessionRevokeRequest, PlatformSessionRevokeOtherResponse, PlatformSessionRevokeResponse, PlatformSessionsListResponse, AuthUserDeleteRequest, AuthUserDeleteResponse, AuthUserExportResponse, DeviceApproveRequest, DeviceApproveResponse, DeviceDenyRequest, DeviceDenyResponse, DeviceInitResponse, DeviceInitRequest, DevicePollResponse, LoginRequest as LoginRequest$1, LoginResponse as LoginResponse$1, UserFullProfile as UserFullProfile$1, RegisterRequest as RegisterRequest$1, RegisterResponse as RegisterResponse$1, ResendEmailVerificationRequest as ResendEmailVerificationRequest$1, ResendEmailVerificationResponse as ResendEmailVerificationResponse$1, AuthTokensResponse, TwoFactorVerifyRequest as TwoFactorVerifyRequest$1, PlatformAuditQueryRequest, PlatformAuditQueryResponse, PlatformRateLimitStatusRequest, PlatformRateLimitStatusResponse, PlatformRateLimitStrategiesListRequest, PlatformRateLimitStrategiesListResponse, PlatformRateLimitStrategyDeleteRequest, PlatformRateLimitStrategyDeleteResponse, PlatformRateLimitStrategyUpsertRequest, PlatformRateLimitStrategyUpsertResponse, File as File$1, UploadId, FileId, TakedownFileRequest, TakedownFileResult, FileVersion, FileVersionId, MachineSize, DurableWorkGetTaskRunResponse, DurableWorkTaskRunStep, CreateOrgInput as CreateOrgInput$1, InviteMemberInput as InviteMemberInput$1, OrgSdkRole, OrgInvitation, OrgMember, MembershipInfo, Organization, UpdateOrgInput as UpdateOrgInput$1, UserOrganizationMembership, UserOrganizationsResponse, SandboxCapabilitiesReport, PublishArtifactRequest, ArtifactResult, ListArtifactsResult, ArtifactDetail, ArtifactContent, DeleteArtifactResult, RestoreArtifactResult, ReshareArtifactResult, RenderRequest, RenderResult, GrantRequest, Grant, BalanceSummary, ReserveRequest, Reservation, ConsumeRequest, LedgerEntry, ReleaseRequest, VoidGrantRequest, CreateDeviceSessionInput, DeviceSessionResult, ListDeviceSessionsQuery, ListDeviceSessionsResult, InstallDeviceSessionAppInput, InstallDeviceSessionAppResult, DeviceSessionInput, DeviceSessionInputResult, LaunchDeviceSessionAppInput, LaunchDeviceSessionAppResult, DeviceSessionScreenshotResult, DeviceSessionLogcatQuery, DeviceSessionLogcatResult, DeviceSessionStreamConnectInput, DeviceSessionStreamConnectResult, DeleteDeviceSessionResult, DurableWorkRunCompletionMode, DistributedRun, DistributedRunShard, DistributedRunAggregateStatus } from '@sylphx/contract';
3
3
  export { ArtifactResult, BillingBalanceResponse as BalanceResponse, CI_LINUX_RUNNER_SIZES, CI_MACOS_RUNNER_SIZES, CI_RUNNER_PROFILES, BillingCheckoutRequest as CheckoutRequest, BillingCheckoutResponse as CheckoutResponse, CiLinuxRunnerSize, CiMacosRunnerSize, CiRunnerPlatform, CiRunnerProfile, CiRunnerProfileId, CiRunnerWorkflowRunsOn, CreateDeviceSessionInput, CreateWorkspaceInput, DeleteDeviceSessionResult, DeviceSessionInput, DeviceSessionInputResult, DeviceSessionLogcatQuery, DeviceSessionLogcatResult, DeviceSessionResult, DeviceSessionScreenshotResult, DeviceSessionStreamConnectInput, DeviceSessionStreamConnectResult, DistributedRun, DistributedRunShard, DurableWorkRunCompletionMode, FileId, FileVersion, FileVersionId, FileVisibility, ForkWorkspaceInput, InstallDeviceSessionAppInput, InstallDeviceSessionAppResult, LaunchDeviceSessionAppInput, LaunchDeviceSessionAppResult, ListDeviceSessionsQuery, ListDeviceSessionsResult, Organization, PinWorkspaceInput, BillingPortalRequest as PortalRequest, BillingPortalResponse as PortalResponse, PublishArtifactRequest, ReclaimWorkspaceInput, ReclaimWorkspaceSubpathInput, RenderRequest, RenderResult, SandboxCapabilitiesReport, SignedUrlDisposition, File as StorageFile, UploadId, BillingUsageResponse as UsageResponse, WorkspaceCapacitySnapshot, formatCiRunnerWorkflowRunsOn, getCiRunnerProfileById } from '@sylphx/contract';
4
4
 
5
5
  /**
@@ -1785,12 +1785,11 @@ declare function getBillingUsage(config: SylphxConfig, options?: {
1785
1785
  * - Platform auto-discovers/creates consent types when first referenced
1786
1786
  * - Console can override names, descriptions, requirements without deployment
1787
1787
  *
1788
- * Wire-shape types are re-exported from `@sylphx/contract` (ADR-084). The
1789
- * contract is the single source of truth for `GET /consent/types`,
1790
- * `GET /consent`, `POST /consent`, and friends. SDK-specific input types
1791
- * (history pagination, anonymous linking) remain local — they describe
1792
- * ergonomic helpers on top of the wire shapes rather than the wire
1793
- * shapes themselves.
1788
+ * Wire-shape types and endpoint paths are re-exported from
1789
+ * `@sylphx/contract` (ADR-084). The contract is the single source of truth
1790
+ * for `GET /consent/types`, `GET /consent`, `POST /consent`, and friends.
1791
+ * This module keeps ergonomic helper inputs only where the public SDK API
1792
+ * intentionally differs from the wire shape.
1794
1793
  *
1795
1794
  * @example
1796
1795
  * ```typescript
@@ -1828,13 +1827,12 @@ interface SetConsentsInput {
1828
1827
  anonymousId?: string;
1829
1828
  /** Consent settings by type slug */
1830
1829
  consents: Record<string, boolean>;
1830
+ /** Source of the consent action (defaults server-side to banner) */
1831
+ source?: 'banner' | 'settings' | 'api';
1832
+ /** User agent to store with the consent audit trail */
1833
+ userAgent?: string;
1831
1834
  }
1832
- interface LinkAnonymousConsentsInput {
1833
- /** The authenticated user ID to link to */
1834
- userId: string;
1835
- /** The anonymous ID whose consents should be linked */
1836
- anonymousId: string;
1837
- }
1835
+ type LinkAnonymousConsentsInput = LinkAnonymousConsentsRequest;
1838
1836
  interface GetConsentHistoryInput {
1839
1837
  /** User ID (for authenticated users) */
1840
1838
  userId?: string;
@@ -1848,36 +1846,8 @@ interface GetConsentHistoryInput {
1848
1846
  */
1849
1847
  cursor?: string;
1850
1848
  }
1851
- /** A single consent change history entry */
1852
- interface ConsentHistoryEntry {
1853
- /** Unique entry ID */
1854
- id: string;
1855
- /** Consent type slug (e.g., 'analytics') */
1856
- consentType: string;
1857
- /** Display name of the consent type */
1858
- consentTypeName: string;
1859
- /** Previous consent state (null = initial consent) */
1860
- previousGranted: boolean | null;
1861
- /** New consent state */
1862
- newGranted: boolean;
1863
- /** Source of the change (banner, settings, api) */
1864
- source: string;
1865
- /** Reason for change (user_action, policy_update, etc.) */
1866
- reason: string | null;
1867
- /** ISO timestamp when change occurred */
1868
- createdAt: string;
1869
- }
1870
- interface ConsentHistoryResult {
1871
- /** List of consent change entries */
1872
- entries: ConsentHistoryEntry[];
1873
- /**
1874
- * Opaque cursor for the next page. Pass as `cursor` to the next call.
1875
- * Null when this is the last page.
1876
- */
1877
- nextCursor: string | null;
1878
- /** Whether there are more entries */
1879
- hasMore: boolean;
1880
- }
1849
+ type ConsentHistoryEntry = ConsentHistoryResponse['entries'][number];
1850
+ type ConsentHistoryResult = ConsentHistoryResponse;
1881
1851
  interface GetConsentsInput {
1882
1852
  /** User ID (optional for anonymous users) */
1883
1853
  userId?: string;
@@ -2271,50 +2241,28 @@ declare function streamToString(config: SylphxConfig, input: ChatInput): Promise
2271
2241
  * ```
2272
2242
  */
2273
2243
 
2244
+ type RegenerateCodeResponse = RegenerateCodeResponse$1;
2274
2245
  type ReferralRewardDefaults = ReferralRewardDefaults$1;
2275
2246
  type LeaderboardEntry$1 = ReferralLeaderboardEntry;
2276
- interface ReferralCode {
2277
- code: string;
2278
- createdAt: string;
2279
- }
2280
- interface ReferralStats {
2281
- /** User's referral code */
2282
- code: string;
2283
- /** Total referrals made */
2284
- totalReferrals: number;
2285
- /** Successful (redeemed) referrals */
2286
- successfulReferrals: number;
2287
- /** Pending referrals */
2288
- pendingReferrals: number;
2289
- /** Total rewards earned */
2290
- totalRewards: number;
2291
- }
2247
+ type ReferralCode = GetCodeResponse;
2248
+ type ReferralStats = GetStatsResponse;
2292
2249
  type LeaderboardPeriod = 'all' | 'month' | 'week';
2293
- interface LeaderboardResult$1 {
2294
- /** Time period for the leaderboard */
2295
- period?: LeaderboardPeriod;
2296
- entries: LeaderboardEntry$1[];
2297
- /** Current user's position (may not be in top entries) */
2298
- currentUserRank: number | null;
2299
- /** Total participants */
2300
- totalParticipants: number;
2301
- }
2250
+ type LeaderboardResult$1 = ReferralLeaderboardResponse;
2302
2251
  interface RedeemReferralInput {
2303
2252
  /** Referral code to redeem */
2304
2253
  code: string;
2305
- /** User ID of the person redeeming (optional for anonymous) */
2254
+ /**
2255
+ * @deprecated Runtime referrals derive the actor from `config.accessToken`.
2256
+ * This field is retained for source compatibility and is not sent.
2257
+ */
2306
2258
  userId?: string;
2307
2259
  }
2308
- interface RedeemResult {
2309
- success: boolean;
2310
- /** Reward type - platform types or app-specific types */
2311
- rewardType: 'points' | 'premium_trial' | 'discount' | 'credit' | (string & {});
2312
- referredReward?: Record<string, unknown>;
2313
- referrerReward?: Record<string, unknown>;
2314
- }
2260
+ type RedeemResult = RedeemResponse;
2315
2261
  interface LeaderboardOptions {
2316
2262
  /** Number of entries to return (default: 10) */
2317
2263
  limit?: number;
2264
+ /** Time period for filtering (default: all) */
2265
+ period?: LeaderboardPeriod;
2318
2266
  }
2319
2267
  /**
2320
2268
  * Get current user's referral code
@@ -2323,21 +2271,21 @@ interface LeaderboardOptions {
2323
2271
  *
2324
2272
  * @example
2325
2273
  * ```typescript
2326
- * const { code } = await getMyReferralCode(config, 'user-123')
2274
+ * const { code } = await getMyReferralCode(config)
2327
2275
  * console.log(`Share your code: ${code}`)
2328
2276
  * ```
2329
2277
  */
2330
- declare function getMyReferralCode(config: SylphxConfig, userId: string): Promise<ReferralCode>;
2278
+ declare function getMyReferralCode(config: SylphxConfig, _userId?: string): Promise<ReferralCode>;
2331
2279
  /**
2332
2280
  * Get referral statistics for a user
2333
2281
  *
2334
2282
  * @example
2335
2283
  * ```typescript
2336
- * const stats = await getReferralStats(config, 'user-123')
2337
- * console.log(`${stats.successfulReferrals} successful referrals`)
2284
+ * const stats = await getReferralStats(config)
2285
+ * console.log(`${stats.completedReferrals} successful referrals`)
2338
2286
  * ```
2339
2287
  */
2340
- declare function getReferralStats(config: SylphxConfig, userId: string): Promise<ReferralStats>;
2288
+ declare function getReferralStats(config: SylphxConfig, _userId?: string): Promise<ReferralStats>;
2341
2289
  /**
2342
2290
  * Redeem a referral code
2343
2291
  *
@@ -2345,7 +2293,7 @@ declare function getReferralStats(config: SylphxConfig, userId: string): Promise
2345
2293
  * defaults will be used. Console can override any values without deployment.
2346
2294
  *
2347
2295
  * @param config - SDK configuration
2348
- * @param input - Referral redemption input (code, userId)
2296
+ * @param input - Referral redemption input. User identity comes from `config.accessToken`.
2349
2297
  * @param defaults - Optional inline defaults for reward configuration
2350
2298
  *
2351
2299
  * @example
@@ -2376,14 +2324,14 @@ declare function redeemReferralCode(config: SylphxConfig, input: RedeemReferralI
2376
2324
  *
2377
2325
  * @example
2378
2326
  * ```typescript
2379
- * const { entries, currentUserRank } = await getReferralLeaderboard(config, 'user-123')
2327
+ * const { entries, currentUserRank } = await getReferralLeaderboard(config)
2380
2328
  *
2381
2329
  * entries.forEach(e => {
2382
2330
  * console.log(`#${e.rank} ${e.displayName}: ${e.completedReferrals} referrals`)
2383
2331
  * })
2384
2332
  * ```
2385
2333
  */
2386
- declare function getReferralLeaderboard(config: SylphxConfig, userId: string, options?: LeaderboardOptions): Promise<LeaderboardResult$1>;
2334
+ declare function getReferralLeaderboard(config: SylphxConfig, _userId?: string, options?: LeaderboardOptions): Promise<LeaderboardResult$1>;
2387
2335
  /**
2388
2336
  * Regenerate user's referral code
2389
2337
  *
@@ -2391,28 +2339,23 @@ declare function getReferralLeaderboard(config: SylphxConfig, userId: string, op
2391
2339
  *
2392
2340
  * @example
2393
2341
  * ```typescript
2394
- * const { code } = await regenerateReferralCode(config, 'user-123')
2342
+ * const { code } = await regenerateReferralCode(config)
2395
2343
  * console.log(`New code: ${code}`)
2396
2344
  * ```
2397
2345
  */
2398
- declare function regenerateReferralCode(config: SylphxConfig, userId: string): Promise<ReferralCode>;
2346
+ declare function regenerateReferralCode(config: SylphxConfig, _userId?: string): Promise<RegenerateCodeResponse>;
2399
2347
 
2400
2348
  /**
2401
2349
  * Webhooks Functions
2402
2350
  *
2403
2351
  * Pure functions for webhook configuration and delivery management.
2404
2352
  *
2405
- * Wire-shape types are re-exported from `@sylphx/contract` (ADR-084). The
2406
- * contract is the single source of truth for every `/webhooks/*` endpoint
2407
- * under the Console / Management plane. This module keeps a handful of
2408
- * SDK-specific ergonomic envelopes (`WebhookConfig`, `WebhookEnvironment`,
2409
- * `WebhookStats`, `WebhookConfigUpdate`, `ListDeliveriesOptions`,
2410
- * `WebhookDeliveriesResult`) that are looser or richer than the strict
2411
- * contract shapes — they predate the contract and stay put to avoid
2412
- * breaking downstream consumers (SDK tests, apps/web hooks layer).
2353
+ * Runtime endpoint paths and methods come from `webhooksRuntimeEndpoints`
2354
+ * (ADR-084). Management-plane webhook administration stays in
2355
+ * `webhooksEndpoints`; this module targets the BaaS runtime API mounted at
2356
+ * `/webhooks` for customer SDK calls.
2413
2357
  */
2414
2358
 
2415
- type WebhookDelivery = WebhookDelivery$1;
2416
2359
  interface WebhookEnvironment {
2417
2360
  id: string;
2418
2361
  name: string;
@@ -2438,7 +2381,33 @@ interface WebhookConfigUpdate {
2438
2381
  interface WebhookDeliveriesResult {
2439
2382
  deliveries: WebhookDelivery[];
2440
2383
  total: number;
2441
- hasMore: boolean;
2384
+ hasMore?: boolean;
2385
+ limit?: number;
2386
+ offset?: number;
2387
+ }
2388
+ type WebhookDeliveryStatus = RuntimeWebhookDelivery['status'] | 'success';
2389
+ interface WebhookDelivery {
2390
+ id: string;
2391
+ event: string;
2392
+ eventType?: string;
2393
+ url: string;
2394
+ status: WebhookDeliveryStatus;
2395
+ retryCount: number;
2396
+ responseStatus?: number | null;
2397
+ statusCode?: number;
2398
+ error?: string | null;
2399
+ payload?: Record<string, unknown>;
2400
+ messageId?: string | null;
2401
+ attempts?: number;
2402
+ response?: string | null;
2403
+ createdAt: string;
2404
+ queuedAt?: string | null;
2405
+ deliveredAt?: string | null;
2406
+ failedAt?: string | null;
2407
+ lastAttemptAt?: string | null;
2408
+ timestamp?: string;
2409
+ webhookId?: string;
2410
+ duration?: number;
2442
2411
  }
2443
2412
  interface WebhookStats {
2444
2413
  total: number;
@@ -8369,6 +8338,20 @@ interface SandboxOptions {
8369
8338
  /** Read-only mount (default: false) */
8370
8339
  readOnly?: boolean;
8371
8340
  }>;
8341
+ /**
8342
+ * Per-sandbox network egress policy. Omit for today's default: unrestricted
8343
+ * outbound network access. Opt into `mode: 'allowlist'` to confine the
8344
+ * sandbox's outbound connections to a fixed set of domains (exact, e.g.
8345
+ * `"api.openai.com"`) or wildcard subdomains (e.g. `"*.github.com"` —
8346
+ * matches subdomains only, never the bare domain). Allowlist sandboxes
8347
+ * bypass the warm pool (cold create only).
8348
+ */
8349
+ egress?: {
8350
+ mode: 'open';
8351
+ } | {
8352
+ mode: 'allowlist';
8353
+ allowDomains: string[];
8354
+ };
8372
8355
  }
8373
8356
  type SandboxMachineSize = MachineSize;
8374
8357
  /** SSE event emitted by sandbox.exec() */
@@ -8665,6 +8648,13 @@ interface SandboxRecord {
8665
8648
  startedAt: string | null;
8666
8649
  expiresAt: string | null;
8667
8650
  terminatedAt: string | null;
8651
+ /** Effective egress policy. Null for legacy rows — treat as `{ mode: 'open' }`. */
8652
+ egress: {
8653
+ mode: 'open';
8654
+ } | {
8655
+ mode: 'allowlist';
8656
+ allowDomains: string[];
8657
+ } | null;
8668
8658
  }
8669
8659
  declare class SandboxFiles {
8670
8660
  private readonly endpoint;