dsh-harbor-evolution 0.3.0 → 0.4.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/README.md CHANGED
@@ -1,28 +1,28 @@
1
1
  # dsh-harbor-evolution
2
2
 
3
- Installable DeepSeek Harness Plugin + Skill for running stable Harbor evaluation and controlled Agent evolution loops.
3
+ Installable DeepSeek Harness Plugin + Skill for running stable Harbor evaluation and controlled Agent evolution loops, with a native DSH Web dashboard.
4
4
 
5
- The package gives DSH four deterministic Harbor tools and bundles the model- and user-invocable `evolve-agent-with-harbor` Skill. The Skill clarifies the evaluation contract, initializes missing structures, establishes a baseline, diagnoses evidence, limits each iteration to one controlled Candidate change, runs regression evaluation, and produces a Promotion Gate recommendation.
5
+ The package gives DSH four deterministic Harbor tools, dedicated Tool cards, a Harbor conversation tab, an installation Doctor, and the model- and user-invocable `evolve-agent-with-harbor` Skill. The Skill clarifies the evaluation contract, initializes missing structures, establishes a baseline, diagnoses evidence, limits each iteration to one controlled Candidate change, runs regression evaluation, and produces a Promotion Gate recommendation.
6
6
 
7
7
  ## Install
8
8
 
9
9
  Requirements: Docker, Node.js 22+, pnpm, and [uv](https://docs.astral.sh/uv/). Run this from the business Agent workspace:
10
10
 
11
11
  ```bash
12
- npx dsh-harbor-evolution@0.3.0 setup --project-root "$PWD"
12
+ npx --yes dsh-harbor-evolution@latest setup --project-root "$PWD"
13
13
  ```
14
14
 
15
15
  The setup command installs both required runtimes:
16
16
 
17
- - `harbor-dsh-evolution==0.3.0` in a managed Python environment.
18
- - `dsh-harbor-evolution@0.3.0` in the selected DSH profile.
17
+ - `harbor-dsh-evolution==0.4.0` in a managed Python environment.
18
+ - `dsh-harbor-evolution@0.4.0` in the selected DSH profile.
19
19
 
20
20
  It then stores the absolute Harbor executable paths and `projectRoot` in the profile's `harbor-evolution` block and verifies the integration. Existing unrelated profile entries are preserved, and rerunning setup updates the same block.
21
21
 
22
22
  The default profile is `web`. Use `--profile headless` only when that is the profile you actually run. See all options with:
23
23
 
24
24
  ```bash
25
- npx dsh-harbor-evolution@0.3.0 setup --help
25
+ npx --yes dsh-harbor-evolution@latest setup --help
26
26
  ```
27
27
 
28
28
  Stop any old DSH process and run the exact restart command printed by setup. Then invoke:
@@ -39,6 +39,14 @@ The Plugin registers:
39
39
  - `harbor_eval_result`
40
40
  - `harbor_candidate_compare`
41
41
 
42
+ In the `web` profile, the same package also registers:
43
+
44
+ - a `Harbor` conversation tab for recent Jobs, metrics, Candidate identity, and evaluation-context digests;
45
+ - four compact result cards for the Harbor Tool calls;
46
+ - a `Harbor Evolution` Settings section that checks the configured project, Jobs directory, and CLI paths.
47
+
48
+ The Web UI is intentionally read-only. Starting an evaluation or deciding promotion remains an explicit Agent + Skill workflow, so a page refresh can never launch an expensive Job.
49
+
42
50
  The shortest direct evaluation call needs `candidatePath` and `datasetPath`. Prefer the Skill for a new project because it will not run or compare Jobs until the material evaluation contract is resolved.
43
51
 
44
52
  ## What setup writes
@@ -60,9 +68,11 @@ Keep `pythonPath` empty for the published Python package. `candidatePath`, `data
60
68
  For source development from the repository:
61
69
 
62
70
  ```bash
63
- ./hse dsh-install web
71
+ ./hse dsh-install-source web
64
72
  ```
65
73
 
74
+ Do not use `dsh plugin add ./packages/dsh-plugin` directly from a fresh checkout. pnpm records a `link:` dependency, and Node resolves imports from the real checkout path. The source installer first runs the package's locked `npm ci`, builds the portable Web client with its embedded ocean artwork, then links it and installs the local Python Adapter. Normal users should always use the registry-backed setup command above.
75
+
66
76
  See the [complete DSH Web quickstart](https://github.com/istarwyh/harbor-self-evolving/blob/main/docs/dsh-web-quickstart.md) for UI verification, first evaluation, Candidate comparison, and troubleshooting.
67
77
 
68
78
  The Plugin never deploys a Candidate or mutates the active Champion. Existing CI/CD remains responsible for building, deploying, and promoting the exact evaluated artifact.
package/index.js CHANGED
@@ -1,17 +1,19 @@
1
1
  import Schema from '@deepseek-ai/schemastery'
2
2
  import { defineTool } from '@deepseek-ai/dsh-tools'
3
- import { existsSync } from 'node:fs'
3
+ import { existsSync, readFileSync } from 'node:fs'
4
4
  import path from 'node:path'
5
5
  import { fileURLToPath } from 'node:url'
6
6
 
7
- import { compareCandidates, readEvaluation, runEvaluation, snapshot } from './lib/evolution.js'
8
7
  import { loadBundledSkill } from './lib/official-skill.js'
8
+ import { EvolutionService } from './lib/service.js'
9
+ import { installDashboardWeb } from './lib/web.js'
9
10
 
10
11
  export const name = 'harbor-evolution'
11
12
  export const inject = ['tools', 'skills']
12
13
 
13
14
  const packageDir = path.dirname(fileURLToPath(import.meta.url))
14
15
  const checkoutPythonPackage = path.resolve(packageDir, '../harbor-plugin')
16
+ const packageJson = JSON.parse(readFileSync(new URL('./package.json', import.meta.url), 'utf8'))
15
17
 
16
18
  function checkoutExecutable(name) {
17
19
  const candidate = path.join(checkoutPythonPackage, '.venv', 'bin', name)
@@ -55,8 +57,10 @@ export function apply(ctx, config) {
55
57
  : ''
56
58
  ),
57
59
  }
60
+ const service = new EvolutionService(resolved, { pluginVersion: packageJson.version })
58
61
 
59
62
  ctx.skills.register(loadBundledSkill())
63
+ installDashboardWeb(ctx, service)
60
64
 
61
65
  ctx.tools.register(jsonTool({
62
66
  name: 'harbor_candidate_snapshot',
@@ -66,7 +70,7 @@ export function apply(ctx, config) {
66
70
  candidateId: { type: 'string' },
67
71
  version: { type: 'string' },
68
72
  },
69
- }, args => snapshot(resolved, args)))
73
+ }, args => service.snapshot(args)))
70
74
 
71
75
  ctx.tools.register(jsonTool({
72
76
  name: 'harbor_eval_run',
@@ -78,7 +82,7 @@ export function apply(ctx, config) {
78
82
  datasetPath: { type: 'string', required: true },
79
83
  jobName: { type: 'string' },
80
84
  },
81
- }, args => runEvaluation(resolved, args)))
85
+ }, args => service.run(args)))
82
86
 
83
87
  ctx.tools.register(jsonTool({
84
88
  name: 'harbor_eval_result',
@@ -86,7 +90,7 @@ export function apply(ctx, config) {
86
90
  parameters: {
87
91
  jobPath: { type: 'string', required: true },
88
92
  },
89
- }, args => readEvaluation(resolved, args)))
93
+ }, args => service.result(args)))
90
94
 
91
95
  ctx.tools.register(jsonTool({
92
96
  name: 'harbor_candidate_compare',
@@ -96,5 +100,5 @@ export function apply(ctx, config) {
96
100
  candidateJob: { type: 'string', required: true },
97
101
  policyPath: { type: 'string', required: true },
98
102
  },
99
- }, args => compareCandidates(resolved, args)))
103
+ }, args => service.compare(args)))
100
104
  }