@akasecurity/ai-tc-claude-code 0.9.3 → 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 readFileSync7 } 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(),
@@ -15997,6 +16132,7 @@ var ExceptionConditions = external_exports.object({
15997
16132
  sourceTool: external_exports.string().optional(),
15998
16133
  provider: external_exports.string().optional()
15999
16134
  }).strict();
16135
+ var ExceptionCapability = external_exports.enum(["suppress", "reveal_to_model"]);
16000
16136
  var DetectionException = external_exports.object({
16001
16137
  id: external_exports.guid(),
16002
16138
  ruleId: external_exports.string(),
@@ -16013,6 +16149,7 @@ var DetectionException = external_exports.object({
16013
16149
  keyVersion: external_exports.number().int().positive(),
16014
16150
  // maskMatch() preview of the approved value — never the raw value.
16015
16151
  maskedValue: external_exports.string(),
16152
+ capability: ExceptionCapability.default("suppress"),
16016
16153
  scope: ExceptionScope,
16017
16154
  expiresAt: external_exports.iso.datetime().nullable(),
16018
16155
  maxUses: external_exports.number().int().positive().nullable(),
@@ -16036,11 +16173,13 @@ var ExceptionBundleEntry = DetectionException.pick({
16036
16173
  ruleId: true,
16037
16174
  valueFingerprint: true,
16038
16175
  keyVersion: true,
16176
+ capability: true,
16039
16177
  expiresAt: true,
16040
16178
  maxUses: true,
16041
16179
  useCount: true,
16042
16180
  conditions: true
16043
16181
  });
16182
+ var ExceptionDescriptor = DetectionException.omit({ valueFingerprint: true });
16044
16183
 
16045
16184
  // ../../packages/schema/src/zod/rule.ts
16046
16185
  var MatcherType = external_exports.enum(["keyword", "regex", "validator"]).meta({ id: "MatcherType" });
@@ -16766,6 +16905,35 @@ var EgressWriteSummary = external_exports.object({
16766
16905
  droppedFiles: external_exports.array(external_exports.string()).default([])
16767
16906
  }).meta({ id: "EgressWriteSummary" });
16768
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
+
16769
16937
  // ../../packages/schema/src/zod/installed-pack.ts
16770
16938
  var InstalledPack = external_exports.object({
16771
16939
  id: external_exports.guid(),
@@ -16796,8 +16964,158 @@ var PatchInstalledPackRequest = external_exports.object({
16796
16964
  message: "At least one field must be provided"
16797
16965
  }).meta({ id: "PatchInstalledPackRequest" });
16798
16966
 
16967
+ // ../../packages/schema/src/zod/vault.ts
16968
+ var CATEGORY_ALTERNATION = DetectionCategory.options.join("|");
16969
+ var POINTER_TOKEN_PATTERN = new RegExp(
16970
+ `\\[\\[aka:(?:${CATEGORY_ALTERNATION}):[A-Z2-7]{2,7}\\.[A-Z2-7]{26}\\.[A-Z2-7]{16}\\]\\]`
16971
+ );
16972
+ var POINTER_TOKEN_ANCHORED = new RegExp(`^${POINTER_TOKEN_PATTERN.source}$`);
16973
+ var PointerToken = external_exports.string().regex(POINTER_TOKEN_ANCHORED);
16974
+ var ParsedPointer = external_exports.object({
16975
+ category: DetectionCategory,
16976
+ keyVersion: external_exports.number().int().positive(),
16977
+ pointerId: external_exports.string(),
16978
+ tag: external_exports.string()
16979
+ });
16980
+ var VaultEntry = external_exports.object({
16981
+ pointerId: external_exports.string(),
16982
+ // The keyed HMAC of the raw value under `exception.key`, and the epoch it was
16983
+ // derived under. This is what a reveal-to-model grant matches on, and it rotates
16984
+ // independently of the vault encryption key below.
16985
+ valueFingerprint: external_exports.string().regex(/^[0-9a-f]{64}$/),
16986
+ fingerprintKeyVersion: external_exports.number().int().positive(),
16987
+ // The vault-key epoch this row's ciphertext was sealed under.
16988
+ keyVersion: external_exports.number().int().positive(),
16989
+ // Fixed at first mint and never updated: the same value detected later under a
16990
+ // different rule's category keeps the category it was minted with, so one
16991
+ // value always produces exactly one wire token.
16992
+ category: DetectionCategory,
16993
+ ruleId: external_exports.string(),
16994
+ // Partial-reveal preview for badges and listings. Never the raw value.
16995
+ maskedMatch: external_exports.string(),
16996
+ provider: external_exports.string().optional(),
16997
+ ciphertext: external_exports.string(),
16998
+ nonce: external_exports.string(),
16999
+ authTag: external_exports.string(),
17000
+ // How many times this value has been detected on this machine — the reuse
17001
+ // signal the vault dashboard reads. Distinct from VaultDeref.pointerCount.
17002
+ occurrenceCount: external_exports.number().int().nonnegative(),
17003
+ firstSeen: external_exports.string(),
17004
+ lastSeen: external_exports.string()
17005
+ });
17006
+ var PointerDescriptor = external_exports.object({
17007
+ category: DetectionCategory,
17008
+ provider: external_exports.string().optional(),
17009
+ maskedMatch: external_exports.string(),
17010
+ occurrences: external_exports.number().int().nonnegative(),
17011
+ firstSeen: external_exports.string(),
17012
+ lastSeen: external_exports.string()
17013
+ });
17014
+ var PointerIdentity = external_exports.object({
17015
+ ruleId: external_exports.string(),
17016
+ valueFingerprint: external_exports.string().regex(/^[0-9a-f]{64}$/),
17017
+ fingerprintKeyVersion: external_exports.number().int().positive()
17018
+ });
17019
+ var DetokenizeTarget = external_exports.enum(["human", "model"]);
17020
+ var VaultDerefReason = external_exports.enum([
17021
+ "display",
17022
+ "explicit-reveal",
17023
+ "view-render",
17024
+ "model-input",
17025
+ "remediation",
17026
+ "purge"
17027
+ ]);
17028
+ var VaultDerefOutcome = external_exports.enum(["revealed", "refused", "unavailable"]);
17029
+ var VaultDeref = external_exports.object({
17030
+ id: external_exports.guid(),
17031
+ pointerId: external_exports.string(),
17032
+ at: external_exports.string(),
17033
+ target: DetokenizeTarget,
17034
+ reason: VaultDerefReason,
17035
+ outcome: VaultDerefOutcome,
17036
+ // Present only on a model-target crossing that a reveal grant authorized.
17037
+ grantId: external_exports.string().optional(),
17038
+ // How many pointers ONE batched render resolved. 1 for unbatched rows. Named
17039
+ // apart from VaultEntry.occurrenceCount, which counts detections of a value.
17040
+ pointerCount: external_exports.number().int().positive().default(1)
17041
+ });
17042
+ var VaultSightingKind = external_exports.enum([
17043
+ "prompt",
17044
+ "tool-input",
17045
+ "tool-output",
17046
+ "file",
17047
+ "transcript"
17048
+ ]);
17049
+ var VaultSighting = external_exports.object({
17050
+ location: external_exports.string(),
17051
+ kind: VaultSightingKind,
17052
+ firstSeen: external_exports.string(),
17053
+ lastSeen: external_exports.string()
17054
+ });
17055
+ var VaultInventoryEntry = external_exports.object({
17056
+ pointerId: external_exports.string(),
17057
+ category: DetectionCategory,
17058
+ provider: external_exports.string().optional(),
17059
+ maskedMatch: external_exports.string(),
17060
+ occurrences: external_exports.number().int().nonnegative(),
17061
+ firstSeen: external_exports.string(),
17062
+ lastSeen: external_exports.string(),
17063
+ // The active reveal-to-model grant covering this value, when one exists —
17064
+ // the inventory badges it, the row links to revocation.
17065
+ revealGrantId: external_exports.string().nullable(),
17066
+ sightings: external_exports.array(VaultSighting)
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
+ });
17110
+ var VaultKeyCustody = external_exports.string();
17111
+ var VaultInlineReveal = external_exports.enum(["masked", "full", "off"]);
17112
+ var VaultConsent = external_exports.object({
17113
+ acknowledgedAt: external_exports.iso.datetime(),
17114
+ version: external_exports.number().int().positive()
17115
+ });
17116
+
16799
17117
  // ../../packages/schema/src/zod/local.ts
16800
- var WORKSPACE_SETTINGS_SPEC_VERSION = 4;
17118
+ var WORKSPACE_SETTINGS_SPEC_VERSION = 5;
16801
17119
  var RunMode = external_exports.enum(["standalone"]);
16802
17120
  var SimpleDetectionPolicy = external_exports.enum(["redact", "warn"]);
16803
17121
  var HistoricalAccess = external_exports.enum(["full", "session-only"]);
@@ -16819,6 +17137,16 @@ var WorkspaceSettings = external_exports.object({
16819
17137
  // In-place egress extraction on the scan paths; disable to stop all Data
16820
17138
  // Shares writes.
16821
17139
  dataSharesInPlace: external_exports.boolean().default(true),
17140
+ // Consent to keep a RECOVERABLE encrypted copy of detected values in the local
17141
+ // vault, instead of destroying them. Absent by default: this is a custody
17142
+ // change from one-way redaction, so it is never an assumed grant on upgrade.
17143
+ // Revoking stops future vaulting; it does not erase what is already stored —
17144
+ // purging the vault is the eraser.
17145
+ vaultConsent: VaultConsent.optional(),
17146
+ // Where the vault master key lives.
17147
+ vaultKeyCustody: VaultKeyCustody.default("file"),
17148
+ // How a pointer renders in assistant prose on screen (see VaultInlineReveal).
17149
+ vaultInlineReveal: VaultInlineReveal.default("masked"),
16822
17150
  // Absent until /aka:setup completes; its presence is what "onboarded" means.
16823
17151
  onboardedAt: external_exports.iso.datetime().optional(),
16824
17152
  // Records that the user consented to sending findings to the model API for
@@ -17035,7 +17363,7 @@ var TopSourcesQuery = external_exports.object({
17035
17363
  // Omit for both kinds.
17036
17364
  kind: external_exports.enum(SOURCE_KINDS).optional()
17037
17365
  });
17038
- 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" });
17039
17367
  var ScanCoverageProvider = external_exports.object({
17040
17368
  provider: Provider,
17041
17369
  // Percent of that provider's traffic scanned in the window. 0 when unsupported.
@@ -17205,71 +17533,136 @@ import { execFileSync } from "child_process";
17205
17533
  var USE_SHELL = process.platform === "win32";
17206
17534
 
17207
17535
  // ../../packages/plugin-sdk/src/config.ts
17208
- import { existsSync as existsSync4 } from "fs";
17209
- import { join as join6 } from "path";
17536
+ import { existsSync as existsSync5 } from "fs";
17537
+ import { join as join8 } from "path";
17210
17538
 
17211
17539
  // ../../packages/persistence/src/database.ts
17212
- import { randomUUID as randomUUID8 } from "crypto";
17213
- import { existsSync, renameSync as renameSync2, rmSync as rmSync2 } from "fs";
17214
- import { join, sep } from "path";
17540
+ import { randomUUID as randomUUID10 } from "crypto";
17541
+ import { join as join2, sep } from "path";
17215
17542
  import { DatabaseSync } from "node:sqlite";
17216
17543
 
17217
17544
  // ../../packages/persistence/src/ids.ts
17218
17545
  import { createHash } from "crypto";
17219
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
+
17220
17552
  // ../../packages/persistence/src/paths.ts
17221
- 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;
17222
17566
 
17223
17567
  // ../../packages/persistence/src/repositories/activity.ts
17224
17568
  var LIVE_ACTIVITY_WINDOW_MS = 30 * 6e4;
17225
17569
 
17226
17570
  // ../../packages/persistence/src/repositories/exceptions.ts
17227
- import { randomUUID } from "crypto";
17571
+ import { randomUUID as randomUUID2 } from "crypto";
17228
17572
  var BLOCKED_DETECTIONS_TTL_MS = 30 * 60 * 1e3;
17229
17573
  var BLOCKED_DETECTIONS_RETENTION_MS = 24 * 60 * 60 * 1e3;
17574
+ var ACTIVE_PREDICATE = `revoked_at IS NULL
17575
+ AND (expires_at IS NULL OR expires_at > :now)
17576
+ AND (max_uses IS NULL OR use_count < max_uses)`;
17577
+ var ACTIVE_REVEAL_GRANT_PREDICATE = `capability = 'reveal_to_model'
17578
+ AND conditions IS NULL
17579
+ AND ${ACTIVE_PREDICATE}`;
17230
17580
 
17231
17581
  // ../../packages/persistence/src/repositories/installed-packs.ts
17232
- import { createHash as createHash2, randomUUID as randomUUID2 } from "crypto";
17582
+ import { createHash as createHash2, randomUUID as randomUUID3 } from "crypto";
17233
17583
 
17234
17584
  // ../../packages/persistence/src/repositories/inventory-assets.ts
17235
- import { randomUUID as randomUUID3 } from "crypto";
17585
+ import { randomUUID as randomUUID4 } from "crypto";
17236
17586
  var VALID_HARNESS_IDS = new Set(HarnessId.options);
17237
17587
  var HARNESS_LIVENESS_WINDOW_MS = 30 * 24 * 60 * 60 * 1e3;
17238
17588
 
17239
17589
  // ../../packages/persistence/src/repositories/policies.ts
17240
- import { randomUUID as randomUUID4 } from "crypto";
17590
+ import { randomUUID as randomUUID5 } from "crypto";
17241
17591
 
17242
17592
  // ../../packages/persistence/src/repositories/project-files.ts
17243
- import { randomUUID as randomUUID5 } from "crypto";
17593
+ import { randomUUID as randomUUID6 } from "crypto";
17244
17594
 
17245
17595
  // ../../packages/persistence/src/repositories/resolutions.ts
17246
- import { randomUUID as randomUUID6 } from "crypto";
17596
+ import { randomUUID as randomUUID7 } from "crypto";
17597
+
17598
+ // ../../packages/persistence/src/repositories/secret-vault.ts
17599
+ import { randomUUID as randomUUID8 } from "crypto";
17247
17600
 
17248
17601
  // ../../packages/persistence/src/repositories/shares.ts
17249
- import { randomUUID as randomUUID7 } 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));
17250
17617
 
17251
17618
  // ../../packages/persistence/src/finding-key.ts
17252
17619
  import { createHash as createHash3 } from "crypto";
17253
17620
 
17254
17621
  // ../../packages/persistence/src/fingerprint.ts
17255
17622
  import { createHmac, randomBytes } from "crypto";
17256
- import { existsSync as existsSync2, readFileSync } from "fs";
17257
- import { join as join2 } from "path";
17623
+ import { existsSync as existsSync3, readFileSync as readFileSync2 } from "fs";
17624
+ import { join as join3 } from "path";
17258
17625
  import { DatabaseSync as DatabaseSync2 } from "node:sqlite";
17259
17626
 
17260
17627
  // ../../packages/persistence/src/local-layout.ts
17261
17628
  import { renameSync as renameSync3 } from "fs";
17262
17629
  import { mkdir } from "fs/promises";
17263
17630
  import { homedir } from "os";
17264
- import { join as join3 } from "path";
17631
+ import { join as join4 } from "path";
17265
17632
 
17266
17633
  // ../../packages/persistence/src/settings.ts
17267
- import { readFileSync as readFileSync2 } from "fs";
17268
- import { join as join4 } from "path";
17634
+ import { readFileSync as readFileSync3 } from "fs";
17635
+ import { join as join5 } from "path";
17636
+
17637
+ // ../../packages/persistence/src/vault/crypto.ts
17638
+ import {
17639
+ createCipheriv,
17640
+ createDecipheriv,
17641
+ createHmac as createHmac2,
17642
+ hkdfSync,
17643
+ timingSafeEqual
17644
+ } from "crypto";
17645
+
17646
+ // ../../packages/persistence/src/vault/key-provider.ts
17647
+ import { execFileSync as execFileSync2 } from "child_process";
17648
+ import { randomBytes as randomBytes2 } from "crypto";
17649
+ import {
17650
+ chmodSync as chmodSync2,
17651
+ mkdirSync as mkdirSync2,
17652
+ readFileSync as readFileSync4,
17653
+ renameSync as renameSync4,
17654
+ rmSync as rmSync4,
17655
+ statSync as statSync3,
17656
+ writeFileSync as writeFileSync3
17657
+ } from "fs";
17658
+ import { join as join6 } from "path";
17659
+
17660
+ // ../../packages/persistence/src/vault/vault.ts
17661
+ import { randomBytes as randomBytes3, randomUUID as randomUUID12 } from "crypto";
17269
17662
 
17270
17663
  // ../../packages/persistence/src/warn-era-cap.ts
17271
- import { existsSync as existsSync3, writeFileSync as writeFileSync2 } from "fs";
17272
- import { join as join5 } from "path";
17664
+ import { existsSync as existsSync4, writeFileSync as writeFileSync4 } from "fs";
17665
+ import { join as join7 } from "path";
17273
17666
 
17274
17667
  // ../../packages/plugin-sdk/src/provider-env.ts
17275
17668
  var booleanish = external_exports.string().optional().transform((v) => {
@@ -17290,9 +17683,9 @@ var providerEnvShape = {
17290
17683
  var ProviderEnvSchema = external_exports.object(providerEnvShape);
17291
17684
 
17292
17685
  // ../../packages/plugin-sdk/src/config-inventory.ts
17293
- import { readdirSync, readFileSync as readFileSync4, realpathSync, statSync as statSync2 } from "fs";
17686
+ import { readdirSync as readdirSync2, readFileSync as readFileSync6, realpathSync, statSync as statSync5 } from "fs";
17294
17687
  import { homedir as homedir2 } from "os";
17295
- import { basename as basename2, join as join8 } from "path";
17688
+ import { basename as basename3, join as join10 } from "path";
17296
17689
 
17297
17690
  // ../../packages/detections/src/egress/registry.ts
17298
17691
  var EXTRACTOR_VERSION = "1";
@@ -18003,42 +18396,121 @@ var POLYNOMIAL_PROBES = ["abc-", "a.", "a ", "a=", "x", "0", "a@", "a/", "ab"].m
18003
18396
  );
18004
18397
 
18005
18398
  // ../../packages/plugin-sdk/src/repo.ts
18006
- import { existsSync as existsSync5, readFileSync as readFileSync3, statSync } from "fs";
18007
- import { basename, dirname, isAbsolute, join as join7, 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";
18008
18401
 
18009
18402
  // ../../packages/plugin-sdk/src/events.ts
18010
- import { createHash as createHash4, randomUUID as randomUUID9 } 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";
18011
18409
 
18012
18410
  // ../../packages/plugin-sdk/src/inventory-resolver.ts
18013
- import { arch, hostname as hostname3, platform, release } from "os";
18411
+ import { arch, hostname as hostname4, platform, release } from "os";
18014
18412
 
18015
18413
  // ../../packages/plugin-sdk/src/nudge.ts
18016
- import { mkdirSync as mkdirSync2, readFileSync as readFileSync5, writeFileSync as writeFileSync3 } from "fs";
18017
- import { join as join9 } from "path";
18414
+ import { mkdirSync as mkdirSync3, readFileSync as readFileSync7, writeFileSync as writeFileSync5 } from "fs";
18415
+ import { join as join11 } from "path";
18018
18416
 
18019
18417
  // ../../packages/plugin-sdk/src/paths.ts
18020
- import { readdirSync as readdirSync2, realpathSync as realpathSync2 } from "fs";
18021
- 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";
18022
18420
 
18023
18421
  // ../../packages/plugin-sdk/src/project-files.ts
18024
18422
  var import_ignore = __toESM(require_ignore(), 1);
18025
- import { existsSync as existsSync6, readdirSync as readdirSync3, readFileSync as readFileSync6 } from "fs";
18026
- import { basename as basename4, join as join10, 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);
18027
18451
 
18028
18452
  // ../../packages/plugin-sdk/src/runtime.ts
18029
- import { randomUUID as randomUUID10 } from "crypto";
18453
+ import { randomUUID as randomUUID14 } from "crypto";
18030
18454
 
18031
18455
  // ../../packages/plugin-sdk/src/suppressions.ts
18032
18456
  var THIRTY_DAYS_MS = 30 * 24 * 60 * 60 * 1e3;
18033
18457
 
18034
18458
  // ../../packages/plugin-sdk/src/throttle.ts
18035
- import { mkdirSync as mkdirSync3, statSync as statSync3, writeFileSync as writeFileSync4 } from "fs";
18036
- import { join as join11 } 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
+ });
18037
18509
 
18038
18510
  // src/command-registry.ts
18039
- import { readdirSync as readdirSync4 } from "fs";
18040
- import { fileURLToPath } from "url";
18041
- 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));
18042
18514
 
18043
18515
  // src/setup-show.ts
18044
18516
  var SHOW_BEGIN = "<<<AKA_SHOW";
@@ -18137,7 +18609,7 @@ function buildIntroCard(manifest2, verified) {
18137
18609
  var manifestPath = process.argv[2];
18138
18610
  var manifest = {};
18139
18611
  try {
18140
- manifest = JSON.parse(readFileSync7(manifestPath ?? "", "utf8"));
18612
+ manifest = JSON.parse(readFileSync10(manifestPath ?? "", "utf8"));
18141
18613
  } catch {
18142
18614
  }
18143
18615
  process.stdout.write(show(fenced(buildIntroCard(manifest))));