@phnx-labs/agents-cli 1.22.18 → 1.22.19
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/CHANGELOG.md +12 -0
- package/dist/bin/agents +0 -0
- package/dist/lib/menubar/MenubarHelper.app/Contents/CodeResources +0 -0
- package/dist/lib/menubar/MenubarHelper.app/Contents/MacOS/MenubarHelper +0 -0
- package/dist/lib/refresh.js +35 -21
- package/dist/lib/secrets/Agents CLI.app/Contents/CodeResources +0 -0
- package/dist/lib/secrets/Agents CLI.app/Contents/MacOS/Agents CLI +0 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.22.19
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- **`agents sync --local -y` refreshes every installed version, not only the default.**
|
|
8
|
+
Unattended reconcile (`refresh({ skipPrompts })`) previously wrote resources and
|
|
9
|
+
registered hooks into each agent's default version alone, so non-default homes
|
|
10
|
+
kept stale hooks after a system update. Unattended refresh now loops
|
|
11
|
+
`listInstalledVersions` for both resource sync and hook registration.
|
|
12
|
+
Interactive refresh still targets the default only. Source:
|
|
13
|
+
`apps/cli/src/lib/refresh.ts`.
|
|
14
|
+
|
|
3
15
|
## 1.22.18
|
|
4
16
|
|
|
5
17
|
### Fixed
|
package/dist/bin/agents
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/lib/refresh.js
CHANGED
|
@@ -114,7 +114,11 @@ export async function refresh(options = {}) {
|
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
-
// 3. Sync resources
|
|
117
|
+
// 3. Sync resources into version homes.
|
|
118
|
+
// Unattended (`skipPrompts` / `agents sync --yes --local`): every installed
|
|
119
|
+
// version — otherwise non-default homes keep stale hooks after a system
|
|
120
|
+
// update (fleet multi-harness: only the default version was refreshed).
|
|
121
|
+
// Interactive: default only; re-run `agents sync <agent>@all` for the rest.
|
|
118
122
|
const cliStates = await getAllCliStates();
|
|
119
123
|
const agentsToSync = agentFilter ? [agentFilter] : MANAGED_AGENT_IDS;
|
|
120
124
|
const available = getAvailableResources();
|
|
@@ -124,6 +128,9 @@ export async function refresh(options = {}) {
|
|
|
124
128
|
const defaultVer = getGlobalDefault(agentId);
|
|
125
129
|
if (!defaultVer)
|
|
126
130
|
continue;
|
|
131
|
+
const versionsToSync = skipPrompts
|
|
132
|
+
? listInstalledVersions(agentId)
|
|
133
|
+
: [defaultVer];
|
|
127
134
|
const actuallySynced = getActuallySyncedResources(agentId, defaultVer);
|
|
128
135
|
const newResources = getNewResources(available, actuallySynced, getProjectOnlyResources());
|
|
129
136
|
const hasAnySynced = actuallySynced.commands.length > 0 ||
|
|
@@ -155,24 +162,29 @@ export async function refresh(options = {}) {
|
|
|
155
162
|
forceFullSync = true;
|
|
156
163
|
}
|
|
157
164
|
if (forceFullSync || (selection && Object.keys(selection).length > 0)) {
|
|
158
|
-
const
|
|
159
|
-
const
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
165
|
+
const kinds = new Set();
|
|
166
|
+
for (const ver of versionsToSync) {
|
|
167
|
+
const syncResult = syncResourcesToVersion(agentId, ver, selection, forceFullSync ? { force: true } : undefined);
|
|
168
|
+
if (syncResult.commands)
|
|
169
|
+
kinds.add('commands');
|
|
170
|
+
if (syncResult.skills)
|
|
171
|
+
kinds.add('skills');
|
|
172
|
+
if (syncResult.hooks)
|
|
173
|
+
kinds.add('hooks');
|
|
174
|
+
if (syncResult.memory.length > 0)
|
|
175
|
+
kinds.add('memory');
|
|
176
|
+
if (syncResult.permissions)
|
|
177
|
+
kinds.add('permissions');
|
|
178
|
+
if (syncResult.mcp.length > 0)
|
|
179
|
+
kinds.add('mcp');
|
|
180
|
+
if (syncResult.plugins.length > 0)
|
|
181
|
+
kinds.add('plugins');
|
|
182
|
+
}
|
|
183
|
+
if (kinds.size > 0) {
|
|
184
|
+
const verNote = versionsToSync.length > 1
|
|
185
|
+
? chalk.gray(` (${versionsToSync.length} versions)`)
|
|
186
|
+
: '';
|
|
187
|
+
console.log(chalk.green(` Synced: ${[...kinds].join(', ')}`) + verNote);
|
|
176
188
|
}
|
|
177
189
|
}
|
|
178
190
|
}
|
|
@@ -185,7 +197,7 @@ export async function refresh(options = {}) {
|
|
|
185
197
|
}
|
|
186
198
|
}
|
|
187
199
|
}
|
|
188
|
-
// 4. Register hooks as lifecycle events
|
|
200
|
+
// 4. Register hooks as lifecycle events (same version set as resource sync)
|
|
189
201
|
const hookManifest = parseHookManifest();
|
|
190
202
|
if (Object.keys(hookManifest).length > 0) {
|
|
191
203
|
let hookRegistered = 0;
|
|
@@ -195,7 +207,9 @@ export async function refresh(options = {}) {
|
|
|
195
207
|
continue;
|
|
196
208
|
const versions = listInstalledVersions(agentId);
|
|
197
209
|
const defaultVer = getGlobalDefault(agentId);
|
|
198
|
-
const targetVersions =
|
|
210
|
+
const targetVersions = skipPrompts
|
|
211
|
+
? versions
|
|
212
|
+
: (defaultVer ? [defaultVer] : versions.slice(-1));
|
|
199
213
|
for (const ver of targetVersions) {
|
|
200
214
|
const home = getVersionHomePath(agentId, ver);
|
|
201
215
|
const result = registerHooksToSettings(agentId, home, hookManifest);
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@phnx-labs/agents-cli",
|
|
3
|
-
"version": "1.22.
|
|
3
|
+
"version": "1.22.19",
|
|
4
4
|
"description": "One CLI for all your AI coding agents - versions, config, cloud dispatch, sessions, and teams (now with first-class Grok Build CLI support)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|