@phnx-labs/agents-cli 1.20.78 → 1.20.82
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 +487 -0
- package/README.md +25 -25
- package/dist/bin/agents +0 -0
- package/dist/commands/activity.d.ts +9 -0
- package/dist/commands/activity.js +153 -24
- package/dist/commands/apply.js +11 -4
- package/dist/commands/cli.js +1 -1
- package/dist/commands/commands.d.ts +1 -1
- package/dist/commands/commands.js +7 -6
- package/dist/commands/defaults.js +3 -11
- package/dist/commands/doctor.d.ts +65 -0
- package/dist/commands/doctor.js +575 -31
- package/dist/commands/events.js +1 -1
- package/dist/commands/exec.js +24 -5
- package/dist/commands/feed.d.ts +4 -0
- package/dist/commands/feed.js +87 -11
- package/dist/commands/harness.js +2 -2
- package/dist/commands/hooks.js +1 -1
- package/dist/commands/import.js +8 -4
- package/dist/commands/logs.js +6 -0
- package/dist/commands/models.js +1 -1
- package/dist/commands/packages.js +6 -6
- package/dist/commands/permissions.js +1 -1
- package/dist/commands/profiles.js +1 -1
- package/dist/commands/pull.d.ts +1 -1
- package/dist/commands/pull.js +4 -4
- package/dist/commands/repo.d.ts +78 -0
- package/dist/commands/repo.js +187 -11
- package/dist/commands/routines.js +12 -2
- package/dist/commands/rules.js +13 -12
- package/dist/commands/secrets.d.ts +3 -1
- package/dist/commands/secrets.js +100 -32
- package/dist/commands/sessions-inject.d.ts +7 -4
- package/dist/commands/sessions-inject.js +18 -18
- package/dist/commands/sessions-picker.js +32 -3
- package/dist/commands/sessions-resume.d.ts +16 -0
- package/dist/commands/sessions-resume.js +14 -13
- package/dist/commands/sessions.d.ts +31 -0
- package/dist/commands/sessions.js +141 -16
- package/dist/commands/set.d.ts +15 -0
- package/dist/commands/set.js +79 -0
- package/dist/commands/setup-fleet.d.ts +21 -0
- package/dist/commands/setup-fleet.js +201 -0
- package/dist/commands/setup-secrets.d.ts +20 -0
- package/dist/commands/setup-secrets.js +223 -0
- package/dist/commands/setup.js +17 -3
- package/dist/commands/skills.js +1 -1
- package/dist/commands/sync.js +7 -2
- package/dist/commands/teams-picker.js +0 -1
- package/dist/commands/teams.d.ts +33 -1
- package/dist/commands/teams.js +208 -44
- package/dist/commands/versions.js +10 -5
- package/dist/commands/view.d.ts +1 -0
- package/dist/commands/view.js +11 -0
- package/dist/index.js +5 -8
- package/dist/lib/acp/harnesses.js +0 -7
- package/dist/lib/activity.d.ts +156 -0
- package/dist/lib/activity.js +282 -0
- package/dist/lib/agents.d.ts +9 -2
- package/dist/lib/agents.js +72 -63
- package/dist/lib/browser/service.js +3 -0
- package/dist/lib/browser/types.d.ts +7 -0
- package/dist/lib/capabilities.js +6 -2
- package/dist/lib/crabbox/lease.js +2 -2
- package/dist/lib/crabbox/setup-copy.d.ts +4 -4
- package/dist/lib/crabbox/setup-copy.js +4 -4
- package/dist/lib/daemon.d.ts +18 -0
- package/dist/lib/daemon.js +47 -6
- package/dist/lib/devices/fleet.d.ts +1 -1
- package/dist/lib/devices/fleet.js +1 -1
- package/dist/lib/doctor-diff.d.ts +20 -0
- package/dist/lib/doctor-diff.js +6 -1
- package/dist/lib/drift.d.ts +31 -11
- package/dist/lib/drift.js +58 -7
- package/dist/lib/events.d.ts +8 -1
- package/dist/lib/events.js +10 -1
- package/dist/lib/exec.js +35 -8
- package/dist/lib/feed-post.d.ts +28 -1
- package/dist/lib/feed-post.js +110 -2
- package/dist/lib/fleet/apply.js +8 -1
- package/dist/lib/fleet/auth-sync.d.ts +18 -1
- package/dist/lib/fleet/auth-sync.js +25 -11
- package/dist/lib/fleet/remote-login.js +5 -0
- package/dist/lib/git.d.ts +14 -14
- package/dist/lib/git.js +41 -44
- package/dist/lib/hooks.d.ts +42 -0
- package/dist/lib/hooks.js +137 -93
- package/dist/lib/hosts/dispatch.d.ts +28 -1
- package/dist/lib/hosts/dispatch.js +33 -5
- package/dist/lib/hosts/option.js +2 -2
- package/dist/lib/hosts/passthrough.d.ts +22 -1
- package/dist/lib/hosts/passthrough.js +238 -13
- package/dist/lib/hosts/run-target.d.ts +2 -0
- package/dist/lib/hosts/run-target.js +1 -0
- package/dist/lib/hq/floor.d.ts +1 -1
- package/dist/lib/hq/floor.js +6 -1
- package/dist/lib/mcp.js +3 -71
- package/dist/lib/menubar/MenubarHelper.app/Contents/MacOS/MenubarHelper +0 -0
- package/dist/lib/menubar/notify-desktop.d.ts +15 -0
- package/dist/lib/menubar/notify-desktop.js +41 -5
- package/dist/lib/merged-resources.d.ts +11 -0
- package/dist/{commands/resources.js → lib/merged-resources.js} +11 -19
- package/dist/lib/permissions.d.ts +0 -32
- package/dist/lib/permissions.js +4 -157
- package/dist/lib/picker.js +1 -1
- package/dist/lib/platform/process.d.ts +16 -5
- package/dist/lib/platform/process.js +54 -0
- package/dist/lib/plugins.d.ts +0 -8
- package/dist/lib/plugins.js +4 -110
- package/dist/lib/project-resources.js +4 -1
- package/dist/lib/refresh.d.ts +5 -3
- package/dist/lib/refresh.js +7 -5
- package/dist/lib/resources/commands.js +4 -1
- package/dist/lib/resources/mcp.js +0 -4
- package/dist/lib/resources/permissions.d.ts +1 -1
- package/dist/lib/resources/permissions.js +1 -5
- package/dist/lib/resources/rules.js +4 -1
- package/dist/lib/resources/skills.js +4 -1
- package/dist/lib/resources/subagents.js +4 -0
- package/dist/lib/resources/types.d.ts +1 -1
- package/dist/lib/routines.d.ts +20 -0
- package/dist/lib/routines.js +6 -0
- package/dist/lib/run-defaults.d.ts +1 -0
- package/dist/lib/run-defaults.js +9 -0
- package/dist/lib/runner.d.ts +0 -12
- package/dist/lib/runner.js +49 -10
- 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/dist/lib/secrets/agent.d.ts +16 -0
- package/dist/lib/secrets/agent.js +105 -3
- package/dist/lib/secrets/audit.d.ts +46 -0
- package/dist/lib/secrets/audit.js +56 -0
- package/dist/lib/secrets/bundles.d.ts +11 -8
- package/dist/lib/secrets/bundles.js +31 -23
- package/dist/lib/secrets/index.d.ts +2 -1
- package/dist/lib/secrets/index.js +8 -2
- package/dist/lib/secrets/remote.d.ts +75 -2
- package/dist/lib/secrets/remote.js +139 -5
- package/dist/lib/secrets/sync.js +3 -3
- package/dist/lib/session/active.d.ts +110 -26
- package/dist/lib/session/active.js +161 -50
- package/dist/lib/session/actor-sidecar.d.ts +23 -0
- package/dist/lib/session/actor-sidecar.js +101 -0
- package/dist/lib/session/db.d.ts +4 -1
- package/dist/lib/session/db.js +65 -8
- package/dist/lib/session/discover.d.ts +4 -0
- package/dist/lib/session/discover.js +13 -0
- package/dist/lib/session/hook-sessions.d.ts +9 -0
- package/dist/lib/session/hook-sessions.js +57 -8
- package/dist/lib/session/pid-registry.d.ts +13 -0
- package/dist/lib/session/render.d.ts +2 -0
- package/dist/lib/session/render.js +1 -1
- package/dist/lib/session/types.d.ts +16 -0
- package/dist/lib/staleness/detectors/commands.js +2 -2
- package/dist/lib/staleness/detectors/permissions.js +1 -45
- package/dist/lib/staleness/writers/commands.js +4 -5
- package/dist/lib/staleness/writers/hooks.js +1 -1
- package/dist/lib/startup/command-registry.d.ts +1 -2
- package/dist/lib/startup/command-registry.js +2 -4
- package/dist/lib/subagents-registry.js +5 -12
- package/dist/lib/subagents.d.ts +0 -10
- package/dist/lib/subagents.js +0 -12
- package/dist/lib/teams/agents.d.ts +0 -2
- package/dist/lib/teams/agents.js +10 -27
- package/dist/lib/teams/index.d.ts +1 -1
- package/dist/lib/teams/index.js +1 -1
- package/dist/lib/types.d.ts +17 -9
- package/dist/lib/usage.d.ts +28 -5
- package/dist/lib/usage.js +271 -8
- package/dist/lib/versions.js +7 -1
- package/dist/lib/watchdog/watchdog.d.ts +1 -1
- package/dist/lib/watchdog/watchdog.js +25 -13
- package/package.json +1 -2
- package/dist/commands/check.d.ts +0 -15
- package/dist/commands/check.js +0 -180
- package/dist/commands/resources.d.ts +0 -5
|
@@ -23,6 +23,9 @@
|
|
|
23
23
|
*/
|
|
24
24
|
import type { Command } from 'commander';
|
|
25
25
|
import { type FleetDivergenceReport } from '../lib/devices/fleet-divergence.js';
|
|
26
|
+
import { type VersionResourceReport } from '../lib/doctor-diff.js';
|
|
27
|
+
import { type SyncStatusRow, type OrphanRow } from '../lib/drift.js';
|
|
28
|
+
import { type FetchStatusMarker } from '../lib/auto-pull.js';
|
|
26
29
|
export declare function wrapLine(prefix: string, text: string, width?: number): string[];
|
|
27
30
|
/**
|
|
28
31
|
* Windows-only advisory lines. When the effective PowerShell execution policy
|
|
@@ -42,4 +45,66 @@ export declare function execPolicyWarningLines(platform: NodeJS.Platform, policy
|
|
|
42
45
|
* couldn't be compared (offline / older CLI) are named so the readout is honest.
|
|
43
46
|
*/
|
|
44
47
|
export declare function renderFleetDivergence(report: FleetDivergenceReport): string[];
|
|
48
|
+
export type IssueSeverity = 'critical' | 'warning' | 'info';
|
|
49
|
+
/**
|
|
50
|
+
* One triaged health finding. `severity`/`category`/`subject`/`impact`/`fix` are
|
|
51
|
+
* the triage backbone the human report renders and `--json` carries; `text`/`color`
|
|
52
|
+
* stay the terse combined label older readers used, so the shape is additive.
|
|
53
|
+
*
|
|
54
|
+
* Severity model (agent-agnostic — applies to every agent doctor inspects):
|
|
55
|
+
* - critical (silent breakage): an unwired hook, a missing/unparseable
|
|
56
|
+
* settings.json, a MISSING resource.
|
|
57
|
+
* - warning (stale / drift): a source layer behind origin, a DIVERGENT resource,
|
|
58
|
+
* a stale / never-synced version.
|
|
59
|
+
* - info (orphan): an EXTRA resource → `agents prune cleanup`.
|
|
60
|
+
*/
|
|
61
|
+
export interface VerdictIssue {
|
|
62
|
+
severity: IssueSeverity;
|
|
63
|
+
/** machine-stable class: unwired-hook | settings-missing | settings-unparseable
|
|
64
|
+
* | missing | source-behind | divergent | extra | stale | never-synced | orphan */
|
|
65
|
+
category: string;
|
|
66
|
+
/** the hook / resource / layer / version the finding is about */
|
|
67
|
+
subject: string;
|
|
68
|
+
/** one-line plain-English consequence */
|
|
69
|
+
impact: string;
|
|
70
|
+
/** exact remediation command */
|
|
71
|
+
fix: string;
|
|
72
|
+
/** terse combined label (legacy) */
|
|
73
|
+
text: string;
|
|
74
|
+
color: 'yellow' | 'red' | 'magenta';
|
|
75
|
+
}
|
|
76
|
+
export interface DoctorVerdict {
|
|
77
|
+
healthy: boolean;
|
|
78
|
+
issues: VerdictIssue[];
|
|
79
|
+
/** Resources (target) / versions (overview) reconciled clean — drives the
|
|
80
|
+
* healthy line's count. */
|
|
81
|
+
reconciled: number;
|
|
82
|
+
}
|
|
83
|
+
export declare function verdictIsAutoFixable(v: DoctorVerdict): boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Fold a version report's divergences into a triaged verdict — one severity-tagged
|
|
86
|
+
* finding per unwired hook, missing/divergent/extra resource, and behind-origin
|
|
87
|
+
* source layer, each carrying its subject, plain-English impact, and exact fix. An
|
|
88
|
+
* UNWIRED hook or a stale source is as unhealthy as a divergent file, not a
|
|
89
|
+
* footnote. Pure so the health rollup is unit-testable without a version home.
|
|
90
|
+
*/
|
|
91
|
+
export declare function computeVerdict(report: VersionResourceReport): DoctorVerdict;
|
|
92
|
+
/**
|
|
93
|
+
* Build the lines of a triaged health block: a single green ✓ line when healthy,
|
|
94
|
+
* otherwise a severity-counted ✗ header followed by one row per finding (icon ·
|
|
95
|
+
* severity · subject — impact, then the exact fix under it) and an optional heal
|
|
96
|
+
* footer. Pure — returns the lines so the rendered output is unit-testable. Shared
|
|
97
|
+
* by target mode and the bare overview so both read the same way.
|
|
98
|
+
*/
|
|
99
|
+
export declare function healthBlockLines(verdict: DoctorVerdict, opts: {
|
|
100
|
+
healthySummary: string;
|
|
101
|
+
healFix?: string;
|
|
102
|
+
}): string[];
|
|
103
|
+
/**
|
|
104
|
+
* Aggregate the bare `agents doctor` overview into the same triaged verdict target
|
|
105
|
+
* mode uses — folding per-version wiring/sync drift, behind-origin source layers,
|
|
106
|
+
* and orphan resources into severity-tagged findings. Agent-agnostic: every
|
|
107
|
+
* installed version is classified the same way. Pure, so it is unit-testable.
|
|
108
|
+
*/
|
|
109
|
+
export declare function computeOverviewHealth(syncRows: SyncStatusRow[], orphanRows: OrphanRow[], repoBehindMarkers: FetchStatusMarker[]): DoctorVerdict;
|
|
45
110
|
export declare function registerDoctorCommand(program: Command): void;
|