deepline 0.1.201 → 0.1.202

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.
Files changed (32) hide show
  1. package/dist/bundling-sources/apps/play-runner-workers/src/entry.ts +30 -9
  2. package/dist/bundling-sources/apps/play-runner-workers/src/runtime/map-chunk-plan.ts +25 -0
  3. package/dist/bundling-sources/apps/play-runner-workers/src/runtime/tool-dispatch.ts +139 -124
  4. package/dist/bundling-sources/sdk/src/release.ts +2 -2
  5. package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +17 -2
  6. package/dist/bundling-sources/shared_libs/play-runtime/bounded-dispatch.ts +52 -0
  7. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +152 -23
  8. package/dist/bundling-sources/shared_libs/play-runtime/coordinator-headers.ts +10 -0
  9. package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +11 -0
  10. package/dist/bundling-sources/shared_libs/play-runtime/execution-capabilities.ts +121 -0
  11. package/dist/bundling-sources/shared_libs/play-runtime/governor/adaptive-admission.ts +6 -1
  12. package/dist/bundling-sources/shared_libs/play-runtime/governor/app-runtime-budget-state-backend.ts +22 -0
  13. package/dist/bundling-sources/shared_libs/play-runtime/governor/app-runtime-rate-state-backend.ts +86 -19
  14. package/dist/bundling-sources/shared_libs/play-runtime/governor/block-reserving-budget-state-backend.ts +141 -0
  15. package/dist/bundling-sources/shared_libs/play-runtime/governor/budget-state-backend.ts +43 -0
  16. package/dist/bundling-sources/shared_libs/play-runtime/governor/governor.ts +129 -41
  17. package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +40 -2
  18. package/dist/bundling-sources/shared_libs/play-runtime/receipt-completion-sink.ts +92 -33
  19. package/dist/bundling-sources/shared_libs/play-runtime/resource-governor.ts +13 -5
  20. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-lifecycle.ts +122 -120
  21. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-payload-transport.ts +10 -8
  22. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona.ts +140 -32
  23. package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +225 -29
  24. package/dist/bundling-sources/shared_libs/play-runtime/runtime-scheduler-topology.ts +26 -0
  25. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backend.ts +21 -0
  26. package/dist/bundling-sources/shared_libs/plays/dataset.ts +32 -10
  27. package/dist/cli/index.js +198 -76
  28. package/dist/cli/index.mjs +204 -82
  29. package/dist/index.js +3 -2
  30. package/dist/index.mjs +3 -2
  31. package/package.json +1 -1
  32. package/dist/bundling-sources/shared_libs/play-runtime/adaptive-tool-dispatcher.ts +0 -355
@@ -608,10 +608,10 @@ var SDK_RELEASE = {
608
608
  // 0.1.154 removes the short-lived generated enrich StepOptions recompute
609
609
  // fields shipped in 0.1.153.
610
610
  // 0.1.175 ships loud `deepline enrich` empty-waterfall reporting.
611
- version: "0.1.201",
611
+ version: "0.1.202",
612
612
  apiContract: "2026-06-dataset-handle-results-hard-cutover",
613
613
  supportPolicy: {
614
- latest: "0.1.201",
614
+ latest: "0.1.202",
615
615
  minimumSupported: "0.1.53",
616
616
  deprecatedBelow: "0.1.53",
617
617
  commandMinimumSupported: [
@@ -1892,10 +1892,10 @@ var OBSERVER_LOG_PAGE_QUERY = "runObservers:getRunLogPageForObserver";
1892
1892
  function errorText(error) {
1893
1893
  return error instanceof Error ? error.message : String(error);
1894
1894
  }
1895
- async function mintRunObserveGrant(http, runId) {
1895
+ async function mintRunObserveGrant(http2, runId) {
1896
1896
  let response;
1897
1897
  try {
1898
- response = await http.post(
1898
+ response = await http2.post(
1899
1899
  `/api/v2/runs/${encodeURIComponent(runId)}/observe-grant`,
1900
1900
  {}
1901
1901
  );
@@ -1959,8 +1959,8 @@ async function backfillLogGap(input2) {
1959
1959
  return lines;
1960
1960
  }
1961
1961
  async function* observeRunEvents(options) {
1962
- const { http, runId } = options;
1963
- let grant = await mintRunObserveGrant(http, runId);
1962
+ const { http: http2, runId } = options;
1963
+ let grant = await mintRunObserveGrant(http2, runId);
1964
1964
  let convexBrowser;
1965
1965
  let convexServer;
1966
1966
  try {
@@ -2023,7 +2023,7 @@ async function* observeRunEvents(options) {
2023
2023
  lastForcedRefreshAt = now;
2024
2024
  }
2025
2025
  try {
2026
- grant = await mintRunObserveGrant(http, runId);
2026
+ grant = await mintRunObserveGrant(http2, runId);
2027
2027
  return grant.token;
2028
2028
  } catch (error) {
2029
2029
  push({ kind: "error", error });
@@ -4442,17 +4442,6 @@ function enforceSdkCompatibilityResponse(response) {
4442
4442
  }
4443
4443
  }
4444
4444
 
4445
- // src/cli/commands/auth.ts
4446
- import {
4447
- existsSync as existsSync5,
4448
- mkdirSync as mkdirSync4,
4449
- readFileSync as readFileSync5,
4450
- rmSync as rmSync2,
4451
- writeFileSync as writeFileSync4
4452
- } from "fs";
4453
- import { hostname } from "os";
4454
- import { dirname as dirname4 } from "path";
4455
-
4456
4445
  // src/cli/utils.ts
4457
4446
  import { createHash } from "crypto";
4458
4447
  import {
@@ -5134,7 +5123,139 @@ function printCommandEnvelope(envelope, options = {}) {
5134
5123
  process.stdout.write(options.text ?? renderCommandEnvelopeText(envelope));
5135
5124
  }
5136
5125
 
5126
+ // src/cli/commands/admin.ts
5127
+ function normalizeEnvironment(value) {
5128
+ const trimmed = value?.trim().toLowerCase();
5129
+ if (!trimmed || trimmed === "production" || trimmed === "prod") {
5130
+ return "production";
5131
+ }
5132
+ if (trimmed === "preview") return "preview";
5133
+ throw new Error(
5134
+ `Invalid --environment "${value}". Expected production or preview.`
5135
+ );
5136
+ }
5137
+ function http() {
5138
+ return new HttpClient(resolveConfig());
5139
+ }
5140
+ function laneLine(lane) {
5141
+ const flag = lane.active ? "* " : " ";
5142
+ const depth = lane.queueDepth.empty ? "empty" : `${lane.queueDepth.queuedTasks} tasks / ${lane.queueDepth.nonTerminalRuns} runs`;
5143
+ return `${flag}${lane.releaseId} [${lane.status}] queue=${lane.queue} depth=${depth}`;
5144
+ }
5145
+ async function handleLanesList(options) {
5146
+ const environment = normalizeEnvironment(options.environment);
5147
+ const payload = await http().get(
5148
+ `/api/v2/admin/runtime/lanes?environment=${environment}`
5149
+ );
5150
+ printCommandEnvelope(
5151
+ {
5152
+ ...payload,
5153
+ render: {
5154
+ sections: [
5155
+ {
5156
+ title: `Absurd lanes (${environment}):`,
5157
+ lines: payload.lanes.length > 0 ? payload.lanes.map(laneLine) : ["(no registered lanes)"]
5158
+ }
5159
+ ]
5160
+ }
5161
+ },
5162
+ { json: options.json }
5163
+ );
5164
+ }
5165
+ async function handleLanesShow(releaseId, options) {
5166
+ const environment = normalizeEnvironment(options.environment);
5167
+ const payload = await http().get(
5168
+ `/api/v2/admin/runtime/lanes?environment=${environment}&release=${encodeURIComponent(releaseId)}`
5169
+ );
5170
+ printCommandEnvelope(
5171
+ {
5172
+ ...payload,
5173
+ render: {
5174
+ sections: [
5175
+ {
5176
+ title: `Lane ${releaseId} (${environment}):`,
5177
+ lines: [
5178
+ `registered: ${payload.registered}`,
5179
+ payload.lane ? `status: ${payload.lane.status}${payload.lane.active ? " (active)" : ""}` : "status: (not in registry)",
5180
+ `queue: ${payload.retireCheck.queue}`,
5181
+ `queued tasks: ${payload.retireCheck.queuedTasks}`,
5182
+ `non-terminal runs: ${payload.retireCheck.nonTerminalRuns}`,
5183
+ `retirable: ${payload.retireCheck.retirable}`
5184
+ ]
5185
+ }
5186
+ ]
5187
+ }
5188
+ },
5189
+ { json: options.json }
5190
+ );
5191
+ }
5192
+ async function handleLanesRetireCheck(releaseId, options) {
5193
+ const environment = normalizeEnvironment(options.environment);
5194
+ const payload = await http().get(
5195
+ `/api/v2/admin/runtime/lanes?environment=${environment}&release=${encodeURIComponent(releaseId)}`
5196
+ );
5197
+ printCommandEnvelope(
5198
+ {
5199
+ ...payload,
5200
+ render: {
5201
+ sections: [
5202
+ {
5203
+ title: `Retire check ${releaseId} (${environment}):`,
5204
+ lines: [
5205
+ payload.retireCheck.retirable ? "retirable: yes (lane queue empty)" : `retirable: no (${payload.retireCheck.queuedTasks} tasks, ${payload.retireCheck.nonTerminalRuns} runs pending)`
5206
+ ]
5207
+ }
5208
+ ]
5209
+ }
5210
+ },
5211
+ { json: options.json }
5212
+ );
5213
+ }
5214
+ async function handleReleasesActivate(releaseId, options) {
5215
+ const environment = normalizeEnvironment(options.environment);
5216
+ const payload = await http().post(
5217
+ "/api/v2/admin/runtime/releases",
5218
+ {
5219
+ releaseId,
5220
+ environment,
5221
+ ...options.schedulerBackend ? { schedulerBackend: options.schedulerBackend } : {}
5222
+ }
5223
+ );
5224
+ printCommandEnvelope(
5225
+ {
5226
+ ...payload,
5227
+ render: {
5228
+ sections: [
5229
+ {
5230
+ title: `Activated release ${releaseId} (${environment}).`,
5231
+ lines: ["Runtime release pointer flipped to this lane."]
5232
+ }
5233
+ ]
5234
+ }
5235
+ },
5236
+ { json: options.json }
5237
+ );
5238
+ }
5239
+ function registerAdminCommands(program) {
5240
+ const admin = program.command("admin").description("Platform-admin operations (runtime lanes, releases).");
5241
+ const lanes = admin.command("lanes").description("Inspect Absurd runtime release lanes.");
5242
+ lanes.command("list").description("List all registered Absurd lanes with queue depth.").option("--environment <env>", "production (default) or preview").option("--json", "Emit JSON output. Also automatic when stdout is piped").action(handleLanesList);
5243
+ lanes.command("show <releaseId>").description("Show one lane and its retire-gate depth.").option("--environment <env>", "production (default) or preview").option("--json", "Emit JSON output. Also automatic when stdout is piped").action(handleLanesShow);
5244
+ lanes.command("retire-check <releaseId>").description("Check whether a lane is safe to retire (queue empty).").option("--environment <env>", "production (default) or preview").option("--json", "Emit JSON output. Also automatic when stdout is piped").action(handleLanesRetireCheck);
5245
+ const releases = admin.command("releases").description("Manage the active runtime release pointer.");
5246
+ releases.command("activate <releaseId>").description("Flip the active runtime release to a prior registered lane.").option("--environment <env>", "production (default) or preview").option("--scheduler-backend <backend>", "absurd or workers_edge").option("--json", "Emit JSON output. Also automatic when stdout is piped").action(handleReleasesActivate);
5247
+ }
5248
+
5137
5249
  // src/cli/commands/auth.ts
5250
+ import {
5251
+ existsSync as existsSync5,
5252
+ mkdirSync as mkdirSync4,
5253
+ readFileSync as readFileSync5,
5254
+ rmSync as rmSync2,
5255
+ writeFileSync as writeFileSync4
5256
+ } from "fs";
5257
+ import { hostname } from "os";
5258
+ import { dirname as dirname4 } from "path";
5138
5259
  var EXIT_OK = 0;
5139
5260
  var EXIT_AUTH = 3;
5140
5261
  var EXIT_SERVER = 5;
@@ -5997,8 +6118,8 @@ function defaultLedgerExportPath() {
5997
6118
  );
5998
6119
  }
5999
6120
  async function handleBalance(options) {
6000
- const { http } = getAuthedHttpClient();
6001
- const payload = await http.get(
6121
+ const { http: http2 } = getAuthedHttpClient();
6122
+ const payload = await http2.get(
6002
6123
  "/api/v2/billing/balance"
6003
6124
  );
6004
6125
  const status = String(payload.balance_status || "");
@@ -6032,13 +6153,13 @@ async function handleBalance(options) {
6032
6153
  return;
6033
6154
  }
6034
6155
  async function handleUsage(options) {
6035
- const { http } = getAuthedHttpClient();
6156
+ const { http: http2 } = getAuthedHttpClient();
6036
6157
  const params = new URLSearchParams();
6037
6158
  if (options.limit) params.set("recent_limit", options.limit);
6038
6159
  if (options.offset) params.set("recent_offset", options.offset);
6039
6160
  if (options.runId) params.set("run_id", options.runId);
6040
6161
  const suffix = Array.from(params).length > 0 ? `?${params.toString()}` : "";
6041
- const payload = await http.get(
6162
+ const payload = await http2.get(
6042
6163
  `/api/v2/billing/usage${suffix}`
6043
6164
  );
6044
6165
  const usage = payload.usage ?? {};
@@ -6064,8 +6185,8 @@ async function handleUsage(options) {
6064
6185
  );
6065
6186
  }
6066
6187
  async function handleLimit(options) {
6067
- const { http } = getAuthedHttpClient();
6068
- const payload = await http.get(
6188
+ const { http: http2 } = getAuthedHttpClient();
6189
+ const payload = await http2.get(
6069
6190
  "/api/v2/billing/limit"
6070
6191
  );
6071
6192
  const lines = payload.enabled ? [
@@ -6081,8 +6202,8 @@ async function handleLimit(options) {
6081
6202
  );
6082
6203
  }
6083
6204
  async function handleSetLimit(credits, options) {
6084
- const { http } = getAuthedHttpClient();
6085
- const payload = await http.request("/api/v2/billing/limit", {
6205
+ const { http: http2 } = getAuthedHttpClient();
6206
+ const payload = await http2.request("/api/v2/billing/limit", {
6086
6207
  method: "PUT",
6087
6208
  body: { monthly_credits_limit: Number.parseInt(credits, 10) }
6088
6209
  });
@@ -6102,8 +6223,8 @@ async function handleSetLimit(credits, options) {
6102
6223
  );
6103
6224
  }
6104
6225
  async function handleLimitOff(options) {
6105
- const { http } = getAuthedHttpClient();
6106
- const payload = await http.request("/api/v2/billing/limit", {
6226
+ const { http: http2 } = getAuthedHttpClient();
6227
+ const payload = await http2.request("/api/v2/billing/limit", {
6107
6228
  method: "DELETE"
6108
6229
  });
6109
6230
  printCommandEnvelope(
@@ -6122,7 +6243,7 @@ async function handleLimitOff(options) {
6122
6243
  );
6123
6244
  }
6124
6245
  async function handleHistory(options) {
6125
- const { http } = getAuthedHttpClient();
6246
+ const { http: http2 } = getAuthedHttpClient();
6126
6247
  const windows = {
6127
6248
  "1d": 86400,
6128
6249
  "1w": 604800,
@@ -6130,7 +6251,7 @@ async function handleHistory(options) {
6130
6251
  "1y": 31536e3
6131
6252
  };
6132
6253
  const sinceAt = Math.max(0, Math.floor(Date.now() / 1e3) - windows[options.time]) * 1e3;
6133
- const payload = await http.get(
6254
+ const payload = await http2.get(
6134
6255
  `/api/v2/billing/ledger?since_at=${sinceAt}&limit=5000`
6135
6256
  );
6136
6257
  const entries = Array.isArray(payload.entries) ? payload.entries : [];
@@ -6161,7 +6282,7 @@ async function handleHistory(options) {
6161
6282
  );
6162
6283
  }
6163
6284
  async function handleLedgerExportAll(options) {
6164
- const { http } = getAuthedHttpClient();
6285
+ const { http: http2 } = getAuthedHttpClient();
6165
6286
  const outputPath = options.output ? resolve3(String(options.output)) : defaultLedgerExportPath();
6166
6287
  let summary = { row_count: 0, net_delta_credits: 0 };
6167
6288
  let cursor = null;
@@ -6170,7 +6291,7 @@ async function handleLedgerExportAll(options) {
6170
6291
  const params = new URLSearchParams({ limit: "5000" });
6171
6292
  if (cursor !== null) params.set("cursor", cursor);
6172
6293
  if (options.runId) params.set("run_id", options.runId);
6173
- const payload = await http.get(
6294
+ const payload = await http2.get(
6174
6295
  `/api/v2/billing/ledger?${params.toString()}`
6175
6296
  );
6176
6297
  const entries = Array.isArray(payload.entries) ? payload.entries : [];
@@ -6230,8 +6351,8 @@ function planRolloverText(rollover) {
6230
6351
  return `rollover ${mode}`;
6231
6352
  }
6232
6353
  async function handlePlans(options) {
6233
- const { http } = getAuthedHttpClient();
6234
- const payload = await http.get(
6354
+ const { http: http2 } = getAuthedHttpClient();
6355
+ const payload = await http2.get(
6235
6356
  "/api/v2/billing/catalog/current"
6236
6357
  );
6237
6358
  const activePlan = payload.active_plan ?? {};
@@ -6263,8 +6384,8 @@ async function handlePlans(options) {
6263
6384
  );
6264
6385
  }
6265
6386
  async function handleSubscribe(planVersionId, options) {
6266
- const { http } = getAuthedHttpClient();
6267
- const payload = await http.request(
6387
+ const { http: http2 } = getAuthedHttpClient();
6388
+ const payload = await http2.request(
6268
6389
  "/api/v2/billing/subscription/checkout",
6269
6390
  {
6270
6391
  method: "POST",
@@ -6483,8 +6604,8 @@ async function handleInvoices(options) {
6483
6604
  );
6484
6605
  }
6485
6606
  async function handleCheckout(options) {
6486
- const { http } = getAuthedHttpClient();
6487
- const payload = await http.post(
6607
+ const { http: http2 } = getAuthedHttpClient();
6608
+ const payload = await http2.post(
6488
6609
  "/api/v2/billing/checkout",
6489
6610
  {
6490
6611
  ...options.tier ? { tierId: options.tier } : {},
@@ -6603,8 +6724,8 @@ async function handleTopUp(creditsRaw, options) {
6603
6724
  });
6604
6725
  }
6605
6726
  async function handleRedeemCode(code, options) {
6606
- const { http } = getAuthedHttpClient();
6607
- const payload = await http.post(
6727
+ const { http: http2 } = getAuthedHttpClient();
6728
+ const payload = await http2.post(
6608
6729
  "/api/v2/billing/checkout",
6609
6730
  {
6610
6731
  discountCode: code
@@ -22141,8 +22262,8 @@ function registerEnrichCommand(program) {
22141
22262
 
22142
22263
  // src/cli/commands/feedback.ts
22143
22264
  async function handleFeedback(text, options) {
22144
- const { http } = getAuthedHttpClient();
22145
- const response = await http.post("/api/v2/cli/feedback", {
22265
+ const { http: http2 } = getAuthedHttpClient();
22266
+ const response = await http2.post("/api/v2/cli/feedback", {
22146
22267
  text,
22147
22268
  environment: collectLocalEnvInfo(),
22148
22269
  ...options.command ? { command: options.command } : {},
@@ -22553,8 +22674,8 @@ function buildSessionUploadContent(raw) {
22553
22674
  return { encodedContent: encoded, needsChunking: true };
22554
22675
  }
22555
22676
  async function uploadPayload(path, payload) {
22556
- const { http } = getAuthedHttpClient();
22557
- return await http.post(path, payload);
22677
+ const { http: http2 } = getAuthedHttpClient();
22678
+ return await http2.post(path, payload);
22558
22679
  }
22559
22680
  async function uploadChunkedSessions(sessions, options) {
22560
22681
  const uploadId = randomUUID3();
@@ -23314,8 +23435,8 @@ Preview the plan first with:
23314
23435
  );
23315
23436
  }
23316
23437
  async function handleMonitorsStatus(options) {
23317
- const http = buildHttpClient();
23318
- const payload = await http.request(
23438
+ const http2 = buildHttpClient();
23439
+ const payload = await http2.request(
23319
23440
  "/api/v2/monitors/access",
23320
23441
  { method: "GET" }
23321
23442
  );
@@ -23370,7 +23491,7 @@ async function handleMonitorsAvailable(toolId, options) {
23370
23491
  }
23371
23492
  }
23372
23493
  const tool = toolId ?? options.tool;
23373
- const http = buildHttpClient();
23494
+ const http2 = buildHttpClient();
23374
23495
  const params = new URLSearchParams();
23375
23496
  if (options.provider) params.set("provider", options.provider);
23376
23497
  if (tool) params.set("tool", tool);
@@ -23379,7 +23500,7 @@ async function handleMonitorsAvailable(toolId, options) {
23379
23500
  const compactList = !tool && !options.full;
23380
23501
  if (compactList || options.compact) params.set("compact", "true");
23381
23502
  const query = params.toString();
23382
- const payload = await http.request(
23503
+ const payload = await http2.request(
23383
23504
  `/api/v2/monitors/tools${query ? `?${query}` : ""}`,
23384
23505
  { method: "GET", ...FORBIDDEN_AS_API_ERROR }
23385
23506
  );
@@ -23419,13 +23540,13 @@ function renderDeployedListText(payload, requestedStatus) {
23419
23540
  `;
23420
23541
  }
23421
23542
  async function handleMonitorsList(options) {
23422
- const http = buildHttpClient();
23543
+ const http2 = buildHttpClient();
23423
23544
  const params = new URLSearchParams();
23424
23545
  if (options.status) params.set("status", options.status);
23425
23546
  if (options.limit) params.set("limit", options.limit);
23426
23547
  if (options.compact) params.set("compact", "true");
23427
23548
  const query = params.toString();
23428
- const payload = await http.request(
23549
+ const payload = await http2.request(
23429
23550
  `/api/v2/monitors/deployed${query ? `?${query}` : ""}`,
23430
23551
  { method: "GET", ...FORBIDDEN_AS_API_ERROR }
23431
23552
  );
@@ -23435,21 +23556,21 @@ async function handleMonitorsList(options) {
23435
23556
  });
23436
23557
  }
23437
23558
  async function handleMonitorsCheck(definition, options) {
23438
- const http = buildHttpClient();
23559
+ const http2 = buildHttpClient();
23439
23560
  const body = resolveMonitorJsonBody({
23440
23561
  positional: definition,
23441
23562
  file: options.file,
23442
23563
  argLabel: "<definition>",
23443
23564
  command: "deepline monitors check"
23444
23565
  });
23445
- const payload = await http.request(
23566
+ const payload = await http2.request(
23446
23567
  "/api/v2/monitors/check",
23447
23568
  { method: "POST", body, ...FORBIDDEN_AS_API_ERROR }
23448
23569
  );
23449
23570
  printCommandEnvelope(payload, { json: options.json });
23450
23571
  }
23451
23572
  async function handleMonitorsDeploy(definition, options) {
23452
- const http = buildHttpClient();
23573
+ const http2 = buildHttpClient();
23453
23574
  const body = resolveMonitorJsonBody({
23454
23575
  positional: definition,
23455
23576
  file: options.file,
@@ -23457,7 +23578,7 @@ async function handleMonitorsDeploy(definition, options) {
23457
23578
  command: "deepline monitors deploy"
23458
23579
  });
23459
23580
  if (options.dryRun) {
23460
- const payload2 = await http.request(
23581
+ const payload2 = await http2.request(
23461
23582
  "/api/v2/monitors/check",
23462
23583
  { method: "POST", body, ...FORBIDDEN_AS_API_ERROR }
23463
23584
  );
@@ -23471,7 +23592,7 @@ async function handleMonitorsDeploy(definition, options) {
23471
23592
  }
23472
23593
  return;
23473
23594
  }
23474
- const payload = await http.request(
23595
+ const payload = await http2.request(
23475
23596
  "/api/v2/monitors/deploy",
23476
23597
  { method: "POST", body, ...FORBIDDEN_AS_API_ERROR }
23477
23598
  );
@@ -23481,8 +23602,8 @@ async function handleMonitorsDeploy(definition, options) {
23481
23602
  });
23482
23603
  }
23483
23604
  async function handleMonitorsGet(key, options) {
23484
- const http = buildHttpClient();
23485
- const payload = await http.request(
23605
+ const http2 = buildHttpClient();
23606
+ const payload = await http2.request(
23486
23607
  `/api/v2/monitors/deployed/${encodeKey(key)}`,
23487
23608
  { method: "GET", ...FORBIDDEN_AS_API_ERROR }
23488
23609
  );
@@ -23504,12 +23625,12 @@ async function confirmMonitorDelete(key, options) {
23504
23625
  }
23505
23626
  }
23506
23627
  async function handleMonitorsDelete(key, options) {
23507
- const http = buildHttpClient();
23628
+ const http2 = buildHttpClient();
23508
23629
  const params = new URLSearchParams();
23509
23630
  if (options.localOnly) params.set("local_only", "true");
23510
23631
  if (options.dryRun) {
23511
23632
  params.set("dry_run", "true");
23512
- const payload2 = await http.request(
23633
+ const payload2 = await http2.request(
23513
23634
  `/api/v2/monitors/deployed/${encodeKey(key)}?${params.toString()}`,
23514
23635
  { method: "DELETE", ...FORBIDDEN_AS_API_ERROR }
23515
23636
  );
@@ -23541,30 +23662,30 @@ async function handleMonitorsDelete(key, options) {
23541
23662
  }
23542
23663
  }
23543
23664
  const query = params.toString();
23544
- const payload = await http.request(
23665
+ const payload = await http2.request(
23545
23666
  `/api/v2/monitors/deployed/${encodeKey(key)}${query ? `?${query}` : ""}`,
23546
23667
  { method: "DELETE", ...FORBIDDEN_AS_API_ERROR }
23547
23668
  );
23548
23669
  printCommandEnvelope(payload, { json: options.json });
23549
23670
  }
23550
23671
  async function handleMonitorsUpdate(key, patch, options) {
23551
- const http = buildHttpClient();
23672
+ const http2 = buildHttpClient();
23552
23673
  const body = resolveMonitorJsonBody({
23553
23674
  positional: patch,
23554
23675
  file: options.file,
23555
23676
  argLabel: "<patch>",
23556
23677
  command: `deepline monitors update ${key}`
23557
23678
  });
23558
- const payload = await http.request(
23679
+ const payload = await http2.request(
23559
23680
  `/api/v2/monitors/deployed/${encodeKey(key)}`,
23560
23681
  { method: "PATCH", body, ...FORBIDDEN_AS_API_ERROR }
23561
23682
  );
23562
23683
  printCommandEnvelope(payload, { json: options.json });
23563
23684
  }
23564
23685
  async function handleMonitorsReactivate(key, options) {
23565
- const http = buildHttpClient();
23686
+ const http2 = buildHttpClient();
23566
23687
  if (options.dryRun) {
23567
- const payload2 = await http.request(
23688
+ const payload2 = await http2.request(
23568
23689
  `/api/v2/monitors/deployed/${encodeKey(key)}/reactivate?dry_run=true`,
23569
23690
  { method: "POST", body: {}, ...FORBIDDEN_AS_API_ERROR }
23570
23691
  );
@@ -23578,7 +23699,7 @@ async function handleMonitorsReactivate(key, options) {
23578
23699
  });
23579
23700
  return;
23580
23701
  }
23581
- const payload = await http.request(
23702
+ const payload = await http2.request(
23582
23703
  `/api/v2/monitors/deployed/${encodeKey(key)}/reactivate`,
23583
23704
  { method: "POST", body: {}, ...FORBIDDEN_AS_API_ERROR }
23584
23705
  );
@@ -23822,8 +23943,8 @@ Examples:
23822
23943
  }
23823
23944
 
23824
23945
  // src/cli/commands/org.ts
23825
- async function fetchOrganizations(http, apiKey) {
23826
- return http.post("/api/v2/auth/cli/organizations", { api_key: apiKey });
23946
+ async function fetchOrganizations(http2, apiKey) {
23947
+ return http2.post("/api/v2/auth/cli/organizations", { api_key: apiKey });
23827
23948
  }
23828
23949
  function normalizeAuthScope(value) {
23829
23950
  if (!value) return "auto";
@@ -23927,8 +24048,8 @@ function resolveOrgSwitchAuthTarget(scope, config) {
23927
24048
  }
23928
24049
  async function handleOrgList(options) {
23929
24050
  const config = resolveConfig();
23930
- const http = new HttpClient(config);
23931
- const payload = await fetchOrganizations(http, config.apiKey);
24051
+ const http2 = new HttpClient(config);
24052
+ const payload = await fetchOrganizations(http2, config.apiKey);
23932
24053
  printCommandEnvelope(
23933
24054
  {
23934
24055
  ...payload,
@@ -23946,8 +24067,8 @@ async function handleOrgList(options) {
23946
24067
  }
23947
24068
  async function handleOrgStatus(options) {
23948
24069
  const config = resolveConfig();
23949
- const http = new HttpClient(config);
23950
- const payload = await fetchOrganizations(http, config.apiKey);
24070
+ const http2 = new HttpClient(config);
24071
+ const payload = await fetchOrganizations(http2, config.apiKey);
23951
24072
  const current = payload.organizations.find((org) => org.is_current) ?? payload.organizations.find(
23952
24073
  (org) => org.org_id === payload.current_org_id
23953
24074
  ) ?? null;
@@ -24030,8 +24151,8 @@ async function handleOrgStatus(options) {
24030
24151
  async function handleOrgSwitch(selection, options) {
24031
24152
  const authScope = normalizeAuthScope(options.authScope);
24032
24153
  const config = resolveConfig();
24033
- const http = new HttpClient(config);
24034
- const payload = await fetchOrganizations(http, config.apiKey);
24154
+ const http2 = new HttpClient(config);
24155
+ const payload = await fetchOrganizations(http2, config.apiKey);
24035
24156
  if (!selection && !options.orgId) {
24036
24157
  printCommandEnvelope(
24037
24158
  {
@@ -24126,7 +24247,7 @@ async function handleOrgSwitch(selection, options) {
24126
24247
  );
24127
24248
  return;
24128
24249
  }
24129
- const switched = await http.post("/api/v2/auth/cli/switch", {
24250
+ const switched = await http2.post("/api/v2/auth/cli/switch", {
24130
24251
  api_key: config.apiKey,
24131
24252
  org_id: target.org_id
24132
24253
  });
@@ -24194,8 +24315,8 @@ async function handleOrgSwitch(selection, options) {
24194
24315
  }
24195
24316
  async function handleOrgCreate(name, options) {
24196
24317
  const config = resolveConfig();
24197
- const http = new HttpClient(config);
24198
- const created = await http.post("/api/v2/auth/cli/org-create", {
24318
+ const http2 = new HttpClient(config);
24319
+ const created = await http2.post("/api/v2/auth/cli/org-create", {
24199
24320
  api_key: config.apiKey,
24200
24321
  name
24201
24322
  });
@@ -24787,8 +24908,8 @@ async function handleSet(nameInput, forbidden, options) {
24787
24908
  throw new Error("--play <name> is required when --scope play is used.");
24788
24909
  }
24789
24910
  const value = await readSecretValue();
24790
- const { http } = getAuthedHttpClient();
24791
- const response = await http.post(
24911
+ const { http: http2 } = getAuthedHttpClient();
24912
+ const response = await http2.post(
24792
24913
  "/api/v2/secrets",
24793
24914
  {
24794
24915
  name,
@@ -28935,7 +29056,7 @@ async function runPreflightCheck() {
28935
29056
  };
28936
29057
  }).catch(() => ({ status: "unreachable", version: null })).finally(() => clearTimeout(healthTimeout));
28937
29058
  const apiKey = resolveApiKeyForBaseUrl(baseUrl);
28938
- const http = apiKey ? new HttpClient(
29059
+ const http2 = apiKey ? new HttpClient(
28939
29060
  resolveConfig({
28940
29061
  baseUrl,
28941
29062
  apiKey,
@@ -28943,8 +29064,8 @@ async function runPreflightCheck() {
28943
29064
  maxRetries: 0
28944
29065
  })
28945
29066
  ) : null;
28946
- const [auth, billing] = http ? await Promise.all([
28947
- http.post("/api/v2/auth/cli/status", {
29067
+ const [auth, billing] = http2 ? await Promise.all([
29068
+ http2.post("/api/v2/auth/cli/status", {
28948
29069
  api_key: apiKey,
28949
29070
  reveal: false
28950
29071
  }).catch((error) => ({
@@ -28952,7 +29073,7 @@ async function runPreflightCheck() {
28952
29073
  connected: false,
28953
29074
  error: preflightErrorMessage(error)
28954
29075
  })),
28955
- http.get("/api/v2/billing/balance").catch((error) => ({
29076
+ http2.get("/api/v2/billing/balance").catch((error) => ({
28956
29077
  balance: null,
28957
29078
  balance_display: "unavailable",
28958
29079
  balance_status: "unknown",
@@ -29135,6 +29256,7 @@ Exit codes:
29135
29256
  registerBillingCommands(program);
29136
29257
  registerMonitorsCommands(program);
29137
29258
  registerOrgCommands(program);
29259
+ registerAdminCommands(program);
29138
29260
  registerEnrichCommand(program);
29139
29261
  registerCsvCommands(program);
29140
29262
  registerDbCommands(program);
package/dist/index.js CHANGED
@@ -422,10 +422,10 @@ var SDK_RELEASE = {
422
422
  // 0.1.154 removes the short-lived generated enrich StepOptions recompute
423
423
  // fields shipped in 0.1.153.
424
424
  // 0.1.175 ships loud `deepline enrich` empty-waterfall reporting.
425
- version: "0.1.201",
425
+ version: "0.1.202",
426
426
  apiContract: "2026-06-dataset-handle-results-hard-cutover",
427
427
  supportPolicy: {
428
- latest: "0.1.201",
428
+ latest: "0.1.202",
429
429
  minimumSupported: "0.1.53",
430
430
  deprecatedBelow: "0.1.53",
431
431
  commandMinimumSupported: [
@@ -4383,6 +4383,7 @@ function isDeeplineExtractorTarget(value) {
4383
4383
  var PLAY_DATASET_BRAND = /* @__PURE__ */ Symbol.for("deepline.play.dataset");
4384
4384
  var NODE_INSPECT_CUSTOM = /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom");
4385
4385
  var DEFAULT_MATERIALIZE_LIMIT = 1e4;
4386
+ var PLAY_DATASET_EXECUTION_PAGE_BYTES = 64 * 1024 * 1024;
4386
4387
  function resolveMaterializeLimitCap() {
4387
4388
  const raw = process.env.DEEPLINE_PLAY_DATASET_MATERIALIZE_LIMIT;
4388
4389
  const parsed = raw ? Number(raw) : NaN;
package/dist/index.mjs CHANGED
@@ -352,10 +352,10 @@ var SDK_RELEASE = {
352
352
  // 0.1.154 removes the short-lived generated enrich StepOptions recompute
353
353
  // fields shipped in 0.1.153.
354
354
  // 0.1.175 ships loud `deepline enrich` empty-waterfall reporting.
355
- version: "0.1.201",
355
+ version: "0.1.202",
356
356
  apiContract: "2026-06-dataset-handle-results-hard-cutover",
357
357
  supportPolicy: {
358
- latest: "0.1.201",
358
+ latest: "0.1.202",
359
359
  minimumSupported: "0.1.53",
360
360
  deprecatedBelow: "0.1.53",
361
361
  commandMinimumSupported: [
@@ -4313,6 +4313,7 @@ function isDeeplineExtractorTarget(value) {
4313
4313
  var PLAY_DATASET_BRAND = /* @__PURE__ */ Symbol.for("deepline.play.dataset");
4314
4314
  var NODE_INSPECT_CUSTOM = /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom");
4315
4315
  var DEFAULT_MATERIALIZE_LIMIT = 1e4;
4316
+ var PLAY_DATASET_EXECUTION_PAGE_BYTES = 64 * 1024 * 1024;
4316
4317
  function resolveMaterializeLimitCap() {
4317
4318
  const raw = process.env.DEEPLINE_PLAY_DATASET_MATERIALIZE_LIMIT;
4318
4319
  const parsed = raw ? Number(raw) : NaN;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepline",
3
- "version": "0.1.201",
3
+ "version": "0.1.202",
4
4
  "description": "Deepline SDK + CLI — B2B data enrichment powered by durable cloud execution",
5
5
  "license": "MIT",
6
6
  "repository": {