superbee 0.4.3-pre.15 → 0.4.3-pre.17

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 (2) hide show
  1. package/dist/superbee.mjs +30 -11
  2. package/package.json +1 -1
package/dist/superbee.mjs CHANGED
@@ -44,7 +44,7 @@ var __toESM = (mod, isNodeMode, target3) => (target3 = mod != null ? __create(__
44
44
  var define_SUPERBEE_BUILD_IDENTITY_default;
45
45
  var init_define_SUPERBEE_BUILD_IDENTITY = __esm({
46
46
  "<define:__SUPERBEE_BUILD_IDENTITY__>"() {
47
- define_SUPERBEE_BUILD_IDENTITY_default = { schema: "superbee.build-identity.v1", package: { name: "superbee", version: "0.4.3-pre.15" }, source: { commit: "801978f77ae986f691ae0d5231f9000a2cadd152", dirty: false }, artifact: { channel: "npm-package" }, compatibility_contracts: { skill: 1, hook: 1, mcp: 1 } };
47
+ define_SUPERBEE_BUILD_IDENTITY_default = { schema: "superbee.build-identity.v1", package: { name: "superbee", version: "0.4.3-pre.17" }, source: { commit: "b482ebcb7535d85db1a8a550074f85e55febcd01", dirty: false }, artifact: { channel: "npm-package" }, compatibility_contracts: { skill: 1, hook: 1, mcp: 1 } };
48
48
  }
49
49
  });
50
50
 
@@ -21797,7 +21797,7 @@ async function readRecipeDocIfPresent(bundle, id) {
21797
21797
  function evolutionBlocker(blockers, code3, id, message, field) {
21798
21798
  blockers.push({ code: code3, id, message, ...field ? { field } : {} });
21799
21799
  }
21800
- function monotonicEvolutionBlockers(current, desired, blockers) {
21800
+ function monotonicEvolutionBlockers(current, desired, blockers, hasUnchangedRecipeBaseline) {
21801
21801
  const currentRequired = new Set(current.fields.required);
21802
21802
  for (const field of desired.fields.required) {
21803
21803
  if (!currentRequired.has(field)) {
@@ -21859,15 +21859,29 @@ function monotonicEvolutionBlockers(current, desired, blockers) {
21859
21859
  `links.${linkType}`
21860
21860
  );
21861
21861
  }
21862
- if (!okfValuesEqual(current.expectsInbound ?? {}, desired.expectsInbound ?? {})) {
21862
+ const desiredInbound = desired.expectsInbound ?? {};
21863
+ for (const [linkType, source2] of Object.entries(current.expectsInbound ?? {})) {
21864
+ if (Object.hasOwn(desiredInbound, linkType) && desiredInbound[linkType] === source2) continue;
21863
21865
  evolutionBlocker(
21864
21866
  blockers,
21865
21867
  "RECIPE_EVOLUTION_RELATIONSHIP_CHANGE",
21866
21868
  desired.id,
21867
- `automatic evolution does not change inbound relationship expectations for '${desired.governs}'`,
21868
- "expects_inbound"
21869
+ `automatic evolution does not remove or retarget the inbound relationship expectation '${linkType}' for '${desired.governs}'`,
21870
+ `expects_inbound.${linkType}`
21869
21871
  );
21870
21872
  }
21873
+ if (!hasUnchangedRecipeBaseline) {
21874
+ for (const linkType of Object.keys(desiredInbound)) {
21875
+ if (Object.hasOwn(current.expectsInbound ?? {}, linkType)) continue;
21876
+ evolutionBlocker(
21877
+ blockers,
21878
+ "RECIPE_EVOLUTION_RELATIONSHIP_CHANGE",
21879
+ desired.id,
21880
+ `adding inbound relationship expectation '${linkType}' for '${desired.governs}' requires an unchanged recipe baseline; restore any locally removed expectations manually first`,
21881
+ `expects_inbound.${linkType}`
21882
+ );
21883
+ }
21884
+ }
21871
21885
  const sameTerminalOccurrences = Object.keys(current.fields.terminal).length === Object.keys(desired.fields.terminal).length && Object.entries(current.fields.terminal).every(([field, values]) => Object.hasOwn(desired.fields.terminal, field) && okfValuesEqual([...values].sort(), [...desired.fields.terminal[field]].sort()));
21872
21886
  if (!sameTerminalOccurrences) {
21873
21887
  evolutionBlocker(
@@ -22100,7 +22114,7 @@ async function prepareRecipeEvolution(bundle, sourceRecipe) {
22100
22114
  desired_version: desiredVersion
22101
22115
  });
22102
22116
  if (!unchanged2 && existing.doc.frontmatter.type === "Convention" && parsedCurrent.ok && parsedCandidate.ok && parsedCurrent.kind.governs === parsedCandidate.kind.governs) {
22103
- monotonicEvolutionBlockers(parsedCurrent.kind, parsedCandidate.kind, blockers);
22117
+ monotonicEvolutionBlockers(parsedCurrent.kind, parsedCandidate.kind, blockers, hasUnchangedRecipeBaseline);
22104
22118
  addedRestrictions.set(parsedCandidate.kind.governs, addedFieldRestrictions(parsedCurrent.kind, parsedCandidate.kind));
22105
22119
  for (const linkType of addedLinkTypes(parsedCurrent.kind, parsedCandidate.kind)) addedLinkTexts.add(linkType);
22106
22120
  }
@@ -28991,7 +29005,7 @@ var init_source_profiles = __esm({
28991
29005
  };
28992
29006
  }
28993
29007
  });
28994
- SOURCE_PLUGIN_CORE_VERSION = "0.2.0-pre.25";
29008
+ SOURCE_PLUGIN_CORE_VERSION = "0.2.0-pre.27";
28995
29009
  SOURCE_PROFILES = Object.freeze([restJsonProfile].map((profile) => Object.freeze({ id: profile.id, version: profile.version, kind: profile.kind })));
28996
29010
  }
28997
29011
  });
@@ -32103,7 +32117,7 @@ function decodeBlobWriteResult(raw, expected) {
32103
32117
  if (error51.scope !== "principal" && error51.scope !== "bundle" || error51.resetAt !== void 0 && (typeof error51.resetAt !== "string" || !Number.isFinite(Date.parse(error51.resetAt)))) throw refuse();
32104
32118
  } else if (error51.scope !== void 0 || error51.resetAt !== void 0) throw refuse();
32105
32119
  if (error51.code === "deletions_held") {
32106
- if (operationId !== "blobs.delete.v1" || !count2(error51.deletions) || !count2(error51.baseline)) throw refuse();
32120
+ if (operationId !== "blobs.delete.v1" || !count2(error51.deletions) || !Number.isSafeInteger(error51.baseline) || error51.baseline < 0) throw refuse();
32107
32121
  } else if (error51.deletions !== void 0 || error51.baseline !== void 0) throw refuse();
32108
32122
  return { ok: false, operationId, error: { ...error51 } };
32109
32123
  }
@@ -34270,7 +34284,7 @@ var init_write2 = __esm({
34270
34284
  // ../core/src/blob-journal.ts
34271
34285
  function captureBlobDeletionHold(value) {
34272
34286
  const hold = captureJournalValue(value);
34273
- if (!object4(hold) || !only3(hold, ["deletions", "baseline"]) || ![hold.deletions, hold.baseline].every((n) => Number.isSafeInteger(n) && n >= 1)) throw new TypeError("invalid blob deletion hold");
34287
+ if (!object4(hold) || !only3(hold, ["deletions", "baseline"]) || !Number.isSafeInteger(hold.deletions) || hold.deletions < 1 || !Number.isSafeInteger(hold.baseline) || hold.baseline < 0) throw new TypeError("invalid blob deletion hold");
34274
34288
  return hold;
34275
34289
  }
34276
34290
  function captureBlobNotDispatched(value) {
@@ -100708,7 +100722,8 @@ function scanBody(body, visit3) {
100708
100722
  flush();
100709
100723
  if (stopped) return;
100710
100724
  }
100711
- byteOffset += utf84(character).byteLength;
100725
+ const point3 = character.codePointAt(0);
100726
+ byteOffset += point3 <= 127 ? 1 : point3 <= 2047 ? 2 : point3 <= 65535 ? 3 : 4;
100712
100727
  }
100713
100728
  flush();
100714
100729
  }
@@ -104071,7 +104086,11 @@ writes each changed convention with exact-version CAS. Concurrent non-target cha
104071
104086
  by a postcondition check and reported with completed work. It never replaces existing values,
104072
104087
  active View assets, or artifacts omitted from the source. It may add a field type (fields.types) or
104073
104088
  an enum (fields.values) to a declared field only when every existing instance conforms; otherwise
104074
- the plan names the violating documents. It never changes or removes a type or an enum. A Connector
104089
+ the plan names the violating documents. It never changes or removes a type or an enum. New outbound
104090
+ link types revalidate existing edges; new expects_inbound labels add status graph lint only and do
104091
+ not require existing records to have those edges. Inbound additions require an unchanged recipe
104092
+ baseline so locally removed expectations are not restored silently. Neither declaration may remove
104093
+ or retarget an installed label. A Connector
104075
104094
  has no additive merge: a changed one replaces the installed document whole, and only one this
104076
104095
  recipe wrote that nobody changed since. A Connector a person edited, an unstamped one that differs
104077
104096
  and another recipe's Connector each block the plan and are never rewritten.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "superbee",
3
- "version": "0.4.3-pre.15",
3
+ "version": "0.4.3-pre.17",
4
4
  "type": "module",
5
5
  "description": "Agent-facing Superbee CLI for reading and writing local OKF knowledge bundles: context notes, docs, cross-links, and live bundle Views.",
6
6
  "keywords": [