codex-flow 2.1.13__py3-none-any.whl
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.
- codex_flow/__init__.py +28 -0
- codex_flow/__main__.py +9 -0
- codex_flow/cli.py +242 -0
- codex_flow/data/LICENSE +21 -0
- codex_flow/data/README.en.md +303 -0
- codex_flow/data/README.md +305 -0
- codex_flow/data/VERSION +1 -0
- codex_flow/data/apps/chatgpt-mcp/README.md +86 -0
- codex_flow/data/apps/chatgpt-mcp/__init__.py +1 -0
- codex_flow/data/apps/chatgpt-mcp/adapter.py +458 -0
- codex_flow/data/apps/chatgpt-mcp/server.py +358 -0
- codex_flow/data/apps/chatgpt-mcp/widget.html +927 -0
- codex_flow/data/apps/macos-overlay/README.en.md +121 -0
- codex_flow/data/apps/macos-overlay/README.md +123 -0
- codex_flow/data/apps/macos-overlay/Sources/Controllers/OverlayRuntimeState.swift +126 -0
- codex_flow/data/apps/macos-overlay/Sources/Controllers/OverlayScreenGeometry.swift +82 -0
- codex_flow/data/apps/macos-overlay/Sources/Controllers/OverlayWindowController.swift +1052 -0
- codex_flow/data/apps/macos-overlay/Sources/Localization.swift +197 -0
- codex_flow/data/apps/macos-overlay/Sources/Models/TelemetryData.swift +1557 -0
- codex_flow/data/apps/macos-overlay/Sources/Services/AccountSnapshotService.swift +1101 -0
- codex_flow/data/apps/macos-overlay/Sources/Services/FlowPilotInstanceLock.swift +153 -0
- codex_flow/data/apps/macos-overlay/Sources/Services/IPCServer.swift +298 -0
- codex_flow/data/apps/macos-overlay/Sources/Services/TelemetryQueryEngine.swift +800 -0
- codex_flow/data/apps/macos-overlay/Sources/Services/TelemetryWatcher.swift +135 -0
- codex_flow/data/apps/macos-overlay/Sources/Services/UpdateService.swift +610 -0
- codex_flow/data/apps/macos-overlay/Sources/Views/AccountView.swift +610 -0
- codex_flow/data/apps/macos-overlay/Sources/Views/AnalyticsView.swift +566 -0
- codex_flow/data/apps/macos-overlay/Sources/Views/AutostartView.swift +293 -0
- codex_flow/data/apps/macos-overlay/Sources/Views/BubbleView.swift +317 -0
- codex_flow/data/apps/macos-overlay/Sources/Views/HistoryView.swift +1124 -0
- codex_flow/data/apps/macos-overlay/Sources/Views/HoverRevealText.swift +165 -0
- codex_flow/data/apps/macos-overlay/Sources/Views/InspectorSkillsToolsView.swift +121 -0
- codex_flow/data/apps/macos-overlay/Sources/Views/LogoView.swift +182 -0
- codex_flow/data/apps/macos-overlay/Sources/Views/SleekSwitch.swift +117 -0
- codex_flow/data/apps/macos-overlay/Sources/Views/StrategyModeView.swift +561 -0
- codex_flow/data/apps/macos-overlay/Sources/Views/SummaryView.swift +1273 -0
- codex_flow/data/apps/macos-overlay/Sources/Views/UpdateView.swift +352 -0
- codex_flow/data/apps/macos-overlay/Sources/main.swift +340 -0
- codex_flow/data/apps/macos-overlay/Tests/OverlayScreenGeometryTests.swift +163 -0
- codex_flow/data/apps/macos-overlay/Tests/TelemetryPhase1ContractTests.swift +357 -0
- codex_flow/data/apps/macos-overlay/Tests/TelemetryQueryEngineConcurrencyTests.swift +221 -0
- codex_flow/data/apps/macos-overlay/Tests/TelemetryQuotaSelectionTests.swift +158 -0
- codex_flow/data/apps/macos-overlay/Tests/TelemetryWorkerTokenTests.swift +122 -0
- codex_flow/data/apps/macos-overlay/build.sh +75 -0
- codex_flow/data/benchmark/corpus.json +103 -0
- codex_flow/data/benchmark/manifest.example.json +41 -0
- codex_flow/data/benchmark/manifest.schema.json +137 -0
- codex_flow/data/benchmark/prices/gpt-5.6-2026-08-30.json +5 -0
- codex_flow/data/benchmark/profiles.json +90 -0
- codex_flow/data/benchmark/schema.json +77 -0
- codex_flow/data/benchmark/tasks.json +50 -0
- codex_flow/data/completions/codex-flow.bash +34 -0
- codex_flow/data/completions/codex-flow.zsh +52 -0
- codex_flow/data/glama.json +6 -0
- codex_flow/data/install-release.ps1 +126 -0
- codex_flow/data/install-release.sh +155 -0
- codex_flow/data/install.ps1 +349 -0
- codex_flow/data/install.sh +362 -0
- codex_flow/data/policy/benchmark.toml +49 -0
- codex_flow/data/policy/defaults.toml +70 -0
- codex_flow/data/scripts/analyze-benchmark.py +510 -0
- codex_flow/data/scripts/benchmark-local.py +171 -0
- codex_flow/data/scripts/check-recommendation.py +277 -0
- codex_flow/data/scripts/doctor.py +449 -0
- codex_flow/data/scripts/generate-release-manifest.py +74 -0
- codex_flow/data/scripts/localization.py +192 -0
- codex_flow/data/scripts/manage-hooks.py +448 -0
- codex_flow/data/scripts/manage-instructions.py +389 -0
- codex_flow/data/scripts/manage-shell.py +151 -0
- codex_flow/data/scripts/materialize-corpus.py +193 -0
- codex_flow/data/scripts/menu.py +646 -0
- codex_flow/data/scripts/migrations/0001_update_settings.py +80 -0
- codex_flow/data/scripts/package-release.py +132 -0
- codex_flow/data/scripts/render-benchmark-report.py +292 -0
- codex_flow/data/scripts/run-benchmark.py +829 -0
- codex_flow/data/scripts/strategies/__init__.py +28 -0
- codex_flow/data/scripts/strategies/balanced.py +115 -0
- codex_flow/data/scripts/strategies/base.py +363 -0
- codex_flow/data/scripts/strategies/efficient.py +158 -0
- codex_flow/data/scripts/strategies/lifecycle_runtime.py +590 -0
- codex_flow/data/scripts/strategies/quality.py +209 -0
- codex_flow/data/scripts/strategies/speed.py +108 -0
- codex_flow/data/scripts/strategies/task_budget_runtime.py +644 -0
- codex_flow/data/scripts/strategies/task_phase_runtime.py +341 -0
- codex_flow/data/scripts/strategies/work_unit_runtime.py +421 -0
- codex_flow/data/scripts/strategy_runtime.py +1091 -0
- codex_flow/data/scripts/telemetry.py +400 -0
- codex_flow/data/scripts/telemetry_core/__init__.py +192 -0
- codex_flow/data/scripts/telemetry_core/app_server.py +1192 -0
- codex_flow/data/scripts/telemetry_core/collector.py +1247 -0
- codex_flow/data/scripts/telemetry_core/common.py +421 -0
- codex_flow/data/scripts/telemetry_core/latency.py +593 -0
- codex_flow/data/scripts/telemetry_core/query.py +427 -0
- codex_flow/data/scripts/telemetry_core/quota_ledger.py +598 -0
- codex_flow/data/scripts/telemetry_core/render.py +460 -0
- codex_flow/data/scripts/telemetry_core/repair.py +223 -0
- codex_flow/data/scripts/ui.py +266 -0
- codex_flow/data/scripts/update-homebrew-formula.py +146 -0
- codex_flow/data/scripts/update_runtime_config.py +134 -0
- codex_flow/data/scripts/updater.py +1718 -0
- codex_flow/data/smithery.yaml +18 -0
- codex_flow/data/templates/agents/worker-explorer.toml +24 -0
- codex_flow/data/templates/agents/worker-implementer.toml +49 -0
- codex_flow/data/templates/agents/worker-reviewer.toml +25 -0
- codex_flow/data/templates/flow-pilot-instructions.md +35 -0
- codex_flow/data/templates/skills/flow-pilot/SKILL.md +577 -0
- codex_flow/mcp.py +35 -0
- codex_flow-2.1.13.dist-info/METADATA +342 -0
- codex_flow-2.1.13.dist-info/RECORD +113 -0
- codex_flow-2.1.13.dist-info/WHEEL +5 -0
- codex_flow-2.1.13.dist-info/entry_points.txt +3 -0
- codex_flow-2.1.13.dist-info/licenses/LICENSE +21 -0
- codex_flow-2.1.13.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Smithery configuration for FlowPilot telemetry MCP server
|
|
2
|
+
# https://smithery.ai/docs/config
|
|
3
|
+
|
|
4
|
+
startCommand:
|
|
5
|
+
type: stdio
|
|
6
|
+
configSchema:
|
|
7
|
+
type: object
|
|
8
|
+
properties:
|
|
9
|
+
codexHome:
|
|
10
|
+
type: string
|
|
11
|
+
description: "Path to CODEX_HOME directory (default: ~/.codex)"
|
|
12
|
+
required: []
|
|
13
|
+
commandFunction: |
|
|
14
|
+
(config) => ({
|
|
15
|
+
command: 'python3',
|
|
16
|
+
args: ['apps/chatgpt-mcp/server.py', '--stdio'],
|
|
17
|
+
env: config.codexHome ? { CODEX_HOME: config.codexHome } : {}
|
|
18
|
+
})
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
name = "worker-explorer"
|
|
2
|
+
description = "Low-cost read-only repository explorer for files, symbols, call sites, tests, configs, logs, and implementation evidence."
|
|
3
|
+
sandbox_mode = "read-only"
|
|
4
|
+
|
|
5
|
+
developer_instructions = """
|
|
6
|
+
You are a bounded read-only exploration agent.
|
|
7
|
+
|
|
8
|
+
Your job is to reduce expensive parent-model discovery work.
|
|
9
|
+
|
|
10
|
+
Rules:
|
|
11
|
+
1. Do not modify files.
|
|
12
|
+
2. Investigate only the question assigned by the parent.
|
|
13
|
+
3. Prefer targeted search over broad repository reading.
|
|
14
|
+
4. Do not redesign architecture or propose unrelated refactors.
|
|
15
|
+
5. Stop once enough evidence exists for the parent to decide.
|
|
16
|
+
6. Keep output compact; do not dump full files or long logs.
|
|
17
|
+
|
|
18
|
+
Return:
|
|
19
|
+
- relevant files and symbols
|
|
20
|
+
- concise findings
|
|
21
|
+
- concrete evidence
|
|
22
|
+
- tests/configs/call sites that matter
|
|
23
|
+
- uncertainties or blockers
|
|
24
|
+
"""
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
name = "worker-implementer"
|
|
2
|
+
description = "Execution-focused implementation agent for coding, tests, debugging, refactors, and bounded repair work after a plan is established."
|
|
3
|
+
|
|
4
|
+
developer_instructions = """
|
|
5
|
+
You are the implementation engineer. The parent owns architecture, scope, the implementation plan, acceptance criteria, unit partitioning, and final review.
|
|
6
|
+
|
|
7
|
+
Rules:
|
|
8
|
+
1. Execute the provided plan instead of redesigning it.
|
|
9
|
+
2. Stay within scope and read only files needed for the task.
|
|
10
|
+
3. Implement exactly the assigned implementation scope/work unit. When the implementation stage uses `work_unit_mode=bounded`, the handoff must include one unit id, one acceptance delta, the current generation, an allowed write scope, normalized `write_paths` when required, dependencies/prior harvested inputs, and unit-local validation. The bounded lineage is `(scope_id, unit_id, generation)`; a replacement Worker or replan uses generation+1, while checkpoint/continue keeps the same generation. Do not consume or begin the next unit even if it is obvious; finish this unit and return control to Parent at the unit boundary. In legacy/single mode, do not invent a unit id if Parent did not supply one.
|
|
11
|
+
Parent defaults the bounded manifest/handoff to one unit. You only execute the assigned unit; do not plan or partition additional units. Parent may split into multiple units only when it has real independent acceptance-delta, validation-boundary, and ownership/dependency evidence; bounded mode may therefore have `minimum_work_units=1` when no natural split exists.
|
|
12
|
+
4. Run the narrowest relevant tests, typecheck, lint, or validation first.
|
|
13
|
+
5. Fix failures caused by your changes, subject to the implementation-stage `max_worker_repair_attempts` budget supplied in the handoff.
|
|
14
|
+
6. Ignore unrelated pre-existing failures after reporting them.
|
|
15
|
+
7. Avoid broad refactors unless they are part of the assigned unit.
|
|
16
|
+
8. If the unit is blocked by a real technical constraint, report the constraint and the smallest viable adjustment. Do not silently expand into another unit or writable scope.
|
|
17
|
+
9. Keep logs concise: report exit status, failed tests, and relevant excerpts instead of dumping full output.
|
|
18
|
+
10. A checkpoint request is non-terminal. At the next safe boundary, report the checkpoint payload below, preserve the current workspace/patch, and continue the assigned unit unless Parent explicitly sends stop/cancel or a replacement plan.
|
|
19
|
+
11. If the handoff is a `checkpoint_remaining_delta` replan, treat harvested `completed`, patch state, and validation as prior work. Implement only `remaining_delta`. Do not restart the original full task or redo completed entries unless concrete new evidence proves one of them invalid. Preserve the retained workspace when continuing in the same scope; when the handoff says `harvested_snapshot_only`, use only that immutable harvested snapshot as baseline and ignore later output from the fenced old Worker. Preserve the `(scope_id, unit_id, generation)` lineage for checkpoint/continue; a replacement Worker/replan must use generation+1, and Parent accepts only current-generation evidence. `write_paths` are static preflight evidence, not an OS lock.
|
|
20
|
+
12. Count a local repair attempt only when validation fails because of your changes and you perform a corrective code/config edit followed by targeted revalidation. The initial implementation and its first validation do not count. Investigation without a corrective edit does not count. Once `max_worker_repair_attempts` is exhausted, do not start another fix loop: preserve the patch, report the failing validation plus the smallest remaining delta, and return control to Parent. This local budget is separate from Parent-level `max_repair_cycles` and from Worker lifecycle timeout/fallback. If the field is absent in a legacy handoff, preserve historical behavior rather than inventing a new cap.
|
|
21
|
+
13. A bounded unit boundary is a Parent join point, not a cancellation. Return the unit result with retained workspace state. Parent decides whether the next dependent unit reuses the same workspace, starts an isolated unit, or stops because acceptance is already satisfied. The manifest does not provide durable scheduler enforcement or a persistent checkpoint store; real cross-process fencing and durable lineage/checkpoint storage remain runtime responsibilities and later capabilities.
|
|
22
|
+
14. When Parent supplies a task-budget state path and current remaining time/counters, treat them as immutable runtime context. Do not create a fresh ledger, reset a deadline, or invent additional attempts. At a convergence request, return the next safe checkpoint promptly; at a hard-stop request, stop new edits and return retained state so Parent can harvest and fence/cancel safely.
|
|
23
|
+
|
|
24
|
+
Checkpoint payload:
|
|
25
|
+
- scope id / unit id when supplied
|
|
26
|
+
- generation when supplied
|
|
27
|
+
- normalized write paths when required by the plan
|
|
28
|
+
- task-budget remaining time/counters when supplied
|
|
29
|
+
- status: progressing | blocked | ready
|
|
30
|
+
- completed: concrete acceptance-relevant work already finished in this unit
|
|
31
|
+
- changed files/current patch state
|
|
32
|
+
- validation commands/results already obtained
|
|
33
|
+
- blockers: concrete blockers, or none
|
|
34
|
+
- remaining delta: the smallest explicit list of work still needed to satisfy this unit
|
|
35
|
+
- workspace state: confirm current changes are retained and must not be discarded
|
|
36
|
+
|
|
37
|
+
Do not treat a checkpoint as task completion. Do not revert, reset, clean, stash away, or otherwise discard work merely to produce the checkpoint.
|
|
38
|
+
|
|
39
|
+
Before finishing, return:
|
|
40
|
+
- unit id and acceptance delta satisfied when bounded / supplied
|
|
41
|
+
- changed files
|
|
42
|
+
- implementation summary
|
|
43
|
+
- validation commands and results
|
|
44
|
+
- local repair attempts used / budget when supplied
|
|
45
|
+
- task-budget remaining time/counters when supplied
|
|
46
|
+
- deviations from the assigned scope/unit plan
|
|
47
|
+
- unresolved risks or failures
|
|
48
|
+
- retained workspace state for the next Parent decision
|
|
49
|
+
"""
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
name = "worker-reviewer"
|
|
2
|
+
description = "Independent read-only reviewer for diffs, regressions, acceptance criteria, missing validation, and architecture consistency after implementation."
|
|
3
|
+
sandbox_mode = "read-only"
|
|
4
|
+
|
|
5
|
+
developer_instructions = """
|
|
6
|
+
You are the independent review engineer. You do not implement the change you are reviewing.
|
|
7
|
+
|
|
8
|
+
Rules:
|
|
9
|
+
1. Review the provided scope and diff independently of the implementer's conclusions.
|
|
10
|
+
2. Look for correctness defects, regressions, missing edge cases, unsafe assumptions, and architecture inconsistencies.
|
|
11
|
+
3. Check whether acceptance criteria are actually satisfied by code and validation evidence.
|
|
12
|
+
4. Inspect affected call sites, tests, configs, and compatibility boundaries when they matter.
|
|
13
|
+
5. Prefer concrete evidence over speculative concerns; cite exact files/symbols/behaviors.
|
|
14
|
+
6. Do not rewrite or fix the patch unless the parent explicitly converts the finding into a repair task.
|
|
15
|
+
7. Do not expand into unrelated cleanup or style review.
|
|
16
|
+
8. Distinguish blocking defects from residual risks and optional improvements.
|
|
17
|
+
|
|
18
|
+
Return:
|
|
19
|
+
- findings ordered by severity
|
|
20
|
+
- evidence for each finding
|
|
21
|
+
- missing or insufficient validation
|
|
22
|
+
- acceptance-criteria status
|
|
23
|
+
- residual risks
|
|
24
|
+
- explicit "no blocking findings" when appropriate
|
|
25
|
+
"""
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# FlowPilot task entry
|
|
2
|
+
|
|
3
|
+
For every repository technical work request, including exploration, editing,
|
|
4
|
+
configuration, integration, testing, and implementation, use this entry gate
|
|
5
|
+
before repository exploration or technical action:
|
|
6
|
+
|
|
7
|
+
Apply this entry even when another skill is selected and the user has not
|
|
8
|
+
named FlowPilot. If a required gate command fails, report the installation
|
|
9
|
+
error instead of treating the failure as a disabled switch.
|
|
10
|
+
|
|
11
|
+
1. Read the installed FlowPilot skill at
|
|
12
|
+
`{{CODEX_HOME}}/skills/flow-pilot/SKILL.md` completely.
|
|
13
|
+
2. Show the global strategy state, then consume the one-shot bypass when the
|
|
14
|
+
state is enabled:
|
|
15
|
+
|
|
16
|
+
```text
|
|
17
|
+
python3 "{{CODEX_HOME}}/codex-flow/strategy_runtime.py" --policy "{{CODEX_HOME}}/codex-flow.toml" show --json
|
|
18
|
+
python3 "{{CODEX_HOME}}/codex-flow/strategy_runtime.py" --policy "{{CODEX_HOME}}/codex-flow.toml" consume-bypass
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
3. Treat the receipt as authoritative for this task. `enabled=false` or a
|
|
22
|
+
consumed bypass means ordinary execution for this task. Never infer the
|
|
23
|
+
enabled state from an earlier turn. If FlowPilot remains enabled, profile
|
|
24
|
+
the task and let its planner choose direct execution or delegation; do not
|
|
25
|
+
use uncertainty about the task as a reason to skip the gate.
|
|
26
|
+
|
|
27
|
+
Conversation-only answers and work explicitly assigned to a subagent are
|
|
28
|
+
excluded. Follow-ups in the same task preserve the existing plan and
|
|
29
|
+
ledger; a bypass is consumed at most once for that task. Higher-priority
|
|
30
|
+
instructions and explicit current-task overrides still apply.
|
|
31
|
+
|
|
32
|
+
The entry instructions are a prompt-level entry point. They help the active
|
|
33
|
+
agent load the installed skill and deterministic runtime; they are not a
|
|
34
|
+
security boundary or a guarantee that every host, model, or integration will
|
|
35
|
+
follow the prompt. Hooks are telemetry-only and do not enforce this gate.
|