codex-flow 2.1.13__tar.gz

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.
Files changed (124) hide show
  1. codex_flow-2.1.13/LICENSE +21 -0
  2. codex_flow-2.1.13/MANIFEST.in +21 -0
  3. codex_flow-2.1.13/PKG-INFO +342 -0
  4. codex_flow-2.1.13/README.en.md +303 -0
  5. codex_flow-2.1.13/README.md +305 -0
  6. codex_flow-2.1.13/VERSION +1 -0
  7. codex_flow-2.1.13/apps/chatgpt-mcp/README.md +86 -0
  8. codex_flow-2.1.13/apps/chatgpt-mcp/__init__.py +1 -0
  9. codex_flow-2.1.13/apps/chatgpt-mcp/adapter.py +458 -0
  10. codex_flow-2.1.13/apps/chatgpt-mcp/server.py +358 -0
  11. codex_flow-2.1.13/apps/chatgpt-mcp/widget.html +927 -0
  12. codex_flow-2.1.13/apps/macos-overlay/README.en.md +121 -0
  13. codex_flow-2.1.13/apps/macos-overlay/README.md +123 -0
  14. codex_flow-2.1.13/apps/macos-overlay/Sources/Controllers/OverlayRuntimeState.swift +126 -0
  15. codex_flow-2.1.13/apps/macos-overlay/Sources/Controllers/OverlayScreenGeometry.swift +82 -0
  16. codex_flow-2.1.13/apps/macos-overlay/Sources/Controllers/OverlayWindowController.swift +1052 -0
  17. codex_flow-2.1.13/apps/macos-overlay/Sources/Localization.swift +197 -0
  18. codex_flow-2.1.13/apps/macos-overlay/Sources/Models/TelemetryData.swift +1557 -0
  19. codex_flow-2.1.13/apps/macos-overlay/Sources/Services/AccountSnapshotService.swift +1101 -0
  20. codex_flow-2.1.13/apps/macos-overlay/Sources/Services/FlowPilotInstanceLock.swift +153 -0
  21. codex_flow-2.1.13/apps/macos-overlay/Sources/Services/IPCServer.swift +298 -0
  22. codex_flow-2.1.13/apps/macos-overlay/Sources/Services/TelemetryQueryEngine.swift +800 -0
  23. codex_flow-2.1.13/apps/macos-overlay/Sources/Services/TelemetryWatcher.swift +135 -0
  24. codex_flow-2.1.13/apps/macos-overlay/Sources/Services/UpdateService.swift +610 -0
  25. codex_flow-2.1.13/apps/macos-overlay/Sources/Views/AccountView.swift +610 -0
  26. codex_flow-2.1.13/apps/macos-overlay/Sources/Views/AnalyticsView.swift +566 -0
  27. codex_flow-2.1.13/apps/macos-overlay/Sources/Views/AutostartView.swift +293 -0
  28. codex_flow-2.1.13/apps/macos-overlay/Sources/Views/BubbleView.swift +317 -0
  29. codex_flow-2.1.13/apps/macos-overlay/Sources/Views/HistoryView.swift +1124 -0
  30. codex_flow-2.1.13/apps/macos-overlay/Sources/Views/HoverRevealText.swift +165 -0
  31. codex_flow-2.1.13/apps/macos-overlay/Sources/Views/InspectorSkillsToolsView.swift +121 -0
  32. codex_flow-2.1.13/apps/macos-overlay/Sources/Views/LogoView.swift +182 -0
  33. codex_flow-2.1.13/apps/macos-overlay/Sources/Views/SleekSwitch.swift +117 -0
  34. codex_flow-2.1.13/apps/macos-overlay/Sources/Views/StrategyModeView.swift +561 -0
  35. codex_flow-2.1.13/apps/macos-overlay/Sources/Views/SummaryView.swift +1273 -0
  36. codex_flow-2.1.13/apps/macos-overlay/Sources/Views/UpdateView.swift +352 -0
  37. codex_flow-2.1.13/apps/macos-overlay/Sources/main.swift +340 -0
  38. codex_flow-2.1.13/apps/macos-overlay/Tests/OverlayScreenGeometryTests.swift +163 -0
  39. codex_flow-2.1.13/apps/macos-overlay/Tests/TelemetryPhase1ContractTests.swift +357 -0
  40. codex_flow-2.1.13/apps/macos-overlay/Tests/TelemetryQueryEngineConcurrencyTests.swift +221 -0
  41. codex_flow-2.1.13/apps/macos-overlay/Tests/TelemetryQuotaSelectionTests.swift +158 -0
  42. codex_flow-2.1.13/apps/macos-overlay/Tests/TelemetryWorkerTokenTests.swift +122 -0
  43. codex_flow-2.1.13/apps/macos-overlay/build.sh +75 -0
  44. codex_flow-2.1.13/benchmark/corpus.json +103 -0
  45. codex_flow-2.1.13/benchmark/manifest.example.json +41 -0
  46. codex_flow-2.1.13/benchmark/manifest.schema.json +137 -0
  47. codex_flow-2.1.13/benchmark/prices/gpt-5.6-2026-08-30.json +5 -0
  48. codex_flow-2.1.13/benchmark/profiles.json +90 -0
  49. codex_flow-2.1.13/benchmark/schema.json +77 -0
  50. codex_flow-2.1.13/benchmark/tasks.json +50 -0
  51. codex_flow-2.1.13/codex_flow.egg-info/PKG-INFO +342 -0
  52. codex_flow-2.1.13/codex_flow.egg-info/SOURCES.txt +122 -0
  53. codex_flow-2.1.13/codex_flow.egg-info/dependency_links.txt +1 -0
  54. codex_flow-2.1.13/codex_flow.egg-info/entry_points.txt +3 -0
  55. codex_flow-2.1.13/codex_flow.egg-info/top_level.txt +1 -0
  56. codex_flow-2.1.13/completions/codex-flow.bash +34 -0
  57. codex_flow-2.1.13/completions/codex-flow.zsh +52 -0
  58. codex_flow-2.1.13/glama.json +6 -0
  59. codex_flow-2.1.13/install-release.ps1 +126 -0
  60. codex_flow-2.1.13/install-release.sh +155 -0
  61. codex_flow-2.1.13/install.ps1 +349 -0
  62. codex_flow-2.1.13/install.sh +362 -0
  63. codex_flow-2.1.13/packaging/pypi/__init__.py +28 -0
  64. codex_flow-2.1.13/packaging/pypi/__main__.py +9 -0
  65. codex_flow-2.1.13/packaging/pypi/cli.py +242 -0
  66. codex_flow-2.1.13/packaging/pypi/mcp.py +35 -0
  67. codex_flow-2.1.13/policy/benchmark.toml +49 -0
  68. codex_flow-2.1.13/policy/defaults.toml +70 -0
  69. codex_flow-2.1.13/pyproject.toml +63 -0
  70. codex_flow-2.1.13/scripts/analyze-benchmark.py +510 -0
  71. codex_flow-2.1.13/scripts/benchmark-local.py +171 -0
  72. codex_flow-2.1.13/scripts/check-recommendation.py +277 -0
  73. codex_flow-2.1.13/scripts/doctor.py +449 -0
  74. codex_flow-2.1.13/scripts/generate-release-manifest.py +74 -0
  75. codex_flow-2.1.13/scripts/localization.py +192 -0
  76. codex_flow-2.1.13/scripts/manage-hooks.py +448 -0
  77. codex_flow-2.1.13/scripts/manage-instructions.py +389 -0
  78. codex_flow-2.1.13/scripts/manage-shell.py +151 -0
  79. codex_flow-2.1.13/scripts/materialize-corpus.py +193 -0
  80. codex_flow-2.1.13/scripts/menu.py +646 -0
  81. codex_flow-2.1.13/scripts/migrations/0001_update_settings.py +80 -0
  82. codex_flow-2.1.13/scripts/package-release.py +132 -0
  83. codex_flow-2.1.13/scripts/render-benchmark-report.py +292 -0
  84. codex_flow-2.1.13/scripts/run-benchmark.py +829 -0
  85. codex_flow-2.1.13/scripts/strategies/__init__.py +28 -0
  86. codex_flow-2.1.13/scripts/strategies/balanced.py +115 -0
  87. codex_flow-2.1.13/scripts/strategies/base.py +363 -0
  88. codex_flow-2.1.13/scripts/strategies/efficient.py +158 -0
  89. codex_flow-2.1.13/scripts/strategies/lifecycle_runtime.py +590 -0
  90. codex_flow-2.1.13/scripts/strategies/quality.py +209 -0
  91. codex_flow-2.1.13/scripts/strategies/speed.py +108 -0
  92. codex_flow-2.1.13/scripts/strategies/task_budget_runtime.py +644 -0
  93. codex_flow-2.1.13/scripts/strategies/task_phase_runtime.py +341 -0
  94. codex_flow-2.1.13/scripts/strategies/work_unit_runtime.py +421 -0
  95. codex_flow-2.1.13/scripts/strategy_runtime.py +1091 -0
  96. codex_flow-2.1.13/scripts/telemetry.py +400 -0
  97. codex_flow-2.1.13/scripts/telemetry_core/__init__.py +192 -0
  98. codex_flow-2.1.13/scripts/telemetry_core/app_server.py +1192 -0
  99. codex_flow-2.1.13/scripts/telemetry_core/collector.py +1247 -0
  100. codex_flow-2.1.13/scripts/telemetry_core/common.py +421 -0
  101. codex_flow-2.1.13/scripts/telemetry_core/latency.py +593 -0
  102. codex_flow-2.1.13/scripts/telemetry_core/query.py +427 -0
  103. codex_flow-2.1.13/scripts/telemetry_core/quota_ledger.py +598 -0
  104. codex_flow-2.1.13/scripts/telemetry_core/render.py +460 -0
  105. codex_flow-2.1.13/scripts/telemetry_core/repair.py +223 -0
  106. codex_flow-2.1.13/scripts/ui.py +266 -0
  107. codex_flow-2.1.13/scripts/update-homebrew-formula.py +146 -0
  108. codex_flow-2.1.13/scripts/update_runtime_config.py +134 -0
  109. codex_flow-2.1.13/scripts/updater.py +1718 -0
  110. codex_flow-2.1.13/setup.cfg +4 -0
  111. codex_flow-2.1.13/setup.py +130 -0
  112. codex_flow-2.1.13/smithery.yaml +18 -0
  113. codex_flow-2.1.13/templates/agents/worker-explorer.toml +24 -0
  114. codex_flow-2.1.13/templates/agents/worker-implementer.toml +49 -0
  115. codex_flow-2.1.13/templates/agents/worker-reviewer.toml +25 -0
  116. codex_flow-2.1.13/templates/flow-pilot-instructions.md +35 -0
  117. codex_flow-2.1.13/templates/skills/flow-pilot/SKILL.md +577 -0
  118. codex_flow-2.1.13/tests/test_hook_trust.py +105 -0
  119. codex_flow-2.1.13/tests/test_instructions.py +124 -0
  120. codex_flow-2.1.13/tests/test_quota_ledger.py +509 -0
  121. codex_flow-2.1.13/tests/test_shared_strategy_lifecycle.py +163 -0
  122. codex_flow-2.1.13/tests/test_task_phase_runtime.py +283 -0
  123. codex_flow-2.1.13/tests/test_telemetry_worker_correlation.py +291 -0
  124. codex_flow-2.1.13/tests/test_updater.py +586 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 codex-flow contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,21 @@
1
+ include VERSION
2
+ include LICENSE
3
+ include README.md
4
+ include README.en.md
5
+ include install.sh
6
+ include install.ps1
7
+ include install-release.sh
8
+ include install-release.ps1
9
+ include smithery.yaml
10
+ include glama.json
11
+ recursive-include scripts *.py *.sh
12
+ recursive-include policy *.toml
13
+ recursive-include templates *
14
+ recursive-include completions *
15
+ recursive-include benchmark *.json
16
+ recursive-include apps/chatgpt-mcp *
17
+ recursive-include apps/macos-overlay *
18
+ recursive-include packaging/pypi *.py
19
+ recursive-exclude * __pycache__
20
+ recursive-exclude * *.py[cod]
21
+ recursive-exclude * .DS_Store
@@ -0,0 +1,342 @@
1
+ Metadata-Version: 2.4
2
+ Name: codex-flow
3
+ Version: 2.1.13
4
+ Summary: Intelligent, Efficient, Adaptive Multi-Agent Strategy Orchestration for Codex
5
+ Home-page: https://github.com/ParsifalC/codex-flow
6
+ Author: Parsifal
7
+ Author-email: Parsifal <zmw@izmw.me>
8
+ License: MIT
9
+ Project-URL: Homepage, https://github.com/ParsifalC/codex-flow
10
+ Project-URL: Repository, https://github.com/ParsifalC/codex-flow
11
+ Project-URL: Issues, https://github.com/ParsifalC/codex-flow/issues
12
+ Project-URL: Documentation, https://github.com/ParsifalC/codex-flow#readme
13
+ Keywords: codex,agent,multi-agent,orchestration,llm,workflow,mcp,telemetry
14
+ Classifier: Development Status :: 5 - Production/Stable
15
+ Classifier: Environment :: Console
16
+ Classifier: Intended Audience :: Developers
17
+ Classifier: License :: OSI Approved :: MIT License
18
+ Classifier: Operating System :: MacOS
19
+ Classifier: Operating System :: POSIX :: Linux
20
+ Classifier: Operating System :: Microsoft :: Windows
21
+ Classifier: Programming Language :: Python :: 3
22
+ Classifier: Programming Language :: Python :: 3.8
23
+ Classifier: Programming Language :: Python :: 3.9
24
+ Classifier: Programming Language :: Python :: 3.10
25
+ Classifier: Programming Language :: Python :: 3.11
26
+ Classifier: Programming Language :: Python :: 3.12
27
+ Classifier: Programming Language :: Python :: 3.13
28
+ Classifier: Topic :: Software Development :: Build Tools
29
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
30
+ Requires-Python: >=3.8
31
+ Description-Content-Type: text/markdown
32
+ License-File: LICENSE
33
+ Dynamic: author
34
+ Dynamic: home-page
35
+ Dynamic: license-file
36
+ Dynamic: requires-python
37
+
38
+ <div align="center">
39
+
40
+ <a href="https://github.com/ParsifalC/codex-flow">
41
+ <img src="docs/assets/logo.png" alt="FlowPilot Logo" width="130" height="130" />
42
+ </a>
43
+
44
+ # FlowPilot · codex-flow
45
+
46
+ **智能、高效、自适应的 Codex 多 Agent 策略编排引擎**
47
+
48
+ [![Version](https://img.shields.io/badge/version-2.1.13-blue.svg?style=flat-square)](VERSION)
49
+ [![Homebrew](https://img.shields.io/badge/Homebrew-ParsifalC%2Ftap-orange.svg?style=flat-square&logo=homebrew)](https://github.com/ParsifalC/homebrew-tap)
50
+ [![PyPI](https://img.shields.io/pypi/v/codex-flow.svg?style=flat-square&logo=pypi)](https://pypi.org/project/codex-flow/)
51
+ [![Platform](https://img.shields.io/badge/platform-macOS%20%7C%20Linux%20%7C%20Windows-brightgreen.svg?style=flat-square)](#-快速安装)
52
+ [![SwiftUI](https://img.shields.io/badge/UI-SwiftUI%20%2B%20AppKit-orange.svg?style=flat-square)](docs/overlay.md)
53
+ [![Telemetry](https://img.shields.io/badge/telemetry-deterministic%200--cost-purple.svg?style=flat-square)](docs/telemetry.md)
54
+ [![Smithery](https://img.shields.io/badge/Smithery-FlowPilot-black.svg?style=flat-square)](https://smithery.ai)
55
+ [![Glama](https://img.shields.io/badge/Glama-MCP-5046e6.svg?style=flat-square)](https://glama.ai/mcp/servers)
56
+ [![LinuxDo](https://img.shields.io/badge/LinuxDo-公测中-5046e6.svg?style=flat-square)](https://linux.do)
57
+ [![License](https://img.shields.io/badge/license-MIT-green.svg?style=flat-square)](LICENSE)
58
+
59
+ <br />
60
+
61
+ <img src="docs/assets/promo/flowpilot_promo_banner.png" alt="codex-flow Banner" width="100%" style="border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,0.15);" />
62
+
63
+ <br /><br />
64
+
65
+ [**English Documentation**](README.en.md) · [**多策略运行时**](docs/strategy-runtime.md) · [**深入配置**](docs/configuration.md) · [**遥测机制**](docs/telemetry.md) · [**原生悬浮窗**](docs/overlay.md) · [**基准评测**](docs/benchmark.md)
66
+
67
+ <br />
68
+
69
+ > 📢 **社区公测**:`codex-flow` 现已正式在 [**LINUX DO**](https://linux.do) 开启公测,欢迎各位佬友前往体验、讨论与反馈!
70
+
71
+ <br />
72
+
73
+ > **“ 让昂贵的 Parent 做高价值判断,让高性价比 Worker 用更深推理承担探索、实现、验证与调试循环;当用户明确要求最高质量时,把高级 capability 精确投放到关键 Implementer / Reviewer,而不是无差别升级所有 Worker。”**
74
+
75
+ </div>
76
+
77
+ ---
78
+
79
+ ## ✨ 核心亮点
80
+
81
+ <table>
82
+ <tr>
83
+ <td width="50%" valign="top">
84
+ <h3>🧠 多策略运行时 (FlowPilot)</h3>
85
+ <p>FlowPilot 从单一分发策略升级为统一 Strategy Runtime。内置 <code>efficient</code> / <code>balanced</code> / <code>quality</code> / <code>speed</code>,统一通过 TaskProfile → WorkerBudget → ExecutionPlan v7 驱动执行。</p>
86
+ </td>
87
+ <td width="50%" valign="top">
88
+ <h3>⚙️ 动态 Worker Budget</h3>
89
+ <p>Worker 数不再写死为 1~2 个。Runtime 根据不确定性、工作流隔离、Quota 与线程上限动态计算 Explorer / Implementer / Reviewer,并且可写并发始终要求真实隔离证据。</p>
90
+ </td>
91
+ </tr>
92
+ <tr>
93
+ <td width="50%" valign="top">
94
+ <h3>🧠 Worker-first Reasoning</h3>
95
+ <p>默认 Parent 以 <code>high</code> 为主,便宜的 Worker 以 <code>xhigh</code> 起步;委派时各 Worker role reasoning 至少比 Parent 高一档,Parent 已为 <code>max</code> 时除外。</p>
96
+ </td>
97
+ <td width="50%" valign="top">
98
+ <h3>🏆 Quality Intent</h3>
99
+ <p><code>quality</code> 支持 <code>normal / strong / absolute</code> 三档当前任务质量意图。普通 Explorer 继续优先 <code>latest-efficient</code>;强质量意图可把关键 Implementer / Reviewer 升级到 <code>latest-capable</code>。只有技术风险本身达到 critical 时,Explorer 才会升级到 Parent 级 capability。</p>
100
+ </td>
101
+ </tr>
102
+ </table>
103
+
104
+ ---
105
+
106
+ ## 🧩 四种内置策略
107
+
108
+ | Strategy | 优化目标 | 高需求任务的 Worker 倾向 |
109
+ | :--- | :--- | :--- |
110
+ | **`efficient`** | 减少昂贵 Parent 消耗与无效总成本 | 最多约 2 Explorer / 2 Implementer,低 speculation,Quota 紧张会自动收敛 |
111
+ | **`balanced`** | 平衡质量、额度与耗时 | 最多约 3 Explorer / 3 Implementer,适度安全并行 |
112
+ | **`quality`** | 最大化正确性与验证置信度 | 普通 complex 优先 Luna + `max` reasoning;`strong/absolute` 只把关键 Implementer / Reviewer 升级到 Parent 级 capability,Explorer 默认保持高性价比 |
113
+ | **`speed`** | 最小化 wall-clock latency | 最多 8 个 Implementer budget;实际数量由已证明 writable workstreams 与 Runtime ceiling 决定 |
114
+
115
+ `quality_intent` 是**当前任务语义**,不是持久化配置,也不是 `risk` 的别名;并且只有 `quality` strategy 会消费它:
116
+
117
+ ```text
118
+ normal → 普通质量目标,优先 latest-efficient Worker + 深 reasoning
119
+ strong → 明确质量优先,允许关键 Implementer / Reviewer 使用 latest-capable
120
+ absolute → 明确最高质量优先,在安全 ceiling 内 correctness > quota / latency;Explorer 仍默认 latest-efficient
121
+ ```
122
+
123
+ 默认配置仍是:
124
+
125
+ ```text
126
+ strategy = efficient
127
+ routing = adaptive
128
+ ```
129
+
130
+ 但 v1.7 的 fresh-install 资源策略已经从“Parent 与 Worker 相近 reasoning”调整为 **Parent 高价值决策 + Worker 深推理执行**。已有用户的自定义 reasoning 配置在 update/reinstall 时会无损保留。
131
+
132
+ ---
133
+
134
+ ## 🚀 快速安装
135
+
136
+ ### 前置要求 (Prerequisites)
137
+
138
+ > 💡 **特别说明**:Codex CLI **仅用于首次安装的环境校验与一次性 Hook 授权**。初始化完成后,**日常使用完全使用 Codex 桌面端 APP 即可**,无需在终端中启动或使用 CLI。
139
+
140
+ 确保环境拥有 Codex CLI(用于首次安装与授权):
141
+ ```bash
142
+ # npm 全局安装
143
+ npm install -g @openai/codex
144
+
145
+ # 或 macOS Homebrew 安装
146
+ brew install codex
147
+ ```
148
+
149
+ ### 快速安装
150
+
151
+ #### 方式一:PyPI 安装(全平台推荐,支持 Windows / macOS / Linux)
152
+
153
+ ```bash
154
+ # 推荐使用 pipx(独立隔离环境)
155
+ pipx install codex-flow
156
+
157
+ # 或使用标准 pip
158
+ pip install codex-flow
159
+
160
+ # 初始化配置与环境
161
+ codex-flow install
162
+ ```
163
+
164
+ #### 方式二:Homebrew 安装(macOS / Linux)
165
+
166
+ ```bash
167
+ brew install ParsifalC/tap/codex-flow
168
+ codex-flow install
169
+ ```
170
+
171
+ #### 方式三:一键发布安装脚本
172
+
173
+ 首次安装统一使用 GitHub Release 中与你的系统和 CPU 架构匹配的正式 artifact,不需要 clone 仓库。
174
+
175
+ ```bash
176
+ # macOS / Linux
177
+ curl -fsSL https://raw.githubusercontent.com/ParsifalC/codex-flow/main/install-release.sh | bash
178
+ ```
179
+
180
+ ```powershell
181
+ # Windows PowerShell
182
+ irm https://raw.githubusercontent.com/ParsifalC/codex-flow/main/install-release.ps1 | iex
183
+ ```
184
+
185
+ 安装器会自动识别 OS / CPU、解析 Latest Stable Release、下载对应 artifact、校验 SHA-256、安装到 `~/.codex/codex-flow/versions/<version>`,并运行健康检查。Windows 自动选择 x86_64 / ARM64 ZIP;macOS 直接使用 Release 中已经预编译好的 FlowPilot,**安装完成后悬浮按钮会自动启动**,不会在本机执行 `build.sh`。
186
+
187
+ > ⚠️ **最后一步**:
188
+ > 1. **首次一次性授权**:在终端启动一次 `codex`,在对话框中输入 `/hooks` 批准 FlowPilot telemetry(仅需做一次,完成永久信任)。
189
+ > 2. **重启 Codex 桌面端**:完全退出 Codex 桌面应用后重新打开。FlowPilot 悬浮窗已在 macOS 桌面自动运行,后续所有日常工作**直接在 Codex 桌面端使用即可**,无需再打开终端。
190
+
191
+ 安装器还会把带有明确标记的 FlowPilot 入口写入生效的全局 `AGENTS.md`。入口会要求当前 Agent 在仓库技术工作前读取已安装 skill 并取得策略门禁 receipt,因此不需要在提示中点名 skill。安装后请开始新任务或完整重新加载 Codex,确保新的指令生效。全局开关关闭或本任务的一次性 bypass 已消费时,该任务按普通流程执行。这个提示入口依赖当前宿主遵循指令,不是 100% 的强制边界;生命周期 hooks 仍只用于遥测。
192
+
193
+ ---
194
+
195
+ ## 🎮 基本使用
196
+
197
+ ### 1. 查看 / 切换默认策略
198
+
199
+ ```bash
200
+ codex-flow strategy show
201
+ codex-flow strategy profiles
202
+ codex-flow strategy set quality
203
+ codex-flow strategy set efficient
204
+ codex-flow strategy routing adaptive
205
+ ```
206
+
207
+ ### 2. 对话内自然语言覆盖
208
+
209
+ 当前任务可以临时覆盖持久配置:
210
+
211
+ ```text
212
+ 👉 策略覆盖:"质量优先" / "尽量少用 Plan 额度" / "尽快完成"
213
+ 👉 强质量:"质量优先,必要时使用更强模型" → quality_intent=strong
214
+ 👉 最高质量:"成本不重要,用最强模型和独立验证" → quality_intent=absolute
215
+ 👉 自动路由:"按默认策略实现" / "自适应处理"
216
+ 👉 强制委派:"delegate" / "使用子 agent 实现" / "交给 worker 处理"
217
+ 👉 单兵直出:"direct" / "不要使用子 agent,直接完成" / "这次直接做"
218
+ ```
219
+
220
+ Strategy 与 Routing 正交,例如:
221
+
222
+ ```text
223
+ quality + direct
224
+ ```
225
+
226
+ 表示使用 quality 的能力/推理目标,但当前任务不使用子 Agent。
227
+
228
+ ### 3. 查看确定性的 ExecutionPlan
229
+
230
+ ```bash
231
+ codex-flow strategy plan \
232
+ --profile quality \
233
+ --quality-intent strong \
234
+ --complexity complex \
235
+ --uncertainty high \
236
+ --parallelism high
237
+ ```
238
+
239
+ Plan 会输出 `quality_intent`、Strategy 的 `worker_budget`,以及 Runtime 实际编译出的三组角色资源:
240
+
241
+ ```text
242
+ explorer_capability_policy / explorer_model / explorer_reasoning
243
+ implementer_capability_policy / implementer_model / implementer_reasoning
244
+ reviewer_capability_policy / reviewer_model / reviewer_reasoning
245
+ ```
246
+
247
+ 同时包含 `exploration_workers`、`implementation_workers`、`reviewer_workers` 和 `planned_worker_count`。
248
+
249
+ ### 4. 交互式控制台
250
+
251
+ ```bash
252
+ codex-flow
253
+ ```
254
+
255
+ 最新控制台同时集成了 Overlay 构建/启动入口、策略状态、Benchmark 与遥测:
256
+
257
+ ```text
258
+ ╭────────────────────────────────────────────────────────────────────╮
259
+ │ 🚀 codex-flow 控制台 (v2.1.13) │
260
+ │ FlowPilot 智能编排 · 确定性任务遥测 · 本地 Benchmark 验证 │
261
+ ╰────────────────────────────────────────────────────────────────────╯
262
+ [1] 🪟 macOS 原生悬浮窗 (overlay widget)
263
+ [2] 📊 查看最新任务卡片 (usage last)
264
+ [3] 📜 浏览历史任务列表 (usage list)
265
+ [4] 📈 项目聚合统计分析 (usage stats)
266
+ [5] 🎯 查看生效策略配置 (status)
267
+ [6] 🩺 运行系统诊断检查 (doctor)
268
+ [7] ⚡ 本地快速 Benchmark (benchmark-local quick)
269
+ [8] 🔄 检查与拉取更新 (update)
270
+ [0] 🚪 退出
271
+ ```
272
+
273
+ Overlay 子菜单支持直接启动、编译并启动、仅编译,以及运行时的重编译/重启、展开切换和数据推送,不再要求用户手动先执行 `build.sh`。
274
+
275
+ ### 5. 常用 CLI
276
+
277
+ ```bash
278
+ codex-flow usage last
279
+ codex-flow usage list --today
280
+ codex-flow usage stats -d 30
281
+ codex-flow doctor
282
+ codex-flow update
283
+ ```
284
+
285
+ ### 6. MCP 客户端与平台集成 (Claude Desktop / Cursor / Smithery / Glama)
286
+
287
+ `codex-flow` 内置标准的 Model Context Protocol (MCP) 服务端,支持将 FlowPilot 确定性遥测注入任意支持 MCP 的宿主:
288
+
289
+ * **Claude Desktop / Cursor (`stdio` 模式)**:
290
+ 在 `claude_desktop_config.json` 中配置:
291
+ ```json
292
+ {
293
+ "mcpServers": {
294
+ "flowpilot": {
295
+ "command": "codex-flow-mcp",
296
+ "args": ["--stdio"]
297
+ }
298
+ }
299
+ }
300
+ ```
301
+ * **Smithery.ai**:配置文件见根目录 `smithery.yaml`,已支持一键发现与客户端挂载。
302
+ * **Glama**:认证元数据见根目录 `glama.json`,已入驻 Glama MCP 注册目录。
303
+
304
+ ---
305
+
306
+ ## 🪟 FlowPilot macOS 原生悬浮窗
307
+
308
+ 专为 macOS 深度定制的 **100% 纯原生毛玻璃效能看板**,打通任务生命周期与 Quota 监控。
309
+
310
+ <div align="center">
311
+ <img src="docs/assets/promo/flowpilot_promo_poster.png" alt="FlowPilot Native Widget Showcase" width="100%" style="border-radius: 12px; margin: 16px 0;" />
312
+ </div>
313
+
314
+ - **🟢 灵动微胶囊 (Capsule)**:闲置时边缘半收起,呼吸光环显示任务状态与最新消耗。
315
+ - **⚡️ 实时巡检 (Inspector)**:耗时 / Tokens / 费用、Quota 水位与 Agent 拓扑。
316
+ - **📜 历史回溯 (History)**:跨项目任务时间线与详情回溯。
317
+ - **📊 效能看板 (Analytics)**:7d/30d 缓存命中率、Worker 算力卸载比与模型/仓库分布。
318
+
319
+ ```bash
320
+ codex-flow overlay start
321
+ codex-flow overlay toggle
322
+ ```
323
+
324
+ ---
325
+
326
+ ## 📚 深入文档
327
+
328
+ | 模块 | 文档入口 | 核心内容 |
329
+ | :--- | :--- | :--- |
330
+ | **🧠 多策略运行时** | [docs/strategy-runtime.md](docs/strategy-runtime.md) | TaskProfile、Quality Intent、WorkerBudget、Strategy Registry、ExecutionPlan v7、role-scoped resources |
331
+ | **⚙️ 策略与配置** | [docs/configuration.md](docs/configuration.md) | policy schema v4、Worker-first reasoning、路由、Runtime ceiling |
332
+ | **📈 确定性遥测** | [docs/telemetry.md](docs/telemetry.md) | Hook 生命周期、Token 差值归因、账户 Quota |
333
+ | **🪟 原生悬浮窗** | [docs/overlay.md](docs/overlay.md) | 交互、IPC 与 SwiftUI 架构 |
334
+ | **🧪 本地基准测试** | [docs/benchmark.md](docs/benchmark.md) | 本地无 Key 评测与多策略对比 |
335
+ | **☁️ Actions 评测** | [docs/benchmark-actions.md](docs/benchmark-actions.md) | GitHub Actions Benchmark |
336
+ | **🌐 多语言支持** | [docs/localization.md](docs/localization.md) | 中英双语与本地化范围 |
337
+
338
+ ---
339
+
340
+ ## 📄 开源协议
341
+
342
+ 本项目采用 [MIT License](LICENSE) 开源协议。