@plumpslabs/kuma 2.3.20 → 2.3.23
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 +10316 -380
- package/package.json +2 -2
- package/packages/ide/studio/dist/index.js +90 -9
- package/packages/ide/studio/public/index.html +528 -233
- 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
package/dist/chunk-3OHYYXYN.js
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
sessionMemory
|
|
3
|
-
} from "./chunk-LVKOGXLC.js";
|
|
4
|
-
import {
|
|
5
|
-
getProjectRoot
|
|
6
|
-
} from "./chunk-E2KFPEBT.js";
|
|
7
|
-
|
|
8
|
-
// src/utils/kumaShared.ts
|
|
9
|
-
import { execSync } from "child_process";
|
|
10
|
-
function getSessionStats(inputGoal) {
|
|
11
|
-
const summary = sessionMemory.getSummary();
|
|
12
|
-
const goal = inputGoal || summary.currentGoal || "";
|
|
13
|
-
const modifiedFiles = sessionMemory.getModifiedFiles();
|
|
14
|
-
const toolCalls = sessionMemory.getToolCallHistory(50);
|
|
15
|
-
const failedFiles = sessionMemory.getFailedFiles();
|
|
16
|
-
const loop = sessionMemory.detectLoop();
|
|
17
|
-
return {
|
|
18
|
-
goal,
|
|
19
|
-
modifiedFiles,
|
|
20
|
-
toolCalls,
|
|
21
|
-
toolCallCount: toolCalls.length,
|
|
22
|
-
failedFiles,
|
|
23
|
-
hasLoop: loop.isLooping,
|
|
24
|
-
loopMessage: loop.message,
|
|
25
|
-
hasRunTests: toolCalls.some((c) => c.toolName === "execute_safe_test")
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
function getGitDiffStat(timeout = 3e3) {
|
|
29
|
-
try {
|
|
30
|
-
const root = getProjectRoot();
|
|
31
|
-
return execSync("git diff --stat", {
|
|
32
|
-
cwd: root,
|
|
33
|
-
encoding: "utf-8",
|
|
34
|
-
timeout
|
|
35
|
-
}).trim();
|
|
36
|
-
} catch {
|
|
37
|
-
return "";
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
function getUnresolvedCount(failedFiles) {
|
|
41
|
-
let count = 0;
|
|
42
|
-
for (const f of failedFiles) {
|
|
43
|
-
for (const ff of f.failures) {
|
|
44
|
-
if (!ff.resolved) count++;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
return count;
|
|
48
|
-
}
|
|
49
|
-
function buildDriftMessages(modifiedFiles, hasRunTests, unresolvedCount, gitStat, loopMessage) {
|
|
50
|
-
const drifts = [];
|
|
51
|
-
if (modifiedFiles > 0 && !hasRunTests) {
|
|
52
|
-
drifts.push(`${modifiedFiles} file(s) edited but no test run`);
|
|
53
|
-
}
|
|
54
|
-
if (loopMessage) {
|
|
55
|
-
drifts.push(loopMessage);
|
|
56
|
-
}
|
|
57
|
-
if (unresolvedCount > 0) {
|
|
58
|
-
drifts.push(`${unresolvedCount} unresolved failure(s)`);
|
|
59
|
-
}
|
|
60
|
-
if (gitStat) {
|
|
61
|
-
drifts.push(`Git diff: ${gitStat}`);
|
|
62
|
-
}
|
|
63
|
-
return drifts;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export {
|
|
67
|
-
getSessionStats,
|
|
68
|
-
getGitDiffStat,
|
|
69
|
-
getUnresolvedCount,
|
|
70
|
-
buildDriftMessages
|
|
71
|
-
};
|