@tiphys/kernel 0.0.0 → 0.2.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 (207) hide show
  1. package/AGENTS.md +663 -0
  2. package/LICENSE +202 -0
  3. package/assurance-modes.yaml +299 -0
  4. package/checklists/clean-room.yaml +325 -0
  5. package/checklists/env-failure-diagnosis.yaml +68 -0
  6. package/checklists/flake-playbook.yaml +68 -0
  7. package/checklists/hazard-review.yaml +144 -0
  8. package/checklists/plan-review.yaml +103 -0
  9. package/dist/bin/tiphys.d.ts +2 -0
  10. package/dist/bin/tiphys.js +92 -0
  11. package/dist/src/adapters/load.d.ts +202 -0
  12. package/dist/src/adapters/load.js +440 -0
  13. package/dist/src/brief.d.ts +32 -0
  14. package/dist/src/brief.js +66 -0
  15. package/dist/src/checklists.d.ts +169 -0
  16. package/dist/src/checklists.js +310 -0
  17. package/dist/src/checks.d.ts +1539 -0
  18. package/dist/src/checks.js +5025 -0
  19. package/dist/src/cli.d.ts +9 -0
  20. package/dist/src/cli.js +68 -0
  21. package/dist/src/commands/brief.d.ts +92 -0
  22. package/dist/src/commands/brief.js +343 -0
  23. package/dist/src/commands/checklist.d.ts +42 -0
  24. package/dist/src/commands/checklist.js +168 -0
  25. package/dist/src/commands/cutover.d.ts +35 -0
  26. package/dist/src/commands/cutover.js +448 -0
  27. package/dist/src/commands/doctor.d.ts +264 -0
  28. package/dist/src/commands/doctor.js +1546 -0
  29. package/dist/src/commands/gates.d.ts +9 -0
  30. package/dist/src/commands/gates.js +360 -0
  31. package/dist/src/commands/init.d.ts +30 -0
  32. package/dist/src/commands/init.js +177 -0
  33. package/dist/src/commands/lock.d.ts +34 -0
  34. package/dist/src/commands/lock.js +340 -0
  35. package/dist/src/commands/mode.d.ts +40 -0
  36. package/dist/src/commands/mode.js +134 -0
  37. package/dist/src/commands/next.d.ts +130 -0
  38. package/dist/src/commands/next.js +597 -0
  39. package/dist/src/commands/plan.d.ts +20 -0
  40. package/dist/src/commands/plan.js +105 -0
  41. package/dist/src/commands/pool.d.ts +1 -0
  42. package/dist/src/commands/pool.js +139 -0
  43. package/dist/src/commands/resume.d.ts +1 -0
  44. package/dist/src/commands/resume.js +88 -0
  45. package/dist/src/commands/spawn.d.ts +1 -0
  46. package/dist/src/commands/spawn.js +195 -0
  47. package/dist/src/commands/status.d.ts +21 -0
  48. package/dist/src/commands/status.js +122 -0
  49. package/dist/src/commands/sync.d.ts +47 -0
  50. package/dist/src/commands/sync.js +341 -0
  51. package/dist/src/commands/teardown.d.ts +1 -0
  52. package/dist/src/commands/teardown.js +87 -0
  53. package/dist/src/commands/tuition.d.ts +21 -0
  54. package/dist/src/commands/tuition.js +218 -0
  55. package/dist/src/commands/validate.d.ts +78 -0
  56. package/dist/src/commands/validate.js +430 -0
  57. package/dist/src/commands/watch.d.ts +1 -0
  58. package/dist/src/commands/watch.js +172 -0
  59. package/dist/src/cutover.d.ts +584 -0
  60. package/dist/src/cutover.js +1444 -0
  61. package/dist/src/exclusion.d.ts +389 -0
  62. package/dist/src/exclusion.js +843 -0
  63. package/dist/src/exec/env.d.ts +278 -0
  64. package/dist/src/exec/env.js +334 -0
  65. package/dist/src/fleet.d.ts +223 -0
  66. package/dist/src/fleet.js +298 -0
  67. package/dist/src/gates/adapters/http-json.d.ts +5 -0
  68. package/dist/src/gates/adapters/http-json.js +283 -0
  69. package/dist/src/gates/adapters/migrations-command.d.ts +1 -0
  70. package/dist/src/gates/adapters/migrations-command.js +373 -0
  71. package/dist/src/gates/citations.d.ts +408 -0
  72. package/dist/src/gates/citations.js +1169 -0
  73. package/dist/src/gates/coverage.d.ts +375 -0
  74. package/dist/src/gates/coverage.js +836 -0
  75. package/dist/src/gates/credentials.d.ts +233 -0
  76. package/dist/src/gates/credentials.js +752 -0
  77. package/dist/src/gates/deploy.d.ts +1 -0
  78. package/dist/src/gates/deploy.js +33 -0
  79. package/dist/src/gates/gate-classes.d.ts +56 -0
  80. package/dist/src/gates/gate-classes.js +633 -0
  81. package/dist/src/gates/manifest.d.ts +99 -0
  82. package/dist/src/gates/manifest.js +208 -0
  83. package/dist/src/gates/merge-preconditions.d.ts +319 -0
  84. package/dist/src/gates/merge-preconditions.js +932 -0
  85. package/dist/src/gates/migrations.d.ts +1 -0
  86. package/dist/src/gates/migrations.js +36 -0
  87. package/dist/src/gates/pin.d.ts +114 -0
  88. package/dist/src/gates/pin.js +154 -0
  89. package/dist/src/gates/red-witness.d.ts +22 -0
  90. package/dist/src/gates/red-witness.js +482 -0
  91. package/dist/src/gates/release.d.ts +283 -0
  92. package/dist/src/gates/release.js +820 -0
  93. package/dist/src/gates/result.d.ts +116 -0
  94. package/dist/src/gates/result.js +91 -0
  95. package/dist/src/gates/run.d.ts +614 -0
  96. package/dist/src/gates/run.js +1614 -0
  97. package/dist/src/gates/schemas/citation-config.schema.json +59 -0
  98. package/dist/src/gates/schemas/coverage-config.schema.json +77 -0
  99. package/dist/src/gates/schemas/gate-manifest.schema.json +125 -0
  100. package/dist/src/gates/schemas/gate-result.schema.json +160 -0
  101. package/dist/src/gates/schemas/phase-declaration.schema.json +87 -0
  102. package/dist/src/gates/schemas/release-record.schema.json +119 -0
  103. package/dist/src/gates/schemas/verifier-config.schema.json +101 -0
  104. package/dist/src/gates/schemas/witness-spec.schema.json +110 -0
  105. package/dist/src/gates/scope.d.ts +131 -0
  106. package/dist/src/gates/scope.js +1018 -0
  107. package/dist/src/gates/suite.d.ts +217 -0
  108. package/dist/src/gates/suite.js +968 -0
  109. package/dist/src/gates/validate.d.ts +121 -0
  110. package/dist/src/gates/validate.js +414 -0
  111. package/dist/src/hooks.d.ts +84 -0
  112. package/dist/src/hooks.js +125 -0
  113. package/dist/src/index.d.ts +31 -0
  114. package/dist/src/index.js +30 -0
  115. package/dist/src/liveness.d.ts +321 -0
  116. package/dist/src/liveness.js +396 -0
  117. package/dist/src/lock.d.ts +256 -0
  118. package/dist/src/lock.js +792 -0
  119. package/dist/src/model-resolution.d.ts +159 -0
  120. package/dist/src/model-resolution.js +307 -0
  121. package/dist/src/modes.d.ts +149 -0
  122. package/dist/src/modes.js +258 -0
  123. package/dist/src/path-identity.d.ts +34 -0
  124. package/dist/src/path-identity.js +48 -0
  125. package/dist/src/plan.d.ts +73 -0
  126. package/dist/src/plan.js +153 -0
  127. package/dist/src/pool.d.ts +326 -0
  128. package/dist/src/pool.js +988 -0
  129. package/dist/src/roles.d.ts +461 -0
  130. package/dist/src/roles.js +776 -0
  131. package/dist/src/spawn.d.ts +482 -0
  132. package/dist/src/spawn.js +1003 -0
  133. package/dist/src/status.d.ts +116 -0
  134. package/dist/src/status.js +148 -0
  135. package/dist/src/task.d.ts +504 -0
  136. package/dist/src/task.js +307 -0
  137. package/dist/src/teardown.d.ts +39 -0
  138. package/dist/src/teardown.js +422 -0
  139. package/dist/src/tuition.d.ts +159 -0
  140. package/dist/src/tuition.js +311 -0
  141. package/dist/src/validate.d.ts +263 -0
  142. package/dist/src/validate.js +742 -0
  143. package/dist/src/version.d.ts +3 -0
  144. package/dist/src/version.js +38 -0
  145. package/dist/src/watcher.d.ts +275 -0
  146. package/dist/src/watcher.js +849 -0
  147. package/dist/src/witness/run.d.ts +299 -0
  148. package/dist/src/witness/run.js +1373 -0
  149. package/dist/src/witness/spec.d.ts +270 -0
  150. package/dist/src/witness/spec.js +475 -0
  151. package/dist/tsconfig.src.tsbuildinfo +1 -0
  152. package/gate-registry.yaml +526 -0
  153. package/gates.manifest.json +257 -0
  154. package/package.json +72 -3
  155. package/role-model-config.yaml +88 -0
  156. package/roles/README.md +128 -0
  157. package/roles/_shared-dispatch-contract.md +87 -0
  158. package/roles/adversarial-plan-reviewer.md +80 -0
  159. package/roles/clean-room-reviewer.md +140 -0
  160. package/roles/implementer.md +463 -0
  161. package/roles/investigator.md +138 -0
  162. package/roles/plan-writer.md +95 -0
  163. package/schemas/README.md +82 -0
  164. package/schemas/assurance-modes.schema.json +264 -0
  165. package/schemas/charter.schema.json +185 -0
  166. package/schemas/checklist.schema.json +114 -0
  167. package/schemas/cutover-state.schema.json +64 -0
  168. package/schemas/decision-record.schema.json +88 -0
  169. package/schemas/executor-record.schema.json +36 -0
  170. package/schemas/final-report.schema.json +90 -0
  171. package/schemas/finding.schema.json +106 -0
  172. package/schemas/gate-registry.schema.json +260 -0
  173. package/schemas/mechanism-index.schema.json +94 -0
  174. package/schemas/model-resolution.schema.json +362 -0
  175. package/schemas/plan.schema.json +300 -0
  176. package/schemas/report.schema.json +579 -0
  177. package/schemas/role-brief.schema.json +105 -0
  178. package/schemas/role-model-config.schema.json +90 -0
  179. package/schemas/status-line.schema.json +40 -0
  180. package/schemas/tuition.schema.json +191 -0
  181. package/schemas/verdict.schema.json +295 -0
  182. package/schemas/work-history.schema.json +183 -0
  183. package/schemas/write-bypass.schema.json +69 -0
  184. package/templates/charter.example.yaml +54 -0
  185. package/templates/decision-record.example.yaml +27 -0
  186. package/templates/final-report.example.yaml +80 -0
  187. package/templates/plan.example.yaml +87 -0
  188. package/templates/report.example.yaml +236 -0
  189. package/templates/warnings.md +74 -0
  190. package/templates/work-history.example.yaml +185 -0
  191. package/tuition/README.md +76 -0
  192. package/tuition/T-001.yaml +48 -0
  193. package/tuition/T-002.yaml +51 -0
  194. package/tuition/T-003.yaml +100 -0
  195. package/tuition/T-004.yaml +52 -0
  196. package/tuition/T-005.yaml +72 -0
  197. package/tuition/T-006.yaml +81 -0
  198. package/tuition/T-007.yaml +56 -0
  199. package/tuition/T-008.yaml +111 -0
  200. package/tuition/T-009.yaml +50 -0
  201. package/tuition/T-015.yaml +36 -0
  202. package/tuition/T-016.yaml +36 -0
  203. package/tuition/T-017.yaml +46 -0
  204. package/tuition/T-018.yaml +84 -0
  205. package/tuition/T-021.yaml +40 -0
  206. package/tuition/T-022.yaml +36 -0
  207. package/tuition/mechanism-index.yaml +256 -0
@@ -0,0 +1,233 @@
1
+ import type { GateStatus } from "./result.ts";
2
+ /** What one source probe concluded. */
3
+ export interface SourceProbe {
4
+ /** The credential source's stable name. */
5
+ source: string;
6
+ outcome: "clean" | "resolvable" | "error";
7
+ detail: string;
8
+ }
9
+ /**
10
+ * THIS VOCABULARY IS NOW READ BY THE KERNEL AS WELL AS BY THIS GATE
11
+ * (M4-P8 step 4, and this comment IS the record that step requires).
12
+ *
13
+ * `src/exec/env.ts` imports `GH_TOKEN_VARIABLES` and `isDangerousEnvName`
14
+ * from here to refuse a per-invocation allowlist extension naming one of
15
+ * them. The plan offered two shapes, move the vocabulary to a third module
16
+ * or export it from here, and the choice taken is EXPORT FROM HERE: the
17
+ * walk above, the per-name sources below and the constants stay in one
18
+ * file, so a future editor extending the vocabulary cannot extend it
19
+ * somewhere the other reader does not see. What is forbidden is a second
20
+ * copy: two lists drift, and they drift silently toward the permissive
21
+ * side.
22
+ *
23
+ * NOTHING ABOUT WHAT EITHER GATE DECIDES CHANGES WITH THAT IMPORT. The
24
+ * constants, the pattern and `isDangerousEnvName` are byte-identical to
25
+ * their M2-P8 form; the only difference is that a second module now reads
26
+ * them.
27
+ */
28
+ /**
29
+ * gh's documented token vocabulary (see the module comment for the walk).
30
+ * Never permitted in a child environment, allowlisted or not.
31
+ */
32
+ export declare const GH_TOKEN_VARIABLES: readonly string[];
33
+ /**
34
+ * The credential- or code-execution-capable environment vocabulary of the
35
+ * programs a scrubbed child runs, walked from each program's own
36
+ * documentation. A child environment must contain NONE of these,
37
+ * allowlisted or not; the environment probe reddens if any is present.
38
+ * This is a BOUNDED denylist (it cannot list every dangerous name any
39
+ * program will ever read); the allowlist in src/exec/env.ts remains the
40
+ * real defense. Per-name source:
41
+ *
42
+ * git (git-config(1), git(1)):
43
+ * GIT_ASKPASS - program git runs to obtain a password.
44
+ * GIT_SSH_COMMAND - shell command git uses for its ssh transport.
45
+ * GIT_PROXY_COMMAND - external program for git:// connections.
46
+ * GIT_CONFIG_COUNT - trigger of the environment config-injection
47
+ * family; with GIT_CONFIG_KEY_n / GIT_CONFIG_VALUE_n
48
+ * it injects arbitrary config (e.g. a
49
+ * credential.helper) at a scope --global/--system
50
+ * cannot see. The numbered KEY_n / VALUE_n members
51
+ * are matched by isDangerousEnvName's pattern.
52
+ * ssh (ssh(1), ssh-add(1)):
53
+ * SSH_ASKPASS - program ssh runs to obtain a passphrase.
54
+ * SSH_AUTH_SOCK - the agent socket. ADDED BY THE DR-0047 SWEEP FIX
55
+ * ROUND, and the basis is stated here rather than
56
+ * implied because HALF OF IT IS UNVERIFIED. What was
57
+ * MEASURED in this container: the name sat in neither
58
+ * walked vocabulary, so the audited route ACCEPTED it
59
+ * (clean-room-final-credential-criteria CR-F-CRED-004),
60
+ * and buildChildEnv's default child does not carry it,
61
+ * so refusing an extension that names it withdraws
62
+ * nothing the default grants. What could NOT be
63
+ * verified here: this container has no ssh binary and
64
+ * no man page (`ssh -V` -> command not found, `man 1
65
+ * ssh` -> nothing), so the claim that ssh(1)'s own
66
+ * ENVIRONMENT section documents it was NOT read from
67
+ * the page. The row therefore rests on capability
68
+ * reasoning, not on the walk: the socket is a SIGNING
69
+ * channel (any holder can authenticate as the owner to
70
+ * any host the agent holds a key for), which is
71
+ * strictly stronger than SSH_ASKPASS, a passphrase
72
+ * PROMPT, which the same row already refuses. A later
73
+ * round with the page should either confirm this row
74
+ * from ssh(1) or move it and say why.
75
+ * node / dynamic loader / shell startup (node(1), ld.so(8), bash(1)):
76
+ * NODE_OPTIONS - options node applies at startup (can require
77
+ * arbitrary modules), arbitrary code execution.
78
+ * NODE_EXTRA_CA_CERTS- extra CAs node trusts, a TLS-trust channel.
79
+ * LD_PRELOAD - shared objects the loader injects into every
80
+ * dynamically linked program, arbitrary code.
81
+ * BASH_ENV - script bash sources at non-interactive startup.
82
+ * ENV - script the POSIX shell sources at startup.
83
+ *
84
+ * GIT_CONFIG_GLOBAL and GIT_CONFIG_SYSTEM are DELIBERATELY absent: they are
85
+ * redirected (CREDENTIAL_STORE_REDIRECTIONS) to empty harness-owned targets
86
+ * and the override runs last in buildChildEnv, so their mere presence is
87
+ * expected and neutralized; flagging them would false-positive on every
88
+ * real run.
89
+ */
90
+ export declare const DANGEROUS_ENV_VOCABULARY: readonly string[];
91
+ /**
92
+ * THE EGRESS VOCABULARY (M4-P29, and this comment is the record of why it
93
+ * exists as a SEPARATE list rather than as more rows of the one above).
94
+ *
95
+ * WHAT WAS MEASURED. delivery/verification/m4-prototype-probes.md:46
96
+ * recorded that this gate's verdict is INVERTED with respect to real
97
+ * capability: it reddens `GIT_CONFIG_*`, which in that container bought
98
+ * only URL rewriting, and it greens `HTTPS_PROXY`, which bought full
99
+ * GitHub reach. M4-P8 then measured the same thing from the other side,
100
+ * four arms through `spawnTask` differing only in the allowlist extension
101
+ * (delivery/work-history/m4-p8.md:116): arm A, ten variables, HTTP 403
102
+ * from `api.github.com/user`; arm B, the same ten plus `HTTPS_PROXY`,
103
+ * HTTP 200. One variable, and it is the one nothing in this module knew
104
+ * about. A gate that cannot go red for the case that matters is the shape
105
+ * this repository keeps paying for.
106
+ *
107
+ * WHAT THIS FIXES AND WHAT IT DOES NOT, stated here rather than left to be
108
+ * discovered. It closes the case where the DEFAULT allowlist in
109
+ * src/exec/env.ts gains an egress name: this tripwire is
110
+ * allowlist-INDEPENDENT, exactly like the two above it, so the widening
111
+ * costs a red instead of buying a green. It does NOT close the case
112
+ * M4-P8's arm B actually used, which is a PER-INVOCATION
113
+ * `extraAllowlist`: that argument is runtime data of one spawn, this gate
114
+ * probes the constructed default child, and no probe of a default can see
115
+ * an argument a caller has not passed yet. Closing that half means
116
+ * auditing the extension record a task writes, which is a different gate
117
+ * and a different phase.
118
+ *
119
+ * WHY A SEPARATE LIST, AND WHAT DR-0048 CHANGED ABOUT ITS CONSEQUENCE.
120
+ * M4-P29 kept these names out of `DANGEROUS_ENV_VOCABULARY` so that a data
121
+ * edit in this file would not, as a side effect, refuse M4-P8's audited
122
+ * extension in a module that phase did not touch. It named the underlying
123
+ * question (whether an egress name may ever be extended) as a kernel design
124
+ * question with an owner-facing cost, and routed it onward rather than
125
+ * taking it by accident.
126
+ *
127
+ * DR-0048 answered that question: the audited route REFUSES egress names.
128
+ * The two lists still stay separate, because they are walked from different
129
+ * programs' documentation and their per-name evidence is different, and
130
+ * `isDangerousEnvName` is still byte-for-byte what it was. What changed is
131
+ * that the refusal in src/exec/env.ts no longer walks a HAND-PICKED PAIR of
132
+ * vocabularies: it walks `REFUSED_CHILD_ENV_VOCABULARIES` below, which is
133
+ * the declared list of every vocabulary in this module, this one included.
134
+ *
135
+ * THE WALK, per name, from the consuming programs' own documentation
136
+ * (curl(1) "ENVIRONMENT", git(1) "http_proxy", wget(1) "ENVIRONMENT"):
137
+ * each of these names a proxy a child's HTTP client will route through,
138
+ * in both the upper-case and lower-case spellings those pages document.
139
+ *
140
+ * HTTP_PROXY / http_proxy - proxy for http:// requests.
141
+ * HTTPS_PROXY / https_proxy - proxy for https:// requests. THE MEASURED
142
+ * NAME: arm A 403 against arm B 200.
143
+ * ALL_PROXY / all_proxy - proxy for every scheme.
144
+ * FTP_PROXY / ftp_proxy - proxy for ftp:// requests.
145
+ *
146
+ * TWO NAMES ARE DELIBERATELY ABSENT, and both absences are measured rather
147
+ * than assumed. `NO_PROXY` / `no_proxy` NARROW reach instead of granting
148
+ * it, so listing them would redden a child that is strictly less capable.
149
+ * `CURL_CA_BUNDLE` is a TLS-trust channel and not an egress grant: M4-P8's
150
+ * arm C added it on top of arm B and measured the same HTTP 200 arm B
151
+ * already had (delivery/work-history/m4-p8.md:117), so it buys no reach,
152
+ * and its node-side sibling `NODE_EXTRA_CA_CERTS` is already covered by
153
+ * `DANGEROUS_ENV_VOCABULARY` above.
154
+ *
155
+ * LIKE THE LIST ABOVE THIS IS A BOUNDED DENYLIST. The allowlist in
156
+ * src/exec/env.ts is still the real defense; this makes a widening cost a
157
+ * red for the names walked here, it does not enumerate every way a child
158
+ * could be handed network reach.
159
+ */
160
+ export declare const EGRESS_ENV_VOCABULARY: readonly string[];
161
+ /** Whether a variable name is in the walked egress vocabulary. */
162
+ export declare function isEgressEnvName(name: string): boolean;
163
+ /** Whether a variable name is in the walked dangerous vocabulary. */
164
+ export declare function isDangerousEnvName(name: string): boolean;
165
+ /** One walked vocabulary, as a refusal walks it. */
166
+ export interface RefusedEnvVocabulary {
167
+ /** Stable id, used in tests and in nothing an operator reads. */
168
+ id: string;
169
+ /** The exported constant this row stands for, named for the drift test. */
170
+ constantName: string;
171
+ /** Whether this vocabulary claims the name. */
172
+ includes: (name: string) => boolean;
173
+ /**
174
+ * The middle of the refusal sentence: "the allowlist extension entry X "
175
+ * + this + " and may never cross into a child environment".
176
+ */
177
+ clause: string;
178
+ }
179
+ /**
180
+ * EVERY VOCABULARY A CHILD-ENVIRONMENT REFUSAL MUST WALK, IN ONE PLACE.
181
+ *
182
+ * THE MECHANISM THIS EXISTS AGAINST (CH-001 high, CR-F-CRED-003, CR-F-CRED-004;
183
+ * DR-0048): a refusal that walks ONE vocabulary, or a hand-picked subset of
184
+ * them, while several exist. `refuseExtraAllowlist` (src/exec/env.ts) named
185
+ * `GH_TOKEN_VARIABLES` and `isDangerousEnvName` as two literal `if` arms and
186
+ * therefore could not see `EGRESS_ENV_VOCABULARY`, which this module had held
187
+ * since M4-P29. The defect is not that the third name was forgotten once; it
188
+ * is that ADDING a vocabulary to this module left every consumer's coverage
189
+ * unchanged and silent, so the subset could only be discovered by probing a
190
+ * name.
191
+ *
192
+ * So the list of vocabularies is data, exported from the module that owns
193
+ * them, and a consumer walks the LIST rather than naming members of it. A
194
+ * fourth vocabulary added below is walked by every consumer of this array the
195
+ * moment it gains a row here, and `test/payload-credentials.test.ts` reddens
196
+ * if a `*_VOCABULARY` or `*_VARIABLES` export of this module has NO row,
197
+ * which is the case a reader cannot see by reading either file alone.
198
+ *
199
+ * `probeCredentialSources` deliberately does NOT walk this array: it reports a
200
+ * different sentence per vocabulary in one fixed order, strongest first, and the three
201
+ * sentences are read by operators. It is covered by the same drift test from
202
+ * the other side.
203
+ */
204
+ export declare const REFUSED_CHILD_ENV_VOCABULARIES: readonly RefusedEnvVocabulary[];
205
+ /**
206
+ * The first vocabulary claiming `name`, or undefined. The ORDER of
207
+ * `REFUSED_CHILD_ENV_VOCABULARIES` is the order the refusal reports, and it
208
+ * is narrowest-first so that a name in two vocabularies is reported as the
209
+ * more specific one.
210
+ */
211
+ export declare function refusedEnvVocabulary(name: string): RefusedEnvVocabulary | undefined;
212
+ /** The names credential-scrub probes, in probe order. */
213
+ export declare const CREDENTIAL_SOURCES: readonly string[];
214
+ export interface ProbeOptions {
215
+ /**
216
+ * The variable names the environment source accepts. Defaults to the
217
+ * constructed contract (allowlist plus redirections). Passed explicitly
218
+ * by tests staging dangerous states.
219
+ */
220
+ permittedNames?: ReadonlySet<string>;
221
+ }
222
+ /**
223
+ * Probe every credential source FROM INSIDE the given child environment.
224
+ * The environment is the one under test: every subprocess probe below runs
225
+ * with `env` as its entire environment, so what is asserted is what a
226
+ * child launched with this environment could actually resolve.
227
+ */
228
+ export declare function probeCredentialSources(env: Record<string, string | undefined>, options?: ProbeOptions): SourceProbe[];
229
+ /** Fold probes into a gate verdict. Any error wins over any red. */
230
+ export declare function verdictFromProbes(probes: SourceProbe[]): {
231
+ status: GateStatus;
232
+ detail: string;
233
+ };