@akasecurity/ai-tc-claude-code 0.9.4 → 0.9.5

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/intro.js CHANGED
@@ -492,7 +492,7 @@ var require_ignore = __commonJS({
492
492
  });
493
493
 
494
494
  // src/intro.ts
495
- import { readFileSync as readFileSync8 } from "fs";
495
+ import { readFileSync as readFileSync10 } from "fs";
496
496
 
497
497
  // ../../packages/schema/src/exception-scope.ts
498
498
  var MINUTE_MS = 6e4;
@@ -15089,7 +15089,17 @@ var Finding = external_exports.object({
15089
15089
  }).meta({ id: "Finding" });
15090
15090
  var DetectedFinding = Finding.meta({ id: "DetectedFinding" });
15091
15091
  var FindingAction = external_exports.enum(["blocked", "redacted", "warned", "allowed", "quarantined", "monitored"]).meta({ id: "FindingAction" });
15092
- var FindingProvider = external_exports.enum(["claudecode", "claudedesktop", "cursor", "copilot", "chatgpt", "api"]).meta({ id: "FindingProvider" });
15092
+ var FindingProvider = external_exports.enum([
15093
+ "claudecode",
15094
+ "claudedesktop",
15095
+ "cursor",
15096
+ "copilot",
15097
+ "chatgpt",
15098
+ "claudeai",
15099
+ "codex",
15100
+ "antigravity",
15101
+ "api"
15102
+ ]).meta({ id: "FindingProvider" });
15093
15103
  var FindingCategory = external_exports.enum([
15094
15104
  "secret",
15095
15105
  "pii",
@@ -15143,7 +15153,16 @@ var FindingInstance = external_exports.object({
15143
15153
  confidence: external_exports.number().min(0).max(1),
15144
15154
  // Lifecycle status (see FindingStatus). Optional so legacy callers/rows
15145
15155
  // that predate the resolution feature stay valid.
15146
- status: FindingStatus.optional()
15156
+ status: FindingStatus.optional(),
15157
+ // The audit event this finding was captured from. Optional so callers that
15158
+ // do not project it stay valid. An at-rest finding is content-addressed by
15159
+ // finding_key and its row is upserted on re-detection, so this names the
15160
+ // MOST RECENT detection event, not the first.
15161
+ eventId: external_exports.string().optional(),
15162
+ // The session that event belongs to, when it has one — the seam a
15163
+ // per-instance "view session" link needs. Absent for events captured
15164
+ // outside a session.
15165
+ sessionId: external_exports.string().optional()
15147
15166
  }).meta({ id: "FindingInstance" });
15148
15167
  var FindingGroup = external_exports.object({
15149
15168
  id: external_exports.string(),
@@ -15187,7 +15206,11 @@ var FindingFacets = external_exports.object({
15187
15206
  // for every instance, so every group lands in a bucket; a status-less
15188
15207
  // group (possible only for callers whose rows carry no statuses) is
15189
15208
  // counted under no value.
15190
- status: external_exports.array(FindingFacetItem)
15209
+ status: external_exports.array(FindingFacetItem),
15210
+ // Host tool (attributes.tool_name). Present only on the instance-level
15211
+ // reads, which can filter by it; the grouped read omits the dimension
15212
+ // because a group spans tools.
15213
+ tool: external_exports.array(FindingFacetItem).optional()
15191
15214
  }).meta({ id: "FindingFacets" });
15192
15215
  var ListGroupedFindingsQuery = external_exports.object({
15193
15216
  // NOTE: severity filters by Severity (critical/high/medium/low), not by
@@ -15204,6 +15227,16 @@ var ListGroupedFindingsQuery = external_exports.object({
15204
15227
  // Scope to findings whose event carries this session id (the Activity page's
15205
15228
  // session → findings drilldown). Findings without a session never match.
15206
15229
  sessionId: external_exports.string().optional(),
15230
+ // Inclusive lower bound on the parent event's timestamp, so a caller arriving
15231
+ // from a time-scoped page (Activity's range) can carry that scope. Absent
15232
+ // means all time — this list has no default window.
15233
+ from: external_exports.iso.datetime().optional(),
15234
+ // A group or instance id that must appear in the page even when the cursor
15235
+ // has already advanced past its sort position. This is what keeps the
15236
+ // Findings page's one-shot ?finding= deep link resolving once the list
15237
+ // paginates: the target group is appended out of sort order rather than
15238
+ // scanning forward for it. Never affects totals, facets or the cursor.
15239
+ includeId: external_exports.string().optional(),
15207
15240
  groupBy: external_exports.literal("type").optional(),
15208
15241
  limit: external_exports.coerce.number().int().min(1).max(100).optional(),
15209
15242
  cursor: external_exports.string().optional()
@@ -15248,9 +15281,100 @@ var FindingInstanceDetail = FindingInstance.extend({
15248
15281
  detection: FindingDetectionRef,
15249
15282
  policy: FindingPolicyRef
15250
15283
  }).meta({ id: "FindingInstanceDetail" });
15284
+ var ListFindingInstancesQuery = external_exports.object({
15285
+ severity: external_exports.array(Severity).optional(),
15286
+ // Rule ids, the same vocabulary the grouped list's `subtype` carries.
15287
+ subtype: external_exports.array(external_exports.string()).optional(),
15288
+ provider: external_exports.array(FindingProvider).optional(),
15289
+ action: external_exports.array(FindingAction).optional(),
15290
+ // Matches each instance's OWN derived status (deriveFindingStatus), unlike
15291
+ // the grouped query's group-level fold.
15292
+ status: external_exports.array(FindingStatus).optional(),
15293
+ // Exact host-tool names (attributes.tool_name, e.g. 'Bash'). A real filter,
15294
+ // where the free-text `q` can only match the rendered "via Bash" label.
15295
+ tool: external_exports.array(external_exports.string()).optional(),
15296
+ // Exact repository / file-path matches, for the drill-down out of the
15297
+ // locations view. A row whose event carries no repo/file matches neither.
15298
+ repo: external_exports.string().optional(),
15299
+ file: external_exports.string().optional(),
15300
+ q: external_exports.string().optional(),
15301
+ sessionId: external_exports.string().optional(),
15302
+ from: external_exports.iso.datetime().optional(),
15303
+ limit: external_exports.coerce.number().int().min(1).max(200).optional(),
15304
+ cursor: external_exports.string().optional()
15305
+ });
15306
+ var ListFindingInstancesResponse = external_exports.object({
15307
+ // Instances matching the filters across the whole scope, not just this
15308
+ // page — cursor-independent, like the grouped list's totals.
15309
+ totals: external_exports.object({ findings: external_exports.number().int().nonnegative() }),
15310
+ // Counts in INSTANCES here, where the grouped response counts groups. Each
15311
+ // dimension still excludes its own filter.
15312
+ facets: FindingFacets,
15313
+ items: external_exports.array(FindingInstanceDetail),
15314
+ nextCursor: external_exports.string().nullable()
15315
+ }).meta({ id: "ListFindingInstancesResponse" });
15316
+ var FindingLocationFile = external_exports.object({
15317
+ // Empty when the instances carried no file path (a prompt or a tool call
15318
+ // with no file attribution).
15319
+ file: external_exports.string(),
15320
+ instanceCount: external_exports.number().int().nonnegative(),
15321
+ maxSeverity: Severity,
15322
+ latestDetectedAt: external_exports.iso.datetime(),
15323
+ // Folded from the instances' derived statuses with the same
15324
+ // open-dominates precedence a group uses.
15325
+ status: FindingStatus.optional(),
15326
+ // Distinct rules seen at this location, capped — the row shows them as
15327
+ // chips, and the count is what conveys scale.
15328
+ ruleIds: external_exports.array(external_exports.string())
15329
+ }).meta({ id: "FindingLocationFile" });
15330
+ var FindingLocationRepo = external_exports.object({
15331
+ /** Empty when the instances carried no repo attribute. */
15332
+ repo: external_exports.string(),
15333
+ instanceCount: external_exports.number().int().nonnegative(),
15334
+ maxSeverity: Severity,
15335
+ latestDetectedAt: external_exports.iso.datetime(),
15336
+ status: FindingStatus.optional(),
15337
+ files: external_exports.array(FindingLocationFile)
15338
+ }).meta({ id: "FindingLocationRepo" });
15339
+ var ListFindingLocationsQuery = external_exports.object({
15340
+ severity: external_exports.array(Severity).optional(),
15341
+ subtype: external_exports.array(external_exports.string()).optional(),
15342
+ provider: external_exports.array(FindingProvider).optional(),
15343
+ action: external_exports.array(FindingAction).optional(),
15344
+ // Per-instance, as in ListFindingInstancesQuery: a location keeps the
15345
+ // instances that match, and folds its status from those.
15346
+ status: external_exports.array(FindingStatus).optional(),
15347
+ tool: external_exports.array(external_exports.string()).optional(),
15348
+ q: external_exports.string().optional(),
15349
+ sessionId: external_exports.string().optional(),
15350
+ from: external_exports.iso.datetime().optional(),
15351
+ limit: external_exports.coerce.number().int().min(1).max(500).optional()
15352
+ });
15353
+ var ListFindingLocationsResponse = external_exports.object({
15354
+ totals: external_exports.object({
15355
+ findings: external_exports.number().int().nonnegative(),
15356
+ repos: external_exports.number().int().nonnegative(),
15357
+ files: external_exports.number().int().nonnegative()
15358
+ }),
15359
+ /** Sorted by max severity, then most recent. */
15360
+ items: external_exports.array(FindingLocationRepo),
15361
+ /** Whether `limit` truncated the repo list. */
15362
+ hasMore: external_exports.boolean()
15363
+ }).meta({ id: "ListFindingLocationsResponse" });
15251
15364
 
15252
15365
  // ../../packages/schema/src/zod/harness-map.ts
15253
- var Harness = external_exports.enum(["claudecode", "cursor", "copilot", "codex", "windsurf", "claudedesktop", "chatgpt", "api"]).meta({ id: "Harness" });
15366
+ var Harness = external_exports.enum([
15367
+ "claudecode",
15368
+ "cursor",
15369
+ "copilot",
15370
+ "codex",
15371
+ "antigravity",
15372
+ "windsurf",
15373
+ "claudedesktop",
15374
+ "chatgpt",
15375
+ "claudeai",
15376
+ "api"
15377
+ ]).meta({ id: "Harness" });
15254
15378
 
15255
15379
  // ../../packages/schema/src/zod/meta.ts
15256
15380
  var InventoryObjectType = external_exports.enum(["host", "harness", "user", "skill", "hook", "mcp_server", "config_file"]).meta({ id: "InventoryObjectType" });
@@ -15704,7 +15828,18 @@ var ActivityOverviewResponse = external_exports.object({
15704
15828
  // ../../packages/schema/src/zod/event.ts
15705
15829
  var EventKind = external_exports.enum(["prompt", "response", "code_change", "tool_use"]).meta({ id: "EventKind" });
15706
15830
  var CAPTURE_EVENT_TYPES_SQL = EventKind.options.map((k) => `'${k}'`).join(",");
15707
- var SourceTool = external_exports.enum(["claude-code", "claude-desktop", "cursor", "chatgpt", "github-copilot", "cli", "unknown"]).meta({ id: "SourceTool" });
15831
+ var SourceTool = external_exports.enum([
15832
+ "claude-code",
15833
+ "claude-desktop",
15834
+ "cursor",
15835
+ "chatgpt",
15836
+ "claude-ai",
15837
+ "github-copilot",
15838
+ "codex",
15839
+ "antigravity",
15840
+ "cli",
15841
+ "unknown"
15842
+ ]).meta({ id: "SourceTool" });
15708
15843
  var EventMetadata = external_exports.object({
15709
15844
  sessionId: external_exports.string().optional(),
15710
15845
  repo: external_exports.string().optional(),
@@ -15775,7 +15910,7 @@ var TrustLevel = external_exports.enum(["known-good", "risky", "unapproved"]).me
15775
15910
  var Flag = external_exports.enum(["update", "stale", "conflict", "unknown", "change", "untracked", "risk", "findings"]).meta({ id: "Flag" });
15776
15911
  var Visibility = external_exports.enum(["public", "private"]).meta({ id: "Visibility" });
15777
15912
  var HarnessEventKind = external_exports.enum(["block", "redact", "warn"]).meta({ id: "HarnessEventKind" });
15778
- var HarnessId = external_exports.enum(["claudecode", "cursor", "codex"]).meta({ id: "HarnessId" });
15913
+ var HarnessId = external_exports.enum(["claudecode", "cursor", "codex", "antigravity"]).meta({ id: "HarnessId" });
15779
15914
  var AccessCounts = external_exports.object({
15780
15915
  open: external_exports.number().int().nonnegative(),
15781
15916
  approved: external_exports.number().int().nonnegative(),
@@ -16044,6 +16179,7 @@ var ExceptionBundleEntry = DetectionException.pick({
16044
16179
  useCount: true,
16045
16180
  conditions: true
16046
16181
  });
16182
+ var ExceptionDescriptor = DetectionException.omit({ valueFingerprint: true });
16047
16183
 
16048
16184
  // ../../packages/schema/src/zod/rule.ts
16049
16185
  var MatcherType = external_exports.enum(["keyword", "regex", "validator"]).meta({ id: "MatcherType" });
@@ -16769,6 +16905,35 @@ var EgressWriteSummary = external_exports.object({
16769
16905
  droppedFiles: external_exports.array(external_exports.string()).default([])
16770
16906
  }).meta({ id: "EgressWriteSummary" });
16771
16907
 
16908
+ // ../../packages/schema/src/zod/exception-action.ts
16909
+ var confirmation = external_exports.string().optional();
16910
+ var ApproveBlockedInput = external_exports.object({
16911
+ reference: external_exports.string(),
16912
+ scope: external_exports.string(),
16913
+ reason: external_exports.string(),
16914
+ confirmation
16915
+ });
16916
+ var AddExceptionInput = external_exports.object({
16917
+ ruleId: external_exports.string(),
16918
+ value: external_exports.string(),
16919
+ scope: external_exports.string(),
16920
+ reason: external_exports.string(),
16921
+ confirmation
16922
+ });
16923
+ var GrantRevealInput = external_exports.object({
16924
+ pointer: external_exports.string(),
16925
+ scope: external_exports.string(),
16926
+ justification: external_exports.string(),
16927
+ confirmation
16928
+ });
16929
+ var RevokeExceptionInput = external_exports.object({
16930
+ id: external_exports.string(),
16931
+ reason: external_exports.string()
16932
+ });
16933
+ var RotateKeyInput = external_exports.object({
16934
+ confirmation: external_exports.string()
16935
+ });
16936
+
16772
16937
  // ../../packages/schema/src/zod/installed-pack.ts
16773
16938
  var InstalledPack = external_exports.object({
16774
16939
  id: external_exports.guid(),
@@ -16900,6 +17065,48 @@ var VaultInventoryEntry = external_exports.object({
16900
17065
  revealGrantId: external_exports.string().nullable(),
16901
17066
  sightings: external_exports.array(VaultSighting)
16902
17067
  });
17068
+ var MAX_VAULT_PAGE_LIMIT = 200;
17069
+ var ListVaultInventoryQuery = external_exports.object({
17070
+ limit: external_exports.coerce.number().int().min(1).max(MAX_VAULT_PAGE_LIMIT).optional(),
17071
+ // Opaque; names the last row of the page just served.
17072
+ cursor: external_exports.string().optional()
17073
+ });
17074
+ var ListVaultInventoryResponse = external_exports.object({
17075
+ // Vaulted values across the whole store, not just this page — cursor-
17076
+ // independent, so paging never changes what the count claims.
17077
+ totals: external_exports.object({ values: external_exports.number().int().nonnegative() }),
17078
+ items: external_exports.array(VaultInventoryEntry),
17079
+ // `null` once the last page is reached.
17080
+ nextCursor: external_exports.string().nullable()
17081
+ });
17082
+ var ListVaultReuseQuery = external_exports.object({
17083
+ limit: external_exports.coerce.number().int().min(1).max(MAX_VAULT_PAGE_LIMIT).optional(),
17084
+ cursor: external_exports.string().optional()
17085
+ });
17086
+ var ListVaultReuseResponse = external_exports.object({
17087
+ // Reused values across the whole store — the number the section's claim
17088
+ // ("values detected in more than one place") is about.
17089
+ totals: external_exports.object({ reused: external_exports.number().int().nonnegative() }),
17090
+ items: external_exports.array(VaultInventoryEntry),
17091
+ nextCursor: external_exports.string().nullable()
17092
+ });
17093
+ var ListVaultDerefsQuery = external_exports.object({
17094
+ // Include the batched, high-volume reasons (display, view-render). Omitted
17095
+ // hides them and counts them into `hiddenBatched` instead, so the model
17096
+ // crossings stay visible. A real boolean, not `z.stringbool()`: this arrives
17097
+ // over a Server Action, which preserves the type, never as a URL param.
17098
+ includeBatched: external_exports.boolean().optional(),
17099
+ limit: external_exports.coerce.number().int().min(1).max(MAX_VAULT_PAGE_LIMIT).optional(),
17100
+ cursor: external_exports.string().optional()
17101
+ });
17102
+ var ListVaultDerefsResponse = external_exports.object({
17103
+ items: external_exports.array(VaultDeref),
17104
+ nextCursor: external_exports.string().nullable(),
17105
+ // Display/view-render rows the query hid, over the WHOLE trail rather than
17106
+ // this page — it is the count the "N hidden" line and its toggle speak for.
17107
+ // Always 0 when `includeBatched` was set, since nothing was hidden.
17108
+ hiddenBatched: external_exports.number().int().nonnegative()
17109
+ });
16903
17110
  var VaultKeyCustody = external_exports.string();
16904
17111
  var VaultInlineReveal = external_exports.enum(["masked", "full", "off"]);
16905
17112
  var VaultConsent = external_exports.object({
@@ -17156,7 +17363,7 @@ var TopSourcesQuery = external_exports.object({
17156
17363
  // Omit for both kinds.
17157
17364
  kind: external_exports.enum(SOURCE_KINDS).optional()
17158
17365
  });
17159
- var Provider = external_exports.enum(["claudecode", "cursor", "codex", "chatgpt", "copilot", "api"]).meta({ id: "Provider" });
17366
+ var Provider = external_exports.enum(["claudecode", "cursor", "codex", "antigravity", "claudeai", "chatgpt", "copilot", "api"]).meta({ id: "Provider" });
17160
17367
  var ScanCoverageProvider = external_exports.object({
17161
17368
  provider: Provider,
17162
17369
  // Percent of that provider's traffic scanned in the window. 0 when unsupported.
@@ -17326,26 +17533,42 @@ import { execFileSync } from "child_process";
17326
17533
  var USE_SHELL = process.platform === "win32";
17327
17534
 
17328
17535
  // ../../packages/plugin-sdk/src/config.ts
17329
- import { existsSync as existsSync4 } from "fs";
17330
- import { join as join7 } from "path";
17536
+ import { existsSync as existsSync5 } from "fs";
17537
+ import { join as join8 } from "path";
17331
17538
 
17332
17539
  // ../../packages/persistence/src/database.ts
17333
- import { randomUUID as randomUUID9 } from "crypto";
17334
- import { existsSync, renameSync as renameSync2, rmSync as rmSync2 } from "fs";
17335
- import { join, sep } from "path";
17540
+ import { randomUUID as randomUUID10 } from "crypto";
17541
+ import { join as join2, sep } from "path";
17336
17542
  import { DatabaseSync } from "node:sqlite";
17337
17543
 
17338
17544
  // ../../packages/persistence/src/ids.ts
17339
17545
  import { createHash } from "crypto";
17340
17546
 
17547
+ // ../../packages/persistence/src/internal/snapshot.ts
17548
+ import { randomUUID } from "crypto";
17549
+ import { existsSync, readdirSync, renameSync as renameSync2, rmSync as rmSync2, statSync } from "fs";
17550
+ import { basename, dirname, join } from "path";
17551
+
17341
17552
  // ../../packages/persistence/src/paths.ts
17342
- import { chmodSync, lstatSync, mkdirSync, renameSync, rmSync, writeFileSync } from "fs";
17553
+ import {
17554
+ chmodSync,
17555
+ linkSync,
17556
+ lstatSync,
17557
+ mkdirSync,
17558
+ renameSync,
17559
+ rmSync,
17560
+ writeFileSync
17561
+ } from "fs";
17562
+ import { threadId } from "worker_threads";
17563
+
17564
+ // ../../packages/persistence/src/internal/snapshot.ts
17565
+ var STALE_PARTIAL_MS = 5 * 6e4;
17343
17566
 
17344
17567
  // ../../packages/persistence/src/repositories/activity.ts
17345
17568
  var LIVE_ACTIVITY_WINDOW_MS = 30 * 6e4;
17346
17569
 
17347
17570
  // ../../packages/persistence/src/repositories/exceptions.ts
17348
- import { randomUUID } from "crypto";
17571
+ import { randomUUID as randomUUID2 } from "crypto";
17349
17572
  var BLOCKED_DETECTIONS_TTL_MS = 30 * 60 * 1e3;
17350
17573
  var BLOCKED_DETECTIONS_RETENTION_MS = 24 * 60 * 60 * 1e3;
17351
17574
  var ACTIVE_PREDICATE = `revoked_at IS NULL
@@ -17356,46 +17579,60 @@ var ACTIVE_REVEAL_GRANT_PREDICATE = `capability = 'reveal_to_model'
17356
17579
  AND ${ACTIVE_PREDICATE}`;
17357
17580
 
17358
17581
  // ../../packages/persistence/src/repositories/installed-packs.ts
17359
- import { createHash as createHash2, randomUUID as randomUUID2 } from "crypto";
17582
+ import { createHash as createHash2, randomUUID as randomUUID3 } from "crypto";
17360
17583
 
17361
17584
  // ../../packages/persistence/src/repositories/inventory-assets.ts
17362
- import { randomUUID as randomUUID3 } from "crypto";
17585
+ import { randomUUID as randomUUID4 } from "crypto";
17363
17586
  var VALID_HARNESS_IDS = new Set(HarnessId.options);
17364
17587
  var HARNESS_LIVENESS_WINDOW_MS = 30 * 24 * 60 * 60 * 1e3;
17365
17588
 
17366
17589
  // ../../packages/persistence/src/repositories/policies.ts
17367
- import { randomUUID as randomUUID4 } from "crypto";
17590
+ import { randomUUID as randomUUID5 } from "crypto";
17368
17591
 
17369
17592
  // ../../packages/persistence/src/repositories/project-files.ts
17370
- import { randomUUID as randomUUID5 } from "crypto";
17593
+ import { randomUUID as randomUUID6 } from "crypto";
17371
17594
 
17372
17595
  // ../../packages/persistence/src/repositories/resolutions.ts
17373
- import { randomUUID as randomUUID6 } from "crypto";
17596
+ import { randomUUID as randomUUID7 } from "crypto";
17374
17597
 
17375
17598
  // ../../packages/persistence/src/repositories/secret-vault.ts
17376
- import { randomUUID as randomUUID7 } from "crypto";
17599
+ import { randomUUID as randomUUID8 } from "crypto";
17377
17600
 
17378
17601
  // ../../packages/persistence/src/repositories/shares.ts
17379
- import { randomUUID as randomUUID8 } from "crypto";
17602
+ import { randomUUID as randomUUID9 } from "crypto";
17603
+
17604
+ // ../../packages/persistence/src/file-lock.ts
17605
+ import { randomUUID as randomUUID11 } from "crypto";
17606
+ import {
17607
+ closeSync,
17608
+ existsSync as existsSync2,
17609
+ openSync,
17610
+ readFileSync,
17611
+ rmSync as rmSync3,
17612
+ statSync as statSync2,
17613
+ writeFileSync as writeFileSync2
17614
+ } from "fs";
17615
+ import { hostname as hostname3 } from "os";
17616
+ var PARK = new Int32Array(new SharedArrayBuffer(4));
17380
17617
 
17381
17618
  // ../../packages/persistence/src/finding-key.ts
17382
17619
  import { createHash as createHash3 } from "crypto";
17383
17620
 
17384
17621
  // ../../packages/persistence/src/fingerprint.ts
17385
17622
  import { createHmac, randomBytes } from "crypto";
17386
- import { existsSync as existsSync2, readFileSync } from "fs";
17387
- import { join as join2 } from "path";
17623
+ import { existsSync as existsSync3, readFileSync as readFileSync2 } from "fs";
17624
+ import { join as join3 } from "path";
17388
17625
  import { DatabaseSync as DatabaseSync2 } from "node:sqlite";
17389
17626
 
17390
17627
  // ../../packages/persistence/src/local-layout.ts
17391
17628
  import { renameSync as renameSync3 } from "fs";
17392
17629
  import { mkdir } from "fs/promises";
17393
17630
  import { homedir } from "os";
17394
- import { join as join3 } from "path";
17631
+ import { join as join4 } from "path";
17395
17632
 
17396
17633
  // ../../packages/persistence/src/settings.ts
17397
- import { readFileSync as readFileSync2 } from "fs";
17398
- import { join as join4 } from "path";
17634
+ import { readFileSync as readFileSync3 } from "fs";
17635
+ import { join as join5 } from "path";
17399
17636
 
17400
17637
  // ../../packages/persistence/src/vault/crypto.ts
17401
17638
  import {
@@ -17412,20 +17649,20 @@ import { randomBytes as randomBytes2 } from "crypto";
17412
17649
  import {
17413
17650
  chmodSync as chmodSync2,
17414
17651
  mkdirSync as mkdirSync2,
17415
- readFileSync as readFileSync3,
17652
+ readFileSync as readFileSync4,
17416
17653
  renameSync as renameSync4,
17417
- rmSync as rmSync3,
17418
- statSync,
17419
- writeFileSync as writeFileSync2
17654
+ rmSync as rmSync4,
17655
+ statSync as statSync3,
17656
+ writeFileSync as writeFileSync3
17420
17657
  } from "fs";
17421
- import { join as join5 } from "path";
17658
+ import { join as join6 } from "path";
17422
17659
 
17423
17660
  // ../../packages/persistence/src/vault/vault.ts
17424
- import { randomBytes as randomBytes3, randomUUID as randomUUID10 } from "crypto";
17661
+ import { randomBytes as randomBytes3, randomUUID as randomUUID12 } from "crypto";
17425
17662
 
17426
17663
  // ../../packages/persistence/src/warn-era-cap.ts
17427
- import { existsSync as existsSync3, writeFileSync as writeFileSync3 } from "fs";
17428
- import { join as join6 } from "path";
17664
+ import { existsSync as existsSync4, writeFileSync as writeFileSync4 } from "fs";
17665
+ import { join as join7 } from "path";
17429
17666
 
17430
17667
  // ../../packages/plugin-sdk/src/provider-env.ts
17431
17668
  var booleanish = external_exports.string().optional().transform((v) => {
@@ -17446,9 +17683,9 @@ var providerEnvShape = {
17446
17683
  var ProviderEnvSchema = external_exports.object(providerEnvShape);
17447
17684
 
17448
17685
  // ../../packages/plugin-sdk/src/config-inventory.ts
17449
- import { readdirSync, readFileSync as readFileSync5, realpathSync, statSync as statSync3 } from "fs";
17686
+ import { readdirSync as readdirSync2, readFileSync as readFileSync6, realpathSync, statSync as statSync5 } from "fs";
17450
17687
  import { homedir as homedir2 } from "os";
17451
- import { basename as basename2, join as join9 } from "path";
17688
+ import { basename as basename3, join as join10 } from "path";
17452
17689
 
17453
17690
  // ../../packages/detections/src/egress/registry.ts
17454
17691
  var EXTRACTOR_VERSION = "1";
@@ -18159,42 +18396,121 @@ var POLYNOMIAL_PROBES = ["abc-", "a.", "a ", "a=", "x", "0", "a@", "a/", "ab"].m
18159
18396
  );
18160
18397
 
18161
18398
  // ../../packages/plugin-sdk/src/repo.ts
18162
- import { existsSync as existsSync5, readFileSync as readFileSync4, statSync as statSync2 } from "fs";
18163
- import { basename, dirname, isAbsolute, join as join8, sep as sep2 } from "path";
18399
+ import { existsSync as existsSync6, readFileSync as readFileSync5, statSync as statSync4 } from "fs";
18400
+ import { basename as basename2, dirname as dirname2, isAbsolute, join as join9, sep as sep2 } from "path";
18164
18401
 
18165
18402
  // ../../packages/plugin-sdk/src/events.ts
18166
- import { createHash as createHash4, randomUUID as randomUUID11 } from "crypto";
18403
+ import { createHash as createHash4, randomUUID as randomUUID13 } from "crypto";
18404
+
18405
+ // ../../packages/plugin-sdk/src/isolated-scan.ts
18406
+ import { existsSync as existsSync7 } from "fs";
18407
+ import { fileURLToPath } from "url";
18408
+ import { Worker } from "worker_threads";
18167
18409
 
18168
18410
  // ../../packages/plugin-sdk/src/inventory-resolver.ts
18169
- import { arch, hostname as hostname3, platform, release } from "os";
18411
+ import { arch, hostname as hostname4, platform, release } from "os";
18170
18412
 
18171
18413
  // ../../packages/plugin-sdk/src/nudge.ts
18172
- import { mkdirSync as mkdirSync3, readFileSync as readFileSync6, writeFileSync as writeFileSync4 } from "fs";
18173
- import { join as join10 } from "path";
18414
+ import { mkdirSync as mkdirSync3, readFileSync as readFileSync7, writeFileSync as writeFileSync5 } from "fs";
18415
+ import { join as join11 } from "path";
18174
18416
 
18175
18417
  // ../../packages/plugin-sdk/src/paths.ts
18176
- import { readdirSync as readdirSync2, realpathSync as realpathSync2 } from "fs";
18177
- import { basename as basename3, dirname as dirname2, sep as sep3 } from "path";
18418
+ import { readdirSync as readdirSync3, realpathSync as realpathSync2 } from "fs";
18419
+ import { basename as basename4, dirname as dirname3, sep as sep3 } from "path";
18178
18420
 
18179
18421
  // ../../packages/plugin-sdk/src/project-files.ts
18180
18422
  var import_ignore = __toESM(require_ignore(), 1);
18181
- import { existsSync as existsSync6, readdirSync as readdirSync3, readFileSync as readFileSync7 } from "fs";
18182
- import { basename as basename4, join as join11, relative, sep as sep4 } from "path";
18423
+ import { existsSync as existsSync8, readdirSync as readdirSync4, readFileSync as readFileSync8 } from "fs";
18424
+ import { basename as basename5, join as join12, relative, sep as sep4 } from "path";
18425
+
18426
+ // ../../packages/plugin-sdk/src/provider-env-antigravity.ts
18427
+ var optionalBaseUrl2 = external_exports.preprocess((v) => {
18428
+ if (typeof v === "string" && v.trim() === "") return void 0;
18429
+ return v;
18430
+ }, external_exports.string().optional()).catch(void 0);
18431
+ var optionalFlag = external_exports.preprocess((v) => {
18432
+ if (typeof v !== "string") return false;
18433
+ const normalized = v.trim().toLowerCase();
18434
+ return normalized !== "" && normalized !== "0" && normalized !== "false";
18435
+ }, external_exports.boolean()).catch(false);
18436
+ var antigravityProviderEnvShape = {
18437
+ GOOGLE_GENAI_USE_VERTEXAI: optionalFlag,
18438
+ GOOGLE_GEMINI_BASE_URL: optionalBaseUrl2
18439
+ };
18440
+ var AntigravityProviderEnvSchema = external_exports.object(antigravityProviderEnvShape);
18441
+
18442
+ // ../../packages/plugin-sdk/src/provider-env-codex.ts
18443
+ var optionalBaseUrl3 = external_exports.preprocess((v) => {
18444
+ if (typeof v === "string" && v.trim() === "") return void 0;
18445
+ return v;
18446
+ }, external_exports.string().optional()).catch(void 0);
18447
+ var codexProviderEnvShape = {
18448
+ OPENAI_BASE_URL: optionalBaseUrl3
18449
+ };
18450
+ var CodexProviderEnvSchema = external_exports.object(codexProviderEnvShape);
18183
18451
 
18184
18452
  // ../../packages/plugin-sdk/src/runtime.ts
18185
- import { randomUUID as randomUUID12 } from "crypto";
18453
+ import { randomUUID as randomUUID14 } from "crypto";
18186
18454
 
18187
18455
  // ../../packages/plugin-sdk/src/suppressions.ts
18188
18456
  var THIRTY_DAYS_MS = 30 * 24 * 60 * 60 * 1e3;
18189
18457
 
18190
18458
  // ../../packages/plugin-sdk/src/throttle.ts
18191
- import { mkdirSync as mkdirSync4, statSync as statSync4, writeFileSync as writeFileSync5 } from "fs";
18192
- import { join as join12 } from "path";
18459
+ import { mkdirSync as mkdirSync4, statSync as statSync6, writeFileSync as writeFileSync6 } from "fs";
18460
+ import { join as join13 } from "path";
18461
+
18462
+ // ../../packages/setup-wizard/src/remediation/rotation-checklist.ts
18463
+ import { writeFileSync as writeFileSync7 } from "fs";
18464
+ import { join as join14 } from "path";
18465
+
18466
+ // ../../packages/setup-wizard/src/triage/plan-file.ts
18467
+ import { mkdtempSync, readFileSync as readFileSync9, rmdirSync, rmSync as rmSync5, writeFileSync as writeFileSync8 } from "fs";
18468
+ import { tmpdir } from "os";
18469
+ import { basename as basename6, dirname as dirname4, join as join15 } from "path";
18470
+ var SuppressionEntrySchema = external_exports.object({
18471
+ ruleId: external_exports.string(),
18472
+ category: DetectionCategory,
18473
+ valueFingerprint: external_exports.string(),
18474
+ keyVersion: external_exports.number(),
18475
+ maskedValue: external_exports.string(),
18476
+ justification: external_exports.string()
18477
+ });
18478
+ var ShowcaseCategorySchema = external_exports.object({
18479
+ category: DetectionCategory,
18480
+ action: BuiltinPolicyId,
18481
+ genuineCount: external_exports.number(),
18482
+ fpCount: external_exports.number(),
18483
+ reasoning: external_exports.string()
18484
+ });
18485
+ var JoinEntrySchema = external_exports.object({
18486
+ id: external_exports.string(),
18487
+ ruleId: external_exports.string(),
18488
+ category: DetectionCategory,
18489
+ valueFingerprint: external_exports.string().optional(),
18490
+ keyVersion: external_exports.number().optional(),
18491
+ maskedMatch: external_exports.string(),
18492
+ maskedContext: external_exports.string()
18493
+ });
18494
+ var PLAN_FILE_VERSION = 3;
18495
+ var PersistedPlanSchema = external_exports.object({
18496
+ version: external_exports.literal(PLAN_FILE_VERSION),
18497
+ // partialRecord (not record): a posture only covers the categories present in
18498
+ // the evidence, so an exhaustive-key record would reject every real plan.
18499
+ posture: external_exports.partialRecord(DetectionCategory, BuiltinPolicyId),
18500
+ entries: external_exports.array(SuppressionEntrySchema),
18501
+ showcase: external_exports.array(ShowcaseCategorySchema),
18502
+ join: external_exports.array(JoinEntrySchema),
18503
+ notes: external_exports.string(),
18504
+ // The store's per-category action at preview time. The downgrade view is
18505
+ // rendered from it at PREVIEW (renderPosturePlan); confirm reads it back ONLY to
18506
+ // compare against the live store and reject a stale plan (runConfirm's drift gate).
18507
+ current: external_exports.partialRecord(DetectionCategory, ActionTaken)
18508
+ });
18193
18509
 
18194
18510
  // src/command-registry.ts
18195
- import { readdirSync as readdirSync4 } from "fs";
18196
- import { fileURLToPath } from "url";
18197
- var COMMANDS_DIR = fileURLToPath(new URL("../commands", import.meta.url));
18511
+ import { readdirSync as readdirSync5 } from "fs";
18512
+ import { fileURLToPath as fileURLToPath2 } from "url";
18513
+ var COMMANDS_DIR = fileURLToPath2(new URL("../commands", import.meta.url));
18198
18514
 
18199
18515
  // src/setup-show.ts
18200
18516
  var SHOW_BEGIN = "<<<AKA_SHOW";
@@ -18293,7 +18609,7 @@ function buildIntroCard(manifest2, verified) {
18293
18609
  var manifestPath = process.argv[2];
18294
18610
  var manifest = {};
18295
18611
  try {
18296
- manifest = JSON.parse(readFileSync8(manifestPath ?? "", "utf8"));
18612
+ manifest = JSON.parse(readFileSync10(manifestPath ?? "", "utf8"));
18297
18613
  } catch {
18298
18614
  }
18299
18615
  process.stdout.write(show(fenced(buildIntroCard(manifest))));