@modality-counter/core 1.7.3 → 1.8.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.
- package/dist/index.js +279 -277
- package/dist/types/__tests__/setupSingleMethodValidation.test.d.ts +1 -0
- package/dist/types/index.d.ts +9 -5
- package/dist/types/tools/setupMethodValidation.d.ts +6 -0
- package/dist/types/tools/setupSingleMethodValidation.d.ts +12 -0
- package/package.json +2 -2
- package/dist/types/__tests__/MethodValidation.test.d.ts +0 -10
- package/dist/types/tools/validate-counter.d.ts +0 -23
- /package/dist/types/{__tests__/CategoryLinkValidation.test.d.ts → tools/setupCategoryLinkValidation.d.ts} +0 -0
- /package/dist/types/{__tests__/PersonaValidation.test.d.ts → tools/setupPersonaValidation.d.ts} +0 -0
- /package/dist/types/{__tests__/TemplateValidator.test.d.ts → tools/setupTemplateValidation.d.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -17,12 +17,16 @@ export { validateProtocolFile } from "./schemas/protocol-validation.js";
|
|
|
17
17
|
export { extractCodeBlocks, extractYamlBlocks, readMdxPrompt, readMdxYaml, readPrompt, } from "./util_prompts";
|
|
18
18
|
export { readMdx, importMdx } from "./util_mdx";
|
|
19
19
|
/**
|
|
20
|
-
* Test setups
|
|
20
|
+
* Test setups (validation setup functions)
|
|
21
21
|
*/
|
|
22
|
-
export { setupCategoryLinkValidation } from "./
|
|
23
|
-
export { setupMethodValidation } from "./
|
|
24
|
-
export { setupPersonaValidation } from "./
|
|
25
|
-
export { setupTemplateValidation } from "./
|
|
22
|
+
export { setupCategoryLinkValidation } from "./tools/setupCategoryLinkValidation.js";
|
|
23
|
+
export { setupMethodValidation } from "./tools/setupMethodValidation.js";
|
|
24
|
+
export { setupPersonaValidation } from "./tools/setupPersonaValidation.js";
|
|
25
|
+
export { setupTemplateValidation } from "./tools/setupTemplateValidation.js";
|
|
26
|
+
/**
|
|
27
|
+
* Validation
|
|
28
|
+
*/
|
|
29
|
+
export { setupSingleMethodValidation } from "./tools/setupSingleMethodValidation.js";
|
|
26
30
|
/**
|
|
27
31
|
* Protocols
|
|
28
32
|
*/
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Strip runtime-added fields that aren't part of the file schema.
|
|
3
|
+
* Shared between setupSingleMethodValidation and its test suite.
|
|
4
|
+
*/
|
|
5
|
+
export declare function stripRuntimeFields(promptData: any): void;
|
|
6
|
+
/**
|
|
7
|
+
* Validate a single method file against the Zod schema.
|
|
8
|
+
* Follows the same describe/test pattern as setupMethodValidation.
|
|
9
|
+
*
|
|
10
|
+
* @param filePath - Absolute path to a method .mdx file
|
|
11
|
+
*/
|
|
12
|
+
export declare function setupSingleMethodValidation(filePath: string): void;
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.
|
|
2
|
+
"version": "1.8.1",
|
|
3
3
|
"name": "@modality-counter/core",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@mdx-js/esbuild": "^3.1.1",
|
|
23
|
-
"modality-ai": "^0.7.
|
|
23
|
+
"modality-ai": "^0.7.5",
|
|
24
24
|
"modality-kit": "^0.17.12",
|
|
25
25
|
"modality-safe": "^0.4.1",
|
|
26
26
|
"node-html-markdown": "^2.0.0",
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* General Method Validation Test Suite
|
|
3
|
-
*
|
|
4
|
-
* Validates ALL method files against the Zod schema.
|
|
5
|
-
* Uses getAllCounterItems for discovery, getCounterContent for data.
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Setup method validation tests - can be imported and reused in other projects
|
|
9
|
-
*/
|
|
10
|
-
export declare function setupMethodValidation(baseDir: string): Promise<void>;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* 🎯 Counter Universal Validation Tool - Zod Edition
|
|
4
|
-
*
|
|
5
|
-
* Modern TypeScript-first validation tool for Counter method and template files
|
|
6
|
-
* using Zod schemas for type-safe validation with excellent error messages.
|
|
7
|
-
*
|
|
8
|
-
* Usage:
|
|
9
|
-
* bun run validate-counter [--type=methods|templates|protocols|personas|all] [--report]
|
|
10
|
-
* bun run validate-counter --verify-protocols [--report]
|
|
11
|
-
*
|
|
12
|
-
* Features:
|
|
13
|
-
* - Type-safe validation with Zod schemas
|
|
14
|
-
* - Automatic TypeScript type generation
|
|
15
|
-
* - Superior error messages and debugging
|
|
16
|
-
* - Support for both flat array and nested object expected_output
|
|
17
|
-
* - Quality scoring and compliance assessment
|
|
18
|
-
*/
|
|
19
|
-
import type { MethodValidationResult, TemplateValidationResult } from "../schemas/validation-types.js";
|
|
20
|
-
export declare function calculateQualityScore(result: Pick<MethodValidationResult, "errors" | "warnings" | "advisories">): number;
|
|
21
|
-
export declare function calculateTemplateQualityScore(result: Pick<TemplateValidationResult, "errors" | "warnings" | "advisories">): number;
|
|
22
|
-
export declare function validateWithQuality(data: unknown, type: "method" | "template"): MethodValidationResult;
|
|
23
|
-
export declare function validateTemplateWithQuality(data: unknown): TemplateValidationResult;
|
|
File without changes
|
/package/dist/types/{__tests__/PersonaValidation.test.d.ts → tools/setupPersonaValidation.d.ts}
RENAMED
|
File without changes
|
/package/dist/types/{__tests__/TemplateValidator.test.d.ts → tools/setupTemplateValidation.d.ts}
RENAMED
|
File without changes
|