@farukada/aws-langgraph-dynamodb-ts 0.7.0 → 0.9.0

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 (208) hide show
  1. package/README.md +52 -9
  2. package/dist/checkpointer/actions/delete-thread.d.ts +3 -4
  3. package/dist/checkpointer/actions/delete-thread.d.ts.map +1 -1
  4. package/dist/checkpointer/actions/delete-thread.js +21 -41
  5. package/dist/checkpointer/actions/delete-thread.js.map +1 -1
  6. package/dist/checkpointer/actions/list.d.ts.map +1 -1
  7. package/dist/checkpointer/actions/list.js +38 -4
  8. package/dist/checkpointer/actions/list.js.map +1 -1
  9. package/dist/checkpointer/actions/put-writes.d.ts.map +1 -1
  10. package/dist/checkpointer/actions/put-writes.js +15 -24
  11. package/dist/checkpointer/actions/put-writes.js.map +1 -1
  12. package/dist/checkpointer/internal/item-reader.d.ts +45 -0
  13. package/dist/checkpointer/internal/item-reader.d.ts.map +1 -1
  14. package/dist/checkpointer/internal/item-reader.js +63 -1
  15. package/dist/checkpointer/internal/item-reader.js.map +1 -1
  16. package/dist/checkpointer/internal/item-writer.d.ts +0 -8
  17. package/dist/checkpointer/internal/item-writer.d.ts.map +1 -1
  18. package/dist/checkpointer/internal/item-writer.js +16 -21
  19. package/dist/checkpointer/internal/item-writer.js.map +1 -1
  20. package/dist/checkpointer/internal/keys.d.ts +19 -3
  21. package/dist/checkpointer/internal/keys.d.ts.map +1 -1
  22. package/dist/checkpointer/internal/keys.js +41 -6
  23. package/dist/checkpointer/internal/keys.js.map +1 -1
  24. package/dist/checkpointer/internal/special-write-cas.d.ts +30 -0
  25. package/dist/checkpointer/internal/special-write-cas.d.ts.map +1 -0
  26. package/dist/checkpointer/internal/special-write-cas.js +104 -0
  27. package/dist/checkpointer/internal/special-write-cas.js.map +1 -0
  28. package/dist/checkpointer/internal/special-write-cleanup.d.ts +18 -12
  29. package/dist/checkpointer/internal/special-write-cleanup.d.ts.map +1 -1
  30. package/dist/checkpointer/internal/special-write-cleanup.js +31 -86
  31. package/dist/checkpointer/internal/special-write-cleanup.js.map +1 -1
  32. package/dist/checkpointer/internal/special-write-verify.d.ts +54 -0
  33. package/dist/checkpointer/internal/special-write-verify.d.ts.map +1 -0
  34. package/dist/checkpointer/internal/special-write-verify.js +65 -0
  35. package/dist/checkpointer/internal/special-write-verify.js.map +1 -0
  36. package/dist/checkpointer/internal/validation.d.ts +8 -4
  37. package/dist/checkpointer/internal/validation.d.ts.map +1 -1
  38. package/dist/checkpointer/internal/validation.js +12 -10
  39. package/dist/checkpointer/internal/validation.js.map +1 -1
  40. package/dist/checkpointer/internal/write-guard.d.ts +13 -0
  41. package/dist/checkpointer/internal/write-guard.d.ts.map +1 -0
  42. package/dist/checkpointer/internal/write-guard.js +39 -0
  43. package/dist/checkpointer/internal/write-guard.js.map +1 -0
  44. package/dist/checkpointer/internal/write-index.d.ts +37 -0
  45. package/dist/checkpointer/internal/write-index.d.ts.map +1 -0
  46. package/dist/checkpointer/internal/write-index.js +42 -0
  47. package/dist/checkpointer/internal/write-index.js.map +1 -0
  48. package/dist/checkpointer/types.d.ts +8 -0
  49. package/dist/checkpointer/types.d.ts.map +1 -1
  50. package/dist/history/actions/add-messages.d.ts.map +1 -1
  51. package/dist/history/actions/add-messages.js +24 -4
  52. package/dist/history/actions/add-messages.js.map +1 -1
  53. package/dist/history/actions/clear.d.ts +4 -6
  54. package/dist/history/actions/clear.d.ts.map +1 -1
  55. package/dist/history/actions/clear.js +18 -33
  56. package/dist/history/actions/clear.js.map +1 -1
  57. package/dist/history/actions/get-messages.d.ts +2 -1
  58. package/dist/history/actions/get-messages.d.ts.map +1 -1
  59. package/dist/history/actions/get-messages.js +28 -2
  60. package/dist/history/actions/get-messages.js.map +1 -1
  61. package/dist/history/actions/list-sessions.d.ts +2 -1
  62. package/dist/history/actions/list-sessions.d.ts.map +1 -1
  63. package/dist/history/actions/list-sessions.js +21 -2
  64. package/dist/history/actions/list-sessions.js.map +1 -1
  65. package/dist/history/actions/reconcile-count.d.ts.map +1 -1
  66. package/dist/history/actions/reconcile-count.js +2 -2
  67. package/dist/history/actions/reconcile-count.js.map +1 -1
  68. package/dist/history/internal/append-saga.d.ts.map +1 -1
  69. package/dist/history/internal/append-saga.js +2 -78
  70. package/dist/history/internal/append-saga.js.map +1 -1
  71. package/dist/history/internal/compensation.d.ts +21 -0
  72. package/dist/history/internal/compensation.d.ts.map +1 -0
  73. package/dist/history/internal/compensation.js +84 -0
  74. package/dist/history/internal/compensation.js.map +1 -0
  75. package/dist/history/internal/keys.d.ts +9 -1
  76. package/dist/history/internal/keys.d.ts.map +1 -1
  77. package/dist/history/internal/keys.js +21 -4
  78. package/dist/history/internal/keys.js.map +1 -1
  79. package/dist/history/internal/message-chunker.d.ts.map +1 -1
  80. package/dist/history/internal/message-chunker.js +13 -5
  81. package/dist/history/internal/message-chunker.js.map +1 -1
  82. package/dist/history/internal/session-count.d.ts +21 -0
  83. package/dist/history/internal/session-count.d.ts.map +1 -1
  84. package/dist/history/internal/session-count.js +51 -0
  85. package/dist/history/internal/session-count.js.map +1 -1
  86. package/dist/history/internal/session-title.d.ts +20 -0
  87. package/dist/history/internal/session-title.d.ts.map +1 -0
  88. package/dist/history/internal/session-title.js +44 -0
  89. package/dist/history/internal/session-title.js.map +1 -0
  90. package/dist/history/internal/setup.d.ts +2 -1
  91. package/dist/history/internal/setup.d.ts.map +1 -1
  92. package/dist/history/internal/setup.js +1 -0
  93. package/dist/history/internal/setup.js.map +1 -1
  94. package/dist/history/internal/title-generator.d.ts +8 -2
  95. package/dist/history/internal/title-generator.d.ts.map +1 -1
  96. package/dist/history/internal/title-generator.js +12 -3
  97. package/dist/history/internal/title-generator.js.map +1 -1
  98. package/dist/history/internal/validation.d.ts +9 -0
  99. package/dist/history/internal/validation.d.ts.map +1 -0
  100. package/dist/history/internal/validation.js +16 -0
  101. package/dist/history/internal/validation.js.map +1 -0
  102. package/dist/history/types.d.ts +12 -0
  103. package/dist/history/types.d.ts.map +1 -1
  104. package/dist/index.d.ts +1 -1
  105. package/dist/index.d.ts.map +1 -1
  106. package/dist/index.js.map +1 -1
  107. package/dist/shared/codec/s3/offloader.d.ts +7 -1
  108. package/dist/shared/codec/s3/offloader.d.ts.map +1 -1
  109. package/dist/shared/codec/s3/offloader.js +14 -1
  110. package/dist/shared/codec/s3/offloader.js.map +1 -1
  111. package/dist/shared/constants.d.ts +15 -0
  112. package/dist/shared/constants.d.ts.map +1 -1
  113. package/dist/shared/constants.js +16 -1
  114. package/dist/shared/constants.js.map +1 -1
  115. package/dist/shared/dynamodb/conditional-put.d.ts +51 -0
  116. package/dist/shared/dynamodb/conditional-put.d.ts.map +1 -0
  117. package/dist/shared/dynamodb/conditional-put.js +59 -0
  118. package/dist/shared/dynamodb/conditional-put.js.map +1 -0
  119. package/dist/shared/dynamodb/partition-delete.d.ts +33 -0
  120. package/dist/shared/dynamodb/partition-delete.d.ts.map +1 -0
  121. package/dist/shared/dynamodb/partition-delete.js +70 -0
  122. package/dist/shared/dynamodb/partition-delete.js.map +1 -0
  123. package/dist/shared/dynamodb/retry-classifier.d.ts.map +1 -1
  124. package/dist/shared/dynamodb/retry-classifier.js +9 -1
  125. package/dist/shared/dynamodb/retry-classifier.js.map +1 -1
  126. package/dist/shared/logging/redaction-walk.d.ts +23 -0
  127. package/dist/shared/logging/redaction-walk.d.ts.map +1 -0
  128. package/dist/shared/logging/redaction-walk.js +92 -0
  129. package/dist/shared/logging/redaction-walk.js.map +1 -0
  130. package/dist/shared/logging/redaction.d.ts +26 -17
  131. package/dist/shared/logging/redaction.d.ts.map +1 -1
  132. package/dist/shared/logging/redaction.js +24 -48
  133. package/dist/shared/logging/redaction.js.map +1 -1
  134. package/dist/shared/logging/secret-patterns.d.ts +74 -0
  135. package/dist/shared/logging/secret-patterns.d.ts.map +1 -0
  136. package/dist/shared/logging/secret-patterns.js +107 -0
  137. package/dist/shared/logging/secret-patterns.js.map +1 -0
  138. package/dist/shared/validation/primitives.d.ts +9 -1
  139. package/dist/shared/validation/primitives.d.ts.map +1 -1
  140. package/dist/shared/validation/primitives.js +13 -0
  141. package/dist/shared/validation/primitives.js.map +1 -1
  142. package/dist/store/actions/get.d.ts.map +1 -1
  143. package/dist/store/actions/get.js +15 -1
  144. package/dist/store/actions/get.js.map +1 -1
  145. package/dist/store/actions/list-namespaces.d.ts.map +1 -1
  146. package/dist/store/actions/list-namespaces.js +1 -0
  147. package/dist/store/actions/list-namespaces.js.map +1 -1
  148. package/dist/store/actions/put.d.ts.map +1 -1
  149. package/dist/store/actions/put.js +24 -18
  150. package/dist/store/actions/put.js.map +1 -1
  151. package/dist/store/actions/search.d.ts.map +1 -1
  152. package/dist/store/actions/search.js +4 -35
  153. package/dist/store/actions/search.js.map +1 -1
  154. package/dist/store/internal/backend-search.d.ts +5 -0
  155. package/dist/store/internal/backend-search.d.ts.map +1 -0
  156. package/dist/store/internal/backend-search.js +68 -0
  157. package/dist/store/internal/backend-search.js.map +1 -0
  158. package/dist/store/internal/filter.d.ts.map +1 -1
  159. package/dist/store/internal/filter.js +46 -5
  160. package/dist/store/internal/filter.js.map +1 -1
  161. package/dist/store/internal/index-reconcile.d.ts.map +1 -1
  162. package/dist/store/internal/index-reconcile.js +41 -5
  163. package/dist/store/internal/index-reconcile.js.map +1 -1
  164. package/dist/store/internal/item-mapper.d.ts +1 -0
  165. package/dist/store/internal/item-mapper.d.ts.map +1 -1
  166. package/dist/store/internal/item-mapper.js +2 -0
  167. package/dist/store/internal/item-mapper.js.map +1 -1
  168. package/dist/store/internal/keys.d.ts +1 -1
  169. package/dist/store/internal/keys.d.ts.map +1 -1
  170. package/dist/store/internal/keys.js +8 -2
  171. package/dist/store/internal/keys.js.map +1 -1
  172. package/dist/store/internal/overwrite-swap.d.ts +33 -0
  173. package/dist/store/internal/overwrite-swap.d.ts.map +1 -0
  174. package/dist/store/internal/overwrite-swap.js +62 -0
  175. package/dist/store/internal/overwrite-swap.js.map +1 -0
  176. package/dist/store/internal/persist.d.ts +22 -6
  177. package/dist/store/internal/persist.d.ts.map +1 -1
  178. package/dist/store/internal/persist.js +41 -20
  179. package/dist/store/internal/persist.js.map +1 -1
  180. package/dist/store/internal/read-existing.d.ts +19 -0
  181. package/dist/store/internal/read-existing.d.ts.map +1 -0
  182. package/dist/store/internal/read-existing.js +29 -0
  183. package/dist/store/internal/read-existing.js.map +1 -0
  184. package/dist/store/internal/score-direction.d.ts +32 -0
  185. package/dist/store/internal/score-direction.d.ts.map +1 -0
  186. package/dist/store/internal/score-direction.js +39 -0
  187. package/dist/store/internal/score-direction.js.map +1 -0
  188. package/dist/store/internal/search-filter.d.ts +4 -0
  189. package/dist/store/internal/search-filter.d.ts.map +1 -0
  190. package/dist/store/internal/search-filter.js +11 -0
  191. package/dist/store/internal/search-filter.js.map +1 -0
  192. package/dist/store/internal/setup.d.ts +13 -1
  193. package/dist/store/internal/setup.d.ts.map +1 -1
  194. package/dist/store/internal/setup.js +57 -1
  195. package/dist/store/internal/setup.js.map +1 -1
  196. package/dist/store/internal/validation.d.ts +8 -2
  197. package/dist/store/internal/validation.d.ts.map +1 -1
  198. package/dist/store/internal/validation.js +15 -6
  199. package/dist/store/internal/validation.js.map +1 -1
  200. package/dist/store/internal/write-verify.d.ts +31 -6
  201. package/dist/store/internal/write-verify.d.ts.map +1 -1
  202. package/dist/store/internal/write-verify.js +48 -8
  203. package/dist/store/internal/write-verify.js.map +1 -1
  204. package/dist/store/types.d.ts +16 -0
  205. package/dist/store/types.d.ts.map +1 -1
  206. package/dist/store/vector-backend.d.ts +17 -0
  207. package/dist/store/vector-backend.d.ts.map +1 -1
  208. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"partition-delete.js","sourceRoot":"","sources":["../../../src/shared/dynamodb/partition-delete.ts"],"names":[],"mappings":";;;AAGA,8DAAyD;AAEzD,iDAAuD;AACvD,4CAA+C;AAC/C,6CAAgE;AAEhE,+CAA8C;AAC9C,yCAA2C;AAwC3C,mFAAmF;AACnF,K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AAQ,CAAC,CAAC;IAC1F,CAAC;IACD,MAAM,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;IAC7C,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,SAAS,gBAAgB,EAAE,EAAE,OAAO,EAAE,QAAQ,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;IACjG,OAAO,QAAQ,CAAC,MAAM,CAAC;AACzB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"retry-classifier.d.ts","sourceRoot":"","sources":["../../../src/shared/dynamodb/retry-classifier.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,EAAE,SAAS,MAAM,EAiBrD,CAAC;AAmDF,gFAAgF;AAChF,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,KAAK,EAAE,eAAe,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAK1F"}
1
+ {"version":3,"file":"retry-classifier.d.ts","sourceRoot":"","sources":["../../../src/shared/dynamodb/retry-classifier.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,EAAE,SAAS,MAAM,EAiBrD,CAAC;AA6DF,gFAAgF;AAChF,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,KAAK,EAAE,eAAe,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAK1F"}
@@ -47,7 +47,15 @@ function transactionCancellationRetryable(error) {
47
47
  const reasons = (0, cancellation_1.getCancellationReasons)(error);
48
48
  if (!reasons)
49
49
  return undefined;
50
- return reasons.every((reason) => reason.Code === undefined || TRANSIENT_CANCELLATION_REASONS.includes(reason.Code));
50
+ /**
51
+ * `length > 0` is load-bearing: `.every()` is vacuously true on an empty
52
+ * array, which would make a reason-less cancellation retryable — the exact
53
+ * opposite of what this function documents. AWS populates one reason per
54
+ * `TransactItems` entry, so an empty array should not occur; if it ever
55
+ * does, the conservative answer is not to retry.
56
+ */
57
+ return (reasons.length > 0 &&
58
+ reasons.every((reason) => reason.Code === undefined || TRANSIENT_CANCELLATION_REASONS.includes(reason.Code)));
51
59
  }
52
60
  function collectSignals(error) {
53
61
  const seen = new WeakSet();
@@ -1 +1 @@
1
- {"version":3,"file":"retry-classifier.js","sourceRoot":"","sources":["../../../src/shared/dynamodb/retry-classifier.ts"],"names":[],"mappings":";;;;AAAA,iDAAwD;AAExD,MAAM,eAAe,GAAG,EAAE,CAAC;AAE3B;;;;GAIG;AACU,QAAA,wBAAwB,GAAsB;IACzD,wCAAwC;IACxC,qBAAqB;IACrB,sBAAsB;IACtB,qBAAqB;IACrB,oBAAoB;IACpB,8BAA8B;IAC9B,gCAAgC;IAChC,gBAAgB;IAChB,yBAAyB;IACzB,YAAY;IACZ,cAAc;IACd,WAAW;IACX,OAAO;IACP,WAAW;IACX,iBAAiB;IACjB,cAAc;CACf,CAAC;AAEF;;;;GAIG;AACH,MAAM,8BAA8B,GAAsB;IACxD,MAAM;IACN,qBAAqB;IACrB,iBAAiB;IACjB,+BAA+B;CAChC,CAAC;AAEF;;;;GAIG;AACH,SAAS,gCAAgC,CAAC,KAAY;IACpD,MAAM,OAAO,GAAG,IAAA,qCAAsB,EAAC,KAAK,CAAC,CAAC;IAC9C,IAAI,CAAC,OAAO;QAAE,OAAO,SAAS,CAAC;IAC/B,OAAO,OAAO,CAAC,KAAK,CAClB,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,SAAS,IAAI,8BAA8B,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAC9F,CAAC;AACJ,CAAC;AAED,SAAS,cAAc,CAAC,KAAY;IAClC,MAAM,IAAI,GAAG,IAAI,OAAO,EAAU,CAAC;IACnC,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,MAAM,IAAI,GAAG,CAAC,IAAW,EAAE,KAAa,EAAQ,EAAE;QAChD,IAAI,KAAK,GAAG,eAAe,IAAI,IAAI,KAAK,I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,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;YAC7E,IAAI,OAAO,KAAK,KAAK,QAAQ;gBAAE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACrD,CAAC;QACD,IAAI,MAAM,CAAC,KAAK;YAAE,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;IAClD,CAAC,CAAC;IACF,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IACf,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,gFAAgF;AAChF,0BAAiC,KAAY,EAAE,eAAkC;IAC/E,MAAM,YAAY,GAAG,gCAAgC,CAAC,KAAK,CAAC,CAAC;IAC7D,IAAI,YAAY,KAAK,SAAS;QAAE,OAAO,YAAY,CAAC;IACpD,MAAM,OAAO,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;IACtC,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AACnG,CAAC"}
@@ -0,0 +1,23 @@
1
+ /** A value that {@link redactSecrets} can recurse through. */
2
+ export type Redactable = string | number | boolean | null | undefined | Redactable[] | {
3
+ [key: string]: Redactable;
4
+ };
5
+ /** Any `Redactable` that is a non-null object — what the walk dispatches on. */
6
+ export type RedactableObject = Redactable[] | {
7
+ [key: string]: Redactable;
8
+ };
9
+ /** One step of the recursive walk, threaded into the entry helpers. */
10
+ export type Walk = (value: Redactable) => Redactable;
11
+ /** Collaborators threaded through the recursive walk. */
12
+ export interface WalkDeps {
13
+ keyPatterns: readonly string[];
14
+ valuePatterns: readonly RegExp[];
15
+ walk: Walk;
16
+ }
17
+ /**
18
+ * Dispatch one non-null object by its shape: arrays and plain objects recurse,
19
+ * binary views collapse to a label, `Date`/`RegExp` pass through by reference,
20
+ * `Set`/`Map` render as their contents, and an Error takes the path above.
21
+ */
22
+ export declare function walkObject(current: RedactableObject, deps: WalkDeps): Redactable;
23
+ //# sourceMappingURL=redaction-walk.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"redaction-walk.d.ts","sourceRoot":"","sources":["../../../src/shared/logging/redaction-walk.ts"],"names":[],"mappings":"AAEA,8DAA8D;AAC9D,MAAM,MAAM,UAAU,GACpB,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,GAAG,UAAU,EAAE,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAAA;CAAE,CAAC;AAE9F,gFAAgF;AAChF,MAAM,MAAM,gBAAgB,GAAG,UAAU,EAAE,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAAA;CAAE,CAAC;AAE5E,uEAAuE;AACvE,MAAM,MAAM,IAAI,GAAG,CAAC,KAAK,EAAE,UAAU,KAAK,UAAU,CAAC;AAErD,yDAAyD;AACzD,MAAM,WAAW,QAAQ;IACvB,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/B,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,IAAI,EAAE,IAAI,CAAC;CACZ;AAiFD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,QAAQ,GAAG,UAAU,CAShF"}
@@ -0,0 +1,92 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.walkObject = walkObject;
4
+ const secret_patterns_1 = require("./secret-patterns");
5
+ /** True when `value` is a Set, tested by tag so a cross-realm Set still matches. */
6
+ function isSetValue(value) {
7
+ return Object.prototype.toString.call(value) === '[object Set]';
8
+ }
9
+ /** True when `value` is a Map, tested by tag so a cross-realm Map still matches. */
10
+ function isMapValue(value) {
11
+ return Object.prototype.toString.call(value) === '[object Map]';
12
+ }
13
+ /** True when `value` is an Error (or subclass), tested by tag not `instanceof`. */
14
+ function isErrorValue(value) {
15
+ return Object.prototype.toString.call(value) === '[object Error]';
16
+ }
17
+ /**
18
+ * True for a value whose identity matters more than its own properties.
19
+ * `Date` and `RegExp` have none, so recursing either would yield a bare `{}`.
20
+ */
21
+ function isOpaqueValue(value) {
22
+ const tag = Object.prototype.toString.call(value);
23
+ return tag === '[object Date]' || tag === '[object RegExp]';
24
+ }
25
+ /** Rebuild entries into a plain object, redacting values at secret-looking keys. */
26
+ function redactEntries(entries, keyPatterns, walk) {
27
+ const out = {};
28
+ for (const [key, value] of entries) {
29
+ out[key] = (0, secret_patterns_1.isSecretKey)(key, keyPatterns) ? secret_patterns_1.REDACTED : walk(value);
30
+ }
31
+ return out;
32
+ }
33
+ /**
34
+ * A Map's entries as an object. Keys are stringified so a non-string key is
35
+ * still reported rather than dropped, and each is checked against the
36
+ * secret-key patterns exactly as a plain object's own keys are.
37
+ */
38
+ function redactMap(value, deps) {
39
+ const entries = [...value].map(([key, entry]) => [String(key), entry]);
40
+ return redactEntries(entries, deps.keyPatterns, deps.walk);
41
+ }
42
+ /**
43
+ * Rebuild an Error as a plain object carrying its redacted text alongside its
44
+ * redacted own properties. The one exception is an Error with no own
45
+ * enumerable data whose text holds no secret: it is returned by reference so
46
+ * its identity and stack trace survive, which is what keeps a caught error
47
+ * useful in a log.
48
+ *
49
+ * `cause` is copied explicitly because `new Error(msg, { cause })` defines it
50
+ * as *non-enumerable* per spec, so `Object.entries` never sees it. Without
51
+ * this the whole chain vanished on every rebuild — and the rebuild always
52
+ * fires for this library's own error types, since each attaches an enumerable
53
+ * `code`/`context`. A redacted `RetryExhaustedError` would then no longer say
54
+ * whether the underlying failure was a throttle, a validation error or a
55
+ * network fault, which is the entire reason it carries a cause. Recursing it
56
+ * through `walk` redacts the chain too, and the cycle guard handles a cause
57
+ * that points back at its own wrapper.
58
+ */
59
+ function redactError(current, entries, deps) {
60
+ const text = (0, secret_patterns_1.redactErrorText)(current, deps.valuePatterns);
61
+ if (entries.length === 0 && !text.changed)
62
+ return current;
63
+ const out = redactEntries(entries, deps.keyPatterns, deps.walk);
64
+ out.name = text.name;
65
+ out.message = text.message;
66
+ out.stack = text.stack;
67
+ if (current.cause !== undefined)
68
+ out.cause = deps.walk(current.cause);
69
+ return out;
70
+ }
71
+ /**
72
+ * Dispatch one non-null object by its shape: arrays and plain objects recurse,
73
+ * binary views collapse to a label, `Date`/`RegExp` pass through by reference,
74
+ * `Set`/`Map` render as their contents, and an Error takes the path above.
75
+ */
76
+ function walkObject(current, deps) {
77
+ if (Array.isArray(current))
78
+ return current.map(deps.walk);
79
+ if (ArrayBuffer.isView(current))
80
+ return (0, secret_patterns_1.binaryLabel)(current);
81
+ if (isOpaqueValue(current))
82
+ return current;
83
+ if (isSetValue(current))
84
+ return [...current].map(deps.walk);
85
+ if (isMapValue(current))
86
+ return redactMap(current, deps);
87
+ const entries = Object.entries(current);
88
+ if (isErrorValue(current))
89
+ return redactError(current, entries, deps);
90
+ return redactEntries(entries, deps.keyPatterns, deps.walk);
91
+ }
92
+ //# sourceMappingURL=redaction-walk.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"redaction-walk.js","sourceRoot":"","sources":["../../../src/shared/logging/redaction-walk.ts"],"names":[],"mappings":";;;AAAA,uDAAwF;AAmBxF,oFAAoF;AACpF,SAAS,UAAU,CAAC,KAAa;IAC/B,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,cAAc,CAAC;AAClE,CAAC;AAED,oFAAoF;AACpF,SAAS,UAAU,CAAC,KAAa;IAC/B,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,cAAc,CAAC;AAClE,CAAC;AAED,mFAAmF;AACnF,SAAS,YAAY,CAAC,KAAa;IACjC,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,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AAC;AAC7D,CAAC"}
@@ -1,26 +1,35 @@
1
1
  import type { Logger } from './logger';
2
- /** A value that {@link redactSecrets} can recurse through. */
3
- export type Redactable = string | number | boolean | null | undefined | Redactable[] | {
4
- [key: string]: Redactable;
5
- };
2
+ import { type Redactable } from './redaction-walk';
6
3
  /**
7
4
  * Recursively clone `value`, replacing any value at a secret-looking key with
8
- * `[REDACTED]`. Cycles become `[Circular]`. An Error (or subclass) with no own
9
- * enumerable properties — a bare `new Error()`, since `message`/`stack` are
10
- * non-enumerable by spec — is passed through by reference unchanged, so its
11
- * stack trace and identity survive. A subclass carrying its own enumerable
12
- * data (this library's own error types all attach `code`/`context`/payload
13
- * fields this way) is rebuilt instead: `name`/`message`/`stack` are preserved
14
- * verbatim and every other own property is redacted/recursed exactly like a
15
- * plain object — otherwise a secret buried in a caught error's own fields
16
- * would ride straight through unredacted. Does not mutate the input.
5
+ * `[REDACTED]` and any recognised secret *shape* inside a string — including an
6
+ * error's `message`/`stack` text, which key-name matching cannot reach — with
7
+ * the same marker. Cycles become `[Circular]`.
8
+ *
9
+ * An Error with no own enumerable properties whose text holds no secret is
10
+ * passed through by reference, so its identity and stack trace survive; one
11
+ * carrying own data (this library's error types all attach `code`/`context`
12
+ * this way) or a secret in its text is rebuilt instead, with `name`/`message`/
13
+ * `stack` redacted and every other own property recursed like a plain object.
14
+ * `Date`/`RegExp` keep their identity rather than collapsing to `{}`,
15
+ * `Set`/`Map` render as their contents, and binary views become a short label.
16
+ * Does not mutate the input.
17
17
  */
18
- export declare function redactSecrets(value: Redactable, patterns?: readonly string[]): Redactable;
18
+ export declare function redactSecrets(value: Redactable, patterns?: readonly string[], valuePatterns?: readonly RegExp[]): Redactable;
19
+ /** Options controlling {@link redactLogger}. */
20
+ export interface RedactLoggerOptions {
21
+ /** Additional key names (matched case-insensitively as substrings) to redact. */
22
+ extraKeys?: readonly string[];
23
+ /**
24
+ * Additional secret shapes to redact wherever they appear inside a string.
25
+ * A pattern's first capture group, if it has one, is preserved verbatim and
26
+ * only the remainder of the match is replaced.
27
+ */
28
+ extraValuePatterns?: readonly RegExp[];
29
+ }
19
30
  /**
20
31
  * Wrap a logger so object args are redacted before delegation. The message
21
32
  * string is passed through unchanged (never interpolate secrets into it).
22
33
  */
23
- export declare function redactLogger(inner: Logger, options?: {
24
- extraKeys?: readonly string[];
25
- }): Logger;
34
+ export declare function redactLogger(inner: Logger, options?: RedactLoggerOptions): Logger;
26
35
  //# sourceMappingURL=redaction.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"redaction.d.ts","sourceRoot":"","sources":["../../../src/shared/logging/redaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAe,MAAM,EAAE,MAAM,UAAU,CAAC;AAEpD,8DAA8D;AAC9D,MAAM,MAAM,UAAU,GACpB,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,GAAG,UAAU,EAAE,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAAA;CAAE,CAAC;AA2B9F;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,UAAU,EACjB,QAAQ,GAAE,SAAS,MAAM,EAAgC,GACxD,UAAU,CAwBZ;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,MAAM,EACb,OAAO,GAAE;IAAE,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAAO,GAC9C,MAAM,CAYR"}
1
+ {"version":3,"file":"redaction.d.ts","sourceRoot":"","sources":["../../../src/shared/logging/redaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAe,MAAM,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAAE,KAAK,UAAU,EAAc,MAAM,kBAAkB,CAAC;AAO/D;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,UAAU,EACjB,QAAQ,GAAE,SAAS,MAAM,EAAgC,EACzD,aAAa,GAAE,SAAS,MAAM,EAAkC,GAC/D,UAAU,CAcZ;AAED,gDAAgD;AAChD,MAAM,WAAW,mBAAmB;IAClC,iFAAiF;IACjF,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9B;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACxC;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,GAAE,mBAAwB,GAAG,MAAM,CAerF"}
@@ -2,62 +2,35 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.redactSecrets = redactSecrets;
4
4
  exports.redactLogger = redactLogger;
5
- const DEFAULT_SECRET_KEY_PATTERNS = [
6
- 'accesskey',
7
- 'secretkey',
8
- 'secret',
9
- 'sessiontoken',
10
- 'securitytoken',
11
- 'authorization',
12
- 'password',
13
- 'apikey',
14
- 'bearer',
15
- 'token',
16
- 'privatekey',
17
- ];
18
- const REDACTED = '[REDACTED]';
19
- function isSecretKey(key, patterns) {
20
- const lower = key.toLowerCase();
21
- return patterns.some((pattern) => lower.includes(pattern));
22
- }
23
- function isErrorShaped(value) {
24
- return Object.prototype.toString.call(value) === '[object Error]';
25
- }
5
+ const redaction_walk_1 = require("./redaction-walk");
6
+ const secret_patterns_1 = require("./secret-patterns");
26
7
  /**
27
8
  * Recursively clone `value`, replacing any value at a secret-looking key with
28
- * `[REDACTED]`. Cycles become `[Circular]`. An Error (or subclass) with no own
29
- * enumerable properties — a bare `new Error()`, since `message`/`stack` are
30
- * non-enumerable by spec — is passed through by reference unchanged, so its
31
- * stack trace and identity survive. A subclass carrying its own enumerable
32
- * data (this library's own error types all attach `code`/`context`/payload
33
- * fields this way) is rebuilt instead: `name`/`message`/`stack` are preserved
34
- * verbatim and every other own property is redacted/recursed exactly like a
35
- * plain object — otherwise a secret buried in a caught error's own fields
36
- * would ride straight through unredacted. Does not mutate the input.
9
+ * `[REDACTED]` and any recognised secret *shape* inside a string — including an
10
+ * error's `message`/`stack` text, which key-name matching cannot reach — with
11
+ * the same marker. Cycles become `[Circular]`.
12
+ *
13
+ * An Error with no own enumerable properties whose text holds no secret is
14
+ * passed through by reference, so its identity and stack trace survive; one
15
+ * carrying own data (this library's error types all attach `code`/`context`
16
+ * this way) or a secret in its text is rebuilt instead, with `name`/`message`/
17
+ * `stack` redacted and every other own property recursed like a plain object.
18
+ * `Date`/`RegExp` keep their identity rather than collapsing to `{}`,
19
+ * `Set`/`Map` render as their contents, and binary views become a short label.
20
+ * Does not mutate the input.
37
21
  */
38
- function redactSecrets(value, patterns = DEFAULT_SECRET_KEY_PATTERNS) {
22
+ function redactSecrets(value, patterns = secret_patterns_1.DEFAULT_SECRET_KEY_PATTERNS, valuePatterns = secret_patterns_1.DEFAULT_SECRET_VALUE_PATTERNS) {
39
23
  const seen = new WeakSet();
40
24
  const walk = (current) => {
25
+ if (typeof current === 'string')
26
+ return (0, secret_patterns_1.redactText)(current, valuePatterns);
41
27
  if (current === null || typeof current !== 'object')
42
28
  return current;
43
29
  if (seen.has(current))
44
30
  return '[Circular]';
45
31
  seen.add(current);
46
32
  try {
47
- if (Array.isArray(current))
48
- return current.map(walk);
49
- if (isErrorShaped(current) && Object.keys(current).length === 0)
50
- return current;
51
- const out = {};
52
- for (const [key, val] of Object.entries(current)) {
53
- out[key] = isSecretKey(key, patterns) ? REDACTED : walk(val);
54
- }
55
- if (isErrorShaped(current)) {
56
- out.name = current.name;
57
- out.message = current.message;
58
- out.stack = current.stack;
59
- }
60
- return out;
33
+ return (0, redaction_walk_1.walkObject)(current, { keyPatterns: patterns, valuePatterns, walk });
61
34
  }
62
35
  finally {
63
36
  seen.delete(current);
@@ -71,9 +44,12 @@ function redactSecrets(value, patterns = DEFAULT_SECRET_KEY_PATTERNS) {
71
44
  */
72
45
  function redactLogger(inner, options = {}) {
73
46
  const patterns = options.extraKeys
74
- ? [...DEFAULT_SECRET_KEY_PATTERNS, ...options.extraKeys.map((key) => key.toLowerCase())]
75
- : DEFAULT_SECRET_KEY_PATTERNS;
76
- const wrap = (args) => args.map((arg) => redactSecrets(arg, patterns));
47
+ ? [...secret_patterns_1.DEFAULT_SECRET_KEY_PATTERNS, ...options.extraKeys.map((key) => key.toLowerCase())]
48
+ : secret_patterns_1.DEFAULT_SECRET_KEY_PATTERNS;
49
+ const valuePatterns = options.extraValuePatterns
50
+ ? [...secret_patterns_1.DEFAULT_SECRET_VALUE_PATTERNS, ...options.extraValuePatterns]
51
+ : secret_patterns_1.DEFAULT_SECRET_VALUE_PATTERNS;
52
+ const wrap = (args) => args.map((arg) => redactSecrets(arg, patterns, valuePatterns));
77
53
  return {
78
54
  info: (message, ...args) => inner.info(message, ...wrap(args)),
79
55
  warn: (message, ...args) => inner.warn(message, ...wrap(args)),
@@ -1 +1 @@
1
- {"version":3,"file":"redaction.js","sourceRoot":"","sources":["../../../src/shared/logging/redaction.ts"],"names":[],"mappings":";;;;AAMA,MAAM,2BAA2B,GAAsB;IACrD,WAAW;IACX,WAAW;IACX,QAAQ;IACR,cAAc;IACd,eAAe;IACf,eAAe;IACf,UAAU;IACV,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,YAAY;CACb,CAAC;AAEF,MAAM,QAAQ,GAAG,YAAY,CAAC;AAE9B,SAAS,WAAW,CAAC,GAAW,EAAE,QAA2B;IAC3D,MAAM,KAAK,GAAG,GAAG,CAAC,WAAW,EAAE,CAAC;IAChC,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;AAC7D,CAAC;AAED,SAAS,aAAa,CAAC,KAAa;IAClC,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,gBAAgB,CAAC;AACpE,CAAC;AAED;;;;;;;;;;;GAWG;AACH,uBACE,KAAiB,EACjB,QAAQ,GAAsB,2BAA2B;IAEzD,MA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AI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,aAAa,CAAC,GAAiB,EAAE,QAAQ,EAAE,aAAa,CAAgB,CAAC,CAAC;IAC9F,OAAO;QACL,IAAI,EAAE,CAAC,OAAO,EAAE,GAAG,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC;QAC9D,IAAI,EAAE,CAAC,OAAO,EAAE,GAAG,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC;QAC9D,KAAK,EAAE,CAAC,OAAO,EAAE,GAAG,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC;QAChE,KAAK,EAAE,CAAC,OAAO,EAAE,GAAG,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC;KACjE,CAAC;AACJ,CAAC"}
@@ -0,0 +1,74 @@
1
+ /** Marker substituted for anything recognised as secret. */
2
+ export declare const REDACTED = "[REDACTED]";
3
+ /** Key names (matched case-insensitively as substrings) whose value is a secret. */
4
+ export declare const DEFAULT_SECRET_KEY_PATTERNS: readonly string[];
5
+ /**
6
+ * Secret shapes recognisable in free text, where key-name matching cannot
7
+ * reach: an error's `message`/`stack`, or any other string value. Deliberately
8
+ * high-confidence — each pattern describes a credential *format* rather than a
9
+ * word that merely sounds sensitive — so ordinary operational text survives
10
+ * redaction unchanged.
11
+ *
12
+ * The credential-pair pattern (last) tolerates a **closing quote after the
13
+ * keyword**, because that is what `JSON.stringify` produces
14
+ * (`{"password":"…"}`) and requiring the separator to follow the bare keyword
15
+ * matched nothing at all there — a silent, complete bypass on the single most
16
+ * common shape a downstream HTTP error arrives in. Its group 1 is the keyword
17
+ * and separator, preserved by {@link redactText}.
18
+ *
19
+ * Its value side tries three shapes, and their order is load-bearing:
20
+ * 1. a fully-quoted span that consumes escapes, so `{"password":"a\"b"}` is
21
+ * redacted whole. Ending the span at the escaped quote stopped the
22
+ * redaction short and printed the rest of the secret verbatim.
23
+ * 2. an unquoted JSON scalar — number, `true`, `false`, `null` — required to
24
+ * end at a real delimiter — `,`, `}`, `]` or end of input, optionally
25
+ * preceded by whitespace. Without this alternative,
26
+ * `{"apiKey":123,"region":"us-east-1"}` fell through to the fallback below,
27
+ * which then destroyed every sibling field after the secret. The lookahead
28
+ * is what stops the alternative truncating a value it does not fully
29
+ * describe, such as `token=123abc`, and leaking the tail it left behind.
30
+ * Whitespace alone does not end a scalar: treating a space as a delimiter
31
+ * made `api_key: 5 items` redact to `api_key: [REDACTED] items`, which
32
+ * reads as a partial redaction of a value the pattern never described.
33
+ * 3. the rest of the line, so a multi-word secret is redacted whole instead of
34
+ * up to its first space. Trying the two precise shapes first is what keeps
35
+ * this fallback from over-redacting sibling JSON fields.
36
+ */
37
+ export declare const DEFAULT_SECRET_VALUE_PATTERNS: readonly RegExp[];
38
+ /** True when `key` matches any secret-key pattern. */
39
+ export declare function isSecretKey(key: string, patterns: readonly string[]): boolean;
40
+ /**
41
+ * Replace every recognised secret shape inside `value` with {@link REDACTED},
42
+ * leaving the surrounding text intact so a redacted message stays readable.
43
+ * Each pattern is rebuilt per call so a `g` flag's `lastIndex` never leaks
44
+ * between invocations.
45
+ *
46
+ * A pattern may capture a leading group it wants **preserved**: only the rest
47
+ * of the match is replaced, which is what keeps `apiKey=[REDACTED]` saying
48
+ * which field was redacted instead of collapsing to a bare marker. A pattern
49
+ * with no group is replaced whole, as before. `String.prototype.replace`
50
+ * passes the match *offset* — a number — as the second callback argument when
51
+ * the pattern has no group, hence the `typeof` test rather than an
52
+ * `undefined` check.
53
+ */
54
+ export declare function redactText(value: string, patterns: readonly RegExp[]): string;
55
+ /**
56
+ * A short label for a binary view. Recursing one would explode it into a
57
+ * per-index numeric map, both unreadable and far larger than the value itself.
58
+ */
59
+ export declare function binaryLabel(value: ArrayBufferView): string;
60
+ /** An Error's redacted non-enumerable text, plus whether redaction changed it. */
61
+ export interface RedactedErrorText {
62
+ name: string;
63
+ message: string;
64
+ stack: string | undefined;
65
+ changed: boolean;
66
+ }
67
+ /**
68
+ * Redact an Error's `name`/`message`/`stack`. `changed` reports whether any
69
+ * secret was actually found, which is what decides between passing a bare
70
+ * Error through by reference (preserving its identity and stack trace) and
71
+ * rebuilding it so the secret cannot escape.
72
+ */
73
+ export declare function redactErrorText(error: Error, patterns: readonly RegExp[]): RedactedErrorText;
74
+ //# sourceMappingURL=secret-patterns.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"secret-patterns.d.ts","sourceRoot":"","sources":["../../../src/shared/logging/secret-patterns.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,eAAO,MAAM,QAAQ,eAAe,CAAC;AAErC,oFAAoF;AACpF,eAAO,MAAM,2BAA2B,EAAE,SAAS,MAAM,EAYxD,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,eAAO,MAAM,6BAA6B,EAAE,SAAS,MAAM,EAK1D,CAAC;AAEF,sDAAsD;AACtD,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAG7E;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAQ7E;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,eAAe,GAAG,MAAM,CAE1D;AAED,kFAAkF;AAClF,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,MAAM,EAAE,GAAG,iBAAiB,CAS5F"}
@@ -0,0 +1,107 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DEFAULT_SECRET_VALUE_PATTERNS = exports.DEFAULT_SECRET_KEY_PATTERNS = exports.REDACTED = void 0;
4
+ exports.isSecretKey = isSecretKey;
5
+ exports.redactText = redactText;
6
+ exports.binaryLabel = binaryLabel;
7
+ exports.redactErrorText = redactErrorText;
8
+ /** Marker substituted for anything recognised as secret. */
9
+ exports.REDACTED = '[REDACTED]';
10
+ /** Key names (matched case-insensitively as substrings) whose value is a secret. */
11
+ exports.DEFAULT_SECRET_KEY_PATTERNS = [
12
+ 'accesskey',
13
+ 'secretkey',
14
+ 'secret',
15
+ 'sessiontoken',
16
+ 'securitytoken',
17
+ 'authorization',
18
+ 'password',
19
+ 'apikey',
20
+ 'bearer',
21
+ 'token',
22
+ 'privatekey',
23
+ ];
24
+ /**
25
+ * Secret shapes recognisable in free text, where key-name matching cannot
26
+ * reach: an error's `message`/`stack`, or any other string value. Deliberately
27
+ * high-confidence — each pattern describes a credential *format* rather than a
28
+ * word that merely sounds sensitive — so ordinary operational text survives
29
+ * redaction unchanged.
30
+ *
31
+ * The credential-pair pattern (last) tolerates a **closing quote after the
32
+ * keyword**, because that is what `JSON.stringify` produces
33
+ * (`{"password":"…"}`) and requiring the separator to follow the bare keyword
34
+ * matched nothing at all there — a silent, complete bypass on the single most
35
+ * common shape a downstream HTTP error arrives in. Its group 1 is the keyword
36
+ * and separator, preserved by {@link redactText}.
37
+ *
38
+ * Its value side tries three shapes, and their order is load-bearing:
39
+ * 1. a fully-quoted span that consumes escapes, so `{"password":"a\"b"}` is
40
+ * redacted whole. Ending the span at the escaped quote stopped the
41
+ * redaction short and printed the rest of the secret verbatim.
42
+ * 2. an unquoted JSON scalar — number, `true`, `false`, `null` — required to
43
+ * end at a real delimiter — `,`, `}`, `]` or end of input, optionally
44
+ * preceded by whitespace. Without this alternative,
45
+ * `{"apiKey":123,"region":"us-east-1"}` fell through to the fallback below,
46
+ * which then destroyed every sibling field after the secret. The lookahead
47
+ * is what stops the alternative truncating a value it does not fully
48
+ * describe, such as `token=123abc`, and leaking the tail it left behind.
49
+ * Whitespace alone does not end a scalar: treating a space as a delimiter
50
+ * made `api_key: 5 items` redact to `api_key: [REDACTED] items`, which
51
+ * reads as a partial redaction of a value the pattern never described.
52
+ * 3. the rest of the line, so a multi-word secret is redacted whole instead of
53
+ * up to its first space. Trying the two precise shapes first is what keeps
54
+ * this fallback from over-redacting sibling JSON fields.
55
+ */
56
+ exports.DEFAULT_SECRET_VALUE_PATTERNS = [
57
+ /\b(?:AKIA|ASIA)[0-9A-Z]{16}\b/g,
58
+ /\bBearer\s+[A-Za-z0-9._~+/-]+=*/gi,
59
+ /\beyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\b/g,
60
+ /((?:aws_)?(?:secret_access_key|secretaccesskey|password|passwd|api_?key|token)["']?\s*[=:]\s*)(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|(?:-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?|true|false|null)(?=\s*[,}\]]|\s*$)|[^\r\n]+)/gi,
61
+ ];
62
+ /** True when `key` matches any secret-key pattern. */
63
+ function isSecretKey(key, patterns) {
64
+ const lower = key.toLowerCase();
65
+ return patterns.some((pattern) => lower.includes(pattern));
66
+ }
67
+ /**
68
+ * Replace every recognised secret shape inside `value` with {@link REDACTED},
69
+ * leaving the surrounding text intact so a redacted message stays readable.
70
+ * Each pattern is rebuilt per call so a `g` flag's `lastIndex` never leaks
71
+ * between invocations.
72
+ *
73
+ * A pattern may capture a leading group it wants **preserved**: only the rest
74
+ * of the match is replaced, which is what keeps `apiKey=[REDACTED]` saying
75
+ * which field was redacted instead of collapsing to a bare marker. A pattern
76
+ * with no group is replaced whole, as before. `String.prototype.replace`
77
+ * passes the match *offset* — a number — as the second callback argument when
78
+ * the pattern has no group, hence the `typeof` test rather than an
79
+ * `undefined` check.
80
+ */
81
+ function redactText(value, patterns) {
82
+ return patterns.reduce((text, pattern) => text.replace(new RegExp(pattern.source, pattern.flags), (_match, prefix) => typeof prefix === 'string' ? `${prefix}${exports.REDACTED}` : exports.REDACTED), value);
83
+ }
84
+ /**
85
+ * A short label for a binary view. Recursing one would explode it into a
86
+ * per-index numeric map, both unreadable and far larger than the value itself.
87
+ */
88
+ function binaryLabel(value) {
89
+ return `[${value.constructor.name}(${value.byteLength})]`;
90
+ }
91
+ /**
92
+ * Redact an Error's `name`/`message`/`stack`. `changed` reports whether any
93
+ * secret was actually found, which is what decides between passing a bare
94
+ * Error through by reference (preserving its identity and stack trace) and
95
+ * rebuilding it so the secret cannot escape.
96
+ */
97
+ function redactErrorText(error, patterns) {
98
+ const message = redactText(error.message, patterns);
99
+ const stack = error.stack === undefined ? undefined : redactText(error.stack, patterns);
100
+ return {
101
+ name: error.name,
102
+ message,
103
+ stack,
104
+ changed: message !== error.message || stack !== error.stack,
105
+ };
106
+ }
107
+ //# sourceMappingURL=secret-patterns.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"secret-patterns.js","sourceRoot":"","sources":["../../../src/shared/logging/secret-patterns.ts"],"names":[],"mappings":";;;;;;;AAAA,4DAA4D;AAC/C,QAAA,QAAQ,GAAG,YAAY,CAAC;AAErC,oFAAoF;AACvE,QAAA,2BAA2B,GAAsB;IAC5D,WAAW;IACX,WAAW;IACX,QAAQ;IACR,cAAc;IACd,eAAe;IACf,eAAe;IACf,UAAU;IACV,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,YAAY;CACb,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACU,QAAA,6BAA6B,GAAsB;IAC9D,gCAAgC;IAChC,mC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,OAAO,IAAI,KAAK,KAAK,KAAK,CAAC,KAAK;KAC5D,CAAC;AACJ,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { Redactable } from '../logging/redaction';
1
+ import type { Redactable } from '../logging/redaction-walk';
2
2
  /** Throw {@link ValidationError} unless `value` is a non-empty string. */
3
3
  export declare function validateNonEmptyString(value: string, field: string): void;
4
4
  /** Throw {@link ValidationError} unless `value` is an integer within bounds. */
@@ -12,6 +12,14 @@ export declare function validateNonEmptyArray<T>(value: T[], field: string): voi
12
12
  export declare function assertNoControlChars(value: string, field: string): void;
13
13
  /** Throw {@link ValidationError} if `value` contains the reserved `separator`. */
14
14
  export declare function assertNoSeparator(value: string, separator: string, field: string): void;
15
+ /**
16
+ * Validate a caller-supplied identifier that reaches a DynamoDB key: non-empty,
17
+ * free of the reserved `separator`, and free of control characters. The last
18
+ * rule matters even though DynamoDB itself accepts control characters — an
19
+ * identifier is echoed into logs, so an unvalidated ANSI escape is a
20
+ * log/terminal-injection surface for any app that writes these values out.
21
+ */
22
+ export declare function validateIdentifier(value: string, separator: string, field: string): void;
15
23
  /** Throw {@link ValidationError} if nested-array depth exceeds `maxDepth`. */
16
24
  export declare function validateArrayMaxDepth(value: Redactable[], field: string, maxDepth: number): void;
17
25
  //# sourceMappingURL=primitives.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../../../src/shared/validation/primitives.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD,0EAA0E;AAC1E,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAIzE;AAED,gFAAgF;AAChF,wBAAgB,eAAe,CAC7B,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,MAAM,GAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAA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AAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAOvF;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAIxF;AAED,8EAA8E;AAC9E,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,UAAU,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAahG"}
@@ -5,6 +5,7 @@ exports.validateInteger = validateInteger;
5
5
  exports.validateNonEmptyArray = validateNonEmptyArray;
6
6
  exports.assertNoControlChars = assertNoControlChars;
7
7
  exports.assertNoSeparator = assertNoSeparator;
8
+ exports.validateIdentifier = validateIdentifier;
8
9
  exports.validateArrayMaxDepth = validateArrayMaxDepth;
9
10
  const errors_1 = require("../errors/errors");
10
11
  /** Throw {@link ValidationError} unless `value` is a non-empty string. */
@@ -53,6 +54,18 @@ function assertNoSeparator(value, separator, field) {
53
54
  throw new errors_1.ValidationError(`${field} must not contain the reserved "${separator}" separator`, field);
54
55
  }
55
56
  }
57
+ /**
58
+ * Validate a caller-supplied identifier that reaches a DynamoDB key: non-empty,
59
+ * free of the reserved `separator`, and free of control characters. The last
60
+ * rule matters even though DynamoDB itself accepts control characters — an
61
+ * identifier is echoed into logs, so an unvalidated ANSI escape is a
62
+ * log/terminal-injection surface for any app that writes these values out.
63
+ */
64
+ function validateIdentifier(value, separator, field) {
65
+ validateNonEmptyString(value, field);
66
+ assertNoSeparator(value, separator, field);
67
+ assertNoControlChars(value, field);
68
+ }
56
69
  /** Throw {@link ValidationError} if nested-array depth exceeds `maxDepth`. */
57
70
  function validateArrayMaxDepth(value, field, maxDepth) {
58
71
  const depthOf = (node, depth) => {
@@ -1 +1 @@
1
- {"version":3,"file":"primitives.js","sourceRoot":"","sources":["../../../src/shared/validation/primitives.ts"],"names":[],"mappings":";;;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AC9E,+BAAsC,KAAmB,EAAE,KAAa,EAAE,QAAgB;IACxF,MAAM,OAAO,GAAG,CAAC,IAAgB,EAAE,KAAa,EAAU,EAAE;QAC1D,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;YACzB,OAAO,KAAK,CAAC;QACf,CAAC;QACD,IAAI,KAAK,GAAG,QAAQ,EAAE,CAAC;YACrB,OAAO,KAAK,CAAC;QACf,CAAC;QACD,OAAO,IAAI,CAAC,MAAM,CAAS,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,OAAO,CAAC,KAAK,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;IAC9F,CAAC,CAAC;IACF,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,GAAG,QAAQ,EAAE,CAAC;QACjC,MAAM,IAAI,wBAAe,CAAC,GAAG,KAAK,mCAAmC,QAAQ,EAAE,EAAE,KAAK,CAAC,CAAC;IAC1F,CAAC;AACH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../../src/store/actions/get.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iCAAiC,CAAC;AAK5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAItD,kFAAkF;AAClF,wBAAsB,OAAO,CAC3B,OAAO,EAAE,YAAY,EACrB,SAAS,EAAE,MAAM,EAAE,EACnB,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,CAYtB"}
1
+ {"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../../src/store/actions/get.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iCAAiC,CAAC;AAK5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGtD,kFAAkF;AAClF,wBAAsB,OAAO,CAC3B,OAAO,EAAE,YAAY,EACrB,SAAS,EAAE,MAAM,EAAE,EACnB,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,CA0BtB"}