auditor-lambda 0.3.30 → 0.3.32

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.
@@ -200,26 +200,6 @@ 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
-
223
203
  function objectValue(value) {
224
204
  return value && typeof value === 'object' && !Array.isArray(value)
225
205
  ? value
@@ -379,7 +359,6 @@ if (!promptSource || !skillSource) {
379
359
  process.exit(0);
380
360
  }
381
361
 
382
- const promptBody = splitFrontmatter(promptSource.toString('utf8')).body;
383
362
  const codexOpenAiAgentSource = readOptionalSource(codexOpenAiAgentSourceFile, 'Codex skill UI metadata');
384
363
 
385
364
  const installs = [
@@ -448,30 +427,20 @@ try {
448
427
  console.warn(` ${opencodeGlobalConfig}`);
449
428
  }
450
429
 
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');
430
+ // Install Antigravity plugin (global skill for Gemini IDE / Antigravity Hub)
431
+ const antigravityPluginDir = join(homedir(), '.gemini', 'config', 'plugins', 'audit-code');
432
+ const antigravityPluginJsonPath = join(antigravityPluginDir, 'plugin.json');
433
+ const antigravityPluginSkillPath = join(antigravityPluginDir, 'skills', 'SKILL.md');
456
434
 
457
435
  try {
458
- const manifestAction = writeGeneratedFile(
459
- antigravityManifestPath,
436
+ const pluginJsonAction = writeGeneratedFile(
437
+ antigravityPluginJsonPath,
460
438
  Buffer.from(JSON.stringify({ name: 'audit-code', version: '1.0.0' }, null, 2) + '\n'),
461
439
  );
462
- console.log(`audit-code: ${manifestAction} Antigravity extension manifest at ${antigravityManifestPath}`);
440
+ console.log(`audit-code: ${pluginJsonAction} Antigravity plugin manifest at ${antigravityPluginJsonPath}`);
463
441
 
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}`);
442
+ const skillAction = writeGeneratedFile(antigravityPluginSkillPath, skillSource);
443
+ console.log(`audit-code: ${skillAction} Antigravity plugin skill at ${antigravityPluginSkillPath}`);
475
444
  } catch (err) {
476
- console.warn(`audit-code: could not install Antigravity extension (${err.message})`);
445
+ console.warn(`audit-code: could not install Antigravity plugin (${err.message})`);
477
446
  }