@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/dist/index.mjs CHANGED
@@ -15,10 +15,11 @@ function detectSdkPlatform() {
15
15
  if (typeof runtimeGlobal.EdgeRuntime !== "undefined") return "edge";
16
16
  return "node";
17
17
  }
18
- var SDK_API_PATH, DEFAULT_SDK_API_HOST, SDK_VERSION, SDK_PLATFORM, DEFAULT_TIMEOUT_MS, SANDBOX_CREATE_TIMEOUT_MS, SESSION_TOKEN_LIFETIME_SECONDS, SESSION_TOKEN_LIFETIME_MS, REFRESH_TOKEN_LIFETIME_SECONDS, FLAGS_CACHE_TTL_MS, FLAGS_STALE_WHILE_REVALIDATE_MS, MAX_RETRY_DELAY_MS, BASE_RETRY_DELAY_MS, ANALYTICS_SESSION_TIMEOUT_MS, WEBHOOK_MAX_AGE_MS, WEBHOOK_CLOCK_SKEW_MS, PKCE_CODE_TTL_MS, JOBS_DLQ_MAX_AGE_MS, SESSION_REPLAY_MAX_DURATION_MS, FLAGS_EXPOSURE_DEDUPE_WINDOW_MS, CLICK_ID_EXPIRY_MS, STALE_TIME_FREQUENT_MS, STALE_TIME_MODERATE_MS, STALE_TIME_STABLE_MS, STALE_TIME_STATS_MS, NEW_USER_THRESHOLD_MS, STORAGE_MULTIPART_THRESHOLD_BYTES, STORAGE_DEFAULT_MAX_SIZE_BYTES, STORAGE_AVATAR_MAX_SIZE_BYTES, STORAGE_LARGE_MAX_SIZE_BYTES, JWK_CACHE_TTL_MS, CIRCUIT_BREAKER_FAILURE_THRESHOLD, CIRCUIT_BREAKER_WINDOW_MS, CIRCUIT_BREAKER_OPEN_DURATION_MS, ETAG_CACHE_MAX_ENTRIES, ETAG_CACHE_TTL_MS;
18
+ var ENV_SECRET_URL, SDK_API_PATH, DEFAULT_SDK_API_HOST, SDK_VERSION, SDK_PLATFORM, DEFAULT_TIMEOUT_MS, SANDBOX_CREATE_TIMEOUT_MS, SESSION_TOKEN_LIFETIME_SECONDS, SESSION_TOKEN_LIFETIME_MS, REFRESH_TOKEN_LIFETIME_SECONDS, FLAGS_CACHE_TTL_MS, FLAGS_STALE_WHILE_REVALIDATE_MS, MAX_RETRY_DELAY_MS, BASE_RETRY_DELAY_MS, ANALYTICS_SESSION_TIMEOUT_MS, WEBHOOK_MAX_AGE_MS, WEBHOOK_CLOCK_SKEW_MS, PKCE_CODE_TTL_MS, JOBS_DLQ_MAX_AGE_MS, SESSION_REPLAY_MAX_DURATION_MS, FLAGS_EXPOSURE_DEDUPE_WINDOW_MS, CLICK_ID_EXPIRY_MS, STALE_TIME_FREQUENT_MS, STALE_TIME_MODERATE_MS, STALE_TIME_STABLE_MS, STALE_TIME_STATS_MS, NEW_USER_THRESHOLD_MS, STORAGE_MULTIPART_THRESHOLD_BYTES, STORAGE_DEFAULT_MAX_SIZE_BYTES, STORAGE_AVATAR_MAX_SIZE_BYTES, STORAGE_LARGE_MAX_SIZE_BYTES, JWK_CACHE_TTL_MS, CIRCUIT_BREAKER_FAILURE_THRESHOLD, CIRCUIT_BREAKER_WINDOW_MS, CIRCUIT_BREAKER_OPEN_DURATION_MS, ETAG_CACHE_MAX_ENTRIES, ETAG_CACHE_TTL_MS;
19
19
  var init_constants = __esm({
20
20
  "src/constants.ts"() {
21
21
  "use strict";
22
+ ENV_SECRET_URL = "SYLPHX_SECRET_URL";
22
23
  SDK_API_PATH = `/v1`;
23
24
  DEFAULT_SDK_API_HOST = "api.sylphx.com";
24
25
  SDK_VERSION = "0.5.0";
@@ -1401,6 +1402,13 @@ async function getWorkspace(config, workspaceId) {
1401
1402
  );
1402
1403
  return result.workspace;
1403
1404
  }
1405
+ async function getWorkspaceCapacity(config, workspaceId) {
1406
+ const result = await callApi(
1407
+ config,
1408
+ `/workspaces/${encodeURIComponent(workspaceId)}/capacity`
1409
+ );
1410
+ return result.snapshot;
1411
+ }
1404
1412
  async function createWorkspace(config, input) {
1405
1413
  const result = await callApi(config, "/workspaces", {
1406
1414
  method: "POST",
@@ -1421,6 +1429,26 @@ async function forkWorkspace(config, sourceWorkspaceId, input = {}) {
1421
1429
  );
1422
1430
  return result.workspace;
1423
1431
  }
1432
+ async function pinWorkspace(config, workspaceId, input = {}) {
1433
+ return callApi(
1434
+ config,
1435
+ `/workspaces/${encodeURIComponent(workspaceId)}/pins`,
1436
+ {
1437
+ method: "POST",
1438
+ body: input
1439
+ }
1440
+ );
1441
+ }
1442
+ async function reclaimWorkspace(config, workspaceId, input = {}) {
1443
+ return callApi(
1444
+ config,
1445
+ `/workspaces/${encodeURIComponent(workspaceId)}/reclaim`,
1446
+ {
1447
+ method: "POST",
1448
+ body: input
1449
+ }
1450
+ );
1451
+ }
1424
1452
  async function deleteWorkspace(config, workspaceId) {
1425
1453
  await callApi(config, `/workspaces/${encodeURIComponent(workspaceId)}`, {
1426
1454
  method: "DELETE"
@@ -5572,6 +5600,24 @@ var TriggersClient = {
5572
5600
  publishEvent
5573
5601
  };
5574
5602
 
5603
+ // src/lib/tasks/connection.ts
5604
+ init_constants();
5605
+ function resolveTaskServerConnectionUrl(options = {}) {
5606
+ const explicit = options.explicitConnectionUrl?.trim();
5607
+ if (explicit) return explicit;
5608
+ if (typeof process === "undefined") return null;
5609
+ return process.env[ENV_SECRET_URL]?.trim() || null;
5610
+ }
5611
+ function requireTaskServerConnectionUrl(options = {}) {
5612
+ const connectionUrl = resolveTaskServerConnectionUrl(options);
5613
+ if (!connectionUrl) {
5614
+ throw new Error(
5615
+ `[sylphx/tasks] No server connection URL found. Set ${ENV_SECRET_URL} env var or pass config to trigger options.`
5616
+ );
5617
+ }
5618
+ return connectionUrl;
5619
+ }
5620
+
5575
5621
  // src/lib/tasks/handler.ts
5576
5622
  import { createHmac, timingSafeEqual } from "crypto";
5577
5623
  var StepCompleteSignal = class {
@@ -5581,6 +5627,23 @@ var StepCompleteSignal = class {
5581
5627
  }
5582
5628
  _isStepCompleteSignal = true;
5583
5629
  };
5630
+ var StepSideEffectStartSignal = class {
5631
+ constructor(stepName, effectKey, externalService) {
5632
+ this.stepName = stepName;
5633
+ this.effectKey = effectKey;
5634
+ this.externalService = externalService;
5635
+ }
5636
+ _isStepSideEffectStartSignal = true;
5637
+ };
5638
+ var StepSideEffectCompleteSignal = class {
5639
+ constructor(stepName, effectKey, handle, result) {
5640
+ this.stepName = stepName;
5641
+ this.effectKey = effectKey;
5642
+ this.handle = handle;
5643
+ this.result = result;
5644
+ }
5645
+ _isStepSideEffectCompleteSignal = true;
5646
+ };
5584
5647
  var StepSleepSignal = class {
5585
5648
  constructor(stepName, duration) {
5586
5649
  this.stepName = stepName;
@@ -5596,7 +5659,7 @@ var StepWaitEventSignal = class {
5596
5659
  }
5597
5660
  _isStepWaitEventSignal = true;
5598
5661
  };
5599
- function createStepContext(completedSteps, resolvedWaits) {
5662
+ function createStepContext(completedSteps, resolvedWaits, sideEffectReceipts = /* @__PURE__ */ new Map()) {
5600
5663
  return {
5601
5664
  /**
5602
5665
  * Execute a named step.
@@ -5611,6 +5674,27 @@ function createStepContext(completedSteps, resolvedWaits) {
5611
5674
  const result = await fn();
5612
5675
  throw new StepCompleteSignal(name, result);
5613
5676
  },
5677
+ async sideEffect(stepName, effectKey, externalService, fn) {
5678
+ const receipt = sideEffectReceipts.get(sideEffectReceiptKey(stepName, effectKey));
5679
+ if (!receipt) {
5680
+ throw new StepSideEffectStartSignal(stepName, effectKey, externalService);
5681
+ }
5682
+ if (receipt.externalService !== externalService) {
5683
+ throw new Error(
5684
+ `Side-effect external service mismatch for ${stepName}/${effectKey}: receipt=${receipt.externalService} handler=${externalService}`
5685
+ );
5686
+ }
5687
+ if (receipt.completedAt) {
5688
+ return receipt.result;
5689
+ }
5690
+ const outcome = await fn(receipt.idempotencyKey);
5691
+ throw new StepSideEffectCompleteSignal(
5692
+ stepName,
5693
+ effectKey,
5694
+ normalizeOptionalStepKey(outcome.handle),
5695
+ outcome.result
5696
+ );
5697
+ },
5614
5698
  /**
5615
5699
  * Sleep for the given duration.
5616
5700
  *
@@ -5651,6 +5735,13 @@ function createStepContext(completedSteps, resolvedWaits) {
5651
5735
  }
5652
5736
  };
5653
5737
  }
5738
+ function normalizeOptionalStepKey(value) {
5739
+ const trimmed = value?.trim();
5740
+ return trimmed ? trimmed.slice(0, 500) : void 0;
5741
+ }
5742
+ function sideEffectReceiptKey(stepName, effectKey) {
5743
+ return `${stepName}\0${effectKey}`;
5744
+ }
5654
5745
  function verifySignature(body, signature, secret) {
5655
5746
  try {
5656
5747
  const hmac = createHmac("sha256", secret).update(body, "utf8").digest("hex");
@@ -5731,7 +5822,11 @@ function createTasksHandler(taskDefs, options = {}) {
5731
5822
  for (const wait of context?.waits ?? []) {
5732
5823
  resolvedWaits.set(wait.name, wait.result ?? void 0);
5733
5824
  }
5734
- const stepCtx = createStepContext(completedSteps, resolvedWaits);
5825
+ const sideEffectReceipts = /* @__PURE__ */ new Map();
5826
+ for (const receipt of context?.sideEffects ?? []) {
5827
+ sideEffectReceipts.set(sideEffectReceiptKey(receipt.stepName, receipt.effectKey), receipt);
5828
+ }
5829
+ const stepCtx = createStepContext(completedSteps, resolvedWaits, sideEffectReceipts);
5735
5830
  try {
5736
5831
  const result = await taskDef.handler(payload, { step: stepCtx });
5737
5832
  return Response.json({ status: "complete", result });
@@ -5744,6 +5839,25 @@ function createTasksHandler(taskDefs, options = {}) {
5744
5839
  result: signal.result
5745
5840
  });
5746
5841
  }
5842
+ if (err instanceof StepSideEffectStartSignal || err?._isStepSideEffectStartSignal) {
5843
+ const signal = err;
5844
+ return Response.json({
5845
+ status: "side_effect_start",
5846
+ stepName: signal.stepName,
5847
+ effectKey: signal.effectKey,
5848
+ externalService: signal.externalService
5849
+ });
5850
+ }
5851
+ if (err instanceof StepSideEffectCompleteSignal || err?._isStepSideEffectCompleteSignal) {
5852
+ const signal = err;
5853
+ return Response.json({
5854
+ status: "side_effect_complete",
5855
+ stepName: signal.stepName,
5856
+ effectKey: signal.effectKey,
5857
+ handle: signal.handle ?? null,
5858
+ result: signal.result
5859
+ });
5860
+ }
5747
5861
  if (err instanceof StepSleepSignal || err?._isStepSleepSignal) {
5748
5862
  const signal = err;
5749
5863
  return Response.json({
@@ -5777,6 +5891,191 @@ function createTasksHandler(taskDefs, options = {}) {
5777
5891
  return { GET, POST };
5778
5892
  }
5779
5893
 
5894
+ // src/lib/tasks/serve.ts
5895
+ var triggerSyncDone = false;
5896
+ var triggerSyncPromise = null;
5897
+ async function syncTriggers(tasks, options) {
5898
+ const connectionUrl = resolveTaskServerConnectionUrl({
5899
+ explicitConnectionUrl: options.connectionUrl
5900
+ });
5901
+ if (!connectionUrl) {
5902
+ return;
5903
+ }
5904
+ const tasksWithTriggers = tasks.filter((t) => t._trigger);
5905
+ if (tasksWithTriggers.length === 0) return;
5906
+ const config = createServerClient(connectionUrl);
5907
+ const results = await Promise.allSettled(
5908
+ tasksWithTriggers.flatMap((t) => {
5909
+ const promises = [];
5910
+ if (t._trigger?.cron) {
5911
+ promises.push(
5912
+ TriggersClient.create(config, {
5913
+ name: `${t.id}:cron`,
5914
+ source: { type: "cron", expression: t._trigger.cron },
5915
+ target: { type: "task", taskName: t.id },
5916
+ idempotencyKey: `task:${t.id}:cron:${t._trigger.cron}`
5917
+ }).catch((err) => {
5918
+ if (err?.status === 409 || err?.message?.includes("already exists")) return;
5919
+ throw err;
5920
+ })
5921
+ );
5922
+ }
5923
+ if (t._trigger?.event) {
5924
+ promises.push(
5925
+ TriggersClient.create(config, {
5926
+ name: `${t.id}:event:${t._trigger.event}`,
5927
+ source: { type: "event", eventName: t._trigger.event },
5928
+ target: { type: "task", taskName: t.id },
5929
+ idempotencyKey: `task:${t.id}:event:${t._trigger.event}`
5930
+ }).catch((err) => {
5931
+ if (err?.status === 409 || err?.message?.includes("already exists")) return;
5932
+ throw err;
5933
+ })
5934
+ );
5935
+ }
5936
+ return promises;
5937
+ })
5938
+ );
5939
+ for (const result of results) {
5940
+ if (result.status === "rejected") {
5941
+ console.warn("[sylphx/tasks] Warning: trigger sync failed", result.reason);
5942
+ }
5943
+ }
5944
+ }
5945
+ function serve(options) {
5946
+ const functionModeTasks = options.tasks.filter((t) => !t._machine && t._run != null);
5947
+ const defs = functionModeTasks.map((t) => ({
5948
+ name: t.id,
5949
+ handler: t._run
5950
+ }));
5951
+ const handlerOptions = {
5952
+ signingSecret: options.signingSecret
5953
+ };
5954
+ const { GET: baseGET, POST: basePOST } = createTasksHandler(defs, handlerOptions);
5955
+ function ensureTriggerSync() {
5956
+ if (triggerSyncDone || triggerSyncPromise) return;
5957
+ triggerSyncPromise = syncTriggers(options.tasks, options).then(() => {
5958
+ triggerSyncDone = true;
5959
+ }).catch((err) => {
5960
+ triggerSyncPromise = null;
5961
+ console.warn("[sylphx/tasks] Trigger sync error:", err);
5962
+ });
5963
+ }
5964
+ return {
5965
+ async GET(req) {
5966
+ ensureTriggerSync();
5967
+ return baseGET(req);
5968
+ },
5969
+ async POST(req) {
5970
+ ensureTriggerSync();
5971
+ return basePOST(req);
5972
+ }
5973
+ };
5974
+ }
5975
+
5976
+ // src/lib/tasks/task.ts
5977
+ function resolveConfig(options) {
5978
+ if (options?.config) return options.config;
5979
+ const connectionUrl = requireTaskServerConnectionUrl();
5980
+ return createServerClient(connectionUrl);
5981
+ }
5982
+ async function pollUntilComplete(config, taskRunId, timeoutMs) {
5983
+ const deadline = Date.now() + timeoutMs;
5984
+ let delay = 500;
5985
+ while (Date.now() < deadline) {
5986
+ const run = await callApi(
5987
+ config,
5988
+ `/tasks/${taskRunId}`,
5989
+ { method: "GET" }
5990
+ );
5991
+ if (run.status === "completed") return run.result;
5992
+ if (run.status === "failed" || run.status === "cancelled") {
5993
+ throw new Error(run.error ?? `Task run ${taskRunId} ${run.status}`);
5994
+ }
5995
+ await new Promise((r) => setTimeout(r, delay));
5996
+ delay = Math.min(delay * 1.5, 5e3);
5997
+ }
5998
+ throw new Error(`Task run ${taskRunId} timed out after ${timeoutMs}ms`);
5999
+ }
6000
+ async function dispatchTask(id, payload, machine, options) {
6001
+ const config = resolveConfig(options);
6002
+ const body = {
6003
+ taskName: id,
6004
+ payload
6005
+ };
6006
+ if (options?.idempotencyKey) body.idempotencyKey = options.idempotencyKey;
6007
+ if (options?.delay) body.delay = options.delay;
6008
+ if (options?.scheduledFor) body.scheduledFor = options.scheduledFor.toISOString();
6009
+ if (options?.maxAttempts) body.maxAttempts = options.maxAttempts;
6010
+ if (options?.queue) body.queue = options.queue;
6011
+ if (machine) body.machine = machine;
6012
+ const result = await callApi(config, "/tasks/trigger", {
6013
+ method: "POST",
6014
+ body
6015
+ });
6016
+ const runId = result.taskRunId;
6017
+ const defaultTimeoutMs = machine ? 24 * 3600 * 1e3 : 3e5;
6018
+ return {
6019
+ id: runId,
6020
+ status: result.status,
6021
+ waitForCompletion(waitOptions) {
6022
+ return pollUntilComplete(config, runId, waitOptions?.timeoutMs ?? defaultTimeoutMs);
6023
+ },
6024
+ async cancel() {
6025
+ const cancelled = await callApi(config, `/tasks/${runId}/cancel`, {
6026
+ method: "POST"
6027
+ });
6028
+ return cancelled.success;
6029
+ }
6030
+ };
6031
+ }
6032
+ function task(config) {
6033
+ return {
6034
+ id: config.id,
6035
+ _trigger: config.trigger,
6036
+ _machine: config.machine,
6037
+ _run: config.run,
6038
+ async trigger(payload, options) {
6039
+ return dispatchTask(config.id, payload, config.machine, options);
6040
+ },
6041
+ async triggerAndWait(payload, options) {
6042
+ const handle = await dispatchTask(
6043
+ config.id,
6044
+ payload,
6045
+ config.machine,
6046
+ options
6047
+ );
6048
+ return handle.waitForCompletion();
6049
+ },
6050
+ async batchTrigger(payloads, options) {
6051
+ const handles = await Promise.all(
6052
+ payloads.map((p) => dispatchTask(config.id, p, config.machine, options))
6053
+ );
6054
+ return { runs: handles };
6055
+ }
6056
+ };
6057
+ }
6058
+ function taskStub(id) {
6059
+ return {
6060
+ id,
6061
+ _machine: void 0,
6062
+ _run: void 0,
6063
+ async trigger(payload, options) {
6064
+ return dispatchTask(id, payload, void 0, options);
6065
+ },
6066
+ async triggerAndWait(payload, options) {
6067
+ const handle = await dispatchTask(id, payload, void 0, options);
6068
+ return handle.waitForCompletion();
6069
+ },
6070
+ async batchTrigger(payloads, options) {
6071
+ const handles = await Promise.all(
6072
+ payloads.map((p) => dispatchTask(id, p, void 0, options))
6073
+ );
6074
+ return { runs: handles };
6075
+ }
6076
+ };
6077
+ }
6078
+
5780
6079
  // src/lib/tasks/api-functions.ts
5781
6080
  async function scheduleTask(config, input) {
5782
6081
  return callApi(config, "/tasks/schedule", {
@@ -5787,6 +6086,9 @@ async function scheduleTask(config, input) {
5787
6086
  async function getTask(config, taskId) {
5788
6087
  return callApi(config, `/tasks/${taskId}`, { method: "GET" });
5789
6088
  }
6089
+ async function getTaskRun(config, runId) {
6090
+ return callApi(config, `/tasks/${runId}`, { method: "GET" });
6091
+ }
5790
6092
  async function cancelTask(config, taskId) {
5791
6093
  const result = await callApi(config, `/tasks/${taskId}/cancel`, {
5792
6094
  method: "POST"
@@ -6987,6 +7289,28 @@ var SandboxWatch = class {
6987
7289
  if (!res.ok) throw new Error(`watch.remove failed: ${await res.text()}`);
6988
7290
  }
6989
7291
  };
7292
+ var SandboxCapabilities = class {
7293
+ constructor(endpoint, token) {
7294
+ this.endpoint = endpoint;
7295
+ this.token = token;
7296
+ }
7297
+ authHeader() {
7298
+ return { Authorization: `Bearer ${this.token}` };
7299
+ }
7300
+ /**
7301
+ * Fetch the typed capability catalog for this sandbox image.
7302
+ *
7303
+ * Use this before selecting heavyweight toolchain paths. For example,
7304
+ * default sandboxes report Android emulator/device-test as `not-local`, so
7305
+ * agents can hand APK/AAB artifacts to a managed device runtime instead of
7306
+ * filling `/workspace` with emulator images.
7307
+ */
7308
+ async get() {
7309
+ const res = await fetch(`${this.endpoint}/capabilities`, { headers: this.authHeader() });
7310
+ if (!res.ok) throw new Error(`capabilities.get failed (${res.status}): ${await res.text()}`);
7311
+ return await res.json();
7312
+ }
7313
+ };
6990
7314
  var SandboxBrowser = class {
6991
7315
  constructor(endpoint, token) {
6992
7316
  this.endpoint = endpoint;
@@ -7204,6 +7528,8 @@ var SandboxClient = class _SandboxClient {
7204
7528
  processes;
7205
7529
  /** Filesystem watch management (direct to exec-server) */
7206
7530
  watch;
7531
+ /** Typed capability catalog (direct to exec-server) */
7532
+ capabilities;
7207
7533
  /** Persistent headful browser sessions (direct to exec-server — ADR-205) */
7208
7534
  browser;
7209
7535
  /** Persistent desktop (computer-use) sessions (direct to exec-server — ADR-207) */
@@ -7216,6 +7542,7 @@ var SandboxClient = class _SandboxClient {
7216
7542
  this.files = endpoint && token ? new SandboxFiles(endpoint, token) : null;
7217
7543
  this.processes = endpoint && token ? new SandboxProcesses(endpoint, token) : null;
7218
7544
  this.watch = endpoint && token ? new SandboxWatch(endpoint, token) : null;
7545
+ this.capabilities = endpoint && token ? new SandboxCapabilities(endpoint, token) : null;
7219
7546
  this.browser = endpoint && token ? new SandboxBrowser(endpoint, token) : null;
7220
7547
  this.computer = endpoint && token ? new SandboxComputer(endpoint, token) : null;
7221
7548
  }
@@ -7441,6 +7768,19 @@ var SandboxClient = class _SandboxClient {
7441
7768
  }
7442
7769
  };
7443
7770
 
7771
+ // src/render.ts
7772
+ var RenderClient = {
7773
+ /**
7774
+ * Render a chart (`engine: 'vega-lite'`, Vega-Lite JSON in `spec`) or a diagram
7775
+ * (`engine: 'graphviz'`, DOT in `spec`) to an image. The engine validates and
7776
+ * repairs the spec before rendering; on success returns base64 image bytes, on
7777
+ * failure a structured `error` with a `code` and `diagnostics`.
7778
+ */
7779
+ async render(config, request) {
7780
+ return callApi(config, "/render", { method: "POST", body: request });
7781
+ }
7782
+ };
7783
+
7444
7784
  // src/workers.ts
7445
7785
  var TERMINAL_STATUSES = /* @__PURE__ */ new Set([
7446
7786
  "succeeded",
@@ -8006,11 +8346,13 @@ export {
8006
8346
  PREMIUM_TRIAL_DAYS,
8007
8347
  RETRYABLE_CODES,
8008
8348
  RateLimitError,
8349
+ RenderClient,
8009
8350
  RunHandle,
8010
8351
  RunsClient,
8011
8352
  SERVICE_METRICS,
8012
8353
  STORAGE_PRICE_PER_GB_MONTH_MICRODOLLARS,
8013
8354
  SandboxBrowser,
8355
+ SandboxCapabilities,
8014
8356
  SandboxClient,
8015
8357
  SandboxComputer,
8016
8358
  SandboxFiles,
@@ -8179,6 +8521,7 @@ export {
8179
8521
  getStreak,
8180
8522
  getSubscription,
8181
8523
  getTask,
8524
+ getTaskRun,
8182
8525
  getUser,
8183
8526
  getUserByEmail,
8184
8527
  getUserConsents,
@@ -8191,6 +8534,7 @@ export {
8191
8534
  getWebhookDelivery,
8192
8535
  getWebhookStats,
8193
8536
  getWorkspace,
8537
+ getWorkspaceCapacity,
8194
8538
  hasAllPermissions,
8195
8539
  hasAnyPermission,
8196
8540
  hasBillingAccess,
@@ -8264,6 +8608,7 @@ export {
8264
8608
  parseUserAgent,
8265
8609
  password,
8266
8610
  pauseCron,
8611
+ pinWorkspace,
8267
8612
  platformAuth,
8268
8613
  campaigns as pushCampaigns,
8269
8614
  segments as pushSegments,
@@ -8271,6 +8616,7 @@ export {
8271
8616
  rateLimits,
8272
8617
  realtime,
8273
8618
  realtimeEmit,
8619
+ reclaimWorkspace,
8274
8620
  recordStreakActivity,
8275
8621
  recoverStreak,
8276
8622
  redeemPromo,
@@ -8313,6 +8659,7 @@ export {
8313
8659
  sendEmailToUser,
8314
8660
  sendPush,
8315
8661
  sendTemplatedEmail,
8662
+ serve,
8316
8663
  sessions,
8317
8664
  setConsents,
8318
8665
  setEnvVar,
@@ -8328,6 +8675,8 @@ export {
8328
8675
  submitScore,
8329
8676
  suspendUser,
8330
8677
  switchOrg,
8678
+ task,
8679
+ taskStub,
8331
8680
  toPublicMachineSize,
8332
8681
  toSylphxError,
8333
8682
  track,