@namzu/sdk 64.0.0 → 64.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 (132) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/dist/agents/file-definitions.d.ts +10 -0
  3. package/dist/agents/file-definitions.d.ts.map +1 -1
  4. package/dist/agents/file-definitions.js +10 -2
  5. package/dist/agents/file-definitions.js.map +1 -1
  6. package/dist/plugin/file-change-hooks.d.ts +53 -0
  7. package/dist/plugin/file-change-hooks.d.ts.map +1 -0
  8. package/dist/plugin/file-change-hooks.js +111 -0
  9. package/dist/plugin/file-change-hooks.js.map +1 -0
  10. package/dist/plugin/file-change-watch.d.ts +111 -0
  11. package/dist/plugin/file-change-watch.d.ts.map +1 -0
  12. package/dist/plugin/file-change-watch.js +324 -0
  13. package/dist/plugin/file-change-watch.js.map +1 -0
  14. package/dist/plugin/index.d.ts +10 -1
  15. package/dist/plugin/index.d.ts.map +1 -1
  16. package/dist/plugin/index.js +7 -1
  17. package/dist/plugin/index.js.map +1 -1
  18. package/dist/plugin/lifecycle.d.ts +60 -1
  19. package/dist/plugin/lifecycle.d.ts.map +1 -1
  20. package/dist/plugin/lifecycle.js +118 -7
  21. package/dist/plugin/lifecycle.js.map +1 -1
  22. package/dist/plugin/loader.d.ts.map +1 -1
  23. package/dist/plugin/loader.js +24 -1
  24. package/dist/plugin/loader.js.map +1 -1
  25. package/dist/plugin/session-hook-env.d.ts +140 -0
  26. package/dist/plugin/session-hook-env.d.ts.map +1 -0
  27. package/dist/plugin/session-hook-env.js +458 -0
  28. package/dist/plugin/session-hook-env.js.map +1 -0
  29. package/dist/plugin/shell-hook-env.d.ts +107 -0
  30. package/dist/plugin/shell-hook-env.d.ts.map +1 -0
  31. package/dist/plugin/shell-hook-env.js +272 -0
  32. package/dist/plugin/shell-hook-env.js.map +1 -0
  33. package/dist/plugin/shell-hook.d.ts +105 -2
  34. package/dist/plugin/shell-hook.d.ts.map +1 -1
  35. package/dist/plugin/shell-hook.js +282 -24
  36. package/dist/plugin/shell-hook.js.map +1 -1
  37. package/dist/plugin/worktree-hook-answer.d.ts +26 -0
  38. package/dist/plugin/worktree-hook-answer.d.ts.map +1 -0
  39. package/dist/plugin/worktree-hook-answer.js +132 -0
  40. package/dist/plugin/worktree-hook-answer.js.map +1 -0
  41. package/dist/public-runtime.d.ts +4 -4
  42. package/dist/public-runtime.d.ts.map +1 -1
  43. package/dist/public-runtime.js +4 -4
  44. package/dist/public-runtime.js.map +1 -1
  45. package/dist/public-types.d.ts +7 -1
  46. package/dist/public-types.d.ts.map +1 -1
  47. package/dist/runtime/query/executor.d.ts +8 -1
  48. package/dist/runtime/query/executor.d.ts.map +1 -1
  49. package/dist/runtime/query/executor.js +4 -0
  50. package/dist/runtime/query/executor.js.map +1 -1
  51. package/dist/runtime/query/index.d.ts +9 -0
  52. package/dist/runtime/query/index.d.ts.map +1 -1
  53. package/dist/runtime/query/index.js +20 -0
  54. package/dist/runtime/query/index.js.map +1 -1
  55. package/dist/runtime/query/tooling.d.ts +8 -1
  56. package/dist/runtime/query/tooling.d.ts.map +1 -1
  57. package/dist/runtime/query/tooling.js +6 -0
  58. package/dist/runtime/query/tooling.js.map +1 -1
  59. package/dist/session/workspace/hooked-driver.d.ts +72 -0
  60. package/dist/session/workspace/hooked-driver.d.ts.map +1 -0
  61. package/dist/session/workspace/hooked-driver.js +204 -0
  62. package/dist/session/workspace/hooked-driver.js.map +1 -0
  63. package/dist/session/workspace/index.d.ts +2 -0
  64. package/dist/session/workspace/index.d.ts.map +1 -1
  65. package/dist/session/workspace/index.js +1 -0
  66. package/dist/session/workspace/index.js.map +1 -1
  67. package/dist/skills/index.d.ts +1 -1
  68. package/dist/skills/index.d.ts.map +1 -1
  69. package/dist/skills/index.js +1 -1
  70. package/dist/skills/index.js.map +1 -1
  71. package/dist/skills/loader.d.ts +22 -0
  72. package/dist/skills/loader.d.ts.map +1 -1
  73. package/dist/skills/loader.js +41 -0
  74. package/dist/skills/loader.js.map +1 -1
  75. package/dist/tools/builtins/bash-cwd.d.ts +6 -1
  76. package/dist/tools/builtins/bash-cwd.d.ts.map +1 -1
  77. package/dist/tools/builtins/bash-cwd.js +27 -2
  78. package/dist/tools/builtins/bash-cwd.js.map +1 -1
  79. package/dist/tools/builtins/bash.js +1 -1
  80. package/dist/tools/builtins/bash.js.map +1 -1
  81. package/dist/tools/builtins/skill.d.ts.map +1 -1
  82. package/dist/tools/builtins/skill.js +114 -17
  83. package/dist/tools/builtins/skill.js.map +1 -1
  84. package/dist/types/plugin/index.d.ts +75 -2
  85. package/dist/types/plugin/index.d.ts.map +1 -1
  86. package/dist/types/plugin/index.js +5 -0
  87. package/dist/types/plugin/index.js.map +1 -1
  88. package/dist/types/session/records.d.ts +73 -1
  89. package/dist/types/session/records.d.ts.map +1 -1
  90. package/dist/types/session/records.js +25 -0
  91. package/dist/types/session/records.js.map +1 -1
  92. package/dist/types/skills/index.d.ts +8 -0
  93. package/dist/types/skills/index.d.ts.map +1 -1
  94. package/dist/types/skills/index.js.map +1 -1
  95. package/dist/types/tool/index.d.ts +97 -0
  96. package/dist/types/tool/index.d.ts.map +1 -1
  97. package/dist/types/tool/index.js.map +1 -1
  98. package/dist/types/workspace/ref.d.ts +6 -0
  99. package/dist/types/workspace/ref.d.ts.map +1 -1
  100. package/dist/utils/frontmatter.d.ts +16 -0
  101. package/dist/utils/frontmatter.d.ts.map +1 -1
  102. package/dist/utils/frontmatter.js +31 -1
  103. package/dist/utils/frontmatter.js.map +1 -1
  104. package/package.json +1 -1
  105. package/src/agents/file-definitions.ts +17 -2
  106. package/src/plugin/file-change-hooks.ts +131 -0
  107. package/src/plugin/file-change-watch.ts +367 -0
  108. package/src/plugin/index.ts +39 -1
  109. package/src/plugin/lifecycle.ts +162 -8
  110. package/src/plugin/loader.ts +22 -1
  111. package/src/plugin/session-hook-env.ts +475 -0
  112. package/src/plugin/shell-hook-env.ts +335 -0
  113. package/src/plugin/shell-hook.ts +416 -24
  114. package/src/plugin/worktree-hook-answer.ts +142 -0
  115. package/src/public-runtime.ts +33 -0
  116. package/src/public-types.ts +20 -1
  117. package/src/runtime/query/executor.ts +12 -0
  118. package/src/runtime/query/index.ts +28 -0
  119. package/src/runtime/query/tooling.ts +19 -1
  120. package/src/session/workspace/hooked-driver.ts +272 -0
  121. package/src/session/workspace/index.ts +7 -0
  122. package/src/skills/index.ts +3 -0
  123. package/src/skills/loader.ts +47 -0
  124. package/src/tools/builtins/bash-cwd.ts +25 -1
  125. package/src/tools/builtins/bash.ts +1 -1
  126. package/src/tools/builtins/skill.ts +138 -27
  127. package/src/types/plugin/index.ts +84 -1
  128. package/src/types/session/records.ts +28 -0
  129. package/src/types/skills/index.ts +9 -0
  130. package/src/types/tool/index.ts +105 -0
  131. package/src/types/workspace/ref.ts +6 -0
  132. package/src/utils/frontmatter.ts +52 -1
@@ -0,0 +1,335 @@
1
+ /**
2
+ * The environment a shell hook command is started with, beyond what the
3
+ * kernel always sets: the entry's own `env` map, and variables a moved
4
+ * command expects.
5
+ *
6
+ * A hooks block brought from elsewhere often starts a command with a variable
7
+ * for the project folder, named for the tool it was written for. That tool's
8
+ * name is not ours to know, so the rule here reads the shape of the name: a
9
+ * variable the command or its arguments refer to, that is not set, and whose
10
+ * name ends in one of {@link MOVED_FOLDER_ENDINGS}, is set to that folder.
11
+ * Nothing already set is ever replaced.
12
+ */
13
+
14
+ /** A name a hook is started with that `env` may not replace: the kernel sets these itself. */
15
+ export const SHELL_HOOK_RESERVED_ENV: readonly string[] = [
16
+ 'NAMZU_HOOK_EVENT',
17
+ 'NAMZU_SESSION_ID',
18
+ 'NAMZU_PROJECT_DIR',
19
+ 'NAMZU_TURN_ID',
20
+ 'NAMZU_TOOL_NAME',
21
+ 'NAMZU_TOOL_PATH',
22
+ 'NAMZU_ENV_FILE',
23
+ 'NAMZU_STARTED_BY_SESSION',
24
+ ]
25
+
26
+ /** The folders a name's ending can stand for. */
27
+ export type MovedFolder = 'project' | 'plugin' | 'pluginData' | 'skill' | 'envFile'
28
+
29
+ /** Endings read by shape; the name looked for is the whole variable name. */
30
+ export const MOVED_FOLDER_ENDINGS: readonly {
31
+ readonly ending: string
32
+ readonly folder: MovedFolder
33
+ }[] = [
34
+ { ending: '_PROJECT_DIR', folder: 'project' },
35
+ // A plugin's own folder and the folder kept for its data. These are set only
36
+ // for a hook entry a plugin ships; a name like this in a config file's entry
37
+ // has no folder to stand for and is left unset (and reported).
38
+ { ending: '_PLUGIN_ROOT', folder: 'plugin' },
39
+ { ending: '_PLUGIN_DATA', folder: 'pluginData' },
40
+ // A skill's own folder, for a hook that came from a skill. A skill moved as
41
+ // written names its folder `..._PLUGIN_ROOT` (see `movedFolderFor`); it has
42
+ // no data folder, so `_PLUGIN_DATA` is never given to one.
43
+ { ending: '_SKILL_ROOT', folder: 'skill' },
44
+ // The file a hook may append `export NAME=value` lines to, on the events
45
+ // that have one (`session_start`, `cwd_changed`, `file_changed`): the same
46
+ // file `NAMZU_ENV_FILE` names. On any other event there is no such file and
47
+ // the name is left unset (and reported).
48
+ { ending: '_ENV_FILE', folder: 'envFile' },
49
+ ]
50
+
51
+ /**
52
+ * The folder a variable name stands for, or `undefined` when it has none here.
53
+ * A skill's folder answers `_SKILL_ROOT` and also `_PLUGIN_ROOT`, unless the
54
+ * entry belongs to a plugin (then `_PLUGIN_ROOT` is the plugin's folder).
55
+ */
56
+ export function movedFolderFor(
57
+ name: string,
58
+ folders: Readonly<Partial<Record<MovedFolder, string>>>,
59
+ ): string | undefined {
60
+ const moved = MOVED_FOLDER_ENDINGS.find((each) => name.endsWith(each.ending))
61
+ if (moved === undefined) return undefined
62
+ if (moved.folder === 'plugin') return folders.plugin ?? folders.skill
63
+ return folders[moved.folder]
64
+ }
65
+
66
+ /** The folders a plugin-shipped entry is given. */
67
+ export interface PluginFolders {
68
+ /** The plugin's own folder. */
69
+ readonly root: string
70
+ /** The folder kept for the plugin's data, under the Namzu home and never inside `root`. */
71
+ readonly dataDir: string
72
+ }
73
+
74
+ /** Whether a variable name stands for a plugin folder by its ending. */
75
+ export function isPluginFolderVariable(name: string): boolean {
76
+ return MOVED_FOLDER_ENDINGS.some(
77
+ (each) =>
78
+ (each.folder === 'plugin' || each.folder === 'pluginData') && name.endsWith(each.ending),
79
+ )
80
+ }
81
+
82
+ /**
83
+ * `${NAME}` and `$NAME` in a command or argument, for a name that ends in
84
+ * `_PLUGIN_ROOT` or `_PLUGIN_DATA`, become the folder's path, so an entry in
85
+ * the exec form (which no shell reads) finds its own folder too. A reference
86
+ * with a modifier (`${NAME:-x}`) is left to the shell, which has the variable.
87
+ */
88
+ export function substitutePluginFolders(text: string, folders: PluginFolders | undefined): string {
89
+ if (folders === undefined) return text
90
+ return text.replace(
91
+ /\$\{([A-Za-z_][A-Za-z0-9_]*)\}|\$([A-Za-z_][A-Za-z0-9_]*)/g,
92
+ (whole: string, braced: string | undefined, bare: string | undefined) => {
93
+ const name = (braced ?? bare) as string
94
+ const moved = MOVED_FOLDER_ENDINGS.find((each) => name.endsWith(each.ending))
95
+ if (moved === undefined) return whole
96
+ if (moved.folder === 'plugin') return folders.root
97
+ if (moved.folder === 'pluginData') return folders.dataDir
98
+ return whole
99
+ },
100
+ )
101
+ }
102
+
103
+ /**
104
+ * For the exec form, which no shell reads: `${NAME}` and `$NAME` for a name
105
+ * that ends in one of {@link MOVED_FOLDER_ENDINGS} become the value the hook is
106
+ * started with (`env` is the environment {@link movedEnvironment} built, so a
107
+ * value the entry or the host already set wins). A reference with a modifier is
108
+ * left as written, as is a name with no value.
109
+ */
110
+ export function substituteMovedFolders(
111
+ text: string,
112
+ env: Readonly<Record<string, string | undefined>>,
113
+ ): string {
114
+ return text.replace(
115
+ /\$\{([A-Za-z_][A-Za-z0-9_]*)\}|\$([A-Za-z_][A-Za-z0-9_]*)/g,
116
+ (whole: string, braced: string | undefined, bare: string | undefined) => {
117
+ const name = (braced ?? bare) as string
118
+ if (!MOVED_FOLDER_ENDINGS.some((each) => name.endsWith(each.ending))) return whole
119
+ return env[name] ?? whole
120
+ },
121
+ )
122
+ }
123
+
124
+ /**
125
+ * The program that reads a shell hook's command, found on the host's own
126
+ * `PATH`. An entry may set `PATH` in its `env` to something that does not hold
127
+ * `sh`; the command is still read by it, so the shell is looked up before that
128
+ * `env` is applied. `undefined` when no change is needed or none is found.
129
+ */
130
+ export function shellPathOutsideEnv(
131
+ name: string,
132
+ hostPath: string | undefined,
133
+ startedWith: string | undefined,
134
+ isExecutable: (path: string) => boolean,
135
+ separator: string,
136
+ ): string | undefined {
137
+ if (hostPath === undefined || hostPath === startedWith) return undefined
138
+ for (const dir of hostPath.split(separator)) {
139
+ if (dir === '') continue
140
+ const candidate = `${dir.replace(/[\\/]$/, '')}/${name}`
141
+ if (isExecutable(candidate)) return candidate
142
+ }
143
+ return undefined
144
+ }
145
+
146
+ const NAME = /^[A-Za-z_][A-Za-z0-9_]*$/
147
+
148
+ /** What is wrong with an `env` name, or `undefined` when it can be used. */
149
+ export function shellHookEnvNameProblem(name: string): string | undefined {
150
+ if (!NAME.test(name)) {
151
+ return 'is not a valid variable name (letters, digits and underscores, not starting with a digit)'
152
+ }
153
+ if (SHELL_HOOK_RESERVED_ENV.includes(name)) {
154
+ return 'is set by Namzu for every hook and cannot be replaced'
155
+ }
156
+ return undefined
157
+ }
158
+
159
+ /** The problems in an `env` value as a whole, each naming the variable. Empty when it is usable. */
160
+ export function shellHookEnvProblems(env: unknown): string[] {
161
+ if (env === null || typeof env !== 'object' || Array.isArray(env)) {
162
+ return ['must be a mapping of variable names to text']
163
+ }
164
+ const problems: string[] = []
165
+ for (const [name, value] of Object.entries(env)) {
166
+ const bad = shellHookEnvNameProblem(name)
167
+ if (bad !== undefined) problems.push(`${JSON.stringify(name)} ${bad}`)
168
+ else if (typeof value !== 'string') problems.push(`${JSON.stringify(name)} must be text`)
169
+ }
170
+ return problems
171
+ }
172
+
173
+ // `$NAME`, `${NAME}` and `${NAME<modifier>}`: group 2 is the modifier text.
174
+ const REFERENCE = /\$(?:\{([A-Za-z_][A-Za-z0-9_]*)([^}]*)\}|([A-Za-z_][A-Za-z0-9_]*))/g
175
+
176
+ /**
177
+ * The variables the texts refer to, in order of first appearance. A reference
178
+ * with a default (`${NAME:-x}`, `${NAME-x}`, `${NAME:+x}`, `${NAME=x}`) is
179
+ * left out unless `withDefaults` is set: it works without the variable.
180
+ */
181
+ export function referencedVariables(
182
+ texts: readonly string[],
183
+ options: { readonly withDefaults?: boolean } = {},
184
+ ): string[] {
185
+ const seen = new Set<string>()
186
+ for (const text of texts) {
187
+ for (const match of text.matchAll(REFERENCE)) {
188
+ const name = match[1] ?? match[3]
189
+ if (name === undefined) continue
190
+ const modifier = match[2] ?? ''
191
+ const hasDefault = /^:?[-+=]/.test(modifier)
192
+ if (hasDefault && options.withDefaults !== true) continue
193
+ seen.add(name)
194
+ }
195
+ }
196
+ return [...seen]
197
+ }
198
+
199
+ /**
200
+ * Whether the command text itself gives the variable a value (`NAME=...`,
201
+ * `for NAME in`, `select NAME in`, `read NAME`, `getopts opts NAME`).
202
+ */
203
+ export function assignedWithin(texts: readonly string[], name: string): boolean {
204
+ const assign = new RegExp(`(?<![A-Za-z0-9_$])${name}=`)
205
+ const loop = new RegExp(`\\b(?:for|select)\\s+${name}\\b`)
206
+ const read = new RegExp(`\\bread\\s+(?:-\\w+\\s+)*(?:[A-Za-z_][A-Za-z0-9_]*\\s+)*${name}\\b`)
207
+ const opts = new RegExp(`\\bgetopts\\s+\\S+\\s+${name}\\b`)
208
+ return texts.some(
209
+ (text) => assign.test(text) || loop.test(text) || read.test(text) || opts.test(text),
210
+ )
211
+ }
212
+
213
+ /** Variables a shell sets or keeps for itself; a command that reads one is not missing a value. */
214
+ const SHELL_OWN_VARIABLES: ReadonlySet<string> = new Set([
215
+ 'BASH',
216
+ 'BASHOPTS',
217
+ 'BASHPID',
218
+ 'BASH_ARGC',
219
+ 'BASH_ARGV',
220
+ 'BASH_COMMAND',
221
+ 'BASH_LINENO',
222
+ 'BASH_REMATCH',
223
+ 'BASH_SOURCE',
224
+ 'BASH_SUBSHELL',
225
+ 'BASH_VERSINFO',
226
+ 'BASH_VERSION',
227
+ 'COLUMNS',
228
+ 'EUID',
229
+ 'FUNCNAME',
230
+ 'GROUPS',
231
+ 'HOSTNAME',
232
+ 'HOSTTYPE',
233
+ 'IFS',
234
+ 'LINENO',
235
+ 'LINES',
236
+ 'MACHTYPE',
237
+ 'OLDPWD',
238
+ 'OPTARG',
239
+ 'OPTERR',
240
+ 'OPTIND',
241
+ 'OSTYPE',
242
+ 'PIPESTATUS',
243
+ 'PPID',
244
+ 'PS1',
245
+ 'PS2',
246
+ 'PS4',
247
+ 'PWD',
248
+ 'RANDOM',
249
+ 'REPLY',
250
+ 'SECONDS',
251
+ 'SHELLOPTS',
252
+ 'SHLVL',
253
+ 'UID',
254
+ ])
255
+
256
+ /** Whether the name is one a shell keeps for itself (`RANDOM`, `PPID`, `PWD`, ...). */
257
+ export function isShellOwnVariable(name: string): boolean {
258
+ return SHELL_OWN_VARIABLES.has(name)
259
+ }
260
+
261
+ /** `$NAME` and `${NAME}` in an `env` value become the value the hook already has; any other text stays as written. */
262
+ export function expandHookEnvValue(
263
+ value: string,
264
+ have: Readonly<Record<string, string | undefined>>,
265
+ ): string {
266
+ return value.replace(
267
+ /\$\{([A-Za-z_][A-Za-z0-9_]*)\}|\$([A-Za-z_][A-Za-z0-9_]*)/g,
268
+ (whole: string, braced: string | undefined, bare: string | undefined) => {
269
+ const found = have[(braced ?? bare) as string]
270
+ return found === undefined ? whole : found
271
+ },
272
+ )
273
+ }
274
+
275
+ export interface MovedEnvironment {
276
+ /** The environment to start the command with. */
277
+ readonly env: Record<string, string | undefined>
278
+ /** Variables the command refers to that are set nowhere (and not by the command itself). */
279
+ readonly unset: readonly string[]
280
+ }
281
+
282
+ /**
283
+ * Layer the entry's `env` map and the by-shape variables over `base` (the
284
+ * inherited environment with the kernel's own variables). `kernel` holds the
285
+ * variables the kernel always sets; they are applied last and win.
286
+ */
287
+ export function movedEnvironment(
288
+ entry: { readonly command: string; readonly args?: readonly string[]; readonly env?: unknown },
289
+ base: Readonly<Record<string, string | undefined>>,
290
+ kernel: Readonly<Record<string, string | undefined>>,
291
+ folders: Readonly<Partial<Record<MovedFolder, string>>>,
292
+ ): MovedEnvironment {
293
+ const env: Record<string, string | undefined> = { ...base }
294
+ if (entry.env !== null && typeof entry.env === 'object' && !Array.isArray(entry.env)) {
295
+ for (const [name, value] of Object.entries(entry.env)) {
296
+ if (shellHookEnvNameProblem(name) !== undefined || typeof value !== 'string') continue
297
+ env[name] = expandHookEnvValue(value, base)
298
+ }
299
+ }
300
+ Object.assign(env, kernel)
301
+ const texts = [entry.command, ...(entry.args ?? [])]
302
+ const unset: string[] = []
303
+ for (const name of referencedVariables(texts)) {
304
+ if (env[name] !== undefined) continue
305
+ const folder = movedFolderFor(name, folders)
306
+ if (folder !== undefined) env[name] = folder
307
+ else if (!assignedWithin(texts, name) && !isShellOwnVariable(name)) unset.push(name)
308
+ }
309
+ return { env, unset }
310
+ }
311
+
312
+ /**
313
+ * The sentence added to a hook's failure when it could not find what it ran
314
+ * and its command refers to variables that are set nowhere; `undefined` when
315
+ * the failure does not look like a missing program or file, or nothing is unset.
316
+ */
317
+ export function hookUnsetVariableHint(outcome: {
318
+ readonly exitCode: number | null
319
+ readonly stderr: string
320
+ readonly spawnError?: string
321
+ readonly unsetVariables?: readonly string[]
322
+ }): string | undefined {
323
+ const unset = outcome.unsetVariables ?? []
324
+ if (unset.length === 0) return undefined
325
+ const notFound =
326
+ (outcome.spawnError !== undefined && /ENOENT/.test(outcome.spawnError)) ||
327
+ outcome.exitCode === 127 ||
328
+ /no such file|not found/i.test(outcome.stderr)
329
+ if (!notFound) return undefined
330
+ const shown = unset.slice(0, 3).map((name) => `$${name}`)
331
+ const more = unset.length > 3 ? ` and ${unset.length - 3} more` : ''
332
+ return `its command refers to ${shown.join(', ')}${more}, which ${
333
+ unset.length === 1 ? 'is' : 'are'
334
+ } not set for hooks: give ${unset.length === 1 ? 'it' : 'each'} a value with the entry's "env" key`
335
+ }