@mrciphersmith/roomyx 0.8.1 → 0.8.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/CHANGELOG.md CHANGED
@@ -13,6 +13,40 @@ patch and never a minor. The rule, the reason, and an audit of the four of seven
13
13
  releases that followed it are in
14
14
  [`docs/roomyx/versioning.md`](docs/roomyx/versioning.md) and decision D-13.
15
15
 
16
+ ## [0.8.2] — 2026-09-10
17
+
18
+ A patch. Closes the backlog's S3 and corrects two documents that described a
19
+ package this is not.
20
+
21
+ ### Fixed
22
+
23
+ - **The staged skill is synced, not copied once.** `roomyx init` copied
24
+ `.roomyx/skills/startup-room/SKILL.md` when it was absent and did nothing when
25
+ it was present, so after a package upgrade the staged copy kept the old text
26
+ forever — no hash, no backup, no warning. Guarded with `existsSync` it had
27
+ stopped clobbering hand edits and started going stale silently instead. It now
28
+ goes through `syncSkill`: the copy is refreshed when it is still ours,
29
+ left exactly as it is when it has been hand-edited or was never recorded, and
30
+ in that case `init` says so instead of staying quiet. A re-run that changes
31
+ nothing writes nothing — a backup of an identical file once per run would bury
32
+ the backups that matter.
33
+
34
+ ### Changed
35
+
36
+ - **`docs/roomyx/improvement-backlog.md` no longer prescribes `--force`.** Its
37
+ R3 definition of done still read "`--force` overrides", describing a flag
38
+ 0.8.0 removed. An amendment records what the refusal actually depends on now
39
+ — `dispatcherAttached`, the writer lease, and `--take-over` for a writer that
40
+ is provably gone — and marks the old sentence as history rather than
41
+ instruction. The backlog is the document an implementer works from.
42
+ - **`room.post_owner_command` is documented as implemented *and unreachable for
43
+ the consumer it was designed for*.** Both files now say it: the tool is
44
+ registered, tested and answers correctly, and its handler is a JS function
45
+ that the orchestrator spawning `serve` as a child process cannot attach, so a
46
+ bare `roomyx serve` answers `accepted: false`. "Implemented" without that
47
+ distinction reads as "this works for you", which is the misreading a status
48
+ field exists to prevent. D-18 item 6 closes the gap.
49
+
16
50
  ## [0.8.1] — 2026-09-10
17
51
 
18
52
  A patch. Found by triaging the action list against the code: this defect had
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrciphersmith/roomyx",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
4
4
  "description": "MCP server + terminal UI for startup-room: live room status, chat, per-agent modal, an installable room registry, and skill-sync.",
5
5
  "publishConfig": {
6
6
  "access": "public"
package/src/cli.ts CHANGED
@@ -234,6 +234,12 @@ const COMMANDS: Record<string, Command> = {
234
234
  const cwd = process.cwd();
235
235
  const result = init({ cwd, bundledSkillPath: bundledSkillPath() });
236
236
  console.log(result.created ? `Created ${result.roomyxDir}` : `${result.roomyxDir} already initialized`);
237
+ for (const warning of result.skillWarnings ?? []) {
238
+ // Said out loud rather than swallowed: the staged copy is now known to
239
+ // differ from the bundled skill, and whoever sees this decides what to
240
+ // do about it.
241
+ console.log(` ! ${warning}`);
242
+ }
237
243
 
238
244
  const { buildPlan, selectedItems } = await import("./installer/init-plan");
239
245
  const { applyPlan } = await import("./installer/init-apply");
@@ -1,5 +1,6 @@
1
- import { copyFileSync, existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
1
+ import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
2
2
  import { join } from "node:path";
3
+ import { syncSkill } from "./skill-sync";
3
4
 
4
5
  export interface InitOptions {
5
6
  cwd: string;
@@ -14,6 +15,11 @@ export interface InitResult {
14
15
  */
15
16
  created: boolean;
16
17
  roomyxDir: string;
18
+ /**
19
+ * Why the staged skill was left as it was, when it was. Empty or absent means
20
+ * the sync had nothing to report — not that it did nothing.
21
+ */
22
+ skillWarnings?: string[];
17
23
  }
18
24
 
19
25
  const DEFAULT_CONFIG = {
@@ -45,13 +51,59 @@ export function init(options: InitOptions): InitResult {
45
51
  if (!existsSync(registryPath)) {
46
52
  writeFileSync(registryPath, JSON.stringify({ schemaVersion: 1, rooms: [] }, null, 2));
47
53
  }
48
- // Guarded like the config and the registry beside it. This copy used to be
54
+ // Staged through `syncSkill`, not copied.
55
+ //
56
+ // Three defects lived in the two lines this replaces. The copy was
49
57
  // unconditional — no hash check, no backup, no gate — which is the operation
50
- // `syncSkill` refuses outright, while this function's own comment promises
51
- // "explicit, never-clobbering". Re-running `roomyx init` silently discarded
52
- // hand edits to the staged copy.
58
+ // `syncSkill` refuses outright, while the comment above promises "explicit,
59
+ // never-clobbering": a second `roomyx init` silently discarded hand edits to
60
+ // the staged copy. Guarding it with `existsSync` fixed the clobber and created
61
+ // the opposite one: after a package upgrade the staged copy kept the old text
62
+ // forever, silently. And `.roomyx/skills/` is read by nothing (`skills sync`
63
+ // reads the bundled copy straight from the package), so a stale file there is
64
+ // pure misinformation — it looks like the skill the project uses.
65
+ //
66
+ // `syncSkill` is what this wanted all along: a recorded hash per target, a
67
+ // backup before any overwrite, and a refusal that says which target it is
68
+ // refusing. `init` supplies `yes` itself, because the gate below is about
69
+ // *when* to write, and the operator's consent to scaffolding was the command.
53
70
  const stagedSkill = join(skillDir, "SKILL.md");
54
- if (!existsSync(stagedSkill)) copyFileSync(options.bundledSkillPath, stagedSkill);
71
+ const syncOptions = {
72
+ bundledSkillPath: options.bundledSkillPath,
73
+ targetPath: stagedSkill,
74
+ configPath,
75
+ };
76
+
77
+ // Asked before writing, so the decision is made from `syncSkill`'s own
78
+ // verdict rather than from a second copy of its rules here.
79
+ const dryRun = syncSkill({ ...syncOptions, dryRun: true });
80
+ const bundledContent = readFileSync(options.bundledSkillPath, "utf8");
81
+ const stagedContent = existsSync(stagedSkill) ? readFileSync(stagedSkill, "utf8") : null;
82
+ const identical = stagedContent === bundledContent;
83
+
84
+ if (dryRun.warnings.length > 0 && !identical) {
85
+ // Ours to refresh only while it is still ours. A hand-edited or unrecorded
86
+ // staged copy is left exactly as it is, and the caller is told why — the
87
+ // silence was the defect, not the staleness.
88
+ return { created: !registryAlreadyHasRooms, roomyxDir, skillWarnings: dryRun.warnings };
89
+ }
90
+ if (dryRun.warnings.length > 0 && identical) {
91
+ // The refusal protects content, and byte-identical content cannot be lost —
92
+ // so there is nothing to refuse. Writing here is what records the hash, and
93
+ // the hash is what the next real upgrade needs: the sync keys its records by
94
+ // absolute path, so a moved project otherwise keeps this copy stale forever
95
+ // and says so on every run. One adoption, one backup, and refreshes work
96
+ // again.
97
+ syncSkill({ ...syncOptions, yes: true });
98
+ return { created: !registryAlreadyHasRooms, roomyxDir };
99
+ }
100
+
101
+ if (!identical) {
102
+ // Only when there is a difference: a write with identical content still
103
+ // takes a timestamped backup, so a no-op `init` would fill the directory
104
+ // with copies of the same file and make a real backup impossible to find.
105
+ syncSkill({ ...syncOptions, yes: true });
106
+ }
55
107
 
56
108
  return { created: !registryAlreadyHasRooms, roomyxDir };
57
109
  }