vyra-code 0.2.42__tar.gz → 0.2.45__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.
@@ -0,0 +1,20 @@
1
+ Metadata-Version: 2.4
2
+ Name: vyra-code
3
+ Version: 0.2.45
4
+ Summary: Vyra Code: assistente de IA no terminal (Termux, Linux, macOS e Windows) (chat em streaming, tarefas, memória, projetos e terminal remoto)
5
+ License: Proprietary
6
+ Keywords: termux,ai,assistant,cli,android,llm
7
+ Classifier: Environment :: Console
8
+ Classifier: Intended Audience :: Developers
9
+ Classifier: License :: Other/Proprietary License
10
+ Classifier: Operating System :: OS Independent
11
+ Classifier: Operating System :: Microsoft :: Windows
12
+ Classifier: Operating System :: MacOS
13
+ Classifier: Operating System :: POSIX :: Linux
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Topic :: Software Development
16
+ Classifier: Topic :: Terminals
17
+ Requires-Python: >=3.9
18
+ Description-Content-Type: text/markdown
19
+ Requires-Dist: websocket-client>=1.6
20
+ Provides-Extra: term
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "vyra-code"
7
- version = "0.2.42"
7
+ version = "0.2.45"
8
8
  description = "Vyra Code: assistente de IA no terminal (Termux, Linux, macOS e Windows) (chat em streaming, tarefas, memória, projetos e terminal remoto)"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
@@ -74,9 +74,12 @@ def default_home(env: dict | None = None, win: bool | None = None) -> str:
74
74
  return new
75
75
 
76
76
 
77
- VERSION = "0.2.42"
77
+ VERSION = "0.2.45"
78
78
  DEFAULT_BACKEND = "https://aihub-api.vyntrica.com"
79
79
  CHANGELOG = {
80
+ "0.2.45": ["corrige o vyra-browse com 400 invalid url: a IA às vezes escreve a URL entre < > (autolink do Markdown) e o Worker só aceita a URL nua; o cliente agora tira os colchetes (e extrai a URL se vier dentro de um link) antes de mandar"],
81
+ "0.2.44": ["update sem cache: a leitura do PyPI fura o cache do CDN (cache-buster + no-cache) e, se aparecer versão mais nova no meio da instalação, uma só execução converge para ela — não precisa rodar o comando duas vezes", "tokens ao vivo: a barra embaixo da resposta mostra a contagem de tokens crescendo enquanto a IA responde (estimativa, com ~; o valor exato continua no rodapé depois)", "caixa de mensagem permanente: a barra fica sempre embaixo e a resposta sai acima dela, inclusive enquanto a IA responde; o editor redesenha do zero quando o terminal muda de tamanho (teclado abrindo/fechando no Termux), sem região de rolagem fixa"],
82
+ "0.2.43": ["a busca na web e o navegador ficam sempre ligados para a IA (o comando /web on|off foi removido); as fontes continuam aparecendo na resposta"],
80
83
  "0.2.42": ["caixa de entrada fixa removida: quebrava de verdade no Termux sempre que o teclado abria/fechava (o terminal muda de tamanho e a região fixa saía do lugar, com trechos da conversa sumindo); volta ao campo de digitação simples de antes da 0.2.40"],
81
84
  "0.2.41": ["cores da interface agora seguem a paleta da logo (prata e grafite-azulado), em vez do laranja do AI Hub Code; sucesso/aviso/falha continuam verde/amarelo/vermelho"],
82
85
  "0.2.40": ["caixa de entrada fixa: a mensagem fica sempre embaixo, inclusive enquanto a IA responde", "spinner de espera mais sóbrio (uma linha, sem o anel animado)", "blocos de ferramenta (vyra-run/browse) com cabeçalho ●, comando │ e resultado ⎿"],
@@ -984,10 +987,30 @@ SANDBOX_COOLDOWN = 300.0
984
987
  SANDBOX_INFRA = ("504", "503", "502", "sandbox_timeout", "executor_offline")
985
988
 
986
989
 
990
+ def _clean_browse_url(text: str) -> str:
991
+ """Limpa a URL do bloco aihub-browse antes de mandar ao servidor.
992
+
993
+ A IA às vezes escreve a URL no formato de autolink do Markdown (`<https://…>`) ou
994
+ dentro de um link (`[texto](https://…)`); o Worker só aceita a URL nua e devolve
995
+ 400 "invalid url" com os colchetes. Tira os espaços, os `< >` e, se sobrar texto
996
+ em volta, extrai a primeira URL.
997
+ """
998
+ t = (text or "").strip()
999
+ if t.startswith("<") and t.endswith(">") and len(t) > 2:
1000
+ t = t[1:-1].strip()
1001
+ if not re.fullmatch(r"https?://\S+", t, re.I):
1002
+ m = re.search(r"https?://[^\s<>\]\)]+", t, re.I)
1003
+ if m:
1004
+ t = m.group(0).rstrip(".,;")
1005
+ return t
1006
+
1007
+
987
1008
  def run_tool(c: "Client", kind: str, text: str, now: Callable[[], float] = time.time) -> tuple[int, str]:
988
1009
  """Executa a ferramenta no sandbox do usuário (servidor). Nunca roda nada neste aparelho."""
1010
+ if kind == "browse":
1011
+ text = _clean_browse_url(text)
989
1012
  if now() < SANDBOX_DOWN["until"]:
990
- return 125, "ferramenta indisponível: o sandbox falhou há pouco; não tente de novo agora. Responda com o que sabe ou use a pesquisa na web (/web)."
1013
+ return 125, "ferramenta indisponível: o sandbox falhou há pouco; não tente de novo agora. Responda com o que sabe ou pesquise na web (já está sempre ligada)."
991
1014
  try:
992
1015
  r = c.ok("POST", "/v1/sandbox/exec", {"kind": TOOL_KIND[kind], "input": text})
993
1016
  SANDBOX_DOWN["slow"] = 0
@@ -999,10 +1022,10 @@ def run_tool(c: "Client", kind: str, text: str, now: Callable[[], float] = time.
999
1022
  if SANDBOX_DOWN["slow"] >= 2: # dois seguidos: pode estar travado; para de insistir por um tempo
1000
1023
  SANDBOX_DOWN["until"] = now() + SANDBOX_COOLDOWN
1001
1024
  return 124, ("o comando passou do limite de tempo do sandbox (~90 s) e foi interrompido. Isso NÃO indica erro do repositório nem da rede: "
1002
- "divida em etapas menores (ex.: git clone --depth 1 --single-branch, baixar só o necessário) ou use /web. Processos em segundo plano não sobrevivem ao fim do comando.")
1025
+ "divida em etapas menores (ex.: git clone --depth 1 --single-branch, baixar só o necessário) ou pesquise na web. Processos em segundo plano não sobrevivem ao fim do comando.")
1003
1026
  if any(k in msg for k in SANDBOX_INFRA):
1004
1027
  SANDBOX_DOWN["until"] = now() + SANDBOX_COOLDOWN
1005
- return 125, "ferramenta indisponível: " + redact(e) + ". Dica: /web liga a pesquisa na internet."
1028
+ return 125, "ferramenta indisponível: " + redact(e) + ". Dica: a pesquisa na web já está sempre ligada."
1006
1029
 
1007
1030
 
1008
1031
  # --- doctor: a IA investiga o sistema e repara (dentro do vyra) --------------------------------------
@@ -1873,8 +1896,17 @@ PYPI_DIST = "vyra-code"
1873
1896
 
1874
1897
 
1875
1898
  def pypi_latest(opener: Callable[..., Any] = urllib.request.urlopen) -> str | None:
1899
+ """Versão mais recente no PyPI, sem cache.
1900
+
1901
+ O JSON do PyPI passa por CDN e pode vir desatualizado: sem o cache-buster a
1902
+ primeira execução do `vyra update` via a versão velha (e só atualizava de
1903
+ verdade na segunda execução). O `?_=<epoch>` muda a chave do cache e os
1904
+ cabeçalhos pedem para não usar cópia guardada.
1905
+ """
1906
+ url = "https://pypi.org/pypi/" + PYPI_DIST + "/json?_=" + str(int(time.time()))
1907
+ req = urllib.request.Request(url, headers={"Cache-Control": "no-cache", "Pragma": "no-cache"})
1876
1908
  try:
1877
- with opener("https://pypi.org/pypi/" + PYPI_DIST + "/json", timeout=10) as r:
1909
+ with opener(req, timeout=10) as r:
1878
1910
  v = json.loads(r.read().decode()).get("info", {}).get("version", "")
1879
1911
  except (OSError, ValueError, urllib.error.URLError):
1880
1912
  return None
@@ -1950,27 +1982,47 @@ def cmd_update(c: Client, a: argparse.Namespace, out: Callable[[str], None], tty
1950
1982
  out("")
1951
1983
  out(f" Versão instalada: {VERSION}" + (f" · disponível: {paint(latest, BOLD, color=color)}" if latest else " · não consegui consultar o PyPI"))
1952
1984
  return 0 if latest else 1
1953
- def install() -> tuple[bool, str]:
1985
+ verified: list[str] = [] # versão instalada confirmada por install(), sem nova leitura
1986
+
1987
+ def install(target: str | None) -> tuple[bool, str]:
1954
1988
  """O índice do PyPI pode demorar um pouco para enxergar uma versão recém-publicada: tenta de novo."""
1955
1989
  res: tuple[bool, str] = (False, "")
1956
1990
  for i in range(4):
1957
- res = pip_upgrade(latest)
1991
+ res = pip_upgrade(target)
1958
1992
  info = installed_info() if res[0] else None
1959
- if res[0] and (not latest or (info and vtuple(info["v"]) >= vtuple(latest))):
1993
+ if res[0] and (not target or (info and vtuple(info["v"]) >= vtuple(target))):
1994
+ if info:
1995
+ verified.append(info["v"])
1960
1996
  return True, ""
1961
- if res[0] and latest:
1997
+ if res[0] and target:
1962
1998
  res = (False, "O PyPI ainda não liberou a versão nova. Tente de novo em 1 minuto.")
1963
1999
  if i < 3:
1964
2000
  sleep(8)
1965
2001
  return res
1966
2002
 
1967
- ok, res, _ = run_step(f"Instalando {latest}" if latest else "Instalando a versão mais recente", install, out, tty, color, lambda r: bool(r[0]))
2003
+ ok, res, _ = run_step(f"Instalando {latest}" if latest else "Instalando a versão mais recente", lambda: install(latest), out, tty, color, lambda r: bool(r[0]))
1968
2004
  if not ok:
1969
2005
  out("")
1970
2006
  for ln in (res[1] or "erro desconhecido").splitlines():
1971
2007
  out(" " + paint(ln, DIM, color=color))
1972
2008
  out(" Tente manualmente: pip install -U " + PYPI_DIST)
1973
2009
  return 1
2010
+ # Sem cache, uma só execução converge para a versão mais recente: a primeira
2011
+ # leitura do PyPI pode ter vindo de um espelho/CDN desatualizado, então confere
2012
+ # de novo (sem cache) e, se apareceu versão mais nova nesse meio-tempo, instala
2013
+ # também — em vez de o dono ter de rodar o comando uma segunda vez.
2014
+ for _ in range(2):
2015
+ fresh = pypi_latest()
2016
+ cur = verified[-1] if verified else ""
2017
+ if not fresh or not cur or vtuple(fresh) <= vtuple(cur):
2018
+ break
2019
+ ok, res, _ = run_step(f"Instalando {fresh}", lambda: install(fresh), out, tty, color, lambda r: bool(r[0]))
2020
+ if not ok:
2021
+ out("")
2022
+ for ln in (res[1] or "erro desconhecido").splitlines():
2023
+ out(" " + paint(ln, DIM, color=color))
2024
+ out(" Tente manualmente: pip install -U " + PYPI_DIST)
2025
+ return 1
1974
2026
  info = installed_info()
1975
2027
  new_v = (info or {}).get("v") or latest or "?"
1976
2028
  out("")
@@ -2325,20 +2377,24 @@ class LivePanel:
2325
2377
 
2326
2378
  Fica abaixo do cursor e é redesenhado a cada ~80 ms; o texto da resposta continua saindo acima dele.
2327
2379
  `think` = anel prateado girando (respondendo/pesquisando). `run` = arco-íris girando (executando comandos).
2380
+ `compact` = só uma linha de status (sem o avatar grande): é a barra ao vivo do chat normal,
2381
+ com o verbo, o tempo e a contagem de tokens (ao vivo, via `tok_fn`).
2328
2382
  """
2329
2383
 
2330
2384
  HEIGHT = 7
2331
2385
 
2332
2386
  def __init__(self, enabled: bool, color: bool = True, tc: bool | None = None, col_fn: Callable[[], int] = lambda: 0,
2333
- write: Callable[[str], Any] | None = None):
2387
+ write: Callable[[str], Any] | None = None, compact: bool = False,
2388
+ tok_fn: Callable[[], str] | None = None):
2334
2389
  self.enabled, self.color, self.tc, self.col_fn = enabled, color, tc, col_fn
2335
2390
  self.write = write or (lambda s: (sys.stdout.write(s), sys.stdout.flush()))
2336
2391
  self.lock = threading.RLock()
2337
2392
  self.mode = "think"
2393
+ self.compact, self.tok_fn = compact, tok_fn
2338
2394
  self._stop, self._t, self._t0, self._i = threading.Event(), None, 0.0, 0
2339
2395
 
2340
2396
  @staticmethod
2341
- def status_lines(mode: str, i: int, elapsed: float, color: bool = True) -> list[str]:
2397
+ def status_lines(mode: str, i: int, elapsed: float, color: bool = True, tok: str = "") -> list[str]:
2342
2398
  verbs = RUN_VERBS if mode == "run" else VERBS
2343
2399
  label = verbs[int(elapsed // 3) % len(verbs)] + "…"
2344
2400
  star = STARS[i % len(STARS)]
@@ -2349,9 +2405,15 @@ class LivePanel:
2349
2405
  hot = (i // 2) % (len(label) + 6)
2350
2406
  text = "".join(paint(ch, BOLD, color=color) if abs(j - hot) <= 1 else paint(ch, ACCENT_SOFT, color=color) for j, ch in enumerate(label))
2351
2407
  head = paint(star, ACCENT, color=color)
2352
- return [f"{head} {text}", paint(t("spin_hint", s=int(elapsed)), DIM, color=color)]
2408
+ first = f"{head} {text}"
2409
+ if tok:
2410
+ first += " " + paint("· " + tok, DIM, color=color)
2411
+ return [first, paint(t("spin_hint", s=int(elapsed)), DIM, color=color)]
2353
2412
 
2354
2413
  def draw_string(self, i: int, elapsed: float, col: int) -> str:
2414
+ if self.compact:
2415
+ st = self.status_lines(self.mode, i, elapsed, self.color, self.tok_fn() if self.tok_fn else "")
2416
+ return "\n\r " + st[0] + " " + st[1] + "\x1b[K" + f"\x1b[1A\x1b[{col + 1}G"
2355
2417
  av = render_mini(self.mode, (i * 0.045) % 1.0, self.color, self.tc)
2356
2418
  st = self.status_lines(self.mode, i, elapsed, self.color)
2357
2419
  w = len(MINI_BASE[0])
@@ -2877,8 +2939,8 @@ def render_log(log: list[dict], n: int, width: int, color: bool = True) -> list[
2877
2939
 
2878
2940
 
2879
2941
  _SLASH_SPEC = [
2880
- ("/help", "", "c_help"), ("/model", "[<n>|<id>|auto]", "c_model"), ("/clear", "", "c_clear"), ("/compact", "", "c_compact"), ("/loop", "<tarefa>", "c_loop"), ("/log", "[n]", "c_log"), ("/web", "[on|off]", "c_web"),
2881
- ("/pesquisar", "<texto>", "c_pesq"), ("/tasks", "[list|new|run|watch]", "c_tasks"), ("/memory", "[list|add|search|rm]", "c_memory"),
2942
+ ("/help", "", "c_help"), ("/model", "[<n>|<id>|auto]", "c_model"), ("/clear", "", "c_clear"), ("/compact", "", "c_compact"), ("/loop", "<tarefa>", "c_loop"), ("/log", "[n]", "c_log"),
2943
+ ("/tasks", "[list|new|run|watch]", "c_tasks"), ("/memory", "[list|add|search|rm]", "c_memory"),
2882
2944
  ("/projects", "[list|add|rm]", "c_projects"), ("/skills", "", "c_skills"), ("/skill", "<nome>|off", "c_skill"), ("/suggest", "<texto>", "c_suggest"), ("/support", "<texto>", "c_support"), ("/status", "", "c_status"),
2883
2945
  ("/avatar", "[think|run]", "c_avatar"), ("/term", "", "c_term"), ("/effort", "[low|medium|high|xhigh|max]", "c_effort"), ("/sandbox", "[reset]", "c_sandbox"), ("/usage", "", "c_usage"), ("/file", "<caminho>|clear", "c_file"), ("/doctor", "", "c_doctor"), ("/remember", "[<texto>|auto on|off]", "c_remember"), ("/lang", "[<código>]", "c_lang"), ("/exit", "", "c_exit"),
2884
2946
  ]
@@ -3119,8 +3181,15 @@ HISTORY: list[str] = []
3119
3181
 
3120
3182
 
3121
3183
  def read_menu(prompt: str, left: str, right: str, width: int, color: bool = True) -> str:
3122
- """Leitura com menu de comandos. Requer terminal real (termios)."""
3184
+ """Leitura com menu de comandos. Requer terminal real (termios).
3185
+
3186
+ No Termux o terminal muda de tamanho quando o teclado abre/fecha: um SIGWINCH
3187
+ marca o redimensionamento e o editor redesenha do zero com a largura nova, em
3188
+ vez de continuar com a contagem de linhas antiga (que deixava a conversa
3189
+ desalinhada e sumindo). Sem região de rolagem fixa: só movimentos relativos.
3190
+ """
3123
3191
  import codecs
3192
+ import signal
3124
3193
  import termios
3125
3194
  import tty as _tty
3126
3195
  fd = sys.stdin.fileno()
@@ -3129,6 +3198,12 @@ def read_menu(prompt: str, left: str, right: str, width: int, color: bool = True
3129
3198
  ed = LineEditor(HISTORY)
3130
3199
  rule = paint("─" * width, DIM, color=color)
3131
3200
  reserve = LineEditor.MENU_ROWS + 3
3201
+ resized: list[bool] = [False]
3202
+ old_winch = None
3203
+ try:
3204
+ old_winch = signal.signal(signal.SIGWINCH, lambda *_: resized.__setitem__(0, True))
3205
+ except (ValueError, OSError, AttributeError):
3206
+ old_winch = None
3132
3207
  sys.stdout.write("\n" * reserve + "\x1b[%dA" % reserve + rule + "\n")
3133
3208
  sys.stdout.flush()
3134
3209
  prev = 0
@@ -3139,6 +3214,13 @@ def read_menu(prompt: str, left: str, right: str, width: int, color: bool = True
3139
3214
  sys.stdout.flush()
3140
3215
  while True:
3141
3216
  data = dec.decode(os.read(fd, 1024))
3217
+ if resized[0]:
3218
+ resized[0] = False
3219
+ width = term_width()
3220
+ rule = paint("─" * width, DIM, color=color)
3221
+ sys.stdout.write("\r\x1b[J") # limpa daqui para baixo e redesenha do zero
3222
+ sys.stdout.flush()
3223
+ prev = 0
3142
3224
  for key in split_keys(data):
3143
3225
  done = ed.feed(key)
3144
3226
  if done is not None:
@@ -3150,6 +3232,11 @@ def read_menu(prompt: str, left: str, right: str, width: int, color: bool = True
3150
3232
  sys.stdout.flush()
3151
3233
  finally:
3152
3234
  termios.tcsetattr(fd, termios.TCSADRAIN, saved)
3235
+ if old_winch is not None:
3236
+ try:
3237
+ signal.signal(signal.SIGWINCH, old_winch)
3238
+ except (ValueError, OSError):
3239
+ pass
3153
3240
 
3154
3241
 
3155
3242
  def render_help(color: bool = True) -> list[str]:
@@ -3251,7 +3338,8 @@ def read_boxed(prompt: str, left: str, right: str, width: int, tty: bool, color:
3251
3338
 
3252
3339
  def _stream_turn(c: Client, text: str, history: list[dict], model: str | None, project: str | None,
3253
3340
  printer: "StreamPrinter", spinner: Spinner, web: bool = False, skill: str | None = None, context: str | None = None, tools: bool = True, effort: str | None = None,
3254
- files: list[dict] | None = None, images: list[dict] | None = None) -> dict:
3341
+ files: list[dict] | None = None, images: list[dict] | None = None,
3342
+ live_tok: dict | None = None) -> dict:
3255
3343
  """Uma rodada de chat em streaming. Devolve {answer, model, fallback_event, error}."""
3256
3344
  body: dict = {"message": text, "history": history[-MAX_HISTORY:]}
3257
3345
  att_body(body, files, images)
@@ -3276,6 +3364,8 @@ def _stream_turn(c: Client, text: str, history: list[dict], model: str | None, p
3276
3364
  r = _chat_once(c, text, history, model, project, web, skill, context, tools, effort, files, images)
3277
3365
  spinner.stop()
3278
3366
  printer.feed(r.get("answer", ""))
3367
+ if live_tok is not None:
3368
+ live_tok["comp"] = len(r.get("answer", "")) // 4
3279
3369
  return {"answer": r.get("answer", ""), "model": r.get("model"), "fallback_event": r.get("fallback_event"), "error": None, "web": r.get("web"), "sources": r.get("sources"),
3280
3370
  "usage": r.get("usage"), "skill": r.get("skill"), "skill_auto": r.get("skill_auto")}
3281
3371
  if resp.status != 200:
@@ -3292,6 +3382,8 @@ def _stream_turn(c: Client, text: str, history: list[dict], model: str | None, p
3292
3382
  spinner.stop()
3293
3383
  printer.feed(d["t"])
3294
3384
  res["answer"] += d["t"]
3385
+ if live_tok is not None:
3386
+ live_tok["comp"] = len(res["answer"]) // 4
3295
3387
  elif name == "error":
3296
3388
  res["error"] = d.get("error", "erro")
3297
3389
  return res
@@ -3643,7 +3735,7 @@ def cmd_tui(c: Client, a: argparse.Namespace, out: Callable[[str], None] = print
3643
3735
  return 1
3644
3736
  model: str | None = None
3645
3737
  skill: str | None = None
3646
- web = False
3738
+ web = True # navegador/busca na web sempre ligados para a IA (sem on/off)
3647
3739
  summary: str | None = None
3648
3740
  overflow: list[dict] = []
3649
3741
  pending: str | None = None
@@ -3669,11 +3761,12 @@ def cmd_tui(c: Client, a: argparse.Namespace, out: Callable[[str], None] = print
3669
3761
  time.sleep(0.035)
3670
3762
  out("")
3671
3763
  def footer_right() -> str:
3672
- extras = [(f"loop {loop['n']}/{loop['max']}" if loop else ""), ("web" if web else ""), t("e_label") + ": " + effort, ("📎" + str(len(sticky) + len(queued)) if sticky or queued else ""), (fmt_tok(su["p"] + su["c"]) + " tok" if su["n"] else "")]
3764
+ extras = [(f"loop {loop['n']}/{loop['max']}" if loop else ""), t("e_label") + ": " + effort, ("📎" + str(len(sticky) + len(queued)) if sticky or queued else ""), (fmt_tok(su["p"] + su["c"]) + " tok" if su["n"] else "")]
3673
3765
  return status_right(ctx_pct(ctx_tokens(history, summary, sticky)), model, [x for x in extras if x], width - 6, color)
3674
3766
 
3675
3767
  reader = read or (lambda prompt: read_boxed(prompt, t("foot_left"), footer_right(), width, tty, color))
3676
3768
  while True:
3769
+ width = term_width() # o terminal muda de tamanho no Termux quando o teclado abre/fecha: relê a cada volta
3677
3770
  if pending is not None:
3678
3771
  line, pending = pending, None
3679
3772
  else:
@@ -3772,9 +3865,8 @@ def cmd_tui(c: Client, a: argparse.Namespace, out: Callable[[str], None] = print
3772
3865
  conv = None
3773
3866
  out(render_detail(t("new_conv"), color))
3774
3867
  elif name == "web":
3775
- arg = rest.strip().lower()
3776
- web = (arg == "on") if arg in ("on", "off") else not web
3777
- out(render_detail(t("web_on") if web else t("web_off"), color))
3868
+ web = True # não desliga mais: a busca na web fica sempre ligada
3869
+ out(render_detail(t("web_always"), color))
3778
3870
  elif name in ("model", "models"): # /models foi removido do menu; digitar continua levando ao seletor
3779
3871
  try:
3780
3872
  ids = [m if isinstance(m, str) else m.get("id", "") for m in c.ok("GET", "/v1/models").get("models", [])]
@@ -3823,7 +3915,7 @@ def cmd_tui(c: Client, a: argparse.Namespace, out: Callable[[str], None] = print
3823
3915
  elif name == "usage" or name == "status":
3824
3916
  try:
3825
3917
  hist_tok = sum(len(m.get("content", "")) for m in history) // 4 + len(summary or "") // 4
3826
- render_usage(c, lambda ln: out(ln), color, su, {t("foot_model", m=model or t("foot_auto")).split(": ")[0]: model or t("foot_auto"), t("e_label"): effort, "skill": skill or (auto_name and auto_name + " (auto)") or "—", "web": "on" if web else "off", t("us_ctx"): "~" + fmt_tok(hist_tok) + " tok"})
3918
+ render_usage(c, lambda ln: out(ln), color, su, {t("foot_model", m=model or t("foot_auto")).split(": ")[0]: model or t("foot_auto"), t("e_label"): effort, "skill": skill or (auto_name and auto_name + " (auto)") or "—", t("us_ctx"): "~" + fmt_tok(hist_tok) + " tok"})
3827
3919
  except CliError as e:
3828
3920
  out(render_detail(redact(e), color))
3829
3921
  elif name == "skill" and rest.strip().startswith("auto"):
@@ -3949,12 +4041,21 @@ def cmd_tui(c: Client, a: argparse.Namespace, out: Callable[[str], None] = print
3949
4041
  buf: list[str] = []
3950
4042
  state: dict = {}
3951
4043
  panel = LivePanel(live, color, col_fn=lambda: state["p"].col if "p" in state else 0)
3952
- base_printer = StreamPrinter((lambda s: (sys.stdout.write("\x1b[J" + s), sys.stdout.flush())) if live else (lambda s: (sys.stdout.write(s), sys.stdout.flush())) if tty else buf.append, width - 1, color)
3953
- printer = LockedPrinter(base_printer, panel.lock) if live else base_printer
4044
+ # Barra ao vivo (item 2 e 3): uma linha embaixo da resposta, com o verbo, o tempo e os
4045
+ # tokens ao vivo; a resposta sai acima dela e a barra fica sempre embaixo. No terminal
4046
+ # real ela substitui o Spinner (que só existia antes do primeiro token).
4047
+ live_tok = {"prompt": 0, "comp": 0} # tokens ao vivo da rodada (estimativa; o valor exato chega no `done`)
4048
+ show_status = tty and not live
4049
+ status = LivePanel(show_status, color, compact=True, col_fn=lambda: state["p"].col if "p" in state else 0,
4050
+ tok_fn=lambda: (fmt_tok(live_tok["prompt"] + live_tok["comp"]) + " tok~") if live_tok["prompt"] + live_tok["comp"] else "")
4051
+ base_printer = StreamPrinter((lambda s: (sys.stdout.write("\x1b[J" + s), sys.stdout.flush())) if (live or show_status) else (lambda s: (sys.stdout.write(s), sys.stdout.flush())) if tty else buf.append, width - 1, color)
4052
+ printer = LockedPrinter(base_printer, status.lock) if show_status else (LockedPrinter(base_printer, panel.lock) if live else base_printer)
3954
4053
  state["p"] = base_printer
3955
- sp = NoStop() if live else Spinner(tty, color)
4054
+ sp = NoStop() if (live or show_status) else Spinner(tty, color)
3956
4055
  sp.rb = effort == "max"
3957
4056
  t0 = time.time()
4057
+ live_tok["prompt"] = ctx_tokens(history, summary, sticky) + len(line) // 4
4058
+ live_tok["comp"] = 0
3958
4059
  r: dict | None = None
3959
4060
  is_step = line.startswith("[Resultado") or line.startswith("[Skill ")
3960
4061
  turn_images: list[dict] = []
@@ -3964,12 +4065,13 @@ def cmd_tui(c: Client, a: argparse.Namespace, out: Callable[[str], None] = print
3964
4065
  queued.clear()
3965
4066
  try:
3966
4067
  with quiet_input(tty):
3967
- panel.start("think") if live else sp.start()
3968
- r = _stream_turn(c, line, history, model, None, printer, sp, web or once_web or fb_web, skill or (auto_name if is_step else None), summary, True, effort, sticky, turn_images)
4068
+ panel.start("think") if live else (status.start("think") if show_status else sp.start())
4069
+ r = _stream_turn(c, line, history, model, None, printer, sp, web or once_web or fb_web, skill or (auto_name if is_step else None), summary, True, effort, sticky, turn_images, live_tok=live_tok)
3969
4070
  fb_web = False
3970
4071
  except KeyboardInterrupt:
3971
4072
  printer.finish()
3972
4073
  panel.stop()
4074
+ status.stop()
3973
4075
  sp.stop()
3974
4076
  out(render_detail("interrompido", color))
3975
4077
  if loop:
@@ -3979,6 +4081,7 @@ def cmd_tui(c: Client, a: argparse.Namespace, out: Callable[[str], None] = print
3979
4081
  continue
3980
4082
  except CliError as e:
3981
4083
  panel.stop()
4084
+ status.stop()
3982
4085
  sp.stop()
3983
4086
  out(paint(" ✗ ", RED, color=color) + str(e))
3984
4087
  if loop:
@@ -3988,6 +4091,7 @@ def cmd_tui(c: Client, a: argparse.Namespace, out: Callable[[str], None] = print
3988
4091
  continue
3989
4092
  printer.finish()
3990
4093
  panel.stop()
4094
+ status.stop()
3991
4095
  sp.stop()
3992
4096
  if not tty:
3993
4097
  for ln in "".join(buf).rstrip("\n").split("\n"):
@@ -0,0 +1,20 @@
1
+ Metadata-Version: 2.4
2
+ Name: vyra-code
3
+ Version: 0.2.45
4
+ Summary: Vyra Code: assistente de IA no terminal (Termux, Linux, macOS e Windows) (chat em streaming, tarefas, memória, projetos e terminal remoto)
5
+ License: Proprietary
6
+ Keywords: termux,ai,assistant,cli,android,llm
7
+ Classifier: Environment :: Console
8
+ Classifier: Intended Audience :: Developers
9
+ Classifier: License :: Other/Proprietary License
10
+ Classifier: Operating System :: OS Independent
11
+ Classifier: Operating System :: Microsoft :: Windows
12
+ Classifier: Operating System :: MacOS
13
+ Classifier: Operating System :: POSIX :: Linux
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Topic :: Software Development
16
+ Classifier: Topic :: Terminals
17
+ Requires-Python: >=3.9
18
+ Description-Content-Type: text/markdown
19
+ Requires-Dist: websocket-client>=1.6
20
+ Provides-Extra: term
@@ -1,4 +1,3 @@
1
- README.md
2
1
  pyproject.toml
3
2
  vyra.py
4
3
  vyra_i18n.py
@@ -23,6 +23,7 @@ MSG: dict[str, dict[str, str]] = {
23
23
  "foot_model": "modelo: {m}", "foot_auto": "automático",
24
24
  "help_title": "Comandos", "bye": "✻ Até logo!", "new_conv": "conversa nova",
25
25
  "web_on": "busca na web: ligada (cada pergunta pesquisa antes)", "web_off": "busca na web: desligada",
26
+ "web_always": "a busca na web e o navegador já ficam sempre ligados para a IA",
26
27
  "need_login": "Você ainda não entrou. Rode: vyra setup && vyra login", "interrupted": "interrompido",
27
28
  "bad_cmd": "comando inválido (veja /help)", "not_here": "comando não disponível dentro do chat",
28
29
  "v1": "Pensando", "v2": "Consultando modelos", "v3": "Organizando ideias", "v4": "Escrevendo", "v5": "Quase lá",
@@ -60,6 +61,7 @@ MSG: dict[str, dict[str, str]] = {
60
61
  "foot_model": "model: {m}", "foot_auto": "automatic",
61
62
  "help_title": "Commands", "bye": "✻ See you!", "new_conv": "new conversation",
62
63
  "web_on": "web search: on (every question searches first)", "web_off": "web search: off",
64
+ "web_always": "web search and the browser are always on for the AI",
63
65
  "need_login": "You are not signed in yet. Run: vyra setup && vyra login", "interrupted": "interrupted",
64
66
  "bad_cmd": "invalid command (see /help)", "not_here": "command not available inside the chat",
65
67
  "v1": "Thinking", "v2": "Consulting models", "v3": "Organizing ideas", "v4": "Writing", "v5": "Almost there",
@@ -96,7 +98,7 @@ MSG: dict[str, dict[str, str]] = {
96
98
  "menu_hint": "↑↓ elige · Tab completa · Enter confirma · Esc cierra", "foot_left": "? /help · /exit sale",
97
99
  "foot_model": "modelo: {m}", "foot_auto": "automático",
98
100
  "help_title": "Comandos", "bye": "✻ ¡Hasta luego!", "new_conv": "conversación nueva",
99
- "web_on": "búsqueda web: activada (cada pregunta busca antes)", "web_off": "búsqueda web: desactivada",
101
+ "web_on": "búsqueda web: activada (cada pregunta busca antes)", "web_off": "búsqueda web: desactivada", "web_always": "la búsqueda web y el navegador están siempre activos para la IA",
100
102
  "need_login": "Aún no has iniciado sesión. Ejecuta: vyra setup && vyra login", "interrupted": "interrumpido",
101
103
  "bad_cmd": "comando no válido (mira /help)", "not_here": "comando no disponible dentro del chat",
102
104
  "v1": "Pensando", "v2": "Consultando modelos", "v3": "Organizando ideas", "v4": "Escribiendo", "v5": "Casi listo", "spin_hint": "({s}s · Ctrl+C interrumpe)",
@@ -132,7 +134,7 @@ MSG: dict[str, dict[str, str]] = {
132
134
  "menu_hint": "↑↓ choisir · Tab compléter · Entrée valider · Échap fermer", "foot_left": "? /help · /exit quitte",
133
135
  "foot_model": "modèle : {m}", "foot_auto": "automatique",
134
136
  "help_title": "Commandes", "bye": "✻ À bientôt !", "new_conv": "nouvelle conversation",
135
- "web_on": "recherche web : activée (chaque question cherche d'abord)", "web_off": "recherche web : désactivée",
137
+ "web_on": "recherche web : activée (chaque question cherche d'abord)", "web_off": "recherche web : désactivée", "web_always": "la recherche web et le navigateur sont toujours actifs pour l'IA",
136
138
  "need_login": "Vous n'êtes pas encore connecté. Lancez : vyra setup && vyra login", "interrupted": "interrompu",
137
139
  "bad_cmd": "commande invalide (voir /help)", "not_here": "commande indisponible dans le chat",
138
140
  "v1": "Réflexion", "v2": "Consultation des modèles", "v3": "Organisation des idées", "v4": "Rédaction", "v5": "Presque fini", "spin_hint": "({s}s · Ctrl+C interrompt)",
@@ -168,7 +170,7 @@ MSG: dict[str, dict[str, str]] = {
168
170
  "menu_hint": "↑↓ wählen · Tab ergänzen · Enter bestätigen · Esc schließen", "foot_left": "? /help · /exit beendet",
169
171
  "foot_model": "Modell: {m}", "foot_auto": "automatisch",
170
172
  "help_title": "Befehle", "bye": "✻ Bis bald!", "new_conv": "neues Gespräch",
171
- "web_on": "Websuche: an (jede Frage sucht zuerst)", "web_off": "Websuche: aus",
173
+ "web_on": "Websuche: an (jede Frage sucht zuerst)", "web_off": "Websuche: aus", "web_always": "Websuche und Browser sind für die KI immer an",
172
174
  "need_login": "Du bist noch nicht angemeldet. Führe aus: vyra setup && vyra login", "interrupted": "unterbrochen",
173
175
  "bad_cmd": "ungültiger Befehl (siehe /help)", "not_here": "Befehl im Chat nicht verfügbar",
174
176
  "v1": "Denke nach", "v2": "Frage Modelle ab", "v3": "Ordne Gedanken", "v4": "Schreibe", "v5": "Fast fertig", "spin_hint": "({s}s · Strg+C bricht ab)",
@@ -204,7 +206,7 @@ MSG: dict[str, dict[str, str]] = {
204
206
  "menu_hint": "↑↓ scegli · Tab completa · Invio conferma · Esc chiude", "foot_left": "? /help · /exit esce",
205
207
  "foot_model": "modello: {m}", "foot_auto": "automatico",
206
208
  "help_title": "Comandi", "bye": "✻ A presto!", "new_conv": "nuova conversazione",
207
- "web_on": "ricerca web: attiva (ogni domanda cerca prima)", "web_off": "ricerca web: disattivata",
209
+ "web_on": "ricerca web: attiva (ogni domanda cerca prima)", "web_off": "ricerca web: disattivata", "web_always": "la ricerca web e il browser sono sempre attivi per l'IA",
208
210
  "need_login": "Non hai ancora effettuato l'accesso. Esegui: vyra setup && vyra login", "interrupted": "interrotto",
209
211
  "bad_cmd": "comando non valido (vedi /help)", "not_here": "comando non disponibile nella chat",
210
212
  "v1": "Sto pensando", "v2": "Consulto i modelli", "v3": "Organizzo le idee", "v4": "Scrivo", "v5": "Quasi fatto", "spin_hint": "({s}s · Ctrl+C interrompe)",
@@ -240,7 +242,7 @@ MSG: dict[str, dict[str, str]] = {
240
242
  "menu_hint": "↑↓ выбор · Tab дополнить · Enter подтвердить · Esc закрыть", "foot_left": "? /help · /exit выход",
241
243
  "foot_model": "модель: {m}", "foot_auto": "автоматически",
242
244
  "help_title": "Команды", "bye": "✻ До встречи!", "new_conv": "новый разговор",
243
- "web_on": "поиск в интернете: включён (каждый вопрос сначала ищет)", "web_off": "поиск в интернете: выключен",
245
+ "web_on": "поиск в интернете: включён (каждый вопрос сначала ищет)", "web_off": "поиск в интернете: выключен", "web_always": "поиск в интернете и браузер всегда включены для ИИ",
244
246
  "need_login": "Вы ещё не вошли. Выполните: vyra setup && vyra login", "interrupted": "прервано",
245
247
  "bad_cmd": "неверная команда (см. /help)", "not_here": "команда недоступна внутри чата",
246
248
  "v1": "Думаю", "v2": "Опрашиваю модели", "v3": "Собираю мысли", "v4": "Пишу", "v5": "Почти готово", "spin_hint": "({s}с · Ctrl+C прерывает)",
@@ -276,7 +278,7 @@ MSG: dict[str, dict[str, str]] = {
276
278
  "menu_hint": "↑↓ 选择 · Tab 补全 · Enter 确认 · Esc 关闭", "foot_left": "? /help · /exit 退出",
277
279
  "foot_model": "模型:{m}", "foot_auto": "自动",
278
280
  "help_title": "命令", "bye": "✻ 再见!", "new_conv": "新对话",
279
- "web_on": "联网搜索:已开启(每个问题先搜索)", "web_off": "联网搜索:已关闭",
281
+ "web_on": "联网搜索:已开启(每个问题先搜索)", "web_off": "联网搜索:已关闭", "web_always": "联网搜索和浏览器对 AI 始终开启",
280
282
  "need_login": "你还没有登录。请运行:vyra setup && vyra login", "interrupted": "已中断",
281
283
  "bad_cmd": "无效命令(见 /help)", "not_here": "该命令不能在聊天中使用",
282
284
  "v1": "思考中", "v2": "正在咨询模型", "v3": "整理思路", "v4": "正在撰写", "v5": "马上好", "spin_hint": "({s} 秒 · Ctrl+C 中断)",
@@ -312,7 +314,7 @@ MSG: dict[str, dict[str, str]] = {
312
314
  "menu_hint": "↑↓ 選択 · Tab 補完 · Enter 決定 · Esc 閉じる", "foot_left": "? /help · /exit で終了",
313
315
  "foot_model": "モデル: {m}", "foot_auto": "自動",
314
316
  "help_title": "コマンド", "bye": "✻ またね!", "new_conv": "新しい会話",
315
- "web_on": "ウェブ検索: オン(質問ごとに先に検索)", "web_off": "ウェブ検索: オフ",
317
+ "web_on": "ウェブ検索: オン(質問ごとに先に検索)", "web_off": "ウェブ検索: オフ", "web_always": "ウェブ検索とブラウザはAIで常にオンです",
316
318
  "need_login": "まだサインインしていません。実行: vyra setup && vyra login", "interrupted": "中断しました",
317
319
  "bad_cmd": "無効なコマンドです(/help を参照)", "not_here": "このコマンドはチャット内では使えません",
318
320
  "v1": "考え中", "v2": "モデルに問い合わせ中", "v3": "考えを整理中", "v4": "執筆中", "v5": "もうすぐ", "spin_hint": "({s}秒 · Ctrl+C で中断)",
@@ -348,7 +350,7 @@ MSG: dict[str, dict[str, str]] = {
348
350
  "menu_hint": "↑↓ 선택 · Tab 완성 · Enter 확인 · Esc 닫기", "foot_left": "? /help · /exit 종료",
349
351
  "foot_model": "모델: {m}", "foot_auto": "자동",
350
352
  "help_title": "명령어", "bye": "✻ 또 만나요!", "new_conv": "새 대화",
351
- "web_on": "웹 검색: 켜짐(질문마다 먼저 검색)", "web_off": "웹 검색: 꺼짐",
353
+ "web_on": "웹 검색: 켜짐(질문마다 먼저 검색)", "web_off": "웹 검색: 꺼짐", "web_always": "웹 검색과 브라우저는 AI에 항상 켜져 있습니다",
352
354
  "need_login": "아직 로그인하지 않았습니다. 실행: vyra setup && vyra login", "interrupted": "중단됨",
353
355
  "bad_cmd": "잘못된 명령입니다(/help 참고)", "not_here": "채팅 안에서는 사용할 수 없는 명령입니다",
354
356
  "v1": "생각 중", "v2": "모델에 문의 중", "v3": "아이디어 정리 중", "v4": "작성 중", "v5": "거의 다 됐어요", "spin_hint": "({s}초 · Ctrl+C로 중단)",
@@ -384,7 +386,7 @@ MSG: dict[str, dict[str, str]] = {
384
386
  "menu_hint": "↑↓ चुनें · Tab पूरा करें · Enter पुष्टि · Esc बंद", "foot_left": "? /help · /exit बाहर",
385
387
  "foot_model": "मॉडल: {m}", "foot_auto": "स्वचालित",
386
388
  "help_title": "कमांड", "bye": "✻ फिर मिलेंगे!", "new_conv": "नई बातचीत",
387
- "web_on": "वेब खोज: चालू (हर प्रश्न पहले खोजता है)", "web_off": "वेब खोज: बंद",
389
+ "web_on": "वेब खोज: चालू (हर प्रश्न पहले खोजता है)", "web_off": "वेब खोज: बंद", "web_always": "वेब खोज और ब्राउज़र AI के लिए हमेशा चालू रहते हैं",
388
390
  "need_login": "आपने अभी साइन इन नहीं किया है। चलाएँ: vyra setup && vyra login", "interrupted": "रोका गया",
389
391
  "bad_cmd": "अमान्य कमांड (/help देखें)", "not_here": "यह कमांड चैट के अंदर उपलब्ध नहीं है",
390
392
  "v1": "सोच रहा हूँ", "v2": "मॉडलों से पूछ रहा हूँ", "v3": "विचार व्यवस्थित कर रहा हूँ", "v4": "लिख रहा हूँ", "v5": "लगभग हो गया", "spin_hint": "({s} सेकंड · Ctrl+C रोकता है)",
@@ -420,7 +422,7 @@ MSG: dict[str, dict[str, str]] = {
420
422
  "menu_hint": "↑↓ seç · Tab tamamla · Enter onayla · Esc kapat", "foot_left": "? /help · /exit çıkar",
421
423
  "foot_model": "model: {m}", "foot_auto": "otomatik",
422
424
  "help_title": "Komutlar", "bye": "✻ Görüşürüz!", "new_conv": "yeni sohbet",
423
- "web_on": "web araması: açık (her soru önce arar)", "web_off": "web araması: kapalı",
425
+ "web_on": "web araması: açık (her soru önce arar)", "web_off": "web araması: kapalı", "web_always": "web araması ve tarayıcı yapay zeka için her zaman açık",
424
426
  "need_login": "Henüz giriş yapmadınız. Çalıştırın: vyra setup && vyra login", "interrupted": "kesildi",
425
427
  "bad_cmd": "geçersiz komut (/help'e bakın)", "not_here": "komut sohbetin içinde kullanılamaz",
426
428
  "v1": "Düşünüyor", "v2": "Modellere danışıyor", "v3": "Fikirleri düzenliyor", "v4": "Yazıyor", "v5": "Neredeyse bitti", "spin_hint": "({s} sn · Ctrl+C keser)",
vyra_code-0.2.42/PKG-INFO DELETED
@@ -1,82 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: vyra-code
3
- Version: 0.2.42
4
- Summary: Vyra Code: assistente de IA no terminal (Termux, Linux, macOS e Windows) (chat em streaming, tarefas, memória, projetos e terminal remoto)
5
- License: Proprietary
6
- Keywords: termux,ai,assistant,cli,android,llm
7
- Classifier: Environment :: Console
8
- Classifier: Intended Audience :: Developers
9
- Classifier: License :: Other/Proprietary License
10
- Classifier: Operating System :: OS Independent
11
- Classifier: Operating System :: Microsoft :: Windows
12
- Classifier: Operating System :: MacOS
13
- Classifier: Operating System :: POSIX :: Linux
14
- Classifier: Programming Language :: Python :: 3
15
- Classifier: Topic :: Software Development
16
- Classifier: Topic :: Terminals
17
- Requires-Python: >=3.9
18
- Description-Content-Type: text/markdown
19
- Requires-Dist: websocket-client>=1.6
20
- Provides-Extra: term
21
-
22
- # Vyra Code
23
-
24
- Assistente de IA no terminal do **Termux** (Android): converse com modelos gratuitos, rode tarefas de agentes, guarde memória e projetos, e abra um terminal remoto — tudo pelo seu servidor Vyra, sem chave de API no celular.
25
-
26
- ```text
27
- ✻ Vyra Code · streaming · avatar animado · /comandos
28
- ```
29
-
30
- ## Instalação
31
-
32
- Na primeira execução (`vyra` ou `vyra setup`) aparece a logo animada, a escolha de idioma, as etapas de instalação/configuração e a pergunta **"Você confia nesta pasta?"** (1 confiar e lembrar, 2 só desta vez, 3 sair). Idiomas: pt, en, es, fr, de, it, ru, zh, ja, ko, hi, tr (`vyra lang`, `/lang`); outros idiomas: crie `~/.config/vyra-code/lang/<código>.json` com as chaves traduzidas (o que faltar cai para inglês). `/model` lista todos os modelos; escolha por número, nome ou `auto`.
33
-
34
-
35
- ```sh
36
- pkg install -y python
37
- pip install -q vyra-code
38
- vyra setup && vyra login
39
- ```
40
-
41
- Para atualizar: `vyra update` (confere a versão, instala em silêncio e mostra só as novidades).
42
- Da 0.2.2 ou anterior, rode uma vez `pip install -q -U vyra-code`.
43
-
44
- Requisitos: Python 3.9+. Única dependência: `websocket-client` (terminal remoto).
45
-
46
- ## Entrar
47
-
48
- | Como | Comando |
49
- |---|---|
50
- | E-mail e senha | `vyra login` |
51
- | Link no e-mail (sem senha) | `vyra login --link` (ou senha em branco) |
52
- | Conta Google | `vyra login --google` |
53
-
54
- A senha nunca é gravada. O cliente conversa **apenas com o servidor do Vyra**: ele não guarda chaves de API nem endereços de provedores.
55
-
56
- ## Uso
57
-
58
- Digite `vyra` para abrir a interface interativa (resposta em streaming, `/help` lista os comandos).
59
-
60
- | Comando | O que faz |
61
- |---|---|
62
- | `vyra` | interface interativa com avatar animado |
63
- | `vyra chat [texto]` | conversa (`--model`, `--project`, `--no-save`) |
64
- | `vyra chat --web` · `/web on` · `/pesquisar <texto>` | responde pesquisando na web (mostra as fontes) |
65
- | `vyra tasks new/list/show/run/watch/cancel/pause/resume` | tarefas dos agentes (id aceita prefixo) |
66
- | `vyra notify` | avisa pelo Termux:API quando uma tarefa termina |
67
- | `vyra memory list/add/search/rm` | memória persistente |
68
- | `vyra projects list/add/rm` | projetos |
69
- | `vyra term` | terminal remoto (sair: Ctrl+]) |
70
- | `vyra update [--check]` | atualiza ou só confere a versão |
71
- | `vyra status`, `models`, `history`, `whoami`, `logout` | utilitários |
72
-
73
- Dentro do `vyra`: `/avatar think` e `/avatar run` mostram a animação do avatar (anel prateado ao responder, arco-íris ao executar comandos).
74
-
75
- ## Segurança
76
-
77
- - Só fala com o servidor do Vyra, por HTTPS; qualquer outro endereço é recusado.
78
- - Sessão em `~/.config/vyra-code/session.json` (modo 0600, pasta 0700).
79
- - Só modelos gratuitos aprovados no servidor; o cliente não escolhe provedores pagos.
80
- - Login com PKCE (link e Google): o código recebido só vale com um segredo que nunca sai do aparelho.
81
-
82
- Licença: proprietária. Suporte: fale com o responsável pelo seu servidor Vyra.
@@ -1,61 +0,0 @@
1
- # Vyra Code
2
-
3
- Assistente de IA no terminal do **Termux** (Android): converse com modelos gratuitos, rode tarefas de agentes, guarde memória e projetos, e abra um terminal remoto — tudo pelo seu servidor Vyra, sem chave de API no celular.
4
-
5
- ```text
6
- ✻ Vyra Code · streaming · avatar animado · /comandos
7
- ```
8
-
9
- ## Instalação
10
-
11
- Na primeira execução (`vyra` ou `vyra setup`) aparece a logo animada, a escolha de idioma, as etapas de instalação/configuração e a pergunta **"Você confia nesta pasta?"** (1 confiar e lembrar, 2 só desta vez, 3 sair). Idiomas: pt, en, es, fr, de, it, ru, zh, ja, ko, hi, tr (`vyra lang`, `/lang`); outros idiomas: crie `~/.config/vyra-code/lang/<código>.json` com as chaves traduzidas (o que faltar cai para inglês). `/model` lista todos os modelos; escolha por número, nome ou `auto`.
12
-
13
-
14
- ```sh
15
- pkg install -y python
16
- pip install -q vyra-code
17
- vyra setup && vyra login
18
- ```
19
-
20
- Para atualizar: `vyra update` (confere a versão, instala em silêncio e mostra só as novidades).
21
- Da 0.2.2 ou anterior, rode uma vez `pip install -q -U vyra-code`.
22
-
23
- Requisitos: Python 3.9+. Única dependência: `websocket-client` (terminal remoto).
24
-
25
- ## Entrar
26
-
27
- | Como | Comando |
28
- |---|---|
29
- | E-mail e senha | `vyra login` |
30
- | Link no e-mail (sem senha) | `vyra login --link` (ou senha em branco) |
31
- | Conta Google | `vyra login --google` |
32
-
33
- A senha nunca é gravada. O cliente conversa **apenas com o servidor do Vyra**: ele não guarda chaves de API nem endereços de provedores.
34
-
35
- ## Uso
36
-
37
- Digite `vyra` para abrir a interface interativa (resposta em streaming, `/help` lista os comandos).
38
-
39
- | Comando | O que faz |
40
- |---|---|
41
- | `vyra` | interface interativa com avatar animado |
42
- | `vyra chat [texto]` | conversa (`--model`, `--project`, `--no-save`) |
43
- | `vyra chat --web` · `/web on` · `/pesquisar <texto>` | responde pesquisando na web (mostra as fontes) |
44
- | `vyra tasks new/list/show/run/watch/cancel/pause/resume` | tarefas dos agentes (id aceita prefixo) |
45
- | `vyra notify` | avisa pelo Termux:API quando uma tarefa termina |
46
- | `vyra memory list/add/search/rm` | memória persistente |
47
- | `vyra projects list/add/rm` | projetos |
48
- | `vyra term` | terminal remoto (sair: Ctrl+]) |
49
- | `vyra update [--check]` | atualiza ou só confere a versão |
50
- | `vyra status`, `models`, `history`, `whoami`, `logout` | utilitários |
51
-
52
- Dentro do `vyra`: `/avatar think` e `/avatar run` mostram a animação do avatar (anel prateado ao responder, arco-íris ao executar comandos).
53
-
54
- ## Segurança
55
-
56
- - Só fala com o servidor do Vyra, por HTTPS; qualquer outro endereço é recusado.
57
- - Sessão em `~/.config/vyra-code/session.json` (modo 0600, pasta 0700).
58
- - Só modelos gratuitos aprovados no servidor; o cliente não escolhe provedores pagos.
59
- - Login com PKCE (link e Google): o código recebido só vale com um segredo que nunca sai do aparelho.
60
-
61
- Licença: proprietária. Suporte: fale com o responsável pelo seu servidor Vyra.
@@ -1,82 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: vyra-code
3
- Version: 0.2.42
4
- Summary: Vyra Code: assistente de IA no terminal (Termux, Linux, macOS e Windows) (chat em streaming, tarefas, memória, projetos e terminal remoto)
5
- License: Proprietary
6
- Keywords: termux,ai,assistant,cli,android,llm
7
- Classifier: Environment :: Console
8
- Classifier: Intended Audience :: Developers
9
- Classifier: License :: Other/Proprietary License
10
- Classifier: Operating System :: OS Independent
11
- Classifier: Operating System :: Microsoft :: Windows
12
- Classifier: Operating System :: MacOS
13
- Classifier: Operating System :: POSIX :: Linux
14
- Classifier: Programming Language :: Python :: 3
15
- Classifier: Topic :: Software Development
16
- Classifier: Topic :: Terminals
17
- Requires-Python: >=3.9
18
- Description-Content-Type: text/markdown
19
- Requires-Dist: websocket-client>=1.6
20
- Provides-Extra: term
21
-
22
- # Vyra Code
23
-
24
- Assistente de IA no terminal do **Termux** (Android): converse com modelos gratuitos, rode tarefas de agentes, guarde memória e projetos, e abra um terminal remoto — tudo pelo seu servidor Vyra, sem chave de API no celular.
25
-
26
- ```text
27
- ✻ Vyra Code · streaming · avatar animado · /comandos
28
- ```
29
-
30
- ## Instalação
31
-
32
- Na primeira execução (`vyra` ou `vyra setup`) aparece a logo animada, a escolha de idioma, as etapas de instalação/configuração e a pergunta **"Você confia nesta pasta?"** (1 confiar e lembrar, 2 só desta vez, 3 sair). Idiomas: pt, en, es, fr, de, it, ru, zh, ja, ko, hi, tr (`vyra lang`, `/lang`); outros idiomas: crie `~/.config/vyra-code/lang/<código>.json` com as chaves traduzidas (o que faltar cai para inglês). `/model` lista todos os modelos; escolha por número, nome ou `auto`.
33
-
34
-
35
- ```sh
36
- pkg install -y python
37
- pip install -q vyra-code
38
- vyra setup && vyra login
39
- ```
40
-
41
- Para atualizar: `vyra update` (confere a versão, instala em silêncio e mostra só as novidades).
42
- Da 0.2.2 ou anterior, rode uma vez `pip install -q -U vyra-code`.
43
-
44
- Requisitos: Python 3.9+. Única dependência: `websocket-client` (terminal remoto).
45
-
46
- ## Entrar
47
-
48
- | Como | Comando |
49
- |---|---|
50
- | E-mail e senha | `vyra login` |
51
- | Link no e-mail (sem senha) | `vyra login --link` (ou senha em branco) |
52
- | Conta Google | `vyra login --google` |
53
-
54
- A senha nunca é gravada. O cliente conversa **apenas com o servidor do Vyra**: ele não guarda chaves de API nem endereços de provedores.
55
-
56
- ## Uso
57
-
58
- Digite `vyra` para abrir a interface interativa (resposta em streaming, `/help` lista os comandos).
59
-
60
- | Comando | O que faz |
61
- |---|---|
62
- | `vyra` | interface interativa com avatar animado |
63
- | `vyra chat [texto]` | conversa (`--model`, `--project`, `--no-save`) |
64
- | `vyra chat --web` · `/web on` · `/pesquisar <texto>` | responde pesquisando na web (mostra as fontes) |
65
- | `vyra tasks new/list/show/run/watch/cancel/pause/resume` | tarefas dos agentes (id aceita prefixo) |
66
- | `vyra notify` | avisa pelo Termux:API quando uma tarefa termina |
67
- | `vyra memory list/add/search/rm` | memória persistente |
68
- | `vyra projects list/add/rm` | projetos |
69
- | `vyra term` | terminal remoto (sair: Ctrl+]) |
70
- | `vyra update [--check]` | atualiza ou só confere a versão |
71
- | `vyra status`, `models`, `history`, `whoami`, `logout` | utilitários |
72
-
73
- Dentro do `vyra`: `/avatar think` e `/avatar run` mostram a animação do avatar (anel prateado ao responder, arco-íris ao executar comandos).
74
-
75
- ## Segurança
76
-
77
- - Só fala com o servidor do Vyra, por HTTPS; qualquer outro endereço é recusado.
78
- - Sessão em `~/.config/vyra-code/session.json` (modo 0600, pasta 0700).
79
- - Só modelos gratuitos aprovados no servidor; o cliente não escolhe provedores pagos.
80
- - Login com PKCE (link e Google): o código recebido só vale com um segredo que nunca sai do aparelho.
81
-
82
- Licença: proprietária. Suporte: fale com o responsável pelo seu servidor Vyra.
File without changes