harness-everything 1.3.2 → 1.5.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.
Files changed (46) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/.github/workflows/release.yml +23 -6
  4. package/CHANGELOG.md +42 -0
  5. package/RELEASING.md +2 -0
  6. package/ci/fixtures/system-one-colab-fit-layer-sitecustomize.py +72 -0
  7. package/ci/mechanism-2x-release-automation.test.js +17 -0
  8. package/ci/mechanism-system-one-colab.test.js +528 -0
  9. package/ci/mechanism-system-one-contract.test.js +30 -0
  10. package/ci/mechanism-system-one-curves.test.js +85 -0
  11. package/ci/mechanism-system-one-cycle.test.js +344 -34
  12. package/ci/mechanism-system-one-install.test.js +47 -0
  13. package/ci/mechanism-system-one-provider.test.js +2 -0
  14. package/ci/mechanism-system-one-resident.test.js +69 -0
  15. package/ci/system-one-adapter-test.py +86 -0
  16. package/ci/system-one-fit-layer-test.py +371 -0
  17. package/ci/system-one-layer-test.py +122 -0
  18. package/ci/system-one-train-test.py +26 -0
  19. package/docs/system-one-cycle.md +10 -0
  20. package/docs/system-one-training.md +3 -1
  21. package/harness-everything/SKILL.md +1 -1
  22. package/harness-everything/scripts/system-one/cua_adapter.py +36 -1
  23. package/harness-everything/scripts/system-one/install.js +10 -0
  24. package/harness-everything/scripts/system-one/layer.py +178 -0
  25. package/harness-everything/scripts/system-one/manifest.js +8 -1
  26. package/harness-everything/scripts/system-one/provider.js +12 -2
  27. package/opencode-plugin/plugin.json +1 -1
  28. package/package.json +1 -1
  29. package/plugins/harness-everything/.antigravity-plugin/plugin.json +1 -1
  30. package/plugins/harness-everything/.codex-plugin/plugin.json +1 -1
  31. package/plugins/harness-everything/plugin.json +1 -1
  32. package/plugins/harness-everything/skills/harness-everything/SKILL.md +1 -1
  33. package/plugins/harness-everything/skills/harness-everything/scripts/system-one/cua_adapter.py +36 -1
  34. package/plugins/harness-everything/skills/harness-everything/scripts/system-one/install.js +10 -0
  35. package/plugins/harness-everything/skills/harness-everything/scripts/system-one/layer.py +178 -0
  36. package/plugins/harness-everything/skills/harness-everything/scripts/system-one/manifest.js +8 -1
  37. package/plugins/harness-everything/skills/harness-everything/scripts/system-one/provider.js +12 -2
  38. package/sbom.cdx.json +7 -7
  39. package/scripts/system-one-colab.js +240 -0
  40. package/scripts/system-one-curves.js +52 -8
  41. package/scripts/system-one-cycle/evaluate.js +56 -5
  42. package/scripts/system-one-cycle/package.js +61 -3
  43. package/scripts/system-one-cycle/score.py +23 -2
  44. package/scripts/system-one-cycle/train.js +212 -20
  45. package/scripts/system-one-fit-layer.py +369 -0
  46. package/scripts/system-one-train.py +36 -9
@@ -10,7 +10,7 @@
10
10
  "name": "harness-everything",
11
11
  "source": "./",
12
12
  "description": "Harness OS: an orchestrated agent operating system — tier routing, circuit breaker guardrails, verification gates, WAL session memory, and self-evolving workspace rules.",
13
- "version": "1.3.2",
13
+ "version": "1.5.0",
14
14
  "author": {
15
15
  "name": "Miya Daniel"
16
16
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "harness-everything",
3
3
  "description": "Harness OS: an orchestrated agent operating system — tier routing, circuit breaker guardrails, verification gates, WAL session memory, and self-evolving workspace rules.",
4
- "version": "1.3.2",
4
+ "version": "1.5.0",
5
5
  "author": {
6
6
  "name": "Miya Daniel"
7
7
  },
@@ -16,7 +16,7 @@ permissions:
16
16
  contents: write
17
17
  issues: write
18
18
  pull-requests: write
19
- id-token: write
19
+ id-token: none
20
20
 
21
21
  jobs:
22
22
  # Release publication waits for the full CI matrix and document governance.
@@ -29,19 +29,35 @@ jobs:
29
29
  release:
30
30
  needs: [gate, doc-governance]
31
31
  runs-on: ubuntu-latest
32
+ # Only the release job may request npm's publishing identity.
33
+ permissions:
34
+ contents: write
35
+ issues: write
36
+ pull-requests: write
37
+ id-token: write
32
38
  steps:
33
39
  - name: Checkout full release history
34
40
  uses: actions/checkout@v7
35
41
  with:
36
42
  fetch-depth: 0
43
+ # #381 a1: ruleset main-protected requires status checks and cannot list the
44
+ # github-actions app as a bypass actor on a personal repo; the release commit
45
+ # and tag are pushed with this write deploy key, which the ruleset bypasses.
46
+ ssh-key: ${{ secrets.RELEASE_DEPLOY_KEY }}
37
47
 
38
48
  # Release tooling uses the repository's primary Node runtime.
39
49
  - name: Setup Node.js
40
50
  uses: actions/setup-node@v7
41
51
  with:
42
52
  node-version: 24
43
- cache: npm
44
- registry-url: https://registry.npmjs.org
53
+ # Avoid a token-based .npmrc and dependency caching in the release job.
54
+ package-manager-cache: false
55
+
56
+ - name: Verify npm trusted publishing CLI
57
+ run: |
58
+ node --version
59
+ npm --version
60
+ node -e 'const [major, minor, patch] = process.argv[1].split(".").map(Number); if (major < 11 || (major === 11 && (minor < 5 || (minor === 5 && patch < 1)))) { console.error("npm >= 11.5.1 is required for trusted publishing"); process.exit(1); }' "$(npm --version)"
45
61
 
46
62
  - name: Install project dependencies
47
63
  run: npm ci
@@ -67,10 +83,11 @@ jobs:
67
83
  - name: Calculate, prepare, and publish release
68
84
  env:
69
85
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
70
- NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
71
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
86
+ # npm authentication is provided by trusted publishing (OIDC).
72
87
  NPM_CONFIG_PROVENANCE: "true"
73
- run: npx --no-install semantic-release
88
+ # An SSH repository URL makes semantic-release push with the deploy key
89
+ # (its SSH auth check runs before any token fallback).
90
+ run: npx --no-install semantic-release --repository-url "git@github.com:${{ github.repository }}.git"
74
91
 
75
92
  - name: Upload release SBOM artifact
76
93
  if: ${{ hashFiles('sbom.cdx.json') != '' }}
package/CHANGELOG.md CHANGED
@@ -2,6 +2,40 @@
2
2
 
3
3
  All notable changes to this project are documented in this file.
4
4
 
5
+ ## [1.5.0](https://github.com/dyphn1/Harness-everything/compare/v1.4.0...v1.5.0) (2026-12-01)
6
+
7
+ ### Features
8
+
9
+ * **system-one:** [#567](https://github.com/dyphn1/Harness-everything/issues/567) pipeline fits the h layer with out-of-fold calibration and packages it ([35903ee](https://github.com/dyphn1/Harness-everything/commit/35903ee566630f412d2258dc62ca3a1b93acb305))
10
+ * **system-one:** [#567](https://github.com/dyphn1/Harness-everything/issues/567) runtime verifies and applies the per-stage echl h layer ([2294159](https://github.com/dyphn1/Harness-everything/commit/2294159499810471794b46a28eea9352c60b2d79))
11
+
12
+ ### Bug Fixes
13
+
14
+ * **system-one:** a new-cycle stage completes only with a validated fit outcome ([ac802b7](https://github.com/dyphn1/Harness-everything/commit/ac802b7fc70a5d740608b1f4af91fdd80c56ed44))
15
+ * **system-one:** bind the checkpoint config bytes to the fit evidence ([9cd2b4d](https://github.com/dyphn1/Harness-everything/commit/9cd2b4de762ccdf3827575cadcfbb9308a962257))
16
+ * **system-one:** fitter reads labels through the trainer and guards base nll parity ([46a1fce](https://github.com/dyphn1/Harness-everything/commit/46a1fce5964bb40d962f41b9b715c2cb28170eca))
17
+ * **system-one:** keep the unlayered curves contract while checking layered provenance ([2a4a9ee](https://github.com/dyphn1/Harness-everything/commit/2a4a9eedec2d188e42d6155f82f8c18173c643a1))
18
+ * **system-one:** layered oof calibration uses one h score space ([50b6360](https://github.com/dyphn1/Harness-everything/commit/50b63600200157d0c646bc8b2f636a8b077aff2b))
19
+ * **system-one:** load the layer module by path so file-loaded adapters import it ([457c60a](https://github.com/dyphn1/Harness-everything/commit/457c60a2174d716a59add1ebc765996815604949))
20
+ * **system-one:** load the layer module without writing bytecode into the shipped tree ([476542e](https://github.com/dyphn1/Harness-everything/commit/476542e799207f73d36df513502cd584ec9126fc))
21
+
22
+ ### Performance Improvements
23
+
24
+ * **system-one:** build the layer knn index once at load, not per request ([73f54db](https://github.com/dyphn1/Harness-everything/commit/73f54dbf78816d3a2e63c958675c5eb567a8b291))
25
+
26
+ ## [1.4.0](https://github.com/dyphn1/Harness-everything/compare/v1.3.2...v1.4.0) (2026-11-29)
27
+
28
+ ### Features
29
+
30
+ * **system-one:** add colab launcher for the train stage ([e7e45fd](https://github.com/dyphn1/Harness-everything/commit/e7e45fd47447259b608eedb56be5fc411f9a1cbb)), closes [#563](https://github.com/dyphn1/Harness-everything/issues/563)
31
+ * **system-one:** add trainer device selection for gpu training ([a5bafd1](https://github.com/dyphn1/Harness-everything/commit/a5bafd1b5404dcd0510d81cc7b1d2f1efcb57244)), closes [#563](https://github.com/dyphn1/Harness-everything/issues/563)
32
+
33
+ ### Bug Fixes
34
+
35
+ * **system-one:** lift colab exec silence limit for training stages ([573c451](https://github.com/dyphn1/Harness-everything/commit/573c4512c93ead714092bd0cc35205bb3118a035))
36
+ * **system-one:** publish colab stages atomically and bind remote status ([47f29df](https://github.com/dyphn1/Harness-everything/commit/47f29dfc7b4f58f0a9a07bc115c55e8589b3425f)), closes [#563](https://github.com/dyphn1/Harness-everything/issues/563)
37
+ * **system-one:** verify colab stage success from downloaded status ([8fd8baa](https://github.com/dyphn1/Harness-everything/commit/8fd8baa5d1d95c83bfba46588f20ce1d77050b39)), closes [#563](https://github.com/dyphn1/Harness-everything/issues/563)
38
+
5
39
  ## [1.3.2](https://github.com/dyphn1/Harness-everything/compare/v1.3.1...v1.3.2) (2026-11-28)
6
40
 
7
41
  ### Bug Fixes
@@ -304,6 +338,14 @@ Claude-Session: https://claude.ai/code/session_01RPz4xUrN12wGoL19istZUE
304
338
 
305
339
  ## [Unreleased]
306
340
 
341
+ ### System One external layer (ECHL arm H)
342
+
343
+ * **system-one:** a version may now carry a per-stage `<stage>.layer.json` (temperature, per-option bias and a char-gram kNN blend over the train split) recorded in the manifest as `layer` + `layerSha256`. Install, activation, the provider and the resident verify it like the weights and include it in the active identity; versions without a layer score exactly as before. The cycle fits the layer on the trainer's validation split with two-fold out-of-fold selection, calibrates thresholds on the out-of-fold scores, and packages it (`scripts/system-one-fit-layer.py`). Training data and the kNN index stay private (#567).
344
+
345
+ ### System One training on Colab
346
+
347
+ * **system-one:** `scripts/system-one-train.py` accepts `--device cpu|cuda|auto` (default `cpu`, CPU outputs unchanged) and records `device` and `torch` in the checkpoint metadata and `train-report.json`. The new `scripts/system-one-colab.js` runs the cycle `train` stage on a Google Colab VM through `google-colab-cli`: it uploads only the built `training/v1*` files plus the public trainer and catalog fixtures under a sha256 manifest, accepts each stage only from a downloaded `remote-status.json` with per-file hashes, always stops the VM, and leaves a run dir that the unchanged local `evaluate` → `package` path accepts (#563).
348
+
307
349
  ### E1 pilot retirement
308
350
 
309
351
  * **e1:** the E1 doc-reconciliation pilot is retired (#553). Its runtime modules and the W6 `inventory`/`seal` CLI (`hooks/scripts/w6-state-operations.js`) have been removed, and every `HARNESS_DOC_RECONCILIATION_PILOT` value is now ignored. Finish in-flight E1 work on the previous release, or end it and open a new session to redo review and verification. Recorded evidence stays in place; `doc-check` and document governance are unchanged.
package/RELEASING.md CHANGED
@@ -44,6 +44,8 @@ A push to `main` runs the full reusable CI gate and then semantic-release. A man
44
44
 
45
45
  The SBOM is generated from the release `package.json`/`package-lock.json` as CycloneDX 1.7, the current 1.x format, to satisfy consumers and regulatory baselines requiring CycloneDX 1.6 or later. It is intentionally not committed to Git. The release publishes `sbom.cdx.json` in the npm tarball and as a GitHub Release asset, while the workflow also retains it as an Actions artifact.
46
46
 
47
+ The release commit and tag are pushed over SSH with the `RELEASE_DEPLOY_KEY` write deploy key, because ruleset `main-protected` requires status checks on `main` and a personal repository cannot list the GitHub Actions app as a bypass actor; the deploy key is the ruleset's only always-bypass actor besides PR-merge bypass for admins (#381). `GITHUB_TOKEN` stays in use for GitHub API calls (releases, comments).
48
+
47
49
  Release concurrency is serialized so two updates to `main` cannot publish competing versions.
48
50
 
49
51
  ## Version ownership
@@ -0,0 +1,72 @@
1
+ """Controlled fitter output for the System One Colab launcher mechanism test."""
2
+ import hashlib
3
+ import json
4
+ import os
5
+ from pathlib import Path
6
+ import sys
7
+
8
+ _FITTER = os.environ.get('S1_COLAB_FIT_LAYER_SCRIPT')
9
+ if (_FITTER and sys.argv and os.path.normcase(os.path.realpath(sys.argv[0]))
10
+ == os.path.normcase(os.path.realpath(_FITTER))
11
+ and os.environ.get('S1_COLAB_FIT_LAYER_FIXTURE') == '1'):
12
+ try:
13
+ names = ('--run-dir', '--data-dir', '--task', '--holdout')
14
+ args = sys.argv[1:]
15
+ if len(args) != len(names) * 2:
16
+ raise ValueError('expected run-dir, data-dir, task, and holdout exactly once')
17
+ values = {}
18
+ for name, value in zip(args[::2], args[1::2]):
19
+ if name not in names or name in values or not value:
20
+ raise ValueError('expected run-dir, data-dir, task, and holdout exactly once')
21
+ values[name] = value
22
+ if set(values) != set(names):
23
+ raise ValueError('expected run-dir, data-dir, task, and holdout exactly once')
24
+
25
+ run_dir = Path(values['--run-dir'])
26
+ data_dir = Path(values['--data-dir'])
27
+ task = values['--task']
28
+ if task not in ('validity', 'intent', 'tier'):
29
+ raise ValueError('unknown fixture task')
30
+ report_path = run_dir / 'train-report.json'
31
+ report = json.loads(report_path.read_text(encoding='utf-8'))
32
+ if report.get('task') != task or not isinstance(report.get('catalog'), list):
33
+ raise ValueError('fixture trainer report is invalid')
34
+ checkpoint_path = run_dir / 'harness-routing-v1.safetensors'
35
+ scores_path = run_dir / 'val-scores.jsonl'
36
+ for required in (checkpoint_path, scores_path, Path(values['--holdout'])):
37
+ if not required.is_file():
38
+ raise ValueError('fixture fitter input is missing')
39
+
40
+ digest = lambda file: hashlib.sha256(Path(file).read_bytes()).hexdigest()
41
+ label_file = 'labels-intent.jsonl' if task == 'intent' else 'labels.jsonl'
42
+ datasets = {name: digest(data_dir / name) for name in ('prompts.jsonl', label_file)}
43
+ validation = [json.loads(line) for line in scores_path.read_text(encoding='utf-8').splitlines() if line.strip()]
44
+ layered_path = run_dir / 'val-scores-layered.jsonl'
45
+ layered_path.write_text(''.join(json.dumps(row, separators=(',', ':')) + '\n' for row in validation), encoding='utf-8')
46
+ layer_path = run_dir / 'layer.json'
47
+ layer_path.write_text(json.dumps({
48
+ 'schemaVersion': 1, 'kind': 'echl-h', 'stage': task, 'options': report['catalog'],
49
+ 'temperature': 1, 'bias': None, 'alpha': 0, 'k': 15, 'ngrams': [3, 4, 5],
50
+ 'maxChars': 2000, 'index': [],
51
+ 'fit': {'candidate': 'H-temp', 'heldOutRows': len(validation), 'nll': 0.2, 'baseNll': 0.3, 'oof': True},
52
+ }, separators=(',', ':')) + '\n', encoding='utf-8')
53
+ outcome = {
54
+ 'schemaVersion': 1, 'task': task, 'outcome': 'layer', 'datasetSha256': datasets,
55
+ 'checkpointSha256': digest(checkpoint_path), 'checkpointConfigSha256': digest(run_dir / 'harness-routing-v1.json'),
56
+ 'trainerReportSha256': digest(report_path),
57
+ 'holdoutSha256': digest(values['--holdout']), 'validationIds': [row['id'] for row in validation],
58
+ 'folds': [], 'candidate': 'H-temp', 'temperature': 1, 'alpha': 0,
59
+ 'baseNll': 0.3, 'selectedNll': 0.2, 'layerSha256': digest(layer_path),
60
+ 'calibrationInput': 'val-scores-layered.jsonl', 'calibrationInputSha256': digest(layered_path),
61
+ }
62
+ (run_dir / 'layer-outcome.json').write_text(json.dumps(outcome, indent=2) + '\n', encoding='utf-8')
63
+ with open(os.environ['S1_COLAB_FIT_LAYER_LOG'], 'a', encoding='utf-8') as stream:
64
+ stream.write(json.dumps({'task': task, 'runDir': str(run_dir)}) + '\n')
65
+ except Exception as error:
66
+ sys.stderr.write('S1 Colab fixture fitter: ' + str(error) + '\n')
67
+ sys.stderr.flush()
68
+ sys.stdout.flush()
69
+ os._exit(2)
70
+ sys.stdout.flush()
71
+ sys.stderr.flush()
72
+ os._exit(0)
@@ -14,6 +14,23 @@ assert.deepStrictEqual(config.branches, ['main']);
14
14
  assert.ok(config.branches.every(branch => typeof branch === 'string'), 'release branches must not declare prerelease channels');
15
15
  assert.strictEqual(config.tagFormat, 'v${version}');
16
16
 
17
+ // The npm release must authenticate through the trusted workflow identity only.
18
+ const releaseWorkflow = require('js-yaml').load(fs.readFileSync(path.join(ROOT, '.github/workflows/release.yml'), 'utf8'));
19
+ const releaseJob = releaseWorkflow.jobs.release;
20
+ assert.strictEqual(releaseWorkflow.permissions['id-token'], 'none', 'non-publishing jobs must not inherit OIDC permission');
21
+ assert.strictEqual(releaseJob.permissions['id-token'], 'write', 'publish job must have OIDC permission');
22
+ const setupNode = releaseJob.steps.find(step => step.uses && step.uses.startsWith('actions/setup-node@'));
23
+ assert.ok(setupNode, 'release Node setup is required');
24
+ assert.strictEqual(setupNode.with['package-manager-cache'], false, 'release build must not use dependency caching');
25
+ assert.ok(!Object.hasOwn(setupNode.with, 'registry-url'), 'setup-node must not create a token-based npmrc for semantic-release');
26
+ const publish = releaseJob.steps.find(step => step.run && step.run.includes('npx --no-install semantic-release'));
27
+ assert.ok(publish, 'semantic-release publish step is required');
28
+ for (const key of ['NPM_TOKEN', 'NODE_AUTH_TOKEN']) {
29
+ assert.ok(!Object.hasOwn(publish.env || {}, key), `publish must not inject ${key}`);
30
+ assert.ok(!Object.hasOwn(releaseJob.env || {}, key), `release job must not inject ${key}`);
31
+ assert.ok(!Object.hasOwn(releaseWorkflow.env || {}, key), `release workflow must not inject ${key}`);
32
+ }
33
+
17
34
  const analyzer = config.plugins.find(plugin => Array.isArray(plugin) && plugin[0] === '@semantic-release/commit-analyzer');
18
35
  assert.ok(analyzer, 'commit analyzer configuration missing');
19
36
  const rules = new Map(analyzer[1].releaseRules.filter(rule => rule.type).map(rule => [rule.type, rule.release]));