Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
6083b2e
feat!: change default export to { id, server } object shape
frap129 Mar 31, 2026
c5503e2
build: restructure for tui/ support — rootDir, jsx, peer deps, satisf…
frap129 Mar 31, 2026
1f1d00f
build(tui): add vendored type shim for @opencode-ai/plugin/tui
frap129 Mar 31, 2026
3bde5ea
feat(tui): add data layer for sidebar rule loading
frap129 Mar 31, 2026
0392b20
feat(tui): add sidebar component, entry point, and finalize package e…
frap129 Mar 31, 2026
08d7eed
docs: update README with tui/ project structure and sidebar feature
frap129 Mar 31, 2026
2e0edbf
fix(tui): use content prop on text elements to avoid opentui #438
frap129 Mar 31, 2026
b0d86bf
fix(tui): add state.path to vendored TuiState types
frap129 Mar 31, 2026
9e7d26e
fix(tui): use api.state.path.directory for project dir resolution
frap129 Mar 31, 2026
a26eeb4
feat(tui): restyle sidebar as bordered card with project/global sections
frap129 Mar 31, 2026
6c51f72
feat(tui): set sidebar order to 90 to position below LSP
frap129 Mar 31, 2026
bd09941
fix(tui): Show between LSP and Modified files
frap129 Mar 31, 2026
d213d85
refactor(tui): flatten sidebar to match native opencode section style
frap129 Mar 31, 2026
0f6ca83
feat: add active rules state persistence module
frap129 Mar 31, 2026
e9d9858
fix: add sessionId validation and strict type guards
frap129 Mar 31, 2026
dbe9006
feat: add FilterResult return type with matchedPaths tracking
frap129 Mar 31, 2026
25f20e8
test: add integration tests for writeActiveRulesState runtime side ef…
frap129 Mar 31, 2026
b930acf
fix(test): verify no state files created when sessionID is missing
frap129 Mar 31, 2026
710767d
feat(tui): add active state tracking to sidebar rules
frap129 Mar 31, 2026
e963a6c
feat(tui): add event-driven refresh and active state UI
frap129 Mar 31, 2026
693d785
fix(tui): filter events by sessionId before debouncing
frap129 Mar 31, 2026
95247b5
fix(tui): prevent stale async results and improve refresh robustness
frap129 Mar 31, 2026
7f1ce4f
fix(tui): skip refresh during initial load and use proper green color
frap129 Mar 31, 2026
e9de955
fix(tui): use theme.success for active bullet color instead of hardco…
frap129 Mar 31, 2026
15487e2
fix(tui): use correct event shape for sessionID filtering
frap129 Mar 31, 2026
8b573ce
feat(tui): sort active rules to top of sidebar categories
frap129 Mar 31, 2026
513ad07
docs(readme): update TUI sidebar docs with active state, event refres…
frap129 Mar 31, 2026
3b2526e
docs(README): Reorganize
frap129 Mar 31, 2026
0df4f4d
docs(readme): add tui.json configuration to installation section
frap129 Mar 31, 2026
4d788a7
fix(deps): pin solid-js to 1.9.11 to resolve peer dependency conflict
frap129 Mar 31, 2026
2b53e01
docs(readme): add plugin CLI as recommended install option
frap129 Mar 31, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Exclusions handled by package.json "files" negation patterns
# This file is kept for documentation purposes

# Test files - excluded via !src/**/*.test.ts, !tui/**/*.test.ts patterns
# *.test.ts
# *.test.tsx
# *.spec.ts
# *.spec.tsx

# Test fixtures - excluded via !src/test-fixtures.ts
# src/test-fixtures.ts

# Compile-time type checks - excluded via !src/api-surface.typecheck.ts
# src/api-surface.typecheck.ts
321 changes: 180 additions & 141 deletions README.md

Large diffs are not rendered by default.

55 changes: 55 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,59 @@ export default [
'@typescript-eslint/no-explicit-any': 'off',
},
},
// TUI production files
{
files: ['tui/**/*.ts', 'tui/**/*.tsx'],
ignores: [
'tui/**/*.test.ts',
'tui/**/*.test.tsx',
'tui/**/*.spec.ts',
'tui/**/*.spec.tsx',
],
languageOptions: {
parser: typescriptParser,
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
project: './tsconfig.json',
},
},
plugins: {
'@typescript-eslint': typescriptPlugin,
},
rules: {
...typescriptPlugin.configs.recommended.rules,
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_' },
],
},
},
// TUI test files
{
files: [
'tui/**/*.test.ts',
'tui/**/*.test.tsx',
'tui/**/*.spec.ts',
'tui/**/*.spec.tsx',
],
languageOptions: {
parser: typescriptParser,
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
},
},
plugins: {
'@typescript-eslint': typescriptPlugin,
},
rules: {
...typescriptPlugin.configs.recommended.rules,
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_' },
],
'@typescript-eslint/no-explicit-any': 'off',
},
},
];
59 changes: 49 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
{
"name": "opencode-rules",
"version": "0.5.0",
"version": "0.6.0-beta",
"description": "OpenCode plugin that discovers and injects markdown rules into system prompts",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
"type": "module",
"oc-plugin": [
"server",
"tui"
],
"scripts": {
"build": "tsc",
"dev": "tsc --watch",
"test": "vitest",
"test:run": "vitest run",
"lint": "eslint src",
"format": "prettier --write src/**/*.ts",
"format:check": "prettier --check src/**/*.ts",
"lint": "eslint src tui",
"format": "prettier --write 'src/**/*.ts' 'tui/**/*.tsx' 'tui/**/*.ts'",
"format:check": "prettier --check 'src/**/*.ts' 'tui/**/*.tsx' 'tui/**/*.ts'",
"clean": "rm -rf dist",
"prepublishOnly": "npm run clean && npm run build"
},
Expand All @@ -34,28 +38,63 @@
},
"files": [
"dist",
"!dist/**/*.test.*",
"!dist/**/*.spec.*",
"!dist/**/test-fixtures.*",
"!dist/**/api-surface.typecheck.*",
"src/",
"!src/**/*.test.ts",
"!src/**/*.spec.ts",
"!src/test-fixtures.ts",
"!src/api-surface.typecheck.ts",
"tui/",
"!tui/**/*.test.ts",
"!tui/**/*.test.tsx",
"!tui/**/*.spec.ts",
"!tui/**/*.spec.tsx",
"README.md",
"LICENSE"
],
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js"
"types": "./dist/src/index.d.ts",
"import": "./dist/src/index.js"
},
"./tui": {
"types": "./dist/tui/index.d.ts",
"import": "./tui/index.tsx"
}
},
"peerDependencies": {
"@opencode-ai/plugin": "^1.3.7",
"@opencode-ai/sdk": "^1.3.7",
"@opentui/solid": ">=0.1.92",
"@opentui/core": ">=0.1.92"
},
"peerDependenciesMeta": {
"@opentui/solid": {
"optional": true
},
"@opentui/core": {
"optional": true
}
},
"devDependencies": {
"@opencode-ai/plugin": "^1.3.9",
"@opencode-ai/sdk": "^1.3.9",
"@opentui/core": "^0.1.93",
"@opentui/solid": "^0.1.93",
"@types/minimatch": "^5.1.2",
"@types/node": "^20.19.30",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"eslint": "^8.57.1",
"prettier": "^3.8.1",
"solid-js": "1.9.11",
"typescript": "^5.9.3",
"vitest": "^1.6.1"
},
"dependencies": {
"@opencode-ai/plugin": "^1.1.34",
"@opencode-ai/sdk": "^1.1.34",
"minimatch": "^9.0.5",
"yaml": "^2.8.2"
}
Expand Down
Loading