@phnx-labs/agents-cli 1.19.2 → 1.20.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/CHANGELOG.md +140 -0
- package/README.md +72 -12
- package/dist/browser.js +0 -0
- package/dist/commands/browser.js +88 -16
- package/dist/commands/cli.d.ts +14 -0
- package/dist/commands/cli.js +244 -0
- package/dist/commands/cloud.js +1 -1
- package/dist/commands/commands.js +27 -10
- package/dist/commands/computer.js +18 -1
- package/dist/commands/doctor.d.ts +1 -1
- package/dist/commands/doctor.js +2 -2
- package/dist/commands/exec.js +38 -18
- package/dist/commands/factory.d.ts +3 -14
- package/dist/commands/factory.js +3 -3
- package/dist/commands/feedback.d.ts +7 -0
- package/dist/commands/feedback.js +89 -0
- package/dist/commands/helper.d.ts +12 -0
- package/dist/commands/helper.js +87 -0
- package/dist/commands/hooks.js +89 -10
- package/dist/commands/mcp.js +166 -10
- package/dist/commands/packages.js +196 -27
- package/dist/commands/permissions.js +21 -6
- package/dist/commands/plugins.js +11 -4
- package/dist/commands/profiles.d.ts +8 -0
- package/dist/commands/profiles.js +118 -5
- package/dist/commands/prune.js +39 -160
- package/dist/commands/pull.js +58 -5
- package/dist/commands/routines.js +107 -14
- package/dist/commands/rules.js +8 -4
- package/dist/commands/secrets-migrate.d.ts +24 -0
- package/dist/commands/secrets-migrate.js +198 -0
- package/dist/commands/secrets-sync.d.ts +11 -0
- package/dist/commands/secrets-sync.js +155 -0
- package/dist/commands/secrets.js +79 -46
- package/dist/commands/sessions.d.ts +28 -0
- package/dist/commands/sessions.js +98 -33
- package/dist/commands/setup.d.ts +1 -0
- package/dist/commands/setup.js +37 -28
- package/dist/commands/skills.js +25 -8
- package/dist/commands/subagents.js +69 -49
- package/dist/commands/teams.js +61 -10
- package/dist/commands/utils.d.ts +33 -0
- package/dist/commands/utils.js +139 -0
- package/dist/commands/versions.d.ts +4 -3
- package/dist/commands/versions.js +134 -130
- package/dist/commands/view.d.ts +6 -0
- package/dist/commands/view.js +175 -19
- package/dist/commands/workflows.js +29 -6
- package/dist/computer.js +0 -0
- package/dist/index.js +38 -6
- package/dist/lib/acp/client.js +6 -1
- package/dist/lib/acp/harnesses.js +8 -0
- package/dist/lib/agents.d.ts +4 -0
- package/dist/lib/agents.js +125 -34
- package/dist/lib/auto-pull-worker.js +18 -1
- package/dist/lib/browser/cdp.d.ts +8 -1
- package/dist/lib/browser/cdp.js +40 -3
- package/dist/lib/browser/chrome.d.ts +13 -0
- package/dist/lib/browser/chrome.js +46 -3
- package/dist/lib/browser/domain-skills.d.ts +51 -0
- package/dist/lib/browser/domain-skills.js +157 -0
- package/dist/lib/browser/drivers/local.js +45 -4
- package/dist/lib/browser/drivers/ssh.js +2 -2
- package/dist/lib/browser/ipc.d.ts +8 -1
- package/dist/lib/browser/ipc.js +37 -28
- package/dist/lib/browser/profiles.d.ts +16 -3
- package/dist/lib/browser/profiles.js +44 -4
- package/dist/lib/browser/service.d.ts +3 -0
- package/dist/lib/browser/service.js +40 -5
- package/dist/lib/browser/types.d.ts +11 -4
- package/dist/lib/cli-resources.d.ts +137 -0
- package/dist/lib/cli-resources.js +477 -0
- package/dist/lib/cloud/factory.d.ts +1 -1
- package/dist/lib/cloud/factory.js +1 -1
- package/dist/lib/cloud/rush.js +5 -5
- package/dist/lib/command-skills.js +0 -2
- package/dist/lib/computer-rpc.d.ts +3 -0
- package/dist/lib/computer-rpc.js +53 -0
- package/dist/lib/daemon.js +20 -0
- package/dist/lib/events.d.ts +16 -2
- package/dist/lib/events.js +33 -2
- package/dist/lib/exec.d.ts +42 -13
- package/dist/lib/exec.js +127 -33
- package/dist/lib/help.js +11 -5
- package/dist/lib/hooks/cache.d.ts +38 -0
- package/dist/lib/hooks/cache.js +242 -0
- package/dist/lib/hooks/profile.d.ts +33 -0
- package/dist/lib/hooks/profile.js +129 -0
- package/dist/lib/hooks.d.ts +0 -10
- package/dist/lib/hooks.js +246 -11
- package/dist/lib/mcp.d.ts +15 -0
- package/dist/lib/mcp.js +46 -0
- package/dist/lib/migrate.js +1 -1
- package/dist/lib/overdue.d.ts +26 -0
- package/dist/lib/overdue.js +101 -0
- package/dist/lib/permissions.d.ts +13 -0
- package/dist/lib/permissions.js +55 -1
- package/dist/lib/plugin-marketplace.js +1 -1
- package/dist/lib/plugins.js +15 -1
- package/dist/lib/profiles-presets.d.ts +26 -0
- package/dist/lib/profiles-presets.js +216 -0
- package/dist/lib/profiles.d.ts +34 -0
- package/dist/lib/profiles.js +112 -1
- package/dist/lib/resources/mcp.js +37 -0
- package/dist/lib/resources.d.ts +1 -1
- package/dist/lib/rotate.js +10 -4
- package/dist/lib/routines-format.d.ts +47 -0
- package/dist/lib/routines-format.js +194 -0
- package/dist/lib/routines.d.ts +8 -2
- package/dist/lib/routines.js +34 -14
- package/dist/lib/runner.js +83 -15
- package/dist/lib/scheduler.js +8 -1
- 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/Agents CLI.app/Contents/_CodeSignature/CodeResources +1 -9
- package/dist/lib/secrets/bundles.d.ts +34 -17
- package/dist/lib/secrets/bundles.js +210 -36
- package/dist/lib/secrets/index.d.ts +49 -30
- package/dist/lib/secrets/index.js +126 -115
- package/dist/lib/secrets/install-helper.d.ts +45 -0
- package/dist/lib/secrets/install-helper.js +165 -0
- package/dist/lib/secrets/linux.js +4 -4
- package/dist/lib/secrets/sync.d.ts +56 -0
- package/dist/lib/secrets/sync.js +180 -0
- package/dist/lib/session/active.d.ts +8 -0
- package/dist/lib/session/active.js +3 -2
- package/dist/lib/session/db.d.ts +0 -4
- package/dist/lib/session/db.js +0 -26
- package/dist/lib/session/parse.d.ts +1 -0
- package/dist/lib/session/parse.js +44 -0
- package/dist/lib/session/render.js +4 -4
- package/dist/lib/session/types.d.ts +2 -2
- package/dist/lib/session/types.js +1 -1
- package/dist/lib/shims.d.ts +5 -2
- package/dist/lib/shims.js +70 -38
- package/dist/lib/state.d.ts +14 -2
- package/dist/lib/state.js +51 -20
- package/dist/lib/teams/agents.d.ts +5 -4
- package/dist/lib/teams/agents.js +48 -22
- package/dist/lib/teams/api.d.ts +2 -1
- package/dist/lib/teams/api.js +4 -3
- package/dist/lib/teams/parsers.d.ts +1 -1
- package/dist/lib/teams/parsers.js +153 -3
- package/dist/lib/teams/summarizer.js +18 -2
- package/dist/lib/teams/worktree.js +14 -3
- package/dist/lib/types.d.ts +63 -4
- package/dist/lib/types.js +8 -3
- package/dist/lib/usage.d.ts +27 -2
- package/dist/lib/usage.js +100 -17
- package/dist/lib/versions.d.ts +45 -3
- package/dist/lib/versions.js +455 -60
- package/package.json +15 -14
- package/scripts/install-helper.js +97 -0
- package/scripts/postinstall.js +16 -0
- package/dist/lib/secrets/Agents CLI.app/Contents/embedded.provisionprofile +0 -0
- package/npm-shrinkwrap.json +0 -3162
package/dist/lib/versions.d.ts
CHANGED
|
@@ -48,12 +48,35 @@ export declare function getAvailableResources(cwd?: string): AvailableResources;
|
|
|
48
48
|
export declare function getActuallySyncedResources(agent: AgentId, version: string, options?: {
|
|
49
49
|
cwd?: string;
|
|
50
50
|
}): AvailableResources;
|
|
51
|
+
/** Resource names that only exist in the project's `.agents/` layer, grouped by kind. */
|
|
52
|
+
export interface ProjectOnlyResources {
|
|
53
|
+
commands: Set<string>;
|
|
54
|
+
skills: Set<string>;
|
|
55
|
+
hooks: Set<string>;
|
|
56
|
+
subagents: Set<string>;
|
|
57
|
+
plugins: Set<string>;
|
|
58
|
+
workflows: Set<string>;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Names that exist ONLY in the project's `.agents/` layer (no matching entry in
|
|
62
|
+
* user/system/extra layers). Sync intentionally skips project-layer commands,
|
|
63
|
+
* skills, hooks, subagents, plugins, and workflows for security — see the
|
|
64
|
+
* defense comments above each sync branch in syncResourcesToVersion. Without
|
|
65
|
+
* this filter, those names would forever appear in the "New resources" diff
|
|
66
|
+
* because they live in `available` but never reach `actuallySynced`.
|
|
67
|
+
*/
|
|
68
|
+
export declare function getProjectOnlyResources(cwd?: string): ProjectOnlyResources;
|
|
51
69
|
/**
|
|
52
70
|
* Compare available resources with what's ACTUALLY synced to version home.
|
|
53
71
|
* Returns only NEW resources that haven't been synced yet.
|
|
54
72
|
* Source of truth: the actual files/config, NOT agents.yaml tracking.
|
|
73
|
+
*
|
|
74
|
+
* `projectOnly` (recommended): the result of `getProjectOnlyResources(cwd)`.
|
|
75
|
+
* Names listed there are filtered out for kinds that sync intentionally
|
|
76
|
+
* excludes the project layer — otherwise they would re-appear as "new"
|
|
77
|
+
* on every run and "Yes, sync all new" would silently do nothing for them.
|
|
55
78
|
*/
|
|
56
|
-
export declare function getNewResources(available: AvailableResources, actuallySynced: AvailableResources): AvailableResources;
|
|
79
|
+
export declare function getNewResources(available: AvailableResources, actuallySynced: AvailableResources, projectOnly?: ProjectOnlyResources): AvailableResources;
|
|
57
80
|
/**
|
|
58
81
|
* Check if there are any new resources to sync.
|
|
59
82
|
* When version is provided, uses version-specific capability checks.
|
|
@@ -63,7 +86,7 @@ export declare function hasNewResources(diff: AvailableResources, agent?: AgentI
|
|
|
63
86
|
* Prompt user to select which NEW resources to sync.
|
|
64
87
|
* Only shows resources that haven't been synced yet.
|
|
65
88
|
*/
|
|
66
|
-
export declare function promptNewResourceSelection(agent: AgentId, newResources: AvailableResources): Promise<ResourceSelection | null>;
|
|
89
|
+
export declare function promptNewResourceSelection(agent: AgentId, newResources: AvailableResources, version?: string): Promise<ResourceSelection | null>;
|
|
67
90
|
/**
|
|
68
91
|
* Prompt user to select which resources to sync from ~/.agents/.
|
|
69
92
|
* Returns the selection, or null if user cancels.
|
|
@@ -118,7 +141,7 @@ export declare function listInstalledVersions(agent: AgentId): string[];
|
|
|
118
141
|
* List every version directory for an agent, including ones missing the
|
|
119
142
|
* binary (typically home-only leftovers from a prior `removeVersion`).
|
|
120
143
|
*
|
|
121
|
-
* Used by `agents prune` to surface stale installs that the regular
|
|
144
|
+
* Used by `agents prune cleanup` to surface stale installs that the regular
|
|
122
145
|
* `listInstalledVersions` filters out. Do NOT use elsewhere — every other
|
|
123
146
|
* call site assumes a working binary.
|
|
124
147
|
*/
|
|
@@ -163,6 +186,14 @@ export declare function softDeleteVersionDir(agent: AgentId, version: string): s
|
|
|
163
186
|
* Nothing is hard-deleted.
|
|
164
187
|
*/
|
|
165
188
|
export declare function removeVersion(agent: AgentId, version: string): boolean;
|
|
189
|
+
/**
|
|
190
|
+
* Print the standard footer after one or more versions were soft-deleted to
|
|
191
|
+
* trash. Reminds the user that sessions stay readable and how to restore.
|
|
192
|
+
*/
|
|
193
|
+
export declare function printTrashFooter(moved: Array<{
|
|
194
|
+
agent: AgentId;
|
|
195
|
+
version: string;
|
|
196
|
+
}>): void;
|
|
166
197
|
/**
|
|
167
198
|
* Remove all versions of an agent. Preserves each version's `home/` directory
|
|
168
199
|
* so conversation history is never deleted; the per-version folders (now
|
|
@@ -277,6 +308,17 @@ export interface InstalledAgentTargetResult {
|
|
|
277
308
|
directAgents: AgentId[];
|
|
278
309
|
versionSelections: Map<AgentId, string[]>;
|
|
279
310
|
}
|
|
311
|
+
/**
|
|
312
|
+
* Thrown when the user references an agent@version that is not installed.
|
|
313
|
+
* Carries the parsed (agentId, version) so callers can react — e.g. prompt
|
|
314
|
+
* to install it on demand — without having to parse the error message.
|
|
315
|
+
*/
|
|
316
|
+
export declare class VersionNotInstalledError extends Error {
|
|
317
|
+
readonly agentId: AgentId;
|
|
318
|
+
readonly version: string;
|
|
319
|
+
readonly installedVersions: readonly string[];
|
|
320
|
+
constructor(agentId: AgentId, version: string, installedVersions: readonly string[]);
|
|
321
|
+
}
|
|
280
322
|
/**
|
|
281
323
|
* Resolve a comma-separated --agents list into concrete version selections.
|
|
282
324
|
* Bare agents target the default version, or the newest installed version when no default exists.
|