@plumpslabs/kuma 2.3.19 → 2.3.22
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/README.md +18 -0
- package/dist/index.js +10221 -332
- package/package.json +2 -2
- package/packages/ide/studio/dist/index.js +37 -5
- package/packages/ide/studio/public/index.html +284 -63
- package/dist/agentDetector-YOWQVJFR.js +0 -186
- package/dist/chunk-3BRBJZ7P.js +0 -1055
- package/dist/chunk-3OHYYXYN.js +0 -71
- package/dist/chunk-ABKE45T4.js +0 -1264
- package/dist/chunk-E2KFPEBT.js +0 -183
- package/dist/chunk-FKRSI5U5.js +0 -282
- package/dist/chunk-GFLSAXAH.js +0 -155
- package/dist/chunk-L7F67KUP.js +0 -172
- package/dist/chunk-LVKOGXLC.js +0 -658
- package/dist/chunk-PRUTTZBS.js +0 -1113
- package/dist/contextDigest-QB5XHPXE.js +0 -177
- package/dist/domainRules-QLPAQASB.js +0 -20
- package/dist/init-PL4XL662.js +0 -15
- package/dist/kumaAstValidator-CNM7FHYA.js +0 -150
- package/dist/kumaCheckpoint-J2LDQMEO.js +0 -207
- package/dist/kumaCodeScanner-J6B2EHGI.js +0 -563
- package/dist/kumaContractEngine-KX27T4N7.js +0 -305
- package/dist/kumaDb-4XZ5S2LH.js +0 -65
- package/dist/kumaDriftDetector-TOORILSZ.js +0 -237
- package/dist/kumaGotchas-XRGFFBTA.js +0 -151
- package/dist/kumaGraph-UMXZNGYF.js +0 -44
- package/dist/kumaMemory-FBJMV77G.js +0 -16
- package/dist/kumaMiner-XJETL7TL.js +0 -176
- package/dist/kumaPolicyEngine-2QDJDLM7.js +0 -311
- package/dist/kumaProgressiveContext-MWEDRXOH.js +0 -231
- package/dist/kumaSearch-PV4QTKE7.js +0 -321
- package/dist/kumaTrajectory-7NOAVNG2.js +0 -460
- package/dist/kumaVerifier-6YEGC77M.js +0 -265
- package/dist/kumaVisualize-264OEBGJ.js +0 -264
- package/dist/pathValidator-V4DC6U6Z.js +0 -22
- package/dist/safetyAudit-O45SPNTS.js +0 -12
- package/dist/safetyScore-TMMRD2MV.js +0 -333
- package/dist/sessionMemory-YPKVIOMV.js +0 -6
- package/dist/skillGenerator-PWEJKZNX.js +0 -304
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getProjectRoot
|
|
3
|
-
} from "./chunk-E2KFPEBT.js";
|
|
4
|
-
|
|
5
|
-
// src/utils/agentDetector.ts
|
|
6
|
-
import fs from "fs";
|
|
7
|
-
import path from "path";
|
|
8
|
-
var AGENT_DETECTORS = [
|
|
9
|
-
{
|
|
10
|
-
type: "cursor",
|
|
11
|
-
checkFiles: [],
|
|
12
|
-
checkDirs: [".cursor"],
|
|
13
|
-
priority: 90,
|
|
14
|
-
label: "Cursor (.cursor/)"
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
type: "claude",
|
|
18
|
-
checkFiles: ["CLAUDE.md"],
|
|
19
|
-
checkDirs: [".claude"],
|
|
20
|
-
priority: 85,
|
|
21
|
-
label: "Claude Code (CLAUDE.md / .claude/)"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
type: "cline",
|
|
25
|
-
checkFiles: [],
|
|
26
|
-
checkDirs: [".clinerules"],
|
|
27
|
-
priority: 80,
|
|
28
|
-
label: "Cline (.clinerules/)"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
type: "antigravity",
|
|
32
|
-
checkFiles: [],
|
|
33
|
-
checkDirs: [".agents"],
|
|
34
|
-
priority: 75,
|
|
35
|
-
label: "Antigravity CLI (.agents/)"
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
type: "windsurf",
|
|
39
|
-
checkFiles: [],
|
|
40
|
-
checkDirs: [".windsurf"],
|
|
41
|
-
priority: 70,
|
|
42
|
-
label: "Windsurf (.windsurf/)"
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
type: "opencode",
|
|
46
|
-
checkFiles: [".agents/skills/kuma/SKILL.md"],
|
|
47
|
-
checkDirs: [".agents"],
|
|
48
|
-
priority: 65,
|
|
49
|
-
label: "OpenCode (.agents/skills/kuma/SKILL.md)"
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
type: "kiro",
|
|
53
|
-
checkFiles: [],
|
|
54
|
-
checkDirs: [".kiro"],
|
|
55
|
-
priority: 60,
|
|
56
|
-
label: "Kiro (.kiro/)"
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
type: "aider",
|
|
60
|
-
checkFiles: [".aider.conf.yml", ".aider.conf.yaml"],
|
|
61
|
-
checkDirs: [],
|
|
62
|
-
priority: 55,
|
|
63
|
-
label: "Aider (.aider.conf.yml)"
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
type: "copilot",
|
|
67
|
-
checkFiles: [],
|
|
68
|
-
checkDirs: [".github/skills"],
|
|
69
|
-
priority: 50,
|
|
70
|
-
label: "GitHub Copilot Editor (.github/skills/)"
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
type: "codex",
|
|
74
|
-
checkFiles: [".codex/config.toml"],
|
|
75
|
-
checkDirs: [".codex"],
|
|
76
|
-
priority: 45,
|
|
77
|
-
label: "Codex CLI (.codex/)"
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
type: "qwen",
|
|
81
|
-
checkFiles: ["settings.json"],
|
|
82
|
-
checkDirs: [],
|
|
83
|
-
priority: 40,
|
|
84
|
-
label: "Qwen Code (settings.json)"
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
type: "openclaw",
|
|
88
|
-
checkFiles: ["skills/kuma/SKILL.md"],
|
|
89
|
-
checkDirs: ["skills"],
|
|
90
|
-
priority: 35,
|
|
91
|
-
label: "OpenClaw (skills/kuma/SKILL.md)"
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
type: "codewhale",
|
|
95
|
-
checkFiles: [],
|
|
96
|
-
checkDirs: [".codewhale"],
|
|
97
|
-
priority: 30,
|
|
98
|
-
label: "CodeWhale (.codewhale/)"
|
|
99
|
-
}
|
|
100
|
-
];
|
|
101
|
-
function checkFile(root, filePath) {
|
|
102
|
-
try {
|
|
103
|
-
return fs.existsSync(path.join(root, filePath));
|
|
104
|
-
} catch {
|
|
105
|
-
return false;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
function checkDir(root, dirPath) {
|
|
109
|
-
try {
|
|
110
|
-
const fullPath = path.join(root, dirPath);
|
|
111
|
-
return fs.existsSync(fullPath) && fs.statSync(fullPath).isDirectory();
|
|
112
|
-
} catch {
|
|
113
|
-
return false;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
function detectAgent(projectRoot) {
|
|
117
|
-
const root = projectRoot ?? getProjectRoot();
|
|
118
|
-
const detected = [];
|
|
119
|
-
for (const detector of AGENT_DETECTORS) {
|
|
120
|
-
const hasFile = detector.checkFiles.some((f) => checkFile(root, f));
|
|
121
|
-
const hasDir = detector.checkDirs.some((d) => checkDir(root, d));
|
|
122
|
-
if (hasFile || hasDir) {
|
|
123
|
-
detected.push(detector.type);
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
const sorted = detected.map((t) => ({ type: t, priority: AGENT_DETECTORS.find((d) => d.type === t)?.priority ?? 0 })).sort((a, b) => b.priority - a.priority);
|
|
127
|
-
const primary = sorted.length > 0 ? sorted[0].type : null;
|
|
128
|
-
let confidence = "low";
|
|
129
|
-
if (sorted.length > 0) {
|
|
130
|
-
const topPriority = sorted[0].priority;
|
|
131
|
-
if (topPriority >= 70) confidence = "high";
|
|
132
|
-
else if (topPriority >= 50) confidence = "medium";
|
|
133
|
-
else confidence = "low";
|
|
134
|
-
}
|
|
135
|
-
return {
|
|
136
|
-
detected: sorted.map((s) => s.type),
|
|
137
|
-
primary,
|
|
138
|
-
confidence
|
|
139
|
-
};
|
|
140
|
-
}
|
|
141
|
-
function getSkillPath(type) {
|
|
142
|
-
switch (type) {
|
|
143
|
-
case "claude":
|
|
144
|
-
return ".claude/skills/kuma/SKILL.md";
|
|
145
|
-
case "cursor":
|
|
146
|
-
return ".cursor/rules/kuma.mdc";
|
|
147
|
-
case "cline":
|
|
148
|
-
return ".clinerules/kuma.md";
|
|
149
|
-
case "antigravity":
|
|
150
|
-
return ".agents/skills/kuma/SKILL.md";
|
|
151
|
-
case "codex":
|
|
152
|
-
return ".agents/skills/kuma/SKILL.md";
|
|
153
|
-
// Same path as Antigravity
|
|
154
|
-
case "opencode":
|
|
155
|
-
return ".agents/skills/kuma/SKILL.md";
|
|
156
|
-
case "aider":
|
|
157
|
-
return "CONVENTIONS.md";
|
|
158
|
-
case "windsurf":
|
|
159
|
-
return ".windsurf/rules/kuma.md";
|
|
160
|
-
case "copilot":
|
|
161
|
-
return ".github/skills/kuma/SKILL.md";
|
|
162
|
-
case "qwen":
|
|
163
|
-
return "AGENTS.md";
|
|
164
|
-
case "kiro":
|
|
165
|
-
return ".kiro/steering/kuma.md";
|
|
166
|
-
case "openclaw":
|
|
167
|
-
return "skills/kuma/SKILL.md";
|
|
168
|
-
case "codewhale":
|
|
169
|
-
return "skills/kuma/SKILL.md";
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
function getAgentLabel(type) {
|
|
173
|
-
const detector = AGENT_DETECTORS.find((d) => d.type === type);
|
|
174
|
-
return detector?.label ?? type;
|
|
175
|
-
}
|
|
176
|
-
function skillExists(type, projectRoot) {
|
|
177
|
-
const root = projectRoot ?? getProjectRoot();
|
|
178
|
-
const skillPath = getSkillPath(type);
|
|
179
|
-
return fs.existsSync(path.join(root, skillPath));
|
|
180
|
-
}
|
|
181
|
-
export {
|
|
182
|
-
detectAgent,
|
|
183
|
-
getAgentLabel,
|
|
184
|
-
getSkillPath,
|
|
185
|
-
skillExists
|
|
186
|
-
};
|