@sema-agent/core 7.62.0 → 7.63.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 (193) hide show
  1. package/CHANGELOG.md +528 -0
  2. package/dist/agents/subagent-transcript-placement.d.ts +23 -0
  3. package/dist/agents/subagent-transcript-placement.js +14 -0
  4. package/dist/agents/subagent.js +82 -51
  5. package/dist/brain/route-adjudicator.js +9 -4
  6. package/dist/core/approval-object.js +1 -1
  7. package/dist/core/arg-summary.js +1 -1
  8. package/dist/core/ask-question.d.ts +2 -2
  9. package/dist/core/canonical-json.d.ts +23 -13
  10. package/dist/core/canonical-json.js +4 -4
  11. package/dist/core/checkpoint-queries.d.ts +47 -4
  12. package/dist/core/checkpoint-queries.js +36 -16
  13. package/dist/core/checkpoint-requirements.d.ts +3 -3
  14. package/dist/core/checkpoint-requirements.js +2 -1
  15. package/dist/core/checkpoint-row-verdict.d.ts +15 -4
  16. package/dist/core/checkpoint-row-verdict.js +22 -2
  17. package/dist/core/checkpoint-store.d.ts +23 -10
  18. package/dist/core/checkpoint-store.js +45 -4
  19. package/dist/core/compliance.d.ts +6 -2
  20. package/dist/core/compliance.js +3 -3
  21. package/dist/core/engine-attestation.d.ts +1 -1
  22. package/dist/core/engine-notice.d.ts +19 -4
  23. package/dist/core/git-worktree-env.d.ts +62 -3
  24. package/dist/core/git-worktree-env.js +91 -30
  25. package/dist/core/governance-codes.d.ts +7 -3
  26. package/dist/core/governance-codes.js +13 -3
  27. package/dist/core/memory-engine/consolidation-driver.d.ts +32 -17
  28. package/dist/core/memory-engine/consolidation-driver.js +99 -98
  29. package/dist/core/memory-engine/consolidation.d.ts +73 -10
  30. package/dist/core/memory-engine/consolidation.js +167 -11
  31. package/dist/core/memory-engine/data-plane.d.ts +8 -4
  32. package/dist/core/memory-engine/data-plane.js +11 -6
  33. package/dist/core/memory-engine/delegation-settlement.d.ts +37 -35
  34. package/dist/core/memory-engine/delegation-settlement.js +53 -59
  35. package/dist/core/memory-engine/dual-root.d.ts +12 -6
  36. package/dist/core/memory-engine/dual-root.js +9 -5
  37. package/dist/core/memory-engine/engine.d.ts +98 -35
  38. package/dist/core/memory-engine/engine.js +477 -380
  39. package/dist/core/memory-engine/entry-scan.d.ts +8 -0
  40. package/dist/core/memory-engine/entry-scan.js +3 -0
  41. package/dist/core/memory-engine/file-backend.d.ts +29 -3
  42. package/dist/core/memory-engine/file-backend.js +66 -35
  43. package/dist/core/memory-engine/index.d.ts +7 -7
  44. package/dist/core/memory-engine/index.js +6 -6
  45. package/dist/core/memory-engine/landing-admission.d.ts +5 -3
  46. package/dist/core/memory-engine/landing-admission.js +3 -3
  47. package/dist/core/memory-engine/layout.d.ts +121 -45
  48. package/dist/core/memory-engine/layout.js +252 -102
  49. package/dist/core/memory-engine/memory-backend-contract.d.ts +19 -1
  50. package/dist/core/memory-engine/memory-backend-contract.js +320 -0
  51. package/dist/core/memory-engine/memory-deployment.d.ts +31 -8
  52. package/dist/core/memory-engine/memory-deployment.js +26 -12
  53. package/dist/core/memory-engine/scope-contract.d.ts +52 -11
  54. package/dist/core/memory-engine/scope-contract.js +68 -19
  55. package/dist/core/memory-engine/session-write-home.d.ts +3 -1
  56. package/dist/core/memory-engine/session-write-home.js +1 -1
  57. package/dist/core/memory-engine/sync-client.d.ts +3 -1
  58. package/dist/core/memory-engine/sync-client.js +7 -0
  59. package/dist/core/memory-engine/sync-report.d.ts +3 -2
  60. package/dist/core/memory-engine/sync-report.js +6 -2
  61. package/dist/core/memory-engine/tools.d.ts +2 -2
  62. package/dist/core/memory-engine/tools.js +10 -10
  63. package/dist/core/memory-engine/types.d.ts +118 -19
  64. package/dist/core/memory-engine/types.js +1 -0
  65. package/dist/core/memory.js +15 -6
  66. package/dist/core/mods/stations.d.ts +20 -1
  67. package/dist/core/mods/stations.js +21 -2
  68. package/dist/core/park-selfcheck.js +2 -2
  69. package/dist/core/pause-registry.d.ts +2 -0
  70. package/dist/core/pause-registry.js +3 -0
  71. package/dist/core/permission-rule-consent.d.ts +10 -3
  72. package/dist/core/permission-rule-consent.js +37 -24
  73. package/dist/core/permission-rule-store.d.ts +35 -1
  74. package/dist/core/permission-rule-store.js +27 -8
  75. package/dist/core/read-only-shell.js +3 -2
  76. package/dist/core/redaction-marks.d.ts +8 -0
  77. package/dist/core/redaction-marks.js +6 -0
  78. package/dist/core/remote-env.d.ts +12 -1
  79. package/dist/core/remote-env.js +3 -0
  80. package/dist/core/runner/child-tree.d.ts +29 -3
  81. package/dist/core/runner/child-tree.js +39 -16
  82. package/dist/core/runner/contracts.d.ts +18 -9
  83. package/dist/core/runner/gate-exit.js +2 -2
  84. package/dist/core/runner/inherited-ask-grants.js +1 -1
  85. package/dist/core/runner/memory-consolidation-driver.d.ts +6 -3
  86. package/dist/core/runner/memory-consolidation-driver.js +4 -4
  87. package/dist/core/runner/memory-consolidation-write-judge.d.ts +2 -1
  88. package/dist/core/runner/memory-consolidation-write-judge.js +3 -2
  89. package/dist/core/runner/person-path-rows.d.ts +8 -3
  90. package/dist/core/runner/person-path-rows.js +5 -1
  91. package/dist/core/runner/placement-fence.d.ts +12 -0
  92. package/dist/core/runner/placement-fence.js +20 -6
  93. package/dist/core/runner/prepare-ask-lane.js +2 -2
  94. package/dist/core/runner/prepare-caps-and-workflow.d.ts +4 -1
  95. package/dist/core/runner/prepare-caps-and-workflow.js +5 -2
  96. package/dist/core/runner/prepare-execution-env.js +17 -6
  97. package/dist/core/runner/prepare-hands-readface.d.ts +2 -1
  98. package/dist/core/runner/prepare-hands-readface.js +4 -3
  99. package/dist/core/runner/prepare-inherited-gate.d.ts +10 -8
  100. package/dist/core/runner/prepare-inherited-gate.js +8 -4
  101. package/dist/core/runner/prepare-memory-engine-session.d.ts +2 -4
  102. package/dist/core/runner/prepare-memory-engine-session.js +4 -4
  103. package/dist/core/runner/prepare-memory.d.ts +3 -2
  104. package/dist/core/runner/prepare-memory.js +28 -20
  105. package/dist/core/runner/prepare-park-ask.js +4 -3
  106. package/dist/core/runner/prepare-task.js +15 -12
  107. package/dist/core/runner/prepare-workspace-restore.js +3 -6
  108. package/dist/core/runner/run-leg.js +1 -1
  109. package/dist/core/runner/run-settle-and-teardown.js +3 -2
  110. package/dist/core/runner/terminal-account.js +1 -1
  111. package/dist/core/runner-deps.d.ts +6 -2
  112. package/dist/core/secret-env.d.ts +1 -1
  113. package/dist/core/secret-env.js +4 -4
  114. package/dist/core/session-checkout.d.ts +108 -0
  115. package/dist/core/session-checkout.js +485 -0
  116. package/dist/core/session-store.d.ts +12 -4
  117. package/dist/core/session-store.js +23 -3
  118. package/dist/core/session.d.ts +16 -2
  119. package/dist/core/session.js +3 -0
  120. package/dist/core/store-contracts/checkpoint-store-contract.d.ts +0 -12
  121. package/dist/core/store-contracts/checkpoint-store-contract.js +6 -7
  122. package/dist/core/store-contracts/session-store-contract.js +39 -0
  123. package/dist/core/task-event.d.ts +21 -0
  124. package/dist/core/task-notification.d.ts +9 -1
  125. package/dist/core/task-notification.js +6 -0
  126. package/dist/core/task-registry-agent.d.ts +14 -2
  127. package/dist/core/task-registry-agent.js +45 -19
  128. package/dist/core/task-registry-shared.d.ts +26 -11
  129. package/dist/core/task-registry.d.ts +15 -9
  130. package/dist/core/task-registry.js +9 -10
  131. package/dist/core/task-spec-members.js +1 -1
  132. package/dist/core/task-spec.d.ts +20 -0
  133. package/dist/core/tool-policy.d.ts +14 -12
  134. package/dist/core/tool-policy.js +11 -10
  135. package/dist/core/tool-spec.d.ts +38 -19
  136. package/dist/core/types.d.ts +1 -1
  137. package/dist/core/untrusted-egress.d.ts +15 -4
  138. package/dist/core/untrusted-egress.js +23 -22
  139. package/dist/core/workspace-snapshot.d.ts +3 -1
  140. package/dist/core/workspace-snapshot.js +1 -0
  141. package/dist/engine/harness/types.d.ts +66 -1
  142. package/dist/engine/harness/types.js +108 -0
  143. package/dist/engine/session/import-validate.js +6 -1
  144. package/dist/engine/session/session.d.ts +24 -1
  145. package/dist/engine/session/session.js +45 -1
  146. package/dist/index.d.ts +7 -4
  147. package/dist/index.js +7 -4
  148. package/dist/internal/harness-types.d.ts +1 -1
  149. package/dist/orchestration/run-workflow-tool.d.ts +4 -1
  150. package/dist/orchestration/run-workflow-tool.js +1 -0
  151. package/dist/orchestration/workflow.d.ts +3 -0
  152. package/dist/orchestration/workflow.js +3 -1
  153. package/dist/stores/file/session-store.js +2 -1
  154. package/dist/tools/fs/bash-program-position.js +3 -3
  155. package/dist/tools/fs/program-read-model.d.ts +34 -10
  156. package/dist/tools/fs/program-read-model.js +37 -7
  157. package/dist/tools/fs/program-read-model.rows.js +13 -2
  158. package/dist/tools/fs/read-deny.d.ts +13 -1
  159. package/dist/tools/fs/read-deny.js +10 -2
  160. package/dist/tools/fs/removal-targets.js +3 -3
  161. package/dist/tools/fs/safety.d.ts +2 -0
  162. package/dist/tools/fs/safety.js +1 -1
  163. package/dist/tools/fs/shell-read-argv.d.ts +8 -1
  164. package/dist/tools/fs/shell-read-argv.js +34 -29
  165. package/dist/tools/fs/shell-read-bindings.d.ts +2 -0
  166. package/dist/tools/fs/shell-read-bindings.js +5 -1
  167. package/dist/tools/fs/shell-read-brace.d.ts +18 -0
  168. package/dist/tools/fs/shell-read-brace.js +79 -0
  169. package/dist/tools/fs/shell-read-check.js +10 -8
  170. package/dist/tools/fs/shell-read-establish.js +23 -16
  171. package/dist/tools/fs/shell-read-judge.d.ts +11 -0
  172. package/dist/tools/fs/shell-read-judge.js +3 -3
  173. package/dist/tools/fs/shell-read-plan.d.ts +10 -0
  174. package/dist/tools/fs/shell-read-plan.js +189 -93
  175. package/dist/tools/fs/shell-read-start.d.ts +19 -9
  176. package/dist/tools/fs/shell-read-start.js +20 -12
  177. package/dist/tools/fs/shell-read-word.d.ts +10 -0
  178. package/dist/tools/fs/shell-read-word.js +9 -5
  179. package/dist/tools/fs/shell-read-workdir.d.ts +26 -7
  180. package/dist/tools/fs/shell-read-workdir.js +73 -12
  181. package/dist/tools/fs/shell-read-write-targets.js +13 -8
  182. package/dist/tools/worktree.d.ts +3 -2
  183. package/dist/tools/worktree.js +7 -35
  184. package/package.json +3 -2
  185. package/test/export-surface.snapshot.json +73 -11
  186. package/wire-changes/core-stores-sql@7.63.0.json +30 -0
  187. package/wire-changes/core@7.63.0.json +3523 -0
  188. package/wire-changes/mods-kernel@7.63.0.json +30 -0
  189. package/wire-changes/primitives@7.63.0.json +445 -0
  190. package/dist/core/credential-vocabulary.d.ts +0 -176
  191. package/dist/core/credential-vocabulary.js +0 -190
  192. package/dist/core/redaction-passes.d.ts +0 -82
  193. package/dist/core/redaction-passes.js +0 -377
@@ -0,0 +1,30 @@
1
+ {
2
+ "repo": "core",
3
+ "package": "@sema-agent/mods-kernel",
4
+ "version": "7.63.0",
5
+ "from": "146310a6a53a10cdb03a4f42718cf7e51b0ae509",
6
+ "to": "v7.63.0",
7
+ "added": [],
8
+ "removed": [],
9
+ "changed": [],
10
+ "narrowed": [],
11
+ "closedSetMembers": [],
12
+ "closedSetsUnreadable": [],
13
+ "typeKeys": [],
14
+ "typeKeysUnreadableArms": [],
15
+ "typeKeysFlattenedCount": 1,
16
+ "signatures": [],
17
+ "versionLiterals": [],
18
+ "declarationMoves": [],
19
+ "mintMoves": [],
20
+ "criteriaObserves": [],
21
+ "consumersHint": {
22
+ "cli": [],
23
+ "server": [],
24
+ "sdk": [],
25
+ "note": "scanned cli@f973e484 server@96a91d82 sdk@d5aed66 — a name listed is MENTIONED there today, which is evidence of consumption, not proof of it"
26
+ },
27
+ "breakingCount": 0,
28
+ "breakingItems": [],
29
+ "toResolvedAt": "578c77b1a5e127bea88d7f7c05ce56f250c46446"
30
+ }
@@ -0,0 +1,445 @@
1
+ {
2
+ "repo": "core",
3
+ "package": "@sema-agent/primitives",
4
+ "version": "7.63.0",
5
+ "from": "146310a6a53a10cdb03a4f42718cf7e51b0ae509",
6
+ "to": "v7.63.0",
7
+ "added": [
8
+ {
9
+ "name": "CREDENTIAL_MIN_CHARS",
10
+ "kind": "variable",
11
+ "tier": null,
12
+ "at": [
13
+ "src/index.ts:18",
14
+ "src/secret-vocabulary.ts:129"
15
+ ],
16
+ "criteriaCovered": false,
17
+ "breaking": false
18
+ },
19
+ {
20
+ "name": "CREDENTIAL_VOCABULARY",
21
+ "kind": "variable",
22
+ "tier": null,
23
+ "at": [
24
+ "src/index.ts:17",
25
+ "src/secret-vocabulary.ts:221"
26
+ ],
27
+ "criteriaCovered": false,
28
+ "breaking": false
29
+ },
30
+ {
31
+ "name": "CredentialVocabulary",
32
+ "kind": "interface",
33
+ "tier": null,
34
+ "at": [
35
+ "src/index.ts:24",
36
+ "src/secret-vocabulary.ts:71"
37
+ ],
38
+ "criteriaCovered": false,
39
+ "breaking": false
40
+ },
41
+ {
42
+ "name": "CredentialWordPosition",
43
+ "kind": "type",
44
+ "tier": null,
45
+ "at": [
46
+ "src/index.ts:27",
47
+ "src/secret-vocabulary.ts:59"
48
+ ],
49
+ "criteriaCovered": false,
50
+ "breaking": false
51
+ },
52
+ {
53
+ "name": "CredentialWordRow",
54
+ "kind": "interface",
55
+ "tier": null,
56
+ "at": [
57
+ "src/index.ts:26",
58
+ "src/secret-vocabulary.ts:62"
59
+ ],
60
+ "criteriaCovered": false,
61
+ "breaking": false
62
+ },
63
+ {
64
+ "name": "EnvNameView",
65
+ "kind": "interface",
66
+ "tier": null,
67
+ "at": [
68
+ "src/index.ts:28",
69
+ "src/secret-vocabulary.ts:372"
70
+ ],
71
+ "criteriaCovered": false,
72
+ "breaking": false
73
+ },
74
+ {
75
+ "name": "RecordKeyView",
76
+ "kind": "interface",
77
+ "tier": null,
78
+ "at": [
79
+ "src/index.ts:29",
80
+ "src/secret-vocabulary.ts:436"
81
+ ],
82
+ "criteriaCovered": false,
83
+ "breaking": false
84
+ },
85
+ {
86
+ "name": "RedactionConfidence",
87
+ "kind": "type",
88
+ "tier": null,
89
+ "at": [
90
+ "src/index.ts:30",
91
+ "src/secret-vocabulary.ts:24"
92
+ ],
93
+ "criteriaCovered": false,
94
+ "breaking": false
95
+ },
96
+ {
97
+ "name": "RedactionFinding",
98
+ "kind": "interface",
99
+ "tier": null,
100
+ "at": [
101
+ "src/index.ts:46",
102
+ "src/secret-scan.ts:24"
103
+ ],
104
+ "criteriaCovered": false,
105
+ "breaking": false
106
+ },
107
+ {
108
+ "name": "RedactionPass",
109
+ "kind": "interface",
110
+ "tier": null,
111
+ "at": [
112
+ "src/index.ts:45",
113
+ "src/secret-scan.ts:52"
114
+ ],
115
+ "criteriaCovered": false,
116
+ "breaking": false
117
+ },
118
+ {
119
+ "name": "RedactionReport",
120
+ "kind": "interface",
121
+ "tier": null,
122
+ "at": [
123
+ "src/index.ts:47",
124
+ "src/secret-scan.ts:45"
125
+ ],
126
+ "criteriaCovered": false,
127
+ "breaking": false
128
+ },
129
+ {
130
+ "name": "RedactionSource",
131
+ "kind": "type",
132
+ "tier": null,
133
+ "at": [
134
+ "src/index.ts:31",
135
+ "src/secret-vocabulary.ts:28"
136
+ ],
137
+ "criteriaCovered": false,
138
+ "breaking": false
139
+ },
140
+ {
141
+ "name": "RenderOptions",
142
+ "kind": "interface",
143
+ "tier": null,
144
+ "at": [
145
+ "src/index.ts:44",
146
+ "src/secret-scan.ts:588"
147
+ ],
148
+ "criteriaCovered": false,
149
+ "breaking": false
150
+ },
151
+ {
152
+ "name": "SECRET_READING_KINDS",
153
+ "kind": "variable",
154
+ "tier": null,
155
+ "at": [
156
+ "src/index.ts:34",
157
+ "src/secret-scan.ts:536"
158
+ ],
159
+ "criteriaCovered": false,
160
+ "breaking": false
161
+ },
162
+ {
163
+ "name": "SecretGrade",
164
+ "kind": "type",
165
+ "tier": null,
166
+ "at": [
167
+ "src/index.ts:38",
168
+ "src/secret-scan.ts:530"
169
+ ],
170
+ "criteriaCovered": false,
171
+ "breaking": false
172
+ },
173
+ {
174
+ "name": "SecretNotation",
175
+ "kind": "interface",
176
+ "tier": null,
177
+ "at": [
178
+ "src/index.ts:41",
179
+ "src/secret-scan.ts:560"
180
+ ],
181
+ "criteriaCovered": false,
182
+ "breaking": false
183
+ },
184
+ {
185
+ "name": "SecretReading",
186
+ "kind": "type",
187
+ "tier": null,
188
+ "at": [
189
+ "src/index.ts:39",
190
+ "src/secret-scan.ts:538"
191
+ ],
192
+ "criteriaCovered": false,
193
+ "breaking": false
194
+ },
195
+ {
196
+ "name": "SecretScan",
197
+ "kind": "type",
198
+ "tier": null,
199
+ "at": [
200
+ "src/index.ts:42",
201
+ "src/secret-scan.ts:582"
202
+ ],
203
+ "criteriaCovered": false,
204
+ "breaking": false
205
+ },
206
+ {
207
+ "name": "SecretScanPolicy",
208
+ "kind": "interface",
209
+ "tier": null,
210
+ "at": [
211
+ "src/index.ts:40",
212
+ "src/secret-scan.ts:549"
213
+ ],
214
+ "criteriaCovered": false,
215
+ "breaking": false
216
+ },
217
+ {
218
+ "name": "SecretSpan",
219
+ "kind": "interface",
220
+ "tier": null,
221
+ "at": [
222
+ "src/index.ts:43",
223
+ "src/secret-scan.ts:569"
224
+ ],
225
+ "criteriaCovered": false,
226
+ "breaking": false
227
+ },
228
+ {
229
+ "name": "SummarizableFinding",
230
+ "kind": "interface",
231
+ "tier": null,
232
+ "at": [
233
+ "src/index.ts:48",
234
+ "src/secret-scan.ts:35"
235
+ ],
236
+ "criteriaCovered": false,
237
+ "breaking": false
238
+ },
239
+ {
240
+ "name": "URL_OF_ANY_SCHEME",
241
+ "kind": "variable",
242
+ "tier": null,
243
+ "at": [
244
+ "src/index.ts:19",
245
+ "src/secret-vocabulary.ts:124"
246
+ ],
247
+ "criteriaCovered": false,
248
+ "breaking": false
249
+ },
250
+ {
251
+ "name": "ValueFamilyRow",
252
+ "kind": "interface",
253
+ "tier": null,
254
+ "at": [
255
+ "src/index.ts:25",
256
+ "src/secret-vocabulary.ts:31"
257
+ ],
258
+ "criteriaCovered": false,
259
+ "breaking": false
260
+ },
261
+ {
262
+ "name": "envNameView",
263
+ "kind": "function",
264
+ "tier": null,
265
+ "at": [
266
+ "src/index.ts:20",
267
+ "src/secret-vocabulary.ts:407"
268
+ ],
269
+ "criteriaCovered": false,
270
+ "breaking": false
271
+ },
272
+ {
273
+ "name": "isSecretShaped",
274
+ "kind": "function",
275
+ "tier": null,
276
+ "at": [
277
+ "src/index.ts:36",
278
+ "src/secret-scan.ts:854"
279
+ ],
280
+ "criteriaCovered": false,
281
+ "breaking": false
282
+ },
283
+ {
284
+ "name": "isSensitiveHeaderName",
285
+ "kind": "function",
286
+ "tier": null,
287
+ "at": [
288
+ "src/index.ts:23",
289
+ "src/secret-vocabulary.ts:512"
290
+ ],
291
+ "criteriaCovered": false,
292
+ "breaking": false
293
+ },
294
+ {
295
+ "name": "isSensitiveRecordKey",
296
+ "kind": "function",
297
+ "tier": null,
298
+ "at": [
299
+ "src/index.ts:22",
300
+ "src/secret-vocabulary.ts:501"
301
+ ],
302
+ "criteriaCovered": false,
303
+ "breaking": false
304
+ },
305
+ {
306
+ "name": "renderSecrets",
307
+ "kind": "function",
308
+ "tier": null,
309
+ "at": [
310
+ "src/index.ts:37",
311
+ "src/secret-scan.ts:757"
312
+ ],
313
+ "criteriaCovered": false,
314
+ "breaking": false
315
+ },
316
+ {
317
+ "name": "scanSecrets",
318
+ "kind": "function",
319
+ "tier": null,
320
+ "at": [
321
+ "src/index.ts:35",
322
+ "src/secret-scan.ts:832"
323
+ ],
324
+ "criteriaCovered": false,
325
+ "breaking": false
326
+ },
327
+ {
328
+ "name": "splitCamelCase",
329
+ "kind": "function",
330
+ "tier": null,
331
+ "at": [
332
+ "src/index.ts:21",
333
+ "src/secret-vocabulary.ts:422"
334
+ ],
335
+ "criteriaCovered": false,
336
+ "breaking": false
337
+ }
338
+ ],
339
+ "removed": [],
340
+ "changed": [],
341
+ "narrowed": [],
342
+ "closedSetMembers": [
343
+ {
344
+ "set": "CredentialWordPosition",
345
+ "at": [
346
+ "src/secret-vocabulary.ts:59"
347
+ ],
348
+ "newSet": true,
349
+ "added": [
350
+ "counted-plural",
351
+ "embedded",
352
+ "leading",
353
+ "plural",
354
+ "separated"
355
+ ],
356
+ "removed": [],
357
+ "breaking": false,
358
+ "criteriaCovered": false
359
+ },
360
+ {
361
+ "set": "RedactionConfidence",
362
+ "at": [
363
+ "src/secret-vocabulary.ts:24"
364
+ ],
365
+ "newSet": true,
366
+ "added": [
367
+ "high",
368
+ "low",
369
+ "medium"
370
+ ],
371
+ "removed": [],
372
+ "breaking": false,
373
+ "criteriaCovered": false
374
+ },
375
+ {
376
+ "set": "RedactionSource",
377
+ "at": [
378
+ "src/secret-vocabulary.ts:28"
379
+ ],
380
+ "newSet": true,
381
+ "added": [
382
+ "arg-summary",
383
+ "secret-env",
384
+ "untrusted-egress"
385
+ ],
386
+ "removed": [],
387
+ "breaking": false,
388
+ "criteriaCovered": false
389
+ },
390
+ {
391
+ "set": "SECRET_READING_KINDS",
392
+ "at": [
393
+ "src/secret-scan.ts:536"
394
+ ],
395
+ "newSet": true,
396
+ "added": [
397
+ "format-free",
398
+ "raw"
399
+ ],
400
+ "removed": [],
401
+ "breaking": false,
402
+ "criteriaCovered": false
403
+ },
404
+ {
405
+ "set": "SecretGrade",
406
+ "at": [
407
+ "src/secret-scan.ts:530"
408
+ ],
409
+ "newSet": true,
410
+ "added": [
411
+ "strict",
412
+ "wide"
413
+ ],
414
+ "removed": [],
415
+ "breaking": false,
416
+ "criteriaCovered": false
417
+ }
418
+ ],
419
+ "closedSetsUnreadable": [],
420
+ "typeKeys": [],
421
+ "typeKeysUnreadableArms": [],
422
+ "typeKeysFlattenedCount": 1,
423
+ "signatures": [],
424
+ "versionLiterals": [],
425
+ "declarationMoves": [],
426
+ "mintMoves": [],
427
+ "criteriaObserves": [],
428
+ "consumersHint": {
429
+ "cli": [
430
+ "CredentialWordPosition",
431
+ "RedactionFinding",
432
+ "RedactionReport",
433
+ "RenderOptions"
434
+ ],
435
+ "server": [
436
+ "SecretSpan",
437
+ "SummarizableFinding"
438
+ ],
439
+ "sdk": [],
440
+ "note": "scanned cli@f973e484 server@96a91d82 sdk@d5aed66 — a name listed is MENTIONED there today, which is evidence of consumption, not proof of it. Ledger files (**/docs/core-consumption/**, **/docs/wire-consumption/**, **/*LEDGER*.json) are not evidence of use — server: 4 name(s) matched ONLY in bookkeeping files and were set aside (RedactionConfidence, RedactionFinding, RedactionReport, RedactionSource)"
441
+ },
442
+ "breakingCount": 0,
443
+ "breakingItems": [],
444
+ "toResolvedAt": "578c77b1a5e127bea88d7f7c05ce56f250c46446"
445
+ }
@@ -1,176 +0,0 @@
1
- /**
2
- * Where a text holds a credential — answered by ONE table, {@link CREDENTIAL_VOCABULARY}, and the three views read
3
- * off it:
4
- * - refuse-write ({@link refuseWriteView}): the rows that carry a `strict` form, in table order. A hit fail-closed
5
- * rejects a durable write, so a strict form is narrow (vendor-distinctive prefix, long body, word boundary): a
6
- * wrongly refused ordinary note is that face's head risk.
7
- * - egress ({@link egressPassGroups}): every row's wide `match`, in table order, grouped into passes. A hit replaces
8
- * the value in text that is persisted and forwarded, so a wide form is broad: a missed credential is that face's
9
- * head risk and over-redaction is cheap.
10
- * - env names ({@link envNameView}): the exact credential names, the credential words by position, the
11
- * connection-string name shape and the token-prefix value predicate a spawned child's environment is judged by.
12
- * - record keys ({@link recordKeyView}): the same credential words, read as the name of a member of a structured record
13
- * (a header name, a config member) rather than of an environment variable.
14
- *
15
- * A family's strict and wide forms live on the SAME row, and every text the strict form matches the wide form matches
16
- * too (machine-judged over the fixture file by `scripts/verify-credential-vocabulary.mjs`): the two faces may differ in
17
- * floors, never in vocabulary. Detection is shared; each layer renders its own marker.
18
- *
19
- * Zero imports by design: this module is the detection definition and moves into its own package as written.
20
- */
21
- /** How sure a detection is. */
22
- export type RedactionConfidence = "high" | "medium" | "low";
23
- /** Which rule table a finding names as its minter. A closed set: a report's entries can only have been written by
24
- * the engine's own tables, so "this finding says X" is an engine statement. */
25
- export type RedactionSource = "arg-summary" | "untrusted-egress" | "secret-env";
26
- /** One value family: "this run of characters is itself a credential". */
27
- export interface ValueFamilyRow {
28
- /** Stable family name, `^[a-z0-9-]+$`; a finding's `family`. The refuse-write label is this id spelled with `_`. */
29
- readonly id: string;
30
- /** The finding `kind` this family reports (the coarse class a consumer groups by). */
31
- readonly kind: string;
32
- readonly source: RedactionSource;
33
- readonly confidence: RedactionConfidence;
34
- /** The wide form (egress), global. A capture group 1, when the form has one, is a label kept verbatim ahead of the
35
- * marker (`AccountKey=`, `api_key=`). */
36
- readonly match: RegExp;
37
- /** The strict form (refuse-write), never global. Present = this family refuses a durable write; absent = it does
38
- * not (refusing is the tightening, so it is written, never implied). */
39
- readonly strict?: RegExp;
40
- /** The egress pass this wide form runs in. Rows naming the same pass sit next to each other and join as ONE
41
- * alternation, so a token is taken at its leftmost start whichever of them it is (a nested shape is never cut by
42
- * an earlier family's pass). Absent = a pass of its own. */
43
- readonly pass?: string;
44
- }
45
- /** Where a credential word counts in a name (env names are upper-cased words joined by `_`):
46
- * - `leading` — at the start of the name or right after `_`;
47
- * - `plural` — the word plus `S`, in the leading position;
48
- * - `counted-plural` — a plural, unless a count word (`MAX_TOKENS`) stands right in front of it;
49
- * - `separated` — only right after `_` (the shell's own `PWD` is none; a record has no such variable, so the record-key
50
- * view reads it as `leading`);
51
- * - `embedded` — anywhere (`AUTHTOKEN`, `MYSECRET`).
52
- * In every position the word must end the name or be followed by `_` or a digit (`KEYBOARD` is no word). */
53
- export type CredentialWordPosition = "leading" | "plural" | "counted-plural" | "separated" | "embedded";
54
- /** One credential word: "a name holding this word names a credential". */
55
- export interface CredentialWordRow {
56
- readonly word: string;
57
- readonly position: CredentialWordPosition;
58
- /** Further words that name the same credential as a record key only, read in this row's position by the record-key
59
- * view alone (`AUTH` → the `Authorization` header). The env-name view never reads them: a variable named
60
- * `AUTHORIZATION` is not withheld by its name. */
61
- readonly recordKeys?: readonly string[];
62
- }
63
- /** The URL userinfo rendering every renderer follows: keep the username (an auditor can tell whose account leaked
64
- * and revoke it) and replace the password, or replace the whole userinfo. */
65
- export interface VocabularyPolicy {
66
- readonly urlUserinfo: "keep-username" | "whole";
67
- }
68
- export interface CredentialVocabulary {
69
- /** Value families, in egress pass order. */
70
- readonly values: readonly ValueFamilyRow[];
71
- readonly words: readonly CredentialWordRow[];
72
- /** The words that turn a following counted plural into a number. */
73
- readonly countWords: readonly string[];
74
- /** A connection string named as such (`DB_CONN_STR`, `CONNECTION_STRINGS`), case-insensitive. */
75
- readonly connectionStringName: RegExp;
76
- /** Credential env names, each also judged under the `INPUT_` prefix (a GitHub Actions input). */
77
- readonly exactEnvNames: readonly string[];
78
- /** Credential-shaped names that hold no credential: declared names, never a pattern over names (the one pattern is
79
- * {@link CredentialVocabulary.nonSecretNameShape}). Three readings of the same list: the env-name view and the
80
- * record-member reading ({@link isSensitiveRecordKey}) take each as the WHOLE name (`CACHE_KEY` holds a setting,
81
- * `SECRET_CACHE_KEY` a secret, in an environment and in a config or detail record alike); the HTTP header-name
82
- * reading ({@link isSensitiveHeaderName}) takes it as the whole name or the TAIL of a longer one whose front part names
83
- * no credential word (`cf-aig-cache-key`, `X-Idempotency-Key`: a gateway's header for the same non-secret thing;
84
- * `secret-cache-key` stays a secret). */
85
- readonly nonSecretExactNames: readonly string[];
86
- /** The one name shape that holds no credential whatever words it carries: git's `GIT_CONFIG_KEY_<n…>` names a
87
- * configuration key (its value sits in `GIT_CONFIG_VALUE_<n>`). Read by every name view, beside the exact names. */
88
- readonly nonSecretNameShape: RegExp;
89
- /** A leading vendor prefix that spells a credential word without being one (`AUTH0_`): dropped from a name before the
90
- * credential words are looked for, in every name view alike. */
91
- readonly nonCredentialPrefix: RegExp;
92
- /** A value (or a password-less URL user) opening with a known token prefix. */
93
- readonly tokenPrefix: RegExp;
94
- readonly policy: VocabularyPolicy;
95
- }
96
- /**
97
- * The URI scheme: RFC 3986's scheme production plus `_`, of any length, read from the START of its run of scheme characters
98
- * (a run's leading digits and marks are taken into it, so the match keeps them). An unanchored unbounded `\w+` made every
99
- * `://` pattern quadratic in the longest unbroken word run (one long base64 paste cost seconds of synchronous CPU), and a
100
- * 64-character cap that replaced it missed a longer scheme; anchored at the run's start, each run is tried once — linear, and
101
- * no scheme is too long to be read.
102
- */
103
- export declare const URI_SCHEME_SOURCE: string;
104
- /**
105
- * A URL's userinfo with the `@` that ends it, up to the LAST `@` before the host (a password may hold `@`): runs of characters
106
- * that are no `/`, white space, `"` or `@`, each closed by an `@`. The class holds all of RFC 3986's userinfo (unreserved,
107
- * pct-encoded, sub-delims — `'` among them — and `:`) and the characters a password written unencoded carries (`#`, `?`, …);
108
- * `"` ends it, the quote of a string around the URL. The one userinfo grammar: every reader that removes a userinfo matches
109
- * this, and each renders the match its own way.
110
- */
111
- export declare const URL_USERINFO_SOURCE: string;
112
- /** The fewest characters a string can have and still be read as a credential: the floor of a vendor-prefixed token's body
113
- * and of a bearer / authorization credential run in this table, and of the value rules of the env scrub. A shorter
114
- * string names no secret, whoever holds it. */
115
- export declare const CREDENTIAL_MIN_CHARS = 8;
116
- export declare const CREDENTIAL_VOCABULARY: CredentialVocabulary;
117
- /** The refuse-write label of a family: its id spelled with `_` (surfaced in the refusal; never the matched value). */
118
- export declare const refuseLabel: (id: string) => string;
119
- /** One refuse-write form: the family's label and its strict form. */
120
- export interface RefuseWriteForm {
121
- readonly label: string;
122
- readonly re: RegExp;
123
- }
124
- /** The refuse-write view: every row carrying a strict form, in table order (the first hit names the label). */
125
- export declare function refuseWriteView(vocabulary: CredentialVocabulary): readonly RefuseWriteForm[];
126
- /** The egress view: the rows in table order, each run of adjacent rows naming the same `pass` as one group. */
127
- export declare function egressPassGroups(vocabulary: CredentialVocabulary): ReadonlyArray<readonly ValueFamilyRow[]>;
128
- /** The env-name view: what {@link CREDENTIAL_VOCABULARY} says about variable names and token-prefixed values. */
129
- export interface EnvNameView {
130
- /** Upper-cased, `-` read as `_`; each name also under `INPUT_`. */
131
- readonly exactNames: ReadonlySet<string>;
132
- readonly nonSecretExactNames: ReadonlySet<string>;
133
- readonly nonSecretNameShape: RegExp;
134
- readonly nonCredentialPrefix: RegExp;
135
- /** A credential word in its position, case-insensitive. */
136
- readonly credentialWord: RegExp;
137
- readonly connectionStringName: RegExp;
138
- /** A credential word that is a whole `_` segment of a name (every position but `embedded`; a counted plural no count
139
- * word touches), as a regex source. */
140
- readonly segmentWord: string;
141
- readonly tokenPrefix: RegExp;
142
- }
143
- export declare function envNameView(vocabulary: CredentialVocabulary): EnvNameView;
144
- /** `camelCase` / `PascalCase` read as `_`-separated words, `OAuth` and `NextAuth` kept whole. */
145
- export declare function splitCamelCase(name: string): string;
146
- /** The record-key view: what {@link CREDENTIAL_VOCABULARY} says about the names a structured record carries — the member
147
- * of a config or detail record and the HTTP header — the credential words of the env-name view, each row's `recordKeys`
148
- * spellings besides, and a `separated` word standing alone (`pwd`, `pass`: a record has no shell variable of that name).
149
- * The names the vocabulary declares non-secret stay non-secret here too, as the whole name; the header-name reading
150
- * ({@link isSensitiveHeaderName}) alone also takes one as the tail of a longer name — a gateway prefixes the header it
151
- * names the same non-secret thing with (`cf-aig-cache-key`), where a secret named `secret_cache_key` lives in a
152
- * body or a config record and is read whole. */
153
- export interface RecordKeyView {
154
- /** A credential word in its position, case-insensitive. Applied to a key with `-` read as `_`, as written and
155
- * camel-split ({@link isSensitiveRecordKey}, {@link isSensitiveHeaderName}). */
156
- readonly credentialWord: RegExp;
157
- readonly nonSecretExactNames: ReadonlySet<string>;
158
- readonly nonSecretNameShape: RegExp;
159
- readonly nonCredentialPrefix: RegExp;
160
- }
161
- export declare function recordKeyView(vocabulary: CredentialVocabulary): RecordKeyView;
162
- /** Does `key`, the name of a record's MEMBER (`Proxy-Authorization`, `pwd`, `X_API_KEY`, `clientSecret`), name a credential?
163
- * Case does not matter, `-` and `_` are one. A name the vocabulary declares non-secret is none as the WHOLE name only
164
- * (`partition_key`; `x_partition_key` and `secret_cache_key` are still read by their words): a
165
- * secret is named by the system that holds it, and what this reading decides is whether a value is shown or kept out of
166
- * a record. The HTTP header-name reading is {@link isSensitiveHeaderName}. `view` is the vocabulary's record-key view
167
- * unless a caller holds another. */
168
- export declare function isSensitiveRecordKey(key: string, view?: RecordKeyView): boolean;
169
- /** Does `name`, an HTTP header's name (`Authorization`, `X-Api-Key`, `cf-aig-cache-key`), name a credential? The
170
- * record-key reading ({@link isSensitiveRecordKey}) plus one exemption: a declared non-secret name is none also as the
171
- * TAIL of a longer name, at a `_` / `-` boundary, whose front part holds no credential word (`cf-aig-cache-key`,
172
- * `X-Idempotency-Key`, `X-Partition-Key`; `secret-cache-key`, `clientAuth-cache-key` and `xcache-key`
173
- * are still read by their words). A gateway prefixes the header it names the same non-secret thing with, and the reading
174
- * that mistakes such a header for a credential drops the key that should have gone out. `view` is the vocabulary's
175
- * record-key view unless a caller holds another. */
176
- export declare function isSensitiveHeaderName(name: string, view?: RecordKeyView): boolean;