@ryuenn3123/agentic-senior-core 6.4.4 → 6.4.7
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/gemini-extension.json
CHANGED
|
@@ -234,6 +234,10 @@ async function installAntigravityIde(target) {
|
|
|
234
234
|
'utf8'
|
|
235
235
|
);
|
|
236
236
|
|
|
237
|
+
// Safely update/merge "agentic-senior-core" group key into global hooks.json (~/.gemini/config/hooks.json)
|
|
238
|
+
const masterHooksSource = path.join(REPOSITORY_ROOT, '.agents', 'plugins', 'agentic-senior-core', 'hooks.json');
|
|
239
|
+
await updateGlobalAntigravityHooks(masterHooksSource);
|
|
240
|
+
|
|
237
241
|
// Automatically register the plugin with Antigravity CLI if agy binary is available
|
|
238
242
|
try {
|
|
239
243
|
const { execSync } = await import('node:child_process');
|
|
@@ -247,6 +251,46 @@ async function installAntigravityIde(target) {
|
|
|
247
251
|
return true;
|
|
248
252
|
}
|
|
249
253
|
|
|
254
|
+
async function updateGlobalAntigravityHooks(hooksSource) {
|
|
255
|
+
if (!(await pathExists(hooksSource))) return;
|
|
256
|
+
|
|
257
|
+
try {
|
|
258
|
+
const rawMaster = JSON.parse(await fs.readFile(hooksSource, 'utf8'));
|
|
259
|
+
const masterHooks = rawMaster.hooks || rawMaster;
|
|
260
|
+
|
|
261
|
+
const formattedAscHooks = {
|
|
262
|
+
SessionStart: masterHooks.SessionStart || null,
|
|
263
|
+
PreInvocation: masterHooks.PreInvocation || null,
|
|
264
|
+
PostInvocation: masterHooks.PostInvocation || null,
|
|
265
|
+
Stop: masterHooks.Stop || null,
|
|
266
|
+
PreToolUse: masterHooks.PreToolUse || null,
|
|
267
|
+
PostToolUse: masterHooks.PostToolUse || null,
|
|
268
|
+
};
|
|
269
|
+
|
|
270
|
+
const targetPaths = [
|
|
271
|
+
path.join(HOME, '.gemini', 'config', 'hooks.json'),
|
|
272
|
+
path.join(HOME, '.gemini', 'antigravity-cli', 'hooks.json'),
|
|
273
|
+
];
|
|
274
|
+
|
|
275
|
+
for (const targetPath of targetPaths) {
|
|
276
|
+
try {
|
|
277
|
+
await fs.mkdir(path.dirname(targetPath), { recursive: true });
|
|
278
|
+
let existingConfig = {};
|
|
279
|
+
if (await pathExists(targetPath)) {
|
|
280
|
+
try {
|
|
281
|
+
existingConfig = JSON.parse(await fs.readFile(targetPath, 'utf8'));
|
|
282
|
+
} catch (_) {}
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
// Safely merge "agentic-senior-core" key preserving other user keys (e.g. "well")
|
|
286
|
+
existingConfig['agentic-senior-core'] = formattedAscHooks;
|
|
287
|
+
|
|
288
|
+
await fs.writeFile(targetPath, JSON.stringify(existingConfig, null, 2) + '\n', 'utf8');
|
|
289
|
+
} catch (_) {}
|
|
290
|
+
}
|
|
291
|
+
} catch (_) {}
|
|
292
|
+
}
|
|
293
|
+
|
|
250
294
|
async function findAgyBinaryPath() {
|
|
251
295
|
const candidates = [
|
|
252
296
|
// Windows AppData path
|
package/package.json
CHANGED
package/plugin.yaml
CHANGED