Skip to content

refactor: migrate input plugins to Rust and clean up redundant TS wrappers#140

Merged
TrueNine merged 29 commits intomainfrom
dev
Apr 11, 2026
Merged

refactor: migrate input plugins to Rust and clean up redundant TS wrappers#140
TrueNine merged 29 commits intomainfrom
dev

Conversation

@TrueNine
Copy link
Copy Markdown
Owner

Summary

This PR completes the migration of input plugins from TypeScript to Rust NAPI bindings, and removes the now-redundant TS wrapper files in sdk/src/inputs/. It also closes behavioral gaps between the old TS and new Rust implementations:

  • Added Diagnostic/DebugLog return values from Rust (skill.rs, aindex.rs, subagent.rs) and updated TS wrappers to route them to ctx.logger.
  • Fixed FilePathKind serde mismatch (PascalCase → lowercase).
  • Fixed workspace root name mismatch (__workspace_root____workspace__).
  • Fixed shared ignore path list (.windsurfignore.codeignore).
  • Added proxy.ts resolution fallback in public-config input wrappers.
  • Updated cleanup.ts test helper and setup-native-binding.ts typings.

Verification

  • pnpm check:type
  • pnpm lint:fix
  • pnpm test
  • pnpm build
  • CLI smoke test (node cli/dist/index.mjs) ✅

Related impact

  • sdk/ is now the single source of truth for input collection logic.
  • cli/ remains a thin shell with no duplicate core logic.

🤖 Generated with Claude Code

TrueNine added 29 commits April 10, 2026 00:23
…ncies

- Updated version numbers across multiple package.json files to 2026.10411.10132.
- Added new dependencies: js-sys, wasm-bindgen, chrono, regex-lite, and serde_yml.
- Modified linting scripts to include Rust formatting checks.
- Removed obsolete plugin-runtime.ts file.
- Updated pnpm-lock.yaml and pnpm-workspace.yaml to reflect new dependency versions.
- Added rustfmt.toml for Rust formatting configuration.
…gin aliases in tsdown.config.ts and vite.config.ts
- Deleted the following test files:
  - plugin.enablement.test.ts
  - plugin.write.test.ts
  - scopePolicy.test.ts

- Removed the main plugin file:
  - plugin.ts

- Deleted scope policy implementation:
  - scopePolicy.ts

- Removed type definitions:
  - types.ts

- Deleted individual output plugin files:
  - plugin-cursor.ts
  - plugin-droid-cli.ts
  - plugin-gemini-cli.ts
  - plugin-git-exclude.ts
  - plugin-jetbrains-ai-codex.ts
  - plugin-jetbrains-codestyle.ts
  - plugin-kiro.ts
  - plugin-openai-codex-cli.ts
  - plugin-opencode-cli.ts
  - plugin-qoder-ide.ts
  - plugin-readme.ts
  - plugin-trae-cn-ide.ts
  - plugin-trae-ide.ts
  - plugin-vscode.ts
  - plugin-windsurf.ts
  - plugin-zed.ts
- Implemented core plugin structure in `plugin.ts` including types and interfaces for input and output capabilities.
- Added output adaptor capabilities and declarative output file handling.
- Created tests for output writing functionality in `plugin.write.test.ts`.
- Introduced scope resolution logic in `scopePolicy.ts` and corresponding tests in `scopePolicy.test.ts`.
- Added utility functions for managing desk paths in `desk-paths.test.ts`.
- Developed IDE configuration output plugins with tests for JetBrains, VSCode, Zed, and Readme configurations in `ide-config-output.test.ts`.
- Adjusted indentation for consistency in build.rs and lib.rs files.
- Reformatted struct fields and function parameters for better alignment.
- Enhanced error handling and message clarity in resolve_public_path_impl.
- Improved caching logic in detect_with_cached_success_result.
- Updated tests for better readability and maintainability.
- Updated the application to replace all instances of "plugins" with "adaptors" for better clarity.
- Refactored the sidebar navigation to include the new adaptors route.
- Created a new AdaptorsPage component to list adaptors and their details.
- Adjusted API calls to use listAdaptors instead of listPlugins.
- Updated routing to remove the old plugins route and replace it with adaptors.
- Modified tests to reflect the changes in naming and functionality.
- Changed references from OutputPlugin to OutputAdaptor in cleanup execution scope tests and cleanup logic.
- Updated import paths to reflect the new adaptor structure in the codebase.
- Refactored cleanup functions to accommodate the new Adaptor type.
- Adjusted WSL mirror sync functionality to utilize the Adaptor type instead of Plugin.
- Ensured all related types and functions are consistent with the new Adaptor naming convention.
@TrueNine TrueNine merged commit 661bbe5 into main Apr 11, 2026
3 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant