@ryuenn3123/agentic-senior-core 6.2.2 → 6.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/.agents/plugins/agentic-senior-core/.app.json +6 -0
- package/.agents/plugins/agentic-senior-core/.codex-plugin/plugin.json +2 -1
- package/.agents/plugins/agentic-senior-core/hooks.json +19 -19
- package/.agents/plugins/agentic-senior-core/plugin.json +1 -1
- package/.agents/plugins/marketplace.json +1 -1
- package/gemini-extension.json +1 -1
- package/lib/cli/commands/global.mjs +66 -9
- package/package.json +1 -1
- package/plugin.yaml +1 -1
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentic-senior-core",
|
|
3
|
-
"version": "6.2.
|
|
3
|
+
"version": "6.2.3",
|
|
4
4
|
"description": "Universal AI coding rules. Write code like a staff engineer.",
|
|
5
5
|
"skills": "./skills/",
|
|
6
6
|
"hooks": "./hooks/hooks.json",
|
|
7
|
+
"apps": "./.app.json",
|
|
7
8
|
"interface": {
|
|
8
9
|
"displayName": "Agentic Senior Core",
|
|
9
10
|
"shortDescription": "Universal AI coding rules and workflows",
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
"hooks": [
|
|
7
7
|
{
|
|
8
8
|
"type": "command",
|
|
9
|
-
"command": "node -e \"const p=require('path'),fs=require('fs'),os=require('os');const local=p.join(process.cwd(),'.agents','plugins','agentic-senior-core','hooks','session-start.js');const
|
|
10
|
-
"commandWindows": "if (Get-Command node -ErrorAction SilentlyContinue) { $root = if ($env:CLAUDE_PLUGIN_ROOT) { $env:CLAUDE_PLUGIN_ROOT } else { \"$env:USERPROFILE\\.gemini\\config\\plugins\\agentic-senior-core\" }; node \"$root\\hooks\\session-start.js\" }",
|
|
9
|
+
"command": "node -e \"const p=require('path'),fs=require('fs'),os=require('os');const local=p.join(process.cwd(),'.agents','plugins','agentic-senior-core','hooks','session-start.js');const g1=p.join(os.homedir(),'.agents','plugins','agentic-senior-core','hooks','session-start.js');const g2=p.join(os.homedir(),'.gemini','config','plugins','agentic-senior-core','hooks','session-start.js');require(fs.existsSync(local)?local:(fs.existsSync(g1)?g1:g2));\"",
|
|
10
|
+
"commandWindows": "if (Get-Command node -ErrorAction SilentlyContinue) { $root = if ($env:PLUGIN_ROOT) { $env:PLUGIN_ROOT } else { if ($env:CLAUDE_PLUGIN_ROOT) { $env:CLAUDE_PLUGIN_ROOT } else { if (Test-Path \"$env:USERPROFILE\\.agents\\plugins\\agentic-senior-core\") { \"$env:USERPROFILE\\.agents\\plugins\\agentic-senior-core\" } else { \"$env:USERPROFILE\\.gemini\\config\\plugins\\agentic-senior-core\" } } }; node \"$root\\hooks\\session-start.js\" }",
|
|
11
11
|
"timeout": 5,
|
|
12
12
|
"statusMessage": "Loading ASC rules..."
|
|
13
13
|
}
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"hooks": [
|
|
20
20
|
{
|
|
21
21
|
"type": "command",
|
|
22
|
-
"command": "node -e \"const p=require('path'),fs=require('fs'),os=require('os');const local=p.join(process.cwd(),'.agents','plugins','agentic-senior-core','hooks','subagent-start.js');const
|
|
23
|
-
"commandWindows": "if (Get-Command node -ErrorAction SilentlyContinue) { $root = if ($env:CLAUDE_PLUGIN_ROOT) { $env:CLAUDE_PLUGIN_ROOT } else { \"$env:USERPROFILE\\.gemini\\config\\plugins\\agentic-senior-core\" }; node \"$root\\hooks\\subagent-start.js\" }",
|
|
22
|
+
"command": "node -e \"const p=require('path'),fs=require('fs'),os=require('os');const local=p.join(process.cwd(),'.agents','plugins','agentic-senior-core','hooks','subagent-start.js');const g1=p.join(os.homedir(),'.agents','plugins','agentic-senior-core','hooks','subagent-start.js');const g2=p.join(os.homedir(),'.gemini','config','plugins','agentic-senior-core','hooks','subagent-start.js');require(fs.existsSync(local)?local:(fs.existsSync(g1)?g1:g2));\"",
|
|
23
|
+
"commandWindows": "if (Get-Command node -ErrorAction SilentlyContinue) { $root = if ($env:PLUGIN_ROOT) { $env:PLUGIN_ROOT } else { if ($env:CLAUDE_PLUGIN_ROOT) { $env:CLAUDE_PLUGIN_ROOT } else { if (Test-Path \"$env:USERPROFILE\\.agents\\plugins\\agentic-senior-core\") { \"$env:USERPROFILE\\.agents\\plugins\\agentic-senior-core\" } else { \"$env:USERPROFILE\\.gemini\\config\\plugins\\agentic-senior-core\" } } }; node \"$root\\hooks\\subagent-start.js\" }",
|
|
24
24
|
"timeout": 5,
|
|
25
25
|
"statusMessage": "Loading ASC rules..."
|
|
26
26
|
}
|
|
@@ -34,16 +34,16 @@
|
|
|
34
34
|
{
|
|
35
35
|
"type": "command",
|
|
36
36
|
"if": "Edit(**/package.json)",
|
|
37
|
-
"command": "node -e \"const p=require('path'),fs=require('fs'),os=require('os');const local=p.join(process.cwd(),'.agents','plugins','agentic-senior-core','hooks','pre-tool-dependency-gate.js');const
|
|
38
|
-
"commandWindows": "if (Get-Command node -ErrorAction SilentlyContinue) { $root = if ($env:CLAUDE_PLUGIN_ROOT) { $env:CLAUDE_PLUGIN_ROOT } else { \"$env:USERPROFILE\\.gemini\\config\\plugins\\agentic-senior-core\" }; node \"$root\\hooks\\pre-tool-dependency-gate.js\" }",
|
|
37
|
+
"command": "node -e \"const p=require('path'),fs=require('fs'),os=require('os');const local=p.join(process.cwd(),'.agents','plugins','agentic-senior-core','hooks','pre-tool-dependency-gate.js');const g1=p.join(os.homedir(),'.agents','plugins','agentic-senior-core','hooks','pre-tool-dependency-gate.js');const g2=p.join(os.homedir(),'.gemini','config','plugins','agentic-senior-core','hooks','pre-tool-dependency-gate.js');require(fs.existsSync(local)?local:(fs.existsSync(g1)?g1:g2));\"",
|
|
38
|
+
"commandWindows": "if (Get-Command node -ErrorAction SilentlyContinue) { $root = if ($env:PLUGIN_ROOT) { $env:PLUGIN_ROOT } else { if ($env:CLAUDE_PLUGIN_ROOT) { $env:CLAUDE_PLUGIN_ROOT } else { if (Test-Path \"$env:USERPROFILE\\.agents\\plugins\\agentic-senior-core\") { \"$env:USERPROFILE\\.agents\\plugins\\agentic-senior-core\" } else { \"$env:USERPROFILE\\.gemini\\config\\plugins\\agentic-senior-core\" } } }; node \"$root\\hooks\\pre-tool-dependency-gate.js\" }",
|
|
39
39
|
"timeout": 5,
|
|
40
40
|
"statusMessage": "ASC Pre-tool dependency check (Edit)..."
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
43
|
"type": "command",
|
|
44
44
|
"if": "Write(**/package.json)",
|
|
45
|
-
"command": "node -e \"const p=require('path'),fs=require('fs'),os=require('os');const local=p.join(process.cwd(),'.agents','plugins','agentic-senior-core','hooks','pre-tool-dependency-gate.js');const
|
|
46
|
-
"commandWindows": "if (Get-Command node -ErrorAction SilentlyContinue) { $root = if ($env:CLAUDE_PLUGIN_ROOT) { $env:CLAUDE_PLUGIN_ROOT } else { \"$env:USERPROFILE\\.gemini\\config\\plugins\\agentic-senior-core\" }; node \"$root\\hooks\\pre-tool-dependency-gate.js\" }",
|
|
45
|
+
"command": "node -e \"const p=require('path'),fs=require('fs'),os=require('os');const local=p.join(process.cwd(),'.agents','plugins','agentic-senior-core','hooks','pre-tool-dependency-gate.js');const g1=p.join(os.homedir(),'.agents','plugins','agentic-senior-core','hooks','pre-tool-dependency-gate.js');const g2=p.join(os.homedir(),'.gemini','config','plugins','agentic-senior-core','hooks','pre-tool-dependency-gate.js');require(fs.existsSync(local)?local:(fs.existsSync(g1)?g1:g2));\"",
|
|
46
|
+
"commandWindows": "if (Get-Command node -ErrorAction SilentlyContinue) { $root = if ($env:PLUGIN_ROOT) { $env:PLUGIN_ROOT } else { if ($env:CLAUDE_PLUGIN_ROOT) { $env:CLAUDE_PLUGIN_ROOT } else { if (Test-Path \"$env:USERPROFILE\\.agents\\plugins\\agentic-senior-core\") { \"$env:USERPROFILE\\.agents\\plugins\\agentic-senior-core\" } else { \"$env:USERPROFILE\\.gemini\\config\\plugins\\agentic-senior-core\" } } }; node \"$root\\hooks\\pre-tool-dependency-gate.js\" }",
|
|
47
47
|
"timeout": 5,
|
|
48
48
|
"statusMessage": "ASC Pre-tool dependency check (Write)..."
|
|
49
49
|
}
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
"hooks": [
|
|
55
55
|
{
|
|
56
56
|
"type": "command",
|
|
57
|
-
"command": "node -e \"const p=require('path'),fs=require('fs'),os=require('os');const local=p.join(process.cwd(),'.agents','plugins','agentic-senior-core','hooks','pre-tool-dependency-gate.js');const
|
|
58
|
-
"commandWindows": "if (Get-Command node -ErrorAction SilentlyContinue) { $root = if ($env:CLAUDE_PLUGIN_ROOT) { $env:CLAUDE_PLUGIN_ROOT } else { \"$env:USERPROFILE\\.gemini\\config\\plugins\\agentic-senior-core\" }; node \"$root\\hooks\\pre-tool-dependency-gate.js\" }",
|
|
57
|
+
"command": "node -e \"const p=require('path'),fs=require('fs'),os=require('os');const local=p.join(process.cwd(),'.agents','plugins','agentic-senior-core','hooks','pre-tool-dependency-gate.js');const g1=p.join(os.homedir(),'.agents','plugins','agentic-senior-core','hooks','pre-tool-dependency-gate.js');const g2=p.join(os.homedir(),'.gemini','config','plugins','agentic-senior-core','hooks','pre-tool-dependency-gate.js');require(fs.existsSync(local)?local:(fs.existsSync(g1)?g1:g2));\"",
|
|
58
|
+
"commandWindows": "if (Get-Command node -ErrorAction SilentlyContinue) { $root = if ($env:PLUGIN_ROOT) { $env:PLUGIN_ROOT } else { if ($env:CLAUDE_PLUGIN_ROOT) { $env:CLAUDE_PLUGIN_ROOT } else { if (Test-Path \"$env:USERPROFILE\\.agents\\plugins\\agentic-senior-core\") { \"$env:USERPROFILE\\.agents\\plugins\\agentic-senior-core\" } else { \"$env:USERPROFILE\\.gemini\\config\\plugins\\agentic-senior-core\" } } }; node \"$root\\hooks\\pre-tool-dependency-gate.js\" }",
|
|
59
59
|
"timeout": 5,
|
|
60
60
|
"statusMessage": "ASC Pre-tool dependency check (Terminal)..."
|
|
61
61
|
}
|
|
@@ -68,15 +68,15 @@
|
|
|
68
68
|
"hooks": [
|
|
69
69
|
{
|
|
70
70
|
"type": "command",
|
|
71
|
-
"command": "node -e \"const p=require('path'),fs=require('fs'),os=require('os');const local=p.join(process.cwd(),'.agents','plugins','agentic-senior-core','hooks','post-edit-enforce.js');const
|
|
72
|
-
"commandWindows": "if (Get-Command node -ErrorAction SilentlyContinue) { $root = if ($env:CLAUDE_PLUGIN_ROOT) { $env:CLAUDE_PLUGIN_ROOT } else { \"$env:USERPROFILE\\.gemini\\config\\plugins\\agentic-senior-core\" }; node \"$root\\hooks\\post-edit-enforce.js\" }",
|
|
71
|
+
"command": "node -e \"const p=require('path'),fs=require('fs'),os=require('os');const local=p.join(process.cwd(),'.agents','plugins','agentic-senior-core','hooks','post-edit-enforce.js');const g1=p.join(os.homedir(),'.agents','plugins','agentic-senior-core','hooks','post-edit-enforce.js');const g2=p.join(os.homedir(),'.gemini','config','plugins','agentic-senior-core','hooks','post-edit-enforce.js');require(fs.existsSync(local)?local:(fs.existsSync(g1)?g1:g2));\"",
|
|
72
|
+
"commandWindows": "if (Get-Command node -ErrorAction SilentlyContinue) { $root = if ($env:PLUGIN_ROOT) { $env:PLUGIN_ROOT } else { if ($env:CLAUDE_PLUGIN_ROOT) { $env:CLAUDE_PLUGIN_ROOT } else { if (Test-Path \"$env:USERPROFILE\\.agents\\plugins\\agentic-senior-core\") { \"$env:USERPROFILE\\.agents\\plugins\\agentic-senior-core\" } else { \"$env:USERPROFILE\\.gemini\\config\\plugins\\agentic-senior-core\" } } }; node \"$root\\hooks\\post-edit-enforce.js\" }",
|
|
73
73
|
"timeout": 5,
|
|
74
74
|
"statusMessage": "ASC ladder & spec gate check..."
|
|
75
75
|
},
|
|
76
76
|
{
|
|
77
77
|
"type": "command",
|
|
78
|
-
"command": "node -e \"const p=require('path'),fs=require('fs'),os=require('os');const local=p.join(process.cwd(),'.agents','plugins','agentic-senior-core','hooks','dedup-gate.js');const
|
|
79
|
-
"commandWindows": "if (Get-Command node -ErrorAction SilentlyContinue) { $root = if ($env:CLAUDE_PLUGIN_ROOT) { $env:CLAUDE_PLUGIN_ROOT } else { \"$env:USERPROFILE\\.gemini\\config\\plugins\\agentic-senior-core\" }; node \"$root\\hooks\\dedup-gate.js\" }",
|
|
78
|
+
"command": "node -e \"const p=require('path'),fs=require('fs'),os=require('os');const local=p.join(process.cwd(),'.agents','plugins','agentic-senior-core','hooks','dedup-gate.js');const g1=p.join(os.homedir(),'.agents','plugins','agentic-senior-core','hooks','dedup-gate.js');const g2=p.join(os.homedir(),'.gemini','config','plugins','agentic-senior-core','hooks','dedup-gate.js');require(fs.existsSync(local)?local:(fs.existsSync(g1)?g1:g2));\"",
|
|
79
|
+
"commandWindows": "if (Get-Command node -ErrorAction SilentlyContinue) { $root = if ($env:PLUGIN_ROOT) { $env:PLUGIN_ROOT } else { if ($env:CLAUDE_PLUGIN_ROOT) { $env:CLAUDE_PLUGIN_ROOT } else { if (Test-Path \"$env:USERPROFILE\\.agents\\plugins\\agentic-senior-core\") { \"$env:USERPROFILE\\.agents\\plugins\\agentic-senior-core\" } else { \"$env:USERPROFILE\\.gemini\\config\\plugins\\agentic-senior-core\" } } }; node \"$root\\hooks\\dedup-gate.js\" }",
|
|
80
80
|
"timeout": 15,
|
|
81
81
|
"statusMessage": "ASC duplicate-code scan..."
|
|
82
82
|
}
|
|
@@ -86,15 +86,15 @@
|
|
|
86
86
|
"PreInvocation": [
|
|
87
87
|
{
|
|
88
88
|
"type": "command",
|
|
89
|
-
"command": "node -e \"const p=require('path'),fs=require('fs'),os=require('os');const local=p.join(process.cwd(),'.agents','plugins','agentic-senior-core','hooks','session-pulse.js');const
|
|
90
|
-
"commandWindows": "if (Get-Command node -ErrorAction SilentlyContinue) { $root = if ($env:CLAUDE_PLUGIN_ROOT) { $env:CLAUDE_PLUGIN_ROOT } else { \"$env:USERPROFILE\\.gemini\\config\\plugins\\agentic-senior-core\" }; node \"$root\\hooks\\session-pulse.js\" }",
|
|
89
|
+
"command": "node -e \"const p=require('path'),fs=require('fs'),os=require('os');const local=p.join(process.cwd(),'.agents','plugins','agentic-senior-core','hooks','session-pulse.js');const g1=p.join(os.homedir(),'.agents','plugins','agentic-senior-core','hooks','session-pulse.js');const g2=p.join(os.homedir(),'.gemini','config','plugins','agentic-senior-core','hooks','session-pulse.js');require(fs.existsSync(local)?local:(fs.existsSync(g1)?g1:g2));\"",
|
|
90
|
+
"commandWindows": "if (Get-Command node -ErrorAction SilentlyContinue) { $root = if ($env:PLUGIN_ROOT) { $env:PLUGIN_ROOT } else { if ($env:CLAUDE_PLUGIN_ROOT) { $env:CLAUDE_PLUGIN_ROOT } else { if (Test-Path \"$env:USERPROFILE\\.agents\\plugins\\agentic-senior-core\") { \"$env:USERPROFILE\\.agents\\plugins\\agentic-senior-core\" } else { \"$env:USERPROFILE\\.gemini\\config\\plugins\\agentic-senior-core\" } } }; node \"$root\\hooks\\session-pulse.js\" }",
|
|
91
91
|
"timeout": 5,
|
|
92
92
|
"statusMessage": "Loading ASC rules..."
|
|
93
93
|
},
|
|
94
94
|
{
|
|
95
95
|
"type": "command",
|
|
96
|
-
"command": "node -e \"const p=require('path'),fs=require('fs'),os=require('os');const local=p.join(process.cwd(),'.agents','plugins','agentic-senior-core','hooks','ladder-pulse.js');const
|
|
97
|
-
"commandWindows": "if (Get-Command node -ErrorAction SilentlyContinue) { $root = if ($env:CLAUDE_PLUGIN_ROOT) { $env:CLAUDE_PLUGIN_ROOT } else { \"$env:USERPROFILE\\.gemini\\config\\plugins\\agentic-senior-core\" }; node \"$root\\hooks\\ladder-pulse.js\" }",
|
|
96
|
+
"command": "node -e \"const p=require('path'),fs=require('fs'),os=require('os');const local=p.join(process.cwd(),'.agents','plugins','agentic-senior-core','hooks','ladder-pulse.js');const g1=p.join(os.homedir(),'.agents','plugins','agentic-senior-core','hooks','ladder-pulse.js');const g2=p.join(os.homedir(),'.gemini','config','plugins','agentic-senior-core','hooks','ladder-pulse.js');require(fs.existsSync(local)?local:(fs.existsSync(g1)?g1:g2));\"",
|
|
97
|
+
"commandWindows": "if (Get-Command node -ErrorAction SilentlyContinue) { $root = if ($env:PLUGIN_ROOT) { $env:PLUGIN_ROOT } else { if ($env:CLAUDE_PLUGIN_ROOT) { $env:CLAUDE_PLUGIN_ROOT } else { if (Test-Path \"$env:USERPROFILE\\.agents\\plugins\\agentic-senior-core\") { \"$env:USERPROFILE\\.agents\\plugins\\agentic-senior-core\" } else { \"$env:USERPROFILE\\.gemini\\config\\plugins\\agentic-senior-core\" } } }; node \"$root\\hooks\\ladder-pulse.js\" }",
|
|
98
98
|
"timeout": 5,
|
|
99
99
|
"statusMessage": "ASC ladder pulse..."
|
|
100
100
|
}
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"PostInvocation": [
|
|
103
103
|
{
|
|
104
104
|
"type": "command",
|
|
105
|
-
"command": "node -e \"const p=require('path'),fs=require('fs'),os=require('os');const local=p.join(process.cwd(),'.agents','plugins','agentic-senior-core','hooks','post-edit-enforce.js');const
|
|
105
|
+
"command": "node -e \"const p=require('path'),fs=require('fs'),os=require('os');const local=p.join(process.cwd(),'.agents','plugins','agentic-senior-core','hooks','post-edit-enforce.js');const g1=p.join(os.homedir(),'.agents','plugins','agentic-senior-core','hooks','post-edit-enforce.js');const g2=p.join(os.homedir(),'.gemini','config','plugins','agentic-senior-core','hooks','post-edit-enforce.js');require(fs.existsSync(local)?local:(fs.existsSync(g1)?g1:g2));\"",
|
|
106
106
|
"timeout": 15
|
|
107
107
|
}
|
|
108
108
|
]
|
package/gemini-extension.json
CHANGED
|
@@ -108,27 +108,60 @@ async function pathExists(filePath) {
|
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
async function copyDirRecursive(src, dest) {
|
|
111
|
+
async function copyDirRecursive(src, dest, ignoreNames = []) {
|
|
112
112
|
await fs.mkdir(dest, { recursive: true });
|
|
113
113
|
const entries = await fs.readdir(src, { withFileTypes: true });
|
|
114
114
|
for (const entry of entries) {
|
|
115
|
+
if (ignoreNames.includes(entry.name)) continue;
|
|
115
116
|
const srcPath = path.join(src, entry.name);
|
|
116
117
|
const destPath = path.join(dest, entry.name);
|
|
117
118
|
if (entry.isDirectory()) {
|
|
118
|
-
await copyDirRecursive(srcPath, destPath);
|
|
119
|
+
await copyDirRecursive(srcPath, destPath, ignoreNames);
|
|
119
120
|
} else {
|
|
120
121
|
await fs.copyFile(srcPath, destPath);
|
|
121
122
|
}
|
|
122
123
|
}
|
|
123
124
|
}
|
|
124
125
|
|
|
126
|
+
async function ensureCodexConfigEnabled() {
|
|
127
|
+
const configPath = path.join(HOME, '.codex', 'config.toml');
|
|
128
|
+
const agentsPluginsDir = path.join(HOME, '.agents', 'plugins').replace(/\\/g, '/');
|
|
129
|
+
try {
|
|
130
|
+
let content = '';
|
|
131
|
+
if (await pathExists(configPath)) {
|
|
132
|
+
content = await fs.readFile(configPath, 'utf8');
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
let additions = '';
|
|
136
|
+
|
|
137
|
+
if (!content.includes('[plugins."agentic-senior-core"]')) {
|
|
138
|
+
additions += `\n[plugins."agentic-senior-core"]\nenabled = true\n`;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
if (!content.includes('agentic-senior-core-marketplace')) {
|
|
142
|
+
additions += `\n[marketplaces."agentic-senior-core-marketplace"]\nsource = "local"\npath = "${agentsPluginsDir}"\n`;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
if (additions) {
|
|
146
|
+
await fs.mkdir(path.dirname(configPath), { recursive: true });
|
|
147
|
+
await fs.appendFile(configPath, additions, 'utf8');
|
|
148
|
+
}
|
|
149
|
+
} catch {
|
|
150
|
+
// Best-effort config registration
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
125
154
|
async function installCodexGlobal(target) {
|
|
126
155
|
const rulesSource = path.join(REPOSITORY_ROOT, target.rulesSourcePath);
|
|
127
156
|
const pluginSource = path.join(REPOSITORY_ROOT, target.pluginSourcePath);
|
|
128
|
-
const
|
|
129
|
-
const
|
|
130
|
-
|
|
131
|
-
|
|
157
|
+
const hooksSource = path.join(REPOSITORY_ROOT, '.agents', 'plugins', 'agentic-senior-core', 'hooks.json');
|
|
158
|
+
const singlePluginSource = path.join(REPOSITORY_ROOT, '.agents', 'plugins', 'agentic-senior-core');
|
|
159
|
+
const rulesTarget = target.targetPath(); // ~/.codex/AGENTS.md
|
|
160
|
+
const hooksTarget = path.join(HOME, '.codex', 'hooks.json');
|
|
161
|
+
const pluginTarget = target.pluginTargetPath(); // ~/.agents/plugins
|
|
162
|
+
const codexDirectPluginTarget = path.join(HOME, '.codex', 'plugins', 'agentic-senior-core');
|
|
163
|
+
|
|
164
|
+
if (!(await pathExists(rulesSource)) || !(await pathExists(path.join(REPOSITORY_ROOT, '.agents')))) {
|
|
132
165
|
console.error(` ${target.label}: source not found ... FAIL`);
|
|
133
166
|
return false;
|
|
134
167
|
}
|
|
@@ -137,11 +170,34 @@ async function installCodexGlobal(target) {
|
|
|
137
170
|
await fs.mkdir(path.dirname(rulesTarget), { recursive: true });
|
|
138
171
|
await fs.copyFile(rulesSource, rulesTarget);
|
|
139
172
|
|
|
173
|
+
// Copy global hooks file (~/.codex/hooks.json) so Codex Settings -> Hooks tab detects it natively
|
|
174
|
+
if (await pathExists(hooksSource)) {
|
|
175
|
+
await fs.mkdir(path.dirname(hooksTarget), { recursive: true });
|
|
176
|
+
await fs.copyFile(hooksSource, hooksTarget);
|
|
177
|
+
}
|
|
178
|
+
|
|
140
179
|
// Copy plugin bundle & marketplace catalog (~/.agents/plugins/)
|
|
141
180
|
await fs.mkdir(pluginTarget, { recursive: true });
|
|
142
181
|
await copyDirRecursive(pluginSource, pluginTarget);
|
|
143
182
|
|
|
144
|
-
|
|
183
|
+
// Copy direct plugin bundle to ~/.codex/plugins/agentic-senior-core/ for instant Codex discovery
|
|
184
|
+
await fs.mkdir(codexDirectPluginTarget, { recursive: true });
|
|
185
|
+
await copyDirRecursive(singlePluginSource, codexDirectPluginTarget);
|
|
186
|
+
|
|
187
|
+
// Clean up standalone skill directories so skills remain 100% unified inside the plugin bundle
|
|
188
|
+
const agentsSkillsTarget = path.join(HOME, '.agents', 'skills');
|
|
189
|
+
const codexSkillsTarget = path.join(HOME, '.codex', 'skills');
|
|
190
|
+
if (await pathExists(agentsSkillsTarget)) {
|
|
191
|
+
await fs.rm(agentsSkillsTarget, { recursive: true, force: true });
|
|
192
|
+
}
|
|
193
|
+
if (await pathExists(codexSkillsTarget)) {
|
|
194
|
+
await fs.rm(codexSkillsTarget, { recursive: true, force: true });
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
// Register enabled = true in ~/.codex/config.toml
|
|
198
|
+
await ensureCodexConfigEnabled();
|
|
199
|
+
|
|
200
|
+
console.log(` ${target.label}: ${rulesTarget}, ${hooksTarget}, ${codexDirectPluginTarget} & ${pluginTarget} ... OK`);
|
|
145
201
|
return true;
|
|
146
202
|
}
|
|
147
203
|
|
|
@@ -156,11 +212,12 @@ async function installAntigravityIde(target) {
|
|
|
156
212
|
return false;
|
|
157
213
|
}
|
|
158
214
|
|
|
215
|
+
// Filter out .codex-plugin and .app.json so ~/.gemini/ remains 100% clean without Codex-specific files/folders
|
|
159
216
|
await fs.mkdir(path.dirname(pluginTargetPath), { recursive: true });
|
|
160
|
-
await copyDirRecursive(pluginSource, pluginTargetPath);
|
|
217
|
+
await copyDirRecursive(pluginSource, pluginTargetPath, ['.codex-plugin', '.app.json']);
|
|
161
218
|
|
|
162
219
|
await fs.mkdir(path.dirname(cliTargetPath), { recursive: true });
|
|
163
|
-
await copyDirRecursive(pluginSource, cliTargetPath);
|
|
220
|
+
await copyDirRecursive(pluginSource, cliTargetPath, ['.codex-plugin', '.app.json']);
|
|
164
221
|
|
|
165
222
|
console.log(` ${target.label}: ${pluginTargetPath} ... OK`);
|
|
166
223
|
return true;
|
package/package.json
CHANGED
package/plugin.yaml
CHANGED