2026-02-21 03:10:39 +00:00
|
|
|
import tseslint from '@typescript-eslint/eslint-plugin';
|
|
|
|
|
import tsparser from '@typescript-eslint/parser';
|
|
|
|
|
|
|
|
|
|
export default [
|
|
|
|
|
{
|
feat(opencode): native opencode addon — bottom-row project indicator + in-TUI switcher
Adds an opencode integration mirroring the existing pi and prime-agent addons.
The addon is a TUI plugin (`src/opencode-ext/open-mcpctl.tsx`) that:
- renders the active mcpctl project into opencode's `app_bottom` slot — the
status row that also carries the token counter / model info,
- registers a `mcpctl.switch_project` command bound to `<leader>m` that opens a
searchable `DialogSelect` project picker,
- switches live by re-pointing opencode's `mcpctl` MCP server at the new
project's mcplocal endpoint via the SDK client (native MCP, no JSON-RPC code),
- persists state in `~/.mcpctl/opencode-state.json` (+ `.mcpctl-project` marker).
Pure helpers (`filterProjects`, `toolChangeAnnouncement`) live in
`projects.ts` so they are unit-tested.
`mcpctl config opencode --project X` provisions it: writes the plugin into
`~/.config/opencode/plugin/`, registers the `.tsx` in opencode.json's plugin
array (auto-discovery only matches {ts,js}), best-effort installs the TUI peer
deps (`@opentui/*`), and syncs skills into `~/.config/opencode/skill`.
`mcpctl skills sync --agent opencode` is added as a fourth shared-tree target.
Closes typecheck gap with `typecheck:opencode-ext` against the real
`@opencode-ai/plugin` + `@opentui/solid` types.
Tests: embed freshness, opencode-settings, projects helpers, skills agent
root. Full `pnpm run typecheck` + cli tests pass; completions regenerated.
2026-08-08 21:48:14 +01:00
|
|
|
files: ['src/*/src/**/*.ts', 'src/pi-ext/*.ts', 'src/opencode-ext/*.ts', 'src/opencode-ext/*.tsx'],
|
2026-02-21 03:10:39 +00:00
|
|
|
languageOptions: {
|
|
|
|
|
parser: tsparser,
|
|
|
|
|
parserOptions: {
|
|
|
|
|
project: ['./src/*/tsconfig.json'],
|
|
|
|
|
tsconfigRootDir: import.meta.dirname,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
plugins: { '@typescript-eslint': tseslint },
|
|
|
|
|
rules: {
|
|
|
|
|
'@typescript-eslint/explicit-function-return-type': 'error',
|
|
|
|
|
'@typescript-eslint/no-explicit-any': 'error',
|
|
|
|
|
'@typescript-eslint/no-unused-vars': 'error',
|
|
|
|
|
'@typescript-eslint/strict-boolean-expressions': 'error',
|
|
|
|
|
'no-console': ['warn', { allow: ['warn', 'error'] }],
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
ignores: ['**/dist/**', '**/node_modules/**', '**/*.config.*'],
|
|
|
|
|
},
|
|
|
|
|
];
|