@modality-counter/core 0.1.6 → 0.1.7

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.
@@ -10,4 +10,4 @@
10
10
  /**
11
11
  * Setup category link validation tests - can be imported and reused in other projects
12
12
  */
13
- export declare function setupCategoryLinkValidation(): Promise<void>;
13
+ export declare function setupCategoryLinkValidation(baseDir: string): Promise<void>;
@@ -7,4 +7,4 @@
7
7
  /**
8
8
  * Setup method validation tests - can be imported and reused in other projects
9
9
  */
10
- export declare function setupMethodValidation(): Promise<void>;
10
+ export declare function setupMethodValidation(baseDir: string): Promise<void>;
@@ -0,0 +1 @@
1
+ export {};
@@ -7,4 +7,4 @@
7
7
  /**
8
8
  * Setup persona validation tests - can be imported and reused in other projects
9
9
  */
10
- export declare function setupPersonaValidation(): void;
10
+ export declare function setupPersonaValidation(baseDir: string): Promise<void>;
@@ -16,4 +16,4 @@
16
16
  /**
17
17
  * Setup template validation tests - can be imported and reused in other projects
18
18
  */
19
- export declare function setupTemplateValidation(): void;
19
+ export declare function setupTemplateValidation(baseDir: string): void;
@@ -1,25 +1,31 @@
1
- export { default as AnswerProtocol } from "./protocols/answer-protocol.mdx";
2
- export { default as BehaviorProtocol } from "./protocols/behavior-protocol.mdx";
3
- export { default as CleanCodeProtocol } from "./protocols/clean-code-protocol.mdx";
4
- export { default as CodesymbolProtocol } from "./protocols/codesymbol-protocol.mdx";
5
- export { default as CulturalLinguisticProtocol } from "./protocols/cultural-linguistic-protocol.mdx";
6
- export { default as FloamProtocol } from "./protocols/floam-protocol.mdx";
7
- export { default as PartyModeProtocol } from "./protocols/party-mode-protocol.mdx";
8
- export { default as TaiwanEcommerceProtocol } from "./protocols/taiwan-ecommerce-protocol.mdx";
9
- export { default as TwoStageProtocol } from "./protocols/two-stage-protocol.mdx";
10
1
  export { DeepWiki } from "./util_scripts/DeepWiki";
11
2
  export { MAX_CHAR_LENGTH } from "./confs/const";
12
3
  export { isGoogleBotDomain } from "./confs/domain-config";
13
4
  export { getPagination, needsChunking, getChunk, } from "./util_scripts/pagination";
14
5
  export { DEPLOY_METHOD_TOOL } from "./confs/const.js";
15
- export { getCounterContent, getAllCounterItems } from "./util_counter_data";
6
+ export { getCounterContent, getAllCounterItems, type CounterContent } from "./util_counter_data";
16
7
  export { setupMcpCounter } from "./mcp_counter";
17
- export { setupTemplateValidation } from "./__tests__/TemplateValidator.test.js";
18
- export { setupCategoryLinkValidation } from "./__tests__/CategoryLinkValidation.test.js";
19
- export { setupMethodValidation } from "./__tests__/MethodValidation.test.js";
20
- export { setupPersonaValidation } from "./__tests__/PersonaValidation.test.js";
21
8
  export { validateMethodFile } from "./schemas/methodology-validation.js";
22
9
  export { validateTemplateFile } from "./schemas/template-validation.js";
23
10
  export { validateProtocolFile } from "./schemas/protocol-validation.js";
24
11
  export { extractCodeBlocks, readMpxPrompt, readMpxYaml, readPrompt } from "./util_prompts";
25
12
  export { readMdx, importMdx } from "./util_mdx";
13
+ /**
14
+ * Test setups
15
+ */
16
+ export { setupCategoryLinkValidation } from "./__tests__/CategoryLinkValidation.test.js";
17
+ export { setupMethodValidation } from "./__tests__/MethodValidation.test.js";
18
+ export { setupPersonaValidation } from "./__tests__/PersonaValidation.test.js";
19
+ export { setupTemplateValidation } from "./__tests__/TemplateValidator.test.js";
20
+ /**
21
+ * Protocols
22
+ */
23
+ export { default as AnswerProtocol } from "./protocols/answer-protocol.mdx";
24
+ export { default as BehaviorProtocol } from "./protocols/behavior-protocol.mdx";
25
+ export { default as CleanCodeProtocol } from "./protocols/clean-code-protocol.mdx";
26
+ export { default as CodesymbolProtocol } from "./protocols/codesymbol-protocol.mdx";
27
+ export { default as CulturalLinguisticProtocol } from "./protocols/cultural-linguistic-protocol.mdx";
28
+ export { default as FloamProtocol } from "./protocols/floam-protocol.mdx";
29
+ export { default as PartyModeProtocol } from "./protocols/party-mode-protocol.mdx";
30
+ export { default as TaiwanEcommerceProtocol } from "./protocols/taiwan-ecommerce-protocol.mdx";
31
+ export { default as TwoStageProtocol } from "./protocols/two-stage-protocol.mdx";
@@ -90,10 +90,9 @@ declare const MethodologySchema: z.ZodObject<{
90
90
  export declare const MethodFileSchema: z.ZodObject<{
91
91
  method: z.ZodObject<{
92
92
  name: z.ZodString;
93
- title: z.ZodString;
94
93
  icon: z.ZodString;
95
94
  category: z.ZodString;
96
- description: z.ZodString;
95
+ introduce: z.ZodString;
97
96
  usage: z.ZodObject<{
98
97
  method: z.ZodString;
99
98
  parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
@@ -11,15 +11,13 @@ import type { PersonaValidationResult } from "./validation-types.js";
11
11
  * - Comprehensive validation rules for persona consistency and quality
12
12
  */
13
13
  declare const AgentSectionSchema: z.ZodObject<{
14
- name: z.ZodString;
15
14
  id: z.ZodString;
16
- title: z.ZodString;
17
15
  icon: z.ZodString;
16
+ introduce: z.ZodString;
17
+ acronym: z.ZodString;
18
18
  whenToUse: z.ZodArray<z.ZodString>;
19
- description: z.ZodString;
20
- }, z.core.$strip>;
19
+ }, z.core.$strict>;
21
20
  declare const PersonaSectionSchema: z.ZodObject<{
22
- role: z.ZodString;
23
21
  style: z.ZodString;
24
22
  identity: z.ZodString;
25
23
  focus: z.ZodString;
@@ -30,16 +28,16 @@ declare const PersonaSectionSchema: z.ZodObject<{
30
28
  }, unknown>>>>;
31
29
  }, z.core.$strict>;
32
30
  export declare const PersonaFileSchema: z.ZodObject<{
31
+ name: z.ZodString;
32
+ description: z.ZodString;
33
33
  agent: z.ZodObject<{
34
- name: z.ZodString;
35
34
  id: z.ZodString;
36
- title: z.ZodString;
37
35
  icon: z.ZodString;
36
+ introduce: z.ZodString;
37
+ acronym: z.ZodString;
38
38
  whenToUse: z.ZodArray<z.ZodString>;
39
- description: z.ZodString;
40
- }, z.core.$strip>;
39
+ }, z.core.$strict>;
41
40
  persona: z.ZodObject<{
42
- role: z.ZodString;
43
41
  style: z.ZodString;
44
42
  identity: z.ZodString;
45
43
  focus: z.ZodString;
@@ -53,7 +51,7 @@ export declare const PersonaFileSchema: z.ZodObject<{
53
51
  dependencies: z.ZodObject<{
54
52
  methods: z.ZodOptional<z.ZodArray<z.ZodString>>;
55
53
  }, z.core.$strict>;
56
- }, z.core.$strict>;
54
+ }, z.core.$catchall<z.ZodUnknown>>;
57
55
  export type PersonaFile = z.infer<typeof PersonaFileSchema>;
58
56
  export type AgentSection = z.infer<typeof AgentSectionSchema>;
59
57
  export type PersonaSection = z.infer<typeof PersonaSectionSchema>;
@@ -1,5 +1,8 @@
1
1
  import { z } from "zod";
2
- export declare const GenericProtocolSchema: z.ZodObject<{}, z.core.$catchall<z.ZodRecord<z.ZodString, z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
2
+ export declare const GenericProtocolSchema: z.ZodObject<{
3
+ name: z.ZodString;
4
+ description: z.ZodString;
5
+ }, z.core.$catchall<z.ZodRecord<z.ZodString, z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
3
6
  export type GenericProtocol = z.infer<typeof GenericProtocolSchema>;
4
7
  export declare function validateGenericProtocol(data: unknown): {
5
8
  success: boolean;
@@ -42,7 +42,10 @@ declare const TemplateSectionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
42
42
  type: z.ZodOptional<z.ZodString>;
43
43
  focus: z.ZodOptional<z.ZodString>;
44
44
  }, z.core.$catchall<z.ZodUnknown>>>;
45
- export declare const TemplateFileSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
45
+ export declare const TemplateFileSchema: z.ZodObject<{
46
+ name: z.ZodString;
47
+ description: z.ZodString;
48
+ }, z.core.$catchall<z.ZodObject<{
46
49
  template: z.ZodObject<{
47
50
  output: z.ZodOptional<z.ZodObject<{
48
51
  format: z.ZodOptional<z.ZodString>;
@@ -56,11 +59,11 @@ export declare const TemplateFileSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
56
59
  }, z.core.$strip>>;
57
60
  display_format: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
58
61
  }, z.core.$strict>;
59
- execution_flow: z.ZodOptional<z.ZodArray<z.ZodType<string | any[] | {
62
+ execution_flow: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodType<string | any[] | {
60
63
  [key: string]: any[];
61
64
  }, unknown, z.core.$ZodTypeInternals<string | any[] | {
62
65
  [key: string]: any[];
63
- }, unknown>>>>;
66
+ }, unknown>>>>>;
64
67
  sections: z.ZodRecord<z.ZodString, z.ZodObject<{
65
68
  title: z.ZodOptional<z.ZodString>;
66
69
  description: z.ZodOptional<z.ZodString>;
@@ -69,7 +72,7 @@ export declare const TemplateFileSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
69
72
  type: z.ZodOptional<z.ZodString>;
70
73
  focus: z.ZodOptional<z.ZodString>;
71
74
  }, z.core.$catchall<z.ZodUnknown>>>;
72
- }, z.core.$strict>>;
75
+ }, z.core.$strict>>>;
73
76
  export type TemplateFile = z.infer<typeof TemplateFileSchema>;
74
77
  export type TemplateOutput = z.infer<typeof TemplateOutputSchema>;
75
78
  export type OutputStructure = z.infer<typeof OutputStructureSchema>;
@@ -13,7 +13,7 @@ interface CounterItem {
13
13
  /**
14
14
  * Get content by ID - TypeScript Promise Detection Solution
15
15
  */
16
- interface CounterContent {
16
+ export interface CounterContent {
17
17
  promptData: Record<string, any>;
18
18
  scriptResult?: any;
19
19
  scriptSuccess?: boolean;
@@ -2,8 +2,9 @@ import React from "react";
2
2
  /**
3
3
  * Parse YAML frontmatter from markdown/mdx content
4
4
  * Returns object with parsed frontmatter data and remaining content
5
+ * Handles both Unix (\n) and Windows (\r\n) line endings
5
6
  */
6
- export declare function parseFrontmatter(content: string): Record<string, unknown>;
7
+ export declare function parseFrontmatter(content: string): Record<string, any>;
7
8
  export declare const readMdx: (Component: React.ReactElement) => string;
8
9
  export declare const importMdx: (filePath: string) => Promise<any>;
9
10
  export declare const getDirName: () => string;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.1.6",
2
+ "version": "0.1.7",
3
3
  "name": "@modality-counter/core",
4
4
  "repository": {
5
5
  "type": "git",