ns-omp-provider-kiro 0.1.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.
@@ -0,0 +1,10 @@
1
+ import type { Message, Tool } from "@oh-my-pi/pi-ai";
2
+ import type { KiroMessage, KiroTool } from "ns-kiro-core";
3
+ /**
4
+ * OMP carries block kinds this provider has no wire slot for — redacted
5
+ * thinking, Anthropic fallback markers, verbatim server-tool blocks. They are
6
+ * dropped rather than flattened into text: Kiro would read invented markup back
7
+ * as the model's own prior speech.
8
+ */
9
+ export declare function toKiroMessages(messages: Message[]): KiroMessage[];
10
+ export declare function toKiroTools(tools: Tool[] | undefined): KiroTool[] | undefined;
@@ -0,0 +1,20 @@
1
+ import type { Model } from "@oh-my-pi/pi-ai";
2
+ import { type KiroModel } from "ns-kiro-core";
3
+ /** The subset of OMP's `ProviderModelConfig` this provider fills in. */
4
+ export interface OmpKiroModelConfig {
5
+ id: string;
6
+ name: string;
7
+ reasoning: boolean;
8
+ thinking?: Model["thinking"];
9
+ input: ("text" | "image")[];
10
+ cost: {
11
+ input: number;
12
+ output: number;
13
+ cacheRead: number;
14
+ cacheWrite: number;
15
+ };
16
+ contextWindow: number;
17
+ maxTokens: number;
18
+ }
19
+ export declare function toOmpModelConfig(model: KiroModel): OmpKiroModelConfig;
20
+ export declare function kiroBaseUrl(region: string): string;
@@ -0,0 +1,2 @@
1
+ import type { Api, AssistantMessageEventStream, Context, Model, SimpleStreamOptions } from "@oh-my-pi/pi-ai";
2
+ export declare function streamKiroForOmp(model: Model<Api>, context: Context, options?: SimpleStreamOptions): AssistantMessageEventStream;
@@ -0,0 +1,11 @@
1
+ import type { UsageProvider, UsageReport } from "@oh-my-pi/pi-ai";
2
+ import { type KiroProviderUsage } from "ns-kiro-core";
3
+ /**
4
+ * OMP's `/settings` usage panel over Kiro's GetUsageLimits response.
5
+ *
6
+ * The credential arrives from the host's auth storage rather than the kiro-cli
7
+ * store, because a user may hold several Kiro accounts and the panel reports
8
+ * the one it is asking about.
9
+ */
10
+ export declare function toUsageReport(provider: string, usage: KiroProviderUsage, fetchedAt?: number): UsageReport;
11
+ export declare const kiroUsageProvider: UsageProvider;
package/package.json ADDED
@@ -0,0 +1,63 @@
1
+ {
2
+ "name": "ns-omp-provider-kiro",
3
+ "version": "0.1.0",
4
+ "description": "OMP extension for the Kiro API (AWS CodeWhisperer/Q) — kiro-cli-verified models with credential reuse",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "license": "MIT",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/ngosangns/ns-kiro-provider.git",
12
+ "directory": "packages/omp-provider-kiro"
13
+ },
14
+ "keywords": [
15
+ "omp",
16
+ "omp-plugin",
17
+ "oh-my-pi",
18
+ "pi",
19
+ "kiro",
20
+ "aws",
21
+ "codewhisperer",
22
+ "ai",
23
+ "provider"
24
+ ],
25
+ "omp": {
26
+ "extensions": [
27
+ "./dist/index.js"
28
+ ]
29
+ },
30
+ "pi": {
31
+ "extensions": [
32
+ "./dist/index.js"
33
+ ]
34
+ },
35
+ "files": [
36
+ "dist",
37
+ "README.md"
38
+ ],
39
+ "dependencies": {
40
+ "ns-kiro-core": "0.1.0"
41
+ },
42
+ "peerDependencies": {
43
+ "@oh-my-pi/pi-ai": ">=18.1.0",
44
+ "@oh-my-pi/pi-coding-agent": ">=18.1.0"
45
+ },
46
+ "peerDependenciesMeta": {
47
+ "@oh-my-pi/pi-ai": {
48
+ "optional": true
49
+ },
50
+ "@oh-my-pi/pi-coding-agent": {
51
+ "optional": true
52
+ }
53
+ },
54
+ "devDependencies": {
55
+ "@oh-my-pi/pi-ai": "18.1.5",
56
+ "@oh-my-pi/pi-coding-agent": "18.1.5",
57
+ "@types/node": "^22.10.0"
58
+ },
59
+ "scripts": {
60
+ "build": "esbuild src/index.ts --bundle --platform=node --format=esm --outfile=dist/index.js --banner:js=\"import{createRequire as __kiroCreateRequire}from'node:module';const require=__kiroCreateRequire(import.meta.url);\" --external:@oh-my-pi/pi-ai --external:@oh-my-pi/pi-catalog --external:@oh-my-pi/pi-coding-agent --external:@oh-my-pi/pi-tui && tsc -p tsconfig.json --emitDeclarationOnly",
61
+ "check": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.test.json"
62
+ }
63
+ }