@odla-ai/harness 0.9.4 → 0.10.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/{chunk-XSUUHWNX.js → chunk-5MDYIJXC.js} +11 -3
- package/dist/chunk-5MDYIJXC.js.map +1 -0
- package/dist/code-runtime-cli.cjs +10 -2
- package/dist/code-runtime-cli.cjs.map +1 -1
- package/dist/code-runtime-cli.js +1 -1
- package/dist/node.cjs +10 -2
- package/dist/node.cjs.map +1 -1
- package/dist/node.d.cts +2 -1
- package/dist/node.d.ts +2 -1
- package/dist/node.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-XSUUHWNX.js.map +0 -1
|
@@ -326,7 +326,7 @@ function createCodeRuntimeControlClient(options) {
|
|
|
326
326
|
}
|
|
327
327
|
|
|
328
328
|
// src/code-runtime.ts
|
|
329
|
-
var CODE_RUNTIME_PROTOCOL_VERSION =
|
|
329
|
+
var CODE_RUNTIME_PROTOCOL_VERSION = 2;
|
|
330
330
|
async function runCodeRuntimeHeartbeatLoop(options) {
|
|
331
331
|
const heartbeatMs = options.heartbeatMs ?? 15e3;
|
|
332
332
|
if (!Number.isSafeInteger(heartbeatMs) || heartbeatMs < 1e3 || heartbeatMs > 3e5) {
|
|
@@ -1354,6 +1354,10 @@ function codeCommandMetadata(payload, resume) {
|
|
|
1354
1354
|
if (role !== "coding" && role !== "review" || typeof title !== "string" || typeof prompt !== "string") {
|
|
1355
1355
|
throw new TypeError(`invalid Code ${resume ? "resume" : "start"} metadata`);
|
|
1356
1356
|
}
|
|
1357
|
+
if (payload.readOnly !== void 0 && typeof payload.readOnly !== "boolean") {
|
|
1358
|
+
throw new TypeError(`invalid Code ${resume ? "resume" : "start"} read-only capability`);
|
|
1359
|
+
}
|
|
1360
|
+
const readOnly = role === "review" || payload.readOnly === true;
|
|
1357
1361
|
const planning = trusted?.planningInputDigest;
|
|
1358
1362
|
const attestation = trusted?.attestationDigest;
|
|
1359
1363
|
const repository = trusted?.repository;
|
|
@@ -1367,6 +1371,7 @@ function codeCommandMetadata(payload, resume) {
|
|
|
1367
1371
|
}
|
|
1368
1372
|
return {
|
|
1369
1373
|
role,
|
|
1374
|
+
readOnly,
|
|
1370
1375
|
title,
|
|
1371
1376
|
prompt,
|
|
1372
1377
|
maxTokensPerInteraction: Number(maxTokensPerInteraction),
|
|
@@ -3276,6 +3281,7 @@ var TheseusRuntimeEngine = class {
|
|
|
3276
3281
|
acknowledged: false,
|
|
3277
3282
|
startGate,
|
|
3278
3283
|
role: metadata.role,
|
|
3284
|
+
readOnly: metadata.readOnly,
|
|
3279
3285
|
title: metadata.title,
|
|
3280
3286
|
maxTokensPerInteraction: metadata.maxTokensPerInteraction,
|
|
3281
3287
|
baseCommitSha: metadata.baseCommitSha,
|
|
@@ -3332,6 +3338,7 @@ var TheseusRuntimeEngine = class {
|
|
|
3332
3338
|
event: (event) => this.#event(command, event, active.conversationRefs).then(() => void 0, () => void 0),
|
|
3333
3339
|
attempt: (prompt) => this.#runAttempt(command, {
|
|
3334
3340
|
role: active.role,
|
|
3341
|
+
readOnly: active.readOnly,
|
|
3335
3342
|
title: active.title,
|
|
3336
3343
|
prompt,
|
|
3337
3344
|
maxTokensPerInteraction: active.maxTokensPerInteraction,
|
|
@@ -3374,6 +3381,7 @@ var TheseusRuntimeEngine = class {
|
|
|
3374
3381
|
await this.#takeOver(command, "prompt requires an active Code session");
|
|
3375
3382
|
active.done = this.#runAttempt(command, {
|
|
3376
3383
|
role: active.role,
|
|
3384
|
+
readOnly: active.readOnly,
|
|
3377
3385
|
title: active.title,
|
|
3378
3386
|
prompt,
|
|
3379
3387
|
maxTokensPerInteraction: active.maxTokensPerInteraction,
|
|
@@ -3421,7 +3429,7 @@ var TheseusRuntimeEngine = class {
|
|
|
3421
3429
|
workspaceDir: active.workspace.workspaceDir,
|
|
3422
3430
|
prompt: metadata.prompt,
|
|
3423
3431
|
signal: active.abort.signal,
|
|
3424
|
-
readOnly: metadata.
|
|
3432
|
+
readOnly: metadata.readOnly,
|
|
3425
3433
|
recipeIds: this.options.recipes.map((recipe2) => recipe2.id),
|
|
3426
3434
|
...extraSkills.length ? { extraSkills } : {}
|
|
3427
3435
|
});
|