@hmharness/agent 0.23.52 → 0.23.53
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/cognitive-recorder.js +1 -1
- package/dist/gate.js +1 -1
- package/dist/project.js +5 -2
- package/package.json +11 -11
|
@@ -161,7 +161,7 @@ export class CognitiveRunRecorder {
|
|
|
161
161
|
tags: ['run', success ? 'ok' : 'fail', traj.environment.id],
|
|
162
162
|
});
|
|
163
163
|
}
|
|
164
|
-
const primary =
|
|
164
|
+
const primary = written.toSorted((a, b) => b.traj.metrics.actions - a.traj.metrics.actions)[0];
|
|
165
165
|
return { trajectoryId: primary.traj.id };
|
|
166
166
|
}
|
|
167
167
|
catch {
|
package/dist/gate.js
CHANGED
|
@@ -49,7 +49,7 @@ export async function buildConditionedGate(home, tau) {
|
|
|
49
49
|
const usable = all.filter((t) => t.steps.length > 0 && t.environment.id === 'terminal');
|
|
50
50
|
// deterministic split (seed 1) — analysis-only, no decision leakage
|
|
51
51
|
const rng = mulberry32(hashSeed('p2a-intervention-1'));
|
|
52
|
-
const shuffled =
|
|
52
|
+
const shuffled = usable.toSorted(() => rng() - 0.5);
|
|
53
53
|
const train = shuffled.slice(0, Math.floor(shuffled.length * 0.7));
|
|
54
54
|
const bump = (m, k, ok) => {
|
|
55
55
|
const e = m.get(k) ?? { s: 0, f: 0 };
|
package/dist/project.js
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
import { appendFile, cp, mkdir, mkdtemp, readFile, readdir, rm, writeFile } from 'node:fs/promises';
|
|
19
19
|
import { execFile as execCb } from 'node:child_process';
|
|
20
20
|
import { tmpdir } from 'node:os';
|
|
21
|
-
import { join, resolve } from 'node:path';
|
|
21
|
+
import { join, resolve, basename, relative } from 'node:path';
|
|
22
22
|
import { sandbox } from '@hmharness/sandbox';
|
|
23
23
|
/** blueprint lifecycle: created→active→paused(=resumable)→completed→archived */
|
|
24
24
|
const TRANSITIONS = {
|
|
@@ -233,7 +233,10 @@ export async function restoreCheckpoint(home, rec, checkpointId) {
|
|
|
233
233
|
const tarFile = join(dir, '..', `cp-${Date.now()}.tar`);
|
|
234
234
|
await git(['archive', '--format=tar', `--output=${tarFile}`, cpRef.tree], { cwd: rec.workspace, timeoutMs: 120_000 });
|
|
235
235
|
await new Promise((res, rej) => {
|
|
236
|
-
|
|
236
|
+
// relative paths from the temp dir: an absolute `C:\…` argument makes GNU tar
|
|
237
|
+
// (first on PATH under Git Bash/MSYS) read the drive letter as a remote host
|
|
238
|
+
// ("tar: Cannot connect to C: resolve failed"); Windows' own bsdtar takes both
|
|
239
|
+
execCb('tar', ['-xf', basename(tarFile), '-C', relative(tmpdir(), dir)], { cwd: tmpdir(), timeout: 120_000, windowsHide: true }, (err) => err ? rej(err) : res());
|
|
237
240
|
});
|
|
238
241
|
await rm(tarFile, { force: true });
|
|
239
242
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hmharness/agent",
|
|
3
|
-
"version": "0.23.
|
|
3
|
+
"version": "0.23.53",
|
|
4
4
|
"description": "hmharness agent execution layer: base tools, system prompt, sub-agent spawn, and the shared task runner that frontends (cli, web) drive.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -15,16 +15,16 @@
|
|
|
15
15
|
"build": "tsc -p tsconfig.build.json"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@hmharness/cognitive": "0.23.
|
|
19
|
-
"@hmharness/domain-harmony": "0.23.
|
|
20
|
-
"@hmharness/domain-ops": "0.23.
|
|
21
|
-
"@hmharness/evolution": "0.23.
|
|
22
|
-
"@hmharness/kernel": "0.23.
|
|
23
|
-
"@hmharness/observability": "0.23.
|
|
24
|
-
"@hmharness/sandbox": "0.23.
|
|
25
|
-
"@hmharness/lsp": "0.23.
|
|
26
|
-
"@hmharness/browser": "0.23.
|
|
27
|
-
"@hmharness/extension": "0.23.
|
|
18
|
+
"@hmharness/cognitive": "0.23.53",
|
|
19
|
+
"@hmharness/domain-harmony": "0.23.53",
|
|
20
|
+
"@hmharness/domain-ops": "0.23.53",
|
|
21
|
+
"@hmharness/evolution": "0.23.53",
|
|
22
|
+
"@hmharness/kernel": "0.23.53",
|
|
23
|
+
"@hmharness/observability": "0.23.53",
|
|
24
|
+
"@hmharness/sandbox": "0.23.53",
|
|
25
|
+
"@hmharness/lsp": "0.23.53",
|
|
26
|
+
"@hmharness/browser": "0.23.53",
|
|
27
|
+
"@hmharness/extension": "0.23.53"
|
|
28
28
|
},
|
|
29
29
|
"files": [
|
|
30
30
|
"dist"
|