akashcli 4.7.3__tar.gz → 4.7.5__tar.gz
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.
- {akashcli-4.7.3 → akashcli-4.7.5}/PKG-INFO +1 -1
- {akashcli-4.7.3 → akashcli-4.7.5}/akashcli/__init__.py +1 -1
- {akashcli-4.7.3 → akashcli-4.7.5}/akashcli/cli.py +41 -10
- {akashcli-4.7.3 → akashcli-4.7.5}/akashcli.egg-info/PKG-INFO +1 -1
- {akashcli-4.7.3 → akashcli-4.7.5}/pyproject.toml +1 -1
- {akashcli-4.7.3 → akashcli-4.7.5}/README.md +0 -0
- {akashcli-4.7.3 → akashcli-4.7.5}/akashcli/_net.py +0 -0
- {akashcli-4.7.3 → akashcli-4.7.5}/akashcli/auth.py +0 -0
- {akashcli-4.7.3 → akashcli-4.7.5}/akashcli/client.py +0 -0
- {akashcli-4.7.3 → akashcli-4.7.5}/akashcli/config.py +0 -0
- {akashcli-4.7.3 → akashcli-4.7.5}/akashcli/crypto.py +0 -0
- {akashcli-4.7.3 → akashcli-4.7.5}/akashcli/env_manager.py +0 -0
- {akashcli-4.7.3 → akashcli-4.7.5}/akashcli/exceptions.py +0 -0
- {akashcli-4.7.3 → akashcli-4.7.5}/akashcli/exec.py +0 -0
- {akashcli-4.7.3 → akashcli-4.7.5}/akashcli/integrity.py +0 -0
- {akashcli-4.7.3 → akashcli-4.7.5}/akashcli/logger.py +0 -0
- {akashcli-4.7.3 → akashcli-4.7.5}/akashcli/models.py +0 -0
- {akashcli-4.7.3 → akashcli-4.7.5}/akashcli/p2p.py +0 -0
- {akashcli-4.7.3 → akashcli-4.7.5}/akashcli/packages.py +0 -0
- {akashcli-4.7.3 → akashcli-4.7.5}/akashcli/relay.py +0 -0
- {akashcli-4.7.3 → akashcli-4.7.5}/akashcli/restore.py +0 -0
- {akashcli-4.7.3 → akashcli-4.7.5}/akashcli/snapshot_crypto.py +0 -0
- {akashcli-4.7.3 → akashcli-4.7.5}/akashcli/storage.py +0 -0
- {akashcli-4.7.3 → akashcli-4.7.5}/akashcli/terminal.py +0 -0
- {akashcli-4.7.3 → akashcli-4.7.5}/akashcli/updater.py +0 -0
- {akashcli-4.7.3 → akashcli-4.7.5}/akashcli/uploader.py +0 -0
- {akashcli-4.7.3 → akashcli-4.7.5}/akashcli/utils.py +0 -0
- {akashcli-4.7.3 → akashcli-4.7.5}/akashcli.egg-info/SOURCES.txt +0 -0
- {akashcli-4.7.3 → akashcli-4.7.5}/akashcli.egg-info/dependency_links.txt +0 -0
- {akashcli-4.7.3 → akashcli-4.7.5}/akashcli.egg-info/entry_points.txt +0 -0
- {akashcli-4.7.3 → akashcli-4.7.5}/akashcli.egg-info/requires.txt +0 -0
- {akashcli-4.7.3 → akashcli-4.7.5}/akashcli.egg-info/top_level.txt +0 -0
- {akashcli-4.7.3 → akashcli-4.7.5}/setup.cfg +0 -0
|
@@ -2792,7 +2792,7 @@ def agent_list(raw: bool = typer.Option(False, "--json", help="Raw JSON output")
|
|
|
2792
2792
|
|
|
2793
2793
|
|
|
2794
2794
|
def _resolve_agent_id(target_id: str) -> tuple[str, str, str]:
|
|
2795
|
-
"""Resolves short Profile ID (e.g.
|
|
2795
|
+
"""Resolves short Profile ID (e.g. aa23), Client ID, suffix, or name into (profile_id, client_id, agent_name)."""
|
|
2796
2796
|
import json
|
|
2797
2797
|
from pathlib import Path
|
|
2798
2798
|
agents_file = Path.home() / ".akash" / "agents.json"
|
|
@@ -2801,15 +2801,32 @@ def _resolve_agent_id(target_id: str) -> tuple[str, str, str]:
|
|
|
2801
2801
|
try: agents = json.loads(agents_file.read_text())
|
|
2802
2802
|
except Exception: pass
|
|
2803
2803
|
|
|
2804
|
-
|
|
2804
|
+
if not target_id:
|
|
2805
|
+
if agents:
|
|
2806
|
+
first_pid = next(reversed(list(agents.keys())))
|
|
2807
|
+
return first_pid, agents[first_pid]["client_id"], agents[first_pid].get("name", "Agent")
|
|
2808
|
+
return "", "", "Agent"
|
|
2809
|
+
|
|
2810
|
+
# 1. Match by Profile ID (e.g. aa23)
|
|
2805
2811
|
if target_id in agents:
|
|
2806
2812
|
return target_id, agents[target_id]["client_id"], agents[target_id].get("name", "Agent")
|
|
2807
2813
|
|
|
2808
|
-
# 2. Match by Client ID
|
|
2814
|
+
# 2. Match by exact Client ID
|
|
2809
2815
|
for pid, d in agents.items():
|
|
2810
2816
|
if d.get("client_id") == target_id:
|
|
2811
2817
|
return pid, target_id, d.get("name", "Agent")
|
|
2812
2818
|
|
|
2819
|
+
# 3. Match by Client ID suffix (e.g. d06f) or prefix
|
|
2820
|
+
for pid, d in agents.items():
|
|
2821
|
+
cid = d.get("client_id", "")
|
|
2822
|
+
if cid.endswith(target_id) or cid.startswith(target_id) or (len(target_id) >= 4 and target_id in cid):
|
|
2823
|
+
return pid, cid, d.get("name", "Agent")
|
|
2824
|
+
|
|
2825
|
+
# 4. Match by Name (case-insensitive)
|
|
2826
|
+
for pid, d in agents.items():
|
|
2827
|
+
if d.get("name", "").lower() == target_id.lower():
|
|
2828
|
+
return pid, d.get("client_id", ""), d.get("name", "Agent")
|
|
2829
|
+
|
|
2813
2830
|
return target_id, target_id, "Agent"
|
|
2814
2831
|
|
|
2815
2832
|
|
|
@@ -3058,13 +3075,15 @@ def agent_create(
|
|
|
3058
3075
|
params = urllib.parse.urlencode({"cid": cid, "csec": csec, "dfp": dev_fp})
|
|
3059
3076
|
mcp_url = f"{base}/mcp?{params}"
|
|
3060
3077
|
|
|
3078
|
+
gemini_mcp_url = f"{base}/mcp"
|
|
3079
|
+
|
|
3061
3080
|
_p()
|
|
3062
3081
|
_ok(f"Agent Credentials Issued & Saved Locally: {_cy(name)}")
|
|
3063
3082
|
print(f" {_DM}Profile ID :{_RS} {_C}{profile_id}{_RS}")
|
|
3064
3083
|
print(f" {_DM}Client ID :{_RS} {_ye(cid)}")
|
|
3065
3084
|
print(f" {_DM}Client Secret :{_RS} {_W}{csec}{_RS}")
|
|
3066
|
-
print(f" {_DM}
|
|
3067
|
-
print(f" {_DM}
|
|
3085
|
+
print(f" {_DM}Google Gemini :{_RS} {_cy(gemini_mcp_url)} {_dim('(Standard OAuth 2.0)')}")
|
|
3086
|
+
print(f" {_DM}Cursor / Claude :{_RS} {_dim(mcp_url)}")
|
|
3068
3087
|
print(f" {_DM}Expires At :{_RS} {_dim(d['expires_at'][:19].replace('T', ' '))} UTC ({ttl} days)")
|
|
3069
3088
|
_p()
|
|
3070
3089
|
print(" " + _C + "Claude Desktop / Cursor" + _RS + " " + _dim("(config.json)") + ":")
|
|
@@ -3308,15 +3327,19 @@ def mcp_serve(
|
|
|
3308
3327
|
except Exception: agents = {}
|
|
3309
3328
|
|
|
3310
3329
|
if not profile_id and not client_id and agents:
|
|
3311
|
-
profile_id =
|
|
3330
|
+
profile_id = next(reversed(list(agents.keys())))
|
|
3312
3331
|
|
|
3313
|
-
|
|
3314
|
-
|
|
3332
|
+
resolved_pid, resolved_cid, pname = _resolve_agent_id(profile_id or client_id or "")
|
|
3333
|
+
cached = agents.get(resolved_pid, {})
|
|
3334
|
+
cid = client_id or resolved_cid or cached.get("client_id") or os.getenv("AKASH_CLIENT_ID")
|
|
3315
3335
|
csec = client_secret or cached.get("client_secret") or os.getenv("AKASH_CLIENT_SECRET")
|
|
3316
|
-
pname = cached.get("name",
|
|
3336
|
+
pname = cached.get("name", pname)
|
|
3337
|
+
profile_id = resolved_pid or profile_id
|
|
3317
3338
|
|
|
3318
3339
|
if not cid or not csec:
|
|
3319
|
-
|
|
3340
|
+
avail = ", ".join([f"{k} ({v.get('name', 'Agent')})" for k, v in agents.items()]) if agents else "none"
|
|
3341
|
+
_err(f"Missing credentials for '{profile_id or client_id or 'default'}'. Available profiles: {avail}")
|
|
3342
|
+
_err("Provide a valid --id <ID> or create one: akash mcp create -n Dev -r @coder")
|
|
3320
3343
|
raise typer.Exit(1)
|
|
3321
3344
|
|
|
3322
3345
|
_, base = _resolve_client(url or cached.get("url"), require_key=False, silent=True)
|
|
@@ -3637,6 +3660,14 @@ def mcp_share(
|
|
|
3637
3660
|
|
|
3638
3661
|
show_all = not codex and not claude
|
|
3639
3662
|
|
|
3663
|
+
if show_all:
|
|
3664
|
+
gemini_url = base + "/mcp"
|
|
3665
|
+
print(" " + _C + "For Google Gemini (Web & Extensions)" + _RS + ":")
|
|
3666
|
+
print(" " + _DM + "MCP Server URL : " + _RS + _cy(gemini_url))
|
|
3667
|
+
print(" " + _dim(" (Standard OAuth 2.0 with instant one-click approval)"))
|
|
3668
|
+
print(" " + _GR + "──────────────────────────────────────────────────" + _RS)
|
|
3669
|
+
_p()
|
|
3670
|
+
|
|
3640
3671
|
if show_all or codex:
|
|
3641
3672
|
print(" " + _C + "For Codex CLI / Desktop" + _RS + " " + _dim("(~/.codex/config.toml)") + ":")
|
|
3642
3673
|
print(" " + _DM + "Option A: Same Device (Termux / Localhost)" + _RS)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|