autosnippet 3.2.21 → 3.3.2
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/dashboard/dist/assets/icons-BJ2mUBi8.js +1 -0
- package/dashboard/dist/assets/index-B659K9t5.js +128 -0
- package/dashboard/dist/assets/index-NCm40PMD.css +1 -0
- package/dashboard/dist/index.html +3 -3
- package/dist/bin/cli.d.ts +1 -1
- package/dist/bin/cli.js +244 -261
- package/dist/lib/agent/context/ExplorationTracker.d.ts +2 -0
- package/dist/lib/agent/context/ExplorationTracker.js +21 -3
- package/dist/lib/agent/core/ToolExecutionPipeline.d.ts +3 -1
- package/dist/lib/agent/core/ToolExecutionPipeline.js +8 -1
- package/dist/lib/agent/forge/DynamicComposer.d.ts +58 -0
- package/dist/lib/agent/forge/DynamicComposer.js +99 -0
- package/dist/lib/agent/forge/SandboxRunner.d.ts +60 -0
- package/dist/lib/agent/forge/SandboxRunner.js +251 -0
- package/dist/lib/agent/forge/TemporaryToolRegistry.d.ts +76 -0
- package/dist/lib/agent/forge/TemporaryToolRegistry.js +154 -0
- package/dist/lib/agent/forge/ToolForge.d.ts +92 -0
- package/dist/lib/agent/forge/ToolForge.js +239 -0
- package/dist/lib/agent/forge/ToolRequirementAnalyzer.d.ts +44 -0
- package/dist/lib/agent/forge/ToolRequirementAnalyzer.js +119 -0
- package/dist/lib/agent/tools/ToolRegistry.d.ts +2 -0
- package/dist/lib/agent/tools/ToolRegistry.js +4 -0
- package/dist/lib/agent/tools/composite.js +0 -1
- package/dist/lib/agent/tools/index.d.ts +2 -50
- package/dist/lib/agent/tools/index.js +2 -3
- package/dist/lib/agent/tools/lifecycle.d.ts +1 -58
- package/dist/lib/agent/tools/lifecycle.js +2 -75
- package/dist/lib/cli/SetupService.d.ts +46 -2
- package/dist/lib/cli/SetupService.js +2 -27
- package/dist/lib/cli/deploy/FileManifest.d.ts +0 -21
- package/dist/lib/cli/deploy/FileManifest.js +0 -11
- package/dist/lib/{platform/ios/spm → core/discovery}/SpmDiscoverer.d.ts +2 -5
- package/dist/lib/{platform/ios/spm → core/discovery}/SpmDiscoverer.js +159 -44
- package/dist/lib/core/discovery/index.d.ts +1 -1
- package/dist/lib/core/discovery/index.js +2 -2
- package/dist/lib/domain/knowledge/KnowledgeEntry.d.ts +10 -0
- package/dist/lib/domain/knowledge/KnowledgeEntry.js +2 -0
- package/dist/lib/domain/knowledge/Lifecycle.d.ts +19 -2
- package/dist/lib/domain/knowledge/Lifecycle.js +32 -6
- package/dist/lib/domain/knowledge/UnifiedValidator.d.ts +1 -5
- package/dist/lib/domain/knowledge/UnifiedValidator.js +7 -44
- package/dist/lib/domain/knowledge/values/Stats.d.ts +29 -0
- package/dist/lib/domain/knowledge/values/Stats.js +41 -0
- package/dist/lib/external/mcp/McpServer.d.ts +19 -38
- package/dist/lib/external/mcp/McpServer.js +145 -117
- package/dist/lib/external/mcp/autoApproveInjector.js +0 -2
- package/dist/lib/external/mcp/handlers/bootstrap/MissionBriefingBuilder.d.ts +26 -1
- package/dist/lib/external/mcp/handlers/bootstrap/MissionBriefingBuilder.js +41 -0
- package/dist/lib/external/mcp/handlers/bootstrap/pipeline/orchestrator.js +49 -0
- package/dist/lib/external/mcp/handlers/bootstrap/shared/bootstrap-phases.d.ts +3 -0
- package/dist/lib/external/mcp/handlers/bootstrap/shared/bootstrap-phases.js +27 -0
- package/dist/lib/external/mcp/handlers/bootstrap/skills.js +1 -1
- package/dist/lib/external/mcp/handlers/bootstrap-external.js +1 -0
- package/dist/lib/external/mcp/handlers/bootstrap-internal.js +2 -0
- package/dist/lib/external/mcp/handlers/consolidated.d.ts +116 -6
- package/dist/lib/external/mcp/handlers/consolidated.js +251 -71
- package/dist/lib/external/mcp/handlers/guard.d.ts +150 -0
- package/dist/lib/external/mcp/handlers/guard.js +245 -8
- package/dist/lib/external/mcp/handlers/knowledge.d.ts +0 -29
- package/dist/lib/external/mcp/handlers/knowledge.js +1 -76
- package/dist/lib/external/mcp/handlers/panorama.d.ts +36 -0
- package/dist/lib/external/mcp/handlers/panorama.js +156 -0
- package/dist/lib/external/mcp/handlers/system.d.ts +2 -54
- package/dist/lib/external/mcp/handlers/system.js +3 -113
- package/dist/lib/external/mcp/handlers/task.d.ts +13 -24
- package/dist/lib/external/mcp/handlers/task.js +217 -557
- package/dist/lib/external/mcp/handlers/types.d.ts +91 -8
- package/dist/lib/external/mcp/handlers/types.js +18 -1
- package/dist/lib/external/mcp/handlers/wiki-external.d.ts +18 -1
- package/dist/lib/external/mcp/handlers/wiki-external.js +16 -1
- package/dist/lib/external/mcp/tools.d.ts +14 -20
- package/dist/lib/external/mcp/tools.js +62 -91
- package/dist/lib/http/HttpServer.js +52 -6
- package/dist/lib/http/routes/{snippets.d.ts → audit.d.ts} +4 -2
- package/dist/lib/http/routes/audit.js +51 -0
- package/dist/lib/http/routes/commands.d.ts +1 -1
- package/dist/lib/http/routes/commands.js +1 -66
- package/dist/lib/http/routes/guardReport.d.ts +10 -0
- package/dist/lib/http/routes/guardReport.js +143 -0
- package/dist/lib/http/routes/knowledge.js +32 -1
- package/dist/lib/http/routes/panorama.d.ts +11 -0
- package/dist/lib/http/routes/panorama.js +322 -0
- package/dist/lib/http/routes/remote.js +0 -5
- package/dist/lib/http/routes/signals.d.ts +10 -0
- package/dist/lib/http/routes/signals.js +104 -0
- package/dist/lib/http/routes/task.d.ts +2 -3
- package/dist/lib/http/routes/task.js +17 -347
- package/dist/lib/http/routes/violations.js +1 -1
- package/dist/lib/infrastructure/audit/AuditLogger.d.ts +6 -1
- package/dist/lib/infrastructure/audit/AuditLogger.js +14 -1
- package/dist/lib/infrastructure/database/drizzle/schema.d.ts +181 -583
- package/dist/lib/infrastructure/database/drizzle/schema.js +28 -69
- package/dist/lib/infrastructure/database/migrations/004_evolution_proposals.d.ts +8 -0
- package/dist/lib/infrastructure/database/migrations/004_evolution_proposals.js +43 -0
- package/dist/lib/infrastructure/logging/Logger.d.ts +2 -0
- package/dist/lib/infrastructure/logging/Logger.js +34 -7
- package/dist/lib/infrastructure/monitoring/ErrorTracker.js +3 -1
- package/dist/lib/infrastructure/monitoring/PerformanceMonitor.d.ts +2 -2
- package/dist/lib/infrastructure/monitoring/PerformanceMonitor.js +12 -10
- package/dist/lib/infrastructure/notification/LarkNotifier.d.ts +24 -0
- package/dist/lib/infrastructure/notification/LarkNotifier.js +97 -0
- package/dist/lib/infrastructure/report/ReportStore.d.ts +45 -0
- package/dist/lib/infrastructure/report/ReportStore.js +133 -0
- package/dist/lib/infrastructure/signal/SignalAggregator.d.ts +18 -0
- package/dist/lib/infrastructure/signal/SignalAggregator.js +84 -0
- package/dist/lib/infrastructure/signal/SignalBridge.d.ts +13 -0
- package/dist/lib/infrastructure/signal/SignalBridge.js +20 -0
- package/dist/lib/infrastructure/signal/SignalBus.d.ts +63 -0
- package/dist/lib/infrastructure/signal/SignalBus.js +106 -0
- package/dist/lib/infrastructure/signal/SignalTraceWriter.d.ts +36 -0
- package/dist/lib/infrastructure/signal/SignalTraceWriter.js +130 -0
- package/dist/lib/injection/ServiceContainer.js +6 -0
- package/dist/lib/injection/ServiceMap.d.ts +16 -19
- package/dist/lib/injection/modules/AgentModule.d.ts +1 -1
- package/dist/lib/injection/modules/AgentModule.js +7 -1
- package/dist/lib/injection/modules/AppModule.d.ts +3 -4
- package/dist/lib/injection/modules/AppModule.js +7 -43
- package/dist/lib/injection/modules/GuardModule.js +59 -2
- package/dist/lib/injection/modules/InfraModule.d.ts +0 -1
- package/dist/lib/injection/modules/InfraModule.js +9 -7
- package/dist/lib/injection/modules/KnowledgeModule.js +51 -0
- package/dist/lib/injection/modules/PanoramaModule.d.ts +18 -0
- package/dist/lib/injection/modules/PanoramaModule.js +76 -0
- package/dist/lib/injection/modules/SignalModule.d.ts +10 -0
- package/dist/lib/injection/modules/SignalModule.js +84 -0
- package/dist/lib/repository/knowledge/KnowledgeRepository.impl.d.ts +1 -0
- package/dist/lib/repository/knowledge/KnowledgeRepository.impl.js +6 -0
- package/dist/lib/service/bootstrap/BootstrapTaskManager.d.ts +3 -1
- package/dist/lib/service/bootstrap/BootstrapTaskManager.js +20 -1
- package/dist/lib/service/delivery/AgentInstructionsGenerator.js +4 -5
- package/dist/lib/service/delivery/CursorDeliveryPipeline.d.ts +3 -1
- package/dist/lib/service/delivery/CursorDeliveryPipeline.js +13 -10
- package/dist/lib/service/delivery/RulesGenerator.js +3 -2
- package/dist/lib/service/evolution/ConsolidationAdvisor.d.ts +114 -0
- package/dist/lib/service/evolution/ConsolidationAdvisor.js +542 -0
- package/dist/lib/service/evolution/ContradictionDetector.d.ts +54 -0
- package/dist/lib/service/evolution/ContradictionDetector.js +253 -0
- package/dist/lib/service/evolution/DecayDetector.d.ts +71 -0
- package/dist/lib/service/evolution/DecayDetector.js +244 -0
- package/dist/lib/service/evolution/EnhancementSuggester.d.ts +38 -0
- package/dist/lib/service/evolution/EnhancementSuggester.js +220 -0
- package/dist/lib/service/evolution/KnowledgeMetabolism.d.ts +82 -0
- package/dist/lib/service/evolution/KnowledgeMetabolism.js +167 -0
- package/dist/lib/service/evolution/RedundancyAnalyzer.d.ts +53 -0
- package/dist/lib/service/evolution/RedundancyAnalyzer.js +210 -0
- package/dist/lib/service/evolution/StagingManager.d.ts +57 -0
- package/dist/lib/service/evolution/StagingManager.js +201 -0
- package/dist/lib/service/guard/ComplianceReporter.d.ts +42 -2
- package/dist/lib/service/guard/ComplianceReporter.js +43 -5
- package/dist/lib/service/guard/CoverageAnalyzer.d.ts +54 -0
- package/dist/lib/service/guard/CoverageAnalyzer.js +149 -0
- package/dist/lib/service/guard/GuardCheckEngine.d.ts +55 -1
- package/dist/lib/service/guard/GuardCheckEngine.js +508 -15
- package/dist/lib/service/guard/GuardFeedbackLoop.d.ts +3 -0
- package/dist/lib/service/guard/GuardFeedbackLoop.js +9 -0
- package/dist/lib/service/guard/ReverseGuard.d.ts +73 -0
- package/dist/lib/service/guard/ReverseGuard.js +256 -0
- package/dist/lib/service/guard/RuleLearner.d.ts +12 -0
- package/dist/lib/service/guard/RuleLearner.js +38 -0
- package/dist/lib/service/guard/UncertaintyCollector.d.ts +83 -0
- package/dist/lib/service/guard/UncertaintyCollector.js +149 -0
- package/dist/lib/service/guard/ViolationsStore.d.ts +1 -0
- package/dist/lib/service/guard/ViolationsStore.js +33 -3
- package/dist/lib/service/knowledge/ConfidenceRouter.d.ts +13 -0
- package/dist/lib/service/knowledge/ConfidenceRouter.js +14 -0
- package/dist/lib/service/knowledge/KnowledgeService.js +22 -4
- package/dist/lib/service/module/ModuleService.js +3 -13
- package/dist/lib/service/panorama/CouplingAnalyzer.d.ts +27 -0
- package/dist/lib/service/panorama/CouplingAnalyzer.js +192 -0
- package/dist/lib/service/panorama/DimensionAnalyzer.d.ts +28 -0
- package/dist/lib/service/panorama/DimensionAnalyzer.js +320 -0
- package/dist/lib/service/panorama/LayerInferrer.d.ts +19 -0
- package/dist/lib/service/panorama/LayerInferrer.js +182 -0
- package/dist/lib/service/panorama/ModuleDiscoverer.d.ts +24 -0
- package/dist/lib/service/panorama/ModuleDiscoverer.js +185 -0
- package/dist/lib/service/panorama/PanoramaAggregator.d.ts +29 -0
- package/dist/lib/service/panorama/PanoramaAggregator.js +228 -0
- package/dist/lib/service/panorama/PanoramaScanner.d.ts +52 -0
- package/dist/lib/service/panorama/PanoramaScanner.js +188 -0
- package/dist/lib/service/panorama/PanoramaService.d.ts +108 -0
- package/dist/lib/service/panorama/PanoramaService.js +220 -0
- package/dist/lib/service/panorama/PanoramaTypes.d.ts +134 -0
- package/dist/lib/service/panorama/PanoramaTypes.js +6 -0
- package/dist/lib/service/panorama/RoleRefiner.d.ts +48 -0
- package/dist/lib/service/panorama/RoleRefiner.js +535 -0
- package/dist/lib/service/search/MultiSignalRanker.d.ts +1 -0
- package/dist/lib/service/search/MultiSignalRanker.js +16 -0
- package/dist/lib/service/search/SearchEngine.d.ts +1 -0
- package/dist/lib/service/search/SearchEngine.js +9 -1
- package/dist/lib/service/search/SearchTypes.d.ts +2 -0
- package/dist/lib/service/signal/HitRecorder.d.ts +68 -0
- package/dist/lib/service/signal/HitRecorder.js +173 -0
- package/dist/lib/service/skills/SignalCollector.d.ts +3 -1
- package/dist/lib/service/skills/SignalCollector.js +31 -1
- package/dist/lib/service/task/IntentExtractor.d.ts +58 -0
- package/dist/lib/service/task/IntentExtractor.js +142 -0
- package/dist/lib/service/task/PrimeSearchPipeline.d.ts +54 -0
- package/dist/lib/service/task/PrimeSearchPipeline.js +98 -0
- package/dist/lib/shared/constants.d.ts +0 -15
- package/dist/lib/shared/constants.js +0 -10
- package/dist/lib/shared/schemas/config.d.ts +4 -1
- package/dist/lib/shared/schemas/config.js +8 -1
- package/dist/lib/shared/schemas/mcp-tools.d.ts +41 -96
- package/dist/lib/shared/schemas/mcp-tools.js +59 -119
- package/dist/scripts/analyze-signals.d.ts +20 -0
- package/dist/scripts/analyze-signals.js +155 -0
- package/dist/scripts/diagnose-mcp.js +1 -1
- package/dist/scripts/release.js +2 -10
- package/package.json +4 -19
- package/skills/autosnippet-devdocs/SKILL.md +11 -8
- package/templates/claude-code/hooks/autosnippet-session.sh +10 -15
- package/templates/cursor-hooks/hooks/session-start.sh +1 -1
- package/templates/instructions/agent-static.md +2 -1
- package/templates/instructions/conventions.md +5 -6
- package/templates/recipes-setup/README.md +1 -2
- package/dashboard/dist/assets/icons-C1dUryS-.js +0 -1
- package/dashboard/dist/assets/index-D0whuycy.css +0 -1
- package/dashboard/dist/assets/index-DdvZE4Yd.js +0 -128
- package/dist/lib/domain/task/Task.d.ts +0 -140
- package/dist/lib/domain/task/Task.js +0 -254
- package/dist/lib/domain/task/TaskDependency.d.ts +0 -23
- package/dist/lib/domain/task/TaskDependency.js +0 -34
- package/dist/lib/domain/task/TaskIdGenerator.d.ts +0 -40
- package/dist/lib/domain/task/TaskIdGenerator.js +0 -75
- package/dist/lib/domain/task/index.d.ts +0 -4
- package/dist/lib/domain/task/index.js +0 -4
- package/dist/lib/http/routes/snippets.js +0 -49
- package/dist/lib/infrastructure/database/migrations/002_add_tasks.d.ts +0 -11
- package/dist/lib/infrastructure/database/migrations/002_add_tasks.js +0 -86
- package/dist/lib/platform/ClipboardManager.d.ts +0 -24
- package/dist/lib/platform/ClipboardManager.js +0 -142
- package/dist/lib/platform/NativeUi.d.ts +0 -53
- package/dist/lib/platform/NativeUi.js +0 -284
- package/dist/lib/platform/ios/index.d.ts +0 -38
- package/dist/lib/platform/ios/index.js +0 -42
- package/dist/lib/platform/ios/routes/spm.d.ts +0 -9
- package/dist/lib/platform/ios/routes/spm.js +0 -371
- package/dist/lib/platform/ios/snippet/PlaceholderConverter.d.ts +0 -21
- package/dist/lib/platform/ios/snippet/PlaceholderConverter.js +0 -48
- package/dist/lib/platform/ios/snippet/XcodeCodec.d.ts +0 -23
- package/dist/lib/platform/ios/snippet/XcodeCodec.js +0 -96
- package/dist/lib/platform/ios/spm/DependencyGraph.d.ts +0 -56
- package/dist/lib/platform/ios/spm/DependencyGraph.js +0 -195
- package/dist/lib/platform/ios/spm/PackageSwiftParser.d.ts +0 -69
- package/dist/lib/platform/ios/spm/PackageSwiftParser.js +0 -231
- package/dist/lib/platform/ios/spm/PathFinder.d.ts +0 -28
- package/dist/lib/platform/ios/spm/PathFinder.js +0 -117
- package/dist/lib/platform/ios/spm/PolicyEngine.d.ts +0 -44
- package/dist/lib/platform/ios/spm/PolicyEngine.js +0 -79
- package/dist/lib/platform/ios/spm/SpmHelper.d.ts +0 -102
- package/dist/lib/platform/ios/spm/SpmHelper.js +0 -464
- package/dist/lib/platform/ios/xcode/HeaderResolver.d.ts +0 -33
- package/dist/lib/platform/ios/xcode/HeaderResolver.js +0 -90
- package/dist/lib/platform/ios/xcode/SaveEventFilter.d.ts +0 -66
- package/dist/lib/platform/ios/xcode/SaveEventFilter.js +0 -142
- package/dist/lib/platform/ios/xcode/XcodeAutomation.d.ts +0 -71
- package/dist/lib/platform/ios/xcode/XcodeAutomation.js +0 -327
- package/dist/lib/platform/ios/xcode/XcodeImportResolver.d.ts +0 -130
- package/dist/lib/platform/ios/xcode/XcodeImportResolver.js +0 -404
- package/dist/lib/platform/ios/xcode/XcodeIntegration.d.ts +0 -89
- package/dist/lib/platform/ios/xcode/XcodeIntegration.js +0 -588
- package/dist/lib/platform/ios/xcode/XcodeWriteUtils.d.ts +0 -99
- package/dist/lib/platform/ios/xcode/XcodeWriteUtils.js +0 -190
- package/dist/lib/repository/task/TaskRepository.impl.d.ts +0 -171
- package/dist/lib/repository/task/TaskRepository.impl.js +0 -347
- package/dist/lib/service/automation/ActionPipeline.d.ts +0 -34
- package/dist/lib/service/automation/ActionPipeline.js +0 -53
- package/dist/lib/service/automation/AutomationOrchestrator.d.ts +0 -86
- package/dist/lib/service/automation/AutomationOrchestrator.js +0 -57
- package/dist/lib/service/automation/ContextCollector.d.ts +0 -24
- package/dist/lib/service/automation/ContextCollector.js +0 -35
- package/dist/lib/service/automation/DirectiveDetector.d.ts +0 -51
- package/dist/lib/service/automation/DirectiveDetector.js +0 -112
- package/dist/lib/service/automation/FileWatcher.d.ts +0 -51
- package/dist/lib/service/automation/FileWatcher.js +0 -366
- package/dist/lib/service/automation/TriggerResolver.d.ts +0 -36
- package/dist/lib/service/automation/TriggerResolver.js +0 -62
- package/dist/lib/service/automation/handlers/AlinkHandler.d.ts +0 -7
- package/dist/lib/service/automation/handlers/AlinkHandler.js +0 -80
- package/dist/lib/service/automation/handlers/CreateHandler.d.ts +0 -11
- package/dist/lib/service/automation/handlers/CreateHandler.js +0 -170
- package/dist/lib/service/automation/handlers/GuardHandler.d.ts +0 -17
- package/dist/lib/service/automation/handlers/GuardHandler.js +0 -218
- package/dist/lib/service/automation/handlers/HeaderHandler.d.ts +0 -2
- package/dist/lib/service/automation/handlers/HeaderHandler.js +0 -32
- package/dist/lib/service/automation/handlers/SearchHandler.d.ts +0 -11
- package/dist/lib/service/automation/handlers/SearchHandler.js +0 -278
- package/dist/lib/service/snippet/SnippetFactory.d.ts +0 -101
- package/dist/lib/service/snippet/SnippetFactory.js +0 -145
- package/dist/lib/service/snippet/SnippetInstaller.d.ts +0 -91
- package/dist/lib/service/snippet/SnippetInstaller.js +0 -276
- package/dist/lib/service/snippet/codecs/SnippetCodec.d.ts +0 -44
- package/dist/lib/service/snippet/codecs/SnippetCodec.js +0 -35
- package/dist/lib/service/snippet/codecs/VSCodeCodec.d.ts +0 -27
- package/dist/lib/service/snippet/codecs/VSCodeCodec.js +0 -82
- package/dist/lib/service/task/TaskGraphService.d.ts +0 -222
- package/dist/lib/service/task/TaskGraphService.js +0 -597
- package/dist/lib/service/task/TaskKnowledgeBridge.d.ts +0 -95
- package/dist/lib/service/task/TaskKnowledgeBridge.js +0 -298
- package/dist/lib/service/task/TaskReadyEngine.d.ts +0 -84
- package/dist/lib/service/task/TaskReadyEngine.js +0 -115
- package/dist/scripts/build-native-ui.d.ts +0 -3
- package/dist/scripts/build-native-ui.js +0 -62
- package/dist/scripts/init-snippets.d.ts +0 -30
- package/dist/scripts/init-snippets.js +0 -298
- package/dist/scripts/install-full.d.ts +0 -7
- package/dist/scripts/install-full.js +0 -38
- package/resources/native-ui/README.md +0 -29
- package/resources/native-ui/combined-window.swift +0 -494
- package/resources/native-ui/main.swift +0 -598
- package/scripts/postinstall-safe.mjs +0 -89
|
@@ -78,14 +78,6 @@ export declare const SEARCH: Readonly<{
|
|
|
78
78
|
DEFAULT_LIMIT: 10;
|
|
79
79
|
MAX_RESULTS: 100;
|
|
80
80
|
}>;
|
|
81
|
-
/** FileWatcher 配置 */
|
|
82
|
-
export declare const FILE_WATCHER: Readonly<{
|
|
83
|
-
DEBOUNCE_DELAY_MS: 300;
|
|
84
|
-
STABILITY_THRESHOLD_MS: 500;
|
|
85
|
-
POLL_INTERVAL_MS: 100;
|
|
86
|
-
BINARY_INTERVAL_MS: 300;
|
|
87
|
-
MAX_FILE_SIZE_BYTES: number;
|
|
88
|
-
}>;
|
|
89
81
|
/** AiProvider 熔断配置 */
|
|
90
82
|
export declare const AI_CIRCUIT_BREAKER: Readonly<{
|
|
91
83
|
FAILURE_THRESHOLD: 5;
|
|
@@ -176,13 +168,6 @@ declare const _default: {
|
|
|
176
168
|
DEFAULT_LIMIT: 10;
|
|
177
169
|
MAX_RESULTS: 100;
|
|
178
170
|
}>;
|
|
179
|
-
FILE_WATCHER: Readonly<{
|
|
180
|
-
DEBOUNCE_DELAY_MS: 300;
|
|
181
|
-
STABILITY_THRESHOLD_MS: 500;
|
|
182
|
-
POLL_INTERVAL_MS: 100;
|
|
183
|
-
BINARY_INTERVAL_MS: 300;
|
|
184
|
-
MAX_FILE_SIZE_BYTES: number;
|
|
185
|
-
}>;
|
|
186
171
|
AI_CIRCUIT_BREAKER: Readonly<{
|
|
187
172
|
FAILURE_THRESHOLD: 5;
|
|
188
173
|
}>;
|
|
@@ -83,15 +83,6 @@ export const SEARCH = Object.freeze({
|
|
|
83
83
|
DEFAULT_LIMIT: 10,
|
|
84
84
|
MAX_RESULTS: 100,
|
|
85
85
|
});
|
|
86
|
-
// ─── 文件监听器 ──────────────────────────────────────────
|
|
87
|
-
/** FileWatcher 配置 */
|
|
88
|
-
export const FILE_WATCHER = Object.freeze({
|
|
89
|
-
DEBOUNCE_DELAY_MS: 300,
|
|
90
|
-
STABILITY_THRESHOLD_MS: 500,
|
|
91
|
-
POLL_INTERVAL_MS: 100,
|
|
92
|
-
BINARY_INTERVAL_MS: 300,
|
|
93
|
-
MAX_FILE_SIZE_BYTES: 1024 * 1024,
|
|
94
|
-
});
|
|
95
86
|
// ─── AI Provider ─────────────────────────────────────────
|
|
96
87
|
/** AiProvider 熔断配置 */
|
|
97
88
|
export const AI_CIRCUIT_BREAKER = Object.freeze({
|
|
@@ -129,7 +120,6 @@ export default {
|
|
|
129
120
|
COMPLIANCE_SCORING,
|
|
130
121
|
KNOWLEDGE_CONFIDENCE,
|
|
131
122
|
SEARCH,
|
|
132
|
-
FILE_WATCHER,
|
|
133
123
|
AI_CIRCUIT_BREAKER,
|
|
134
124
|
CACHE,
|
|
135
125
|
MONITORING,
|
|
@@ -103,7 +103,10 @@ export declare const AppConfigSchema: z.ZodObject<{
|
|
|
103
103
|
}, z.core.$strip>>;
|
|
104
104
|
guard: z.ZodOptional<z.ZodObject<{
|
|
105
105
|
disabledRules: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
106
|
-
codeLevelThresholds: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodNumber
|
|
106
|
+
codeLevelThresholds: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
|
|
107
|
+
severity: z.ZodOptional<z.ZodString>;
|
|
108
|
+
exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
109
|
+
}, z.core.$strip>]>>>;
|
|
107
110
|
}, z.core.$strip>>;
|
|
108
111
|
taskGraph: z.ZodOptional<z.ZodObject<{
|
|
109
112
|
decision: z.ZodOptional<z.ZodObject<{
|
|
@@ -81,9 +81,16 @@ const QualityGateConfig = z.object({
|
|
|
81
81
|
maxWarnings: z.number().int().min(0).default(20),
|
|
82
82
|
minScore: z.number().int().min(0).max(100).default(70),
|
|
83
83
|
});
|
|
84
|
+
const RuleOverrideConfig = z.union([
|
|
85
|
+
z.number().int().min(0),
|
|
86
|
+
z.object({
|
|
87
|
+
severity: z.string().optional(),
|
|
88
|
+
exclude: z.array(z.string()).optional(),
|
|
89
|
+
}),
|
|
90
|
+
]);
|
|
84
91
|
const GuardConfig = z.object({
|
|
85
92
|
disabledRules: z.array(z.string()).default([]),
|
|
86
|
-
codeLevelThresholds: z.record(z.string(),
|
|
93
|
+
codeLevelThresholds: z.record(z.string(), RuleOverrideConfig).default({}),
|
|
87
94
|
});
|
|
88
95
|
const TaskDecisionConfig = z.object({
|
|
89
96
|
staleDays: z.number().int().min(1).default(30),
|
|
@@ -104,13 +104,25 @@ export declare const CallContextInput: z.ZodObject<{
|
|
|
104
104
|
}, z.core.$strip>;
|
|
105
105
|
export type CallContextInput = z.infer<typeof CallContextInput>;
|
|
106
106
|
export declare const GuardInput: z.ZodObject<{
|
|
107
|
+
operation: z.ZodOptional<z.ZodEnum<{
|
|
108
|
+
check: "check";
|
|
109
|
+
review: "review";
|
|
110
|
+
reverse_audit: "reverse_audit";
|
|
111
|
+
coverage_matrix: "coverage_matrix";
|
|
112
|
+
compliance_report: "compliance_report";
|
|
113
|
+
}>>;
|
|
107
114
|
files: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
108
115
|
code: z.ZodOptional<z.ZodString>;
|
|
109
116
|
language: z.ZodOptional<z.ZodString>;
|
|
110
117
|
filePath: z.ZodOptional<z.ZodString>;
|
|
118
|
+
maxFiles: z.ZodOptional<z.ZodNumber>;
|
|
111
119
|
}, z.core.$strip>;
|
|
112
120
|
export type GuardInput = z.infer<typeof GuardInput>;
|
|
113
|
-
|
|
121
|
+
/**
|
|
122
|
+
* 单条知识条目字段定义(items 数组内部元素的严格 Schema)
|
|
123
|
+
* 用于文档/类型推导,实际 items 使用 z.record() 宽容接收后在 handler 层校验。
|
|
124
|
+
*/
|
|
125
|
+
export declare const SubmitKnowledgeItemSchema: z.ZodObject<{
|
|
114
126
|
title: z.ZodString;
|
|
115
127
|
language: z.ZodString;
|
|
116
128
|
content: z.ZodObject<{
|
|
@@ -162,40 +174,25 @@ export declare const SubmitKnowledgeInput: z.ZodObject<{
|
|
|
162
174
|
moduleName: z.ZodOptional<z.ZodString>;
|
|
163
175
|
includeHeaders: z.ZodOptional<z.ZodBoolean>;
|
|
164
176
|
source: z.ZodOptional<z.ZodString>;
|
|
165
|
-
client_id: z.ZodOptional<z.ZodString>;
|
|
166
|
-
skipDuplicateCheck: z.ZodDefault<z.ZodBoolean>;
|
|
167
|
-
dimensionId: z.ZodOptional<z.ZodString>;
|
|
168
177
|
}, z.core.$strip>;
|
|
169
|
-
export
|
|
170
|
-
export declare const SubmitKnowledgeBatchInput: z.ZodObject<{
|
|
171
|
-
target_name: z.ZodString;
|
|
178
|
+
export declare const SubmitKnowledgeInput: z.ZodObject<{
|
|
172
179
|
items: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
173
|
-
|
|
174
|
-
|
|
180
|
+
target_name: z.ZodOptional<z.ZodString>;
|
|
181
|
+
source: z.ZodOptional<z.ZodString>;
|
|
182
|
+
skipConsolidation: z.ZodDefault<z.ZodBoolean>;
|
|
183
|
+
skipDuplicateCheck: z.ZodDefault<z.ZodBoolean>;
|
|
175
184
|
client_id: z.ZodOptional<z.ZodString>;
|
|
176
185
|
dimensionId: z.ZodOptional<z.ZodString>;
|
|
177
186
|
}, z.core.$strip>;
|
|
178
|
-
export type
|
|
179
|
-
export declare const SaveDocumentInput: z.ZodObject<{
|
|
180
|
-
title: z.ZodString;
|
|
181
|
-
markdown: z.ZodString;
|
|
182
|
-
description: z.ZodOptional<z.ZodString>;
|
|
183
|
-
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
184
|
-
scope: z.ZodDefault<z.ZodEnum<{
|
|
185
|
-
universal: "universal";
|
|
186
|
-
"project-specific": "project-specific";
|
|
187
|
-
}>>;
|
|
188
|
-
source: z.ZodOptional<z.ZodString>;
|
|
189
|
-
}, z.core.$strip>;
|
|
190
|
-
export type SaveDocumentInput = z.infer<typeof SaveDocumentInput>;
|
|
187
|
+
export type SubmitKnowledgeInput = z.infer<typeof SubmitKnowledgeInput>;
|
|
191
188
|
export declare const SkillInput: z.ZodObject<{
|
|
192
189
|
operation: z.ZodEnum<{
|
|
193
190
|
delete: "delete";
|
|
194
191
|
create: "create";
|
|
195
192
|
update: "update";
|
|
196
193
|
list: "list";
|
|
197
|
-
suggest: "suggest";
|
|
198
194
|
load: "load";
|
|
195
|
+
suggest: "suggest";
|
|
199
196
|
}>;
|
|
200
197
|
name: z.ZodOptional<z.ZodString>;
|
|
201
198
|
skillName: z.ZodOptional<z.ZodString>;
|
|
@@ -224,88 +221,38 @@ export declare const DimensionCompleteInput: z.ZodObject<{
|
|
|
224
221
|
crossDimensionHints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
225
222
|
}, z.core.$strip>;
|
|
226
223
|
export type DimensionCompleteInput = z.infer<typeof DimensionCompleteInput>;
|
|
227
|
-
export declare const
|
|
228
|
-
|
|
224
|
+
export declare const WikiInput: z.ZodObject<{
|
|
225
|
+
operation: z.ZodEnum<{
|
|
226
|
+
plan: "plan";
|
|
227
|
+
finalize: "finalize";
|
|
228
|
+
}>;
|
|
229
|
+
language: z.ZodOptional<z.ZodEnum<{
|
|
229
230
|
en: "en";
|
|
230
231
|
zh: "zh";
|
|
231
232
|
}>>;
|
|
232
233
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
234
|
+
articlesWritten: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
233
235
|
}, z.core.$strip>;
|
|
234
|
-
export type
|
|
235
|
-
export declare const WikiFinalizeInput: z.ZodObject<{
|
|
236
|
-
articlesWritten: z.ZodArray<z.ZodString>;
|
|
237
|
-
}, z.core.$strip>;
|
|
238
|
-
export type WikiFinalizeInput = z.infer<typeof WikiFinalizeInput>;
|
|
236
|
+
export type WikiInput = z.infer<typeof WikiInput>;
|
|
239
237
|
export declare const CapabilitiesInput: z.ZodObject<{}, z.core.$strip>;
|
|
240
238
|
export type CapabilitiesInput = z.infer<typeof CapabilitiesInput>;
|
|
241
239
|
export declare const TaskInput: z.ZodObject<{
|
|
242
240
|
operation: z.ZodEnum<{
|
|
243
241
|
create: "create";
|
|
244
|
-
stats: "stats";
|
|
245
242
|
close: "close";
|
|
246
|
-
progress: "progress";
|
|
247
|
-
blocked: "blocked";
|
|
248
|
-
list: "list";
|
|
249
|
-
ready: "ready";
|
|
250
243
|
prime: "prime";
|
|
251
|
-
claim: "claim";
|
|
252
244
|
fail: "fail";
|
|
253
|
-
defer: "defer";
|
|
254
|
-
show: "show";
|
|
255
|
-
decompose: "decompose";
|
|
256
|
-
dep_add: "dep_add";
|
|
257
|
-
dep_tree: "dep_tree";
|
|
258
245
|
record_decision: "record_decision";
|
|
259
|
-
revise_decision: "revise_decision";
|
|
260
|
-
unpin_decision: "unpin_decision";
|
|
261
|
-
list_decisions: "list_decisions";
|
|
262
246
|
}>;
|
|
263
247
|
title: z.ZodOptional<z.ZodString>;
|
|
264
248
|
description: z.ZodOptional<z.ZodString>;
|
|
265
|
-
design: z.ZodOptional<z.ZodString>;
|
|
266
|
-
acceptance: z.ZodOptional<z.ZodString>;
|
|
267
|
-
priority: z.ZodOptional<z.ZodNumber>;
|
|
268
|
-
taskType: z.ZodOptional<z.ZodEnum<{
|
|
269
|
-
task: "task";
|
|
270
|
-
epic: "epic";
|
|
271
|
-
bug: "bug";
|
|
272
|
-
chore: "chore";
|
|
273
|
-
}>>;
|
|
274
|
-
parentId: z.ZodOptional<z.ZodString>;
|
|
275
249
|
id: z.ZodOptional<z.ZodString>;
|
|
276
250
|
reason: z.ZodOptional<z.ZodString>;
|
|
277
251
|
rationale: z.ZodOptional<z.ZodString>;
|
|
278
252
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
279
|
-
relatedTaskId: z.ZodOptional<z.ZodString>;
|
|
280
|
-
dependsOn: z.ZodOptional<z.ZodString>;
|
|
281
|
-
depType: z.ZodDefault<z.ZodEnum<{
|
|
282
|
-
blocks: "blocks";
|
|
283
|
-
related: "related";
|
|
284
|
-
"waits-for": "waits-for";
|
|
285
|
-
"parent-child": "parent-child";
|
|
286
|
-
"discovered-from": "discovered-from";
|
|
287
|
-
"knowledge-ref": "knowledge-ref";
|
|
288
|
-
supersedes: "supersedes";
|
|
289
|
-
}>>;
|
|
290
|
-
limit: z.ZodDefault<z.ZodNumber>;
|
|
291
|
-
status: z.ZodOptional<z.ZodEnum<{
|
|
292
|
-
open: "open";
|
|
293
|
-
closed: "closed";
|
|
294
|
-
pinned: "pinned";
|
|
295
|
-
in_progress: "in_progress";
|
|
296
|
-
deferred: "deferred";
|
|
297
|
-
}>>;
|
|
298
|
-
withKnowledge: z.ZodDefault<z.ZodBoolean>;
|
|
299
253
|
userQuery: z.ZodOptional<z.ZodString>;
|
|
300
254
|
activeFile: z.ZodOptional<z.ZodString>;
|
|
301
255
|
language: z.ZodOptional<z.ZodString>;
|
|
302
|
-
subtasks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
303
|
-
title: z.ZodString;
|
|
304
|
-
description: z.ZodOptional<z.ZodString>;
|
|
305
|
-
priority: z.ZodOptional<z.ZodNumber>;
|
|
306
|
-
taskType: z.ZodOptional<z.ZodString>;
|
|
307
|
-
blockedByIndex: z.ZodOptional<z.ZodNumber>;
|
|
308
|
-
}, z.core.$strip>>>;
|
|
309
256
|
}, z.core.$strip>;
|
|
310
257
|
export type TaskInput = z.infer<typeof TaskInput>;
|
|
311
258
|
export declare const EnrichCandidatesInput: z.ZodObject<{
|
|
@@ -327,20 +274,18 @@ export declare const KnowledgeLifecycleInput: z.ZodObject<{
|
|
|
327
274
|
reason: z.ZodOptional<z.ZodString>;
|
|
328
275
|
}, z.core.$strip>;
|
|
329
276
|
export type KnowledgeLifecycleInput = z.infer<typeof KnowledgeLifecycleInput>;
|
|
330
|
-
export declare const
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
threshold: z.ZodDefault<z.ZodNumber>;
|
|
343
|
-
topK: z.ZodDefault<z.ZodNumber>;
|
|
277
|
+
export declare const PanoramaInput: z.ZodObject<{
|
|
278
|
+
operation: z.ZodDefault<z.ZodEnum<{
|
|
279
|
+
overview: "overview";
|
|
280
|
+
gaps: "gaps";
|
|
281
|
+
module: "module";
|
|
282
|
+
health: "health";
|
|
283
|
+
enhancement_suggestions: "enhancement_suggestions";
|
|
284
|
+
governance_cycle: "governance_cycle";
|
|
285
|
+
decay_report: "decay_report";
|
|
286
|
+
staging_check: "staging_check";
|
|
287
|
+
}>>;
|
|
288
|
+
module: z.ZodOptional<z.ZodString>;
|
|
344
289
|
}, z.core.$strip>;
|
|
345
|
-
export type
|
|
290
|
+
export type PanoramaInput = z.infer<typeof PanoramaInput>;
|
|
346
291
|
export declare const TOOL_SCHEMAS: Record<string, z.ZodType>;
|
|
@@ -99,15 +99,24 @@ export const CallContextInput = z.object({
|
|
|
99
99
|
// 7. autosnippet_guard
|
|
100
100
|
// ══════════════════════════════════════════════════════
|
|
101
101
|
export const GuardInput = z.object({
|
|
102
|
+
operation: z
|
|
103
|
+
.enum(['check', 'review', 'reverse_audit', 'coverage_matrix', 'compliance_report'])
|
|
104
|
+
.optional()
|
|
105
|
+
.describe('Guard 操作类型。reverse_audit: Recipe→Code 反向验证;coverage_matrix: 模块覆盖率矩阵;compliance_report: 3D 合规报告(含 uncertain)。省略则按 code/files 自动路由。'),
|
|
102
106
|
files: z.array(z.string()).optional(),
|
|
103
107
|
code: z.string().optional(),
|
|
104
108
|
language: z.string().optional(),
|
|
105
109
|
filePath: z.string().optional(),
|
|
110
|
+
maxFiles: z.number().optional().describe('reverse_audit/coverage_matrix 时扫描的最大文件数'),
|
|
106
111
|
});
|
|
107
112
|
// ══════════════════════════════════════════════════════
|
|
108
|
-
// 7b. autosnippet_submit_knowledge
|
|
113
|
+
// 7b. autosnippet_submit_knowledge (unified pipeline)
|
|
109
114
|
// ══════════════════════════════════════════════════════
|
|
110
|
-
|
|
115
|
+
/**
|
|
116
|
+
* 单条知识条目字段定义(items 数组内部元素的严格 Schema)
|
|
117
|
+
* 用于文档/类型推导,实际 items 使用 z.record() 宽容接收后在 handler 层校验。
|
|
118
|
+
*/
|
|
119
|
+
export const SubmitKnowledgeItemSchema = z.object({
|
|
111
120
|
// ── 必填字段 ──
|
|
112
121
|
title: TitleField.describe('知识标题,简洁明确'),
|
|
113
122
|
language: LanguageField.describe('编程语言,如 typescript/swift/python'),
|
|
@@ -148,37 +157,22 @@ export const SubmitKnowledgeInput = z.object({
|
|
|
148
157
|
moduleName: z.string().optional(),
|
|
149
158
|
includeHeaders: z.boolean().optional(),
|
|
150
159
|
source: z.string().optional(),
|
|
151
|
-
client_id: z.string().optional(),
|
|
152
|
-
skipDuplicateCheck: z.boolean().default(false),
|
|
153
|
-
dimensionId: z.string().optional(),
|
|
154
160
|
});
|
|
155
|
-
|
|
156
|
-
// 8. autosnippet_submit_knowledge_batch
|
|
157
|
-
// ══════════════════════════════════════════════════════
|
|
158
|
-
export const SubmitKnowledgeBatchInput = z.object({
|
|
159
|
-
target_name: z
|
|
160
|
-
.string()
|
|
161
|
-
.min(1, 'target_name is required')
|
|
162
|
-
.describe('批量来源标识,如 network-module-scan'),
|
|
161
|
+
export const SubmitKnowledgeInput = z.object({
|
|
163
162
|
items: z
|
|
164
163
|
.array(z.record(z.string(), z.unknown()))
|
|
165
|
-
.min(1
|
|
166
|
-
.describe('
|
|
167
|
-
|
|
168
|
-
|
|
164
|
+
.min(1)
|
|
165
|
+
.describe('知识条目数组(1~N 条)。单条与批量统一处理,所有条目严格校验 + 融合分析。' +
|
|
166
|
+
'每条字段: title, language, content(对象), kind, doClause, dontClause, whenClause, coreCode, category, trigger, description, headers, usageGuide, knowledgeType, reasoning(对象)。'),
|
|
167
|
+
target_name: z.string().optional().describe('来源标识,如 network-module-scan'),
|
|
168
|
+
source: z.string().optional().describe('来源标记,默认 mcp'),
|
|
169
|
+
skipConsolidation: z
|
|
170
|
+
.boolean()
|
|
171
|
+
.default(false)
|
|
172
|
+
.describe('跳过融合分析(当确认需要独立新建时设为 true)'),
|
|
173
|
+
skipDuplicateCheck: z.boolean().default(false),
|
|
169
174
|
client_id: z.string().optional(),
|
|
170
|
-
dimensionId: z.string().optional().describe('
|
|
171
|
-
});
|
|
172
|
-
// ══════════════════════════════════════════════════════
|
|
173
|
-
// 9. autosnippet_save_document
|
|
174
|
-
// ══════════════════════════════════════════════════════
|
|
175
|
-
export const SaveDocumentInput = z.object({
|
|
176
|
-
title: TitleField,
|
|
177
|
-
markdown: z.string().min(1, 'markdown content is required'),
|
|
178
|
-
description: z.string().optional(),
|
|
179
|
-
tags: z.array(z.string()).optional(),
|
|
180
|
-
scope: z.enum(['universal', 'project-specific']).default('project-specific'),
|
|
181
|
-
source: z.string().optional(),
|
|
175
|
+
dimensionId: z.string().optional().describe('冷启动关联维度 ID'),
|
|
182
176
|
});
|
|
183
177
|
// ══════════════════════════════════════════════════════
|
|
184
178
|
// 10. autosnippet_skill
|
|
@@ -216,91 +210,41 @@ export const DimensionCompleteInput = z.object({
|
|
|
216
210
|
crossDimensionHints: z.record(z.string(), z.string()).optional(),
|
|
217
211
|
});
|
|
218
212
|
// ══════════════════════════════════════════════════════
|
|
219
|
-
// 11c.
|
|
213
|
+
// 11c. autosnippet_wiki (merged: plan + finalize)
|
|
220
214
|
// ══════════════════════════════════════════════════════
|
|
221
|
-
export const
|
|
222
|
-
|
|
215
|
+
export const WikiInput = z.object({
|
|
216
|
+
operation: z
|
|
217
|
+
.enum(['plan', 'finalize'])
|
|
218
|
+
.describe('plan — 规划主题 + 数据包; finalize — 写入 meta.json + 验证'),
|
|
219
|
+
// plan 参数
|
|
220
|
+
language: z.enum(['zh', 'en']).optional().describe('Wiki 语言,默认 zh'),
|
|
223
221
|
sessionId: z.string().optional(),
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
// 11d. autosnippet_wiki_finalize
|
|
227
|
-
// ══════════════════════════════════════════════════════
|
|
228
|
-
export const WikiFinalizeInput = z.object({
|
|
229
|
-
articlesWritten: z.array(z.string()).min(1, 'articlesWritten must not be empty'),
|
|
222
|
+
// finalize 参数
|
|
223
|
+
articlesWritten: z.array(z.string()).optional(),
|
|
230
224
|
});
|
|
231
225
|
// ══════════════════════════════════════════════════════
|
|
232
226
|
// 12. autosnippet_capabilities — 无参数
|
|
233
227
|
// ══════════════════════════════════════════════════════
|
|
234
228
|
export const CapabilitiesInput = z.object({});
|
|
235
229
|
// ══════════════════════════════════════════════════════
|
|
236
|
-
// 13. autosnippet_task
|
|
230
|
+
// 13. autosnippet_task (5 operations)
|
|
237
231
|
// ══════════════════════════════════════════════════════
|
|
238
232
|
export const TaskInput = z.object({
|
|
239
233
|
operation: z
|
|
240
|
-
.enum([
|
|
241
|
-
'prime',
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
'progress',
|
|
249
|
-
'show',
|
|
250
|
-
'list',
|
|
251
|
-
'stats',
|
|
252
|
-
'blocked',
|
|
253
|
-
'decompose',
|
|
254
|
-
'dep_add',
|
|
255
|
-
'dep_tree',
|
|
256
|
-
'record_decision',
|
|
257
|
-
'revise_decision',
|
|
258
|
-
'unpin_decision',
|
|
259
|
-
'list_decisions',
|
|
260
|
-
])
|
|
261
|
-
.describe('会话: prime(首选) | ready。任务: create/claim/close/fail/defer/progress/show/list/stats/blocked。分解: decompose/dep_add/dep_tree。决策: record_decision/revise_decision/unpin_decision/list_decisions'),
|
|
262
|
-
title: z.string().optional(),
|
|
263
|
-
description: z.string().optional(),
|
|
264
|
-
design: z.string().optional(),
|
|
265
|
-
acceptance: z.string().optional(),
|
|
266
|
-
priority: z.number().int().min(0).max(4).optional(),
|
|
267
|
-
taskType: z.enum(['epic', 'task', 'bug', 'chore']).optional(),
|
|
268
|
-
parentId: z.string().optional(),
|
|
269
|
-
id: z.string().optional(),
|
|
270
|
-
reason: z.string().optional(),
|
|
271
|
-
rationale: z.string().optional(),
|
|
272
|
-
tags: z.array(z.string()).optional(),
|
|
273
|
-
relatedTaskId: z.string().optional(),
|
|
274
|
-
dependsOn: z.string().optional(),
|
|
275
|
-
depType: z
|
|
276
|
-
.enum([
|
|
277
|
-
'blocks',
|
|
278
|
-
'parent-child',
|
|
279
|
-
'waits-for',
|
|
280
|
-
'discovered-from',
|
|
281
|
-
'related',
|
|
282
|
-
'knowledge-ref',
|
|
283
|
-
'supersedes',
|
|
284
|
-
])
|
|
285
|
-
.default('blocks'),
|
|
286
|
-
limit: z.number().int().min(1).max(200).default(10),
|
|
287
|
-
status: z.enum(['open', 'in_progress', 'deferred', 'closed', 'pinned']).optional(),
|
|
288
|
-
withKnowledge: z.boolean().default(true),
|
|
234
|
+
.enum(['prime', 'create', 'close', 'fail', 'record_decision'])
|
|
235
|
+
.describe('prime=加载知识上下文 | create=创建任务锚点 | close=完成+Guard | fail=放弃 | record_decision=记录用户偏好'),
|
|
236
|
+
title: z.string().optional().describe('Task or decision title (create / record_decision)'),
|
|
237
|
+
description: z.string().optional().describe('Decision description (record_decision)'),
|
|
238
|
+
id: z.string().optional().describe('Task ID (close / fail)'),
|
|
239
|
+
reason: z.string().optional().describe('Close reason or fail reason'),
|
|
240
|
+
rationale: z.string().optional().describe('Decision rationale (record_decision)'),
|
|
241
|
+
tags: z.array(z.string()).optional().describe('Decision tags (record_decision)'),
|
|
289
242
|
userQuery: z
|
|
290
243
|
.string()
|
|
291
244
|
.optional()
|
|
292
245
|
.describe('User current input / prompt text for knowledge-aware search'),
|
|
293
246
|
activeFile: z.string().optional().describe('Currently active file path in IDE'),
|
|
294
247
|
language: z.string().optional().describe('Current programming language'),
|
|
295
|
-
subtasks: z
|
|
296
|
-
.array(z.object({
|
|
297
|
-
title: z.string().min(1),
|
|
298
|
-
description: z.string().optional(),
|
|
299
|
-
priority: z.number().int().min(0).max(4).optional(),
|
|
300
|
-
taskType: z.string().optional(),
|
|
301
|
-
blockedByIndex: z.number().int().min(0).optional(),
|
|
302
|
-
}))
|
|
303
|
-
.optional(),
|
|
304
248
|
});
|
|
305
249
|
// ══════════════════════════════════════════════════════
|
|
306
250
|
// Admin Tools
|
|
@@ -329,21 +273,22 @@ export const KnowledgeLifecycleInput = z.object({
|
|
|
329
273
|
.describe('approve/fast_track=发布 | reject=拒绝 | deprecate=废弃 | reactivate=恢复 | to_draft=回草稿'),
|
|
330
274
|
reason: z.string().optional().describe('reject/deprecate 时的理由'),
|
|
331
275
|
});
|
|
332
|
-
//
|
|
333
|
-
export const
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
276
|
+
// 18. autosnippet_panorama
|
|
277
|
+
export const PanoramaInput = z.object({
|
|
278
|
+
operation: z
|
|
279
|
+
.enum([
|
|
280
|
+
'overview',
|
|
281
|
+
'module',
|
|
282
|
+
'gaps',
|
|
283
|
+
'health',
|
|
284
|
+
'governance_cycle',
|
|
285
|
+
'decay_report',
|
|
286
|
+
'staging_check',
|
|
287
|
+
'enhancement_suggestions',
|
|
288
|
+
])
|
|
289
|
+
.default('overview')
|
|
290
|
+
.describe('overview=项目骨架+层级+模块角色 | module=单模块详情+邻居关系 | gaps=知识空白区 | health=全景健康度 | governance_cycle=新陈代谢完整周期 | decay_report=衰退报告 | staging_check=staging检查+自动发布 | enhancement_suggestions=增强建议'),
|
|
291
|
+
module: z.string().optional().describe('模块名称(operation=module 时必填)'),
|
|
347
292
|
});
|
|
348
293
|
// ══════════════════════════════════════════════════════
|
|
349
294
|
// 工具名 → Schema 映射表(用于 wrapHandler 自动注入校验)
|
|
@@ -357,17 +302,12 @@ export const TOOL_SCHEMAS = {
|
|
|
357
302
|
autosnippet_call_context: CallContextInput,
|
|
358
303
|
autosnippet_guard: GuardInput,
|
|
359
304
|
autosnippet_submit_knowledge: SubmitKnowledgeInput,
|
|
360
|
-
autosnippet_submit_knowledge_batch: SubmitKnowledgeBatchInput,
|
|
361
|
-
autosnippet_save_document: SaveDocumentInput,
|
|
362
305
|
autosnippet_skill: SkillInput,
|
|
363
306
|
autosnippet_bootstrap: BootstrapInput,
|
|
364
307
|
autosnippet_dimension_complete: DimensionCompleteInput,
|
|
365
|
-
|
|
366
|
-
autosnippet_wiki_finalize: WikiFinalizeInput,
|
|
367
|
-
autosnippet_capabilities: CapabilitiesInput,
|
|
308
|
+
autosnippet_wiki: WikiInput,
|
|
368
309
|
autosnippet_task: TaskInput,
|
|
369
310
|
autosnippet_enrich_candidates: EnrichCandidatesInput,
|
|
370
311
|
autosnippet_knowledge_lifecycle: KnowledgeLifecycleInput,
|
|
371
|
-
|
|
372
|
-
autosnippet_check_duplicate: CheckDuplicateInput,
|
|
312
|
+
autosnippet_panorama: PanoramaInput,
|
|
373
313
|
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#!/usr/bin/env npx tsx
|
|
2
|
+
/**
|
|
3
|
+
* analyze-signals.ts — JSONL Signal Analyzer
|
|
4
|
+
*
|
|
5
|
+
* Reads intent chain records from .autosnippet/logs/signals/*.jsonl and produces
|
|
6
|
+
* summary analytics for evaluating the Intent Pipeline effectiveness.
|
|
7
|
+
*
|
|
8
|
+
* Usage: npx tsx scripts/analyze-signals.ts [project-root]
|
|
9
|
+
*
|
|
10
|
+
* Metrics:
|
|
11
|
+
* 1. Recipe coverage rate
|
|
12
|
+
* 2. Scenario distribution
|
|
13
|
+
* 3. Multi-query benefit (filtered count)
|
|
14
|
+
* 4. Language distribution
|
|
15
|
+
* 5. Drift → violation correlation
|
|
16
|
+
* 6. Task completion rate
|
|
17
|
+
* 7. Average intent duration
|
|
18
|
+
* 8. Search → drift correlation
|
|
19
|
+
*/
|
|
20
|
+
export {};
|