@akasecurity/ai-tc-codex 0.9.17 → 0.9.19

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/scripts/stop.js CHANGED
@@ -6,7 +6,7 @@ var __export = (target, all) => {
6
6
 
7
7
  // ../../packages/plugin-sdk/src/config.ts
8
8
  import { existsSync as existsSync8 } from "fs";
9
- import { join as join17 } from "path";
9
+ import { join as join18 } from "path";
10
10
 
11
11
  // ../../packages/schema/src/drizzle/deferred-migrations.ts
12
12
  var DEFERRED_MIGRATION_TAGS = [
@@ -19694,7 +19694,10 @@ function date4(params) {
19694
19694
  var LongContextTier = external_exports.object({
19695
19695
  thresholdInputTokens: external_exports.number().int().positive(),
19696
19696
  input: external_exports.number().nonnegative().nullable(),
19697
- output: external_exports.number().nonnegative().nullable()
19697
+ output: external_exports.number().nonnegative().nullable(),
19698
+ cacheRead: external_exports.number().nonnegative().nullable().optional(),
19699
+ cacheWrite5m: external_exports.number().nonnegative().nullable().optional(),
19700
+ cacheWrite1h: external_exports.number().nonnegative().nullable().optional()
19698
19701
  });
19699
19702
  var ModelPrice = external_exports.object({
19700
19703
  /** USD per 1M uncached input tokens, at or below any long-context threshold. */
@@ -19703,7 +19706,8 @@ var ModelPrice = external_exports.object({
19703
19706
  output: external_exports.number().nonnegative(),
19704
19707
  /**
19705
19708
  * Rate band above a size threshold, or `null` when the model is flat-rated.
19706
- * Anthropic is flat across its 1M window; OpenAI, Google and xAI are not.
19709
+ * OpenAI, Google, xAI and some Anthropic models (Haiku 5.5) band; most
19710
+ * Claude models are flat across their window.
19707
19711
  */
19708
19712
  longContext: LongContextTier.nullable(),
19709
19713
  /** USD per 1M tokens written to a 5-minute ephemeral cache, or null if unpriced. */
@@ -19716,18 +19720,35 @@ var ModelPrice = external_exports.object({
19716
19720
  webSearch: external_exports.number().nonnegative().nullable()
19717
19721
  });
19718
19722
  var WEB_SEARCH_PER_REQUEST = 0.01;
19719
- function anthropicPrice(input2, output2, cacheRead) {
19723
+ function anthropicPrice(input2, output2, cacheRead, longContext = null) {
19720
19724
  return Object.freeze({
19721
19725
  input: input2,
19722
19726
  output: output2,
19723
- longContext: null,
19724
- // flat across the full window on every current Claude
19727
+ longContext: longContext === null ? null : Object.freeze(longContext),
19725
19728
  cacheWrite5m: input2 * 1.25,
19726
19729
  cacheWrite1h: input2 * 2,
19727
19730
  cacheRead,
19728
19731
  webSearch: WEB_SEARCH_PER_REQUEST
19729
19732
  });
19730
19733
  }
19734
+ function anthropicBand(thresholdInputTokens, input2, output2, cacheRead) {
19735
+ return {
19736
+ thresholdInputTokens,
19737
+ input: input2,
19738
+ output: output2,
19739
+ cacheRead,
19740
+ cacheWrite5m: input2 * 1.25,
19741
+ cacheWrite1h: input2 * 2
19742
+ };
19743
+ }
19744
+ function scaledBand(thresholdInputTokens, base, scale) {
19745
+ return {
19746
+ thresholdInputTokens,
19747
+ input: base.input * scale.input,
19748
+ output: base.output * scale.output,
19749
+ ...base.cacheRead === void 0 ? {} : { cacheRead: base.cacheRead * scale.cacheRead }
19750
+ };
19751
+ }
19731
19752
  function tokenPrice(input2, output2, options = {}) {
19732
19753
  return Object.freeze({
19733
19754
  input: input2,
@@ -19974,10 +19995,20 @@ anthropic.model("claude-fable-5-1", {
19974
19995
  });
19975
19996
  anthropic.model("claude-fable-5", {
19976
19997
  name: "Claude Fable 5",
19998
+ ctx: 1e6,
19999
+ maxOut: 128e3,
19977
20000
  capability: "reasoning",
19978
20001
  price: anthropicPrice(10, 50, 1),
19979
20002
  on: [...CLAUDE_RESELLERS]
19980
20003
  });
20004
+ anthropic.model("claude-opus-5-5", {
20005
+ name: "Claude Opus 5.5",
20006
+ ctx: 1e6,
20007
+ maxOut: 128e3,
20008
+ capability: "reasoning",
20009
+ price: anthropicPrice(4, 20, 0.2),
20010
+ on: [...CLAUDE_RESELLERS]
20011
+ });
19981
20012
  anthropic.model("claude-opus-5", {
19982
20013
  name: "Claude Opus 5",
19983
20014
  ctx: 1e6,
@@ -19988,24 +20019,32 @@ anthropic.model("claude-opus-5", {
19988
20019
  });
19989
20020
  anthropic.model("claude-opus-4-8", {
19990
20021
  name: "Claude Opus 4.8",
20022
+ ctx: 1e6,
20023
+ maxOut: 128e3,
19991
20024
  capability: "reasoning",
19992
20025
  price: anthropicPrice(5, 25, 0.5),
19993
20026
  on: [...CLAUDE_RESELLERS]
19994
20027
  });
19995
20028
  anthropic.model("claude-opus-4-7", {
19996
20029
  name: "Claude Opus 4.7",
20030
+ ctx: 1e6,
20031
+ maxOut: 128e3,
19997
20032
  capability: "reasoning",
19998
20033
  price: anthropicPrice(5, 25, 0.5),
19999
20034
  on: [...CLAUDE_RESELLERS]
20000
20035
  });
20001
20036
  anthropic.model("claude-opus-4-6", {
20002
20037
  name: "Claude Opus 4.6",
20038
+ ctx: 1e6,
20039
+ maxOut: 128e3,
20003
20040
  capability: "reasoning",
20004
20041
  price: anthropicPrice(5, 25, 0.5),
20005
20042
  on: [...CLAUDE_RESELLERS]
20006
20043
  });
20007
20044
  anthropic.model("claude-opus-4-5", {
20008
20045
  name: "Claude Opus 4.5",
20046
+ ctx: 2e5,
20047
+ maxOut: 64e3,
20009
20048
  capability: "reasoning",
20010
20049
  price: anthropicPrice(5, 25, 0.5),
20011
20050
  on: [...CLAUDE_RESELLERS]
@@ -20016,6 +20055,14 @@ anthropic.model("claude-opus-4-1", {
20016
20055
  price: anthropicPrice(15, 75, 1.5),
20017
20056
  on: [...CLAUDE_RESELLERS]
20018
20057
  });
20058
+ anthropic.model("claude-sonnet-5-5", {
20059
+ name: "Claude Sonnet 5.5",
20060
+ ctx: 1e6,
20061
+ maxOut: 128e3,
20062
+ capability: "reasoning",
20063
+ price: anthropicPrice(2, 10, 0.1),
20064
+ on: [...CLAUDE_RESELLERS]
20065
+ });
20019
20066
  anthropic.model("claude-sonnet-5", {
20020
20067
  name: "Claude Sonnet 5",
20021
20068
  ctx: 1e6,
@@ -20026,16 +20073,30 @@ anthropic.model("claude-sonnet-5", {
20026
20073
  });
20027
20074
  anthropic.model("claude-sonnet-4-6", {
20028
20075
  name: "Claude Sonnet 4.6",
20076
+ ctx: 1e6,
20077
+ maxOut: 128e3,
20029
20078
  capability: "reasoning",
20030
20079
  price: anthropicPrice(3, 15, 0.3),
20031
20080
  on: [...CLAUDE_RESELLERS]
20032
20081
  });
20033
20082
  anthropic.model("claude-sonnet-4-5", {
20034
20083
  name: "Claude Sonnet 4.5",
20084
+ ctx: 2e5,
20085
+ maxOut: 64e3,
20035
20086
  capability: "reasoning",
20036
20087
  price: anthropicPrice(3, 15, 0.3),
20037
20088
  on: [...CLAUDE_RESELLERS]
20038
20089
  });
20090
+ anthropic.model("claude-haiku-5-5", {
20091
+ name: "Claude Haiku 5.5",
20092
+ ctx: 1e6,
20093
+ maxOut: 128e3,
20094
+ capability: null,
20095
+ // A prompt over 100,000 tokens, cache reads and writes included, bills the
20096
+ // whole request at the higher band.
20097
+ price: anthropicPrice(0.1, 0.5, 0.01, anthropicBand(1e5, 0.5, 2.5, 0.05)),
20098
+ on: [...CLAUDE_RESELLERS]
20099
+ });
20039
20100
  anthropic.model("claude-haiku-4-5", {
20040
20101
  name: "Claude Haiku 4.5",
20041
20102
  ctx: 2e5,
@@ -20058,7 +20119,13 @@ var OPENAI_TRAINING = {
20058
20119
  consumerControl: "opt-out",
20059
20120
  source: "https://developers.openai.com/api/docs/guides/your-data"
20060
20121
  };
20061
- var LONG_CONTEXT_272K = { thresholdInputTokens: 272e3, input: null, output: null };
20122
+ function gptPrice(input2, output2, cacheRead) {
20123
+ const base = { input: input2, output: output2, ...cacheRead === void 0 ? {} : { cacheRead } };
20124
+ return tokenPrice(input2, output2, {
20125
+ ...base,
20126
+ longContext: scaledBand(272e3, base, { input: 2, output: 1.5, cacheRead: 2 })
20127
+ });
20128
+ }
20062
20129
  var openai = vendor("openai", {
20063
20130
  family: { id: "gpt", name: "GPT" },
20064
20131
  region: "us",
@@ -20066,12 +20133,45 @@ var openai = vendor("openai", {
20066
20133
  training: OPENAI_TRAINING
20067
20134
  });
20068
20135
  var OPENAI_RESELLERS = ["azure", "foundry"];
20136
+ openai.model("gpt-6-astra", {
20137
+ name: "GPT-6 Astra",
20138
+ ctx: 105e4,
20139
+ maxOut: 128e3,
20140
+ capability: "reasoning",
20141
+ price: gptPrice(10, 50, 1),
20142
+ on: [...OPENAI_RESELLERS]
20143
+ });
20144
+ openai.model("gpt-6.1-sol", {
20145
+ name: "GPT-6.1 Sol",
20146
+ ctx: 105e4,
20147
+ maxOut: 128e3,
20148
+ capability: "reasoning",
20149
+ price: gptPrice(2, 10, 0.1),
20150
+ on: [...OPENAI_RESELLERS]
20151
+ });
20152
+ openai.model("gpt-6-sol", {
20153
+ name: "GPT-6 Sol",
20154
+ ctx: 105e4,
20155
+ maxOut: 128e3,
20156
+ capability: "reasoning",
20157
+ price: gptPrice(2, 10, 0.2),
20158
+ on: [...OPENAI_RESELLERS]
20159
+ });
20160
+ openai.model("gpt-6-luna", {
20161
+ name: "GPT-6 Luna",
20162
+ ctx: 105e4,
20163
+ maxOut: 128e3,
20164
+ capability: null,
20165
+ price: gptPrice(0.1, 0.5, 0.01),
20166
+ on: [...OPENAI_RESELLERS]
20167
+ });
20069
20168
  openai.model("gpt-5.6-sol", {
20070
20169
  name: "GPT-5.6 Sol",
20170
+ // Promotional rate, published as available at least through 2026-11-21.
20071
20171
  ctx: 105e4,
20072
20172
  maxOut: 128e3,
20073
20173
  capability: "reasoning",
20074
- price: tokenPrice(4, 20, { cacheRead: 0.4, longContext: LONG_CONTEXT_272K }),
20174
+ price: gptPrice(4, 20, 0.4),
20075
20175
  on: [...OPENAI_RESELLERS]
20076
20176
  });
20077
20177
  openai.model("gpt-5.6-terra", {
@@ -20079,7 +20179,7 @@ openai.model("gpt-5.6-terra", {
20079
20179
  ctx: 105e4,
20080
20180
  maxOut: 128e3,
20081
20181
  capability: "reasoning",
20082
- price: tokenPrice(2, 12, { cacheRead: 0.2, longContext: LONG_CONTEXT_272K }),
20182
+ price: gptPrice(2, 12, 0.2),
20083
20183
  on: [...OPENAI_RESELLERS]
20084
20184
  });
20085
20185
  openai.model("gpt-5.6-luna", {
@@ -20087,7 +20187,7 @@ openai.model("gpt-5.6-luna", {
20087
20187
  ctx: 105e4,
20088
20188
  maxOut: 128e3,
20089
20189
  capability: null,
20090
- price: tokenPrice(0.2, 1.2, { cacheRead: 0.02, longContext: LONG_CONTEXT_272K }),
20190
+ price: gptPrice(0.2, 1.2, 0.02),
20091
20191
  on: [...OPENAI_RESELLERS]
20092
20192
  });
20093
20193
  openai.model("gpt-5.5", {
@@ -20095,7 +20195,15 @@ openai.model("gpt-5.5", {
20095
20195
  ctx: 105e4,
20096
20196
  maxOut: 128e3,
20097
20197
  capability: "reasoning",
20098
- price: tokenPrice(5, 30, { cacheRead: 0.5, longContext: LONG_CONTEXT_272K }),
20198
+ price: gptPrice(5, 30, 0.5),
20199
+ on: [...OPENAI_RESELLERS]
20200
+ });
20201
+ openai.model("gpt-5.5-pro", {
20202
+ name: "GPT-5.5 Pro",
20203
+ ctx: 105e4,
20204
+ maxOut: 128e3,
20205
+ capability: "reasoning",
20206
+ price: gptPrice(30, 180),
20099
20207
  on: [...OPENAI_RESELLERS]
20100
20208
  });
20101
20209
  openai.model("gpt-5.4", {
@@ -20103,7 +20211,7 @@ openai.model("gpt-5.4", {
20103
20211
  ctx: 105e4,
20104
20212
  maxOut: 128e3,
20105
20213
  capability: "reasoning",
20106
- price: tokenPrice(2.5, 15, { cacheRead: 0.25, longContext: LONG_CONTEXT_272K }),
20214
+ price: gptPrice(2.5, 15, 0.25),
20107
20215
  on: [...OPENAI_RESELLERS]
20108
20216
  });
20109
20217
  openai.model("gpt-5.4-mini", {
@@ -20149,6 +20257,7 @@ openai.model("gpt-5", {
20149
20257
  openai.model("gpt-5-mini", {
20150
20258
  name: "GPT-5 mini",
20151
20259
  ctx: 4e5,
20260
+ maxOut: 128e3,
20152
20261
  capability: null,
20153
20262
  price: tokenPrice(0.25, 2, { cacheRead: 0.025 }),
20154
20263
  on: [...OPENAI_RESELLERS]
@@ -20163,11 +20272,15 @@ openai.model("gpt-5-nano", {
20163
20272
  });
20164
20273
  openai.model("gpt-4.1", {
20165
20274
  name: "GPT-4.1",
20275
+ ctx: 1047576,
20276
+ maxOut: 32768,
20166
20277
  price: tokenPrice(2, 8, { cacheRead: 0.5 }),
20167
20278
  on: [...OPENAI_RESELLERS]
20168
20279
  });
20169
20280
  openai.model("gpt-4o", {
20170
20281
  name: "GPT-4o",
20282
+ ctx: 128e3,
20283
+ maxOut: 16384,
20171
20284
  price: tokenPrice(2.5, 10, { cacheRead: 1.25 }),
20172
20285
  on: [...OPENAI_RESELLERS]
20173
20286
  });
@@ -20191,6 +20304,8 @@ openai.model("gpt-4-turbo", {
20191
20304
  });
20192
20305
  openai.model("o3", {
20193
20306
  name: "o3",
20307
+ ctx: 2e5,
20308
+ maxOut: 1e5,
20194
20309
  capability: "reasoning",
20195
20310
  price: tokenPrice(2, 8, { cacheRead: 0.5 }),
20196
20311
  on: [...OPENAI_RESELLERS]
@@ -20243,57 +20358,100 @@ var google = vendor("google", {
20243
20358
  retention: "configurable",
20244
20359
  training: GOOGLE_TRAINING
20245
20360
  });
20361
+ google.model("gemini-3.8-flash", {
20362
+ name: "Gemini 3.8 Flash",
20363
+ ctx: 1048576,
20364
+ maxOut: 65536,
20365
+ capability: null,
20366
+ price: tokenPrice(0.75, 3.75, { cacheRead: 0.075 }),
20367
+ on: ["vertex"]
20368
+ });
20246
20369
  google.model("gemini-3.7-flash", {
20247
20370
  name: "Gemini 3.7 Flash",
20248
20371
  capability: null,
20249
- // Promotional rate; the published post-promotion rate is 1.50 / 7.50.
20250
20372
  price: tokenPrice(0.75, 3.75),
20251
20373
  on: ["vertex"]
20252
20374
  });
20253
20375
  google.model("gemini-3.6-flash", {
20254
20376
  name: "Gemini 3.6 Flash",
20377
+ ctx: 1048576,
20378
+ maxOut: 65536,
20255
20379
  capability: null,
20256
- price: tokenPrice(0.75, 3.75),
20380
+ price: tokenPrice(0.75, 3.75, { cacheRead: 0.075 }),
20257
20381
  on: ["vertex"]
20258
20382
  });
20259
20383
  google.model("gemini-3.5-flash", {
20260
20384
  name: "Gemini 3.5 Flash",
20261
20385
  capability: null,
20262
- price: tokenPrice(1.5, 9),
20263
20386
  on: ["vertex"]
20264
20387
  });
20265
20388
  google.model("gemini-3.5-flash-lite", {
20266
20389
  name: "Gemini 3.5 Flash Lite",
20390
+ ctx: 1048576,
20391
+ maxOut: 65536,
20392
+ capability: null,
20393
+ price: tokenPrice(0.3, 2.5, { cacheRead: 0.03 }),
20394
+ on: ["vertex"]
20395
+ });
20396
+ google.model("gemini-3.1-flash-lite", {
20397
+ name: "Gemini 3.1 Flash Lite",
20398
+ ctx: 1048576,
20399
+ maxOut: 65536,
20400
+ capability: null,
20401
+ price: tokenPrice(0.25, 1.5, { cacheRead: 0.025 }),
20402
+ on: ["vertex"]
20403
+ });
20404
+ google.model("gemini-3-flash-preview", {
20405
+ name: "Gemini 3 Flash Preview",
20406
+ ctx: 1048576,
20407
+ maxOut: 65536,
20267
20408
  capability: null,
20268
- price: tokenPrice(0.3, 2.5),
20409
+ price: tokenPrice(0.5, 3, { cacheRead: 0.05 }),
20269
20410
  on: ["vertex"]
20270
20411
  });
20271
20412
  google.model("gemini-3.1-pro-preview", {
20272
20413
  name: "Gemini 3.1 Pro Preview",
20414
+ ctx: 1048576,
20415
+ maxOut: 65536,
20273
20416
  capability: "reasoning",
20274
20417
  price: tokenPrice(2, 12, {
20275
- longContext: { thresholdInputTokens: 2e5, input: 4, output: 18 }
20418
+ cacheRead: 0.2,
20419
+ longContext: { thresholdInputTokens: 2e5, input: 4, output: 18, cacheRead: 0.4 }
20276
20420
  }),
20421
+ aliases: ["gemini-3.1-pro-preview-customtools"],
20277
20422
  on: ["vertex"]
20278
20423
  });
20279
20424
  google.model("gemini-2.5-pro", {
20280
20425
  name: "Gemini 2.5 Pro",
20426
+ ctx: 1048576,
20427
+ maxOut: 65536,
20281
20428
  capability: "reasoning",
20282
20429
  price: tokenPrice(1.25, 10, {
20283
- longContext: { thresholdInputTokens: 2e5, input: 2.5, output: 15 }
20430
+ cacheRead: 0.125,
20431
+ longContext: { thresholdInputTokens: 2e5, input: 2.5, output: 15, cacheRead: 0.25 }
20284
20432
  }),
20285
20433
  on: ["vertex"]
20286
20434
  });
20287
20435
  google.model("gemini-2.5-flash", {
20288
20436
  name: "Gemini 2.5 Flash",
20437
+ ctx: 1048576,
20438
+ maxOut: 65536,
20289
20439
  capability: null,
20290
- price: tokenPrice(0.3, 2.5),
20440
+ price: tokenPrice(0.3, 2.5, { cacheRead: 0.03 }),
20291
20441
  on: ["vertex"]
20292
20442
  });
20293
20443
  google.model("gemini-2.5-flash-lite", {
20294
20444
  name: "Gemini 2.5 Flash Lite",
20445
+ ctx: 1048576,
20446
+ maxOut: 65536,
20295
20447
  capability: null,
20296
- price: tokenPrice(0.1, 0.4),
20448
+ price: tokenPrice(0.1, 0.4, { cacheRead: 0.01 }),
20449
+ on: ["vertex"]
20450
+ });
20451
+ google.model("gemini-embedding-2", {
20452
+ name: "Gemini Embedding 2",
20453
+ capability: "embedding",
20454
+ price: tokenPrice(0.2, 0),
20297
20455
  on: ["vertex"]
20298
20456
  });
20299
20457
  google.model("gemini-1-5-pro", { name: "Gemini 1.5 Pro", on: ["vertex"] });
@@ -20309,43 +20467,62 @@ var xai = vendor("xai", {
20309
20467
  source: "https://docs.x.ai/developers/faq/security"
20310
20468
  }
20311
20469
  });
20470
+ function grokPrice(input2, output2, cacheRead) {
20471
+ const base = { input: input2, output: output2, cacheRead };
20472
+ return tokenPrice(input2, output2, {
20473
+ cacheRead,
20474
+ longContext: scaledBand(2e5, base, { input: 2, output: 2, cacheRead: 2 })
20475
+ });
20476
+ }
20477
+ xai.model("grok-4.7", {
20478
+ name: "Grok 4.7",
20479
+ ctx: 5e5,
20480
+ capability: "reasoning",
20481
+ price: grokPrice(2, 6, 0.5)
20482
+ });
20312
20483
  xai.model("grok-4.6", {
20313
20484
  name: "Grok 4.6",
20314
20485
  ctx: 5e5,
20315
20486
  capability: "reasoning",
20316
- price: tokenPrice(2, 6, {
20317
- cacheRead: 0.5,
20318
- longContext: { thresholdInputTokens: 2e5, input: 4, output: 12 }
20319
- }),
20487
+ price: grokPrice(2, 6, 0.5),
20320
20488
  on: ["bedrock"]
20321
20489
  });
20322
20490
  xai.model("grok-4.5", {
20323
20491
  name: "Grok 4.5",
20324
20492
  ctx: 5e5,
20325
20493
  capability: "reasoning",
20326
- price: tokenPrice(2, 6, {
20327
- cacheRead: 0.3,
20328
- longContext: { thresholdInputTokens: 2e5, input: 4, output: 12 }
20329
- })
20494
+ price: grokPrice(2, 6, 0.3)
20330
20495
  });
20331
20496
  xai.model("grok-4.3", {
20332
20497
  name: "Grok 4.3",
20333
20498
  ctx: 1e6,
20334
20499
  capability: "reasoning",
20335
- price: tokenPrice(1.25, 2.5, {
20336
- cacheRead: 0.2,
20337
- longContext: { thresholdInputTokens: 2e5, input: 2.5, output: 5 }
20338
- }),
20500
+ price: grokPrice(1.25, 2.5, 0.2),
20339
20501
  on: ["bedrock"]
20340
20502
  });
20503
+ xai.model("grok-4.20-0309-reasoning", {
20504
+ name: "Grok 4.20 Reasoning",
20505
+ capability: "reasoning",
20506
+ ctx: 1e6,
20507
+ price: grokPrice(1.25, 2.5, 0.2)
20508
+ });
20509
+ xai.model("grok-4.20-0309-non-reasoning", {
20510
+ name: "Grok 4.20",
20511
+ capability: null,
20512
+ ctx: 1e6,
20513
+ price: grokPrice(1.25, 2.5, 0.2)
20514
+ });
20515
+ xai.model("grok-4.20-multi-agent-0309", {
20516
+ name: "Grok 4.20 Multi-Agent",
20517
+ capability: "reasoning",
20518
+ ctx: 1e6,
20519
+ price: grokPrice(1.25, 2.5, 0.2)
20520
+ });
20341
20521
  xai.model("grok-build-0.1", {
20342
20522
  name: "Grok Build 0.1",
20343
20523
  ctx: 256e3,
20344
20524
  capability: "code",
20345
- price: tokenPrice(1, 2, {
20346
- cacheRead: 0.2,
20347
- longContext: { thresholdInputTokens: 2e5, input: 2, output: 4 }
20348
- })
20525
+ price: grokPrice(1, 2, 0.2)
20349
20526
  });
20350
20527
  var deepseek = vendor("deepseek", {
20351
20528
  family: { id: "deepseek", name: "DeepSeek" },
@@ -20358,16 +20535,25 @@ var deepseek = vendor("deepseek", {
20358
20535
  source: "https://cdn.deepseek.com/policies/en-US/deepseek-privacy-policy.html"
20359
20536
  }
20360
20537
  });
20538
+ deepseek.model("deepseek-flash", {
20539
+ name: "DeepSeek V4.1 Flash",
20540
+ ctx: 1e6,
20541
+ maxOut: 384e3,
20542
+ capability: null,
20543
+ price: tokenPrice(0.3, 1.2, { cacheRead: 6e-3 })
20544
+ });
20361
20545
  deepseek.model("deepseek-v4-flash", {
20362
20546
  name: "DeepSeek V4 Flash",
20363
20547
  ctx: 1e6,
20548
+ maxOut: 384e3,
20364
20549
  capability: null,
20365
- price: tokenPrice(0.44, 1.32, { cacheRead: 0.014 }),
20550
+ price: tokenPrice(0.3, 1.2, { cacheRead: 6e-3 }),
20366
20551
  on: ["bedrock", "together", "fireworks", "openrouter", "ollama", "local"]
20367
20552
  });
20368
20553
  deepseek.model("deepseek-v4-pro", {
20369
20554
  name: "DeepSeek V4 Pro",
20370
20555
  ctx: 1e6,
20556
+ maxOut: 384e3,
20371
20557
  capability: "reasoning",
20372
20558
  price: tokenPrice(1.32, 3.96, { cacheRead: 0.044 }),
20373
20559
  on: ["bedrock", "together", "fireworks", "openrouter"]
@@ -20414,7 +20600,14 @@ cohere.model("command-r-plus-08-2024", {
20414
20600
  ctx: 128e3,
20415
20601
  maxOut: 4e3,
20416
20602
  price: tokenPrice(2.5, 10),
20417
- // The undated form is what deployments report; the live id carries the date.
20603
+ on: ["bedrock"]
20604
+ });
20605
+ cohere.model("command-r-plus-04-2024", {
20606
+ name: "Command R+ (04-2024)",
20607
+ seen: "discovered",
20608
+ ctx: 128e3,
20609
+ maxOut: 4e3,
20610
+ price: tokenPrice(3, 15),
20418
20611
  aliases: ["command-r-plus"],
20419
20612
  on: ["bedrock"]
20420
20613
  });
@@ -20482,6 +20675,65 @@ var mistral = vendor("mistral", {
20482
20675
  retention: "unknown",
20483
20676
  defaultHosting: "local"
20484
20677
  });
20678
+ var MISTRAL_API = { defaultHosting: "api" };
20679
+ mistral.model("mistral-large-4", {
20680
+ ...MISTRAL_API,
20681
+ name: "Mistral Large 4",
20682
+ ctx: 1e6,
20683
+ capability: null,
20684
+ // Public preview at a sale rate; the published original is 1.36 / 4.18 / 0.14.
20685
+ price: tokenPrice(0.68, 2.09, { cacheRead: 0.07 })
20686
+ });
20687
+ mistral.model("mistral-large-2512", {
20688
+ ...MISTRAL_API,
20689
+ name: "Mistral Large 3",
20690
+ ctx: 256e3,
20691
+ capability: null,
20692
+ price: tokenPrice(0.5, 1.5, { cacheRead: 0.05 })
20693
+ });
20694
+ mistral.model("mistral-medium-3-5", {
20695
+ ...MISTRAL_API,
20696
+ name: "Mistral Medium 3.5",
20697
+ ctx: 256e3,
20698
+ capability: null,
20699
+ price: tokenPrice(1.5, 7.5, { cacheRead: 0.15 })
20700
+ });
20701
+ mistral.model("mistral-small-2603", {
20702
+ ...MISTRAL_API,
20703
+ name: "Mistral Small 4",
20704
+ ctx: 256e3,
20705
+ capability: null,
20706
+ price: tokenPrice(0.15, 0.6, { cacheRead: 0.015 })
20707
+ });
20708
+ mistral.model("ministral-14b-2512", {
20709
+ ...MISTRAL_API,
20710
+ name: "Ministral 3 14B",
20711
+ ctx: 256e3,
20712
+ capability: null,
20713
+ price: tokenPrice(0.2, 0.2, { cacheRead: 0.02 })
20714
+ });
20715
+ mistral.model("ministral-8b-2512", {
20716
+ ...MISTRAL_API,
20717
+ name: "Ministral 3 8B",
20718
+ ctx: 256e3,
20719
+ capability: null,
20720
+ price: tokenPrice(0.15, 0.15, { cacheRead: 0.015 })
20721
+ });
20722
+ mistral.model("ministral-3b-2512", {
20723
+ ...MISTRAL_API,
20724
+ name: "Ministral 3 3B",
20725
+ ctx: 256e3,
20726
+ capability: null,
20727
+ price: tokenPrice(0.1, 0.1, { cacheRead: 0.01 })
20728
+ });
20729
+ mistral.model("codestral-2508", {
20730
+ ...MISTRAL_API,
20731
+ name: "Codestral",
20732
+ ctx: 128e3,
20733
+ capability: "code",
20734
+ openWeights: false,
20735
+ price: tokenPrice(0.3, 0.9, { cacheRead: 0.03 })
20736
+ });
20485
20737
  mistral.model("mixtral-8x7b", {
20486
20738
  name: "Mixtral 8x7B",
20487
20739
  seen: "discovered",
@@ -22483,6 +22735,31 @@ var DeviceCommandAckBody = external_exports.discriminatedUnion("outcome", [
22483
22735
  projectsScanned: external_exports.number().int().nonnegative()
22484
22736
  }).strict()
22485
22737
  ]);
22738
+ var SIGHTING_KEY_MATERIAL = /^[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048]$/;
22739
+ var sightingKeyMaterial = external_exports.string().regex(SIGHTING_KEY_MATERIAL, "must be the base64url encoding of exactly 32 bytes");
22740
+ var sightingKeyVersion = external_exports.number().int().min(1);
22741
+ var SightingKeyVersion = external_exports.object({
22742
+ keyVersion: sightingKeyVersion,
22743
+ key: sightingKeyMaterial
22744
+ });
22745
+ var SightingKeyResponse = external_exports.object({
22746
+ keyVersion: sightingKeyVersion,
22747
+ algorithm: external_exports.literal("hmac-sha256"),
22748
+ key: sightingKeyMaterial,
22749
+ previous: external_exports.array(SightingKeyVersion).optional()
22750
+ }).refine(
22751
+ (body) => {
22752
+ const versions = [body.keyVersion, ...(body.previous ?? []).map((p) => p.keyVersion)];
22753
+ return new Set(versions).size === versions.length;
22754
+ },
22755
+ { message: "key versions must be distinct", path: ["previous"] }
22756
+ );
22757
+ var StoredSightingKeys = SightingKeyResponse.and(
22758
+ external_exports.object({
22759
+ fetchedAtMs: external_exports.number().int().nonnegative(),
22760
+ endpointFingerprint: external_exports.string().regex(/^[0-9a-f]{64}$/)
22761
+ })
22762
+ );
22486
22763
 
22487
22764
  // ../../packages/schema/src/zod/registry.ts
22488
22765
  var Namespace = external_exports.string().regex(/^[a-z][a-z0-9-]*$/);
@@ -23698,6 +23975,26 @@ var ManagedSettings = external_exports.object({
23698
23975
  };
23699
23976
  }).meta({ id: "ManagedSettings" });
23700
23977
 
23978
+ // ../../packages/schema/src/zod/mod-finding.ts
23979
+ var MOD_FINDINGS_MAX_BYTES = 4 * 1024 * 1024;
23980
+ var ModFindingAction = external_exports.enum(["redacted", "vaulted", "blocked", "warned", "logged"]).meta({ id: "ModFindingAction" });
23981
+ var ModFindingWhere = external_exports.enum(["prompt", "attachment", "tool-input", "tool-output", "memory", "subagent"]).meta({ id: "ModFindingWhere" });
23982
+ var ModFinding = external_exports.strictObject({
23983
+ v: external_exports.literal(1),
23984
+ id: external_exports.string().regex(/^[0-9a-f]{16}$/),
23985
+ at: external_exports.iso.datetime(),
23986
+ ruleId: external_exports.string().min(1),
23987
+ shortName: external_exports.string().min(1).max(64).optional(),
23988
+ category: DetectionCategory,
23989
+ severity: Severity,
23990
+ action: ModFindingAction,
23991
+ where: ModFindingWhere,
23992
+ pointer: external_exports.string().regex(POINTER_TOKEN_ANCHORED).optional()
23993
+ }).refine((f) => f.action === "vaulted" === (f.pointer !== void 0), {
23994
+ path: ["pointer"],
23995
+ message: "pointer is present only for a vaulted finding, and a vaulted finding has one"
23996
+ }).meta({ id: "ModFinding" });
23997
+
23701
23998
  // ../../packages/schema/src/zod/mod-policy-snapshot.ts
23702
23999
  var MOD_POLICY_SNAPSHOT_VERSION = 1;
23703
24000
  var MOD_POLICY_SNAPSHOT_MAX_BYTES = 4 * 1024 * 1024;
@@ -24427,11 +24724,21 @@ var DB_EVENT_TYPE_TO_KIND = {
24427
24724
  };
24428
24725
  var TIMELINE_EVENT_TYPES = Object.keys(DB_EVENT_TYPE_TO_KIND).map((kind) => `'${kind}'`).join(", ");
24429
24726
  var DEFAULT_HARNESS = HARNESS.ClaudeCode;
24727
+ var CALL_WRITE_SPLIT = `(coalesce(ephemeral_1h_input_tokens, 0) + coalesce(ephemeral_5m_input_tokens, 0))`;
24430
24728
  var CALL_PROMPT_TOKENS = `(coalesce(input_tokens, 0) + coalesce(cache_read_input_tokens, 0)
24431
- + coalesce(ephemeral_1h_input_tokens, 0) + coalesce(ephemeral_5m_input_tokens, 0))`;
24432
- var CALL_BAND = LONG_CONTEXT_THRESHOLDS.length === 0 ? "0" : LONG_CONTEXT_THRESHOLDS.map((t) => `(${CALL_PROMPT_TOKENS} > ${String(Math.trunc(t))})`).join(
24433
- " + "
24729
+ + max(coalesce(cache_creation_input_tokens, 0), ${CALL_WRITE_SPLIT}))`;
24730
+ var CALL_BAND = LONG_CONTEXT_THRESHOLDS.map(
24731
+ (t) => `(${CALL_PROMPT_TOKENS} > ${String(Math.trunc(t))})`
24434
24732
  );
24733
+ var CALL_USAGE_SHAPE = [
24734
+ "coalesce(input_tokens, 0) > 0",
24735
+ "coalesce(output_tokens, 0) > 0",
24736
+ "coalesce(cache_read_input_tokens, 0) > 0",
24737
+ "coalesce(ephemeral_1h_input_tokens, 0) > 0",
24738
+ "coalesce(ephemeral_5m_input_tokens, 0) > 0",
24739
+ `coalesce(cache_creation_input_tokens, 0) > ${CALL_WRITE_SPLIT}`,
24740
+ "coalesce(web_search_requests, 0) > 0"
24741
+ ].map((condition) => `(${condition})`);
24435
24742
  var LLM_USAGE_SELECT = `
24436
24743
  SELECT root_session_id AS sessionId,
24437
24744
  provider,
@@ -24445,7 +24752,14 @@ var LLM_USAGE_SELECT = `
24445
24752
  coalesce(sum(ephemeral_5m_input_tokens), 0) AS ephemeral5mTokens,
24446
24753
  coalesce(sum(web_search_requests), 0) AS webSearchRequests,
24447
24754
  coalesce(max(${CALL_PROMPT_TOKENS}), 0) AS promptTokens`;
24448
- var LLM_USAGE_GROUP = `GROUP BY root_session_id, provider, model, service_tier, ${CALL_BAND}`;
24755
+ var LLM_USAGE_GROUP = `GROUP BY ${[
24756
+ "root_session_id",
24757
+ "provider",
24758
+ "model",
24759
+ "service_tier",
24760
+ ...CALL_BAND.length === 0 ? [] : [CALL_BAND.join(" + ")],
24761
+ ...CALL_USAGE_SHAPE
24762
+ ].join(", ")}`;
24449
24763
 
24450
24764
  // ../../packages/persistence/src/repositories/exceptions.ts
24451
24765
  import { randomUUID as randomUUID2 } from "crypto";
@@ -24808,21 +25122,27 @@ import {
24808
25122
  createDecipheriv,
24809
25123
  createHmac as createHmac2,
24810
25124
  hkdfSync,
25125
+ randomBytes as randomBytes2,
24811
25126
  timingSafeEqual
24812
25127
  } from "crypto";
24813
25128
 
24814
25129
  // ../../packages/persistence/src/vault/key-provider.ts
24815
25130
  import { execFileSync } from "child_process";
24816
- import { randomBytes as randomBytes2 } from "crypto";
25131
+ import { randomBytes as randomBytes3 } from "crypto";
24817
25132
  import { chmodSync as chmodSync3, readFileSync as readFileSync10, renameSync as renameSync4, rmSync as rmSync6, statSync as statSync5, writeFileSync as writeFileSync3 } from "fs";
24818
25133
  import { join as join15 } from "path";
24819
25134
 
25135
+ // ../../packages/persistence/src/vault/sighting-keys.ts
25136
+ import { createHash as createHash6 } from "crypto";
25137
+ import { readFileSync as readFileSync11, rmSync as rmSync7 } from "fs";
25138
+ import { join as join16 } from "path";
25139
+
24820
25140
  // ../../packages/persistence/src/vault/vault.ts
24821
- import { randomBytes as randomBytes3, randomUUID as randomUUID12 } from "crypto";
25141
+ import { randomBytes as randomBytes4, randomUUID as randomUUID12 } from "crypto";
24822
25142
 
24823
25143
  // ../../packages/persistence/src/warn-era-cap.ts
24824
25144
  import { existsSync as existsSync7, writeFileSync as writeFileSync4 } from "fs";
24825
- import { join as join16 } from "path";
25145
+ import { join as join17 } from "path";
24826
25146
 
24827
25147
  // ../../packages/plugin-sdk/src/provider-env.ts
24828
25148
  var DEFAULT_ANTHROPIC_HOST = "api.anthropic.com";
@@ -24876,7 +25196,7 @@ function resolveProvider() {
24876
25196
  function loadConfig(base = defaultDataDir(), resolveProviderFn = resolveProvider) {
24877
25197
  try {
24878
25198
  ensureLayoutDirSync(base);
24879
- const settingsFile = join17(settingsDir(base), "settings.json");
25199
+ const settingsFile = join18(settingsDir(base), "settings.json");
24880
25200
  if (existsSync8(settingsFile)) tightenFile(settingsFile);
24881
25201
  } catch {
24882
25202
  }
@@ -25755,6 +26075,10 @@ var GROWTH_CORPORA = [
25755
26075
  build: (length) => joinTo(length, "[", "]", (i) => `"${SQL_WORDS[i % SQL_WORDS.length] ?? ""} ${String(i)}"`)
25756
26076
  },
25757
26077
  { name: "single-quoted keyword run ('where)", build: (length) => repeatTo("'where", length) },
26078
+ {
26079
+ name: 'double-quoted keyword literal run ("where" )',
26080
+ build: (length) => repeatTo('"where" ', length)
26081
+ },
25758
26082
  { name: "double-quote run", build: (length) => repeatTo('"', length) },
25759
26083
  { name: "space run", build: (length) => repeatTo(" ", length) },
25760
26084
  { name: "newline run", build: (length) => repeatTo("\n", length) },
@@ -25765,11 +26089,11 @@ var GROWTH_CORPORA = [
25765
26089
  ];
25766
26090
 
25767
26091
  // ../../packages/plugin-sdk/src/hook-fail-opens.ts
25768
- import { readFileSync as readFileSync11 } from "fs";
25769
- import { join as join18 } from "path";
26092
+ import { readFileSync as readFileSync12 } from "fs";
26093
+ import { join as join19 } from "path";
25770
26094
  var HOOK_FAIL_OPENS_FILENAME = "hook-fail-opens.json";
25771
26095
  function hookFailOpensPath(dataDir2) {
25772
- return join18(dataDir2, HOOK_FAIL_OPENS_FILENAME);
26096
+ return join19(dataDir2, HOOK_FAIL_OPENS_FILENAME);
25773
26097
  }
25774
26098
  function recordHookFailOpen(dataDir2, nowMs) {
25775
26099
  try {
@@ -25788,7 +26112,7 @@ function recordHookFailOpen(dataDir2, nowMs) {
25788
26112
  }
25789
26113
  function readHookFailOpens(dataDir2) {
25790
26114
  try {
25791
- const parsed = JSON.parse(readFileSync11(hookFailOpensPath(dataDir2), "utf8"));
26115
+ const parsed = JSON.parse(readFileSync12(hookFailOpensPath(dataDir2), "utf8"));
25792
26116
  if (typeof parsed !== "object" || parsed === null) return null;
25793
26117
  const record2 = parsed;
25794
26118
  if (!isPositiveSafeInteger(record2.failOpens)) return null;
@@ -25808,18 +26132,18 @@ import {
25808
26132
  fstatSync,
25809
26133
  mkdirSync as mkdirSync2,
25810
26134
  openSync as openSync2,
25811
- readFileSync as readFileSync12,
26135
+ readFileSync as readFileSync13,
25812
26136
  readSync,
25813
26137
  writeFileSync as writeFileSync5
25814
26138
  } from "fs";
25815
- import { join as join19 } from "path";
26139
+ import { join as join20 } from "path";
25816
26140
  var SESSION_MODEL_MARKER = "session-model";
25817
26141
  function recordSessionModel(dataDir2, sessionId, model) {
25818
26142
  if (sessionId === void 0 || sessionId === "") return;
25819
26143
  if (model === void 0 || model === "") return;
25820
26144
  try {
25821
26145
  mkdirSync2(dataDir2, { recursive: true, mode: DATA_DIR_MODE });
25822
- writeFileSync5(join19(dataDir2, SESSION_MODEL_MARKER), JSON.stringify({ sessionId, model }), {
26146
+ writeFileSync5(join20(dataDir2, SESSION_MODEL_MARKER), JSON.stringify({ sessionId, model }), {
25823
26147
  encoding: "utf8",
25824
26148
  mode: DATA_FILE_MODE
25825
26149
  });
@@ -25831,7 +26155,7 @@ function readTail(path) {
25831
26155
  const fd = openSync2(path, "r");
25832
26156
  try {
25833
26157
  const { size } = fstatSync(fd);
25834
- if (size <= TAIL_BYTES) return { text: readFileSync12(fd, "utf8"), truncated: false };
26158
+ if (size <= TAIL_BYTES) return { text: readFileSync13(fd, "utf8"), truncated: false };
25835
26159
  const buffer = Buffer.allocUnsafe(TAIL_BYTES);
25836
26160
  let filled = 0;
25837
26161
  while (filled < TAIL_BYTES) {
@@ -25878,9 +26202,9 @@ var codexModelFromRecord = (record2) => {
25878
26202
 
25879
26203
  // ../../packages/plugin-sdk/src/throttle.ts
25880
26204
  import { mkdirSync as mkdirSync3, statSync as statSync6, writeFileSync as writeFileSync6 } from "fs";
25881
- import { join as join20 } from "path";
26205
+ import { join as join21 } from "path";
25882
26206
  function throttled(dataDir2, markerName, windowMs) {
25883
- const marker = join20(dataDir2, markerName);
26207
+ const marker = join21(dataDir2, markerName);
25884
26208
  try {
25885
26209
  if (Date.now() - statSync6(marker).mtimeMs < windowMs) return true;
25886
26210
  } catch {
@@ -25895,27 +26219,27 @@ function throttled(dataDir2, markerName, windowMs) {
25895
26219
 
25896
26220
  // src/history/reconcile-trigger.ts
25897
26221
  import { spawn } from "child_process";
25898
- import { dirname as dirname4, join as join22 } from "path";
26222
+ import { dirname as dirname4, join as join23 } from "path";
25899
26223
  import { fileURLToPath } from "url";
25900
26224
 
25901
26225
  // src/history/tail.ts
25902
- import { createHash as createHash6 } from "crypto";
26226
+ import { createHash as createHash7 } from "crypto";
25903
26227
  import {
25904
26228
  closeSync as closeSync3,
25905
26229
  fstatSync as fstatSync2,
25906
26230
  mkdirSync as mkdirSync4,
25907
26231
  openSync as openSync3,
25908
- readFileSync as readFileSync13,
26232
+ readFileSync as readFileSync14,
25909
26233
  readSync as readSync2,
25910
26234
  writeFileSync as writeFileSync7
25911
26235
  } from "fs";
25912
- import { join as join21 } from "path";
26236
+ import { join as join22 } from "path";
25913
26237
  var SAFE_SESSION_ID = /^[A-Za-z0-9._-]+$/;
25914
26238
  function safeSessionId(sessionId) {
25915
26239
  if (SAFE_SESSION_ID.test(sessionId) && sessionId !== "." && sessionId !== "..") {
25916
26240
  return sessionId;
25917
26241
  }
25918
- return createHash6("sha256").update(sessionId).digest("hex");
26242
+ return createHash7("sha256").update(sessionId).digest("hex");
25919
26243
  }
25920
26244
 
25921
26245
  // src/history/reconcile-trigger.ts
@@ -25926,7 +26250,7 @@ function triggerReconcile(dataDir2, sessionId, transcriptPath) {
25926
26250
  const marker = `${RECONCILE_MARKER_PREFIX}-${safeSessionId(sessionId)}`;
25927
26251
  if (throttled(dataDir2, marker, RECONCILE_THROTTLE_MS)) return;
25928
26252
  const here = dirname4(fileURLToPath(import.meta.url));
25929
- const child = spawn(process.execPath, [join22(here, "reconcile.js"), sessionId, transcriptPath], {
26253
+ const child = spawn(process.execPath, [join23(here, "reconcile.js"), sessionId, transcriptPath], {
25930
26254
  detached: true,
25931
26255
  stdio: "ignore"
25932
26256
  });
@@ -25988,8 +26312,8 @@ function parseStopPayload(input2) {
25988
26312
  }
25989
26313
 
25990
26314
  // src/hooks/store-health.ts
25991
- import { mkdirSync as mkdirSync5, readFileSync as readFileSync18, writeFileSync as writeFileSync8 } from "fs";
25992
- import { dirname as dirname6, join as join30 } from "path";
26315
+ import { mkdirSync as mkdirSync5, readFileSync as readFileSync19, writeFileSync as writeFileSync8 } from "fs";
26316
+ import { dirname as dirname6, join as join31 } from "path";
25993
26317
 
25994
26318
  // ../../packages/remote/src/http.ts
25995
26319
  import { request as httpRequest } from "http";
@@ -26003,16 +26327,16 @@ var SLASH2 = "/".charCodeAt(0);
26003
26327
  var REQUEST_TIMEOUT_MS = 2e3;
26004
26328
 
26005
26329
  // ../../packages/plugin-runtime/src/attached/forward-drops.ts
26006
- import { readFileSync as readFileSync14 } from "fs";
26007
- import { join as join23 } from "path";
26330
+ import { readFileSync as readFileSync15 } from "fs";
26331
+ import { join as join24 } from "path";
26008
26332
 
26009
26333
  // ../../packages/plugin-runtime/src/attached/forward-policy.ts
26010
26334
  import { randomUUID as randomUUID13 } from "crypto";
26011
26335
  import { readFile, rename, writeFile } from "fs/promises";
26012
- import { join as join24 } from "path";
26336
+ import { join as join25 } from "path";
26013
26337
 
26014
26338
  // ../../packages/plugin-runtime/src/attached/history-sync.ts
26015
- import { createHash as createHash7 } from "crypto";
26339
+ import { createHash as createHash8 } from "crypto";
26016
26340
  import { hostname as hostname4 } from "os";
26017
26341
 
26018
26342
  // ../../packages/plugin-runtime/src/attached/capture-rebuild.ts
@@ -26032,16 +26356,16 @@ var HISTORY_SYNC_THROTTLE_MS = 5 * 60 * 1e3;
26032
26356
 
26033
26357
  // ../../packages/plugin-runtime/src/attached/install-record.ts
26034
26358
  import { readFile as readFile2, stat } from "fs/promises";
26035
- import { basename as basename2, dirname as dirname5, join as join25, resolve as resolve2 } from "path";
26359
+ import { basename as basename2, dirname as dirname5, join as join26, resolve as resolve2 } from "path";
26036
26360
 
26037
26361
  // ../../packages/plugin-runtime/src/attached/plugin-block.ts
26038
- import { readFileSync as readFileSync15 } from "fs";
26362
+ import { readFileSync as readFileSync16 } from "fs";
26039
26363
  var INSTALL_RECORD_READ_TIMEOUT_MS = REQUEST_TIMEOUT_MS / 2;
26040
26364
 
26041
26365
  // ../../packages/plugin-runtime/src/attached/policy-store.ts
26042
26366
  import { randomUUID as randomUUID14 } from "crypto";
26043
26367
  import { readFile as readFile3, rm, writeFile as writeFile2 } from "fs/promises";
26044
- import { join as join26 } from "path";
26368
+ import { join as join27 } from "path";
26045
26369
 
26046
26370
  // ../../packages/plugin-runtime/src/attached/atomic-publish.ts
26047
26371
  import { rename as rename2 } from "fs/promises";
@@ -26050,8 +26374,8 @@ var TIMED_RETRIES = 4;
26050
26374
  var ATTEMPTS = 1 + IMMEDIATE_RETRIES + TIMED_RETRIES;
26051
26375
 
26052
26376
  // ../../packages/plugin-runtime/src/attached/posture-report-state.ts
26053
- import { readFileSync as readFileSync16 } from "fs";
26054
- import { join as join27 } from "path";
26377
+ import { readFileSync as readFileSync17 } from "fs";
26378
+ import { join as join28 } from "path";
26055
26379
  var OUTCOME_KEYS = {
26056
26380
  ok: true,
26057
26381
  unauthorized: true,
@@ -26074,11 +26398,11 @@ import { DatabaseSync as DatabaseSync3 } from "node:sqlite";
26074
26398
  // ../../packages/plugin-runtime/src/attached/posture-store.ts
26075
26399
  import { randomUUID as randomUUID15 } from "crypto";
26076
26400
  import { readFile as readFile4, rm as rm2, writeFile as writeFile3 } from "fs/promises";
26077
- import { join as join28 } from "path";
26401
+ import { join as join29 } from "path";
26078
26402
 
26079
26403
  // ../../packages/plugin-runtime/src/attached/sync-state.ts
26080
- import { readFileSync as readFileSync17 } from "fs";
26081
- import { join as join29 } from "path";
26404
+ import { readFileSync as readFileSync18 } from "fs";
26405
+ import { join as join30 } from "path";
26082
26406
 
26083
26407
  // ../../packages/plugin-runtime/src/attached/status.ts
26084
26408
  var REFUSAL_LINES = {
@@ -26094,6 +26418,9 @@ var OUTCOME_LINES = {
26094
26418
  "invalid-bundle": "control plane sent a policy bundle this build cannot read"
26095
26419
  };
26096
26420
 
26421
+ // ../../packages/plugin-runtime/src/attached/sighting-key-sync.ts
26422
+ var SIGHTING_KEY_MAX_AGE_MS = 24 * 60 * 60 * 1e3;
26423
+
26097
26424
  // ../../packages/plugin-runtime/src/attached/sync-trigger.ts
26098
26425
  import { spawn as spawn3 } from "child_process";
26099
26426
  import { fileURLToPath as fileURLToPath3 } from "url";
@@ -26122,7 +26449,7 @@ function markerDirs(dataDir2) {
26122
26449
  function alreadyClaimed(dirs, marker, sessionId) {
26123
26450
  return dirs.some((dir) => {
26124
26451
  try {
26125
- return readFileSync18(join30(dir, marker), "utf8") === sessionId;
26452
+ return readFileSync19(join31(dir, marker), "utf8") === sessionId;
26126
26453
  } catch {
26127
26454
  return false;
26128
26455
  }
@@ -26132,7 +26459,7 @@ function recordClaim(dirs, marker, sessionId) {
26132
26459
  for (const dir of dirs) {
26133
26460
  try {
26134
26461
  mkdirSync5(dir, { recursive: true, mode: DATA_DIR_MODE });
26135
- writeFileSync8(join30(dir, marker), sessionId, { mode: DATA_FILE_MODE });
26462
+ writeFileSync8(join31(dir, marker), sessionId, { mode: DATA_FILE_MODE });
26136
26463
  return;
26137
26464
  } catch {
26138
26465
  }