@sylphx/sdk 0.19.2 → 0.20.1

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,6 +1,6 @@
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, 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, CreateOrgInput as CreateOrgInput$1, InviteMemberInput as InviteMemberInput$1, OrgSdkRole, OrgInvitation, OrgMember, MembershipInfo, Organization, UpdateOrgInput as UpdateOrgInput$1, UserOrganizationMembership, UserOrganizationsResponse, MachineSize } from '@sylphx/contract';
3
- export { BillingBalanceResponse as BalanceResponse, BillingCheckoutRequest as CheckoutRequest, BillingCheckoutResponse as CheckoutResponse, CreateWorkspaceInput, FileId, FileVersion, FileVersionId, FileVisibility, ForkWorkspaceInput, Organization, BillingPortalRequest as PortalRequest, BillingPortalResponse as PortalResponse, SignedUrlDisposition, File as StorageFile, UploadId, BillingUsageResponse as UsageResponse } from '@sylphx/contract';
2
+ import { ManagedWorkspace, CreateWorkspaceInput, ForkWorkspaceInput, WorkspaceCapacitySnapshot, PinWorkspaceInput, PinWorkspaceResult, ReclaimWorkspaceInput, ReclaimWorkspaceResult, 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, RenderRequest, RenderResult } from '@sylphx/contract';
3
+ export { 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, CreateWorkspaceInput, FileId, FileVersion, FileVersionId, FileVisibility, ForkWorkspaceInput, Organization, PinWorkspaceInput, BillingPortalRequest as PortalRequest, BillingPortalResponse as PortalResponse, ReclaimWorkspaceInput, RenderRequest, RenderResult, SandboxCapabilitiesReport, SignedUrlDisposition, File as StorageFile, UploadId, BillingUsageResponse as UsageResponse, WorkspaceCapacitySnapshot, formatCiRunnerWorkflowRunsOn, getCiRunnerProfileById } from '@sylphx/contract';
4
4
 
5
5
  /**
6
6
  * Functions Admin namespace — Platform-plane function-bundle admin
@@ -619,8 +619,11 @@ type WorkspaceRecord = ManagedWorkspace;
619
619
 
620
620
  declare function listWorkspaces(config: SylphxConfig): Promise<readonly WorkspaceRecord[]>;
621
621
  declare function getWorkspace(config: SylphxConfig, workspaceId: string): Promise<WorkspaceRecord>;
622
+ declare function getWorkspaceCapacity(config: SylphxConfig, workspaceId: string): Promise<WorkspaceCapacitySnapshot>;
622
623
  declare function createWorkspace(config: SylphxConfig, input: CreateWorkspaceInput): Promise<WorkspaceRecord>;
623
624
  declare function forkWorkspace(config: SylphxConfig, sourceWorkspaceId: string, input?: ForkWorkspaceInput): Promise<WorkspaceRecord>;
625
+ declare function pinWorkspace(config: SylphxConfig, workspaceId: string, input?: PinWorkspaceInput): Promise<PinWorkspaceResult>;
626
+ declare function reclaimWorkspace(config: SylphxConfig, workspaceId: string, input?: ReclaimWorkspaceInput): Promise<ReclaimWorkspaceResult>;
624
627
  declare function deleteWorkspace(config: SylphxConfig, workspaceId: string): Promise<void>;
625
628
 
626
629
  /**
@@ -785,14 +788,14 @@ declare function hasBillingAccess(role: string): boolean;
785
788
  /**
786
789
  * Console SDK Key Utilities
787
790
  *
788
- * The Platform Console is Customer Zero — it uses the exact same key format
789
- * as every other customer: pk_{env}_{ref}_{hex} / sk_{env}_{ref}_{hex}.
791
+ * The Platform Console is Customer Zero — it uses the exact same ADR-055 pure
792
+ * entropy key format as every other customer.
790
793
  *
791
794
  * No special key construction. No legacy app_* format. No special lookup paths.
792
795
  *
793
796
  * Keys are set via environment variables, just like any customer app:
794
- * NEXT_PUBLIC_SYLPHX_KEY = pk_prod_nlbaz63pd2gz_97ef4f90c48e7378b0f00a1e2cb8c15e
795
- * SYLPHX_SECRET_KEY = sk_prod_nlbaz63pd2gz_edea406b7988099f5826c143b0f6bd94...
797
+ * NEXT_PUBLIC_SYLPHX_KEY = pk_prod_97ef4f90c48e7378b0f00a1e2cb8c15e
798
+ * SYLPHX_SECRET_KEY = sk_prod_edea406b7988099f5826c143b0f6bd94...
796
799
  */
797
800
  /** Console project slug — must match bootstrap.ts PLATFORM_CONSOLE_APP.slug */
798
801
  declare const CONSOLE_APP_SLUG = "sylphx-console";
@@ -2562,6 +2565,31 @@ interface AccessTokenPayload {
2562
2565
  role?: string;
2563
2566
  /** Project session id when the token was minted from a BaaS auth session. */
2564
2567
  sid?: string;
2568
+ /**
2569
+ * Org context claims — present on org-scoped tokens (switch-org exchanges
2570
+ * and service-account client-credentials grants; ADR-2062). Resource
2571
+ * servers MUST compare `org_id` against the addressed resource's org and
2572
+ * assert `org_role` against their allowlist before granting org-scoped
2573
+ * access. Absent on plain user tokens.
2574
+ *
2575
+ * `org_role` is one of `super_admin, admin, billing, analytics, developer,
2576
+ * viewer` (or a project-defined custom RBAC key). Service accounts emit
2577
+ * only their configured binding role ∈ `{admin, developer, viewer}`.
2578
+ * `owner` does not exist and is never emitted.
2579
+ */
2580
+ org_id?: string;
2581
+ org_slug?: string;
2582
+ org_role?: string;
2583
+ /**
2584
+ * RFC 7800 confirmation claim — present when the token is sender-
2585
+ * constrained (DPoP-bound, RFC 9449). `cnf.jkt` is the SHA-256 thumbprint
2586
+ * of the client's DPoP public key. Resource servers enforcing DPoP MUST
2587
+ * validate the inbound `DPoP` proof against this thumbprint. Narrowed to
2588
+ * `{ jkt? }` — never trust an unparsed claim shape.
2589
+ */
2590
+ cnf?: {
2591
+ jkt?: string;
2592
+ };
2565
2593
  iat: number;
2566
2594
  exp: number;
2567
2595
  }
@@ -3201,6 +3229,52 @@ interface DataExportJob {
3201
3229
  readonly errorMessage: string | null;
3202
3230
  }
3203
3231
 
3232
+ /**
3233
+ * Service Accounts — OAuth 2.0 client-credentials grant (ADR-2062)
3234
+ *
3235
+ * Org-scoped machine identity. Pure functions — config is the first
3236
+ * parameter, no hidden state. Split out of `auth.ts` along the
3237
+ * client-credentials domain boundary (ADR-2062 S1).
3238
+ */
3239
+
3240
+ /** Credentials of a service account (org-scoped machine identity). */
3241
+ interface ServiceCredentials {
3242
+ /** Service-account client id (`sa_…`) — stable across secret rotations. */
3243
+ clientId: string;
3244
+ /** Client secret — returned once at create/rotate; never log it. */
3245
+ clientSecret: string;
3246
+ /** Optional scope downgrade (RFC 6749 §3.3). Defaults to the client's registered scope. */
3247
+ scope?: string;
3248
+ }
3249
+ interface ServiceTokenResponse {
3250
+ /** Org-scoped access token (JWT). Verify with root `verifyAccessToken`. */
3251
+ token: string;
3252
+ /** Same token under the SDK's `accessToken` naming convention. */
3253
+ accessToken: string;
3254
+ /** Token lifetime in seconds. Re-mint before expiry — no refresh token exists (RFC 6749 §4.4.3). */
3255
+ expiresIn: number;
3256
+ tokenType: string;
3257
+ /** Granted scope, when returned by the server. */
3258
+ scope?: string;
3259
+ }
3260
+ /**
3261
+ * Authenticate AS a service account via the OAuth 2.0 client-credentials
3262
+ * grant (RFC 6749 §4.4, ADR-2062). Returns a short-lived org-scoped
3263
+ * access token carrying `org_id`, `org_slug`, and `org_role` claims —
3264
+ * resource servers verify it with the root `verifyAccessToken`.
3265
+ *
3266
+ * No refresh token is issued; call again before `expiresIn` elapses.
3267
+ *
3268
+ * @example
3269
+ * ```typescript
3270
+ * const { token, expiresIn } = await signInAsService(config, {
3271
+ * clientId: process.env.SYLPHX_SERVICE_CLIENT_ID!,
3272
+ * clientSecret: process.env.SYLPHX_SERVICE_CLIENT_SECRET!,
3273
+ * })
3274
+ * ```
3275
+ */
3276
+ declare function signInAsService(config: SylphxConfig, credentials: ServiceCredentials): Promise<ServiceTokenResponse>;
3277
+
3204
3278
  /**
3205
3279
  * Auth Functions
3206
3280
  *
@@ -3550,6 +3624,7 @@ declare function getOrgScopedToken(config: SylphxConfig, orgId: string): Promise
3550
3624
  * organization switch alias for existing SDK callers.
3551
3625
  */
3552
3626
  declare function switchOrg(config: SylphxConfig, orgId: string): Promise<OrgScopedTokenResponse>;
3627
+
3553
3628
  type DeviceInitInput = DeviceInitRequest;
3554
3629
  type DeviceGrant = DeviceInitResponse;
3555
3630
  type DevicePollResult = DevicePollResponse;
@@ -4565,6 +4640,268 @@ declare const campaigns: {
4565
4640
  stats(config: SylphxConfig, id: string): Promise<PushCampaignStats>;
4566
4641
  };
4567
4642
 
4643
+ /**
4644
+ * task() / taskStub()
4645
+ *
4646
+ * Core compute primitives — Trigger.dev v4 inspired.
4647
+ *
4648
+ * task() — define a TypeScript task handler that gets a typed TaskHandle
4649
+ * taskStub() — typed stub for cross-language tasks (Python, etc.)
4650
+ *
4651
+ * Both return a TaskHandle<TPayload, TResult> with:
4652
+ * .trigger(payload) → fire-and-forget, returns RunHandle
4653
+ * .triggerAndWait(payload) → dispatch + poll until complete
4654
+ * .batchTrigger(payloads) → parallel dispatch N runs
4655
+ *
4656
+ * RunHandle exposes waitForCompletion() and cancel().
4657
+ *
4658
+ * Config is auto-resolved from SYLPHX_SECRET_URL or passed explicitly via
4659
+ * TriggerOptions.config.
4660
+ *
4661
+ * @example TypeScript task (function mode — HTTP callback in running service)
4662
+ * ```typescript
4663
+ * export const sendEmail = task({
4664
+ * id: 'send-email',
4665
+ * run: async ({ to, subject }, { step }) => {
4666
+ * const validated = await step.run('validate', () => validate(to))
4667
+ * await step.sleep('cooldown', '5 minutes')
4668
+ * return step.run('send', () => mailer.send(validated, subject))
4669
+ * }
4670
+ * })
4671
+ *
4672
+ * // From anywhere — fully type-safe
4673
+ * const handle = await sendEmail.trigger({ to: 'kyle@...', subject: 'Hi' })
4674
+ * const result = await handle.waitForCompletion()
4675
+ * ```
4676
+ *
4677
+ * @example TypeScript task (job mode — isolated runtime, managed machine)
4678
+ * ```typescript
4679
+ * export const processVideo = task({
4680
+ * id: 'process-video',
4681
+ * machine: 'large',
4682
+ * run: async ({ videoUrl }) => { ... }
4683
+ * })
4684
+ * ```
4685
+ *
4686
+ * @example Cross-language stub (Python ML training)
4687
+ * ```typescript
4688
+ * // Register in sylphx.toml, then stub here for type safety:
4689
+ * export const trainFold = taskStub<
4690
+ * { fold: number; n_trials?: number },
4691
+ * { best_icir: number }
4692
+ * >('train-fold')
4693
+ *
4694
+ * // Dispatch 5 parallel folds
4695
+ * const handles = await trainFold.batchTrigger(
4696
+ * Array.from({ length: 5 }, (_, i) => ({ fold: i, n_trials: 200 }))
4697
+ * )
4698
+ * await Promise.all(handles.runs.map(h => h.waitForCompletion()))
4699
+ * ```
4700
+ */
4701
+
4702
+ type TaskMachineSize = MachineSize;
4703
+ interface TaskRunContext {
4704
+ step: StepContext;
4705
+ /** Current attempt number (starts at 1) */
4706
+ attempt: number;
4707
+ }
4708
+ interface StepContext {
4709
+ /** Execute a named step. Replays from cache if already completed (durable). */
4710
+ run<T>(id: string, fn: () => T | Promise<T>): Promise<T>;
4711
+ /** Sleep for a duration. Replays instantly if already resolved. */
4712
+ sleep(id: string, duration: string): Promise<void>;
4713
+ }
4714
+ interface TriggerOptions {
4715
+ /** Override auto-resolved config (defaults to SYLPHX_SECRET_URL env var) */
4716
+ config?: SylphxConfig;
4717
+ /** Deduplication key — same key within 24h returns existing run */
4718
+ idempotencyKey?: string;
4719
+ /** Delay dispatch, e.g. '5m', '1h' */
4720
+ delay?: string;
4721
+ /** Dispatch at specific time */
4722
+ scheduledFor?: Date;
4723
+ /** Override max retry attempts */
4724
+ maxAttempts?: number;
4725
+ /** Queue name override */
4726
+ queue?: string;
4727
+ }
4728
+ interface RunHandle$1<TResult = unknown> {
4729
+ /** Task run UUID */
4730
+ id: string;
4731
+ /** Current status at time of trigger */
4732
+ status: string;
4733
+ /**
4734
+ * Poll until the run reaches a terminal state (completed/failed/cancelled).
4735
+ * Throws if failed or timed out.
4736
+ */
4737
+ waitForCompletion(options?: {
4738
+ timeoutMs?: number;
4739
+ }): Promise<TResult>;
4740
+ /**
4741
+ * Record durable cancellation for this run. Pending/running/waiting/failed
4742
+ * runs become terminal and job-mode cleanup is retried by Platform.
4743
+ */
4744
+ cancel(): Promise<boolean>;
4745
+ }
4746
+ interface BatchHandle<TResult = unknown> {
4747
+ runs: RunHandle$1<TResult>[];
4748
+ }
4749
+ /** Inline trigger configuration on a task definition (ADR-040) */
4750
+ interface TaskTriggerConfig {
4751
+ /**
4752
+ * Cron schedule — automatically fires this task on the given schedule.
4753
+ * Standard 5-field cron expression: '0 2 * * *' (every day at 2am)
4754
+ * The platform registers this trigger on deploy via serve().
4755
+ */
4756
+ cron?: string;
4757
+ /**
4758
+ * Event name — automatically fires this task when the named event is published.
4759
+ * e.g. 'user.signup', 'order.created'
4760
+ * Future: event triggers are not yet dispatched by the platform.
4761
+ */
4762
+ event?: string;
4763
+ }
4764
+ interface TaskConfig<TPayload, TResult> {
4765
+ /** Stable task identifier — must not change across deploys */
4766
+ id: string;
4767
+ /**
4768
+ * Automatic trigger configuration (ADR-040).
4769
+ * If set, the platform registers this trigger when serve() is called.
4770
+ * trigger.cron → cron schedule fires task automatically
4771
+ * trigger.event → event fires task automatically
4772
+ */
4773
+ trigger?: TaskTriggerConfig;
4774
+ /**
4775
+ * Managed machine size. If set → task runs in an isolated runtime (job mode).
4776
+ * If absent → task runs as an HTTP callback in the running service (function mode).
4777
+ */
4778
+ machine?: TaskMachineSize;
4779
+ /** Queue config */
4780
+ queue?: {
4781
+ name?: string;
4782
+ concurrency?: number;
4783
+ };
4784
+ /** Retry policy */
4785
+ retry?: {
4786
+ maxAttempts?: number;
4787
+ backoff?: 'fixed' | 'exponential';
4788
+ };
4789
+ /** Timeout in seconds (default: 300 for function mode, 86400 for job mode) */
4790
+ timeout?: number;
4791
+ /** The task handler. In function mode: runs via HTTP dispatch. In job mode: runs in an isolated runtime. */
4792
+ run: (payload: TPayload, ctx: TaskRunContext) => Promise<TResult>;
4793
+ }
4794
+ interface TaskHandle<TPayload = unknown, TResult = unknown> {
4795
+ /** The stable task ID */
4796
+ readonly id: string;
4797
+ /** Trigger config if task has an automatic trigger (cron/event) */
4798
+ readonly _trigger?: TaskTriggerConfig;
4799
+ /** Managed machine size if job-mode task (undefined for function-mode or stubs) */
4800
+ readonly _machine?: TaskMachineSize;
4801
+ /**
4802
+ * The run function — used internally by serve() to register the handler.
4803
+ * undefined for taskStub (cross-language).
4804
+ */
4805
+ readonly _run?: (payload: TPayload, ctx: TaskRunContext) => Promise<TResult>;
4806
+ /** Dispatch the task. Returns immediately with a RunHandle. */
4807
+ trigger(payload: TPayload, options?: TriggerOptions): Promise<RunHandle$1<TResult>>;
4808
+ /** Dispatch and wait for result. Convenience wrapper over trigger + waitForCompletion. */
4809
+ triggerAndWait(payload: TPayload, options?: TriggerOptions): Promise<TResult>;
4810
+ /** Dispatch N runs in parallel. Returns handles for all. */
4811
+ batchTrigger(payloads: TPayload[], options?: TriggerOptions): Promise<BatchHandle<TResult>>;
4812
+ }
4813
+ /**
4814
+ * Define a typed task.
4815
+ *
4816
+ * Returns a TaskHandle<TPayload, TResult> that can be used to trigger the task
4817
+ * from anywhere (same service or different service) with full type safety.
4818
+ *
4819
+ * The returned handle's _run function is used by serve() to register the
4820
+ * HTTP handler for function-mode tasks.
4821
+ */
4822
+ declare function task<TPayload = unknown, TResult = unknown>(config: TaskConfig<TPayload, TResult>): TaskHandle<TPayload, TResult>;
4823
+ /**
4824
+ * Create a typed stub for a cross-language task (e.g. Python ML worker).
4825
+ *
4826
+ * The task must be registered separately via sylphx.toml manifest.
4827
+ * The stub provides type safety for the trigger call without requiring
4828
+ * a TypeScript handler.
4829
+ *
4830
+ * @example
4831
+ * ```typescript
4832
+ * export const trainFold = taskStub<
4833
+ * { fold: number; n_trials?: number },
4834
+ * { best_icir: number }
4835
+ * >('train-fold')
4836
+ *
4837
+ * const result = await trainFold.triggerAndWait({ fold: 0 })
4838
+ * console.log(result.best_icir) // typed!
4839
+ * ```
4840
+ */
4841
+ declare function taskStub<TPayload = unknown, TResult = unknown>(id: string): TaskHandle<TPayload, TResult>;
4842
+
4843
+ /**
4844
+ * serve()
4845
+ *
4846
+ * Create a Web API-compatible route handler for a set of task definitions.
4847
+ * Supports Next.js App Router, Hono, and any Web API Request/Response handler.
4848
+ *
4849
+ * serve() wires up:
4850
+ * - GET → health check, returns registered task IDs + trigger sync status
4851
+ * - POST → dispatch handler (receives from platform, routes to task run fn)
4852
+ *
4853
+ * On startup (first GET or POST), serve() automatically syncs all inline triggers
4854
+ * (task({ trigger: { cron: '...' } })) to the platform via TriggersClient.
4855
+ * This is idempotent — uses idempotencyKey = `task:{taskId}:{triggerType}:{value}`.
4856
+ *
4857
+ * Only function-mode tasks (no machine config) register HTTP handlers here.
4858
+ * Job-mode tasks are dispatched directly by the platform, but their
4859
+ * inline triggers are still synced.
4860
+ *
4861
+ * @example Next.js App Router
4862
+ * ```typescript
4863
+ * // app/api/tasks/route.ts
4864
+ * import { serve } from '@sylphx/sdk/tasks'
4865
+ * import { sendEmail, dailyCleanup } from '@/tasks'
4866
+ *
4867
+ * export const { GET, POST } = serve({ tasks: [sendEmail, dailyCleanup] })
4868
+ * ```
4869
+ *
4870
+ * @example Inline cron trigger
4871
+ * ```typescript
4872
+ * export const dailyCleanup = task({
4873
+ * id: 'daily-cleanup',
4874
+ * trigger: { cron: '0 2 * * *' },
4875
+ * run: async () => { ... },
4876
+ * })
4877
+ * // No TriggersClient.create() call needed — serve() registers it automatically.
4878
+ * ```
4879
+ */
4880
+
4881
+ interface ServeOptions {
4882
+ /** Task handles to serve */
4883
+ tasks: TaskHandle<unknown, unknown>[];
4884
+ /** Platform signing secret for verifying dispatches. Defaults to SYLPHX_SIGNING_SECRET env var. */
4885
+ signingSecret?: string;
4886
+ /**
4887
+ * Server connection URL for trigger registration.
4888
+ * Defaults to SYLPHX_SECRET_URL env var.
4889
+ * Only required if any tasks have inline trigger config.
4890
+ */
4891
+ connectionUrl?: string;
4892
+ }
4893
+ interface ServeResult {
4894
+ GET: (req: Request) => Promise<Response>;
4895
+ POST: (req: Request) => Promise<Response>;
4896
+ }
4897
+ /**
4898
+ * Create a route handler that serves task definitions.
4899
+ *
4900
+ * Auto-syncs inline triggers (task({ trigger: { cron: '...' } })) on first request.
4901
+ * Task sync is idempotent and non-blocking — handler responds even if sync is in progress.
4902
+ */
4903
+ declare function serve(options: ServeOptions): ServeResult;
4904
+
4568
4905
  /** Cron schedule */
4569
4906
  interface CronSchedule {
4570
4907
  /** Cron expression */
@@ -4592,6 +4929,15 @@ type NativeStepContext = {
4592
4929
  * On replay: returns the cached result without re-running fn.
4593
4930
  */
4594
4931
  run<T>(name: string, fn: () => T | Promise<T>): Promise<T>;
4932
+ /**
4933
+ * Execute an external side effect with a durable idempotency key.
4934
+ *
4935
+ * First encounter: signals Platform to persist a side-effect receipt before
4936
+ * the external call. Replay then invokes fn with that persisted key. If the
4937
+ * handler crashes after the external call but before completion settles, the
4938
+ * next replay reuses the same key so the downstream service suppresses duplicates.
4939
+ */
4940
+ sideEffect<T>(stepName: string, effectKey: string, externalService: string, fn: (idempotencyKey: string) => NativeSideEffectOutcome<T> | Promise<NativeSideEffectOutcome<T>>): Promise<T>;
4595
4941
  /**
4596
4942
  * Pause execution for the given duration.
4597
4943
  *
@@ -4629,6 +4975,20 @@ type NativeStepContext = {
4629
4975
  filter?: Record<string, unknown>;
4630
4976
  }): Promise<T | null>;
4631
4977
  };
4978
+ interface NativeSideEffectOutcome<T = unknown> {
4979
+ readonly handle?: string;
4980
+ readonly result: T;
4981
+ }
4982
+ interface NativeSideEffectReceipt {
4983
+ readonly stepName: string;
4984
+ readonly effectKey: string;
4985
+ readonly externalService: string;
4986
+ readonly idempotencyKey: string;
4987
+ readonly handle: string | null;
4988
+ readonly result: unknown;
4989
+ readonly completedAt: string | null;
4990
+ readonly createdAt: string;
4991
+ }
4632
4992
  /**
4633
4993
  * A named task definition registered with sylphx.tasks.define().
4634
4994
  */
@@ -4652,6 +5012,16 @@ interface NativeTaskDefinition<TPayload = unknown, TResult = unknown> {
4652
5012
  /**
4653
5013
  * The shape returned by GET/POST /tasks/:runId in the platform API.
4654
5014
  */
5015
+ type TaskRunDispatchLeaseState = 'active' | 'expired' | 'legacy';
5016
+ interface TaskRunDispatchLease {
5017
+ /**
5018
+ * Customer-safe dispatch claim state. Raw claim tokens and controller
5019
+ * identities are intentionally not exposed through the public SDK.
5020
+ */
5021
+ state: TaskRunDispatchLeaseState;
5022
+ claimedAt: string | null;
5023
+ expiresAt: string | null;
5024
+ }
4655
5025
  interface TaskRunStatus {
4656
5026
  id: string;
4657
5027
  taskName: string;
@@ -4664,6 +5034,13 @@ interface TaskRunStatus {
4664
5034
  scheduledFor?: string;
4665
5035
  startedAt?: string;
4666
5036
  completedAt?: string;
5037
+ dispatchLease?: TaskRunDispatchLease | null;
5038
+ definition?: {
5039
+ id: string;
5040
+ version: number | null;
5041
+ hash: string | null;
5042
+ source: string | null;
5043
+ } | null;
4667
5044
  createdAt: string;
4668
5045
  updatedAt: string;
4669
5046
  }
@@ -4722,7 +5099,7 @@ declare class StepSleepSignal {
4722
5099
  * @param completedSteps Map of stepName → cached result
4723
5100
  * @param resolvedWaits Map of stepName → wait result (sleep = undefined, event = event payload)
4724
5101
  */
4725
- declare function createStepContext(completedSteps: Map<string, unknown>, resolvedWaits: Map<string, unknown>): NativeStepContext;
5102
+ declare function createStepContext(completedSteps: Map<string, unknown>, resolvedWaits: Map<string, unknown>, sideEffectReceipts?: Map<string, NativeSideEffectReceipt>): NativeStepContext;
4726
5103
  /**
4727
5104
  * Constant-time HMAC-SHA256 signature verification.
4728
5105
  * Accepts both raw hex and 'sha256={hex}' formats.
@@ -4835,8 +5212,24 @@ declare function scheduleTask(config: SylphxConfig, input: TaskInput): Promise<T
4835
5212
  * Get a task's status by ID
4836
5213
  */
4837
5214
  declare function getTask(config: SylphxConfig, taskId: string): Promise<TaskStatus>;
5215
+ /** The durable step ledger entry surfaced by `getTaskRun`. */
5216
+ type TaskRunStep = DurableWorkTaskRunStep;
5217
+ /** The full durable task-run view surfaced by `getTaskRun`. */
5218
+ type TaskRunDetail = DurableWorkGetTaskRunResponse;
5219
+ /**
5220
+ * Get the full durable view of a task run, including the step ledger.
5221
+ *
5222
+ * Each step carries an `executorToken` — the opaque-but-stable identity of the
5223
+ * worker that materialized it. The token changes across a pod-kill resume, so
5224
+ * comparing executor tokens across steps is the evidence that a run resumed on
5225
+ * a different worker (durable HA). `status` reads `executed` for every recorded
5226
+ * step (a step is persisted once, on the dispatch that executed it; later
5227
+ * dispatches replay it from cache and record nothing). The platform never
5228
+ * returns step result payloads — only identity, executor, and timing.
5229
+ */
5230
+ declare function getTaskRun(config: SylphxConfig, runId: string): Promise<TaskRunDetail>;
4838
5231
  /**
4839
- * Cancel a pending task
5232
+ * Cancel a pending, running, waiting, or failed task run.
4840
5233
  */
4841
5234
  declare function cancelTask(config: SylphxConfig, taskId: string): Promise<boolean>;
4842
5235
  /**
@@ -8240,6 +8633,7 @@ interface ComputerUiSnapshot {
8240
8633
  /** ISO-8601 timestamp the snapshot was captured at. */
8241
8634
  capturedAt: string;
8242
8635
  }
8636
+
8243
8637
  interface SandboxRecord {
8244
8638
  id: string;
8245
8639
  status: 'starting' | 'running' | 'idle' | 'terminated' | 'error';
@@ -8311,6 +8705,21 @@ declare class SandboxWatch {
8311
8705
  /** Stop watching a path. */
8312
8706
  remove(path: string): Promise<void>;
8313
8707
  }
8708
+ declare class SandboxCapabilities {
8709
+ private readonly endpoint;
8710
+ private readonly token;
8711
+ constructor(endpoint: string, token: string);
8712
+ private authHeader;
8713
+ /**
8714
+ * Fetch the typed capability catalog for this sandbox image.
8715
+ *
8716
+ * Use this before selecting heavyweight toolchain paths. For example,
8717
+ * default sandboxes report Android emulator/device-test as `not-local`, so
8718
+ * agents can hand APK/AAB artifacts to a managed device runtime instead of
8719
+ * filling `/workspace` with emulator images.
8720
+ */
8721
+ get(): Promise<SandboxCapabilitiesReport>;
8722
+ }
8314
8723
  /**
8315
8724
  * Provision and drive persistent, headful, stealth browser sessions inside the
8316
8725
  * sandbox. The Platform owns the connectable browser primitive; the customer
@@ -8473,6 +8882,8 @@ declare class SandboxClient {
8473
8882
  readonly processes: SandboxProcesses | null;
8474
8883
  /** Filesystem watch management (direct to exec-server) */
8475
8884
  readonly watch: SandboxWatch | null;
8885
+ /** Typed capability catalog (direct to exec-server) */
8886
+ readonly capabilities: SandboxCapabilities | null;
8476
8887
  /** Persistent headful browser sessions (direct to exec-server — ADR-205) */
8477
8888
  readonly browser: SandboxBrowser | null;
8478
8889
  /** Persistent desktop (computer-use) sessions (direct to exec-server — ADR-207) */
@@ -8562,6 +8973,54 @@ declare class SandboxClient {
8562
8973
  private assertDirect;
8563
8974
  }
8564
8975
 
8976
+ /**
8977
+ * Render — declarative spec → image (charts via Vega-Lite, diagrams via Graphviz).
8978
+ *
8979
+ * Org-scoped client over the BaaS plane `POST /render`. The render engine runs the
8980
+ * spec in a per-render egress-denied microVM and returns the image bytes (ADR-2358).
8981
+ *
8982
+ * Wire-shape types are re-exported from `@sylphx/contract` (ADR-084). Type-only
8983
+ * imports keep the Effect runtime out of the published `.d.ts` surface
8984
+ * (check-published-sdk-effect-leak).
8985
+ */
8986
+
8987
+ /**
8988
+ * Render client — turn a declarative spec into an image.
8989
+ *
8990
+ * @example
8991
+ * ```typescript
8992
+ * import { createServerClient, RenderClient } from '@sylphx/sdk'
8993
+ *
8994
+ * const config = createServerClient(process.env.SYLPHX_SECRET_URL!)
8995
+ *
8996
+ * const result = await RenderClient.render(config, {
8997
+ * engine: 'vega-lite',
8998
+ * spec: JSON.stringify({
8999
+ * $schema: 'https://vega.github.io/schema/vega-lite/v5.json',
9000
+ * mark: 'bar',
9001
+ * data: { values: [{ a: 'A', b: 28 }, { a: 'B', b: 55 }] },
9002
+ * encoding: { x: { field: 'a', type: 'nominal' }, y: { field: 'b', type: 'quantitative' } },
9003
+ * }),
9004
+ * format: 'png',
9005
+ * })
9006
+ *
9007
+ * if (result.ok) {
9008
+ * const png = Buffer.from(result.bytesBase64, 'base64') // deliver / save
9009
+ * } else {
9010
+ * console.error(`render ${result.error.code}: ${result.error.message}`)
9011
+ * }
9012
+ * ```
9013
+ */
9014
+ declare const RenderClient: {
9015
+ /**
9016
+ * Render a chart (`engine: 'vega-lite'`, Vega-Lite JSON in `spec`) or a diagram
9017
+ * (`engine: 'graphviz'`, DOT in `spec`) to an image. The engine validates and
9018
+ * repairs the spec before rendering; on success returns base64 image bytes, on
9019
+ * failure a structured `error` with a `code` and `diagnostics`.
9020
+ */
9021
+ render(config: SylphxConfig, request: RenderRequest): Promise<RenderResult>;
9022
+ };
9023
+
8565
9024
  /**
8566
9025
  * Runs Client (ADR-040, formerly Workers)
8567
9026
  *
@@ -10026,4 +10485,4 @@ declare const functions: {
10026
10485
  };
10027
10486
  };
10028
10487
 
10029
- export { ACHIEVEMENT_TIER_CONFIG, type AIListModelsOptions, type AIListModelsResponse, type AIMessage, type AIMessageRole, type AIModel, type AIModelInfo, type AIModelsResponse, type AIProvider, type AIRateLimitInfo, type AIRateLimitResponse, type AIRequestType, type AIStreamChunk, type AITool, type AIToolCall, type AIUsageResponse, type AIUsageStats, type AccessTokenPayload, type AchievementCategory, type AchievementCriteria, type AchievementCriterion, type AchievementDefinition, type AchievementTier, type AchievementType, type AchievementUnlockEvent, type AdminUser, type AuditQueryFilter, type AuditQueryResult, AuthenticationError, AuthorizationError, BILLING_ALLOWED_ROLES, BUILD_MINUTES_INCLUDED, BUILD_MINUTE_PRICES, BUILD_SIZE_MULTIPLIERS, BYTES_PER_GB, type BackupCodesResult, type BatchEvent, type BatchIndexInput, type BatchIndexResult, type BillingAllowedRole, type Breadcrumb, type BrowserCreateOptions, type BrowserSessionInfo, type BrowserSessionStatus, type BuildConnectionUrlInput, type BuildLog, type BuildLogHistoryResponse, type BuildMachineTier, CI_BUILD_MINUTE_PRICE_MICRODOLLARS, CI_FREE_MINUTES_PER_MONTH, CI_MACOS_MULTIPLIER, CI_MACOS_SIZE_MULTIPLIERS, CI_SIZE_MULTIPLIERS, COMPUTE_PRICE_PER_HOUR_MICRODOLLARS, COMPUTE_RAM_RATE_MICRODOLLARS, COMPUTE_VCPU_ACTIVE_RATE_MICRODOLLARS, COMPUTE_VCPU_IDLE_RATE_MICRODOLLARS, CONSOLE_APP_SLUG, CREDENTIAL_REGEX, CREDIT_EXPIRY_MONTHS, type CaptureExceptionRequest, type CaptureMessageRequest, type ChallengeMethod, type ChallengeType, type ChallengeVerifyInput, type ChallengeVerifyResult, type ChatCompletionInput, type ChatCompletionResponse, type ChatInput, type ChatMessage, type ChatResult, type ChatStreamChunk, type CircuitBreakerConfig, CircuitBreakerOpenError, type CircuitState, type CommandResult, type ComputerDesktopStatus, type ComputerInputAction, type ComputerScreenshotFormat, type ComputerSessionInfo, type ComputerSessionStatus, type ComputerUiElement, type ComputerUiSnapshot, type ConnectionCredentialType, type ConnectionEnv, type ConsentCategory, type ConsentHistoryEntry, type ConsentHistoryResult, type ConsentPurposeDefaults, type ConsentType, type ContentPart, type CopyFileOptions, type CreateOrgInput, type CreatePermissionInput, type CreatePromoInput, type CreateRoleInput, type CreateRunOptions, type CreateTriggerOptions, type CriteriaOperator, type CronInput, type CronSchedule, type CronSource, DEFAULT_MAX_INSTANCES, DEFAULT_POINTS_REWARD, DISCOUNT_DURATION_MONTHS, DISCOUNT_PERCENT, type DatabaseConnectionInfo, type DatabaseStatus, type DatabaseStatusInfo, type DebugCategory, type DeduplicationConfig, type DeleteAccountResult, type DeleteDocumentInput, type DeployHistoryResponse, type DeployInfo, type DeployStatus, type DeviceApproveInput, type DeviceApproveResult, type DeviceDenyInput, type DeviceDenyResult, type DeviceGrant, type DeviceInitInput, type DevicePollResult, type DynamicRestClient, ERROR_CODE_STATUS, type EmailChangeInput, type EmailConfirmInput, type EmbedInput, type EmbedResult, type EmbeddingInput, type EmbeddingResponse, type LeaderboardEntry as EngagementLeaderboardEntry, type LeaderboardResult as EngagementLeaderboardResult, type EnvVar, type ErrorCode, type ErrorResponse, type EventSource, type ExceptionFrame, type ExceptionValue, type ExecEvent, type ExecOptions, type ExecResult, type ErrorDetails$1 as ExtractedErrorDetails, FREE_COMPUTE_HOURS, FREE_STORAGE_GB, type FacetsResponse, type FileEvent, type FlagContext, type FlagResult, type GetConsentHistoryInput, type GetConsentsInput, type GetFacetsInput, type GetSecretInput, type GetSecretResult, type GetSecretsInput, type GetSecretsResult, HOURS_PER_MONTH, type HttpTarget, INSTANCE_TYPES, INSTANCE_TYPE_ALIASES, INSTANCE_TYPE_ORDER, INVOICE_DUE_DAYS, type IdentifyInput, type ImpersonationActive, type ImpersonationEndResult, type ImpersonationInfo, type ImpersonationStartResult, type IndexDocumentInput, type IndexDocumentResult, type IngestLogsResult, type InstanceTypeDefinition, type InstanceTypeId, InvalidConnectionUrlError, type InviteMemberInput, type InviteUserRequest, type InviteUserResponse, KV_FREE_STORAGE_GB, type KvExpireRequest, type KvHgetRequest, type KvHgetallRequest, type KvHsetRequest, type KvIncrRequest, type KvLpushRequest, type KvLrangeRequest, type KvMetric, type KvMgetRequest, type KvMsetRequest, type KvRateLimitRequest, type KvRateLimitResult, type KvScanOptions, type KvScanResult, type KvSetOptions, type KvSetRequest, type KvZMember, type KvZaddRequest, type KvZrangeRequest, LEGACY_INSTANCE_TYPE_ORDER, type LeaderboardAggregation, type LeaderboardDefinition, type LeaderboardEntry$1 as LeaderboardEntry, type LeaderboardOptions, type LeaderboardQueryOptions, type LeaderboardResetPeriod, type LeaderboardResult$1 as LeaderboardResult, type LeaderboardSortDirection, type LinkAnonymousConsentsInput, type ListFilesOptions, type ListPromosOptions, type ListPromosResult, type ListRedemptionsOptions, type ListRedemptionsResult, type ListRunsOptions, type ListRunsResult, type ListScheduledEmailsOptions, type ListSecretKeysInput, type ListTriggersResult, type ListUsersOptions, type ListUsersResult, type LogEntry, type LogLevel, type LoginHistoryEntry, type LoginRequest, type LoginResponse, MAX_PASSWORD_LENGTH, MAX_PAYMENT_ATTEMPTS, MICRODOLLARS_PER_CENT, MIN_PASSWORD_LENGTH, type MeResponse, type MemberPermissionsResult, type MintAccessTokenClaims, type MintAccessTokenResult, type MonitoringResponse, type MonitoringSeverity, type NativeStepContext, type NativeTaskDefinition, type TaskRunStatus as NativeTaskRunStatus, NetworkError, NotFoundError, type OAuthAuthorizeInput, type OAuthAuthorizeResult, type OAuthCodeExchangeInput, type OAuthProvider, type OAuthProvidersResult, type OidcDiscoveryDocument, type OidcUserInfoResponse, type OrgRole, type OrgScopedTokenResponse, type OrgTokenPayload, type OrganizationInvitation, type OrganizationMember, type OrganizationMembership, type OrganizationsListResult, PASSWORD_REQUIREMENTS, PLATFORM_PLANS, PLATFORM_PLAN_ORDER, PLATFORM_PLAN_ORDER_ALL, PREMIUM_TRIAL_DAYS, type PageInput, type PaginatedResponse, type PaginationInput, type ParsedConnectionUrl, type ParsedUserAgent, type PasskeyRegistrationInput, type PasskeyRegistrationOptions, type PasskeySummary, type PasskeysList, type PasswordSetInput, type Permission, type PkceMethod, type Plan, type PlatformAccessTokenClaims, type PlatformFunctionsDownloadBundleResult, type PlatformLogoutInput, type PlatformPasswordChangeInput, type PlatformPasswordChangeResult, type PlatformPasswordSetInput, type PlatformPasswordSetResult, type PlatformPasswordStatusResult, type PlatformPlanDefinition, type PlatformPlanFeatures, type PlatformPlanId, type PlatformPlanLimits, type PlatformRealtimeChannel, type PlatformRealtimeCreateChannelResult, type PlatformRealtimeDeleteChannelResult, type PlatformRealtimeListChannelsResult, type PlatformRealtimeStatusResult, type PlatformRefreshInput, type PlatformRefreshResult, type PlatformSessionRenameInput, type PlatformSessionRenameResult, type PlatformSessionRevokeAllResult, type PlatformSessionRevokeInput, type PlatformSessionRevokeOtherResult, type PlatformSessionRevokeResult, type PlatformSessionsListResult, type PlatformUserDeleteInput, type PlatformUserDeleteResult, type PlatformUserExportResult, type PlatformUserRecord, type PlatformUserResolution, type ProcessEvent, type ProcessInfo, type ProcessStartOptions, type ProcessSummary, type ProjectMetadata, type PromoCode, type PromoRedemption, type PromoStatus, type PromoType, type PromoValidationPreview, type PublishEventResult, type PushCampaign, type PushCampaignStats, type PushCampaignVariant, type PushNotification, type PushNotificationPayload, type PushSegment, type PushSegmentFilter, type PushServiceWorkerConfig, type PushSubscription, type QueryLogsOptions, type QueryLogsResult, RETRYABLE_CODES, RateLimitError, type RateLimitStatusFilter, type RateLimitStatusResult, type RateLimitStrategiesFilter, type RateLimitStrategiesResult, type RateLimitStrategyDeleteInput, type RateLimitStrategyDeleteResult, type RateLimitStrategyUpsertInput, type RateLimitStrategyUpsertResult, type RealtimeEmitRequest, type RealtimeEmitResponse, type RealtimeHistoryRequest, type RealtimeHistoryResponse, type RealtimeMetric, type RecordActivityInput, type RecordActivityResult, type RedeemPromoInput, type RedeemPromoResult, type RedeemReferralInput, type RedeemResult, type ReferralCode, type ReferralStats, type RegisterInput, type RegisterRequest, type RegisterResponse, type ResendEmailVerificationRequest, type ResendEmailVerificationResponse, type RestClient, type RestClientConfig, type RestDynamicConfig, type RetryConfig, type RevokeTokenOptions, type Role, type RollbackDeployRequest, type Run, RunHandle, type RunLogsResult, type RunMachineSize, type RunResult, type RunStatus, type RunTarget, type RunVolumeMount, type CreateRunOptions as RunWorkerOptions, RunsClient, SERVICE_METRICS, STORAGE_PRICE_PER_GB_MONTH_MICRODOLLARS, SandboxBrowser, SandboxClient, SandboxComputer, type SandboxFile, SandboxFiles, type SandboxMachineSize, type SandboxOptions, SandboxProcesses, type SandboxRecord, SandboxWatch, type ScheduleEmailOptions, type ScheduledEmail, type ScheduledEmailStats, type ScheduledEmailsResult, type SearchInput, type SearchResponse, type SearchResultItem, type SearchStatsResult, type SearchType, type SecretKeyInfo, type SecurityAlert, type SecurityAlertsList, type SecurityScoreResult, type SecuritySettings, type SendEmailOptions, type SendResult, type SendTemplatedEmailOptions, type SendToUserOptions, type ServiceMetrics, type SessionResult, type SetConsentsInput, type SetEnvVarRequest, type SignedUrlOptions, StepCompleteSignal, StepSleepSignal, type StoredLogEntry, type StreakDefinition, type StreakFrequency, type StreakState, type StreamMessage, type SubmitScoreInput, type SubmitScoreResult, type Subscription, type SuccessResponse, type SylphxClientInput, type SylphxConfig, type SylphxConfigInput, SylphxError, type SylphxErrorCode, type SylphxErrorOptions, TRANSFER_PRICE_PER_GB_MICRODOLLARS, type TaskInput, type TaskResult, type TaskStatus, type TaskTarget, type TextCompletionInput, type TextCompletionResponse, TimeoutError, type TokenIntrospectionResult, type TokenResponse, type Tool, type ToolCall, type TrackClickInput, type TrackInput, type Trigger, type TriggerDeployRequest, type TriggerRunMachineSize, type TriggerSource, type TriggerSourceType, type TriggerStatus, type TriggerTarget, type TriggerTargetType, TriggersClient, type TwoFactorEnableResult, type TwoFactorSetupResult, type TwoFactorVerifyRequest, type UpdateOrgInput, type UpdatePromoInput, type UpdateRoleInput, type UpdateTriggerOptions, type UploadCreateOptions, type UploadProgressEvent, type UpsertDocumentInput, type UpsertDocumentResult, type User, type UserAchievement, type UserConsent, type UserDataExport, type UserFullProfile, type UserOrganization, type UserProfile, type UserSecuritySettings, type UserSession, type UserSessionsList, type UserUpdateProfileInput, type ValidatePromoInput, type ValidatePromoResult, ValidationError, type VisionInput, type WatchEntry, type WatchOptions, type WebhookConfig, type WebhookConfigUpdate, type WebhookDeliveriesResult, type WebhookDelivery, type WebhookStats, RunHandle as WorkerHandle, type RunLogsResult as WorkerLogsResult, type RunResult as WorkerResult, type Run as WorkerRun, type RunStatus as WorkerStatus, type RunVolumeMount as WorkerVolumeMount, WorkersClient, type WorkspaceRecord, acceptAllConsents, acceptOrganizationInvitation, assignMemberRole, audit, authorizeOAuth, batchIndex, buildConnectionUrl, calculatePercentage, canDeleteOrganization, canManageMembers, canManageSettings, cancelScheduledEmail, cancelTask, captureException, captureExceptionRaw, captureMessage, centsToDollars, chat, chatStream, checkFlag, complete, confirmEmailChange, cookies, createCheckout, createClient, createConfig, createCron, createDynamicRestClient, createOrganization, createPermission, createPortalSession, createPromo, createRestClient, createRole, createServerClient, createServiceWorkerScript, createStepContext, createTasksHandler, createTracker, createWorkspace, debugError, debugLog, debugTimer, debugWarn, declineOptionalConsents, deleteCron, deleteDocument, deleteEnvVar, deleteOrganization, deletePasskey, deletePermission, deletePromo, deleteRole, deleteUser, deleteUserAccount, deleteWorkspace, device, disableDebug, disableTwoFactor, disconnectOAuthProvider, dpop, embed, enableDebug, escapeCsvField, escapeHtml, exchangeOAuthCode, exponentialBackoff, exportUserData, extendedSignUp, getErrorDetails$1 as extractErrorDetails, getErrorMessage$1 as extractErrorMessage, forgotPassword, forkWorkspace, formatBytes, formatCents, formatCurrency, formatDate, formatDateTime, formatDuration, formatMicrodollars, formatMonthYear, formatNumber, formatPercent, formatRelativeTime, formatRelativeTimeShort, formatTime, functions, generateAnonymousId, generatePkce, generateReferralCode, generateSlug, getAchievement, getAchievementPoints, getAchievements, getActivePlans, getAllFlags, getAllSecrets, getAllStreaks, getAvailableInstanceTypes, getBackupCodes, getBaseUrl, getBillingBalance, getBillingStatusVariant, getBillingUsage, getBuildLogHistory, getCircuitBreakerState, getConsentHistory, getConsentTypes, getDatabaseConnectionString, getDatabaseStatus, getDebugMode, getDefaultInstanceType, getDeployHistory, getDeployStatus, getEnvPrefix, getErrorCode, getErrorDetails, getErrorMessage, getFacets, getFlagPayload, getFlags, getInvoiceStatusVariant, getLeaderboard, getMemberPermissions, getMyReferralCode, getOidcDiscoveryDocument, getOrgScopedToken, getOrganization, getOrganizationInvitations, getOrganizationMembers, getOrganizations, getPlanMonthlyPrice, getPlans, getProjectMetadata, getPromo, getPushPreferences, getRealtimeHistory, getReferralLeaderboard, getReferralStats, getRestErrorMessage, getRole, getSafeErrorMessage, getScheduledEmail, getScheduledEmailStats, getSearchStats, getSecret, getSecrets, getSecurityScore, getSession, getStreak, getSubscription, getTask, getUser, getUserByEmail, getUserConsents, getUserLeaderboardRank, getUserProfile, getUserSecurity, getVariant, getWebhookConfig, getWebhookDeliveries, getWebhookDelivery, getWebhookStats, getWorkspace, hasAllPermissions, hasAnyPermission, hasBillingAccess, hasConsent, hasError, hasPermission, hasRole, hasSecret, identify, impersonation, incrementAchievementProgress, indexDocument, ingestLogs, initPushServiceWorker, installGlobalDebugHelpers, introspectToken, inviteOrganizationMember, inviteUser, isChallengeRequired, isEmailConfigured, isEnabled, isPlanDeprecated, isRetryableError, isSylphxError, isValidInstanceType, kvDelete, kvExists, kvExpire, kvGet, kvGetJSON, kvHget, kvHgetall, kvHset, kvIncr, kvLpush, kvLrange, kvMget, kvMset, kvRateLimit, kvScan, kvSet, kvSetJSON, kvZadd, kvZrange, leaveOrganization, linkAnonymousConsents, listEnvVars, listOAuthProviders, listOrganizations, listPasskeys, listPermissions, listPromoRedemptions, listPromos, listRoles, listScheduledEmails, listSecretKeys, listSecurityAlerts, listTasks, listUserSessions, listUsers, listWorkspaces, markAllSecurityAlertsRead, markSecurityAlertRead, microsToDollars, oauth, page, parseConnectionUrl, parseOAuthCallback, parseUserAgent, password, pauseCron, platformAuth, campaigns as pushCampaigns, segments as pushSegments, queryLogs, rateLimits, realtime, realtimeEmit, recordStreakActivity, recoverStreak, redeemPromo, redeemReferralCode, refreshToken, regenerateBackupCodes, regenerateReferralCode, registerPush, registerPushServiceWorker, removeOrganizationMember, renamePasskey, renameUserSession, replayWebhookDelivery, requestEmailChange, rescheduleEmail, resendVerificationEmail, resetCircuitBreaker, resetDebugModeCache, resetPassword, resetPlatformCookieCache, resetPlatformJwksCache, resolveCanonicalInstanceType, resolveMaxInstances, resolveResources, resumeCron, revokeAllTokens, revokeOrganizationInvitation, revokeToken, revokeUserSession, rollbackDeploy, safeJsonParse, scheduleEmail, scheduleTask, search, sendEmail, sendEmailToUser, sendPush, sendTemplatedEmail, sessions, setConsents, setEnvVar, setPassword, setupTwoFactor, signIn, signOut, signUp, startPasskeyRegistration, storage, streamToString, submitScore, suspendUser, switchOrg, toSylphxError, track, trackBatch, trackClick, triggerDeploy, unlockAchievement, unregisterPush, updateOrganization, updateOrganizationMemberRole, updatePromo, updatePushPreferences, updateRole, updateUser, updateUserMetadata, updateUserProfile, updateWebhookConfig, upsertDocument, user, userInfo, validateInstanceTypeForPlan, validatePromo, verifyAccessToken, verifyChallenge, verifyEmail, verifyPasskeyRegistration, verifySignature as verifyTaskSignature, verifyTwoFactor, verifyTwoFactorEnable, withToken };
10488
+ export { ACHIEVEMENT_TIER_CONFIG, type AIListModelsOptions, type AIListModelsResponse, type AIMessage, type AIMessageRole, type AIModel, type AIModelInfo, type AIModelsResponse, type AIProvider, type AIRateLimitInfo, type AIRateLimitResponse, type AIRequestType, type AIStreamChunk, type AITool, type AIToolCall, type AIUsageResponse, type AIUsageStats, type AccessTokenPayload, type AchievementCategory, type AchievementCriteria, type AchievementCriterion, type AchievementDefinition, type AchievementTier, type AchievementType, type AchievementUnlockEvent, type AdminUser, type AuditQueryFilter, type AuditQueryResult, AuthenticationError, AuthorizationError, BILLING_ALLOWED_ROLES, BUILD_MINUTES_INCLUDED, BUILD_MINUTE_PRICES, BUILD_SIZE_MULTIPLIERS, BYTES_PER_GB, type BackupCodesResult, type BatchEvent, type BatchIndexInput, type BatchIndexResult, type BillingAllowedRole, type Breadcrumb, type BrowserCreateOptions, type BrowserSessionInfo, type BrowserSessionStatus, type BuildConnectionUrlInput, type BuildLog, type BuildLogHistoryResponse, type BuildMachineTier, CI_BUILD_MINUTE_PRICE_MICRODOLLARS, CI_FREE_MINUTES_PER_MONTH, CI_MACOS_MULTIPLIER, CI_MACOS_SIZE_MULTIPLIERS, CI_SIZE_MULTIPLIERS, COMPUTE_PRICE_PER_HOUR_MICRODOLLARS, COMPUTE_RAM_RATE_MICRODOLLARS, COMPUTE_VCPU_ACTIVE_RATE_MICRODOLLARS, COMPUTE_VCPU_IDLE_RATE_MICRODOLLARS, CONSOLE_APP_SLUG, CREDENTIAL_REGEX, CREDIT_EXPIRY_MONTHS, type CaptureExceptionRequest, type CaptureMessageRequest, type ChallengeMethod, type ChallengeType, type ChallengeVerifyInput, type ChallengeVerifyResult, type ChatCompletionInput, type ChatCompletionResponse, type ChatInput, type ChatMessage, type ChatResult, type ChatStreamChunk, type CircuitBreakerConfig, CircuitBreakerOpenError, type CircuitState, type CommandResult, type ComputerDesktopStatus, type ComputerInputAction, type ComputerScreenshotFormat, type ComputerSessionInfo, type ComputerSessionStatus, type ComputerUiElement, type ComputerUiSnapshot, type ConnectionCredentialType, type ConnectionEnv, type ConsentCategory, type ConsentHistoryEntry, type ConsentHistoryResult, type ConsentPurposeDefaults, type ConsentType, type ContentPart, type CopyFileOptions, type CreateOrgInput, type CreatePermissionInput, type CreatePromoInput, type CreateRoleInput, type CreateRunOptions, type CreateTriggerOptions, type CriteriaOperator, type CronInput, type CronSchedule, type CronSource, DEFAULT_MAX_INSTANCES, DEFAULT_POINTS_REWARD, DISCOUNT_DURATION_MONTHS, DISCOUNT_PERCENT, type DatabaseConnectionInfo, type DatabaseStatus, type DatabaseStatusInfo, type DebugCategory, type DeduplicationConfig, type DeleteAccountResult, type DeleteDocumentInput, type DeployHistoryResponse, type DeployInfo, type DeployStatus, type DeviceApproveInput, type DeviceApproveResult, type DeviceDenyInput, type DeviceDenyResult, type DeviceGrant, type DeviceInitInput, type DevicePollResult, type DynamicRestClient, ERROR_CODE_STATUS, type EmailChangeInput, type EmailConfirmInput, type EmbedInput, type EmbedResult, type EmbeddingInput, type EmbeddingResponse, type LeaderboardEntry as EngagementLeaderboardEntry, type LeaderboardResult as EngagementLeaderboardResult, type EnvVar, type ErrorCode, type ErrorResponse, type EventSource, type ExceptionFrame, type ExceptionValue, type ExecEvent, type ExecOptions, type ExecResult, type ErrorDetails$1 as ExtractedErrorDetails, FREE_COMPUTE_HOURS, FREE_STORAGE_GB, type FacetsResponse, type FileEvent, type FlagContext, type FlagResult, type GetConsentHistoryInput, type GetConsentsInput, type GetFacetsInput, type GetSecretInput, type GetSecretResult, type GetSecretsInput, type GetSecretsResult, HOURS_PER_MONTH, type HttpTarget, INSTANCE_TYPES, INSTANCE_TYPE_ALIASES, INSTANCE_TYPE_ORDER, INVOICE_DUE_DAYS, type IdentifyInput, type ImpersonationActive, type ImpersonationEndResult, type ImpersonationInfo, type ImpersonationStartResult, type IndexDocumentInput, type IndexDocumentResult, type IngestLogsResult, type InstanceTypeDefinition, type InstanceTypeId, InvalidConnectionUrlError, type InviteMemberInput, type InviteUserRequest, type InviteUserResponse, KV_FREE_STORAGE_GB, type KvExpireRequest, type KvHgetRequest, type KvHgetallRequest, type KvHsetRequest, type KvIncrRequest, type KvLpushRequest, type KvLrangeRequest, type KvMetric, type KvMgetRequest, type KvMsetRequest, type KvRateLimitRequest, type KvRateLimitResult, type KvScanOptions, type KvScanResult, type KvSetOptions, type KvSetRequest, type KvZMember, type KvZaddRequest, type KvZrangeRequest, LEGACY_INSTANCE_TYPE_ORDER, type LeaderboardAggregation, type LeaderboardDefinition, type LeaderboardEntry$1 as LeaderboardEntry, type LeaderboardOptions, type LeaderboardQueryOptions, type LeaderboardResetPeriod, type LeaderboardResult$1 as LeaderboardResult, type LeaderboardSortDirection, type LinkAnonymousConsentsInput, type ListFilesOptions, type ListPromosOptions, type ListPromosResult, type ListRedemptionsOptions, type ListRedemptionsResult, type ListRunsOptions, type ListRunsResult, type ListScheduledEmailsOptions, type ListSecretKeysInput, type ListTriggersResult, type ListUsersOptions, type ListUsersResult, type LogEntry, type LogLevel, type LoginHistoryEntry, type LoginRequest, type LoginResponse, MAX_PASSWORD_LENGTH, MAX_PAYMENT_ATTEMPTS, MICRODOLLARS_PER_CENT, MIN_PASSWORD_LENGTH, type MeResponse, type MemberPermissionsResult, type MintAccessTokenClaims, type MintAccessTokenResult, type MonitoringResponse, type MonitoringSeverity, type NativeStepContext, type NativeTaskDefinition, type TaskRunStatus as NativeTaskRunStatus, NetworkError, NotFoundError, type OAuthAuthorizeInput, type OAuthAuthorizeResult, type OAuthCodeExchangeInput, type OAuthProvider, type OAuthProvidersResult, type OidcDiscoveryDocument, type OidcUserInfoResponse, type OrgRole, type OrgScopedTokenResponse, type OrgTokenPayload, type OrganizationInvitation, type OrganizationMember, type OrganizationMembership, type OrganizationsListResult, PASSWORD_REQUIREMENTS, PLATFORM_PLANS, PLATFORM_PLAN_ORDER, PLATFORM_PLAN_ORDER_ALL, PREMIUM_TRIAL_DAYS, type PageInput, type PaginatedResponse, type PaginationInput, type ParsedConnectionUrl, type ParsedUserAgent, type PasskeyRegistrationInput, type PasskeyRegistrationOptions, type PasskeySummary, type PasskeysList, type PasswordSetInput, type Permission, type PkceMethod, type Plan, type PlatformAccessTokenClaims, type PlatformFunctionsDownloadBundleResult, type PlatformLogoutInput, type PlatformPasswordChangeInput, type PlatformPasswordChangeResult, type PlatformPasswordSetInput, type PlatformPasswordSetResult, type PlatformPasswordStatusResult, type PlatformPlanDefinition, type PlatformPlanFeatures, type PlatformPlanId, type PlatformPlanLimits, type PlatformRealtimeChannel, type PlatformRealtimeCreateChannelResult, type PlatformRealtimeDeleteChannelResult, type PlatformRealtimeListChannelsResult, type PlatformRealtimeStatusResult, type PlatformRefreshInput, type PlatformRefreshResult, type PlatformSessionRenameInput, type PlatformSessionRenameResult, type PlatformSessionRevokeAllResult, type PlatformSessionRevokeInput, type PlatformSessionRevokeOtherResult, type PlatformSessionRevokeResult, type PlatformSessionsListResult, type PlatformUserDeleteInput, type PlatformUserDeleteResult, type PlatformUserExportResult, type PlatformUserRecord, type PlatformUserResolution, type ProcessEvent, type ProcessInfo, type ProcessStartOptions, type ProcessSummary, type ProjectMetadata, type PromoCode, type PromoRedemption, type PromoStatus, type PromoType, type PromoValidationPreview, type PublishEventResult, type PushCampaign, type PushCampaignStats, type PushCampaignVariant, type PushNotification, type PushNotificationPayload, type PushSegment, type PushSegmentFilter, type PushServiceWorkerConfig, type PushSubscription, type QueryLogsOptions, type QueryLogsResult, RETRYABLE_CODES, RateLimitError, type RateLimitStatusFilter, type RateLimitStatusResult, type RateLimitStrategiesFilter, type RateLimitStrategiesResult, type RateLimitStrategyDeleteInput, type RateLimitStrategyDeleteResult, type RateLimitStrategyUpsertInput, type RateLimitStrategyUpsertResult, type RealtimeEmitRequest, type RealtimeEmitResponse, type RealtimeHistoryRequest, type RealtimeHistoryResponse, type RealtimeMetric, type RecordActivityInput, type RecordActivityResult, type RedeemPromoInput, type RedeemPromoResult, type RedeemReferralInput, type RedeemResult, type ReferralCode, type ReferralStats, type RegisterInput, type RegisterRequest, type RegisterResponse, RenderClient, type ResendEmailVerificationRequest, type ResendEmailVerificationResponse, type RestClient, type RestClientConfig, type RestDynamicConfig, type RetryConfig, type RevokeTokenOptions, type Role, type RollbackDeployRequest, type Run, RunHandle, type RunLogsResult, type RunMachineSize, type RunResult, type RunStatus, type RunTarget, type RunVolumeMount, type CreateRunOptions as RunWorkerOptions, RunsClient, SERVICE_METRICS, STORAGE_PRICE_PER_GB_MONTH_MICRODOLLARS, SandboxBrowser, SandboxCapabilities, SandboxClient, SandboxComputer, type SandboxFile, SandboxFiles, type SandboxMachineSize, type SandboxOptions, SandboxProcesses, type SandboxRecord, SandboxWatch, type ScheduleEmailOptions, type ScheduledEmail, type ScheduledEmailStats, type ScheduledEmailsResult, type SearchInput, type SearchResponse, type SearchResultItem, type SearchStatsResult, type SearchType, type SecretKeyInfo, type SecurityAlert, type SecurityAlertsList, type SecurityScoreResult, type SecuritySettings, type SendEmailOptions, type SendResult, type SendTemplatedEmailOptions, type SendToUserOptions, type ServeOptions, type ServeResult, type ServiceCredentials, type ServiceMetrics, type ServiceTokenResponse, type SessionResult, type SetConsentsInput, type SetEnvVarRequest, type SignedUrlOptions, StepCompleteSignal, StepSleepSignal, type StoredLogEntry, type StreakDefinition, type StreakFrequency, type StreakState, type StreamMessage, type SubmitScoreInput, type SubmitScoreResult, type Subscription, type SuccessResponse, type SylphxClientInput, type SylphxConfig, type SylphxConfigInput, SylphxError, type SylphxErrorCode, type SylphxErrorOptions, TRANSFER_PRICE_PER_GB_MICRODOLLARS, type TaskConfig, type TaskHandle, type TaskInput, type TaskMachineSize, type TaskResult, type TaskRunContext, type TaskRunDetail, type TaskRunStep, type TaskStatus, type TaskTarget, type TextCompletionInput, type TextCompletionResponse, TimeoutError, type TokenIntrospectionResult, type TokenResponse, type Tool, type ToolCall, type TrackClickInput, type TrackInput, type Trigger, type TriggerDeployRequest, type TriggerOptions, type TriggerRunMachineSize, type TriggerSource, type TriggerSourceType, type TriggerStatus, type TriggerTarget, type TriggerTargetType, TriggersClient, type TwoFactorEnableResult, type TwoFactorSetupResult, type TwoFactorVerifyRequest, type UpdateOrgInput, type UpdatePromoInput, type UpdateRoleInput, type UpdateTriggerOptions, type UploadCreateOptions, type UploadProgressEvent, type UpsertDocumentInput, type UpsertDocumentResult, type User, type UserAchievement, type UserConsent, type UserDataExport, type UserFullProfile, type UserOrganization, type UserProfile, type UserSecuritySettings, type UserSession, type UserSessionsList, type UserUpdateProfileInput, type ValidatePromoInput, type ValidatePromoResult, ValidationError, type VisionInput, type WatchEntry, type WatchOptions, type WebhookConfig, type WebhookConfigUpdate, type WebhookDeliveriesResult, type WebhookDelivery, type WebhookStats, RunHandle as WorkerHandle, type RunLogsResult as WorkerLogsResult, type RunResult as WorkerResult, type Run as WorkerRun, type RunStatus as WorkerStatus, type RunVolumeMount as WorkerVolumeMount, WorkersClient, type WorkspaceRecord, acceptAllConsents, acceptOrganizationInvitation, assignMemberRole, audit, authorizeOAuth, batchIndex, buildConnectionUrl, calculatePercentage, canDeleteOrganization, canManageMembers, canManageSettings, cancelScheduledEmail, cancelTask, captureException, captureExceptionRaw, captureMessage, centsToDollars, chat, chatStream, checkFlag, complete, confirmEmailChange, cookies, createCheckout, createClient, createConfig, createCron, createDynamicRestClient, createOrganization, createPermission, createPortalSession, createPromo, createRestClient, createRole, createServerClient, createServiceWorkerScript, createStepContext, createTasksHandler, createTracker, createWorkspace, debugError, debugLog, debugTimer, debugWarn, declineOptionalConsents, deleteCron, deleteDocument, deleteEnvVar, deleteOrganization, deletePasskey, deletePermission, deletePromo, deleteRole, deleteUser, deleteUserAccount, deleteWorkspace, device, disableDebug, disableTwoFactor, disconnectOAuthProvider, dpop, embed, enableDebug, escapeCsvField, escapeHtml, exchangeOAuthCode, exponentialBackoff, exportUserData, extendedSignUp, getErrorDetails$1 as extractErrorDetails, getErrorMessage$1 as extractErrorMessage, forgotPassword, forkWorkspace, formatBytes, formatCents, formatCurrency, formatDate, formatDateTime, formatDuration, formatMicrodollars, formatMonthYear, formatNumber, formatPercent, formatRelativeTime, formatRelativeTimeShort, formatTime, functions, generateAnonymousId, generatePkce, generateReferralCode, generateSlug, getAchievement, getAchievementPoints, getAchievements, getActivePlans, getAllFlags, getAllSecrets, getAllStreaks, getAvailableInstanceTypes, getBackupCodes, getBaseUrl, getBillingBalance, getBillingStatusVariant, getBillingUsage, getBuildLogHistory, getCircuitBreakerState, getConsentHistory, getConsentTypes, getDatabaseConnectionString, getDatabaseStatus, getDebugMode, getDefaultInstanceType, getDeployHistory, getDeployStatus, getEnvPrefix, getErrorCode, getErrorDetails, getErrorMessage, getFacets, getFlagPayload, getFlags, getInvoiceStatusVariant, getLeaderboard, getMemberPermissions, getMyReferralCode, getOidcDiscoveryDocument, getOrgScopedToken, getOrganization, getOrganizationInvitations, getOrganizationMembers, getOrganizations, getPlanMonthlyPrice, getPlans, getProjectMetadata, getPromo, getPushPreferences, getRealtimeHistory, getReferralLeaderboard, getReferralStats, getRestErrorMessage, getRole, getSafeErrorMessage, getScheduledEmail, getScheduledEmailStats, getSearchStats, getSecret, getSecrets, getSecurityScore, getSession, getStreak, getSubscription, getTask, getTaskRun, getUser, getUserByEmail, getUserConsents, getUserLeaderboardRank, getUserProfile, getUserSecurity, getVariant, getWebhookConfig, getWebhookDeliveries, getWebhookDelivery, getWebhookStats, getWorkspace, getWorkspaceCapacity, hasAllPermissions, hasAnyPermission, hasBillingAccess, hasConsent, hasError, hasPermission, hasRole, hasSecret, identify, impersonation, incrementAchievementProgress, indexDocument, ingestLogs, initPushServiceWorker, installGlobalDebugHelpers, introspectToken, inviteOrganizationMember, inviteUser, isChallengeRequired, isEmailConfigured, isEnabled, isPlanDeprecated, isRetryableError, isSylphxError, isValidInstanceType, kvDelete, kvExists, kvExpire, kvGet, kvGetJSON, kvHget, kvHgetall, kvHset, kvIncr, kvLpush, kvLrange, kvMget, kvMset, kvRateLimit, kvScan, kvSet, kvSetJSON, kvZadd, kvZrange, leaveOrganization, linkAnonymousConsents, listEnvVars, listOAuthProviders, listOrganizations, listPasskeys, listPermissions, listPromoRedemptions, listPromos, listRoles, listScheduledEmails, listSecretKeys, listSecurityAlerts, listTasks, listUserSessions, listUsers, listWorkspaces, markAllSecurityAlertsRead, markSecurityAlertRead, microsToDollars, oauth, page, parseConnectionUrl, parseOAuthCallback, parseUserAgent, password, pauseCron, pinWorkspace, platformAuth, campaigns as pushCampaigns, segments as pushSegments, queryLogs, rateLimits, realtime, realtimeEmit, reclaimWorkspace, recordStreakActivity, recoverStreak, redeemPromo, redeemReferralCode, refreshToken, regenerateBackupCodes, regenerateReferralCode, registerPush, registerPushServiceWorker, removeOrganizationMember, renamePasskey, renameUserSession, replayWebhookDelivery, requestEmailChange, rescheduleEmail, resendVerificationEmail, resetCircuitBreaker, resetDebugModeCache, resetPassword, resetPlatformCookieCache, resetPlatformJwksCache, resolveCanonicalInstanceType, resolveMaxInstances, resolveResources, resumeCron, revokeAllTokens, revokeOrganizationInvitation, revokeToken, revokeUserSession, rollbackDeploy, safeJsonParse, scheduleEmail, scheduleTask, search, sendEmail, sendEmailToUser, sendPush, sendTemplatedEmail, serve, sessions, setConsents, setEnvVar, setPassword, setupTwoFactor, signIn, signInAsService, signOut, signUp, startPasskeyRegistration, storage, streamToString, submitScore, suspendUser, switchOrg, task, taskStub, toSylphxError, track, trackBatch, trackClick, triggerDeploy, unlockAchievement, unregisterPush, updateOrganization, updateOrganizationMemberRole, updatePromo, updatePushPreferences, updateRole, updateUser, updateUserMetadata, updateUserProfile, updateWebhookConfig, upsertDocument, user, userInfo, validateInstanceTypeForPlan, validatePromo, verifyAccessToken, verifyChallenge, verifyEmail, verifyPasskeyRegistration, verifySignature as verifyTaskSignature, verifyTwoFactor, verifyTwoFactorEnable, withToken };