@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.
- package/CHANGELOG.md +49 -0
- package/dist/agents/file-definitions.d.ts +10 -0
- package/dist/agents/file-definitions.d.ts.map +1 -1
- package/dist/agents/file-definitions.js +10 -2
- package/dist/agents/file-definitions.js.map +1 -1
- package/dist/plugin/file-change-hooks.d.ts +53 -0
- package/dist/plugin/file-change-hooks.d.ts.map +1 -0
- package/dist/plugin/file-change-hooks.js +111 -0
- package/dist/plugin/file-change-hooks.js.map +1 -0
- package/dist/plugin/file-change-watch.d.ts +111 -0
- package/dist/plugin/file-change-watch.d.ts.map +1 -0
- package/dist/plugin/file-change-watch.js +324 -0
- package/dist/plugin/file-change-watch.js.map +1 -0
- package/dist/plugin/index.d.ts +10 -1
- package/dist/plugin/index.d.ts.map +1 -1
- package/dist/plugin/index.js +7 -1
- package/dist/plugin/index.js.map +1 -1
- package/dist/plugin/lifecycle.d.ts +60 -1
- package/dist/plugin/lifecycle.d.ts.map +1 -1
- package/dist/plugin/lifecycle.js +118 -7
- package/dist/plugin/lifecycle.js.map +1 -1
- package/dist/plugin/loader.d.ts.map +1 -1
- package/dist/plugin/loader.js +24 -1
- package/dist/plugin/loader.js.map +1 -1
- package/dist/plugin/session-hook-env.d.ts +140 -0
- package/dist/plugin/session-hook-env.d.ts.map +1 -0
- package/dist/plugin/session-hook-env.js +458 -0
- package/dist/plugin/session-hook-env.js.map +1 -0
- package/dist/plugin/shell-hook-env.d.ts +107 -0
- package/dist/plugin/shell-hook-env.d.ts.map +1 -0
- package/dist/plugin/shell-hook-env.js +272 -0
- package/dist/plugin/shell-hook-env.js.map +1 -0
- package/dist/plugin/shell-hook.d.ts +105 -2
- package/dist/plugin/shell-hook.d.ts.map +1 -1
- package/dist/plugin/shell-hook.js +282 -24
- package/dist/plugin/shell-hook.js.map +1 -1
- package/dist/plugin/worktree-hook-answer.d.ts +26 -0
- package/dist/plugin/worktree-hook-answer.d.ts.map +1 -0
- package/dist/plugin/worktree-hook-answer.js +132 -0
- package/dist/plugin/worktree-hook-answer.js.map +1 -0
- package/dist/public-runtime.d.ts +4 -4
- package/dist/public-runtime.d.ts.map +1 -1
- package/dist/public-runtime.js +4 -4
- package/dist/public-runtime.js.map +1 -1
- package/dist/public-types.d.ts +7 -1
- package/dist/public-types.d.ts.map +1 -1
- package/dist/runtime/query/executor.d.ts +8 -1
- package/dist/runtime/query/executor.d.ts.map +1 -1
- package/dist/runtime/query/executor.js +4 -0
- package/dist/runtime/query/executor.js.map +1 -1
- package/dist/runtime/query/index.d.ts +9 -0
- package/dist/runtime/query/index.d.ts.map +1 -1
- package/dist/runtime/query/index.js +20 -0
- package/dist/runtime/query/index.js.map +1 -1
- package/dist/runtime/query/tooling.d.ts +8 -1
- package/dist/runtime/query/tooling.d.ts.map +1 -1
- package/dist/runtime/query/tooling.js +6 -0
- package/dist/runtime/query/tooling.js.map +1 -1
- package/dist/session/workspace/hooked-driver.d.ts +72 -0
- package/dist/session/workspace/hooked-driver.d.ts.map +1 -0
- package/dist/session/workspace/hooked-driver.js +204 -0
- package/dist/session/workspace/hooked-driver.js.map +1 -0
- package/dist/session/workspace/index.d.ts +2 -0
- package/dist/session/workspace/index.d.ts.map +1 -1
- package/dist/session/workspace/index.js +1 -0
- package/dist/session/workspace/index.js.map +1 -1
- package/dist/skills/index.d.ts +1 -1
- package/dist/skills/index.d.ts.map +1 -1
- package/dist/skills/index.js +1 -1
- package/dist/skills/index.js.map +1 -1
- package/dist/skills/loader.d.ts +22 -0
- package/dist/skills/loader.d.ts.map +1 -1
- package/dist/skills/loader.js +41 -0
- package/dist/skills/loader.js.map +1 -1
- package/dist/tools/builtins/bash-cwd.d.ts +6 -1
- package/dist/tools/builtins/bash-cwd.d.ts.map +1 -1
- package/dist/tools/builtins/bash-cwd.js +27 -2
- package/dist/tools/builtins/bash-cwd.js.map +1 -1
- package/dist/tools/builtins/bash.js +1 -1
- package/dist/tools/builtins/bash.js.map +1 -1
- package/dist/tools/builtins/skill.d.ts.map +1 -1
- package/dist/tools/builtins/skill.js +114 -17
- package/dist/tools/builtins/skill.js.map +1 -1
- package/dist/types/plugin/index.d.ts +75 -2
- package/dist/types/plugin/index.d.ts.map +1 -1
- package/dist/types/plugin/index.js +5 -0
- package/dist/types/plugin/index.js.map +1 -1
- package/dist/types/session/records.d.ts +73 -1
- package/dist/types/session/records.d.ts.map +1 -1
- package/dist/types/session/records.js +25 -0
- package/dist/types/session/records.js.map +1 -1
- package/dist/types/skills/index.d.ts +8 -0
- package/dist/types/skills/index.d.ts.map +1 -1
- package/dist/types/skills/index.js.map +1 -1
- package/dist/types/tool/index.d.ts +97 -0
- package/dist/types/tool/index.d.ts.map +1 -1
- package/dist/types/tool/index.js.map +1 -1
- package/dist/types/workspace/ref.d.ts +6 -0
- package/dist/types/workspace/ref.d.ts.map +1 -1
- package/dist/utils/frontmatter.d.ts +16 -0
- package/dist/utils/frontmatter.d.ts.map +1 -1
- package/dist/utils/frontmatter.js +31 -1
- package/dist/utils/frontmatter.js.map +1 -1
- package/package.json +1 -1
- package/src/agents/file-definitions.ts +17 -2
- package/src/plugin/file-change-hooks.ts +131 -0
- package/src/plugin/file-change-watch.ts +367 -0
- package/src/plugin/index.ts +39 -1
- package/src/plugin/lifecycle.ts +162 -8
- package/src/plugin/loader.ts +22 -1
- package/src/plugin/session-hook-env.ts +475 -0
- package/src/plugin/shell-hook-env.ts +335 -0
- package/src/plugin/shell-hook.ts +416 -24
- package/src/plugin/worktree-hook-answer.ts +142 -0
- package/src/public-runtime.ts +33 -0
- package/src/public-types.ts +20 -1
- package/src/runtime/query/executor.ts +12 -0
- package/src/runtime/query/index.ts +28 -0
- package/src/runtime/query/tooling.ts +19 -1
- package/src/session/workspace/hooked-driver.ts +272 -0
- package/src/session/workspace/index.ts +7 -0
- package/src/skills/index.ts +3 -0
- package/src/skills/loader.ts +47 -0
- package/src/tools/builtins/bash-cwd.ts +25 -1
- package/src/tools/builtins/bash.ts +1 -1
- package/src/tools/builtins/skill.ts +138 -27
- package/src/types/plugin/index.ts +84 -1
- package/src/types/session/records.ts +28 -0
- package/src/types/skills/index.ts +9 -0
- package/src/types/tool/index.ts +105 -0
- package/src/types/workspace/ref.ts +6 -0
- package/src/utils/frontmatter.ts +52 -1
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Watching the files hooks asked about, and nothing else.
|
|
3
|
+
*
|
|
4
|
+
* A `file_changed` hook names the files it cares about in its matcher
|
|
5
|
+
* (`.envrc|package.json`), and may hand back more (`watchPaths`). This file
|
|
6
|
+
* turns those paths into events. No watcher exists until a path is given, and
|
|
7
|
+
* `setPaths([])` closes them all.
|
|
8
|
+
*
|
|
9
|
+
* ## How
|
|
10
|
+
*
|
|
11
|
+
* The platform's own `fs.watch`, on the folder that holds each file rather
|
|
12
|
+
* than on the file: an editor that saves by writing a new file and renaming
|
|
13
|
+
* it over the old one would leave a watch on the file pointing at a file that
|
|
14
|
+
* is gone, and a watch on a folder also sees a file appear and disappear.
|
|
15
|
+
* One watch serves every file in a folder.
|
|
16
|
+
*
|
|
17
|
+
* ## Settling
|
|
18
|
+
*
|
|
19
|
+
* What the platform reports is noisy: an editor's save is several events, and
|
|
20
|
+
* the names differ between systems. Every event for a watched file only
|
|
21
|
+
* restarts a timer; when the file has been still for `settleMs` (half a
|
|
22
|
+
* second) the file is looked at once, and the event is `add` (it did not exist
|
|
23
|
+
* and does now), `unlink` (it did and does not) or `change` (it exists, and
|
|
24
|
+
* did). A file that did not exist before and does not now is no event.
|
|
25
|
+
*
|
|
26
|
+
* ## Limits
|
|
27
|
+
*
|
|
28
|
+
* At most {@link MAX_WATCHED_PATHS} files are watched. A longer list is cut
|
|
29
|
+
* (the first ones are kept, in the order given) and the cut is reported once.
|
|
30
|
+
* A watch that cannot be started or breaks (the folder does not exist, no
|
|
31
|
+
* permission, the system's watch limit) is reported once for that folder and
|
|
32
|
+
* the others carry on; the watch is not retried until the list is set again.
|
|
33
|
+
* Watches never keep the process alive.
|
|
34
|
+
*/
|
|
35
|
+
import { statSync, watch } from 'node:fs';
|
|
36
|
+
import { basename, dirname, isAbsolute, resolve } from 'node:path';
|
|
37
|
+
/** The most files watched at once, matcher paths and handed-back paths together. */
|
|
38
|
+
export const MAX_WATCHED_PATHS = 64;
|
|
39
|
+
/** How long a file must be still before its change is reported, in milliseconds. */
|
|
40
|
+
export const FILE_SETTLE_MS = 500;
|
|
41
|
+
const defaultWatchDirectory = (directory, listener, onError) => {
|
|
42
|
+
const watcher = watch(directory, { persistent: false }, (_type, name) => {
|
|
43
|
+
listener(name === null || name === undefined ? null : String(name));
|
|
44
|
+
});
|
|
45
|
+
watcher.on('error', onError);
|
|
46
|
+
return watcher;
|
|
47
|
+
};
|
|
48
|
+
const defaultExists = (path) => {
|
|
49
|
+
try {
|
|
50
|
+
statSync(path);
|
|
51
|
+
return true;
|
|
52
|
+
}
|
|
53
|
+
catch {
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
const defaultSignature = (path) => {
|
|
58
|
+
try {
|
|
59
|
+
const stat = statSync(path);
|
|
60
|
+
return `${stat.ino}:${stat.size}:${stat.mtimeMs}`;
|
|
61
|
+
}
|
|
62
|
+
catch {
|
|
63
|
+
return 'absent';
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
/** The case-insensitive file systems compare names without regard to case. */
|
|
67
|
+
const FOLDS_CASE = process.platform === 'win32' || process.platform === 'darwin';
|
|
68
|
+
const fold = (name) => (FOLDS_CASE ? name.toLowerCase() : name);
|
|
69
|
+
export class FileChangeWatcher {
|
|
70
|
+
options;
|
|
71
|
+
files = new Map();
|
|
72
|
+
folders = new Map();
|
|
73
|
+
failed = new Set();
|
|
74
|
+
/** Folders that did not exist when asked for, each with a watch on the nearest folder that does. */
|
|
75
|
+
waiting = new Map();
|
|
76
|
+
reported = new Set();
|
|
77
|
+
closed = false;
|
|
78
|
+
constructor(options) {
|
|
79
|
+
this.options = options;
|
|
80
|
+
}
|
|
81
|
+
/** The files watched now, absolute. */
|
|
82
|
+
get watching() {
|
|
83
|
+
return [...this.files.keys()];
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Watch exactly these files from now on. A relative path is under `base`.
|
|
87
|
+
* A file already watched keeps its state; one no longer named is let go.
|
|
88
|
+
*/
|
|
89
|
+
setPaths(paths, base) {
|
|
90
|
+
if (this.closed)
|
|
91
|
+
return;
|
|
92
|
+
const limit = this.options.maxPaths ?? MAX_WATCHED_PATHS;
|
|
93
|
+
const wanted = [];
|
|
94
|
+
for (const path of paths) {
|
|
95
|
+
const absolute = isAbsolute(path) ? resolve(path) : resolve(base, path);
|
|
96
|
+
if (!wanted.includes(absolute))
|
|
97
|
+
wanted.push(absolute);
|
|
98
|
+
}
|
|
99
|
+
if (wanted.length > limit) {
|
|
100
|
+
this.report(`Hooks asked to watch ${wanted.length} files; only the first ${limit} are watched.`);
|
|
101
|
+
wanted.length = limit;
|
|
102
|
+
}
|
|
103
|
+
const exists = this.options.exists ?? defaultExists;
|
|
104
|
+
for (const [path, state] of this.files) {
|
|
105
|
+
if (wanted.includes(path))
|
|
106
|
+
continue;
|
|
107
|
+
if (state.timer !== undefined)
|
|
108
|
+
clearTimeout(state.timer);
|
|
109
|
+
this.files.delete(path);
|
|
110
|
+
}
|
|
111
|
+
for (const path of wanted) {
|
|
112
|
+
if (!this.files.has(path)) {
|
|
113
|
+
this.files.set(path, {
|
|
114
|
+
existed: exists(path),
|
|
115
|
+
timer: undefined,
|
|
116
|
+
holding: 0,
|
|
117
|
+
acknowledged: undefined,
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
const folders = new Set(wanted.map((path) => dirname(path)));
|
|
122
|
+
for (const [folder, handle] of this.folders) {
|
|
123
|
+
if (folders.has(folder))
|
|
124
|
+
continue;
|
|
125
|
+
handle.close();
|
|
126
|
+
this.folders.delete(folder);
|
|
127
|
+
}
|
|
128
|
+
for (const [folder] of this.waiting) {
|
|
129
|
+
if (!folders.has(folder))
|
|
130
|
+
this.stopWaiting(folder);
|
|
131
|
+
}
|
|
132
|
+
this.failed.clear();
|
|
133
|
+
for (const folder of folders) {
|
|
134
|
+
if (!this.folders.has(folder) && !this.waiting.has(folder))
|
|
135
|
+
this.start(folder);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* A hook run for `path` begins: what it writes to that file is its own, not
|
|
140
|
+
* a change to report. Paired with {@link release}.
|
|
141
|
+
*/
|
|
142
|
+
hold(path) {
|
|
143
|
+
const state = this.files.get(path);
|
|
144
|
+
if (state === undefined)
|
|
145
|
+
return;
|
|
146
|
+
state.holding += 1;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* The hook run for `path` ended. The file as it is now is what that run
|
|
150
|
+
* left, so a settle that finds it unchanged is the run's own write and
|
|
151
|
+
* reports nothing; a change by anyone after this moment is reported.
|
|
152
|
+
*/
|
|
153
|
+
release(path) {
|
|
154
|
+
const state = this.files.get(path);
|
|
155
|
+
if (state === undefined)
|
|
156
|
+
return;
|
|
157
|
+
state.holding = Math.max(0, state.holding - 1);
|
|
158
|
+
if (state.holding > 0)
|
|
159
|
+
return;
|
|
160
|
+
state.acknowledged = (this.options.signature ?? this.defaultSignatureFor())(path);
|
|
161
|
+
state.existed = (this.options.exists ?? defaultExists)(path);
|
|
162
|
+
}
|
|
163
|
+
defaultSignatureFor() {
|
|
164
|
+
const exists = this.options.exists;
|
|
165
|
+
return exists === undefined
|
|
166
|
+
? defaultSignature
|
|
167
|
+
: (path) => (exists(path) ? `present:${path}` : 'absent');
|
|
168
|
+
}
|
|
169
|
+
close() {
|
|
170
|
+
this.closed = true;
|
|
171
|
+
for (const state of this.files.values()) {
|
|
172
|
+
if (state.timer !== undefined)
|
|
173
|
+
clearTimeout(state.timer);
|
|
174
|
+
}
|
|
175
|
+
this.files.clear();
|
|
176
|
+
for (const handle of this.folders.values())
|
|
177
|
+
handle.close();
|
|
178
|
+
this.folders.clear();
|
|
179
|
+
for (const [folder] of [...this.waiting])
|
|
180
|
+
this.stopWaiting(folder);
|
|
181
|
+
}
|
|
182
|
+
report(message) {
|
|
183
|
+
if (this.reported.has(message))
|
|
184
|
+
return;
|
|
185
|
+
this.reported.add(message);
|
|
186
|
+
this.options.onProblem?.(message);
|
|
187
|
+
}
|
|
188
|
+
start(folder) {
|
|
189
|
+
const watchDirectory = this.options.watchDirectory ?? defaultWatchDirectory;
|
|
190
|
+
try {
|
|
191
|
+
const handle = watchDirectory(folder, (name) => this.touched(folder, name), (error) => {
|
|
192
|
+
this.drop(folder);
|
|
193
|
+
this.report(`Watching files in ${folder} stopped: ${error.message}.`);
|
|
194
|
+
});
|
|
195
|
+
this.folders.set(folder, handle);
|
|
196
|
+
}
|
|
197
|
+
catch (error) {
|
|
198
|
+
this.failed.add(folder);
|
|
199
|
+
const reason = error instanceof Error ? error.message : String(error);
|
|
200
|
+
const missing = /ENOENT/.test(reason);
|
|
201
|
+
this.report(`Files in ${folder} cannot be watched${missing ? ' yet' : ''} (${reason})${missing ? '; they are watched once the folder exists' : ''}.`);
|
|
202
|
+
if (missing)
|
|
203
|
+
this.waitFor(folder);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* A folder that does not exist yet: watch the nearest one that does, and
|
|
208
|
+
* try the folder again whenever something happens there. When the folder
|
|
209
|
+
* appears its files are looked at, so a file made right after it is seen.
|
|
210
|
+
*/
|
|
211
|
+
waitFor(folder) {
|
|
212
|
+
this.stopWaiting(folder);
|
|
213
|
+
const watchDirectory = this.options.watchDirectory ?? defaultWatchDirectory;
|
|
214
|
+
let handle;
|
|
215
|
+
let ancestor = dirname(folder);
|
|
216
|
+
while (handle === undefined && ancestor !== folder) {
|
|
217
|
+
try {
|
|
218
|
+
handle = watchDirectory(ancestor, () => this.retry(folder), () => undefined);
|
|
219
|
+
}
|
|
220
|
+
catch {
|
|
221
|
+
const up = dirname(ancestor);
|
|
222
|
+
if (up === ancestor)
|
|
223
|
+
break;
|
|
224
|
+
ancestor = up;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
this.waiting.set(folder, handle);
|
|
228
|
+
}
|
|
229
|
+
stopWaiting(folder) {
|
|
230
|
+
const handle = this.waiting.get(folder);
|
|
231
|
+
this.waiting.delete(folder);
|
|
232
|
+
try {
|
|
233
|
+
handle?.close();
|
|
234
|
+
}
|
|
235
|
+
catch {
|
|
236
|
+
// Already closed.
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
retry(folder) {
|
|
240
|
+
if (this.closed || !this.waiting.has(folder))
|
|
241
|
+
return;
|
|
242
|
+
const watchDirectory = this.options.watchDirectory ?? defaultWatchDirectory;
|
|
243
|
+
let handle;
|
|
244
|
+
try {
|
|
245
|
+
handle = watchDirectory(folder, (name) => this.touched(folder, name), (error) => {
|
|
246
|
+
this.drop(folder);
|
|
247
|
+
this.report(`Watching files in ${folder} stopped: ${error.message}.`);
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
catch {
|
|
251
|
+
// Not there yet: move the watch down to the nearest folder that exists now.
|
|
252
|
+
this.waitFor(folder);
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
255
|
+
this.stopWaiting(folder);
|
|
256
|
+
this.folders.set(folder, handle);
|
|
257
|
+
for (const path of this.files.keys()) {
|
|
258
|
+
if (dirname(path) === folder)
|
|
259
|
+
this.schedule(path);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
drop(folder) {
|
|
263
|
+
const handle = this.folders.get(folder);
|
|
264
|
+
this.folders.delete(folder);
|
|
265
|
+
try {
|
|
266
|
+
handle?.close();
|
|
267
|
+
}
|
|
268
|
+
catch {
|
|
269
|
+
// Already closed by the error that brought us here.
|
|
270
|
+
}
|
|
271
|
+
this.failed.add(folder);
|
|
272
|
+
}
|
|
273
|
+
/** An event in `folder`: for one name, or for every file in it when the system gave no name. */
|
|
274
|
+
touched(folder, name) {
|
|
275
|
+
if (this.closed)
|
|
276
|
+
return;
|
|
277
|
+
for (const path of this.files.keys()) {
|
|
278
|
+
if (dirname(path) !== folder)
|
|
279
|
+
continue;
|
|
280
|
+
if (name !== null && fold(basename(path)) !== fold(name))
|
|
281
|
+
continue;
|
|
282
|
+
this.schedule(path);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
schedule(path) {
|
|
286
|
+
const state = this.files.get(path);
|
|
287
|
+
if (state === undefined)
|
|
288
|
+
return;
|
|
289
|
+
if (state.timer !== undefined)
|
|
290
|
+
clearTimeout(state.timer);
|
|
291
|
+
const timer = setTimeout(() => this.settle(path), this.options.settleMs ?? FILE_SETTLE_MS);
|
|
292
|
+
timer.unref?.();
|
|
293
|
+
state.timer = timer;
|
|
294
|
+
}
|
|
295
|
+
settle(path) {
|
|
296
|
+
const state = this.files.get(path);
|
|
297
|
+
if (state === undefined || this.closed)
|
|
298
|
+
return;
|
|
299
|
+
state.timer = undefined;
|
|
300
|
+
// A hook run for this file is under way: whatever it writes is its own.
|
|
301
|
+
// `release` looks at the file when the run ends.
|
|
302
|
+
if (state.holding > 0)
|
|
303
|
+
return;
|
|
304
|
+
const exists = (this.options.exists ?? defaultExists)(path);
|
|
305
|
+
const before = state.existed;
|
|
306
|
+
state.existed = exists;
|
|
307
|
+
if (state.acknowledged !== undefined) {
|
|
308
|
+
const now = (this.options.signature ?? this.defaultSignatureFor())(path);
|
|
309
|
+
if (now === state.acknowledged)
|
|
310
|
+
return;
|
|
311
|
+
state.acknowledged = undefined;
|
|
312
|
+
}
|
|
313
|
+
const change = before && exists
|
|
314
|
+
? 'change'
|
|
315
|
+
: !before && exists
|
|
316
|
+
? 'add'
|
|
317
|
+
: before && !exists
|
|
318
|
+
? 'unlink'
|
|
319
|
+
: undefined;
|
|
320
|
+
if (change !== undefined)
|
|
321
|
+
this.options.onChange({ path, change });
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
//# sourceMappingURL=file-change-watch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-change-watch.js","sourceRoot":"","sources":["../../src/plugin/file-change-watch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,EAAkB,QAAQ,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AACzD,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAIlE,oFAAoF;AACpF,MAAM,CAAC,MAAM,iBAAiB,GAAG,EAAE,CAAA;AACnC,oFAAoF;AACpF,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAA;AAgCjC,MAAM,qBAAqB,GAAmB,CAAC,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE;IAC9E,MAAM,OAAO,GAAc,KAAK,CAAC,SAAS,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;QAClF,QAAQ,CAAC,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAA;IACpE,CAAC,CAAC,CAAA;IACF,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;IAC5B,OAAO,OAAO,CAAA;AACf,CAAC,CAAA;AAED,MAAM,aAAa,GAAG,CAAC,IAAY,EAAW,EAAE;IAC/C,IAAI,CAAC;QACJ,QAAQ,CAAC,IAAI,CAAC,CAAA;QACd,OAAO,IAAI,CAAA;IACZ,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,KAAK,CAAA;IACb,CAAC;AACF,CAAC,CAAA;AAED,MAAM,gBAAgB,GAAG,CAAC,IAAY,EAAU,EAAE;IACjD,IAAI,CAAC;QACJ,MAAM,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AG,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,IAAI,aAAa,CAAC,CAAC,IAAI,CAAC,CAAA;QAC3D,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAA;QAC5B,KAAK,CAAC,OAAO,GAAG,MAAM,CAAA;QACtB,IAAI,KAAK,CAAC,YAAY,KAAK,SAAS,EAAE,CAAC;YACtC,MAAM,GAAG,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,IAAI,IAAI,CAAC,mBAAmB,EAAE,CAAC,CAAC,IAAI,CAAC,CAAA;YACxE,IAAI,GAAG,KAAK,KAAK,CAAC,YAAY;gBAAE,OAAM;YACtC,KAAK,CAAC,YAAY,GAAG,SAAS,CAAA;QAC/B,CAAC;QACD,MAAM,MAAM,GACX,MAAM,IAAI,MAAM;YACf,CAAC,CAAC,QAAQ;YACV,CAAC,CAAC,CAAC,MAAM,IAAI,MAAM;gBAClB,CAAC,CAAC,KAAK;gBACP,CAAC,CAAC,MAAM,IAAI,CAAC,MAAM;oBAClB,CAAC,CAAC,QAAQ;oBACV,CAAC,CAAC,SAAS,CAAA;QACf,IAAI,MAAM,KAAK,SAAS;YAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAA;IAClE,CAAC;CACD"}
|
package/dist/plugin/index.d.ts
CHANGED
|
@@ -3,9 +3,18 @@ export { definePlugin } from './define.js';
|
|
|
3
3
|
export type { DefinedPlugin, DefinePluginOptions } from './define.js';
|
|
4
4
|
export type { PluginDiscoveryOptions, PluginEnablementCapabilities } from './loader.js';
|
|
5
5
|
export { boundCompactionSummary, boundHookContext, boundHookReplacement, boundLastAssistantMessage, compactionHookInstructions, frameOperatorHookContext, MAX_COMPACTION_SUMMARY_HOOK_CHARS, MAX_HOOK_CONTEXT_CHARS, MAX_HOOK_REPLACEMENT_CHARS, MAX_LAST_MESSAGE_HOOK_CHARS, sessionStartHookContext, } from './hook-context.js';
|
|
6
|
-
export { PluginLifecycleManager } from './lifecycle.js';
|
|
6
|
+
export { isHookEntriesPath, PluginLifecycleManager } from './lifecycle.js';
|
|
7
7
|
export { PluginResolver } from './resolver.js';
|
|
8
8
|
export { attachShellHooks, createShellHook, DEFAULT_SHELL_HOOK_TIMEOUT_MS, MAX_SHELL_HOOK_TIMEOUT_MS, runShellHook, SHELL_HOOK_EVENTS, SHELL_HOOK_PASCAL_EVENT_NAMES, SHELL_HOOKS_PLUGIN_ID, shellHookIfMatches, shellHookIfProblem, shellHookMatcherProblem, shellHookMatches, shellHookVerdict, } from './shell-hook.js';
|
|
9
|
+
export { assignedWithin, isPluginFolderVariable, isShellOwnVariable, MOVED_FOLDER_ENDINGS, referencedVariables, SHELL_HOOK_RESERVED_ENV, shellHookEnvNameProblem, shellHookEnvProblems, substitutePluginFolders, } from './shell-hook-env.js';
|
|
9
10
|
export { SHELL_HOOK_WRITTEN_TOOL_NAMES, type ShellHookToolNames, shellHookToolName, } from './shell-hook-tool-names.js';
|
|
10
11
|
export type { HttpHookEntry, PromptHookEntry, ShellHookEntry, ShellHookEvent, ShellHookHandler, ShellHookJudge, ShellHookOnFailure, ShellHookCall, ShellHookInput, ShellHookOptions, ShellHookPathFilter, ShellHookOutcome, ShellHooksConfig, } from './shell-hook.js';
|
|
12
|
+
export { fileChangedMatcherNote, fileChangedMatcherPaths, fileChangedMatches, } from './shell-hook.js';
|
|
13
|
+
export { HOOK_ENV_EVENTS, MAX_HOOK_ENV_FILE_BYTES, MAX_HOOK_ENV_VALUE_CHARS, MAX_HOOK_ENV_VARIABLES, refusedHookEnvName, SessionHookEnv, } from './session-hook-env.js';
|
|
14
|
+
export type { HookEnvEvent, SessionHookEnvOptions } from './session-hook-env.js';
|
|
15
|
+
export { FILE_SETTLE_MS, FileChangeWatcher, MAX_WATCHED_PATHS } from './file-change-watch.js';
|
|
16
|
+
export type { FileChange, FileChangeWatcherOptions, WatchDirectory, } from './file-change-watch.js';
|
|
17
|
+
export { FileChangeHooks } from './file-change-hooks.js';
|
|
18
|
+
export type { FileChangeHooksOptions } from './file-change-hooks.js';
|
|
19
|
+
export { WORKTREE_HOOK_SHOWN_CHARS, worktreeHookPrinted, worktreeHookVerdict, } from './worktree-hook-answer.js';
|
|
11
20
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,qBAAqB,EACrB,uBAAuB,GACvB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC1C,YAAY,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AACrE,YAAY,EAAE,sBAAsB,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAA;AACvF,OAAO,EACN,sBAAsB,EACtB,gBAAgB,EAChB,oBAAoB,EACpB,yBAAyB,EACzB,0BAA0B,EAC1B,wBAAwB,EACxB,iCAAiC,EACjC,sBAAsB,EACtB,0BAA0B,EAC1B,2BAA2B,EAC3B,uBAAuB,GACvB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,qBAAqB,EACrB,uBAAuB,GACvB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC1C,YAAY,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AACrE,YAAY,EAAE,sBAAsB,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAA;AACvF,OAAO,EACN,sBAAsB,EACtB,gBAAgB,EAChB,oBA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AAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC7F,YAAY,EACX,UAAU,EACV,wBAAwB,EACxB,cAAc,GACd,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,YAAY,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AACpE,OAAO,EACN,yBAAyB,EACzB,mBAAmB,EACnB,mBAAmB,GACnB,MAAM,2BAA2B,CAAA"}
|
package/dist/plugin/index.js
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
export { assertEnableable, discoverPlugins, loadPluginManifest, discoverAllPluginDirs, parsePluginManifestText, } from './loader.js';
|
|
2
2
|
export { definePlugin } from './define.js';
|
|
3
3
|
export { boundCompactionSummary, boundHookContext, boundHookReplacement, boundLastAssistantMessage, compactionHookInstructions, frameOperatorHookContext, MAX_COMPACTION_SUMMARY_HOOK_CHARS, MAX_HOOK_CONTEXT_CHARS, MAX_HOOK_REPLACEMENT_CHARS, MAX_LAST_MESSAGE_HOOK_CHARS, sessionStartHookContext, } from './hook-context.js';
|
|
4
|
-
export { PluginLifecycleManager } from './lifecycle.js';
|
|
4
|
+
export { isHookEntriesPath, PluginLifecycleManager } from './lifecycle.js';
|
|
5
5
|
export { PluginResolver } from './resolver.js';
|
|
6
6
|
export { attachShellHooks, createShellHook, DEFAULT_SHELL_HOOK_TIMEOUT_MS, MAX_SHELL_HOOK_TIMEOUT_MS, runShellHook, SHELL_HOOK_EVENTS, SHELL_HOOK_PASCAL_EVENT_NAMES, SHELL_HOOKS_PLUGIN_ID, shellHookIfMatches, shellHookIfProblem, shellHookMatcherProblem, shellHookMatches, shellHookVerdict, } from './shell-hook.js';
|
|
7
|
+
export { assignedWithin, isPluginFolderVariable, isShellOwnVariable, MOVED_FOLDER_ENDINGS, referencedVariables, SHELL_HOOK_RESERVED_ENV, shellHookEnvNameProblem, shellHookEnvProblems, substitutePluginFolders, } from './shell-hook-env.js';
|
|
7
8
|
export { SHELL_HOOK_WRITTEN_TOOL_NAMES, shellHookToolName, } from './shell-hook-tool-names.js';
|
|
9
|
+
export { fileChangedMatcherNote, fileChangedMatcherPaths, fileChangedMatches, } from './shell-hook.js';
|
|
10
|
+
export { HOOK_ENV_EVENTS, MAX_HOOK_ENV_FILE_BYTES, MAX_HOOK_ENV_VALUE_CHARS, MAX_HOOK_ENV_VARIABLES, refusedHookEnvName, SessionHookEnv, } from './session-hook-env.js';
|
|
11
|
+
export { FILE_SETTLE_MS, FileChangeWatcher, MAX_WATCHED_PATHS } from './file-change-watch.js';
|
|
12
|
+
export { FileChangeHooks } from './file-change-hooks.js';
|
|
13
|
+
export { WORKTREE_HOOK_SHOWN_CHARS, worktreeHookPrinted, worktreeHookVerdict, } from './worktree-hook-answer.js';
|
|
8
14
|
//# sourceMappingURL=index.js.map
|
package/dist/plugin/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/plugin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,qBAAqB,EACrB,uBAAuB,GACvB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAG1C,OAAO,EACN,sBAAsB,EACtB,gBAAgB,EAChB,oBAAoB,EACpB,yBAAyB,EACzB,0BAA0B,EAC1B,wBAAwB,EACxB,iCAAiC,EACjC,sBAAsB,EACtB,0BAA0B,EAC1B,2BAA2B,EAC3B,uBAAuB,GACvB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/plugin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,qBAAqB,EACrB,uBAAuB,GACvB,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MAAM,2BAA2B,CAAA"}
|
|
@@ -6,10 +6,12 @@ import type { PluginRegistry } from '../registry/plugin/index.js';
|
|
|
6
6
|
import type { SkillRegistry } from '../skills/registry.js';
|
|
7
7
|
import type { Toolset } from '../toolsets/types.js';
|
|
8
8
|
import type { PluginId } from '../types/ids/index.js';
|
|
9
|
-
import type { PluginDefinition, PluginEventListener, PluginHookContext, PluginHookDefinition, PluginHookEvent, PluginHookResult, PluginScope } from '../types/plugin/index.js';
|
|
9
|
+
import type { PluginDefinition, PluginEventListener, PluginHookContext, PluginHookDefinition, PluginHookEvent, PluginHookResult, PluginManifest, PluginScope } from '../types/plugin/index.js';
|
|
10
10
|
import type { SessionEvent } from '../types/session/index.js';
|
|
11
11
|
import type { Logger } from '../utils/logger.js';
|
|
12
12
|
import { type DefinedPlugin } from './define.js';
|
|
13
|
+
/** A manifest `hooks` path that names a file of hook entries (not a module). */
|
|
14
|
+
export declare function isHookEntriesPath(path: string): boolean;
|
|
13
15
|
export interface PluginLifecycleManagerConfig {
|
|
14
16
|
pluginRegistry: PluginRegistry;
|
|
15
17
|
/**
|
|
@@ -34,6 +36,20 @@ export interface PluginLifecycleManagerConfig {
|
|
|
34
36
|
skillRegistry?: SkillRegistry;
|
|
35
37
|
log: Logger;
|
|
36
38
|
hookTimeoutMs?: number;
|
|
39
|
+
/**
|
|
40
|
+
* Hooks a host reads for a plugin when it is enabled, beyond the JavaScript
|
|
41
|
+
* modules its manifest lists (shell, http and prompt entries a plugin ships,
|
|
42
|
+
* for one). They are attached under the plugin's id the moment it is
|
|
43
|
+
* enabled and removed with its other hooks when it is disabled, uninstalled
|
|
44
|
+
* or its enable is rolled back, so they live exactly as long as the plugin
|
|
45
|
+
* is on. Not called for a plugin defined in code. A throw fails the enable.
|
|
46
|
+
*/
|
|
47
|
+
hooksFor?: (plugin: {
|
|
48
|
+
readonly id: PluginId;
|
|
49
|
+
readonly manifest: PluginManifest;
|
|
50
|
+
readonly rootDir: string;
|
|
51
|
+
readonly scope: PluginScope;
|
|
52
|
+
}) => readonly PluginHookDefinition[] | Promise<readonly PluginHookDefinition[]>;
|
|
37
53
|
/**
|
|
38
54
|
* Where each MCP server's reconnect policy is registered, so an operator
|
|
39
55
|
* can retune it while a turn is live.
|
|
@@ -69,6 +85,18 @@ export interface PluginLifecycleManagerConfig {
|
|
|
69
85
|
*/
|
|
70
86
|
onMCPToolDrift?: MCPToolDiscoveryOptions['onDrift'];
|
|
71
87
|
}
|
|
88
|
+
/**
|
|
89
|
+
* What {@link PluginLifecycleManager.attachHooks} gives back: a way to take
|
|
90
|
+
* off exactly the hooks that call attached.
|
|
91
|
+
*/
|
|
92
|
+
export interface HookAttachment {
|
|
93
|
+
/** How many hooks the call attached. */
|
|
94
|
+
readonly size: number;
|
|
95
|
+
/** Take every hook of this attachment off; returns how many were still attached. Safe to call again. */
|
|
96
|
+
readonly remove: () => number;
|
|
97
|
+
/** Take off the hook at this position of the call's list; false when it is gone already or there is none. */
|
|
98
|
+
readonly removeAt: (index: number) => boolean;
|
|
99
|
+
}
|
|
72
100
|
export declare class PluginLifecycleManager {
|
|
73
101
|
private pluginRegistry;
|
|
74
102
|
/** Each installed plugin owns its own file source and one source per MCP server. */
|
|
@@ -80,12 +108,15 @@ export declare class PluginLifecycleManager {
|
|
|
80
108
|
private readonly toolsetChangeListeners;
|
|
81
109
|
private listeners;
|
|
82
110
|
private hookHandlers;
|
|
111
|
+
private hookSeq;
|
|
112
|
+
private readonly hooksChangedListeners;
|
|
83
113
|
private pluginContributions;
|
|
84
114
|
/** Reserve each id before async admission so lifecycle calls cannot overlap. */
|
|
85
115
|
private readonly lifecycleTails;
|
|
86
116
|
/** Immutable executable admissions owned by this manager, never by the mutable registry. */
|
|
87
117
|
private pluginAdmissions;
|
|
88
118
|
private hookTimeoutMs;
|
|
119
|
+
private readonly hooksFor;
|
|
89
120
|
private readonly configRegistry;
|
|
90
121
|
private readonly scopeRoots;
|
|
91
122
|
private log;
|
|
@@ -132,6 +163,30 @@ export declare class PluginLifecycleManager {
|
|
|
132
163
|
* registration order.
|
|
133
164
|
*/
|
|
134
165
|
registerHook(pluginId: PluginId, hook: PluginHookDefinition): void;
|
|
166
|
+
/**
|
|
167
|
+
* Attach hooks that can be taken off again, and nothing else.
|
|
168
|
+
*
|
|
169
|
+
* Hooks left the manager only by plugin id: everything one id attached went
|
|
170
|
+
* together, and a hook attached for a while (a skill's, for as long as it is
|
|
171
|
+
* used) had no way to leave on its own. This returns a handle that removes
|
|
172
|
+
* exactly the hooks this call attached, whoever else registered under the
|
|
173
|
+
* same id, and a handle for one hook of them. A hook that is removed while
|
|
174
|
+
* an event is being answered still answers that event: the event started
|
|
175
|
+
* with the hooks it found.
|
|
176
|
+
*
|
|
177
|
+
* All or nothing: when one definition is refused (an event nothing emits),
|
|
178
|
+
* none of them is attached.
|
|
179
|
+
*/
|
|
180
|
+
attachHooks(pluginId: PluginId, hooks: readonly PluginHookDefinition[]): HookAttachment;
|
|
181
|
+
private addHook;
|
|
182
|
+
/**
|
|
183
|
+
* Called after a hook was attached or taken off, however it happened (a
|
|
184
|
+
* plugin enabled or disabled, a skill's hooks attached, a handle removed).
|
|
185
|
+
* For a host that keeps something in step with the hooks, such as the files
|
|
186
|
+
* `file_changed` hooks watch. Returns what ends the subscription.
|
|
187
|
+
*/
|
|
188
|
+
onHooksChanged(listener: () => void): () => void;
|
|
189
|
+
private notifyHooksChanged;
|
|
135
190
|
/**
|
|
136
191
|
* Every hook attached right now, by the plugin id it was registered under
|
|
137
192
|
* and its event, in the order answers are read. For a host that shows the
|
|
@@ -140,6 +195,10 @@ export declare class PluginLifecycleManager {
|
|
|
140
195
|
listHooks(): readonly {
|
|
141
196
|
readonly pluginId: PluginId;
|
|
142
197
|
readonly event: PluginHookEvent;
|
|
198
|
+
/** Set when the hook was read from entries the plugin ships and not from a module it runs. */
|
|
199
|
+
readonly shell?: true;
|
|
200
|
+
/** On `file_changed`: the paths the hook's matcher names. */
|
|
201
|
+
readonly watches?: readonly string[];
|
|
143
202
|
}[];
|
|
144
203
|
on(listener: PluginEventListener): void;
|
|
145
204
|
off(listener: PluginEventListener): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../src/plugin/lifecycle.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAG3D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAA;AAE5E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAS/D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAEjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAG1D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAEnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AACrD,OAAO,KAAK,EACX,gBAAgB,EAChB,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAGhB,WAAW,EACX,MAAM,0BAA0B,CAAA;AAEjC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAK7D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAChD,OAAO,EAAE,KAAK,aAAa,EAAgB,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../src/plugin/lifecycle.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAG3D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAA;AAE5E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAS/D,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