@sylphx/sdk 0.10.6 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { 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, DeviceApproveRequest, DeviceApproveResponse, DeviceDenyRequest, DeviceDenyResponse, DeviceInitResponse, DeviceInitRequest, DevicePollResponse, LoginRequest as LoginRequest$1, LoginResponse as LoginResponse$1, UserFullProfile as UserFullProfile$1, LogoutInput, PlatformPasswordChangeRequest, PlatformPasswordChangeResponse, PlatformPasswordSetRequest, PlatformPasswordSetResponse, PlatformPasswordStatusResponse, RefreshTokenInput, RefreshTokenResult, PlatformSessionRenameRequest, PlatformSessionRenameResponse, PlatformSessionRevokeAllResponse, PlatformSessionRevokeRequest, PlatformSessionRevokeOtherResponse, PlatformSessionRevokeResponse, PlatformSessionsListResponse, AuthUserDeleteRequest, AuthUserDeleteResponse, AuthUserExportResponse, RegisterRequest as RegisterRequest$1, RegisterResponse as RegisterResponse$1, ResendEmailVerificationRequest as ResendEmailVerificationRequest$1, ResendEmailVerificationResponse as ResendEmailVerificationResponse$1, AuthTokensResponse, TwoFactorVerifyRequest as TwoFactorVerifyRequest$1, OAuthIntrospectResponse, 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 } from '@sylphx/contract';
1
+ import { 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, DeviceApproveRequest, DeviceApproveResponse, DeviceDenyRequest, DeviceDenyResponse, DeviceInitResponse, DeviceInitRequest, DevicePollResponse, LoginRequest as LoginRequest$1, LoginResponse as LoginResponse$1, UserFullProfile as UserFullProfile$1, LogoutInput, PlatformPasswordChangeRequest, PlatformPasswordChangeResponse, PlatformPasswordSetRequest, PlatformPasswordSetResponse, PlatformPasswordStatusResponse, RefreshTokenInput, RefreshTokenResult, PlatformSessionRenameRequest, PlatformSessionRenameResponse, PlatformSessionRevokeAllResponse, PlatformSessionRevokeRequest, PlatformSessionRevokeOtherResponse, PlatformSessionRevokeResponse, PlatformSessionsListResponse, AuthUserDeleteRequest, AuthUserDeleteResponse, AuthUserExportResponse, RegisterRequest as RegisterRequest$1, RegisterResponse as RegisterResponse$1, ResendEmailVerificationRequest as ResendEmailVerificationRequest$1, ResendEmailVerificationResponse as ResendEmailVerificationResponse$1, AuthTokensResponse, TwoFactorVerifyRequest as TwoFactorVerifyRequest$1, OAuthIntrospectResponse, 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';
2
2
  export { BillingBalanceResponse as BalanceResponse, BillingCheckoutRequest as CheckoutRequest, BillingCheckoutResponse as CheckoutResponse, FileId, FileVersion, FileVersionId, FileVisibility, Organization, BillingPortalRequest as PortalRequest, BillingPortalResponse as PortalResponse, SignedUrlDisposition, File as StorageFile, UploadId, BillingUsageResponse as UsageResponse } from '@sylphx/contract';
3
3
 
4
4
  /**
@@ -7,19 +7,19 @@ export { BillingBalanceResponse as BalanceResponse, BillingCheckoutRequest as Ch
7
7
  *
8
8
  * Function-bundle download for the Sylphx-internal edge-runtime
9
9
  * orchestrator. Unlike the sibling Platform namespaces this one
10
- * authenticates with a shared `internalToken` (cluster-internal secret)
10
+ * authenticates with a shared `internalToken` (service-internal secret)
11
11
  * rather than a platform-audience JWT, because the caller is another
12
12
  * Sylphx service (the edge-runtime that spawns V8 isolates to invoke
13
13
  * user functions) not an end user. The BaaS runtime
14
14
  * (`apps/runtime/src/server/runtime/routes/functions/admin.ts`)
15
- * owns the raw `@aws-sdk/client-s3` client — Platform callers
16
- * dogfood through this SDK surface and never touch the S3 primitive.
15
+ * owns the object-storage implementation — Platform callers dogfood through
16
+ * this SDK surface and never touch backend storage credentials.
17
17
  *
18
18
  * Phase Σ1 SoC rename: this was previously exported out of `./auth`
19
19
  * as `functions` (re-exported at the package root as `functionsInternal`)
20
20
  * and spoke to `/auth/platform-functions/*`. The server-side surface
21
21
  * moved to `/v1/functions/admin/*` (function bundle admin is a
22
- * cross-cutting BaaS primitive — infrastructure storage — not an auth
22
+ * cross-cutting BaaS primitive — function bundle storage — not an auth
23
23
  * verb); this SDK module nests the admin verbs under
24
24
  * `functions.admin.*` at the package root.
25
25
  */
@@ -39,8 +39,8 @@ interface PlatformFunctionsDownloadBundleResult {
39
39
  * `pk_`/`sk_` pair. The BaaS runtime
40
40
  * (`apps/runtime/src/server/runtime/routes/realtime/admin.ts`)
41
41
  * verifies the token against audience `'platform'`, confirms
42
- * `verifyProjectAccess(userId, projectId)`, and owns the Redis set
43
- * operations.
42
+ * `verifyProjectAccess(userId, projectId)`, and owns the channel
43
+ * registration operations.
44
44
  *
45
45
  * Phase Σ1 SoC rename: this was previously exported out of `./auth`
46
46
  * as `realtime` (re-exported at the package root as `realtimeAdmin`)
@@ -63,7 +63,6 @@ interface PlatformRealtimeChannel {
63
63
  }
64
64
  interface PlatformRealtimeStatusResult {
65
65
  readonly available: boolean;
66
- readonly provider: string;
67
66
  }
68
67
  interface PlatformRealtimeListChannelsResult {
69
68
  readonly channels: readonly PlatformRealtimeChannel[];
@@ -1909,7 +1908,7 @@ interface RegisterInput {
1909
1908
  * Org context claims present in org-scoped tokens (after switch-org).
1910
1909
  *
1911
1910
  * The JWT carries the role key only. Permissions are resolved server-side
1912
- * via Redis-cached role→permissions lookup (WorkOS pattern). This keeps
1911
+ * via cached role→permissions lookup (WorkOS pattern). This keeps
1913
1912
  * tokens small and ensures permission changes take effect without token refresh.
1914
1913
  */
1915
1914
  interface OrgTokenPayload {
@@ -3390,7 +3389,7 @@ interface StreamMessage<T = unknown> {
3390
3389
  /**
3391
3390
  * Realtime Functions
3392
3391
  *
3393
- * Pure functions for real-time messaging via Redis Streams.
3392
+ * Pure functions for real-time messaging via managed durable streams.
3394
3393
  * Supports channel-based pub/sub with SSE delivery to browsers.
3395
3394
  *
3396
3395
  * @example
@@ -4415,8 +4414,6 @@ interface TaskInput {
4415
4414
  interface TaskResult {
4416
4415
  /** Task ID */
4417
4416
  taskId: string;
4418
- /** QStash message ID */
4419
- messageId?: string;
4420
4417
  /** Scheduled execution time */
4421
4418
  scheduledFor?: string;
4422
4419
  }
@@ -5578,17 +5575,7 @@ type OrganizationsListResult = {
5578
5575
  offset: number;
5579
5576
  };
5580
5577
  type OrgRole = OrgSdkRole;
5581
- /**
5582
- * The contract's `CreateOrgInput` requires `{ name, slug }`; the SDK's
5583
- * previous OpenAPI-derived shape allowed omitting `slug` (server
5584
- * auto-generates from name) and accepted optional `email` / `metadata`.
5585
- * Preserve the looser SDK surface with a local `Omit` + widening.
5586
- */
5587
- type CreateOrgInput = Omit<CreateOrgInput$1, 'slug'> & {
5588
- slug?: string;
5589
- email?: string;
5590
- metadata?: Record<string, unknown>;
5591
- };
5578
+ type CreateOrgInput = CreateOrgInput$1;
5592
5579
  type UpdateOrgInput = UpdateOrgInput$1 & {
5593
5580
  metadata?: Record<string, unknown> | null;
5594
5581
  };
@@ -6224,11 +6211,11 @@ declare function getSecret(config: SylphxConfig, input: GetSecretInput): Promise
6224
6211
  * @example
6225
6212
  * ```typescript
6226
6213
  * const secrets = await getSecrets(config, {
6227
- * keys: ['DATABASE_URL', 'REDIS_URL', 'JWT_SECRET']
6214
+ * keys: ['DATABASE_URL', 'CACHE_URL', 'JWT_SECRET']
6228
6215
  * })
6229
6216
  *
6230
6217
  * const db = createPool(secrets.DATABASE_URL)
6231
- * const redis = createClient(secrets.REDIS_URL)
6218
+ * const cache = createCacheClient(secrets.CACHE_URL)
6232
6219
  * ```
6233
6220
  */
6234
6221
  declare function getSecrets(config: SylphxConfig, input: GetSecretsInput): Promise<GetSecretsResult>;
@@ -6814,7 +6801,7 @@ interface KvZMember {
6814
6801
  /**
6815
6802
  * KV (Key-Value Store) Functions
6816
6803
  *
6817
- * Pure functions for distributed key-value storage backed by Redis.
6804
+ * Pure functions for managed key-value storage.
6818
6805
  * Supports strings, hashes, lists, sorted sets, and built-in rate limiting.
6819
6806
  *
6820
6807
  * Keys are automatically namespaced per app, so no key collisions occur
@@ -7085,7 +7072,7 @@ declare function kvZrange(config: SylphxConfig, request: KvZrangeRequest): Promi
7085
7072
  score?: number;
7086
7073
  }>>;
7087
7074
  /**
7088
- * Check and consume a rate limit token using Redis sliding window.
7075
+ * Check and consume a rate limit token using the platform sliding window.
7089
7076
  *
7090
7077
  * This is a built-in rate limiter — no external service needed.
7091
7078
  *
@@ -7109,7 +7096,7 @@ interface KvScanOptions {
7109
7096
  pattern?: string;
7110
7097
  /** Cursor for pagination. Use '0' to start a new scan (default). */
7111
7098
  cursor?: string;
7112
- /** Hint to Redis for how many keys to return per iteration (1–1000). Default: 100. */
7099
+ /** Hint for how many keys to return per iteration (1–1000). Default: 100. */
7113
7100
  count?: number;
7114
7101
  }
7115
7102
  interface KvScanResult {
@@ -7121,7 +7108,7 @@ interface KvScanResult {
7121
7108
  done: boolean;
7122
7109
  }
7123
7110
  /**
7124
- * Scan keys matching a pattern using Redis SCAN (cursor-based pagination).
7111
+ * Scan keys matching a pattern using cursor-based pagination.
7125
7112
  *
7126
7113
  * Unlike `KEYS`, SCAN is safe to use in production — it iterates incrementally.
7127
7114
  * Call repeatedly with the returned `nextCursor` until `done` is true.
@@ -7516,7 +7503,7 @@ declare function captureMessage(config: SylphxConfig, message: string, options?:
7516
7503
  *
7517
7504
  * ## Architecture
7518
7505
  *
7519
- * POST /sandboxes → Platform provisions sandbox, waits for pod readiness,
7506
+ * POST /sandboxes → Platform provisions sandbox, waits for runtime readiness,
7520
7507
  * returns { endpoint, token }. All subsequent exec/files/pty operations
7521
7508
  * go DIRECTLY to the sandbox exec-server — Platform is not in the data path.
7522
7509
  *
@@ -7535,7 +7522,7 @@ declare function captureMessage(config: SylphxConfig, message: string, options?:
7535
7522
  *
7536
7523
  * const config = createServerClient(process.env.SYLPHX_SECRET_URL!)
7537
7524
  *
7538
- * // Create sandbox (Platform waits for pod ready before returning)
7525
+ * // Create sandbox (Platform waits for the runtime before returning)
7539
7526
  * const sandbox = await SandboxClient.create(config)
7540
7527
  *
7541
7528
  * // Stream exec output in real-time
@@ -7557,7 +7544,7 @@ declare function captureMessage(config: SylphxConfig, message: string, options?:
7557
7544
  */
7558
7545
 
7559
7546
  interface SandboxOptions {
7560
- /** Docker image (must be in registry.sylphx.com). Omit to use env default. */
7547
+ /** OCI image from a connected registry. Omit to use the environment default. */
7561
7548
  image?: string;
7562
7549
  /**
7563
7550
  * Request timeout for the create lifecycle call.
@@ -7569,17 +7556,8 @@ interface SandboxOptions {
7569
7556
  idleTimeoutMs?: number;
7570
7557
  /** Scratch storage size in GiB at /data, scoped to the sandbox lifecycle. */
7571
7558
  storageGi?: number;
7572
- /** CPU/memory resource spec */
7573
- resources?: {
7574
- requests?: {
7575
- cpu?: string;
7576
- memory?: string;
7577
- };
7578
- limits?: {
7579
- cpu?: string;
7580
- memory?: string;
7581
- };
7582
- };
7559
+ /** Managed machine size. Defaults to `standard`. */
7560
+ machine?: SandboxMachineSize;
7583
7561
  /** Environment variables injected into the sandbox container */
7584
7562
  env?: Record<string, string>;
7585
7563
  /**
@@ -7598,6 +7576,7 @@ interface SandboxOptions {
7598
7576
  readOnly?: boolean;
7599
7577
  }>;
7600
7578
  }
7579
+ type SandboxMachineSize = MachineSize;
7601
7580
  /** SSE event emitted by sandbox.exec() */
7602
7581
  type ExecEvent = {
7603
7582
  type: 'stdout';
@@ -7708,6 +7687,8 @@ interface SandboxRecord {
7708
7687
  id: string;
7709
7688
  status: 'starting' | 'running' | 'idle' | 'terminated' | 'error';
7710
7689
  image: string;
7690
+ /** Managed machine size selected for this sandbox. */
7691
+ machine: SandboxMachineSize | null;
7711
7692
  /** Public HTTPS endpoint: https://sbx-xxx.sandboxes.sylphx.app */
7712
7693
  endpoint: string | null;
7713
7694
  /** Per-sandbox RS256 JWT for direct exec-server authentication */
@@ -7890,14 +7871,14 @@ declare class SandboxClient {
7890
7871
  *
7891
7872
  * const config = createServerClient(process.env.SYLPHX_SECRET_URL!)
7892
7873
  *
7893
- * const run = await RunsClient.create(config, {
7894
- * image: 'registry.sylphx.com/sylphx/my-trainer:abc123',
7874
+ * const run = await RunsClient.run(config, {
7875
+ * image: 'ghcr.io/acme/my-trainer:sha-abc123',
7895
7876
  * command: ['python', 'train.py', '--fold', '0'],
7896
- * resources: { requests: { cpu: '4', memory: '8Gi' } },
7877
+ * machine: 'large',
7897
7878
  * timeoutSeconds: 3600,
7898
7879
  * })
7899
7880
  *
7900
- * const result = await worker.wait()
7881
+ * const result = await run.wait()
7901
7882
  * console.log(result.exitCode) // 0
7902
7883
  * console.log(result.stdout) // captured stdout
7903
7884
  * ```
@@ -7906,11 +7887,11 @@ declare class SandboxClient {
7906
7887
  * ```typescript
7907
7888
  * const workers = await Promise.all(
7908
7889
  * folds.map((fold) =>
7909
- * RunsClient.create(config, {
7910
- * image: 'registry.sylphx.com/sylphx/trainer:abc123',
7890
+ * RunsClient.run(config, {
7891
+ * image: 'ghcr.io/acme/trainer:sha-abc123',
7911
7892
  * command: ['python', 'train.py', '--fold', String(fold.id)],
7912
7893
  * env: { FOLD_ID: String(fold.id), DATABASE_URL: process.env.DATABASE_URL! },
7913
- * resources: { requests: { cpu: '4', memory: '8Gi' } },
7894
+ * machine: 'large',
7914
7895
  * volumeMounts: [{ volumeId: sharedCacheVolumeId, mountPath: '/cache' }],
7915
7896
  * timeoutSeconds: 7200,
7916
7897
  * }),
@@ -7923,8 +7904,8 @@ declare class SandboxClient {
7923
7904
  *
7924
7905
  * ## Architecture
7925
7906
  *
7926
- * - Workers are isolated one-shot runs (backoffLimit: 0, no restarts)
7927
- * - Images must be from registry.sylphx.com (scanned, private)
7907
+ * - Workers are isolated one-shot runs with no automatic restarts
7908
+ * - Images come from connected registries and are scanned before execution
7928
7909
  * - Volumes: org-level volume resources mounted into the run
7929
7910
  * - single-writer for one active writer at a time
7930
7911
  * - shared for concurrent runs and shared feature caches
@@ -7935,6 +7916,7 @@ declare class SandboxClient {
7935
7916
  */
7936
7917
 
7937
7918
  type RunStatus = 'pending' | 'running' | 'succeeded' | 'failed' | 'cancelled' | 'timeout';
7919
+ type RunMachineSize = MachineSize;
7938
7920
  interface RunVolumeMount {
7939
7921
  /** UUID of the volumeResource to mount (must belong to this org) */
7940
7922
  volumeId: string;
@@ -7945,25 +7927,11 @@ interface RunVolumeMount {
7945
7927
  /** Mount as read-only (default: false) */
7946
7928
  readOnly?: boolean;
7947
7929
  }
7948
- interface RunResourceSpec {
7949
- requests?: {
7950
- /** CPU request (e.g. '500m', '2', '4') */
7951
- cpu?: string;
7952
- /** Memory request (e.g. '512Mi', '4Gi', '16Gi') */
7953
- memory?: string;
7954
- };
7955
- limits?: {
7956
- /** CPU limit */
7957
- cpu?: string;
7958
- /** Memory limit */
7959
- memory?: string;
7960
- };
7961
- }
7962
7930
  interface CreateRunOptions {
7963
7931
  /**
7964
- * Docker image to run (must be from registry.sylphx.com).
7932
+ * OCI image to run from a connected registry.
7965
7933
  *
7966
- * @example 'registry.sylphx.com/sylphx/my-trainer:abc123def456'
7934
+ * @example 'ghcr.io/acme/my-trainer:sha-abc123'
7967
7935
  */
7968
7936
  image: string;
7969
7937
  /**
@@ -7979,10 +7947,10 @@ interface CreateRunOptions {
7979
7947
  */
7980
7948
  env?: Record<string, string>;
7981
7949
  /**
7982
- * CPU/memory resource spec.
7983
- * Defaults: { requests: { cpu: '500m', memory: '512Mi' }, limits: { cpu: '2', memory: '2Gi' } }
7950
+ * Managed machine size. The platform owns CPU, memory, scheduling, and isolation details.
7951
+ * Defaults to `standard`.
7984
7952
  */
7985
- resources?: RunResourceSpec;
7953
+ machine?: RunMachineSize;
7986
7954
  /**
7987
7955
  * Hard timeout in seconds (default: 3600 = 1 hour, max: 86400 = 24 hours).
7988
7956
  * The platform terminates the run when the deadline is reached (status: 'timeout').
@@ -8005,8 +7973,8 @@ interface Run {
8005
7973
  command: string[];
8006
7974
  /** Environment variables */
8007
7975
  env: Record<string, string> | null;
8008
- /** Resource spec */
8009
- resources: RunResourceSpec | null;
7976
+ /** Managed machine size selected for this run. */
7977
+ machine: RunMachineSize | null;
8010
7978
  /** Hard timeout in seconds */
8011
7979
  timeoutSeconds: number;
8012
7980
  /** Volume mounts */
@@ -8021,7 +7989,7 @@ interface Run {
8021
7989
  errorMessage: string | null;
8022
7990
  /** Duration in milliseconds (only when completed) */
8023
7991
  durationMs: number | null;
8024
- /** When the worker pod started running */
7992
+ /** When the worker runtime started */
8025
7993
  startedAt: string | null;
8026
7994
  /** When the worker completed */
8027
7995
  completedAt: string | null;
@@ -8085,7 +8053,7 @@ declare class RunHandle {
8085
8053
  *
8086
8054
  * @example
8087
8055
  * ```typescript
8088
- * const result = await worker.wait()
8056
+ * const result = await run.wait()
8089
8057
  * if (result.exitCode !== 0) {
8090
8058
  * throw new Error(`Worker failed: ${result.errorMessage ?? result.stderr}`)
8091
8059
  * }
@@ -8126,10 +8094,10 @@ declare class RunHandle {
8126
8094
  * const config = createServerClient(process.env.SYLPHX_SECRET_URL!)
8127
8095
  *
8128
8096
  * // Run a worker and wait for completion
8129
- * const result = await RunsClient.create(config, { ... }).then(w => w.wait())
8097
+ * const result = await RunsClient.run(config, { ... }).then((run) => run.wait())
8130
8098
  *
8131
8099
  * // Run N workers in parallel, wait for all
8132
- * const handles = await Promise.all(folds.map(fold => RunsClient.create(config, { ... })))
8100
+ * const handles = await Promise.all(folds.map((fold) => RunsClient.run(config, { ... })))
8133
8101
  * const results = await Promise.all(handles.map(h => h.wait()))
8134
8102
  * ```
8135
8103
  */
@@ -8142,13 +8110,13 @@ declare const RunsClient: {
8142
8110
  *
8143
8111
  * @example
8144
8112
  * ```typescript
8145
- * const run = await RunsClient.create(config, {
8146
- * image: 'registry.sylphx.com/sylphx/trainer:abc123',
8113
+ * const run = await RunsClient.run(config, {
8114
+ * image: 'ghcr.io/acme/trainer:sha-abc123',
8147
8115
  * command: ['python', 'train.py', '--fold', '3'],
8148
- * resources: { requests: { cpu: '4', memory: '16Gi' } },
8116
+ * machine: 'large',
8149
8117
  * volumeMounts: [{ volumeId: cacheVolumeId, mountPath: '/cache' }],
8150
8118
  * })
8151
- * const result = await worker.wait()
8119
+ * const result = await run.wait()
8152
8120
  * ```
8153
8121
  */
8154
8122
  run(config: SylphxConfig, options: CreateRunOptions): Promise<RunHandle>;
@@ -8170,20 +8138,20 @@ declare const RunsClient: {
8170
8138
  *
8171
8139
  * @example
8172
8140
  * ```typescript
8173
- * const { workers } = await RunsClient.list(config, { status: 'running' })
8174
- * console.log(`${workers.length} workers currently running`)
8141
+ * const { data } = await RunsClient.list(config, { status: 'running' })
8142
+ * console.log(`${data.length} runs currently running`)
8175
8143
  * ```
8176
8144
  */
8177
8145
  list(config: SylphxConfig, options?: ListRunsOptions): Promise<ListRunsResult>;
8178
8146
  /**
8179
8147
  * Spawn a worker and wait for it to complete in one call.
8180
8148
  *
8181
- * Equivalent to `(await RunsClient.create(config, options)).wait(waitOptions)`.
8149
+ * Equivalent to `(await RunsClient.run(config, options)).wait(waitOptions)`.
8182
8150
  *
8183
8151
  * @example
8184
8152
  * ```typescript
8185
8153
  * const result = await RunsClient.runAndWait(config, {
8186
- * image: 'registry.sylphx.com/sylphx/process:abc',
8154
+ * image: 'ghcr.io/acme/process:sha-abc123',
8187
8155
  * command: ['node', 'dist/process.js'],
8188
8156
  * })
8189
8157
  * if (result.exitCode !== 0) throw new Error(result.errorMessage ?? 'worker failed')
@@ -8204,13 +8172,13 @@ declare const WorkersClient: {
8204
8172
  *
8205
8173
  * @example
8206
8174
  * ```typescript
8207
- * const run = await RunsClient.create(config, {
8208
- * image: 'registry.sylphx.com/sylphx/trainer:abc123',
8175
+ * const run = await RunsClient.run(config, {
8176
+ * image: 'ghcr.io/acme/trainer:sha-abc123',
8209
8177
  * command: ['python', 'train.py', '--fold', '3'],
8210
- * resources: { requests: { cpu: '4', memory: '16Gi' } },
8178
+ * machine: 'large',
8211
8179
  * volumeMounts: [{ volumeId: cacheVolumeId, mountPath: '/cache' }],
8212
8180
  * })
8213
- * const result = await worker.wait()
8181
+ * const result = await run.wait()
8214
8182
  * ```
8215
8183
  */
8216
8184
  run(config: SylphxConfig, options: CreateRunOptions): Promise<RunHandle>;
@@ -8232,20 +8200,20 @@ declare const WorkersClient: {
8232
8200
  *
8233
8201
  * @example
8234
8202
  * ```typescript
8235
- * const { workers } = await RunsClient.list(config, { status: 'running' })
8236
- * console.log(`${workers.length} workers currently running`)
8203
+ * const { data } = await RunsClient.list(config, { status: 'running' })
8204
+ * console.log(`${data.length} runs currently running`)
8237
8205
  * ```
8238
8206
  */
8239
8207
  list(config: SylphxConfig, options?: ListRunsOptions): Promise<ListRunsResult>;
8240
8208
  /**
8241
8209
  * Spawn a worker and wait for it to complete in one call.
8242
8210
  *
8243
- * Equivalent to `(await RunsClient.create(config, options)).wait(waitOptions)`.
8211
+ * Equivalent to `(await RunsClient.run(config, options)).wait(waitOptions)`.
8244
8212
  *
8245
8213
  * @example
8246
8214
  * ```typescript
8247
8215
  * const result = await RunsClient.runAndWait(config, {
8248
- * image: 'registry.sylphx.com/sylphx/process:abc',
8216
+ * image: 'ghcr.io/acme/process:sha-abc123',
8249
8217
  * command: ['node', 'dist/process.js'],
8250
8218
  * })
8251
8219
  * if (result.exitCode !== 0) throw new Error(result.errorMessage ?? 'worker failed')
@@ -8301,6 +8269,7 @@ declare const WorkersClient: {
8301
8269
  type TriggerTargetType = 'task' | 'run' | 'http';
8302
8270
  type TriggerSourceType = 'cron' | 'event';
8303
8271
  type TriggerStatus = 'active' | 'paused' | 'deleted';
8272
+ type TriggerRunMachineSize = MachineSize;
8304
8273
  interface TaskTarget {
8305
8274
  type: 'task';
8306
8275
  taskName: string;
@@ -8318,10 +8287,7 @@ interface RunTarget {
8318
8287
  type: 'run';
8319
8288
  image: string;
8320
8289
  command: string[];
8321
- resources?: {
8322
- cpu?: string;
8323
- memory?: string;
8324
- };
8290
+ machine?: TriggerRunMachineSize;
8325
8291
  }
8326
8292
  type TriggerTarget = TaskTarget | HttpTarget | RunTarget;
8327
8293
  interface CronSource {
@@ -9343,4 +9309,4 @@ declare const functions: {
9343
9309
  };
9344
9310
  };
9345
9311
 
9346
- 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, type BackupCodesResult, type BatchEvent, type BatchIndexInput, type BatchIndexResult, type Breadcrumb, type BuildLog, type BuildLogHistoryResponse, 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 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, 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 FacetsResponse, type FileEvent, type FlagContext, type FlagResult, type GetConsentHistoryInput, type GetConsentsInput, type GetFacetsInput, type GetSecretInput, type GetSecretResult, type GetSecretsInput, type GetSecretsResult, type HttpTarget, type IdentifyInput, type ImpersonationActive, type ImpersonationEndResult, type ImpersonationInfo, type ImpersonationStartResult, type IndexDocumentInput, type IndexDocumentResult, type IngestLogsResult, InvalidConnectionUrlError, type InviteMemberInput, type InviteUserRequest, type InviteUserResponse, type KvExpireRequest, type KvHgetRequest, type KvHgetallRequest, type KvHsetRequest, type KvIncrRequest, type KvLpushRequest, type KvLrangeRequest, type KvMgetRequest, type KvMsetRequest, type KvRateLimitRequest, type KvRateLimitResult, type KvScanOptions, type KvScanResult, type KvSetOptions, type KvSetRequest, type KvZMember, type KvZaddRequest, type KvZrangeRequest, 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, 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, type PageInput, type PaginatedResponse, type PaginationInput, type ParsedConnectionUrl, 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 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 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 RunResourceSpec, type RunResult, type RunStatus, type RunTarget, type RunVolumeMount, type CreateRunOptions as RunWorkerOptions, RunsClient, SandboxClient, type SandboxFile, SandboxFiles, 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 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, 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 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 RunResourceSpec as WorkerResourceSpec, type RunResult as WorkerResult, type Run as WorkerRun, type RunStatus as WorkerStatus, type RunVolumeMount as WorkerVolumeMount, WorkersClient, acceptAllConsents, acceptOrganizationInvitation, assignMemberRole, audit, authorizeOAuth, batchIndex, canDeleteOrganization, canManageMembers, canManageSettings, cancelScheduledEmail, cancelTask, captureException, captureExceptionRaw, captureMessage, chat, chatStream, checkFlag, complete, confirmEmailChange, cookies, createCheckout, createClient, createConfig, createCron, createDynamicRestClient, createOrganization, createPermission, createPortalSession, createPromo, createRestClient, createRole, createServerClient, createServiceWorkerScript, createStepContext, createTasksHandler, createTracker, debugError, debugLog, debugTimer, debugWarn, declineOptionalConsents, deleteCron, deleteDocument, deleteEnvVar, deleteOrganization, deletePasskey, deletePermission, deletePromo, deleteRole, deleteUser, deleteUserAccount, device, disableDebug, disableTwoFactor, disconnectOAuthProvider, dpop, embed, enableDebug, exchangeOAuthCode, exponentialBackoff, exportUserData, extendedSignUp, forgotPassword, functions, generateAnonymousId, generatePkce, getAchievement, getAchievementPoints, getAchievements, getAllFlags, getAllSecrets, getAllStreaks, getBackupCodes, getBillingBalance, getBillingUsage, getBuildLogHistory, getCircuitBreakerState, getConsentHistory, getConsentTypes, getDatabaseConnectionString, getDatabaseStatus, getDebugMode, getDeployHistory, getDeployStatus, getErrorCode, getErrorMessage, getFacets, getFlagPayload, getFlags, getLeaderboard, getMemberPermissions, getMyReferralCode, getOidcDiscoveryDocument, getOrgScopedToken, getOrganization, getOrganizationInvitations, getOrganizationMembers, getOrganizations, getPlans, getProjectMetadata, getPromo, getPushPreferences, getRealtimeHistory, getReferralLeaderboard, getReferralStats, getRestErrorMessage, getRole, getScheduledEmail, getScheduledEmailStats, getSearchStats, getSecret, getSecrets, getSecurityScore, getSession, getStreak, getSubscription, getTask, getUser, getUserByEmail, getUserConsents, getUserLeaderboardRank, getUserProfile, getUserSecurity, getVariant, getWebhookConfig, getWebhookDeliveries, getWebhookDelivery, getWebhookStats, hasAllPermissions, hasAnyPermission, hasConsent, hasError, hasPermission, hasRole, hasSecret, identify, impersonation, incrementAchievementProgress, indexDocument, ingestLogs, initPushServiceWorker, installGlobalDebugHelpers, introspectToken, inviteOrganizationMember, inviteUser, isEmailConfigured, isEnabled, isRetryableError, isSylphxError, 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, markAllSecurityAlertsRead, markSecurityAlertRead, oauth, page, parseOAuthCallback, 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, resumeCron, revokeAllTokens, revokeOrganizationInvitation, revokeToken, revokeUserSession, rollbackDeploy, 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, validatePromo, verifyAccessToken, verifyChallenge, verifyEmail, verifyPasskeyRegistration, verifySignature as verifyTaskSignature, verifyTwoFactor, verifyTwoFactorEnable, withToken };
9312
+ 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, type BackupCodesResult, type BatchEvent, type BatchIndexInput, type BatchIndexResult, type Breadcrumb, type BuildLog, type BuildLogHistoryResponse, 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 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, 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 FacetsResponse, type FileEvent, type FlagContext, type FlagResult, type GetConsentHistoryInput, type GetConsentsInput, type GetFacetsInput, type GetSecretInput, type GetSecretResult, type GetSecretsInput, type GetSecretsResult, type HttpTarget, type IdentifyInput, type ImpersonationActive, type ImpersonationEndResult, type ImpersonationInfo, type ImpersonationStartResult, type IndexDocumentInput, type IndexDocumentResult, type IngestLogsResult, InvalidConnectionUrlError, type InviteMemberInput, type InviteUserRequest, type InviteUserResponse, type KvExpireRequest, type KvHgetRequest, type KvHgetallRequest, type KvHsetRequest, type KvIncrRequest, type KvLpushRequest, type KvLrangeRequest, type KvMgetRequest, type KvMsetRequest, type KvRateLimitRequest, type KvRateLimitResult, type KvScanOptions, type KvScanResult, type KvSetOptions, type KvSetRequest, type KvZMember, type KvZaddRequest, type KvZrangeRequest, 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, 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, type PageInput, type PaginatedResponse, type PaginationInput, type ParsedConnectionUrl, 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 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 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, SandboxClient, 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 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, 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, acceptAllConsents, acceptOrganizationInvitation, assignMemberRole, audit, authorizeOAuth, batchIndex, canDeleteOrganization, canManageMembers, canManageSettings, cancelScheduledEmail, cancelTask, captureException, captureExceptionRaw, captureMessage, chat, chatStream, checkFlag, complete, confirmEmailChange, cookies, createCheckout, createClient, createConfig, createCron, createDynamicRestClient, createOrganization, createPermission, createPortalSession, createPromo, createRestClient, createRole, createServerClient, createServiceWorkerScript, createStepContext, createTasksHandler, createTracker, debugError, debugLog, debugTimer, debugWarn, declineOptionalConsents, deleteCron, deleteDocument, deleteEnvVar, deleteOrganization, deletePasskey, deletePermission, deletePromo, deleteRole, deleteUser, deleteUserAccount, device, disableDebug, disableTwoFactor, disconnectOAuthProvider, dpop, embed, enableDebug, exchangeOAuthCode, exponentialBackoff, exportUserData, extendedSignUp, forgotPassword, functions, generateAnonymousId, generatePkce, getAchievement, getAchievementPoints, getAchievements, getAllFlags, getAllSecrets, getAllStreaks, getBackupCodes, getBillingBalance, getBillingUsage, getBuildLogHistory, getCircuitBreakerState, getConsentHistory, getConsentTypes, getDatabaseConnectionString, getDatabaseStatus, getDebugMode, getDeployHistory, getDeployStatus, getErrorCode, getErrorMessage, getFacets, getFlagPayload, getFlags, getLeaderboard, getMemberPermissions, getMyReferralCode, getOidcDiscoveryDocument, getOrgScopedToken, getOrganization, getOrganizationInvitations, getOrganizationMembers, getOrganizations, getPlans, getProjectMetadata, getPromo, getPushPreferences, getRealtimeHistory, getReferralLeaderboard, getReferralStats, getRestErrorMessage, getRole, getScheduledEmail, getScheduledEmailStats, getSearchStats, getSecret, getSecrets, getSecurityScore, getSession, getStreak, getSubscription, getTask, getUser, getUserByEmail, getUserConsents, getUserLeaderboardRank, getUserProfile, getUserSecurity, getVariant, getWebhookConfig, getWebhookDeliveries, getWebhookDelivery, getWebhookStats, hasAllPermissions, hasAnyPermission, hasConsent, hasError, hasPermission, hasRole, hasSecret, identify, impersonation, incrementAchievementProgress, indexDocument, ingestLogs, initPushServiceWorker, installGlobalDebugHelpers, introspectToken, inviteOrganizationMember, inviteUser, isEmailConfigured, isEnabled, isRetryableError, isSylphxError, 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, markAllSecurityAlertsRead, markSecurityAlertRead, oauth, page, parseOAuthCallback, 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, resumeCron, revokeAllTokens, revokeOrganizationInvitation, revokeToken, revokeUserSession, rollbackDeploy, 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, validatePromo, verifyAccessToken, verifyChallenge, verifyEmail, verifyPasskeyRegistration, verifySignature as verifyTaskSignature, verifyTwoFactor, verifyTwoFactorEnable, withToken };
package/dist/index.mjs CHANGED
@@ -7646,8 +7646,8 @@ var realtimeAdmin = {
7646
7646
  /**
7647
7647
  * List registered channels for a project.
7648
7648
  *
7649
- * Returns an empty list when the project's hidden Redis hasn't
7650
- * been provisioned yet — BaaS side soft-fails because absent
7649
+ * Returns an empty list when the project's hidden realtime store has
7650
+ * not been provisioned yet — BaaS side soft-fails because absent
7651
7651
  * registrations are semantically equivalent to "none registered".
7652
7652
  */
7653
7653
  async list(opts) {
@@ -9417,8 +9417,9 @@ async function getOrganization(config, orgIdOrSlug) {
9417
9417
  return callApi(config, `/orgs/${orgIdOrSlug}`);
9418
9418
  }
9419
9419
  async function createOrganization(config, input) {
9420
- return callApi(config, "/orgs", {
9421
- method: "POST",
9420
+ const endpoint = organizationsEndpoints.create;
9421
+ return callApi(config, endpoint.path, {
9422
+ method: endpoint.method,
9422
9423
  body: input
9423
9424
  });
9424
9425
  }
@@ -10272,7 +10273,7 @@ var SandboxClient = class _SandboxClient {
10272
10273
  body: {
10273
10274
  image: options?.image,
10274
10275
  idleTimeoutMs: options?.idleTimeoutMs ?? 3e5,
10275
- resources: options?.resources,
10276
+ machine: options?.machine ?? "standard",
10276
10277
  env: options?.env,
10277
10278
  storage: options?.storageGi !== void 0 ? { enabled: true, sizeGi: options.storageGi } : void 0,
10278
10279
  volumeMounts: options?.volumeMounts
@@ -10515,7 +10516,7 @@ var RunHandle = class {
10515
10516
  *
10516
10517
  * @example
10517
10518
  * ```typescript
10518
- * const result = await worker.wait()
10519
+ * const result = await run.wait()
10519
10520
  * if (result.exitCode !== 0) {
10520
10521
  * throw new Error(`Worker failed: ${result.errorMessage ?? result.stderr}`)
10521
10522
  * }
@@ -10590,13 +10591,13 @@ var RunsClient = {
10590
10591
  *
10591
10592
  * @example
10592
10593
  * ```typescript
10593
- * const run = await RunsClient.create(config, {
10594
- * image: 'registry.sylphx.com/sylphx/trainer:abc123',
10594
+ * const run = await RunsClient.run(config, {
10595
+ * image: 'ghcr.io/acme/trainer:sha-abc123',
10595
10596
  * command: ['python', 'train.py', '--fold', '3'],
10596
- * resources: { requests: { cpu: '4', memory: '16Gi' } },
10597
+ * machine: 'large',
10597
10598
  * volumeMounts: [{ volumeId: cacheVolumeId, mountPath: '/cache' }],
10598
10599
  * })
10599
- * const result = await worker.wait()
10600
+ * const result = await run.wait()
10600
10601
  * ```
10601
10602
  */
10602
10603
  async run(config, options) {
@@ -10606,7 +10607,7 @@ var RunsClient = {
10606
10607
  image: options.image,
10607
10608
  command: options.command,
10608
10609
  env: options.env,
10609
- resources: options.resources,
10610
+ machine: options.machine ?? "standard",
10610
10611
  timeoutSeconds: options.timeoutSeconds ?? 3600,
10611
10612
  volumeMounts: options.volumeMounts
10612
10613
  }
@@ -10639,8 +10640,8 @@ var RunsClient = {
10639
10640
  *
10640
10641
  * @example
10641
10642
  * ```typescript
10642
- * const { workers } = await RunsClient.list(config, { status: 'running' })
10643
- * console.log(`${workers.length} workers currently running`)
10643
+ * const { data } = await RunsClient.list(config, { status: 'running' })
10644
+ * console.log(`${data.length} runs currently running`)
10644
10645
  * ```
10645
10646
  */
10646
10647
  async list(config, options) {
@@ -10655,12 +10656,12 @@ var RunsClient = {
10655
10656
  /**
10656
10657
  * Spawn a worker and wait for it to complete in one call.
10657
10658
  *
10658
- * Equivalent to `(await RunsClient.create(config, options)).wait(waitOptions)`.
10659
+ * Equivalent to `(await RunsClient.run(config, options)).wait(waitOptions)`.
10659
10660
  *
10660
10661
  * @example
10661
10662
  * ```typescript
10662
10663
  * const result = await RunsClient.runAndWait(config, {
10663
- * image: 'registry.sylphx.com/sylphx/process:abc',
10664
+ * image: 'ghcr.io/acme/process:sha-abc123',
10664
10665
  * command: ['node', 'dist/process.js'],
10665
10666
  * })
10666
10667
  * if (result.exitCode !== 0) throw new Error(result.errorMessage ?? 'worker failed')