0xray 2.2.3 โ 2.2.4
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/CHANGELOG.md +13 -0
- package/dist/config/routing-mappings.d.ts +21 -0
- package/dist/config/routing-mappings.js +132 -0
- package/dist/enforcement/enforcer-tools.js +1 -123
- package/dist/inference/inference-cycle.js +1 -1
- package/dist/mcps/knowledge-skills/skill-invocation.server.js +2 -3
- package/dist/tools/assess-complexity-tool.d.ts +28 -0
- package/dist/tools/assess-complexity-tool.js +44 -0
- package/dist/tools/query-routing-tool.d.ts +17 -0
- package/dist/tools/query-routing-tool.js +59 -0
- package/package.json +1 -1
- package/scripts/node/release.mjs +28 -17
- package/src/mcps/knowledge-skills/skill-invocation.server.ts +2 -3
package/dist/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,19 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
The format is based on [Conventional Commits](https://www.conventionalcommits.org/).
|
|
6
6
|
|
|
7
|
+
## [2.2.4] - 2026-06-10
|
|
8
|
+
|
|
9
|
+
### ๐ Bug Fixes
|
|
10
|
+
- fix: Dynamo SSOT local-mode for inference cycles (requireExternalDynamo: !XRAY_LOCAL_MODE to prevent silent needs_revision fallback in dev/CI) (5e0746665)
|
|
11
|
+
- ci: add verify:consumer as hard gate in release.yml before GitHub release (5e0746665)
|
|
12
|
+
- fix: routing cleanup โ dedup availableServers list, correct research/explore mapping to "researcher" skill directly (prior + 5e0746665)
|
|
13
|
+
- fix: release.mjs publish timeout handling (npm view check for "already published") and step order (push before publish) (b444b6ac8, b1f9c6cdd)
|
|
14
|
+
|
|
15
|
+
### ๐ Changes
|
|
16
|
+
- Scope 2.2.4 to the 5 blocking items only (Dynamo, CI gate, routing hygiene). All Phase 1-4 deferred to v3 per v3-architecture-plan.md.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
7
20
|
## [2.2.3] - 2026-06-10
|
|
8
21
|
|
|
9
22
|
### ๐ Changes
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Routing Mappings โ Shared keywordโagent+skill lookup table.
|
|
3
|
+
*
|
|
4
|
+
* Extracted from enforcer-tools.ts to be queryable at runtime
|
|
5
|
+
* by the main AI delegation decision tools.
|
|
6
|
+
*/
|
|
7
|
+
export interface RoutingMappingEntry {
|
|
8
|
+
keywords: string[];
|
|
9
|
+
skill: string;
|
|
10
|
+
agent: string;
|
|
11
|
+
confidence: number;
|
|
12
|
+
}
|
|
13
|
+
export declare const ROUTING_MAPPINGS: RoutingMappingEntry[];
|
|
14
|
+
export interface RoutingMatch {
|
|
15
|
+
agent: string;
|
|
16
|
+
skill: string;
|
|
17
|
+
confidence: number;
|
|
18
|
+
matchedKeywords: string[];
|
|
19
|
+
}
|
|
20
|
+
export declare function queryRoutingMappings(keywords: string[]): RoutingMatch[];
|
|
21
|
+
export declare function getAllRoutingMappings(): RoutingMappingEntry[];
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Routing Mappings โ Shared keywordโagent+skill lookup table.
|
|
3
|
+
*
|
|
4
|
+
* Extracted from enforcer-tools.ts to be queryable at runtime
|
|
5
|
+
* by the main AI delegation decision tools.
|
|
6
|
+
*/
|
|
7
|
+
export const ROUTING_MAPPINGS = [
|
|
8
|
+
// Core built-in skills (high confidence)
|
|
9
|
+
{ keywords: ["write", "file", "create"], skill: "code-review", agent: "code-reviewer", confidence: 0.9 },
|
|
10
|
+
{ keywords: ["review", "audit", "assess", "evaluate", "check", "inspect", "quality", "validate", "code-review"], skill: "code-review", agent: "code-reviewer", confidence: 0.9 },
|
|
11
|
+
{ keywords: ["test", "testing", "jest", "coverage", "unit", "e2e", "cypress", "spec", "verify"], skill: "testing-strategy", agent: "testing-lead", confidence: 0.95 },
|
|
12
|
+
{ keywords: ["fix", "debug", "triage", "broken", "error", "crash", "bug", "issue", "resolve"], skill: "bug-triage", agent: "bug-triage-specialist", confidence: 0.92 },
|
|
13
|
+
{ keywords: ["security", "vulnerability", "threat", "scan", "risk", "exploit", "secure", "pentest"], skill: "security-audit", agent: "security-auditor", confidence: 0.95 },
|
|
14
|
+
{ keywords: ["refactor", "cleanup", "improve", "restructure", "modernize", "debt"], skill: "refactoring-strategies", agent: "refactorer", confidence: 0.92 },
|
|
15
|
+
{ keywords: ["performance", "optimize", "bottleneck", "benchmark", "profile", "speed"], skill: "performance-optimization", agent: "performance-engineer", confidence: 0.93 },
|
|
16
|
+
{ keywords: ["frontend", "react", "vue", "angular", "ui", "ux", "interface", "component"], skill: "frontend-development", agent: "frontend-engineer", confidence: 0.95 },
|
|
17
|
+
{ keywords: ["backend", "api", "server", "microservice", "endpoint"], skill: "backend-development", agent: "backend-engineer", confidence: 0.95 },
|
|
18
|
+
{ keywords: ["docs", "documentation", "readme", "wiki", "guide", "manual"], skill: "documentation-generation", agent: "tech-writer", confidence: 0.9 },
|
|
19
|
+
{ keywords: ["database", "db", "sql", "schema", "migration", "query"], skill: "database-design", agent: "database-engineer", confidence: 0.95 },
|
|
20
|
+
{ keywords: ["deploy", "ci/cd", "pipeline", "docker", "kubernetes", "infrastructure"], skill: "devops-deployment", agent: "devops-engineer", confidence: 0.94 },
|
|
21
|
+
{ keywords: ["mobile", "ios", "android", "react-native", "flutter"], skill: "mobile-development", agent: "mobile-developer", confidence: 0.95 },
|
|
22
|
+
{ keywords: ["enforce", "compliance", "rule", "standard", "codex", "block", "prevent"], skill: "code-review", agent: "code-reviewer", confidence: 0.95 },
|
|
23
|
+
{ keywords: ["design", "architect", "plan", "system", "model", "pattern", "architecture"], skill: "architecture-patterns", agent: "architect", confidence: 0.95 },
|
|
24
|
+
{ keywords: ["codebase", "explore", "research", "discover", "implementation"], skill: "researcher", agent: "researcher", confidence: 0.92 },
|
|
25
|
+
// Additional built-in skill mappings
|
|
26
|
+
{ keywords: ["api", "rest", "graphql", "openapi", "endpoint", "swagger"], skill: "api-design", agent: "backend-engineer", confidence: 0.9 },
|
|
27
|
+
{ keywords: ["strategy", "roadmap", "planning", "technical", "decision", "architecture"], skill: "architecture-patterns", agent: "strategist", confidence: 0.88 },
|
|
28
|
+
{ keywords: ["reflection", "story", "narrative", "saga", "journey", "document"], skill: "storyteller", agent: "tech-writer", confidence: 0.85 },
|
|
29
|
+
{ keywords: ["analyze", "metrics", "complexity", "maintainability", "quality"], skill: "code-analyzer", agent: "code-analyzer", confidence: 0.9 },
|
|
30
|
+
{ keywords: ["growth", "marketing", "conversion", "acquisition", "user-acquisition"], skill: "growth-strategist", agent: "growth-strategist", confidence: 0.9 },
|
|
31
|
+
{ keywords: ["seo", "search", "organic", "traffic", "keywords", "ranking"], skill: "seo-consultant", agent: "seo-consultant", confidence: 0.92 },
|
|
32
|
+
{ keywords: ["content", "copy", "blog", "marketing", "social"], skill: "content-creator", agent: "content-creator", confidence: 0.88 },
|
|
33
|
+
{ keywords: ["format", "lint", "prettier", "eslint", "style", "formatting"], skill: "auto-format", agent: "code-reviewer", confidence: 0.85 },
|
|
34
|
+
{ keywords: ["project", "structure", "health", "dependencies", "architecture"], skill: "project-analysis", agent: "architect", confidence: 0.88 },
|
|
35
|
+
{ keywords: ["compliance", "audit", "standards", "framework", "validation"], skill: "framework-compliance-audit", agent: "code-reviewer", confidence: 0.9 },
|
|
36
|
+
{ keywords: ["session", "state", "persistence", "storage", "cache"], skill: "session-management", agent: "backend-engineer", confidence: 0.85 },
|
|
37
|
+
{ keywords: ["image", "visual", "pdf", "diagram", "multimedia", "media"], skill: "multimodal-looker", agent: "multimodal-looker", confidence: 0.92 },
|
|
38
|
+
{ keywords: ["testing", "strategy", "coverage", "test-plan"], skill: "testing-strategy", agent: "testing-lead", confidence: 0.92 },
|
|
39
|
+
{ keywords: ["inference", "model", "llm", "tuning", "optimization"], skill: "inference-improve", agent: "performance-engineer", confidence: 0.88 },
|
|
40
|
+
{ keywords: ["orchestrate", "boot", "initialize", "startup", "bootstrap"], skill: "boot-orchestrator", agent: "architect", confidence: 0.9 },
|
|
41
|
+
// Additional unmapped skills
|
|
42
|
+
{ keywords: ["tool", "utility", "helper", "instrument"], skill: "architect-tools", agent: "architect", confidence: 0.85 },
|
|
43
|
+
{ keywords: ["design", "visual", "style", "theme", "css", "accessibility"], skill: "ui-ux-design", agent: "frontend-ui-ux-engineer", confidence: 0.9 },
|
|
44
|
+
{ keywords: ["agent", "multi-agent", "coordination", "hermes", "communication"], skill: "hermes-agent", agent: "architect", confidence: 0.88 },
|
|
45
|
+
{ keywords: ["log", "diagnostic", "trace", "monitor", "watch"], skill: "log-monitor", agent: "log-monitor", confidence: 0.9 },
|
|
46
|
+
{ keywords: ["health", "diagnostic", "model-health", "validate-llm"], skill: "model-health-check", agent: "performance-engineer", confidence: 0.88 },
|
|
47
|
+
{ keywords: ["profiling", "memory", "cpu", "latency"], skill: "performance-analysis", agent: "performance-engineer", confidence: 0.9 },
|
|
48
|
+
{ keywords: ["pipeline", "stream", "etl", "batch", "process"], skill: "processor-pipeline", agent: "backend-engineer", confidence: 0.88 },
|
|
49
|
+
{ keywords: ["vulnerability", "cve", "sast", "dast", "dependency-check"], skill: "security-scan", agent: "security-auditor", confidence: 0.92 },
|
|
50
|
+
{ keywords: ["state", "store", "redux", "context", "persistence"], skill: "state-manager", agent: "backend-engineer", confidence: 0.88 },
|
|
51
|
+
// Community Skills (optional, lower confidence)
|
|
52
|
+
{ keywords: ["theme", "design-system", "color", "font", "typography", "palette"], skill: "antigravity--theme-factory", agent: "frontend-ui-ux-engineer", confidence: 0.6 },
|
|
53
|
+
{ keywords: ["hig", "salesforce design", "lightning design", "slds"], skill: "antigravity--hig-components-system", agent: "frontend-ui-ux-engineer", confidence: 0.65 },
|
|
54
|
+
{ keywords: ["slide", "deck", "presentation", "powerpoint"], skill: "antigravity--theme-factory", agent: "content-creator", confidence: 0.55 },
|
|
55
|
+
{ keywords: ["seo technical", "crawl", "indexability", "core web vitals", "sitemap"], skill: "antigravity--seo-technical", agent: "seo-consultant", confidence: 0.7 },
|
|
56
|
+
{ keywords: ["seo structure", "content hierarchy", "schema", "internal linking"], skill: "antigravity--seo-structure-architect", agent: "seo-consultant", confidence: 0.7 },
|
|
57
|
+
{ keywords: ["seo snippet", "meta description", "title tag"], skill: "antigravity--seo-snippet-hunter", agent: "seo-consultant", confidence: 0.7 },
|
|
58
|
+
{ keywords: ["seo hreflang", "international seo", "multilingual"], skill: "antigravity--seo-hreflang", agent: "seo-consultant", confidence: 0.65 },
|
|
59
|
+
{ keywords: ["backend security", "secure coding", "input validation", "authentication"], skill: "antigravity--backend-security-coder", agent: "security-auditor", confidence: 0.7 },
|
|
60
|
+
{ keywords: ["mobile security", "ios security", "android security"], skill: "antigravity--mobile-security-coder", agent: "security-auditor", confidence: 0.65 },
|
|
61
|
+
{ keywords: ["security audit", "vulnerability assessment", "penetration test"], skill: "security-audit", agent: "security-auditor", confidence: 0.75 },
|
|
62
|
+
{ keywords: ["vector", "embeddings", "similarity search", "pinecone", "qdrant", "chroma"], skill: "antigravity--vector-database-engineer", agent: "database-engineer", confidence: 0.65 },
|
|
63
|
+
{ keywords: ["similarity search", "approximate nearest neighbor"], skill: "antigravity--similarity-search-patterns", agent: "database-engineer", confidence: 0.65 },
|
|
64
|
+
{ keywords: ["svelte", "sveltekit", "svelte.js"], skill: "antigravity--sveltekit", agent: "frontend-engineer", confidence: 0.65 },
|
|
65
|
+
{ keywords: ["trpc", "typescript rpc", "tRPC"], skill: "antigravity--trpc-fullstack", agent: "backend-engineer", confidence: 0.65 },
|
|
66
|
+
{ keywords: ["vercel ai", "ai sdk", "vapi"], skill: "antigravity--vercel-ai-sdk-expert", agent: "backend-engineer", confidence: 0.65 },
|
|
67
|
+
{ keywords: ["threejs", "3d web", "webgl", "3d graphics"], skill: "antigravity--threejs-loaders", agent: "frontend-engineer", confidence: 0.6 },
|
|
68
|
+
{ keywords: ["comfyui", "ai image generation", "stable diffusion"], skill: "antigravity--comfyui-gateway", agent: "multimodal-looker", confidence: 0.6 },
|
|
69
|
+
{ keywords: ["swiftui", "ios development"], skill: "antigravity--swiftui-liquid-glass", agent: "mobile-developer", confidence: 0.7 },
|
|
70
|
+
{ keywords: ["ios performance", "swift optimization"], skill: "antigravity--swiftui-performance-audit", agent: "mobile-developer", confidence: 0.65 },
|
|
71
|
+
{ keywords: ["react native", "rn"], skill: "mobile-development", agent: "mobile-developer", confidence: 0.7 },
|
|
72
|
+
{ keywords: ["golang", "go", "gopher"], skill: "antigravity--golang-pro", agent: "backend-engineer", confidence: 0.65 },
|
|
73
|
+
{ keywords: ["temporal", "workflow", " durable execution"], skill: "antigravity--temporal-golang-pro", agent: "backend-engineer", confidence: 0.65 },
|
|
74
|
+
{ keywords: ["python async", "asyncio", "uvloop"], skill: "antigravity--async-python-patterns", agent: "backend-engineer", confidence: 0.65 },
|
|
75
|
+
{ keywords: ["pydantic", "data validation", "python models"], skill: "antigravity--pydantic-models-py", agent: "backend-engineer", confidence: 0.65 },
|
|
76
|
+
{ keywords: ["scala", "spark", "big data"], skill: "antigravity--scala-pro", agent: "backend-engineer", confidence: 0.6 },
|
|
77
|
+
{ keywords: ["dotnet", "c#", ".net"], skill: "antigravity--dotnet-backend-patterns", agent: "backend-engineer", confidence: 0.6 },
|
|
78
|
+
{ keywords: ["azure", "azd", "azure deploy"], skill: "antigravity--azd-deployment", agent: "devops-engineer", confidence: 0.65 },
|
|
79
|
+
{ keywords: ["azure storage", "file share"], skill: "antigravity--azure-storage-file-share-ts", agent: "devops-engineer", confidence: 0.6 },
|
|
80
|
+
{ keywords: ["azure service bus", "messaging"], skill: "antigravity--azure-servicebus-py", agent: "devops-engineer", confidence: 0.6 },
|
|
81
|
+
{ keywords: ["discord bot", "discord automation"], skill: "antigravity--discord-bot-architect", agent: "backend-engineer", confidence: 0.6 },
|
|
82
|
+
{ keywords: ["n8n", "workflow automation"], skill: "antigravity--n8n-expression-syntax", agent: "devops-engineer", confidence: 0.6 },
|
|
83
|
+
{ keywords: ["linkedin automation", "social posting"], skill: "antigravity--linkedin-automation", agent: "growth-strategist", confidence: 0.55 },
|
|
84
|
+
{ keywords: ["reddit automation"], skill: "antigravity--reddit-automation", agent: "growth-strategist", confidence: 0.55 },
|
|
85
|
+
{ keywords: ["freshdesk", "customer support automation"], skill: "antigravity--freshdesk-automation", agent: "devops-engineer", confidence: 0.55 },
|
|
86
|
+
{ keywords: ["pagerduty", "incident management"], skill: "antigravity--pagerduty-automation", agent: "devops-engineer", confidence: 0.55 },
|
|
87
|
+
{ keywords: ["local llm", "ollama", "llama", "local model"], skill: "antigravity--local-llm-expert", agent: "performance-engineer", confidence: 0.65 },
|
|
88
|
+
{ keywords: ["mcp", "model context protocol"], skill: "antigravity--agent-memory-mcp", agent: "architect", confidence: 0.65 },
|
|
89
|
+
{ keywords: ["agent evaluation", "agent testing"], skill: "antigravity--agent-evaluation", agent: "testing-lead", confidence: 0.65 },
|
|
90
|
+
{ keywords: ["ai agent", "autonomous agent"], skill: "antigravity--ai-agent-development", agent: "backend-engineer", confidence: 0.65 },
|
|
91
|
+
{ keywords: ["marketing content", "ad creative", "campaign"], skill: "antigravity--marketing-ideas", agent: "content-creator", confidence: 0.6 },
|
|
92
|
+
{ keywords: ["conversion", "cro", "optimization"], skill: "antigravity--onboarding-cro", agent: "growth-strategist", confidence: 0.6 },
|
|
93
|
+
{ keywords: ["code documentation", "code explain", "explain code"], skill: "antigravity--code-documentation-code-explain", agent: "tech-writer", confidence: 0.65 },
|
|
94
|
+
{ keywords: ["code refactoring", "clean code"], skill: "antigravity--code-refactoring-refactor-clean", agent: "refactorer", confidence: 0.65 },
|
|
95
|
+
{ keywords: ["code review checklist"], skill: "antigravity--code-review-checklist", agent: "code-reviewer", confidence: 0.7 },
|
|
96
|
+
{ keywords: ["microservices", "service mesh", "distributed systems"], skill: "antigravity--microservices-patterns", agent: "architect", confidence: 0.65 },
|
|
97
|
+
{ keywords: ["architecture decision", "adr", "decision records"], skill: "antigravity--architecture-decision-records", agent: "architect", confidence: 0.65 },
|
|
98
|
+
{ keywords: ["context management", "context compression", "token optimization"], skill: "antigravity--context-compression", agent: "performance-engineer", confidence: 0.65 },
|
|
99
|
+
{ keywords: ["context guardian", "memory safety"], skill: "antigravity--context-guardian", agent: "performance-engineer", confidence: 0.6 },
|
|
100
|
+
{ keywords: ["context fundamentals"], skill: "antigravity--context-fundamentals", agent: "performance-engineer", confidence: 0.6 },
|
|
101
|
+
{ keywords: ["interview", "technical interview", "coding interview"], skill: "antigravity--interview-coach", agent: "growth-strategist", confidence: 0.6 },
|
|
102
|
+
{ keywords: ["i18n", "localization", "translation"], skill: "antigravity--i18n-localization", agent: "frontend-engineer", confidence: 0.6 },
|
|
103
|
+
{ keywords: ["accessibility", "a11y", "wcag"], skill: "antigravity--accessibility-compliance-accessibility-audit", agent: "frontend-ui-ux-engineer", confidence: 0.7 },
|
|
104
|
+
{ keywords: ["pwa", "progressive web app"], skill: "antigravity--progressive-web-app", agent: "frontend-engineer", confidence: 0.6 },
|
|
105
|
+
{ keywords: ["data migration", "sql migration"], skill: "antigravity--database-migrations-sql-migrations", agent: "database-engineer", confidence: 0.65 },
|
|
106
|
+
{ keywords: ["request code review", "pr review", "pull request"], skill: "superpowers--requesting-code-review", agent: "code-reviewer", confidence: 0.7 },
|
|
107
|
+
];
|
|
108
|
+
export function queryRoutingMappings(keywords) {
|
|
109
|
+
const descLower = keywords.join(" ").toLowerCase();
|
|
110
|
+
const matches = [];
|
|
111
|
+
for (const mapping of ROUTING_MAPPINGS) {
|
|
112
|
+
const matched = [];
|
|
113
|
+
for (const kw of mapping.keywords) {
|
|
114
|
+
if (descLower.includes(kw.toLowerCase())) {
|
|
115
|
+
matched.push(kw);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
if (matched.length > 0) {
|
|
119
|
+
matches.push({
|
|
120
|
+
agent: mapping.agent,
|
|
121
|
+
skill: mapping.skill,
|
|
122
|
+
confidence: mapping.confidence,
|
|
123
|
+
matchedKeywords: matched,
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
matches.sort((a, b) => b.confidence - a.confidence);
|
|
128
|
+
return matches;
|
|
129
|
+
}
|
|
130
|
+
export function getAllRoutingMappings() {
|
|
131
|
+
return ROUTING_MAPPINGS;
|
|
132
|
+
}
|
|
@@ -7,135 +7,13 @@ import { frameworkLogger } from "../core/framework-logger.js";
|
|
|
7
7
|
import { AgentDelegator } from "../delegation/agent-delegator.js";
|
|
8
8
|
import { XrayStateManager } from "../state/state-manager.js";
|
|
9
9
|
import { strRayConfigLoader } from "../core/config-loader.js";
|
|
10
|
+
import { ROUTING_MAPPINGS } from "../config/routing-mappings.js";
|
|
10
11
|
import * as fs from "fs";
|
|
11
12
|
import * as path from "path";
|
|
12
13
|
// Minimum confidence to auto-delegate to another agent
|
|
13
14
|
const DELEGATION_CONFIDENCE_THRESHOLD = 0.50;
|
|
14
15
|
// Agents that enforcer should NOT delegate to (enforcer handles these itself)
|
|
15
16
|
const ENFORCER_HANDLES = new Set(["code-reviewer"]);
|
|
16
|
-
// Community skills are OPTIONAL - they may not be installed
|
|
17
|
-
// These mappings have lower confidence (0.55-0.7) since skills may not be available
|
|
18
|
-
// The system will fall back gracefully if the skill isn't installed
|
|
19
|
-
const ROUTING_MAPPINGS = [
|
|
20
|
-
// Core built-in skills (high confidence)
|
|
21
|
-
{ keywords: ["write", "file", "create"], skill: "code-review", agent: "code-reviewer", confidence: 0.9 },
|
|
22
|
-
{ keywords: ["review", "audit", "assess", "evaluate", "check", "inspect", "quality", "validate", "code-review"], skill: "code-review", agent: "code-reviewer", confidence: 0.9 },
|
|
23
|
-
{ keywords: ["test", "testing", "jest", "coverage", "unit", "e2e", "cypress", "spec", "verify"], skill: "testing-strategy", agent: "testing-lead", confidence: 0.95 },
|
|
24
|
-
{ keywords: ["fix", "debug", "triage", "broken", "error", "crash", "bug", "issue", "resolve"], skill: "bug-triage", agent: "bug-triage-specialist", confidence: 0.92 },
|
|
25
|
-
{ keywords: ["security", "vulnerability", "threat", "scan", "risk", "exploit", "secure", "pentest"], skill: "security-audit", agent: "security-auditor", confidence: 0.95 },
|
|
26
|
-
{ keywords: ["refactor", "cleanup", "improve", "restructure", "modernize", "debt"], skill: "refactoring-strategies", agent: "refactorer", confidence: 0.92 },
|
|
27
|
-
{ keywords: ["performance", "optimize", "bottleneck", "benchmark", "profile", "speed"], skill: "performance-optimization", agent: "performance-engineer", confidence: 0.93 },
|
|
28
|
-
{ keywords: ["frontend", "react", "vue", "angular", "ui", "ux", "interface", "component"], skill: "frontend-development", agent: "frontend-engineer", confidence: 0.95 },
|
|
29
|
-
{ keywords: ["backend", "api", "server", "microservice", "endpoint"], skill: "backend-development", agent: "backend-engineer", confidence: 0.95 },
|
|
30
|
-
{ keywords: ["docs", "documentation", "readme", "wiki", "guide", "manual"], skill: "documentation-generation", agent: "tech-writer", confidence: 0.9 },
|
|
31
|
-
{ keywords: ["database", "db", "sql", "schema", "migration", "query"], skill: "database-design", agent: "database-engineer", confidence: 0.95 },
|
|
32
|
-
{ keywords: ["deploy", "ci/cd", "pipeline", "docker", "kubernetes", "infrastructure"], skill: "devops-deployment", agent: "devops-engineer", confidence: 0.94 },
|
|
33
|
-
{ keywords: ["mobile", "ios", "android", "react-native", "flutter"], skill: "mobile-development", agent: "mobile-developer", confidence: 0.95 },
|
|
34
|
-
{ keywords: ["enforce", "compliance", "rule", "standard", "codex", "block", "prevent"], skill: "code-review", agent: "code-reviewer", confidence: 0.95 },
|
|
35
|
-
{ keywords: ["design", "architect", "plan", "system", "model", "pattern", "architecture"], skill: "architecture-patterns", agent: "architect", confidence: 0.95 },
|
|
36
|
-
{ keywords: ["codebase", "explore", "research", "discover", "implementation"], skill: "git-workflow", agent: "researcher", confidence: 0.88 },
|
|
37
|
-
// Additional built-in skill mappings
|
|
38
|
-
{ keywords: ["api", "rest", "graphql", "openapi", "endpoint", "swagger"], skill: "api-design", agent: "backend-engineer", confidence: 0.9 },
|
|
39
|
-
{ keywords: ["strategy", "roadmap", "planning", "technical", "decision", "architecture"], skill: "architecture-patterns", agent: "strategist", confidence: 0.88 },
|
|
40
|
-
{ keywords: ["reflection", "story", "narrative", "saga", "journey", "document"], skill: "storyteller", agent: "tech-writer", confidence: 0.85 },
|
|
41
|
-
{ keywords: ["analyze", "metrics", "complexity", "maintainability", "quality"], skill: "code-analyzer", agent: "code-analyzer", confidence: 0.9 },
|
|
42
|
-
{ keywords: ["growth", "marketing", "conversion", "acquisition", "user-acquisition"], skill: "growth-strategist", agent: "growth-strategist", confidence: 0.9 },
|
|
43
|
-
{ keywords: ["seo", "search", "organic", "traffic", "keywords", "ranking"], skill: "seo-consultant", agent: "seo-consultant", confidence: 0.92 },
|
|
44
|
-
{ keywords: ["content", "copy", "blog", "marketing", "social"], skill: "content-creator", agent: "content-creator", confidence: 0.88 },
|
|
45
|
-
{ keywords: ["format", "lint", "prettier", "eslint", "style", "formatting"], skill: "auto-format", agent: "code-reviewer", confidence: 0.85 },
|
|
46
|
-
{ keywords: ["project", "structure", "health", "dependencies", "architecture"], skill: "project-analysis", agent: "architect", confidence: 0.88 },
|
|
47
|
-
{ keywords: ["compliance", "audit", "standards", "framework", "validation"], skill: "framework-compliance-audit", agent: "code-reviewer", confidence: 0.9 },
|
|
48
|
-
{ keywords: ["session", "state", "persistence", "storage", "cache"], skill: "session-management", agent: "backend-engineer", confidence: 0.85 },
|
|
49
|
-
{ keywords: ["image", "visual", "pdf", "diagram", "multimedia", "media"], skill: "multimodal-looker", agent: "multimodal-looker", confidence: 0.92 },
|
|
50
|
-
{ keywords: ["testing", "strategy", "coverage", "test-plan"], skill: "testing-strategy", agent: "testing-lead", confidence: 0.92 },
|
|
51
|
-
{ keywords: ["inference", "model", "llm", "tuning", "optimization"], skill: "inference-improve", agent: "performance-engineer", confidence: 0.88 },
|
|
52
|
-
{ keywords: ["orchestrate", "boot", "initialize", "startup", "bootstrap"], skill: "boot-orchestrator", agent: "architect", confidence: 0.9 },
|
|
53
|
-
// Additional unmapped skills
|
|
54
|
-
{ keywords: ["tool", "utility", "helper", "instrument"], skill: "architect-tools", agent: "architect", confidence: 0.85 },
|
|
55
|
-
{ keywords: ["design", "visual", "style", "theme", "css", "accessibility"], skill: "ui-ux-design", agent: "frontend-ui-ux-engineer", confidence: 0.9 },
|
|
56
|
-
{ keywords: ["agent", "multi-agent", "coordination", "hermes", "communication"], skill: "hermes-agent", agent: "architect", confidence: 0.88 },
|
|
57
|
-
{ keywords: ["log", "diagnostic", "trace", "monitor", "watch"], skill: "log-monitor", agent: "log-monitor", confidence: 0.9 },
|
|
58
|
-
{ keywords: ["health", "diagnostic", "model-health", "validate-llm"], skill: "model-health-check", agent: "performance-engineer", confidence: 0.88 },
|
|
59
|
-
{ keywords: ["analyze", "profiling", "memory", "cpu", "latency"], skill: "performance-analysis", agent: "performance-engineer", confidence: 0.9 },
|
|
60
|
-
{ keywords: ["pipeline", "stream", "etl", "batch", "process"], skill: "processor-pipeline", agent: "backend-engineer", confidence: 0.88 },
|
|
61
|
-
{ keywords: ["vulnerability", "cve", "sast", "dast", "dependency-check"], skill: "security-scan", agent: "security-auditor", confidence: 0.92 },
|
|
62
|
-
{ keywords: ["state", "store", "redux", "context", "persistence"], skill: "state-manager", agent: "backend-engineer", confidence: 0.88 },
|
|
63
|
-
// ============================================================
|
|
64
|
-
// Community Skills (optional, lower confidence)
|
|
65
|
-
// These skills are from antigravity and may not be installed
|
|
66
|
-
// ============================================================
|
|
67
|
-
// UI/UX Design & Themes (antigravity)
|
|
68
|
-
{ keywords: ["theme", "design-system", "color", "font", "typography", "palette"], skill: "antigravity--theme-factory", agent: "frontend-ui-ux-engineer", confidence: 0.6 },
|
|
69
|
-
{ keywords: ["hig", "salesforce design", "lightning design", "slds"], skill: "antigravity--hig-components-system", agent: "frontend-ui-ux-engineer", confidence: 0.65 },
|
|
70
|
-
{ keywords: ["slide", "deck", "presentation", "powerpoint"], skill: "antigravity--theme-factory", agent: "content-creator", confidence: 0.55 },
|
|
71
|
-
// SEO (antigravity)
|
|
72
|
-
{ keywords: ["seo technical", "crawl", "indexability", "core web vitals", "sitemap"], skill: "antigravity--seo-technical", agent: "seo-consultant", confidence: 0.7 },
|
|
73
|
-
{ keywords: ["seo structure", "content hierarchy", "schema", "internal linking"], skill: "antigravity--seo-structure-architect", agent: "seo-consultant", confidence: 0.7 },
|
|
74
|
-
{ keywords: ["seo snippet", "meta description", "title tag"], skill: "antigravity--seo-snippet-hunter", agent: "seo-consultant", confidence: 0.7 },
|
|
75
|
-
{ keywords: ["seo hreflang", "international seo", "multilingual"], skill: "antigravity--seo-hreflang", agent: "seo-consultant", confidence: 0.65 },
|
|
76
|
-
// Security (antigravity)
|
|
77
|
-
{ keywords: ["backend security", "secure coding", "input validation", "authentication"], skill: "antigravity--backend-security-coder", agent: "security-auditor", confidence: 0.7 },
|
|
78
|
-
{ keywords: ["mobile security", "ios security", "android security"], skill: "antigravity--mobile-security-coder", agent: "security-auditor", confidence: 0.65 },
|
|
79
|
-
{ keywords: ["security audit", "vulnerability assessment", "penetration test"], skill: "security-audit", agent: "security-auditor", confidence: 0.75 },
|
|
80
|
-
// Vector/AI Databases (antigravity)
|
|
81
|
-
{ keywords: ["vector", "embeddings", "similarity search", "pinecone", "qdrant", "chroma"], skill: "antigravity--vector-database-engineer", agent: "database-engineer", confidence: 0.65 },
|
|
82
|
-
{ keywords: ["similarity search", "approximate nearest neighbor"], skill: "antigravity--similarity-search-patterns", agent: "database-engineer", confidence: 0.65 },
|
|
83
|
-
// Frameworks & Libraries (antigravity)
|
|
84
|
-
{ keywords: ["svelte", "sveltekit", "svelte.js"], skill: "antigravity--sveltekit", agent: "frontend-engineer", confidence: 0.65 },
|
|
85
|
-
{ keywords: ["trpc", "typescript rpc", "tRPC"], skill: "antigravity--trpc-fullstack", agent: "backend-engineer", confidence: 0.65 },
|
|
86
|
-
{ keywords: ["vercel ai", "ai sdk", "vapi"], skill: "antigravity--vercel-ai-sdk-expert", agent: "backend-engineer", confidence: 0.65 },
|
|
87
|
-
{ keywords: ["threejs", "3d web", "webgl", "3d graphics"], skill: "antigravity--threejs-loaders", agent: "frontend-engineer", confidence: 0.6 },
|
|
88
|
-
{ keywords: ["comfyui", "ai image generation", "stable diffusion"], skill: "antigravity--comfyui-gateway", agent: "multimodal-looker", confidence: 0.6 },
|
|
89
|
-
// Mobile (antigravity)
|
|
90
|
-
{ keywords: ["swiftui", "ios development"], skill: "antigravity--swiftui-liquid-glass", agent: "mobile-developer", confidence: 0.7 },
|
|
91
|
-
{ keywords: ["ios performance", "swift optimization"], skill: "antigravity--swiftui-performance-audit", agent: "mobile-developer", confidence: 0.65 },
|
|
92
|
-
{ keywords: ["react native", "rn"], skill: "mobile-development", agent: "mobile-developer", confidence: 0.7 },
|
|
93
|
-
// Backend/Golang (antigravity)
|
|
94
|
-
{ keywords: ["golang", "go", "gopher"], skill: "antigravity--golang-pro", agent: "backend-engineer", confidence: 0.65 },
|
|
95
|
-
{ keywords: ["temporal", "workflow", " durable execution"], skill: "antigravity--temporal-golang-pro", agent: "backend-engineer", confidence: 0.65 },
|
|
96
|
-
{ keywords: ["python async", "asyncio", "uvloop"], skill: "antigravity--async-python-patterns", agent: "backend-engineer", confidence: 0.65 },
|
|
97
|
-
{ keywords: ["pydantic", "data validation", "python models"], skill: "antigravity--pydantic-models-py", agent: "backend-engineer", confidence: 0.65 },
|
|
98
|
-
{ keywords: ["scala", "spark", "big data"], skill: "antigravity--scala-pro", agent: "backend-engineer", confidence: 0.6 },
|
|
99
|
-
{ keywords: ["dotnet", "c#", ".net"], skill: "antigravity--dotnet-backend-patterns", agent: "backend-engineer", confidence: 0.6 },
|
|
100
|
-
// Cloud/Azure (antigravity)
|
|
101
|
-
{ keywords: ["azure", "azd", "azure deploy"], skill: "antigravity--azd-deployment", agent: "devops-engineer", confidence: 0.65 },
|
|
102
|
-
{ keywords: ["azure storage", "file share"], skill: "antigravity--azure-storage-file-share-ts", agent: "devops-engineer", confidence: 0.6 },
|
|
103
|
-
{ keywords: ["azure service bus", "messaging"], skill: "antigravity--azure-servicebus-py", agent: "devops-engineer", confidence: 0.6 },
|
|
104
|
-
// Automation/Bots (antigravity)
|
|
105
|
-
{ keywords: ["discord bot", "discord automation"], skill: "antigravity--discord-bot-architect", agent: "backend-engineer", confidence: 0.6 },
|
|
106
|
-
{ keywords: ["n8n", "workflow automation"], skill: "antigravity--n8n-expression-syntax", agent: "devops-engineer", confidence: 0.6 },
|
|
107
|
-
{ keywords: ["linkedin automation", "social posting"], skill: "antigravity--linkedin-automation", agent: "growth-strategist", confidence: 0.55 },
|
|
108
|
-
{ keywords: ["reddit automation"], skill: "antigravity--reddit-automation", agent: "growth-strategist", confidence: 0.55 },
|
|
109
|
-
{ keywords: ["freshdesk", "customer support automation"], skill: "antigravity--freshdesk-automation", agent: "devops-engineer", confidence: 0.55 },
|
|
110
|
-
{ keywords: ["pagerduty", "incident management"], skill: "antigravity--pagerduty-automation", agent: "devops-engineer", confidence: 0.55 },
|
|
111
|
-
// AI/ML (antigravity)
|
|
112
|
-
{ keywords: ["local llm", "ollama", "llama", "local model"], skill: "antigravity--local-llm-expert", agent: "performance-engineer", confidence: 0.65 },
|
|
113
|
-
{ keywords: ["agent", "mcp", "model context protocol"], skill: "antigravity--agent-memory-mcp", agent: "architect", confidence: 0.65 },
|
|
114
|
-
{ keywords: ["agent evaluation", "agent testing"], skill: "antigravity--agent-evaluation", agent: "testing-lead", confidence: 0.65 },
|
|
115
|
-
{ keywords: ["ai agent", "autonomous agent"], skill: "antigravity--ai-agent-development", agent: "backend-engineer", confidence: 0.65 },
|
|
116
|
-
// Content/Marketing (antigravity)
|
|
117
|
-
{ keywords: ["marketing content", "ad creative", "campaign"], skill: "antigravity--marketing-ideas", agent: "content-creator", confidence: 0.6 },
|
|
118
|
-
{ keywords: ["conversion", "cro", "optimization"], skill: "antigravity--onboarding-cro", agent: "growth-strategist", confidence: 0.6 },
|
|
119
|
-
// Documentation & Code Quality (antigravity)
|
|
120
|
-
{ keywords: ["code documentation", "code explain", "explain code"], skill: "antigravity--code-documentation-code-explain", agent: "tech-writer", confidence: 0.65 },
|
|
121
|
-
{ keywords: ["code refactoring", "clean code"], skill: "antigravity--code-refactoring-refactor-clean", agent: "refactorer", confidence: 0.65 },
|
|
122
|
-
{ keywords: ["code review checklist"], skill: "antigravity--code-review-checklist", agent: "code-reviewer", confidence: 0.7 },
|
|
123
|
-
// Microservices & Architecture (antigravity)
|
|
124
|
-
{ keywords: ["microservices", "service mesh", "distributed systems"], skill: "antigravity--microservices-patterns", agent: "architect", confidence: 0.65 },
|
|
125
|
-
{ keywords: ["architecture decision", "adr", "decision records"], skill: "antigravity--architecture-decision-records", agent: "architect", confidence: 0.65 },
|
|
126
|
-
// Context/Memory Management (antigravity)
|
|
127
|
-
{ keywords: ["context management", "context compression", "token optimization"], skill: "antigravity--context-compression", agent: "performance-engineer", confidence: 0.65 },
|
|
128
|
-
{ keywords: ["context guardian", "memory safety"], skill: "antigravity--context-guardian", agent: "performance-engineer", confidence: 0.6 },
|
|
129
|
-
{ keywords: ["context fundamentals"], skill: "antigravity--context-fundamentals", agent: "performance-engineer", confidence: 0.6 },
|
|
130
|
-
// Specialized Skills
|
|
131
|
-
{ keywords: ["interview", "technical interview", "coding interview"], skill: "antigravity--interview-coach", agent: "growth-strategist", confidence: 0.6 },
|
|
132
|
-
{ keywords: ["i18n", "localization", "translation"], skill: "antigravity--i18n-localization", agent: "frontend-engineer", confidence: 0.6 },
|
|
133
|
-
{ keywords: ["accessibility", "a11y", "wcag"], skill: "antigravity--accessibility-compliance-accessibility-audit", agent: "frontend-ui-ux-engineer", confidence: 0.7 },
|
|
134
|
-
{ keywords: ["pwa", "progressive web app"], skill: "antigravity--progressive-web-app", agent: "frontend-engineer", confidence: 0.6 },
|
|
135
|
-
{ keywords: ["data migration", "sql migration"], skill: "antigravity--database-migrations-sql-migrations", agent: "database-engineer", confidence: 0.65 },
|
|
136
|
-
// Requesting Code Review (superpowers)
|
|
137
|
-
{ keywords: ["request code review", "pr review", "pull request"], skill: "superpowers--requesting-code-review", agent: "code-reviewer", confidence: 0.7 },
|
|
138
|
-
];
|
|
139
17
|
export function getTaskRoutingRecommendation(taskDescription) {
|
|
140
18
|
const desc = taskDescription.toLowerCase();
|
|
141
19
|
for (const mapping of ROUTING_MAPPINGS) {
|
|
@@ -293,9 +293,8 @@ class SkillInvocationServer extends XrayKnowledgeSkillBase {
|
|
|
293
293
|
"code-review", "security-audit", "performance-optimization",
|
|
294
294
|
"testing-strategy", "researcher", "skill-invocation",
|
|
295
295
|
"framework-help", "session-management", "code-analyzer",
|
|
296
|
-
"code-reviewer", "architect", "
|
|
297
|
-
"
|
|
298
|
-
"code-reviewer", "security-auditor", "refactorer",
|
|
296
|
+
"code-reviewer", "architect", "bug-triage-specialist", "log-monitor",
|
|
297
|
+
"security-auditor", "refactorer",
|
|
299
298
|
"growth-strategist", "strategist", "devops-deployment",
|
|
300
299
|
"database-design", "tech-writer", "documentation-generation",
|
|
301
300
|
"mobile-development", "seo-consultant",
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Assess Complexity Tool
|
|
3
|
+
*
|
|
4
|
+
* Wraps ComplexityAnalyzer so the main AI can query task complexity
|
|
5
|
+
* and decide whether to delegate to subagents.
|
|
6
|
+
*
|
|
7
|
+
* Exposes:
|
|
8
|
+
* - assessComplexity() โ full analysis returning score, level, strategy, agents
|
|
9
|
+
* - simple assess() helper for quick threshold checks
|
|
10
|
+
*/
|
|
11
|
+
export interface AssessmentInput {
|
|
12
|
+
taskDescription: string;
|
|
13
|
+
files?: string[];
|
|
14
|
+
dependencies?: string[];
|
|
15
|
+
changeVolume?: number;
|
|
16
|
+
riskLevel?: "low" | "medium" | "high" | "critical";
|
|
17
|
+
estimatedDuration?: number;
|
|
18
|
+
}
|
|
19
|
+
export interface AssessmentResult {
|
|
20
|
+
score: number;
|
|
21
|
+
level: "simple" | "moderate" | "complex" | "enterprise";
|
|
22
|
+
strategy: "single-agent" | "multi-agent" | "orchestrator-led";
|
|
23
|
+
estimatedAgents: number;
|
|
24
|
+
reasoning: string[];
|
|
25
|
+
}
|
|
26
|
+
export declare function assessComplexity(input: AssessmentInput): AssessmentResult;
|
|
27
|
+
export declare function shouldDelegate(input: AssessmentInput): boolean;
|
|
28
|
+
export declare function getDelegationStrategy(input: AssessmentInput): AssessmentResult;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Assess Complexity Tool
|
|
3
|
+
*
|
|
4
|
+
* Wraps ComplexityAnalyzer so the main AI can query task complexity
|
|
5
|
+
* and decide whether to delegate to subagents.
|
|
6
|
+
*
|
|
7
|
+
* Exposes:
|
|
8
|
+
* - assessComplexity() โ full analysis returning score, level, strategy, agents
|
|
9
|
+
* - simple assess() helper for quick threshold checks
|
|
10
|
+
*/
|
|
11
|
+
import { getComplexityAnalyzer, } from "../delegation/complexity-analyzer.js";
|
|
12
|
+
import { frameworkLogger } from "../core/framework-logger.js";
|
|
13
|
+
const analyzer = getComplexityAnalyzer();
|
|
14
|
+
export function assessComplexity(input) {
|
|
15
|
+
const metrics = analyzer.analyzeComplexity(input.taskDescription, {
|
|
16
|
+
files: input.files ?? [],
|
|
17
|
+
dependencies: input.dependencies ?? [],
|
|
18
|
+
changeVolume: input.changeVolume ?? 0,
|
|
19
|
+
riskLevel: input.riskLevel ?? "low",
|
|
20
|
+
estimatedDuration: input.estimatedDuration ?? 30,
|
|
21
|
+
});
|
|
22
|
+
const score = analyzer.calculateComplexityScore(metrics);
|
|
23
|
+
frameworkLogger.log("assess-complexity-tool", "assessment-complete", "info", {
|
|
24
|
+
taskDescription: input.taskDescription.substring(0, 80),
|
|
25
|
+
score: score.score,
|
|
26
|
+
level: score.level,
|
|
27
|
+
strategy: score.recommendedStrategy,
|
|
28
|
+
estimatedAgents: score.estimatedAgents,
|
|
29
|
+
});
|
|
30
|
+
return {
|
|
31
|
+
score: score.score,
|
|
32
|
+
level: score.level,
|
|
33
|
+
strategy: score.recommendedStrategy,
|
|
34
|
+
estimatedAgents: score.estimatedAgents,
|
|
35
|
+
reasoning: score.reasoning,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export function shouldDelegate(input) {
|
|
39
|
+
const result = assessComplexity(input);
|
|
40
|
+
return result.score > 15;
|
|
41
|
+
}
|
|
42
|
+
export function getDelegationStrategy(input) {
|
|
43
|
+
return assessComplexity(input);
|
|
44
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Query Routing Tool
|
|
3
|
+
*
|
|
4
|
+
* Lets the main AI discover which agent/skill best matches a task.
|
|
5
|
+
* Combines ROUTING_MAPPINGS keyword lookup with AGENT_REGISTRY metadata.
|
|
6
|
+
*/
|
|
7
|
+
export interface AgentRoutingDetail {
|
|
8
|
+
agent: string;
|
|
9
|
+
skill: string;
|
|
10
|
+
confidence: number;
|
|
11
|
+
matchedKeywords: string[];
|
|
12
|
+
description: string | undefined;
|
|
13
|
+
capabilities: string[];
|
|
14
|
+
expertise: string | undefined;
|
|
15
|
+
}
|
|
16
|
+
export declare function queryRouting(keywords: string[]): AgentRoutingDetail[];
|
|
17
|
+
export declare function listAllRoutes(): AgentRoutingDetail[];
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Query Routing Tool
|
|
3
|
+
*
|
|
4
|
+
* Lets the main AI discover which agent/skill best matches a task.
|
|
5
|
+
* Combines ROUTING_MAPPINGS keyword lookup with AGENT_REGISTRY metadata.
|
|
6
|
+
*/
|
|
7
|
+
import { queryRoutingMappings, getAllRoutingMappings, } from "../config/routing-mappings.js";
|
|
8
|
+
import { getAgentEntry, getAgentCapabilities, } from "../agents/registry.js";
|
|
9
|
+
import { frameworkLogger } from "../core/framework-logger.js";
|
|
10
|
+
export function queryRouting(keywords) {
|
|
11
|
+
const matches = queryRoutingMappings(keywords);
|
|
12
|
+
const enriched = matches.map((m) => {
|
|
13
|
+
const entry = getAgentEntry(m.agent);
|
|
14
|
+
return {
|
|
15
|
+
agent: m.agent,
|
|
16
|
+
skill: m.skill,
|
|
17
|
+
confidence: m.confidence,
|
|
18
|
+
matchedKeywords: m.matchedKeywords,
|
|
19
|
+
description: entry?.description,
|
|
20
|
+
capabilities: entry
|
|
21
|
+
? entry.capabilities
|
|
22
|
+
: getAgentCapabilities(m.agent),
|
|
23
|
+
expertise: entry?.expertise,
|
|
24
|
+
};
|
|
25
|
+
});
|
|
26
|
+
frameworkLogger.log("query-routing-tool", "query-complete", "info", {
|
|
27
|
+
keywords,
|
|
28
|
+
matchCount: enriched.length,
|
|
29
|
+
topMatch: enriched[0]
|
|
30
|
+
? { agent: enriched[0].agent, confidence: enriched[0].confidence }
|
|
31
|
+
: null,
|
|
32
|
+
});
|
|
33
|
+
return enriched;
|
|
34
|
+
}
|
|
35
|
+
export function listAllRoutes() {
|
|
36
|
+
const all = getAllRoutingMappings();
|
|
37
|
+
const seen = new Set();
|
|
38
|
+
const unique = [];
|
|
39
|
+
for (const mapping of all) {
|
|
40
|
+
const key = `${mapping.agent}:${mapping.skill}`;
|
|
41
|
+
if (seen.has(key))
|
|
42
|
+
continue;
|
|
43
|
+
seen.add(key);
|
|
44
|
+
const entry = getAgentEntry(mapping.agent);
|
|
45
|
+
unique.push({
|
|
46
|
+
agent: mapping.agent,
|
|
47
|
+
skill: mapping.skill,
|
|
48
|
+
confidence: mapping.confidence,
|
|
49
|
+
matchedKeywords: mapping.keywords,
|
|
50
|
+
description: entry?.description,
|
|
51
|
+
capabilities: entry
|
|
52
|
+
? entry.capabilities
|
|
53
|
+
: getAgentCapabilities(mapping.agent),
|
|
54
|
+
expertise: entry?.expertise,
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
unique.sort((a, b) => b.confidence - a.confidence);
|
|
58
|
+
return unique;
|
|
59
|
+
}
|
package/package.json
CHANGED
package/scripts/node/release.mjs
CHANGED
|
@@ -8,9 +8,10 @@
|
|
|
8
8
|
* 2. npm version (bumps package.json, triggers preversion โ version scripts)
|
|
9
9
|
* 3. Build
|
|
10
10
|
* 4. Consumer verification (npm pack + fresh install + 4 bridge E2Es)
|
|
11
|
-
* 5. Commit
|
|
12
|
-
* 6.
|
|
13
|
-
* 7. Push commit + tag
|
|
11
|
+
* 5. Commit
|
|
12
|
+
* 6. Tag
|
|
13
|
+
* 7. Push commit + tag to remote
|
|
14
|
+
* 8. npm publish (triggers prepublishOnly โ prepare-consumer + build)
|
|
14
15
|
*
|
|
15
16
|
* Usage:
|
|
16
17
|
* npm run release:patch # patch bump (default)
|
|
@@ -151,26 +152,36 @@ async function main() {
|
|
|
151
152
|
}
|
|
152
153
|
}
|
|
153
154
|
|
|
154
|
-
// Step 7:
|
|
155
|
-
step(7, '
|
|
155
|
+
// Step 7: Push (git state before registry)
|
|
156
|
+
step(7, 'Push to remote');
|
|
156
157
|
if (!dryRun) {
|
|
157
|
-
if (!run('
|
|
158
|
-
|
|
159
|
-
if (!run('npm publish --access public --ignore-scripts', `Publish 0xray@${newVersion} (fallback)`)) {
|
|
160
|
-
process.exit(1);
|
|
161
|
-
}
|
|
162
|
-
}
|
|
158
|
+
if (!run('git push', 'Push commits')) process.exit(1);
|
|
159
|
+
if (!run(`git push origin v${newVersion}`, 'Push tag')) process.exit(1);
|
|
163
160
|
} else {
|
|
164
|
-
log(` ~`, 'Would
|
|
161
|
+
log(` ~`, 'Would push commits + tag', YELLOW);
|
|
165
162
|
}
|
|
166
163
|
|
|
167
|
-
// Step 8:
|
|
168
|
-
step(8, '
|
|
164
|
+
// Step 8: Publish (prepublishOnly runs prepare-consumer + build)
|
|
165
|
+
step(8, 'Publish to npm');
|
|
169
166
|
if (!dryRun) {
|
|
170
|
-
|
|
171
|
-
if (!
|
|
167
|
+
const publishResult = run('npm publish --access public', `Publish 0xray@${newVersion}`);
|
|
168
|
+
if (!publishResult) {
|
|
169
|
+
// Check if the version was already published (non-fatal โ previous attempt may have timed out)
|
|
170
|
+
try {
|
|
171
|
+
const published = execSync(`npm view 0xray@${newVersion} version`, { encoding: 'utf-8', timeout: 15000 }).trim();
|
|
172
|
+
if (published === newVersion) {
|
|
173
|
+
log(` โ`, `Already published 0xray@${newVersion}`, GREEN);
|
|
174
|
+
} else {
|
|
175
|
+
log(` โ`, 'Publish failed', RED);
|
|
176
|
+
process.exit(1);
|
|
177
|
+
}
|
|
178
|
+
} catch {
|
|
179
|
+
log(` โ`, 'Publish failed โ cannot verify', RED);
|
|
180
|
+
process.exit(1);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
172
183
|
} else {
|
|
173
|
-
log(` ~`, 'Would
|
|
184
|
+
log(` ~`, 'Would publish: npm publish --access public', YELLOW);
|
|
174
185
|
}
|
|
175
186
|
|
|
176
187
|
console.log(`\n${BOLD}${GREEN}โ
Released 0xray@${newVersion}${RESET}\n`);
|
|
@@ -395,9 +395,8 @@ class SkillInvocationServer extends XrayKnowledgeSkillBase {
|
|
|
395
395
|
"code-review", "security-audit", "performance-optimization",
|
|
396
396
|
"testing-strategy", "researcher", "skill-invocation",
|
|
397
397
|
"framework-help", "session-management", "code-analyzer",
|
|
398
|
-
"code-reviewer", "architect", "
|
|
399
|
-
"
|
|
400
|
-
"code-reviewer", "security-auditor", "refactorer",
|
|
398
|
+
"code-reviewer", "architect", "bug-triage-specialist", "log-monitor",
|
|
399
|
+
"security-auditor", "refactorer",
|
|
401
400
|
"growth-strategist", "strategist", "devops-deployment",
|
|
402
401
|
"database-design", "tech-writer", "documentation-generation",
|
|
403
402
|
"mobile-development", "seo-consultant",
|