@plumpslabs/kuma 2.3.20 → 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.
Files changed (39) hide show
  1. package/README.md +18 -0
  2. package/dist/index.js +10221 -332
  3. package/package.json +2 -2
  4. package/packages/ide/studio/dist/index.js +37 -5
  5. package/packages/ide/studio/public/index.html +239 -68
  6. package/dist/agentDetector-YOWQVJFR.js +0 -186
  7. package/dist/chunk-3BRBJZ7P.js +0 -1055
  8. package/dist/chunk-3OHYYXYN.js +0 -71
  9. package/dist/chunk-ABKE45T4.js +0 -1264
  10. package/dist/chunk-E2KFPEBT.js +0 -183
  11. package/dist/chunk-FKRSI5U5.js +0 -282
  12. package/dist/chunk-GFLSAXAH.js +0 -155
  13. package/dist/chunk-L7F67KUP.js +0 -172
  14. package/dist/chunk-LVKOGXLC.js +0 -658
  15. package/dist/chunk-PRUTTZBS.js +0 -1113
  16. package/dist/contextDigest-QB5XHPXE.js +0 -177
  17. package/dist/domainRules-QLPAQASB.js +0 -20
  18. package/dist/init-PL4XL662.js +0 -15
  19. package/dist/kumaAstValidator-CNM7FHYA.js +0 -150
  20. package/dist/kumaCheckpoint-J2LDQMEO.js +0 -207
  21. package/dist/kumaCodeScanner-J6B2EHGI.js +0 -563
  22. package/dist/kumaContractEngine-KX27T4N7.js +0 -305
  23. package/dist/kumaDb-4XZ5S2LH.js +0 -65
  24. package/dist/kumaDriftDetector-TOORILSZ.js +0 -237
  25. package/dist/kumaGotchas-XRGFFBTA.js +0 -151
  26. package/dist/kumaGraph-UMXZNGYF.js +0 -44
  27. package/dist/kumaMemory-FBJMV77G.js +0 -16
  28. package/dist/kumaMiner-XJETL7TL.js +0 -176
  29. package/dist/kumaPolicyEngine-2QDJDLM7.js +0 -311
  30. package/dist/kumaProgressiveContext-MWEDRXOH.js +0 -231
  31. package/dist/kumaSearch-PV4QTKE7.js +0 -321
  32. package/dist/kumaTrajectory-7NOAVNG2.js +0 -460
  33. package/dist/kumaVerifier-6YEGC77M.js +0 -265
  34. package/dist/kumaVisualize-264OEBGJ.js +0 -264
  35. package/dist/pathValidator-V4DC6U6Z.js +0 -22
  36. package/dist/safetyAudit-O45SPNTS.js +0 -12
  37. package/dist/safetyScore-TMMRD2MV.js +0 -333
  38. package/dist/sessionMemory-YPKVIOMV.js +0 -6
  39. package/dist/skillGenerator-PWEJKZNX.js +0 -304
@@ -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
- };