@centralu/win32-x64 0.1.0-beta.82 → 0.1.0-beta.83

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.
Binary file
@@ -1,11 +1,11 @@
1
1
  {
2
- "commit": "9684dfb",
2
+ "commit": "747872f",
3
3
  "protocolVersion": 1,
4
4
  "hostProof": 1,
5
5
  "tokenOnStdin": 1,
6
6
  "verifiers": 1,
7
7
  "keyPairing": 1,
8
- "builtAt": "2026-11-27T16:57:59.425Z",
8
+ "builtAt": "2026-11-27T19:57:40.604Z",
9
9
  "runtime": "system-node",
10
10
  "platform": "win32",
11
11
  "arch": "x64"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "centralu",
3
- "version": "0.1.0-beta.82",
3
+ "version": "0.1.0-beta.83",
4
4
  "description": "Run, watch and steer Claude Code, Codex and other coding agents from one window",
5
5
  "license": "MIT",
6
6
  "author": "ijun17",
@@ -38,9 +38,9 @@
38
38
  "win32"
39
39
  ],
40
40
  "optionalDependencies": {
41
- "@centralu/darwin-arm64": "0.1.0-beta.82",
42
- "@centralu/linux-arm64": "0.1.0-beta.82",
43
- "@centralu/linux-x64": "0.1.0-beta.82",
44
- "@centralu/win32-x64": "0.1.0-beta.82"
41
+ "@centralu/darwin-arm64": "0.1.0-beta.83",
42
+ "@centralu/linux-arm64": "0.1.0-beta.83",
43
+ "@centralu/linux-x64": "0.1.0-beta.83",
44
+ "@centralu/win32-x64": "0.1.0-beta.83"
45
45
  }
46
46
  }
@@ -43046,7 +43046,7 @@ import { dirname as dirname27, join as join57 } from "node:path";
43046
43046
  import { mkdirSync as mkdirSync21, readFileSync as readFileSync28, writeSync as writeSync4 } from "node:fs";
43047
43047
 
43048
43048
  // packages/protocol/src/version.generated.ts
43049
- var APP_VERSION = "0.1.0-beta.82";
43049
+ var APP_VERSION = "0.1.0-beta.83";
43050
43050
 
43051
43051
  // packages/protocol/src/brand.ts
43052
43052
  var APP_NAME = "Centralu";
@@ -58907,7 +58907,9 @@ var UsageWindow = external_exports.object({
58907
58907
  /** ISO; null if unknown */
58908
58908
  resetsAt: external_exports.string().nullable().default(null),
58909
58909
  /** If this window applies to one specific model only, that model's name */
58910
- scope: external_exports.string().nullable().default(null)
58910
+ scope: external_exports.string().nullable().default(null),
58911
+ /** When a tool reports multiple scoped windows of the same cadence, the adapter marks its representative window here */
58912
+ primary: external_exports.boolean().optional()
58911
58913
  });
58912
58914
  var UsageSnapshot = external_exports.object({
58913
58915
  plan: external_exports.string().nullable().default(null),
@@ -127593,7 +127595,8 @@ var AcpWire = class {
127593
127595
  const version2 = init.agentInfo?.version ?? await this.deps.version();
127594
127596
  if (version2) this.emit({ type: "agent_version", sessionId: this.sessionId, version: version2 });
127595
127597
  this.canClose = init.agentCapabilities?.sessionCapabilities?.close !== void 0;
127596
- const base2 = { cwd: this.opts.cwd, mcpServers: this.mcpServers() };
127598
+ const meta3 = this.deps.shape?.sessionMeta?.(this.opts);
127599
+ const base2 = { cwd: this.opts.cwd, mcpServers: this.mcpServers(), ...meta3 ? { _meta: meta3 } : {} };
127597
127600
  if (resume) {
127598
127601
  const caps = init.agentCapabilities;
127599
127602
  const method = caps?.loadSession ? "session/load" : caps?.sessionCapabilities?.resume !== void 0 ? "session/resume" : null;
@@ -128308,7 +128311,32 @@ var InstallFailure = class extends Error {
128308
128311
  };
128309
128312
 
128310
128313
  // packages/agent-host/src/adapters/antigravity/release.ts
128314
+ var AGY_PLATFORM_KEYS = ["darwin-aarch64", "darwin-x86_64", "linux-x86_64", "linux-aarch64", "windows-x86_64", "windows-aarch64"];
128311
128315
  var BASE2 = "https://dl.google.com/agy-extensions/releases";
128316
+ var ALLOWED_ARCHIVE_ORIGIN = "https://dl.google.com";
128317
+ var ALLOWED_ARCHIVE_PREFIX = "/agy-extensions/releases/";
128318
+ var STRICT_SEMVER = /^\d+\.\d+\.\d+(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/;
128319
+ var SHA256_HEX = /^[0-9a-f]{64}$/i;
128320
+ var PLAIN_FILENAME = /^[\w.-]+$/;
128321
+ function isValidAgyVersion(version2) {
128322
+ return STRICT_SEMVER.test(version2) && !version2.includes("..");
128323
+ }
128324
+ function isAllowedAgyArchiveUrl(url2) {
128325
+ try {
128326
+ const parsed = new URL(url2);
128327
+ return parsed.origin === ALLOWED_ARCHIVE_ORIGIN && parsed.pathname.startsWith(ALLOWED_ARCHIVE_PREFIX) && !parsed.pathname.includes("..");
128328
+ } catch {
128329
+ return false;
128330
+ }
128331
+ }
128332
+ function normalizeSha256(sha256) {
128333
+ return SHA256_HEX.test(sha256) ? sha256.toLowerCase() : null;
128334
+ }
128335
+ function sanitizeAgyCommand(cmd) {
128336
+ const clean = cmd.replace(/^\.\//, "");
128337
+ if (clean === "." || clean === ".." || !PLAIN_FILENAME.test(clean)) return null;
128338
+ return clean;
128339
+ }
128312
128340
  var posix4 = (url2, sha256, args = []) => ({
128313
128341
  url: url2,
128314
128342
  sha256,
@@ -128323,7 +128351,7 @@ var windows2 = (url2, sha256) => ({
128323
128351
  args: [],
128324
128352
  files: ["agy_acp_server.exe", "localharness_external.exe"]
128325
128353
  });
128326
- var AGY_RELEASE = {
128354
+ var AGY_1_4_3_RELEASE = {
128327
128355
  version: "1.4.3",
128328
128356
  oauthClient: "1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com",
128329
128357
  archives: {
@@ -128335,6 +128363,86 @@ var AGY_RELEASE = {
128335
128363
  "windows-aarch64": windows2(`${BASE2}/windows/agy-acp-server-1.4.3-windows-arm64.zip`, "fcd46431ad33d3b510ce0b98fe7b43d095bd8b3f1c363ee2d57faa7ee981c7bb")
128336
128364
  }
128337
128365
  };
128366
+ var AGY_RELEASE = {
128367
+ version: "1.5.2",
128368
+ oauthClient: "1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com",
128369
+ archives: {
128370
+ "darwin-aarch64": posix4(`${BASE2}/macos/agy-acp-server-1.5.2-darwin-arm64.zip`, "123a16d5c40a8ac99e20f01a62b68dd860fd96b1c528dfb8eaa37ca8733d4845"),
128371
+ "darwin-x86_64": posix4(`${BASE2}/macos/agy-acp-server-1.5.2-darwin-x86_64.zip`, "92addb5580577b5356d35484d72d1a113d9c5312ad766bcb304983aa8e3fbb06"),
128372
+ "linux-x86_64": posix4(`${BASE2}/linux/agy-acp-server-1.5.2-linux-x86_64.zip`, "99dd8612450805011619d7b8447ce374c289e00549d8557f36790e1dd6256852", ["--uid="]),
128373
+ "linux-aarch64": posix4(`${BASE2}/linux/agy-acp-server-1.5.2-linux-arm64.zip`, "e729e05ef54ef0763e48900032466b47fa7c9939cde257f93ba49410ab577acb", ["--uid="]),
128374
+ "windows-x86_64": windows2(`${BASE2}/windows/agy-acp-server-1.5.2-windows-x86_64.zip`, "5cbadd4f4df698572473d8890fc26ec2dc1724501f06e3a963941daec2bd21d6"),
128375
+ "windows-aarch64": windows2(`${BASE2}/windows/agy-acp-server-1.5.2-windows-arm64.zip`, "8a4b2ea8df2ffefae33309348752e9119d21a6d36090c0eb48631c2e8f5781ab")
128376
+ }
128377
+ };
128378
+ var KNOWN_AGY_RELEASES = {
128379
+ "1.4.3": AGY_1_4_3_RELEASE,
128380
+ "1.5.2": AGY_RELEASE
128381
+ };
128382
+ var ACP_REGISTRY_URL = "https://cdn.agentclientprotocol.com/registry/v1/latest/registry.json";
128383
+ var acpBinaryEntrySchema = external_exports.object({
128384
+ archive: external_exports.string(),
128385
+ sha256: external_exports.string(),
128386
+ cmd: external_exports.string().optional(),
128387
+ args: external_exports.array(external_exports.string()).optional()
128388
+ });
128389
+ var acpRegistrySchema = external_exports.object({
128390
+ agents: external_exports.array(
128391
+ external_exports.object({
128392
+ id: external_exports.string(),
128393
+ version: external_exports.string().optional(),
128394
+ distribution: external_exports.object({
128395
+ binary: external_exports.record(external_exports.string(), acpBinaryEntrySchema).optional()
128396
+ }).optional()
128397
+ })
128398
+ )
128399
+ });
128400
+ function parseAgyReleaseFromRegistry(json2) {
128401
+ const parsed = acpRegistrySchema.safeParse(json2);
128402
+ if (!parsed.success) return null;
128403
+ const entry = parsed.data.agents.find((a) => a.id === "antigravity-acp");
128404
+ if (!entry?.version || !isValidAgyVersion(entry.version) || !entry.distribution?.binary) return null;
128405
+ const binary = entry.distribution.binary;
128406
+ const archives = {};
128407
+ for (const key2 of AGY_PLATFORM_KEYS) {
128408
+ const b2 = binary[key2];
128409
+ if (!b2) continue;
128410
+ if (!isAllowedAgyArchiveUrl(b2.archive)) return null;
128411
+ const sha256 = normalizeSha256(b2.sha256);
128412
+ if (!sha256) return null;
128413
+ const isWin = key2.startsWith("windows-");
128414
+ const cmd = b2.cmd !== void 0 ? sanitizeAgyCommand(b2.cmd) : isWin ? "agy_acp_server.exe" : "agy_acp_server.par";
128415
+ if (!cmd) return null;
128416
+ const harness = isWin ? "localharness_external.exe" : "localharness_external";
128417
+ archives[key2] = {
128418
+ url: b2.archive,
128419
+ sha256,
128420
+ command: cmd,
128421
+ args: b2.args ?? [],
128422
+ files: [cmd, harness]
128423
+ };
128424
+ }
128425
+ if (Object.keys(archives).length === 0) return null;
128426
+ return {
128427
+ version: entry.version,
128428
+ oauthClient: AGY_RELEASE.oauthClient,
128429
+ archives
128430
+ };
128431
+ }
128432
+ async function fetchLatestAgyRelease(registryUrl = ACP_REGISTRY_URL, timeoutMs = 1e4) {
128433
+ const ctrl = new AbortController();
128434
+ const timer = setTimeout(() => ctrl.abort(), timeoutMs);
128435
+ try {
128436
+ const res = await fetch(registryUrl, { signal: ctrl.signal });
128437
+ if (!res.ok) return null;
128438
+ const json2 = await res.json();
128439
+ return parseAgyReleaseFromRegistry(json2);
128440
+ } catch {
128441
+ return null;
128442
+ } finally {
128443
+ clearTimeout(timer);
128444
+ }
128445
+ }
128338
128446
  var AGY_INSTALL_SPACE_BYTES = 700 * 1024 * 1024;
128339
128447
 
128340
128448
  // packages/agent-host/src/adapters/antigravity/agent-files.ts
@@ -128365,6 +128473,10 @@ function agyHome(dataDir, version2) {
128365
128473
  const root3 = join34(dataDir, "tools", "antigravity");
128366
128474
  return { root: root3, versionDir: join34(root3, version2), geminiHome: join34(root3, "gemini-home") };
128367
128475
  }
128476
+ function agyHomeWithVersion(home, version2) {
128477
+ if (!isValidAgyVersion(version2)) throw new Error(`Invalid Antigravity version: ${version2}`);
128478
+ return { root: home.root, versionDir: join34(home.root, version2), geminiHome: home.geminiHome };
128479
+ }
128368
128480
  function agyProgram(home, archive) {
128369
128481
  return join34(home.versionDir, archive.command);
128370
128482
  }
@@ -128378,6 +128490,58 @@ function isInstalled(home, archive) {
128378
128490
  return false;
128379
128491
  }
128380
128492
  }
128493
+ function readInstalledArchive(home) {
128494
+ try {
128495
+ const marker = asObj(JSON.parse(readFileSync13(join34(home.versionDir, INSTALL_MARKER), "utf8")));
128496
+ if (typeof marker.url !== "string" || !isAllowedAgyArchiveUrl(marker.url)) return null;
128497
+ if (typeof marker.sha256 !== "string") return null;
128498
+ const sha256 = normalizeSha256(marker.sha256);
128499
+ if (!sha256) return null;
128500
+ if (typeof marker.command !== "string") return null;
128501
+ const command = sanitizeAgyCommand(marker.command);
128502
+ if (!command) return null;
128503
+ if (!Array.isArray(marker.args) || !marker.args.every((a) => typeof a === "string")) return null;
128504
+ if (!Array.isArray(marker.files) || marker.files.length === 0) return null;
128505
+ const files2 = [];
128506
+ for (const f of marker.files) {
128507
+ if (typeof f !== "string") return null;
128508
+ const clean = sanitizeAgyCommand(f);
128509
+ if (!clean || clean !== f) return null;
128510
+ files2.push(clean);
128511
+ }
128512
+ if (!files2.includes(command)) return null;
128513
+ if (!files2.every((f) => existsSync18(join34(home.versionDir, f)))) return null;
128514
+ return { url: marker.url, sha256, command, args: marker.args, files: files2 };
128515
+ } catch {
128516
+ return null;
128517
+ }
128518
+ }
128519
+ function findInstalledAgyVersions(rootDir) {
128520
+ try {
128521
+ const entries = readdirSync11(rootDir, { withFileTypes: true });
128522
+ const versions = [];
128523
+ for (const ent2 of entries) {
128524
+ if (!ent2.isDirectory() || !isValidAgyVersion(ent2.name)) continue;
128525
+ const markerPath = join34(rootDir, ent2.name, INSTALL_MARKER);
128526
+ if (existsSync18(markerPath)) {
128527
+ versions.push(ent2.name);
128528
+ }
128529
+ }
128530
+ return versions.sort((a, b2) => isNewerVersion(a, b2) ? -1 : isNewerVersion(b2, a) ? 1 : 0);
128531
+ } catch {
128532
+ return [];
128533
+ }
128534
+ }
128535
+ function findInstalledAgy(baseHome, knownReleases, platformKey) {
128536
+ for (const version2 of findInstalledAgyVersions(baseHome.root)) {
128537
+ const home = agyHomeWithVersion(baseHome, version2);
128538
+ const fromMarker = readInstalledArchive(home);
128539
+ if (fromMarker) return { version: version2, home, archive: fromMarker };
128540
+ const known = platformKey ? knownReleases[version2]?.archives[platformKey] ?? null : null;
128541
+ if (known && isInstalled(home, known)) return { version: version2, home, archive: known };
128542
+ }
128543
+ return null;
128544
+ }
128381
128545
  function hasSignIn(home) {
128382
128546
  const dir = join34(home.geminiHome, "antigravity-acp");
128383
128547
  try {
@@ -128449,8 +128613,11 @@ async function installAgy(home, archive, version2, opts) {
128449
128613
  const pkg = join34(work, "pkg");
128450
128614
  await unpack(zip, archive, pkg, signal, opts.platform ?? HOST_PLATFORM);
128451
128615
  await realOs().files.promises.rm(zip, { force: true });
128452
- await writeFile5(join34(pkg, INSTALL_MARKER), `${JSON.stringify({ version: version2, sha256: archive.sha256, url: archive.url })}
128453
- `);
128616
+ await writeFile5(
128617
+ join34(pkg, INSTALL_MARKER),
128618
+ `${JSON.stringify({ version: version2, sha256: archive.sha256, url: archive.url, command: archive.command, args: archive.args, files: archive.files })}
128619
+ `
128620
+ );
128454
128621
  cancelled(signal);
128455
128622
  if (isInstalled(home, archive)) return;
128456
128623
  await realOs().files.promises.rm(home.versionDir, { recursive: true, force: true });
@@ -128461,7 +128628,7 @@ async function installAgy(home, archive, version2, opts) {
128461
128628
  await realOs().files.promises.rm(work, { recursive: true, force: true }).catch(() => {
128462
128629
  });
128463
128630
  }
128464
- await removeOtherVersions(home);
128631
+ if (opts.pruneOldVersions !== false) await removeOtherVersions(home);
128465
128632
  }
128466
128633
  async function download(io2, url2, to, signal, onProgress) {
128467
128634
  const body = await io2.download(url2, signal);
@@ -128565,6 +128732,7 @@ function asFailure(err, signal) {
128565
128732
  async function removeLeftovers(home) {
128566
128733
  await removeStale(home.root, ".install-");
128567
128734
  await removeStale(home.root, ".sign-in-");
128735
+ if (existsSync18(join34(home.versionDir, INSTALL_MARKER))) await removeOtherVersions(home);
128568
128736
  }
128569
128737
  async function removeStale(root3, prefix) {
128570
128738
  const names = await readdir8(root3).catch(() => []);
@@ -128997,12 +129165,19 @@ function scrubbed(text3) {
128997
129165
  var AgySetup = class {
128998
129166
  constructor(deps) {
128999
129167
  this.deps = deps;
129000
- this.tidied = removeLeftovers(deps.home).catch(() => {
129168
+ this.currentHome = deps.home;
129169
+ this.currentArchive = deps.archive;
129170
+ this.currentVersion = deps.version;
129171
+ this.tidied = removeLeftovers(this.currentHome).catch(() => {
129001
129172
  });
129002
129173
  }
129003
129174
  deps;
129175
+ currentHome;
129176
+ currentArchive;
129177
+ currentVersion;
129004
129178
  installing = null;
129005
129179
  signingIn = null;
129180
+ checking = null;
129006
129181
  progress = null;
129007
129182
  failure = void 0;
129008
129183
  plan = void 0;
@@ -129011,23 +129186,84 @@ var AgySetup = class {
129011
129186
  listeners = createListeners((e) => console.error(`[Antigravity] a setup listener failed: ${errorMessage(e)}`));
129012
129187
  /** What an earlier host left of an install or a sign-in, removed as this host starts; every install and sign-in waits for it */
129013
129188
  tidied;
129189
+ get version() {
129190
+ return this.currentVersion;
129191
+ }
129192
+ get archive() {
129193
+ return this.currentArchive;
129194
+ }
129195
+ get home() {
129196
+ return this.currentHome;
129197
+ }
129198
+ /**
129199
+ * Checks for a newer Antigravity ACP version in the registry. Runs only when Antigravity is already installed
129200
+ * and no manual install or sign-in is in flight. Concurrent calls share the same in-flight check.
129201
+ */
129202
+ checkUpdate() {
129203
+ if (this.deps.autoUpdate === false || !this.deps.platformKey) return Promise.resolve(false);
129204
+ if (!this.installed() || this.installing || this.signingIn) return Promise.resolve(false);
129205
+ if (this.checking) return this.checking;
129206
+ const run2 = this.runCheckUpdate().finally(() => {
129207
+ if (this.checking === run2) this.checking = null;
129208
+ });
129209
+ this.checking = run2;
129210
+ return run2;
129211
+ }
129212
+ async runCheckUpdate() {
129213
+ const platformKey = this.deps.platformKey;
129214
+ if (!platformKey) return false;
129215
+ try {
129216
+ await this.tidied;
129217
+ if (!this.installed() || this.installing || this.signingIn) return false;
129218
+ const fetchRelease = this.deps.fetchRelease ?? fetchLatestAgyRelease;
129219
+ const release = await fetchRelease() ?? AGY_RELEASE;
129220
+ const newArchive = release?.archives[platformKey];
129221
+ if (!release || !newArchive) return false;
129222
+ const newVersion = release.version;
129223
+ if (!isNewerVersion(newVersion, this.currentVersion)) return false;
129224
+ const newHome = agyHomeWithVersion(this.currentHome, newVersion);
129225
+ if (!isInstalled(newHome, newArchive)) {
129226
+ if (this.installing || this.signingIn) return false;
129227
+ const run2 = this.deps.runInstall ?? ((signal, onProgress) => installAgy(newHome, newArchive, newVersion, {
129228
+ signal,
129229
+ onProgress,
129230
+ pruneOldVersions: false,
129231
+ ...this.deps.installIo ? { io: this.deps.installIo } : {}
129232
+ }));
129233
+ const abort = new AbortController();
129234
+ await run2(abort.signal, () => {
129235
+ });
129236
+ }
129237
+ if (!this.installing && !this.signingIn && isInstalled(newHome, newArchive)) {
129238
+ this.currentVersion = newVersion;
129239
+ this.currentArchive = newArchive;
129240
+ this.currentHome = newHome;
129241
+ this.deps.onVersionUpdated?.({ version: newVersion, archive: newArchive, home: newHome });
129242
+ this.changed();
129243
+ return true;
129244
+ }
129245
+ } catch (e) {
129246
+ console.error(`[Antigravity] auto-update check failed: ${errorMessage(e)}`);
129247
+ }
129248
+ return false;
129249
+ }
129014
129250
  /** Resolves once the leftovers of an earlier host are gone (for tests and the host's start) */
129015
129251
  whenTidy() {
129016
129252
  return this.tidied;
129017
129253
  }
129018
129254
  installed() {
129019
- return this.deps.archive !== null && isInstalled(this.deps.home, this.deps.archive);
129255
+ return this.currentArchive !== null && isInstalled(this.currentHome, this.currentArchive);
129020
129256
  }
129021
129257
  appFound() {
129022
129258
  return this.deps.appFound?.() ?? false;
129023
129259
  }
129024
129260
  signedIn() {
129025
- return this.installed() && !this.signedOutSeen && hasSignIn(this.deps.home);
129261
+ return this.installed() && !this.signedOutSeen && hasSignIn(this.currentHome);
129026
129262
  }
129027
129263
  current() {
129028
129264
  const base2 = { install: "centralu", signIn: "centralu" };
129029
129265
  const failure4 = this.failure ? { failure: this.failure } : {};
129030
- if (this.deps.archive === null) {
129266
+ if (this.currentArchive === null) {
129031
129267
  return { ...base2, state: "not_installed", failure: { reason: "unsupported_platform", message: "Google ships no Antigravity agent for this system" } };
129032
129268
  }
129033
129269
  if (this.installing) return { ...base2, state: "installing", ...this.progress ? { progress: this.progress } : {} };
@@ -129043,12 +129279,14 @@ var AgySetup = class {
129043
129279
  this.listeners.emit(this.current());
129044
129280
  }
129045
129281
  install() {
129046
- const archive = this.deps.archive;
129282
+ const home = this.currentHome;
129283
+ const archive = this.currentArchive;
129284
+ const version2 = this.currentVersion;
129047
129285
  if (this.installing || !archive || this.installed()) return this.current();
129048
129286
  const abort = new AbortController();
129049
129287
  this.failure = void 0;
129050
129288
  this.progress = { received: 0, total: null };
129051
- const run2 = this.deps.runInstall ?? ((signal, onProgress) => installAgy(this.deps.home, archive, this.deps.version, { signal, onProgress, ...this.deps.installIo ? { io: this.deps.installIo } : {} }));
129289
+ const run2 = this.deps.runInstall ?? ((signal, onProgress) => installAgy(home, archive, version2, { signal, onProgress, ...this.deps.installIo ? { io: this.deps.installIo } : {} }));
129052
129290
  const done2 = this.tidied.then(
129053
129291
  () => run2(abort.signal, (p) => {
129054
129292
  this.progress = p;
@@ -129080,16 +129318,17 @@ var AgySetup = class {
129080
129318
  return this.current();
129081
129319
  }
129082
129320
  signIn() {
129083
- const archive = this.deps.archive;
129321
+ const home = this.currentHome;
129322
+ const archive = this.currentArchive;
129084
129323
  if (this.signingIn || !archive || !this.installed()) return this.current();
129085
129324
  const abort = new AbortController();
129086
129325
  this.failure = void 0;
129087
- const run2 = this.deps.runSignIn ?? ((signal) => runSignIn(this.deps.home, archive, signal, this.deps.signIn ?? {}));
129326
+ const run2 = this.deps.runSignIn ?? ((signal) => runSignIn(home, archive, signal, this.deps.signIn ?? {}));
129088
129327
  const done2 = this.tidied.then(() => run2(abort.signal)).then(
129089
129328
  (result) => {
129090
129329
  this.signedOutSeen = false;
129091
129330
  this.plan = result.plan ?? void 0;
129092
- if (!hasSignIn(this.deps.home)) this.failure = { reason: "failed", message: "Antigravity answered the sign-in but kept no account" };
129331
+ if (!hasSignIn(home)) this.failure = { reason: "failed", message: "Antigravity answered the sign-in but kept no account" };
129093
129332
  },
129094
129333
  (err) => {
129095
129334
  this.failure = failureOf(err, "sign-in");
@@ -129207,14 +129446,6 @@ var AGY_SURFACE = {
129207
129446
  offeredWhenMeasured: true,
129208
129447
  note: `Only "Log in with Google" (oauth-personal) is offered, through Centralu's own sign-in. The others wait for a screen that takes their settings.`
129209
129448
  })),
129210
- {
129211
- kind: "capability",
129212
- name: "_meta.antigravity.systemPrompt.append",
129213
- treatment: "blocked",
129214
- measured: `${SPIKE}: offered at initialize, not tried`,
129215
- offeredWhenMeasured: true,
129216
- note: "Centralu's role text is not passed yet (roleText: false), so Antigravity is not the Assistant, a coordinator or an app's agent."
129217
- },
129218
129449
  {
129219
129450
  kind: "capability",
129220
129451
  name: "auth.logout",
@@ -129232,7 +129463,7 @@ var READ_TIMEOUT_MS = 12e3;
129232
129463
  var AgyQuota = external_exports.array(
129233
129464
  external_exports.object({
129234
129465
  name: external_exports.string().min(1),
129235
- buckets: external_exports.array(external_exports.object({ label: external_exports.string().min(1), remaining: external_exports.number().min(0).max(100), resetsAt: external_exports.iso.datetime() })).min(1)
129466
+ buckets: external_exports.array(external_exports.object({ label: external_exports.string().min(1), remaining: external_exports.number().min(0).max(100), resetsAt: external_exports.iso.datetime().nullable() })).min(1)
129236
129467
  })
129237
129468
  ).min(1);
129238
129469
  async function readAgyUsage(home, archive, signedOut, deps = {}) {
@@ -129307,8 +129538,8 @@ async function readAgyUsage(home, archive, signedOut, deps = {}) {
129307
129538
  }
129308
129539
  }
129309
129540
  var GROUP = /^- \*\*(.+)\*\*$/;
129310
- var NOTE = /^\*\(.*\)\*$/;
129311
- var BUCKET = /^- \*\*(.+):\*\* (\d+(?:\.\d+)?)% remaining \(resets (.+)\)$/;
129541
+ var NOTE = /^\*?\(.*\)\*?$/;
129542
+ var BUCKET = /^- \*\*(.+):\*\* (\d+(?:\.\d+)?)% remaining(?: \(resets (.+)\))?$/;
129312
129543
  var RESET = /^(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{1,2}), (\d{4}), (\d{2}):(\d{2}) UTC$/;
129313
129544
  var MONTHS2 = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
129314
129545
  function unread2(what) {
@@ -129329,30 +129560,42 @@ function readAgyQuota(markdown2) {
129329
129560
  const group2 = groups.at(-1);
129330
129561
  if (!group2) throw unread2("a limit before any group");
129331
129562
  const resetStr = bucket[3];
129332
- const reset = resetStr ? RESET.exec(resetStr) : null;
129333
- if (!reset) throw unread2("a reset time");
129334
- const [, month, day4, year, hour, minute] = reset;
129563
+ let resetsAt = null;
129564
+ if (resetStr) {
129565
+ const reset = RESET.exec(resetStr);
129566
+ if (!reset) throw unread2("a reset time");
129567
+ const [, month, day4, year, hour, minute] = reset;
129568
+ if (!month || !day4 || !year || !hour || !minute) throw unread2("a reset time");
129569
+ const at2 = new Date(Date.UTC(Number(year), MONTHS2.indexOf(month), Number(day4), Number(hour), Number(minute)));
129570
+ resetsAt = at2.toISOString();
129571
+ }
129335
129572
  const label = bucket[1];
129336
129573
  const remainingStr = bucket[2];
129337
- if (!month || !day4 || !year || !hour || !minute || !label || !remainingStr) throw unread2("a reset time");
129338
- const at2 = new Date(Date.UTC(Number(year), MONTHS2.indexOf(month), Number(day4), Number(hour), Number(minute)));
129339
- group2.buckets.push({ label, remaining: Number(remainingStr), resetsAt: at2.toISOString() });
129574
+ if (!label || !remainingStr) throw unread2("a bucket label or value");
129575
+ group2.buckets.push({ label, remaining: Number(remainingStr), resetsAt });
129340
129576
  continue;
129341
129577
  }
129342
129578
  const group = GROUP.exec(line);
129343
- if (!group || !group[1]) throw unread2("a line of a kind it does not know");
129344
- groups.push({ name: group[1], buckets: [] });
129579
+ if (group && group[1]) {
129580
+ groups.push({ name: group[1], buckets: [] });
129581
+ continue;
129582
+ }
129583
+ throw unread2("a line of a kind it does not know");
129345
129584
  }
129346
129585
  const quota = AgyQuota.safeParse(groups);
129347
129586
  if (!quota.success) throw unread2(groups.length === 0 ? "no limits" : "a group with no limits, or a value out of range");
129348
129587
  return quota.data;
129349
129588
  }
129350
129589
  var slug = (s) => s.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
129590
+ var isPrimaryGeminiGroup = (name) => /^gemini\s+models$/i.test(name.trim());
129351
129591
  function agyUsageSnapshot(quota, plan) {
129352
- const windows3 = quota.flatMap(
129592
+ const ordered = [...quota].sort((a, b2) => (/gemini/i.test(a.name) ? 0 : 1) - (/gemini/i.test(b2.name) ? 0 : 1));
129593
+ const windows3 = ordered.flatMap(
129353
129594
  (g5) => g5.buckets.map((b2) => {
129354
129595
  const label = b2.label.replace(/\s+Limit(\s+Remaining)?$/, "");
129355
- return { id: `${slug(g5.name)}:${slug(label)}`, label, percent: 100 - b2.remaining, resetsAt: b2.resetsAt, scope: g5.name };
129596
+ const id3 = `${slug(g5.name)}:${slug(label)}`;
129597
+ const primary = isPrimaryGeminiGroup(g5.name) && id3.endsWith(":weekly");
129598
+ return { id: id3, label, percent: 100 - b2.remaining, resetsAt: b2.resetsAt, scope: g5.name, ...primary ? { primary: true } : {} };
129356
129599
  })
129357
129600
  );
129358
129601
  return { plan, windows: windows3, daily: [] };
@@ -129467,15 +129710,28 @@ async function listAgyModels(home, archive, setup, signedOut, label, install) {
129467
129710
  }
129468
129711
 
129469
129712
  // packages/agent-host/src/adapters/antigravity/index.ts
129713
+ var AGY_SUBAGENT_TOOL = "invoke_subagent";
129714
+ function agySystemPrompt(opts) {
129715
+ const apps = (opts.apps?.current().length ?? 0) > 0;
129716
+ const rawTools = opts.centraluTools && opts.centraluBridge ? instructionsFor(toolProfileOf(opts), void 0, apps, AGY_SUBAGENT_TOOL) : void 0;
129717
+ const tools = rawTools ? `# How to use the ${CENTRALU_MCP_NAME} MCP server tools
129718
+
129719
+ ${rawTools}` : void 0;
129720
+ const text3 = [opts.systemPromptAppend, tools].filter(Boolean).join("\n\n");
129721
+ return text3 || void 0;
129722
+ }
129470
129723
  var CAPABILITIES = {
129471
- // What the agent does or lacks beyond these fields (`roleText`, `attachments` and `keepsRepoFilesOut` stay at the ACP defaults):
129724
+ // What the agent does or lacks beyond these fields (`attachments` and `keepsRepoFilesOut` stay at the ACP defaults):
129472
129725
  // - Files of its own in the project: on Linux (measured, 1.4.3 and 1.5.0) and macOS (seen), it writes its `run_workflow`
129473
129726
  // skill as `skills/system/run-workflow/SKILL.md` into the session's project at `session/new`; Windows 1.4.3 writes none
129474
129727
  // (#2320, docs/plans/antigravity-acp.md §1 has the cause)
129475
- // - Not offered yet: role text (`_meta.antigravity.systemPrompt.append` exists, unmeasured), untrusted projects (it reads
129476
- // the project's own instruction files, as the other ACP tools), images in the prompt
129728
+ // - System prompt & role text: passed through `_meta.antigravity.systemPrompt.append` on session/new, session/load, and session/resume
129729
+ // - Not offered yet: untrusted projects (it reads the project's own instruction files, as the other ACP tools), images in the prompt
129477
129730
  ...ACP_CAPABILITIES,
129478
- autoTitle: false
129731
+ autoTitle: false,
129732
+ instructionChannel: "developer",
129733
+ subagentTool: AGY_SUBAGENT_TOOL,
129734
+ roleText: true
129479
129735
  };
129480
129736
  var DESCRIPTOR = {
129481
129737
  name: "antigravity",
@@ -129485,10 +129741,22 @@ var DESCRIPTOR = {
129485
129741
  login: "Sign in with Google from Antigravity's line in Centralu."
129486
129742
  };
129487
129743
  function antigravityProfile(deps = {}) {
129744
+ const root3 = deps.dataDir ?? dataRoot();
129745
+ const baseHome = agyHome(root3, AGY_RELEASE.version);
129488
129746
  const key2 = agyPlatformKey(deps.platform, deps.arch);
129489
- const archive = key2 ? AGY_RELEASE.archives[key2] : null;
129490
- const home = agyHome(deps.dataDir ?? dataRoot(), AGY_RELEASE.version);
129491
- const setup = new AgySetup({ home, archive, version: AGY_RELEASE.version, appFound: agyAppFinder(deps.platform), ...deps });
129747
+ const existing = key2 ? findInstalledAgy(baseHome, KNOWN_AGY_RELEASES, key2) : null;
129748
+ const initialVersion = existing?.version ?? AGY_RELEASE.version;
129749
+ const initialArchive = existing?.archive ?? (key2 ? AGY_RELEASE.archives[key2] : null);
129750
+ const initialHome = existing?.home ?? baseHome;
129751
+ const setup = new AgySetup({
129752
+ home: initialHome,
129753
+ archive: initialArchive,
129754
+ version: initialVersion,
129755
+ platformKey: key2,
129756
+ autoUpdate: true,
129757
+ appFound: agyAppFinder(deps.platform),
129758
+ ...deps
129759
+ });
129492
129760
  const signedOut = () => {
129493
129761
  setup.noteSignedOut();
129494
129762
  return rpcError(notSignedIn(DESCRIPTOR, "centralu"), "not_logged_in");
@@ -129499,9 +129767,15 @@ function antigravityProfile(deps = {}) {
129499
129767
  capabilities: CAPABILITIES,
129500
129768
  surface: AGY_SURFACE,
129501
129769
  agySetup: setup,
129502
- home,
129503
- archive,
129770
+ get home() {
129771
+ return setup.home;
129772
+ },
129773
+ get archive() {
129774
+ return setup.archive;
129775
+ },
129504
129776
  async launch(opts) {
129777
+ const archive = setup.archive;
129778
+ const home = setup.home;
129505
129779
  if (!archive || !setup.installed()) return null;
129506
129780
  const folder = await browserFolder(home, deps.platform, deps.helperPlaces, opts.sessionId);
129507
129781
  if (folder.browser === "") {
@@ -129522,15 +129796,15 @@ function antigravityProfile(deps = {}) {
129522
129796
  }
129523
129797
  };
129524
129798
  },
129525
- sweepSessionFiles: (kept) => sweepSessionTemps(home, kept),
129799
+ sweepSessionFiles: (kept) => sweepSessionTemps(setup.home, kept),
129526
129800
  async installedVersion() {
129527
- return setup.installed() ? AGY_RELEASE.version : null;
129801
+ return setup.installed() ? setup.version : null;
129528
129802
  },
129529
129803
  async detect() {
129530
129804
  const now = setup.current();
129531
129805
  const installed = setup.installed();
129532
129806
  const loggedIn = now.state === "ready";
129533
- const detail = !archive ? "Not available on this system" : !installed ? "Not installed" : loggedIn ? `antigravity-acp ${AGY_RELEASE.version}` : `antigravity-acp ${AGY_RELEASE.version} \xB7 sign-in required`;
129807
+ const detail = !setup.archive ? "Not available on this system" : !installed ? "Not installed" : loggedIn ? `antigravity-acp ${setup.version}` : `antigravity-acp ${setup.version} \xB7 sign-in required`;
129534
129808
  return { tool: DESCRIPTOR.name, installed, loggedIn, detail, setup: now };
129535
129809
  },
129536
129810
  centraluToolOf: agyCentraluTool,
@@ -129544,18 +129818,24 @@ function antigravityProfile(deps = {}) {
129544
129818
  interruptForInput: true,
129545
129819
  onConfigOptions: (options) => {
129546
129820
  const models = toModelOptions(options);
129547
- if (models.length > 0) void saveAgyModels(home, models).catch(() => {
129821
+ if (models.length > 0) void saveAgyModels(setup.home, models).catch(() => {
129548
129822
  });
129823
+ },
129824
+ sessionMeta: (opts) => {
129825
+ const append = agySystemPrompt(opts);
129826
+ return append ? { antigravity: { systemPrompt: { append } } } : void 0;
129549
129827
  }
129550
129828
  },
129551
129829
  listModels() {
129552
- return listAgyModels(home, archive, setup, signedOut, DESCRIPTOR.label, DESCRIPTOR.install);
129830
+ return listAgyModels(setup.home, setup.archive, setup, signedOut, DESCRIPTOR.label, DESCRIPTOR.install);
129553
129831
  },
129554
129832
  /*
129555
129833
  * Its weekly and five-hour limits per model group, from the agent Centralu signed in (`readAgyUsage`), one read at a
129556
129834
  * time. No `account()`: the sign-in is this machine's Centralu's own (plan §0), so a linked machine's usage is read there
129557
129835
  */
129558
129836
  listUsage() {
129837
+ const archive = setup.archive;
129838
+ const home = setup.home;
129559
129839
  if (!archive || !setup.installed()) return Promise.reject(toolNotInstalled(DESCRIPTOR.label, DESCRIPTOR.install));
129560
129840
  if (setup.current().state !== "ready") return Promise.reject(signedOut());
129561
129841
  reading ??= readAgyUsage(home, archive, signedOut, { platform: deps.platform, helperPlaces: deps.helperPlaces, ...deps.usage }).then((quota) => agyUsageSnapshot(quota, setup.current().plan?.name ?? null)).catch((err) => {
@@ -164548,7 +164828,7 @@ var handedToken = launch.tokenOnStdin ? await readHandedToken(process.stdin).cat
164548
164828
  console.error(`[agent-host] the launcher did not hand over the token: ${e.message}`);
164549
164829
  process.exit(1);
164550
164830
  }) : launch.token;
164551
- var BUILD = true ? "9684dfb" : "dev";
164831
+ var BUILD = true ? "747872f" : "dev";
164552
164832
  var { values } = parseArgs({
164553
164833
  options: {
164554
164834
  port: { type: "string", default: "5175" },
@@ -164785,7 +165065,10 @@ var agentVersions = new AgentVersionService({
164785
165065
  readAutoApply: autoApplyAgentVersions.read,
164786
165066
  writeAutoApply: autoApplyAgentVersions.write
164787
165067
  });
164788
- for (const a of adapters.values()) a.setup?.onChange((setup) => events.push({ type: "tool_setup", tool: a.tool, setup }));
165068
+ for (const a of adapters.values()) {
165069
+ a.setup?.onChange((setup) => events.push({ type: "tool_setup", tool: a.tool, setup }));
165070
+ void a.setup?.checkUpdate?.();
165071
+ }
164789
165072
  versionsRef.current = agentVersions;
164790
165073
  mgr.useVersionHint((tool) => agentVersions.installedNow(tool));
164791
165074
  var SLEEP_AFTER_KEY = "agents.sleepAfterMinutes";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@centralu/win32-x64",
3
- "version": "0.1.0-beta.82",
3
+ "version": "0.1.0-beta.83",
4
4
  "description": "Centralu app folder for Windows on x86-64",
5
5
  "license": "MIT",
6
6
  "author": "ijun17",