@agentrules/core 0.0.7 → 0.0.8
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/dist/index.d.ts +1 -1
- package/dist/index.js +4 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -373,7 +373,7 @@ declare function createDiffPreview(path: string, currentText: string, incomingTe
|
|
|
373
373
|
//#endregion
|
|
374
374
|
//#region src/utils/encoding.d.ts
|
|
375
375
|
declare function toPosixPath(pathValue: string): string;
|
|
376
|
-
declare function encodeUtf8(value: string): Uint8Array<
|
|
376
|
+
declare function encodeUtf8(value: string): Uint8Array<ArrayBufferLike>;
|
|
377
377
|
declare function decodeUtf8(payload: ArrayBuffer | ArrayBufferView): string;
|
|
378
378
|
declare function toUint8Array(payload: ArrayBuffer | ArrayBufferView): Uint8Array<ArrayBufferLike>;
|
|
379
379
|
|
package/dist/index.js
CHANGED
|
@@ -107,13 +107,16 @@ function toUint8Array(payload) {
|
|
|
107
107
|
|
|
108
108
|
//#endregion
|
|
109
109
|
//#region src/preset/schema.ts
|
|
110
|
+
const PLATFORM_ID_SET = new Set(PLATFORM_IDS);
|
|
110
111
|
const VERSION_REGEX = /^[1-9]\d*\.\d+$/;
|
|
111
112
|
const platformIdSchema = z.enum(PLATFORM_IDS);
|
|
112
113
|
const titleSchema = z.string().trim().min(1, "Title is required").max(80, "Title must be 80 characters or less");
|
|
113
114
|
const descriptionSchema = z.string().trim().min(1, "Description is required").max(500, "Description must be 500 characters or less");
|
|
114
115
|
const versionSchema = z.string().trim().regex(VERSION_REGEX, "Version must be in MAJOR.MINOR format (e.g., 1.3)");
|
|
115
116
|
const majorVersionSchema = z.number().int().positive("Major version must be a positive integer");
|
|
116
|
-
const
|
|
117
|
+
const TAG_REGEX = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
|
|
118
|
+
const TAG_ERROR = "Must be lowercase alphanumeric with hyphens (e.g., my-tag)";
|
|
119
|
+
const tagSchema = z.string().trim().min(1, "Tag cannot be empty").max(35, "Tag must be 35 characters or less").regex(TAG_REGEX, TAG_ERROR).refine((tag) => !PLATFORM_ID_SET.has(tag), { message: "Platform names cannot be used as tags (redundant with platform field)" });
|
|
117
120
|
const tagsSchema = z.array(tagSchema).min(1, "At least one tag is required").max(10, "Maximum 10 tags allowed");
|
|
118
121
|
const featureSchema = z.string().trim().min(1, "Feature cannot be empty").max(100, "Feature must be 100 characters or less");
|
|
119
122
|
const featuresSchema = z.array(featureSchema).max(5, "Maximum 5 features allowed");
|