@pluginfinity/engine 0.2.1 → 0.3.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/env-lib.generated.js +12 -0
- package/env.js +128 -0
- package/errors.js +25 -6
- package/hook-lib.generated.js +1 -1
- package/hook-lib.js +15 -8
- package/hook-output.js +68 -0
- package/hooks.js +105 -12
- package/index.d.ts +369 -13
- package/index.js +6 -3
- package/lib-files.js +39 -0
- package/log-lib.generated.js +9 -0
- package/logs.js +147 -0
- package/monitor-lib.generated.js +9 -0
- package/monitors.js +88 -0
- package/notes.js +8 -1
- package/operations.js +129 -23
- package/package.json +3 -3
- package/server-lib.generated.js +1 -1
- package/server-lib.js +3 -2
- package/skills.js +6 -2
- package/tokens.js +72 -6
- package/tool-map.js +35 -0
- package/version.js +1 -1
package/hooks.js
CHANGED
|
@@ -44,25 +44,56 @@ const targetHooks = (target, id, config) => {
|
|
|
44
44
|
const hookScripts = (events) => [...new Set(events.flatMap((event) => event.entries.flatMap((entry) => "script" in entry ? [entry.script] : [])))];
|
|
45
45
|
const COMMAND_FILE = /\$\{PLUGIN_ROOT\}\/([^\s"'`;|&<>()$]+)/g;
|
|
46
46
|
/**
|
|
47
|
+
* Every file a command names as `${PLUGIN_ROOT}/<path>`, in order.
|
|
48
|
+
*
|
|
49
|
+
* @public
|
|
50
|
+
*/
|
|
51
|
+
const commandFiles = (command) => [...command.matchAll(COMMAND_FILE)].map((match) => match[1] ?? "");
|
|
52
|
+
/**
|
|
47
53
|
* Every file the given events' `command` entries name as
|
|
48
54
|
* `${PLUGIN_ROOT}/<path>`, so the build can ship and check them as it does
|
|
49
55
|
* `script` paths.
|
|
50
56
|
*
|
|
51
57
|
* @public
|
|
52
58
|
*/
|
|
53
|
-
const hookCommandFiles = (events) => [...new Set(events.flatMap((event) => event.entries.flatMap((entry) => "command" in entry ?
|
|
59
|
+
const hookCommandFiles = (events) => [...new Set(events.flatMap((event) => event.entries.flatMap((entry) => "command" in entry ? commandFiles(entry.command) : [])))];
|
|
54
60
|
const shellQuote = (word) => /^[A-Za-z0-9_\-./=:@%+,]+$/.test(word) ? word : `'${word.replaceAll("'", `'\\''`)}'`;
|
|
55
61
|
const PLUGIN_ROOT = `\${PLUGIN_ROOT}`;
|
|
56
62
|
const SAFE_PATH = /^[A-Za-z0-9_\-./@%+,=:]+$/;
|
|
57
63
|
/**
|
|
64
|
+
* The environment every hook entry runs with: the event the library reads
|
|
65
|
+
* (camelCase Copilot payloads carry no `hook_event_name`), `"1"` for
|
|
66
|
+
* `PLUGINFINITY_FAIL_CLOSED` when the entry sets `failClosed`, and the
|
|
67
|
+
* matcher when one is given.
|
|
68
|
+
*
|
|
69
|
+
* @public
|
|
70
|
+
*/
|
|
71
|
+
const entryEnv = (event, entry, matcher) => ({
|
|
72
|
+
PLUGINFINITY_EVENT: event,
|
|
73
|
+
...entry.failClosed === true ? { PLUGINFINITY_FAIL_CLOSED: "1" } : {},
|
|
74
|
+
...matcher === void 0 ? {} : { PLUGINFINITY_MATCHER: matcher }
|
|
75
|
+
});
|
|
76
|
+
const quoteValue = (value) => `'${value.replaceAll("'", `'\\''`)}'`;
|
|
77
|
+
/**
|
|
78
|
+
* An env as a shell prefix, `K='V' ` per pair: every value single-quoted, and
|
|
79
|
+
* empty for an empty env.
|
|
80
|
+
*
|
|
81
|
+
* @public
|
|
82
|
+
*/
|
|
83
|
+
const shellEnvPrefix = (env) => Object.entries(env).map(([key, value]) => `${key}=${quoteValue(value)} `).join("");
|
|
84
|
+
/**
|
|
58
85
|
* The shell command a hook entry runs on a target: a `script` through `bash`
|
|
59
86
|
* (or executed directly under `scripts.invoke: "exec"`) at the target's
|
|
60
87
|
* plugin root, or a `command` with `${PLUGIN_ROOT}` spelled the target's way.
|
|
61
88
|
*
|
|
62
89
|
* @public
|
|
63
90
|
*/
|
|
64
|
-
const hookCommand = (entry, root, invoke) => {
|
|
65
|
-
|
|
91
|
+
const hookCommand = (entry, root, invoke, env = {}) => {
|
|
92
|
+
const pairs = Object.entries(env).map(([key, value]) => `${key}=${quoteValue(value)}`);
|
|
93
|
+
if ("command" in entry) {
|
|
94
|
+
const command = entry.command.replaceAll(PLUGIN_ROOT, root);
|
|
95
|
+
return pairs.length === 0 ? command : `${pairs.map((pair) => `export ${pair};`).join(" ")} ${command}`;
|
|
96
|
+
}
|
|
66
97
|
const path = SAFE_PATH.test(entry.script) ? `"${root}/${entry.script}"` : `"${root}"/${shellQuote(entry.script)}`;
|
|
67
98
|
const args = (entry.args ?? []).map(shellQuote);
|
|
68
99
|
return [...invoke === "bash" ? ["bash", path] : [path], ...args].join(" ");
|
|
@@ -75,9 +106,19 @@ const hookCommand = (entry, root, invoke) => {
|
|
|
75
106
|
*
|
|
76
107
|
* @public
|
|
77
108
|
*/
|
|
78
|
-
const hookExec = (entry, root, invoke) => {
|
|
109
|
+
const hookExec = (entry, root, invoke, env = {}) => {
|
|
79
110
|
const path = `${root}/${entry.script}`;
|
|
80
111
|
const args = [...entry.args ?? []];
|
|
112
|
+
const pairs = Object.entries(env).map(([key, value]) => `${key}=${value}`);
|
|
113
|
+
if (pairs.length > 0) return {
|
|
114
|
+
command: "env",
|
|
115
|
+
args: [
|
|
116
|
+
...pairs,
|
|
117
|
+
...invoke === "bash" ? ["bash"] : [],
|
|
118
|
+
path,
|
|
119
|
+
...args
|
|
120
|
+
]
|
|
121
|
+
};
|
|
81
122
|
return invoke === "bash" ? {
|
|
82
123
|
command: "bash",
|
|
83
124
|
args: [path, ...args]
|
|
@@ -86,23 +127,75 @@ const hookExec = (entry, root, invoke) => {
|
|
|
86
127
|
args
|
|
87
128
|
};
|
|
88
129
|
};
|
|
130
|
+
const EXACT_LIST = /^[A-Za-z0-9_| ,-]*$/;
|
|
131
|
+
/**
|
|
132
|
+
* How a host that ignores the SessionStart matcher is told a matcher: a host
|
|
133
|
+
* names a fresh session's source `new` where Claude says `startup`, so a
|
|
134
|
+
* matcher that matches `startup` must match `new` too.
|
|
135
|
+
*
|
|
136
|
+
* An exact list holding `startup` gains `new` right after it (`startup|resume`
|
|
137
|
+
* becomes `startup|new|resume`); one that already holds `new`, an empty or `*`
|
|
138
|
+
* matcher and any matcher not matching `startup` stay as written. A regex
|
|
139
|
+
* that matches `startup` but not `new` also stays as written, reported as
|
|
140
|
+
* `unwidened` so the build can note it. The regex is tried as a JavaScript
|
|
141
|
+
* `RegExp` while the hook library matches with `grep -E`, so exotic syntax
|
|
142
|
+
* may differ.
|
|
143
|
+
*
|
|
144
|
+
* @public
|
|
145
|
+
*/
|
|
146
|
+
const sessionStartMatcher = (matcher) => {
|
|
147
|
+
const same = {
|
|
148
|
+
matcher,
|
|
149
|
+
widened: false,
|
|
150
|
+
unwidened: false
|
|
151
|
+
};
|
|
152
|
+
if (matcher === "" || matcher === "*") return same;
|
|
153
|
+
if (EXACT_LIST.test(matcher)) {
|
|
154
|
+
const items = matcher.split("|");
|
|
155
|
+
const at = items.indexOf("startup");
|
|
156
|
+
if (at === -1 || items.includes("new")) return same;
|
|
157
|
+
items.splice(at + 1, 0, "new");
|
|
158
|
+
return {
|
|
159
|
+
matcher: items.join("|"),
|
|
160
|
+
widened: true,
|
|
161
|
+
unwidened: false
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
try {
|
|
165
|
+
const regex = new RegExp(matcher);
|
|
166
|
+
return {
|
|
167
|
+
...same,
|
|
168
|
+
unwidened: regex.test("startup") && !regex.test("new")
|
|
169
|
+
};
|
|
170
|
+
} catch {
|
|
171
|
+
return same;
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
/**
|
|
175
|
+
* Whether a host that ignores matchers on `event` (`ignored` is its list) is
|
|
176
|
+
* given a widened SessionStart matcher.
|
|
177
|
+
*
|
|
178
|
+
* @public
|
|
179
|
+
*/
|
|
180
|
+
const widensSessionStart = (ignored, event) => event === "SessionStart" && ignored.includes(event);
|
|
181
|
+
const runtimeMatcher = (ignored, event, entry) => ignored.includes(event) ? entry.matcher !== void 0 && widensSessionStart(ignored, event) ? sessionStartMatcher(entry.matcher).matcher : entry.matcher : void 0;
|
|
89
182
|
const FORMATS = {
|
|
90
|
-
"claude-hooks-json": (events, command, exec) => ({ hooks: Object.fromEntries(events.map(({ name, entries }) => [name, entries.map((entry) => ({
|
|
91
|
-
...entry.matcher === void 0 ? {} : { matcher: entry.matcher },
|
|
183
|
+
"claude-hooks-json": (events, command, exec, ignored) => ({ hooks: Object.fromEntries(events.map(({ event, name, entries }) => [name, entries.map((entry) => ({
|
|
184
|
+
...entry.matcher === void 0 || ignored.includes(event) ? {} : { matcher: entry.matcher },
|
|
92
185
|
hooks: [{
|
|
93
186
|
type: "command",
|
|
94
|
-
..."script" in entry ? exec(entry) : { command: command(entry) },
|
|
187
|
+
..."script" in entry ? exec(entry, entryEnv(event, entry, runtimeMatcher(ignored, event, entry))) : { command: command(entry, entryEnv(event, entry, runtimeMatcher(ignored, event, entry))) },
|
|
95
188
|
...entry.timeout === void 0 ? {} : { timeout: entry.timeout }
|
|
96
189
|
}]
|
|
97
190
|
}))])) }),
|
|
98
|
-
"copilot-hooks-v1": (events, command) => ({
|
|
191
|
+
"copilot-hooks-v1": (events, command, _exec, ignored) => ({
|
|
99
192
|
version: 1,
|
|
100
193
|
hooks: Object.fromEntries(events.map(({ event, name, entries }) => [name, entries.map((entry) => ({
|
|
101
194
|
type: "command",
|
|
102
195
|
bash: command(entry),
|
|
103
|
-
...entry.matcher === void 0 ? {} : { matcher: entry.matcher },
|
|
196
|
+
...entry.matcher === void 0 || ignored.includes(event) ? {} : { matcher: entry.matcher },
|
|
104
197
|
...entry.timeout === void 0 ? {} : { timeoutSec: entry.timeout },
|
|
105
|
-
env:
|
|
198
|
+
env: entryEnv(event, entry, runtimeMatcher(ignored, event, entry))
|
|
106
199
|
}))]))
|
|
107
200
|
})
|
|
108
201
|
};
|
|
@@ -116,8 +209,8 @@ const renderHooks = (target, events, invoke) => {
|
|
|
116
209
|
if (events.length === 0) return void 0;
|
|
117
210
|
const root = target.pluginRoot.hooks;
|
|
118
211
|
if (typeof root !== "string") throw new Error(`target has no plugin-root spelling for hook commands: ${root.note}`);
|
|
119
|
-
return `${JSON.stringify(FORMATS[target.hooks.format](events, (entry) => hookCommand(entry, root, invoke), (entry) => hookExec(entry, root, invoke)), null, " ")}\n`;
|
|
212
|
+
return `${JSON.stringify(FORMATS[target.hooks.format](events, (entry, env) => hookCommand(entry, root, invoke, env), (entry, env) => hookExec(entry, root, invoke, env), target.hooks.matcherIgnored), null, " ")}\n`;
|
|
120
213
|
};
|
|
121
214
|
|
|
122
215
|
//#endregion
|
|
123
|
-
export { hookCommand, hookCommandFiles, hookExec, hookScripts, renderHooks, targetHooks };
|
|
216
|
+
export { commandFiles, entryEnv, hookCommand, hookCommandFiles, hookExec, hookScripts, renderHooks, sessionStartMatcher, shellEnvPrefix, targetHooks, widensSessionStart };
|
package/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AgentFrontmatter, FieldMapEntry, HookEntry, SkillFrontmatter, Target } from "@pluginfinity/core";
|
|
1
|
+
import { AgentFrontmatter, EnvConfig, FieldMapEntry, HookEntry, MonitorEntry, SkillFrontmatter, Target } from "@pluginfinity/core";
|
|
2
2
|
import { KnownTargetId, PluginfinityConfig } from "@pluginfinity/targets";
|
|
3
3
|
import { Duration, Effect, FileSystem, Layer, Path, PlatformError, Schema } from "effect";
|
|
4
4
|
import { Remediation } from "@effected/engine";
|
|
@@ -283,13 +283,15 @@ export declare class HookEventUnsupported extends HookEventUnsupported_base {
|
|
|
283
283
|
*
|
|
284
284
|
* @public
|
|
285
285
|
*/
|
|
286
|
-
export declare const HookScriptProblem: Schema.Literals<readonly ["missing", "not-executable"]>;
|
|
286
|
+
export declare const HookScriptProblem: Schema.Literals<readonly ["missing", "not-executable", "equals-in-path"]>;
|
|
287
287
|
declare const HookScriptInvalid_base: Schema.Class<HookScriptInvalid, Schema.TaggedStruct<"HookScriptInvalid", {
|
|
288
288
|
/** The config. */
|
|
289
289
|
readonly path: Schema.String;
|
|
290
290
|
/** The script, relative to the plugin root. */
|
|
291
291
|
readonly script: Schema.String;
|
|
292
|
-
readonly problem: Schema.Literals<readonly ["missing", "not-executable"]>;
|
|
292
|
+
readonly problem: Schema.Literals<readonly ["missing", "not-executable", "equals-in-path"]>;
|
|
293
|
+
/** The component that runs the script: `hooks`, `monitors`, or `env` for the `env.setup` script. */
|
|
294
|
+
readonly component: Schema.Literals<readonly ["hooks", "monitors", "env"]>;
|
|
293
295
|
}>, import("effect/Cause").YieldableError>;
|
|
294
296
|
/**
|
|
295
297
|
* A hook `script` cannot be shipped as configured.
|
|
@@ -297,6 +299,7 @@ declare const HookScriptInvalid_base: Schema.Class<HookScriptInvalid, Schema.Tag
|
|
|
297
299
|
* @public
|
|
298
300
|
*/
|
|
299
301
|
export declare class HookScriptInvalid extends HookScriptInvalid_base {
|
|
302
|
+
private get kind();
|
|
300
303
|
get message(): string;
|
|
301
304
|
get remediation(): Remediation;
|
|
302
305
|
}
|
|
@@ -330,8 +333,11 @@ declare const PathConflict_base: Schema.Class<PathConflict, Schema.TaggedStruct<
|
|
|
330
333
|
readonly target: Schema.String;
|
|
331
334
|
/** The build path both claim, relative to `builds/<target>/`. */
|
|
332
335
|
readonly file: Schema.String;
|
|
333
|
-
/**
|
|
334
|
-
|
|
336
|
+
/**
|
|
337
|
+
* Why the path is taken: a generated file, a reserved library directory, a reserved server file,
|
|
338
|
+
* or the monitors file a `monitors` field generates.
|
|
339
|
+
*/
|
|
340
|
+
readonly conflict: Schema.Literals<readonly ["generated", "reserved-dir", "reserved-server-file", "reserved-monitors-file"]>;
|
|
335
341
|
}>, import("effect/Cause").YieldableError>;
|
|
336
342
|
/**
|
|
337
343
|
* A copied source file would land on a path pluginfinity owns: a file it
|
|
@@ -396,12 +402,22 @@ export declare const isBuildError: (error: unknown) => error is BuildError;
|
|
|
396
402
|
*
|
|
397
403
|
* @public
|
|
398
404
|
*/
|
|
399
|
-
export declare const BUILD_NOTE_KINDS: readonly ["dropped", "degraded", "tool-dropped", "hook-omitted"];
|
|
405
|
+
export declare const BUILD_NOTE_KINDS: readonly ["dropped", "degraded", "tool-dropped", "hook-matcher-runtime", "hook-output-ignored", "hook-omitted", "monitor-omitted", "env-shell-unsupported", "env-wait-timeout", "hook-matcher-widened", "hook-matcher-regex"];
|
|
400
406
|
/**
|
|
401
407
|
* What a target did to something it could not carry as written: `dropped` a
|
|
402
408
|
* field, `degraded` a field into another form (a description suffix or a body
|
|
403
|
-
* section), `tool-dropped` a tool it cannot name,
|
|
404
|
-
*
|
|
409
|
+
* section), `tool-dropped` a tool it cannot name, moved a
|
|
410
|
+
* `hook-matcher-runtime` matcher the host ignores into the hook library,
|
|
411
|
+
* noted a script that calls a helper whose output the host ignores
|
|
412
|
+
* (`hook-output-ignored`), `hook-omitted` an event it lacks whose entries all set `fallback: "omit"`,
|
|
413
|
+
* `monitor-omitted` a monitor on a host that has none, or noted that the host
|
|
414
|
+
* passes no session env to the model's shell (`env-shell-unsupported`), so a
|
|
415
|
+
* skill script must source `env.sh`, or a SessionStart hook whose `timeout`
|
|
416
|
+
* is under the 3 seconds a reader may wait for the env runner plus headroom
|
|
417
|
+
* (`env-wait-timeout`), or widened a SessionStart matcher that matches
|
|
418
|
+
* `startup` to match a host's `new` source too (`hook-matcher-widened`), or left
|
|
419
|
+
* a regex matcher as written that matches `startup` but not `new`
|
|
420
|
+
* (`hook-matcher-regex`).
|
|
405
421
|
*
|
|
406
422
|
* @public
|
|
407
423
|
*/
|
|
@@ -536,6 +552,11 @@ interface TokenContext {
|
|
|
536
552
|
readonly plugin: string;
|
|
537
553
|
/** The plugin's skill names. */
|
|
538
554
|
readonly skills: ReadonlySet<string>;
|
|
555
|
+
/**
|
|
556
|
+
* The skill whose body (or bundled markdown file) is being rendered, so
|
|
557
|
+
* `{{skill_dir}}` can name it; absent when rendering an agent body.
|
|
558
|
+
*/
|
|
559
|
+
readonly skill?: string;
|
|
539
560
|
/** The plugin's agent names. */
|
|
540
561
|
readonly agents: ReadonlySet<string>;
|
|
541
562
|
/** Every file under a skill directory, as `<skill>/<path>`, `SKILL.md` included. */
|
|
@@ -563,8 +584,45 @@ interface TokenProblem {
|
|
|
563
584
|
* or report every one it cannot render.
|
|
564
585
|
*
|
|
565
586
|
* @remarks
|
|
566
|
-
* A token is
|
|
567
|
-
*
|
|
587
|
+
* A token is one of the following, with whitespace allowed inside the braces,
|
|
588
|
+
* on one line:
|
|
589
|
+
*
|
|
590
|
+
* ```text
|
|
591
|
+
* {{tool <name>}}
|
|
592
|
+
* {{tool <name> | <fallback>}}
|
|
593
|
+
* {{agent <name>}}
|
|
594
|
+
* {{skill <name>}}
|
|
595
|
+
* {{skill_dir}}
|
|
596
|
+
* {{skill_dir <name>}}
|
|
597
|
+
* {{plugin_root}}
|
|
598
|
+
* ```
|
|
599
|
+
*
|
|
600
|
+
* `{{skill_dir}}` is the directory of the skill whose body it is written in,
|
|
601
|
+
* and `{{skill_dir <name>}}` that of the named skill (naming the own skill is
|
|
602
|
+
* the own form). Claude spells them `${CLAUDE_SKILL_DIR}` and
|
|
603
|
+
* `${CLAUDE_PLUGIN_ROOT}/skills/<name>`, which it expands in skill bodies;
|
|
604
|
+
* Copilot expands nothing, so on Copilot the token is a placeholder the model
|
|
605
|
+
* resolves from the "Base directory for this skill" line the host puts above
|
|
606
|
+
* the body (`<skill base directory>`, and `<skill base directory>/../<name>`
|
|
607
|
+
* for a sibling), not a literal path. An agent has no skill directory, so the
|
|
608
|
+
* bare form there is a problem, as is a named skill on a target with no
|
|
609
|
+
* spelling for it from an agent (Copilot), an unknown skill or one the target
|
|
610
|
+
* does not build. It takes neither a `|` fallback nor backticks.
|
|
611
|
+
*
|
|
612
|
+
* A tool token may wrap its name in exactly one pair of backticks:
|
|
613
|
+
*
|
|
614
|
+
* ```text
|
|
615
|
+
* {{tool `Name`}}
|
|
616
|
+
* {{tool `Name` | <fallback>}}
|
|
617
|
+
* ```
|
|
618
|
+
*
|
|
619
|
+
* It then renders as a code span of the spelling where the tool spells, and as
|
|
620
|
+
* the fallback in plain text where it does not;
|
|
621
|
+
* unbalanced or doubled backticks, and backticks on any other kind, are
|
|
622
|
+
* problems. Only a tool token takes
|
|
623
|
+
* a `|` fallback: literal prose, trimmed, that replaces the token on a target
|
|
624
|
+
* where the tool has no spelling (and is discarded where it has one). It may
|
|
625
|
+
* not be empty or contain `{` or `}`.
|
|
568
626
|
* Tokens are replaced everywhere, fenced and inline code included; `\{{`
|
|
569
627
|
* before a token renders it literally, and before any other `{{` the
|
|
570
628
|
* backslash stays. A `{{` whose first word is not a kind is text, so
|
|
@@ -924,6 +982,12 @@ export declare const targetHooks: (target: Target, id: KnownTargetId, config: Pl
|
|
|
924
982
|
* @public
|
|
925
983
|
*/
|
|
926
984
|
export declare const hookScripts: (events: ReadonlyArray<TargetHookEvent>) => ReadonlyArray<string>;
|
|
985
|
+
/**
|
|
986
|
+
* Every file a command names as `${PLUGIN_ROOT}/<path>`, in order.
|
|
987
|
+
*
|
|
988
|
+
* @public
|
|
989
|
+
*/
|
|
990
|
+
export declare const commandFiles: (command: string) => ReadonlyArray<string>;
|
|
927
991
|
/**
|
|
928
992
|
* Every file the given events' `command` entries name as
|
|
929
993
|
* `${PLUGIN_ROOT}/<path>`, so the build can ship and check them as it does
|
|
@@ -932,6 +996,22 @@ export declare const hookScripts: (events: ReadonlyArray<TargetHookEvent>) => Re
|
|
|
932
996
|
* @public
|
|
933
997
|
*/
|
|
934
998
|
export declare const hookCommandFiles: (events: ReadonlyArray<TargetHookEvent>) => ReadonlyArray<string>;
|
|
999
|
+
/**
|
|
1000
|
+
* The environment every hook entry runs with: the event the library reads
|
|
1001
|
+
* (camelCase Copilot payloads carry no `hook_event_name`), `"1"` for
|
|
1002
|
+
* `PLUGINFINITY_FAIL_CLOSED` when the entry sets `failClosed`, and the
|
|
1003
|
+
* matcher when one is given.
|
|
1004
|
+
*
|
|
1005
|
+
* @public
|
|
1006
|
+
*/
|
|
1007
|
+
export declare const entryEnv: (event: string, entry: HookEntry, matcher?: string) => Readonly<Record<string, string>>;
|
|
1008
|
+
/**
|
|
1009
|
+
* An env as a shell prefix, `K='V' ` per pair: every value single-quoted, and
|
|
1010
|
+
* empty for an empty env.
|
|
1011
|
+
*
|
|
1012
|
+
* @public
|
|
1013
|
+
*/
|
|
1014
|
+
export declare const shellEnvPrefix: (env: Readonly<Record<string, string>>) => string;
|
|
935
1015
|
/**
|
|
936
1016
|
* The shell command a hook entry runs on a target: a `script` through `bash`
|
|
937
1017
|
* (or executed directly under `scripts.invoke: "exec"`) at the target's
|
|
@@ -939,7 +1019,7 @@ export declare const hookCommandFiles: (events: ReadonlyArray<TargetHookEvent>)
|
|
|
939
1019
|
*
|
|
940
1020
|
* @public
|
|
941
1021
|
*/
|
|
942
|
-
export declare const hookCommand: (entry: HookEntry, root: string, invoke: "bash" | "exec") => string;
|
|
1022
|
+
export declare const hookCommand: (entry: HookEntry, root: string, invoke: "bash" | "exec", env?: Readonly<Record<string, string>>) => string;
|
|
943
1023
|
/**
|
|
944
1024
|
* A `script` entry in exec form, for a host that spawns `command` with `args`
|
|
945
1025
|
* and no shell: `bash` with the script path as its first argument, or under
|
|
@@ -950,10 +1030,37 @@ export declare const hookCommand: (entry: HookEntry, root: string, invoke: "bash
|
|
|
950
1030
|
*/
|
|
951
1031
|
export declare const hookExec: (entry: Extract<HookEntry, {
|
|
952
1032
|
readonly script: string;
|
|
953
|
-
}>, root: string, invoke: "bash" | "exec") => {
|
|
1033
|
+
}>, root: string, invoke: "bash" | "exec", env?: Readonly<Record<string, string>>) => {
|
|
954
1034
|
readonly command: string;
|
|
955
1035
|
readonly args: ReadonlyArray<string>;
|
|
956
1036
|
};
|
|
1037
|
+
/**
|
|
1038
|
+
* How a host that ignores the SessionStart matcher is told a matcher: a host
|
|
1039
|
+
* names a fresh session's source `new` where Claude says `startup`, so a
|
|
1040
|
+
* matcher that matches `startup` must match `new` too.
|
|
1041
|
+
*
|
|
1042
|
+
* An exact list holding `startup` gains `new` right after it (`startup|resume`
|
|
1043
|
+
* becomes `startup|new|resume`); one that already holds `new`, an empty or `*`
|
|
1044
|
+
* matcher and any matcher not matching `startup` stay as written. A regex
|
|
1045
|
+
* that matches `startup` but not `new` also stays as written, reported as
|
|
1046
|
+
* `unwidened` so the build can note it. The regex is tried as a JavaScript
|
|
1047
|
+
* `RegExp` while the hook library matches with `grep -E`, so exotic syntax
|
|
1048
|
+
* may differ.
|
|
1049
|
+
*
|
|
1050
|
+
* @public
|
|
1051
|
+
*/
|
|
1052
|
+
export declare const sessionStartMatcher: (matcher: string) => {
|
|
1053
|
+
readonly matcher: string;
|
|
1054
|
+
readonly widened: boolean;
|
|
1055
|
+
readonly unwidened: boolean;
|
|
1056
|
+
};
|
|
1057
|
+
/**
|
|
1058
|
+
* Whether a host that ignores matchers on `event` (`ignored` is its list) is
|
|
1059
|
+
* given a widened SessionStart matcher.
|
|
1060
|
+
*
|
|
1061
|
+
* @public
|
|
1062
|
+
*/
|
|
1063
|
+
export declare const widensSessionStart: (ignored: ReadonlyArray<string>, event: string) => boolean;
|
|
957
1064
|
/**
|
|
958
1065
|
* Render a target's hooks file as JSON text, or `undefined` when the target
|
|
959
1066
|
* builds no hooks.
|
|
@@ -962,6 +1069,196 @@ export declare const hookExec: (entry: Extract<HookEntry, {
|
|
|
962
1069
|
*/
|
|
963
1070
|
export declare const renderHooks: (target: Target, events: ReadonlyArray<TargetHookEvent>, invoke: "bash" | "exec") => string | undefined;
|
|
964
1071
|
//#endregion
|
|
1072
|
+
//#region src/env.d.ts
|
|
1073
|
+
/**
|
|
1074
|
+
* Seconds the env runner gives the `setup` script before it discards its
|
|
1075
|
+
* output and resolves without it.
|
|
1076
|
+
*
|
|
1077
|
+
* @public
|
|
1078
|
+
*/
|
|
1079
|
+
export declare const ENV_SETUP_TIMEOUT = 10;
|
|
1080
|
+
/**
|
|
1081
|
+
* The host timeout, in seconds, of the generated SessionStart entry: the setup
|
|
1082
|
+
* bound plus room for the runner to write the values after a setup timeout.
|
|
1083
|
+
*
|
|
1084
|
+
* @public
|
|
1085
|
+
*/
|
|
1086
|
+
export declare const ENV_RUNNER_TIMEOUT = 15;
|
|
1087
|
+
/**
|
|
1088
|
+
* `env.sh` with its declarations block filled in: the declared names in
|
|
1089
|
+
* config order, each default, the setup path and its time bound.
|
|
1090
|
+
*
|
|
1091
|
+
* @remarks
|
|
1092
|
+
* Every value is single-quoted for the shell. The names need no quoting: the
|
|
1093
|
+
* config schema admits only `[A-Z_][A-Z0-9_]*`.
|
|
1094
|
+
*
|
|
1095
|
+
* @public
|
|
1096
|
+
*/
|
|
1097
|
+
export declare const renderEnvLib: (env: EnvConfig) => string;
|
|
1098
|
+
/**
|
|
1099
|
+
* The session env library as a build writes it under `dir`: `env.sh` with its
|
|
1100
|
+
* declarations, and the SessionStart runner `env-run.sh`.
|
|
1101
|
+
*
|
|
1102
|
+
* @public
|
|
1103
|
+
*/
|
|
1104
|
+
export declare const envLibFiles: (env: EnvConfig, dir: string) => ReadonlyArray<EmittedFile>;
|
|
1105
|
+
/**
|
|
1106
|
+
* The hook entry that runs the env runner at `${PLUGIN_ROOT}/<dir>/env-run.sh`
|
|
1107
|
+
* under `sh`, with no matcher, so it runs for every SessionStart source.
|
|
1108
|
+
*
|
|
1109
|
+
* @public
|
|
1110
|
+
*/
|
|
1111
|
+
export declare const envRunnerEntry: (dir: string) => HookEntry;
|
|
1112
|
+
/**
|
|
1113
|
+
* The events with `entry` first among the SessionStart entries, adding the
|
|
1114
|
+
* event (first) when the plugin has no SessionStart hooks. A target without
|
|
1115
|
+
* SessionStart gets the events unchanged.
|
|
1116
|
+
*
|
|
1117
|
+
* @remarks
|
|
1118
|
+
* First in order is not first to finish: Claude Code runs an event's matching
|
|
1119
|
+
* hooks in parallel, so another SessionStart hook may read before the runner
|
|
1120
|
+
* has written the session values, and then resolves the chain live.
|
|
1121
|
+
*
|
|
1122
|
+
* @public
|
|
1123
|
+
*/
|
|
1124
|
+
export declare const withEnvRunner: (target: Target, events: ReadonlyArray<TargetHookEvent>, entry: HookEntry) => ReadonlyArray<TargetHookEvent>;
|
|
1125
|
+
/**
|
|
1126
|
+
* The build notes for a target's session env: `env-shell-unsupported` when
|
|
1127
|
+
* the host cannot pass values from SessionStart to the model's shell, so a
|
|
1128
|
+
* skill script must source `env.sh` to see them.
|
|
1129
|
+
*
|
|
1130
|
+
* @public
|
|
1131
|
+
*/
|
|
1132
|
+
export declare const envNotes: (target: Target, id: KnownTargetId) => ReadonlyArray<BuildNote>;
|
|
1133
|
+
/**
|
|
1134
|
+
* Seconds a SessionStart reader may wait for the env runner (3) plus headroom;
|
|
1135
|
+
* a SessionStart hook with a smaller `timeout` can be killed while it waits.
|
|
1136
|
+
*
|
|
1137
|
+
* @public
|
|
1138
|
+
*/
|
|
1139
|
+
export declare const ENV_WAIT_TIMEOUT_FLOOR = 5;
|
|
1140
|
+
/**
|
|
1141
|
+
* An `env-wait-timeout` note for each SessionStart entry (other than the
|
|
1142
|
+
* runner, which is added later) whose `timeout` is set and under
|
|
1143
|
+
* {@link ENV_WAIT_TIMEOUT_FLOOR}: its hook library waits up to 3 s for the
|
|
1144
|
+
* runner before it reads. The note's path is the entry's script, else `config`.
|
|
1145
|
+
*
|
|
1146
|
+
* @public
|
|
1147
|
+
*/
|
|
1148
|
+
export declare const envWaitNotes: (id: KnownTargetId, events: ReadonlyArray<TargetHookEvent>) => ReadonlyArray<BuildNote>;
|
|
1149
|
+
//#endregion
|
|
1150
|
+
//#region src/logs.d.ts
|
|
1151
|
+
/**
|
|
1152
|
+
* The two files a plugin's components log to.
|
|
1153
|
+
*
|
|
1154
|
+
* @public
|
|
1155
|
+
*/
|
|
1156
|
+
type LogFileName = "error.log" | "debug.log";
|
|
1157
|
+
/**
|
|
1158
|
+
* One parsed log line: `<ISO-8601 UTC> [<host>] <component>/<script>: <message>`.
|
|
1159
|
+
*
|
|
1160
|
+
* @public
|
|
1161
|
+
*/
|
|
1162
|
+
interface LogEntry {
|
|
1163
|
+
readonly ts: string;
|
|
1164
|
+
readonly host: string;
|
|
1165
|
+
readonly component: "hook" | "server" | "monitor" | "script";
|
|
1166
|
+
readonly script: string;
|
|
1167
|
+
readonly message: string;
|
|
1168
|
+
readonly plugin: string;
|
|
1169
|
+
readonly file: LogFileName;
|
|
1170
|
+
}
|
|
1171
|
+
/**
|
|
1172
|
+
* A line that does not follow the standard, carried through whole.
|
|
1173
|
+
*
|
|
1174
|
+
* @public
|
|
1175
|
+
*/
|
|
1176
|
+
interface RawLogLine {
|
|
1177
|
+
readonly raw: string;
|
|
1178
|
+
readonly plugin: string;
|
|
1179
|
+
readonly file: LogFileName;
|
|
1180
|
+
}
|
|
1181
|
+
/**
|
|
1182
|
+
* Parse one log line, or carry it through as raw when it does not follow the
|
|
1183
|
+
* standard.
|
|
1184
|
+
*
|
|
1185
|
+
* @public
|
|
1186
|
+
*/
|
|
1187
|
+
export declare const parseLogLine: (line: string, plugin: string, file: LogFileName) => LogEntry | RawLogLine;
|
|
1188
|
+
/**
|
|
1189
|
+
* The directory every plugin's logs live under: `<stateHome>/pluginfinity`.
|
|
1190
|
+
*
|
|
1191
|
+
* @public
|
|
1192
|
+
*/
|
|
1193
|
+
export declare const logRoot: (stateHome: string) => Effect.Effect<string, never, Path.Path>;
|
|
1194
|
+
/**
|
|
1195
|
+
* One plugin's log directory: `<stateHome>/pluginfinity/<plugin>`.
|
|
1196
|
+
*
|
|
1197
|
+
* @public
|
|
1198
|
+
*/
|
|
1199
|
+
export declare const logDirectory: (stateHome: string, plugin: string) => Effect.Effect<string, never, Path.Path>;
|
|
1200
|
+
/**
|
|
1201
|
+
* The plugin names that have a log directory, sorted; none when the state
|
|
1202
|
+
* directory does not exist.
|
|
1203
|
+
*
|
|
1204
|
+
* @public
|
|
1205
|
+
*/
|
|
1206
|
+
export declare const listLogPlugins: (stateHome: string) => Effect.Effect<ReadonlyArray<string>, PlatformError.PlatformError, FileSystem.FileSystem | Path.Path>;
|
|
1207
|
+
/**
|
|
1208
|
+
* The names the selected config's targets publish under: the config's `name`
|
|
1209
|
+
* and each target's own `name` override, deduplicated, in first-seen order.
|
|
1210
|
+
* Each target's components log under its own name.
|
|
1211
|
+
*
|
|
1212
|
+
* @public
|
|
1213
|
+
*/
|
|
1214
|
+
export declare const configPluginNames: (selection: ConfigSelection) => Effect.Effect<ReadonlyArray<string>, ConfigError, FileSystem.FileSystem | Path.Path>;
|
|
1215
|
+
/**
|
|
1216
|
+
* The tail of one log file.
|
|
1217
|
+
*
|
|
1218
|
+
* @public
|
|
1219
|
+
*/
|
|
1220
|
+
interface LogTail {
|
|
1221
|
+
readonly plugin: string;
|
|
1222
|
+
readonly file: LogFileName;
|
|
1223
|
+
/** The file's absolute path, whether or not it exists. */
|
|
1224
|
+
readonly path: string;
|
|
1225
|
+
/** Whether the file exists. */
|
|
1226
|
+
readonly present: boolean;
|
|
1227
|
+
/** The last lines asked for, oldest first. */
|
|
1228
|
+
readonly lines: ReadonlyArray<string>;
|
|
1229
|
+
/** The byte offset after the last complete line: where {@link readLogFrom} resumes. */
|
|
1230
|
+
readonly offset: number;
|
|
1231
|
+
}
|
|
1232
|
+
/**
|
|
1233
|
+
* The last `lines` complete lines of a plugin's log file.
|
|
1234
|
+
*
|
|
1235
|
+
* @remarks
|
|
1236
|
+
* An absent file is `present: false` with no lines, not a failure: a plugin
|
|
1237
|
+
* that has logged nothing has no file.
|
|
1238
|
+
*
|
|
1239
|
+
* @public
|
|
1240
|
+
*/
|
|
1241
|
+
export declare const readLog: (input: {
|
|
1242
|
+
readonly stateHome: string;
|
|
1243
|
+
readonly plugin: string;
|
|
1244
|
+
readonly file: LogFileName;
|
|
1245
|
+
readonly lines: number;
|
|
1246
|
+
}) => Effect.Effect<LogTail, PlatformError.PlatformError, FileSystem.FileSystem | Path.Path>;
|
|
1247
|
+
/**
|
|
1248
|
+
* The complete lines appended to `path` after byte `offset`, and the offset to
|
|
1249
|
+
* resume from.
|
|
1250
|
+
*
|
|
1251
|
+
* @remarks
|
|
1252
|
+
* A file smaller than `offset` was truncated or replaced, so reading restarts
|
|
1253
|
+
* from its beginning. A file that does not exist yields no lines at offset 0.
|
|
1254
|
+
*
|
|
1255
|
+
* @public
|
|
1256
|
+
*/
|
|
1257
|
+
export declare const readLogFrom: (path: string, offset: number) => Effect.Effect<{
|
|
1258
|
+
readonly lines: ReadonlyArray<string>;
|
|
1259
|
+
readonly offset: number;
|
|
1260
|
+
}, PlatformError.PlatformError, FileSystem.FileSystem>;
|
|
1261
|
+
//#endregion
|
|
965
1262
|
//#region src/manifest.d.ts
|
|
966
1263
|
/**
|
|
967
1264
|
* A manifest as written: a JSON object in the target's key order.
|
|
@@ -985,6 +1282,65 @@ export declare const renderManifest: (target: Target, id: KnownTargetId, config:
|
|
|
985
1282
|
*/
|
|
986
1283
|
export declare const serializeManifest: (manifest: Manifest) => string;
|
|
987
1284
|
//#endregion
|
|
1285
|
+
//#region src/monitors.d.ts
|
|
1286
|
+
/**
|
|
1287
|
+
* Monitors by name.
|
|
1288
|
+
*
|
|
1289
|
+
* @public
|
|
1290
|
+
*/
|
|
1291
|
+
type MonitorMap = Readonly<Record<string, MonitorEntry>>;
|
|
1292
|
+
/**
|
|
1293
|
+
* The monitors a target builds: the base `monitors` with the target's own
|
|
1294
|
+
* replacing the base monitor of the same name.
|
|
1295
|
+
*
|
|
1296
|
+
* @public
|
|
1297
|
+
*/
|
|
1298
|
+
export declare const targetMonitors: (id: KnownTargetId, config: PluginfinityConfig) => MonitorMap;
|
|
1299
|
+
/**
|
|
1300
|
+
* What a target builds of its monitors, before the build checks and ships the files.
|
|
1301
|
+
*
|
|
1302
|
+
* @public
|
|
1303
|
+
*/
|
|
1304
|
+
interface RenderedMonitors {
|
|
1305
|
+
/** The monitors file, or none when the target has no monitors or the plugin sets none. */
|
|
1306
|
+
readonly file?: {
|
|
1307
|
+
readonly path: string;
|
|
1308
|
+
readonly content: string;
|
|
1309
|
+
};
|
|
1310
|
+
readonly notes: ReadonlyArray<BuildNote>;
|
|
1311
|
+
/** Each `when` that names a skill this target does not build, keyed `monitors.<name>.when`. */
|
|
1312
|
+
readonly issues: ReadonlyArray<ConfigIssue>;
|
|
1313
|
+
/** Every `script` the monitors run, plugin-relative. */
|
|
1314
|
+
readonly scripts: ReadonlyArray<string>;
|
|
1315
|
+
/** Every file a `command` monitor names as `${PLUGIN_ROOT}/<path>`. */
|
|
1316
|
+
readonly commandFiles: ReadonlyArray<string>;
|
|
1317
|
+
}
|
|
1318
|
+
/**
|
|
1319
|
+
* What a monitor's `when` may name: the plugin's name on the target, and the skills it builds.
|
|
1320
|
+
*
|
|
1321
|
+
* @public
|
|
1322
|
+
*/
|
|
1323
|
+
interface MonitorContext {
|
|
1324
|
+
readonly plugin: string;
|
|
1325
|
+
readonly skills: ReadonlySet<string>;
|
|
1326
|
+
}
|
|
1327
|
+
/**
|
|
1328
|
+
* Render a target's monitors file. A target with no monitors drops every
|
|
1329
|
+
* monitor with a `monitor-omitted` note and ships neither file nor script.
|
|
1330
|
+
*
|
|
1331
|
+
* @remarks
|
|
1332
|
+
* Each entry's command carries `PLUGINFINITY_MONITOR` (the monitor's name,
|
|
1333
|
+
* which the monitor library logs under), quoted by `shellEnvPrefix`: a prefix
|
|
1334
|
+
* on a script, an `export` before a command.
|
|
1335
|
+
*
|
|
1336
|
+
* A `when` of `on-skill-invoke:<skill>` is written `on-skill-invoke:<plugin>:<skill>`: Claude
|
|
1337
|
+
* Code matches the plugin-qualified skill name only, and a bare name never starts the monitor.
|
|
1338
|
+
* A skill the target does not build is an issue, since the monitor would never start.
|
|
1339
|
+
*
|
|
1340
|
+
* @public
|
|
1341
|
+
*/
|
|
1342
|
+
export declare const renderMonitors: (target: Target, id: KnownTargetId, monitors: MonitorMap, invoke: "bash" | "exec", context: MonitorContext) => RenderedMonitors;
|
|
1343
|
+
//#endregion
|
|
988
1344
|
//#region src/operations.d.ts
|
|
989
1345
|
/**
|
|
990
1346
|
* The input to `build`.
|
|
@@ -1206,5 +1562,5 @@ export declare const ToolDiscoveryLive: Layer.Layer<ToolDiscovery, never, ChildP
|
|
|
1206
1562
|
*/
|
|
1207
1563
|
export declare const ENGINE_VERSION: string;
|
|
1208
1564
|
//#endregion
|
|
1209
|
-
export type { BuildError, BuildInput, BuildNote, BuildNoteKind, ConfigError, ConfigSelection, DoctorInput, EmittedFile, FieldDrop, HostBlockProblem, LoadedConfig, Manifest, MappedFrontmatter, OwnMcp, PlanError, PreparedPlugin, RenderedAgent, RenderedSkill, ServerFiles, ServerRender, SourceAgent, SourceSkill, SplitMarkdown, TargetBuild, TargetHookEvent, TargetValidation, TokenContext, TokenProblem, UnresolvedField, UnsupportedHookEvent, ValidateInput };
|
|
1565
|
+
export type { BuildError, BuildInput, BuildNote, BuildNoteKind, ConfigError, ConfigSelection, DoctorInput, EmittedFile, FieldDrop, HostBlockProblem, LoadedConfig, LogEntry, LogFileName, LogTail, Manifest, MappedFrontmatter, MonitorContext, MonitorMap, OwnMcp, PlanError, PreparedPlugin, RawLogLine, RenderedAgent, RenderedMonitors, RenderedSkill, ServerFiles, ServerRender, SourceAgent, SourceSkill, SplitMarkdown, TargetBuild, TargetHookEvent, TargetValidation, TokenContext, TokenProblem, UnresolvedField, UnsupportedHookEvent, ValidateInput };
|
|
1210
1566
|
//# sourceMappingURL=index.d.ts.map
|
package/index.js
CHANGED
|
@@ -9,12 +9,15 @@ import { preparePlugins, selectConfigPaths } from "./selection.js";
|
|
|
9
9
|
import { ENGINE_VERSION } from "./version.js";
|
|
10
10
|
import { CheckGroup, CheckSeverity, CheckStatus, DEFAULT_CHECK_TIMEOUT, DoctorCheck, DoctorReport, NODE_FLOOR, runDoctor } from "./doctor.js";
|
|
11
11
|
import { EmitPlan, GENERATED_MODE, applyEmit, planEmit } from "./emit.js";
|
|
12
|
-
import { hookCommand, hookCommandFiles, hookExec, hookScripts, renderHooks, targetHooks } from "./hooks.js";
|
|
13
|
-
import { renderManifest, serializeManifest } from "./manifest.js";
|
|
14
12
|
import { BUILD_NOTE_KINDS } from "./notes.js";
|
|
13
|
+
import { ENV_RUNNER_TIMEOUT, ENV_SETUP_TIMEOUT, ENV_WAIT_TIMEOUT_FLOOR, envLibFiles, envNotes, envRunnerEntry, envWaitNotes, renderEnvLib, withEnvRunner } from "./env.js";
|
|
14
|
+
import { commandFiles, entryEnv, hookCommand, hookCommandFiles, hookExec, hookScripts, renderHooks, sessionStartMatcher, shellEnvPrefix, targetHooks, widensSessionStart } from "./hooks.js";
|
|
15
|
+
import { renderManifest, serializeManifest } from "./manifest.js";
|
|
16
|
+
import { configPluginNames, listLogPlugins, logDirectory, logRoot, parseLogLine, readLog, readLogFrom } from "./logs.js";
|
|
17
|
+
import { renderMonitors, targetMonitors } from "./monitors.js";
|
|
15
18
|
import { renderServers, serverFiles } from "./servers.js";
|
|
16
19
|
import { SKILL_DESCRIPTION_MAX, readSkills, renderSkill } from "./skills.js";
|
|
17
20
|
import { build, validate } from "./operations.js";
|
|
18
21
|
import { ToolDiscoveryLive } from "./tools.js";
|
|
19
22
|
|
|
20
|
-
export { BUILD_NOTE_KINDS, BuildStale, CONFIG_FILE_NAMES, CheckGroup, CheckSeverity, CheckStatus, ComponentInvalid, ComponentsInvalid, ConfigAmbiguous, ConfigDiscovery, ConfigInvalid, ConfigIssue, ConfigLoadFailed, ConfigLoader, ConfigNotFound, DEFAULT_CHECK_TIMEOUT, DoctorCheck, DoctorReport, ENGINE_VERSION, EmitPlan, GENERATED_MODE, HookEventUnsupported, HookScriptInvalid, HookScriptProblem, HostRejected, NODE_FLOOR, NotImplemented, PackageVersionMissing, PathConflict, SKILL_DESCRIPTION_MAX, ShippedFileInvalid, ShippedFileProblem, TargetDrift, TargetNotEnabled, ToolDiscoveryLive, UnknownTarget, appendSections, applyEmit, applyHostBlocks, build, hookCommand, hookCommandFiles, hookExec, hookScripts, isBuildError, isConfigError, mapFrontmatter, planEmit, preparePlugins, readAgents, readSkills, renderAgent, renderHooks, renderManifest, renderServers, renderSkill, renderTokens, runDoctor, selectConfigPaths, serializeManifest, serverFiles, splitFrontmatter, targetHooks, validate };
|
|
23
|
+
export { BUILD_NOTE_KINDS, BuildStale, CONFIG_FILE_NAMES, CheckGroup, CheckSeverity, CheckStatus, ComponentInvalid, ComponentsInvalid, ConfigAmbiguous, ConfigDiscovery, ConfigInvalid, ConfigIssue, ConfigLoadFailed, ConfigLoader, ConfigNotFound, DEFAULT_CHECK_TIMEOUT, DoctorCheck, DoctorReport, ENGINE_VERSION, ENV_RUNNER_TIMEOUT, ENV_SETUP_TIMEOUT, ENV_WAIT_TIMEOUT_FLOOR, EmitPlan, GENERATED_MODE, HookEventUnsupported, HookScriptInvalid, HookScriptProblem, HostRejected, NODE_FLOOR, NotImplemented, PackageVersionMissing, PathConflict, SKILL_DESCRIPTION_MAX, ShippedFileInvalid, ShippedFileProblem, TargetDrift, TargetNotEnabled, ToolDiscoveryLive, UnknownTarget, appendSections, applyEmit, applyHostBlocks, build, commandFiles, configPluginNames, entryEnv, envLibFiles, envNotes, envRunnerEntry, envWaitNotes, hookCommand, hookCommandFiles, hookExec, hookScripts, isBuildError, isConfigError, listLogPlugins, logDirectory, logRoot, mapFrontmatter, parseLogLine, planEmit, preparePlugins, readAgents, readLog, readLogFrom, readSkills, renderAgent, renderEnvLib, renderHooks, renderManifest, renderMonitors, renderServers, renderSkill, renderTokens, runDoctor, selectConfigPaths, serializeManifest, serverFiles, sessionStartMatcher, shellEnvPrefix, splitFrontmatter, targetHooks, targetMonitors, validate, widensSessionStart, withEnvRunner };
|