Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
5350e41
fix(log): restructure log directory retention
Jun 3, 2026
2282ec2
fix(log): address retention review feedback
Jun 4, 2026
602cc5a
Merge pull request #368 from AgentFlocks/fix/logging-retention-stability
xiami762 Jun 4, 2026
244d132
fix(updater): avoid Windows project install during dependency sync (#…
xiami762 Jun 4, 2026
025e4f3
fix(tdp): normalize base_url by stripping UI/API path suffixes (#376)
xiami762 Jun 5, 2026
decc503
feat(workspace): jsonl text preview and Files tab load stability (#367)
xiami762 Jun 5, 2026
53c7b2e
fix(session): recover orphaned running tools after server restart (#370)
xiami762 Jun 5, 2026
b09b9ea
feat(webui): improve workflow graph layout and editor edge UX (#379)
xiami762 Jun 5, 2026
f27ab70
Feat/workflow trigger integration (#375)
xiami762 Jun 5, 2026
8aaa1bf
feat(device): add multi-room support and i18n for device integration
duguwanglong Jun 5, 2026
281611f
Merge pull request #380 from AgentFlocks/feat/device-multi-room
xiami762 Jun 5, 2026
b29d961
feat(device): auto-inject device_id into tool test params
duguwanglong Jun 5, 2026
f5b1320
Merge pull request #382 from AgentFlocks/feat/device-tool-test-auto-d…
xiami762 Jun 5, 2026
bb0d8c3
fix(device): preserve device_id when applying a test fixture
duguwanglong Jun 5, 2026
767aa0b
fix(device): sync toolEnabled state into ToolDetailModal on open
duguwanglong Jun 5, 2026
e346088
feat(webui,device,web2cli): custom device access wizard and credentia…
xiami762 Jun 5, 2026
4d43671
fix(credential-context): resolve config override for versioned SERVIC…
duguwanglong Jun 5, 2026
57664c8
feat(session): add concise workflow tool output (#381)
xiami762 Jun 5, 2026
d40ca8d
fix: correct merge order and operator precedence from review
duguwanglong Jun 5, 2026
7c849b1
refactor(credential-context): address S2/S3/S4 from PR review
duguwanglong Jun 5, 2026
0f10cd0
test: fix ContextVar isolation and remove unused import
duguwanglong Jun 5, 2026
78ca7ed
Merge pull request #383 from AgentFlocks/fix/device-tool-test-fixture…
xiami762 Jun 5, 2026
4daef11
feat(channel): complete bidirectional file/image support for wecom, d…
xiami762 Jun 6, 2026
193fc55
docs(channel): add review guide for file/image attachment support
xiami762 Jun 6, 2026
cd6a3a8
docs(channel): remove standalone review guide (move content into PR d…
xiami762 Jun 6, 2026
2c1480c
docs(contributing): restructure PR description guidelines around chan…
xiami762 Jun 6, 2026
f0b57df
build(deps): bump starlette to >=1.0.1
xiami762 Jun 7, 2026
c3ac89d
fix(webui): remove global flex-col wrapper from standard pages (#384)
xiami762 Jun 8, 2026
47be58e
feat(user-defined-pages): add custom page runtime (#389)
Jieatgit Jun 8, 2026
e061ffa
Fix Telegram file roundtrip media upload
xiami762 Jun 8, 2026
e3cfcda
Fix channel media filename and caption handling
xiami762 Jun 8, 2026
de7b075
fix(provider): thinking params (#387)
xiami762 Jun 8, 2026
40c1c5f
feat(workflow): improve diagram usability
duguwanglong Jun 8, 2026
15e0dc0
chore(gitignore): ignore .codex/ directory
xiami762 Jun 8, 2026
a46c244
Merge pull request #393 from AgentFlocks/chore/ignore-codex
stephamie7 Jun 8, 2026
d107d0c
Fix fallback port conflict detection (#394)
xiami762 Jun 9, 2026
6839175
Improve chat model picker controls (#391)
xiami762 Jun 9, 2026
532bf38
Merge pull request #386 from AgentFlocks/feat/channel-file-roundtrip
xiami762 Jun 9, 2026
67b55cd
refactor: unify subagent delegation under delegate_task (#385)
xiami762 Jun 9, 2026
ea2b7d0
feat(workflow): support config-driven publish templates
duguwanglong Jun 9, 2026
54dfd66
feat(workflow): add editable workflow document flow
duguwanglong Jun 9, 2026
ddd44d6
Merge branch 'dev' of github.com:AgentFlocks/flocks into feat/workflo…
duguwanglong Jun 9, 2026
e00226a
feat(session): refine chat selector controls
duguwanglong Jun 9, 2026
cc7712f
Fix channel image preview rendering
xiami762 Jun 9, 2026
1f48e4b
Fix DingTalk inbound file detection
xiami762 Jun 9, 2026
24c5bb9
feat(session): refine agent and model selectors
duguwanglong Jun 9, 2026
e58e324
Merge pull request #397 from AgentFlocks/fix/channel-file-image-render
stephamie7 Jun 9, 2026
aed9d41
feat(session): add context usage indicator
duguwanglong Jun 9, 2026
4cb2601
fix(session): stabilize selector button widths
duguwanglong Jun 9, 2026
4638011
fix(session): localize selector control widths
duguwanglong Jun 9, 2026
bd34a35
fix(session): cap adaptive agent selector width
duguwanglong Jun 9, 2026
970c8d1
fix(session): stabilize streaming status (#396)
xiami762 Jun 9, 2026
60a9e94
Merge pull request #398 from AgentFlocks/input-selector-visual-tuning
xiami762 Jun 9, 2026
707c801
Reduce workflow default log noise (#399)
xiami762 Jun 9, 2026
4d798c2
fix: clarify browser doctor and session streaming status (#400)
xiami762 Jun 9, 2026
d373579
revert(workflow): restore pre-pr398 workflow experience
duguwanglong Jun 9, 2026
f51a309
Merge pull request #401 from AgentFlocks/codex-revert-pr398-workflow
xiami762 Jun 9, 2026
3e419ac
feat(device): unify device plugin intake (#392)
xiami762 Jun 9, 2026
d31716c
fix(channel): preserve plugin instances across load_all (#402)
xiami762 Jun 10, 2026
cd47968
Fix session model persistence (#403)
xiami762 Jun 10, 2026
3a3a033
feat(device): Improve device integration auto-sync (#405)
xiami762 Jun 10, 2026
a4d7090
fix: default model reasoning to enabled (#406)
xiami762 Jun 10, 2026
247eadf
fix skill install from GitHub blob URLs (#407)
xiami762 Jun 10, 2026
4e7744b
chore/update-version-2026-6-10 (#408)
stephamie7 Jun 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .flocks/plugins/agents/asset-survey/agent.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: asset-survey
name_cn: 互联网资产测绘智能体
description: >-
Internet asset survey and reconnaissance agent. Translates natural language queries into
structured asset mapping searches. Discovers and analyzes internet-facing assets including
Expand All @@ -23,8 +24,7 @@ tools:
- edit
- write
- bash
- todoread
- todowrite
- todo
- websearch
- webfetch
- threatbook_mcp_hrti_query
Expand Down
4 changes: 2 additions & 2 deletions .flocks/plugins/agents/device-inspector/agent.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: device-inspector
name_cn: 设备巡检智能体
description: >-
Generic device inspection agent for connected security devices. Discovers enabled
devices through device_context, dynamically finds the right device tools, and
Expand All @@ -21,8 +22,7 @@ tools:
- glob
- grep
- bash
- todoread
- todowrite
- todo
- tool_search
- device_context
- run_slash_command
Expand Down
1 change: 1 addition & 0 deletions .flocks/plugins/agents/host-forensics-fast/agent.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: host-forensics-fast
name_cn: 主机快速排查智能体
description: >-
Fast Linux host compromise triage subagent for first-pass investigation. Use when the user
wants a quick, concise, and accurate host security check, rapid cryptomining triage, or an
Expand Down
4 changes: 2 additions & 2 deletions .flocks/plugins/agents/host-forensics/agent.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: host-forensics
name_cn: 主机取证智能体
description: >-
Linux host compromise detection and forensics subagent. Use when the user asks to inspect,
analyze, or investigate whether a host is compromised, cryptomining, backdoors, webshells,
Expand Down Expand Up @@ -29,8 +30,7 @@ tools:
- edit
- write
- bash
- todoread
- todowrite
- todo
- tool_search
- ssh_run_script
- ssh_host_cmd
Expand Down
6 changes: 3 additions & 3 deletions .flocks/plugins/agents/hrti_threat_intelligence/agent.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: hrti-threat-intelligence
name_cn: 热点威胁情报智能体
description: >-
Situational threat intelligence subagent for querying and analyzing trending cybersecurity events.
Understands natural language queries, retrieves hot threat intelligence reports via HRTI_list_query
Expand All @@ -23,8 +24,7 @@ tools:
- edit
- write
- bash
- todoread
- todowrite
- todo
- tool_search
- threatbook_mcp_hrti_list_query
- threatbook_mcp_hrti_query
Expand All @@ -37,4 +37,4 @@ tools:
- virustotal_file_query
- threatbook_mcp_ip_query
- threatbook_mcp_domain_query
- threatbook_mcp_hash_query
- threatbook_mcp_hash_query
4 changes: 2 additions & 2 deletions .flocks/plugins/agents/ndr-analyst/agent.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: ndr-analyst
name_cn: NDR 分析智能体
description: >-
NDR network traffic analyst: analyzes flow logs and alerts, identifies attack techniques,
and determines whether attacks succeeded.
Expand All @@ -22,8 +23,7 @@ tools:
- edit
- write
- bash
- todoread
- todowrite
- todo
- tool_search
- websearch
- webfetch
Expand Down
4 changes: 2 additions & 2 deletions .flocks/plugins/agents/phishing-detector/agent.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: phishing-detector
name_cn: 钓鱼邮件检测智能体
description: >
Specialized agent for detecting and analyzing phishing emails, extracting IOCs, and assessing threat level.
Expand All @@ -20,8 +21,7 @@ tools:
- edit
- write
- bash
- todoread
- todowrite
- todo
- tool_search
- websearch
- webfetch
Expand Down
6 changes: 3 additions & 3 deletions .flocks/plugins/agents/ti-analyst/agent.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: ti-analyst
name_cn: 威胁情报智能体
description: >-
Threat intelligence analyst subagent for IOC analysis, attribution, and threat actor research.
Analyzes IPs, domains, and file hashes to assess threat levels, identify attack origins,
Expand All @@ -24,8 +25,7 @@ tools:
- edit
- write
- bash
- todoread
- todowrite
- todo
- tool_search
- threatbook_mcp_ip_query
- threatbook_mcp_ip_attribution
Expand All @@ -42,4 +42,4 @@ tools:
- virustotal_url_query
- virustotal_file_query
- websearch
- webfetch
- webfetch
6 changes: 3 additions & 3 deletions .flocks/plugins/agents/vul_threat_intelligence/agent.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: vul-threat-intelligence
name_cn: 漏洞情报智能体
description: >-
Vulnerability threat intelligence subagent for querying and analyzing vulnerability data.
Understands natural language queries, extracts structured parameters, and retrieves accurate
Expand All @@ -23,8 +24,7 @@ tools:
- edit
- write
- bash
- todoread
- todowrite
- todo
- tool_search
- threatbook_mcp_vulnlist_query
- threatbook_mcp_vuln_query
Expand All @@ -43,4 +43,4 @@ tools:
- virustotal_ip_query
- virustotal_domain_query
- virustotal_url_query
- virustotal_file_query
- virustotal_file_query
86 changes: 36 additions & 50 deletions .flocks/plugins/skills/browser-use/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: browser-use
description: 统一处理浏览器使用任务,支持 CDP 直连/无头模式 使用用户本机 Chromium 系浏览器。Use when the user asks to browse websites, interact with pages, fill forms, capture screenshots, reuse an existing Chrome/Chromium/Edge login session, access internal/login-only pages, handle access-restricted content, when websearch/webfetch are unavailable, or automate browser actions.
description: 统一处理浏览器使用任务,支持可见浏览器 CDP 直连、专用 headless CDP、agent-browser。Use when the user asks to browse websites, interact with pages, fill forms, capture screenshots, reuse an existing Chrome/Chromium/Edge login session, work with an already-open browser/sidebar browser, access login-only/internal/dynamic pages, or automate browser actions.
---

# Browser Use
Expand All @@ -22,79 +22,65 @@ description: 统一处理浏览器使用任务,支持 CDP 直连/无头模式
| `cdp-direct` | 复用本机 Chromium 系浏览器的 CDP 直连模式 | 用户明确说用 CDP 模式|
| `cdp-headless` | 通过 `BU_CDP_WS` / `BU_CDP_URL` 连接独立 headless Chromium 实例 | 只有用户明确要求 headless,或任务本身是后台任务/定时任务,或系统不支持可视化 |

- 用户明确指出模式后,直接阅读执行规则部分
- 当用户没有明确指出使用模式时,进入下一步自动判定
- 不要默认切到 `cdp-headless`;能用用户正常浏览器完成的任务,优先保持可见浏览器流程
- 用户明确指出模式后,直接阅读执行规则部分
- 当用户没有明确指出使用模式时,进入下一步自动判定

## 自动判定模式
## 自动判定与失败处理

当用户没有明确指出使用模式时,按下面两步自动判定:
当用户没有明确指出使用模式时,按以下 4 步自动判定 + 失败处理:

1. 先判断本次 `cdp-direct` 是否需要 headless 浏览器实例
满足以下任一条件时,判定为“使用 headless 浏览器实例的 `cdp-direct` 流程”:
- 任务天然是后台执行
- 任务属于定时任务、`CI` / `cron`
- 用户明确要求本次使用 headless 浏览器
- 系统不支持可视化,如服务器
### Step 1: 是否需要 headless

2. 如果判定需要 headless,则按以下顺序执行
- 先读取 `references/cdp-headless.md`
- 优先使用显式提供的 `BU_CDP_WS` / `BU_CDP_URL`
- 不要引导用户去操作日常浏览器 profile 的 inspect 授权页
- 如果没有显式 CDP endpoint,再按 `references/cdp-headless.md` 中当前平台对应的后台启动方式启动专用 Chromium 实例;必须让浏览器进程脱离当前 shell 独立存活,并为它分配未被占用的专用 remote debugging 端口,优先复用安装脚本设置的 `AGENT_BROWSER_EXECUTABLE_PATH`
- 连通后读取 `references/cdp-direct.md`,后续页面操作统一按 `cdp-direct` 工作流执行
满足以下任一条件时,判定为“使用 headless 浏览器实例的 `cdp-direct` 流程”:

### 第一步:跑 CDP 可用性检测
- 任务天然是后台执行
- 任务属于定时任务 / `CI` / `cron`
- 用户明确要求本次使用 headless 浏览器
- 系统不支持可视化,如服务器

先执行:
如果判定需要 headless,则按以下顺序执行:

```bash
flocks browser --doctor
```

该命令会检查 `flocks browser` 的 daemon 是否可用、Chrome/Chromium/Edge 是否运行,以及当前是否有可用的浏览器连接。

### 第二步:根据检测结果决定模式

#### 结果 A:doctor 通过
- 先读取 `references/cdp-headless.md`
- 优先使用显式提供的 `BU_CDP_WS` / `BU_CDP_URL`
- 不要引导用户去操作日常浏览器 profile 的 inspect 授权页
- 如果没有显式 CDP endpoint,再按 `references/cdp-headless.md` 中当前平台对应的后台启动方式启动专用 Chromium 实例;必须让浏览器进程脱离当前 shell 独立存活,并为它分配未被占用的专用 remote debugging 端口,优先复用安装脚本设置的 `AGENT_BROWSER_EXECUTABLE_PATH`
- 连通后读取 `references/cdp-direct.md`,后续页面操作统一按 `cdp-direct` 工作流执行

这时立即确定使用 `CDP 直连`,然后马上阅读:
### Step 2: 跑 CDP 可用性检测

- `references/cdp-direct.md`
先执行:

之后只按 CDP 流程执行,不再切到 `agent-browser`。

#### 结果 B:浏览器已运行,但 daemon 或 active browser connection 不可用

必须直接提示用户:

```text
browser: not connected — 请确保 Chrome / Chromium / Edge 已打开,然后访问对应浏览器的 inspect 页面(例如 chrome://inspect/#remote-debugging 或 edge://inspect/#remote-debugging)并勾选 Allow remote debugging
```bash
flocks browser --doctor
```

然后等待用户进一步指示,不要直接操作
该命令会检查 `flocks browser` 的 daemon 是否可用、Chrome/Chromium/Edge 是否运行,以及当前是否有可用的浏览器连接。不要只看命令退出码;必须优先读取 `next action` 行,再结合 `browser running` / `daemon alive` / `active browser connections` 三行判断

当用户确认已开启remote-debugging后:
1. 执行 `flocks browser --setup` 触发交互式 attach,不要用短超时包装该命令
2. 再运行 `flocks browser --doctor` 做只读确认。
3. 如果还失败,先执行 `flocks browser --reload` 清理旧 daemon,再重新执行 `flocks browser --setup`,避免因为残留 daemon 造成干扰。
### Step 3: 根据 doctor 输出决定模式

如果用户在 `Windows PowerShell` 中执行 `flocks browser -c`,优先使用单行代码并用分号分隔;多行单引号字符串容易因为换行/转义处理差异而触发假失败。
| 结果 | 触发条件 | 一线修复 | 仍失败兜底 |
|---|---|---|---|
| **A** | `next action` 以 `ready` 开头 | 立即确定 `CDP 直连`,阅读 `references/cdp-direct.md`,之后不再切到 `agent-browser` | — |
| **B** | `next action` 以 `attach` 开头 | 不要先反复 `--setup`;按输出执行 `flocks browser -c 'print(page_info())'` 或 `flocks browser -c 'print(list_tabs(include_chrome=False))'` 触发一次实际连接/观察 | 如果 `-c` 失败或仍无连接,执行 `flocks browser --reload` 清理旧 daemon,再执行 `flocks browser --setup`;setup 可能需要多次,直到用户完成浏览器 Allow/inspect 授权或错误信息稳定 |
| **C** | `next action` 以 `setup` 开头 | 先执行 `flocks browser --setup`(不包短超时),再运行 `--doctor` 确认 | 如提示 remote debugging 未启用、`DevToolsActivePort` 缺失、403 handshake 或 not live yet,再提示用户打开对应 inspect 页面并 Allow;用户确认后可多次 `--setup` |
| **D** | `next action` 提示启动浏览器或提供 endpoint | 明确告知需要先启动 Chrome/Chromium/Edge 或提供 CDP endpoint | **不**擅自降级到 curl/webfetch;坚持告知 skill 边界 |

- 如果 `--setup` 成功,随后 `--doctor` 通过:立即使用 `CDP 直连`,并立刻阅读 `references/cdp-direct.md`
### Step 4: 跨模式通用失败

#### 结果 C:`flocks browser --doctor` 失败,或当前机器没有可用 Chrome/Chromium/Edge
| 触发条件 | 一线修复 | 仍失败兜底 |
|---|---|---|
| `cdp-headless` 启动了专用 Chromium 实例 | 记 PID + 日志 + 专用 profile 路径 | 任务结束或明确放弃才清理;**不**关闭用户提供的远程浏览器 |
| 模式已确定后用户改主意 | 重新跑 `--doctor` 走 Result A/B/C 判定 | 避免同时加载 `cdp-direct.md` + `agent-browser.md` |

说明当前环境不适合 `CDP 直连`。此时要:
- 明确告诉用户是哪一项不满足,提示需要做什么操作才能达到要求

## 执行规则

1. 模式一旦确定,立即读取对应的 reference。
2. `cdp-headless` 是唯一例外:先读取 `references/cdp-headless.md` 完成浏览器启动与连接,再读取 `references/cdp-direct.md` 执行通用页面操作。
3. 在 `cdp-headless` 中,如果当前任务自己启动了专用浏览器实例,必须记录 PID / 日志 / 专用 profile,并只在任务结束或明确放弃后清理自己启动的实例;不要关闭用户提供的远程浏览器。
4. 不要同时加载 `references/cdp-direct.md` 和 `references/agent-browser.md`。
5. `flocks browser` 的 daemon 文件固定放在 `~/.flocks/browser/`,例如 `bu.sock`、`bu.log`、`bu.pid`、`bu.port`。
5. `flocks browser` 的 daemon 文件固定放在 `~/.flocks/browser/`,例如 `bu.sock`、`bu.log`、`bu.pid`、`bu.port`。
6. 基础操作能力(打开、观察、点击、输入、滚动、截图、提取、等待、关闭)优先按 `references/cdp-direct.md` 的“基础操作速查”执行

## 产品经验Skill

Expand Down
Loading
Loading