Skip to content

Pinvou/pinvou-agent / pinvou3-app/src-tauri/resources/common/bundle/tmeet-skills/tmeet-skill

tmeet-skill

Verified

何时用:用户明确要通过命令行操作腾讯会议(tmeet),或 Agent 遇到工具缺失/调用失败/能力不足想反馈平台时。OAuth 登录/登出/状态、会议管理(创建/更新/取消/查询/搜索/受邀者)、录制管理(列表/播放地址/智能纪要/转写/权限申请)、元宝纪要(按关键词/时间搜索、稳态/瞬态详情)、会议报告(参会人/等候室/导出明细/异步任务)、通讯录(仅限会议邀请/呼叫入会前置解析,严禁单独查人)、会中控制(呼叫/踢出/等候室)、CLI 应用配置、实时事件订阅、问题排查。泛指需求默认走本地工具。

scripts/agent_init.py

View on GitHub
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Initialize tmeet CLI agent.json with the calling AI-Agent and LLM model info.

Usage:
    python3 agent_init.py --agent <agent-name> --model <model-name>

Behavior:
    1. Resolve config dir from env TMEET_CLI_CONFIG_DIR; fallback to ~/.tmeet/.
    2. Ensure the directory exists (permission 0700).
    3. Atomically write <config_dir>/agent.json in the AgentConfig JSON shape:
           {"agent": "...", "model": "..."}
       Empty fields are omitted (mirrors Go's `omitempty`).
"""

import argparse
import json
import os
import sys
import tempfile
from pathlib import Path


CONFIG_DIR_ENV = "TMEET_CLI_CONFIG_DIR"
DEFAULT_CONFIG_DIR = "~/.tmeet"
AGENT_CONFIG_FILE = "agent.json"


def get_config_dir() -> Path:
    """Return the tmeet config directory.

    Priority:
        1. Env var TMEET_CLI_CONFIG_DIR (if non-empty).
        2. ~/.tmeet/
    """
    env_dir = os.environ.get(CONFIG_DIR_ENV, "").strip()
    if env_dir:
        return Path(env_dir).expanduser()
    return Path(DEFAULT_CONFIG_DIR).expanduser()


def save_agent_config(config_dir: Path, agent: str, model: str) -> Path:
    """Atomically write AgentConfig to <config_dir>/agent.json.

    Uses tmp-file + os.replace to mirror the Go implementation's atomic write.
    Empty fields are omitted from the JSON output.
    """
    config_dir.mkdir(parents=True, exist_ok=True)
    try:
        os.chmod(config_dir, 0o700)
    except OSError:
        # Best-effort; ignore on filesystems that do not support chmod (e.g. Windows).
        pass

    payload: dict = {}
    if agent:
        payload["agent"] = agent
    if model:
        payload["model"] = model

    data = json.dumps(payload, indent=2, ensure_ascii=False)

    target = config_dir / AGENT_CONFIG_FILE

    # Write to a temp file in the same directory, then atomically rename.
    fd, tmp_path = tempfile.mkstemp(
        prefix="." + AGENT_CONFIG_FILE + "-",
        suffix=".tmp",
        dir=str(config_dir),
    )
    try:
        with os.fdopen(fd, "w", encoding="utf-8") as f:
            f.write(data)
            f.flush()
            os.fsync(f.fileno())
        try:
            os.chmod(tmp_path, 0o600)
        except OSError:
            pass
        os.replace(tmp_path, target)
    except Exception:
        # Clean up temp file on failure.
        try:
            os.remove(tmp_path)
        except OSError:
            pass
        raise

    return target


def parse_args() -> argparse.Namespace:
    parser = argparse.ArgumentParser(
        description="Write tmeet AgentConfig (agent.json).",
    )
    parser.add_argument(
        "--agent",
        default="",
        help="AI-Agent name (e.g. Cursor, Claude Desktop, Cline).",
    )
    parser.add_argument(
        "--model",
        default="",
        help="LLM model name (e.g. Claude 3.5 Sonnet, GPT-4o).",
    )
    return parser.parse_args()


def main() -> int:
    args = parse_args()
    config_dir = get_config_dir()
    try:
        path = save_agent_config(config_dir, args.agent.strip(), args.model.strip())
    except OSError as e:
        print(f"failed to save agent config: {e}", file=sys.stderr)
        return 1
    print(f"agent config saved: {path}")
    return 0


if __name__ == "__main__":
    sys.exit(main())
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall