@mnemonik/cli 7.140.1 → 7.140.3

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 (73) hide show
  1. package/dist/auth/credentials.js +41 -8
  2. package/dist/auth/index.js +41 -8
  3. package/dist/auth/installSession.js +1 -1
  4. package/dist/auth/status.js +1 -1
  5. package/dist/authorizationWords.js +1 -1
  6. package/dist/diagnostics.js +41 -8
  7. package/dist/digests.json +71 -67
  8. package/dist/help.d.ts.map +1 -1
  9. package/dist/help.js +50 -4
  10. package/dist/help.js.map +1 -1
  11. package/dist/hooksLog.d.ts +61 -0
  12. package/dist/hooksLog.d.ts.map +1 -0
  13. package/dist/hooksLog.js +350 -0
  14. package/dist/hooksLog.js.map +1 -0
  15. package/dist/humanReason.d.ts +7 -0
  16. package/dist/humanReason.d.ts.map +1 -1
  17. package/dist/humanReason.js +12 -4
  18. package/dist/humanReason.js.map +1 -1
  19. package/dist/identity/migrate.js +102 -69
  20. package/dist/install/hosts.js +1 -1
  21. package/dist/install/journal.js +41 -8
  22. package/dist/install/journey.d.ts.map +1 -1
  23. package/dist/install/journey.js +41 -11
  24. package/dist/install/journey.js.map +1 -1
  25. package/dist/install/ownership.js +41 -8
  26. package/dist/install/transaction.d.ts.map +1 -1
  27. package/dist/install/transaction.js +42 -10
  28. package/dist/install/transaction.js.map +1 -1
  29. package/dist/install/ui.js +41 -8
  30. package/dist/installSession.js +1 -1
  31. package/dist/installation.js +41 -8
  32. package/dist/launcher.js +41 -8
  33. package/dist/preflight.js +201 -164
  34. package/dist/project/eligibility.js +41 -8
  35. package/dist/project/records.js +41 -8
  36. package/dist/project.d.ts +35 -1
  37. package/dist/project.d.ts.map +1 -1
  38. package/dist/project.js +294 -231
  39. package/dist/project.js.map +1 -1
  40. package/dist/router.d.ts +7 -0
  41. package/dist/router.d.ts.map +1 -1
  42. package/dist/router.js +340 -182
  43. package/dist/router.js.map +1 -1
  44. package/dist/runtime/bootstrap.d.ts +22 -1
  45. package/dist/runtime/bootstrap.d.ts.map +1 -1
  46. package/dist/runtime/bootstrap.js +61 -8
  47. package/dist/runtime/bootstrap.js.map +1 -1
  48. package/dist/runtime/releaseSource.js +41 -8
  49. package/dist/runtime/selfUpdate.js +41 -8
  50. package/dist/runtime/signers.js +789 -183
  51. package/dist/runtime/store.d.ts +1 -1
  52. package/dist/runtime/store.d.ts.map +1 -1
  53. package/dist/runtime/store.js +54 -5
  54. package/dist/runtime/store.js.map +1 -1
  55. package/dist/runtime/updateCheck.js +41 -8
  56. package/dist/sbom.json +21 -21
  57. package/dist/scanner/control.js +41 -8
  58. package/dist/scanner/data.js +1 -1
  59. package/dist/scanner/discover.d.ts.map +1 -1
  60. package/dist/scanner/discover.js +211 -171
  61. package/dist/scanner/discover.js.map +1 -1
  62. package/dist/scanner/enable.d.ts.map +1 -1
  63. package/dist/scanner/enable.js +440 -57
  64. package/dist/scanner/enable.js.map +1 -1
  65. package/dist/scanner/picker.d.ts.map +1 -1
  66. package/dist/scanner/picker.js +12 -4
  67. package/dist/scanner/picker.js.map +1 -1
  68. package/dist/scanner/service.js +41 -8
  69. package/dist/scanner/update.js +41 -8
  70. package/dist/scanner-release.json +24 -24
  71. package/dist/status.js +41 -8
  72. package/dist/vendor/local-setup.js +44 -11
  73. package/package.json +31 -31
@@ -885,6 +885,88 @@ var require_ignore = __commonJS({
885
885
  }
886
886
  });
887
887
 
888
+ // packages/shared/dist/secretPatterns.js
889
+ var init_secretPatterns = __esm({
890
+ "packages/shared/dist/secretPatterns.js"() {
891
+ "use strict";
892
+ }
893
+ });
894
+
895
+ // packages/shared/dist/protectedPaths.js
896
+ var init_protectedPaths = __esm({
897
+ "packages/shared/dist/protectedPaths.js"() {
898
+ "use strict";
899
+ }
900
+ });
901
+
902
+ // packages/shared/dist/projectIdentityFile.js
903
+ function parseIdentityFile(text) {
904
+ let value;
905
+ try {
906
+ value = JSON.parse(text);
907
+ } catch (error) {
908
+ return { kind: "malformed", detail: `unparseable JSON: ${error.message}` };
909
+ }
910
+ if (!value || typeof value !== "object" || Array.isArray(value)) {
911
+ return { kind: "malformed", detail: "identity file must contain a JSON object" };
912
+ }
913
+ const record = value;
914
+ if (record.schemaVersion !== 1) {
915
+ return { kind: "unknown_version", version: record.schemaVersion };
916
+ }
917
+ const unknownKey = Object.keys(record).find((key) => !IDENTITY_KEYS.has(key));
918
+ if (unknownKey)
919
+ return { kind: "malformed", detail: `unknown key "${unknownKey}"` };
920
+ if (!isCanonicalUuid(record.projectId)) {
921
+ return { kind: "malformed", detail: '"projectId" must be a canonical RFC 4122 UUID string' };
922
+ }
923
+ if ("projectName" in record && typeof record.projectName !== "string") {
924
+ return { kind: "malformed", detail: '"projectName" must be a string when present' };
925
+ }
926
+ if ("repositoryFingerprint" in record && (!record.repositoryFingerprint || typeof record.repositoryFingerprint !== "object" || Array.isArray(record.repositoryFingerprint))) {
927
+ return { kind: "malformed", detail: '"repositoryFingerprint" must be an object when present' };
928
+ }
929
+ const fingerprint = record.repositoryFingerprint;
930
+ const unknownFingerprintKey = fingerprint ? Object.keys(fingerprint).find((key) => !FINGERPRINT_KEYS.has(key)) : void 0;
931
+ if (unknownFingerprintKey) {
932
+ return {
933
+ kind: "malformed",
934
+ detail: `unknown repositoryFingerprint key "${unknownFingerprintKey}"`
935
+ };
936
+ }
937
+ if (fingerprint && (fingerprint.algorithmVersion !== 1 || typeof fingerprint.hash !== "string")) {
938
+ return {
939
+ kind: "malformed",
940
+ detail: '"repositoryFingerprint" must contain algorithmVersion 1 and a string hash'
941
+ };
942
+ }
943
+ const repositoryFingerprint = fingerprint ? { algorithmVersion: 1, hash: fingerprint.hash } : void 0;
944
+ return {
945
+ kind: "ok",
946
+ identity: {
947
+ schemaVersion: 1,
948
+ projectId: record.projectId,
949
+ ...record.projectName === void 0 ? {} : { projectName: record.projectName },
950
+ ...repositoryFingerprint ? { repositoryFingerprint } : {}
951
+ }
952
+ };
953
+ }
954
+ var CANONICAL_UUID, isCanonicalUuid, IDENTITY_KEYS, FINGERPRINT_KEYS;
955
+ var init_projectIdentityFile = __esm({
956
+ "packages/shared/dist/projectIdentityFile.js"() {
957
+ "use strict";
958
+ CANONICAL_UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/;
959
+ isCanonicalUuid = (value) => typeof value === "string" && CANONICAL_UUID.test(value);
960
+ IDENTITY_KEYS = /* @__PURE__ */ new Set([
961
+ "schemaVersion",
962
+ "projectId",
963
+ "projectName",
964
+ "repositoryFingerprint"
965
+ ]);
966
+ FINGERPRINT_KEYS = /* @__PURE__ */ new Set(["algorithmVersion", "hash"]);
967
+ }
968
+ });
969
+
888
970
  // packages/shared/dist/hookTimeouts.js
889
971
  var init_hookTimeouts = __esm({
890
972
  "packages/shared/dist/hookTimeouts.js"() {
@@ -982,74 +1064,6 @@ var init_repositoryFingerprint = __esm({
982
1064
  }
983
1065
  });
984
1066
 
985
- // packages/shared/dist/projectIdentityFile.js
986
- function parseIdentityFile(text) {
987
- let value;
988
- try {
989
- value = JSON.parse(text);
990
- } catch (error) {
991
- return { kind: "malformed", detail: `unparseable JSON: ${error.message}` };
992
- }
993
- if (!value || typeof value !== "object" || Array.isArray(value)) {
994
- return { kind: "malformed", detail: "identity file must contain a JSON object" };
995
- }
996
- const record = value;
997
- if (record.schemaVersion !== 1) {
998
- return { kind: "unknown_version", version: record.schemaVersion };
999
- }
1000
- const unknownKey = Object.keys(record).find((key) => !IDENTITY_KEYS.has(key));
1001
- if (unknownKey)
1002
- return { kind: "malformed", detail: `unknown key "${unknownKey}"` };
1003
- if (!isCanonicalUuid(record.projectId)) {
1004
- return { kind: "malformed", detail: '"projectId" must be a canonical RFC 4122 UUID string' };
1005
- }
1006
- if ("projectName" in record && typeof record.projectName !== "string") {
1007
- return { kind: "malformed", detail: '"projectName" must be a string when present' };
1008
- }
1009
- if ("repositoryFingerprint" in record && (!record.repositoryFingerprint || typeof record.repositoryFingerprint !== "object" || Array.isArray(record.repositoryFingerprint))) {
1010
- return { kind: "malformed", detail: '"repositoryFingerprint" must be an object when present' };
1011
- }
1012
- const fingerprint = record.repositoryFingerprint;
1013
- const unknownFingerprintKey = fingerprint ? Object.keys(fingerprint).find((key) => !FINGERPRINT_KEYS.has(key)) : void 0;
1014
- if (unknownFingerprintKey) {
1015
- return {
1016
- kind: "malformed",
1017
- detail: `unknown repositoryFingerprint key "${unknownFingerprintKey}"`
1018
- };
1019
- }
1020
- if (fingerprint && (fingerprint.algorithmVersion !== 1 || typeof fingerprint.hash !== "string")) {
1021
- return {
1022
- kind: "malformed",
1023
- detail: '"repositoryFingerprint" must contain algorithmVersion 1 and a string hash'
1024
- };
1025
- }
1026
- const repositoryFingerprint = fingerprint ? { algorithmVersion: 1, hash: fingerprint.hash } : void 0;
1027
- return {
1028
- kind: "ok",
1029
- identity: {
1030
- schemaVersion: 1,
1031
- projectId: record.projectId,
1032
- ...record.projectName === void 0 ? {} : { projectName: record.projectName },
1033
- ...repositoryFingerprint ? { repositoryFingerprint } : {}
1034
- }
1035
- };
1036
- }
1037
- var CANONICAL_UUID, isCanonicalUuid, IDENTITY_KEYS, FINGERPRINT_KEYS;
1038
- var init_projectIdentityFile = __esm({
1039
- "packages/shared/dist/projectIdentityFile.js"() {
1040
- "use strict";
1041
- CANONICAL_UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/;
1042
- isCanonicalUuid = (value) => typeof value === "string" && CANONICAL_UUID.test(value);
1043
- IDENTITY_KEYS = /* @__PURE__ */ new Set([
1044
- "schemaVersion",
1045
- "projectId",
1046
- "projectName",
1047
- "repositoryFingerprint"
1048
- ]);
1049
- FINGERPRINT_KEYS = /* @__PURE__ */ new Set(["algorithmVersion", "hash"]);
1050
- }
1051
- });
1052
-
1053
1067
  // packages/shared/dist/repositoryRoot.js
1054
1068
  var init_repositoryRoot = __esm({
1055
1069
  "packages/shared/dist/repositoryRoot.js"() {
@@ -1058,6 +1072,18 @@ var init_repositoryRoot = __esm({
1058
1072
  }
1059
1073
  });
1060
1074
 
1075
+ // packages/shared/dist/hookTrace.js
1076
+ var HOOK_TRACE_MAX_BYTES;
1077
+ var init_hookTrace = __esm({
1078
+ "packages/shared/dist/hookTrace.js"() {
1079
+ "use strict";
1080
+ init_protectedPaths();
1081
+ init_runtimeSigners();
1082
+ init_secretPatterns();
1083
+ HOOK_TRACE_MAX_BYTES = 2 * 1024 * 1024;
1084
+ }
1085
+ });
1086
+
1061
1087
  // packages/shared/dist/runtimeReader.js
1062
1088
  var RuntimeError;
1063
1089
  var init_runtimeReader = __esm({
@@ -1129,10 +1155,12 @@ var init_hookRuntime = __esm({
1129
1155
  init_runtimeSigners();
1130
1156
  init_hookTimeouts();
1131
1157
  init_repositoryRoot();
1158
+ init_hookTrace();
1132
1159
  init_runtimeReader();
1133
1160
  init_runtimeSigners();
1134
1161
  init_projectSetupHandoff();
1135
1162
  init_hookConversation();
1163
+ init_hookTrace();
1136
1164
  }
1137
1165
  });
1138
1166
 
@@ -2720,7 +2748,7 @@ import { homedir as homedir3 } from "node:os";
2720
2748
  import { dirname as dirname4, isAbsolute, join as join5, resolve as resolve2, sep as sep2 } from "node:path";
2721
2749
 
2722
2750
  // packages/shared/dist/instructions.js
2723
- var INSTRUCTIONS_CONTENT = `Mnemonik provides persistent project memory: decisions, rationale, tasks, and policies across sessions. If no block begins "PROJECT_CONTEXT schemaVersion=", session_bootstrap({ cwd }) loads project context when cwd is the real absolute path of the project root; a placeholder or relative path fails. With that block, context is loaded and no session_bootstrap call is needed. Code and docs show current artifacts, git shows changes, and memory carries the why; memory_search recalls rationale or intent, then Grep or Read verifies current source.
2751
+ var INSTRUCTIONS_CONTENT = `Mnemonik provides persistent project memory: decisions, rationale, tasks, and policies across sessions. If no block begins "PROJECT_CONTEXT schemaVersion=", session_bootstrap({}) loads project context; installed hooks supply the project. With that block, context is loaded and no session_bootstrap call is needed. Code and docs show current artifacts, git shows changes, and memory carries the why; memory_search recalls rationale or intent, then Grep or Read verifies current source.
2724
2752
 
2725
2753
  What I learn about you belongs in Companion; what I learn about this project belongs here.
2726
2754
 
@@ -2757,6 +2785,9 @@ var MCP_INSTRUCTIONS = getMcpInstructions();
2757
2785
 
2758
2786
  // packages/shared/dist/codeScanner.js
2759
2787
  var import_ignore = __toESM(require_ignore(), 1);
2788
+ init_secretPatterns();
2789
+ init_protectedPaths();
2790
+ init_projectIdentityFile();
2760
2791
 
2761
2792
  // node_modules/web-tree-sitter/web-tree-sitter.js
2762
2793
  var __defProp2 = Object.defineProperty;
@@ -6982,6 +7013,7 @@ var BUILT_IN_IGNORE_DIR_SET = new Set(BUILT_IN_IGNORE_DIRS);
6982
7013
  var import_ignore2 = __toESM(require_ignore(), 1);
6983
7014
 
6984
7015
  // packages/shared/dist/index.js
7016
+ init_secretPatterns();
6985
7017
  init_hookTimeouts();
6986
7018
 
6987
7019
  // packages/shared/dist/jitDeliveryAck.js
@@ -6997,6 +7029,7 @@ init_settingsIo();
6997
7029
  init_repositoryFingerprint();
6998
7030
  init_projectIdentityFile();
6999
7031
  init_repositoryRoot();
7032
+ init_protectedPaths();
7000
7033
 
7001
7034
  // packages/local-setup/dist/storage.js
7002
7035
  init_hookRuntime();
@@ -875,7 +875,7 @@ var require_ignore = __commonJS({
875
875
  import { CODEX_TRUST_MESSAGE } from "../humanReason.js";
876
876
 
877
877
  // packages/shared/dist/instructions.js
878
- var INSTRUCTIONS_CONTENT = `Mnemonik provides persistent project memory: decisions, rationale, tasks, and policies across sessions. If no block begins "PROJECT_CONTEXT schemaVersion=", session_bootstrap({ cwd }) loads project context when cwd is the real absolute path of the project root; a placeholder or relative path fails. With that block, context is loaded and no session_bootstrap call is needed. Code and docs show current artifacts, git shows changes, and memory carries the why; memory_search recalls rationale or intent, then Grep or Read verifies current source.
878
+ var INSTRUCTIONS_CONTENT = `Mnemonik provides persistent project memory: decisions, rationale, tasks, and policies across sessions. If no block begins "PROJECT_CONTEXT schemaVersion=", session_bootstrap({}) loads project context; installed hooks supply the project. With that block, context is loaded and no session_bootstrap call is needed. Code and docs show current artifacts, git shows changes, and memory carries the why; memory_search recalls rationale or intent, then Grep or Read verifies current source.
879
879
 
880
880
  What I learn about you belongs in Companion; what I learn about this project belongs here.
881
881
 
@@ -885,6 +885,27 @@ var require_ignore = __commonJS({
885
885
  }
886
886
  });
887
887
 
888
+ // packages/shared/dist/secretPatterns.js
889
+ var init_secretPatterns = __esm({
890
+ "packages/shared/dist/secretPatterns.js"() {
891
+ "use strict";
892
+ }
893
+ });
894
+
895
+ // packages/shared/dist/protectedPaths.js
896
+ var init_protectedPaths = __esm({
897
+ "packages/shared/dist/protectedPaths.js"() {
898
+ "use strict";
899
+ }
900
+ });
901
+
902
+ // packages/shared/dist/projectIdentityFile.js
903
+ var init_projectIdentityFile = __esm({
904
+ "packages/shared/dist/projectIdentityFile.js"() {
905
+ "use strict";
906
+ }
907
+ });
908
+
888
909
  // packages/shared/dist/hookTimeouts.js
889
910
  var init_hookTimeouts = __esm({
890
911
  "packages/shared/dist/hookTimeouts.js"() {
@@ -982,13 +1003,6 @@ var init_repositoryFingerprint = __esm({
982
1003
  }
983
1004
  });
984
1005
 
985
- // packages/shared/dist/projectIdentityFile.js
986
- var init_projectIdentityFile = __esm({
987
- "packages/shared/dist/projectIdentityFile.js"() {
988
- "use strict";
989
- }
990
- });
991
-
992
1006
  // packages/shared/dist/repositoryRoot.js
993
1007
  var init_repositoryRoot = __esm({
994
1008
  "packages/shared/dist/repositoryRoot.js"() {
@@ -997,6 +1011,18 @@ var init_repositoryRoot = __esm({
997
1011
  }
998
1012
  });
999
1013
 
1014
+ // packages/shared/dist/hookTrace.js
1015
+ var HOOK_TRACE_MAX_BYTES;
1016
+ var init_hookTrace = __esm({
1017
+ "packages/shared/dist/hookTrace.js"() {
1018
+ "use strict";
1019
+ init_protectedPaths();
1020
+ init_runtimeSigners();
1021
+ init_secretPatterns();
1022
+ HOOK_TRACE_MAX_BYTES = 2 * 1024 * 1024;
1023
+ }
1024
+ });
1025
+
1000
1026
  // packages/shared/dist/runtimeReader.js
1001
1027
  var RuntimeError;
1002
1028
  var init_runtimeReader = __esm({
@@ -1068,10 +1094,12 @@ var init_hookRuntime = __esm({
1068
1094
  init_runtimeSigners();
1069
1095
  init_hookTimeouts();
1070
1096
  init_repositoryRoot();
1097
+ init_hookTrace();
1071
1098
  init_runtimeReader();
1072
1099
  init_runtimeSigners();
1073
1100
  init_projectSetupHandoff();
1074
1101
  init_hookConversation();
1102
+ init_hookTrace();
1075
1103
  }
1076
1104
  });
1077
1105
 
@@ -2659,7 +2687,7 @@ import { access, lstat as lstat2, mkdir as mkdir2, open as open2, readFile as re
2659
2687
  import { dirname as dirname4, isAbsolute, join as join5, relative, resolve as resolve2 } from "node:path";
2660
2688
 
2661
2689
  // packages/shared/dist/instructions.js
2662
- var INSTRUCTIONS_CONTENT = `Mnemonik provides persistent project memory: decisions, rationale, tasks, and policies across sessions. If no block begins "PROJECT_CONTEXT schemaVersion=", session_bootstrap({ cwd }) loads project context when cwd is the real absolute path of the project root; a placeholder or relative path fails. With that block, context is loaded and no session_bootstrap call is needed. Code and docs show current artifacts, git shows changes, and memory carries the why; memory_search recalls rationale or intent, then Grep or Read verifies current source.
2690
+ var INSTRUCTIONS_CONTENT = `Mnemonik provides persistent project memory: decisions, rationale, tasks, and policies across sessions. If no block begins "PROJECT_CONTEXT schemaVersion=", session_bootstrap({}) loads project context; installed hooks supply the project. With that block, context is loaded and no session_bootstrap call is needed. Code and docs show current artifacts, git shows changes, and memory carries the why; memory_search recalls rationale or intent, then Grep or Read verifies current source.
2663
2691
 
2664
2692
  What I learn about you belongs in Companion; what I learn about this project belongs here.
2665
2693
 
@@ -2696,6 +2724,9 @@ var MCP_INSTRUCTIONS = getMcpInstructions();
2696
2724
 
2697
2725
  // packages/shared/dist/codeScanner.js
2698
2726
  var import_ignore = __toESM(require_ignore(), 1);
2727
+ init_secretPatterns();
2728
+ init_protectedPaths();
2729
+ init_projectIdentityFile();
2699
2730
 
2700
2731
  // node_modules/web-tree-sitter/web-tree-sitter.js
2701
2732
  var __defProp2 = Object.defineProperty;
@@ -6921,6 +6952,7 @@ var BUILT_IN_IGNORE_DIR_SET = new Set(BUILT_IN_IGNORE_DIRS);
6921
6952
  var import_ignore2 = __toESM(require_ignore(), 1);
6922
6953
 
6923
6954
  // packages/shared/dist/index.js
6955
+ init_secretPatterns();
6924
6956
  init_hookTimeouts();
6925
6957
 
6926
6958
  // packages/shared/dist/jitDeliveryAck.js
@@ -6936,6 +6968,7 @@ init_settingsIo();
6936
6968
  init_repositoryFingerprint();
6937
6969
  init_projectIdentityFile();
6938
6970
  init_repositoryRoot();
6971
+ init_protectedPaths();
6939
6972
 
6940
6973
  // packages/local-setup/dist/storage.js
6941
6974
  init_hookRuntime();
@@ -1 +1 @@
1
- {"version":3,"file":"journey.d.ts","sourceRoot":"","sources":["../../src/install/journey.ts"],"names":[],"mappings":"AAKA,OAAO,EAIL,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACxB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AA+B3C,OAAO,EAGL,KAAK,gBAAgB,EACrB,KAAK,UAAU,EAEhB,MAAM,YAAY,CAAC;AAQpB,eAAO,MAAM,uBAAuB,4DAA4D,CAAC;AACjG,eAAO,MAAM,uBAAuB,0EACqC,CAAC;AAC1E,eAAO,MAAM,oBAAoB,qEACmC,CAAC;AAErE,8EAA8E;AAC9E,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,SAAS,GAAG,gBAAgB,GAAG,qBAAqB,CAAC;IAC3D,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC;CAC1B;AAED,8DAA8D;AAC9D,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,C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AK,GAAG,OAAO,CAAM,GAClD,OAAO,CAAC;IAAE,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC,CA0B7D;AAED,wBAAsB,aAAa,CACjC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,EACjC,IAAI,EAAE,eAAe,EACrB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,EAChC,UAAU,EAAE,MAAM,OAAO,CAAC,gBAAgB,CAAC,GAC1C,OAAO,CAAC,MAAM,CAAC,CAsjCjB"}
@@ -885,6 +885,27 @@ var require_ignore = __commonJS({
885
885
  }
886
886
  });
887
887
 
888
+ // packages/shared/dist/secretPatterns.js
889
+ var init_secretPatterns = __esm({
890
+ "packages/shared/dist/secretPatterns.js"() {
891
+ "use strict";
892
+ }
893
+ });
894
+
895
+ // packages/shared/dist/protectedPaths.js
896
+ var init_protectedPaths = __esm({
897
+ "packages/shared/dist/protectedPaths.js"() {
898
+ "use strict";
899
+ }
900
+ });
901
+
902
+ // packages/shared/dist/projectIdentityFile.js
903
+ var init_projectIdentityFile = __esm({
904
+ "packages/shared/dist/projectIdentityFile.js"() {
905
+ "use strict";
906
+ }
907
+ });
908
+
888
909
  // packages/shared/dist/hookTimeouts.js
889
910
  var init_hookTimeouts = __esm({
890
911
  "packages/shared/dist/hookTimeouts.js"() {
@@ -982,13 +1003,6 @@ var init_repositoryFingerprint = __esm({
982
1003
  }
983
1004
  });
984
1005
 
985
- // packages/shared/dist/projectIdentityFile.js
986
- var init_projectIdentityFile = __esm({
987
- "packages/shared/dist/projectIdentityFile.js"() {
988
- "use strict";
989
- }
990
- });
991
-
992
1006
  // packages/shared/dist/repositoryRoot.js
993
1007
  var init_repositoryRoot = __esm({
994
1008
  "packages/shared/dist/repositoryRoot.js"() {
@@ -997,6 +1011,18 @@ var init_repositoryRoot = __esm({
997
1011
  }
998
1012
  });
999
1013
 
1014
+ // packages/shared/dist/hookTrace.js
1015
+ var HOOK_TRACE_MAX_BYTES;
1016
+ var init_hookTrace = __esm({
1017
+ "packages/shared/dist/hookTrace.js"() {
1018
+ "use strict";
1019
+ init_protectedPaths();
1020
+ init_runtimeSigners();
1021
+ init_secretPatterns();
1022
+ HOOK_TRACE_MAX_BYTES = 2 * 1024 * 1024;
1023
+ }
1024
+ });
1025
+
1000
1026
  // packages/shared/dist/runtimeReader.js
1001
1027
  var RuntimeError;
1002
1028
  var init_runtimeReader = __esm({
@@ -1068,10 +1094,12 @@ var init_hookRuntime = __esm({
1068
1094
  init_runtimeSigners();
1069
1095
  init_hookTimeouts();
1070
1096
  init_repositoryRoot();
1097
+ init_hookTrace();
1071
1098
  init_runtimeReader();
1072
1099
  init_runtimeSigners();
1073
1100
  init_projectSetupHandoff();
1074
1101
  init_hookConversation();
1102
+ init_hookTrace();
1075
1103
  }
1076
1104
  });
1077
1105
 
@@ -2659,7 +2687,7 @@ import { homedir as homedir3 } from "node:os";
2659
2687
  import { setTimeout as delay2 } from "node:timers/promises";
2660
2688
 
2661
2689
  // packages/shared/dist/instructions.js
2662
- var INSTRUCTIONS_CONTENT = `Mnemonik provides persistent project memory: decisions, rationale, tasks, and policies across sessions. If no block begins "PROJECT_CONTEXT schemaVersion=", session_bootstrap({ cwd }) loads project context when cwd is the real absolute path of the project root; a placeholder or relative path fails. With that block, context is loaded and no session_bootstrap call is needed. Code and docs show current artifacts, git shows changes, and memory carries the why; memory_search recalls rationale or intent, then Grep or Read verifies current source.
2690
+ var INSTRUCTIONS_CONTENT = `Mnemonik provides persistent project memory: decisions, rationale, tasks, and policies across sessions. If no block begins "PROJECT_CONTEXT schemaVersion=", session_bootstrap({}) loads project context; installed hooks supply the project. With that block, context is loaded and no session_bootstrap call is needed. Code and docs show current artifacts, git shows changes, and memory carries the why; memory_search recalls rationale or intent, then Grep or Read verifies current source.
2663
2691
 
2664
2692
  What I learn about you belongs in Companion; what I learn about this project belongs here.
2665
2693
 
@@ -2696,6 +2724,9 @@ var MCP_INSTRUCTIONS = getMcpInstructions();
2696
2724
 
2697
2725
  // packages/shared/dist/codeScanner.js
2698
2726
  var import_ignore = __toESM(require_ignore(), 1);
2727
+ init_secretPatterns();
2728
+ init_protectedPaths();
2729
+ init_projectIdentityFile();
2699
2730
 
2700
2731
  // node_modules/web-tree-sitter/web-tree-sitter.js
2701
2732
  var __defProp2 = Object.defineProperty;
@@ -6921,6 +6952,7 @@ var BUILT_IN_IGNORE_DIR_SET = new Set(BUILT_IN_IGNORE_DIRS);
6921
6952
  var import_ignore2 = __toESM(require_ignore(), 1);
6922
6953
 
6923
6954
  // packages/shared/dist/index.js
6955
+ init_secretPatterns();
6924
6956
  init_hookTimeouts();
6925
6957
 
6926
6958
  // packages/shared/dist/jitDeliveryAck.js
@@ -6936,6 +6968,7 @@ init_settingsIo();
6936
6968
  init_repositoryFingerprint();
6937
6969
  init_projectIdentityFile();
6938
6970
  init_repositoryRoot();
6971
+ init_protectedPaths();
6939
6972
 
6940
6973
  // packages/shared/dist/readiness.js
6941
6974
  var READINESS_SCHEMA_VERSION = 1;
@@ -7907,7 +7940,6 @@ async function joinedInstall(flags2, deps, output, authorize, management) {
7907
7940
  const options = {
7908
7941
  cwd: repo.path,
7909
7942
  allowCreate: true,
7910
- allowNestedInherit: false,
7911
7943
  ...linkProjectId ? { intent: { action: "link", projectId: linkProjectId } } : {}
7912
7944
  };
7913
7945
  const target = await journal.plan(join5(repo.path, ".mnemonik.json"), null, {
@@ -7958,7 +7990,6 @@ async function joinedInstall(flags2, deps, output, authorize, management) {
7958
7990
  const result2 = await executor?.apply({
7959
7991
  cwd: project.root,
7960
7992
  allowCreate: true,
7961
- allowNestedInherit: false,
7962
7993
  ...linkProjectId ? { intent: { action: "link", projectId: linkProjectId } } : {}
7963
7994
  });
7964
7995
  if (result2?.status !== "done") throw new Error("project_apply_failed");
@@ -8154,7 +8185,6 @@ async function joinedInstall(flags2, deps, output, authorize, management) {
8154
8185
  await executor?.rollback({
8155
8186
  cwd: projectRoot,
8156
8187
  allowCreate: true,
8157
- allowNestedInherit: false,
8158
8188
  ...linkProjectId ? { intent: { action: "link", projectId: linkProjectId } } : {}
8159
8189
  });
8160
8190
  await journal.restore(target);