agent-nuvira 1.30.0 → 1.31.0
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 +11 -1
- package/dist/editing/edit.d.ts +24 -11
- package/dist/editing/edit.d.ts.map +1 -1
- package/dist/editing/edit.js +184 -114
- package/dist/editing/edit.js.map +1 -1
- package/dist/editing/transform.d.ts +97 -0
- package/dist/editing/transform.d.ts.map +1 -0
- package/dist/editing/transform.js +312 -0
- package/dist/editing/transform.js.map +1 -0
- package/dist/editing/ts-adapter.d.ts +70 -0
- package/dist/editing/ts-adapter.d.ts.map +1 -0
- package/dist/editing/ts-adapter.js +367 -0
- package/dist/editing/ts-adapter.js.map +1 -0
- package/dist/test.d.ts +2 -0
- package/dist/test.d.ts.map +1 -0
- package/dist/test.js +3 -0
- package/dist/test.js.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1337,7 +1337,7 @@ npx tsc --noEmit
|
|
|
1337
1337
|
|
|
1338
1338
|
## Roadmap
|
|
1339
1339
|
|
|
1340
|
-
**Phases 1–
|
|
1340
|
+
**Phases 1–11 are complete** — from Foundation (Phase 0) through TS Compiler API-Aware Structural Editing (Phase 11). See [UPGRADE_ROADMAP.md](./UPGRADE_ROADMAP.md) for the full implementation journey.
|
|
1341
1341
|
|
|
1342
1342
|
> 📊 **Architecture, strategy & contribution materials:** [ARCHITECTURE.md](./ARCHITECTURE.md) — Modular execution engine design with 7 module specifications, extensibility/observability systems, and phased migration plan. [ARCHITECTURE_DIAGRAMS.md](./ARCHITECTURE_DIAGRAMS.md) — Mermaid-rendered versions of all architecture diagrams (Module Architecture, Extensibility, Safe Execution, Data Flow, Observability Bus). [PRODUCT_STRATEGY.md](./PRODUCT_STRATEGY.md) — Competitive landscape, positioning map, OKR framework, and risk register. [PITCH_DECK.md](./PITCH_DECK.md) — 10-slide investor presentation outline with talking points and data. [CONTRIBUTING.md](./CONTRIBUTING.md) — Quick-reference contributor guide with docs map, dev setup, and contribution workflow.
|
|
1343
1343
|
|
|
@@ -1401,6 +1401,11 @@ npx tsc --noEmit
|
|
|
1401
1401
|
| 10.2 | PhaseExecutionEngine — multi-goal project scopes with save/resume across restarts | ✅ Complete (v1.29.0) |
|
|
1402
1402
|
| 10.3 | `buff publish` — 5-phase pipeline: tests → version → git → npm → GitHub release | ✅ Complete (v1.29.0) |
|
|
1403
1403
|
| 10.4 | `buff phase` — create/execute/resume/status/list scopes with credential management | ✅ Complete (v1.29.0) |
|
|
1404
|
+
| **Phase 11: TS Compiler API-Aware Structural Editing** | | |
|
|
1405
|
+
| 11.1 | TS Compiler API Wrapper (`ts-adapter.ts`) — parse, find nodes, validate syntax via real TS parser | ✅ Complete (v1.31.0) |
|
|
1406
|
+
| 11.2 | Structural Transformations (`transform.ts`) — rename, extract, inline, add param, change signature | ✅ Complete (v1.31.0) |
|
|
1407
|
+
| 11.3 | Two-Tier Editing Engine (`edit.ts` rewrite) — TS API-first, regex fallback for all 7 operations | ✅ Complete (v1.31.0) |
|
|
1408
|
+
| 11.4 | Phase 11 Tests — 66 tests (40 ts-adapter + 26 transform), all passing | ✅ Complete (v1.31.0) |
|
|
1404
1409
|
|
|
1405
1410
|
---
|
|
1406
1411
|
|
|
@@ -1436,6 +1441,8 @@ npx tsc --noEmit
|
|
|
1436
1441
|
| **v1.26.0** | Aug 2026 | Phase 9 — SafeExecutionLayer module (file validation, Docker sandbox, safe LLM calls) + 32 new tests (23 SafeExec + 9 Verify Bus) |
|
|
1437
1442
|
| **v1.27.0** | Aug 2026 | Website + SVG — Phase 9 SafeExecutionLayer, phase progress 9/9, 2,207 tests |
|
|
1438
1443
|
| **v1.29.0** | Sep 2026 | Phase 10 — Autonomous publish + phase-wise execution (CredentialStore, PhaseEngine, `buff publish`, `buff phase`, git push, npm auth) + 86 new tests |
|
|
1444
|
+
| **v1.30.0** | Sep 2026 | Phase 10 tests + docs — 80 unit tests (CredentialStore + PhaseExecutionEngine), README/Product_Guide/website updated with Phase 10 progress |
|
|
1445
|
+
| **v1.31.0** | Sep 2026 | Phase 11 — TS Compiler API-Aware Structural Editing (ts-adapter.ts, transform.ts, edit.ts rewrite, 66 new tests), proper parser-level accuracy for TS/JS edits |
|
|
1439
1446
|
|
|
1440
1447
|
---
|
|
1441
1448
|
|
|
@@ -1530,6 +1537,9 @@ npx tsc --noEmit
|
|
|
1530
1537
|
| **PhaseExecutionEngine (Phase 10)** | Multi-goal project scope execution — sequential phase execution with save/resume across restarts, credential management, progress tracking |
|
|
1531
1538
|
| **`buff publish` (Phase 10)** | Autonomous 5-phase publish pipeline — test verification → version bump → git commit/tag/push → npm build/publish → GitHub release |
|
|
1532
1539
|
| **`buff phase` (Phase 10)** | Phase-wise project execution CLI — create/execute/resume/status/list/delete scopes with interactive pauses and credential collection |
|
|
1540
|
+
| **TS Compiler API Wrapper (Phase 11)** | Proper TypeScript Compiler API integration — parser-level accuracy with parseSourceFile, findStructuralNodes, validateTSSyntax, replaceNodeText, and insertAt |
|
|
1541
|
+
| **Structural Transformations (Phase 11)** | Real code transformations — renameSymbol, extractFunction, inlineFunction, addParameter, changeSignature with NLP-based detection |
|
|
1542
|
+
| **Two-Tier Editing Engine (Phase 11)** | All 7 edit operations try TS Compiler API first (for TS/JS), fall back to regex (for Python/Go/Rust) — AST-aware `tryFindNodeTS()` helper |
|
|
1533
1543
|
|
|
1534
1544
|
### Agent Catalog — 15 Agent Roles & Management
|
|
1535
1545
|
| Agent/Component | Type | Description |
|
package/dist/editing/edit.d.ts
CHANGED
|
@@ -7,20 +7,25 @@
|
|
|
7
7
|
* - Add import statement
|
|
8
8
|
* - Intelligent code formatting with structural awareness
|
|
9
9
|
*
|
|
10
|
-
*
|
|
10
|
+
* Uses TS Compiler API for TypeScript/JavaScript files (primary tier)
|
|
11
|
+
* with regex-based fallback for other languages.
|
|
12
|
+
*
|
|
13
|
+
* @see ARCHITECTURE.md §4.2 — Phase 11: TS Compiler API integration
|
|
11
14
|
*/
|
|
12
15
|
import { type ASTEdit, type EditResult, type SupportedLanguage } from './types.js';
|
|
13
|
-
import { analyzeStructure, findNodeByName, validateSyntax } from './ast.js';
|
|
16
|
+
import { analyzeStructure, findNodeByName as findNodeByNameRegex, validateSyntax } from './ast.js';
|
|
14
17
|
import { formatEditSummary } from './diff.js';
|
|
18
|
+
import { renameSymbol, extractFunction, inlineFunction, addParameter, changeSignature } from './transform.js';
|
|
15
19
|
/**
|
|
16
20
|
* Replace the body of a function/method while preserving its signature.
|
|
17
|
-
*
|
|
21
|
+
* Uses TS Compiler API for TypeScript/JavaScript files, falls back to regex.
|
|
18
22
|
*/
|
|
19
|
-
export declare function replaceFunctionBody(code: string, functionName: string, newBody: string, language?: SupportedLanguage): EditResult;
|
|
23
|
+
export declare function replaceFunctionBody(code: string, functionName: string, newBody: string, language?: SupportedLanguage, filePath?: string): EditResult;
|
|
20
24
|
/**
|
|
21
25
|
* Add a method to a class.
|
|
26
|
+
* Uses TS Compiler API for TypeScript/JavaScript files, falls back to regex.
|
|
22
27
|
*/
|
|
23
|
-
export declare function addMethodToClass(code: string, className: string, methodCode: string, language?: SupportedLanguage): EditResult;
|
|
28
|
+
export declare function addMethodToClass(code: string, className: string, methodCode: string, language?: SupportedLanguage, filePath?: string): EditResult;
|
|
24
29
|
/**
|
|
25
30
|
* Add an import statement.
|
|
26
31
|
* Automatically deduplicates existing imports.
|
|
@@ -28,28 +33,36 @@ export declare function addMethodToClass(code: string, className: string, method
|
|
|
28
33
|
export declare function addImport(code: string, importStatement: string, language?: SupportedLanguage): EditResult;
|
|
29
34
|
/**
|
|
30
35
|
* Insert code before a specific structural element.
|
|
36
|
+
* Uses TS Compiler API for TS/JS files, falls back to regex.
|
|
31
37
|
*/
|
|
32
|
-
export declare function insertBefore(code: string, targetName: string, newCode: string, language?: SupportedLanguage): EditResult;
|
|
38
|
+
export declare function insertBefore(code: string, targetName: string, newCode: string, language?: SupportedLanguage, filePath?: string): EditResult;
|
|
33
39
|
/**
|
|
34
40
|
* Insert code after a specific structural element.
|
|
41
|
+
* Uses TS Compiler API for TS/JS files, falls back to regex.
|
|
35
42
|
*/
|
|
36
|
-
export declare function insertAfter(code: string, targetName: string, newCode: string, language?: SupportedLanguage): EditResult;
|
|
43
|
+
export declare function insertAfter(code: string, targetName: string, newCode: string, language?: SupportedLanguage, filePath?: string): EditResult;
|
|
37
44
|
/**
|
|
38
45
|
* Delete a structural node from the code.
|
|
46
|
+
* Uses TS Compiler API for TS/JS files, falls back to regex.
|
|
39
47
|
*/
|
|
40
|
-
export declare function deleteNode(code: string, targetName: string, language?: SupportedLanguage): EditResult;
|
|
48
|
+
export declare function deleteNode(code: string, targetName: string, language?: SupportedLanguage, filePath?: string): EditResult;
|
|
41
49
|
/**
|
|
42
50
|
* Perform an intelligent edit based on the edit type.
|
|
43
51
|
* Automatically detects language and finds structural targets.
|
|
52
|
+
* Uses TS Compiler API for TS/JS files, falls back to regex.
|
|
44
53
|
*
|
|
45
54
|
* This is the primary entry point for the WriterAgent integration.
|
|
46
55
|
*/
|
|
47
56
|
export declare function performEdit(code: string, edit: ASTEdit): EditResult;
|
|
48
57
|
/**
|
|
49
58
|
* Build a structural context description for the LLM.
|
|
50
|
-
*
|
|
51
|
-
*
|
|
59
|
+
* Uses TS Compiler API for TypeScript/JavaScript files for richer, more precise
|
|
60
|
+
* structural context. Falls back to regex-based analysis for other languages.
|
|
52
61
|
*/
|
|
53
62
|
export declare function buildStructuralContext(code: string, filePath: string): string;
|
|
54
|
-
|
|
63
|
+
/**
|
|
64
|
+
* Validate syntax with TS Compiler API for TS/JS, regex fallback for others.
|
|
65
|
+
*/
|
|
66
|
+
export declare function validateCodeSyntax(code: string, filePath: string): boolean;
|
|
67
|
+
export { analyzeStructure, findNodeByNameRegex as findNodeByName, validateSyntax, formatEditSummary, renameSymbol, extractFunction, inlineFunction, addParameter, changeSignature, };
|
|
55
68
|
//# sourceMappingURL=edit.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../src/editing/edit.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../src/editing/edit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,UAAU,EACf,KAAK,iBAAiB,EAGvB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,gBAAgB,EAChB,cAAc,IAAI,mBAAmB,EACrC,cAAc,EACf,MAAM,UAAU,CAAC;AAClB,OAAO,EAAc,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAQ1D,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAoC9G;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,MAAM,EACf,QAAQ,CAAC,EAAE,iBAAiB,EAC5B,QAAQ,CAAC,EAAE,MAAM,GAChB,UAAU,CA0CZ;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,QAAQ,CAAC,EAAE,iBAAiB,EAC5B,QAAQ,CAAC,EAAE,MAAM,GAChB,UAAU,CAgCZ;AAED;;;GAGG;AACH,wBAAgB,SAAS,CACvB,IAAI,EAAE,MAAM,EACZ,eAAe,EAAE,MAAM,EACvB,QAAQ,CAAC,EAAE,iBAAiB,GAC3B,UAAU,CAeZ;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,EACf,QAAQ,CAAC,EAAE,iBAAiB,EAC5B,QAAQ,CAAC,EAAE,MAAM,GAChB,UAAU,CAwBZ;AAED;;;GAGG;AACH,wBAAgB,WAAW,CACzB,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,EACf,QAAQ,CAAC,EAAE,iBAAiB,EAC5B,QAAQ,CAAC,EAAE,MAAM,GAChB,UAAU,CAwBZ;AAED;;;GAGG;AACH,wBAAgB,UAAU,CACxB,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,EAClB,QAAQ,CAAC,EAAE,iBAAiB,EAC5B,QAAQ,CAAC,EAAE,MAAM,GAChB,UAAU,CAwBZ;AAID;;;;;;GAMG;AACH,wBAAgB,WAAW,CACzB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,OAAO,GACZ,UAAU,CAoCZ;AAID;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,GACf,MAAM,CAoCR;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAM1E;AAID,OAAO,EACL,gBAAgB,EAChB,mBAAmB,IAAI,cAAc,EACrC,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,eAAe,EACf,cAAc,EACd,YAAY,EACZ,eAAe,GAChB,CAAC"}
|
package/dist/editing/edit.js
CHANGED
|
@@ -7,75 +7,115 @@
|
|
|
7
7
|
* - Add import statement
|
|
8
8
|
* - Intelligent code formatting with structural awareness
|
|
9
9
|
*
|
|
10
|
-
*
|
|
10
|
+
* Uses TS Compiler API for TypeScript/JavaScript files (primary tier)
|
|
11
|
+
* with regex-based fallback for other languages.
|
|
12
|
+
*
|
|
13
|
+
* @see ARCHITECTURE.md §4.2 — Phase 11: TS Compiler API integration
|
|
11
14
|
*/
|
|
12
15
|
import { detectLanguage, } from './types.js';
|
|
13
|
-
import { analyzeStructure, findNodeByName, validateSyntax, } from './ast.js';
|
|
16
|
+
import { analyzeStructure, findNodeByName as findNodeByNameRegex, validateSyntax, } from './ast.js';
|
|
14
17
|
import { applyEdits, formatEditSummary } from './diff.js';
|
|
18
|
+
import { findStructuralNodes as findNodesTS, findNodeByName as findNodeByNameTS, validateTSSyntax, nodeToRange, getBodyRange, } from './ts-adapter.js';
|
|
19
|
+
import { renameSymbol, extractFunction, inlineFunction, addParameter, changeSignature } from './transform.js';
|
|
15
20
|
// ─── High-Level Operations ──────────────────────────────────────────────────
|
|
21
|
+
/**
|
|
22
|
+
* Try to find a structural node using the TS Compiler API.
|
|
23
|
+
* Returns a StructuralNode if found, null otherwise.
|
|
24
|
+
*/
|
|
25
|
+
function tryFindNodeTS(code, filePath, name, type = 'function', language) {
|
|
26
|
+
if (language !== 'typescript' && language !== 'javascript')
|
|
27
|
+
return null;
|
|
28
|
+
if (!filePath)
|
|
29
|
+
return null;
|
|
30
|
+
const tsResult = findNodeByNameTS(code, filePath, name);
|
|
31
|
+
if (!tsResult)
|
|
32
|
+
return null;
|
|
33
|
+
const { node, sourceFile } = tsResult;
|
|
34
|
+
const range = nodeToRange(node, sourceFile);
|
|
35
|
+
const bodyRange = getBodyRange(node, sourceFile);
|
|
36
|
+
return {
|
|
37
|
+
type,
|
|
38
|
+
name,
|
|
39
|
+
range,
|
|
40
|
+
bodyRange,
|
|
41
|
+
depth: 0,
|
|
42
|
+
children: [],
|
|
43
|
+
language,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
16
46
|
/**
|
|
17
47
|
* Replace the body of a function/method while preserving its signature.
|
|
18
|
-
*
|
|
48
|
+
* Uses TS Compiler API for TypeScript/JavaScript files, falls back to regex.
|
|
19
49
|
*/
|
|
20
|
-
export function replaceFunctionBody(code, functionName, newBody, language) {
|
|
21
|
-
const lang = language || detectLanguage('');
|
|
50
|
+
export function replaceFunctionBody(code, functionName, newBody, language, filePath) {
|
|
51
|
+
const lang = language || detectLanguage(filePath || '');
|
|
52
|
+
const resolvedPath = filePath || `file.${lang === 'typescript' ? 'ts' : lang === 'javascript' ? 'js' : 'ts'}`;
|
|
53
|
+
// Try TS Compiler API first for TS/JS files
|
|
54
|
+
const tsTarget = tryFindNodeTS(code, resolvedPath, functionName, 'function', lang);
|
|
55
|
+
if (tsTarget) {
|
|
56
|
+
if (!tsTarget.bodyRange) {
|
|
57
|
+
// Abstract declaration — replace entire node
|
|
58
|
+
return applyEdits(code, [{
|
|
59
|
+
type: 'replace-node', filePath: '', targetNode: tsTarget, language: lang,
|
|
60
|
+
newCode: newBody, description: `Replace function ${functionName}`, priority: 1,
|
|
61
|
+
}]);
|
|
62
|
+
}
|
|
63
|
+
return applyEdits(code, [{
|
|
64
|
+
type: 'replace-body', filePath: '', targetNode: tsTarget, language: lang,
|
|
65
|
+
newCode: newBody, description: `Replace body of ${functionName}`, priority: 1,
|
|
66
|
+
}]);
|
|
67
|
+
}
|
|
68
|
+
// Fallback to regex-based analysis
|
|
22
69
|
const nodes = analyzeStructure(code, lang);
|
|
23
|
-
const target =
|
|
70
|
+
const target = findNodeByNameRegex(nodes, functionName);
|
|
24
71
|
if (!target) {
|
|
25
72
|
return {
|
|
26
|
-
success: false,
|
|
27
|
-
conflicts: [],
|
|
28
|
-
appliedCount: 0,
|
|
29
|
-
totalEdits: 1,
|
|
73
|
+
success: false, conflicts: [], appliedCount: 0, totalEdits: 1,
|
|
30
74
|
error: `Function "${functionName}" not found in the code`,
|
|
31
75
|
};
|
|
32
76
|
}
|
|
33
|
-
if (!target
|
|
34
|
-
// Function has no body (abstract declaration, interface) — replace entire node
|
|
77
|
+
if (!target.bodyRange) {
|
|
35
78
|
return applyEdits(code, [{
|
|
36
|
-
type: 'replace-node',
|
|
37
|
-
|
|
38
|
-
targetNode: target,
|
|
39
|
-
language: lang,
|
|
40
|
-
newCode: newBody,
|
|
41
|
-
description: `Replace function ${functionName}`,
|
|
42
|
-
priority: 1,
|
|
79
|
+
type: 'replace-node', filePath: '', targetNode: target, language: lang,
|
|
80
|
+
newCode: newBody, description: `Replace function ${functionName}`, priority: 1,
|
|
43
81
|
}]);
|
|
44
82
|
}
|
|
45
83
|
return applyEdits(code, [{
|
|
46
|
-
type: 'replace-body',
|
|
47
|
-
|
|
48
|
-
targetNode: target,
|
|
49
|
-
language: lang,
|
|
50
|
-
newCode: newBody,
|
|
51
|
-
description: `Replace body of ${functionName}`,
|
|
52
|
-
priority: 1,
|
|
84
|
+
type: 'replace-body', filePath: '', targetNode: target, language: lang,
|
|
85
|
+
newCode: newBody, description: `Replace body of ${functionName}`, priority: 1,
|
|
53
86
|
}]);
|
|
54
87
|
}
|
|
55
88
|
/**
|
|
56
89
|
* Add a method to a class.
|
|
90
|
+
* Uses TS Compiler API for TypeScript/JavaScript files, falls back to regex.
|
|
57
91
|
*/
|
|
58
|
-
export function addMethodToClass(code, className, methodCode, language) {
|
|
59
|
-
const lang = language || detectLanguage('');
|
|
60
|
-
const
|
|
61
|
-
|
|
92
|
+
export function addMethodToClass(code, className, methodCode, language, filePath) {
|
|
93
|
+
const lang = language || detectLanguage(filePath || '');
|
|
94
|
+
const resolvedPath = filePath || `file.${lang === 'typescript' ? 'ts' : lang === 'javascript' ? 'js' : 'ts'}`;
|
|
95
|
+
// Try TS Compiler API first
|
|
96
|
+
const tsTarget = tryFindNodeTS(code, resolvedPath, className, 'class', lang);
|
|
97
|
+
if (tsTarget) {
|
|
98
|
+
if (!tsTarget.bodyRange) {
|
|
99
|
+
return { success: false, conflicts: [], appliedCount: 0, totalEdits: 1, error: `Class "${className}" has no body` };
|
|
100
|
+
}
|
|
101
|
+
return applyEdits(code, [{
|
|
102
|
+
type: 'insert-child', filePath: '', targetNode: tsTarget, language: lang,
|
|
103
|
+
newCode: methodCode, description: `Add method to ${className}`, priority: 1,
|
|
104
|
+
}]);
|
|
105
|
+
}
|
|
106
|
+
// Fallback to regex-based analysis
|
|
107
|
+
const lang2 = language || detectLanguage('');
|
|
108
|
+
const nodes = analyzeStructure(code, lang2);
|
|
109
|
+
const target = findNodeByNameRegex(nodes, className, 'class');
|
|
62
110
|
if (!target) {
|
|
63
111
|
return {
|
|
64
|
-
success: false,
|
|
65
|
-
conflicts: [],
|
|
66
|
-
appliedCount: 0,
|
|
67
|
-
totalEdits: 1,
|
|
112
|
+
success: false, conflicts: [], appliedCount: 0, totalEdits: 1,
|
|
68
113
|
error: `Class "${className}" not found`,
|
|
69
114
|
};
|
|
70
115
|
}
|
|
71
116
|
return applyEdits(code, [{
|
|
72
|
-
type: 'insert-child',
|
|
73
|
-
|
|
74
|
-
targetNode: target,
|
|
75
|
-
language: lang,
|
|
76
|
-
newCode: methodCode,
|
|
77
|
-
description: `Add method to ${className}`,
|
|
78
|
-
priority: 1,
|
|
117
|
+
type: 'insert-child', filePath: '', targetNode: target, language: lang2,
|
|
118
|
+
newCode: methodCode, description: `Add method to ${className}`, priority: 1,
|
|
79
119
|
}]);
|
|
80
120
|
}
|
|
81
121
|
/**
|
|
@@ -88,103 +128,100 @@ export function addImport(code, importStatement, language) {
|
|
|
88
128
|
const normalized = importStatement.trim();
|
|
89
129
|
if (code.includes(normalized)) {
|
|
90
130
|
return {
|
|
91
|
-
success: true,
|
|
92
|
-
code,
|
|
93
|
-
conflicts: [],
|
|
94
|
-
appliedCount: 0,
|
|
95
|
-
totalEdits: 1,
|
|
131
|
+
success: true, code, conflicts: [], appliedCount: 0, totalEdits: 1,
|
|
96
132
|
};
|
|
97
133
|
}
|
|
98
134
|
return applyEdits(code, [{
|
|
99
|
-
type: 'add-import',
|
|
100
|
-
|
|
101
|
-
language: lang,
|
|
102
|
-
newCode: normalized,
|
|
103
|
-
description: `Add import: ${normalized.slice(0, 60)}`,
|
|
104
|
-
priority: 2,
|
|
135
|
+
type: 'add-import', filePath: '', language: lang, newCode: normalized,
|
|
136
|
+
description: `Add import: ${normalized.slice(0, 60)}`, priority: 2,
|
|
105
137
|
}]);
|
|
106
138
|
}
|
|
107
139
|
/**
|
|
108
140
|
* Insert code before a specific structural element.
|
|
141
|
+
* Uses TS Compiler API for TS/JS files, falls back to regex.
|
|
109
142
|
*/
|
|
110
|
-
export function insertBefore(code, targetName, newCode, language) {
|
|
111
|
-
const lang = language || detectLanguage('');
|
|
112
|
-
const
|
|
113
|
-
|
|
143
|
+
export function insertBefore(code, targetName, newCode, language, filePath) {
|
|
144
|
+
const lang = language || detectLanguage(filePath || '');
|
|
145
|
+
const resolvedPath = filePath || `file.${lang === 'typescript' ? 'ts' : lang === 'javascript' ? 'js' : 'ts'}`;
|
|
146
|
+
// Try TS Compiler API first
|
|
147
|
+
const tsTarget = tryFindNodeTS(code, resolvedPath, targetName, 'function', lang);
|
|
148
|
+
if (tsTarget) {
|
|
149
|
+
return applyEdits(code, [{
|
|
150
|
+
type: 'insert-before', filePath: '', targetNode: tsTarget, language: lang,
|
|
151
|
+
newCode, description: `Insert before ${targetName}`, priority: 1,
|
|
152
|
+
}]);
|
|
153
|
+
}
|
|
154
|
+
// Fallback to regex
|
|
155
|
+
const lang2 = language || detectLanguage('');
|
|
156
|
+
const nodes = analyzeStructure(code, lang2);
|
|
157
|
+
const target = findNodeByNameRegex(nodes, targetName);
|
|
114
158
|
if (!target) {
|
|
115
|
-
return {
|
|
116
|
-
success: false,
|
|
117
|
-
conflicts: [],
|
|
118
|
-
appliedCount: 0,
|
|
119
|
-
totalEdits: 1,
|
|
120
|
-
error: `Target "${targetName}" not found`,
|
|
121
|
-
};
|
|
159
|
+
return { success: false, conflicts: [], appliedCount: 0, totalEdits: 1, error: `Target "${targetName}" not found` };
|
|
122
160
|
}
|
|
123
161
|
return applyEdits(code, [{
|
|
124
|
-
type: 'insert-before',
|
|
125
|
-
|
|
126
|
-
targetNode: target,
|
|
127
|
-
language: lang,
|
|
128
|
-
newCode,
|
|
129
|
-
description: `Insert before ${targetName}`,
|
|
130
|
-
priority: 1,
|
|
162
|
+
type: 'insert-before', filePath: '', targetNode: target, language: lang2,
|
|
163
|
+
newCode, description: `Insert before ${targetName}`, priority: 1,
|
|
131
164
|
}]);
|
|
132
165
|
}
|
|
133
166
|
/**
|
|
134
167
|
* Insert code after a specific structural element.
|
|
168
|
+
* Uses TS Compiler API for TS/JS files, falls back to regex.
|
|
135
169
|
*/
|
|
136
|
-
export function insertAfter(code, targetName, newCode, language) {
|
|
137
|
-
const lang = language || detectLanguage('');
|
|
138
|
-
const
|
|
139
|
-
|
|
170
|
+
export function insertAfter(code, targetName, newCode, language, filePath) {
|
|
171
|
+
const lang = language || detectLanguage(filePath || '');
|
|
172
|
+
const resolvedPath = filePath || `file.${lang === 'typescript' ? 'ts' : lang === 'javascript' ? 'js' : 'ts'}`;
|
|
173
|
+
// Try TS Compiler API first
|
|
174
|
+
const tsTarget = tryFindNodeTS(code, resolvedPath, targetName, 'function', lang);
|
|
175
|
+
if (tsTarget) {
|
|
176
|
+
return applyEdits(code, [{
|
|
177
|
+
type: 'insert-after', filePath: '', targetNode: tsTarget, language: lang,
|
|
178
|
+
newCode, description: `Insert after ${targetName}`, priority: 1,
|
|
179
|
+
}]);
|
|
180
|
+
}
|
|
181
|
+
// Fallback to regex
|
|
182
|
+
const lang2 = language || detectLanguage('');
|
|
183
|
+
const nodes = analyzeStructure(code, lang2);
|
|
184
|
+
const target = findNodeByNameRegex(nodes, targetName);
|
|
140
185
|
if (!target) {
|
|
141
|
-
return {
|
|
142
|
-
success: false,
|
|
143
|
-
conflicts: [],
|
|
144
|
-
appliedCount: 0,
|
|
145
|
-
totalEdits: 1,
|
|
146
|
-
error: `Target "${targetName}" not found`,
|
|
147
|
-
};
|
|
186
|
+
return { success: false, conflicts: [], appliedCount: 0, totalEdits: 1, error: `Target "${targetName}" not found` };
|
|
148
187
|
}
|
|
149
188
|
return applyEdits(code, [{
|
|
150
|
-
type: 'insert-after',
|
|
151
|
-
|
|
152
|
-
targetNode: target,
|
|
153
|
-
language: lang,
|
|
154
|
-
newCode,
|
|
155
|
-
description: `Insert after ${targetName}`,
|
|
156
|
-
priority: 1,
|
|
189
|
+
type: 'insert-after', filePath: '', targetNode: target, language: lang2,
|
|
190
|
+
newCode, description: `Insert after ${targetName}`, priority: 1,
|
|
157
191
|
}]);
|
|
158
192
|
}
|
|
159
193
|
/**
|
|
160
194
|
* Delete a structural node from the code.
|
|
195
|
+
* Uses TS Compiler API for TS/JS files, falls back to regex.
|
|
161
196
|
*/
|
|
162
|
-
export function deleteNode(code, targetName, language) {
|
|
163
|
-
const lang = language || detectLanguage('');
|
|
164
|
-
const
|
|
165
|
-
|
|
197
|
+
export function deleteNode(code, targetName, language, filePath) {
|
|
198
|
+
const lang = language || detectLanguage(filePath || '');
|
|
199
|
+
const resolvedPath = filePath || `file.${lang === 'typescript' ? 'ts' : lang === 'javascript' ? 'js' : 'ts'}`;
|
|
200
|
+
// Try TS Compiler API first
|
|
201
|
+
const tsTarget = tryFindNodeTS(code, resolvedPath, targetName, 'function', lang);
|
|
202
|
+
if (tsTarget) {
|
|
203
|
+
return applyEdits(code, [{
|
|
204
|
+
type: 'delete-node', filePath: '', targetNode: tsTarget, language: lang,
|
|
205
|
+
description: `Delete ${targetName}`, priority: 1,
|
|
206
|
+
}]);
|
|
207
|
+
}
|
|
208
|
+
// Fallback to regex
|
|
209
|
+
const lang2 = language || detectLanguage('');
|
|
210
|
+
const nodes = analyzeStructure(code, lang2);
|
|
211
|
+
const target = findNodeByNameRegex(nodes, targetName);
|
|
166
212
|
if (!target) {
|
|
167
|
-
return {
|
|
168
|
-
success: false,
|
|
169
|
-
conflicts: [],
|
|
170
|
-
appliedCount: 0,
|
|
171
|
-
totalEdits: 1,
|
|
172
|
-
error: `Target "${targetName}" not found`,
|
|
173
|
-
};
|
|
213
|
+
return { success: false, conflicts: [], appliedCount: 0, totalEdits: 1, error: `Target "${targetName}" not found` };
|
|
174
214
|
}
|
|
175
215
|
return applyEdits(code, [{
|
|
176
|
-
type: 'delete-node',
|
|
177
|
-
|
|
178
|
-
targetNode: target,
|
|
179
|
-
language: lang,
|
|
180
|
-
description: `Delete ${targetName}`,
|
|
181
|
-
priority: 1,
|
|
216
|
+
type: 'delete-node', filePath: '', targetNode: target, language: lang2,
|
|
217
|
+
description: `Delete ${targetName}`, priority: 1,
|
|
182
218
|
}]);
|
|
183
219
|
}
|
|
184
220
|
// ─── Intelligent Edit ───────────────────────────────────────────────────────
|
|
185
221
|
/**
|
|
186
222
|
* Perform an intelligent edit based on the edit type.
|
|
187
223
|
* Automatically detects language and finds structural targets.
|
|
224
|
+
* Uses TS Compiler API for TS/JS files, falls back to regex.
|
|
188
225
|
*
|
|
189
226
|
* This is the primary entry point for the WriterAgent integration.
|
|
190
227
|
*/
|
|
@@ -203,10 +240,20 @@ export function performEdit(code, edit) {
|
|
|
203
240
|
}
|
|
204
241
|
// Find the target node if specified by name but not resolved
|
|
205
242
|
if (edit.targetNode?.name && !edit.targetNode.range) {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
243
|
+
// Try TS Compiler API first for TS/JS files
|
|
244
|
+
if ((lang === 'typescript' || lang === 'javascript') && edit.filePath) {
|
|
245
|
+
const tsTarget = tryFindNodeTS(code, edit.filePath, edit.targetNode.name, 'function', lang);
|
|
246
|
+
if (tsTarget) {
|
|
247
|
+
edit.targetNode = tsTarget;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
// Fallback to regex
|
|
251
|
+
if (!edit.targetNode.range) {
|
|
252
|
+
const nodes = analyzeStructure(code, lang);
|
|
253
|
+
const found = findNodeByNameRegex(nodes, edit.targetNode.name);
|
|
254
|
+
if (found) {
|
|
255
|
+
edit.targetNode = found;
|
|
256
|
+
}
|
|
210
257
|
}
|
|
211
258
|
}
|
|
212
259
|
return applyEdits(code, [edit]);
|
|
@@ -214,14 +261,27 @@ export function performEdit(code, edit) {
|
|
|
214
261
|
// ─── Structural Context Builder ─────────────────────────────────────────────
|
|
215
262
|
/**
|
|
216
263
|
* Build a structural context description for the LLM.
|
|
217
|
-
*
|
|
218
|
-
*
|
|
264
|
+
* Uses TS Compiler API for TypeScript/JavaScript files for richer, more precise
|
|
265
|
+
* structural context. Falls back to regex-based analysis for other languages.
|
|
219
266
|
*/
|
|
220
267
|
export function buildStructuralContext(code, filePath) {
|
|
221
268
|
const lang = detectLanguage(filePath);
|
|
222
269
|
if (lang === 'unknown')
|
|
223
270
|
return '';
|
|
224
|
-
|
|
271
|
+
let nodes;
|
|
272
|
+
// Try TS Compiler API first for better precision
|
|
273
|
+
if (lang === 'typescript' || lang === 'javascript') {
|
|
274
|
+
try {
|
|
275
|
+
const tsNodes = findNodesTS(code, filePath);
|
|
276
|
+
nodes = tsNodes.length > 0 ? tsNodes : analyzeStructure(code, lang);
|
|
277
|
+
}
|
|
278
|
+
catch {
|
|
279
|
+
nodes = analyzeStructure(code, lang);
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
else {
|
|
283
|
+
nodes = analyzeStructure(code, lang);
|
|
284
|
+
}
|
|
225
285
|
if (nodes.length === 0)
|
|
226
286
|
return '';
|
|
227
287
|
const lines = [];
|
|
@@ -232,12 +292,22 @@ export function buildStructuralContext(code, filePath) {
|
|
|
232
292
|
if (node.children.length > 0) {
|
|
233
293
|
for (const child of node.children) {
|
|
234
294
|
const childRange = `L${child.range.start.line}-L${child.range.end.line}`;
|
|
235
|
-
lines.push(`
|
|
295
|
+
lines.push(` ${child.type}: "${child.name}" [${childRange}]`);
|
|
236
296
|
}
|
|
237
297
|
}
|
|
238
298
|
}
|
|
239
299
|
return lines.join('\n');
|
|
240
300
|
}
|
|
301
|
+
/**
|
|
302
|
+
* Validate syntax with TS Compiler API for TS/JS, regex fallback for others.
|
|
303
|
+
*/
|
|
304
|
+
export function validateCodeSyntax(code, filePath) {
|
|
305
|
+
const lang = detectLanguage(filePath);
|
|
306
|
+
if (lang === 'typescript' || lang === 'javascript') {
|
|
307
|
+
return validateTSSyntax(code, filePath);
|
|
308
|
+
}
|
|
309
|
+
return validateSyntax(code, lang);
|
|
310
|
+
}
|
|
241
311
|
// ─── Export for convenience ─────────────────────────────────────────────────
|
|
242
|
-
export { analyzeStructure, findNodeByName, validateSyntax, formatEditSummary };
|
|
312
|
+
export { analyzeStructure, findNodeByNameRegex as findNodeByName, validateSyntax, formatEditSummary, renameSymbol, extractFunction, inlineFunction, addParameter, changeSignature, };
|
|
243
313
|
//# sourceMappingURL=edit.js.map
|
package/dist/editing/edit.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edit.js","sourceRoot":"","sources":["../../src/editing/edit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAKL,cAAc,GACf,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,cAAc,GACf,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAE1D,+EAA+E;AAE/E;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CACjC,IAAY,EACZ,YAAoB,EACpB,OAAe,EACf,QAA4B;IAE5B,MAAM,IAAI,GAAG,QAAQ,IAAI,cAAc,CAAC,EAAE,CAAC,CAAC;IAC5C,MAAM,KAAK,GAAG,gBAAgB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC3C,MAAM,MAAM,GAAG,cAAc,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;IAEnD,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO;YACL,OAAO,EAAE,KAAK;YACd,SAAS,EAAE,EAAE;YACb,YAAY,EAAE,CAAC;YACf,UAAU,EAAE,CAAC;YACb,KAAK,EAAE,aAAa,YAAY,yBAAyB;SAC1D,CAAC;IACJ,CAAC;IAED,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC;QACvB,+EAA+E;QAC/E,OAAO,UAAU,CAAC,IAAI,EAAE,CAAC;gBACvB,IAAI,EAAE,cAAc;gBACpB,QAAQ,EAAE,EAAE;gBACZ,UAAU,EAAE,MAAM;gBAClB,QAAQ,EAAE,IAAI;gBACd,OAAO,EAAE,OAAO;gBAChB,WAAW,EAAE,oBAAoB,YAAY,EAAE;gBAC/C,QAAQ,EA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