@claudexor/schema 3.4.0 → 3.4.1

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.
@@ -1,4 +1,14 @@
1
1
  import { z } from "zod/v3";
2
+ /**
3
+ * Rooted path in either family: POSIX `/x`, a drive-rooted Windows path
4
+ * (`C:\x`, `C:/x`), or a UNC share (`\\host\share\x`). Deliberately a REGEX,
5
+ * not a `node:path` refinement: `packages/schema` is a pure contract package
6
+ * and only a regex survives `schema:gen` as a JSON Schema `pattern`, so every
7
+ * wire consumer keeps the same rule the daemon enforces. Drive-relative
8
+ * (`C:x`) and root-relative (`\x`) spellings are refused — both resolve
9
+ * against per-process state, so they are not absolute evidence — as is NUL.
10
+ */
11
+ export declare const ABSOLUTE_PATH_PATTERN: RegExp;
2
12
  export declare const SetupLoginJobId: z.ZodString;
3
13
  export declare const SetupLoginExecutionId: z.ZodString;
4
14
  export declare const SetupLoginAbsolutePath: z.ZodString;
@@ -1 +1 @@
1
- {"version":3,"file":"setup-login-protocol.d.ts","sourceRoot":"","sources":["../src/setup-login-protocol.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAE3B,eAAO,MAAM,eAAe,aAA4C,CAAC;AACzE,eAAO,MAAM,qBAAqB,aAAsC,CAAC;AACzE,eAAO,MAAM,sBAAsB,aAA6B,CAAC;AAEjE,eAAO,MAAM,0BAA0B,4BAQpC,CAAC"}
1
+ {"version":3,"file":"setup-login-protocol.d.ts","sourceRoot":"","sources":["../src/setup-login-protocol.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAE3B;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,QACqE,CAAC;AAExG,eAAO,MAAM,eAAe,aAA4C,CAAC;AACzE,eAAO,MAAM,qBAAqB,aAAsC,CAAC;AACzE,eAAO,MAAM,sBAAsB,aAEjC,CAAC;AAEH,eAAO,MAAM,0BAA0B,4BAQpC,CAAC"}
@@ -1,7 +1,19 @@
1
1
  import { z } from "zod/v3";
2
+ /**
3
+ * Rooted path in either family: POSIX `/x`, a drive-rooted Windows path
4
+ * (`C:\x`, `C:/x`), or a UNC share (`\\host\share\x`). Deliberately a REGEX,
5
+ * not a `node:path` refinement: `packages/schema` is a pure contract package
6
+ * and only a regex survives `schema:gen` as a JSON Schema `pattern`, so every
7
+ * wire consumer keeps the same rule the daemon enforces. Drive-relative
8
+ * (`C:x`) and root-relative (`\x`) spellings are refused — both resolve
9
+ * against per-process state, so they are not absolute evidence — as is NUL.
10
+ */
11
+ export const ABSOLUTE_PATH_PATTERN = /^(?:\/[^\u0000]*|[A-Za-z]:[\\/][^\u0000]*|\\\\[^\\/\u0000]+[\\/][^\\/\u0000]+(?:[\\/][^\u0000]*)?)$/;
2
12
  export const SetupLoginJobId = z.string().regex(/^setup-[A-Za-z0-9-]+$/);
3
13
  export const SetupLoginExecutionId = z.string().regex(/^[A-Za-z0-9-]+$/);
4
- export const SetupLoginAbsolutePath = z.string().startsWith("/");
14
+ export const SetupLoginAbsolutePath = z.string().regex(ABSOLUTE_PATH_PATTERN, {
15
+ message: "must be an absolute POSIX or Windows path",
16
+ });
5
17
  export const SetupClientPtyPermitWaitMs = z
6
18
  .number()
7
19
  .int()
@@ -1 +1 @@
1
- {"version":3,"file":"setup-login-protocol.js","sourceRoot":"","sources":["../src/setup-login-protocol.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAE3B,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC;AACzE,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;AACzE,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,UA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