openteam-control

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

OpenTeam CLI 本机控制

OpenTeam CLI Local Control

概览

Overview

OpenTeam 通过已安装的
openteamcli
命令和本地 daemon 控制。不要直接点击浏览器界面,也不要绕过本地控制协议去调用 Chrome 扩展内部 API。
当任务需要多个 AI 角色在 OpenTeam 里讨论、评审、批判、头脑风暴、比较方案,或分别给出独立观点时,使用这个 skill。
OpenTeam is controlled via the installed
openteamcli
command and local daemon. Do not directly click the browser interface, nor bypass the local control protocol to call the internal API of the Chrome extension.
Use this skill when a task requires multiple AI roles to discuss, review, critique, brainstorm, compare solutions, or provide independent perspectives in OpenTeam.

本机命令要求

Local Command Requirements

默认直接调用已安装到本机 PATH 里的
openteamcli
。如果命令不存在,请提示用户先从 npm 安装:
bash
npm install -g @afumu/openteamcli
开发期可以在 OpenTeam 仓库里执行:
bash
npm install -g ./packages/openteamcli
或者使用软链接安装:
bash
npm link ./packages/openteamcli
By default, it directly calls
openteamcli
installed in the local PATH. If the command does not exist, prompt the user to install it from npm first:
bash
npm install -g @afumu/openteamcli
During development, you can execute in the OpenTeam repository:
bash
npm install -g ./packages/openteamcli
Or install using a soft link:
bash
npm link ./packages/openteamcli

先启动并检查连接

Start and Check Connection First

任何操作前先运行:
bash
openteamcli daemon start
openteamcli doctor
daemon start
是幂等命令。如果 daemon 已经运行,它只会返回
alreadyRunning
,不会重复启动后台进程。
如果结果里
extension.connected
false
  1. 请用户打开 OpenTeam 插件页面。
  2. 确认设置里已开启
    本机智能体控制
  3. 再运行一次
    doctor
如果 daemon 状态异常,优先运行:
bash
openteamcli daemon restart
openteamcli doctor
Run the following before any operation:
bash
openteamcli daemon start
openteamcli doctor
daemon start
is an idempotent command. If the daemon is already running, it will only return
alreadyRunning
and will not restart the background process.
If
extension.connected
is
false
in the result:
  1. Ask the user to open the OpenTeam plugin page.
  2. Confirm that
    Local Agent Control
    is enabled in the settings.
  3. Run
    doctor
    again.
If the daemon status is abnormal, prioritize running:
bash
openteamcli daemon restart
openteamcli doctor

推荐的新任务流程

Recommended New Task Flow

新任务优先使用“一次性创建群聊、添加角色、发布任务、等待回复”的流程。这样最适合外部 Agent 或 CLI 调用。
先创建一个 JSON 文件,例如
task.json
json
{
  "chat": {
    "name": "方案评审",
    "mode": "independent"
  },
  "roles": [
    {
      "source": "temporary",
      "name": "工程师",
      "systemPrompt": "从工程实现、复杂度、风险和测试角度评估。"
    },
    {
      "source": "temporary",
      "name": "产品经理",
      "systemPrompt": "从用户价值、范围控制和交付节奏角度评估。"
    }
  ],
  "task": {
    "target": "all",
    "content": "请评估这个方案,给出风险、建议和最终判断。"
  },
  "options": {
    "waitForReplies": true,
    "activateChat": true,
    "openTeamPage": true
  }
}
然后运行:
bash
openteamcli run create-and-post --file task.json --wait
向用户汇报时,优先按角色保留观点差异,不要把所有回复压平成一段通用总结。
For new tasks, prioritize the process of "one-time creation of group chat, adding roles, publishing tasks, waiting for replies". This is most suitable for external Agent or CLI calls.
First create a JSON file, e.g.,
task.json
:
json
{
  "chat": {
    "name": "Solution Review",
    "mode": "independent"
  },
  "roles": [
    {
      "source": "temporary",
      "name": "Engineer",
      "systemPrompt": "Evaluate from the perspectives of engineering implementation, complexity, risk and testing."
    },
    {
      "source": "temporary",
      "name": "Product Manager",
      "systemPrompt": "Evaluate from the perspectives of user value, scope control and delivery rhythm."
    }
  ],
  "task": {
    "target": "all",
    "content": "Please evaluate this solution and provide risks, suggestions and final judgments."
  },
  "options": {
    "waitForReplies": true,
    "activateChat": true,
    "openTeamPage": true
  }
}
Then run:
bash
openteamcli run create-and-post --file task.json --wait
When reporting to the user, prioritize preserving perspective differences by role, do not flatten all replies into a single general summary.

临时角色

Temporary Roles

如果人员库里没有现成模板,不要要求用户先手动创建模板。直接在任务 JSON 里使用临时角色:
json
{
  "source": "temporary",
  "name": "研究员",
  "description": "负责查漏补缺和事实核对。",
  "chatSite": "deepseek",
  "systemPrompt": "你是研究员,负责核对事实、找出假设漏洞,并列出需要补充的信息。"
}
临时角色只属于当前群聊,不会写入人员库。
chatSite
可用值:
deepseek
chatgpt
gemini
claude
grok
如果模拟真实公众人物、公司创始人或专家风格,必须在
systemPrompt
里明确:
  • 这是公开思想风格的模拟角色。
  • 不是真人本人。
  • 不代表其公司或组织发言。
  • 不声称拥有私人经历、实时信息或内部信息。
If there is no ready-made template in the personnel library, do not require the user to manually create a template first. Directly use temporary roles in the task JSON:
json
{
  "source": "temporary",
  "name": "Researcher",
  "description": "Responsible for filling gaps and fact-checking.",
  "chatSite": "deepseek",
  "systemPrompt": "You are a researcher, responsible for verifying facts, identifying hypothesis loopholes, and listing information that needs to be supplemented."
}
Temporary roles belong only to the current group chat and will not be written into the personnel library. Available values for
chatSite
:
deepseek
,
chatgpt
,
gemini
,
claude
,
grok
.
If simulating the style of real public figures, company founders or experts, it must be clearly stated in the
systemPrompt
:
  • This is a simulated role of public ideological style.
  • It is not the real person themselves.
  • It does not speak on behalf of their company or organization.
  • It does not claim to have personal experience, real-time information or internal information.

继续已有群聊

Continue Existing Group Chat

当用户给出
chatId
,或希望继续之前的 OpenTeam 群聊时,使用已有群聊流程:
bash
openteamcli task post --chat <chatId> --target all --content "继续追问的问题"
openteamcli task wait --chat <chatId> --message <messageId> --timeout 300000
openteamcli task read --chat <chatId> --message <messageId>
如果
task post
的 CLI 进程迟迟不返回,但
chat get
已经能看到用户消息和角色回复,说明群聊执行链路可能已经完成。此时用
task read
按消息 ID 读取结果,并检查 daemon 是否有悬挂请求:
bash
openteamcli daemon status
如果
pending
长时间不为
0
,重启 daemon 清理悬挂状态:
bash
openteamcli daemon restart
When the user provides a
chatId
or wants to continue a previous OpenTeam group chat, use the existing group chat process:
bash
openteamcli task post --chat <chatId> --target all --content "Follow-up question"
openteamcli task wait --chat <chatId> --message <messageId> --timeout 300000
openteamcli task read --chat <chatId> --message <messageId>
If the CLI process of
task post
does not return for a long time, but
chat get
can already see user messages and role replies, it indicates that the group chat execution link may have been completed. At this point, use
task read
to read the result by message ID, and check if the daemon has pending requests:
bash
openteamcli daemon status
If
pending
is not
0
for a long time, restart the daemon to clear the pending status:
bash
openteamcli daemon restart

常用命令

Common Commands

bash
openteamcli daemon start
openteamcli doctor
openteamcli daemon status
openteamcli daemon restart
openteamcli chat list
openteamcli chat get <chatId>
openteamcli chat create --name "群聊名" --mode independent
openteamcli chat activate --chat <chatId>
openteamcli chat initialize --chat <chatId>
openteamcli role list --chat <chatId>
openteamcli role batch-add --chat <chatId> --file roles.json
openteamcli task post --chat <chatId> --target all --content "任务"
openteamcli task wait --chat <chatId> --message <messageId> --timeout 300000
openteamcli task read --chat <chatId> --message <messageId>
roles.json
可以是数组:
json
[
  {
    "source": "temporary",
    "name": "研究员",
    "systemPrompt": "负责查漏补缺和事实核对。"
  }
]
bash
openteamcli daemon start
openteamcli doctor
openteamcli daemon status
openteamcli daemon restart
openteamcli chat list
openteamcli chat get <chatId>
openteamcli chat create --name "Group Chat Name" --mode independent
openteamcli chat activate --chat <chatId>
openteamcli chat initialize --chat <chatId>
openteamcli role list --chat <chatId>
openteamcli role batch-add --chat <chatId> --file roles.json
openteamcli task post --chat <chatId> --target all --content "Task"
openteamcli task wait --chat <chatId> --message <messageId> --timeout 300000
openteamcli task read --chat <chatId> --message <messageId>
roles.json
can be an array:
json
[
  {
    "source": "temporary",
    "name": "Researcher",
    "systemPrompt": "Responsible for filling gaps and fact-checking."
  }
]

错误恢复

Error Recovery

优先看机器可读的
error.code
错误码处理方式
extension_not_connected
请用户打开 OpenTeam 插件页面,确认已开启本机智能体控制,然后重跑
doctor
control_disabled
请用户在 OpenTeam 设置里开启
本机智能体控制
role_not_ready
运行
chat initialize --chat <chatId>
,或请用户等待角色 iframe 初始化完成。
task_timeout
运行
task read
,汇报已收到的部分回复和仍在等待的角色。
permission_denied
不要盲目重试。本地 token 或 daemon 状态可能异常,先运行
daemon restart
fetch failed
先运行
doctor
daemon status
。如果 daemon 退出或插件断开,重启 daemon 并重新打开 OpenTeam 页面。
Prioritize checking the machine-readable
error.code
.
Error CodeHandling Method
extension_not_connected
Ask the user to open the OpenTeam plugin page, confirm that Local Agent Control is enabled, then re-run
doctor
.
control_disabled
Ask the user to enable
Local Agent Control
in OpenTeam settings.
role_not_ready
Run
chat initialize --chat <chatId>
, or ask the user to wait for the role iframe initialization to complete.
task_timeout
Run
task read
and report the received partial replies and roles still waiting.
permission_denied
Do not retry blindly. The local token or daemon status may be abnormal; first run
daemon restart
.
fetch failed
First run
doctor
and
daemon status
. If the daemon exits or the plugin is disconnected, restart the daemon and reopen the OpenTeam page.

操作规则

Operation Rules

  • 新任务优先使用
    run create-and-post --file ... --wait
  • 多角色、长提示词或复杂任务必须使用 JSON 文件承载输入。
  • 不要把密钥、token、cookie 或用户隐私信息写进任务提示词。
  • 本地 daemon 只能监听
    127.0.0.1
    ,不要暴露到公网或局域网。
  • 除非用户明确希望浏览器会话里的 AI 角色行动,否则不要替用户向 OpenTeam 发布任务。
  • 汇报结果时说明哪些角色已回复、哪些角色仍在等待、是否超时。
  • Prioritize using
    run create-and-post --file ... --wait
    for new tasks.
  • Multi-role, long prompt or complex tasks must use JSON files to carry input.
  • Do not write keys, tokens, cookies or user privacy information into task prompts.
  • The local daemon can only listen to
    127.0.0.1
    ; do not expose it to the public network or local area network.
  • Do not publish tasks to OpenTeam on behalf of the user unless the user explicitly wants the AI roles in the browser session to act.
  • When reporting results, specify which roles have replied, which roles are still waiting, and whether there was a timeout.