dsh-harbor-evolution 0.8.2 → 0.9.2
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/README.md +28 -6
- package/index.js +120 -19
- package/lib/action-drafts.js +443 -0
- package/lib/bounded-process.js +190 -0
- package/lib/candidate-runtime.js +160 -0
- package/lib/candidate.js +7 -11
- package/lib/client.js +4110 -292
- package/lib/composer-context.js +56 -0
- package/lib/credential-redaction.js +155 -0
- package/lib/dashboard.js +417 -98
- package/lib/diagnostic-observation.js +175 -0
- package/lib/diagnostic-runner.js +206 -0
- package/lib/evaluator-saves.js +129 -0
- package/lib/evolution.js +126 -32
- package/lib/historical-run-lock.js +102 -0
- package/lib/historical-web.js +52 -16
- package/lib/interaction-objects.js +56 -0
- package/lib/model-runtime.js +48 -3
- package/lib/process.js +27 -1
- package/lib/runtime-identity.js +0 -1
- package/lib/service.js +1427 -28
- package/lib/session-diagnostic.js +0 -1
- package/lib/session-redaction.js +17 -31
- package/lib/session-selection.js +5 -3
- package/lib/trial-selection.js +46 -0
- package/lib/ui-context.js +518 -0
- package/lib/web.js +32 -6
- package/lib/workbench-health.js +27 -0
- package/package.json +4 -4
- package/skills/evolve-agent-with-harbor/SKILL.md +33 -4
package/lib/process.js
CHANGED
|
@@ -1,10 +1,36 @@
|
|
|
1
1
|
import { spawn } from 'node:child_process'
|
|
2
|
+
import { existsSync } from 'node:fs'
|
|
3
|
+
import path from 'node:path'
|
|
4
|
+
|
|
5
|
+
const DOCKER_DESKTOP_BIN = '/Applications/Docker.app/Contents/Resources/bin'
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* On macOS, Docker Desktop keeps `docker-credential-desktop` (and the other
|
|
9
|
+
* credential helpers) inside the app bundle, outside the default PATH that a
|
|
10
|
+
* GUI-launched Harness inherits. A missing helper makes `docker build`/`pull`
|
|
11
|
+
* fail with `exec: "docker-credential-desktop": executable file not found in
|
|
12
|
+
* $PATH` even though the CLI and daemon are reachable. Prepend that directory
|
|
13
|
+
* to PATH for every child process we spawn so Harbor inherits a resolvable
|
|
14
|
+
* helper. The change is macOS-only, existence-checked, and idempotent.
|
|
15
|
+
*/
|
|
16
|
+
export function dockerDesktopAwareEnv(env, {
|
|
17
|
+
platform = process.platform,
|
|
18
|
+
pathExists = existsSync,
|
|
19
|
+
} = {}) {
|
|
20
|
+
const base = env ?? process.env
|
|
21
|
+
if (platform !== 'darwin') return base
|
|
22
|
+
if (!pathExists(DOCKER_DESKTOP_BIN)) return base
|
|
23
|
+
const current = String(base.PATH ?? '')
|
|
24
|
+
const segments = current.split(path.delimiter).filter(Boolean)
|
|
25
|
+
if (segments.includes(DOCKER_DESKTOP_BIN)) return base
|
|
26
|
+
return { ...base, PATH: [DOCKER_DESKTOP_BIN, ...segments].join(path.delimiter) }
|
|
27
|
+
}
|
|
2
28
|
|
|
3
29
|
export function runProcess(command, args, options = {}) {
|
|
4
30
|
return new Promise((resolve, reject) => {
|
|
5
31
|
const child = spawn(command, args, {
|
|
6
32
|
cwd: options.cwd,
|
|
7
|
-
env: options.env ?? process.env,
|
|
33
|
+
env: dockerDesktopAwareEnv(options.env ?? process.env),
|
|
8
34
|
shell: false,
|
|
9
35
|
stdio: [options.input === undefined ? 'ignore' : 'pipe', 'pipe', 'pipe'],
|
|
10
36
|
})
|
package/lib/runtime-identity.js
CHANGED
|
@@ -3,5 +3,4 @@ import { readFileSync } from 'node:fs'
|
|
|
3
3
|
const packageJson = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8'))
|
|
4
4
|
|
|
5
5
|
export const DSH_RUNTIME_VERSION = packageJson.harborEvolution.dshRuntimeVersion
|
|
6
|
-
export const CANDIDATE_ACP_PACKAGE = packageJson.harborEvolution.candidateAcpPackage
|
|
7
6
|
export const RUNTIME_POLICY = packageJson.harborEvolution.runtimePolicy
|