@akasecurity/ai-tc-antigravity 0.9.7 → 0.9.8

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 readFileSync12 } from "fs";
495
+ import { readFileSync as readFileSync13 } from "fs";
496
496
 
497
497
  // src/present.ts
498
498
  var SHADE = {
@@ -548,13 +548,12 @@ function fenced(body) {
548
548
  }
549
549
 
550
550
  // ../../packages/plugin-sdk/src/config.ts
551
- import { existsSync as existsSync5 } from "fs";
552
- import { join as join8 } from "path";
551
+ import { existsSync as existsSync6 } from "fs";
552
+ import { join as join10 } from "path";
553
553
 
554
- // ../../packages/persistence/src/database.ts
555
- import { randomUUID as randomUUID10 } from "crypto";
556
- import { join as join2, sep } from "path";
557
- import { DatabaseSync } from "node:sqlite";
554
+ // ../../packages/persistence/src/control-plane-credential.ts
555
+ import { chmodSync as chmodSync2, lstatSync as lstatSync2, readFileSync, rmSync as rmSync2, statSync } from "fs";
556
+ import { join } from "path";
558
557
 
559
558
  // ../../packages/schema/src/exception-scope.ts
560
559
  var MINUTE_MS = 6e4;
@@ -16019,6 +16018,124 @@ var ConfigScanRecord = external_exports.object({
16019
16018
  findings: external_exports.array(ConfigPostureFindingInput).optional()
16020
16019
  });
16021
16020
 
16021
+ // ../../packages/schema/src/zod/control-plane.ts
16022
+ var ATTACHED_CREDENTIAL_SPEC_VERSION = 1;
16023
+ var AttachedCredential = external_exports.object({
16024
+ specVersion: external_exports.literal(ATTACHED_CREDENTIAL_SPEC_VERSION),
16025
+ // The control-plane endpoint this credential was minted against.
16026
+ endpoint: external_exports.string().min(1),
16027
+ // The bearer credential itself. Never logged, never rendered — status
16028
+ // surfaces show `keyPrefix` and nothing else.
16029
+ apiKey: external_exports.string().min(1),
16030
+ // First few characters of the key, safe to display so a user can match the
16031
+ // credential against their organization's key list.
16032
+ keyPrefix: external_exports.string().min(1).max(16).optional(),
16033
+ mintedAt: external_exports.iso.datetime().optional()
16034
+ });
16035
+ var MAX_DATE_MS = 253402300799999;
16036
+ var MAX_INT4 = 2147483647;
16037
+ var StorePosturePack = external_exports.object({
16038
+ packId: external_exports.string().min(1),
16039
+ // 'namespace/packId'
16040
+ version: external_exports.string().min(1),
16041
+ enabled: external_exports.boolean(),
16042
+ // Stringified pass-through of the local store's `installed_packs.updated_at`
16043
+ // — the column format is store-version-dependent (epoch millis vs ISO), so
16044
+ // the wire shape assumes neither.
16045
+ updatedAt: external_exports.string().nullable()
16046
+ }).meta({ id: "StorePosturePack" });
16047
+ var StorePosturePolicyCounts = external_exports.object({
16048
+ total: external_exports.number().int().min(0),
16049
+ disabled: external_exports.number().int().min(0),
16050
+ // Exhaustive per-action map; the builder pre-fills every action with 0.
16051
+ //
16052
+ // Spelled out member-by-member rather than `z.record(ActionTaken, …)`. Zod
16053
+ // enforces exhaustiveness either way, but z.record emits `propertyNames` +
16054
+ // `additionalProperties` into a generated schema document, and a type
16055
+ // generator renders THAT with every key optional — a sender built against
16056
+ // the generated type would typecheck and still be rejected at runtime. An
16057
+ // explicit object emits `properties` + `required`, so generated types
16058
+ // demand all five.
16059
+ //
16060
+ // `satisfies Record<ActionTaken, …>` keeps the link to the enum: adding an
16061
+ // ActionTaken member is a COMPILE error here instead of silent drift.
16062
+ // `.strict()` is load-bearing — it rejects an unknown action key, which a
16063
+ // bare object would silently STRIP, accepting a miscounted map as valid.
16064
+ byAction: external_exports.object({
16065
+ warn: external_exports.number().int().min(0),
16066
+ redact: external_exports.number().int().min(0),
16067
+ block: external_exports.number().int().min(0),
16068
+ allow: external_exports.number().int().min(0),
16069
+ log: external_exports.number().int().min(0)
16070
+ }).strict()
16071
+ }).meta({ id: "StorePosturePolicyCounts" });
16072
+ var StorePosturePlugin = external_exports.object({
16073
+ /** Package name of the reporting plugin. */
16074
+ package: external_exports.string().min(1).max(200),
16075
+ version: external_exports.string().min(1).max(64),
16076
+ /** Version of the bundled core, when the build records one separately. */
16077
+ ossVersion: external_exports.string().max(64).nullable(),
16078
+ /**
16079
+ * `version` of the policy bundle this machine last fetched. Bounded at 200
16080
+ * rather than the 64 a bare sha256 hex digest needs today, so a later
16081
+ * format with an algorithm prefix does not start rejecting the channel.
16082
+ */
16083
+ policyBundleVersion: external_exports.string().max(200).nullable(),
16084
+ /** Epoch millis, on the CLIENT clock, of that fetch. */
16085
+ policyFetchedAt: external_exports.number().int().min(0).max(MAX_DATE_MS).nullable()
16086
+ }).meta({ id: "StorePosturePlugin" });
16087
+ var StorePostureSnapshot = external_exports.object({
16088
+ deviceId: external_exports.guid(),
16089
+ hostname: external_exports.string().min(1).max(253),
16090
+ // Epoch millis on the CLIENT clock. Bounded by what a receiving store
16091
+ // accepts (see MAX_DATE_MS), not by what a JavaScript Date can hold.
16092
+ capturedAt: external_exports.number().int().min(0).max(MAX_DATE_MS),
16093
+ // False is a measurement, not an error state: "no local store exists on
16094
+ // this machine".
16095
+ storePresent: external_exports.boolean(),
16096
+ schemaVersion: external_exports.number().int().min(0).max(MAX_INT4).nullable(),
16097
+ // PRAGMA user_version
16098
+ findingsTotal: external_exports.number().int().min(0).max(MAX_INT4),
16099
+ // Epoch millis, bounded like `capturedAt` — see MAX_DATE_MS on what that
16100
+ // bound does and does not do. Worth stating for these two specifically:
16101
+ // they are read from the local store's own ROWS rather than from this
16102
+ // machine's clock, so a damaged or hand-edited store is enough to produce
16103
+ // an out-of-range value with no clock skew involved.
16104
+ findingsFirstAt: external_exports.number().int().min(0).max(MAX_DATE_MS).nullable(),
16105
+ findingsLastAt: external_exports.number().int().min(0).max(MAX_DATE_MS).nullable(),
16106
+ packs: external_exports.array(StorePosturePack).max(500),
16107
+ policyCounts: StorePosturePolicyCounts,
16108
+ // OPTIONAL, not nullable: a reporter that predates this member keeps
16109
+ // getting its 200 without a payload change.
16110
+ plugin: StorePosturePlugin.optional()
16111
+ }).meta({ id: "StorePostureSnapshot" });
16112
+ var CAPTURE_VERSION_PREFIX = "capture/";
16113
+ var RecordAuditEventRequest = AuditEventInput.extend({
16114
+ inspections: external_exports.array(ToolCallInspection).default([])
16115
+ }).refine((v) => v.inspections.every((i) => !i.ruleVersion.startsWith(CAPTURE_VERSION_PREFIX)), {
16116
+ message: `inspections[].ruleVersion must not start with \`${CAPTURE_VERSION_PREFIX}\` \u2014 that namespace is reserved for capture definitions the control plane mints itself`,
16117
+ path: ["inspections"]
16118
+ }).meta({ id: "RecordAuditEventRequest" });
16119
+ var IngestAck = external_exports.object({
16120
+ accepted: external_exports.number().int().nonnegative(),
16121
+ duplicates: external_exports.number().int().nonnegative()
16122
+ });
16123
+ var PRINTABLE = /^[^\p{Cc}\p{Cf}]*$/u;
16124
+ var printable = (max) => external_exports.string().max(max).regex(PRINTABLE, "must not contain control characters");
16125
+ var PluginWhoami = external_exports.object({
16126
+ tenantName: printable(200),
16127
+ userEmail: printable(320),
16128
+ role: printable(64),
16129
+ keyKind: printable(64),
16130
+ serverTime: printable(64)
16131
+ });
16132
+ var ControlPlaneErrorBody = external_exports.object({
16133
+ error: external_exports.object({
16134
+ code: external_exports.string().optional(),
16135
+ message: external_exports.string().optional()
16136
+ }).optional()
16137
+ });
16138
+
16022
16139
  // ../../packages/schema/src/zod/registry.ts
16023
16140
  var Namespace = external_exports.string().regex(/^[a-z][a-z0-9-]*$/);
16024
16141
  var PackId = external_exports.string().regex(/^[a-z][a-z0-9-]*$/);
@@ -17657,14 +17774,6 @@ var SetupHandoffOffer = external_exports.object({
17657
17774
  path: ["liveKeys"]
17658
17775
  });
17659
17776
 
17660
- // ../../packages/persistence/src/ids.ts
17661
- import { createHash } from "crypto";
17662
-
17663
- // ../../packages/persistence/src/internal/snapshot.ts
17664
- import { randomUUID } from "crypto";
17665
- import { existsSync, readdirSync, renameSync as renameSync2, rmSync as rmSync2, statSync } from "fs";
17666
- import { basename, dirname, join } from "path";
17667
-
17668
17777
  // ../../packages/persistence/src/paths.ts
17669
17778
  import {
17670
17779
  chmodSync,
@@ -17677,7 +17786,18 @@ import {
17677
17786
  } from "fs";
17678
17787
  import { threadId } from "worker_threads";
17679
17788
 
17789
+ // ../../packages/persistence/src/database.ts
17790
+ import { randomUUID as randomUUID10 } from "crypto";
17791
+ import { join as join3, sep } from "path";
17792
+ import { DatabaseSync } from "node:sqlite";
17793
+
17794
+ // ../../packages/persistence/src/ids.ts
17795
+ import { createHash } from "crypto";
17796
+
17680
17797
  // ../../packages/persistence/src/internal/snapshot.ts
17798
+ import { randomUUID } from "crypto";
17799
+ import { existsSync, readdirSync, renameSync as renameSync2, rmSync as rmSync3, statSync as statSync2 } from "fs";
17800
+ import { basename, dirname, join as join2 } from "path";
17681
17801
  var STALE_PARTIAL_MS = 5 * 6e4;
17682
17802
  var SNAPSHOT_STAGING_SUFFIX = ".partial";
17683
17803
  var STAGED_NAME_SUFFIX = `.bak${SNAPSHOT_STAGING_SUFFIX}`;
@@ -17751,9 +17871,9 @@ import {
17751
17871
  closeSync,
17752
17872
  existsSync as existsSync2,
17753
17873
  openSync,
17754
- readFileSync,
17755
- rmSync as rmSync3,
17756
- statSync as statSync2,
17874
+ readFileSync as readFileSync2,
17875
+ rmSync as rmSync4,
17876
+ statSync as statSync3,
17757
17877
  writeFileSync as writeFileSync2
17758
17878
  } from "fs";
17759
17879
  import { hostname as hostname3 } from "os";
@@ -17764,23 +17884,27 @@ import { createHash as createHash3 } from "crypto";
17764
17884
 
17765
17885
  // ../../packages/persistence/src/fingerprint.ts
17766
17886
  import { createHmac, randomBytes } from "crypto";
17767
- import { existsSync as existsSync3, readFileSync as readFileSync2 } from "fs";
17768
- import { join as join3 } from "path";
17887
+ import { existsSync as existsSync3, readFileSync as readFileSync3 } from "fs";
17888
+ import { join as join4 } from "path";
17769
17889
  import { DatabaseSync as DatabaseSync2 } from "node:sqlite";
17770
17890
 
17771
17891
  // ../../packages/persistence/src/local-layout.ts
17772
17892
  import { renameSync as renameSync3 } from "fs";
17773
17893
  import { mkdir } from "fs/promises";
17774
17894
  import { homedir } from "os";
17775
- import { join as join4 } from "path";
17895
+ import { join as join5 } from "path";
17776
17896
 
17777
17897
  // ../../packages/persistence/src/managed-settings.ts
17778
- import { readFileSync as readFileSync3 } from "fs";
17898
+ import { readFileSync as readFileSync4 } from "fs";
17779
17899
  import { posix, win32 } from "path";
17780
17900
 
17781
17901
  // ../../packages/persistence/src/settings.ts
17782
- import { readFileSync as readFileSync4 } from "fs";
17783
- import { join as join5 } from "path";
17902
+ import { readFileSync as readFileSync5 } from "fs";
17903
+ import { join as join6 } from "path";
17904
+
17905
+ // ../../packages/persistence/src/store-symlinks.ts
17906
+ import { existsSync as existsSync4, lstatSync as lstatSync3, readlinkSync, realpathSync, statSync as statSync4 } from "fs";
17907
+ import { dirname as dirname2, join as join7, resolve } from "path";
17784
17908
 
17785
17909
  // ../../packages/persistence/src/vault/crypto.ts
17786
17910
  import {
@@ -17794,15 +17918,15 @@ import {
17794
17918
  // ../../packages/persistence/src/vault/key-provider.ts
17795
17919
  import { execFileSync } from "child_process";
17796
17920
  import { randomBytes as randomBytes2 } from "crypto";
17797
- import { chmodSync as chmodSync2, readFileSync as readFileSync5, renameSync as renameSync4, rmSync as rmSync4, statSync as statSync3, writeFileSync as writeFileSync3 } from "fs";
17798
- import { join as join6 } from "path";
17921
+ import { chmodSync as chmodSync3, readFileSync as readFileSync6, renameSync as renameSync4, rmSync as rmSync5, statSync as statSync5, writeFileSync as writeFileSync3 } from "fs";
17922
+ import { join as join8 } from "path";
17799
17923
 
17800
17924
  // ../../packages/persistence/src/vault/vault.ts
17801
17925
  import { randomBytes as randomBytes3, randomUUID as randomUUID12 } from "crypto";
17802
17926
 
17803
17927
  // ../../packages/persistence/src/warn-era-cap.ts
17804
- import { existsSync as existsSync4, writeFileSync as writeFileSync4 } from "fs";
17805
- import { join as join7 } from "path";
17928
+ import { existsSync as existsSync5, writeFileSync as writeFileSync4 } from "fs";
17929
+ import { join as join9 } from "path";
17806
17930
 
17807
17931
  // ../../packages/plugin-sdk/src/provider-env.ts
17808
17932
  var booleanish = external_exports.string().optional().transform((v) => {
@@ -17823,9 +17947,9 @@ var providerEnvShape = {
17823
17947
  var ProviderEnvSchema = external_exports.object(providerEnvShape);
17824
17948
 
17825
17949
  // ../../packages/plugin-sdk/src/config-inventory.ts
17826
- import { readdirSync as readdirSync2, readFileSync as readFileSync7, realpathSync, statSync as statSync5 } from "fs";
17950
+ import { readdirSync as readdirSync2, readFileSync as readFileSync8, realpathSync as realpathSync2, statSync as statSync7 } from "fs";
17827
17951
  import { homedir as homedir2 } from "os";
17828
- import { basename as basename3, join as join10 } from "path";
17952
+ import { basename as basename3, join as join12 } from "path";
17829
17953
 
17830
17954
  // ../../packages/detections/src/egress/registry.ts
17831
17955
  var EXTRACTOR_VERSION = "1";
@@ -18583,36 +18707,36 @@ var CPU_CORROBORATION_SHARE = 0.2;
18583
18707
  var CORROBORATION_FLOOR_MS = BUDGET_MS * CPU_CORROBORATION_SHARE;
18584
18708
 
18585
18709
  // ../../packages/plugin-sdk/src/repo.ts
18586
- import { existsSync as existsSync6, readFileSync as readFileSync6, statSync as statSync4 } from "fs";
18587
- import { basename as basename2, dirname as dirname2, isAbsolute, join as join9, sep as sep2 } from "path";
18710
+ import { existsSync as existsSync7, readFileSync as readFileSync7, statSync as statSync6 } from "fs";
18711
+ import { basename as basename2, dirname as dirname3, isAbsolute, join as join11, sep as sep2 } from "path";
18588
18712
 
18589
18713
  // ../../packages/plugin-sdk/src/events.ts
18590
18714
  import { createHash as createHash4, randomUUID as randomUUID13 } from "crypto";
18591
18715
 
18592
18716
  // ../../packages/plugin-sdk/src/isolated-scan.ts
18593
- import { existsSync as existsSync7 } from "fs";
18717
+ import { existsSync as existsSync8 } from "fs";
18594
18718
  import { fileURLToPath } from "url";
18595
18719
  import { Worker } from "worker_threads";
18596
18720
 
18597
18721
  // ../../packages/plugin-sdk/src/ignore-layers.ts
18598
18722
  var import_ignore = __toESM(require_ignore(), 1);
18599
- import { readFileSync as readFileSync8 } from "fs";
18600
- import { join as join11 } from "path";
18723
+ import { readFileSync as readFileSync9 } from "fs";
18724
+ import { join as join13 } from "path";
18601
18725
 
18602
18726
  // ../../packages/plugin-sdk/src/inventory-resolver.ts
18603
18727
  import { arch, hostname as hostname4, platform, release } from "os";
18604
18728
 
18605
18729
  // ../../packages/plugin-sdk/src/nudge.ts
18606
- import { mkdirSync as mkdirSync2, readFileSync as readFileSync9, writeFileSync as writeFileSync5 } from "fs";
18607
- import { join as join12 } from "path";
18730
+ import { mkdirSync as mkdirSync2, readFileSync as readFileSync10, writeFileSync as writeFileSync5 } from "fs";
18731
+ import { join as join14 } from "path";
18608
18732
 
18609
18733
  // ../../packages/plugin-sdk/src/paths.ts
18610
- import { readdirSync as readdirSync3, realpathSync as realpathSync2 } from "fs";
18611
- import { basename as basename4, dirname as dirname3, sep as sep3 } from "path";
18734
+ import { readdirSync as readdirSync3, realpathSync as realpathSync3 } from "fs";
18735
+ import { basename as basename4, dirname as dirname4, sep as sep3 } from "path";
18612
18736
 
18613
18737
  // ../../packages/plugin-sdk/src/project-files.ts
18614
- import { existsSync as existsSync8, readdirSync as readdirSync4 } from "fs";
18615
- import { basename as basename5, join as join13 } from "path";
18738
+ import { existsSync as existsSync9, readdirSync as readdirSync4 } from "fs";
18739
+ import { basename as basename5, join as join15 } from "path";
18616
18740
 
18617
18741
  // ../../packages/plugin-sdk/src/provider-env-antigravity.ts
18618
18742
  var optionalBaseUrl2 = external_exports.preprocess((v) => {
@@ -18647,12 +18771,12 @@ import { randomUUID as randomUUID14 } from "crypto";
18647
18771
  var THIRTY_DAYS_MS = 30 * 24 * 60 * 60 * 1e3;
18648
18772
 
18649
18773
  // ../../packages/plugin-sdk/src/throttle.ts
18650
- import { mkdirSync as mkdirSync3, statSync as statSync6, writeFileSync as writeFileSync6 } from "fs";
18651
- import { join as join14 } from "path";
18774
+ import { mkdirSync as mkdirSync3, statSync as statSync8, writeFileSync as writeFileSync6 } from "fs";
18775
+ import { join as join16 } from "path";
18652
18776
 
18653
18777
  // ../../packages/setup-wizard/src/remediation/rotation-checklist.ts
18654
18778
  import { writeFileSync as writeFileSync7 } from "fs";
18655
- import { join as join15 } from "path";
18779
+ import { join as join17 } from "path";
18656
18780
 
18657
18781
  // ../../packages/setup-wizard/src/triage/merge.ts
18658
18782
  var RANK = Object.fromEntries(
@@ -18660,9 +18784,9 @@ var RANK = Object.fromEntries(
18660
18784
  );
18661
18785
 
18662
18786
  // ../../packages/setup-wizard/src/triage/plan-file.ts
18663
- import { mkdtempSync, readFileSync as readFileSync10, rmdirSync, rmSync as rmSync5, writeFileSync as writeFileSync8 } from "fs";
18787
+ import { mkdtempSync, readFileSync as readFileSync11, rmdirSync, rmSync as rmSync6, writeFileSync as writeFileSync8 } from "fs";
18664
18788
  import { tmpdir } from "os";
18665
- import { basename as basename6, dirname as dirname4, join as join16 } from "path";
18789
+ import { basename as basename6, dirname as dirname5, join as join18 } from "path";
18666
18790
  var SuppressionEntrySchema = external_exports.object({
18667
18791
  ruleId: external_exports.string(),
18668
18792
  category: DetectionCategory,
@@ -18704,8 +18828,8 @@ var PersistedPlanSchema = external_exports.object({
18704
18828
  });
18705
18829
 
18706
18830
  // src/skills-registry.ts
18707
- import { readdirSync as readdirSync5, readFileSync as readFileSync11 } from "fs";
18708
- import { join as join17 } from "path";
18831
+ import { readdirSync as readdirSync5, readFileSync as readFileSync12 } from "fs";
18832
+ import { join as join19 } from "path";
18709
18833
  import { fileURLToPath as fileURLToPath2 } from "url";
18710
18834
  var SKILLS_DIR = fileURLToPath2(new URL("../skills", import.meta.url));
18711
18835
 
@@ -18745,7 +18869,7 @@ function authorName(author) {
18745
18869
  var manifestPath = process.argv[2];
18746
18870
  var manifest = {};
18747
18871
  try {
18748
- manifest = JSON.parse(readFileSync12(manifestPath ?? "", "utf8"));
18872
+ manifest = JSON.parse(readFileSync13(manifestPath ?? "", "utf8"));
18749
18873
  } catch {
18750
18874
  }
18751
18875
  process.stdout.write(