krnell 3.0.4 → 3.0.5
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/bin/krnell.mjs +2 -2
- package/bridge.py +1 -1
- package/iniciar.sh +1 -1
- package/kimi.py +18 -0
- package/package.json +1 -1
- package/painel.py +756 -172
- package/tui_core.py +135 -16
package/bin/krnell.mjs
CHANGED
|
@@ -77,9 +77,9 @@ prepararPastaUsuario();
|
|
|
77
77
|
function lerVersao() {
|
|
78
78
|
try {
|
|
79
79
|
const pkg = JSON.parse(fs.readFileSync(path.join(ROOT, 'package.json'), 'utf8'));
|
|
80
|
-
return pkg.version || '3.0.
|
|
80
|
+
return pkg.version || '3.0.5';
|
|
81
81
|
} catch {
|
|
82
|
-
return '3.0.
|
|
82
|
+
return '3.0.5';
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
|
package/bridge.py
CHANGED
|
@@ -59,7 +59,7 @@ OPENCODE_CONTEXT_TOKENS = 300000
|
|
|
59
59
|
OPENCODE_OUTPUT_TOKENS = 64000
|
|
60
60
|
MODEL_CONTEXT_ANUNCIADO = 0 # 0 = nao ha limite de descoberta configurado
|
|
61
61
|
MODEL_OUTPUT_ANUNCIADO = 0 # limite nativo conhecido; independente do contexto escolhido
|
|
62
|
-
BRIDGE_VERSION = '3.0.
|
|
62
|
+
BRIDGE_VERSION = '3.0.5'
|
|
63
63
|
PROVIDER_URLS = {'unorouter': 'https://api.unorouter.com/v1',
|
|
64
64
|
'tokenharbor': 'https://tokenharbor.ai/v1',
|
|
65
65
|
# Contas do app WorkBuddy: o fluxo real (login, headers de
|
package/iniciar.sh
CHANGED
package/kimi.py
CHANGED
|
@@ -30,6 +30,8 @@ FALHAS_PARA_REINICIAR = 3
|
|
|
30
30
|
ESPERAS_DE_REINICIO = (3.0, 6.0, 15.0, 30.0, 60.0)
|
|
31
31
|
ARQUIVO_LOG = 'kimi.log'
|
|
32
32
|
|
|
33
|
+
MODELO_PADRAO = 'kimi-k3.1-pro'
|
|
34
|
+
MODELO_ANTIGRAVITY_PADRAO = 'gemini-4-neon'
|
|
33
35
|
PROVEDORES_MOTOR = ('kimi', 'nvidia', 'antigravity')
|
|
34
36
|
MODELOS_NVIDIA = ('kimi-k3.1-pro', 'minimax-m3.1-flash')
|
|
35
37
|
MODELOS_ANTIGRAVITY = (
|
|
@@ -315,6 +317,22 @@ def antigravity_ativar_conta(hint: str, porta: int = PORTA_PADRAO, timeout: floa
|
|
|
315
317
|
return res
|
|
316
318
|
|
|
317
319
|
|
|
320
|
+
def antigravity_login_url(porta: int = PORTA_PADRAO, timeout: float = 5.0) -> tuple[str, str]:
|
|
321
|
+
"""Inicia fluxo OAuth do Antigravity e retorna `(url, state)`."""
|
|
322
|
+
res = antigravity_iniciar_login(porta=porta, timeout=timeout)
|
|
323
|
+
return str(res.get('url') or ''), str(res.get('state') or '')
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
def antigravity_completar(entrada: str, state: str = '', porta: int = PORTA_PADRAO, timeout: float = 20.0) -> dict:
|
|
327
|
+
"""Completa o OAuth do Antigravity com a URL/código colado."""
|
|
328
|
+
return antigravity_completar_login(state=state, entrada=entrada, porta=porta, timeout=timeout)
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
def antigravity_logout(email: str = '', porta: int = PORTA_PADRAO, timeout: float = 5.0) -> dict:
|
|
332
|
+
"""Remove conta conectada do Antigravity."""
|
|
333
|
+
return antigravity_remover_conta(hint=email, porta=porta, timeout=timeout)
|
|
334
|
+
|
|
335
|
+
|
|
318
336
|
def antigravity_remover_conta(hint: str, porta: int = PORTA_PADRAO, timeout: float = 5.0) -> dict:
|
|
319
337
|
res = _pedir(
|
|
320
338
|
porta,
|
package/package.json
CHANGED