agent-enderun 1.1.0 → 1.1.2

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 (141) hide show
  1. package/.enderun/ENDERUN.md +1 -1
  2. package/.enderun/STATUS.md +2 -2
  3. package/.enderun/agents/analyst.json +4 -4
  4. package/.enderun/agents/backend.json +4 -4
  5. package/.enderun/agents/database.json +4 -4
  6. package/.enderun/agents/devops.json +4 -4
  7. package/.enderun/agents/explorer.json +4 -4
  8. package/.enderun/agents/frontend.json +4 -4
  9. package/.enderun/agents/git.json +4 -4
  10. package/.enderun/agents/manager.json +4 -6
  11. package/.enderun/agents/mobile.json +4 -4
  12. package/.enderun/agents/native.json +4 -4
  13. package/.enderun/agents/quality.json +4 -4
  14. package/.enderun/agents/security.json +4 -4
  15. package/.enderun/config.json +3 -2
  16. package/.enderun/logs/manager.json +26 -47
  17. package/.enderun/memory/PROJECT_MEMORY.md +42 -9
  18. package/CLAUDE.md +5 -4
  19. package/GEMINI.md +5 -4
  20. package/GROK.md +3 -3
  21. package/README.md +8 -8
  22. package/agent.md +6 -6
  23. package/bin/cli.js +3 -4
  24. package/bin/compile.js +22 -0
  25. package/bin/test-init-run.js +136 -0
  26. package/dist/framework-mcp/src/index.js +1 -1
  27. package/dist/framework-mcp/src/tools/definitions.js +3 -1
  28. package/dist/framework-mcp/src/tools/definitions.js.map +1 -1
  29. package/dist/framework-mcp/src/tools/file_system/read_file.js +20 -0
  30. package/dist/framework-mcp/src/tools/file_system/read_file.js.map +1 -1
  31. package/dist/framework-mcp/src/tools/messaging/send_message.js +37 -14
  32. package/dist/framework-mcp/src/tools/messaging/send_message.js.map +1 -1
  33. package/dist/src/cli/adapters.d.ts +3 -1
  34. package/dist/src/cli/adapters.js +13 -11
  35. package/dist/src/cli/adapters.js.map +1 -1
  36. package/dist/src/cli/commands/check.js +12 -1
  37. package/dist/src/cli/commands/check.js.map +1 -1
  38. package/dist/src/cli/commands/init.js +21 -11
  39. package/dist/src/cli/commands/init.js.map +1 -1
  40. package/dist/src/cli/commands/orchestrate.d.ts +15 -0
  41. package/dist/src/cli/commands/orchestrate.js +45 -1
  42. package/dist/src/cli/commands/orchestrate.js.map +1 -1
  43. package/dist/src/cli/index.js +84 -19
  44. package/dist/src/cli/index.js.map +1 -1
  45. package/dist/src/cli/utils/memory.js +4 -0
  46. package/dist/src/cli/utils/memory.js.map +1 -1
  47. package/dist/src/cli/utils/pkg.js +5 -1
  48. package/dist/src/cli/utils/pkg.js.map +1 -1
  49. package/dist/tests/adapter.test.js +10 -8
  50. package/dist/tests/adapter.test.js.map +1 -1
  51. package/dist/tests/gemini.test.js +8 -7
  52. package/dist/tests/gemini.test.js.map +1 -1
  53. package/dist/vitest.config.js +1 -1
  54. package/dist/vitest.config.js.map +1 -1
  55. package/docs/project_analysis_report.md +69 -0
  56. package/eslint.config.js +2 -2
  57. package/framework-mcp/dist/src/index.js +1 -1
  58. package/framework-mcp/dist/src/tools/definitions.js +3 -1
  59. package/framework-mcp/dist/src/tools/file_system/read_file.js +20 -0
  60. package/framework-mcp/package.json +2 -2
  61. package/framework-mcp/src/index.ts +1 -1
  62. package/framework-mcp/src/tools/definitions.ts +3 -1
  63. package/framework-mcp/src/tools/file_system/read_file.ts +24 -0
  64. package/package.json +10 -8
  65. package/src/cli/adapters.ts +13 -11
  66. package/src/cli/commands/check.ts +13 -1
  67. package/src/cli/commands/init.ts +20 -11
  68. package/src/cli/commands/orchestrate.ts +1 -1
  69. package/src/cli/utils/memory.ts +4 -0
  70. package/src/cli/utils/pkg.ts +5 -1
  71. package/tsconfig.json +0 -2
  72. package/.enderun/ARCHITECTURE.md +0 -1
  73. package/.enderun/SECURITY.md +0 -1
  74. package/bin/init-check.js +0 -86
  75. package/bin/update-contract.js +0 -93
  76. package/dist/apps/backend/src/types/index.d.ts +0 -9
  77. package/dist/apps/backend/src/types/index.js +0 -5
  78. package/dist/apps/backend/src/types/index.js.map +0 -1
  79. package/dist/apps/web/src/main.d.ts +0 -1
  80. package/dist/apps/web/src/main.js +0 -9
  81. package/dist/apps/web/src/main.js.map +0 -1
  82. package/dist/apps/web/vite.config.d.ts +0 -2
  83. package/dist/apps/web/vite.config.js +0 -6
  84. package/dist/apps/web/vite.config.js.map +0 -1
  85. package/dist/tests/framework-init-test/framework-mcp/src/index.d.ts +0 -1
  86. package/dist/tests/framework-init-test/framework-mcp/src/index.js +0 -71
  87. package/dist/tests/framework-init-test/framework-mcp/src/index.js.map +0 -1
  88. package/dist/tests/framework-init-test/framework-mcp/src/tools/definitions.d.ts +0 -2
  89. package/dist/tests/framework-init-test/framework-mcp/src/tools/definitions.js +0 -111
  90. package/dist/tests/framework-init-test/framework-mcp/src/tools/definitions.js.map +0 -1
  91. package/dist/tests/framework-init-test/framework-mcp/src/tools/file_system/patch_file.d.ts +0 -2
  92. package/dist/tests/framework-init-test/framework-mcp/src/tools/file_system/patch_file.js +0 -19
  93. package/dist/tests/framework-init-test/framework-mcp/src/tools/file_system/patch_file.js.map +0 -1
  94. package/dist/tests/framework-init-test/framework-mcp/src/tools/file_system/read_file.d.ts +0 -2
  95. package/dist/tests/framework-init-test/framework-mcp/src/tools/file_system/read_file.js +0 -8
  96. package/dist/tests/framework-init-test/framework-mcp/src/tools/file_system/read_file.js.map +0 -1
  97. package/dist/tests/framework-init-test/framework-mcp/src/tools/file_system/replace_text.d.ts +0 -2
  98. package/dist/tests/framework-init-test/framework-mcp/src/tools/file_system/replace_text.js +0 -32
  99. package/dist/tests/framework-init-test/framework-mcp/src/tools/file_system/replace_text.js.map +0 -1
  100. package/dist/tests/framework-init-test/framework-mcp/src/tools/file_system/write_file.d.ts +0 -2
  101. package/dist/tests/framework-init-test/framework-mcp/src/tools/file_system/write_file.js +0 -10
  102. package/dist/tests/framework-init-test/framework-mcp/src/tools/file_system/write_file.js.map +0 -1
  103. package/dist/tests/framework-init-test/framework-mcp/src/tools/framework/get_status.d.ts +0 -2
  104. package/dist/tests/framework-init-test/framework-mcp/src/tools/framework/get_status.js +0 -6
  105. package/dist/tests/framework-init-test/framework-mcp/src/tools/framework/get_status.js.map +0 -1
  106. package/dist/tests/framework-init-test/framework-mcp/src/tools/framework/orchestrate.d.ts +0 -2
  107. package/dist/tests/framework-init-test/framework-mcp/src/tools/framework/orchestrate.js +0 -6
  108. package/dist/tests/framework-init-test/framework-mcp/src/tools/framework/orchestrate.js.map +0 -1
  109. package/dist/tests/framework-init-test/framework-mcp/src/tools/framework/update_contract_hash.d.ts +0 -2
  110. package/dist/tests/framework-init-test/framework-mcp/src/tools/framework/update_contract_hash.js +0 -6
  111. package/dist/tests/framework-init-test/framework-mcp/src/tools/framework/update_contract_hash.js.map +0 -1
  112. package/dist/tests/framework-init-test/framework-mcp/src/tools/framework/update_memory.d.ts +0 -2
  113. package/dist/tests/framework-init-test/framework-mcp/src/tools/framework/update_memory.js +0 -9
  114. package/dist/tests/framework-init-test/framework-mcp/src/tools/framework/update_memory.js.map +0 -1
  115. package/dist/tests/framework-init-test/framework-mcp/src/tools/index.d.ts +0 -5
  116. package/dist/tests/framework-init-test/framework-mcp/src/tools/index.js +0 -26
  117. package/dist/tests/framework-init-test/framework-mcp/src/tools/index.js.map +0 -1
  118. package/dist/tests/framework-init-test/framework-mcp/src/tools/messaging/log_action.d.ts +0 -2
  119. package/dist/tests/framework-init-test/framework-mcp/src/tools/messaging/log_action.js +0 -23
  120. package/dist/tests/framework-init-test/framework-mcp/src/tools/messaging/log_action.js.map +0 -1
  121. package/dist/tests/framework-init-test/framework-mcp/src/tools/messaging/send_message.d.ts +0 -2
  122. package/dist/tests/framework-init-test/framework-mcp/src/tools/messaging/send_message.js +0 -24
  123. package/dist/tests/framework-init-test/framework-mcp/src/tools/messaging/send_message.js.map +0 -1
  124. package/dist/tests/framework-init-test/framework-mcp/src/tools/types.d.ts +0 -47
  125. package/dist/tests/framework-init-test/framework-mcp/src/tools/types.js +0 -2
  126. package/dist/tests/framework-init-test/framework-mcp/src/tools/types.js.map +0 -1
  127. package/dist/tests/framework-init-test/framework-mcp/src/utils/cli.d.ts +0 -5
  128. package/dist/tests/framework-init-test/framework-mcp/src/utils/cli.js +0 -21
  129. package/dist/tests/framework-init-test/framework-mcp/src/utils/cli.js.map +0 -1
  130. package/dist/tests/framework-init-test/framework-mcp/src/utils/security.d.ts +0 -12
  131. package/dist/tests/framework-init-test/framework-mcp/src/utils/security.js +0 -54
  132. package/dist/tests/framework-init-test/framework-mcp/src/utils/security.js.map +0 -1
  133. package/dist/tests/framework-init-test/framework-mcp/tests/tools/file_system/replace_text.test.d.ts +0 -1
  134. package/dist/tests/framework-init-test/framework-mcp/tests/tools/file_system/replace_text.test.js +0 -69
  135. package/dist/tests/framework-init-test/framework-mcp/tests/tools/file_system/replace_text.test.js.map +0 -1
  136. package/dist/tests/framework-init-test/panda.config.d.ts +0 -4
  137. package/dist/tests/framework-init-test/panda.config.js +0 -95
  138. package/dist/tests/framework-init-test/panda.config.js.map +0 -1
  139. package/dist/tests/framework-init-test/vitest.config.d.ts +0 -2
  140. package/dist/tests/framework-init-test/vitest.config.js +0 -19
  141. package/dist/tests/framework-init-test/vitest.config.js.map +0 -1
@@ -1,24 +0,0 @@
1
- import fs from "fs";
2
- import path from "path";
3
- import { resolveFrameworkDir } from "../../utils/security.js";
4
- export function handleSendAgentMessage(projectRoot, args) {
5
- const { to, category, content, traceId } = args;
6
- // `from` is optional — falls back to "@mcp" for backward compatibility
7
- const from = args.from || "@mcp";
8
- const frameworkDir = resolveFrameworkDir(projectRoot);
9
- const agentName = to.replace("@", "");
10
- const messagePath = path.join(projectRoot, frameworkDir, "messages", `${agentName}.json`);
11
- const message = {
12
- timestamp: new Date().toISOString(),
13
- from,
14
- to,
15
- category,
16
- traceId,
17
- content,
18
- status: "PENDING"
19
- };
20
- fs.mkdirSync(path.dirname(messagePath), { recursive: true });
21
- fs.appendFileSync(messagePath, JSON.stringify(message) + "\n");
22
- return { content: [{ type: "text", text: `✅ Message sent to ${to} (from: ${from})` }] };
23
- }
24
- //# sourceMappingURL=send_message.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"send_message.js","sourceRoot":"","sources":["../../../../../../../tests/framework-init-test/framework-mcp/src/tools/messaging/send_message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAG9D,MAAM,UAAU,sBAAsB,CAAC,WAAmB,EAAE,IAAc;IACtE,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,IAA2E,CAAC;IACvH,uEAAuE;IACvE,MAAM,IAAI,GAAI,IAAI,CAAC,IAAe,IAAI,MAAM,CAAC;IAE7C,MAAM,YAAY,GAAG,mBAAmB,CAAC,WAAW,CAAC,CAAC;IACtD,MAAM,SAAS,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;IACtC,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,GAAG,SAAS,OAAO,CAAC,CAAC;IAE1F,MAAM,OAAO,GAAG;QACZ,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;QACnC,IAAI;QACJ,EAAE;QACF,QAAQ;QACR,OAAO;QACP,OAAO;QACP,MAAM,EAAE,SAAS;KACpB,CAAC;IAEF,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC7D,EAAE,CAAC,cAAc,CAAC,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC;IAE/D,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,qBAAqB,EAAE,WAAW,IAAI,GAAG,EAAE,CAAC,EAAE,CAAC;AAC5F,CAAC"}
@@ -1,47 +0,0 @@
1
- export interface ToolDefinition {
2
- name: string;
3
- description: string;
4
- inputSchema: {
5
- type: "object";
6
- properties: Record<string, {
7
- type: string;
8
- description?: string;
9
- enum?: string[];
10
- }>;
11
- required?: string[];
12
- };
13
- }
14
- export interface CallToolRequest {
15
- params: {
16
- name: string;
17
- arguments?: ToolArgs;
18
- };
19
- }
20
- export interface ToolArgs {
21
- path?: string;
22
- content?: string;
23
- oldText?: string;
24
- newText?: string;
25
- startLine?: number;
26
- endLine?: number;
27
- newContent?: string;
28
- section?: string;
29
- to?: string;
30
- category?: "ACTION" | "DELEGATION" | "INFO" | "ALERT";
31
- traceId?: string;
32
- agent?: string;
33
- action?: string;
34
- status?: "SUCCESS" | "FAILURE";
35
- summary?: string;
36
- findings?: string;
37
- allowMultiple?: boolean;
38
- timeout?: number;
39
- from?: string;
40
- }
41
- export interface ToolResult {
42
- isError?: boolean;
43
- content: Array<{
44
- type: "text";
45
- text: string;
46
- }>;
47
- }
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../tests/framework-init-test/framework-mcp/src/tools/types.ts"],"names":[],"mappings":""}
@@ -1,5 +0,0 @@
1
- /**
2
- * Executes a CLI command safely using execFileSync (no shell injection risk).
3
- * Captures stderr gracefully to prevent stream crashes.
4
- */
5
- export declare function safeExec(command: string, args: string[], cwd: string, timeout?: number): string;
@@ -1,21 +0,0 @@
1
- import { execFileSync } from "child_process";
2
- /**
3
- * Executes a CLI command safely using execFileSync (no shell injection risk).
4
- * Captures stderr gracefully to prevent stream crashes.
5
- */
6
- export function safeExec(command, args, cwd, timeout) {
7
- try {
8
- return execFileSync(command, args, {
9
- cwd,
10
- encoding: "utf8",
11
- timeout: timeout || 30000,
12
- maxBuffer: 1024 * 1024,
13
- stdio: ["pipe", "pipe", "pipe"],
14
- });
15
- }
16
- catch (error) {
17
- const err = error;
18
- throw new Error(err.stderr || err.message || "Command execution failed", { cause: error });
19
- }
20
- }
21
- //# sourceMappingURL=cli.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../../../../../../tests/framework-init-test/framework-mcp/src/utils/cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,OAAe,EAAE,IAAc,EAAE,GAAW,EAAE,OAAgB;IACnF,IAAI,CAAC;QACD,OAAO,YAAY,CAAC,OAAO,EAAE,IAAI,EAAE;YAC/B,GAAG;YACH,QAAQ,EAAE,MAAM;YAChB,OAAO,EAAE,OAAO,IAAI,KAAK;YACzB,SAAS,EAAE,IAAI,GAAG,IAAI;YACtB,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;SAClC,CAAC,CAAC;IACP,CAAC;IAAC,OAAO,KAAc,EAAE,CAAC;QACtB,MAAM,GAAG,GAAG,KAA8C,CAAC;QAC3D,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,OAAO,IAAI,0BAA0B,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;IAC/F,CAAC;AACL,CAAC"}
@@ -1,12 +0,0 @@
1
- /**
2
- * Validates and resolves a user-provided path to prevent path traversal attacks.
3
- * Ensures the resolved path stays within the project root boundary.
4
- */
5
- export declare function safePath(projectRoot: string, userPath: string): string;
6
- /**
7
- * Resolves the active framework directory.
8
- * Priority: package.json `enderun.frameworkDir` → `.enderun` → adapter dirs.
9
- * This ensures the canonical framework directory is always used,
10
- * even when adapter-specific dirs (e.g. `.gemini`) exist alongside it.
11
- */
12
- export declare function resolveFrameworkDir(projectRoot: string): string;
@@ -1,54 +0,0 @@
1
- import path from "path";
2
- import fs from "fs";
3
- /**
4
- * Validates and resolves a user-provided path to prevent path traversal attacks.
5
- * Ensures the resolved path stays within the project root boundary.
6
- */
7
- export function safePath(projectRoot, userPath) {
8
- const resolved = path.resolve(projectRoot, userPath);
9
- const normalizedRoot = path.resolve(projectRoot);
10
- if (!resolved.startsWith(normalizedRoot + path.sep) && resolved !== normalizedRoot) {
11
- throw new Error(`Access denied: path "${userPath}" escapes project root.`);
12
- }
13
- return resolved;
14
- }
15
- /**
16
- * Resolves the active framework directory.
17
- * Priority: package.json `enderun.frameworkDir` → `.enderun` → adapter dirs.
18
- * This ensures the canonical framework directory is always used,
19
- * even when adapter-specific dirs (e.g. `.gemini`) exist alongside it.
20
- */
21
- export function resolveFrameworkDir(projectRoot) {
22
- // 1. Authoritative source: read from package.json if present
23
- try {
24
- const pkgPath = path.join(projectRoot, "package.json");
25
- if (fs.existsSync(pkgPath)) {
26
- const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf8"));
27
- const enderunConfig = pkg["enderun"];
28
- if (enderunConfig && typeof enderunConfig["frameworkDir"] === "string") {
29
- return enderunConfig["frameworkDir"];
30
- }
31
- }
32
- }
33
- catch {
34
- // ignore — fall through to filesystem scan
35
- }
36
- // 2. Filesystem scan — .enderun takes precedence over adapter-specific dirs
37
- const candidates = [
38
- ".enderun",
39
- ".claude",
40
- ".grok",
41
- ".agent",
42
- ".gemini/antigravity",
43
- ".gemini/antigravity-cli",
44
- ".gemini",
45
- ];
46
- for (const candidate of candidates) {
47
- const candidatePath = path.join(projectRoot, candidate);
48
- if (fs.existsSync(candidatePath)) {
49
- return candidate;
50
- }
51
- }
52
- return ".enderun";
53
- }
54
- //# sourceMappingURL=security.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"security.js","sourceRoot":"","sources":["../../../../../../tests/framework-init-test/framework-mcp/src/utils/security.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,IAAI,CAAC;AAEpB;;;GAGG;AACH,MAAM,UAAU,QAAQ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WAAW,EAAE,SAAS,CAAC,CAAC;QACxD,IAAI,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE,CAAC;YAC/B,OAAO,SAAS,CAAC;QACrB,CAAC;IACL,CAAC;IAED,OAAO,UAAU,CAAC;AACtB,CAAC"}
@@ -1,69 +0,0 @@
1
- import { describe, it, expect, beforeEach, afterEach } from "vitest";
2
- import fs from "fs";
3
- import path from "path";
4
- import { handleReplaceText } from "../../../src/tools/file_system/replace_text";
5
- const TEST_DIR = path.join(__dirname, "../_temp_test_files");
6
- const TEST_FILE = path.join(TEST_DIR, "test_file.txt");
7
- beforeEach(() => {
8
- fs.mkdirSync(TEST_DIR, { recursive: true });
9
- });
10
- afterEach(() => {
11
- fs.rmSync(TEST_DIR, { recursive: true, force: true });
12
- });
13
- describe("handleReplaceText", () => {
14
- it("should replace a single occurrence of text", () => {
15
- fs.writeFileSync(TEST_FILE, "hello world", "utf8");
16
- const args = {
17
- path: TEST_FILE,
18
- oldText: "world",
19
- newText: "there",
20
- };
21
- const result = handleReplaceText(TEST_DIR, args);
22
- expect(result.content[0].text).toContain("✅ Surgical edit successful");
23
- expect(fs.readFileSync(TEST_FILE, "utf8")).toBe("hello there");
24
- });
25
- it("should throw an error if text is not found", () => {
26
- fs.writeFileSync(TEST_FILE, "hello world", "utf8");
27
- const args = {
28
- path: TEST_FILE,
29
- oldText: "missing",
30
- newText: "found",
31
- };
32
- expect(() => handleReplaceText(TEST_DIR, args)).toThrowError("Text not found in file");
33
- });
34
- it("should throw an error for ambiguous replacement if allowMultiple is false", () => {
35
- fs.writeFileSync(TEST_FILE, "hello world world", "utf8");
36
- const args = {
37
- path: TEST_FILE,
38
- oldText: "world",
39
- newText: "there",
40
- allowMultiple: false,
41
- };
42
- expect(() => handleReplaceText(TEST_DIR, args)).toThrowError("Ambiguous replacement");
43
- });
44
- it("should replace all occurrences of text if allowMultiple is true", () => {
45
- fs.writeFileSync(TEST_FILE, "hello world world", "utf8");
46
- const args = {
47
- path: TEST_FILE,
48
- oldText: "world",
49
- newText: "there",
50
- allowMultiple: true,
51
- };
52
- const result = handleReplaceText(TEST_DIR, args);
53
- expect(result.content[0].text).toContain("✅ Surgical edit successful");
54
- expect(fs.readFileSync(TEST_FILE, "utf8")).toBe("hello there there");
55
- });
56
- it("should handle special characters in oldText when allowMultiple is true", () => {
57
- fs.writeFileSync(TEST_FILE, "test.txt", "utf8");
58
- const args = {
59
- path: TEST_FILE,
60
- oldText: ".txt",
61
- newText: ".md",
62
- allowMultiple: true,
63
- };
64
- const result = handleReplaceText(TEST_DIR, args);
65
- expect(result.content[0].text).toContain("✅ Surgical edit successful");
66
- expect(fs.readFileSync(TEST_FILE, "utf8")).toBe("test.md");
67
- });
68
- });
69
- //# sourceMappingURL=replace_text.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"replace_text.test.js","sourceRoot":"","sources":["../../../../../../../tests/framework-init-test/framework-mcp/tests/tools/file_system/replace_text.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACrE,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAC;AAGhF,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,qBAAqB,CAAC,CAAC;AAC7D,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAC;AAEvD,UAAU,CAAC,GAAG,EAAE;IACZ,EAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;AAChD,CAAC,CAAC,CAAC;AAEH,SAAS,CAAC,GAAG,EAAE;IACX,EAAE,CAAC,MAAM,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,IA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M,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC/D,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -1,4 +0,0 @@
1
- declare const _default: import("@pandacss/dev").Config & {
2
- name: string;
3
- };
4
- export default _default;
@@ -1,95 +0,0 @@
1
- import { defineConfig } from "@pandacss/dev";
2
- export default defineConfig({
3
- // Whether to use css reset
4
- preflight: true,
5
- // Where to look for your css declarations
6
- include: [
7
- "./src/**/*.{js,jsx,ts,tsx}",
8
- "./pages/**/*.{js,jsx,ts,tsx}",
9
- "./apps/**/*.{js,jsx,ts,tsx}",
10
- // Project-internal UI components only (no packages/ui by default)
11
- "./apps/**/src/components/**/*.{ts,tsx}",
12
- "./apps/**/src/ui/**/*.{ts,tsx}",
13
- ],
14
- // Files to exclude
15
- exclude: [],
16
- // Conditions for Dark Mode and other states
17
- conditions: {
18
- extend: {
19
- dark: ".dark &, [data-theme='dark'] &",
20
- light: ".light &, [data-theme='light'] &",
21
- },
22
- },
23
- // Theme Customization
24
- theme: {
25
- extend: {
26
- // Base Tokens (Absolute Values)
27
- tokens: {
28
- colors: {
29
- brand: {
30
- 50: { value: "#eef2ff" },
31
- 100: { value: "#e0e7ff" },
32
- 200: { value: "#c7d2fe" },
33
- 300: { value: "#a5b4fc" },
34
- 400: { value: "#818cf8" },
35
- 500: { value: "#6366f1" },
36
- 600: { value: "#4f46e5" },
37
- 700: { value: "#4338ca" },
38
- 800: { value: "#3730a3" },
39
- 900: { value: "#312e81" },
40
- 950: { value: "#1e1b4b" },
41
- },
42
- },
43
- spacing: {
44
- container: { value: "1200px" },
45
- },
46
- },
47
- // Semantic Tokens (Theme Aware)
48
- semanticTokens: {
49
- colors: {
50
- bg: {
51
- canvas: {
52
- value: { base: "{colors.white}", _dark: "{colors.brand.950}" },
53
- },
54
- surface: {
55
- value: { base: "{colors.gray.50}", _dark: "{colors.brand.900}" },
56
- },
57
- muted: {
58
- value: { base: "{colors.gray.100}", _dark: "{colors.brand.800}" },
59
- },
60
- },
61
- text: {
62
- default: {
63
- value: { base: "{colors.gray.900}", _dark: "{colors.white}" },
64
- },
65
- muted: {
66
- value: { base: "{colors.gray.500}", _dark: "{colors.gray.400}" },
67
- },
68
- brand: {
69
- value: { base: "{colors.brand.600}", _dark: "{colors.brand.400}" },
70
- },
71
- },
72
- accent: {
73
- default: {
74
- value: { base: "{colors.brand.500}", _dark: "{colors.brand.500}" },
75
- },
76
- emphasis: {
77
- value: { base: "{colors.brand.600}", _dark: "{colors.brand.400}" },
78
- },
79
- fg: {
80
- value: { base: "{colors.white}", _dark: "{colors.white}" },
81
- },
82
- },
83
- border: {
84
- default: {
85
- value: { base: "{colors.gray.200}", _dark: "{colors.brand.800}" },
86
- },
87
- },
88
- },
89
- },
90
- },
91
- },
92
- // The output directory for your css system
93
- outdir: "styled-system",
94
- });
95
- //# sourceMappingURL=panda.config.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"panda.config.js","sourceRoot":"","sources":["../../../tests/framework-init-test/panda.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,eAAe,YAAY,CAAC;IACxB,2BAA2B;IAC3B,SAAS,EAAE,IAAI;IAEf,0CAA0C;IAC1C,OAAO,EAAE;QACL,4BAA4B;QAC5B,8BAA8B;QAC9B,6BAA6B;QAC7B,kEAAkE;QAClE,wCAAwC;QACxC,gCAAgC;KACnC;IAED,mBAAmB;IACnB,OAAO,EAAE,EAAE;IAEX,4CAA4C;IAC5C,UAAU,EAAE;QACR,MAAM,EAAE;YACJ,IAAI,EAAE,gCAAgC;YACtC,KAAK,EAAE,kCAAkC;SAC5C;KACJ;IAED,sBAAsB;IACtB,KAAK,EAAE;QACH,MAAM,EAAE;YACJ,gCAAgC;YAChC,MAAM,EAAE;gBACJ,MAAM,EAAE;oBACJ,KAAK,EAAE;wBACH,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE;wBACxB,G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AAI,EAAE,oBAAoB,EAAE,KAAK,EAAE,oBAAoB,EAAE;yBACrE;qBACJ;oBACD,MAAM,EAAE;wBACJ,OAAO,EAAE;4BACL,KAAK,EAAE,EAAE,IAAI,EAAE,oBAAoB,EAAE,KAAK,EAAE,oBAAoB,EAAE;yBACrE;wBACD,QAAQ,EAAE;4BACN,KAAK,EAAE,EAAE,IAAI,EAAE,oBAAoB,EAAE,KAAK,EAAE,oBAAoB,EAAE;yBACrE;wBACD,EAAE,EAAE;4BACA,KAAK,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,gBAAgB,EAAE;yBAC7D;qBACJ;oBACD,MAAM,EAAE;wBACJ,OAAO,EAAE;4BACL,KAAK,EAAE,EAAE,IAAI,EAAE,mBAAmB,EAAE,KAAK,EAAE,oBAAoB,EAAE;yBACpE;qBACJ;iBACJ;aACJ;SACJ;KACJ;IAED,2CAA2C;IAC3C,MAAM,EAAE,eAAe;CAC1B,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- declare const _default: import("vite").UserConfig;
2
- export default _default;
@@ -1,19 +0,0 @@
1
- import { defineConfig } from "vitest/config";
2
- export default defineConfig({
3
- test: {
4
- globals: true,
5
- environment: "node",
6
- include: ["tests/**/*.test.ts", "apps/**/*.test.ts"],
7
- coverage: {
8
- provider: "v8",
9
- reporter: ["text", "json", "html"],
10
- thresholds: {
11
- lines: 80,
12
- functions: 80,
13
- branches: 80,
14
- statements: 80,
15
- },
16
- },
17
- },
18
- });
19
- //# sourceMappingURL=vitest.config.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"vitest.config.js","sourceRoot":"","sources":["../../../tests/framework-init-test/vitest.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,eAAe,YAAY,CAAC;IACxB,IAAI,EAAE;QACF,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,MAAM;QACnB,OAAO,EAAE,CAAC,oBAAoB,EAAE,mBAAmB,CAAC;QACpD,QAAQ,EAAE;YACN,QAAQ,EAAE,IAAI;YACd,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;YAClC,UAAU,EAAE;gBACR,KAAK,EAAE,EAAE;gBACT,SAAS,EAAE,EAAE;gBACb,QAAQ,EAAE,EAAE;gBACZ,UAAU,EAAE,EAAE;aACjB;SACJ;KACJ;CACJ,CAAC,CAAC"}