@omp-provider-capabilities/kiro 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
|
* Kiro provider extension for OMPv1.
|
|
3
3
|
*
|
|
4
|
-
* Covers: Kiro
|
|
4
|
+
* Covers: Kiro models with Agent SDK wrapper.
|
|
5
5
|
*
|
|
6
6
|
* OMPv1 native: `kiro.kdl` catalog, `kiro/stream.ts` AI provider.
|
|
7
|
+
* The Kiro 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 { createKiroAdapter } from "@omp-provider-capabilities/harness";
|
|
9
|
+
import type { ExtensionAPI } from "@oh-my-pi/pi-coding-agent";
|
|
14
10
|
|
|
15
11
|
export const KIRO_PROVIDER_ID = "kiro";
|
|
16
12
|
|
|
17
|
-
export interface KiroCapabilities {
|
|
18
|
-
/** Kiro harness adapter (ACP) */
|
|
19
|
-
kiro: HarnessDriver;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
13
|
export default function kiroExtension(pi: ExtensionAPI) {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
let kiroAdapter: HarnessDriver | null = null;
|
|
26
|
-
|
|
27
|
-
pi.on("session_start", async (_event, ctx) => {
|
|
14
|
+
pi.on("session_start", async () => {
|
|
28
15
|
pi.logger.debug("Kiro provider extension loaded");
|
|
29
|
-
const creds = await credentialResolver.resolveForProvider("kiro", ctx);
|
|
30
|
-
if (creds) {
|
|
31
|
-
kiroAdapter = createKiroAdapter();
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
pi.registerTool({
|
|
36
|
-
name: "kiro_spawn",
|
|
37
|
-
label: "Kiro Spawn",
|
|
38
|
-
description: "Spawn a task via Kiro 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 (!kiroAdapter) {
|
|
45
|
-
return { content: [{ type: "text", text: "Kiro adapter not available." }], isError: true };
|
|
46
|
-
}
|
|
47
|
-
return { content: [{ type: "text", text: `Kiro adapter ready for: ${p.task}` }] };
|
|
48
|
-
},
|
|
49
16
|
});
|
|
50
17
|
|
|
51
18
|
pi.on("session_shutdown", async () => {
|