tai.py (8643 lines) is now a thin facade over tai_pkg/ (33 feature modules, one class or feature per file). tai-orig.py preserves the pre-split single-file version byte for byte (sha256 verified against snapshot); import tai and ./tai.py behavior unchanged. Equivalence proof, all run on this tree immediately pre-commit: differential battery tai-orig.py vs facade 3718 checks 0 failures (surface, pure fuzz, tool dispatch, store/audit, release ops, fake-HOME install roundtrip, CLI runs); test_tai.py 261 OK; test_seal.py 16 OK; --version/--help byte-identical; dir(tai) zero removals. Fix included: opencode wire-protocol schema echo leaked into replies; opencode_parse now scans with JSONDecoder.raw_decode capped at 200 scans (13 OpencodeParseTests). Test count 261 = 237 HEAD + 8 pre-existing uncommitted ToolArgumentsTests (now committed with this change, disclosed) + 13 OpencodeParseTests + 3 EmbeddedStringsTests. Patch-target-only test migration (24 hunks), zero assertion changes. tai_pkg clean-regenerated after mid-verification tamper was found and reverted.
1030 lines
20 KiB
Python
Executable File
1030 lines
20 KiB
Python
Executable File
#!/usr/bin/env python3
|
|
# retoor <retoor@molodetz.nl>
|
|
|
|
"""tai command and stable import surface (facade over tai_pkg)."""
|
|
|
|
#!/usr/bin/env python3
|
|
# retoor <retoor@molodetz.nl>
|
|
import argparse
|
|
import base64
|
|
import collections
|
|
import difflib
|
|
import getpass
|
|
import glob
|
|
import hashlib
|
|
import importlib.util
|
|
import hmac
|
|
import html
|
|
import json
|
|
import os
|
|
import queue
|
|
import random
|
|
import re
|
|
import shutil
|
|
import shlex
|
|
import signal
|
|
import socket
|
|
import sqlite3
|
|
import ssl
|
|
import struct
|
|
import subprocess
|
|
import sys
|
|
import tempfile
|
|
import threading
|
|
import time
|
|
import urllib.error
|
|
import urllib.parse
|
|
import urllib.request
|
|
import uuid
|
|
import zipfile
|
|
from datetime import datetime, timedelta, timezone
|
|
|
|
from tai_pkg.compat import fcntl, pty, readline, select, termios, tty
|
|
|
|
from tai_pkg.agent import Agent
|
|
|
|
from tai_pkg.agents import REGISTRY, default_runner
|
|
|
|
from tai_pkg.app import App
|
|
|
|
from tai_pkg.chat import ChatClient
|
|
|
|
from tai_pkg.claude import Claude
|
|
|
|
from tai_pkg.clirun import Cli
|
|
|
|
from tai_pkg.codex import Codex
|
|
|
|
from tai_pkg.commands import Commands
|
|
|
|
from tai_pkg.config import Config
|
|
|
|
from tai_pkg.consts import Consts
|
|
|
|
from tai_pkg.edge import Audio, EdgeTts
|
|
|
|
from tai_pkg.errors import BackendError, Denied
|
|
|
|
from tai_pkg.gemini import Gemini
|
|
|
|
from tai_pkg.grok import Grok
|
|
|
|
from tai_pkg.install import Install
|
|
|
|
from tai_pkg.models import ModelHealth, ModelScoring
|
|
|
|
from tai_pkg.muse import Muse, _MUSE_THREAD_GUARD, _MUSE_THREAD_LOCKS
|
|
|
|
from tai_pkg.opencode import Opencode, _OPENCODE_ID_ALPHABET, _OPENCODE_SESSION
|
|
|
|
from tai_pkg.plexer import NativePlexerBackend, NativePlexerController, PlexerBackend, PlexerController, PlexerControllerFactory, PlexerError, PlexerSetup, TmuxPlexerController
|
|
|
|
from tai_pkg.release import Release
|
|
|
|
from tai_pkg.render import Ansi, LiveStream, Render, Spinner
|
|
|
|
from tai_pkg.sandbox import Sandbox, _BOX_OPENCODE_CACHE, _BOX_PYTHON_CACHE
|
|
|
|
from tai_pkg.scheduler import Scheduler
|
|
|
|
from tai_pkg.seal import Seal, SealError, SealManager
|
|
|
|
from tai_pkg.shellsnap import ShellSnap
|
|
|
|
from tai_pkg.skills import Skills
|
|
|
|
from tai_pkg.store import Store
|
|
|
|
from tai_pkg.sysinfo import SYSINFO_CHECKS, SysInfo
|
|
|
|
from tai_pkg.telegram import Telegram, TelegramBot
|
|
|
|
from tai_pkg.text import Text
|
|
|
|
from tai_pkg.tools import Tools
|
|
|
|
from tai_pkg.toolschema import TOOL_ENV_GATES, TOOL_SCHEMAS, ToolRegistry
|
|
|
|
# --- tai_pkg.agent ---
|
|
|
|
conversation_text = Agent.conversation_text
|
|
|
|
conversation_tokens = Agent.conversation_tokens
|
|
|
|
compact_messages = Agent.compact_messages
|
|
|
|
resume_turn = Agent.resume_turn
|
|
|
|
# --- tai_pkg.agents ---
|
|
|
|
AGENTS = REGISTRY.agents
|
|
|
|
AGENTS_LOCK = REGISTRY.lock
|
|
|
|
AGENTS_NEXT = REGISTRY.next_id
|
|
|
|
spawn_agent = REGISTRY.spawn_agent
|
|
|
|
poll_agent = REGISTRY.poll_agent
|
|
|
|
list_agents = REGISTRY.list_agents
|
|
|
|
clear_agents = REGISTRY.clear_agents
|
|
|
|
running_agents = REGISTRY.running_agents
|
|
|
|
# --- tai_pkg.app ---
|
|
|
|
boot = App.boot
|
|
|
|
build_parser = App.build_parser
|
|
|
|
banner = App.banner
|
|
|
|
repl = App.repl
|
|
|
|
main = App.main
|
|
|
|
# --- tai_pkg.claude ---
|
|
|
|
claude_binary = Claude.claude_binary
|
|
|
|
claude_parse_output = Claude.claude_parse_output
|
|
|
|
claude_run = Claude.claude_run
|
|
|
|
claude_health = Claude.claude_health
|
|
|
|
# --- tai_pkg.clirun ---
|
|
|
|
_cli_unknown_flag = Cli._cli_unknown_flag
|
|
|
|
_cli_auth_failure = Cli._cli_auth_failure
|
|
|
|
_cli_run = Cli._cli_run
|
|
|
|
_cli_version_detail = Cli._cli_version_detail
|
|
|
|
_cli_version_only_health = Cli._cli_version_only_health
|
|
|
|
# --- tai_pkg.codex ---
|
|
|
|
codex_binary = Codex.codex_binary
|
|
|
|
codex_jsonl_texts = Codex.codex_jsonl_texts
|
|
|
|
codex_parse_output = Codex.codex_parse_output
|
|
|
|
codex_run = Codex.codex_run
|
|
|
|
codex_health = Codex.codex_health
|
|
|
|
# --- tai_pkg.commands ---
|
|
|
|
complete_command = Commands.complete_command
|
|
|
|
handle_command = Commands.handle_command
|
|
|
|
# --- tai_pkg.config ---
|
|
|
|
split_models = Config.split_models
|
|
|
|
parse_backends = Config.parse_backends
|
|
|
|
# --- tai_pkg.consts ---
|
|
|
|
VERSION = Consts.VERSION
|
|
|
|
WORKER_STEPS = Consts.WORKER_STEPS
|
|
|
|
CREATE_SKILL_STEPS = Consts.CREATE_SKILL_STEPS
|
|
|
|
FORK_MAX_DEPTH = Consts.FORK_MAX_DEPTH
|
|
|
|
MUSE_LABEL = Consts.MUSE_LABEL
|
|
|
|
MUSE_CHAT_URL = Consts.MUSE_CHAT_URL
|
|
|
|
MUSE_MODELS_URL = Consts.MUSE_MODELS_URL
|
|
|
|
GROK_LABEL = Consts.GROK_LABEL
|
|
|
|
GROK_CHAT_URL = Consts.GROK_CHAT_URL
|
|
|
|
GROK_MODELS_URL = Consts.GROK_MODELS_URL
|
|
|
|
CLAUDE_LABEL = Consts.CLAUDE_LABEL
|
|
|
|
CLAUDE_CHAT_URL = Consts.CLAUDE_CHAT_URL
|
|
|
|
CLAUDE_MODELS_URL = Consts.CLAUDE_MODELS_URL
|
|
|
|
CODEX_LABEL = Consts.CODEX_LABEL
|
|
|
|
CODEX_CHAT_URL = Consts.CODEX_CHAT_URL
|
|
|
|
CODEX_MODELS_URL = Consts.CODEX_MODELS_URL
|
|
|
|
GEMINI_LABEL = Consts.GEMINI_LABEL
|
|
|
|
GEMINI_CHAT_URL = Consts.GEMINI_CHAT_URL
|
|
|
|
GEMINI_MODELS_URL = Consts.GEMINI_MODELS_URL
|
|
|
|
OLLAMA_LABEL = Consts.OLLAMA_LABEL
|
|
|
|
OLLAMA_BASE = Consts.OLLAMA_BASE
|
|
|
|
OLLAMA_LIST_TTL = Consts.OLLAMA_LIST_TTL
|
|
|
|
CLI_CHAT_URLS = Consts.CLI_CHAT_URLS
|
|
|
|
MUSE_MAX_STEPS = Consts.MUSE_MAX_STEPS
|
|
|
|
MUSE_SESSIONS_FILE = Consts.MUSE_SESSIONS_FILE
|
|
|
|
MUSE_LOCKS_DIR = Consts.MUSE_LOCKS_DIR
|
|
|
|
MUSE_WORKER_TTL = Consts.MUSE_WORKER_TTL
|
|
|
|
MUSE_REAP_GRACE = Consts.MUSE_REAP_GRACE
|
|
|
|
OPENROUTER_LABEL = Consts.OPENROUTER_LABEL
|
|
|
|
OPENROUTER_BASE = Consts.OPENROUTER_BASE
|
|
|
|
OPENROUTER_MODEL = Consts.OPENROUTER_MODEL
|
|
|
|
OPENCODE_LABEL = Consts.OPENCODE_LABEL
|
|
|
|
OPENCODE_CHAT_URL = Consts.OPENCODE_CHAT_URL
|
|
|
|
OPENCODE_MODELS_URL = Consts.OPENCODE_MODELS_URL
|
|
|
|
OPENCODE_AGENT = Consts.OPENCODE_AGENT
|
|
|
|
OPENCODE_PARSE_MAX_SCANS = Consts.OPENCODE_PARSE_MAX_SCANS
|
|
|
|
DEVPLACE_LABEL = Consts.DEVPLACE_LABEL
|
|
|
|
DEVPLACE_BASE = Consts.DEVPLACE_BASE
|
|
|
|
DEVPLACE_FREE_ROUTES = Consts.DEVPLACE_FREE_ROUTES
|
|
|
|
ZEN_LABEL = Consts.ZEN_LABEL
|
|
|
|
ZEN_BASE = Consts.ZEN_BASE
|
|
|
|
ZEN_FREE_MODELS = Consts.ZEN_FREE_MODELS
|
|
|
|
POLLINATIONS_LABEL = Consts.POLLINATIONS_LABEL
|
|
|
|
POLLINATIONS_BASE = Consts.POLLINATIONS_BASE
|
|
|
|
POLLINATIONS_MODELS = Consts.POLLINATIONS_MODELS
|
|
|
|
OPENCODE_USER_AGENT = Consts.OPENCODE_USER_AGENT
|
|
|
|
OPENCODE_CLIENT_NAME = Consts.OPENCODE_CLIENT_NAME
|
|
|
|
MODEL_HEALTH_FILE = Consts.MODEL_HEALTH_FILE
|
|
|
|
MODEL_NEUTRAL_REWARD = Consts.MODEL_NEUTRAL_REWARD
|
|
|
|
MODEL_WEIGHT_PRIOR = Consts.MODEL_WEIGHT_PRIOR
|
|
|
|
MODEL_SPEED_REF_TPS = Consts.MODEL_SPEED_REF_TPS
|
|
|
|
MODEL_LATENCY_REF_MS = Consts.MODEL_LATENCY_REF_MS
|
|
|
|
MODEL_CIRCUIT_THRESHOLD = Consts.MODEL_CIRCUIT_THRESHOLD
|
|
|
|
MODEL_CIRCUIT_COOLDOWN = Consts.MODEL_CIRCUIT_COOLDOWN
|
|
|
|
RETRY_BACKOFF = Consts.RETRY_BACKOFF
|
|
|
|
MODEL_LIST_TIMEOUT = Consts.MODEL_LIST_TIMEOUT
|
|
|
|
OPENROUTER_FREE_CACHE_TTL = Consts.OPENROUTER_FREE_CACHE_TTL
|
|
|
|
RSEARCH_BASE = Consts.RSEARCH_BASE
|
|
|
|
FETCH_METHODS = Consts.FETCH_METHODS
|
|
|
|
CURL_HINT = Consts.CURL_HINT
|
|
|
|
DEFAULT_MODEL = Consts.DEFAULT_MODEL
|
|
|
|
DEFAULT_VOICE = Consts.DEFAULT_VOICE
|
|
|
|
DEFAULT_PASSPHRASE = Consts.DEFAULT_PASSPHRASE
|
|
|
|
BOX_IMAGE = Consts.BOX_IMAGE
|
|
|
|
BOX_NAME = Consts.BOX_NAME
|
|
|
|
TELEGRAM_API = Consts.TELEGRAM_API
|
|
|
|
TELEGRAM_FILE_API = Consts.TELEGRAM_FILE_API
|
|
|
|
SKILL_NAME_RE = Consts.SKILL_NAME_RE
|
|
|
|
BASHRC_MARK_BEGIN = Consts.BASHRC_MARK_BEGIN
|
|
|
|
BASHRC_MARK_END = Consts.BASHRC_MARK_END
|
|
|
|
BASHRC_BLOCK = Consts.BASHRC_BLOCK
|
|
|
|
ZSH_NOTFOUND_BLOCK = Consts.ZSH_NOTFOUND_BLOCK
|
|
|
|
FISH_NOTFOUND_BLOCK = Consts.FISH_NOTFOUND_BLOCK
|
|
|
|
BOX_CONTAINERFILE = Consts.BOX_CONTAINERFILE
|
|
|
|
BOX_PYTHON = Consts.BOX_PYTHON
|
|
|
|
BOX_STT = Consts.BOX_STT
|
|
|
|
BOX_TTS = Consts.BOX_TTS
|
|
|
|
TELEGRAM_UNIT = Consts.TELEGRAM_UNIT
|
|
|
|
SCHEDULER_UNIT = Consts.SCHEDULER_UNIT
|
|
|
|
INSTALL_TARGETS = Consts.INSTALL_TARGETS
|
|
|
|
CONTEXT_CAP = Consts.CONTEXT_CAP
|
|
|
|
COMPACT_RATIO = Consts.COMPACT_RATIO
|
|
|
|
KEEP_TURNS = Consts.KEEP_TURNS
|
|
|
|
MAX_STEPS = Consts.MAX_STEPS
|
|
|
|
TOTAL_STEP_CAP = Consts.TOTAL_STEP_CAP
|
|
|
|
LOOP_NUDGE_AT = Consts.LOOP_NUDGE_AT
|
|
|
|
LOOP_STOP_AT = Consts.LOOP_STOP_AT
|
|
|
|
SYSTEM_MAX_CHARS = Consts.SYSTEM_MAX_CHARS
|
|
|
|
SHELL_TIMEOUT = Consts.SHELL_TIMEOUT
|
|
|
|
SCHEDULER_INTERVAL = Consts.SCHEDULER_INTERVAL
|
|
|
|
HTTP_TIMEOUT = Consts.HTTP_TIMEOUT
|
|
|
|
STREAM_TIMEOUT = Consts.STREAM_TIMEOUT
|
|
|
|
EDGE_HOST = Consts.EDGE_HOST
|
|
|
|
EDGE_WS_PATH = Consts.EDGE_WS_PATH
|
|
|
|
EDGE_TRUSTED_TOKEN = Consts.EDGE_TRUSTED_TOKEN
|
|
|
|
EDGE_CHROMIUM = Consts.EDGE_CHROMIUM
|
|
|
|
PROFILE_RE = Consts.PROFILE_RE
|
|
|
|
BOT_RE = Consts.BOT_RE
|
|
|
|
BOT_MENTION_RE = Consts.BOT_MENTION_RE
|
|
|
|
SECRET_RE = Consts.SECRET_RE
|
|
|
|
LEGACY_PASSWORD_NOTE = Consts.LEGACY_PASSWORD_NOTE
|
|
|
|
VAULT_MEMORY_NOTE = Consts.VAULT_MEMORY_NOTE
|
|
|
|
SAFE_COMMANDS = Consts.SAFE_COMMANDS
|
|
|
|
RECORDERS = Consts.RECORDERS
|
|
|
|
TRANSCRIBERS = Consts.TRANSCRIBERS
|
|
|
|
SYSINFO_TIMEOUT = Consts.SYSINFO_TIMEOUT
|
|
|
|
SYSINFO_BINARIES = Consts.SYSINFO_BINARIES
|
|
|
|
DEFAULT_SYSTEM = Consts.DEFAULT_SYSTEM
|
|
|
|
MERGE_SYSTEM = Consts.MERGE_SYSTEM
|
|
|
|
COMPACT_SYSTEM = Consts.COMPACT_SYSTEM
|
|
|
|
AUTONOMOUS_NOTE = Consts.AUTONOMOUS_NOTE
|
|
|
|
HELP_TEXT = Consts.HELP_TEXT
|
|
|
|
SPILL_LIMIT = Consts.SPILL_LIMIT
|
|
|
|
RECORD_KINDS = Consts.RECORD_KINDS
|
|
|
|
AUDIT_MAX_CHARS = Consts.AUDIT_MAX_CHARS
|
|
|
|
FILE_RECORD_MAX = Consts.FILE_RECORD_MAX
|
|
|
|
SHELL_SNAPSHOT_MAX_FILES = Consts.SHELL_SNAPSHOT_MAX_FILES
|
|
|
|
BACKUP_KEEP = Consts.BACKUP_KEEP
|
|
|
|
_UNSET = Consts._UNSET
|
|
|
|
SHELL_SEGMENT = Consts.SHELL_SEGMENT
|
|
|
|
SHELL_WRAPPERS = Consts.SHELL_WRAPPERS
|
|
|
|
CHUNK_MAX_LINES = Consts.CHUNK_MAX_LINES
|
|
|
|
CHUNK_OVERLAP_LINES = Consts.CHUNK_OVERLAP_LINES
|
|
|
|
CHUNK_MAX_CHARS = Consts.CHUNK_MAX_CHARS
|
|
|
|
VERSION_RE = Consts.VERSION_RE
|
|
|
|
STREAM_HEIGHT = Consts.STREAM_HEIGHT
|
|
|
|
DIFF_CONTEXT = Consts.DIFF_CONTEXT
|
|
|
|
DIFF_MAX_LINES = Consts.DIFF_MAX_LINES
|
|
|
|
BG_ADD = Consts.BG_ADD
|
|
|
|
BG_DEL = Consts.BG_DEL
|
|
|
|
FG_ORANGE = Consts.FG_ORANGE
|
|
|
|
PY_KEYWORDS = Consts.PY_KEYWORDS
|
|
|
|
PY_TOKEN_RE = Consts.PY_TOKEN_RE
|
|
|
|
ANSI_RE = Consts.ANSI_RE
|
|
|
|
MD_BULLETS = Consts.MD_BULLETS
|
|
|
|
EXTERNAL_SKILL_DIRNAMES = Consts.EXTERNAL_SKILL_DIRNAMES
|
|
|
|
SKILL_INSTALL_META_DIRNAME = Consts.SKILL_INSTALL_META_DIRNAME
|
|
|
|
SKILL_BLUEPRINTS = Consts.SKILL_BLUEPRINTS
|
|
|
|
BOX_OPENCODE_NODE_VERSION = Consts.BOX_OPENCODE_NODE_VERSION
|
|
|
|
BOX_OPENCODE_INSTALL_SCRIPT = Consts.BOX_OPENCODE_INSTALL_SCRIPT
|
|
|
|
MEM_EVENTS_CAP = Consts.MEM_EVENTS_CAP
|
|
|
|
SCHEMA = Consts.SCHEMA
|
|
|
|
SCHEMA_INDEXES = Consts.SCHEMA_INDEXES
|
|
|
|
CORE_TOOLS = Consts.CORE_TOOLS
|
|
|
|
LAZY_NAME_STOP = Consts.LAZY_NAME_STOP
|
|
|
|
TOOL_TAGS = Consts.TOOL_TAGS
|
|
|
|
TAG_AUTO_SKIP = Consts.TAG_AUTO_SKIP
|
|
|
|
TAG_AUTO_MAX = Consts.TAG_AUTO_MAX
|
|
|
|
TAG_LINK_MAX = Consts.TAG_LINK_MAX
|
|
|
|
SINGULAR_KEEP = Consts.SINGULAR_KEEP
|
|
|
|
PLEXER_DIR_NAME = Consts.PLEXER_DIR_NAME
|
|
|
|
PLEXER_PREFIX_KEY = Consts.PLEXER_PREFIX_KEY
|
|
|
|
PLEXER_SOCKET_ENV = Consts.PLEXER_SOCKET_ENV
|
|
|
|
PLEXER_ACTIVE_ENV = Consts.PLEXER_ACTIVE_ENV
|
|
|
|
PLEXER_RECV_MAX = Consts.PLEXER_RECV_MAX
|
|
|
|
PLEXER_BASHRC_MARK_BEGIN = Consts.PLEXER_BASHRC_MARK_BEGIN
|
|
|
|
PLEXER_BASHRC_MARK_END = Consts.PLEXER_BASHRC_MARK_END
|
|
|
|
PLEXER_BASHRC_BLOCK = Consts.PLEXER_BASHRC_BLOCK
|
|
|
|
FISH_PLEXER_BLOCK = Consts.FISH_PLEXER_BLOCK
|
|
|
|
COMMANDS = Consts.COMMANDS
|
|
|
|
TAI_SCRIPT = Consts.TAI_SCRIPT
|
|
|
|
TAI_CONSTS = Consts.TAI_CONSTS
|
|
|
|
# --- tai_pkg.edge ---
|
|
|
|
edge_token = EdgeTts.edge_token
|
|
|
|
edge_timestamp = EdgeTts.edge_timestamp
|
|
|
|
edge_ssml = EdgeTts.edge_ssml
|
|
|
|
edge_chunks = EdgeTts.edge_chunks
|
|
|
|
ws_send = EdgeTts.ws_send
|
|
|
|
ws_recv_exact = EdgeTts.ws_recv_exact
|
|
|
|
ws_recv = EdgeTts.ws_recv
|
|
|
|
edge_skew = EdgeTts.edge_skew
|
|
|
|
edge_connect = EdgeTts.edge_connect
|
|
|
|
edge_synthesize = EdgeTts.edge_synthesize
|
|
|
|
play_audio = Audio.play_audio
|
|
|
|
listen_audio = Audio.listen_audio
|
|
|
|
# --- tai_pkg.gemini ---
|
|
|
|
gemini_binary = Gemini.gemini_binary
|
|
|
|
gemini_parse_output = Gemini.gemini_parse_output
|
|
|
|
gemini_run = Gemini.gemini_run
|
|
|
|
gemini_health = Gemini.gemini_health
|
|
|
|
# --- tai_pkg.grok ---
|
|
|
|
grok_binary = Grok.grok_binary
|
|
|
|
grok_parse_output = Grok.grok_parse_output
|
|
|
|
grok_run = Grok.grok_run
|
|
|
|
grok_health = Grok.grok_health
|
|
|
|
# --- tai_pkg.install ---
|
|
|
|
run_host = Install.run_host
|
|
|
|
venv_available = Install.venv_available
|
|
|
|
venv_dir = Install.venv_dir
|
|
|
|
venv_python = Install.venv_python
|
|
|
|
ensure_venv = Install.ensure_venv
|
|
|
|
service_exec = Install.service_exec
|
|
|
|
unit_dir = Install.unit_dir
|
|
|
|
service_state = Install.service_state
|
|
|
|
activate_service = Install.activate_service
|
|
|
|
remove_service_unit = Install.remove_service_unit
|
|
|
|
script_version = Install.script_version
|
|
|
|
shell_rc_path = Install.shell_rc_path
|
|
|
|
shell_present = Install.shell_present
|
|
|
|
_rc_block_present = Install._rc_block_present
|
|
|
|
_rc_block_remove = Install._rc_block_remove
|
|
|
|
_rc_block_upsert = Install._rc_block_upsert
|
|
|
|
hook_present = Install.hook_present
|
|
|
|
remove_bashrc_block = Install.remove_bashrc_block
|
|
|
|
zsh_hook_present = Install.zsh_hook_present
|
|
|
|
remove_zsh_hook_block = Install.remove_zsh_hook_block
|
|
|
|
upsert_zsh_hook_block = Install.upsert_zsh_hook_block
|
|
|
|
fish_hook_present = Install.fish_hook_present
|
|
|
|
remove_fish_hook_block = Install.remove_fish_hook_block
|
|
|
|
upsert_fish_hook_block = Install.upsert_fish_hook_block
|
|
|
|
plexer_hook_present = Install.plexer_hook_present
|
|
|
|
remove_plexer_bashrc_block = Install.remove_plexer_bashrc_block
|
|
|
|
upsert_plexer_bashrc_block = Install.upsert_plexer_bashrc_block
|
|
|
|
zsh_plexer_hook_present = Install.zsh_plexer_hook_present
|
|
|
|
remove_zsh_plexer_block = Install.remove_zsh_plexer_block
|
|
|
|
upsert_zsh_plexer_block = Install.upsert_zsh_plexer_block
|
|
|
|
fish_plexer_hook_present = Install.fish_plexer_hook_present
|
|
|
|
remove_fish_plexer_block = Install.remove_fish_plexer_block
|
|
|
|
upsert_fish_plexer_block = Install.upsert_fish_plexer_block
|
|
|
|
box_venv_state = Install.box_venv_state
|
|
|
|
shell_hook_status_line = Install.shell_hook_status_line
|
|
|
|
status_lines = Install.status_lines
|
|
|
|
vault_line = Install.vault_line
|
|
|
|
op_binary = Install.op_binary
|
|
|
|
op_hook = Install.op_hook
|
|
|
|
op_plexer_hook = Install.op_plexer_hook
|
|
|
|
op_shell_hook = Install.op_shell_hook
|
|
|
|
op_zsh_hook = Install.op_zsh_hook
|
|
|
|
op_fish_hook = Install.op_fish_hook
|
|
|
|
op_zsh_plexer_hook = Install.op_zsh_plexer_hook
|
|
|
|
op_fish_plexer_hook = Install.op_fish_plexer_hook
|
|
|
|
op_venv = Install.op_venv
|
|
|
|
op_service = Install.op_service
|
|
|
|
op_scheduler_service = Install.op_scheduler_service
|
|
|
|
op_telegram_service = Install.op_telegram_service
|
|
|
|
op_container = Install.op_container
|
|
|
|
install_report = Install.install_report
|
|
|
|
install_telegram = Install.install_telegram
|
|
|
|
uninstall_telegram = Install.uninstall_telegram
|
|
|
|
upsert_bashrc_block = Install.upsert_bashrc_block
|
|
|
|
install_self = Install.install_self
|
|
|
|
# --- tai_pkg.models ---
|
|
|
|
model_speed_reward = ModelScoring.model_speed_reward
|
|
|
|
model_latency_reward = ModelScoring.model_latency_reward
|
|
|
|
model_outcome_reward = ModelScoring.model_outcome_reward
|
|
|
|
model_weight = ModelScoring.model_weight
|
|
|
|
fetch_model_ids = ModelScoring.fetch_model_ids
|
|
|
|
embedded_failure_message = ModelScoring.embedded_failure_message
|
|
|
|
prefer_muse = ModelScoring.prefer_muse
|
|
|
|
openrouter_free_tier = ModelScoring.openrouter_free_tier
|
|
|
|
models_report = ModelScoring.models_report
|
|
|
|
probe_backend = ModelScoring.probe_backend
|
|
|
|
# --- tai_pkg.muse ---
|
|
|
|
muse_binary = Muse.muse_binary
|
|
|
|
muse_output_schema = Muse.muse_output_schema
|
|
|
|
muse_prompt = Muse.muse_prompt
|
|
|
|
muse_argv = Muse.muse_argv
|
|
|
|
muse_write_file = Muse.muse_write_file
|
|
|
|
muse_message_hash = Muse.muse_message_hash
|
|
|
|
muse_map_path = Muse.muse_map_path
|
|
|
|
muse_load_map = Muse.muse_load_map
|
|
|
|
muse_save_map = Muse.muse_save_map
|
|
|
|
muse_acquire = Muse.muse_acquire
|
|
|
|
muse_transact = Muse.muse_transact
|
|
|
|
muse_session_root = Muse.muse_session_root
|
|
|
|
muse_session_alive = Muse.muse_session_alive
|
|
|
|
muse_session_split = Muse.muse_session_split
|
|
|
|
muse_valid_answer = Muse.muse_valid_answer
|
|
|
|
muse_gate = Muse.muse_gate
|
|
|
|
muse_reap = Muse.muse_reap
|
|
|
|
muse_run = Muse.muse_run
|
|
|
|
muse_health = Muse.muse_health
|
|
|
|
# --- tai_pkg.opencode ---
|
|
|
|
opencode_binary = Opencode.opencode_binary
|
|
|
|
opencode_prompt = Opencode.opencode_prompt
|
|
|
|
opencode_parse = Opencode.opencode_parse
|
|
|
|
opencode_parse_events = Opencode.opencode_parse_events
|
|
|
|
opencode_run = Opencode.opencode_run
|
|
|
|
opencode_free_models = Opencode.opencode_free_models
|
|
|
|
opencode_headers = Opencode.opencode_headers
|
|
|
|
# --- tai_pkg.plexer ---
|
|
|
|
plexer_dir = PlexerSetup.plexer_dir
|
|
|
|
plexer_should_wrap = PlexerSetup.plexer_should_wrap
|
|
|
|
# --- tai_pkg.release ---
|
|
|
|
next_version = Release.next_version
|
|
|
|
atomic_write = Release.atomic_write
|
|
|
|
sealed_write = Release.sealed_write
|
|
|
|
quarantine = Release.quarantine
|
|
|
|
release_bump = Release.release_bump
|
|
|
|
backups_dir = Release.backups_dir
|
|
|
|
prune_backups = Release.prune_backups
|
|
|
|
snapshot_self = Release.snapshot_self
|
|
|
|
backup_has_digest = Release.backup_has_digest
|
|
|
|
ensure_self_backup = Release.ensure_self_backup
|
|
|
|
do_release = Release.do_release
|
|
|
|
# --- tai_pkg.render ---
|
|
|
|
paint = Render.paint
|
|
|
|
stream_status = Render.stream_status
|
|
|
|
truncate_ansi = Render.truncate_ansi
|
|
|
|
run_live = Render.run_live
|
|
|
|
color_enabled = Render.color_enabled
|
|
|
|
highlight_python = Render.highlight_python
|
|
|
|
split_diff_lines = Render.split_diff_lines
|
|
|
|
render_diff = Render.render_diff
|
|
|
|
pad_tinted = Render.pad_tinted
|
|
|
|
strip_ansi = Render.strip_ansi
|
|
|
|
style_text = Render.style_text
|
|
|
|
style_span = Render.style_span
|
|
|
|
wrap_ansi = Render.wrap_ansi
|
|
|
|
md_inline = Render.md_inline
|
|
|
|
md_split_row = Render.md_split_row
|
|
|
|
md_is_separator = Render.md_is_separator
|
|
|
|
md_align_cell = Render.md_align_cell
|
|
|
|
md_table_block = Render.md_table_block
|
|
|
|
render_markdown = Render.render_markdown
|
|
|
|
# --- tai_pkg.sandbox ---
|
|
|
|
container_engine = Sandbox.container_engine
|
|
|
|
box_state = Sandbox.box_state
|
|
|
|
ensure_box = Sandbox.ensure_box
|
|
|
|
box_exec = Sandbox.box_exec
|
|
|
|
box_python = Sandbox.box_python
|
|
|
|
box_transcribe = Sandbox.box_transcribe
|
|
|
|
box_speak = Sandbox.box_speak
|
|
|
|
box_opencode_binary = Sandbox.box_opencode_binary
|
|
|
|
box_opencode_run = Sandbox.box_opencode_run
|
|
|
|
# --- tai_pkg.scheduler ---
|
|
|
|
parse_schedule_at = Scheduler.parse_schedule_at
|
|
|
|
parse_duration = Scheduler.parse_duration
|
|
|
|
format_delay = Scheduler.format_delay
|
|
|
|
local_display = Scheduler.local_display
|
|
|
|
format_schedule_lines = Scheduler.format_schedule_lines
|
|
|
|
note_schedule_result = Scheduler.note_schedule_result
|
|
|
|
watch_schedule = Scheduler.watch_schedule
|
|
|
|
scheduler_tick = Scheduler.scheduler_tick
|
|
|
|
run_scheduler_loop = Scheduler.run_scheduler_loop
|
|
|
|
start_scheduler = Scheduler.start_scheduler
|
|
|
|
# --- tai_pkg.seal ---
|
|
|
|
resolve_passphrase = SealManager.resolve_passphrase
|
|
|
|
rotate_seal = SealManager.rotate_seal
|
|
|
|
# --- tai_pkg.shellsnap ---
|
|
|
|
shell_target_paths = ShellSnap.shell_target_paths
|
|
|
|
segment_targets = ShellSnap.segment_targets
|
|
|
|
spill_output = ShellSnap.spill_output
|
|
|
|
spilled_view = ShellSnap.spilled_view
|
|
|
|
spill_or_truncate = ShellSnap.spill_or_truncate
|
|
|
|
# --- tai_pkg.skills ---
|
|
|
|
parse_skill_front = Skills.parse_skill_front
|
|
|
|
parse_skill_file = Skills.parse_skill_file
|
|
|
|
skill_scope_dir = Skills.skill_scope_dir
|
|
|
|
default_skill_scope = Skills.default_skill_scope
|
|
|
|
skill_extra_files = Skills.skill_extra_files
|
|
|
|
skill_install_meta_path = Skills.skill_install_meta_path
|
|
|
|
load_skill_install_meta = Skills.load_skill_install_meta
|
|
|
|
save_skill_install_meta = Skills.save_skill_install_meta
|
|
|
|
is_external_skill_root = Skills.is_external_skill_root
|
|
|
|
skill_provenance_note = Skills.skill_provenance_note
|
|
|
|
discover_skills = Skills.discover_skills
|
|
|
|
skill_catalog = Skills.skill_catalog
|
|
|
|
create_skill_prompt = Skills.create_skill_prompt
|
|
|
|
# --- tai_pkg.store ---
|
|
|
|
ensure_column = Store.ensure_column
|
|
|
|
fts_escape = Store.fts_escape
|
|
|
|
fts_match = Store.fts_match
|
|
|
|
open_mem_events = Store.open_mem_events
|
|
|
|
setup_fts = Store.setup_fts
|
|
|
|
table_pk_columns = Store.table_pk_columns
|
|
|
|
rebuild_with_profile = Store.rebuild_with_profile
|
|
|
|
migrate_profiles = Store.migrate_profiles
|
|
|
|
ensure_schema = Store.ensure_schema
|
|
|
|
# --- tai_pkg.sysinfo ---
|
|
|
|
tmux_pane_header = SysInfo.tmux_pane_header
|
|
|
|
sysinfo_check_os = SysInfo.sysinfo_check_os
|
|
|
|
sysinfo_check_python = SysInfo.sysinfo_check_python
|
|
|
|
sysinfo_check_venv = SysInfo.sysinfo_check_venv
|
|
|
|
sysinfo_check_root = SysInfo.sysinfo_check_root
|
|
|
|
sysinfo_check_container = SysInfo.sysinfo_check_container
|
|
|
|
sysinfo_check_binaries = SysInfo.sysinfo_check_binaries
|
|
|
|
sysinfo_check_cpu = SysInfo.sysinfo_check_cpu
|
|
|
|
sysinfo_check_disk = SysInfo.sysinfo_check_disk
|
|
|
|
collect_sysinfo = SysInfo.collect_sysinfo
|
|
|
|
# --- tai_pkg.telegram ---
|
|
|
|
telegram_env_path = TelegramBot.telegram_env_path
|
|
|
|
load_telegram_token = TelegramBot.load_telegram_token
|
|
|
|
telegram_send = TelegramBot.telegram_send
|
|
|
|
telegram_transcribe = TelegramBot.telegram_transcribe
|
|
|
|
handle_telegram_update = TelegramBot.handle_telegram_update
|
|
|
|
run_telegram_bot = TelegramBot.run_telegram_bot
|
|
|
|
# --- tai_pkg.text ---
|
|
|
|
_fromisoformat = Text._fromisoformat
|
|
|
|
curl_hint = Text.curl_hint
|
|
|
|
now_iso = Text.now_iso
|
|
|
|
short_error = Text.short_error
|
|
|
|
truncate = Text.truncate
|
|
|
|
capped_text = Text.capped_text
|
|
|
|
trunc_marker = Text.trunc_marker
|
|
|
|
read_capped = Text.read_capped
|
|
|
|
chunk_lines = Text.chunk_lines
|
|
|
|
collapse_repeated_lines = Text.collapse_repeated_lines
|
|
|
|
estimate_tokens = Text.estimate_tokens
|
|
|
|
as_int = Text.as_int
|
|
|
|
tool_args_text = Text.tool_args_text
|
|
|
|
action_signature = Text.action_signature
|
|
|
|
result_digest = Text.result_digest
|
|
|
|
human_size = Text.human_size
|
|
|
|
is_free_model = Text.is_free_model
|
|
|
|
secret_env_name = Text.secret_env_name
|
|
|
|
normalize_tag = Text.normalize_tag
|
|
|
|
normalize_tags = Text.normalize_tags
|
|
|
|
singular_noun = Text.singular_noun
|
|
|
|
tag_variants = Text.tag_variants
|
|
|
|
parse_node_id = Text.parse_node_id
|
|
|
|
# --- tai_pkg.toolschema ---
|
|
|
|
tool_schema = ToolRegistry.tool_schema
|
|
|
|
tool_env_ok = ToolRegistry.tool_env_ok
|
|
|
|
tool_catalog = ToolRegistry.tool_catalog
|
|
|
|
select_tools = ToolRegistry.select_tools
|
|
|
|
if __name__ == "__main__":
|
|
sys.exit(App.main())
|