dsh-harbor-evolution 0.3.1 → 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,8 +1,8 @@
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
 
@@ -14,8 +14,8 @@ npx --yes dsh-harbor-evolution@latest setup --project-root "$PWD"
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
 
@@ -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
@@ -63,7 +71,7 @@ For source development from the repository:
63
71
  ./hse dsh-install-source web
64
72
  ```
65
73
 
66
- 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`, then links it and installs the local Python Adapter. Normal users should always use the registry-backed setup command above.
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.
67
75
 
68
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.
69
77
 
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
  }