@phnx-labs/agents-cli 1.20.14 → 1.20.16
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 +5 -0
- package/dist/commands/repo.js +22 -1
- package/dist/commands/secrets.js +53 -1
- package/dist/commands/sessions-sync.d.ts +13 -0
- package/dist/commands/sessions-sync.js +73 -0
- package/dist/commands/sessions.js +2 -0
- package/dist/commands/view.js +11 -3
- package/dist/index.js +1 -1
- package/dist/lib/agents.d.ts +11 -0
- package/dist/lib/agents.js +11 -9
- package/dist/lib/browser/service.js +28 -18
- package/dist/lib/daemon.d.ts +19 -0
- package/dist/lib/daemon.js +97 -2
- package/dist/lib/migrate.d.ts +22 -0
- package/dist/lib/migrate.js +99 -1
- package/dist/lib/plugin-marketplace.d.ts +15 -0
- package/dist/lib/plugin-marketplace.js +44 -0
- package/dist/lib/secrets/index.js +20 -0
- package/dist/lib/session/parse.d.ts +2 -0
- package/dist/lib/session/parse.js +168 -2
- package/dist/lib/session/sync/agents.d.ts +46 -0
- package/dist/lib/session/sync/agents.js +94 -0
- package/dist/lib/session/sync/config.d.ts +30 -0
- package/dist/lib/session/sync/config.js +58 -0
- package/dist/lib/session/sync/crdt.d.ts +44 -0
- package/dist/lib/session/sync/crdt.js +119 -0
- package/dist/lib/session/sync/manifest.d.ts +51 -0
- package/dist/lib/session/sync/manifest.js +96 -0
- package/dist/lib/session/sync/r2.d.ts +32 -0
- package/dist/lib/session/sync/r2.js +121 -0
- package/dist/lib/session/sync/sync.d.ts +82 -0
- package/dist/lib/session/sync/sync.js +251 -0
- package/dist/lib/shims.d.ts +1 -1
- package/dist/lib/shims.js +29 -3
- package/dist/lib/state.d.ts +18 -0
- package/dist/lib/state.js +73 -0
- package/dist/lib/teams/parsers.js +159 -1
- package/dist/lib/usage.d.ts +18 -0
- package/dist/lib/usage.js +25 -0
- package/dist/lib/versions.js +30 -13
- package/package.json +2 -1
package/dist/lib/versions.js
CHANGED
|
@@ -25,7 +25,7 @@ import { checkbox, select } from '@inquirer/prompts';
|
|
|
25
25
|
import { getVersionsDir, ensureAgentsDir, readMeta, writeMeta, getCommandsDir, getSkillsDir, getHooksDir, getResolvedRulesDir, getUserRulesDir, getVersionResources, ensureVersionResourcePatterns, getProjectAgentsDir, getPromptcutsPath, getUserPromptcutsPath, getEnabledExtraRepos, getAgentsDir, getUserAgentsDir, getTrashVersionsDir, getActiveRulesPreset } from './state.js';
|
|
26
26
|
import { defaultPatterns, expandPatterns } from './resource-patterns.js';
|
|
27
27
|
import { listResources } from './resources.js';
|
|
28
|
-
import { AGENTS, agentConfigDirName, getAccountEmail, resolveAgentName, formatAgentError } from './agents.js';
|
|
28
|
+
import { AGENTS, agentConfigDirName, getAccountEmail, resolveAgentName, formatAgentError, findInPath } from './agents.js';
|
|
29
29
|
import { discoverPermissionGroups, getActivePermissionPresetName, readPermissionPresetRecipe, PERMISSION_PRESET_ENV_VAR } from './permissions.js';
|
|
30
30
|
import { parseMcpServerConfig } from './mcp.js';
|
|
31
31
|
import { createVersionedAlias, removeVersionedAlias, getConfigSymlinkVersion, ensureClaudeInsideSymlink } from './shims.js';
|
|
@@ -818,6 +818,14 @@ export function getBinaryPath(agent, version) {
|
|
|
818
818
|
catch { }
|
|
819
819
|
return path.join(grokDownloads, `grok-${version}`);
|
|
820
820
|
}
|
|
821
|
+
if (agent === 'droid') {
|
|
822
|
+
// Factory's installer drops a standalone native binary at ~/.local/bin/droid
|
|
823
|
+
// (no npm package, nothing in node_modules/.bin). The binary is global, not
|
|
824
|
+
// per-version — config isolation rides the ~/.factory symlink switch, not a
|
|
825
|
+
// separate binary per version. Mirror the shim's `droid` branch so
|
|
826
|
+
// isVersionInstalled/`agents view` agree with what actually executes.
|
|
827
|
+
return path.join(os.homedir(), '.local', 'bin', 'droid');
|
|
828
|
+
}
|
|
821
829
|
const versionDir = getVersionDir(agent, version);
|
|
822
830
|
return path.join(versionDir, 'node_modules', '.bin', agentConfig.cliCommand);
|
|
823
831
|
}
|
|
@@ -1005,19 +1013,28 @@ export async function installVersion(agent, version, onProgress) {
|
|
|
1005
1013
|
// but `agents view` shows the agent under "Not Managed" because
|
|
1006
1014
|
// listInstalledVersions returns [] — the installer drops the binary in
|
|
1007
1015
|
// ~/.local/bin (or similar) rather than the version's node_modules/.bin.
|
|
1008
|
-
//
|
|
1009
|
-
//
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1016
|
+
//
|
|
1017
|
+
// Agents whose binary is special-cased in getBinaryPath (grok ->
|
|
1018
|
+
// ~/.grok/downloads, droid -> ~/.local/bin/droid) need no symlink — and
|
|
1019
|
+
// creating one is actively harmful: `which <cli>` can resolve to OUR OWN
|
|
1020
|
+
// dispatcher shim, because ~/.agents/.cache/shims sits ahead of ~/.local/bin
|
|
1021
|
+
// on PATH. Symlinking node_modules/.bin/<cli> at the shim makes the shim
|
|
1022
|
+
// exec itself forever. So we skip the resolver-backed agents here AND, for
|
|
1023
|
+
// everyone else, filter the shims dir out of the `which` candidates so the
|
|
1024
|
+
// same race can't bite a non-special-cased installScript agent.
|
|
1025
|
+
if (agent !== 'grok' && agent !== 'droid') {
|
|
1026
|
+
// findInPath is a pure-Node PATH scan that already skips our own shims
|
|
1027
|
+
// dir — so it returns the genuine install, never our dispatcher shim
|
|
1028
|
+
// (which sits ahead of ~/.local/bin on PATH and would otherwise be
|
|
1029
|
+
// captured, producing a self-referential node_modules/.bin/<cli> link
|
|
1030
|
+
// that exec-loops forever).
|
|
1031
|
+
const installedBinary = findInPath(agentConfig.cliCommand);
|
|
1032
|
+
if (installedBinary) {
|
|
1033
|
+
importInstallScriptBinary({ agentId: agent, npmPackage: agentConfig.npmPackage, cliCommand: agentConfig.cliCommand }, installedVersion, installedBinary, versionDir);
|
|
1020
1034
|
}
|
|
1035
|
+
/* If null: binary missing from PATH (install script failed silently) or
|
|
1036
|
+
only our shim is present. Leave the version dir empty so getBinaryPath
|
|
1037
|
+
correctly reports it uninstalled. */
|
|
1021
1038
|
}
|
|
1022
1039
|
createVersionedAlias(agent, installedVersion);
|
|
1023
1040
|
emit('version.install', { agent, version: installedVersion });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@phnx-labs/agents-cli",
|
|
3
|
-
"version": "1.20.
|
|
3
|
+
"version": "1.20.16",
|
|
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",
|
|
@@ -82,6 +82,7 @@
|
|
|
82
82
|
"@types/proper-lockfile": "4.1.4",
|
|
83
83
|
"@xterm/headless": "6.0.0",
|
|
84
84
|
"@zed-industries/agent-client-protocol": "0.4.5",
|
|
85
|
+
"aws4fetch": "1.0.20",
|
|
85
86
|
"chalk": "5.6.2",
|
|
86
87
|
"commander": "15.0.0",
|
|
87
88
|
"croner": "10.0.1",
|