chati-dev 3.2.2 → 3.2.3
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/framework/config.yaml
CHANGED
package/package.json
CHANGED
|
@@ -103,11 +103,6 @@ function buildReplacementConfig(provider) {
|
|
|
103
103
|
['/model haiku', `/model ${minimal}`],
|
|
104
104
|
];
|
|
105
105
|
|
|
106
|
-
// Codex CLI uses $chati for skill invocation, not /chati
|
|
107
|
-
if (provider === 'codex') {
|
|
108
|
-
strings.push(['/chati', '$chati']);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
106
|
// --- Regex patterns for model names in structured contexts ---
|
|
112
107
|
const patterns = [
|
|
113
108
|
// Identity section: **Model**: opus | ...
|
|
@@ -175,6 +170,15 @@ function buildReplacementConfig(provider) {
|
|
|
175
170
|
{ pattern: /Update CLAUDE\.md/g, replacement: `Update ${contextFile}` },
|
|
176
171
|
];
|
|
177
172
|
|
|
173
|
+
// Codex CLI uses $chati for skill invocation, not /chati.
|
|
174
|
+
// Lookbehind prevents replacing /chati in file paths (e.g., orchestrator/chati.md).
|
|
175
|
+
if (provider === 'codex') {
|
|
176
|
+
patterns.push({
|
|
177
|
+
pattern: /(?<![/\w])\/chati/g,
|
|
178
|
+
replacement: '$$chati',
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
|
|
178
182
|
return { strings, patterns };
|
|
179
183
|
}
|
|
180
184
|
|
|
@@ -482,13 +482,39 @@ export function generateAllGeminiHooks() {
|
|
|
482
482
|
/**
|
|
483
483
|
* Generate .gemini/settings.json content with hook configuration.
|
|
484
484
|
*
|
|
485
|
+
* Gemini CLI expects hooks as an object keyed by event name, where each
|
|
486
|
+
* event contains an array of hook groups. Each group has an optional
|
|
487
|
+
* `matcher` and a `hooks` array with `{ name, type, command }` entries.
|
|
488
|
+
*
|
|
485
489
|
* @returns {string} JSON string for .gemini/settings.json
|
|
486
490
|
*/
|
|
487
491
|
export function generateGeminiSettings() {
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
+
// Group hooks by event
|
|
493
|
+
const eventGroups = {};
|
|
494
|
+
for (const [name, config] of Object.entries(HOOK_MAP)) {
|
|
495
|
+
if (!eventGroups[config.event]) {
|
|
496
|
+
eventGroups[config.event] = [];
|
|
497
|
+
}
|
|
498
|
+
eventGroups[config.event].push({
|
|
499
|
+
name,
|
|
500
|
+
type: 'command',
|
|
501
|
+
command: `node .gemini/hooks/${name}.js`,
|
|
502
|
+
description: config.description,
|
|
503
|
+
});
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
// Build the settings object: each event → array of hook groups
|
|
507
|
+
const hooks = {};
|
|
508
|
+
for (const [event, hookList] of Object.entries(eventGroups)) {
|
|
509
|
+
// Tool events (BeforeTool) use matcher; lifecycle events don't
|
|
510
|
+
const isToolEvent = event.includes('Tool');
|
|
511
|
+
hooks[event] = [
|
|
512
|
+
{
|
|
513
|
+
...(isToolEvent ? { matcher: '.*' } : {}),
|
|
514
|
+
hooks: hookList,
|
|
515
|
+
},
|
|
516
|
+
];
|
|
517
|
+
}
|
|
492
518
|
|
|
493
519
|
return JSON.stringify({ hooks }, null, 2) + '\n';
|
|
494
520
|
}
|