@phnx-labs/agents-cli 1.20.87 → 1.20.88

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.
Files changed (52) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/README.md +3 -3
  3. package/dist/bin/agents +0 -0
  4. package/dist/commands/doctor.d.ts +0 -19
  5. package/dist/commands/doctor.js +219 -305
  6. package/dist/commands/exec.js +7 -19
  7. package/dist/commands/inspect.js +3 -5
  8. package/dist/commands/routines.js +2 -2
  9. package/dist/commands/sessions.js +1 -0
  10. package/dist/commands/ssh.js +3 -3
  11. package/dist/commands/usage.d.ts +3 -2
  12. package/dist/commands/usage.js +2 -9
  13. package/dist/lib/agents.d.ts +31 -1
  14. package/dist/lib/agents.js +55 -0
  15. package/dist/lib/command-skills.d.ts +10 -0
  16. package/dist/lib/command-skills.js +14 -0
  17. package/dist/lib/commands.js +19 -1
  18. package/dist/lib/daemon.js +17 -2
  19. package/dist/lib/devices/doctor-findings.d.ts +167 -0
  20. package/dist/lib/devices/doctor-findings.js +893 -0
  21. package/dist/lib/devices/fleet-divergence.d.ts +22 -0
  22. package/dist/lib/devices/fleet-divergence.js +34 -10
  23. package/dist/lib/devices/fleet-inventory.d.ts +17 -6
  24. package/dist/lib/devices/fleet-inventory.js +56 -8
  25. package/dist/lib/exec.d.ts +14 -3
  26. package/dist/lib/exec.js +41 -8
  27. package/dist/lib/menubar/MenubarHelper.app/Contents/MacOS/MenubarHelper +0 -0
  28. package/dist/lib/project-resources.js +34 -20
  29. package/dist/lib/runner.d.ts +14 -1
  30. package/dist/lib/runner.js +37 -8
  31. package/dist/lib/sandbox.d.ts +2 -0
  32. package/dist/lib/sandbox.js +38 -0
  33. package/dist/lib/secrets/Agents CLI.app/Contents/CodeResources +0 -0
  34. package/dist/lib/secrets/Agents CLI.app/Contents/MacOS/Agents CLI +0 -0
  35. package/dist/lib/secrets/rc-hygiene.d.ts +0 -6
  36. package/dist/lib/secrets/rc-hygiene.js +0 -24
  37. package/dist/lib/session/active.d.ts +6 -6
  38. package/dist/lib/session/active.js +6 -6
  39. package/dist/lib/session/discover.d.ts +5 -0
  40. package/dist/lib/session/discover.js +137 -1
  41. package/dist/lib/session/parse.d.ts +2 -0
  42. package/dist/lib/session/parse.js +76 -37
  43. package/dist/lib/session/sync/agents.js +0 -0
  44. package/dist/lib/session/types.d.ts +1 -1
  45. package/dist/lib/session/types.js +1 -1
  46. package/dist/lib/staleness/detectors/commands.js +14 -5
  47. package/dist/lib/staleness/types.d.ts +2 -0
  48. package/dist/lib/staleness/writers/commands.js +13 -7
  49. package/dist/lib/usage.d.ts +72 -1
  50. package/dist/lib/usage.js +21 -27
  51. package/dist/lib/versions.js +30 -13
  52. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,65 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.20.88
4
+
5
+ - **`agents doctor` redesigned into a prioritized, fleet-aware, per-version
6
+ readout (RUSH-2069).** Comprehensive by default (no `--verbose`): a top
7
+ `✗ CRITICAL — needs you now (N)` section lists every critical across the whole
8
+ fleet worst-first (`device · harness@version · account · message → remediation`),
9
+ then a `─── by computer ───` section gives each device its warnings plus a
10
+ compact accounts/versions line showing every installed version and its account
11
+ (provable ✓ / ✗). A single-machine `agents doctor` collapses to the CRITICAL
12
+ section plus one `▸ <machine>` block. Severity: provable logged-out, a missing
13
+ hook/plugin, a broken CLI, and a never-synced version whose declared resources
14
+ are therefore absent are CRITICAL; drift, version-skew, repo-behind/-drift,
15
+ orphans, and an unprovable logout are WARNINGS. Sign-in is
16
+ now probed **per installed version** (each version's own home + the global
17
+ credential via the new `credentialPresence`), so a per-version logged-out claim
18
+ is made only when both are absent, agents with no inspectable identity never
19
+ report logged-out, and the login remediation is
20
+ version-targeted (`agents run <agent>@<version>` for the isolated set;
21
+ gemini/antigravity/droid/cursor say the login is shared). Older fleet boxes that
22
+ can't report per-version sign-in surface an "older agents-cli — upgrade"
23
+ warning. The readout is de-duplicated so one root cause is one line: a version's
24
+ missing hooks/plugins and drifted resources collapse to a count plus two
25
+ examples (`32 hooks missing (incl. 'a', 'b')`), the same problem on several
26
+ versions of one agent reads as `claude (5 versions)` with an agent-wide fix
27
+ (isolated copies stay on their own line, since the sweep skips them), every
28
+ orphan row on a machine folds into one cleanup-only line, and a version that
29
+ already listed its drifted resources no longer also says "sources changed since
30
+ last sync". The two advisories that predate the redesign are findings now, not
31
+ separate blocks: credential-shaped exports in shell rc files (RUSH-1968) and the
32
+ Windows execution policy that blocks `agents.ps1`. The duplicate-version-home
33
+ hook check keeps its text output too — differing copies are critical, identical
34
+ ones a warning, one row per agent rather than one per hook — and so does the
35
+ Host CLIs check, as a `host CLIs` warning naming `agents cli install <name>`.
36
+ Remediations reach every version in their row: a row collapsed across versions
37
+ uses `agents sync <agent>@all --yes` (a bare `agents sync <agent>` would fix only
38
+ the default version), a cross-device resource gap says `agents repo pull` rather
39
+ than the central-to-home `agents doctor --fix`, and a diverged config repo names
40
+ its own alias instead of always saying `user`.
41
+ `agents doctor --json` adds a `findings` array and a per-version
42
+ `fleet.signIn` map; the existing `clis`/`sync`/`orphans`/`fleet`/`signIn`/`repos`
43
+ fields are unchanged. Source: `apps/cli/src/lib/devices/doctor-findings.ts`,
44
+ `apps/cli/src/lib/devices/fleet-inventory.ts`, `apps/cli/src/lib/agents.ts`,
45
+ `apps/cli/src/commands/doctor.ts`.
46
+
47
+ - **Run Cursor routines safely (RUSH-2080).** Routines configured with `agent: cursor` now reuse the same-device login under the default sandbox, trust the configured workspace without `--yolo`, warn when a requested read-only plan is elevated to writable edit mode (including `loop:` jobs), and record successful runs correctly. Source: `apps/cli/src/lib/runner.ts`.
48
+
49
+ - **`agents sessions` now discovers, indexes, and renders Cursor agent transcripts (RUSH-2081).**
50
+ Cursor writes its conversation to `projects/<encoded-cwd>/agent-transcripts/<uuid>/<uuid>.jsonl`
51
+ and metadata to `chats/<workspace-hash>/<uuid>/meta.json`. Discovery starts from the transcript
52
+ and joins metadata by UUID, so abandoned chats with no transcript never become empty rows.
53
+ Cursor is installed outside agents-cli's managed version homes, so users with any managed
54
+ agent version must pass `--unmanaged` to include Cursor rows.
55
+ Source: `apps/cli/src/lib/session/discover.ts`, `apps/cli/src/lib/session/parse.ts`.
56
+
57
+ - **Fix Cursor usage and account inspection (RUSH-2082).** `agents usage` now derives support from the usage library so Cursor, Grok, and future usage sources cannot drift from the command, and `agents run cursor@` can inspect Cursor's active account. Source: `apps/cli/src/commands/usage.ts`, `apps/cli/src/lib/agents.ts`.
58
+
59
+ - **Sync Cursor commands to the IDE and cursor-agent CLI (RUSH-2083).** Shared commands now remain available as typed IDE slash commands and are also generated as Agent Skills for cursor-agent, while preserving user-authored files in `.cursor/commands/`. Source: `apps/cli/src/lib/command-skills.ts`.
60
+
61
+ - **Daemon routines resolve `agents` on `~/.local/bin` installs.** The generated daemon service (systemd + launchd) now puts the `agents` shim's own directory on `PATH`, not only the Node runtime dir. On a box where the shim lives outside the Node bin dir (a `~/.local/bin` global install, a separate npm prefix), the daemon's `PATH` previously carried only the Node dir, so every scheduled `command` routine — the always-on watchdog included — shelled out to a bare `agents` that resolved to nothing and died with `exit 127`. Source: `apps/cli/src/lib/daemon.ts`.
62
+
3
63
  ## 1.20.87
4
64
 
5
65
  - **`agents devices enable|disable|prefer|unprefer <name>` control which machines
package/README.md CHANGED
@@ -165,7 +165,7 @@ agents run codex@ "review this branch"
165
165
 
166
166
  A trailing `@` opens an account picker before either an interactive or prompt-based run. Each installed version shows its account identity, exact version, login state, plan, and every available session, weekly, or monthly limit. Logged-out, rate-limited, and out-of-credit accounts remain visible with the reason they cannot be selected; signed-in accounts whose provider does not expose quota data stay selectable and say `limits unavailable`. The choice pins only that run and does not change your default version.
167
167
 
168
- Account selection is available for Claude, Codex, Antigravity, Grok, Kimi, Droid, and OpenCode. It requires a terminal and cannot be combined with `--resume`, `--strategy`/`--balanced`, `--lease`, or `--host`/`--device`; profiles and workflows must use their concrete host agent instead.
168
+ Account selection is available for Claude, Codex, Gemini, Cursor, Antigravity, Grok, Kimi, Droid, and OpenCode. It requires a terminal and cannot be combined with `--resume`, `--strategy`/`--balanced`, `--lease`, or `--host`/`--device`; profiles and workflows must use their concrete host agent instead.
169
169
 
170
170
  ### Chain agents
171
171
 
@@ -1116,7 +1116,7 @@ Which DotAgents resources each agent CLI can load. Source of truth: [src/lib/age
1116
1116
  | Antigravity | yes | yes | yes | yes | yes | yes | yes | no | `AGENTS.md` | no |
1117
1117
  | Grok Build | yes | yes | yes | yes | yes | skills ($name) | yes | no | `AGENTS.md` | no |
1118
1118
  | OpenClaw | yes | yes | yes | no | yes | gateway | yes | yes | `workspace/AGENTS.md` | no |
1119
- | Cursor | yes | no | yes | no | yes | yes | no | no | `.cursorrules` | no |
1119
+ | Cursor | yes | yes | yes | yes | yes | IDE + skills ($name) | yes | >= 2026.1.22 | `.cursorrules` | no |
1120
1120
  | OpenCode | yes | no | yes | >= 1.1.1 | yes | yes | no | no | `AGENTS.md` | no |
1121
1121
  | Copilot | yes | no | yes | no | yes | yes | no | no | `AGENTS.md` | no |
1122
1122
  | Amp | yes | no | yes | no | yes | yes | no | no | `AGENTS.md` | no |
@@ -1125,7 +1125,7 @@ Which DotAgents resources each agent CLI can load. Source of truth: [src/lib/age
1125
1125
  | Roo Code | yes | no | yes | no | yes | yes | no | no | `AGENTS.md` | no |
1126
1126
  | Droid | yes | yes | yes | >= 0.57.5 | >= 0.26.0 | yes | yes | yes | `AGENTS.md` | no |
1127
1127
 
1128
- **Legend:** `yes` / `no` = synced or skipped at install time. `skills ($name)` = no file-based slash-command dir; behavior ships as a generated skill invoked with `$command`. `gateway` = OpenClaw resolves slash commands at runtime, not from synced files. Version suffixes are enforced at sync time — out-of-range versions are skipped with a clear message.
1128
+ **Legend:** `yes` / `no` = synced or skipped at install time. `skills ($name)` = no file-based slash-command dir; behavior ships as a generated skill invoked with `$command`. `IDE + skills ($name)` = an IDE command file plus a generated skill for the CLI. `gateway` = OpenClaw resolves slash commands at runtime, not from synced files. Version suffixes are enforced at sync time — out-of-range versions are skipped with a clear message.
1129
1129
 
1130
1130
  **Host CLIs** (`agents cli`) are separate: YAML manifests under `~/.agents/cli/` install binaries onto your PATH (`gh`, `higgsfield`, etc.). They are not copied into per-agent version homes.
1131
1131
 
package/dist/bin/agents CHANGED
Binary file
@@ -22,30 +22,11 @@
22
22
  * apply pending sync.
23
23
  */
24
24
  import type { Command } from 'commander';
25
- import { type FleetDivergenceReport } from '../lib/devices/fleet-divergence.js';
26
25
  import { type VersionResourceReport } from '../lib/doctor-diff.js';
27
26
  import { type DuplicateVersionHook } from '../lib/hooks.js';
28
27
  import { type SyncStatusRow, type OrphanRow } from '../lib/drift.js';
29
28
  import { type FetchStatusMarker } from '../lib/auto-pull.js';
30
29
  export declare function wrapLine(prefix: string, text: string, width?: number): string[];
31
- /**
32
- * Windows-only advisory lines. When the effective PowerShell execution policy
33
- * blocks unsigned local `.ps1` scripts (`Restricted`/`AllSigned`), the generated
34
- * `agents.ps1` launcher fails in PowerShell even when it is on PATH. Surface the
35
- * remediation; the `.cmd` companion still works, so this is a warning, not an
36
- * error, and doctor never auto-changes the policy. Pure — returns `[]` on
37
- * non-Windows or a permissive policy, so it is testable without invoking
38
- * PowerShell.
39
- */
40
- export declare function execPolicyWarningLines(platform: NodeJS.Platform, policy: string | null): string[];
41
- /**
42
- * Render the cross-device divergence section for `agents doctor --devices`
43
- * (RUSH-2027): a clean all-clear when the fleet agrees, otherwise the specific
44
- * gaps — a resource/version present here but missing on a box, or a diverged
45
- * config repo — grouped by device, each a plain-language line. Devices that
46
- * couldn't be compared (offline / older CLI) are named so the readout is honest.
47
- */
48
- export declare function renderFleetDivergence(report: FleetDivergenceReport): string[];
49
30
  export type IssueSeverity = 'critical' | 'warning' | 'info';
50
31
  /**
51
32
  * One triaged health finding. `severity`/`category`/`subject`/`impact`/`fix` are