@akasecurity/ai-tc-codex 0.9.17-beta.1 → 0.9.18
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/.codex-plugin/plugin.json +1 -1
- package/package.json +4 -4
- package/scripts/apply-suppressions.js +371 -59
- package/scripts/backfill.js +472 -73
- package/scripts/content-retention.js +326 -49
- package/scripts/filescan.js +519 -117
- package/scripts/firstrun.js +372 -59
- package/scripts/history-sync.js +333 -49
- package/scripts/intro.js +307 -38
- package/scripts/onboard.js +371 -59
- package/scripts/post-tool-use.js +521 -81
- package/scripts/pre-tool-use.js +503 -74
- package/scripts/query.js +372 -59
- package/scripts/reconcile.js +372 -59
- package/scripts/remediate.js +472 -73
- package/scripts/scan-worker.js +343 -38
- package/scripts/session-start.js +441 -111
- package/scripts/start-light.js +343 -38
- package/scripts/stop.js +346 -39
- package/scripts/sync.js +519 -117
- package/scripts/user-prompt-submit.js +564 -134
package/scripts/pre-tool-use.js
CHANGED
|
@@ -19856,7 +19856,10 @@ function date4(params) {
|
|
|
19856
19856
|
var LongContextTier = external_exports.object({
|
|
19857
19857
|
thresholdInputTokens: external_exports.number().int().positive(),
|
|
19858
19858
|
input: external_exports.number().nonnegative().nullable(),
|
|
19859
|
-
output: external_exports.number().nonnegative().nullable()
|
|
19859
|
+
output: external_exports.number().nonnegative().nullable(),
|
|
19860
|
+
cacheRead: external_exports.number().nonnegative().nullable().optional(),
|
|
19861
|
+
cacheWrite5m: external_exports.number().nonnegative().nullable().optional(),
|
|
19862
|
+
cacheWrite1h: external_exports.number().nonnegative().nullable().optional()
|
|
19860
19863
|
});
|
|
19861
19864
|
var ModelPrice = external_exports.object({
|
|
19862
19865
|
/** USD per 1M uncached input tokens, at or below any long-context threshold. */
|
|
@@ -19865,7 +19868,8 @@ var ModelPrice = external_exports.object({
|
|
|
19865
19868
|
output: external_exports.number().nonnegative(),
|
|
19866
19869
|
/**
|
|
19867
19870
|
* Rate band above a size threshold, or `null` when the model is flat-rated.
|
|
19868
|
-
*
|
|
19871
|
+
* OpenAI, Google, xAI and some Anthropic models (Haiku 5.5) band; most
|
|
19872
|
+
* Claude models are flat across their window.
|
|
19869
19873
|
*/
|
|
19870
19874
|
longContext: LongContextTier.nullable(),
|
|
19871
19875
|
/** USD per 1M tokens written to a 5-minute ephemeral cache, or null if unpriced. */
|
|
@@ -19878,18 +19882,35 @@ var ModelPrice = external_exports.object({
|
|
|
19878
19882
|
webSearch: external_exports.number().nonnegative().nullable()
|
|
19879
19883
|
});
|
|
19880
19884
|
var WEB_SEARCH_PER_REQUEST = 0.01;
|
|
19881
|
-
function anthropicPrice(input2, output2, cacheRead) {
|
|
19885
|
+
function anthropicPrice(input2, output2, cacheRead, longContext = null) {
|
|
19882
19886
|
return Object.freeze({
|
|
19883
19887
|
input: input2,
|
|
19884
19888
|
output: output2,
|
|
19885
|
-
longContext: null,
|
|
19886
|
-
// flat across the full window on every current Claude
|
|
19889
|
+
longContext: longContext === null ? null : Object.freeze(longContext),
|
|
19887
19890
|
cacheWrite5m: input2 * 1.25,
|
|
19888
19891
|
cacheWrite1h: input2 * 2,
|
|
19889
19892
|
cacheRead,
|
|
19890
19893
|
webSearch: WEB_SEARCH_PER_REQUEST
|
|
19891
19894
|
});
|
|
19892
19895
|
}
|
|
19896
|
+
function anthropicBand(thresholdInputTokens, input2, output2, cacheRead) {
|
|
19897
|
+
return {
|
|
19898
|
+
thresholdInputTokens,
|
|
19899
|
+
input: input2,
|
|
19900
|
+
output: output2,
|
|
19901
|
+
cacheRead,
|
|
19902
|
+
cacheWrite5m: input2 * 1.25,
|
|
19903
|
+
cacheWrite1h: input2 * 2
|
|
19904
|
+
};
|
|
19905
|
+
}
|
|
19906
|
+
function scaledBand(thresholdInputTokens, base, scale) {
|
|
19907
|
+
return {
|
|
19908
|
+
thresholdInputTokens,
|
|
19909
|
+
input: base.input * scale.input,
|
|
19910
|
+
output: base.output * scale.output,
|
|
19911
|
+
...base.cacheRead === void 0 ? {} : { cacheRead: base.cacheRead * scale.cacheRead }
|
|
19912
|
+
};
|
|
19913
|
+
}
|
|
19893
19914
|
function tokenPrice(input2, output2, options = {}) {
|
|
19894
19915
|
return Object.freeze({
|
|
19895
19916
|
input: input2,
|
|
@@ -19922,17 +19943,19 @@ function serviceTierMultiplier(tier) {
|
|
|
19922
19943
|
function promptTokensOf(usage) {
|
|
19923
19944
|
return usage.promptTokens ?? (usage.inputTokens ?? 0) + (usage.cacheReadTokens ?? 0) + (usage.cacheWrite1hTokens ?? 0) + (usage.cacheWrite5mTokens ?? 0);
|
|
19924
19945
|
}
|
|
19946
|
+
function bandRate(column, base) {
|
|
19947
|
+
return column === void 0 ? base : column;
|
|
19948
|
+
}
|
|
19925
19949
|
function costOf(price, usage) {
|
|
19950
|
+
const band = price.longContext !== null && promptTokensOf(usage) > price.longContext.thresholdInputTokens ? price.longContext : null;
|
|
19926
19951
|
const metered = [
|
|
19927
|
-
[usage.
|
|
19928
|
-
[usage.
|
|
19929
|
-
[usage.
|
|
19952
|
+
[usage.inputTokens ?? 0, bandRate(band?.input, price.input)],
|
|
19953
|
+
[usage.outputTokens ?? 0, bandRate(band?.output, price.output)],
|
|
19954
|
+
[usage.cacheWrite1hTokens ?? 0, bandRate(band?.cacheWrite1h, price.cacheWrite1h)],
|
|
19955
|
+
[usage.cacheWrite5mTokens ?? 0, bandRate(band?.cacheWrite5m, price.cacheWrite5m)],
|
|
19956
|
+
[usage.cacheReadTokens ?? 0, bandRate(band?.cacheRead, price.cacheRead)]
|
|
19930
19957
|
];
|
|
19931
|
-
|
|
19932
|
-
if (band !== null && (band.input === null || band.output === null)) return null;
|
|
19933
|
-
const inputRate = band?.input ?? price.input;
|
|
19934
|
-
const outputRate = band?.output ?? price.output;
|
|
19935
|
-
let tokenCost = (usage.inputTokens ?? 0) * inputRate + (usage.outputTokens ?? 0) * outputRate;
|
|
19958
|
+
let tokenCost = 0;
|
|
19936
19959
|
for (const [tokens, rate] of metered) {
|
|
19937
19960
|
if (tokens === 0) continue;
|
|
19938
19961
|
if (rate === null) return null;
|
|
@@ -20222,10 +20245,20 @@ anthropic.model("claude-fable-5-1", {
|
|
|
20222
20245
|
});
|
|
20223
20246
|
anthropic.model("claude-fable-5", {
|
|
20224
20247
|
name: "Claude Fable 5",
|
|
20248
|
+
ctx: 1e6,
|
|
20249
|
+
maxOut: 128e3,
|
|
20225
20250
|
capability: "reasoning",
|
|
20226
20251
|
price: anthropicPrice(10, 50, 1),
|
|
20227
20252
|
on: [...CLAUDE_RESELLERS]
|
|
20228
20253
|
});
|
|
20254
|
+
anthropic.model("claude-opus-5-5", {
|
|
20255
|
+
name: "Claude Opus 5.5",
|
|
20256
|
+
ctx: 1e6,
|
|
20257
|
+
maxOut: 128e3,
|
|
20258
|
+
capability: "reasoning",
|
|
20259
|
+
price: anthropicPrice(4, 20, 0.2),
|
|
20260
|
+
on: [...CLAUDE_RESELLERS]
|
|
20261
|
+
});
|
|
20229
20262
|
anthropic.model("claude-opus-5", {
|
|
20230
20263
|
name: "Claude Opus 5",
|
|
20231
20264
|
ctx: 1e6,
|
|
@@ -20236,24 +20269,32 @@ anthropic.model("claude-opus-5", {
|
|
|
20236
20269
|
});
|
|
20237
20270
|
anthropic.model("claude-opus-4-8", {
|
|
20238
20271
|
name: "Claude Opus 4.8",
|
|
20272
|
+
ctx: 1e6,
|
|
20273
|
+
maxOut: 128e3,
|
|
20239
20274
|
capability: "reasoning",
|
|
20240
20275
|
price: anthropicPrice(5, 25, 0.5),
|
|
20241
20276
|
on: [...CLAUDE_RESELLERS]
|
|
20242
20277
|
});
|
|
20243
20278
|
anthropic.model("claude-opus-4-7", {
|
|
20244
20279
|
name: "Claude Opus 4.7",
|
|
20280
|
+
ctx: 1e6,
|
|
20281
|
+
maxOut: 128e3,
|
|
20245
20282
|
capability: "reasoning",
|
|
20246
20283
|
price: anthropicPrice(5, 25, 0.5),
|
|
20247
20284
|
on: [...CLAUDE_RESELLERS]
|
|
20248
20285
|
});
|
|
20249
20286
|
anthropic.model("claude-opus-4-6", {
|
|
20250
20287
|
name: "Claude Opus 4.6",
|
|
20288
|
+
ctx: 1e6,
|
|
20289
|
+
maxOut: 128e3,
|
|
20251
20290
|
capability: "reasoning",
|
|
20252
20291
|
price: anthropicPrice(5, 25, 0.5),
|
|
20253
20292
|
on: [...CLAUDE_RESELLERS]
|
|
20254
20293
|
});
|
|
20255
20294
|
anthropic.model("claude-opus-4-5", {
|
|
20256
20295
|
name: "Claude Opus 4.5",
|
|
20296
|
+
ctx: 2e5,
|
|
20297
|
+
maxOut: 64e3,
|
|
20257
20298
|
capability: "reasoning",
|
|
20258
20299
|
price: anthropicPrice(5, 25, 0.5),
|
|
20259
20300
|
on: [...CLAUDE_RESELLERS]
|
|
@@ -20264,6 +20305,14 @@ anthropic.model("claude-opus-4-1", {
|
|
|
20264
20305
|
price: anthropicPrice(15, 75, 1.5),
|
|
20265
20306
|
on: [...CLAUDE_RESELLERS]
|
|
20266
20307
|
});
|
|
20308
|
+
anthropic.model("claude-sonnet-5-5", {
|
|
20309
|
+
name: "Claude Sonnet 5.5",
|
|
20310
|
+
ctx: 1e6,
|
|
20311
|
+
maxOut: 128e3,
|
|
20312
|
+
capability: "reasoning",
|
|
20313
|
+
price: anthropicPrice(2, 10, 0.1),
|
|
20314
|
+
on: [...CLAUDE_RESELLERS]
|
|
20315
|
+
});
|
|
20267
20316
|
anthropic.model("claude-sonnet-5", {
|
|
20268
20317
|
name: "Claude Sonnet 5",
|
|
20269
20318
|
ctx: 1e6,
|
|
@@ -20274,16 +20323,30 @@ anthropic.model("claude-sonnet-5", {
|
|
|
20274
20323
|
});
|
|
20275
20324
|
anthropic.model("claude-sonnet-4-6", {
|
|
20276
20325
|
name: "Claude Sonnet 4.6",
|
|
20326
|
+
ctx: 1e6,
|
|
20327
|
+
maxOut: 128e3,
|
|
20277
20328
|
capability: "reasoning",
|
|
20278
20329
|
price: anthropicPrice(3, 15, 0.3),
|
|
20279
20330
|
on: [...CLAUDE_RESELLERS]
|
|
20280
20331
|
});
|
|
20281
20332
|
anthropic.model("claude-sonnet-4-5", {
|
|
20282
20333
|
name: "Claude Sonnet 4.5",
|
|
20334
|
+
ctx: 2e5,
|
|
20335
|
+
maxOut: 64e3,
|
|
20283
20336
|
capability: "reasoning",
|
|
20284
20337
|
price: anthropicPrice(3, 15, 0.3),
|
|
20285
20338
|
on: [...CLAUDE_RESELLERS]
|
|
20286
20339
|
});
|
|
20340
|
+
anthropic.model("claude-haiku-5-5", {
|
|
20341
|
+
name: "Claude Haiku 5.5",
|
|
20342
|
+
ctx: 1e6,
|
|
20343
|
+
maxOut: 128e3,
|
|
20344
|
+
capability: null,
|
|
20345
|
+
// A prompt over 100,000 tokens, cache reads and writes included, bills the
|
|
20346
|
+
// whole request at the higher band.
|
|
20347
|
+
price: anthropicPrice(0.1, 0.5, 0.01, anthropicBand(1e5, 0.5, 2.5, 0.05)),
|
|
20348
|
+
on: [...CLAUDE_RESELLERS]
|
|
20349
|
+
});
|
|
20287
20350
|
anthropic.model("claude-haiku-4-5", {
|
|
20288
20351
|
name: "Claude Haiku 4.5",
|
|
20289
20352
|
ctx: 2e5,
|
|
@@ -20306,7 +20369,13 @@ var OPENAI_TRAINING = {
|
|
|
20306
20369
|
consumerControl: "opt-out",
|
|
20307
20370
|
source: "https://developers.openai.com/api/docs/guides/your-data"
|
|
20308
20371
|
};
|
|
20309
|
-
|
|
20372
|
+
function gptPrice(input2, output2, cacheRead) {
|
|
20373
|
+
const base = { input: input2, output: output2, ...cacheRead === void 0 ? {} : { cacheRead } };
|
|
20374
|
+
return tokenPrice(input2, output2, {
|
|
20375
|
+
...base,
|
|
20376
|
+
longContext: scaledBand(272e3, base, { input: 2, output: 1.5, cacheRead: 2 })
|
|
20377
|
+
});
|
|
20378
|
+
}
|
|
20310
20379
|
var openai = vendor("openai", {
|
|
20311
20380
|
family: { id: "gpt", name: "GPT" },
|
|
20312
20381
|
region: "us",
|
|
@@ -20314,12 +20383,45 @@ var openai = vendor("openai", {
|
|
|
20314
20383
|
training: OPENAI_TRAINING
|
|
20315
20384
|
});
|
|
20316
20385
|
var OPENAI_RESELLERS = ["azure", "foundry"];
|
|
20386
|
+
openai.model("gpt-6-astra", {
|
|
20387
|
+
name: "GPT-6 Astra",
|
|
20388
|
+
ctx: 105e4,
|
|
20389
|
+
maxOut: 128e3,
|
|
20390
|
+
capability: "reasoning",
|
|
20391
|
+
price: gptPrice(10, 50, 1),
|
|
20392
|
+
on: [...OPENAI_RESELLERS]
|
|
20393
|
+
});
|
|
20394
|
+
openai.model("gpt-6.1-sol", {
|
|
20395
|
+
name: "GPT-6.1 Sol",
|
|
20396
|
+
ctx: 105e4,
|
|
20397
|
+
maxOut: 128e3,
|
|
20398
|
+
capability: "reasoning",
|
|
20399
|
+
price: gptPrice(2, 10, 0.1),
|
|
20400
|
+
on: [...OPENAI_RESELLERS]
|
|
20401
|
+
});
|
|
20402
|
+
openai.model("gpt-6-sol", {
|
|
20403
|
+
name: "GPT-6 Sol",
|
|
20404
|
+
ctx: 105e4,
|
|
20405
|
+
maxOut: 128e3,
|
|
20406
|
+
capability: "reasoning",
|
|
20407
|
+
price: gptPrice(2, 10, 0.2),
|
|
20408
|
+
on: [...OPENAI_RESELLERS]
|
|
20409
|
+
});
|
|
20410
|
+
openai.model("gpt-6-luna", {
|
|
20411
|
+
name: "GPT-6 Luna",
|
|
20412
|
+
ctx: 105e4,
|
|
20413
|
+
maxOut: 128e3,
|
|
20414
|
+
capability: null,
|
|
20415
|
+
price: gptPrice(0.1, 0.5, 0.01),
|
|
20416
|
+
on: [...OPENAI_RESELLERS]
|
|
20417
|
+
});
|
|
20317
20418
|
openai.model("gpt-5.6-sol", {
|
|
20318
20419
|
name: "GPT-5.6 Sol",
|
|
20420
|
+
// Promotional rate, published as available at least through 2026-11-21.
|
|
20319
20421
|
ctx: 105e4,
|
|
20320
20422
|
maxOut: 128e3,
|
|
20321
20423
|
capability: "reasoning",
|
|
20322
|
-
price:
|
|
20424
|
+
price: gptPrice(4, 20, 0.4),
|
|
20323
20425
|
on: [...OPENAI_RESELLERS]
|
|
20324
20426
|
});
|
|
20325
20427
|
openai.model("gpt-5.6-terra", {
|
|
@@ -20327,7 +20429,7 @@ openai.model("gpt-5.6-terra", {
|
|
|
20327
20429
|
ctx: 105e4,
|
|
20328
20430
|
maxOut: 128e3,
|
|
20329
20431
|
capability: "reasoning",
|
|
20330
|
-
price:
|
|
20432
|
+
price: gptPrice(2, 12, 0.2),
|
|
20331
20433
|
on: [...OPENAI_RESELLERS]
|
|
20332
20434
|
});
|
|
20333
20435
|
openai.model("gpt-5.6-luna", {
|
|
@@ -20335,7 +20437,7 @@ openai.model("gpt-5.6-luna", {
|
|
|
20335
20437
|
ctx: 105e4,
|
|
20336
20438
|
maxOut: 128e3,
|
|
20337
20439
|
capability: null,
|
|
20338
|
-
price:
|
|
20440
|
+
price: gptPrice(0.2, 1.2, 0.02),
|
|
20339
20441
|
on: [...OPENAI_RESELLERS]
|
|
20340
20442
|
});
|
|
20341
20443
|
openai.model("gpt-5.5", {
|
|
@@ -20343,7 +20445,15 @@ openai.model("gpt-5.5", {
|
|
|
20343
20445
|
ctx: 105e4,
|
|
20344
20446
|
maxOut: 128e3,
|
|
20345
20447
|
capability: "reasoning",
|
|
20346
|
-
price:
|
|
20448
|
+
price: gptPrice(5, 30, 0.5),
|
|
20449
|
+
on: [...OPENAI_RESELLERS]
|
|
20450
|
+
});
|
|
20451
|
+
openai.model("gpt-5.5-pro", {
|
|
20452
|
+
name: "GPT-5.5 Pro",
|
|
20453
|
+
ctx: 105e4,
|
|
20454
|
+
maxOut: 128e3,
|
|
20455
|
+
capability: "reasoning",
|
|
20456
|
+
price: gptPrice(30, 180),
|
|
20347
20457
|
on: [...OPENAI_RESELLERS]
|
|
20348
20458
|
});
|
|
20349
20459
|
openai.model("gpt-5.4", {
|
|
@@ -20351,7 +20461,7 @@ openai.model("gpt-5.4", {
|
|
|
20351
20461
|
ctx: 105e4,
|
|
20352
20462
|
maxOut: 128e3,
|
|
20353
20463
|
capability: "reasoning",
|
|
20354
|
-
price:
|
|
20464
|
+
price: gptPrice(2.5, 15, 0.25),
|
|
20355
20465
|
on: [...OPENAI_RESELLERS]
|
|
20356
20466
|
});
|
|
20357
20467
|
openai.model("gpt-5.4-mini", {
|
|
@@ -20397,6 +20507,7 @@ openai.model("gpt-5", {
|
|
|
20397
20507
|
openai.model("gpt-5-mini", {
|
|
20398
20508
|
name: "GPT-5 mini",
|
|
20399
20509
|
ctx: 4e5,
|
|
20510
|
+
maxOut: 128e3,
|
|
20400
20511
|
capability: null,
|
|
20401
20512
|
price: tokenPrice(0.25, 2, { cacheRead: 0.025 }),
|
|
20402
20513
|
on: [...OPENAI_RESELLERS]
|
|
@@ -20411,11 +20522,15 @@ openai.model("gpt-5-nano", {
|
|
|
20411
20522
|
});
|
|
20412
20523
|
openai.model("gpt-4.1", {
|
|
20413
20524
|
name: "GPT-4.1",
|
|
20525
|
+
ctx: 1047576,
|
|
20526
|
+
maxOut: 32768,
|
|
20414
20527
|
price: tokenPrice(2, 8, { cacheRead: 0.5 }),
|
|
20415
20528
|
on: [...OPENAI_RESELLERS]
|
|
20416
20529
|
});
|
|
20417
20530
|
openai.model("gpt-4o", {
|
|
20418
20531
|
name: "GPT-4o",
|
|
20532
|
+
ctx: 128e3,
|
|
20533
|
+
maxOut: 16384,
|
|
20419
20534
|
price: tokenPrice(2.5, 10, { cacheRead: 1.25 }),
|
|
20420
20535
|
on: [...OPENAI_RESELLERS]
|
|
20421
20536
|
});
|
|
@@ -20439,6 +20554,8 @@ openai.model("gpt-4-turbo", {
|
|
|
20439
20554
|
});
|
|
20440
20555
|
openai.model("o3", {
|
|
20441
20556
|
name: "o3",
|
|
20557
|
+
ctx: 2e5,
|
|
20558
|
+
maxOut: 1e5,
|
|
20442
20559
|
capability: "reasoning",
|
|
20443
20560
|
price: tokenPrice(2, 8, { cacheRead: 0.5 }),
|
|
20444
20561
|
on: [...OPENAI_RESELLERS]
|
|
@@ -20491,57 +20608,100 @@ var google = vendor("google", {
|
|
|
20491
20608
|
retention: "configurable",
|
|
20492
20609
|
training: GOOGLE_TRAINING
|
|
20493
20610
|
});
|
|
20611
|
+
google.model("gemini-3.8-flash", {
|
|
20612
|
+
name: "Gemini 3.8 Flash",
|
|
20613
|
+
ctx: 1048576,
|
|
20614
|
+
maxOut: 65536,
|
|
20615
|
+
capability: null,
|
|
20616
|
+
price: tokenPrice(0.75, 3.75, { cacheRead: 0.075 }),
|
|
20617
|
+
on: ["vertex"]
|
|
20618
|
+
});
|
|
20494
20619
|
google.model("gemini-3.7-flash", {
|
|
20495
20620
|
name: "Gemini 3.7 Flash",
|
|
20496
20621
|
capability: null,
|
|
20497
|
-
// Promotional rate; the published post-promotion rate is 1.50 / 7.50.
|
|
20498
20622
|
price: tokenPrice(0.75, 3.75),
|
|
20499
20623
|
on: ["vertex"]
|
|
20500
20624
|
});
|
|
20501
20625
|
google.model("gemini-3.6-flash", {
|
|
20502
20626
|
name: "Gemini 3.6 Flash",
|
|
20627
|
+
ctx: 1048576,
|
|
20628
|
+
maxOut: 65536,
|
|
20503
20629
|
capability: null,
|
|
20504
|
-
price: tokenPrice(0.75, 3.75),
|
|
20630
|
+
price: tokenPrice(0.75, 3.75, { cacheRead: 0.075 }),
|
|
20505
20631
|
on: ["vertex"]
|
|
20506
20632
|
});
|
|
20507
20633
|
google.model("gemini-3.5-flash", {
|
|
20508
20634
|
name: "Gemini 3.5 Flash",
|
|
20509
20635
|
capability: null,
|
|
20510
|
-
price: tokenPrice(1.5, 9),
|
|
20511
20636
|
on: ["vertex"]
|
|
20512
20637
|
});
|
|
20513
20638
|
google.model("gemini-3.5-flash-lite", {
|
|
20514
20639
|
name: "Gemini 3.5 Flash Lite",
|
|
20640
|
+
ctx: 1048576,
|
|
20641
|
+
maxOut: 65536,
|
|
20642
|
+
capability: null,
|
|
20643
|
+
price: tokenPrice(0.3, 2.5, { cacheRead: 0.03 }),
|
|
20644
|
+
on: ["vertex"]
|
|
20645
|
+
});
|
|
20646
|
+
google.model("gemini-3.1-flash-lite", {
|
|
20647
|
+
name: "Gemini 3.1 Flash Lite",
|
|
20648
|
+
ctx: 1048576,
|
|
20649
|
+
maxOut: 65536,
|
|
20650
|
+
capability: null,
|
|
20651
|
+
price: tokenPrice(0.25, 1.5, { cacheRead: 0.025 }),
|
|
20652
|
+
on: ["vertex"]
|
|
20653
|
+
});
|
|
20654
|
+
google.model("gemini-3-flash-preview", {
|
|
20655
|
+
name: "Gemini 3 Flash Preview",
|
|
20656
|
+
ctx: 1048576,
|
|
20657
|
+
maxOut: 65536,
|
|
20515
20658
|
capability: null,
|
|
20516
|
-
price: tokenPrice(0.3,
|
|
20659
|
+
price: tokenPrice(0.5, 3, { cacheRead: 0.05 }),
|
|
20517
20660
|
on: ["vertex"]
|
|
20518
20661
|
});
|
|
20519
20662
|
google.model("gemini-3.1-pro-preview", {
|
|
20520
20663
|
name: "Gemini 3.1 Pro Preview",
|
|
20664
|
+
ctx: 1048576,
|
|
20665
|
+
maxOut: 65536,
|
|
20521
20666
|
capability: "reasoning",
|
|
20522
20667
|
price: tokenPrice(2, 12, {
|
|
20523
|
-
|
|
20668
|
+
cacheRead: 0.2,
|
|
20669
|
+
longContext: { thresholdInputTokens: 2e5, input: 4, output: 18, cacheRead: 0.4 }
|
|
20524
20670
|
}),
|
|
20671
|
+
aliases: ["gemini-3.1-pro-preview-customtools"],
|
|
20525
20672
|
on: ["vertex"]
|
|
20526
20673
|
});
|
|
20527
20674
|
google.model("gemini-2.5-pro", {
|
|
20528
20675
|
name: "Gemini 2.5 Pro",
|
|
20676
|
+
ctx: 1048576,
|
|
20677
|
+
maxOut: 65536,
|
|
20529
20678
|
capability: "reasoning",
|
|
20530
20679
|
price: tokenPrice(1.25, 10, {
|
|
20531
|
-
|
|
20680
|
+
cacheRead: 0.125,
|
|
20681
|
+
longContext: { thresholdInputTokens: 2e5, input: 2.5, output: 15, cacheRead: 0.25 }
|
|
20532
20682
|
}),
|
|
20533
20683
|
on: ["vertex"]
|
|
20534
20684
|
});
|
|
20535
20685
|
google.model("gemini-2.5-flash", {
|
|
20536
20686
|
name: "Gemini 2.5 Flash",
|
|
20687
|
+
ctx: 1048576,
|
|
20688
|
+
maxOut: 65536,
|
|
20537
20689
|
capability: null,
|
|
20538
|
-
price: tokenPrice(0.3, 2.5),
|
|
20690
|
+
price: tokenPrice(0.3, 2.5, { cacheRead: 0.03 }),
|
|
20539
20691
|
on: ["vertex"]
|
|
20540
20692
|
});
|
|
20541
20693
|
google.model("gemini-2.5-flash-lite", {
|
|
20542
20694
|
name: "Gemini 2.5 Flash Lite",
|
|
20695
|
+
ctx: 1048576,
|
|
20696
|
+
maxOut: 65536,
|
|
20543
20697
|
capability: null,
|
|
20544
|
-
price: tokenPrice(0.1, 0.4),
|
|
20698
|
+
price: tokenPrice(0.1, 0.4, { cacheRead: 0.01 }),
|
|
20699
|
+
on: ["vertex"]
|
|
20700
|
+
});
|
|
20701
|
+
google.model("gemini-embedding-2", {
|
|
20702
|
+
name: "Gemini Embedding 2",
|
|
20703
|
+
capability: "embedding",
|
|
20704
|
+
price: tokenPrice(0.2, 0),
|
|
20545
20705
|
on: ["vertex"]
|
|
20546
20706
|
});
|
|
20547
20707
|
google.model("gemini-1-5-pro", { name: "Gemini 1.5 Pro", on: ["vertex"] });
|
|
@@ -20557,43 +20717,62 @@ var xai = vendor("xai", {
|
|
|
20557
20717
|
source: "https://docs.x.ai/developers/faq/security"
|
|
20558
20718
|
}
|
|
20559
20719
|
});
|
|
20720
|
+
function grokPrice(input2, output2, cacheRead) {
|
|
20721
|
+
const base = { input: input2, output: output2, cacheRead };
|
|
20722
|
+
return tokenPrice(input2, output2, {
|
|
20723
|
+
cacheRead,
|
|
20724
|
+
longContext: scaledBand(2e5, base, { input: 2, output: 2, cacheRead: 2 })
|
|
20725
|
+
});
|
|
20726
|
+
}
|
|
20727
|
+
xai.model("grok-4.7", {
|
|
20728
|
+
name: "Grok 4.7",
|
|
20729
|
+
ctx: 5e5,
|
|
20730
|
+
capability: "reasoning",
|
|
20731
|
+
price: grokPrice(2, 6, 0.5)
|
|
20732
|
+
});
|
|
20560
20733
|
xai.model("grok-4.6", {
|
|
20561
20734
|
name: "Grok 4.6",
|
|
20562
20735
|
ctx: 5e5,
|
|
20563
20736
|
capability: "reasoning",
|
|
20564
|
-
price:
|
|
20565
|
-
cacheRead: 0.5,
|
|
20566
|
-
longContext: { thresholdInputTokens: 2e5, input: 4, output: 12 }
|
|
20567
|
-
}),
|
|
20737
|
+
price: grokPrice(2, 6, 0.5),
|
|
20568
20738
|
on: ["bedrock"]
|
|
20569
20739
|
});
|
|
20570
20740
|
xai.model("grok-4.5", {
|
|
20571
20741
|
name: "Grok 4.5",
|
|
20572
20742
|
ctx: 5e5,
|
|
20573
20743
|
capability: "reasoning",
|
|
20574
|
-
price:
|
|
20575
|
-
cacheRead: 0.3,
|
|
20576
|
-
longContext: { thresholdInputTokens: 2e5, input: 4, output: 12 }
|
|
20577
|
-
})
|
|
20744
|
+
price: grokPrice(2, 6, 0.3)
|
|
20578
20745
|
});
|
|
20579
20746
|
xai.model("grok-4.3", {
|
|
20580
20747
|
name: "Grok 4.3",
|
|
20581
20748
|
ctx: 1e6,
|
|
20582
20749
|
capability: "reasoning",
|
|
20583
|
-
price:
|
|
20584
|
-
cacheRead: 0.2,
|
|
20585
|
-
longContext: { thresholdInputTokens: 2e5, input: 2.5, output: 5 }
|
|
20586
|
-
}),
|
|
20750
|
+
price: grokPrice(1.25, 2.5, 0.2),
|
|
20587
20751
|
on: ["bedrock"]
|
|
20588
20752
|
});
|
|
20753
|
+
xai.model("grok-4.20-0309-reasoning", {
|
|
20754
|
+
name: "Grok 4.20 Reasoning",
|
|
20755
|
+
capability: "reasoning",
|
|
20756
|
+
ctx: 1e6,
|
|
20757
|
+
price: grokPrice(1.25, 2.5, 0.2)
|
|
20758
|
+
});
|
|
20759
|
+
xai.model("grok-4.20-0309-non-reasoning", {
|
|
20760
|
+
name: "Grok 4.20",
|
|
20761
|
+
capability: null,
|
|
20762
|
+
ctx: 1e6,
|
|
20763
|
+
price: grokPrice(1.25, 2.5, 0.2)
|
|
20764
|
+
});
|
|
20765
|
+
xai.model("grok-4.20-multi-agent-0309", {
|
|
20766
|
+
name: "Grok 4.20 Multi-Agent",
|
|
20767
|
+
capability: "reasoning",
|
|
20768
|
+
ctx: 1e6,
|
|
20769
|
+
price: grokPrice(1.25, 2.5, 0.2)
|
|
20770
|
+
});
|
|
20589
20771
|
xai.model("grok-build-0.1", {
|
|
20590
20772
|
name: "Grok Build 0.1",
|
|
20591
20773
|
ctx: 256e3,
|
|
20592
20774
|
capability: "code",
|
|
20593
|
-
price:
|
|
20594
|
-
cacheRead: 0.2,
|
|
20595
|
-
longContext: { thresholdInputTokens: 2e5, input: 2, output: 4 }
|
|
20596
|
-
})
|
|
20775
|
+
price: grokPrice(1, 2, 0.2)
|
|
20597
20776
|
});
|
|
20598
20777
|
var deepseek = vendor("deepseek", {
|
|
20599
20778
|
family: { id: "deepseek", name: "DeepSeek" },
|
|
@@ -20606,16 +20785,25 @@ var deepseek = vendor("deepseek", {
|
|
|
20606
20785
|
source: "https://cdn.deepseek.com/policies/en-US/deepseek-privacy-policy.html"
|
|
20607
20786
|
}
|
|
20608
20787
|
});
|
|
20788
|
+
deepseek.model("deepseek-flash", {
|
|
20789
|
+
name: "DeepSeek V4.1 Flash",
|
|
20790
|
+
ctx: 1e6,
|
|
20791
|
+
maxOut: 384e3,
|
|
20792
|
+
capability: null,
|
|
20793
|
+
price: tokenPrice(0.3, 1.2, { cacheRead: 6e-3 })
|
|
20794
|
+
});
|
|
20609
20795
|
deepseek.model("deepseek-v4-flash", {
|
|
20610
20796
|
name: "DeepSeek V4 Flash",
|
|
20611
20797
|
ctx: 1e6,
|
|
20798
|
+
maxOut: 384e3,
|
|
20612
20799
|
capability: null,
|
|
20613
|
-
price: tokenPrice(0.
|
|
20800
|
+
price: tokenPrice(0.3, 1.2, { cacheRead: 6e-3 }),
|
|
20614
20801
|
on: ["bedrock", "together", "fireworks", "openrouter", "ollama", "local"]
|
|
20615
20802
|
});
|
|
20616
20803
|
deepseek.model("deepseek-v4-pro", {
|
|
20617
20804
|
name: "DeepSeek V4 Pro",
|
|
20618
20805
|
ctx: 1e6,
|
|
20806
|
+
maxOut: 384e3,
|
|
20619
20807
|
capability: "reasoning",
|
|
20620
20808
|
price: tokenPrice(1.32, 3.96, { cacheRead: 0.044 }),
|
|
20621
20809
|
on: ["bedrock", "together", "fireworks", "openrouter"]
|
|
@@ -20662,7 +20850,14 @@ cohere.model("command-r-plus-08-2024", {
|
|
|
20662
20850
|
ctx: 128e3,
|
|
20663
20851
|
maxOut: 4e3,
|
|
20664
20852
|
price: tokenPrice(2.5, 10),
|
|
20665
|
-
|
|
20853
|
+
on: ["bedrock"]
|
|
20854
|
+
});
|
|
20855
|
+
cohere.model("command-r-plus-04-2024", {
|
|
20856
|
+
name: "Command R+ (04-2024)",
|
|
20857
|
+
seen: "discovered",
|
|
20858
|
+
ctx: 128e3,
|
|
20859
|
+
maxOut: 4e3,
|
|
20860
|
+
price: tokenPrice(3, 15),
|
|
20666
20861
|
aliases: ["command-r-plus"],
|
|
20667
20862
|
on: ["bedrock"]
|
|
20668
20863
|
});
|
|
@@ -20730,6 +20925,65 @@ var mistral = vendor("mistral", {
|
|
|
20730
20925
|
retention: "unknown",
|
|
20731
20926
|
defaultHosting: "local"
|
|
20732
20927
|
});
|
|
20928
|
+
var MISTRAL_API = { defaultHosting: "api" };
|
|
20929
|
+
mistral.model("mistral-large-4", {
|
|
20930
|
+
...MISTRAL_API,
|
|
20931
|
+
name: "Mistral Large 4",
|
|
20932
|
+
ctx: 1e6,
|
|
20933
|
+
capability: null,
|
|
20934
|
+
// Public preview at a sale rate; the published original is 1.36 / 4.18 / 0.14.
|
|
20935
|
+
price: tokenPrice(0.68, 2.09, { cacheRead: 0.07 })
|
|
20936
|
+
});
|
|
20937
|
+
mistral.model("mistral-large-2512", {
|
|
20938
|
+
...MISTRAL_API,
|
|
20939
|
+
name: "Mistral Large 3",
|
|
20940
|
+
ctx: 256e3,
|
|
20941
|
+
capability: null,
|
|
20942
|
+
price: tokenPrice(0.5, 1.5, { cacheRead: 0.05 })
|
|
20943
|
+
});
|
|
20944
|
+
mistral.model("mistral-medium-3-5", {
|
|
20945
|
+
...MISTRAL_API,
|
|
20946
|
+
name: "Mistral Medium 3.5",
|
|
20947
|
+
ctx: 256e3,
|
|
20948
|
+
capability: null,
|
|
20949
|
+
price: tokenPrice(1.5, 7.5, { cacheRead: 0.15 })
|
|
20950
|
+
});
|
|
20951
|
+
mistral.model("mistral-small-2603", {
|
|
20952
|
+
...MISTRAL_API,
|
|
20953
|
+
name: "Mistral Small 4",
|
|
20954
|
+
ctx: 256e3,
|
|
20955
|
+
capability: null,
|
|
20956
|
+
price: tokenPrice(0.15, 0.6, { cacheRead: 0.015 })
|
|
20957
|
+
});
|
|
20958
|
+
mistral.model("ministral-14b-2512", {
|
|
20959
|
+
...MISTRAL_API,
|
|
20960
|
+
name: "Ministral 3 14B",
|
|
20961
|
+
ctx: 256e3,
|
|
20962
|
+
capability: null,
|
|
20963
|
+
price: tokenPrice(0.2, 0.2, { cacheRead: 0.02 })
|
|
20964
|
+
});
|
|
20965
|
+
mistral.model("ministral-8b-2512", {
|
|
20966
|
+
...MISTRAL_API,
|
|
20967
|
+
name: "Ministral 3 8B",
|
|
20968
|
+
ctx: 256e3,
|
|
20969
|
+
capability: null,
|
|
20970
|
+
price: tokenPrice(0.15, 0.15, { cacheRead: 0.015 })
|
|
20971
|
+
});
|
|
20972
|
+
mistral.model("ministral-3b-2512", {
|
|
20973
|
+
...MISTRAL_API,
|
|
20974
|
+
name: "Ministral 3 3B",
|
|
20975
|
+
ctx: 256e3,
|
|
20976
|
+
capability: null,
|
|
20977
|
+
price: tokenPrice(0.1, 0.1, { cacheRead: 0.01 })
|
|
20978
|
+
});
|
|
20979
|
+
mistral.model("codestral-2508", {
|
|
20980
|
+
...MISTRAL_API,
|
|
20981
|
+
name: "Codestral",
|
|
20982
|
+
ctx: 128e3,
|
|
20983
|
+
capability: "code",
|
|
20984
|
+
openWeights: false,
|
|
20985
|
+
price: tokenPrice(0.3, 0.9, { cacheRead: 0.03 })
|
|
20986
|
+
});
|
|
20733
20987
|
mistral.model("mixtral-8x7b", {
|
|
20734
20988
|
name: "Mixtral 8x7B",
|
|
20735
20989
|
seen: "discovered",
|
|
@@ -20893,11 +21147,14 @@ var COMPACT = new Intl.NumberFormat("en-US", {
|
|
|
20893
21147
|
// ../../packages/schema/src/token/token-report.ts
|
|
20894
21148
|
var num = (value) => value ?? 0;
|
|
20895
21149
|
function costUsageOf(a, promptTokens) {
|
|
21150
|
+
const write1h = num(a.ephemeral_1h_input_tokens);
|
|
21151
|
+
const write5m = num(a.ephemeral_5m_input_tokens);
|
|
21152
|
+
const unsplit = Math.max(num(a.cache_creation_input_tokens) - write1h - write5m, 0);
|
|
20896
21153
|
const usage = {
|
|
20897
21154
|
inputTokens: num(a.input_tokens),
|
|
20898
21155
|
outputTokens: num(a.output_tokens),
|
|
20899
|
-
cacheWrite1hTokens:
|
|
20900
|
-
cacheWrite5mTokens:
|
|
21156
|
+
cacheWrite1hTokens: write1h,
|
|
21157
|
+
cacheWrite5mTokens: write5m + unsplit,
|
|
20901
21158
|
cacheReadTokens: num(a.cache_read_input_tokens),
|
|
20902
21159
|
webSearchRequests: num(a.web_search_requests)
|
|
20903
21160
|
};
|
|
@@ -21684,6 +21941,11 @@ var CaptureAttributes = external_exports.object({
|
|
|
21684
21941
|
// here too. The full statement is on EventMetadata.redactDegradedTo; it is
|
|
21685
21942
|
// repeated rather than referenced because a store reader opens this file.
|
|
21686
21943
|
redact_degraded_to: ActionTaken.optional(),
|
|
21944
|
+
// Why a capture has no content and no findings: its field was refused
|
|
21945
|
+
// because its bounded scan did not finish (see EventMetadata.scanIncomplete,
|
|
21946
|
+
// whose value this is). Absent on every capture that was scanned, so a
|
|
21947
|
+
// reader can tell a refused row from an empty clean one.
|
|
21948
|
+
scan_incomplete: external_exports.enum(["timeout", "unavailable"]).optional(),
|
|
21687
21949
|
// The scope key this capture was stamped with: the canonical repository
|
|
21688
21950
|
// (`host/owner/repo`) of the path the capture names (a relative path is read
|
|
21689
21951
|
// against its working directory), else of its own working directory, or a
|
|
@@ -23025,7 +23287,19 @@ var EventMetadata = external_exports.object({
|
|
|
23025
23287
|
// Both are pinned as behaviour in @akasecurity/plugin-sdk's runtime suite.
|
|
23026
23288
|
// Closing either means moving the reason onto the finding row, which
|
|
23027
23289
|
// already carries its own action.
|
|
23028
|
-
redactDegradedTo: ActionTaken.optional()
|
|
23290
|
+
redactDegradedTo: ActionTaken.optional(),
|
|
23291
|
+
// Set when this capture's field was REFUSED rather than scanned: a hook
|
|
23292
|
+
// bounds the scan of a large field (see `LargeInputScanOptions` in
|
|
23293
|
+
// @akasecurity/plugin-sdk), and a scan that did not finish blocks the
|
|
23294
|
+
// field instead of letting it through unscanned.
|
|
23295
|
+
//
|
|
23296
|
+
// - 'timeout': the bounded scan ran out of time.
|
|
23297
|
+
// - 'unavailable': no worker could run it.
|
|
23298
|
+
//
|
|
23299
|
+
// A refused row stores '' as its content and has no findings, which is
|
|
23300
|
+
// exactly what a clean, empty capture looks like — this marker is the only
|
|
23301
|
+
// thing that tells the two apart. Absent on every capture that was scanned.
|
|
23302
|
+
scanIncomplete: external_exports.enum(["timeout", "unavailable"]).optional()
|
|
23029
23303
|
}).meta({ id: "EventMetadata" });
|
|
23030
23304
|
var Event = external_exports.object({
|
|
23031
23305
|
id: external_exports.guid(),
|
|
@@ -24842,6 +25116,7 @@ function toCaptureAttributes(event) {
|
|
|
24842
25116
|
...metadata?.exceptionIds !== void 0 ? { exception_ids: metadata.exceptionIds } : {},
|
|
24843
25117
|
...metadata?.inspectionMs !== void 0 ? { inspection_ms: metadata.inspectionMs } : {},
|
|
24844
25118
|
...metadata?.redactDegradedTo !== void 0 ? { redact_degraded_to: metadata.redactDegradedTo } : {},
|
|
25119
|
+
...metadata?.scanIncomplete !== void 0 ? { scan_incomplete: metadata.scanIncomplete } : {},
|
|
24845
25120
|
// `model`/`turnIndex` have no dedicated CaptureAttributes field (no writer
|
|
24846
25121
|
// has ever populated either), but every legacy metadata key still rides
|
|
24847
25122
|
// the bag rather than being silently dropped — CaptureAttributes'
|
|
@@ -27830,7 +28105,8 @@ var TIMELINE_COLUMNS = `
|
|
|
27830
28105
|
json_extract(attributes, '$.internal') AS internal,
|
|
27831
28106
|
json_extract(attributes, '$.flagged') AS flagged`;
|
|
27832
28107
|
var CALL_PROMPT_TOKENS = `(coalesce(input_tokens, 0) + coalesce(cache_read_input_tokens, 0)
|
|
27833
|
-
+ coalesce(
|
|
28108
|
+
+ max(coalesce(cache_creation_input_tokens, 0),
|
|
28109
|
+
coalesce(ephemeral_1h_input_tokens, 0) + coalesce(ephemeral_5m_input_tokens, 0)))`;
|
|
27834
28110
|
var CALL_BAND = LONG_CONTEXT_THRESHOLDS.length === 0 ? "0" : LONG_CONTEXT_THRESHOLDS.map((t) => `(${CALL_PROMPT_TOKENS} > ${String(Math.trunc(t))})`).join(
|
|
27835
28111
|
" + "
|
|
27836
28112
|
);
|
|
@@ -36865,6 +37141,42 @@ function worstProbeMs(rule, now = wallClock, corroborate) {
|
|
|
36865
37141
|
}
|
|
36866
37142
|
var CPU_CORROBORATION_SHARE = 0.2;
|
|
36867
37143
|
var CORROBORATION_FLOOR_MS = BUDGET_MS * CPU_CORROBORATION_SHARE;
|
|
37144
|
+
function repeatTo(unit, length) {
|
|
37145
|
+
return unit.repeat(Math.ceil(length / unit.length)).slice(0, length);
|
|
37146
|
+
}
|
|
37147
|
+
function joinTo(length, open3, close, item) {
|
|
37148
|
+
const parts = [];
|
|
37149
|
+
let size = open3.length;
|
|
37150
|
+
for (let i = 0; size < length; i++) {
|
|
37151
|
+
const next = (i === 0 ? "" : ",") + item(i);
|
|
37152
|
+
parts.push(next);
|
|
37153
|
+
size += next.length;
|
|
37154
|
+
}
|
|
37155
|
+
return (open3 + parts.join("") + close).slice(0, length);
|
|
37156
|
+
}
|
|
37157
|
+
var SQL_WORDS = ["select", "insert", "update", "delete", "drop", "where"];
|
|
37158
|
+
var GROWTH_CORPORA = [
|
|
37159
|
+
{
|
|
37160
|
+
name: "one-line JSON dictionary",
|
|
37161
|
+
build: (length) => joinTo(length, "{", "}", (i) => `"id-${String(i)}":"label ${String(i)}"`)
|
|
37162
|
+
},
|
|
37163
|
+
{
|
|
37164
|
+
name: "JSON array of quoted SQL keywords",
|
|
37165
|
+
build: (length) => joinTo(length, "[", "]", (i) => `"${SQL_WORDS[i % SQL_WORDS.length] ?? ""} ${String(i)}"`)
|
|
37166
|
+
},
|
|
37167
|
+
{ name: "single-quoted keyword run ('where)", build: (length) => repeatTo("'where", length) },
|
|
37168
|
+
{
|
|
37169
|
+
name: 'double-quoted keyword literal run ("where" )',
|
|
37170
|
+
build: (length) => repeatTo('"where" ', length)
|
|
37171
|
+
},
|
|
37172
|
+
{ name: "double-quote run", build: (length) => repeatTo('"', length) },
|
|
37173
|
+
{ name: "space run", build: (length) => repeatTo(" ", length) },
|
|
37174
|
+
{ name: "newline run", build: (length) => repeatTo("\n", length) },
|
|
37175
|
+
...["abc-", "a.", "a ", "a=", "x", "0", "a@", "a/", "ab"].map((unit) => ({
|
|
37176
|
+
name: `unit run ${JSON.stringify(unit)}`,
|
|
37177
|
+
build: (length) => repeatTo(unit, length)
|
|
37178
|
+
}))
|
|
37179
|
+
];
|
|
36868
37180
|
function checkRuleTiming(rule, corroborate) {
|
|
36869
37181
|
const { ms, probe, corroboratedMs } = worstProbeMs(rule, wallClock, corroborate);
|
|
36870
37182
|
const work = corroboratedMs ?? 0;
|
|
@@ -37166,7 +37478,7 @@ var auth_jwt_no_verify_default = {
|
|
|
37166
37478
|
severity: "critical",
|
|
37167
37479
|
matcher: {
|
|
37168
37480
|
type: "regex",
|
|
37169
|
-
pattern: "(verify\\s*=\\s*false|verify_signature
|
|
37481
|
+
pattern: "(verify\\s*=\\s*false|verify_signature(?:(?!verify_signature).)*false|algorithms\\s*=\\s*\\[\\])",
|
|
37170
37482
|
flags: "gi"
|
|
37171
37483
|
},
|
|
37172
37484
|
requiresNearby: {
|
|
@@ -37254,7 +37566,7 @@ var cmd_inject_shell_default = {
|
|
|
37254
37566
|
severity: "critical",
|
|
37255
37567
|
matcher: {
|
|
37256
37568
|
type: "regex",
|
|
37257
|
-
pattern: "subprocess\\.(run|Popen|call|check_output)\\s*\\([^)]*shell\\s*=\\s*True",
|
|
37569
|
+
pattern: "subprocess\\.(run|Popen|call|check_output)\\s*\\((?:(?!subprocess\\.(?:run|Popen|call|check_output)\\s*\\()[^)])*shell\\s*=\\s*True",
|
|
37258
37570
|
flags: "gi"
|
|
37259
37571
|
},
|
|
37260
37572
|
requiresNearby: {
|
|
@@ -37383,7 +37695,7 @@ var deser_yaml_unsafe_default = {
|
|
|
37383
37695
|
severity: "high",
|
|
37384
37696
|
matcher: {
|
|
37385
37697
|
type: "regex",
|
|
37386
|
-
pattern: "\\byaml\\.load\\s*\\((?![^)]
|
|
37698
|
+
pattern: "\\byaml\\.load\\s*\\((?!(?:(?!yaml\\.load\\s*\\()[^)])*?(?:SafeLoader|safe_load))",
|
|
37387
37699
|
flags: "gi"
|
|
37388
37700
|
},
|
|
37389
37701
|
examples: ["data = yaml.load(user_input)", "config = yaml.load(f)"],
|
|
@@ -37600,7 +37912,7 @@ var sql_inject_concat_dot_default = {
|
|
|
37600
37912
|
severity: "high",
|
|
37601
37913
|
matcher: {
|
|
37602
37914
|
type: "regex",
|
|
37603
|
-
pattern: `["'][
|
|
37915
|
+
pattern: `["'](?=([^"'\\n]*?(?:select|insert|update|delete|drop|where)))\\1(?:(?!["'][^"'\\n]*?(?:select|insert|update|delete|drop|where))[^\\n])*?["']\\s*\\.`,
|
|
37604
37916
|
flags: "gi"
|
|
37605
37917
|
},
|
|
37606
37918
|
appliesTo: {
|
|
@@ -37618,7 +37930,7 @@ var sql_inject_concat_default = {
|
|
|
37618
37930
|
severity: "high",
|
|
37619
37931
|
matcher: {
|
|
37620
37932
|
type: "regex",
|
|
37621
|
-
pattern: `["']\\s*(?:select\\b[^\\n]*?\\bfrom\\b|insert\\s+into\\b|update\\s+\\S+\\s+set\\b|delete\\s+from\\b|drop\\s+(?:table|database)\\b|where\\b[^\\n]*?=)[^\\n]*?["']\\s*\\+`,
|
|
37933
|
+
pattern: `(["'])\\s*(?=(select\\b(?:(?!\\1\\s*(?:select\\b|insert\\s+into\\b|update\\s+\\S+\\s+set\\b|delete\\s+from\\b|drop\\s+(?:table|database)\\b|where\\b))[^\\n])*?\\bfrom\\b|insert\\s+into\\b|update\\s+\\S+\\s+set\\b|delete\\s+from\\b|drop\\s+(?:table|database)\\b|where\\b(?:(?!\\1\\s*(?:select\\b|insert\\s+into\\b|update\\s+\\S+\\s+set\\b|delete\\s+from\\b|drop\\s+(?:table|database)\\b|where\\b))[^\\n])*?=))\\2(?:(?!\\1\\s*(?:select\\b|insert\\s+into\\b|update\\s+\\S+\\s+set\\b|delete\\s+from\\b|drop\\s+(?:table|database)\\b|where\\b))[^\\n])*?["']\\s*\\+`,
|
|
37622
37934
|
flags: "gi"
|
|
37623
37935
|
},
|
|
37624
37936
|
examples: ['"SELECT * FROM users WHERE id = " + userId']
|
|
@@ -37633,7 +37945,7 @@ var sql_inject_format_default = {
|
|
|
37633
37945
|
severity: "high",
|
|
37634
37946
|
matcher: {
|
|
37635
37947
|
type: "regex",
|
|
37636
|
-
pattern: "\\b(?:select\\b[^\\n]*?\\bfrom\\b|insert\\s+into\\b|update\\s+\\S+\\s+set\\b|delete\\s+from\\b|drop\\s+(?:table|database)\\b|where\\b[^\\n]*?=)[^\\n]*?(?:[%][sd]|\\{[^}]+\\})",
|
|
37948
|
+
pattern: "\\b(?=(select\\b(?:(?!\\b(?:select\\b|insert\\s+into\\b|update\\s+\\S+\\s+set\\b|delete\\s+from\\b|drop\\s+(?:table|database)\\b))[^\\n])*?\\bfrom\\b|insert\\s+into\\b|update\\s+\\S+\\s+set\\b|delete\\s+from\\b|drop\\s+(?:table|database)\\b))\\1(?:(?!\\b(?:select\\b|insert\\s+into\\b|update\\s+\\S+\\s+set\\b|delete\\s+from\\b|drop\\s+(?:table|database)\\b))[^\\n])*?(?:[%][sd]|\\{[^{}\\n]+\\})|\\b(?=(where\\b(?:(?!\\bwhere\\b)[^\\n])*?=))\\2(?:(?!\\bwhere\\b)[^\\n])*?(?:[%][sd]|\\{[^{}\\n]+\\})",
|
|
37637
37949
|
flags: "gi"
|
|
37638
37950
|
},
|
|
37639
37951
|
examples: [
|
|
@@ -37651,7 +37963,7 @@ var sql_inject_interp_default = {
|
|
|
37651
37963
|
severity: "high",
|
|
37652
37964
|
matcher: {
|
|
37653
37965
|
type: "regex",
|
|
37654
|
-
pattern: "(select|insert|update|delete|where)[^\\n]*?(#\\{|\\$[a-z_])",
|
|
37966
|
+
pattern: "(select|insert|update|delete|where)(?:(?!(?:select|insert|update|delete|where))[^\\n])*?(#\\{|\\$[a-z_])",
|
|
37655
37967
|
flags: "gi"
|
|
37656
37968
|
},
|
|
37657
37969
|
examples: [
|
|
@@ -38026,7 +38338,7 @@ var stack_trace_default = {
|
|
|
38026
38338
|
severity: "low",
|
|
38027
38339
|
matcher: {
|
|
38028
38340
|
type: "regex",
|
|
38029
|
-
pattern: "(
|
|
38341
|
+
pattern: "(?:^|(?<!\\s)\\s+)at\\s+[A-Za-z0-9._$<>]+\\.[A-Za-z0-9_$]+\\s*\\([A-Za-z0-9._\\-/:]+:\\d+:\\d+\\)",
|
|
38030
38342
|
flags: "g"
|
|
38031
38343
|
},
|
|
38032
38344
|
examples: ["at com.example.service.UserService.findUser(UserService.java:42:13)"]
|
|
@@ -39184,7 +39496,7 @@ var BUNDLED_PACKS = [
|
|
|
39184
39496
|
{
|
|
39185
39497
|
packId: "code-flaws",
|
|
39186
39498
|
name: "Code Security Flaws",
|
|
39187
|
-
version: "0.1.
|
|
39499
|
+
version: "0.1.2",
|
|
39188
39500
|
rawRules: [
|
|
39189
39501
|
sql_inject_concat_default,
|
|
39190
39502
|
sql_inject_concat_dot_default,
|
|
@@ -39234,7 +39546,7 @@ var BUNDLED_PACKS = [
|
|
|
39234
39546
|
{
|
|
39235
39547
|
packId: "core-code-context",
|
|
39236
39548
|
name: "Code Context",
|
|
39237
|
-
version: "0.2.
|
|
39549
|
+
version: "0.2.2",
|
|
39238
39550
|
rawRules: [
|
|
39239
39551
|
internal_ip_default,
|
|
39240
39552
|
localhost_ref_default,
|
|
@@ -39681,9 +39993,10 @@ function createIsolatedScanner(data, opts = {}) {
|
|
|
39681
39993
|
if (job.timer !== void 0) return;
|
|
39682
39994
|
job.startedAt = performance.now();
|
|
39683
39995
|
job.progressAt = job.startedAt;
|
|
39996
|
+
const budget = job.deadlineAt === void 0 ? job.budgetMs : Math.max(0, Math.min(job.budgetMs, job.deadlineAt - job.startedAt));
|
|
39684
39997
|
job.timer = setTimeout(() => {
|
|
39685
39998
|
onDeadline(job);
|
|
39686
|
-
},
|
|
39999
|
+
}, budget);
|
|
39687
40000
|
}
|
|
39688
40001
|
function runOne(spec, fail) {
|
|
39689
40002
|
if (closed) {
|
|
@@ -39694,6 +40007,12 @@ function createIsolatedScanner(data, opts = {}) {
|
|
|
39694
40007
|
fail({ status: "unavailable", reason: `the scan worker crashed: ${broken}` });
|
|
39695
40008
|
return;
|
|
39696
40009
|
}
|
|
40010
|
+
const now = performance.now();
|
|
40011
|
+
const deadlineAt = spec.deadlineAt;
|
|
40012
|
+
if (deadlineAt !== void 0 && deadlineAt <= now) {
|
|
40013
|
+
fail({ status: "timeout", culpritIndex: void 0, elapsedMs: 0 });
|
|
40014
|
+
return;
|
|
40015
|
+
}
|
|
39697
40016
|
const started = ensureWorker();
|
|
39698
40017
|
if (!(started instanceof Worker)) {
|
|
39699
40018
|
broken = started.error;
|
|
@@ -39701,11 +40020,11 @@ function createIsolatedScanner(data, opts = {}) {
|
|
|
39701
40020
|
return;
|
|
39702
40021
|
}
|
|
39703
40022
|
const id = nextJobId++;
|
|
39704
|
-
const now = performance.now();
|
|
39705
40023
|
const job = {
|
|
39706
40024
|
id,
|
|
39707
40025
|
worker: started,
|
|
39708
40026
|
budgetMs: spec.budgetMs,
|
|
40027
|
+
deadlineAt,
|
|
39709
40028
|
startedAt: now,
|
|
39710
40029
|
progressIndex: -1,
|
|
39711
40030
|
progressAt: now,
|
|
@@ -39719,14 +40038,19 @@ function createIsolatedScanner(data, opts = {}) {
|
|
|
39719
40038
|
if (readyWorker === started) {
|
|
39720
40039
|
beginDeadline(job);
|
|
39721
40040
|
} else {
|
|
40041
|
+
const startBudget = spec.startBudgetMs ?? startBudgetMs;
|
|
40042
|
+
const callerLimited = deadlineAt !== void 0 && deadlineAt - now < startBudget;
|
|
40043
|
+
const startWaitMs = callerLimited ? deadlineAt - now : startBudget;
|
|
39722
40044
|
job.startupTimer = setTimeout(() => {
|
|
39723
40045
|
if (pending !== job) return;
|
|
39724
40046
|
kill(job.worker);
|
|
39725
|
-
failPending(
|
|
39726
|
-
status: "
|
|
39727
|
-
|
|
39728
|
-
|
|
39729
|
-
|
|
40047
|
+
failPending(
|
|
40048
|
+
callerLimited ? { status: "timeout", culpritIndex: void 0, elapsedMs: performance.now() - now } : {
|
|
40049
|
+
status: "unavailable",
|
|
40050
|
+
reason: `the scan worker did not start within ${String(startBudget)}ms`
|
|
40051
|
+
}
|
|
40052
|
+
);
|
|
40053
|
+
}, startWaitMs);
|
|
39730
40054
|
}
|
|
39731
40055
|
try {
|
|
39732
40056
|
started.postMessage(spec.build(id));
|
|
@@ -39755,7 +40079,9 @@ function createIsolatedScanner(data, opts = {}) {
|
|
|
39755
40079
|
return enqueue((resolve3) => {
|
|
39756
40080
|
runOne(
|
|
39757
40081
|
{
|
|
39758
|
-
budgetMs,
|
|
40082
|
+
budgetMs: scanOpts?.budgetMs ?? budgetMs,
|
|
40083
|
+
startBudgetMs: scanOpts?.startBudgetMs,
|
|
40084
|
+
deadlineAt: scanOpts?.deadlineAt,
|
|
39759
40085
|
build: (id) => ({
|
|
39760
40086
|
kind: "scan",
|
|
39761
40087
|
id,
|
|
@@ -39949,6 +40275,9 @@ function createGuardedScanner(partition, gateway, opts) {
|
|
|
39949
40275
|
let unverified = partition.unverified;
|
|
39950
40276
|
let isolated = unverified.length > 0 ? createIsolatedScanner({ verified, unverified }, opts) : void 0;
|
|
39951
40277
|
let retired = false;
|
|
40278
|
+
let bounded;
|
|
40279
|
+
let boundedWarned = false;
|
|
40280
|
+
let closed = false;
|
|
39952
40281
|
function inProcess(text, context) {
|
|
39953
40282
|
return scan(text, verified, context);
|
|
39954
40283
|
}
|
|
@@ -40010,11 +40339,48 @@ function createGuardedScanner(partition, gateway, opts) {
|
|
|
40010
40339
|
await degrade();
|
|
40011
40340
|
return inProcess(text, context);
|
|
40012
40341
|
}
|
|
40342
|
+
async function scanBounded(text, context, bound) {
|
|
40343
|
+
const remainingMs = bound.remainingMs;
|
|
40344
|
+
let outcome;
|
|
40345
|
+
if (closed) {
|
|
40346
|
+
outcome = { status: "unavailable", reason: "the scan worker is closed" };
|
|
40347
|
+
} else if (remainingMs !== void 0 && !(remainingMs > 0)) {
|
|
40348
|
+
outcome = { status: "timeout", culpritIndex: void 0, elapsedMs: 0 };
|
|
40349
|
+
} else {
|
|
40350
|
+
bounded ??= createIsolatedScanner({ verified, unverified }, opts);
|
|
40351
|
+
const deadlineAt = remainingMs === void 0 ? void 0 : performance.now() + remainingMs;
|
|
40352
|
+
try {
|
|
40353
|
+
outcome = await bounded.scan(text, context, {
|
|
40354
|
+
budgetMs: bound.budgetMs,
|
|
40355
|
+
startBudgetMs: bound.startBudgetMs,
|
|
40356
|
+
deadlineAt
|
|
40357
|
+
});
|
|
40358
|
+
} catch (error62) {
|
|
40359
|
+
outcome = {
|
|
40360
|
+
status: "unavailable",
|
|
40361
|
+
reason: error62 instanceof Error ? error62.message : "the scan worker failed unexpectedly"
|
|
40362
|
+
};
|
|
40363
|
+
}
|
|
40364
|
+
}
|
|
40365
|
+
if (outcome.status !== "ok" && !boundedWarned) {
|
|
40366
|
+
boundedWarned = true;
|
|
40367
|
+
process.stderr.write(
|
|
40368
|
+
outcome.status === "timeout" ? `[aka] a large input could not be scanned within its time limit and was refused.
|
|
40369
|
+
` : `[aka] a large input could not be scanned and was refused: ${outcome.reason}.
|
|
40370
|
+
`
|
|
40371
|
+
);
|
|
40372
|
+
}
|
|
40373
|
+
return outcome;
|
|
40374
|
+
}
|
|
40013
40375
|
return {
|
|
40014
40376
|
scan: guardedScan,
|
|
40377
|
+
scanBounded,
|
|
40015
40378
|
degraded: () => retired,
|
|
40016
40379
|
async close() {
|
|
40017
|
-
|
|
40380
|
+
closed = true;
|
|
40381
|
+
const live = bounded;
|
|
40382
|
+
bounded = void 0;
|
|
40383
|
+
await Promise.all([retire(), live?.close()]);
|
|
40018
40384
|
}
|
|
40019
40385
|
};
|
|
40020
40386
|
}
|
|
@@ -40141,6 +40507,19 @@ function conditionsMatch(conditions, ctx) {
|
|
|
40141
40507
|
if (conditions.provider !== void 0) return false;
|
|
40142
40508
|
return true;
|
|
40143
40509
|
}
|
|
40510
|
+
var LARGE_INPUT_THRESHOLD_CHARS = 32768;
|
|
40511
|
+
var LARGE_INPUT_SCAN_BUDGET_MS = 2e3;
|
|
40512
|
+
var LARGE_INPUT_START_BUDGET_MS = 1500;
|
|
40513
|
+
function readRemainingMs(largeInput) {
|
|
40514
|
+
const read = largeInput.remainingMs;
|
|
40515
|
+
if (read === void 0) return void 0;
|
|
40516
|
+
try {
|
|
40517
|
+
const remaining = read();
|
|
40518
|
+
return typeof remaining !== "number" || Number.isNaN(remaining) ? 0 : remaining;
|
|
40519
|
+
} catch {
|
|
40520
|
+
return 0;
|
|
40521
|
+
}
|
|
40522
|
+
}
|
|
40144
40523
|
var bundlesPacked = false;
|
|
40145
40524
|
function createPluginRuntime(gateway, settings, opts) {
|
|
40146
40525
|
if (!bundlesPacked) {
|
|
@@ -40150,6 +40529,7 @@ function createPluginRuntime(gateway, settings, opts) {
|
|
|
40150
40529
|
const policyMode = settings.policy;
|
|
40151
40530
|
let redactFallback = settings.redactFallback;
|
|
40152
40531
|
const dataDir2 = opts?.dataDir;
|
|
40532
|
+
const largeInput = opts?.largeInput;
|
|
40153
40533
|
let rules = [];
|
|
40154
40534
|
let evidenceOf = evidenceLookup(rules);
|
|
40155
40535
|
let scanner;
|
|
@@ -40362,7 +40742,24 @@ function createPluginRuntime(gateway, settings, opts) {
|
|
|
40362
40742
|
await ensureInitialized();
|
|
40363
40743
|
if (!scanner) throw new Error("the runtime initialized without a scanner");
|
|
40364
40744
|
const shielded = shieldPointers(text);
|
|
40365
|
-
|
|
40745
|
+
let matched;
|
|
40746
|
+
if (largeInput !== void 0 && shielded.text.length >= largeInput.thresholdChars) {
|
|
40747
|
+
const outcome = await scanner.scanBounded(shielded.text, context, {
|
|
40748
|
+
budgetMs: largeInput.budgetMs,
|
|
40749
|
+
startBudgetMs: largeInput.startBudgetMs,
|
|
40750
|
+
remainingMs: readRemainingMs(largeInput)
|
|
40751
|
+
});
|
|
40752
|
+
if (outcome.status !== "ok") {
|
|
40753
|
+
return {
|
|
40754
|
+
decision: { action: "block", text: null, findings: [], scanIncomplete: outcome.status },
|
|
40755
|
+
excepted: /* @__PURE__ */ new Set(),
|
|
40756
|
+
exceptionIds: []
|
|
40757
|
+
};
|
|
40758
|
+
}
|
|
40759
|
+
matched = outcome.findings;
|
|
40760
|
+
} else {
|
|
40761
|
+
matched = await scanner.scan(shielded.text, context);
|
|
40762
|
+
}
|
|
40366
40763
|
const findings = dropShieldedFindings(matched, shielded.spans);
|
|
40367
40764
|
const fpCache = /* @__PURE__ */ new Map();
|
|
40368
40765
|
const { excepted, exceptionIds } = await applyExceptions(findings, ctx, fpCache);
|
|
@@ -40403,20 +40800,24 @@ function createPluginRuntime(gateway, settings, opts) {
|
|
|
40403
40800
|
}
|
|
40404
40801
|
async function persistCapture(input2, opts2, { decision, excepted, exceptionIds, timingStartedAt }) {
|
|
40405
40802
|
const filePath = input2.metadata?.filePath;
|
|
40406
|
-
if (opts2.persist === "with-findings" && decision.findings.length === 0)
|
|
40803
|
+
if (opts2.persist === "with-findings" && decision.findings.length === 0 && decision.scanIncomplete === void 0) {
|
|
40804
|
+
return;
|
|
40805
|
+
}
|
|
40407
40806
|
try {
|
|
40408
40807
|
const contentHash = contentHashOf(input2.text);
|
|
40409
40808
|
const maskedFindings = decision.findings.filter(
|
|
40410
40809
|
(match) => isActionAtLeast(actionForFinding(match, excepted, opts2.rewritable), "redact")
|
|
40411
40810
|
);
|
|
40412
|
-
const storedContent = maskedFindings.length > 0 ? redact(input2.text, maskedFindings) : input2.text;
|
|
40811
|
+
const storedContent = decision.scanIncomplete !== void 0 ? "" : maskedFindings.length > 0 ? redact(input2.text, maskedFindings) : input2.text;
|
|
40413
40812
|
const inspectionMs = elapsedMs(timingStartedAt);
|
|
40414
40813
|
const redactDegradedTo = decision.redactDegradedTo;
|
|
40415
|
-
const
|
|
40814
|
+
const scanIncomplete = decision.scanIncomplete;
|
|
40815
|
+
const metadata = exceptionIds.length > 0 || inspectionMs !== void 0 || redactDegradedTo !== void 0 || scanIncomplete !== void 0 ? {
|
|
40416
40816
|
...input2.metadata,
|
|
40417
40817
|
...exceptionIds.length > 0 ? { exceptionIds } : {},
|
|
40418
40818
|
...inspectionMs !== void 0 ? { inspectionMs } : {},
|
|
40419
|
-
...redactDegradedTo !== void 0 ? { redactDegradedTo } : {}
|
|
40819
|
+
...redactDegradedTo !== void 0 ? { redactDegradedTo } : {},
|
|
40820
|
+
...scanIncomplete !== void 0 ? { scanIncomplete } : {}
|
|
40420
40821
|
} : input2.metadata;
|
|
40421
40822
|
const event = buildIngestEvent({
|
|
40422
40823
|
kind: input2.kind,
|
|
@@ -40537,6 +40938,17 @@ function createPluginRuntime(gateway, settings, opts) {
|
|
|
40537
40938
|
};
|
|
40538
40939
|
}
|
|
40539
40940
|
|
|
40941
|
+
// src/hooks/large-input.ts
|
|
40942
|
+
var HOOK_SCAN_DEADLINE_MS = 6e3;
|
|
40943
|
+
function largeInputBound(deadlineAt, now = () => performance.now()) {
|
|
40944
|
+
return {
|
|
40945
|
+
thresholdChars: LARGE_INPUT_THRESHOLD_CHARS,
|
|
40946
|
+
budgetMs: LARGE_INPUT_SCAN_BUDGET_MS,
|
|
40947
|
+
startBudgetMs: LARGE_INPUT_START_BUDGET_MS,
|
|
40948
|
+
remainingMs: () => deadlineAt - now()
|
|
40949
|
+
};
|
|
40950
|
+
}
|
|
40951
|
+
|
|
40540
40952
|
// src/present.ts
|
|
40541
40953
|
var fg = (hex3) => (text) => {
|
|
40542
40954
|
const r = Number.parseInt(hex3.slice(1, 3), 16);
|
|
@@ -40578,6 +40990,9 @@ function blockMessage(input2) {
|
|
|
40578
40990
|
"More: aka exception --help"
|
|
40579
40991
|
].join("\n");
|
|
40580
40992
|
}
|
|
40993
|
+
function tooLargeToScanMessage(subject) {
|
|
40994
|
+
return `This ${subject} is too large for AKA to scan within the time limit, so it was blocked. Shorten it or send it in smaller parts.`;
|
|
40995
|
+
}
|
|
40581
40996
|
function exceptionPointer(references) {
|
|
40582
40997
|
const ref = references?.[0];
|
|
40583
40998
|
if (ref === void 0) return "";
|
|
@@ -40617,6 +41032,15 @@ function decidePreToolUse(toolName, toolInput, scanned) {
|
|
|
40617
41032
|
let escalatedExecutable = false;
|
|
40618
41033
|
let escalatedUnredactable = false;
|
|
40619
41034
|
let updatedInput = null;
|
|
41035
|
+
if (scanned.some(({ result }) => result.scanIncomplete !== void 0)) {
|
|
41036
|
+
return {
|
|
41037
|
+
hookSpecificOutput: {
|
|
41038
|
+
hookEventName: "PreToolUse",
|
|
41039
|
+
permissionDecision: "deny",
|
|
41040
|
+
permissionDecisionReason: tooLargeToScanMessage(`${toolName} call`)
|
|
41041
|
+
}
|
|
41042
|
+
};
|
|
41043
|
+
}
|
|
40620
41044
|
for (const { spec, result } of scanned) {
|
|
40621
41045
|
if (result.redactDegradedTo === "block") escalatedExecutable = true;
|
|
40622
41046
|
const unredactable = result.action === "redact" && result.text === null;
|
|
@@ -42211,6 +42635,7 @@ var CORRELATION_ID = EventMetadata.shape.correlationId;
|
|
|
42211
42635
|
var TRACE_ID = EventMetadata.shape.traceId;
|
|
42212
42636
|
var EXCEPTION_ID = EventMetadata.shape.exceptionIds.unwrap().element;
|
|
42213
42637
|
var REDACT_DEGRADED_TO = EventMetadata.shape.redactDegradedTo.unwrap();
|
|
42638
|
+
var SCAN_INCOMPLETE = EventMetadata.shape.scanIncomplete.unwrap();
|
|
42214
42639
|
|
|
42215
42640
|
// ../../packages/plugin-runtime/src/attached/history-sync.ts
|
|
42216
42641
|
var CAPTURE_BATCH_BYTES = 1024 * 1024;
|
|
@@ -43288,7 +43713,10 @@ async function main() {
|
|
|
43288
43713
|
return;
|
|
43289
43714
|
}
|
|
43290
43715
|
const gateway = opened.gateway;
|
|
43291
|
-
const runtime = createPluginRuntime(gateway, config2.settings, {
|
|
43716
|
+
const runtime = createPluginRuntime(gateway, config2.settings, {
|
|
43717
|
+
dataDir: config2.dataDir,
|
|
43718
|
+
largeInput: largeInputBound(HOOK_SCAN_DEADLINE_MS)
|
|
43719
|
+
});
|
|
43292
43720
|
const toolInput = { ...rawToolInput };
|
|
43293
43721
|
const kind = toolName === "apply_patch" ? "code_change" : "tool_use";
|
|
43294
43722
|
const metadata = baseMetadata(input2) ?? {};
|
|
@@ -43314,6 +43742,7 @@ async function main() {
|
|
|
43314
43742
|
}
|
|
43315
43743
|
);
|
|
43316
43744
|
scanned.push({ spec, result });
|
|
43745
|
+
if (result.scanIncomplete !== void 0) break;
|
|
43317
43746
|
}
|
|
43318
43747
|
} finally {
|
|
43319
43748
|
await runtime.close();
|