@javargasm/pi-kiro 0.4.2 → 0.4.3
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/CHANGELOG.md +6 -0
- package/dist/core.js +23 -10
- package/dist/extension.d.ts.map +1 -1
- package/dist/extension.js +32 -12
- package/dist/models.d.ts +1 -1
- package/dist/models.d.ts.map +1 -1
- package/dist/stream.d.ts +8 -0
- package/dist/stream.d.ts.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Port profileArn improvements from opencode-kiro: seed profileArn cache from auth.json on startup to avoid ListAvailableProfiles round-trip, add fallbackProfileArn parameter to fetchAvailableModels, and declare supportsThinkingConfig on Claude 4.6+/4.7/4.8/Fable 5 static models.
|
|
8
|
+
|
|
3
9
|
## 0.4.2
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/core.js
CHANGED
|
@@ -1345,6 +1345,9 @@ function abortableDelay(ms, signal) {
|
|
|
1345
1345
|
}
|
|
1346
1346
|
var profileArnCache = new Map;
|
|
1347
1347
|
var profileArnSkipResolution = false;
|
|
1348
|
+
function seedProfileArn(endpoint, arn) {
|
|
1349
|
+
profileArnCache.set(endpoint, arn);
|
|
1350
|
+
}
|
|
1348
1351
|
async function resolveProfileArn(accessToken, endpoint) {
|
|
1349
1352
|
if (profileArnSkipResolution)
|
|
1350
1353
|
return;
|
|
@@ -2344,7 +2347,8 @@ var kiroModels = [
|
|
|
2344
2347
|
contextWindow: 1e6,
|
|
2345
2348
|
maxTokens: 128000,
|
|
2346
2349
|
firstTokenTimeout: 180000,
|
|
2347
|
-
supportedEfforts: ["low", "medium", "high", "xhigh", "max"]
|
|
2350
|
+
supportedEfforts: ["low", "medium", "high", "xhigh", "max"],
|
|
2351
|
+
supportsThinkingConfig: true
|
|
2348
2352
|
},
|
|
2349
2353
|
{
|
|
2350
2354
|
...KIRO_DEFAULTS,
|
|
@@ -2355,7 +2359,8 @@ var kiroModels = [
|
|
|
2355
2359
|
contextWindow: 1e6,
|
|
2356
2360
|
maxTokens: 128000,
|
|
2357
2361
|
firstTokenTimeout: 180000,
|
|
2358
|
-
supportedEfforts: ["low", "medium", "high", "xhigh", "max"]
|
|
2362
|
+
supportedEfforts: ["low", "medium", "high", "xhigh", "max"],
|
|
2363
|
+
supportsThinkingConfig: true
|
|
2359
2364
|
},
|
|
2360
2365
|
{
|
|
2361
2366
|
...KIRO_DEFAULTS,
|
|
@@ -2366,7 +2371,8 @@ var kiroModels = [
|
|
|
2366
2371
|
contextWindow: 1e6,
|
|
2367
2372
|
maxTokens: 128000,
|
|
2368
2373
|
firstTokenTimeout: 180000,
|
|
2369
|
-
supportedEfforts: ["low", "medium", "high", "xhigh", "max"]
|
|
2374
|
+
supportedEfforts: ["low", "medium", "high", "xhigh", "max"],
|
|
2375
|
+
supportsThinkingConfig: true
|
|
2370
2376
|
},
|
|
2371
2377
|
{
|
|
2372
2378
|
...KIRO_DEFAULTS,
|
|
@@ -2376,7 +2382,8 @@ var kiroModels = [
|
|
|
2376
2382
|
input: MULTIMODAL,
|
|
2377
2383
|
contextWindow: 1e6,
|
|
2378
2384
|
maxTokens: 64000,
|
|
2379
|
-
supportedEfforts: ["low", "medium", "high", "max"]
|
|
2385
|
+
supportedEfforts: ["low", "medium", "high", "max"],
|
|
2386
|
+
supportsThinkingConfig: true
|
|
2380
2387
|
},
|
|
2381
2388
|
{
|
|
2382
2389
|
...KIRO_DEFAULTS,
|
|
@@ -2386,7 +2393,8 @@ var kiroModels = [
|
|
|
2386
2393
|
input: MULTIMODAL,
|
|
2387
2394
|
contextWindow: 1e6,
|
|
2388
2395
|
maxTokens: 64000,
|
|
2389
|
-
supportedEfforts: ["low", "medium", "high", "max"]
|
|
2396
|
+
supportedEfforts: ["low", "medium", "high", "max"],
|
|
2397
|
+
supportsThinkingConfig: true
|
|
2390
2398
|
},
|
|
2391
2399
|
{
|
|
2392
2400
|
...KIRO_DEFAULTS,
|
|
@@ -2396,7 +2404,8 @@ var kiroModels = [
|
|
|
2396
2404
|
input: MULTIMODAL,
|
|
2397
2405
|
contextWindow: 1e6,
|
|
2398
2406
|
maxTokens: 64000,
|
|
2399
|
-
supportedEfforts: ["low", "medium", "high", "max"]
|
|
2407
|
+
supportedEfforts: ["low", "medium", "high", "max"],
|
|
2408
|
+
supportsThinkingConfig: true
|
|
2400
2409
|
},
|
|
2401
2410
|
{
|
|
2402
2411
|
...KIRO_DEFAULTS,
|
|
@@ -2406,7 +2415,8 @@ var kiroModels = [
|
|
|
2406
2415
|
input: MULTIMODAL,
|
|
2407
2416
|
contextWindow: 1e6,
|
|
2408
2417
|
maxTokens: 64000,
|
|
2409
|
-
supportedEfforts: ["low", "medium", "high", "max"]
|
|
2418
|
+
supportedEfforts: ["low", "medium", "high", "max"],
|
|
2419
|
+
supportsThinkingConfig: true
|
|
2410
2420
|
},
|
|
2411
2421
|
{
|
|
2412
2422
|
...KIRO_DEFAULTS,
|
|
@@ -2544,9 +2554,12 @@ var kiroModels = [
|
|
|
2544
2554
|
maxTokens: 65536
|
|
2545
2555
|
}
|
|
2546
2556
|
];
|
|
2547
|
-
async function fetchAvailableModels(accessToken, apiRegion) {
|
|
2557
|
+
async function fetchAvailableModels(accessToken, apiRegion, fallbackProfileArn) {
|
|
2548
2558
|
const runtimeUrl = `https://runtime.${apiRegion}.kiro.dev/`;
|
|
2549
|
-
|
|
2559
|
+
let profileArn = await resolveProfileArn(accessToken, runtimeUrl);
|
|
2560
|
+
if (!profileArn && fallbackProfileArn) {
|
|
2561
|
+
profileArn = fallbackProfileArn;
|
|
2562
|
+
}
|
|
2550
2563
|
if (!profileArn) {
|
|
2551
2564
|
throw new Error("Missing profileArn: cannot fetch available models.");
|
|
2552
2565
|
}
|
|
@@ -2780,7 +2793,7 @@ Alternatively, use 'desktop' to paste a refresh token manually.`);
|
|
|
2780
2793
|
callbacks.onProgress?.(`Imported from Kiro IDE (${imported.authMethod}, ${imported.region}${imported.email ? `, ${imported.email}` : ""})`);
|
|
2781
2794
|
try {
|
|
2782
2795
|
const apiRegion = resolveApiRegion(imported.region);
|
|
2783
|
-
const apiModels = await fetchAvailableModels(imported.accessToken, apiRegion);
|
|
2796
|
+
const apiModels = await fetchAvailableModels(imported.accessToken, apiRegion, imported.profileArn);
|
|
2784
2797
|
setCachedDynamicModels(buildModelsFromApi(apiModels));
|
|
2785
2798
|
log.info(`Fetched and cached ${apiModels.length} models after CLI sync`);
|
|
2786
2799
|
} catch (err) {
|
package/dist/extension.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extension.d.ts","sourceRoot":"","sources":["../src/extension.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EACV,GAAG,EACH,2BAA2B,EAC3B,OAAO,EACP,KAAK,EACL,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,uBAAuB,CAAC;AAsB/B,UAAU,mBAAmB;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,GAAG,CAAC;IACV,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,CAAC,MAAM,GAAG,OAAO,CAAC,EAAE,CAAC;IAC5B,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/E,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,MAAM,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,QAAQ,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AE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAC/B,KAAK,CAAC,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,CAAC,SAAS,EAAE,mBAAmB,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAC;QACrE,YAAY,EAAE,CAAC,WAAW,EAAE,gBAAgB,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAC;QAC3E,SAAS,EAAE,CAAC,WAAW,EAAE,gBAAgB,KAAK,MAAM,CAAC;QACrD,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,EAAE,EAAE,WAAW,EAAE,gBAAgB,KAAK,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;KACtF,CAAC;CACH;AAED,UAAU,YAAY;IACpB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,GAAG,IAAI,CAAC;CAC9D;AAuED,yBAA+B,EAAE,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CA4D9D"}
|
package/dist/extension.js
CHANGED
|
@@ -1347,6 +1347,9 @@ function abortableDelay(ms, signal) {
|
|
|
1347
1347
|
}
|
|
1348
1348
|
var profileArnCache = new Map;
|
|
1349
1349
|
var profileArnSkipResolution = false;
|
|
1350
|
+
function seedProfileArn(endpoint, arn) {
|
|
1351
|
+
profileArnCache.set(endpoint, arn);
|
|
1352
|
+
}
|
|
1350
1353
|
async function resolveProfileArn(accessToken, endpoint) {
|
|
1351
1354
|
if (profileArnSkipResolution)
|
|
1352
1355
|
return;
|
|
@@ -2346,7 +2349,8 @@ var kiroModels = [
|
|
|
2346
2349
|
contextWindow: 1e6,
|
|
2347
2350
|
maxTokens: 128000,
|
|
2348
2351
|
firstTokenTimeout: 180000,
|
|
2349
|
-
supportedEfforts: ["low", "medium", "high", "xhigh", "max"]
|
|
2352
|
+
supportedEfforts: ["low", "medium", "high", "xhigh", "max"],
|
|
2353
|
+
supportsThinkingConfig: true
|
|
2350
2354
|
},
|
|
2351
2355
|
{
|
|
2352
2356
|
...KIRO_DEFAULTS,
|
|
@@ -2357,7 +2361,8 @@ var kiroModels = [
|
|
|
2357
2361
|
contextWindow: 1e6,
|
|
2358
2362
|
maxTokens: 128000,
|
|
2359
2363
|
firstTokenTimeout: 180000,
|
|
2360
|
-
supportedEfforts: ["low", "medium", "high", "xhigh", "max"]
|
|
2364
|
+
supportedEfforts: ["low", "medium", "high", "xhigh", "max"],
|
|
2365
|
+
supportsThinkingConfig: true
|
|
2361
2366
|
},
|
|
2362
2367
|
{
|
|
2363
2368
|
...KIRO_DEFAULTS,
|
|
@@ -2368,7 +2373,8 @@ var kiroModels = [
|
|
|
2368
2373
|
contextWindow: 1e6,
|
|
2369
2374
|
maxTokens: 128000,
|
|
2370
2375
|
firstTokenTimeout: 180000,
|
|
2371
|
-
supportedEfforts: ["low", "medium", "high", "xhigh", "max"]
|
|
2376
|
+
supportedEfforts: ["low", "medium", "high", "xhigh", "max"],
|
|
2377
|
+
supportsThinkingConfig: true
|
|
2372
2378
|
},
|
|
2373
2379
|
{
|
|
2374
2380
|
...KIRO_DEFAULTS,
|
|
@@ -2378,7 +2384,8 @@ var kiroModels = [
|
|
|
2378
2384
|
input: MULTIMODAL,
|
|
2379
2385
|
contextWindow: 1e6,
|
|
2380
2386
|
maxTokens: 64000,
|
|
2381
|
-
supportedEfforts: ["low", "medium", "high", "max"]
|
|
2387
|
+
supportedEfforts: ["low", "medium", "high", "max"],
|
|
2388
|
+
supportsThinkingConfig: true
|
|
2382
2389
|
},
|
|
2383
2390
|
{
|
|
2384
2391
|
...KIRO_DEFAULTS,
|
|
@@ -2388,7 +2395,8 @@ var kiroModels = [
|
|
|
2388
2395
|
input: MULTIMODAL,
|
|
2389
2396
|
contextWindow: 1e6,
|
|
2390
2397
|
maxTokens: 64000,
|
|
2391
|
-
supportedEfforts: ["low", "medium", "high", "max"]
|
|
2398
|
+
supportedEfforts: ["low", "medium", "high", "max"],
|
|
2399
|
+
supportsThinkingConfig: true
|
|
2392
2400
|
},
|
|
2393
2401
|
{
|
|
2394
2402
|
...KIRO_DEFAULTS,
|
|
@@ -2398,7 +2406,8 @@ var kiroModels = [
|
|
|
2398
2406
|
input: MULTIMODAL,
|
|
2399
2407
|
contextWindow: 1e6,
|
|
2400
2408
|
maxTokens: 64000,
|
|
2401
|
-
supportedEfforts: ["low", "medium", "high", "max"]
|
|
2409
|
+
supportedEfforts: ["low", "medium", "high", "max"],
|
|
2410
|
+
supportsThinkingConfig: true
|
|
2402
2411
|
},
|
|
2403
2412
|
{
|
|
2404
2413
|
...KIRO_DEFAULTS,
|
|
@@ -2408,7 +2417,8 @@ var kiroModels = [
|
|
|
2408
2417
|
input: MULTIMODAL,
|
|
2409
2418
|
contextWindow: 1e6,
|
|
2410
2419
|
maxTokens: 64000,
|
|
2411
|
-
supportedEfforts: ["low", "medium", "high", "max"]
|
|
2420
|
+
supportedEfforts: ["low", "medium", "high", "max"],
|
|
2421
|
+
supportsThinkingConfig: true
|
|
2412
2422
|
},
|
|
2413
2423
|
{
|
|
2414
2424
|
...KIRO_DEFAULTS,
|
|
@@ -2546,9 +2556,12 @@ var kiroModels = [
|
|
|
2546
2556
|
maxTokens: 65536
|
|
2547
2557
|
}
|
|
2548
2558
|
];
|
|
2549
|
-
async function fetchAvailableModels(accessToken, apiRegion) {
|
|
2559
|
+
async function fetchAvailableModels(accessToken, apiRegion, fallbackProfileArn) {
|
|
2550
2560
|
const runtimeUrl = `https://runtime.${apiRegion}.kiro.dev/`;
|
|
2551
|
-
|
|
2561
|
+
let profileArn = await resolveProfileArn(accessToken, runtimeUrl);
|
|
2562
|
+
if (!profileArn && fallbackProfileArn) {
|
|
2563
|
+
profileArn = fallbackProfileArn;
|
|
2564
|
+
}
|
|
2552
2565
|
if (!profileArn) {
|
|
2553
2566
|
throw new Error("Missing profileArn: cannot fetch available models.");
|
|
2554
2567
|
}
|
|
@@ -2783,7 +2796,7 @@ Alternatively, use 'desktop' to paste a refresh token manually.`);
|
|
|
2783
2796
|
callbacks.onProgress?.(`Imported from Kiro IDE (${imported.authMethod}, ${imported.region}${imported.email ? `, ${imported.email}` : ""})`);
|
|
2784
2797
|
try {
|
|
2785
2798
|
const apiRegion = resolveApiRegion(imported.region);
|
|
2786
|
-
const apiModels = await fetchAvailableModels(imported.accessToken, apiRegion);
|
|
2799
|
+
const apiModels = await fetchAvailableModels(imported.accessToken, apiRegion, imported.profileArn);
|
|
2787
2800
|
setCachedDynamicModels(buildModelsFromApi(apiModels));
|
|
2788
2801
|
log.info(`Fetched and cached ${apiModels.length} models after CLI sync`);
|
|
2789
2802
|
} catch (err) {
|
|
@@ -3114,9 +3127,12 @@ function readKiroCredentials() {
|
|
|
3114
3127
|
log.warn(`Failed to self-heal auth.json: ${e}`);
|
|
3115
3128
|
}
|
|
3116
3129
|
}
|
|
3130
|
+
const metadata = kiro.metadata;
|
|
3131
|
+
const profileArn = typeof metadata?.profileArn === "string" ? metadata.profileArn : undefined;
|
|
3117
3132
|
return {
|
|
3118
3133
|
access: kiro.access,
|
|
3119
|
-
region: kiro.region || "us-east-1"
|
|
3134
|
+
region: kiro.region || "us-east-1",
|
|
3135
|
+
profileArn
|
|
3120
3136
|
};
|
|
3121
3137
|
} catch {
|
|
3122
3138
|
return null;
|
|
@@ -3128,7 +3144,11 @@ async function extension_default(pi) {
|
|
|
3128
3144
|
if (creds) {
|
|
3129
3145
|
try {
|
|
3130
3146
|
const apiRegion = resolveApiRegion(creds.region);
|
|
3131
|
-
|
|
3147
|
+
if (creds.profileArn) {
|
|
3148
|
+
const runtimeUrl = resolveRuntimeUrl(apiRegion);
|
|
3149
|
+
seedProfileArn(runtimeUrl + "/", creds.profileArn);
|
|
3150
|
+
}
|
|
3151
|
+
const apiModels = await fetchAvailableModels(creds.access, apiRegion, creds.profileArn);
|
|
3132
3152
|
const dynamicDefs = buildModelsFromApi(apiModels);
|
|
3133
3153
|
setCachedDynamicModels(dynamicDefs);
|
|
3134
3154
|
modelDefs = toProviderModels(dynamicDefs);
|
package/dist/models.d.ts
CHANGED
|
@@ -98,7 +98,7 @@ export interface KiroApiModel {
|
|
|
98
98
|
* Filters out "auto" — it appears in ListAvailableModels but is rejected
|
|
99
99
|
* by GenerateAssistantResponse with INVALID_MODEL_ID.
|
|
100
100
|
*/
|
|
101
|
-
export declare function fetchAvailableModels(accessToken: string, apiRegion: string): Promise<KiroApiModel[]>;
|
|
101
|
+
export declare function fetchAvailableModels(accessToken: string, apiRegion: string, fallbackProfileArn?: string): Promise<KiroApiModel[]>;
|
|
102
102
|
export interface KiroModelDef {
|
|
103
103
|
id: string;
|
|
104
104
|
name: string;
|
package/dist/models.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../src/models.ts"],"names":[],"mappings":"AAQA,gEAAgE;AAChE,eAAO,MAAM,cAAc,aAuBzB,CAAC;AAEH,0EAA0E;AAC1E,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED,sEAAsE;AACtE,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED,0EAA0E;AAC1E,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAMxD;AA8BD,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAGtE;AAiDD,wBAAgB,oBAAoB,CAAC,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,EAC3D,MAAM,EAAE,CAAC,EAAE,EACX,SAAS,EAAE,MAAM,GAChB,CAAC,EAAE,CASL;AAQD,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAE3D;AAaD,KAAK,KAAK,GAAG,CAAC,MAAM,GAAG,OAAO,CAAC,EAAE,CAAC;AAIlC,MAAM,WAAW,SAAS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NTDOWN_MS = 2000;
|
|
|
15
15
|
* without disabling resolution.
|
|
16
16
|
*/
|
|
17
17
|
export declare function resetProfileArnCache(skipResolution?: boolean): void;
|
|
18
|
+
/**
|
|
19
|
+
* Pre-seed the profileArn cache for a given endpoint. When set,
|
|
20
|
+
* `resolveProfileArn` returns the seeded value without hitting the
|
|
21
|
+
* management endpoint. Use this to inject a known profileArn from
|
|
22
|
+
* external sources (e.g. Kiro CLI auth.json) as a fallback when the
|
|
23
|
+
* management API returns 400.
|
|
24
|
+
*/
|
|
25
|
+
export declare function seedProfileArn(endpoint: string, arn: string): void;
|
|
18
26
|
export declare function resolveProfileArn(accessToken: string, endpoint: string): Promise<string | undefined>;
|
|
19
27
|
export declare function streamKiro(model: Model<Api>, context: Context, options?: SimpleStreamOptions): AssistantMessageEventStream;
|
|
20
28
|
//# sourceMappingURL=stream.d.ts.map
|
package/dist/stream.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stream.d.ts","sourceRoot":"","sources":["../src/stream.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,GAAG,EAEH,2BAA2B,EAC3B,OAAO,EAEP,KAAK,EACL,mBAAmB,EAKpB,MAAM,uBAAuB,CAAC;AA4F/B;;;;;;;GAOG;AACH,eAAO,MAAM,6BAA6B,OAAO,CAAC;AA+DlD;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,cAAc,UAAQ,GAAG,IAAI,CAGjE;AAED,wBAAsB,iBAAiB,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAuC1G;AA2PD,wBAAgB,UAAU,CACxB,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,EACjB,OAAO,EAAE,OAAO,EAChB,OAAO,CAAC,EAAE,mBAAmB,GAC5B,2BAA2B,CAq1B7B"}
|
|
1
|
+
{"version":3,"file":"stream.d.ts","sourceRoot":"","sources":["../src/stream.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,GAAG,EAEH,2BAA2B,EAC3B,OAAO,EAEP,KAAK,EACL,mBAAmB,EAKpB,MAAM,uBAAuB,CAAC;AA4F/B;;;;;;;GAOG;AACH,eAAO,MAAM,6BAA6B,OAAO,CAAC;AA+DlD;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,cAAc,UAAQ,GAAG,IAAI,CAGjE;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAElE;AAED,wBAAsB,iBAAiB,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAuC1G;AA2PD,wBAAgB,UAAU,CACxB,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,EACjB,OAAO,EAAE,OAAO,EAChB,OAAO,CAAC,EAAE,mBAAmB,GAC5B,2BAA2B,CAq1B7B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@javargasm/pi-kiro",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"description": "Kiro provider for the pi coding agent: AWS Builder ID / IAM Identity Center login and the CodeWhisperer streaming API, exposing the Kiro Claude model family.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|