mycontext-cli 4.1.4 → 4.2.0
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/README.md +231 -12
- package/dist/README.md +231 -12
- package/dist/agents/implementations/ArchitectAgent.d.ts.map +1 -1
- package/dist/agents/implementations/ArchitectAgent.js +9 -1
- package/dist/agents/implementations/ArchitectAgent.js.map +1 -1
- package/dist/agents/implementations/BackendDevAgent.d.ts +1 -1
- package/dist/agents/implementations/BackendDevAgent.d.ts.map +1 -1
- package/dist/agents/implementations/BackendDevAgent.js +29 -16
- package/dist/agents/implementations/BackendDevAgent.js.map +1 -1
- package/dist/agents/implementations/CodeGenSubAgent.d.ts.map +1 -1
- package/dist/agents/implementations/CodeGenSubAgent.js +17 -9
- package/dist/agents/implementations/CodeGenSubAgent.js.map +1 -1
- package/dist/agents/implementations/EnhancementAgent.js.map +1 -1
- package/dist/agents/implementations/FeatureAssemblyAgent.d.ts +1 -1
- package/dist/agents/implementations/FeatureAssemblyAgent.d.ts.map +1 -1
- package/dist/agents/implementations/FeatureAssemblyAgent.js +10 -9
- package/dist/agents/implementations/FeatureAssemblyAgent.js.map +1 -1
- package/dist/agents/implementations/PromptConstructorAgent.d.ts.map +1 -1
- package/dist/agents/implementations/PromptConstructorAgent.js +26 -42
- package/dist/agents/implementations/PromptConstructorAgent.js.map +1 -1
- package/dist/clients/ProviderChain.d.ts +6 -65
- package/dist/clients/ProviderChain.d.ts.map +1 -1
- package/dist/clients/ProviderChain.js +34 -194
- package/dist/clients/ProviderChain.js.map +1 -1
- package/dist/commands/agent.js +1 -1
- package/dist/commands/agent.js.map +1 -1
- package/dist/commands/assemble-features.js +1 -1
- package/dist/commands/assemble-features.js.map +1 -1
- package/dist/commands/design-analyze.js +2 -2
- package/dist/commands/generate-context-files.d.ts.map +1 -1
- package/dist/commands/generate-context-files.js +13 -0
- package/dist/commands/generate-context-files.js.map +1 -1
- package/dist/commands/generate.d.ts +1 -0
- package/dist/commands/generate.d.ts.map +1 -1
- package/dist/commands/generate.js +96 -23
- package/dist/commands/generate.js.map +1 -1
- package/dist/commands/sync-readme.js +1 -1
- package/dist/commands/sync-readme.js.map +1 -1
- package/dist/core/agents/DependencySentinel.d.ts +15 -0
- package/dist/core/agents/DependencySentinel.d.ts.map +1 -0
- package/dist/core/agents/DependencySentinel.js +141 -0
- package/dist/core/agents/DependencySentinel.js.map +1 -0
- package/dist/core/ai/AICore.d.ts +48 -0
- package/dist/core/ai/AICore.d.ts.map +1 -0
- package/dist/core/ai/AICore.js +228 -0
- package/dist/core/ai/AICore.js.map +1 -0
- package/dist/core/brain/BrainClient.d.ts +16 -0
- package/dist/core/brain/BrainClient.d.ts.map +1 -0
- package/dist/core/brain/BrainClient.js +151 -0
- package/dist/core/brain/BrainClient.js.map +1 -0
- package/dist/package.json +6 -5
- package/dist/types/living-context.d.ts +76 -0
- package/dist/types/living-context.d.ts.map +1 -0
- package/dist/types/living-context.js +3 -0
- package/dist/types/living-context.js.map +1 -0
- package/dist/utils/FileGenerator.d.ts +9 -0
- package/dist/utils/FileGenerator.d.ts.map +1 -0
- package/dist/utils/FileGenerator.js +106 -0
- package/dist/utils/FileGenerator.js.map +1 -0
- package/dist/utils/NextJSProjectGenerator.d.ts.map +1 -1
- package/dist/utils/NextJSProjectGenerator.js +59 -0
- package/dist/utils/NextJSProjectGenerator.js.map +1 -1
- package/dist/utils/contextRenderer.d.ts +12 -0
- package/dist/utils/contextRenderer.d.ts.map +1 -0
- package/dist/utils/contextRenderer.js +105 -0
- package/dist/utils/contextRenderer.js.map +1 -0
- package/dist/utils/fileSystem.d.ts +4 -0
- package/dist/utils/fileSystem.d.ts.map +1 -1
- package/dist/utils/fileSystem.js +19 -0
- package/dist/utils/fileSystem.js.map +1 -1
- package/dist/utils/hybridAIClient.d.ts +12 -117
- package/dist/utils/hybridAIClient.d.ts.map +1 -1
- package/dist/utils/hybridAIClient.js +31 -750
- package/dist/utils/hybridAIClient.js.map +1 -1
- package/package.json +6 -5
|
@@ -1,133 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
export interface AIProviderConfig {
|
|
9
|
-
enabled: boolean;
|
|
10
|
-
priority: number;
|
|
11
|
-
models: Record<string, any>;
|
|
12
|
-
api: {
|
|
13
|
-
baseUrl: string;
|
|
14
|
-
timeout: number;
|
|
15
|
-
retries: number;
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
export interface AIConfig {
|
|
19
|
-
github: AIProviderConfig;
|
|
20
|
-
huggingface: AIProviderConfig;
|
|
21
|
-
fallback: AIProviderConfig;
|
|
22
|
-
xai?: AIProviderConfig;
|
|
23
|
-
openai?: AIProviderConfig;
|
|
24
|
-
claude?: AIProviderConfig;
|
|
25
|
-
qwen?: AIProviderConfig;
|
|
26
|
-
gemini?: AIProviderConfig;
|
|
27
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* HybridAIClient (Legacy Wrapper)
|
|
3
|
+
*
|
|
4
|
+
* This class is now a backward-compatibility layer that delegates to AICore.
|
|
5
|
+
* New code should use AICore.getInstance().getBestClient() directly.
|
|
6
|
+
*/
|
|
28
7
|
export declare class HybridAIClient {
|
|
29
|
-
private providers;
|
|
30
|
-
private currentProvider;
|
|
31
|
-
private config;
|
|
32
|
-
private static hasLoggedInitialization;
|
|
33
8
|
constructor();
|
|
34
|
-
|
|
35
|
-
* Load AI provider configuration
|
|
36
|
-
*/
|
|
37
|
-
private loadConfig;
|
|
38
|
-
/**
|
|
39
|
-
* Initialize available AI providers based on configuration
|
|
40
|
-
*/
|
|
41
|
-
private initializeProviders;
|
|
42
|
-
/**
|
|
43
|
-
* Get the best available provider
|
|
44
|
-
*/
|
|
45
|
-
private getBestProvider;
|
|
46
|
-
/**
|
|
47
|
-
* Expose current/next-best provider name for UX (e.g., spinner labels)
|
|
48
|
-
*/
|
|
9
|
+
private get client();
|
|
49
10
|
getActiveProviderName(): Promise<string>;
|
|
50
|
-
/**
|
|
51
|
-
* Best-effort model name for generic text generation per provider
|
|
52
|
-
*/
|
|
53
11
|
getActiveTextModelName(): Promise<string>;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
*/
|
|
57
|
-
generateComponentRefinement(componentCode: string, prompt: string, options?: any): Promise<{
|
|
58
|
-
code: string;
|
|
12
|
+
generateText(prompt: string, options?: any): Promise<{
|
|
13
|
+
text: string;
|
|
59
14
|
provider: string;
|
|
60
|
-
explanation?: string;
|
|
61
15
|
}>;
|
|
62
|
-
/**
|
|
63
|
-
* Generate new component using the best available provider
|
|
64
|
-
*/
|
|
65
16
|
generateComponent(prompt: string, options?: any): Promise<{
|
|
66
17
|
code: string;
|
|
67
18
|
provider: string;
|
|
68
19
|
explanation?: string;
|
|
69
20
|
}>;
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
* Generate generic text (used for PRD, types, brand, etc.)
|
|
73
|
-
*/
|
|
74
|
-
generateText(prompt: string, options?: any, attemptedProviders?: Set<string>): Promise<{
|
|
75
|
-
text: string;
|
|
21
|
+
generateComponentRefinement(componentCode: string, prompt: string, options?: any): Promise<{
|
|
22
|
+
code: string;
|
|
76
23
|
provider: string;
|
|
24
|
+
explanation?: string;
|
|
77
25
|
}>;
|
|
78
|
-
/**
|
|
79
|
-
* Parse AI response to separate code from explanation
|
|
80
|
-
* Enhanced with better pattern matching and truncation handling
|
|
81
|
-
*/
|
|
82
26
|
private parseAIResponse;
|
|
83
|
-
/**
|
|
84
|
-
* Get provider status
|
|
85
|
-
*/
|
|
86
|
-
getProviderStatus(): Promise<Array<{
|
|
87
|
-
name: string;
|
|
88
|
-
available: boolean;
|
|
89
|
-
priority: number;
|
|
90
|
-
}>>;
|
|
91
|
-
/**
|
|
92
|
-
* Set Hugging Face API key
|
|
93
|
-
*/
|
|
94
|
-
setHuggingFaceApiKey(apiKey: string): void;
|
|
95
|
-
/**
|
|
96
|
-
* Set OpenAI API key
|
|
97
|
-
*/
|
|
98
|
-
setOpenAIApiKey(apiKey: string): void;
|
|
99
|
-
/**
|
|
100
|
-
* Set Claude API key
|
|
101
|
-
*/
|
|
102
|
-
setClaudeApiKey(apiKey: string): void;
|
|
103
|
-
/**
|
|
104
|
-
* Set Gemini API key
|
|
105
|
-
*/
|
|
106
|
-
setGeminiApiKey(apiKey: string): void;
|
|
107
|
-
getAvailableProviders(): Promise<AIProvider[]>;
|
|
108
|
-
getAllProviders(): Promise<AIProvider[]>;
|
|
109
|
-
/**
|
|
110
|
-
* Set Claude Agent API key
|
|
111
|
-
*/
|
|
112
|
-
setClaudeAgentApiKey(apiKey: string): void;
|
|
113
|
-
/**
|
|
114
|
-
* Generate component using Claude Agent SDK with enhanced context
|
|
115
|
-
*/
|
|
116
|
-
generateComponentWithAgent(prompt: string, context?: any, options?: any): Promise<string>;
|
|
117
|
-
/**
|
|
118
|
-
* Run agent workflow with Claude Agent SDK
|
|
119
|
-
*/
|
|
120
|
-
runAgentWorkflow(workflowPrompt: string, context?: any, options?: any): Promise<{
|
|
121
|
-
content: string;
|
|
122
|
-
context: any;
|
|
123
|
-
}>;
|
|
124
|
-
/**
|
|
125
|
-
* Check if Claude Agent SDK is available
|
|
126
|
-
*/
|
|
127
|
-
isClaudeAgentAvailable(): Promise<boolean>;
|
|
128
|
-
/**
|
|
129
|
-
* Get Claude Agent SDK client if available
|
|
130
|
-
*/
|
|
131
|
-
getClaudeAgentClient(): ClaudeAgentClient | null;
|
|
132
27
|
}
|
|
133
28
|
//# sourceMappingURL=hybridAIClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hybridAIClient.d.ts","sourceRoot":"","sources":["../../src/utils/hybridAIClient.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hybridAIClient.d.ts","sourceRoot":"","sources":["../../src/utils/hybridAIClient.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,qBAAa,cAAc;;IAazB,OAAO,KAAK,MAAM,GAEjB;IAEK,qBAAqB,IAAI,OAAO,CAAC,MAAM,CAAC;IAKxC,sBAAsB,IAAI,OAAO,CAAC,MAAM,CAAC;IAIzC,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,GAAE,GAAQ,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IAK5F,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,GAAE,GAAQ,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAMvH,2BAA2B,CAC/B,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,GAAQ,GAChB,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAMpE,OAAO,CAAC,eAAe;CAuBxB"}
|