autosnippet 3.2.13 โ 3.2.16
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/config/constitution.yaml +19 -0
- package/config/default.json +6 -1
- package/dist/bin/cli.d.ts +2 -1
- package/dist/bin/cli.d.ts.map +1 -1
- package/dist/bin/cli.js +241 -22
- package/dist/bin/cli.js.map +1 -1
- package/dist/lib/cli/SetupService.d.ts +70 -6
- package/dist/lib/cli/SetupService.d.ts.map +1 -1
- package/dist/lib/cli/SetupService.js +238 -50
- package/dist/lib/cli/SetupService.js.map +1 -1
- package/dist/lib/cli/UpgradeService.d.ts.map +1 -1
- package/dist/lib/cli/UpgradeService.js +3 -2
- package/dist/lib/cli/UpgradeService.js.map +1 -1
- package/dist/lib/cli/deploy/FileDeployer.d.ts.map +1 -1
- package/dist/lib/cli/deploy/FileDeployer.js +6 -4
- package/dist/lib/cli/deploy/FileDeployer.js.map +1 -1
- package/dist/lib/cli/deploy/FileManifest.d.ts.map +1 -1
- package/dist/lib/cli/deploy/FileManifest.js +3 -2
- package/dist/lib/cli/deploy/FileManifest.js.map +1 -1
- package/dist/lib/core/capability/CapabilityProbe.d.ts +13 -0
- package/dist/lib/core/capability/CapabilityProbe.d.ts.map +1 -1
- package/dist/lib/core/capability/CapabilityProbe.js +36 -17
- package/dist/lib/core/capability/CapabilityProbe.js.map +1 -1
- package/dist/lib/external/mcp/McpServer.d.ts +13 -0
- package/dist/lib/external/mcp/McpServer.d.ts.map +1 -1
- package/dist/lib/external/mcp/McpServer.js +44 -3
- package/dist/lib/external/mcp/McpServer.js.map +1 -1
- package/dist/lib/external/mcp/handlers/bootstrap/pipeline/orchestrator.d.ts.map +1 -1
- package/dist/lib/external/mcp/handlers/bootstrap/pipeline/orchestrator.js +16 -1
- package/dist/lib/external/mcp/handlers/bootstrap/pipeline/orchestrator.js.map +1 -1
- package/dist/lib/external/mcp/handlers/bootstrap-external.js.map +1 -1
- package/dist/lib/external/mcp/handlers/consolidated.d.ts +22 -24
- package/dist/lib/external/mcp/handlers/consolidated.d.ts.map +1 -1
- package/dist/lib/external/mcp/handlers/consolidated.js +4 -2
- package/dist/lib/external/mcp/handlers/consolidated.js.map +1 -1
- package/dist/lib/external/mcp/handlers/dimension-complete-external.js.map +1 -1
- package/dist/lib/external/mcp/handlers/search.d.ts +115 -39
- package/dist/lib/external/mcp/handlers/search.d.ts.map +1 -1
- package/dist/lib/external/mcp/handlers/search.js +107 -190
- package/dist/lib/external/mcp/handlers/search.js.map +1 -1
- package/dist/lib/external/mcp/handlers/skill.d.ts +17 -0
- package/dist/lib/external/mcp/handlers/skill.d.ts.map +1 -1
- package/dist/lib/external/mcp/handlers/skill.js +166 -0
- package/dist/lib/external/mcp/handlers/skill.js.map +1 -1
- package/dist/lib/external/mcp/handlers/task.d.ts +3 -0
- package/dist/lib/external/mcp/handlers/task.d.ts.map +1 -1
- package/dist/lib/external/mcp/handlers/task.js +10 -1
- package/dist/lib/external/mcp/handlers/task.js.map +1 -1
- package/dist/lib/external/mcp/handlers/wiki-external.d.ts.map +1 -1
- package/dist/lib/external/mcp/handlers/wiki-external.js +4 -3
- package/dist/lib/external/mcp/handlers/wiki-external.js.map +1 -1
- package/dist/lib/http/HttpServer.js +2 -2
- package/dist/lib/http/HttpServer.js.map +1 -1
- package/dist/lib/http/middleware/gatewayMiddleware.js +2 -2
- package/dist/lib/http/middleware/gatewayMiddleware.js.map +1 -1
- package/dist/lib/http/routes/ai.js +3 -3
- package/dist/lib/http/routes/ai.js.map +1 -1
- package/dist/lib/http/routes/candidates.d.ts.map +1 -1
- package/dist/lib/http/routes/candidates.js +3 -1
- package/dist/lib/http/routes/candidates.js.map +1 -1
- package/dist/lib/http/routes/commands.d.ts.map +1 -1
- package/dist/lib/http/routes/commands.js +37 -9
- package/dist/lib/http/routes/commands.js.map +1 -1
- package/dist/lib/http/routes/guard.d.ts.map +1 -1
- package/dist/lib/http/routes/guard.js.map +1 -1
- package/dist/lib/http/routes/guardRules.d.ts.map +1 -1
- package/dist/lib/http/routes/guardRules.js +7 -7
- package/dist/lib/http/routes/guardRules.js.map +1 -1
- package/dist/lib/http/routes/knowledge.d.ts.map +1 -1
- package/dist/lib/http/routes/knowledge.js +62 -18
- package/dist/lib/http/routes/knowledge.js.map +1 -1
- package/dist/lib/http/routes/modules.d.ts.map +1 -1
- package/dist/lib/http/routes/modules.js +7 -5
- package/dist/lib/http/routes/modules.js.map +1 -1
- package/dist/lib/http/routes/recipes.js +1 -1
- package/dist/lib/http/routes/recipes.js.map +1 -1
- package/dist/lib/http/routes/remote.d.ts.map +1 -1
- package/dist/lib/http/routes/remote.js +1 -1
- package/dist/lib/http/routes/remote.js.map +1 -1
- package/dist/lib/http/routes/search.d.ts.map +1 -1
- package/dist/lib/http/routes/search.js +31 -23
- package/dist/lib/http/routes/search.js.map +1 -1
- package/dist/lib/http/routes/skills.d.ts.map +1 -1
- package/dist/lib/http/routes/skills.js +73 -0
- package/dist/lib/http/routes/skills.js.map +1 -1
- package/dist/lib/http/routes/snippets.js +2 -2
- package/dist/lib/http/routes/snippets.js.map +1 -1
- package/dist/lib/http/routes/task.js.map +1 -1
- package/dist/lib/http/routes/violations.js +2 -2
- package/dist/lib/http/routes/violations.js.map +1 -1
- package/dist/lib/http/routes/wiki.d.ts.map +1 -1
- package/dist/lib/http/routes/wiki.js +3 -2
- package/dist/lib/http/routes/wiki.js.map +1 -1
- package/dist/lib/http/utils/routeHelpers.d.ts +2 -2
- package/dist/lib/http/utils/routeHelpers.js +2 -2
- package/dist/lib/http/utils/routeHelpers.js.map +1 -1
- package/dist/lib/infrastructure/config/Defaults.d.ts +3 -0
- package/dist/lib/infrastructure/config/Defaults.d.ts.map +1 -1
- package/dist/lib/infrastructure/config/Defaults.js +10 -6
- package/dist/lib/infrastructure/config/Defaults.js.map +1 -1
- package/dist/lib/infrastructure/config/Paths.d.ts +1 -1
- package/dist/lib/infrastructure/config/Paths.d.ts.map +1 -1
- package/dist/lib/infrastructure/config/Paths.js +4 -16
- package/dist/lib/infrastructure/config/Paths.js.map +1 -1
- package/dist/lib/infrastructure/vector/HnswVectorAdapter.d.ts +4 -1
- package/dist/lib/infrastructure/vector/HnswVectorAdapter.d.ts.map +1 -1
- package/dist/lib/infrastructure/vector/HnswVectorAdapter.js +26 -6
- package/dist/lib/infrastructure/vector/HnswVectorAdapter.js.map +1 -1
- package/dist/lib/infrastructure/vector/IndexingPipeline.d.ts +20 -0
- package/dist/lib/infrastructure/vector/IndexingPipeline.d.ts.map +1 -1
- package/dist/lib/infrastructure/vector/IndexingPipeline.js +65 -3
- package/dist/lib/infrastructure/vector/IndexingPipeline.js.map +1 -1
- package/dist/lib/infrastructure/vector/JsonVectorAdapter.d.ts +1 -1
- package/dist/lib/infrastructure/vector/JsonVectorAdapter.js +1 -1
- package/dist/lib/injection/ServiceContainer.d.ts +12 -2
- package/dist/lib/injection/ServiceContainer.d.ts.map +1 -1
- package/dist/lib/injection/ServiceContainer.js +10 -85
- package/dist/lib/injection/ServiceContainer.js.map +1 -1
- package/dist/lib/injection/ServiceMap.d.ts +124 -0
- package/dist/lib/injection/ServiceMap.d.ts.map +1 -0
- package/dist/lib/injection/ServiceMap.js +10 -0
- package/dist/lib/injection/ServiceMap.js.map +1 -0
- package/dist/lib/injection/modules/AgentModule.d.ts +1 -0
- package/dist/lib/injection/modules/AgentModule.d.ts.map +1 -1
- package/dist/lib/injection/modules/AgentModule.js +28 -0
- package/dist/lib/injection/modules/AgentModule.js.map +1 -1
- package/dist/lib/injection/modules/AiModule.d.ts +36 -0
- package/dist/lib/injection/modules/AiModule.d.ts.map +1 -0
- package/dist/lib/injection/modules/AiModule.js +99 -0
- package/dist/lib/injection/modules/AiModule.js.map +1 -0
- package/dist/lib/injection/modules/AppModule.js.map +1 -1
- package/dist/lib/injection/modules/GuardModule.js.map +1 -1
- package/dist/lib/injection/modules/KnowledgeModule.d.ts +1 -1
- package/dist/lib/injection/modules/KnowledgeModule.d.ts.map +1 -1
- package/dist/lib/injection/modules/KnowledgeModule.js +4 -10
- package/dist/lib/injection/modules/KnowledgeModule.js.map +1 -1
- package/dist/lib/injection/modules/VectorModule.d.ts +20 -0
- package/dist/lib/injection/modules/VectorModule.d.ts.map +1 -0
- package/dist/lib/injection/modules/VectorModule.js +74 -0
- package/dist/lib/injection/modules/VectorModule.js.map +1 -0
- package/dist/lib/platform/ios/routes/spm.d.ts.map +1 -1
- package/dist/lib/platform/ios/routes/spm.js +7 -5
- package/dist/lib/platform/ios/routes/spm.js.map +1 -1
- package/dist/lib/platform/ios/spm/SpmHelper.d.ts +1 -1
- package/dist/lib/service/agent/AgentRuntime.d.ts +3 -73
- package/dist/lib/service/agent/AgentRuntime.d.ts.map +1 -1
- package/dist/lib/service/agent/AgentRuntime.js +2 -2
- package/dist/lib/service/agent/AgentRuntime.js.map +1 -1
- package/dist/lib/service/agent/AgentRuntimeTypes.d.ts +113 -0
- package/dist/lib/service/agent/AgentRuntimeTypes.d.ts.map +1 -0
- package/dist/lib/service/agent/AgentRuntimeTypes.js +11 -0
- package/dist/lib/service/agent/AgentRuntimeTypes.js.map +1 -0
- package/dist/lib/service/agent/PipelineStrategy.d.ts +1 -1
- package/dist/lib/service/agent/PipelineStrategy.d.ts.map +1 -1
- package/dist/lib/service/agent/PipelineStrategy.js +3 -3
- package/dist/lib/service/agent/PipelineStrategy.js.map +1 -1
- package/dist/lib/service/agent/core/ChatAgentPrompts.d.ts +2 -2
- package/dist/lib/service/agent/core/ChatAgentPrompts.d.ts.map +1 -1
- package/dist/lib/service/agent/core/ChatAgentPrompts.js +2 -2
- package/dist/lib/service/agent/core/ChatAgentPrompts.js.map +1 -1
- package/dist/lib/service/agent/domain/insight-analyst.d.ts +3 -3
- package/dist/lib/service/agent/domain/insight-analyst.d.ts.map +1 -1
- package/dist/lib/service/agent/domain/insight-analyst.js +3 -3
- package/dist/lib/service/agent/domain/insight-analyst.js.map +1 -1
- package/dist/lib/service/agent/memory/MemoryCoordinator.d.ts +3 -3
- package/dist/lib/service/agent/memory/MemoryCoordinator.d.ts.map +1 -1
- package/dist/lib/service/agent/memory/MemoryCoordinator.js +6 -6
- package/dist/lib/service/agent/memory/MemoryCoordinator.js.map +1 -1
- package/dist/lib/service/agent/memory/MemoryRetriever.d.ts +18 -12
- package/dist/lib/service/agent/memory/MemoryRetriever.d.ts.map +1 -1
- package/dist/lib/service/agent/memory/MemoryRetriever.js +70 -17
- package/dist/lib/service/agent/memory/MemoryRetriever.js.map +1 -1
- package/dist/lib/service/agent/memory/MemoryStore.d.ts +38 -0
- package/dist/lib/service/agent/memory/MemoryStore.d.ts.map +1 -1
- package/dist/lib/service/agent/memory/MemoryStore.js +70 -3
- package/dist/lib/service/agent/memory/MemoryStore.js.map +1 -1
- package/dist/lib/service/agent/memory/PersistentMemory.d.ts +18 -4
- package/dist/lib/service/agent/memory/PersistentMemory.d.ts.map +1 -1
- package/dist/lib/service/agent/memory/PersistentMemory.js +24 -4
- package/dist/lib/service/agent/memory/PersistentMemory.js.map +1 -1
- package/dist/lib/service/agent/presets.d.ts +2 -2
- package/dist/lib/service/agent/tools/index.d.ts +0 -5
- package/dist/lib/service/agent/tools/index.d.ts.map +1 -1
- package/dist/lib/service/agent/tools/query.d.ts +0 -5
- package/dist/lib/service/agent/tools/query.d.ts.map +1 -1
- package/dist/lib/service/agent/tools/query.js +41 -32
- package/dist/lib/service/agent/tools/query.js.map +1 -1
- package/dist/lib/service/automation/FileWatcher.js +9 -9
- package/dist/lib/service/automation/FileWatcher.js.map +1 -1
- package/dist/lib/service/automation/handlers/AlinkHandler.d.ts.map +1 -1
- package/dist/lib/service/automation/handlers/AlinkHandler.js +1 -1
- package/dist/lib/service/automation/handlers/AlinkHandler.js.map +1 -1
- package/dist/lib/service/automation/handlers/GuardHandler.js +1 -1
- package/dist/lib/service/automation/handlers/GuardHandler.js.map +1 -1
- package/dist/lib/service/automation/handlers/SearchHandler.d.ts.map +1 -1
- package/dist/lib/service/automation/handlers/SearchHandler.js +10 -10
- package/dist/lib/service/automation/handlers/SearchHandler.js.map +1 -1
- package/dist/lib/service/cursor/CursorDeliveryPipeline.d.ts.map +1 -1
- package/dist/lib/service/cursor/CursorDeliveryPipeline.js +2 -1
- package/dist/lib/service/cursor/CursorDeliveryPipeline.js.map +1 -1
- package/dist/lib/service/cursor/SkillsSyncer.d.ts.map +1 -1
- package/dist/lib/service/cursor/SkillsSyncer.js +2 -1
- package/dist/lib/service/cursor/SkillsSyncer.js.map +1 -1
- package/dist/lib/service/guard/ExclusionManager.d.ts.map +1 -1
- package/dist/lib/service/guard/ExclusionManager.js +2 -1
- package/dist/lib/service/guard/ExclusionManager.js.map +1 -1
- package/dist/lib/service/guard/RuleLearner.d.ts.map +1 -1
- package/dist/lib/service/guard/RuleLearner.js +2 -1
- package/dist/lib/service/guard/RuleLearner.js.map +1 -1
- package/dist/lib/service/knowledge/KnowledgeService.d.ts +5 -0
- package/dist/lib/service/knowledge/KnowledgeService.d.ts.map +1 -1
- package/dist/lib/service/knowledge/KnowledgeService.js +27 -0
- package/dist/lib/service/knowledge/KnowledgeService.js.map +1 -1
- package/dist/lib/service/module/ModuleService.d.ts.map +1 -1
- package/dist/lib/service/module/ModuleService.js +1 -0
- package/dist/lib/service/module/ModuleService.js.map +1 -1
- package/dist/lib/service/quality/FeedbackCollector.d.ts.map +1 -1
- package/dist/lib/service/quality/FeedbackCollector.js +2 -1
- package/dist/lib/service/quality/FeedbackCollector.js.map +1 -1
- package/dist/lib/service/search/BM25Scorer.d.ts +52 -0
- package/dist/lib/service/search/BM25Scorer.d.ts.map +1 -0
- package/dist/lib/service/search/BM25Scorer.js +155 -0
- package/dist/lib/service/search/BM25Scorer.js.map +1 -0
- package/dist/lib/service/search/CrossEncoderReranker.js +1 -1
- package/dist/lib/service/search/CrossEncoderReranker.js.map +1 -1
- package/dist/lib/service/search/MultiSignalRanker.d.ts +7 -0
- package/dist/lib/service/search/MultiSignalRanker.d.ts.map +1 -1
- package/dist/lib/service/search/MultiSignalRanker.js +37 -18
- package/dist/lib/service/search/MultiSignalRanker.js.map +1 -1
- package/dist/lib/service/search/SearchEngine.d.ts +15 -215
- package/dist/lib/service/search/SearchEngine.d.ts.map +1 -1
- package/dist/lib/service/search/SearchEngine.js +127 -270
- package/dist/lib/service/search/SearchEngine.js.map +1 -1
- package/dist/lib/service/search/SearchTypes.d.ts +258 -0
- package/dist/lib/service/search/SearchTypes.d.ts.map +1 -0
- package/dist/lib/service/search/SearchTypes.js +50 -0
- package/dist/lib/service/search/SearchTypes.js.map +1 -0
- package/dist/lib/service/search/contextBoost.d.ts +1 -1
- package/dist/lib/service/search/contextBoost.js +2 -2
- package/dist/lib/service/search/contextBoost.js.map +1 -1
- package/dist/lib/service/search/tokenizer.d.ts +18 -0
- package/dist/lib/service/search/tokenizer.d.ts.map +1 -0
- package/dist/lib/service/search/tokenizer.js +215 -0
- package/dist/lib/service/search/tokenizer.js.map +1 -0
- package/dist/lib/service/skills/AIRecallStrategy.d.ts +30 -0
- package/dist/lib/service/skills/AIRecallStrategy.d.ts.map +1 -0
- package/dist/lib/service/skills/AIRecallStrategy.js +51 -0
- package/dist/lib/service/skills/AIRecallStrategy.js.map +1 -0
- package/dist/lib/service/skills/FeedbackStore.d.ts +48 -0
- package/dist/lib/service/skills/FeedbackStore.d.ts.map +1 -0
- package/dist/lib/service/skills/FeedbackStore.js +255 -0
- package/dist/lib/service/skills/FeedbackStore.js.map +1 -0
- package/dist/lib/service/skills/RecommendationMetrics.d.ts +60 -0
- package/dist/lib/service/skills/RecommendationMetrics.d.ts.map +1 -0
- package/dist/lib/service/skills/RecommendationMetrics.js +120 -0
- package/dist/lib/service/skills/RecommendationMetrics.js.map +1 -0
- package/dist/lib/service/skills/RecommendationPipeline.d.ts +43 -0
- package/dist/lib/service/skills/RecommendationPipeline.d.ts.map +1 -0
- package/dist/lib/service/skills/RecommendationPipeline.js +235 -0
- package/dist/lib/service/skills/RecommendationPipeline.js.map +1 -0
- package/dist/lib/service/skills/RuleRecallStrategy.d.ts +16 -0
- package/dist/lib/service/skills/RuleRecallStrategy.d.ts.map +1 -0
- package/dist/lib/service/skills/RuleRecallStrategy.js +37 -0
- package/dist/lib/service/skills/RuleRecallStrategy.js.map +1 -0
- package/dist/lib/service/skills/SignalCollector.d.ts +3 -3
- package/dist/lib/service/skills/SignalCollector.d.ts.map +1 -1
- package/dist/lib/service/skills/SignalCollector.js +72 -2
- package/dist/lib/service/skills/SignalCollector.js.map +1 -1
- package/dist/lib/service/skills/SkillHooks.d.ts +33 -14
- package/dist/lib/service/skills/SkillHooks.d.ts.map +1 -1
- package/dist/lib/service/skills/SkillHooks.js +261 -30
- package/dist/lib/service/skills/SkillHooks.js.map +1 -1
- package/dist/lib/service/skills/types.d.ts +210 -0
- package/dist/lib/service/skills/types.d.ts.map +1 -0
- package/dist/lib/service/skills/types.js +7 -0
- package/dist/lib/service/skills/types.js.map +1 -0
- package/dist/lib/service/task/TaskGraphService.d.ts +15 -6
- package/dist/lib/service/task/TaskGraphService.d.ts.map +1 -1
- package/dist/lib/service/task/TaskGraphService.js +55 -5
- package/dist/lib/service/task/TaskGraphService.js.map +1 -1
- package/dist/lib/service/task/TaskKnowledgeBridge.d.ts +90 -25
- package/dist/lib/service/task/TaskKnowledgeBridge.d.ts.map +1 -1
- package/dist/lib/service/task/TaskKnowledgeBridge.js +253 -35
- package/dist/lib/service/task/TaskKnowledgeBridge.js.map +1 -1
- package/dist/lib/service/vector/ContextualEnricher.d.ts +62 -0
- package/dist/lib/service/vector/ContextualEnricher.d.ts.map +1 -0
- package/dist/lib/service/vector/ContextualEnricher.js +150 -0
- package/dist/lib/service/vector/ContextualEnricher.js.map +1 -0
- package/dist/lib/service/vector/SyncCoordinator.d.ts +63 -0
- package/dist/lib/service/vector/SyncCoordinator.d.ts.map +1 -0
- package/dist/lib/service/vector/SyncCoordinator.js +290 -0
- package/dist/lib/service/vector/SyncCoordinator.js.map +1 -0
- package/dist/lib/service/vector/VectorService.d.ts +176 -0
- package/dist/lib/service/vector/VectorService.d.ts.map +1 -0
- package/dist/lib/service/vector/VectorService.js +456 -0
- package/dist/lib/service/vector/VectorService.js.map +1 -0
- package/dist/lib/service/wiki/WikiGenerator.d.ts.map +1 -1
- package/dist/lib/service/wiki/WikiGenerator.js +2 -1
- package/dist/lib/service/wiki/WikiGenerator.js.map +1 -1
- package/dist/lib/service/wiki/WikiRenderers.d.ts +4 -128
- package/dist/lib/service/wiki/WikiRenderers.d.ts.map +1 -1
- package/dist/lib/service/wiki/WikiRenderers.js +2 -0
- package/dist/lib/service/wiki/WikiRenderers.js.map +1 -1
- package/dist/lib/service/wiki/WikiTypes.d.ts +146 -0
- package/dist/lib/service/wiki/WikiTypes.d.ts.map +1 -0
- package/dist/lib/service/wiki/WikiTypes.js +10 -0
- package/dist/lib/service/wiki/WikiTypes.js.map +1 -0
- package/dist/lib/service/wiki/WikiUtils.d.ts.map +1 -1
- package/dist/lib/service/wiki/WikiUtils.js +2 -1
- package/dist/lib/service/wiki/WikiUtils.js.map +1 -1
- package/dist/lib/shared/PathGuard.d.ts.map +1 -1
- package/dist/lib/shared/PathGuard.js +8 -17
- package/dist/lib/shared/PathGuard.js.map +1 -1
- package/dist/lib/shared/ProjectMarkers.d.ts +67 -0
- package/dist/lib/shared/ProjectMarkers.d.ts.map +1 -0
- package/dist/lib/shared/ProjectMarkers.js +142 -0
- package/dist/lib/shared/ProjectMarkers.js.map +1 -0
- package/dist/lib/shared/schemas/mcp-tools.d.ts +3 -0
- package/dist/lib/shared/schemas/mcp-tools.d.ts.map +1 -1
- package/dist/lib/shared/schemas/mcp-tools.js +6 -0
- package/dist/lib/shared/schemas/mcp-tools.js.map +1 -1
- package/package.json +5 -1
- package/templates/constitution.yaml +23 -2
- package/dist/lib/service/search/InvertedIndex.d.ts +0 -34
- package/dist/lib/service/search/InvertedIndex.d.ts.map +0 -1
- package/dist/lib/service/search/InvertedIndex.js +0 -83
- package/dist/lib/service/search/InvertedIndex.js.map +0 -1
- package/dist/lib/service/search/RetrievalFunnel.d.ts +0 -26
- package/dist/lib/service/search/RetrievalFunnel.d.ts.map +0 -1
- package/dist/lib/service/search/RetrievalFunnel.js +0 -77
- package/dist/lib/service/search/RetrievalFunnel.js.map +0 -1
package/config/constitution.yaml
CHANGED
|
@@ -61,6 +61,25 @@ roles:
|
|
|
61
61
|
constraints:
|
|
62
62
|
- "candidate must include reasoning"
|
|
63
63
|
- "cannot bypass Guard check"
|
|
64
|
+
- id: "contributor"
|
|
65
|
+
name: "Contributor"
|
|
66
|
+
description: "ๆๅญไปๅบไฝๆ push ๆ้็ๅข้ๆๅ๏ผๅช่ฏป๏ผ"
|
|
67
|
+
permissions:
|
|
68
|
+
- "read:recipes"
|
|
69
|
+
- "read:candidates"
|
|
70
|
+
- "read:guard_rules"
|
|
71
|
+
- "read:audit_logs:self"
|
|
72
|
+
constraints:
|
|
73
|
+
- "ไธ่ฝๅๅปบ/ไฟฎๆน Recipe๏ผๆ ๅญไปๅบๅๆ้๏ผ"
|
|
74
|
+
- "ไธ่ฝไฟฎๆน Guard ่งๅ"
|
|
75
|
+
- id: "visitor"
|
|
76
|
+
name: "Visitor"
|
|
77
|
+
description: "ไธฅๆ ผๆจกๅผไธ็ๆๅฐๆ้่ฎฟๅฎข"
|
|
78
|
+
permissions:
|
|
79
|
+
- "read:recipes"
|
|
80
|
+
- "read:guard_rules"
|
|
81
|
+
constraints:
|
|
82
|
+
- "ไป
ๅฏ่ฏปๅ๏ผไธ่ฝๆง่กไปปไฝๅๆไฝ"
|
|
64
83
|
- id: "developer"
|
|
65
84
|
name: "Developer"
|
|
66
85
|
description: "project owner, full access"
|
package/config/default.json
CHANGED
|
@@ -64,7 +64,12 @@
|
|
|
64
64
|
"enabled": true,
|
|
65
65
|
"rrfK": 60,
|
|
66
66
|
"alpha": 0.5
|
|
67
|
-
}
|
|
67
|
+
},
|
|
68
|
+
"contextualEnrich": false,
|
|
69
|
+
"contextualModel": "claude-sonnet-4-20250514",
|
|
70
|
+
"autoSyncOnCrud": true,
|
|
71
|
+
"syncDebounceMs": 2000,
|
|
72
|
+
"dimensionGuard": true
|
|
68
73
|
},
|
|
69
74
|
"qualityGate": {
|
|
70
75
|
"maxErrors": 0,
|
package/dist/bin/cli.d.ts
CHANGED
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
* AutoSnippet V2 CLI
|
|
4
4
|
*
|
|
5
5
|
* Usage:
|
|
6
|
-
* asd setup -
|
|
6
|
+
* asd setup - ๅๅงๅ้กน็ฎ๏ผ--repo ๆๅฎๅญไปๅบ่ฟ็จๅฐๅ๏ผ
|
|
7
|
+
* asd remote <url> - ๅฐ recipes ็ฎๅฝ่ฝฌไธบ็ฌ็ซๅญไปๅบๅนถๅ
ณ่่ฟ็จไปๅบ
|
|
7
8
|
* asd coldstart - ๅทๅฏๅจ็ฅ่ฏๅบ๏ผ9 ็ปดๅบฆๅๆ + AI ๅกซๅ
๏ผ
|
|
8
9
|
* asd ais [Target] - AI ๆซๆ Target โ ็ดๆฅๅๅธ Recipes
|
|
9
10
|
* asd search <query> - ๆ็ดข็ฅ่ฏๅบ
|
package/dist/bin/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../bin/cli.ts"],"names":[],"mappings":";AAEA
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../bin/cli.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;GAiBG"}
|
package/dist/bin/cli.js
CHANGED
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
* AutoSnippet V2 CLI
|
|
4
4
|
*
|
|
5
5
|
* Usage:
|
|
6
|
-
* asd setup -
|
|
6
|
+
* asd setup - ๅๅงๅ้กน็ฎ๏ผ--repo ๆๅฎๅญไปๅบ่ฟ็จๅฐๅ๏ผ
|
|
7
|
+
* asd remote <url> - ๅฐ recipes ็ฎๅฝ่ฝฌไธบ็ฌ็ซๅญไปๅบๅนถๅ
ณ่่ฟ็จไปๅบ
|
|
7
8
|
* asd coldstart - ๅทๅฏๅจ็ฅ่ฏๅบ๏ผ9 ็ปดๅบฆๅๆ + AI ๅกซๅ
๏ผ
|
|
8
9
|
* asd ais [Target] - AI ๆซๆ Target โ ็ดๆฅๅๅธ Recipes
|
|
9
10
|
* asd search <query> - ๆ็ดข็ฅ่ฏๅบ
|
|
@@ -16,7 +17,7 @@
|
|
|
16
17
|
* asd mirror - ้ๅ .cursor/ โ .qoder/ .trae/
|
|
17
18
|
* asd status - ็ฏๅข็ถๆ
|
|
18
19
|
*/
|
|
19
|
-
import { copyFileSync, existsSync, mkdirSync, readdirSync, readFileSync } from 'node:fs';
|
|
20
|
+
import { copyFileSync, existsSync, mkdirSync, readdirSync, readFileSync, writeFileSync, } from 'node:fs';
|
|
20
21
|
import { join, resolve } from 'node:path';
|
|
21
22
|
import { Command } from 'commander';
|
|
22
23
|
import { cli } from '../lib/cli/CliLogger.js';
|
|
@@ -50,17 +51,104 @@ program
|
|
|
50
51
|
.option('-d, --dir <path>', '้กน็ฎ็ฎๅฝ', '.')
|
|
51
52
|
.option('--force', 'ๅผบๅถ่ฆ็ๅทฒๆ้
็ฝฎ')
|
|
52
53
|
.option('--seed', '้ข็ฝฎ็คบไพ Recipe๏ผๅทๅฏๅจๆจ่๏ผ')
|
|
54
|
+
.option('--repo <url>', 'recipes ๅญไปๅบ็่ฟ็จ Git ไปๅบๅฐๅ๏ผๆไพๅ clone๏ผไธๆไพๅไธบๆฎ้็ฎๅฝ๏ผ')
|
|
53
55
|
.action(async (opts) => {
|
|
54
56
|
const { SetupService } = await import('../lib/cli/SetupService.js');
|
|
55
57
|
const service = new SetupService({
|
|
56
58
|
projectRoot: resolve(opts.dir),
|
|
57
59
|
force: opts.force,
|
|
58
60
|
seed: opts.seed,
|
|
61
|
+
subRepoUrl: opts.repo,
|
|
59
62
|
});
|
|
60
63
|
await service.run();
|
|
61
64
|
service.printSummary();
|
|
62
65
|
});
|
|
63
66
|
// โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
67
|
+
// remote ๅฝไปค โ ๅฐ recipes ็ฎๅฝ่ฝฌไธบ็ฌ็ซๅญไปๅบๅนถๅ
ณ่่ฟ็จไปๅบ
|
|
68
|
+
// โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
69
|
+
program
|
|
70
|
+
.command('remote <url>')
|
|
71
|
+
.description('ๅฐ recipes ็ฎๅฝ่ฝฌไธบ็ฌ็ซๅญไปๅบๅนถๅ
ณ่่ฟ็จ Git ไปๅบ')
|
|
72
|
+
.option('-d, --dir <path>', '้กน็ฎ็ฎๅฝ', '.')
|
|
73
|
+
.action(async (url, opts) => {
|
|
74
|
+
const projectRoot = resolve(opts.dir);
|
|
75
|
+
const { execSync: exec } = await import('node:child_process');
|
|
76
|
+
const { resolveSubRepoPath, isGitRepo } = await import('../lib/shared/ProjectMarkers.js');
|
|
77
|
+
const subRepoPath = resolveSubRepoPath(projectRoot);
|
|
78
|
+
// 1. ๆ ก้ช็ฎๅฝๅญๅจ
|
|
79
|
+
if (!existsSync(subRepoPath)) {
|
|
80
|
+
cli.error('recipes/ ็ฎๅฝไธๅญๅจ๏ผ่ฏทๅ
่ฟ่ก asd setup');
|
|
81
|
+
process.exit(1);
|
|
82
|
+
}
|
|
83
|
+
// 2. URL ๆ ผๅผ้ช่ฏ
|
|
84
|
+
if (!/^(https?:\/\/.+|git@.+:.+)$/.test(url)) {
|
|
85
|
+
cli.error('ๆ ๆ็ Git ไปๅบๅฐๅ๏ผๆฏๆ HTTPS ๅ SSH ๆ ผๅผ๏ผ');
|
|
86
|
+
process.exit(1);
|
|
87
|
+
}
|
|
88
|
+
const gitExec = (args) => {
|
|
89
|
+
return exec(`git ${args}`, { cwd: subRepoPath, stdio: 'pipe', encoding: 'utf8' }).trim();
|
|
90
|
+
};
|
|
91
|
+
// 3. ๅทฒ็ปๆฏ git ไปๅบ โ ๅชๆดๆฐ remote
|
|
92
|
+
if (isGitRepo(subRepoPath)) {
|
|
93
|
+
try {
|
|
94
|
+
gitExec(`remote get-url origin`);
|
|
95
|
+
// origin ๅทฒๅญๅจ โ set-url
|
|
96
|
+
gitExec(`remote set-url origin ${url}`);
|
|
97
|
+
}
|
|
98
|
+
catch {
|
|
99
|
+
// origin ไธๅญๅจ โ add
|
|
100
|
+
gitExec(`remote add origin ${url}`);
|
|
101
|
+
}
|
|
102
|
+
// ๆดๆฐ config.json
|
|
103
|
+
_updateConfigUrl(projectRoot, url);
|
|
104
|
+
cli.log('โ ๅทฒๆดๆฐ remote origin');
|
|
105
|
+
cli.log(` ${url}`);
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
// 4. ๆฎ้็ฎๅฝ โ ๅๅงๅไธบ git ไปๅบ๏ผไฟ็ๅทฒๆๆไปถ๏ผ
|
|
109
|
+
cli.log('ๆญฃๅจๅฐ recipes/ ่ฝฌไธบ็ฌ็ซๅญไปๅบ...');
|
|
110
|
+
gitExec('init');
|
|
111
|
+
gitExec(`remote add origin ${url}`);
|
|
112
|
+
gitExec('add .');
|
|
113
|
+
try {
|
|
114
|
+
gitExec('commit -m "Init AutoSnippet recipes"');
|
|
115
|
+
}
|
|
116
|
+
catch {
|
|
117
|
+
/* ็ฉบ็ฎๅฝๆถ commit ๅฏ่ฝๅคฑ่ดฅ๏ผๆ ๅฝฑๅ */
|
|
118
|
+
}
|
|
119
|
+
// 5. ๆดๆฐ config.json
|
|
120
|
+
_updateConfigUrl(projectRoot, url);
|
|
121
|
+
cli.log('โ recipes/ ๅทฒ่ฝฌไธบ็ฌ็ซๅญไปๅบ');
|
|
122
|
+
cli.log(` remote origin โ ${url}`);
|
|
123
|
+
cli.log('');
|
|
124
|
+
cli.log('ๅ็ปญๆญฅ้ชค๏ผ');
|
|
125
|
+
cli.log(' 1. git push -u origin main');
|
|
126
|
+
cli.log(' 2. ๅจไธปไปๅบไธญ้ๆฉไธ็งๆนๅผ็ฎก็ recipes/:');
|
|
127
|
+
cli.log(` โข git submodule add ${url} AutoSnippet/recipes`);
|
|
128
|
+
cli.log(' โข ๆๅฐ AutoSnippet/recipes/ ๅ ๅ
ฅ .gitignore');
|
|
129
|
+
});
|
|
130
|
+
/**
|
|
131
|
+
* ๆดๆฐ .autosnippet/config.json ไธญ็ core.subRepoUrl ๅญๆฎต
|
|
132
|
+
*/
|
|
133
|
+
function _updateConfigUrl(projectRoot, url) {
|
|
134
|
+
const configPath = join(projectRoot, '.autosnippet', 'config.json');
|
|
135
|
+
if (!existsSync(configPath)) {
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
try {
|
|
139
|
+
const raw = readFileSync(configPath, 'utf-8');
|
|
140
|
+
const config = JSON.parse(raw);
|
|
141
|
+
if (!config.core) {
|
|
142
|
+
config.core = {};
|
|
143
|
+
}
|
|
144
|
+
config.core.subRepoUrl = url;
|
|
145
|
+
writeFileSync(configPath, JSON.stringify(config, null, 2));
|
|
146
|
+
}
|
|
147
|
+
catch {
|
|
148
|
+
/* config ่งฃๆๅคฑ่ดฅไธ้ปๅกไธปๆต็จ */
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
// โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
64
152
|
// coldstart ๅฝไปค (Knowledge Bootstrap)
|
|
65
153
|
// โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
66
154
|
program
|
|
@@ -156,7 +244,7 @@ program
|
|
|
156
244
|
try {
|
|
157
245
|
const taskManager = container.get('bootstrapTaskManager');
|
|
158
246
|
const sessionStatus = taskManager.getSessionStatus();
|
|
159
|
-
if (!sessionStatus || !sessionStatus
|
|
247
|
+
if (!sessionStatus || !('tasks' in sessionStatus)) {
|
|
160
248
|
break;
|
|
161
249
|
}
|
|
162
250
|
const total = sessionStatus.tasks.length;
|
|
@@ -173,10 +261,10 @@ program
|
|
|
173
261
|
waitSpinner.succeed(`AI ๅกซๅ
ๅฎๆ: ${total} ไธช็ปดๅบฆ`);
|
|
174
262
|
// ่พๅบๅ็ปดๅบฆ็ปๆ
|
|
175
263
|
if (!opts.json) {
|
|
176
|
-
const succeeded = sessionStatus.tasks.filter((t) => t.status === 'done').length;
|
|
177
|
-
const failed = sessionStatus.tasks.filter((t) => t.status === 'error').length;
|
|
264
|
+
const succeeded = ('tasks' in sessionStatus ? sessionStatus.tasks : []).filter((t) => t.status === 'done').length;
|
|
265
|
+
const failed = ('tasks' in sessionStatus ? sessionStatus.tasks : []).filter((t) => t.status === 'error').length;
|
|
178
266
|
cli.log(`\n Results: ${succeeded} succeeded, ${failed} failed`);
|
|
179
|
-
for (const t of sessionStatus.tasks) {
|
|
267
|
+
for (const t of 'tasks' in sessionStatus ? sessionStatus.tasks : []) {
|
|
180
268
|
const icon = t.status === 'done' ? 'โ
' : 'โ';
|
|
181
269
|
cli.log(` ${icon} ${t.meta?.label || t.id}`);
|
|
182
270
|
}
|
|
@@ -492,7 +580,7 @@ program
|
|
|
492
580
|
cli.log(`\n๐ Guard (staged): ${summary.totalViolations} violation(s) in ${sourceFiles.length} file(s)\n`);
|
|
493
581
|
const filesWithIssues = result.files.filter((f) => f.summary.total > 0);
|
|
494
582
|
for (const file of filesWithIssues.slice(0, 10)) {
|
|
495
|
-
cli.log(` ๐ ${file.filePath
|
|
583
|
+
cli.log(` ๐ ${file.filePath}`);
|
|
496
584
|
for (const v of file.violations.slice(0, 5)) {
|
|
497
585
|
const icon = v.severity === 'error' ? 'โ' : 'โ ๏ธ';
|
|
498
586
|
cli.log(` ${icon} [${v.ruleId}] ${v.message}`);
|
|
@@ -633,6 +721,16 @@ program
|
|
|
633
721
|
});
|
|
634
722
|
signalCollector.start();
|
|
635
723
|
globalThis._signalCollector = signalCollector;
|
|
724
|
+
// ๅฐ SignalCollector ็ปๅฎๅฐ AIRecallStrategy (ๅปถ่ฟๆณจๅ
ฅ)
|
|
725
|
+
try {
|
|
726
|
+
const aiStrategy = container.singletons._aiRecallStrategy;
|
|
727
|
+
if (aiStrategy && typeof aiStrategy.setSignalCollector === 'function') {
|
|
728
|
+
aiStrategy.setSignalCollector(signalCollector);
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
catch {
|
|
732
|
+
/* recommendation pipeline not yet initialized */
|
|
733
|
+
}
|
|
636
734
|
}
|
|
637
735
|
catch (scErr) {
|
|
638
736
|
cli.warn(`โ ๏ธ SignalCollector failed to start: ${scErr.message}`);
|
|
@@ -811,6 +909,112 @@ program
|
|
|
811
909
|
cli.blank();
|
|
812
910
|
});
|
|
813
911
|
// โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
912
|
+
// embed ๅฝไปค โ ๆๅปบ/้ๅปบ่ฏญไนๅ้็ดขๅผ
|
|
913
|
+
// โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
914
|
+
program
|
|
915
|
+
.command('embed')
|
|
916
|
+
.description('ๆๅปบ/้ๅปบ่ฏญไนๅ้็ดขๅผ')
|
|
917
|
+
.option('-d, --dir <path>', '้กน็ฎ็ฎๅฝ', '.')
|
|
918
|
+
.option('--force', 'ๅฟฝ็ฅๅข้ๆฃๆต๏ผๅ
จ้้ๅปบ')
|
|
919
|
+
.option('--clear', 'ๆธ
็ฉบ็ฐๆ็ดขๅผๅ้ๅปบ')
|
|
920
|
+
.option('--dry-run', 'ๅชๆฅๅไธๆง่ก')
|
|
921
|
+
.option('--json', 'JSON ่พๅบ')
|
|
922
|
+
.option('--validate', 'ๅช้ช่ฏ็ดขๅผๅฅๅบท็ถๆ')
|
|
923
|
+
.action(async (opts) => {
|
|
924
|
+
const projectRoot = resolve(opts.dir);
|
|
925
|
+
const { bootstrap, container } = await initContainer({ projectRoot });
|
|
926
|
+
try {
|
|
927
|
+
// ไผๅ
ไฝฟ็จ VectorService๏ผ้็บงๅฐ IndexingPipeline
|
|
928
|
+
const hasVectorService = !!container.services.vectorService;
|
|
929
|
+
if (opts.validate) {
|
|
930
|
+
if (hasVectorService) {
|
|
931
|
+
const vs = container.get('vectorService');
|
|
932
|
+
const validation = await vs.validate();
|
|
933
|
+
const stats = await vs.getStats();
|
|
934
|
+
if (opts.json) {
|
|
935
|
+
cli.json({ validation, stats });
|
|
936
|
+
}
|
|
937
|
+
else {
|
|
938
|
+
cli.log('\n Vector Index Health Check');
|
|
939
|
+
cli.log(` ${'โ'.repeat(40)}`);
|
|
940
|
+
cli.log(` Status: ${validation.healthy ? 'โ
Healthy' : 'โ ๏ธ Issues found'}`);
|
|
941
|
+
cli.log(` Entries: ${stats.count ?? 0}`);
|
|
942
|
+
cli.log(` Dimension: ${stats.dimension ?? 0}`);
|
|
943
|
+
cli.log(` Quantized: ${stats.quantized ?? false}`);
|
|
944
|
+
cli.log(` Embed: ${stats.embedProviderAvailable ? 'Available' : 'Not configured'}`);
|
|
945
|
+
if (validation.issues.length > 0) {
|
|
946
|
+
cli.log(`\n Issues:`);
|
|
947
|
+
for (const issue of validation.issues) {
|
|
948
|
+
cli.log(` โข ${issue}`);
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
cli.blank();
|
|
952
|
+
}
|
|
953
|
+
}
|
|
954
|
+
else {
|
|
955
|
+
cli.log('VectorService not available. Configure an AI API key first.');
|
|
956
|
+
}
|
|
957
|
+
return;
|
|
958
|
+
}
|
|
959
|
+
if (hasVectorService) {
|
|
960
|
+
const vs = container.get('vectorService');
|
|
961
|
+
if (opts.clear) {
|
|
962
|
+
await vs.clear();
|
|
963
|
+
cli.log(' ๐๏ธ Existing vector index cleared.');
|
|
964
|
+
}
|
|
965
|
+
const start = Date.now();
|
|
966
|
+
cli.log(' Building semantic index...');
|
|
967
|
+
const result = await vs.fullBuild({
|
|
968
|
+
force: opts.force ?? false,
|
|
969
|
+
dryRun: opts.dryRun ?? false,
|
|
970
|
+
});
|
|
971
|
+
const duration = ((Date.now() - start) / 1000).toFixed(1);
|
|
972
|
+
if (opts.json) {
|
|
973
|
+
cli.json(result);
|
|
974
|
+
}
|
|
975
|
+
else {
|
|
976
|
+
cli.log('\n Embedding Report');
|
|
977
|
+
cli.log(` ${'โ'.repeat(40)}`);
|
|
978
|
+
cli.log(` Scanned: ${result.scanned ?? 0} files`);
|
|
979
|
+
cli.log(` Chunked: ${result.chunked ?? 0} chunks`);
|
|
980
|
+
cli.log(` Enriched: ${result.enriched ?? 0} (contextual)`);
|
|
981
|
+
cli.log(` Embedded: ${result.embedded ?? 0}`);
|
|
982
|
+
cli.log(` Upserted: ${result.upserted ?? 0}`);
|
|
983
|
+
cli.log(` Skipped: ${result.skipped ?? 0} (unchanged)`);
|
|
984
|
+
cli.log(` Errors: ${result.errors ?? 0}`);
|
|
985
|
+
cli.log(` Duration: ${duration}s`);
|
|
986
|
+
cli.blank();
|
|
987
|
+
}
|
|
988
|
+
}
|
|
989
|
+
else {
|
|
990
|
+
// ้็บง: ็ดๆฅไฝฟ็จ IndexingPipeline
|
|
991
|
+
const pipeline = container.get('indexingPipeline');
|
|
992
|
+
const result = await pipeline.run({
|
|
993
|
+
force: opts.force ?? false,
|
|
994
|
+
dryRun: opts.dryRun ?? false,
|
|
995
|
+
clear: opts.clear ?? false,
|
|
996
|
+
});
|
|
997
|
+
if (opts.json) {
|
|
998
|
+
cli.json(result);
|
|
999
|
+
}
|
|
1000
|
+
else {
|
|
1001
|
+
cli.log('\n Embedding Report (pipeline mode)');
|
|
1002
|
+
cli.log(` ${'โ'.repeat(40)}`);
|
|
1003
|
+
cli.log(` Scanned: ${result.scanned} files`);
|
|
1004
|
+
cli.log(` Chunked: ${result.chunked} chunks`);
|
|
1005
|
+
cli.log(` Embedded: ${result.embedded}`);
|
|
1006
|
+
cli.log(` Upserted: ${result.upserted}`);
|
|
1007
|
+
cli.log(` Skipped: ${result.skipped} (unchanged)`);
|
|
1008
|
+
cli.log(` Errors: ${result.errors}`);
|
|
1009
|
+
cli.blank();
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
}
|
|
1013
|
+
finally {
|
|
1014
|
+
await bootstrap.shutdown?.();
|
|
1015
|
+
}
|
|
1016
|
+
});
|
|
1017
|
+
// โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
814
1018
|
// upgrade ๅฝไปค
|
|
815
1019
|
// โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
816
1020
|
program
|
|
@@ -843,9 +1047,9 @@ program
|
|
|
843
1047
|
const result = await pipeline.deliver();
|
|
844
1048
|
cli.log('\n Cursor Rules Delivery');
|
|
845
1049
|
cli.log(` ${'โ'.repeat(40)}`);
|
|
846
|
-
cli.log(` Channel A: ${result.channelA?.
|
|
847
|
-
cli.log(` Channel B: ${result.channelB?.
|
|
848
|
-
cli.log(` Channel C: ${result.channelC?.
|
|
1050
|
+
cli.log(` Channel A: ${result.channelA?.rulesCount ?? '?'} always-on rules`);
|
|
1051
|
+
cli.log(` Channel B: ${result.channelB?.topicCount ?? Object.keys(result.channelB?.topics || {}).length} topic rules`);
|
|
1052
|
+
cli.log(` Channel C: ${result.channelC?.synced ?? '?'} skills (${result.channelC?.errors ?? 0} errors)`);
|
|
849
1053
|
if (result.channelC.errors > 0) {
|
|
850
1054
|
cli.log(` โ ๏ธ ${result.channelC.errors} skill(s) failed to deliver`);
|
|
851
1055
|
}
|
|
@@ -890,9 +1094,15 @@ taskCmd
|
|
|
890
1094
|
cli.log(`\n ID Status Priority Title`);
|
|
891
1095
|
cli.log(` ${'โ'.repeat(70)}`);
|
|
892
1096
|
for (const t of tasks) {
|
|
1097
|
+
if (!t) {
|
|
1098
|
+
continue;
|
|
1099
|
+
}
|
|
893
1100
|
const j = t.toJSON ? t.toJSON() : t;
|
|
894
|
-
|
|
895
|
-
|
|
1101
|
+
if (!j) {
|
|
1102
|
+
continue;
|
|
1103
|
+
}
|
|
1104
|
+
const id = String(j.id || '').padEnd(16);
|
|
1105
|
+
const status = String(j.status || '').padEnd(13);
|
|
896
1106
|
const pri = String(j.priority ?? '-').padEnd(9);
|
|
897
1107
|
cli.log(` ${id} ${status} ${pri} ${j.title}`);
|
|
898
1108
|
}
|
|
@@ -922,13 +1132,20 @@ taskCmd
|
|
|
922
1132
|
}
|
|
923
1133
|
else {
|
|
924
1134
|
for (const t of tasks) {
|
|
1135
|
+
if (!t) {
|
|
1136
|
+
continue;
|
|
1137
|
+
}
|
|
925
1138
|
const j = t.toJSON ? t.toJSON() : t;
|
|
1139
|
+
if (!j) {
|
|
1140
|
+
continue;
|
|
1141
|
+
}
|
|
926
1142
|
cli.log(`\n โธ ${j.id} โ ${j.title} (P${j.priority ?? '?'})`);
|
|
927
|
-
|
|
928
|
-
|
|
1143
|
+
const kCtx = t.knowledgeContext;
|
|
1144
|
+
if (kCtx?.relatedKnowledge?.length) {
|
|
1145
|
+
cli.log(` Knowledge: ${kCtx.relatedKnowledge.map((k) => k.title).join(', ')}`);
|
|
929
1146
|
}
|
|
930
|
-
if (
|
|
931
|
-
cli.log(` Guard: ${
|
|
1147
|
+
if (kCtx?.guardRules?.length) {
|
|
1148
|
+
cli.log(` Guard: ${kCtx.guardRules.map((r) => r.title).join(', ')}`);
|
|
932
1149
|
}
|
|
933
1150
|
}
|
|
934
1151
|
cli.blank();
|
|
@@ -948,20 +1165,22 @@ taskCmd
|
|
|
948
1165
|
try {
|
|
949
1166
|
const svc = container.get('taskGraphService');
|
|
950
1167
|
const result = await svc.prime({ withKnowledge: true });
|
|
1168
|
+
const inProgress = result.inProgress;
|
|
1169
|
+
const ready = result.ready;
|
|
951
1170
|
cli.log(`\n TaskGraph Prime`);
|
|
952
1171
|
cli.log(` ${'โ'.repeat(40)}`);
|
|
953
|
-
cli.log(` In Progress: ${
|
|
954
|
-
cli.log(` Ready: ${
|
|
1172
|
+
cli.log(` In Progress: ${inProgress.length}`);
|
|
1173
|
+
cli.log(` Ready: ${ready.length}`);
|
|
955
1174
|
cli.log(` Stats: ${JSON.stringify(result.stats)}`);
|
|
956
|
-
if (
|
|
1175
|
+
if (inProgress.length > 0) {
|
|
957
1176
|
cli.log(`\n โธ In Progress:`);
|
|
958
|
-
for (const t of
|
|
1177
|
+
for (const t of inProgress) {
|
|
959
1178
|
cli.log(` ${t.id} โ ${t.title}`);
|
|
960
1179
|
}
|
|
961
1180
|
}
|
|
962
|
-
if (
|
|
1181
|
+
if (ready.length > 0) {
|
|
963
1182
|
cli.log(`\n โธ Ready:`);
|
|
964
|
-
for (const t of
|
|
1183
|
+
for (const t of ready) {
|
|
965
1184
|
cli.log(` ${t.id} โ ${t.title}`);
|
|
966
1185
|
}
|
|
967
1186
|
}
|