@ebowwa/coder 0.1.12 → 0.2.1

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/dist/index.js CHANGED
@@ -1,17 +1,2 @@
1
1
  // @bun
2
- import{$ as kz,A as p,B as Qz,C as Vz,D as Wz,E as Xz,F as Yz,G as Zz,H as $z,I as Ez,J as Fz,K as Hz,L as Sz,M as Uz,N as bz,O as qz,P as _z,Q as Nz,R as Q,T as Pz,U as Rz,V as gz,W as yz,X as Lz,Y as fz,Z as wz,_ as Mz,aa as Cz,b as Dz,ba as pz,c as Gz,ca as vz,d as Iz,da as Tz,e as Jz,ea as hz,f as Kz,g as Oz,h as E,i as F,j as H,k as S,l as U,m as b,n as q,o as _,p as N,q as P,r as R,s as g,t as y,u as L,v as f,w,x as M,y as k,z as C}from"./index-z8cwtf8j.js";import{dlopen as V,suffix as W}from"bun:ffi";import{join as X,dirname as Y}from"path";import{fileURLToPath as Z}from"url";var I=null;function O(){if(I)return I;try{let z=Y(Z(import.meta.url)),B=X(z,"..","native",`claude_code_native.${W}`);return I=V(B,{search_files:{args:["cstring","cstring","pointer"],returns:"pointer"},count_tokens:{args:["cstring"],returns:"u32"},calculate_diff:{args:["cstring","cstring"],returns:"pointer"},compact_content:{args:["cstring","u32","cstring"],returns:"pointer"}}).symbols,I}catch(z){return console.warn("Native module not available, using JS fallback:",z),$()}}function m(){try{return O(),I!==null}catch{return!1}}function $(){return{search_files:(z,B,D)=>{return{matches:[],total_count:0,files_searched:0}},count_tokens:(z)=>{return Math.ceil(z.length/4)},calculate_diff:(z,B)=>{let D=z.split(`
3
- `),J=B.split(`
4
- `),A=[];if(z!==B)A.push({old_start:1,old_lines:D.length,new_start:1,new_lines:J.length,content:`- ${D.join(`
5
- - `)}
6
- + ${J.join(`
7
- + `)}`});return A},compact_content:(z,B,D="truncate")=>{let A=B*4;if(z.length<=A)return z;switch(D){case"truncate":return z.slice(0,A/2)+`
8
-
9
- ... [truncated] ...
10
-
11
- `+z.slice(-A/2);case"summarize":let K=Math.floor(A/4);return`=== BEGINNING ===
12
- `+z.slice(0,K)+`
13
-
14
- === END ===
15
- `+z.slice(-K);case"extract":return z.split(`
16
- `).filter((G)=>G.trim().startsWith("#")||G.trim().startsWith("function")||G.trim().startsWith("const")||G.trim().startsWith("class")||G.trim().startsWith("export")||G.trim().startsWith("import")).slice(0,A/50).join(`
17
- `);default:return z.slice(0,A)}}}}var x=O();export{vz as teammateTemplates,Kz as supportsExtendedThinking,p as printSessionsList,Lz as parseSkillFile,x as native,O as loadNative,g as isSystemTool,kz as isSkillInvocation,P as isReadOnlyTool,m as isNativeAvailable,R as isFileEditTool,yz as hookExitCodes,gz as hookEventDocs,Nz as getToolByName,Cz as getSkillArgs,Tz as generateTeammateId,q as generateDescription,C as formatSessionSummary,f as formatMetrics,w as formatCostBrief,L as formatCost,M as formatCacheMetrics,hz as createTeammate,U as createMessageStream,E as calculateCost,S as calculateCacheMetrics,Jz as calculateBudgetTokens,_z as builtInTools,Mz as builtInSkills,Rz as builtInHooks,F as buildSystemPrompt,wz as buildSkillPrompt,H as buildCachedMessages,b as assessRiskLevel,y as agentLoop,Vz as WriteTool,pz as TeammateManager,$z as TaskTool,bz as TaskStopTool,Ez as TaskOutputTool,N as TOOL_CATEGORIES,Uz as SkillTool,fz as SkillManager,k as SessionStore,Qz as ReadTool,_ as PermissionManager,qz as NotebookEditTool,Oz as MODEL_PRICING,Q as MCPClientImpl,Q as MCPClient,Pz as HookManager,Zz as GrepTool,Yz as GlobTool,Sz as ExitPlanModeTool,Hz as EnterPlanModeTool,Wz as EditTool,Gz as EFFORT_TO_BUDGET,Iz as DEFAULT_THINKING_CONFIG,Dz as DEFAULT_CACHE_CONFIG,Xz as BashTool,Fz as AskUserQuestionTool};
2
+ import{$ as Lb,A as Z,Aa as Cb,B as p,Ba as kb,C as r,Ca as xb,D as d,Da as pb,E as m,Ea as rb,F as a,Fa as db,G as c,Ga as mb,H as j,I as l,J as n,K as t,L as o,M as i,N as e,O as s,P as bb,Q as qb,R as zb,S as Ab,T as Bb,U as Db,V as Eb,W as Fb,X as Gb,Y as Ib,Z as Jb,_ as Kb,aa as Ob,b as M,ba as Qb,c as P,ca as Ub,d as v,da as Vb,e as C,ea as Wb,f as k,fa as Xb,g as x,ga as Yb,h as q,ha as Zb,i as z,ia as _b,j as A,ja as $b,k as B,ka as fb,l as D,la as gb,m as E,ma as wb,n as F,na as Hb,o as G,oa as Nb,p as I,pa as Rb,q as J,qa as Sb,r as K,ra as b,s as L,t as O,ta as Tb,u as Q,ua as hb,v as U,va as ub,w as V,wa as yb,x as W,xa as Mb,y as X,ya as Pb,z as Y,za as vb}from"./index-6e4wf341.js";export{l as validate_multi_edits,rb as teammateTemplates,k as supportsExtendedThinking,i as quantVersion,Ib as quantVariance,Gb as quantStdDev,Fb as quantMean,Jb as quantCorrelation,o as quant,Z as printSessionsList,n as preview_multi_edits,Mb as parseSkillFile,d as native,p as loadNative,Ab as lmsrPrice,Bb as lmsrCost,L as isSystemTool,kb as isSkillInvocation,J as isReadOnlyTool,e as isQuantAvailable,r as isNativeAvailable,K as isFileEditTool,yb as hookExitCodes,ub as hookEventDocs,a as highlight_markdown,c as highlight_diff,m as highlight_code,Sb as getToolByName,xb as getSkillArgs,db as generateTeammateId,F as generateDescription,Y as formatSessionSummary,U as formatMetrics,V as formatCostBrief,Q as formatCost,W as formatCacheMetrics,Db as detectArbitrage,mb as createTeammate,s as createOHLCV,D as createMessageStream,bb as createAMM,Eb as convertOdds,j as calculate_diff,q as calculateCost,B as calculateCacheMetrics,C as calculateBudgetTokens,Rb as builtInTools,Cb as builtInSkills,hb as builtInHooks,z as buildSystemPrompt,vb as buildSkillPrompt,A as buildCachedMessages,E as assessRiskLevel,t as apply_multi_edits,zb as ammPriceImpact,qb as ammCalculateCost,O as agentLoop,Lb as WriteTool,Hb as TempGlmVisionTool,pb as TeammateManager,Wb as TaskTool,fb as TaskStopTool,Xb as TaskOutputTool,I as TOOL_CATEGORIES,$b as SkillTool,Pb as SkillManager,X as SessionStore,Kb as ReadTool,G as PermissionManager,wb as NotebookEditTool,gb as MultiEditTool,x as MODEL_PRICING,b as MCPClientImpl,b as MCPClient,Tb as HookManager,Vb as GrepTool,Ub as GlobTool,_b as ExitPlanModeTool,Zb as EnterPlanModeTool,Ob as EditTool,P as EFFORT_TO_BUDGET,v as DEFAULT_THINKING_CONFIG,M as DEFAULT_CACHE_CONFIG,Qb as BashTool,Yb as AskUserQuestionTool,Nb as AnalyzeImageTool};
Binary file
package/native/index.d.ts CHANGED
@@ -1,50 +0,0 @@
1
- // TypeScript declarations for claude-code-native
2
-
3
- export interface SearchResult {
4
- path: string;
5
- line: number;
6
- column: number;
7
- content: string;
8
- }
9
-
10
- export interface DiffResult {
11
- additions: number;
12
- deletions: number;
13
- hunks: DiffHunk[];
14
- }
15
-
16
- export interface DiffHunk {
17
- oldStart: number;
18
- oldLines: number;
19
- newStart: number;
20
- newLines: number;
21
- content: string;
22
- }
23
-
24
- export interface CompactResult {
25
- original: number;
26
- compacted: number;
27
- content: string;
28
- }
29
-
30
- // Search functions
31
- export function searchFiles(pattern: string, path: string, options?: SearchOptions): SearchResult[];
32
- export function searchContent(query: string, path: string, options?: SearchOptions): SearchResult[];
33
-
34
- // Token functions
35
- export function countTokens(text: string): number;
36
- export function countMessagesTokens(messages: any[]): number;
37
-
38
- // Diff functions
39
- export function computeDiff(oldText: string, newText: string): DiffResult;
40
- export function applyDiff(text: string, diff: DiffResult): string;
41
-
42
- // Compact functions
43
- export function compactContent(content: string, maxTokens: number): CompactResult;
44
-
45
- export interface SearchOptions {
46
- ignoreCase?: boolean;
47
- includeHidden?: boolean;
48
- maxResults?: number;
49
- filePattern?: string;
50
- }
Binary file
package/native/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('./claude_code_native.darwin-arm64.node');
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');
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@ebowwa/coder-native",
3
- "version": "0.1.0",
4
- "description": "Native Rust modules for Coder - provides high-performance search, token counting, and diff operations",
3
+ "version": "0.2.1",
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": ["coder", "native", "rust", "napi", "search", "tokens"],
7
+ "keywords": ["claude", "native", "rust", "napi", "search", "tokens"],
8
8
  "repository": {
9
9
  "type": "git",
10
- "url": "https://github.com/ebowwa/codespaces"
10
+ "url": "https://github.com/ebowwa/claude-code-remake"
11
11
  },
12
12
  "main": "index.js",
13
13
  "types": "index.d.ts",
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@ebowwa/coder",
3
- "version": "0.1.12",
4
- "description": "AI coding assistant CLI with extended thinking and teammate mode",
3
+ "version": "0.2.1",
4
+ "description": "Claude Code CLI reimplementation in TypeScript + Rust",
5
5
  "author": "ebowwa",
6
6
  "license": "MIT",
7
7
  "keywords": [
8
- "coder",
8
+ "claude",
9
9
  "cli",
10
10
  "ai",
11
11
  "anthropic",
@@ -13,7 +13,7 @@
13
13
  ],
14
14
  "repository": {
15
15
  "type": "git",
16
- "url": "https://github.com/ebowwa/codespaces"
16
+ "url": "https://github.com/ebowwa/claude-code-remake"
17
17
  },
18
18
  "type": "module",
19
19
  "main": "dist/index.js",
@@ -21,9 +21,10 @@
21
21
  "coder": "dist/cli.js"
22
22
  },
23
23
  "scripts": {
24
- "build": "bun run build:ts && bun run build:native",
24
+ "build": "bun run build:native && bun run build:ts",
25
25
  "build:ts": "bun build ./src/index.ts ./src/cli.ts --outdir ./dist --target bun --minify --splitting",
26
- "build:native": "cd rust && cargo build --release --target-dir ./target",
26
+ "build:native": "cd rust && cargo build --release --target-dir ./target && cd .. && bun run build:napi-artifacts",
27
+ "build:napi-artifacts": "napi build --platform --release --target-dir rust/target --manifest-path rust/Cargo.toml --output-dir native --js-package-name @ebowwa/coder-native --const-enum --strip",
27
28
  "dev": "bun run --watch src/cli.ts",
28
29
  "cli": "bun run src/cli.ts",
29
30
  "test": "bun test"
@@ -33,25 +34,28 @@
33
34
  "native"
34
35
  ],
35
36
  "dependencies": {
36
- "@ebowwa/coder-native": "^0.1.0",
37
37
  "@anthropic-ai/sdk": "^0.39.0",
38
+ "@ebowwa/coder-native": "^0.2.1",
39
+ "@ebowwa/quant-rust": "^0.2.2",
38
40
  "@modelcontextprotocol/sdk": "^1.10.0",
39
- "ink": "^5.0.1",
40
- "react": "^18.3.1",
41
- "zod": "^3.24.2",
42
- "yargs": "^17.7.2",
43
41
  "chalk": "^5.4.1",
44
- "ora": "^8.2.0",
42
+ "eventsource": "^3.0.6",
45
43
  "glob": "^11.0.1",
44
+ "ink": "^5.0.1",
45
+ "ora": "^8.2.0",
46
+ "react": "^18.3.1",
47
+ "sharp": "^0.34.5",
46
48
  "ws": "^8.18.0",
47
- "eventsource": "^3.0.6"
49
+ "yargs": "^17.7.2",
50
+ "zod": "^3.24.2"
48
51
  },
49
52
  "devDependencies": {
53
+ "@napi-rs/cli": "^3.5.1",
50
54
  "@types/bun": "^1.3.9",
55
+ "@types/eventsource": "^1.1.15",
51
56
  "@types/react": "^18.3.18",
52
- "@types/yargs": "^17.0.33",
53
57
  "@types/ws": "^8.5.14",
54
- "@types/eventsource": "^1.1.15",
58
+ "@types/yargs": "^17.0.33",
55
59
  "typescript": "^5.9.3"
56
60
  }
57
61
  }