mirror of
https://github.com/morluto/rea.git
synced 2026-11-11 01:13:39 +00:00
fix(mcp): advertise existing absolute path constraints
Reuse the schema-visible host path owner across session, firmware, managed, browser, Electron and Evidence-file inputs. Keep existing runtime and CLI path semantics. Refs #5493.
This commit is contained in:
1 parent
ee12d517a2
commit
0e83d92c58
9 files changed
+256
-86
No files matched your search
@@ -1,12 +1,6 @@
|
||||
import { z } from "zod";
|
||||
import { isAbsolute } from "node:path";
|
||||
import { absoluteLocalPathStringSchema } from "../localPath.js";
|
||||
|
||||
import { localPathStringSchema } from "../localPath.js";
|
||||
|
||||
const pathInputSchema = localPathStringSchema.refine(isAbsolute, {
|
||||
message:
|
||||
"Electron executable, application, and root paths must be absolute local filesystem paths (for example /Applications/Electron.app/Contents/MacOS/Electron)",
|
||||
});
|
||||
const absolutePathSchema = z
|
||||
.string()
|
||||
.min(1)
|
||||
@@ -66,13 +60,13 @@ const actionSchema = z.discriminatedUnion("kind", [
|
||||
|
||||
/** Input for one explicit, provider-owned Electron runtime experiment. */
|
||||
export const electronActiveObservationInputSchema = z.strictObject({
|
||||
executable_path: pathInputSchema.describe(
|
||||
executable_path: absoluteLocalPathStringSchema.describe(
|
||||
"Absolute local filesystem path for the Electron executable; relative paths are rejected.",
|
||||
),
|
||||
application_path: pathInputSchema.describe(
|
||||
application_path: absoluteLocalPathStringSchema.describe(
|
||||
"Absolute local filesystem path for the Electron application; relative paths are rejected.",
|
||||
),
|
||||
application_root: pathInputSchema
|
||||
application_root: absoluteLocalPathStringSchema
|
||||
.optional()
|
||||
.describe(
|
||||
"Absolute local filesystem root for application-relative paths; omit to derive it from the application path. Relative paths are rejected.",
|
||||
|
||||
Reference in new issue
Block a user