@akasecurity/cli 0.9.10 → 0.9.11

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.
Files changed (117) hide show
  1. package/README.md +12 -12
  2. package/dist/cli.js +1466 -766
  3. package/extension/manifest.json +1 -1
  4. package/native-host/host.js +756 -528
  5. package/native-host/scan-worker.js +153 -58
  6. package/native-host/sync.js +284 -103
  7. package/package.json +5 -5
  8. package/web-ui/package.json +1 -1
  9. package/web-ui/web-ui/.next/BUILD_ID +1 -1
  10. package/web-ui/web-ui/.next/app-build-manifest.json +64 -64
  11. package/web-ui/web-ui/.next/app-path-routes-manifest.json +5 -5
  12. package/web-ui/web-ui/.next/build-manifest.json +2 -2
  13. package/web-ui/web-ui/.next/prerender-manifest.json +14 -14
  14. package/web-ui/web-ui/.next/server/app/(app)/activity/page.js +2 -2
  15. package/web-ui/web-ui/.next/server/app/(app)/activity/page.js.nft.json +1 -1
  16. package/web-ui/web-ui/.next/server/app/(app)/activity/page_client-reference-manifest.js +1 -1
  17. package/web-ui/web-ui/.next/server/app/(app)/data-shares/page.js +2 -2
  18. package/web-ui/web-ui/.next/server/app/(app)/data-shares/page.js.nft.json +1 -1
  19. package/web-ui/web-ui/.next/server/app/(app)/data-shares/page_client-reference-manifest.js +1 -1
  20. package/web-ui/web-ui/.next/server/app/(app)/detections/page.js +2 -2
  21. package/web-ui/web-ui/.next/server/app/(app)/detections/page.js.nft.json +1 -1
  22. package/web-ui/web-ui/.next/server/app/(app)/detections/page_client-reference-manifest.js +1 -1
  23. package/web-ui/web-ui/.next/server/app/(app)/exceptions/[id]/page.js +2 -2
  24. package/web-ui/web-ui/.next/server/app/(app)/exceptions/[id]/page.js.nft.json +1 -1
  25. package/web-ui/web-ui/.next/server/app/(app)/exceptions/[id]/page_client-reference-manifest.js +1 -1
  26. package/web-ui/web-ui/.next/server/app/(app)/exceptions/new/page.js +1 -1
  27. package/web-ui/web-ui/.next/server/app/(app)/exceptions/new/page.js.nft.json +1 -1
  28. package/web-ui/web-ui/.next/server/app/(app)/exceptions/new/page_client-reference-manifest.js +1 -1
  29. package/web-ui/web-ui/.next/server/app/(app)/exceptions/page.js +1 -1
  30. package/web-ui/web-ui/.next/server/app/(app)/exceptions/page.js.nft.json +1 -1
  31. package/web-ui/web-ui/.next/server/app/(app)/exceptions/page_client-reference-manifest.js +1 -1
  32. package/web-ui/web-ui/.next/server/app/(app)/findings/page.js +2 -2
  33. package/web-ui/web-ui/.next/server/app/(app)/findings/page.js.nft.json +1 -1
  34. package/web-ui/web-ui/.next/server/app/(app)/findings/page_client-reference-manifest.js +1 -1
  35. package/web-ui/web-ui/.next/server/app/(app)/inventory/page.js +2 -2
  36. package/web-ui/web-ui/.next/server/app/(app)/inventory/page.js.nft.json +1 -1
  37. package/web-ui/web-ui/.next/server/app/(app)/inventory/page_client-reference-manifest.js +1 -1
  38. package/web-ui/web-ui/.next/server/app/(app)/policies/page.js +2 -2
  39. package/web-ui/web-ui/.next/server/app/(app)/policies/page.js.nft.json +1 -1
  40. package/web-ui/web-ui/.next/server/app/(app)/policies/page_client-reference-manifest.js +1 -1
  41. package/web-ui/web-ui/.next/server/app/(app)/scan/page.js +3 -3
  42. package/web-ui/web-ui/.next/server/app/(app)/scan/page.js.nft.json +1 -1
  43. package/web-ui/web-ui/.next/server/app/(app)/scan/page_client-reference-manifest.js +1 -1
  44. package/web-ui/web-ui/.next/server/app/(app)/security/page.js +2 -2
  45. package/web-ui/web-ui/.next/server/app/(app)/security/page.js.nft.json +1 -1
  46. package/web-ui/web-ui/.next/server/app/(app)/security/page_client-reference-manifest.js +1 -1
  47. package/web-ui/web-ui/.next/server/app/(app)/settings/page.js +2 -2
  48. package/web-ui/web-ui/.next/server/app/(app)/settings/page.js.nft.json +1 -1
  49. package/web-ui/web-ui/.next/server/app/(app)/settings/page_client-reference-manifest.js +1 -1
  50. package/web-ui/web-ui/.next/server/app/(app)/updates/page.js +2 -2
  51. package/web-ui/web-ui/.next/server/app/(app)/updates/page.js.nft.json +1 -1
  52. package/web-ui/web-ui/.next/server/app/(app)/updates/page_client-reference-manifest.js +1 -1
  53. package/web-ui/web-ui/.next/server/app/(app)/vault/page.js +2 -2
  54. package/web-ui/web-ui/.next/server/app/(app)/vault/page.js.nft.json +1 -1
  55. package/web-ui/web-ui/.next/server/app/(app)/vault/page_client-reference-manifest.js +1 -1
  56. package/web-ui/web-ui/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  57. package/web-ui/web-ui/.next/server/app/_not-found.html +1 -1
  58. package/web-ui/web-ui/.next/server/app/_not-found.rsc +2 -2
  59. package/web-ui/web-ui/.next/server/app/index.html +1 -1
  60. package/web-ui/web-ui/.next/server/app/index.rsc +2 -2
  61. package/web-ui/web-ui/.next/server/app/page_client-reference-manifest.js +1 -1
  62. package/web-ui/web-ui/.next/server/app-paths-manifest.json +5 -5
  63. package/web-ui/web-ui/.next/server/chunks/471.js +950 -0
  64. package/web-ui/web-ui/.next/server/chunks/475.js +1 -1
  65. package/web-ui/web-ui/.next/server/chunks/7.js +1 -1
  66. package/web-ui/web-ui/.next/server/chunks/739.js +1 -0
  67. package/web-ui/web-ui/.next/server/chunks/766.js +6 -0
  68. package/web-ui/web-ui/.next/server/chunks/851.js +1 -1
  69. package/web-ui/web-ui/.next/server/chunks/905.js +959 -0
  70. package/web-ui/web-ui/.next/server/functions-config-manifest.json +5 -5
  71. package/web-ui/web-ui/.next/server/middleware-manifest.json +5 -5
  72. package/web-ui/web-ui/.next/server/pages/404.html +1 -1
  73. package/web-ui/web-ui/.next/server/pages/500.html +1 -1
  74. package/web-ui/web-ui/.next/server/server-reference-manifest.js +1 -1
  75. package/web-ui/web-ui/.next/server/server-reference-manifest.json +1 -1
  76. package/web-ui/web-ui/.next/static/chunks/907-2ba9428e7818b656.js +1 -0
  77. package/web-ui/web-ui/.next/static/chunks/app/(app)/activity/page-c5a55618d187c906.js +1 -0
  78. package/web-ui/web-ui/.next/static/chunks/app/(app)/data-shares/page-b1c76b8c00e1ae2a.js +1 -0
  79. package/web-ui/web-ui/.next/static/chunks/app/(app)/detections/page-159167b47a005b33.js +1 -0
  80. package/web-ui/web-ui/.next/static/chunks/app/(app)/error-dead9507fc349f26.js +1 -0
  81. package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/[id]/page-5e872a82af85ef64.js +1 -0
  82. package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/new/page-0695d0006518b2cb.js +1 -0
  83. package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/page-adec99f2f4bbc180.js +1 -0
  84. package/web-ui/web-ui/.next/static/chunks/app/(app)/findings/page-d013384d2ddb3036.js +1 -0
  85. package/web-ui/web-ui/.next/static/chunks/app/(app)/inventory/page-42c1b48a01fdecb0.js +1 -0
  86. package/web-ui/web-ui/.next/static/chunks/app/(app)/layout-dc7ae7664dcdc3c5.js +1 -0
  87. package/web-ui/web-ui/.next/static/chunks/app/(app)/policies/page-9b6d7cc4ce9fb33e.js +1 -0
  88. package/web-ui/web-ui/.next/static/chunks/app/(app)/scan/page-f3ee9ecde06df153.js +1 -0
  89. package/web-ui/web-ui/.next/static/chunks/app/(app)/security/page-24a003c709776317.js +1 -0
  90. package/web-ui/web-ui/.next/static/chunks/app/(app)/settings/page-4ea49ce2e765fffb.js +1 -0
  91. package/web-ui/web-ui/.next/static/chunks/app/(app)/updates/page-6c7b94b070de8986.js +1 -0
  92. package/web-ui/web-ui/.next/static/chunks/app/(app)/vault/page-f37ab8e1edc67663.js +1 -0
  93. package/web-ui/web-ui/.next/static/css/c6954dd65f2115e6.css +2 -0
  94. package/web-ui/web-ui/dist/scan-worker.js +153 -58
  95. package/web-ui/web-ui/.next/server/chunks/389.js +0 -903
  96. package/web-ui/web-ui/.next/server/chunks/667.js +0 -894
  97. package/web-ui/web-ui/.next/server/chunks/950.js +0 -6
  98. package/web-ui/web-ui/.next/static/chunks/907-207847c57011ba44.js +0 -1
  99. package/web-ui/web-ui/.next/static/chunks/app/(app)/activity/page-e4f94a75c631ce86.js +0 -1
  100. package/web-ui/web-ui/.next/static/chunks/app/(app)/data-shares/page-d70fcc5612f380b7.js +0 -1
  101. package/web-ui/web-ui/.next/static/chunks/app/(app)/detections/page-e1823ce15bb6277d.js +0 -1
  102. package/web-ui/web-ui/.next/static/chunks/app/(app)/error-14165283b00c8626.js +0 -1
  103. package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/[id]/page-0fcffe4b9dff201f.js +0 -1
  104. package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/new/page-c95079a2acd284fd.js +0 -1
  105. package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/page-4b9f034bd078f5d3.js +0 -1
  106. package/web-ui/web-ui/.next/static/chunks/app/(app)/findings/page-b97fc083884ef341.js +0 -1
  107. package/web-ui/web-ui/.next/static/chunks/app/(app)/inventory/page-e96e7e947ed5f279.js +0 -1
  108. package/web-ui/web-ui/.next/static/chunks/app/(app)/layout-83072d434c6b6b0e.js +0 -1
  109. package/web-ui/web-ui/.next/static/chunks/app/(app)/policies/page-b90748d139a546c9.js +0 -1
  110. package/web-ui/web-ui/.next/static/chunks/app/(app)/scan/page-7a46abe149271870.js +0 -1
  111. package/web-ui/web-ui/.next/static/chunks/app/(app)/security/page-f4a1ee202d6e60a4.js +0 -1
  112. package/web-ui/web-ui/.next/static/chunks/app/(app)/settings/page-2ec6d863f1a31792.js +0 -1
  113. package/web-ui/web-ui/.next/static/chunks/app/(app)/updates/page-b388003fb0d3efd1.js +0 -1
  114. package/web-ui/web-ui/.next/static/chunks/app/(app)/vault/page-6bda74d234a1376a.js +0 -1
  115. package/web-ui/web-ui/.next/static/css/81a7ed955b02c959.css +0 -2
  116. /package/web-ui/web-ui/.next/static/{k7tk0MLkPITbi_x6JL01X → osEmGZG6yEV-XkQlklt-B}/_buildManifest.js +0 -0
  117. /package/web-ui/web-ui/.next/static/{k7tk0MLkPITbi_x6JL01X → osEmGZG6yEV-XkQlklt-B}/_ssgManifest.js +0 -0
@@ -491,9 +491,6 @@ var require_ignore = __commonJS({
491
491
  }
492
492
  });
493
493
 
494
- // ../../packages/plugin-runtime/src/attached/egress-wire.ts
495
- import { createHash as createHash4 } from "crypto";
496
-
497
494
  // ../../packages/persistence/src/attached-derived.ts
498
495
  import { rmSync } from "fs";
499
496
  import { join } from "path";
@@ -20385,13 +20382,11 @@ var FindingGroup = external_exports.object({
20385
20382
  latestDetectedAt: external_exports.iso.datetime(),
20386
20383
  instances: external_exports.array(FindingInstance),
20387
20384
  // Derived from instances' statuses with open-dominates precedence (see
20388
- // buildFindingGroups). Undefined only when no instance carries a status.
20385
+ // foldGroupStatus). Undefined only when no instance carries a status.
20389
20386
  status: FindingStatus.optional(),
20390
- // The distinct people across the WHOLE group, not just the `instances`
20391
- // preview — from the store's whole-group aggregate when it supplies one,
20392
- // else folded from the rows (see buildFindingGroups). Undefined when no
20393
- // instance carries a user, or when the store supplied whole-group folds
20394
- // without one.
20387
+ // The distinct people across the WHOLE group, not just the instances
20388
+ // carried here. Undefined when no instance carries a user, or when the
20389
+ // store supplied whole-group folds without one.
20395
20390
  users: external_exports.array(FindingUser).optional()
20396
20391
  }).meta({ id: "FindingGroup" });
20397
20392
  var FindingStats = external_exports.object({
@@ -20420,20 +20415,30 @@ var FindingFacets = external_exports.object({
20420
20415
  // counted under no value.
20421
20416
  status: external_exports.array(FindingFacetItem),
20422
20417
  // Host tool (attributes.tool_name). Present only on the instance-level
20423
- // reads, which can filter by it; the grouped read omits the dimension
20418
+ // reads, which can filter by it; the type-level read omits the dimension
20424
20419
  // because a group spans tools.
20425
20420
  tool: external_exports.array(FindingFacetItem).optional()
20426
20421
  }).meta({ id: "FindingFacets" });
20427
- var ListGroupedFindingsQuery = external_exports.object({
20422
+ var FindingTypeSummary = FindingGroup.omit({ instances: true, match: true }).meta({
20423
+ id: "FindingTypeSummary"
20424
+ });
20425
+ var MAX_FINDING_TYPES_LIMIT = 100;
20426
+ var ListFindingTypesQuery = external_exports.object({
20428
20427
  // NOTE: severity filters by Severity (critical/high/medium/low), not by
20429
- // FindingAction.
20428
+ // FindingAction. It narrows TYPES: a type's severity is the one its newest
20429
+ // firing version carries, and this list pages types.
20430
+ //
20431
+ // That is NOT a claim the findings of a type share it. A rule can hold several
20432
+ // definition versions at different severities, so a type kept by this filter
20433
+ // can hold findings that individually do not match — see totals.findings on
20434
+ // ListFindingTypesResponse, which counts them all.
20430
20435
  severity: external_exports.array(Severity).optional(),
20431
20436
  subtype: external_exports.array(external_exports.string()).optional(),
20432
20437
  provider: external_exports.array(FindingProvider).optional(),
20433
20438
  action: external_exports.array(FindingAction).optional(),
20434
- // Matches a group's DERIVED status (see FindingGroup.status), not its
20435
- // individual instances' — so a filtered group's Status column always reads
20436
- // one of the requested values.
20439
+ // Matches a type's DERIVED status (see FindingGroup.status), not its
20440
+ // individual findings' — so a filtered row's status always reads one of the
20441
+ // requested values.
20437
20442
  status: external_exports.array(FindingStatus).optional(),
20438
20443
  q: external_exports.string().optional(),
20439
20444
  // Scope to findings whose event carries this session id (the Activity page's
@@ -20443,23 +20448,37 @@ var ListGroupedFindingsQuery = external_exports.object({
20443
20448
  // from a time-scoped page (Activity's range) can carry that scope. Absent
20444
20449
  // means all time — this list has no default window.
20445
20450
  from: external_exports.iso.datetime().optional(),
20446
- // A group or instance id that must appear in the page even when the cursor
20447
- // has already advanced past its sort position. This is what keeps the
20448
- // Findings page's one-shot ?finding= deep link resolving once the list
20449
- // paginates: the target group is appended out of sort order rather than
20450
- // scanning forward for it. Never affects totals, facets or the cursor.
20451
+ // A RULE id that must appear in the page even when the cursor has already
20452
+ // advanced past its sort position. This is what keeps the selected type
20453
+ // visible in the list once it paginates: the target is appended out of sort
20454
+ // order rather than scanned forward for. Never affects totals, facets or the
20455
+ // cursor. Unlike the grouped read this replaces, it names a rule only — an
20456
+ // instance id is resolved by `findingInstance`, which is a primary-key seek
20457
+ // and so is not bounded by what any page happens to hold.
20451
20458
  includeId: external_exports.string().optional(),
20452
- groupBy: external_exports.literal("type").optional(),
20453
- limit: external_exports.coerce.number().int().min(1).max(100).optional(),
20459
+ limit: external_exports.coerce.number().int().min(1).max(MAX_FINDING_TYPES_LIMIT).optional(),
20454
20460
  cursor: external_exports.string().optional()
20455
20461
  });
20456
- var ListGroupedFindingsResponse = external_exports.object({
20462
+ var ListFindingTypesResponse = external_exports.object({
20457
20463
  totals: external_exports.object({
20464
+ // Findings belonging to the matching TYPES — not findings that each match
20465
+ // the filters. The filters here select types, so a type that survives
20466
+ // contributes its whole instanceCount.
20467
+ //
20468
+ // `status` is the one exception, narrowed per finding via
20469
+ // countInstancesByStatus. `severity`, `provider` and `action` are not, so
20470
+ // this can exceed what the instance read reports for the same filters: a
20471
+ // rule whose severity moved between versions is kept on its newest and
20472
+ // still counts its older findings. Narrowing the other three needs
20473
+ // per-dimension counts the aggregate does not carry today.
20458
20474
  findings: external_exports.number().int().nonnegative(),
20459
- groups: external_exports.number().int().nonnegative()
20475
+ // Counts TYPES, which is the unit this read pages. The instance read's
20476
+ // own totals count findings; the two deliberately answer different
20477
+ // questions and are never summed.
20478
+ types: external_exports.number().int().nonnegative()
20460
20479
  }),
20461
20480
  facets: FindingFacets,
20462
- items: external_exports.array(FindingGroup),
20481
+ items: external_exports.array(FindingTypeSummary),
20463
20482
  nextCursor: external_exports.string().nullable(),
20464
20483
  // Present only on session-scoped queries (`sessionId` set): per ruleId, how
20465
20484
  // many times that rule fired in the session's persisted transcript. Findings
@@ -20467,7 +20486,7 @@ var ListGroupedFindingsResponse = external_exports.object({
20467
20486
  // every firing, so the two numbers legitimately differ — this map lets a
20468
20487
  // session-scoped view show both.
20469
20488
  sessionFirings: external_exports.record(external_exports.string(), external_exports.number().int().nonnegative()).optional()
20470
- }).meta({ id: "ListGroupedFindingsResponse" });
20489
+ }).meta({ id: "ListFindingTypesResponse" });
20471
20490
  var ApplyFindingActionRequest = external_exports.object({
20472
20491
  // 'quarantined' is system-assigned (see FindingAction) — clients may not set
20473
20492
  // it, so it is excluded from the request contract. The mapping helper
@@ -20496,12 +20515,13 @@ var FindingInstanceDetail = FindingInstance.extend({
20496
20515
  var MAX_FLAT_FINDINGS_LIMIT = 200;
20497
20516
  var ListFindingInstancesQuery = external_exports.object({
20498
20517
  severity: external_exports.array(Severity).optional(),
20499
- // Rule ids, the same vocabulary the grouped list's `subtype` carries.
20518
+ // Rule ids, the same vocabulary the types list's `subtype` carries. Pinning
20519
+ // ONE of them is how the master/detail view scopes its right-hand panel.
20500
20520
  subtype: external_exports.array(external_exports.string()).optional(),
20501
20521
  provider: external_exports.array(FindingProvider).optional(),
20502
20522
  action: external_exports.array(FindingAction).optional(),
20503
20523
  // Matches each instance's OWN derived status (deriveFindingStatus), unlike
20504
- // the grouped query's group-level fold.
20524
+ // the types query's type-level fold.
20505
20525
  status: external_exports.array(FindingStatus).optional(),
20506
20526
  // Exact host-tool names (attributes.tool_name, e.g. 'Bash'). A real filter,
20507
20527
  // where the free-text `q` can only match the rendered "via Bash" label.
@@ -20518,37 +20538,46 @@ var ListFindingInstancesQuery = external_exports.object({
20518
20538
  });
20519
20539
  var ListFindingInstancesResponse = external_exports.object({
20520
20540
  // Instances matching the filters across the whole scope, not just this
20521
- // page — cursor-independent, like the grouped list's totals.
20541
+ // page — cursor-independent, like the types list's totals.
20522
20542
  totals: external_exports.object({ findings: external_exports.number().int().nonnegative() }),
20523
- // Counts in INSTANCES here, where the grouped response counts groups. Each
20543
+ // Counts in INSTANCES here, where the types response counts types. Each
20524
20544
  // dimension still excludes its own filter.
20525
20545
  facets: FindingFacets,
20526
20546
  items: external_exports.array(FindingInstanceDetail),
20527
20547
  nextCursor: external_exports.string().nullable()
20528
20548
  }).meta({ id: "ListFindingInstancesResponse" });
20529
- var FindingLocationFile = external_exports.object({
20530
- // Empty when the instances carried no file path (a prompt or a tool call
20531
- // with no file attribution).
20532
- file: external_exports.string(),
20533
- instanceCount: external_exports.number().int().nonnegative(),
20534
- maxSeverity: Severity,
20535
- latestDetectedAt: external_exports.iso.datetime(),
20536
- // Folded from the instances' derived statuses with the same
20537
- // open-dominates precedence a group uses.
20538
- status: FindingStatus.optional(),
20539
- // Distinct rules seen at this location, capped — the row shows them as
20540
- // chips, and the count is what conveys scale.
20541
- ruleIds: external_exports.array(external_exports.string())
20542
- }).meta({ id: "FindingLocationFile" });
20543
- var FindingLocationRepo = external_exports.object({
20549
+ var FindingLocationSummary = external_exports.object({
20550
+ // Opaque, stable, minted from the pair by encodeLocationId. It exists
20551
+ // because a location's identity is two values and a URL param carries one:
20552
+ // `?loc=` names a location the way `?rule=` names a type. Only ever compared
20553
+ // for EQUALITY — the page's selection check, this read's `includeId`, the
20554
+ // client's page dedupe — never decoded, and never a sort key.
20555
+ id: external_exports.string(),
20544
20556
  /** Empty when the instances carried no repo attribute. */
20545
20557
  repo: external_exports.string(),
20558
+ // Empty when the instances carried no file path (a prompt, or a tool call
20559
+ // with no file attribution). Both halves empty is a real location — usually
20560
+ // the largest one in a store — and is selectable like any other.
20561
+ file: external_exports.string(),
20546
20562
  instanceCount: external_exports.number().int().nonnegative(),
20563
+ // The WORST severity present, not the first row's. It is this list's primary
20564
+ // sort key, so it is also what explains why a row is where it is, and it is
20565
+ // how a reader decides what to open without opening everything.
20547
20566
  maxSeverity: Severity,
20548
20567
  latestDetectedAt: external_exports.iso.datetime(),
20568
+ // Folded from the instances' derived statuses with the same open-dominates
20569
+ // precedence a group uses, so it answers "is anything left to do here" and
20570
+ // not much more: a location holding 1 open among 40 resolved reads like one
20571
+ // holding 40 open. That loss is accepted — the panel beside this list
20572
+ // carries each finding's own status, and instanceCount sits next to the
20573
+ // badge.
20549
20574
  status: FindingStatus.optional(),
20550
- files: external_exports.array(FindingLocationFile)
20551
- }).meta({ id: "FindingLocationRepo" });
20575
+ // Every distinct rule seen at this location, UNCAPPED — so the length is a
20576
+ // tally rather than a sample and a row can say how many there are. Bounded
20577
+ // by the ruleset, not by the store. The view bounds what it DISPLAYS.
20578
+ ruleIds: external_exports.array(external_exports.string())
20579
+ }).meta({ id: "FindingLocationSummary" });
20580
+ var MAX_FINDING_LOCATIONS_LIMIT = 100;
20552
20581
  var ListFindingLocationsQuery = external_exports.object({
20553
20582
  severity: external_exports.array(Severity).optional(),
20554
20583
  subtype: external_exports.array(external_exports.string()).optional(),
@@ -20561,18 +20590,42 @@ var ListFindingLocationsQuery = external_exports.object({
20561
20590
  q: external_exports.string().optional(),
20562
20591
  sessionId: external_exports.string().optional(),
20563
20592
  from: external_exports.iso.datetime().optional(),
20564
- limit: external_exports.coerce.number().int().min(1).max(500).optional()
20593
+ // A LOCATION id (see FindingLocationSummary.id) that must appear in the page
20594
+ // even when the cursor has already advanced past its sort position — the
20595
+ // counterpart of ListFindingTypesQuery.includeId, and needed far more often
20596
+ // here. Selecting a row pushes the URL, which re-renders the server and resets
20597
+ // the client's page cache to page 0; with distinct (repo, file) pairs running
20598
+ // into the thousands, a selection sitting off page 0 is the ordinary case
20599
+ // rather than a deep-link corner. Never affects totals, facets or the cursor.
20600
+ includeId: external_exports.string().optional(),
20601
+ limit: external_exports.coerce.number().int().min(1).max(MAX_FINDING_LOCATIONS_LIMIT).optional(),
20602
+ cursor: external_exports.string().optional()
20565
20603
  });
20566
20604
  var ListFindingLocationsResponse = external_exports.object({
20567
20605
  totals: external_exports.object({
20606
+ // Findings matching the filters across the whole scope. Unlike the types
20607
+ // read's same-named field this needs no caveat: the filters here narrow
20608
+ // per finding, so this is the sum of every row's instanceCount.
20568
20609
  findings: external_exports.number().int().nonnegative(),
20569
- repos: external_exports.number().int().nonnegative(),
20570
- files: external_exports.number().int().nonnegative()
20610
+ // Counts LOCATIONS, the unit this read pages — the number the paginator
20611
+ // states. The facets beside it count FINDINGS (see below); a surface
20612
+ // showing both says which is which.
20613
+ locations: external_exports.number().int().nonnegative()
20571
20614
  }),
20572
- /** Sorted by max severity, then most recent. */
20573
- items: external_exports.array(FindingLocationRepo),
20574
- /** Whether `limit` truncated the repo list. */
20575
- hasMore: external_exports.boolean()
20615
+ // Counts in FINDINGS, where the types response counts types, each dimension
20616
+ // still excluding its own filter. Deliberately not locations: counting those
20617
+ // needs a set of location keys per dimension per value — memory tracking the
20618
+ // store times the vocabulary, in a read whose scan promises flat memory —
20619
+ // and the cheap per-location version is not an approximation but WRONG. A
20620
+ // location holding {claudecode, block} and {codex, warn} would survive
20621
+ // provider=claudecode AND action=warn, under which no single finding
20622
+ // matches, so the facet would contradict the instanceCount this whole view
20623
+ // rests on. Findings also keep the toolbar in the same unit as the page
20624
+ // tally and the panel it sits above.
20625
+ facets: FindingFacets,
20626
+ /** Sorted by max severity, then most recent, then (repo, file). */
20627
+ items: external_exports.array(FindingLocationSummary),
20628
+ nextCursor: external_exports.string().nullable()
20576
20629
  }).meta({ id: "ListFindingLocationsResponse" });
20577
20630
 
20578
20631
  // ../../packages/schema/src/zod/meta.ts
@@ -21738,6 +21791,14 @@ var ControlPlaneErrorBody = external_exports.object({
21738
21791
  message: external_exports.string().optional()
21739
21792
  }).optional()
21740
21793
  });
21794
+ var RemoteFailureKind = external_exports.enum([
21795
+ "unauthorized",
21796
+ "forbidden",
21797
+ "route-absent",
21798
+ "invalid-request",
21799
+ "rejected",
21800
+ "unreachable"
21801
+ ]);
21741
21802
  var AttachDeviceRequest = external_exports.object({
21742
21803
  // This machine's own continuity id, so re-attaching ROTATES the credential
21743
21804
  // on one machine record instead of producing a second one. Client-minted
@@ -22750,11 +22811,11 @@ var WorkspaceSettings = external_exports.object({
22750
22811
  // covers the current payload and must be re-granted.
22751
22812
  modelJudgeConsent: ModelJudgeConsent.optional(),
22752
22813
  // Records that the user consented to the DEFERRED send — the outbox — along
22753
- // with the payload shape and the endpoint they agreed to. Since payload v2
22754
- // that covers both the pre-attach backlog and undelivered captures (which
22755
- // carry prompt/reply text in `content`); the key name predates the widening.
22756
- // Absent until granted, and a grant for a different endpoint or an older
22757
- // payload no longer counts.
22814
+ // with the payload shape and the endpoint they agreed to. Since payload v3
22815
+ // that covers the pre-attach backlog AND undelivered captures alike, and both
22816
+ // carry prompt/reply/tool-output text in `content`; the key name predates
22817
+ // both widenings. Absent until granted, and a grant for a different endpoint
22818
+ // or an older payload no longer counts.
22758
22819
  historySyncConsent: HistorySyncConsent.optional()
22759
22820
  });
22760
22821
  function defaultWorkspaceSettings() {
@@ -22777,6 +22838,9 @@ var ManagedSettingKey = external_exports.enum([
22777
22838
  "dataSharesInPlace",
22778
22839
  "redactFallback"
22779
22840
  ]).meta({ id: "ManagedSettingKey" });
22841
+ function isManagedSettingKey(value) {
22842
+ return ManagedSettingKey.safeParse(value).success;
22843
+ }
22780
22844
  var ManagedSettingsValues = external_exports.object({
22781
22845
  runMode: external_exports.enum(["standalone", "attached"]).optional(),
22782
22846
  controlPlane: external_exports.object({
@@ -22801,7 +22865,27 @@ var ManagedSettings = external_exports.object({
22801
22865
  // Which of those the user may not change. A key here with no matching value
22802
22866
  // freezes whatever the user last chose; a value with no lock is a DEFAULT
22803
22867
  // the user may still override. The two are separable on purpose.
22804
- lockedFields: external_exports.array(ManagedSettingKey).default([])
22868
+ //
22869
+ // Parsed as NAMES rather than as the enum, and split below: a name this
22870
+ // build does not know is dropped from the locked set and reported, never a
22871
+ // reason to refuse the file. The same shape reaches an older build whenever
22872
+ // an administrator locks a key a newer build added, and refusing it there
22873
+ // ran that build entirely unmanaged — every pin and lock gone — on exactly
22874
+ // the fleets most likely to carry a version skew. A name outside the enum
22875
+ // is still never HONOURED: the lockable set stays explicit above.
22876
+ lockedFields: external_exports.array(external_exports.string()).default([])
22877
+ }).transform(({ lockedFields, ...rest }) => {
22878
+ const known = [];
22879
+ const unknown2 = [];
22880
+ for (const name of lockedFields) {
22881
+ if (isManagedSettingKey(name)) known.push(name);
22882
+ else unknown2.push(name);
22883
+ }
22884
+ return {
22885
+ ...rest,
22886
+ lockedFields: known,
22887
+ ...unknown2.length > 0 ? { unknownLockedFields: unknown2 } : {}
22888
+ };
22805
22889
  }).meta({ id: "ManagedSettings" });
22806
22890
 
22807
22891
  // ../../packages/schema/src/zod/project-files.ts
@@ -22919,7 +23003,11 @@ var FindingsTimeseriesPoint = external_exports.object({
22919
23003
  timestamp: external_exports.iso.date(),
22920
23004
  critical: external_exports.number().int().nonnegative(),
22921
23005
  high: external_exports.number().int().nonnegative(),
22922
- medium: external_exports.number().int().nonnegative()
23006
+ medium: external_exports.number().int().nonnegative(),
23007
+ // Optional and additive, so a producer written against the earlier
23008
+ // three-series contract keeps validating. A consumer plotting it resolves the
23009
+ // absent case itself — the chart point requires a number.
23010
+ low: external_exports.number().int().nonnegative().optional()
22923
23011
  }).meta({ id: "FindingsTimeseriesPoint" });
22924
23012
  var FindingsTimeseriesResponse = external_exports.object({
22925
23013
  range: TimeRange,
@@ -22945,6 +23033,10 @@ var ResolvedFeedItem = external_exports.object({
22945
23033
  findingKey: external_exports.string(),
22946
23034
  ruleId: external_exports.string(),
22947
23035
  severity: Severity,
23036
+ // Repository slug, and the file path RELATIVE to it. The pair is what
23037
+ // identifies the file: a bare path matches the same name in every repo.
23038
+ // Optional and additive; empty when the event carried no repo.
23039
+ repo: external_exports.string().optional(),
22948
23040
  path: external_exports.string(),
22949
23041
  // ISO-8601 datetime (matches FindingInstance.detectedAt / the rest of the
22950
23042
  // findings domain). The reader `.toISOString()`s the DB epoch-ms values.
@@ -23359,6 +23451,32 @@ var ACTIVE_REVEAL_GRANT_PREDICATE = `capability = 'reveal_to_model'
23359
23451
  AND conditions IS NULL
23360
23452
  AND ${ACTIVE_PREDICATE}`;
23361
23453
 
23454
+ // ../../packages/persistence/src/repositories/resolution-sql.ts
23455
+ function latestResolutionColumnSql(column, findingsAlias) {
23456
+ return `(
23457
+ SELECT fr.${column} FROM finding_resolution fr
23458
+ WHERE fr.finding_key = ${findingsAlias}.finding_key
23459
+ ORDER BY fr.created_at DESC, fr.rowid DESC
23460
+ LIMIT 1
23461
+ )`;
23462
+ }
23463
+ function latestResolutionStatusSql(findingsAlias) {
23464
+ return latestResolutionColumnSql("status", findingsAlias);
23465
+ }
23466
+
23467
+ // ../../packages/persistence/src/repositories/findings.ts
23468
+ var FINDING_ROW_COLUMNS_SQL = `f.id AS id, d.rule_id AS rule_id, d.category AS category,
23469
+ d.severity AS severity, f.masked_match AS masked_match,
23470
+ f.action_taken AS action_taken, f.confidence AS confidence,
23471
+ e.started_at AS occurred_at,
23472
+ e.source_tool AS source_tool,
23473
+ e.repo AS repo,
23474
+ e.file_path AS file,
23475
+ e.tool_name AS tool_name,
23476
+ f.audit_event_id AS event_id, e.root_session_id AS session_id,
23477
+ e.event_type AS kind, f.finding_key AS finding_key,
23478
+ ${latestResolutionStatusSql("f")} AS latest_status`;
23479
+
23362
23480
  // ../../packages/persistence/src/repositories/history-sync.ts
23363
23481
  var STRUCTURAL_EVENT_TYPES = ["session", "llm_call", "tool_call"];
23364
23482
  var TYPE_LIST = STRUCTURAL_EVENT_TYPES.map((t) => `'${t}'`).join(", ");
@@ -23424,7 +23542,8 @@ function managedSettingsPaths(platform2 = process.platform) {
23424
23542
  }
23425
23543
  return [posix.join("/etc", "aka", MANAGED_SETTINGS_FILENAME)];
23426
23544
  }
23427
- function readManagedSettings(paths = managedSettingsPaths()) {
23545
+ var testOnlyManagedPaths = null;
23546
+ function readManagedSettings(paths = testOnlyManagedPaths ?? managedSettingsPaths()) {
23428
23547
  for (const path of paths) {
23429
23548
  let text;
23430
23549
  try {
@@ -23547,23 +23666,30 @@ import { randomUUID as randomUUID10 } from "crypto";
23547
23666
  // ../../packages/persistence/src/database.ts
23548
23667
  var CAPTURE_GRAIN = new Set(EventKind.options);
23549
23668
 
23550
- // ../../packages/persistence/src/finding-key.ts
23669
+ // ../../packages/persistence/src/egress-wire.ts
23551
23670
  import { createHash as createHash3 } from "crypto";
23552
23671
 
23672
+ // ../../packages/persistence/src/finding-key.ts
23673
+ import { createHash as createHash4 } from "crypto";
23674
+
23553
23675
  // ../../packages/persistence/src/fingerprint.ts
23554
23676
  import { createHmac, randomBytes } from "crypto";
23555
23677
  import { existsSync as existsSync3, readFileSync as readFileSync6 } from "fs";
23556
23678
  import { join as join8 } from "path";
23557
23679
  import { DatabaseSync as DatabaseSync2 } from "node:sqlite";
23558
23680
 
23559
- // ../../packages/persistence/src/history-preview.ts
23681
+ // ../../packages/persistence/src/history-backfill.ts
23560
23682
  import { existsSync as existsSync4 } from "fs";
23561
23683
  import { join as join9 } from "path";
23684
+
23685
+ // ../../packages/persistence/src/history-preview.ts
23686
+ import { existsSync as existsSync5 } from "fs";
23687
+ import { join as join10 } from "path";
23562
23688
  import { DatabaseSync as DatabaseSync3 } from "node:sqlite";
23563
23689
 
23564
23690
  // ../../packages/persistence/src/store-symlinks.ts
23565
- import { existsSync as existsSync5, lstatSync as lstatSync3, readlinkSync, realpathSync, statSync as statSync4 } from "fs";
23566
- import { dirname as dirname3, join as join10, resolve } from "path";
23691
+ import { existsSync as existsSync6, lstatSync as lstatSync3, readlinkSync, realpathSync, statSync as statSync4 } from "fs";
23692
+ import { dirname as dirname3, join as join11, resolve } from "path";
23567
23693
 
23568
23694
  // ../../packages/persistence/src/vault/crypto.ts
23569
23695
  import {
@@ -23578,14 +23704,14 @@ import {
23578
23704
  import { execFileSync } from "child_process";
23579
23705
  import { randomBytes as randomBytes2 } from "crypto";
23580
23706
  import { chmodSync as chmodSync3, readFileSync as readFileSync7, renameSync as renameSync4, rmSync as rmSync6, statSync as statSync5, writeFileSync as writeFileSync3 } from "fs";
23581
- import { join as join11 } from "path";
23707
+ import { join as join12 } from "path";
23582
23708
 
23583
23709
  // ../../packages/persistence/src/vault/vault.ts
23584
23710
  import { randomBytes as randomBytes3, randomUUID as randomUUID12 } from "crypto";
23585
23711
 
23586
23712
  // ../../packages/persistence/src/warn-era-cap.ts
23587
- import { existsSync as existsSync6, writeFileSync as writeFileSync4 } from "fs";
23588
- import { join as join12 } from "path";
23713
+ import { existsSync as existsSync7, writeFileSync as writeFileSync4 } from "fs";
23714
+ import { join as join13 } from "path";
23589
23715
 
23590
23716
  // ../../packages/remote/src/http.ts
23591
23717
  import { request as httpRequest } from "http";
@@ -23866,6 +23992,7 @@ function createRemoteClient(options) {
23866
23992
  url: url2(ROUTES.shares),
23867
23993
  body: JSON.stringify(validated.data)
23868
23994
  });
23995
+ if (response.status === 404) throw new RemoteRouteAbsent(ROUTES.shares);
23869
23996
  okBody(response);
23870
23997
  },
23871
23998
  async pollCommand() {
@@ -23888,19 +24015,51 @@ function createRemoteClient(options) {
23888
24015
  };
23889
24016
  }
23890
24017
 
23891
- // ../../packages/plugin-runtime/src/attached/failure.ts
24018
+ // ../../packages/remote/src/failure-kind.ts
23892
24019
  function statusOf(err) {
23893
24020
  if (typeof err !== "object" || err === null || !("status" in err)) return null;
23894
24021
  const { status } = err;
23895
24022
  if (typeof status !== "number" || !Number.isInteger(status)) return null;
23896
24023
  return status >= 100 && status <= 599 ? status : null;
23897
24024
  }
23898
- function classifyFailure(err) {
23899
- switch (statusOf(err)) {
24025
+ function nameOf(err) {
24026
+ if (typeof err !== "object" || err === null || !("name" in err)) return null;
24027
+ return typeof err.name === "string" ? err.name : null;
24028
+ }
24029
+ function classifyRemoteFailure(err) {
24030
+ switch (nameOf(err)) {
24031
+ case "RemoteRouteAbsent":
24032
+ return "route-absent";
24033
+ case "RemoteRequestInvalid":
24034
+ return "invalid-request";
24035
+ case "RemoteResponseInvalid":
24036
+ return "rejected";
24037
+ default:
24038
+ break;
24039
+ }
24040
+ const status = statusOf(err);
24041
+ if (status === null) return "unreachable";
24042
+ switch (status) {
23900
24043
  case 401:
23901
24044
  return "unauthorized";
23902
24045
  case 403:
23903
24046
  return "forbidden";
24047
+ case 429:
24048
+ return "unreachable";
24049
+ case 404:
24050
+ return "unreachable";
24051
+ default:
24052
+ return status >= 400 && status <= 499 ? "rejected" : "unreachable";
24053
+ }
24054
+ }
24055
+
24056
+ // ../../packages/plugin-runtime/src/attached/failure.ts
24057
+ function classifyFailure(err) {
24058
+ switch (classifyRemoteFailure(err)) {
24059
+ case "unauthorized":
24060
+ return "unauthorized";
24061
+ case "forbidden":
24062
+ return "forbidden";
23904
24063
  default:
23905
24064
  return "unreachable";
23906
24065
  }
@@ -23981,17 +24140,17 @@ async function runCommandSync(deps) {
23981
24140
 
23982
24141
  // ../../packages/plugin-runtime/src/attached/forward-drops.ts
23983
24142
  import { readFileSync as readFileSync8 } from "fs";
23984
- import { join as join13 } from "path";
24143
+ import { join as join14 } from "path";
23985
24144
 
23986
24145
  // ../../packages/plugin-runtime/src/attached/forward-policy.ts
23987
24146
  import { randomUUID as randomUUID15 } from "crypto";
23988
- import { readFileSync as readFileSync14 } from "fs";
24147
+ import { readFileSync as readFileSync15 } from "fs";
23989
24148
  import { readFile, rename, writeFile } from "fs/promises";
23990
- import { join as join22 } from "path";
24149
+ import { join as join24 } from "path";
23991
24150
 
23992
24151
  // ../../packages/plugin-sdk/src/config.ts
23993
- import { existsSync as existsSync7 } from "fs";
23994
- import { join as join14 } from "path";
24152
+ import { existsSync as existsSync8 } from "fs";
24153
+ import { join as join15 } from "path";
23995
24154
 
23996
24155
  // ../../packages/plugin-sdk/src/provider-env.ts
23997
24156
  var booleanish = external_exports.string().optional().transform((v) => {
@@ -24014,7 +24173,7 @@ var ProviderEnvSchema = external_exports.object(providerEnvShape);
24014
24173
  // ../../packages/plugin-sdk/src/config-inventory.ts
24015
24174
  import { readdirSync as readdirSync2, readFileSync as readFileSync10, realpathSync as realpathSync2, statSync as statSync7 } from "fs";
24016
24175
  import { homedir as homedir2 } from "os";
24017
- import { basename as basename3, join as join16 } from "path";
24176
+ import { basename as basename3, join as join17 } from "path";
24018
24177
 
24019
24178
  // ../../packages/detections/src/egress/registry.ts
24020
24179
  var EXTRACTOR_VERSION = "1";
@@ -24772,24 +24931,20 @@ var CPU_CORROBORATION_SHARE = 0.2;
24772
24931
  var CORROBORATION_FLOOR_MS = BUDGET_MS * CPU_CORROBORATION_SHARE;
24773
24932
 
24774
24933
  // ../../packages/plugin-sdk/src/repo.ts
24775
- import { existsSync as existsSync8, readFileSync as readFileSync9, statSync as statSync6 } from "fs";
24776
- import { basename as basename2, dirname as dirname4, isAbsolute, join as join15, sep as sep2 } from "path";
24934
+ import { existsSync as existsSync9, readFileSync as readFileSync9, statSync as statSync6 } from "fs";
24935
+ import { basename as basename2, dirname as dirname4, isAbsolute, join as join16, sep as sep2 } from "path";
24777
24936
 
24778
24937
  // ../../packages/plugin-sdk/src/events.ts
24779
24938
  import { createHash as createHash5, randomUUID as randomUUID13 } from "crypto";
24780
24939
 
24781
24940
  // ../../packages/plugin-sdk/src/isolated-scan.ts
24782
- import { existsSync as existsSync9 } from "fs";
24941
+ import { existsSync as existsSync10 } from "fs";
24783
24942
  import { fileURLToPath } from "url";
24784
24943
  import { Worker } from "worker_threads";
24785
24944
 
24786
- // ../../packages/plugin-sdk/src/ignore-layers.ts
24787
- var import_ignore = __toESM(require_ignore(), 1);
24788
- import { readFileSync as readFileSync11 } from "fs";
24789
- import { join as join17 } from "path";
24790
-
24791
- // ../../packages/plugin-sdk/src/inventory-resolver.ts
24792
- import { arch, hostname as hostname4, platform, release } from "os";
24945
+ // ../../packages/plugin-sdk/src/host-floor.ts
24946
+ import { readFileSync as readFileSync12 } from "fs";
24947
+ import { join as join19 } from "path";
24793
24948
 
24794
24949
  // ../../packages/plugin-sdk/src/model-governance.ts
24795
24950
  import {
@@ -24797,24 +24952,50 @@ import {
24797
24952
  fstatSync,
24798
24953
  mkdirSync as mkdirSync2,
24799
24954
  openSync as openSync2,
24800
- readFileSync as readFileSync12,
24955
+ readFileSync as readFileSync11,
24801
24956
  readSync,
24802
24957
  writeFileSync as writeFileSync5
24803
24958
  } from "fs";
24804
24959
  import { join as join18 } from "path";
24805
24960
  var TAIL_BYTES = 256 * 1024;
24806
24961
 
24962
+ // ../../packages/plugin-sdk/src/host-floor.ts
24963
+ var HOST_FEATURE = {
24964
+ ModelSwitch: "model-switch",
24965
+ VaultPointerDisplay: "vault-pointer-display"
24966
+ };
24967
+ var HOST_FLOORS = {
24968
+ [HOST_FEATURE.ModelSwitch]: {
24969
+ label: "model-switch protection",
24970
+ hookEvents: ["PreModelSwitch", "PostModelSwitch"],
24971
+ since: "2.1.251"
24972
+ },
24973
+ [HOST_FEATURE.VaultPointerDisplay]: {
24974
+ label: "vault pointer display",
24975
+ hookEvents: ["MessageDisplay"],
24976
+ since: "2.1.152"
24977
+ }
24978
+ };
24979
+
24980
+ // ../../packages/plugin-sdk/src/ignore-layers.ts
24981
+ var import_ignore = __toESM(require_ignore(), 1);
24982
+ import { readFileSync as readFileSync13 } from "fs";
24983
+ import { join as join20 } from "path";
24984
+
24985
+ // ../../packages/plugin-sdk/src/inventory-resolver.ts
24986
+ import { arch, hostname as hostname4, platform, release } from "os";
24987
+
24807
24988
  // ../../packages/plugin-sdk/src/nudge.ts
24808
- import { mkdirSync as mkdirSync3, readFileSync as readFileSync13, writeFileSync as writeFileSync6 } from "fs";
24809
- import { join as join19 } from "path";
24989
+ import { mkdirSync as mkdirSync3, readFileSync as readFileSync14, writeFileSync as writeFileSync6 } from "fs";
24990
+ import { join as join21 } from "path";
24810
24991
 
24811
24992
  // ../../packages/plugin-sdk/src/paths.ts
24812
24993
  import { readdirSync as readdirSync3, realpathSync as realpathSync3 } from "fs";
24813
24994
  import { basename as basename4, dirname as dirname5, sep as sep3 } from "path";
24814
24995
 
24815
24996
  // ../../packages/plugin-sdk/src/project-files.ts
24816
- import { existsSync as existsSync10, readdirSync as readdirSync4 } from "fs";
24817
- import { basename as basename5, join as join20 } from "path";
24997
+ import { existsSync as existsSync11, readdirSync as readdirSync4 } from "fs";
24998
+ import { basename as basename5, join as join22 } from "path";
24818
24999
 
24819
25000
  // ../../packages/plugin-sdk/src/provider-env-antigravity.ts
24820
25001
  var optionalBaseUrl2 = external_exports.preprocess((v) => {
@@ -24850,11 +25031,11 @@ var THIRTY_DAYS_MS = 30 * 24 * 60 * 60 * 1e3;
24850
25031
 
24851
25032
  // ../../packages/plugin-sdk/src/throttle.ts
24852
25033
  import { mkdirSync as mkdirSync4, statSync as statSync8, writeFileSync as writeFileSync7 } from "fs";
24853
- import { join as join21 } from "path";
25034
+ import { join as join23 } from "path";
24854
25035
 
24855
25036
  // ../../packages/plugin-runtime/src/attached/history-state.ts
24856
- import { readFileSync as readFileSync15 } from "fs";
24857
- import { join as join23 } from "path";
25037
+ import { readFileSync as readFileSync16 } from "fs";
25038
+ import { join as join25 } from "path";
24858
25039
 
24859
25040
  // ../../packages/plugin-runtime/src/attached/history-sync.ts
24860
25041
  import { createHash as createHash6 } from "crypto";
@@ -24871,12 +25052,12 @@ import { fileURLToPath as fileURLToPath2 } from "url";
24871
25052
  var HISTORY_SYNC_THROTTLE_MS = 5 * 60 * 1e3;
24872
25053
 
24873
25054
  // ../../packages/plugin-runtime/src/attached/plugin-block.ts
24874
- import { readFileSync as readFileSync16 } from "fs";
25055
+ import { readFileSync as readFileSync17 } from "fs";
24875
25056
 
24876
25057
  // ../../packages/plugin-runtime/src/attached/policy-store.ts
24877
25058
  import { randomUUID as randomUUID16 } from "crypto";
24878
25059
  import { readFile as readFile2, rm, writeFile as writeFile2 } from "fs/promises";
24879
- import { join as join24 } from "path";
25060
+ import { join as join26 } from "path";
24880
25061
 
24881
25062
  // ../../packages/plugin-runtime/src/attached/atomic-publish.ts
24882
25063
  import { rename as rename2 } from "fs/promises";
@@ -24900,7 +25081,7 @@ async function publishByRename(tmp, file2, move = rename2) {
24900
25081
 
24901
25082
  // ../../packages/plugin-runtime/src/attached/policy-store.ts
24902
25083
  function createPolicyStore(dir = dataDir()) {
24903
- const file2 = join24(dir, "policy-cache.json");
25084
+ const file2 = join26(dir, "policy-cache.json");
24904
25085
  async function read() {
24905
25086
  try {
24906
25087
  const raw = await readFile2(file2, "utf8");
@@ -25028,14 +25209,14 @@ import { DatabaseSync as DatabaseSync4 } from "node:sqlite";
25028
25209
  // ../../packages/plugin-runtime/src/attached/posture-store.ts
25029
25210
  import { randomUUID as randomUUID17 } from "crypto";
25030
25211
  import { readFile as readFile3, rm as rm2, writeFile as writeFile3 } from "fs/promises";
25031
- import { join as join25 } from "path";
25212
+ import { join as join27 } from "path";
25032
25213
 
25033
25214
  // ../../packages/plugin-runtime/src/attached/sync-state.ts
25034
- import { readFileSync as readFileSync17 } from "fs";
25035
- import { join as join26 } from "path";
25215
+ import { readFileSync as readFileSync18 } from "fs";
25216
+ import { join as join28 } from "path";
25036
25217
  var SYNC_STATE_FILENAME = ATTACHED_SYNC_STATE_FILENAME;
25037
25218
  function syncStatePath(dataDir2) {
25038
- return join26(dataDir2, SYNC_STATE_FILENAME);
25219
+ return join28(dataDir2, SYNC_STATE_FILENAME);
25039
25220
  }
25040
25221
  function writeSyncState(dataDir2, result) {
25041
25222
  try {