kibi-opencode 0.11.0 → 0.12.0

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.
package/README.md CHANGED
@@ -294,6 +294,15 @@ The plugin provides proactive guidance when agents perform file operations:
294
294
 
295
295
  - **File-delete safety guidance**: When an agent attempts to delete a file, the plugin injects a safety check reminding the agent to verify if the file implements any Kibi requirements before removal.
296
296
 
297
+ ### Repository Ignore Support
298
+
299
+ The OpenCode plugin respects the repository ignore policy used by Kibi's discovery pipeline. In practice this means:
300
+
301
+ - The plugin's background sync and file-event handling skip paths matched by repository `.gitignore` files, nested `.gitignore` files, and `.git/info/exclude`.
302
+ - The plugin also treats a curated set of tool/runtime directories as never-relevant for KB sync (for example: `.sisyphus`, `.opencode`, `.kb`, `.git`, `node_modules`, `vendor`, `third_party`).
303
+
304
+ When a file event occurs for an ignored path, the plugin skips processing and will not surface candidate guidance for that file. This avoids noisy briefings and prevents build/editor artifacts from triggering KB sync work.
305
+
297
306
  - **E2e reminder evidence**: File-operation reminders use exact Kibi graph evidence first (`covered_by` links to `[e2e]`-tagged entities or `/e2e/`-sourced entities) and narrow path heuristics second. Package-level e2e tests do not trigger "authoritative evidence" flags at the file level.
298
307
 
299
308
  - **Session suppression**: To minimize prompt noise, this guidance is suppressed after the first occurrence per path per session.
@@ -2,6 +2,7 @@ import { existsSync, readFileSync } from "node:fs";
2
2
  // implements REQ-opencode-kibi-plugin-v1
3
3
  import { createRequire } from "node:module";
4
4
  import * as path from "node:path";
5
+ import { createRepoIgnorePolicy } from "kibi-cli/ignore-policy";
5
6
  const _require = createRequire(import.meta.url);
6
7
  // Lightweight fallback matcher if picomatch isn't installed.
7
8
  let picomatch;
@@ -135,6 +136,11 @@ export function shouldHandleFile(filePath, cwd = process.cwd()) {
135
136
  const rel = path.isAbsolute(filePath)
136
137
  ? path.relative(cwd, filePath).split(path.sep).join("/")
137
138
  : filePath.split(path.sep).join("/");
139
+ // Check shared ignore policy (root .gitignore, nested .gitignore, .git/info/exclude,
140
+ // and hard denylist such as .sisyphus) before other pattern checks.
141
+ const policy = createRepoIgnorePolicy(cwd);
142
+ if (policy.isIgnored(rel))
143
+ return false;
138
144
  const paths = loadKbSyncPaths(cwd);
139
145
  // Build include patterns from kibi paths
140
146
  const includeCandidates = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kibi-opencode",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "description": "Kibi OpenCode plugin - thin adapter to integrate Kibi with OpenCode sessions",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -62,7 +62,7 @@
62
62
  "@opencode-ai/plugin": "^1.4.7",
63
63
  "@opentui/core": "^0.1.99",
64
64
  "@opentui/solid": "^0.1.99",
65
- "kibi-cli": "^0.8.0"
65
+ "kibi-cli": "^0.10.0"
66
66
  },
67
67
  "devDependencies": {
68
68
  "@types/node": "latest",