claude-flow-novice 1.5.20 → 1.5.22

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.
Files changed (25) hide show
  1. package/.claude/agents/CLAUDE.md +186 -2386
  2. package/.claude/agents/agent-principles/agent-type-guidelines.md +328 -0
  3. package/.claude/agents/agent-principles/format-selection.md +204 -0
  4. package/.claude/agents/agent-principles/prompt-engineering.md +371 -0
  5. package/.claude/agents/agent-principles/quality-metrics.md +294 -0
  6. package/.claude/agents/frontend/README.md +640 -0
  7. package/.claude/agents/frontend/interaction-tester.md +879 -0
  8. package/.claude/agents/frontend/react-frontend-engineer.md +130 -0
  9. package/.claude/agents/frontend/state-architect.md +250 -0
  10. package/.claude/agents/frontend/ui-designer.md +325 -0
  11. package/.claude/agents/researcher.md +1 -1
  12. package/.claude/agents/swarm/test-coordinator.md +383 -0
  13. package/.claude/agents/task-coordinator.md +126 -0
  14. package/.claude/settings.json +7 -7
  15. package/.claude-flow-novice/dist/src/hooks/enhanced-hooks-cli.js +168 -167
  16. package/.claude-flow-novice/dist/src/providers/tiered-router.js +118 -0
  17. package/.claude-flow-novice/dist/src/providers/tiered-router.js.map +1 -0
  18. package/.claude-flow-novice/dist/src/providers/types.js.map +1 -1
  19. package/.claude-flow-novice/dist/src/providers/zai-provider.js +268 -0
  20. package/.claude-flow-novice/dist/src/providers/zai-provider.js.map +1 -0
  21. package/package.json +1 -1
  22. package/src/cli/simple-commands/init/templates/CLAUDE.md +25 -0
  23. package/src/hooks/enhanced-hooks-cli.js +23 -3
  24. package/src/hooks/enhanced-post-edit-pipeline.js +154 -75
  25. /package/.claude/agents/{CLAUDE_AGENT_DESIGN_PRINCIPLES.md → agent-principles/CLAUDE_AGENT_DESIGN_PRINCIPLES.md} +0 -0
@@ -1,168 +1,169 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * Enhanced Hooks CLI for Claude Flow Novice
5
- *
6
- * Wrapper for the unified post-edit-pipeline.js
7
- * Provides backward compatibility with enhanced-hooks command
8
- */
9
-
10
- import { spawn } from 'child_process';
11
- import { fileURLToPath } from 'url';
12
- import { dirname, join } from 'path';
13
-
14
- const __filename = fileURLToPath(import.meta.url);
15
- const __dirname = dirname(__filename);
16
-
17
- // Enhanced hooks CLI interface
18
- export async function enhancedHooksCLI() {
19
- const args = process.argv.slice(2);
20
- const command = args[0];
21
-
22
- if (!command || command === '--help' || command === '-h') {
23
- console.log(`
24
- 🚀 Enhanced Hooks CLI for Claude Flow Novice - v2.0.0
25
-
26
- Available commands:
27
- post-edit <file> [options] Enhanced post-edit with TDD testing
28
- enhanced-post-edit <file> [options] Alias for post-edit
29
-
30
- Options:
31
- --memory-key <key> Store results with specific memory key
32
- --format Analyze formatting (default: true)
33
- --validate Run validation (default: true)
34
- --enable-tdd Enable TDD testing (default: true)
35
- --minimum-coverage <percent> Minimum coverage threshold (default: 80)
36
- --block-on-critical Block execution on critical errors
37
- --structured Return structured JSON data
38
- --generate-recommendations Generate actionable recommendations (default: true)
39
-
40
- Examples:
41
- npx claude-flow-novice enhanced-hooks post-edit src/app.js --memory-key "swarm/coder/step-1"
42
- npx claude-flow-novice enhanced-hooks post-edit test.js --minimum-coverage 90 --structured
43
-
44
- Enhanced Features:
45
- ✅ TDD testing with single-file execution
46
- ✅ Real-time coverage analysis and diff reporting
47
- ✅ Advanced multi-language validation with error locations
48
- ✅ Formatting diff preview and change detection
49
- ✅ Actionable recommendations by category
50
- ✅ Blocking mechanisms for critical failures
51
- ✅ Enhanced memory store with versioning
52
- `);
53
- return;
54
- }
55
-
56
- if (command === 'post-edit' || command === 'enhanced-post-edit') {
57
- const file = args[1];
58
- if (!file) {
59
- console.log('❌ File path required for post-edit hook');
60
- return;
61
- }
62
-
63
- // Build unified pipeline command with TDD mode enabled by default
64
- // Use process.cwd() to find config/hooks in the actual project, not dist
65
- const pipelinePath = join(process.cwd(), 'config/hooks/post-edit-pipeline.js');
66
- const pipelineArgs = [file, '--tdd-mode'];
67
-
68
- // Pass through all relevant flags
69
- if (args.includes('--memory-key')) {
70
- const idx = args.indexOf('--memory-key');
71
- pipelineArgs.push('--memory-key', args[idx + 1]);
72
- }
73
- if (args.includes('--minimum-coverage')) {
74
- const idx = args.indexOf('--minimum-coverage');
75
- pipelineArgs.push('--minimum-coverage', args[idx + 1]);
76
- }
77
- if (args.includes('--block-on-critical')) {
78
- pipelineArgs.push('--block-on-tdd-violations');
79
- }
80
- if (args.includes('--structured')) {
81
- // Structured output is default in unified pipeline
82
- }
83
-
84
- // Execute unified pipeline
85
- const proc = spawn('node', [pipelinePath, ...pipelineArgs], {
86
- stdio: 'inherit',
87
- cwd: process.cwd()
88
- });
89
-
90
- proc.on('close', (code) => {
91
- process.exit(code || 0);
92
- });
93
-
94
- proc.on('error', (error) => {
95
- console.error(`❌ Failed to execute unified pipeline: ${error.message}`);
96
- process.exit(1);
97
- });
98
-
99
- } else {
100
- console.log(`❌ Unknown command: ${command}`);
101
- console.log('Use --help for available commands');
102
- process.exit(1);
103
- }
104
- }
105
-
106
- // Enhanced hooks function for programmatic use (delegates to unified pipeline)
107
- export async function enhancedPostEdit(file, memoryKey = null, options = {}) {
108
- return new Promise((resolve, reject) => {
109
- const pipelinePath = join(process.cwd(), 'config/hooks/post-edit-pipeline.js');
110
- const args = [file, '--tdd-mode'];
111
-
112
- if (memoryKey) args.push('--memory-key', memoryKey);
113
- if (options.minimumCoverage) args.push('--minimum-coverage', options.minimumCoverage.toString());
114
- if (options.blockOnCritical) args.push('--block-on-tdd-violations');
115
-
116
- const proc = spawn('node', [pipelinePath, ...args], {
117
- stdio: 'pipe',
118
- cwd: process.cwd()
119
- });
120
-
121
- let stdout = '';
122
- let stderr = '';
123
-
124
- proc.stdout.on('data', (data) => stdout += data.toString());
125
- proc.stderr.on('data', (data) => stderr += data.toString());
126
-
127
- proc.on('close', (code) => {
128
- resolve({
129
- success: code === 0,
130
- file,
131
- memoryKey,
132
- timestamp: new Date().toISOString(),
133
- output: stdout,
134
- error: stderr,
135
- exitCode: code
136
- });
137
- });
138
-
139
- proc.on('error', (error) => {
140
- reject(error);
141
- });
142
- });
143
- }
144
-
145
- // Backward compatibility function (delegates to unified pipeline)
146
- export async function legacyPostEditHook(file, memoryKey = null, options = {}) {
147
- const result = await enhancedPostEdit(file, memoryKey, options);
148
-
149
- return {
150
- success: result.success,
151
- file: result.file,
152
- timestamp: result.timestamp,
153
- formatted: true,
154
- validated: result.success,
155
- recommendations: 0,
156
- enhanced: true,
157
- legacy: true,
158
- unified: true
159
- };
160
- }
161
-
162
- // Run CLI if called directly
163
- if (import.meta.url === `file://${process.argv[1]}`) {
164
- enhancedHooksCLI().catch(error => {
165
- console.error(`💥 Fatal error: ${error.message}`);
166
- process.exit(1);
167
- });
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Enhanced Hooks CLI for Claude Flow Novice
5
+ *
6
+ * Wrapper for the unified post-edit-pipeline.js
7
+ * Provides backward compatibility with enhanced-hooks command
8
+ */
9
+
10
+ import { spawn } from 'child_process';
11
+ import { fileURLToPath } from 'url';
12
+ import { dirname, join } from 'path';
13
+
14
+ const __filename = fileURLToPath(import.meta.url);
15
+ const __dirname = dirname(__filename);
16
+
17
+ // Enhanced hooks CLI interface
18
+ export async function enhancedHooksCLI() {
19
+ const args = process.argv.slice(2);
20
+ const command = args[0];
21
+
22
+ if (!command || command === '--help' || command === '-h') {
23
+ console.log(`
24
+ 🚀 Enhanced Hooks CLI for Claude Flow Novice - v2.0.0
25
+
26
+ Available commands:
27
+ post-edit <file> [options] Enhanced post-edit with TDD testing
28
+ enhanced-post-edit <file> [options] Alias for post-edit
29
+
30
+ Options:
31
+ --memory-key <key> Store results with specific memory key
32
+ --format Analyze formatting (default: true)
33
+ --validate Run validation (default: true)
34
+ --enable-tdd Enable TDD testing (default: true)
35
+ --minimum-coverage <percent> Minimum coverage threshold (default: 80)
36
+ --block-on-critical Block execution on critical errors
37
+ --structured Return structured JSON data
38
+ --generate-recommendations Generate actionable recommendations (default: true)
39
+
40
+ Examples:
41
+ npx claude-flow-novice enhanced-hooks post-edit src/app.js --memory-key "swarm/coder/step-1"
42
+ npx claude-flow-novice enhanced-hooks post-edit test.js --minimum-coverage 90 --structured
43
+
44
+ Enhanced Features:
45
+ ✅ TDD testing with single-file execution
46
+ ✅ Real-time coverage analysis and diff reporting
47
+ ✅ Advanced multi-language validation with error locations
48
+ ✅ Formatting diff preview and change detection
49
+ ✅ Actionable recommendations by category
50
+ ✅ Blocking mechanisms for critical failures
51
+ ✅ Enhanced memory store with versioning
52
+ `);
53
+ return;
54
+ }
55
+
56
+ if (command === 'post-edit' || command === 'enhanced-post-edit') {
57
+ const file = args[1];
58
+ if (!file) {
59
+ console.log('❌ File path required for post-edit hook');
60
+ return;
61
+ }
62
+
63
+ // Build unified pipeline command with TDD mode enabled by default
64
+ // Use __dirname to find config/hooks in the installed package location
65
+ // Path: .claude-flow-novice/dist/src/hooks -> ../../../../config/hooks
66
+ const pipelinePath = join(__dirname, '../../../../config/hooks/post-edit-pipeline.js');
67
+ const pipelineArgs = [file, '--tdd-mode'];
68
+
69
+ // Pass through all relevant flags
70
+ if (args.includes('--memory-key')) {
71
+ const idx = args.indexOf('--memory-key');
72
+ pipelineArgs.push('--memory-key', args[idx + 1]);
73
+ }
74
+ if (args.includes('--minimum-coverage')) {
75
+ const idx = args.indexOf('--minimum-coverage');
76
+ pipelineArgs.push('--minimum-coverage', args[idx + 1]);
77
+ }
78
+ if (args.includes('--block-on-critical')) {
79
+ pipelineArgs.push('--block-on-tdd-violations');
80
+ }
81
+ if (args.includes('--structured')) {
82
+ // Structured output is default in unified pipeline
83
+ }
84
+
85
+ // Execute unified pipeline
86
+ const proc = spawn('node', [pipelinePath, ...pipelineArgs], {
87
+ stdio: 'inherit',
88
+ cwd: process.cwd()
89
+ });
90
+
91
+ proc.on('close', (code) => {
92
+ process.exit(code || 0);
93
+ });
94
+
95
+ proc.on('error', (error) => {
96
+ console.error(`❌ Failed to execute unified pipeline: ${error.message}`);
97
+ process.exit(1);
98
+ });
99
+
100
+ } else {
101
+ console.log(`❌ Unknown command: ${command}`);
102
+ console.log('Use --help for available commands');
103
+ process.exit(1);
104
+ }
105
+ }
106
+
107
+ // Enhanced hooks function for programmatic use (delegates to unified pipeline)
108
+ export async function enhancedPostEdit(file, memoryKey = null, options = {}) {
109
+ return new Promise((resolve, reject) => {
110
+ const pipelinePath = join(process.cwd(), 'config/hooks/post-edit-pipeline.js');
111
+ const args = [file, '--tdd-mode'];
112
+
113
+ if (memoryKey) args.push('--memory-key', memoryKey);
114
+ if (options.minimumCoverage) args.push('--minimum-coverage', options.minimumCoverage.toString());
115
+ if (options.blockOnCritical) args.push('--block-on-tdd-violations');
116
+
117
+ const proc = spawn('node', [pipelinePath, ...args], {
118
+ stdio: 'pipe',
119
+ cwd: process.cwd()
120
+ });
121
+
122
+ let stdout = '';
123
+ let stderr = '';
124
+
125
+ proc.stdout.on('data', (data) => stdout += data.toString());
126
+ proc.stderr.on('data', (data) => stderr += data.toString());
127
+
128
+ proc.on('close', (code) => {
129
+ resolve({
130
+ success: code === 0,
131
+ file,
132
+ memoryKey,
133
+ timestamp: new Date().toISOString(),
134
+ output: stdout,
135
+ error: stderr,
136
+ exitCode: code
137
+ });
138
+ });
139
+
140
+ proc.on('error', (error) => {
141
+ reject(error);
142
+ });
143
+ });
144
+ }
145
+
146
+ // Backward compatibility function (delegates to unified pipeline)
147
+ export async function legacyPostEditHook(file, memoryKey = null, options = {}) {
148
+ const result = await enhancedPostEdit(file, memoryKey, options);
149
+
150
+ return {
151
+ success: result.success,
152
+ file: result.file,
153
+ timestamp: result.timestamp,
154
+ formatted: true,
155
+ validated: result.success,
156
+ recommendations: 0,
157
+ enhanced: true,
158
+ legacy: true,
159
+ unified: true
160
+ };
161
+ }
162
+
163
+ // Run CLI if called directly
164
+ if (import.meta.url === `file://${process.argv[1]}`) {
165
+ enhancedHooksCLI().catch(error => {
166
+ console.error(`💥 Fatal error: ${error.message}`);
167
+ process.exit(1);
168
+ });
168
169
  }
@@ -0,0 +1,118 @@
1
+ /**
2
+ * Tiered Provider Router
3
+ * Routes agents to appropriate LLM providers based on tier configuration
4
+ */ // ===== TIER DEFINITIONS =====
5
+ const TIER_CONFIGS = [
6
+ {
7
+ name: "Tier 1: Subscription",
8
+ provider: "anthropic",
9
+ agentTypes: [
10
+ "coordinator",
11
+ "architect",
12
+ "system-architect"
13
+ ],
14
+ priority: 1,
15
+ subscriptionLimit: 1000
16
+ },
17
+ {
18
+ name: "Tier 2: Anthropic API",
19
+ provider: "anthropic",
20
+ agentTypes: [],
21
+ priority: 2
22
+ },
23
+ {
24
+ name: "Tier 3: Z.ai",
25
+ provider: "custom",
26
+ agentTypes: [
27
+ "coder",
28
+ "tester",
29
+ "reviewer"
30
+ ],
31
+ priority: 3
32
+ }
33
+ ];
34
+ // ===== TIERED PROVIDER ROUTER =====
35
+ export class TieredProviderRouter {
36
+ subscriptionUsage;
37
+ tierConfigs;
38
+ constructor(tierConfigs = TIER_CONFIGS, initialUsage = {}){
39
+ this.tierConfigs = tierConfigs.sort((a, b)=>a.priority - b.priority);
40
+ this.subscriptionUsage = {
41
+ used: initialUsage.used || 0,
42
+ limit: initialUsage.limit || 1000,
43
+ resetDate: initialUsage.resetDate || this.getNextResetDate()
44
+ };
45
+ }
46
+ /**
47
+ * Select provider based on agent type and tier rules
48
+ */ async selectProvider(agentType) {
49
+ // Find matching tier for agent type
50
+ for (const tier of this.tierConfigs){
51
+ if (tier.agentTypes.includes(agentType)) {
52
+ // Check subscription limits for Tier 1
53
+ if (tier.priority === 1 && tier.subscriptionLimit) {
54
+ if (this.hasSubscriptionCapacity()) {
55
+ this.consumeSubscription();
56
+ return tier.provider;
57
+ }
58
+ continue;
59
+ }
60
+ return tier.provider;
61
+ }
62
+ }
63
+ // Default fallback to Tier 2 (Anthropic API)
64
+ const fallbackTier = this.tierConfigs.find((t)=>t.priority === 2);
65
+ return fallbackTier?.provider || "anthropic";
66
+ }
67
+ /**
68
+ * Check if subscription has capacity
69
+ */ hasSubscriptionCapacity() {
70
+ // Reset usage if past reset date
71
+ if (new Date() >= this.subscriptionUsage.resetDate) {
72
+ this.resetSubscriptionUsage();
73
+ }
74
+ return this.subscriptionUsage.used < this.subscriptionUsage.limit;
75
+ }
76
+ /**
77
+ * Consume subscription quota
78
+ */ consumeSubscription() {
79
+ this.subscriptionUsage.used++;
80
+ }
81
+ /**
82
+ * Reset subscription usage
83
+ */ resetSubscriptionUsage() {
84
+ this.subscriptionUsage.used = 0;
85
+ this.subscriptionUsage.resetDate = this.getNextResetDate();
86
+ }
87
+ /**
88
+ * Get next reset date (30 days from now)
89
+ */ getNextResetDate() {
90
+ const now = new Date();
91
+ return new Date(now.getFullYear(), now.getMonth() + 1, now.getDate());
92
+ }
93
+ /**
94
+ * Get current subscription usage
95
+ */ getSubscriptionUsage() {
96
+ return {
97
+ ...this.subscriptionUsage
98
+ };
99
+ }
100
+ /**
101
+ * Get tier configuration for agent type
102
+ */ getTierForAgentType(agentType) {
103
+ return this.tierConfigs.find((tier)=>tier.agentTypes.includes(agentType));
104
+ }
105
+ /**
106
+ * Get all tier configurations
107
+ */ getTierConfigs() {
108
+ return [
109
+ ...this.tierConfigs
110
+ ];
111
+ }
112
+ }
113
+ // ===== FACTORY =====
114
+ export function createTieredRouter(customTiers, initialUsage) {
115
+ return new TieredProviderRouter(customTiers, initialUsage);
116
+ }
117
+
118
+ //# sourceMappingURL=tiered-router.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/providers/tiered-router.ts"],"names":["TIER_CONFIGS","name","provider","agentTypes","priority","subscriptionLimit","TieredProviderRouter","subscriptionUsage","tierConfigs","initialUsage","sort","a","b","used","limit","resetDate","getNextResetDate","selectProvider","agentType","tier","includes","hasSubscriptionCapacity","consumeSubscription","fallbackTier","find","t","Date","resetSubscriptionUsage","now","getFullYear","getMonth","getDate","getSubscriptionUsage","getTierForAgentType","getTierConfigs","createTieredRouter","customTiers"],"mappings":"AAAA;;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crB,YAAY;IACnC;IAEA;;GAEC,GACD,AAAQmB,0BAAmC;QACzC,iCAAiC;QACjC,IAAI,IAAIK,UAAU,IAAI,CAACnB,iBAAiB,CAACQ,SAAS,EAAE;YAClD,IAAI,CAACY,sBAAsB;QAC7B;QAEA,OAAO,IAAI,CAACpB,iBAAiB,CAACM,IAAI,GAAG,IAAI,CAACN,iBAAiB,CAACO,KAAK;IACnE;IAEA;;GAEC,GACD,AAAQQ,sBAA4B;QAClC,IAAI,CAACf,iBAAiB,CAACM,IAAI;IAC7B;IAEA;;GAEC,GACD,AAAQc,yBAA+B;QACrC,IAAI,CAACpB,iBAAiB,CAACM,IAAI,GAAG;QAC9B,IAAI,CAACN,iBAAiB,CAACQ,SAAS,GAAG,IAAI,CAACC,gBAAgB;IAC1D;IAEA;;GAEC,GACD,AAAQA,mBAAyB;QAC/B,MAAMY,MAAM,IAAIF;QAChB,OAAO,IAAIA,KAAKE,IAAIC,WAAW,IAAID,IAAIE,QAAQ,KAAK,GAAGF,IAAIG,OAAO;IACpE;IAEA;;GAEC,GACDC,uBAA0C;QACxC,OAAO;YAAE,GAAG,IAAI,CAACzB,iBAAiB;QAAC;IACrC;IAEA;;GAEC,GACD0B,oBAAoBf,SAAiB,EAA0B;QAC7D,OAAO,IAAI,CAACV,WAAW,CAACgB,IAAI,CAAC,CAACL,OAASA,KAAKhB,UAAU,CAACiB,QAAQ,CAACF;IAClE;IAEA;;GAEC,GACDgB,iBAA+B;QAC7B,OAAO;eAAI,IAAI,CAAC1B,WAAW;SAAC;IAC9B;AACF;AAEA,sBAAsB;AAEtB,OAAO,SAAS2B,mBACdC,WAA0B,EAC1B3B,YAAyC;IAEzC,OAAO,IAAIH,qBAAqB8B,aAAa3B;AAC/C"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/providers/types.ts"],"names":["LLMProviderError","Error","message","code","provider","statusCode","retryable","details","name","RateLimitError","retryAfter","AuthenticationError","ModelNotFoundError","model","ProviderUnavailableError","isLLMResponse","obj","id","content","isLLMStreamEvent","type","isLLMProviderError","error","isRateLimitError"],"mappings":"AAAA;;;CAGC,GA0ND,6BAA6B;AAE7B,OAAO,MAAMA,yBAAyBC;;;;;;IACpC,YACEC,OAAe,EACf,AAAOC,IAAY,EACnB,AAAOC,QAAqB,EAC5B,AAAOC,UAAmB,EAC1B,AAAOC,YAAqB,IAAI,EAChC,AAAOC,OAAa,CACpB;QACA,KAAK,CAACL,eANCC,OAAAA,WACAC,WAAAA,eACAC,aAAAA,iBACAC,YAAAA,gBACAC,UAAAA;QAGP,IAAI,CAACC,IAAI,GAAG;IACd;AACF;AAEA,OAAO,MAAMC,uBAAuBT;;IAClC,YACEE,OAAe,EACfE,QAAqB,EACrB,AAAOM,UAAmB,EAC1BH,OAAa,CACb;QACA,KAAK,CAACL,SAAS,cAAcE,UAAU,KAAK,MAAMG,eAH3CG,aAAAA;QAIP,IAAI,CAACF,IAAI,GAAG;IACd;AACF;AAEA,OAAO,MAAMG,4BAA4BX;IACvC,YAAYE,OAAe,EAAEE,QAAqB,EAAEG,OAAa,CAAE;QACjE,KAAK,CAACL,SAAS,kBAAkBE,UAAU,KAAK,OAAOG;QACvD,IAAI,CAACC,IAAI,GAAG;IACd;AACF;AAEA,OAAO,MAAMI,2BAA2BZ;IACtC,YAAYa,KAAa,EAAET,QAAqB,EAAEG,OAAa,CAAE;QAC/D,KAAK,CAAC,CAAC,MAAM,EAAEM,MAAM,UAAU,CAAC,EAAE,mBAAmBT,UAAU,KAAK,OAAOG;QAC3E,IAAI,CAACC,IAAI,GAAG;IACd;AACF;AAEA,OAAO,MAAMM,iCAAiCd;IAC5C,YAAYI,QAAqB,EAAEG,OAAa,CAAE;QAChD,KAAK,CACH,CAAC,SAAS,EAAEH,SAAS,eAAe,CAAC,EACrC,wBACAA,UACA,KACA,MACAG;QAEF,IAAI,CAACC,IAAI,GAAG;IACd;AACF;AA4PA,0BAA0B;AAE1B,OAAO,SAASO,cAAcC,GAAQ;IACpC,OAAOA,OAAO,OAAOA,IAAIC,EAAE,KAAK,YAAY,OAAOD,IAAIE,OAAO,KAAK;AACrE;AAEA,OAAO,SAASC,iBAAiBH,GAAQ;IACvC,OAAOA,OAAO,OAAOA,IAAII,IAAI,KAAK;AACpC;AAEA,OAAO,SAASC,mBAAmBC,KAAU;IAC3C,OAAOA,iBAAiBtB;AAC1B;AAEA,OAAO,SAASuB,iBAAiBD,KAAU;IACzC,OAAOA,iBAAiBb;AAC1B"}
1
+ {"version":3,"sources":["../../../../src/providers/types.ts"],"names":["LLMProviderError","Error","message","code","provider","statusCode","retryable","details","name","RateLimitError","retryAfter","AuthenticationError","ModelNotFoundError","model","ProviderUnavailableError","isLLMResponse","obj","id","content","isLLMStreamEvent","type","isLLMProviderError","error","isRateLimitError"],"mappings":"AAAA;;;CAGC,GA6ND,6BAA6B;AAE7B,OAAO,MAAMA,yBAAyBC;;;;;;IACpC,YACEC,OAAe,EACf,AAAOC,IAAY,EACnB,AAAOC,QAAqB,EAC5B,AAAOC,UAAmB,EAC1B,AAAOC,YAAqB,IAAI,EAChC,AAAOC,OAAa,CACpB;QACA,KAAK,CAACL,eANCC,OAAAA,WACAC,WAAAA,eACAC,aAAAA,iBACAC,YAAAA,gBACAC,UAAAA;QAGP,IAAI,CAACC,IAAI,GAAG;IACd;AACF;AAEA,OAAO,MAAMC,uBAAuBT;;IAClC,YACEE,OAAe,EACfE,QAAqB,EACrB,AAAOM,UAAmB,EAC1BH,OAAa,CACb;QACA,KAAK,CAACL,SAAS,cAAcE,UAAU,KAAK,MAAMG,eAH3CG,aAAAA;QAIP,IAAI,CAACF,IAAI,GAAG;IACd;AACF;AAEA,OAAO,MAAMG,4BAA4BX;IACvC,YAAYE,OAAe,EAAEE,QAAqB,EAAEG,OAAa,CAAE;QACjE,KAAK,CAACL,SAAS,kBAAkBE,UAAU,KAAK,OAAOG;QACvD,IAAI,CAACC,IAAI,GAAG;IACd;AACF;AAEA,OAAO,MAAMI,2BAA2BZ;IACtC,YAAYa,K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