auditor-lambda 0.3.28 → 0.3.30

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.
@@ -1444,11 +1444,12 @@ const INSTALL_HOST_DEFINITIONS = {
1444
1444
  host: 'antigravity',
1445
1445
  label: 'Antigravity',
1446
1446
  support_level: 'supported',
1447
- setup_kind: 'gemini-command+planning-guide+mcp-ready',
1447
+ setup_kind: 'agent-skill+gemini-command+planning-guide+mcp-ready',
1448
1448
  summary:
1449
- 'Use the repo-local .gemini/commands/audit-code.toml slash command, the planning guide, and AGENTS instructions. The shared MCP launcher is available for structured tool calls.',
1450
- primary_path_key: 'geminiCommandPath',
1449
+ 'Uses the project-scoped .agent/skills/audit-code/SKILL.md skill, the .gemini/commands/audit-code.toml slash command, the planning guide, and AGENTS instructions. The shared MCP launcher is available for structured tool calls.',
1450
+ primary_path_key: 'antigravitySkillPath',
1451
1451
  supporting_path_keys: [
1452
+ 'geminiCommandPath',
1452
1453
  'antigravityPlanningGuidePath',
1453
1454
  'agentsInstructionsPath',
1454
1455
  'mcpLauncherPath',
@@ -1456,7 +1457,8 @@ const INSTALL_HOST_DEFINITIONS = {
1456
1457
  ],
1457
1458
  steps: [
1458
1459
  'Open this repository in Antigravity.',
1459
- 'The /audit-code slash command is automatically discovered from .gemini/commands/audit-code.toml.',
1460
+ 'The audit-code skill is automatically discovered from .agent/skills/audit-code/SKILL.md.',
1461
+ 'The /audit-code slash command is also available from .gemini/commands/audit-code.toml.',
1460
1462
  'Use the shared auditor MCP server when Antigravity needs structured audit state instead of free-form shell guesses.',
1461
1463
  ],
1462
1464
  profile: {
@@ -2170,6 +2172,16 @@ async function verifyInstalledBootstrap(argv) {
2170
2172
  });
2171
2173
  break;
2172
2174
  case 'antigravity':
2175
+ await collectVerifyCheck(checks, 'antigravity_skill', async () => {
2176
+ const content = await readFile(assetPaths.antigravitySkillPath, 'utf8');
2177
+ if (!content.includes('name: audit-code')) {
2178
+ throw new Error('Antigravity skill SKILL.md must contain "name: audit-code" in frontmatter.');
2179
+ }
2180
+ return {
2181
+ summary: 'Antigravity .agent/skills/audit-code/SKILL.md is present and valid.',
2182
+ path: assetPaths.antigravitySkillPath,
2183
+ };
2184
+ });
2173
2185
  await collectVerifyCheck(checks, 'antigravity_guide', async () => {
2174
2186
  const content = await readFile(assetPaths.antigravityPlanningGuidePath, 'utf8');
2175
2187
  if (!content.includes(MCP_LAUNCHER_FILENAME) || !content.includes(INSTALLED_PROMPT_FILENAME)) {
@@ -2337,6 +2349,17 @@ async function detectBootstrapRefreshReason(root, host) {
2337
2349
  }
2338
2350
  break;
2339
2351
  }
2352
+ case 'antigravity': {
2353
+ const expectedSkillPath = join(root, '.agent', 'skills', 'audit-code', 'SKILL.md');
2354
+ if (!(await fileExists(expectedSkillPath))) {
2355
+ return 'missing_host_asset:antigravity:skill';
2356
+ }
2357
+ const antigravitySkill = await readTextIfExists(expectedSkillPath);
2358
+ if (antigravitySkill !== null && antigravitySkill.replace(/\r\n/g, '\n') !== sourceSkill) {
2359
+ return 'stale_host_asset:antigravity:skill';
2360
+ }
2361
+ break;
2362
+ }
2340
2363
  default:
2341
2364
  break;
2342
2365
  }
@@ -2470,6 +2493,9 @@ async function installBootstrap(argv, options = {}) {
2470
2493
  geminiCommandPath: profile.writeAntigravity
2471
2494
  ? join(root, '.gemini', 'commands', 'audit-code.toml')
2472
2495
  : null,
2496
+ antigravitySkillPath: profile.writeAntigravity
2497
+ ? join(root, '.agent', 'skills', 'audit-code', 'SKILL.md')
2498
+ : null,
2473
2499
  };
2474
2500
 
2475
2501
  const results = [];
@@ -2603,6 +2629,12 @@ async function installBootstrap(argv, options = {}) {
2603
2629
  renderGeminiCommandToml(promptBody),
2604
2630
  ),
2605
2631
  );
2632
+ results.push(
2633
+ await writeGeneratedMarkdown(
2634
+ assetPaths.antigravitySkillPath,
2635
+ skillSource,
2636
+ ),
2637
+ );
2606
2638
  }
2607
2639
 
2608
2640
  const hostGuidance = buildHostCatalog({
@@ -2665,6 +2697,7 @@ async function installBootstrap(argv, options = {}) {
2665
2697
  vscode_prompt: assetPaths.vscodePromptPath,
2666
2698
  opencode_config: assetPaths.opencodeConfigPath,
2667
2699
  gemini_command: assetPaths.geminiCommandPath,
2700
+ antigravity_skill: assetPaths.antigravitySkillPath,
2668
2701
  },
2669
2702
  instruction_surfaces: {
2670
2703
  agents: assetPaths.agentsInstructionsPath,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "auditor-lambda",
3
- "version": "0.3.28",
3
+ "version": "0.3.30",
4
4
  "private": false,
5
5
  "description": "Portable hybrid code-auditing framework for arbitrary repositories.",
6
6
  "type": "module",
@@ -200,6 +200,26 @@ function renderGlobalMcpLauncher(installedPkgRoot) {
200
200
  ].join('\n');
201
201
  }
202
202
 
203
+ function splitFrontmatter(text) {
204
+ const normalized = text.replace(/\r\n/g, '\n');
205
+ const match = normalized.match(/^---\n[\s\S]*?\n---\n?/u);
206
+ return { body: match ? normalized.slice(match[0].length) : normalized };
207
+ }
208
+
209
+ function renderAntigravityToml(description, promptBody) {
210
+ const escaped = promptBody.replace(/"""/g, '\\"\\"\\"');
211
+ return `description = ${JSON.stringify(description)}\nprompt = """\n${escaped}"""\n`;
212
+ }
213
+
214
+ function mergeExtensionEnablement(existing, extensionName) {
215
+ const parsed = existing ? JSON.parse(existing) : {};
216
+ if (!parsed[extensionName]) {
217
+ const homePrefix = replaceBackslashes(join(homedir(), '*'));
218
+ parsed[extensionName] = { overrides: [`/${homePrefix}`] };
219
+ }
220
+ return parsed;
221
+ }
222
+
203
223
  function objectValue(value) {
204
224
  return value && typeof value === 'object' && !Array.isArray(value)
205
225
  ? value
@@ -359,6 +379,7 @@ if (!promptSource || !skillSource) {
359
379
  process.exit(0);
360
380
  }
361
381
 
382
+ const promptBody = splitFrontmatter(promptSource.toString('utf8')).body;
362
383
  const codexOpenAiAgentSource = readOptionalSource(codexOpenAiAgentSourceFile, 'Codex skill UI metadata');
363
384
 
364
385
  const installs = [
@@ -426,3 +447,31 @@ try {
426
447
  console.warn(` To install manually, add the mcp.auditor and command["audit-code"] entries to:`);
427
448
  console.warn(` ${opencodeGlobalConfig}`);
428
449
  }
450
+
451
+ // Install Antigravity extension (Gemini IDE slash command)
452
+ const antigravityExtDir = join(homedir(), '.gemini', 'extensions', 'audit-code');
453
+ const antigravityManifestPath = join(antigravityExtDir, 'gemini-extension.json');
454
+ const antigravityCommandPath = join(antigravityExtDir, 'commands', 'audit-code.toml');
455
+ const antigravityEnablementPath = join(homedir(), '.gemini', 'extensions', 'extension-enablement.json');
456
+
457
+ try {
458
+ const manifestAction = writeGeneratedFile(
459
+ antigravityManifestPath,
460
+ Buffer.from(JSON.stringify({ name: 'audit-code', version: '1.0.0' }, null, 2) + '\n'),
461
+ );
462
+ console.log(`audit-code: ${manifestAction} Antigravity extension manifest at ${antigravityManifestPath}`);
463
+
464
+ const tomlContent = renderAntigravityToml(
465
+ 'Autonomous local loop code auditing - loads one backend-rendered audit step at a time',
466
+ promptBody,
467
+ );
468
+ const commandAction = writeGeneratedFile(antigravityCommandPath, Buffer.from(tomlContent));
469
+ console.log(`audit-code: ${commandAction} Antigravity command at ${antigravityCommandPath}`);
470
+
471
+ const enablementAction = installMergedJson(antigravityEnablementPath, (existing) =>
472
+ mergeExtensionEnablement(existing, 'audit-code'),
473
+ );
474
+ console.log(`audit-code: ${enablementAction} Antigravity extension enablement at ${antigravityEnablementPath}`);
475
+ } catch (err) {
476
+ console.warn(`audit-code: could not install Antigravity extension (${err.message})`);
477
+ }