opencroc 1.8.1 → 1.8.3
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/cli/index.js +755 -8
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.ts +128 -1
- package/dist/index.js +548 -0
- package/dist/index.js.map +1 -1
- package/dist/web/dist/assets/main-Ccg3eDNK.js +1 -0
- package/dist/web/dist/assets/office-runtime-B3iNctxE.css +1 -0
- package/dist/web/dist/assets/office-runtime-BsCh82Pj.js +183 -0
- package/dist/web/dist/assets/pixel-page-3BYGm7dH.js +470 -0
- package/dist/web/dist/assets/react-vendor-C8RhVn0h.js +49 -0
- package/dist/web/dist/assets/studio-page-BInoyoV2.css +1 -0
- package/dist/web/dist/assets/studio-page-o3SCvE_v.js +351 -0
- package/dist/web/dist/assets/three-addons-BdrPp04O.js +470 -0
- package/dist/web/dist/assets/three-core-CsxM1PCY.js +4057 -0
- package/dist/web/dist/index.html +15 -0
- package/package.json +11 -2
- package/dist/web/index-studio.html +0 -1644
- package/dist/web/index-v2-pixel.html +0 -1571
- package/dist/web/index.html +0 -573
- package/dist/web/js/agents.js +0 -465
- package/dist/web/js/camera.js +0 -125
- package/dist/web/js/dataviz.js +0 -288
- package/dist/web/js/effects.js +0 -345
- package/dist/web/js/engine.js +0 -489
- package/dist/web/js/office.js +0 -816
- package/dist/web/js/state.js +0 -37
- package/dist/web/js/ui.js +0 -384
- /package/dist/web/{assets → dist}/botreview/char_0.png +0 -0
- /package/dist/web/{assets → dist}/botreview/char_1.png +0 -0
- /package/dist/web/{assets → dist}/botreview/char_2.png +0 -0
- /package/dist/web/{assets → dist}/botreview/coffee-machine.gif +0 -0
- /package/dist/web/{assets → dist}/botreview/server.gif +0 -0
- /package/dist/web/{assets → dist}/botreview/walls.png +0 -0
- /package/dist/web/{assets → dist}/star/desk-v3.webp +0 -0
- /package/dist/web/{assets → dist}/star/office_bg_small.webp +0 -0
- /package/dist/web/{assets → dist}/star/star-idle-v5.png +0 -0
- /package/dist/web/{assets → dist}/star/star-working-spritesheet-grid.webp +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -2206,4 +2206,131 @@ declare function generateReport(graph: KnowledgeGraph, perspective: ReportPerspe
|
|
|
2206
2206
|
*/
|
|
2207
2207
|
declare function simulateScenario(graph: KnowledgeGraph, scenario: SimulationScenario, llm: LlmProvider): Promise<SimulationResult>;
|
|
2208
2208
|
|
|
2209
|
-
|
|
2209
|
+
/**
|
|
2210
|
+
* OpenCroc Dynamic Role Registry
|
|
2211
|
+
*
|
|
2212
|
+
* Manages an extensible pool of croc expert roles that can be
|
|
2213
|
+
* dynamically summoned based on project characteristics.
|
|
2214
|
+
*
|
|
2215
|
+
* Architecture:
|
|
2216
|
+
* RoleDefinition → what a croc CAN do (template)
|
|
2217
|
+
* CrocAgent → a live instance doing work (runtime)
|
|
2218
|
+
* TaskRouter → decides WHICH roles to summon for a project
|
|
2219
|
+
*/
|
|
2220
|
+
type RoleCategory = 'core' | 'language' | 'framework' | 'domain' | 'community';
|
|
2221
|
+
interface RoleTrigger {
|
|
2222
|
+
/** Match against detected languages (e.g. "python", "typescript") */
|
|
2223
|
+
languages?: string[];
|
|
2224
|
+
/** Match against detected frameworks (e.g. "Express", "Django", "React") */
|
|
2225
|
+
frameworks?: string[];
|
|
2226
|
+
/** Match against project type */
|
|
2227
|
+
projectTypes?: string[];
|
|
2228
|
+
/** Match against file patterns (glob-style) */
|
|
2229
|
+
filePatterns?: string[];
|
|
2230
|
+
/** Match against entity count thresholds */
|
|
2231
|
+
minEntities?: number;
|
|
2232
|
+
/** Match against risk categories found */
|
|
2233
|
+
riskCategories?: string[];
|
|
2234
|
+
/** Custom predicate for advanced matching */
|
|
2235
|
+
custom?: (ctx: MatchContext) => boolean;
|
|
2236
|
+
}
|
|
2237
|
+
interface MatchContext {
|
|
2238
|
+
languages: Record<string, number>;
|
|
2239
|
+
frameworks: string[];
|
|
2240
|
+
projectType: string;
|
|
2241
|
+
fileCount: number;
|
|
2242
|
+
entityCount: number;
|
|
2243
|
+
riskCategories: string[];
|
|
2244
|
+
hasModels: boolean;
|
|
2245
|
+
hasAPIs: boolean;
|
|
2246
|
+
hasFrontend: boolean;
|
|
2247
|
+
hasDocker: boolean;
|
|
2248
|
+
hasCI: boolean;
|
|
2249
|
+
}
|
|
2250
|
+
interface RoleDefinition {
|
|
2251
|
+
/** Unique identifier, e.g. "security-auditor" */
|
|
2252
|
+
id: string;
|
|
2253
|
+
/** Display name in Chinese, e.g. "安全审计鳄" */
|
|
2254
|
+
name: string;
|
|
2255
|
+
/** English name for international display */
|
|
2256
|
+
nameEn: string;
|
|
2257
|
+
/** Role category */
|
|
2258
|
+
category: RoleCategory;
|
|
2259
|
+
/** Short description of expertise */
|
|
2260
|
+
description: string;
|
|
2261
|
+
/** Icon/sprite identifier for 3D rendering */
|
|
2262
|
+
sprite: string;
|
|
2263
|
+
/** Color theme (hex) for the croc's glow */
|
|
2264
|
+
color: string;
|
|
2265
|
+
/** Priority: lower = summoned first when multiple match (0-100) */
|
|
2266
|
+
priority: number;
|
|
2267
|
+
/** When should this role be summoned? */
|
|
2268
|
+
triggers: RoleTrigger;
|
|
2269
|
+
/** System prompt template for LLM analysis */
|
|
2270
|
+
systemPrompt: string;
|
|
2271
|
+
/** What this role outputs */
|
|
2272
|
+
outputType: 'report' | 'analysis' | 'fix' | 'review' | 'diagram';
|
|
2273
|
+
/** Tags for search/filtering */
|
|
2274
|
+
tags: string[];
|
|
2275
|
+
/** Author info (for community roles) */
|
|
2276
|
+
author?: string;
|
|
2277
|
+
/** Version string */
|
|
2278
|
+
version?: string;
|
|
2279
|
+
}
|
|
2280
|
+
declare class RoleRegistry {
|
|
2281
|
+
private roles;
|
|
2282
|
+
constructor();
|
|
2283
|
+
/** Register a new role (community or custom) */
|
|
2284
|
+
register(role: RoleDefinition): void;
|
|
2285
|
+
/** Unregister a role */
|
|
2286
|
+
unregister(id: string): boolean;
|
|
2287
|
+
/** Get a role by ID */
|
|
2288
|
+
get(id: string): RoleDefinition | undefined;
|
|
2289
|
+
/** List all registered roles */
|
|
2290
|
+
list(): RoleDefinition[];
|
|
2291
|
+
/** List roles by category */
|
|
2292
|
+
listByCategory(category: RoleCategory): RoleDefinition[];
|
|
2293
|
+
/** Search roles by tags */
|
|
2294
|
+
search(query: string): RoleDefinition[];
|
|
2295
|
+
/** Total number of registered roles */
|
|
2296
|
+
get size(): number;
|
|
2297
|
+
}
|
|
2298
|
+
declare function getRoleRegistry(): RoleRegistry;
|
|
2299
|
+
|
|
2300
|
+
/**
|
|
2301
|
+
* OpenCroc Task Router
|
|
2302
|
+
*
|
|
2303
|
+
* Analyzes a scanned project and decides which croc roles to summon.
|
|
2304
|
+
* Returns a prioritized list of roles matching the project's characteristics.
|
|
2305
|
+
*/
|
|
2306
|
+
|
|
2307
|
+
interface SummonPlan {
|
|
2308
|
+
/** Roles to summon, sorted by priority (lower = first) */
|
|
2309
|
+
roles: SummonedRole[];
|
|
2310
|
+
/** Summary of why each role was picked */
|
|
2311
|
+
reasoning: string[];
|
|
2312
|
+
/** Project context used for matching */
|
|
2313
|
+
context: MatchContext;
|
|
2314
|
+
}
|
|
2315
|
+
interface SummonedRole {
|
|
2316
|
+
role: RoleDefinition;
|
|
2317
|
+
/** Why this role was summoned */
|
|
2318
|
+
reason: string;
|
|
2319
|
+
/** Match confidence 0-1 */
|
|
2320
|
+
confidence: number;
|
|
2321
|
+
}
|
|
2322
|
+
/**
|
|
2323
|
+
* Build a MatchContext from a ScanResult.
|
|
2324
|
+
*/
|
|
2325
|
+
declare function buildMatchContext(scan: ScanResult): MatchContext;
|
|
2326
|
+
/**
|
|
2327
|
+
* Given a scan result, determine which roles should be summoned.
|
|
2328
|
+
*
|
|
2329
|
+
* @param scan - The scan result from the project scanner
|
|
2330
|
+
* @param maxRoles - Maximum number of non-core roles to summon (default: 8)
|
|
2331
|
+
* @param riskCategories - Risk categories detected (from insight engine)
|
|
2332
|
+
* @returns A SummonPlan with prioritized roles
|
|
2333
|
+
*/
|
|
2334
|
+
declare function planSummon(scan: ScanResult, maxRoles?: number, riskCategories?: string[]): SummonPlan;
|
|
2335
|
+
|
|
2336
|
+
export { type AIAttributionResult, type ApiChainAnalysisResult, type ApiDependency, type ApiEndpoint, type ApiRecord, type ApiRecordForRules, type ApiRuleViolation, type AttemptRecord, type AutoFixPROptions, type AutoFixPRResult, type BackendAdapter, type BackendDomainItem, type BuildWorkordersOptions, type CandidateApiRequest, type ChainFailureResult, type ChainPlanResult, type CloneOptions, type ConfigFixer, type ConfigValidator, type ControlledFixOptions, type ControlledFixOutcome, type ControlledFixerOptions, type CriticalApiRule, type DTOFieldInfo, type DTOInfo, type DashboardData, type DashboardOutput, type DialogLoopConfig, type DialogLoopOptions, type DialogLoopSummary, type DirectedAcyclicGraph, type DiscoveredFile, type ERDiagramResult, type ExecutionConfig, type ExecutionMetrics, type ExtractedEntity, type ExtractedRelationship, type FailureCategory, type FailureSummary, type FieldSchema, type FixApplier, type FixContext, type FixHistoryEntry, type FixOutcome, type FixResult, type FixScope, type ForeignKeyRelation, type FrameworkDetection, type FsOps, type GeneratedTestFile, type GitExecutor, type GraphEdge, type GraphEdgeRelation, type GraphNode, type GraphNodeType, type HookConfig, type ImpactAnalysis, type ImpactReport, type IndexSchema, type IterationResult, type LanguageDetectionResult, type LayerValidationResult, type LlmProvider, type LogCompletionRecord, type LogCompletionResult, type LogCompletionSummary, type LogEntry, type LogPollerOptions, type MatchContext, type ModuleConfigErrorType, type ModuleConfigValidationContext, type ModuleConfigValidationError, type ModuleConfigValidationResult, type ModuleConfigValidationWarning, type ModuleDefinition, type ModuleMetadata, type ModuleTestConfig, type NetworkError, NetworkMonitor, type NetworkMonitorOptions, type OpenCrocConfig, type OpenCrocPlugin, type OrchestrationOptions, type OrchestrationPhase, type OrchestrationReportOptions, type OrchestrationSummary, type PRGenerator, type PatchWriter, type PerspectiveReport, type PhaseResult, type PhaseStatus, type PipelineRunResult, type PluginRegistry, type ProjectMetadata, type ProjectStats, type ProjectType, type ReportOutput, type ReportPerspective, type ReportSection, type ResilientFetchOptions, type ResilientFetchResult, type ResolvedConfig, type ResolvedRoute, type ResultParser, type RiskAnnotation, type RiskCategory, type RiskSeverity, type RoleCategory, type RoleDefinition, RoleRegistry, type RoleTrigger, type RouteEntry, type RuntimeConfig, SYSTEM_PROMPTS, type ScanOptions, type ScanResult, type SeedStep, type SelfHealingResult, type SimulationResult, type SimulationScenario, type KnowledgeGraph as StudioKnowledgeGraph, type SummonPlan, type SummonedRole, type TableSchema, type TestChain, type TestFailureInfo, type TestResultRecord, type TestRunner, type TestStep, TokenTracker, type TokenUsageEntry, type TokenUsageSummary, COMMANDS as VSCODE_COMMANDS, type ValidationError, type ValidatorRule, type WorkorderItem, aggregateLogCompletion, analyzeFailureWithLLM, analyzeImpact, analyzeRisks, applyControlledFix, autoFix, bfsTraversal, buildBackendChecklist, buildClassToTableMap, buildDashboardDataFromPipeline, buildDashboardDataFromReportJson, buildFailureSummary, buildGraph, buildKnowledgeGraph, buildMatchContext, buildModuleTree, buildPath, buildStatusTree, buildTestRunSummary, buildWorkorders, categorizeFailure, classNameToTableName, classifyFailure, cloneAndScan, compareTestRuns, createAdapter, createApiChainAnalyzer, createAssociationParser, createChainPlanner, createControllerParser, createDrizzleAdapter, createERDiagramGenerator, createImpactReporter, createJsonResultParser, createLlmChainPlanner, createLlmProvider, createMockDataGenerator, createModelParser, createOllamaProvider, createOpenAIProvider, createOrchestrator, createPipeline, createPluginRegistry, createPrismaAdapter, createRulesEngine, createSelfHealingLoop, createSequelizeAdapter, createTestCodeGenerator, createTokenTracker, createTypeORMAdapter, defineConfig, definePlugin, detectAdapter, detectCycles, detectProject, extractIdFromText, extractParamNames, extractParamsFromHref, findPaths, formatComparisonReport, formatValidationResult, generateAllModuleConfigs, generateAuthSetup, generateCiTemplate, generateEnhancedConfig, generateExtensionEntrypoint, generateExtensionManifest, generateFixPR, generateGitHubActionsTemplate, generateGitLabCITemplate, generateGlobalSetup, generateGlobalTeardown, generateHtmlReport, generateReport as generateInsightReport, generateJsonReport, generateMarkdownReport, generateModuleConfig, generatePlaywrightConfig, generateReports, generateVisualDashboard, generateVisualDashboardHtml, getGraphStats, getModulePreset, getNeighbors, getRoleRegistry, inferDependencies, inferRelatedTables, listCiPlatforms, listModulePresets, loadModulePresets, mergeCandidates, parseApiDomain, parseAssociationFile, parseControllerDirectory, parseControllerFile, parseDTOs, parseDrizzleDirectory, parseDrizzleFile, parseModelFile, parseModuleModels, parsePlaywrightReport, parseValidatorRules, planSummon, printOrchestrationSummary, queryNodes, recoverJSON, renderChecklistMarkdown, renderTokenReportMarkdown, renderWorkordersMarkdown, resilientFetch, resolveAdapter, resolveFromSeedData, runDialogLoop, scanModuleMetadata, scanProject, selectCandidates, selectCandidatesFromLogs, simulateScenario, toMermaid, topologicalSort, validateConfig, validateDryrun, validateModuleConfig, validateSchema, validateSemantic, waitForBackend, waitForLogCompletion, writeOrchestrationSummary };
|