@evo-dev/core 0.0.1-alpha.14 → 0.0.1-alpha.16

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.
@@ -627,6 +627,11 @@ var DEFAULT_MAX_RAW_EVENT_BYTES = 64 * 1024;
627
627
  // packages/core/src/evolution/knowledge/index.ts
628
628
  import { mkdir, readFile as readFile2, readdir as readdir2, rename, rm, stat as stat2, writeFile } from "node:fs/promises";
629
629
  import { dirname as dirname3, isAbsolute as isAbsolute3, join as join3, relative as relative2, resolve as resolve2 } from "node:path";
630
+
631
+ // packages/core/src/evolution/knowledge/change-store.ts
632
+ var KNOWLEDGE_CHANGE_LOCK_STALE_MS = 5 * 60 * 1000;
633
+
634
+ // packages/core/src/evolution/knowledge/index.ts
630
635
  var RESERVED_OKF_FILENAMES = new Set(["index.md", "log.md"]);
631
636
  var ACTIVE_OKF_REVIEW_STATES = ["accepted", "auto-accepted"];
632
637
  var OKF_REVIEW_STATES = [
@@ -881,6 +886,7 @@ function parseOkfConceptFile(okfDir, filePath, content) {
881
886
  reviewState,
882
887
  lifecycle: lifecycleParsed.lifecycle,
883
888
  lifecyclePersisted: lifecycleParsed.persisted,
889
+ verificationSnapshot: parseOkfVerificationSnapshot(frontmatter),
884
890
  title,
885
891
  description,
886
892
  tags,
@@ -891,6 +897,21 @@ function parseOkfConceptFile(okfDir, filePath, content) {
891
897
  body: parsed.body
892
898
  };
893
899
  }
900
+ function parseOkfVerificationSnapshot(frontmatter) {
901
+ const block = extractNestedYamlBlock(frontmatter, "evodev", "verificationSnapshot");
902
+ if (block === null)
903
+ return null;
904
+ const schemaVersion = readIndentedYamlScalar(block, "schemaVersion");
905
+ const verifiedAt = normalizeIsoDateString(readIndentedYamlScalar(block, "verifiedAt"));
906
+ if (schemaVersion !== "1" || verifiedAt === null)
907
+ return null;
908
+ return {
909
+ schemaVersion: 1,
910
+ verifiedAt,
911
+ evidenceRefs: readYamlList(block, "evidenceRefs"),
912
+ repository: null
913
+ };
914
+ }
894
915
  function matchesConceptFilters(concept, input, equivalentProjectKeys) {
895
916
  const projectKeys = (equivalentProjectKeys ?? []).map(sanitizeSlug);
896
917
  if (input.projectKey !== undefined && concept.repoTags.length > 0 && ![sanitizeSlug(input.projectKey), ...projectKeys].some((projectKey) => concept.repoTags.includes(projectKey) || concept.tags.includes(`repo:${projectKey}`))) {
@@ -1456,7 +1477,7 @@ function createDefaultTeamRuntimeSettings() {
1456
1477
  }
1457
1478
  function createDefaultMemorySettings() {
1458
1479
  return {
1459
- autoAccept: true,
1480
+ reviewKnowledgeUpdates: true,
1460
1481
  runtimeInjection: true,
1461
1482
  staleReview: true,
1462
1483
  lexicalIndex: true,
@@ -1586,8 +1607,11 @@ function parseEvolutionSettings(value, path) {
1586
1607
  function parseMemorySettings(value, path) {
1587
1608
  const input = expectRecord2(value, path);
1588
1609
  const defaults = createDefaultMemorySettings();
1610
+ if (input.autoAccept !== undefined) {
1611
+ expectBoolean(input.autoAccept, `${path}.autoAccept`);
1612
+ }
1589
1613
  return {
1590
- autoAccept: input.autoAccept === undefined ? defaults.autoAccept : expectBoolean(input.autoAccept, `${path}.autoAccept`),
1614
+ reviewKnowledgeUpdates: input.reviewKnowledgeUpdates === undefined ? defaults.reviewKnowledgeUpdates : expectBoolean(input.reviewKnowledgeUpdates, `${path}.reviewKnowledgeUpdates`),
1591
1615
  runtimeInjection: input.runtimeInjection === undefined ? defaults.runtimeInjection : expectBoolean(input.runtimeInjection, `${path}.runtimeInjection`),
1592
1616
  staleReview: input.staleReview === undefined ? defaults.staleReview : expectBoolean(input.staleReview, `${path}.staleReview`),
1593
1617
  lexicalIndex: input.lexicalIndex === undefined ? defaults.lexicalIndex : expectBoolean(input.lexicalIndex, `${path}.lexicalIndex`),