@odla-ai/cli 0.16.0 → 0.16.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/bin.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  exitCodeFor,
4
4
  runCli
5
- } from "./chunk-S3OYXHDG.js";
5
+ } from "./chunk-FRDIQURT.js";
6
6
 
7
7
  // src/bin.ts
8
8
  runCli().catch((err) => {
@@ -2398,7 +2398,7 @@ async function stageWorkspacePair(baselineSource, workspaceSource, options = {})
2398
2398
  }
2399
2399
  }
2400
2400
 
2401
- // ../harness/dist/chunk-4EM6NMET.js
2401
+ // ../harness/dist/chunk-5E2R3LHE.js
2402
2402
  import { createHash } from "crypto";
2403
2403
  import { readFile, readdir as readdir2 } from "fs/promises";
2404
2404
  import { relative as relative3, resolve as resolve4 } from "path";
@@ -2735,7 +2735,7 @@ function validateSnapshot(snapshot, limits) {
2735
2735
  }
2736
2736
  }
2737
2737
 
2738
- // ../harness/dist/chunk-4EM6NMET.js
2738
+ // ../harness/dist/chunk-5E2R3LHE.js
2739
2739
  import { spawn as spawn4 } from "child_process";
2740
2740
  import { lstat as lstat2 } from "fs/promises";
2741
2741
  import { resolve as resolve23, sep as sep3 } from "path";
@@ -3028,7 +3028,7 @@ function looksLikeDestination(value) {
3028
3028
  return /^(?:[a-z][a-z0-9+.-]*:\/\/|\/|\\\\)/i.test(text) || /^[\w.-]+\.[a-z]{2,}(?:[/:]|$)/i.test(text);
3029
3029
  }
3030
3030
 
3031
- // ../harness/dist/chunk-4EM6NMET.js
3031
+ // ../harness/dist/chunk-5E2R3LHE.js
3032
3032
  import { createHash as createHash3 } from "crypto";
3033
3033
  async function digestStagedWorkspace(root, limits) {
3034
3034
  const files = [];
@@ -3143,9 +3143,13 @@ function createCodeRuntimeControlClient(options) {
3143
3143
  if (!Number.isSafeInteger(requestTimeoutMs) || requestTimeoutMs < 1e3 || requestTimeoutMs > 12e4) {
3144
3144
  throw new TypeError("requestTimeoutMs must be an integer from 1000 to 120000");
3145
3145
  }
3146
+ const modelRequestTimeoutMs = options.modelRequestTimeoutMs ?? 15 * 6e4;
3147
+ if (!Number.isSafeInteger(modelRequestTimeoutMs) || modelRequestTimeoutMs < 3e4 || modelRequestTimeoutMs > 30 * 6e4) {
3148
+ throw new TypeError("modelRequestTimeoutMs must be an integer from 30000 to 1800000");
3149
+ }
3146
3150
  const request = options.fetch ?? fetch;
3147
- const call = async (path, body) => {
3148
- const timeout = AbortSignal.timeout(requestTimeoutMs);
3151
+ const call = async (path, body, timeoutMs = requestTimeoutMs) => {
3152
+ const timeout = AbortSignal.timeout(timeoutMs);
3149
3153
  const signal = options.signal ? AbortSignal.any([options.signal, timeout]) : timeout;
3150
3154
  let response2;
3151
3155
  try {
@@ -3184,14 +3188,18 @@ function createCodeRuntimeControlClient(options) {
3184
3188
  await call(`/registry/code/runtime/sessions/${validSessionId(sessionId)}/source`, {})
3185
3189
  ),
3186
3190
  infer: async (sessionId, inference) => {
3187
- const value = record3(await call(`/registry/code/runtime/sessions/${validSessionId(sessionId)}/inference`, inference));
3191
+ const value = record3(await call(
3192
+ `/registry/code/runtime/sessions/${validSessionId(sessionId)}/inference`,
3193
+ inference,
3194
+ modelRequestTimeoutMs
3195
+ ));
3188
3196
  if (!value || value.requestId !== inference.requestId || !record3(value.response) || !record3(value.receipt)) {
3189
3197
  throw new CodeRuntimeControlError("invalid Code inference response", 502, "invalid_response");
3190
3198
  }
3191
3199
  return value;
3192
3200
  },
3193
3201
  review: async (sessionId, review) => parseReview(
3194
- await call(`/registry/code/runtime/sessions/${validSessionId(sessionId)}/review`, review)
3202
+ await call(`/registry/code/runtime/sessions/${validSessionId(sessionId)}/review`, review, modelRequestTimeoutMs)
3195
3203
  ),
3196
3204
  submitCandidate: async (sessionId, checkpointId, verification) => {
3197
3205
  if (!/^cpoint_[0-9a-f]{32}$/.test(checkpointId)) throw new TypeError("invalid Code checkpoint id");
@@ -7746,4 +7754,4 @@ export {
7746
7754
  exitCodeFor,
7747
7755
  runCli
7748
7756
  };
7749
- //# sourceMappingURL=chunk-S3OYXHDG.js.map
7757
+ //# sourceMappingURL=chunk-FRDIQURT.js.map