kibi-opencode 0.19.4 → 2.0.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 +8 -6
- package/dist/auto-update.d.ts +2 -0
- package/dist/auto-update.js +5 -4
- package/dist/e2e-coverage-signals.js +3 -3
- package/dist/enforcement-policy.d.ts +10 -0
- package/dist/enforcement-policy.js +23 -23
- package/dist/file-entity-links.d.ts +4 -0
- package/dist/file-entity-links.js +6 -4
- package/dist/file-filter.d.ts +9 -9
- package/dist/file-filter.js +16 -68
- package/dist/kibi-bootstrap-alias.d.ts +2 -0
- package/dist/kibi-bootstrap-alias.js +14 -0
- package/dist/kibi-bootstrap-capability.d.ts +34 -0
- package/dist/{init-kibi-capability.js → kibi-bootstrap-capability.js} +26 -16
- package/dist/meaningful-change-classifier.d.ts +1 -0
- package/dist/meaningful-change-classifier.js +40 -10
- package/dist/path-kind.js +21 -39
- package/dist/plugin-startup.js +3 -3
- package/dist/plugin.d.ts +4 -1
- package/dist/plugin.js +81 -374
- package/dist/prompt.d.ts +4 -4
- package/dist/prompt.js +24 -60
- package/dist/repo-posture.js +31 -84
- package/dist/risk-classifier.d.ts +3 -3
- package/dist/risk-classifier.js +9 -6
- package/dist/scheduler.js +2 -2
- package/dist/session-edit-state.d.ts +4 -0
- package/dist/session-edit-state.js +5 -3
- package/dist/smart-enforcement-events.d.ts +100 -0
- package/dist/smart-enforcement-events.js +414 -0
- package/dist/version-metadata.json +1 -1
- package/dist/work-context-resolver.d.ts +10 -0
- package/dist/work-context-resolver.js +15 -17
- package/dist/workspace-health.js +8 -56
- package/package.json +6 -4
- package/dist/init-kibi-alias.d.ts +0 -14
- package/dist/init-kibi-alias.js +0 -43
- package/dist/init-kibi-capability.d.ts +0 -32
package/dist/init-kibi-alias.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Builds the canonical native alias for the Kibi MCP bootstrap workflow.
|
|
3
|
-
* This is a thin wrapper over the MCP-defined workflow, preserving all
|
|
4
|
-
* semantic markers while removing namespacing and keeping text concise.
|
|
5
|
-
*
|
|
6
|
-
* Markers (MUST PRESERVE):
|
|
7
|
-
* - "at most 4 bounded questions"
|
|
8
|
-
* - "kb_autopilot_generate"
|
|
9
|
-
* - "preview" or "approval"
|
|
10
|
-
* - "kb_upsert"
|
|
11
|
-
* - "kb_check"
|
|
12
|
-
* - "sequential" or similar ordering language
|
|
13
|
-
*/
|
|
14
|
-
export function buildInitKibiAlias() {
|
|
15
|
-
const lines = [
|
|
16
|
-
"# /init-kibi: Interactive Activation",
|
|
17
|
-
"",
|
|
18
|
-
"Use this workflow to onboard a new or empty repository into Kibi through interactive discovery.",
|
|
19
|
-
"",
|
|
20
|
-
"## 1. Gather Declared Context",
|
|
21
|
-
"Ask at most 4 bounded questions to gather intent: Project Summary, Source of Truth, Priority Root, and Verification Anchors.",
|
|
22
|
-
"",
|
|
23
|
-
"## 2. Synthesize Candidates",
|
|
24
|
-
"Call `kb_autopilot_generate` with the gathered context to synthesize candidate entities. This tool is **read-only**.",
|
|
25
|
-
"In OpenCode, Kibi MCP tools are host-prefixed: canonical `kb_autopilot_generate`, `kb_upsert`, and `kb_check` may appear as `kibi_kb_autopilot_generate`, `kibi_kb_upsert`, and `kibi_kb_check`.",
|
|
26
|
-
"OpenCode prefixes Kibi MCP tools with `kibi_`; use the visible prefixed name when the host requires exact tool identifiers.",
|
|
27
|
-
"",
|
|
28
|
-
"## 3. Preview and Approval",
|
|
29
|
-
"Present the `promptBlock`, a summary of synthesized `candidates`, and the exact `applyPlan` payloads to the user. **Wait for explicit approval** before proceeding to writes.",
|
|
30
|
-
"",
|
|
31
|
-
"## 4. Apply Approved Candidates",
|
|
32
|
-
"Apply approved candidates sequentially using `kb_upsert` (following ascending phase order). Confirm success of each write before moving to the next. Run `kb_check` after the batch to verify KB integrity.",
|
|
33
|
-
"",
|
|
34
|
-
"## Rules",
|
|
35
|
-
"- Never apply changes without a user-facing preview and approval.",
|
|
36
|
-
"- MCP tools and the trusted project-local CLI are peer surfaces; choose by what is visible and approved here.",
|
|
37
|
-
"- If Kibi MCP tools are visible and approved, use MCP.",
|
|
38
|
-
"- Otherwise, in a trusted workspace, use the project-local CLI's dedicated JSON routes with `--input <file|->`. If neither interface is available, stop and tell the operator.",
|
|
39
|
-
"- Do not infer MCP availability from config file existence. Do not read or edit `.kb/` files directly.",
|
|
40
|
-
"- Query before mutate. Run `kb_upsert` sequentially. Run `kb_check` before completion.",
|
|
41
|
-
];
|
|
42
|
-
return lines.join("\n");
|
|
43
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
export declare const INIT_KIBI_COMMAND_NAME = "init-kibi";
|
|
2
|
-
export declare const INIT_KIBI_COMMAND_TEMPLATE: string;
|
|
3
|
-
export declare const INIT_KIBI_COMMAND_DESCRIPTION = "Run the Kibi interactive activation workflow.";
|
|
4
|
-
export interface OpenCodeCommandDefinition {
|
|
5
|
-
template: string;
|
|
6
|
-
description?: string;
|
|
7
|
-
agent?: string;
|
|
8
|
-
model?: string;
|
|
9
|
-
subtask?: boolean;
|
|
10
|
-
}
|
|
11
|
-
export interface OpenCodeConfigHookInput {
|
|
12
|
-
command?: Record<string, OpenCodeCommandDefinition>;
|
|
13
|
-
[key: string]: unknown;
|
|
14
|
-
}
|
|
15
|
-
export type InitKibiCommandCapability = {
|
|
16
|
-
supported: true;
|
|
17
|
-
pluginVersion: string;
|
|
18
|
-
} | {
|
|
19
|
-
supported: false;
|
|
20
|
-
reason: string;
|
|
21
|
-
pluginVersion?: string;
|
|
22
|
-
};
|
|
23
|
-
interface InitKibiCapabilityDetectionInput {
|
|
24
|
-
pluginVersion?: string;
|
|
25
|
-
pluginHooksDts?: string;
|
|
26
|
-
sdkTypesDts?: string;
|
|
27
|
-
}
|
|
28
|
-
export declare function findSdkPackageJsonForPluginRoot(pluginRoot: string): string | undefined;
|
|
29
|
-
export declare function detectInitKibiCommandCapability(input: InitKibiCapabilityDetectionInput): InitKibiCommandCapability;
|
|
30
|
-
export declare function getInitKibiCommandCapability(): InitKibiCommandCapability;
|
|
31
|
-
export declare function registerInitKibiCommand(configInput: unknown, capability?: InitKibiCommandCapability): InitKibiCommandCapability;
|
|
32
|
-
export {};
|