@codex-ultra/cxu 0.2.50 → 0.2.52

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.
@@ -9,7 +9,7 @@ export type SaVmNetCapability = {
9
9
  url: string;
10
10
  methods?: string[];
11
11
  };
12
- export type SaVmActionType = "read" | "read_file" | "read_lines" | "read_file_tail" | "tail_file" | "tail" | "read_many" | "read_files" | "find" | "find_files" | "list_files" | "write" | "write_file" | "edit" | "edit_file" | "apply_patch" | "patch" | "delete" | "delete_file" | "remove_file" | "safe_delete" | "move" | "move_file" | "rename" | "rename_file" | "copy" | "copy_file" | "stat" | "file_info" | "test_path" | "file_exists" | "exists" | "ensure_dir" | "mkdir" | "vm-read" | "vm_read" | "count_lines" | "line_count" | "list_dir" | "grep" | "grep_search" | "grep_async" | "grep_search_async" | "async_grep" | "http_fetch" | "fetch" | "run_js" | "exec_js" | "run_py" | "run_python" | "exec_py" | "clear_tool_history" | "prune_tool_history" | "find_references" | "find_all_references" | "find_implementations" | "find_impl" | "implementations" | "file_outline" | "outline" | "workspace_outline" | "outline_many" | "project_outline" | "repo_map" | "repo-map" | "code_graph" | "relation_graph" | "symbol_graph" | "rename_symbol" | "symbol_rename" | "move_file_with_imports" | "move_with_imports" | "find_definition" | "goto_definition" | "def" | "extract_to_file" | "extract_file" | "extract_module" | "add_import" | "insert_import" | "get_diagnostics" | "diagnostics" | "check_syntax" | "workspace_diagnostics" | "project_diagnostics" | "all_diagnostics" | "organize_imports" | "clean_unused_imports" | "sort_imports" | "analyze_scope" | "scope_analysis" | "verify_loop" | "verify-loop" | "verify_changed" | "git_status" | "git-status" | "git_diff" | "git-diff" | "run_bun" | "run_bun_profile" | "run_project_check" | "project_check" | "run_host" | "exec_host" | "host" | "save_note" | "add_note" | "read_notes" | "read_note" | "list_notes" | "delete_note" | "remove_note" | "clear_notes" | "write_stdin" | "stdin" | "input_stdin" | "session_status" | "read_session" | "poll_session" | "kill_session" | "kill_process" | "stop_session" | "list_sessions" | "local_checkpoint" | "checkpoint" | "git_checkpoint" | "restore_checkpoint" | "restore_git_checkpoint" | "jev_choose" | "jev_select" | "jev_checklist" | "jev_multi_choice" | "jev_evaluate" | "jev_thinking" | "jev_think" | "jev_redteam" | "jev_red" | "jev_rank" | "jev_scope" | "jev_consistency" | "jev_done" | "jev_diagnose" | "jev_edge_cases" | "jev_blast_radius" | "jev_intent" | "jev_next" | "jev_progress";
12
+ export type SaVmActionType = "read" | "read_file" | "read_lines" | "read_file_tail" | "tail_file" | "tail" | "read_many" | "read_files" | "find" | "find_files" | "list_files" | "write" | "write_file" | "edit" | "edit_file" | "apply_patch" | "patch" | "delete" | "delete_file" | "remove_file" | "safe_delete" | "move" | "move_file" | "rename" | "rename_file" | "copy" | "copy_file" | "stat" | "file_info" | "test_path" | "file_exists" | "exists" | "ensure_dir" | "mkdir" | "vm-read" | "vm_read" | "count_lines" | "line_count" | "list_dir" | "grep" | "grep_search" | "grep_async" | "grep_search_async" | "async_grep" | "http_fetch" | "fetch" | "run_js" | "exec_js" | "run_py" | "run_python" | "exec_py" | "clear_tool_history" | "prune_tool_history" | "find_references" | "find_all_references" | "find_implementations" | "find_impl" | "implementations" | "file_outline" | "outline" | "workspace_outline" | "outline_many" | "project_outline" | "repo_map" | "repo-map" | "code_graph" | "relation_graph" | "symbol_graph" | "rename_symbol" | "symbol_rename" | "move_file_with_imports" | "move_with_imports" | "find_definition" | "goto_definition" | "def" | "extract_to_file" | "extract_file" | "extract_module" | "add_import" | "insert_import" | "get_diagnostics" | "diagnostics" | "check_syntax" | "workspace_diagnostics" | "project_diagnostics" | "all_diagnostics" | "organize_imports" | "clean_unused_imports" | "sort_imports" | "analyze_scope" | "scope_analysis" | "extract_component" | "extract_hook" | "auto_fix_missing_imports" | "fix_missing_imports" | "analyze_coupling" | "cluster_symbols" | "atomic_refactor" | "refactor_dry_run" | "verify_loop" | "verify-loop" | "verify_changed" | "git_status" | "git-status" | "git_diff" | "git-diff" | "run_bun" | "run_bun_profile" | "run_project_check" | "project_check" | "run_host" | "exec_host" | "host" | "save_note" | "add_note" | "read_notes" | "read_note" | "list_notes" | "delete_note" | "remove_note" | "clear_notes" | "write_stdin" | "stdin" | "input_stdin" | "session_status" | "read_session" | "poll_session" | "kill_session" | "kill_process" | "stop_session" | "list_sessions" | "local_checkpoint" | "checkpoint" | "git_checkpoint" | "restore_checkpoint" | "restore_git_checkpoint" | "jev_choose" | "jev_select" | "jev_checklist" | "jev_multi_choice" | "jev_evaluate" | "jev_thinking" | "jev_think" | "jev_redteam" | "jev_red" | "jev_rank" | "jev_scope" | "jev_consistency" | "jev_done" | "jev_diagnose" | "jev_edge_cases" | "jev_blast_radius" | "jev_intent" | "jev_next" | "jev_progress";
13
13
  export declare const SA_VM_BUN_PROFILES: readonly SaVmBunProfile[];
14
14
  export type { SaVmBunProfile };
15
15
  export type SaVmRunInput = {
@@ -49,6 +49,13 @@ export type SaVmRunInput = {
49
49
  symbols?: string[] | string;
50
50
  exported_symbols?: string[] | string;
51
51
  component_name?: string;
52
+ hook_name?: string;
53
+ top_n?: number;
54
+ topN?: number;
55
+ ops?: Array<{
56
+ path: string;
57
+ content?: string;
58
+ } | string>;
52
59
  sort?: boolean;
53
60
  remove_unused?: boolean;
54
61
  merge_duplicates?: boolean;
@@ -467,6 +474,24 @@ export declare function nativeOrganizeImports(rawPath: string, options: {
467
474
  export declare function nativeAnalyzeScope(rawPath: string, startLine: number | undefined, endLine: number | undefined, options: {
468
475
  component_name?: string;
469
476
  }, policy: SaVmPolicyConfig | undefined, cwd: string, startedAt: number): Promise<SaVmRunResult>;
477
+ export declare function nativeExtractComponent(rawSource: string, rawTarget: string, startLine: number | undefined, endLine: number | undefined, options: {
478
+ component_name?: string;
479
+ hook_name?: string;
480
+ dry_run?: boolean;
481
+ }, policy: SaVmPolicyConfig | undefined, cwd: string, startedAt: number): Promise<SaVmRunResult>;
482
+ export declare function nativeAutoFixMissingImports(rawPath: string, options: {
483
+ dry_run?: boolean;
484
+ }, policy: SaVmPolicyConfig | undefined, cwd: string, startedAt: number): Promise<SaVmRunResult>;
485
+ export declare function nativeAnalyzeCoupling(rawPath: string, options: {
486
+ top_n?: number;
487
+ }, policy: SaVmPolicyConfig | undefined, cwd: string, startedAt: number): Promise<SaVmRunResult>;
488
+ export declare function nativeAtomicRefactor(ops: Array<{
489
+ path: string;
490
+ content?: string;
491
+ patch?: string;
492
+ }>, options: {
493
+ dry_run?: boolean;
494
+ }, policy: SaVmPolicyConfig | undefined, cwd: string, startedAt: number): Promise<SaVmRunResult>;
470
495
  export declare function nativeApplyPatch(patchText: string, policy: SaVmPolicyConfig | undefined, cwd: string, additionalRoots: string[] | undefined, startedAt: number): Promise<SaVmRunResult>;
471
496
  export declare function nativeCopyFile(fromPath: string, toPath: string, policy: SaVmPolicyConfig | undefined, cwd: string, startedAt: number): Promise<SaVmRunResult>;
472
497
  export declare function nativeFileInfo(filePath: string, policy: SaVmPolicyConfig | undefined, cwd: string, startedAt: number): Promise<SaVmRunResult>;
@@ -128,3 +128,56 @@ export declare function analyzeBlockScope(filePath: string, content: string, sta
128
128
  componentName?: string;
129
129
  } | string): ScopeAnalysisResult;
130
130
  export declare function generateTargetImportsForBlock(sourcePath: string, targetPath: string, sourceContent: string, startLine: number, endLine: number): string;
131
+ export declare function generatePropsTypeImports(sourcePath: string, targetPath: string, sourceContent: string, captured: Array<{
132
+ name: string;
133
+ type: string;
134
+ }>, existingImportsText: string, locallyDeclared?: string[]): string;
135
+ export declare function generatePropsLocalTypes(sourcePath: string, sourceContent: string, captured: Array<{
136
+ name: string;
137
+ type: string;
138
+ }>, existingText: string): string;
139
+ export type SemanticIssue = {
140
+ line: number;
141
+ column: number;
142
+ message: string;
143
+ preview: string;
144
+ code?: string;
145
+ };
146
+ export declare function splitEnvironmentalErrors(sourcePath: string, sourceContent: string, errors: SemanticIssue[]): {
147
+ hard: SemanticIssue[];
148
+ warnings: SemanticIssue[];
149
+ };
150
+ export declare function findTopImportInsertLine(content: string): number;
151
+ export declare function getSemanticDiagnosticsForContent(filePath: string, content: string, cwd?: string): Array<{
152
+ line: number;
153
+ column: number;
154
+ message: string;
155
+ preview: string;
156
+ code?: string;
157
+ }>;
158
+ export declare function autoFixMissingImportsInContent(filePath: string, content: string, cwd?: string): {
159
+ newContent: string;
160
+ applied: boolean;
161
+ fixedCount: number;
162
+ summary: string;
163
+ };
164
+ export type CouplingCandidate = {
165
+ name: string;
166
+ kind: string;
167
+ startLine: number;
168
+ endLine: number;
169
+ capturedOuterState: number;
170
+ importedDeps: number;
171
+ internalLines: number;
172
+ recommendation: string;
173
+ };
174
+ export declare function analyzeFileCoupling(filePath: string, content: string, topN?: number): {
175
+ candidates: CouplingCandidate[];
176
+ summary: string;
177
+ };
178
+ export declare function buildExtractComponent(sourcePath: string, sourceContent: string, startLine: number, endLine: number, componentName: string, targetPath: string): {
179
+ targetContent: string;
180
+ callSnippet: string;
181
+ importStatement: string;
182
+ propsInterface: string;
183
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codex-ultra/cxu",
3
- "version": "0.2.50",
3
+ "version": "0.2.52",
4
4
  "description": "codex-ultra workbench launcher: server compiled locally with Bun + web UI (cxu starts it all).",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",