oc-harness-setup 0.4.2 → 0.4.4

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/CHANGELOG.md CHANGED
@@ -1,16 +1,27 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.4.4] - 2026-10-22
4
+
5
+ - Version bump for the monorepo release; no runtime change.
6
+
3
7
  All notable changes to this project will be documented in this file.
4
8
 
5
9
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
10
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
11
 
8
- ## [Unreleased]
12
+ ## [0.4.3] - 2026-10-20
9
13
 
10
14
  ### Changed
11
15
 
12
16
  - README uses the house centered header, public “agents” wording, and Releases/Issues links; no shipped behavior change.
13
17
 
18
+ ### Fixed
19
+
20
+ - Fresh installs from the registry no longer fail the doctor: npm renames a
21
+ shipped root `.gitignore` to `.npmignore` on install, so the pack now ships
22
+ `gitignore.template` and the installer writes it to `.gitignore`. A test now
23
+ packs the tarball, installs it, and runs setup from the installed copy.
24
+
14
25
  ## [0.4.2] - 2026-10-20
15
26
 
16
27
  ### Fixed
package/README.md CHANGED
@@ -63,11 +63,11 @@ This starter grows through `evolve`: the smallest deliberate extension — one s
63
63
 
64
64
  ## Links
65
65
 
66
- - [Source](https://github.com/nathwn12/oc-harness-setup)
66
+ - Source: [nathwn12/oc-collections](https://github.com/nathwn12/oc-collections/tree/main/packages/oc-harness-setup) — the npm package remains individually installable.
67
67
  - [Published package](https://www.npmjs.com/package/oc-harness-setup)
68
- - [Changelog](https://github.com/nathwn12/oc-harness-setup/blob/main/CHANGELOG.md)
69
- - [Releases](https://github.com/nathwn12/oc-harness-setup/releases/latest)
70
- - [Issues](https://github.com/nathwn12/oc-harness-setup/issues)
68
+ - [Changelog](CHANGELOG.md)
69
+ - [Releases](https://github.com/nathwn12/oc-collections/releases)
70
+ - [Issues](https://github.com/nathwn12/oc-collections/issues)
71
71
  - [License](LICENSE)
72
72
 
73
73
  <!-- nathwn12 house footer: identical in every repo. Do not edit. -->
@@ -0,0 +1,5 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
2
+ <rect x="16" y="16" width="480" height="480" rx="112" fill="#12102A"/>
3
+ <path d="M160,152 H240 V200 H208 V312 H240 V360 H160 Z" fill="#A78BFA"/>
4
+ <path d="M352,152 H272 V200 H304 V312 H272 V360 H352 Z" fill="#A78BFA"/>
5
+ </svg>
@@ -0,0 +1,7 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
2
+ <style>html,body{margin:0;padding:0}svg{display:block;width:100vw;height:100vh}</style>
3
+ <!-- Direction A: "cursor-n" — rounded lowercase n + terminal block cursor, near-black ground -->
4
+ <rect x="16" y="16" width="480" height="480" rx="112" fill="#0B0F14"/>
5
+ <path d="M136 384 L136 264 C136 196 180 164 234 164 C288 164 328 198 328 264 L328 384 L264 384 L264 270 C264 242 250 230 234 230 C218 230 200 242 200 270 L200 384 Z" fill="#EEF3F6"/>
6
+ <rect x="352" y="312" width="52" height="72" rx="8" fill="#4DD4E8"/>
7
+ </svg>
package/bin/cli.js CHANGED
@@ -37,7 +37,11 @@ const PKG_NAME = 'oc-harness-setup';
37
37
  const PKG_ROOT = path.resolve(import.meta.dirname, '..');
38
38
  const MANIFEST_FILE = 'oc-harness-setup.manifest.json';
39
39
  const COPY_DIRS = ['agents', 'commands', 'skills', 'reference', 'scripts', '.docs', 'state-seed'];
40
- const COPY_FILES = ['AGENTS.md', 'GLOSSARY.md', '.gitignore'];
40
+ const COPY_FILES = ['AGENTS.md', 'GLOSSARY.md', 'gitignore.template'];
41
+ // npm renames a shipped root dotfile (`.gitignore` → `.npmignore`) on pack/
42
+ // install, so the pack ships `gitignore.template` and the installer aliases it
43
+ // back to `.gitignore` at the destination.
44
+ const FILE_ALIASES = { 'gitignore.template': '.gitignore' };
41
45
  // Source→destination aliases: the pack ships `state-seed/` (tracked) but the
42
46
  // live tree owns `state/` (git-ignored runtime), so every incoming
43
47
  // `state-seed/...` file lands at `state/...`. `rel` is ALWAYS the
@@ -67,6 +71,8 @@ const DISTRO_PLUGIN_IDS = ['oc-flight-deck'];
67
71
  // genuinely adopter-edited one is kept. The template is a controlled copy
68
72
  // graded by the doctor, so adopter edits are archived then overwritten.
69
73
  const PRESERVE_IF_EXISTS = new Set(['reference/models.md', 'AGENTS.md', '.gitignore', 'state/lessons.md']);
74
+ // Keyed on forward slashes; matched through norm() because rel is platform-native
75
+ // (path.join yields backslashes on Windows).
70
76
  // Leak markers — generic shapes, never a concrete machine. They catch the
71
77
  // maintainer's workstation leaking into the shipped tree (an absolute
72
78
  // user-profile path, a session id). They are linted against the package
@@ -314,7 +320,8 @@ function collectIncoming(configDir) {
314
320
  log('staging', `note: ${f} not present in this package — nothing to copy`);
315
321
  continue;
316
322
  }
317
- files.push({ rel: f, src, dest: path.join(configDir, f) });
323
+ const rel = FILE_ALIASES[f] ?? f;
324
+ files.push({ rel, src, dest: path.join(configDir, rel) });
318
325
  }
319
326
  return files;
320
327
  }
@@ -365,7 +372,7 @@ function stageFiles(files, manifest, prior, configDir) {
365
372
  if (destHash === srcHash) {
366
373
  action = 'skip';
367
374
  log('staging', `skip ${f.rel} (already identical — rerun-safe)`);
368
- } else if (PRESERVE_IF_EXISTS.has(f.rel)) {
375
+ } else if (PRESERVE_IF_EXISTS.has(norm(f.rel))) {
369
376
  // Upgrade rule: preserve only a GENUINELY adopter-edited file, i.e.
370
377
  // one that differs from the prior manifest hash. A destination that
371
378
  // still matches the prior installed hash is unmodified pack content —
@@ -1046,10 +1053,12 @@ function writeManifest(configDir, manifest) {
1046
1053
  // preserved stays preserved.
1047
1054
  function carryForwardJournal(manifest, prior) {
1048
1055
  if (!prior || !Array.isArray(prior.files)) return;
1049
- const before = new Map(prior.files.map((f) => [String(f.path), f]));
1056
+ // Prior manifests may spell paths with either separator.
1057
+ const norm = (p) => String(p).replace(/\\/g, '/');
1058
+ const before = new Map(prior.files.map((f) => [norm(f.path), f]));
1050
1059
  for (const e of manifest.files) {
1051
1060
  if (e.action === 'retired' || e.action === 'archived') continue; // a retirement/archive is this run's truth, never downgraded
1052
- const p = before.get(String(e.path));
1061
+ const p = before.get(norm(e.path));
1053
1062
  if (!p) continue;
1054
1063
  if (p.action === 'retired' || p.action === 'archived') continue; // a path the prior run settled that this run re-ships is fresh staging, not a settlement
1055
1064
  if (p.action === 'overwritten') {
@@ -1063,11 +1072,11 @@ function carryForwardJournal(manifest, prior) {
1063
1072
  // already deleted or archived and absent from this run's staging, but
1064
1073
  // --uninstall still needs them to restore the pre-install originals from
1065
1074
  // the backup chain.
1066
- const now = new Set(manifest.files.map((f) => String(f.path)));
1075
+ const now = new Set(manifest.files.map((f) => norm(f.path)));
1067
1076
  for (const p of prior.files) {
1068
- if ((p.action === 'retired' || p.action === 'archived') && !now.has(String(p.path))) {
1077
+ if ((p.action === 'retired' || p.action === 'archived') && !now.has(norm(p.path))) {
1069
1078
  manifest.files.push(p);
1070
- now.add(String(p.path));
1079
+ now.add(norm(p.path));
1071
1080
  }
1072
1081
  }
1073
1082
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oc-harness-setup",
3
- "version": "0.4.2",
3
+ "version": "0.4.4",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "oc-harness-setup": "bin/cli.js"
@@ -17,10 +17,11 @@
17
17
  "AGENTS.md",
18
18
  "GLOSSARY.md",
19
19
  "CHANGELOG.md",
20
- ".gitignore",
20
+ "gitignore.template",
21
21
  "opencode.jsonc",
22
22
  "README.md",
23
- "LICENSE"
23
+ "LICENSE",
24
+ "assets"
24
25
  ],
25
26
  "engines": {
26
27
  "node": ">=22"
@@ -37,7 +38,8 @@
37
38
  "author": "nathwn12",
38
39
  "repository": {
39
40
  "type": "git",
40
- "url": "git+https://github.com/nathwn12/oc-harness-setup.git"
41
+ "url": "git+https://github.com/nathwn12/oc-collections.git",
42
+ "directory": "packages/oc-harness-setup"
41
43
  },
42
44
  "description": "A general OpenCode starter for Windows: 9 agents on a dispatch loop, 6 skills, fresh-verdict research, state memory, cleanup crew, and self-extension tooling - installed by one explicit command.",
43
45
  "keywords": [
@@ -51,5 +53,7 @@
51
53
  "self-extension",
52
54
  "starter",
53
55
  "oc-harness-setup"
54
- ]
56
+ ],
57
+ "bugs": "https://github.com/nathwn12/oc-collections/issues",
58
+ "homepage": "https://github.com/nathwn12/oc-collections/tree/main/packages/oc-harness-setup"
55
59
  }
File without changes