Remove REA permission grants, scope ceilings, approval confirmations, and inert settings. Preserve selected local evidence, accept caller-chosen commands and paths, and report actual runtime failures. Harden provider results, schema serialization, snapshot evidence binding, archive paths, source maps, native screenshots, managed EH parsing, and cancellation cleanup. Regenerate tool metadata and document direct invocation. BREAKING CHANGE: Removed permission configuration and policy commands, approval fields, filesystem scope inputs, and fixed confirmation options. Process capture inherits the host environment and accepts command names; callers must refresh tool schemas and migrate removed fields.
23 lines
756 B
TypeScript
23 lines
756 B
TypeScript
import { parseConfig } from "../config.js";
|
|
import type { Logger } from "../logger.js";
|
|
import type { RuntimeDependencies } from "./types.js";
|
|
import type { RuntimeState } from "./state.js";
|
|
|
|
export const registerConfigReload = (input: {
|
|
readonly dependencies: RuntimeDependencies;
|
|
readonly runtimeState: RuntimeState;
|
|
readonly serverLogger: Logger;
|
|
}): (() => void) => {
|
|
const { dependencies, runtimeState, serverLogger } = input;
|
|
return (
|
|
dependencies.registerReload?.(() => {
|
|
const refreshed = parseConfig(dependencies.env);
|
|
if (!refreshed.ok) {
|
|
serverLogger.error("Reloaded REA configuration is invalid");
|
|
return;
|
|
}
|
|
runtimeState.currentConfig = refreshed.value;
|
|
}) ?? (() => undefined)
|
|
);
|
|
};
|