@adamchanadam/agent-handoff-kit 0.3.47 → 0.3.48

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.
@@ -3,8 +3,12 @@ import { readFile } from "node:fs/promises";
3
3
  import path from "node:path";
4
4
  import { fileURLToPath } from "node:url";
5
5
 
6
- const __dirname = path.dirname(fileURLToPath(import.meta.url));
7
- const defaultCatalogPath = path.join(__dirname, "migration-baselines", "official-origin-catalog.json");
6
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
7
+ const defaultCatalogPath = path.join(__dirname, "migration-baselines", "official-origin-catalog.json");
8
+ const requiredArtifactBoundManagedSegments = Object.freeze([
9
+ Object.freeze({ version: "0.3.38", targetRel: "AGENTS.md" }),
10
+ Object.freeze({ version: "0.3.41", targetRel: "AGENTS.md" })
11
+ ]);
8
12
 
9
13
  export const OFFICIAL_ORIGIN_CATALOG_SCHEMA = 1;
10
14
 
@@ -23,7 +27,7 @@ export function validateOfficialOriginCatalog(catalog) {
23
27
 
24
28
  const targets = catalog.installedTargets.map((item) => item.targetRel);
25
29
  const referenced = new Set();
26
- for (const [version, release] of Object.entries(catalog.releases)) {
30
+ for (const [version, release] of Object.entries(catalog.releases)) {
27
31
  if (JSON.stringify(Object.keys(release.manifest)) !== JSON.stringify(targets)) {
28
32
  throw new Error(`official origin catalog manifest coverage mismatch: ${version}`);
29
33
  }
@@ -41,10 +45,15 @@ export function validateOfficialOriginCatalog(catalog) {
41
45
  }
42
46
  referenced.add(entry.contentId);
43
47
  }
44
- for (const targetRel of Object.keys(release.managedSegments ?? {})) {
45
- getArtifactBoundManagedSegment({ version, targetRel, catalog });
46
- }
47
- }
48
+ for (const targetRel of Object.keys(release.managedSegments ?? {})) {
49
+ getArtifactBoundManagedSegment({ version, targetRel, catalog });
50
+ }
51
+ }
52
+ for (const required of requiredArtifactBoundManagedSegments) {
53
+ if (!getArtifactBoundManagedSegment({ ...required, catalog })) {
54
+ throw new Error(`official origin catalog missing required managed segment: ${required.version} ${required.targetRel}`);
55
+ }
56
+ }
48
57
 
49
58
  for (const [contentId, content] of Object.entries(catalog.contents)) {
50
59
  if (contentId !== sha256(`${content.targetRel}\0${content.text}`)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adamchanadam/agent-handoff-kit",
3
- "version": "0.3.47",
3
+ "version": "0.3.48",
4
4
  "description": "Lightweight agent harness for project memory, handoff, and multi-session continuity.",
5
5
  "type": "module",
6
6
  "bin": {