@ebowwa/coder-native 0.1.0 → 0.2.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/index.d.ts +135 -35
- package/index.darwin-arm64.node +0 -0
- package/index.js +1 -1
- package/package.json +5 -5
package/index.d.ts
CHANGED
|
@@ -1,50 +1,150 @@
|
|
|
1
|
-
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
/* auto-generated by NAPI-RS */
|
|
5
|
+
|
|
6
|
+
export interface GrepMatch {
|
|
7
|
+
path: string
|
|
8
|
+
line: number
|
|
9
|
+
column: number
|
|
10
|
+
content: string
|
|
11
|
+
contextBefore: Array<string>
|
|
12
|
+
contextAfter: Array<string>
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface GrepOptions {
|
|
16
|
+
caseSensitive?: boolean
|
|
17
|
+
caseInsensitive?: boolean
|
|
18
|
+
contextLines?: number
|
|
19
|
+
maxResults?: number
|
|
20
|
+
includePatterns: Array<string>
|
|
21
|
+
excludePatterns: Array<string>
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface GrepResult {
|
|
25
|
+
matches: Array<GrepMatch>
|
|
26
|
+
totalCount: number
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface HashResult {
|
|
30
|
+
hash: string
|
|
31
|
+
algorithm: string
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface HighlightResult {
|
|
35
|
+
html: string
|
|
36
|
+
theme: string
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface HighlightDiffResult {
|
|
40
|
+
/** ANSI-colored diff output */
|
|
41
|
+
output: string
|
|
42
|
+
/** Number of added lines */
|
|
43
|
+
additions: number
|
|
44
|
+
/** Number of deleted lines */
|
|
45
|
+
deletions: number
|
|
46
|
+
/** Number of hunks */
|
|
47
|
+
hunks: number
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface DiffOptions {
|
|
51
|
+
/** File path to display in header */
|
|
52
|
+
filePath?: string
|
|
53
|
+
/** Number of context lines around changes */
|
|
54
|
+
contextLines?: number
|
|
8
55
|
}
|
|
9
56
|
|
|
10
|
-
export interface
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
57
|
+
export interface StructureItem {
|
|
58
|
+
kind: string
|
|
59
|
+
name: string
|
|
60
|
+
line: number
|
|
61
|
+
column: number
|
|
62
|
+
endLine?: number
|
|
63
|
+
endColumn?: number
|
|
64
|
+
children: Array<StructureItem>
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export interface StructureOptions {
|
|
68
|
+
includeComments?: boolean
|
|
69
|
+
maxDepth?: number
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export interface StructureResult {
|
|
73
|
+
items: Array<StructureItem>
|
|
74
|
+
language: string
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export interface ToolPair {
|
|
78
|
+
tool1: string
|
|
79
|
+
tool2: string
|
|
80
|
+
target1: string
|
|
81
|
+
target2: string
|
|
82
|
+
similarity: number
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export interface ToolPairsResult {
|
|
86
|
+
pairs: Array<ToolPair>
|
|
87
|
+
totalCalls: number
|
|
14
88
|
}
|
|
15
89
|
|
|
16
90
|
export interface DiffHunk {
|
|
17
|
-
oldStart: number
|
|
18
|
-
oldLines: number
|
|
19
|
-
newStart: number
|
|
20
|
-
newLines: number
|
|
21
|
-
content: string
|
|
91
|
+
oldStart: number
|
|
92
|
+
oldLines: number
|
|
93
|
+
newStart: number
|
|
94
|
+
newLines: number
|
|
95
|
+
content: string
|
|
22
96
|
}
|
|
23
97
|
|
|
24
|
-
export interface
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
98
|
+
export interface PatternResult {
|
|
99
|
+
tools: Array<string>
|
|
100
|
+
support: number
|
|
101
|
+
confidence: number
|
|
28
102
|
}
|
|
29
103
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
104
|
+
export interface ToolCountEntry {
|
|
105
|
+
toolName: string
|
|
106
|
+
count: number
|
|
107
|
+
}
|
|
33
108
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
109
|
+
export interface ContextStatsResult {
|
|
110
|
+
totalTokens: number
|
|
111
|
+
userTokens: number
|
|
112
|
+
assistantTokens: number
|
|
113
|
+
toolResultTokens: number
|
|
114
|
+
messageCount: number
|
|
115
|
+
}
|
|
37
116
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
117
|
+
export interface MultiEditEntry {
|
|
118
|
+
filePath: string
|
|
119
|
+
oldText: string
|
|
120
|
+
newText: string
|
|
121
|
+
}
|
|
41
122
|
|
|
42
|
-
|
|
43
|
-
|
|
123
|
+
export interface MultiEditPreviewEntry {
|
|
124
|
+
filePath: string
|
|
125
|
+
diff: string
|
|
126
|
+
additions: number
|
|
127
|
+
deletions: number
|
|
128
|
+
}
|
|
44
129
|
|
|
45
|
-
export interface
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
filePattern?: string;
|
|
130
|
+
export interface MultiEditResult {
|
|
131
|
+
success: boolean
|
|
132
|
+
errors: Array<string>
|
|
133
|
+
modifiedFiles: Array<string>
|
|
50
134
|
}
|
|
135
|
+
|
|
136
|
+
export function analyzePatterns(messages: Array<string>, minSupport?: number): Array<PatternResult>
|
|
137
|
+
export function countToolUsesNative(messages: Array<string>): Array<ToolCountEntry>
|
|
138
|
+
export function calculateContextStats(messages: Array<string>): ContextStatsResult
|
|
139
|
+
export function grepSearch(pattern: string, path: string, options?: GrepOptions): Promise<GrepResult>
|
|
140
|
+
export function calculateHash(content: string, algorithm?: string): HashResult
|
|
141
|
+
export function countTokens(text: string): number
|
|
142
|
+
export function highlightCode(code: string, language: string): HighlightResult
|
|
143
|
+
export function highlightMarkdown(markdown: string): HighlightResult
|
|
144
|
+
export function analyzeStructure(filePath: string, content: string): StructureResult
|
|
145
|
+
export function findToolPairs(logs: Array<string>, threshold?: number): ToolPairsResult
|
|
146
|
+
export function highlightDiff(oldText: string, newText: string, options?: DiffOptions): HighlightDiffResult
|
|
147
|
+
export function calculateDiff(oldText: string, newText: string): Array<DiffHunk>
|
|
148
|
+
export function validateMultiEdits(edits: Array<MultiEditEntry>): Array<string>
|
|
149
|
+
export function previewMultiEdits(edits: Array<MultiEditEntry>): Array<MultiEditPreviewEntry>
|
|
150
|
+
export function applyMultiEdits(edits: Array<MultiEditEntry>): MultiEditResult
|
|
Binary file
|
package/index.js
CHANGED
|
@@ -11,7 +11,7 @@ try {
|
|
|
11
11
|
nativeBinding = require('./claude_code_native.darwin-x64.node');
|
|
12
12
|
break;
|
|
13
13
|
case 'darwin-arm64':
|
|
14
|
-
nativeBinding = require('./
|
|
14
|
+
nativeBinding = require('./index.darwin-arm64.node');
|
|
15
15
|
break;
|
|
16
16
|
case 'linux-x64':
|
|
17
17
|
nativeBinding = require('./claude_code_native.linux-x64-gnu.node');
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ebowwa/coder-native",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Native Rust modules for
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Native Rust modules for Claude Code Remake - provides high-performance search, token counting, and diff operations",
|
|
5
5
|
"author": "ebowwa",
|
|
6
6
|
"license": "MIT",
|
|
7
|
-
"keywords": ["
|
|
7
|
+
"keywords": ["claude", "native", "rust", "napi", "search", "tokens"],
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
|
-
"url": "https://github.com/ebowwa/
|
|
10
|
+
"url": "https://github.com/ebowwa/claude-code-remake"
|
|
11
11
|
},
|
|
12
12
|
"main": "index.js",
|
|
13
13
|
"types": "index.d.ts",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"index.d.ts"
|
|
18
18
|
],
|
|
19
19
|
"napi": {
|
|
20
|
-
"name": "
|
|
20
|
+
"name": "claude_code_native",
|
|
21
21
|
"triples": {
|
|
22
22
|
"defaults": false,
|
|
23
23
|
"additional": [
|