pi-straw-boss 0.79.1 → 0.79.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-straw-boss",
3
- "version": "0.79.1",
3
+ "version": "0.79.2",
4
4
  "description": "Straw Boss coordination for pi in Herdr: sessions join a tab's net by choice, the first joiner is its main agent, a workspace tower opens on demand with a live monitoring dashboard, and boss_broadcast reaches the rest",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -1,5 +1,4 @@
1
1
  import { readFileSync } from "node:fs";
2
- import { legacyContract } from "./contract-legacy.ts";
3
2
 
4
3
  // The merge-train contract (docs/specs/2026-11-07-train-workers.md §14.1, TB-F008). The train's and the integrator's prompts follow two skills by name, `integrating` and `deploying`, and assume what version 1 of the contract
5
4
  // holds (the seven seams read from one `## Seam bindings` block, the Project skill headings with `## Acceptance`, the car slip); a model cannot tell a stale procedure from a current one by reading the skill. So a skill declares
@@ -41,7 +40,7 @@ export function checkContract(commands: readonly SkillCommand[] | undefined, nee
41
40
  if (!file) return refuse(`pi loaded no skill named \`${name}\`; install a package that provides it and /reload`);
42
41
  let text: string;
43
42
  try { text = readFileSync(file, "utf8"); } catch (error) { return refuse(`${file} cannot be read (${(error as Error).message}); fix it and /reload`); }
44
- const said = declaredContract(text) ?? legacyContract(file);
43
+ const said = declaredContract(text);
45
44
  if (said === undefined) return refuse(`${file} declares none (its frontmatter needs \`metadata:\` with \`merge-train-contract: "${need}"\` under it); update the package that ships it and /reload`);
46
45
  const versions = said.split(/[\s,]+/).filter(Boolean);
47
46
  if (!versions.length || versions.some((v) => !/^\d+$/.test(v))) return refuse(`${file} declares ${JSON.stringify(said)}; its value lists the contract versions the skill implements, such as "${need}"`);
@@ -1,19 +0,0 @@
1
- import { readFileSync, realpathSync } from "node:fs";
2
- import { dirname, join } from "node:path";
3
-
4
- // The transition of the merge-train contract (contract.ts), and the only place Straw Boss names a skills package. pi-anchorloop implemented contract 1 from 2.11.0 on, before there was a declaration to carry: a skill with no
5
- // declaration that sits in that package (`<package>/skills/<name>/SKILL.md`), at that version or newer, counts as declaring "1". A declaration always wins over this. Remove this file, its one call in contract.ts and its test
6
- // once the pi-anchorloop that declares the contract is the oldest in use.
7
-
8
- const PACKAGE = "pi-anchorloop", SINCE = [2, 11, 0];
9
-
10
- export function legacyContract(skillFile: string): string | undefined {
11
- try {
12
- const pkg = JSON.parse(readFileSync(join(dirname(realpathSync(skillFile)), "..", "..", "package.json"), "utf8")) as { name?: unknown; version?: unknown };
13
- const found = pkg.name === PACKAGE && typeof pkg.version === "string" ? /^(\d+)\.(\d+)\.(\d+)(-.*)?$/.exec(pkg.version) : null;
14
- if (!found) return undefined;
15
- const at = [1, 2, 3].map((i) => Number(found[i])), differs = at.findIndex((n, i) => n !== SINCE[i]);
16
- // A pre-release of the first version is older than it.
17
- return (differs < 0 ? found[4] === undefined : at[differs]! > SINCE[differs]!) ? "1" : undefined;
18
- } catch { return undefined; }
19
- }