@phnx-labs/agents-cli 1.20.21 → 1.20.23
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 +14 -0
- package/dist/commands/cloud.js +142 -13
- package/dist/commands/exec.js +13 -1
- package/dist/commands/menubar.d.ts +10 -0
- package/dist/commands/menubar.js +83 -0
- package/dist/commands/routines.js +34 -1
- package/dist/commands/secrets.d.ts +1 -1
- package/dist/commands/secrets.js +95 -38
- package/dist/index.js +292 -225
- package/dist/lib/agents.js +8 -0
- package/dist/lib/cloud/antigravity.d.ts +70 -0
- package/dist/lib/cloud/antigravity.js +196 -0
- package/dist/lib/cloud/codex.d.ts +1 -0
- package/dist/lib/cloud/codex.js +8 -2
- package/dist/lib/cloud/factory.d.ts +79 -18
- package/dist/lib/cloud/factory.js +324 -26
- package/dist/lib/cloud/registry.d.ts +18 -2
- package/dist/lib/cloud/registry.js +28 -4
- package/dist/lib/cloud/types.d.ts +73 -2
- package/dist/lib/cloud/types.js +17 -0
- package/dist/lib/exec.d.ts +2 -0
- package/dist/lib/exec.js +5 -0
- package/dist/lib/menubar/MenubarHelper.app/Contents/Info.plist +20 -0
- package/dist/lib/menubar/MenubarHelper.app/Contents/MacOS/MenubarHelper +0 -0
- package/dist/lib/menubar/MenubarHelper.app/Contents/_CodeSignature/CodeResources +115 -0
- package/dist/lib/menubar/install-menubar.d.ts +57 -0
- package/dist/lib/menubar/install-menubar.js +291 -0
- package/dist/lib/secrets/agent.d.ts +9 -1
- package/dist/lib/secrets/agent.js +91 -10
- package/dist/lib/secrets/bundles.d.ts +19 -12
- package/dist/lib/secrets/bundles.js +22 -14
- package/dist/lib/self-update.d.ts +34 -0
- package/dist/lib/self-update.js +63 -2
- package/dist/lib/startup/command-registry.d.ts +99 -0
- package/dist/lib/startup/command-registry.js +136 -0
- package/dist/lib/types.d.ts +8 -0
- package/dist/lib/version.d.ts +11 -0
- package/dist/lib/version.js +20 -0
- package/package.json +5 -3
- package/scripts/postinstall.js +35 -0
package/scripts/postinstall.js
CHANGED
|
@@ -239,6 +239,8 @@ To enable version-aware shims, add this to your shell config:
|
|
|
239
239
|
console.log(` Installed shorthands: ${written.join(', ')}`);
|
|
240
240
|
}
|
|
241
241
|
|
|
242
|
+
await healLongRunningProcesses();
|
|
243
|
+
|
|
242
244
|
const version = getVersion();
|
|
243
245
|
if (version) {
|
|
244
246
|
const section = getChangelogSection(version);
|
|
@@ -250,6 +252,39 @@ To enable version-aware shims, add this to your shell config:
|
|
|
250
252
|
}
|
|
251
253
|
}
|
|
252
254
|
|
|
255
|
+
/**
|
|
256
|
+
* Self-heal long-running processes onto the just-installed code (macOS).
|
|
257
|
+
*
|
|
258
|
+
* The root cause behind stale-behavior bugs is a daemon/broker that keeps
|
|
259
|
+
* running pre-upgrade code for days. An in-place `npm i -g` swaps the files but
|
|
260
|
+
* not the running processes — so we bounce them here, the one moment we know the
|
|
261
|
+
* code just changed. Best-effort and non-fatal: a failure must never break the
|
|
262
|
+
* install. Skipped in CI and when AGENTS_NO_HEAL=1.
|
|
263
|
+
*/
|
|
264
|
+
async function healLongRunningProcesses() {
|
|
265
|
+
if (process.platform !== 'darwin') return;
|
|
266
|
+
if (process.env.CI || process.env.AGENTS_NO_HEAL === '1') return;
|
|
267
|
+
// Routines daemon: restart so it reloads new code (e.g. picks up keychain
|
|
268
|
+
// read-memoization / broker fast-path that a stale daemon wouldn't have).
|
|
269
|
+
try {
|
|
270
|
+
const d = await import('../dist/lib/daemon.js');
|
|
271
|
+
if (d.isDaemonRunning?.()) {
|
|
272
|
+
d.stopDaemon?.();
|
|
273
|
+
d.startDaemon?.();
|
|
274
|
+
console.log(' Restarted the routines daemon onto this version.');
|
|
275
|
+
}
|
|
276
|
+
} catch { /* best effort */ }
|
|
277
|
+
// Persistent secrets-agent broker: kickstart so launchd relaunches it on the
|
|
278
|
+
// new code. No-op if the service isn't installed; never blocks.
|
|
279
|
+
try {
|
|
280
|
+
const a = await import('../dist/lib/secrets/agent.js');
|
|
281
|
+
if (a.secretsAgentServiceInstalled?.()) {
|
|
282
|
+
a.kickstartSecretsAgentService?.();
|
|
283
|
+
console.log(' Reloaded the secrets-agent service onto this version.');
|
|
284
|
+
}
|
|
285
|
+
} catch { /* best effort */ }
|
|
286
|
+
}
|
|
287
|
+
|
|
253
288
|
main().catch((err) => {
|
|
254
289
|
console.error(err);
|
|
255
290
|
process.exit(0);
|