deepseek-coder-agent-cli 1.0.71 → 1.0.73

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.
@@ -1,430 +1,419 @@
1
1
  {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "title": "AGI CLI Unified Module Schema",
4
- "description": "Defines the modular architecture for both TypeScript and Python implementations",
5
- "version": "1.0.0",
6
- "author": "Bo Shang",
7
- "framework": "agi-cli",
8
-
9
- "modules": {
10
- "core": {
11
- "description": "Core runtime and execution infrastructure",
12
- "required": true,
13
- "submodules": {
14
- "types": {
15
- "description": "Shared type definitions - single source of truth",
16
- "exports": [
17
- "ConversationRole", "ConversationMessage", "ToolCallRequest",
18
- "ProviderToolDefinition", "JSONSchemaObject", "JSONSchemaProperty",
19
- "ProviderResponse", "StreamChunk", "ProviderUsage"
20
- ]
21
- },
22
- "schema": {
23
- "description": "Schema loading and validation",
24
- "exports": [
25
- "loadUnifiedSchema", "validateToolArguments", "getProviderConfig",
26
- "getTaskTypeConfig", "getToolDefinition", "SchemaCache"
27
- ],
28
- "dependencies": ["types"]
29
- },
30
- "errors": {
31
- "description": "Structured error handling with auto-fix capabilities",
32
- "exports": [
33
- "StructuredError", "ErrorSeverity", "ErrorCategory",
34
- "DangerousOperationError", "BlockedOperationError",
35
- "ValidationError", "ResourceLimitError", "ContextOverflowError",
36
- "ErrorSuggestion", "ErrorRecoveryStrategy"
37
- ],
38
- "dependencies": ["types"]
39
- },
40
- "version": {
41
- "description": "Semantic versioning and compatibility checking",
42
- "exports": [
43
- "SemanticVersion", "VersionBump", "VersionConstraint",
44
- "parseVersion", "compareVersions", "satisfiesConstraint",
45
- "VersionManager", "SelfUpgradeManager", "PluginDependencyResolver"
46
- ],
47
- "dependencies": ["types", "errors"]
48
- },
49
- "dynamic_guardrails": {
50
- "description": "Adaptive safety controls that evolve with AI capabilities",
51
- "exports": [
52
- "GuardrailCategory", "GuardrailSeverity", "GuardrailCondition",
53
- "AdaptiveGuardrail", "GuardrailManager", "SafetyContext",
54
- "createGuardrail", "evaluateGuardrail", "updateGuardrail",
55
- "getGuardrailStatus", "resetGuardrail", "exportGuardrails",
56
- "importGuardrails", "mergeGuardrailSets"
57
- ],
58
- "dependencies": ["types", "errors"]
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "AGI CLI Unified Module Schema",
4
+ "description": "Defines the modular architecture for both TypeScript and Python implementations",
5
+ "version": "1.0.0",
6
+ "author": "Bo Shang",
7
+ "framework": "agi-cli",
8
+ "modules": {
9
+ "core": {
10
+ "description": "Core runtime and execution infrastructure",
11
+ "required": true,
12
+ "submodules": {
13
+ "types": {
14
+ "description": "Shared type definitions - single source of truth",
15
+ "exports": [
16
+ "ConversationRole", "ConversationMessage", "ToolCallRequest",
17
+ "ProviderToolDefinition", "JSONSchemaObject", "JSONSchemaProperty",
18
+ "ProviderResponse", "StreamChunk", "ProviderUsage"
19
+ ]
20
+ },
21
+ "schema": {
22
+ "description": "Schema loading and validation",
23
+ "exports": [
24
+ "loadUnifiedSchema", "validateToolArguments", "getProviderConfig",
25
+ "getTaskTypeConfig", "getToolDefinition", "SchemaCache"
26
+ ],
27
+ "dependencies": ["types"]
28
+ },
29
+ "errors": {
30
+ "description": "Structured error handling with auto-fix capabilities",
31
+ "exports": [
32
+ "StructuredError", "ErrorSeverity", "ErrorCategory",
33
+ "DangerousOperationError", "BlockedOperationError",
34
+ "ValidationError", "ResourceLimitError", "ContextOverflowError",
35
+ "ErrorSuggestion", "ErrorRecoveryStrategy"
36
+ ],
37
+ "dependencies": ["types"]
38
+ },
39
+ "version": {
40
+ "description": "Semantic versioning and compatibility checking",
41
+ "exports": [
42
+ "SemanticVersion", "VersionBump", "VersionConstraint",
43
+ "parseVersion", "compareVersions", "satisfiesConstraint",
44
+ "VersionManager", "SelfUpgradeManager", "PluginDependencyResolver"
45
+ ],
46
+ "dependencies": ["types", "errors"]
47
+ },
48
+ "dynamic_guardrails": {
49
+ "description": "Adaptive safety controls that evolve with AI capabilities",
50
+ "exports": [
51
+ "GuardrailCategory", "GuardrailSeverity", "GuardrailCondition",
52
+ "AdaptiveGuardrail", "GuardrailManager", "SafetyContext",
53
+ "createGuardrail", "evaluateGuardrail", "updateGuardrail",
54
+ "getGuardrailStatus", "resetGuardrail", "exportGuardrails",
55
+ "importGuardrails", "mergeGuardrailSets"
56
+ ],
57
+ "dependencies": ["types", "errors"]
58
+ },
59
+ "ai_system_updater": {
60
+ "description": "Comprehensive AI system update and migration framework",
61
+ "exports": [
62
+ "UpdateSource", "UpdatePackage", "UpdateStrategy",
63
+ "SystemUpdater", "UpdateValidator", "RollbackManager",
64
+ "MigrationPlan", "BackupStrategy", "UpdateOrchestrator",
65
+ "checkForUpdates", "prepareUpdate", "executeUpdate",
66
+ "validateUpdate", "rollbackUpdate", "cleanupUpdate"
67
+ ],
68
+ "dependencies": ["types", "errors", "version"]
69
+ },
70
+ "toolRuntime": {
71
+ "description": "Tool execution engine with caching and validation",
72
+ "exports": [
73
+ "ToolRuntime", "ToolRecord", "ToolSuite", "CacheEntry",
74
+ "ToolRuntimeObserver", "ToolExecutionResult", "CACHEABLE_TOOLS"
75
+ ],
76
+ "dependencies": ["types", "schema", "errors"]
77
+ },
78
+ "provider": {
79
+ "description": "LLM provider abstraction layer",
80
+ "exports": [
81
+ "LLMProvider", "ProviderFactory", "ProviderAdapter",
82
+ "UnifiedProviderConfig", "createProvider", "listProviders"
83
+ ],
84
+ "dependencies": ["types", "schema", "errors"]
85
+ },
86
+ "context": {
87
+ "description": "Token and context management",
88
+ "exports": [
89
+ "ContextManager", "ContextManagerConfig", "TruncationResult",
90
+ "estimateTokens", "truncateToolOutput", "pruneMessages"
91
+ ],
92
+ "dependencies": ["types"]
93
+ },
94
+ "agent": {
95
+ "description": "Agent runtime and conversation management",
96
+ "exports": [
97
+ "Agent", "AgentConfig", "AgentRuntime",
98
+ "processConversation", "resolveToolCalls"
99
+ ],
100
+ "dependencies": ["types", "toolRuntime", "provider", "context", "errors"]
101
+ }
102
+ }
59
103
  },
60
- "ai_system_updater": {
61
- "description": "Comprehensive AI system update and migration framework",
62
- "exports": [
63
- "UpdateSource", "UpdatePackage", "UpdateStrategy",
64
- "SystemUpdater", "UpdateValidator", "RollbackManager",
65
- "MigrationPlan", "BackupStrategy", "UpdateOrchestrator",
66
- "checkForUpdates", "prepareUpdate", "executeUpdate",
67
- "validateUpdate", "rollbackUpdate", "cleanupUpdate"
68
- ],
69
- "dependencies": ["types", "errors", "version"]
104
+ "plugins": {
105
+ "description": "Plugin system for extensibility",
106
+ "required": true,
107
+ "submodules": {
108
+ "base": {
109
+ "description": "Plugin base class and metadata",
110
+ "exports": [
111
+ "Plugin", "PluginMetadata", "PluginConfig", "PluginCategory",
112
+ "PluginState", "PluginLifecycle"
113
+ ],
114
+ "dependencies": ["core.types", "core.version"]
115
+ },
116
+ "registry": {
117
+ "description": "Plugin discovery and registration",
118
+ "exports": [
119
+ "PluginRegistry", "discoverPlugins", "loadPlugin", "unloadPlugin",
120
+ "getPluginTools", "validatePluginCompatibility"
121
+ ],
122
+ "dependencies": ["base", "core.toolRuntime", "core.version"]
123
+ },
124
+ "loader": {
125
+ "description": "Dynamic plugin loading with lazy initialization",
126
+ "exports": [
127
+ "PluginLoader", "LazyPlugin", "loadPluginModule",
128
+ "isPluginEnabled", "getPluginModule"
129
+ ],
130
+ "dependencies": ["base", "registry"]
131
+ }
132
+ }
70
133
  },
71
- "toolRuntime": {
72
- "description": "Tool execution engine with caching and validation",
73
- "exports": [
74
- "ToolRuntime", "ToolRecord", "ToolSuite", "CacheEntry",
75
- "ToolRuntimeObserver", "ToolExecutionResult", "CACHEABLE_TOOLS"
76
- ],
77
- "dependencies": ["types", "schema", "errors"]
134
+ "alphaZero": {
135
+ "description": "Alpha Zero 2 - Competitive RL Framework",
136
+ "required": false,
137
+ "submodules": {
138
+ "types": {
139
+ "description": "Alpha Zero specific types",
140
+ "exports": [
141
+ "AgentPerformanceMetrics", "CompetitiveAgentConfig",
142
+ "CompetitionRoundResult", "CompetitionStandings",
143
+ "CodeQualityMetrics", "TournamentConfig", "TournamentResult"
144
+ ]
145
+ },
146
+ "metrics": {
147
+ "description": "Performance metrics tracking",
148
+ "exports": [
149
+ "MetricsTracker", "createDefaultMetrics", "recordMetric",
150
+ "getMetricsSummary", "exportMetrics"
151
+ ],
152
+ "dependencies": ["types"]
153
+ },
154
+ "codeEvaluator": {
155
+ "description": "Code quality evaluation",
156
+ "exports": [
157
+ "extractCodeBlocks", "evaluateCodeQuality", "calculateRewardScore",
158
+ "analyzeComplexity", "analyzeErrorHandling", "analyzeDocumentation"
159
+ ],
160
+ "dependencies": ["types", "metrics"]
161
+ },
162
+ "selfModification": {
163
+ "description": "Version-controlled code self-improvement",
164
+ "exports": [
165
+ "SelfModificationEngine", "ToolVersion", "ModificationResult",
166
+ "createCheckpoint", "modifyTool", "rollback", "getVersionHistory"
167
+ ],
168
+ "dependencies": ["types", "core.version"]
169
+ },
170
+ "introspection": {
171
+ "description": "Runtime analysis and self-awareness",
172
+ "exports": [
173
+ "IntrospectionEngine", "PerformanceProfile", "CodeAnalysis",
174
+ "recordExecution", "generateSuggestions", "identifyBottlenecks"
175
+ ],
176
+ "dependencies": ["types", "metrics"]
177
+ },
178
+ "competitive": {
179
+ "description": "Multi-agent competition framework",
180
+ "exports": [
181
+ "CompetitiveAgentRunner", "TournamentRunner",
182
+ "runCompetitionRound", "runTournament", "formatTournamentSummary"
183
+ ],
184
+ "dependencies": ["types", "metrics", "codeEvaluator", "core.agent"]
185
+ },
186
+ "reward": {
187
+ "description": "Reward calculation system",
188
+ "exports": [
189
+ "RewardSystem", "RewardSignal", "calculateReward",
190
+ "normalizeReward", "combineRewards"
191
+ ],
192
+ "dependencies": ["types", "codeEvaluator"]
193
+ }
194
+ }
78
195
  },
79
- "provider": {
80
- "description": "LLM provider abstraction layer",
81
- "exports": [
82
- "LLMProvider", "ProviderFactory", "ProviderAdapter",
83
- "UnifiedProviderConfig", "createProvider", "listProviders"
84
- ],
85
- "dependencies": ["types", "schema", "errors"]
196
+ "security": {
197
+ "description": "Security research module (optional, lazy loaded)",
198
+ "required": false,
199
+ "requiresAuth": true,
200
+ "submodules": {
201
+ "core": {
202
+ "description": "Authorization and reconnaissance",
203
+ "exports": [
204
+ "AuthorizationScope", "AuthorizationRecord", "ReconResult",
205
+ "VulnerabilityFinding", "SecurityResearchEngine",
206
+ "createBugBountyAuthorization", "createPentestAuthorization"
207
+ ]
208
+ },
209
+ "google": {
210
+ "description": "Google Cloud/Workspace persistence research",
211
+ "optional": true,
212
+ "exports": [
213
+ "GoogleService", "PersistenceCategory", "PersistenceVector",
214
+ "GooglePersistenceResearcher", "GCP_PERSISTENCE_VECTORS",
215
+ "WORKSPACE_PERSISTENCE_VECTORS"
216
+ ],
217
+ "dependencies": ["core"]
218
+ }
219
+ }
86
220
  },
87
- "context": {
88
- "description": "Token and context management",
89
- "exports": [
90
- "ContextManager", "ContextManagerConfig", "TruncationResult",
91
- "estimateTokens", "truncateToolOutput", "pruneMessages"
92
- ],
93
- "dependencies": ["types"]
221
+ "capabilities": {
222
+ "description": "Core tool implementations",
223
+ "required": true,
224
+ "submodules": {
225
+ "filesystem": {
226
+ "description": "File operations",
227
+ "exports": ["readFile", "writeFile", "listDirectory"],
228
+ "tools": ["read", "write"]
229
+ },
230
+ "edit": {
231
+ "description": "In-place file editing",
232
+ "exports": ["editFile", "applyEdit"],
233
+ "tools": ["edit"]
234
+ },
235
+ "bash": {
236
+ "description": "Shell command execution",
237
+ "exports": ["executeBash", "runInBackground", "killProcess"],
238
+ "tools": ["bash"]
239
+ },
240
+ "search": {
241
+ "description": "Code and file search",
242
+ "exports": ["globSearch", "grepSearch"],
243
+ "tools": ["glob", "grep"]
244
+ },
245
+ "web": {
246
+ "description": "Web operations",
247
+ "exports": ["webSearch", "webFetch"],
248
+ "tools": ["web_search", "web_fetch"]
249
+ },
250
+ "coding": {
251
+ "description": "Code analysis and generation",
252
+ "exports": [
253
+ "analyzeComplexity", "findDependencies", "generateDocstring",
254
+ "suggestRefactorings", "generateTestStub"
255
+ ],
256
+ "tools": ["analyze_complexity", "find_dependencies", "generate_docstring"]
257
+ }
258
+ }
94
259
  },
95
- "agent": {
96
- "description": "Agent runtime and conversation management",
97
- "exports": [
98
- "Agent", "AgentConfig", "AgentRuntime",
99
- "processConversation", "resolveToolCalls"
100
- ],
101
- "dependencies": ["types", "toolRuntime", "provider", "context", "errors"]
260
+ "ui": {
261
+ "description": "User interface components",
262
+ "required": false,
263
+ "submodules": {
264
+ "display": {
265
+ "description": "Output formatting and display",
266
+ "exports": ["formatOutput", "formatError", "formatToolResult"]
267
+ },
268
+ "prompt": {
269
+ "description": "Interactive prompt handling",
270
+ "exports": ["createPrompt", "promptUser"]
271
+ },
272
+ "theme": {
273
+ "description": "Theming and styling",
274
+ "exports": ["Theme", "applyTheme", "getColors"]
275
+ }
276
+ }
102
277
  }
103
- }
104
278
  },
105
-
106
- "plugins": {
107
- "description": "Plugin system for extensibility",
108
- "required": true,
109
- "submodules": {
110
- "base": {
111
- "description": "Plugin base class and metadata",
112
- "exports": [
113
- "Plugin", "PluginMetadata", "PluginConfig", "PluginCategory",
114
- "PluginState", "PluginLifecycle"
115
- ],
116
- "dependencies": ["core.types", "core.version"]
279
+ "interfaces": {
280
+ "ToolSuite": {
281
+ "description": "Collection of related tools",
282
+ "properties": {
283
+ "name": { "type": "string", "description": "Suite identifier" },
284
+ "version": { "type": "string", "description": "Semantic version" },
285
+ "tools": { "type": "array", "items": { "$ref": "#/interfaces/ToolDefinition" } }
286
+ }
117
287
  },
118
- "registry": {
119
- "description": "Plugin discovery and registration",
120
- "exports": [
121
- "PluginRegistry", "discoverPlugins", "loadPlugin", "unloadPlugin",
122
- "getPluginTools", "validatePluginCompatibility"
123
- ],
124
- "dependencies": ["base", "core.toolRuntime", "core.version"]
125
- },
126
- "loader": {
127
- "description": "Dynamic plugin loading with lazy initialization",
128
- "exports": [
129
- "PluginLoader", "LazyPlugin", "loadPluginModule",
130
- "isPluginEnabled", "getPluginModule"
131
- ],
132
- "dependencies": ["base", "registry"]
133
- }
134
- }
135
- },
136
-
137
- "alphaZero": {
138
- "description": "Alpha Zero 2 - Competitive RL Framework",
139
- "required": false,
140
- "submodules": {
141
- "types": {
142
- "description": "Alpha Zero specific types",
143
- "exports": [
144
- "AgentPerformanceMetrics", "CompetitiveAgentConfig",
145
- "CompetitionRoundResult", "CompetitionStandings",
146
- "CodeQualityMetrics", "TournamentConfig", "TournamentResult"
147
- ]
288
+ "ToolDefinition": {
289
+ "description": "Single tool definition",
290
+ "properties": {
291
+ "name": { "type": "string" },
292
+ "description": { "type": "string" },
293
+ "parameters": { "$ref": "#/interfaces/JSONSchemaObject" },
294
+ "execute": { "type": "function", "async": true }
295
+ }
148
296
  },
149
- "metrics": {
150
- "description": "Performance metrics tracking",
151
- "exports": [
152
- "MetricsTracker", "createDefaultMetrics", "recordMetric",
153
- "getMetricsSummary", "exportMetrics"
154
- ],
155
- "dependencies": ["types"]
297
+ "Plugin": {
298
+ "description": "Plugin interface",
299
+ "properties": {
300
+ "metadata": { "$ref": "#/interfaces/PluginMetadata" },
301
+ "initialize": { "type": "function", "async": true },
302
+ "getToolSuites": { "type": "function", "returns": "ToolSuite[]" },
303
+ "unload": { "type": "function", "async": true }
304
+ }
156
305
  },
157
- "codeEvaluator": {
158
- "description": "Code quality evaluation",
159
- "exports": [
160
- "extractCodeBlocks", "evaluateCodeQuality", "calculateRewardScore",
161
- "analyzeComplexity", "analyzeErrorHandling", "analyzeDocumentation"
162
- ],
163
- "dependencies": ["types", "metrics"]
306
+ "PluginMetadata": {
307
+ "description": "Plugin metadata",
308
+ "properties": {
309
+ "id": { "type": "string" },
310
+ "name": { "type": "string" },
311
+ "version": { "type": "string" },
312
+ "category": { "type": "string", "enum": ["coding", "rl", "security", "dev"] },
313
+ "dependencies": { "type": "array", "items": { "type": "string" } },
314
+ "minCliVersion": { "type": "string", "optional": true },
315
+ "maxCliVersion": { "type": "string", "optional": true }
316
+ }
164
317
  },
165
- "selfModification": {
166
- "description": "Version-controlled code self-improvement",
167
- "exports": [
168
- "SelfModificationEngine", "ToolVersion", "ModificationResult",
169
- "createCheckpoint", "modifyTool", "rollback", "getVersionHistory"
170
- ],
171
- "dependencies": ["types", "core.version"]
318
+ "LLMProvider": {
319
+ "description": "LLM provider interface",
320
+ "properties": {
321
+ "id": { "type": "string" },
322
+ "model": { "type": "string" },
323
+ "generate": { "type": "function", "async": true },
324
+ "generateStream": { "type": "function", "async": true, "optional": true }
325
+ }
172
326
  },
173
- "introspection": {
174
- "description": "Runtime analysis and self-awareness",
175
- "exports": [
176
- "IntrospectionEngine", "PerformanceProfile", "CodeAnalysis",
177
- "recordExecution", "generateSuggestions", "identifyBottlenecks"
178
- ],
179
- "dependencies": ["types", "metrics"]
327
+ "StructuredError": {
328
+ "description": "Structured error with recovery capabilities",
329
+ "properties": {
330
+ "code": { "type": "string" },
331
+ "message": { "type": "string" },
332
+ "severity": { "type": "string", "enum": ["critical", "error", "warning", "info"] },
333
+ "category": { "type": "string" },
334
+ "suggestions": { "type": "array", "items": { "$ref": "#/interfaces/ErrorSuggestion" } },
335
+ "recoverable": { "type": "boolean" },
336
+ "tryAutoFix": { "type": "function", "optional": true }
337
+ }
180
338
  },
181
- "competitive": {
182
- "description": "Multi-agent competition framework",
183
- "exports": [
184
- "CompetitiveAgentRunner", "TournamentRunner",
185
- "runCompetitionRound", "runTournament", "formatTournamentSummary"
186
- ],
187
- "dependencies": ["types", "metrics", "codeEvaluator", "core.agent"]
188
- },
189
- "reward": {
190
- "description": "Reward calculation system",
191
- "exports": [
192
- "RewardSystem", "RewardSignal", "calculateReward",
193
- "normalizeReward", "combineRewards"
194
- ],
195
- "dependencies": ["types", "codeEvaluator"]
196
- }
197
- }
198
- },
199
-
200
- "security": {
201
- "description": "Security research module (optional, lazy loaded)",
202
- "required": false,
203
- "requiresAuth": true,
204
- "submodules": {
205
- "core": {
206
- "description": "Authorization and reconnaissance",
207
- "exports": [
208
- "AuthorizationScope", "AuthorizationRecord", "ReconResult",
209
- "VulnerabilityFinding", "SecurityResearchEngine",
210
- "createBugBountyAuthorization", "createPentestAuthorization"
211
- ]
212
- },
213
-
214
- "google": {
215
- "description": "Google Cloud/Workspace persistence research",
216
- "optional": true,
217
- "exports": [
218
- "GoogleService", "PersistenceCategory", "PersistenceVector",
219
- "GooglePersistenceResearcher", "GCP_PERSISTENCE_VECTORS",
220
- "WORKSPACE_PERSISTENCE_VECTORS"
221
- ],
222
- "dependencies": ["core"]
339
+ "SemanticVersion": {
340
+ "description": "Semantic version representation",
341
+ "properties": {
342
+ "major": { "type": "integer" },
343
+ "minor": { "type": "integer" },
344
+ "patch": { "type": "integer" },
345
+ "prerelease": { "type": "string", "optional": true },
346
+ "build": { "type": "string", "optional": true }
347
+ }
223
348
  }
224
- }
225
349
  },
226
-
227
- "capabilities": {
228
- "description": "Core tool implementations",
229
- "required": true,
230
- "submodules": {
231
- "filesystem": {
232
- "description": "File operations",
233
- "exports": ["readFile", "writeFile", "listDirectory"],
234
- "tools": ["read", "write"]
235
- },
236
- "edit": {
237
- "description": "In-place file editing",
238
- "exports": ["editFile", "applyEdit"],
239
- "tools": ["edit"]
350
+ "patterns": {
351
+ "lazyLoading": {
352
+ "description": "Pattern for lazy loading optional modules",
353
+ "example": {
354
+ "typescript": "let _module: typeof import('./module') | null = null;\nexport async function getModule() {\n if (!_module) _module = await import('./module');\n return _module;\n}",
355
+ "python": "_module = None\ndef get_module():\n global _module\n if _module is None:\n from . import module as _m\n _module = _m\n return _module"
356
+ }
240
357
  },
241
- "bash": {
242
- "description": "Shell command execution",
243
- "exports": ["executeBash", "runInBackground", "killProcess"],
244
- "tools": ["bash"]
358
+ "observer": {
359
+ "description": "Observer pattern for lifecycle events",
360
+ "events": ["onStart", "onResult", "onError", "onCacheHit"]
245
361
  },
246
- "search": {
247
- "description": "Code and file search",
248
- "exports": ["globSearch", "grepSearch"],
249
- "tools": ["glob", "grep"]
362
+ "registry": {
363
+ "description": "Registry pattern for tool/plugin management",
364
+ "operations": ["register", "unregister", "get", "list", "has"]
250
365
  },
251
- "web": {
252
- "description": "Web operations",
253
- "exports": ["webSearch", "webFetch"],
254
- "tools": ["web_search", "web_fetch"]
366
+ "factory": {
367
+ "description": "Factory pattern for creating providers/agents",
368
+ "operations": ["create", "configure", "validate"]
369
+ }
370
+ },
371
+ "fileStructure": {
372
+ "typescript": {
373
+ "src/": {
374
+ "core/": ["types.ts", "schema.ts", "errors.ts", "version.ts", "toolRuntime.ts", "provider.ts", "context.ts", "agent.ts", "index.ts"],
375
+ "plugins/": ["base.ts", "registry.ts", "loader.ts", "index.ts"],
376
+ "alpha-zero/": ["types.ts", "metrics.ts", "codeEvaluator.ts", "selfModification.ts", "introspection.ts", "competitive.ts", "reward.ts", "index.ts"],
377
+ "alpha-zero/security/": ["core.ts", "simulation.ts", "google.ts", "googleLoader.ts", "index.ts"],
378
+ "capabilities/": ["filesystem.ts", "edit.ts", "bash.ts", "search.ts", "web.ts", "coding.ts", "index.ts"],
379
+ "ui/": ["UnifiedUIRenderer.ts", "PromptController.ts", "outputMode.ts", "theme.ts", "globalWriteLock.ts", "index.ts"],
380
+ "contracts/": ["unified-schema.json", "module-schema.json"]
381
+ }
255
382
  },
256
- "coding": {
257
- "description": "Code analysis and generation",
258
- "exports": [
259
- "analyzeComplexity", "findDependencies", "generateDocstring",
260
- "suggestRefactorings", "generateTestStub"
261
- ],
262
- "tools": ["analyze_complexity", "find_dependencies", "generate_docstring"]
383
+ "python": {
384
+ "agi_cli/": {
385
+ "core/": ["types.py", "schema.py", "errors.py", "version.py", "tool_runtime.py", "provider.py", "context.py", "agent.py", "__init__.py"],
386
+ "plugins/": ["base.py", "registry.py", "loader.py", "__init__.py"],
387
+ "alpha_zero/": ["types.py", "metrics.py", "code_evaluator.py", "self_modification.py", "introspection.py", "competitive.py", "reward.py", "__init__.py"],
388
+ "alpha_zero/security/": ["core.py", "google.py", "__init__.py"],
389
+ "capabilities/": ["filesystem.py", "edit.py", "bash.py", "search.py", "web.py", "coding.py", "__init__.py"],
390
+ "ui/": ["unified_ui_renderer.py", "prompt_controller.py", "output_mode.py", "theme.py", "__init__.py"]
391
+ }
263
392
  }
264
- }
265
393
  },
266
-
267
- "ui": {
268
- "description": "User interface components",
269
- "required": false,
270
- "submodules": {
271
- "display": {
272
- "description": "Output formatting and display",
273
- "exports": ["formatOutput", "formatError", "formatToolResult"]
394
+ "conventions": {
395
+ "naming": {
396
+ "typescript": {
397
+ "files": "camelCase.ts",
398
+ "classes": "PascalCase",
399
+ "functions": "camelCase",
400
+ "constants": "SCREAMING_SNAKE_CASE",
401
+ "interfaces": "PascalCase (no I prefix)"
402
+ },
403
+ "python": {
404
+ "files": "snake_case.py",
405
+ "classes": "PascalCase",
406
+ "functions": "snake_case",
407
+ "constants": "SCREAMING_SNAKE_CASE"
408
+ }
274
409
  },
275
- "prompt": {
276
- "description": "Interactive prompt handling",
277
- "exports": ["createPrompt", "promptUser"]
410
+ "exports": {
411
+ "typescript": "Named exports preferred, barrel files (index.ts) for modules",
412
+ "python": "__all__ in __init__.py, explicit imports"
278
413
  },
279
- "theme": {
280
- "description": "Theming and styling",
281
- "exports": ["Theme", "applyTheme", "getColors"]
414
+ "async": {
415
+ "typescript": "async/await with Promise<T>",
416
+ "python": "async/await with Optional sync wrappers"
282
417
  }
283
- }
284
- }
285
- },
286
-
287
- "interfaces": {
288
- "ToolSuite": {
289
- "description": "Collection of related tools",
290
- "properties": {
291
- "name": { "type": "string", "description": "Suite identifier" },
292
- "version": { "type": "string", "description": "Semantic version" },
293
- "tools": { "type": "array", "items": { "$ref": "#/interfaces/ToolDefinition" } }
294
- }
295
- },
296
- "ToolDefinition": {
297
- "description": "Single tool definition",
298
- "properties": {
299
- "name": { "type": "string" },
300
- "description": { "type": "string" },
301
- "parameters": { "$ref": "#/interfaces/JSONSchemaObject" },
302
- "execute": { "type": "function", "async": true }
303
- }
304
- },
305
- "Plugin": {
306
- "description": "Plugin interface",
307
- "properties": {
308
- "metadata": { "$ref": "#/interfaces/PluginMetadata" },
309
- "initialize": { "type": "function", "async": true },
310
- "getToolSuites": { "type": "function", "returns": "ToolSuite[]" },
311
- "unload": { "type": "function", "async": true }
312
- }
313
- },
314
- "PluginMetadata": {
315
- "description": "Plugin metadata",
316
- "properties": {
317
- "id": { "type": "string" },
318
- "name": { "type": "string" },
319
- "version": { "type": "string" },
320
- "category": { "type": "string", "enum": ["coding", "rl", "security", "dev"] },
321
- "dependencies": { "type": "array", "items": { "type": "string" } },
322
- "minCliVersion": { "type": "string", "optional": true },
323
- "maxCliVersion": { "type": "string", "optional": true }
324
- }
325
- },
326
- "LLMProvider": {
327
- "description": "LLM provider interface",
328
- "properties": {
329
- "id": { "type": "string" },
330
- "model": { "type": "string" },
331
- "generate": { "type": "function", "async": true },
332
- "generateStream": { "type": "function", "async": true, "optional": true }
333
- }
334
- },
335
- "StructuredError": {
336
- "description": "Structured error with recovery capabilities",
337
- "properties": {
338
- "code": { "type": "string" },
339
- "message": { "type": "string" },
340
- "severity": { "type": "string", "enum": ["critical", "error", "warning", "info"] },
341
- "category": { "type": "string" },
342
- "suggestions": { "type": "array", "items": { "$ref": "#/interfaces/ErrorSuggestion" } },
343
- "recoverable": { "type": "boolean" },
344
- "tryAutoFix": { "type": "function", "optional": true }
345
- }
346
- },
347
- "SemanticVersion": {
348
- "description": "Semantic version representation",
349
- "properties": {
350
- "major": { "type": "integer" },
351
- "minor": { "type": "integer" },
352
- "patch": { "type": "integer" },
353
- "prerelease": { "type": "string", "optional": true },
354
- "build": { "type": "string", "optional": true }
355
- }
356
- }
357
- },
358
-
359
- "patterns": {
360
- "lazyLoading": {
361
- "description": "Pattern for lazy loading optional modules",
362
- "example": {
363
- "typescript": "let _module: typeof import('./module') | null = null;\nexport async function getModule() {\n if (!_module) _module = await import('./module');\n return _module;\n}",
364
- "python": "_module = None\ndef get_module():\n global _module\n if _module is None:\n from . import module as _m\n _module = _m\n return _module"
365
- }
366
- },
367
- "observer": {
368
- "description": "Observer pattern for lifecycle events",
369
- "events": ["onStart", "onResult", "onError", "onCacheHit"]
370
- },
371
- "registry": {
372
- "description": "Registry pattern for tool/plugin management",
373
- "operations": ["register", "unregister", "get", "list", "has"]
374
- },
375
- "factory": {
376
- "description": "Factory pattern for creating providers/agents",
377
- "operations": ["create", "configure", "validate"]
378
- }
379
- },
380
-
381
- "fileStructure": {
382
- "typescript": {
383
- "src/": {
384
- "core/": ["types.ts", "schema.ts", "errors.ts", "version.ts", "toolRuntime.ts", "provider.ts", "context.ts", "agent.ts", "index.ts"],
385
- "plugins/": ["base.ts", "registry.ts", "loader.ts", "index.ts"],
386
- "alpha-zero/": ["types.ts", "metrics.ts", "codeEvaluator.ts", "selfModification.ts", "introspection.ts", "competitive.ts", "reward.ts", "index.ts"],
387
- "alpha-zero/security/": ["core.ts", "simulation.ts", "google.ts", "googleLoader.ts", "index.ts"],
388
- "capabilities/": ["filesystem.ts", "edit.ts", "bash.ts", "search.ts", "web.ts", "coding.ts", "index.ts"],
389
- "ui/": ["UnifiedUIRenderer.ts", "PromptController.ts", "outputMode.ts", "theme.ts", "globalWriteLock.ts", "index.ts"],
390
- "contracts/": ["unified-schema.json", "module-schema.json"]
391
- }
392
- },
393
- "python": {
394
- "agi_cli/": {
395
- "core/": ["types.py", "schema.py", "errors.py", "version.py", "tool_runtime.py", "provider.py", "context.py", "agent.py", "__init__.py"],
396
- "plugins/": ["base.py", "registry.py", "loader.py", "__init__.py"],
397
- "alpha_zero/": ["types.py", "metrics.py", "code_evaluator.py", "self_modification.py", "introspection.py", "competitive.py", "reward.py", "__init__.py"],
398
- "alpha_zero/security/": ["core.py", "google.py", "__init__.py"],
399
- "capabilities/": ["filesystem.py", "edit.py", "bash.py", "search.py", "web.py", "coding.py", "__init__.py"],
400
- "ui/": ["unified_ui_renderer.py", "prompt_controller.py", "output_mode.py", "theme.py", "__init__.py"]
401
- }
402
- }
403
- },
404
-
405
- "conventions": {
406
- "naming": {
407
- "typescript": {
408
- "files": "camelCase.ts",
409
- "classes": "PascalCase",
410
- "functions": "camelCase",
411
- "constants": "SCREAMING_SNAKE_CASE",
412
- "interfaces": "PascalCase (no I prefix)"
413
- },
414
- "python": {
415
- "files": "snake_case.py",
416
- "classes": "PascalCase",
417
- "functions": "snake_case",
418
- "constants": "SCREAMING_SNAKE_CASE"
419
- }
420
- },
421
- "exports": {
422
- "typescript": "Named exports preferred, barrel files (index.ts) for modules",
423
- "python": "__all__ in __init__.py, explicit imports"
424
- },
425
- "async": {
426
- "typescript": "async/await with Promise<T>",
427
- "python": "async/await with Optional sync wrappers"
428
418
  }
429
- }
430
419
  }