@sylphx/sdk 0.19.3 → 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/README.md CHANGED
@@ -208,6 +208,34 @@ These helpers expose the public workflow label contract only. Applications do
208
208
  not need to know the backing scheduler, cluster, runner group, capacity formula,
209
209
  or placement details.
210
210
 
211
+ ## Sandbox Capability Catalog
212
+
213
+ Sandbox clients expose the authenticated capability report served by the
214
+ exec-server:
215
+
216
+ ```ts
217
+ import { SandboxClient } from '@sylphx/sdk'
218
+
219
+ const sandbox = await SandboxClient.create(sylphx)
220
+ const report = await sandbox.capabilities.get()
221
+
222
+ const storage = report.capabilities.find((capability) => capability.id === 'workspace-storage')
223
+ if (storage?.workspaceStorage?.pressure === 'critical') {
224
+ // Clean caches/artifacts, fork from a clean workspace, or offload heavy work.
225
+ }
226
+
227
+ const mobile = report.capabilities.find((capability) => capability.id === 'mobile-device-test')
228
+ if (mobile?.status === 'not-local') {
229
+ // Build artifacts in the workspace or CI, then run device tests through the
230
+ // managed mobile device runtime when available.
231
+ }
232
+ ```
233
+
234
+ The report is tenant-neutral and product-level. It tells agents what is local to
235
+ the sandbox (`exec`, files, browser, desktop) versus another Platform execution
236
+ plane (`ci-runner`, `managed-device-runtime`) without exposing Kubernetes
237
+ placement or storage internals.
238
+
211
239
  ### Prefetch App Config
212
240
 
213
241
  ```ts
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, 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, BillingPortalRequest as PortalRequest, BillingPortalResponse as PortalResponse, SignedUrlDisposition, File as StorageFile, UploadId, BillingUsageResponse as UsageResponse, formatCiRunnerWorkflowRunsOn, getCiRunnerProfileById } 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
  /**
@@ -4637,6 +4640,268 @@ declare const campaigns: {
4637
4640
  stats(config: SylphxConfig, id: string): Promise<PushCampaignStats>;
4638
4641
  };
4639
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
+
4640
4905
  /** Cron schedule */
4641
4906
  interface CronSchedule {
4642
4907
  /** Cron expression */
@@ -4664,6 +4929,15 @@ type NativeStepContext = {
4664
4929
  * On replay: returns the cached result without re-running fn.
4665
4930
  */
4666
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>;
4667
4941
  /**
4668
4942
  * Pause execution for the given duration.
4669
4943
  *
@@ -4701,6 +4975,20 @@ type NativeStepContext = {
4701
4975
  filter?: Record<string, unknown>;
4702
4976
  }): Promise<T | null>;
4703
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
+ }
4704
4992
  /**
4705
4993
  * A named task definition registered with sylphx.tasks.define().
4706
4994
  */
@@ -4724,6 +5012,16 @@ interface NativeTaskDefinition<TPayload = unknown, TResult = unknown> {
4724
5012
  /**
4725
5013
  * The shape returned by GET/POST /tasks/:runId in the platform API.
4726
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
+ }
4727
5025
  interface TaskRunStatus {
4728
5026
  id: string;
4729
5027
  taskName: string;
@@ -4736,6 +5034,13 @@ interface TaskRunStatus {
4736
5034
  scheduledFor?: string;
4737
5035
  startedAt?: string;
4738
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;
4739
5044
  createdAt: string;
4740
5045
  updatedAt: string;
4741
5046
  }
@@ -4794,7 +5099,7 @@ declare class StepSleepSignal {
4794
5099
  * @param completedSteps Map of stepName → cached result
4795
5100
  * @param resolvedWaits Map of stepName → wait result (sleep = undefined, event = event payload)
4796
5101
  */
4797
- 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;
4798
5103
  /**
4799
5104
  * Constant-time HMAC-SHA256 signature verification.
4800
5105
  * Accepts both raw hex and 'sha256={hex}' formats.
@@ -4907,8 +5212,24 @@ declare function scheduleTask(config: SylphxConfig, input: TaskInput): Promise<T
4907
5212
  * Get a task's status by ID
4908
5213
  */
4909
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>;
4910
5231
  /**
4911
- * Cancel a pending task
5232
+ * Cancel a pending, running, waiting, or failed task run.
4912
5233
  */
4913
5234
  declare function cancelTask(config: SylphxConfig, taskId: string): Promise<boolean>;
4914
5235
  /**
@@ -8312,6 +8633,7 @@ interface ComputerUiSnapshot {
8312
8633
  /** ISO-8601 timestamp the snapshot was captured at. */
8313
8634
  capturedAt: string;
8314
8635
  }
8636
+
8315
8637
  interface SandboxRecord {
8316
8638
  id: string;
8317
8639
  status: 'starting' | 'running' | 'idle' | 'terminated' | 'error';
@@ -8383,6 +8705,21 @@ declare class SandboxWatch {
8383
8705
  /** Stop watching a path. */
8384
8706
  remove(path: string): Promise<void>;
8385
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
+ }
8386
8723
  /**
8387
8724
  * Provision and drive persistent, headful, stealth browser sessions inside the
8388
8725
  * sandbox. The Platform owns the connectable browser primitive; the customer
@@ -8545,6 +8882,8 @@ declare class SandboxClient {
8545
8882
  readonly processes: SandboxProcesses | null;
8546
8883
  /** Filesystem watch management (direct to exec-server) */
8547
8884
  readonly watch: SandboxWatch | null;
8885
+ /** Typed capability catalog (direct to exec-server) */
8886
+ readonly capabilities: SandboxCapabilities | null;
8548
8887
  /** Persistent headful browser sessions (direct to exec-server — ADR-205) */
8549
8888
  readonly browser: SandboxBrowser | null;
8550
8889
  /** Persistent desktop (computer-use) sessions (direct to exec-server — ADR-207) */
@@ -8634,6 +8973,54 @@ declare class SandboxClient {
8634
8973
  private assertDirect;
8635
8974
  }
8636
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
+
8637
9024
  /**
8638
9025
  * Runs Client (ADR-040, formerly Workers)
8639
9026
  *
@@ -10098,4 +10485,4 @@ declare const functions: {
10098
10485
  };
10099
10486
  };
10100
10487
 
10101
- 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 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 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, signInAsService, 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 };