Commit Graph

6 Commits

Author SHA1 Message Date
ephraimduncan 93420c5782 fix(coding-agent/plugins): resolve directory manifest extension entries to their index.{ts,js,mjs,cjs}
Plugin manifests that declare a directory entry (e.g. pi-goal's
`"pi": { "extensions": [".pi/extensions/pi-goal"] }`) were
pushed through to the legacy module loader unchanged. `Bun.file()`
on a directory throws "Directories cannot be read like files",
so every such plugin failed to load.

`resolvePluginPaths` now routes each joined manifest entry through
`resolveManifestEntryFile`, which:
- returns the path as-is when it is a file,
- returns the directory's `index.{ts,js,mjs,cjs}` when it is a
  directory containing one of those files,
- otherwise returns null (skip).

This mirrors the documented native auto-discovery behavior in
`resolveExtensionEntries` and the candidate list in
`extensibility/custom-commands/loader.ts`.

Closes #1001.
2026-05-11 00:05:00 +00:00
jiwangyihao a157b878f4 fix(plugins): 避免预解析动态相对导入 2026-05-10 03:35:46 +08:00
jiwangyihao 40e8b37202 fix(plugins): 保留 legacy 扩展的 Node 内置导入 2026-05-10 03:24:02 +08:00
jiwangyihao 1226d30d21 test(plugins): 将 legacy Pi 回归覆盖插件发现链路 2026-05-10 03:21:02 +08:00
can1357 3f1d7c6882 test: isolated plugin discovery test with XDG_DATA_HOME environment variable
- Updated plugin extension discovery test to use XDG_DATA_HOME instead of HOME for environment isolation.
- Replaced manual path construction with getPluginsDir() utility for consistency.
- Added XDG directory structure setup and path cache rebuild to ensure correct plugin resolution.
2026-03-15 17:36:59 +01:00
can1357 b8e82008e3 feat(coding-agent): added extension filtering and granular capability identification
- Added `toExtensionId()` method to all capability types for granular extension identification and disabling.
- Added `disabledExtensions` and `includeDisabled` options to LoadOptions for filtering disabled capabilities by extension ID.
- Added plugin manifest support for `extensions` entry points with automatic discovery from installed plugins.
- Fixed skill loading to properly respect disabled skill names from custom directories.
- Improved cross-platform path handling by using `path.basename()` instead of string splitting in context file and state manager.
- Refactored capability index loading to validate source metadata and filter disabled extensions before processing.
2026-03-15 17:26:46 +01:00