kibi-opencode 0.12.0 → 0.12.1
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/dist/plugin.js +14 -1
- package/dist/prompt.js +6 -3
- package/dist/scheduler.js +2 -0
- package/dist/startup-notifier.js +4 -1
- package/package.json +2 -2
package/dist/plugin.js
CHANGED
|
@@ -43,6 +43,17 @@ function resolveIdleBriefDeliveryDelayMs(worktree) {
|
|
|
43
43
|
return 0;
|
|
44
44
|
return Math.min(60_000, Math.trunc(configValue));
|
|
45
45
|
}
|
|
46
|
+
function readKibiOpencodePackageVersion() {
|
|
47
|
+
try {
|
|
48
|
+
const packageJson = JSON.parse(fs.readFileSync(new URL("../package.json", import.meta.url), "utf-8"));
|
|
49
|
+
return typeof packageJson.version === "string"
|
|
50
|
+
? packageJson.version
|
|
51
|
+
: undefined;
|
|
52
|
+
}
|
|
53
|
+
catch {
|
|
54
|
+
return undefined;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
46
57
|
const startupNotifyGlobals = globalThis;
|
|
47
58
|
/**
|
|
48
59
|
* Lint requirement documents for embedded scenarios/tests and oversized content.
|
|
@@ -961,7 +972,7 @@ const kibiOpencodePlugin = async (input) => {
|
|
|
961
972
|
overlay_cause: runtimeOverlay.primaryCause ?? null,
|
|
962
973
|
});
|
|
963
974
|
// Emit completion-reminder log only when prompt-visible reminder text is present
|
|
964
|
-
const REMINDER_TEXT = "
|
|
975
|
+
const REMINDER_TEXT = "Kibi impact evidence is required before completion/commit: run `kb_check` before completing this task.";
|
|
965
976
|
if (cfg.guidance.smartEnforcement.completionReminder &&
|
|
966
977
|
!maintenanceDegraded &&
|
|
967
978
|
guidance.includes(REMINDER_TEXT)) {
|
|
@@ -1057,9 +1068,11 @@ const kibiOpencodePlugin = async (input) => {
|
|
|
1057
1068
|
setTimeout(callback, delayMs);
|
|
1058
1069
|
});
|
|
1059
1070
|
scheduleStartupNotify(() => {
|
|
1071
|
+
const version = readKibiOpencodePackageVersion();
|
|
1060
1072
|
notifyStartup(makeStartupClient(client), {
|
|
1061
1073
|
suppressToast: cfg.ux.toastStartup === false,
|
|
1062
1074
|
directory: input.directory,
|
|
1075
|
+
...(version ? { version } : {}),
|
|
1063
1076
|
});
|
|
1064
1077
|
}, 2000);
|
|
1065
1078
|
}
|
package/dist/prompt.js
CHANGED
|
@@ -131,13 +131,15 @@ Requirement edits need policy alignment. Run kb_check with required-fields and n
|
|
|
131
131
|
|
|
132
132
|
Production code: use \`implements\` (symbol→req) for requirement ownership. Test code: use \`executable_for\` (symbol→test).
|
|
133
133
|
- \`covered_by\` is coverage evidence only
|
|
134
|
-
- Prefer scenario-first: req→scenario→test when scenarios exist
|
|
134
|
+
- Prefer scenario-first: req→scenario→test when scenarios exist
|
|
135
|
+
- Kibi impact evidence is required before completion/commit`,
|
|
135
136
|
traceability_candidate: `📝 **Code changes detected**
|
|
136
137
|
|
|
137
138
|
Production code: use \`implements\` (symbol→req) for requirement ownership. Test code: use \`executable_for\` (symbol→test).
|
|
138
139
|
- \`covered_by\` is coverage evidence only
|
|
139
140
|
- Prefer scenario-first: req→scenario→test when scenarios exist
|
|
140
|
-
- Route durable knowledge comments to KB entities, not inline comments
|
|
141
|
+
- Route durable knowledge comments to KB entities, not inline comments
|
|
142
|
+
- documentation/symbols.yaml refresh is required when extraction output changes; do not revert as scope creep`,
|
|
141
143
|
manual_kb_edit: `⚠️ **WARNING: Direct .kb/ edits bypass validation**
|
|
142
144
|
|
|
143
145
|
The Kibi knowledge base is managed through public MCP tools. Direct manual edits to .kb/** can cause inconsistencies.
|
|
@@ -426,7 +428,7 @@ The Kibi workspace is in a maintenance-degraded state. Guidance remains advisory
|
|
|
426
428
|
REMINDER_RISK_CLASSES.includes(riskClass) &&
|
|
427
429
|
posture !== "root_uninitialized" &&
|
|
428
430
|
posture !== "root_partial") {
|
|
429
|
-
finalBlock = `${finalBlock}\n-
|
|
431
|
+
finalBlock = `${finalBlock}\n- Kibi impact evidence is required before completion/commit: run \`kb_check\` before completing this task.`;
|
|
430
432
|
}
|
|
431
433
|
// Return: sentinel + one targeted block (or just sentinel if no block)
|
|
432
434
|
return finalBlock
|
|
@@ -502,6 +504,7 @@ Dogfood note for this repo: OpenCode here uses local built \`kibi-mcp\` and \`ki
|
|
|
502
504
|
4. **Document intent**: If you are about to explain code, STOP. Route that explanation to kb_upsert instead of inline comments.
|
|
503
505
|
5. **Link during work**: When creating KB entities, include relationship rows: specified_by (req→scenario), implements (symbol→req for ownership), covered_by (symbol→test for coverage), executable_for (test code→test).
|
|
504
506
|
6. **Validate**: Run kb_check after KB mutations to catch violations early.
|
|
507
|
+
7. **Before completion/commit**: Kibi impact evidence is required before completion/commit. If extraction output changes, refresh documentation/symbols.yaml and do not revert that update as scope creep.
|
|
505
508
|
|
|
506
509
|
**Public Kibi tools only:** kb_autopilot_generate, kb_search, kb_query, kb_status, kb_find_gaps, kb_coverage, kb_graph, kb_upsert, kb_delete, kb_check.\n\nDo not invoke Kibi CLI commands directly from the agent.\n\n${buildInitKibiBootstrapReference(capability)}`;
|
|
507
510
|
}
|
package/dist/scheduler.js
CHANGED
|
@@ -235,6 +235,8 @@ function truncateSyncOutput(value) {
|
|
|
235
235
|
}
|
|
236
236
|
return value;
|
|
237
237
|
}
|
|
238
|
+
// Background sync runner: uses default sync (no --refresh-symbol-coordinates)
|
|
239
|
+
// to avoid writing committed coordinate artifacts during automatic background execution.
|
|
238
240
|
async function runKibiSync(worktree) {
|
|
239
241
|
return new Promise((resolve) => {
|
|
240
242
|
try {
|
package/dist/startup-notifier.js
CHANGED
|
@@ -2,10 +2,13 @@ import { sendToast, } from "./toast.js";
|
|
|
2
2
|
// implements REQ-opencode-kibi-plugin-v1
|
|
3
3
|
export function notifyStartup(client, cfg) {
|
|
4
4
|
const message = "kibi-opencode started";
|
|
5
|
+
const displayMessage = cfg.version
|
|
6
|
+
? `${message} (v${cfg.version})`
|
|
7
|
+
: message;
|
|
5
8
|
const toastPayload = {
|
|
6
9
|
variant: "success",
|
|
7
10
|
title: "Kibi OpenCode",
|
|
8
|
-
message,
|
|
11
|
+
message: displayMessage,
|
|
9
12
|
duration: 4000,
|
|
10
13
|
};
|
|
11
14
|
if (!cfg.suppressToast) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kibi-opencode",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.1",
|
|
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.10.
|
|
65
|
+
"kibi-cli": "^0.10.1"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"@types/node": "latest",
|