@omp-provider-capabilities/kilo 0.2.0 → 0.3.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/package.json +1 -1
- package/src/index.ts +4 -37
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,51 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Kilo provider extension for OMPv1.
|
|
3
3
|
*
|
|
4
|
-
* Covers: Kilo
|
|
4
|
+
* Covers: Kilo gateway (500+ models from 60+ providers) with Agent SDK wrapper.
|
|
5
5
|
*
|
|
6
6
|
* OMPv1 native: `kilo.kdl` catalog entry.
|
|
7
|
+
* The Kilo Code CLI wrapper was removed — it was a CLI abstraction.
|
|
7
8
|
*/
|
|
8
|
-
import type { ExtensionAPI
|
|
9
|
-
import {
|
|
10
|
-
CredentialResolver,
|
|
11
|
-
} from "@omp-provider-capabilities/core";
|
|
12
|
-
import type { HarnessDriver } from "@omp-provider-capabilities/harness";
|
|
13
|
-
import { createKiloCodeAdapter } from "@omp-provider-capabilities/harness";
|
|
9
|
+
import type { ExtensionAPI } from "@oh-my-pi/pi-coding-agent";
|
|
14
10
|
|
|
15
11
|
export const KILO_PROVIDER_ID = "kilo";
|
|
16
12
|
|
|
17
|
-
export interface KiloCapabilities {
|
|
18
|
-
/** Kilo Code harness adapter (ACP) */
|
|
19
|
-
kiloCode: HarnessDriver;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
13
|
export default function kiloExtension(pi: ExtensionAPI) {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
let kiloCodeAdapter: HarnessDriver | null = null;
|
|
26
|
-
|
|
27
|
-
pi.on("session_start", async (_event, ctx) => {
|
|
14
|
+
pi.on("session_start", async () => {
|
|
28
15
|
pi.logger.debug("Kilo provider extension loaded");
|
|
29
|
-
const creds = await credentialResolver.resolveForProvider("kilo", ctx);
|
|
30
|
-
if (creds) {
|
|
31
|
-
kiloCodeAdapter = createKiloCodeAdapter();
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
pi.registerTool({
|
|
36
|
-
name: "kilo_spawn",
|
|
37
|
-
label: "Kilo Code Spawn",
|
|
38
|
-
description: "Spawn a task via Kilo Code harness (ACP).",
|
|
39
|
-
parameters: pi.zod.object({
|
|
40
|
-
task: pi.zod.string().describe("Task description"),
|
|
41
|
-
}),
|
|
42
|
-
async execute(_toolCallId, params, _signal, _onUpdate, _ctx) {
|
|
43
|
-
const p = params as { task: string };
|
|
44
|
-
if (!kiloCodeAdapter) {
|
|
45
|
-
return { content: [{ type: "text", text: "Kilo Code adapter not available." }], isError: true };
|
|
46
|
-
}
|
|
47
|
-
return { content: [{ type: "text", text: `Kilo Code adapter ready for: ${p.task}` }] };
|
|
48
|
-
},
|
|
49
16
|
});
|
|
50
17
|
|
|
51
18
|
pi.on("session_shutdown", async () => {
|