hpilot 0.60.6__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.
- hpilot-0.60.6/MANIFEST.in +1 -0
- hpilot-0.60.6/PKG-INFO +393 -0
- hpilot-0.60.6/README.md +362 -0
- hpilot-0.60.6/docs/agent-architecture.md +128 -0
- hpilot-0.60.6/docs/agents/antigravity.md +33 -0
- hpilot-0.60.6/docs/agents/claude.md +67 -0
- hpilot-0.60.6/docs/agents/codex.md +229 -0
- hpilot-0.60.6/docs/agents/cursor.md +131 -0
- hpilot-0.60.6/docs/agents/opencode.md +113 -0
- hpilot-0.60.6/docs/batch-submit.md +76 -0
- hpilot-0.60.6/docs/completions.md +57 -0
- hpilot-0.60.6/docs/configuration.md +311 -0
- hpilot-0.60.6/docs/contributing/adding-an-adapter.md +114 -0
- hpilot-0.60.6/docs/development.md +116 -0
- hpilot-0.60.6/docs/getting-started.md +248 -0
- hpilot-0.60.6/docs/index.md +61 -0
- hpilot-0.60.6/docs/mcp-server.md +296 -0
- hpilot-0.60.6/docs/native-session-verification.md +28 -0
- hpilot-0.60.6/docs/opencode-v2-verification.md +60 -0
- hpilot-0.60.6/docs/pipeline-authoring.md +674 -0
- hpilot-0.60.6/docs/runtime-internals.md +302 -0
- hpilot-0.60.6/docs/runtime-user.md +241 -0
- hpilot-0.60.6/docs/stage-configuration.md +374 -0
- hpilot-0.60.6/docs/testing-dev.md +106 -0
- hpilot-0.60.6/docs/testing.md +44 -0
- hpilot-0.60.6/docs/troubleshooting/daemon.md +118 -0
- hpilot-0.60.6/docs/troubleshooting/execution.md +259 -0
- hpilot-0.60.6/docs/troubleshooting/index.md +25 -0
- hpilot-0.60.6/docs/troubleshooting/installation.md +81 -0
- hpilot-0.60.6/docs/updating-dev.md +25 -0
- hpilot-0.60.6/docs/updating.md +104 -0
- hpilot-0.60.6/docs/usage-metrics.md +127 -0
- hpilot-0.60.6/docs/websocket-protocol.md +469 -0
- hpilot-0.60.6/pyproject.toml +109 -0
- hpilot-0.60.6/setup.cfg +4 -0
- hpilot-0.60.6/src/hpilot/__init__.py +24 -0
- hpilot-0.60.6/src/hpilot/__main__.py +3 -0
- hpilot-0.60.6/src/hpilot/_constants.py +7 -0
- hpilot-0.60.6/src/hpilot/_global_config_legacy.py +108 -0
- hpilot-0.60.6/src/hpilot/adapters/__init__.py +6 -0
- hpilot-0.60.6/src/hpilot/adapters/_cli_runtime.py +14 -0
- hpilot-0.60.6/src/hpilot/adapters/_process.py +80 -0
- hpilot-0.60.6/src/hpilot/adapters/antigravity/__init__.py +3 -0
- hpilot-0.60.6/src/hpilot/adapters/antigravity/_acp.py +232 -0
- hpilot-0.60.6/src/hpilot/adapters/antigravity/_acp_config.py +158 -0
- hpilot-0.60.6/src/hpilot/adapters/antigravity/_acp_process.py +244 -0
- hpilot-0.60.6/src/hpilot/adapters/antigravity/_handle.py +248 -0
- hpilot-0.60.6/src/hpilot/adapters/antigravity/_preflight.py +69 -0
- hpilot-0.60.6/src/hpilot/adapters/antigravity/_timeout.py +37 -0
- hpilot-0.60.6/src/hpilot/adapters/antigravity/adapter.py +124 -0
- hpilot-0.60.6/src/hpilot/adapters/antigravity/stream.py +173 -0
- hpilot-0.60.6/src/hpilot/adapters/base.py +348 -0
- hpilot-0.60.6/src/hpilot/adapters/claude/__init__.py +3 -0
- hpilot-0.60.6/src/hpilot/adapters/claude/_handle.py +197 -0
- hpilot-0.60.6/src/hpilot/adapters/claude/_sdk_wrapper.py +113 -0
- hpilot-0.60.6/src/hpilot/adapters/claude/adapter.py +439 -0
- hpilot-0.60.6/src/hpilot/adapters/claude/stream.py +165 -0
- hpilot-0.60.6/src/hpilot/adapters/codex/__init__.py +3 -0
- hpilot-0.60.6/src/hpilot/adapters/codex/_app_helpers.py +454 -0
- hpilot-0.60.6/src/hpilot/adapters/codex/_goal_file.py +80 -0
- hpilot-0.60.6/src/hpilot/adapters/codex/_goal_protocol.py +228 -0
- hpilot-0.60.6/src/hpilot/adapters/codex/_handle.py +796 -0
- hpilot-0.60.6/src/hpilot/adapters/codex/_sdk_wrapper.py +790 -0
- hpilot-0.60.6/src/hpilot/adapters/codex/_shell_command.py +42 -0
- hpilot-0.60.6/src/hpilot/adapters/codex/_socket_bridge.py +56 -0
- hpilot-0.60.6/src/hpilot/adapters/codex/_subagents.py +543 -0
- hpilot-0.60.6/src/hpilot/adapters/codex/_transport.py +167 -0
- hpilot-0.60.6/src/hpilot/adapters/codex/adapter.py +112 -0
- hpilot-0.60.6/src/hpilot/adapters/codex/stream.py +120 -0
- hpilot-0.60.6/src/hpilot/adapters/cursor/__init__.py +3 -0
- hpilot-0.60.6/src/hpilot/adapters/cursor/_handle.py +414 -0
- hpilot-0.60.6/src/hpilot/adapters/cursor/_sdk_wrapper.py +279 -0
- hpilot-0.60.6/src/hpilot/adapters/cursor/adapter.py +223 -0
- hpilot-0.60.6/src/hpilot/adapters/cursor/stream.py +488 -0
- hpilot-0.60.6/src/hpilot/adapters/cursor/tool_mapping.py +101 -0
- hpilot-0.60.6/src/hpilot/adapters/errors.py +15 -0
- hpilot-0.60.6/src/hpilot/adapters/mock/__init__.py +3 -0
- hpilot-0.60.6/src/hpilot/adapters/mock/adapter.py +175 -0
- hpilot-0.60.6/src/hpilot/adapters/opencode/__init__.py +3 -0
- hpilot-0.60.6/src/hpilot/adapters/opencode/_diagnostics.py +50 -0
- hpilot-0.60.6/src/hpilot/adapters/opencode/_model_config.py +296 -0
- hpilot-0.60.6/src/hpilot/adapters/opencode/_model_selection.py +44 -0
- hpilot-0.60.6/src/hpilot/adapters/opencode/_native.py +69 -0
- hpilot-0.60.6/src/hpilot/adapters/opencode/_owned_server.py +86 -0
- hpilot-0.60.6/src/hpilot/adapters/opencode/_permissions.py +244 -0
- hpilot-0.60.6/src/hpilot/adapters/opencode/_preflight.py +57 -0
- hpilot-0.60.6/src/hpilot/adapters/opencode/_probe_process.py +44 -0
- hpilot-0.60.6/src/hpilot/adapters/opencode/_serve_continuation.py +54 -0
- hpilot-0.60.6/src/hpilot/adapters/opencode/_serve_handle_base.py +390 -0
- hpilot-0.60.6/src/hpilot/adapters/opencode/_serve_output.py +89 -0
- hpilot-0.60.6/src/hpilot/adapters/opencode/_turn.py +146 -0
- hpilot-0.60.6/src/hpilot/adapters/opencode/_usage.py +124 -0
- hpilot-0.60.6/src/hpilot/adapters/opencode/_v2_events.py +43 -0
- hpilot-0.60.6/src/hpilot/adapters/opencode/adapter.py +429 -0
- hpilot-0.60.6/src/hpilot/adapters/opencode/serve_client.py +608 -0
- hpilot-0.60.6/src/hpilot/adapters/opencode/serve_transport.py +458 -0
- hpilot-0.60.6/src/hpilot/adapters/opencode/stream.py +488 -0
- hpilot-0.60.6/src/hpilot/adapters/opencode/tool_mapping.py +97 -0
- hpilot-0.60.6/src/hpilot/adapters/registry.py +166 -0
- hpilot-0.60.6/src/hpilot/adapters/tool_mapping.py +68 -0
- hpilot-0.60.6/src/hpilot/adapters/types.py +278 -0
- hpilot-0.60.6/src/hpilot/assets/__init__.py +0 -0
- hpilot-0.60.6/src/hpilot/assets/init/__init__.py +1 -0
- hpilot-0.60.6/src/hpilot/assets/init/simple/hpilot.yaml +478 -0
- hpilot-0.60.6/src/hpilot/assets/init/speckit/hpilot.yaml +352 -0
- hpilot-0.60.6/src/hpilot/assets/verifier/__init__.py +1 -0
- hpilot-0.60.6/src/hpilot/assets/verifier/stage-completion-verifier.md +22 -0
- hpilot-0.60.6/src/hpilot/cli/__init__.py +121 -0
- hpilot-0.60.6/src/hpilot/cli/_batch_submit.py +263 -0
- hpilot-0.60.6/src/hpilot/cli/_daemon_cmds.py +169 -0
- hpilot-0.60.6/src/hpilot/cli/_standalone_cmds.py +130 -0
- hpilot-0.60.6/src/hpilot/cli/_startup.py +264 -0
- hpilot-0.60.6/src/hpilot/cli/_usage_cmds.py +69 -0
- hpilot-0.60.6/src/hpilot/cli/commands.py +565 -0
- hpilot-0.60.6/src/hpilot/cli/completions.py +216 -0
- hpilot-0.60.6/src/hpilot/cli/docs.py +136 -0
- hpilot-0.60.6/src/hpilot/cli/instance.py +121 -0
- hpilot-0.60.6/src/hpilot/cli/parser.py +373 -0
- hpilot-0.60.6/src/hpilot/cli/passthrough.py +11 -0
- hpilot-0.60.6/src/hpilot/cli.py +98 -0
- hpilot-0.60.6/src/hpilot/client/__init__.py +81 -0
- hpilot-0.60.6/src/hpilot/client/commands.py +409 -0
- hpilot-0.60.6/src/hpilot/client/connection.py +130 -0
- hpilot-0.60.6/src/hpilot/client/rendering.py +118 -0
- hpilot-0.60.6/src/hpilot/client/streaming.py +368 -0
- hpilot-0.60.6/src/hpilot/client.py +60 -0
- hpilot-0.60.6/src/hpilot/config/__init__.py +83 -0
- hpilot-0.60.6/src/hpilot/config/_parsing.py +331 -0
- hpilot-0.60.6/src/hpilot/config/_stage_parsing.py +640 -0
- hpilot-0.60.6/src/hpilot/config/_types.py +247 -0
- hpilot-0.60.6/src/hpilot/contract_correction.py +74 -0
- hpilot-0.60.6/src/hpilot/daemon_endpoint.py +134 -0
- hpilot-0.60.6/src/hpilot/doctor.py +535 -0
- hpilot-0.60.6/src/hpilot/evaluation/__init__.py +55 -0
- hpilot-0.60.6/src/hpilot/evaluation/context.py +95 -0
- hpilot-0.60.6/src/hpilot/evaluation/contracts.py +79 -0
- hpilot-0.60.6/src/hpilot/evaluation/decision.py +86 -0
- hpilot-0.60.6/src/hpilot/evaluation/events.py +65 -0
- hpilot-0.60.6/src/hpilot/evaluation/prompts.py +37 -0
- hpilot-0.60.6/src/hpilot/evaluation/reply.py +179 -0
- hpilot-0.60.6/src/hpilot/evaluation/response.py +83 -0
- hpilot-0.60.6/src/hpilot/evaluation/verifier_client.py +214 -0
- hpilot-0.60.6/src/hpilot/git_repos.py +274 -0
- hpilot-0.60.6/src/hpilot/global_config.py +699 -0
- hpilot-0.60.6/src/hpilot/import_cybervisor.py +179 -0
- hpilot-0.60.6/src/hpilot/init.py +132 -0
- hpilot-0.60.6/src/hpilot/jsonc.py +101 -0
- hpilot-0.60.6/src/hpilot/lifecycle_hooks.py +98 -0
- hpilot-0.60.6/src/hpilot/log_cleanup.py +98 -0
- hpilot-0.60.6/src/hpilot/log_paths.py +29 -0
- hpilot-0.60.6/src/hpilot/logging.py +190 -0
- hpilot-0.60.6/src/hpilot/mcp/__init__.py +33 -0
- hpilot-0.60.6/src/hpilot/mcp/config.py +331 -0
- hpilot-0.60.6/src/hpilot/mcp/dispatcher.py +93 -0
- hpilot-0.60.6/src/hpilot/mcp/files.py +334 -0
- hpilot-0.60.6/src/hpilot/mcp/http.py +287 -0
- hpilot-0.60.6/src/hpilot/mcp/logging.py +206 -0
- hpilot-0.60.6/src/hpilot/mcp/metadata.py +110 -0
- hpilot-0.60.6/src/hpilot/mcp/oauth.py +371 -0
- hpilot-0.60.6/src/hpilot/mcp/server.py +225 -0
- hpilot-0.60.6/src/hpilot/mcp/service.py +167 -0
- hpilot-0.60.6/src/hpilot/mcp/workspace.py +113 -0
- hpilot-0.60.6/src/hpilot/mcp/yieldshell.py +117 -0
- hpilot-0.60.6/src/hpilot/path_patterns.py +41 -0
- hpilot-0.60.6/src/hpilot/pipeline/__init__.py +32 -0
- hpilot-0.60.6/src/hpilot/pipeline/_agent_attempt.py +431 -0
- hpilot-0.60.6/src/hpilot/pipeline/_attempt_runtime.py +110 -0
- hpilot-0.60.6/src/hpilot/pipeline/_attempt_start.py +99 -0
- hpilot-0.60.6/src/hpilot/pipeline/_cleanup.py +113 -0
- hpilot-0.60.6/src/hpilot/pipeline/_command_attempt.py +250 -0
- hpilot-0.60.6/src/hpilot/pipeline/_command_stage.py +83 -0
- hpilot-0.60.6/src/hpilot/pipeline/_completion.py +495 -0
- hpilot-0.60.6/src/hpilot/pipeline/_continuation.py +106 -0
- hpilot-0.60.6/src/hpilot/pipeline/_execution.py +488 -0
- hpilot-0.60.6/src/hpilot/pipeline/_harness_failure.py +78 -0
- hpilot-0.60.6/src/hpilot/pipeline/_interrupt.py +44 -0
- hpilot-0.60.6/src/hpilot/pipeline/_pipeline_hooks.py +229 -0
- hpilot-0.60.6/src/hpilot/pipeline/_resume_reporting.py +38 -0
- hpilot-0.60.6/src/hpilot/pipeline/_routing.py +131 -0
- hpilot-0.60.6/src/hpilot/pipeline/_runtime_config.py +173 -0
- hpilot-0.60.6/src/hpilot/pipeline/_runtime_setup.py +56 -0
- hpilot-0.60.6/src/hpilot/pipeline/_session_metadata.py +161 -0
- hpilot-0.60.6/src/hpilot/pipeline/_shell_execution.py +179 -0
- hpilot-0.60.6/src/hpilot/pipeline/_stage_runtime.py +60 -0
- hpilot-0.60.6/src/hpilot/pipeline/_startup.py +379 -0
- hpilot-0.60.6/src/hpilot/pipeline/_usage_scope.py +120 -0
- hpilot-0.60.6/src/hpilot/pipeline/artifacts.py +256 -0
- hpilot-0.60.6/src/hpilot/pipeline/contract.py +281 -0
- hpilot-0.60.6/src/hpilot/pipeline/runner.py +480 -0
- hpilot-0.60.6/src/hpilot/pipeline.py +27 -0
- hpilot-0.60.6/src/hpilot/preflight.py +119 -0
- hpilot-0.60.6/src/hpilot/prompt_sections.py +11 -0
- hpilot-0.60.6/src/hpilot/read_only_guard.py +304 -0
- hpilot-0.60.6/src/hpilot/server/__init__.py +78 -0
- hpilot-0.60.6/src/hpilot/server/_cleanup.py +21 -0
- hpilot-0.60.6/src/hpilot/server/_daemon_config.py +145 -0
- hpilot-0.60.6/src/hpilot/server/_path.py +15 -0
- hpilot-0.60.6/src/hpilot/server/_task_exec.py +625 -0
- hpilot-0.60.6/src/hpilot/server/daemon.py +684 -0
- hpilot-0.60.6/src/hpilot/server/handlers.py +456 -0
- hpilot-0.60.6/src/hpilot/server/socket_lifecycle.py +250 -0
- hpilot-0.60.6/src/hpilot/server/tasks.py +307 -0
- hpilot-0.60.6/src/hpilot/server.py +29 -0
- hpilot-0.60.6/src/hpilot/server_events.py +333 -0
- hpilot-0.60.6/src/hpilot/server_signals.py +47 -0
- hpilot-0.60.6/src/hpilot/signals.py +395 -0
- hpilot-0.60.6/src/hpilot/skills.py +199 -0
- hpilot-0.60.6/src/hpilot/stream_logging.py +503 -0
- hpilot-0.60.6/src/hpilot/tool_argument_sanitizer.py +295 -0
- hpilot-0.60.6/src/hpilot/tool_field_aliases.py +72 -0
- hpilot-0.60.6/src/hpilot/upgrade.py +86 -0
- hpilot-0.60.6/src/hpilot/usage/__init__.py +60 -0
- hpilot-0.60.6/src/hpilot/usage/models.py +151 -0
- hpilot-0.60.6/src/hpilot/usage/normalize.py +249 -0
- hpilot-0.60.6/src/hpilot/usage/query.py +289 -0
- hpilot-0.60.6/src/hpilot/usage/recorder.py +275 -0
- hpilot-0.60.6/src/hpilot/usage/report.py +150 -0
- hpilot-0.60.6/src/hpilot/usage/store.py +351 -0
- hpilot-0.60.6/src/hpilot/usage/timerange.py +140 -0
- hpilot-0.60.6/src/hpilot/usage_reporting.py +229 -0
- hpilot-0.60.6/src/hpilot.egg-info/PKG-INFO +393 -0
- hpilot-0.60.6/src/hpilot.egg-info/SOURCES.txt +224 -0
- hpilot-0.60.6/src/hpilot.egg-info/dependency_links.txt +1 -0
- hpilot-0.60.6/src/hpilot.egg-info/entry_points.txt +2 -0
- hpilot-0.60.6/src/hpilot.egg-info/requires.txt +16 -0
- hpilot-0.60.6/src/hpilot.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
prune tests
|
hpilot-0.60.6/PKG-INFO
ADDED
|
@@ -0,0 +1,393 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: hpilot
|
|
3
|
+
Version: 0.60.6
|
|
4
|
+
Summary: Harness Pilot runs and verifies staged AI development workflows
|
|
5
|
+
Author: crzidea
|
|
6
|
+
Project-URL: Homepage, https://github.com/crzidea/hpilot
|
|
7
|
+
Project-URL: Repository, https://github.com/crzidea/hpilot
|
|
8
|
+
Project-URL: Issues, https://github.com/crzidea/hpilot/issues
|
|
9
|
+
Classifier: Development Status :: 3 - Alpha
|
|
10
|
+
Classifier: Environment :: Console
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Typing :: Typed
|
|
16
|
+
Requires-Python: >=3.11
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
Requires-Dist: agent-client-protocol>=1.0.0
|
|
19
|
+
Requires-Dist: claude-agent-sdk>=0.2.87
|
|
20
|
+
Requires-Dist: cursor-sdk>=1.0.24
|
|
21
|
+
Requires-Dist: httpx>=0.27.0
|
|
22
|
+
Requires-Dist: mcp<2,>=1.29.0
|
|
23
|
+
Requires-Dist: mcp-yieldshell<2,>=1.1.2
|
|
24
|
+
Requires-Dist: openai-codex>=0.144.4
|
|
25
|
+
Requires-Dist: psutil>=5.9.0
|
|
26
|
+
Requires-Dist: pyyaml>=6.0.3
|
|
27
|
+
Requires-Dist: setproctitle>=1.3.4; platform_system != "Windows"
|
|
28
|
+
Requires-Dist: websockets>=13.0
|
|
29
|
+
Provides-Extra: completions
|
|
30
|
+
Requires-Dist: argcomplete>=3.1; extra == "completions"
|
|
31
|
+
|
|
32
|
+
# hpilot (Harness Pilot)
|
|
33
|
+
|
|
34
|
+
Audience: Users and contributors.
|
|
35
|
+
|
|
36
|
+
`hpilot` runs a customizable development pipeline with Claude Code, Codex, OpenCode, Cursor, or Antigravity. It checks each stage’s results and uses them to decide what runs next.
|
|
37
|
+
|
|
38
|
+
## What it does
|
|
39
|
+
|
|
40
|
+
- Runs a customizable multi-stage pipeline defined in `hpilot.yaml`
|
|
41
|
+
- Runs trusted shell commands as deterministic, agent-free pipeline gates
|
|
42
|
+
- Runs optional trusted commands before and after every stage attempt
|
|
43
|
+
- Enforces structured stage-result contracts with artifact-driven routing
|
|
44
|
+
- Evaluates agent replies between supported agent turns and after each run without modifying agent settings
|
|
45
|
+
- Records contract and verifier decisions in `.hpilot/logs/evaluation-events.jsonl`
|
|
46
|
+
- Streams live agent output and persists per-stage logs (logs are cleared before each run so they always reflect the current execution)
|
|
47
|
+
- Preserves agent-supplied argument names in stage logs while rendering known tools with consistent summary labels
|
|
48
|
+
- Cleans up agent-spawned processes after each stage and on pipeline exit
|
|
49
|
+
- On retry, prefers resuming the prior agent session (retry continuation) when the adapter supports it; unsupported adapters fall back to a fresh session
|
|
50
|
+
- For real harnesses, keeps sessions in their native stores and records the latest session metadata for native inspection; native discovery and hpilot `--resume` support vary by harness (see [Native Harness Session History](docs/runtime-user.md#native-harness-session-history))
|
|
51
|
+
- For adapters with an effort channel, forwards any normalized effort string and lets the harness or provider validate it; Cursor rejects every explicit effort structurally
|
|
52
|
+
- Stops after the first attempt when a harness deterministically rejects its configuration, while transient failures continue through normal retries
|
|
53
|
+
- On explicit `--resume` restart, continues from the last captured session id when the adapter supports it and metadata matches (resumed stage continuation); Codex reactivates blocked, paused, or completed native goals in place while preserving history and accounting, and contract correction retries reuse the same goal within `max_retries`; falls back to a fresh attempt for unsupported adapters or mismatched metadata
|
|
54
|
+
- On Unix hosts, Codex stages can start or resume chats through an existing Codex server using Approve for me or Full access. Resuming an idle chat keeps its permissions. Cancelling a stage leaves the shared server running. See [shared Codex sessions](docs/agents/codex.md#shared-codex-server).
|
|
55
|
+
- Leaves agent settings files unchanged
|
|
56
|
+
- Does not create `.hpilot/hooks/`, hook sockets, or settings snapshots
|
|
57
|
+
- Enforces single-instance execution with a daemon-aware lock
|
|
58
|
+
- **Daemon mode**: Long-running WebSocket server for headless execution; accepted submissions automatically make three bounded cursor-based resume attempts after transport loss without resubmitting the task
|
|
59
|
+
- **Persistent service diagnostics**: Daemon and MCP records append under `.hpilot/logs/services/` and survive disposable run-log cleanup
|
|
60
|
+
- **OAuth-protected workspace MCP server**: Optional Streamable HTTP access to composed `yieldshell` shell tools and three workspace file tools (`file_read`, `file_write`, `file_edit`) from ChatGPT, Gemini Spark, and other OAuth MCP clients via `hpilot serve --mcp`; use `yieldshell_execute` with `side_effects: ["NONE"]` for discovery and search (`rg --files`, `rg -n -F`, `find`, `git grep`, `ls`), `file_read` for a known path, and `file_write`/`file_edit` for modification; blocking file operations use four bounded worker threads so the shared daemon loop stays responsive
|
|
61
|
+
- **Daemon client commands**: `status`, `submit`, `attach`, `cancel`, `logs`, `end`
|
|
62
|
+
|
|
63
|
+
## Requirements
|
|
64
|
+
|
|
65
|
+
- Python 3.11+
|
|
66
|
+
- [`uv`](https://docs.astral.sh/uv/)
|
|
67
|
+
- One of:
|
|
68
|
+
- `claude-agent-sdk` Python package (included as a hpilot dependency) plus the standalone `claude` CLI on `PATH`; Claude authentication is resolved through normal env, settings, and login credentials
|
|
69
|
+
- `openai-codex` Python package (included as a hpilot dependency) plus a standalone `codex` CLI on `PATH`
|
|
70
|
+
- a current V2 `opencode` CLI plus `uvx` on `PATH`; see the [OpenCode guide](docs/agents/opencode.md) for native model/variant setup and the [V2 verification report](docs/opencode-v2-verification.md)
|
|
71
|
+
- `cursor-sdk>=1.0.24` Python package (included as a hpilot dependency; the platform wheel bundles its own bridge, so no `cursor-sdk-bridge` binary needs to be on `PATH`) and `harnesses.cursor.api_key` in `~/.hpilot/config.yaml` when Cursor is selected
|
|
72
|
+
- `antigravity` agent via the official `agy acp` server (ACP v1 with native session reattachment)
|
|
73
|
+
- `~/.hpilot/config.yaml` with verifier settings
|
|
74
|
+
|
|
75
|
+
## Installation
|
|
76
|
+
|
|
77
|
+
Install hpilot from PyPI.
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
uv tool install hpilot
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
The installation provides the `hpilot` command. Existing Cybervisor users can preview the [settings and usage import](docs/updating.md#import-from-cybervisor) before running `hpilot init`.
|
|
84
|
+
|
|
85
|
+
After installation, verify:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
hpilot --version
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
To update an existing installation later:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
uv tool upgrade hpilot
|
|
95
|
+
hpilot --version
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
For the full update guide, run:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
hpilot docs updating
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Quick Start
|
|
105
|
+
|
|
106
|
+
Initialize the `hpilot` scaffold in your project:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
hpilot init
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Set the default harness in the active global config:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
hpilot use claude
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Configure runtime and verifier settings in `~/.hpilot/config.yaml` (created with `0o600` permissions). The `llm` section can be omitted for daemon startup and contract-only or command-only tasks, but non-contract agent stages require it at task preflight:
|
|
119
|
+
|
|
120
|
+
```yaml
|
|
121
|
+
harness: claude
|
|
122
|
+
llm:
|
|
123
|
+
api_key: your-api-key # Required when the effective task includes a non-contract agent stage
|
|
124
|
+
# Optional overrides
|
|
125
|
+
# base_url: https://api.openai.com/v1
|
|
126
|
+
# model: gpt-4o
|
|
127
|
+
|
|
128
|
+
# Optional workspace MCP OAuth client
|
|
129
|
+
# mcp:
|
|
130
|
+
# client_id: hpilot-workspace
|
|
131
|
+
# client_secret: your-high-entropy-secret
|
|
132
|
+
|
|
133
|
+
# Harness-specific credentials
|
|
134
|
+
# harnesses:
|
|
135
|
+
# cursor:
|
|
136
|
+
# api_key: your-cursor-api-key
|
|
137
|
+
|
|
138
|
+
# Optional global effort and grouped per-stage overrides
|
|
139
|
+
# model_effort: medium
|
|
140
|
+
# stage_overrides:
|
|
141
|
+
# Plan:
|
|
142
|
+
# harness: codex
|
|
143
|
+
# model: gpt-5.6
|
|
144
|
+
# effort: xhigh
|
|
145
|
+
# goal: true # opt-in native persisted goal; qualified Codex pair only
|
|
146
|
+
# "Review Code":
|
|
147
|
+
# model: openai/gpt-5.6-mini
|
|
148
|
+
# iterations:
|
|
149
|
+
# 2:
|
|
150
|
+
# model: openai/gpt-5.6-codex
|
|
151
|
+
# goal: true
|
|
152
|
+
# 4:
|
|
153
|
+
# model: openai/gpt-5.6-pro
|
|
154
|
+
# effort: high
|
|
155
|
+
# goal: false # explicit false disables inherited goal mode
|
|
156
|
+
|
|
157
|
+
# Usage reporting (optional)
|
|
158
|
+
# usage_reporting:
|
|
159
|
+
# enabled: true
|
|
160
|
+
# endpoint: https://elasticsearch.example.com
|
|
161
|
+
# api_key: your-api-key
|
|
162
|
+
# index: hpilot-usage
|
|
163
|
+
# user: alice@example.com
|
|
164
|
+
|
|
165
|
+
# Local usage history (optional)
|
|
166
|
+
# usage_recording:
|
|
167
|
+
# enabled: false
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
Iteration thresholds are cumulative “starts at iteration” overrides for successful routed stage visits, not retry numbers. In this progressive review example, iterations 1–5 use mini/medium, codex/medium, codex/medium, pro/high, and pro/high with goal mode disabled/enabled/enabled/disabled/disabled; retries keep the current iteration, live config reload still occurs at every attempt boundary, and `hpilot use` preserves the schedule. Command stages ignore goal settings because they do not resolve agent runtimes. Preflight and `hpilot doctor` validate every cumulative threshold runtime before launch, while JSON `Running` entries and `stage_start` events expose the active `runtime_iteration_threshold`. See the [Configuration Reference](docs/configuration.md#global-harness-and-per-stage-runtime-overrides) for syntax, inheritance, switching, diagnostics, and validation rules.
|
|
171
|
+
|
|
172
|
+
Verify everything is ready:
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
hpilot doctor
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
Run the supervisor:
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
hpilot "Create a 360 feedback system"
|
|
182
|
+
printf "Create a 360 feedback system" | hpilot run
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
## Usage
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
# Run with a prompt
|
|
189
|
+
hpilot "Your task description"
|
|
190
|
+
hpilot run "Your task description"
|
|
191
|
+
printf "Your task description" | hpilot run
|
|
192
|
+
|
|
193
|
+
# Specify a custom config
|
|
194
|
+
hpilot run "Your task" --config custom.yaml
|
|
195
|
+
|
|
196
|
+
# Control execution flow
|
|
197
|
+
hpilot run "Your task" --start-from "Implement"
|
|
198
|
+
hpilot run "Your task" --end-after "Review Code" # Run up to and including this stage, then stop
|
|
199
|
+
hpilot run "Your task" --end-before "Verify" # Stop before executing this stage
|
|
200
|
+
hpilot run "Your task" --start-from "Implement" --resume # Resume from last captured session
|
|
201
|
+
|
|
202
|
+
# Set the default harness
|
|
203
|
+
hpilot use claude
|
|
204
|
+
|
|
205
|
+
# Restore skills left behind after a crash
|
|
206
|
+
hpilot restore-skills
|
|
207
|
+
|
|
208
|
+
# Validate your configuration
|
|
209
|
+
hpilot validate
|
|
210
|
+
hpilot validate --show-guidance
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
Treat `hpilot validate` as the local readiness gate before merge or execution. A passing result (exit `0`) means the config is not only parseable, but also satisfies the stricter contract-authoring checks for route safety, complete routed examples, and authored prompt/guidance synchronization. A validation failure exits `2` with an actionable message naming the offending stage and field.
|
|
214
|
+
|
|
215
|
+
Use `--show-guidance` to preview each contract's required tasks, status choices, and YAML examples. During a run, corrections name the remaining work and show how to write the result. In Codex goal mode, hpilot sends the correction directly to the goal's thread before resuming it. [Pipeline Authoring Guide](docs/pipeline-authoring.md#required_tasks)
|
|
216
|
+
|
|
217
|
+
Use `prompt` for agent instructions (`prompt_template` remains accepted) or `command` for a deterministic shell stage. These executor fields are mutually exclusive. For advanced stage configuration including per-stage runtime overrides, cleanup paths, command gates, iteration controls, model overrides, write protection, and contracts, see the [Pipeline Authoring Guide](docs/pipeline-authoring.md) and [Configuration Reference](docs/configuration.md).
|
|
218
|
+
|
|
219
|
+
### Pipeline lifecycle hooks
|
|
220
|
+
|
|
221
|
+
Define user-level lifecycle defaults in the active global configuration, usually `~/.hpilot/config.yaml`:
|
|
222
|
+
|
|
223
|
+
```yaml
|
|
224
|
+
hooks:
|
|
225
|
+
before_stage: scripts/telemetry.sh
|
|
226
|
+
after_stage: scripts/telemetry.sh
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
Pipelines inherit each phase independently. A root `hooks` entry in `hpilot.yaml` replaces the corresponding global command, while an explicit phase-level `null` disables that global default. An omitted, empty, or whole-mapping `null` pipeline section leaves both phases inherited.
|
|
230
|
+
|
|
231
|
+
These plural lifecycle `hooks` are separate from the singular `verifier` configuration. Effective hooks apply to agent and command stages, retries, routed revisits, standalone runs, daemon tasks, and slices. hpilot reloads the active global file at every attempt boundary and captures one stable hook pair for the whole attempt. Cleanup runs before `before_stage`; `after_stage` finishes before artifact backup, completion, and routing.
|
|
232
|
+
|
|
233
|
+
Lifecycle hooks are trusted, unsandboxed commands. They run from the workspace, inherit the hpilot environment, can receive routed context, and may repeat. Put stage-selective conditions and idempotency in the script. See the [Pipeline Authoring Guide](docs/pipeline-authoring.md#pipeline-lifecycle-hooks) for environment variables, failure behavior, logs, and interruption semantics.
|
|
234
|
+
|
|
235
|
+
### Global Flags
|
|
236
|
+
|
|
237
|
+
| Flag | Description |
|
|
238
|
+
|------|-------------|
|
|
239
|
+
| `--quiet` | Suppress non-error stderr output for all commands |
|
|
240
|
+
| `--help` | Show help message and exit |
|
|
241
|
+
|
|
242
|
+
### Prompt Resolution
|
|
243
|
+
|
|
244
|
+
When running `hpilot run` or `hpilot submit`, the task prompt is resolved with the following priority:
|
|
245
|
+
|
|
246
|
+
1. **Positional argument** — `hpilot run "Your task description"`
|
|
247
|
+
2. **stdin** — `printf "Your task" \| hpilot run`
|
|
248
|
+
3. **Config-driven promptless execution** — A command-only slice needs no objective or coding agent. Harness-backed stages can also be promptless when their configured `prompt` does not reference `{objective}`.
|
|
249
|
+
4. **Error** — If no prompt is provided and any stage still requires `{objective}`, the command exits with an error listing the stages that need a prompt.
|
|
250
|
+
|
|
251
|
+
If a positional prompt argument is present, stdin is ignored even when piped.
|
|
252
|
+
|
|
253
|
+
### Workspace-Local Config Override
|
|
254
|
+
|
|
255
|
+
A `.hpilot/config.yaml` file in the current working directory completely replaces `~/.hpilot/config.yaml` for normal runtime settings when present. Verifier settings, `harness`, `model_effort`, `stage_overrides`, lifecycle `hooks`, `usage_reporting`, `server`, and other pipeline runtime settings come from the workspace-local file. The security-sensitive `mcp.client_id` and `mcp.client_secret` fields are the exception: they come only from the home config. Pipeline configuration (`hpilot.yaml`) has no CWD override and is always resolved from the project root.
|
|
256
|
+
|
|
257
|
+
### Daemon Mode
|
|
258
|
+
|
|
259
|
+
`hpilot serve` starts a long-running WebSocket daemon. Once running, use the client subcommands to submit tasks, monitor progress, and manage the pipeline remotely. hpilot reloads `~/.hpilot/config.yaml` (or the workspace-local `.hpilot/config.yaml`) before every stage attempt. Global hook changes take effect at the next attempt boundary. Agent stages also pick up changes to `harness`, `model_effort`, `stage_overrides`, and `usage_reporting`; command stages use the common hook snapshot without constructing or preflighting an agent adapter. The resolved daemon endpoint is fixed for the daemon's lifetime. The default is the canonical invocation workspace's `.hpilot/run/daemon.sock`; explicit `--socket` selects another Unix socket, while `--host` or `--port` opts into TCP with no dual listener or fallback.
|
|
260
|
+
|
|
261
|
+
To expose the optional OAuth-protected workspace MCP endpoint, set `mcp.client_id` and `mcp.client_secret` in `~/.hpilot/config.yaml`, then start `hpilot serve --mcp`. For ChatGPT or Gemini Spark, also pass the externally reachable HTTPS endpoint with `--mcp-public-url https://workspace.example.com/mcp` and enter that same client ID and secret in the client's manual OAuth fields. hpilot auto-approves the configured client without an HTML consent page and issues short-lived OAuth access tokens plus rotating refresh tokens. The endpoint grants command execution and file modification, so use a strong secret, keep it out of repository configuration, and read the [OAuth-Protected Workspace MCP Server guide](docs/mcp-server.md) before exposing it remotely.
|
|
262
|
+
|
|
263
|
+
The MCP server supplies one initialization instruction identifying regular ChatGPT Chat as the intended audience and asking Codex not to invoke its tools. Tool descriptions remain unchanged; this guidance does not enforce access restrictions, and hosted plugin connections may not expose it to the model. MCP request and initialization metadata are recorded in `.hpilot/logs/services/mcp.jsonl` with selected headers, client identity, response status, and hashed session IDs; use the [request metadata diagnostics](docs/mcp-server.md#mcp-request-metadata-diagnostics) to compare ChatGPT Chat and Codex before deciding whether selective blocking is possible.
|
|
264
|
+
|
|
265
|
+
```bash
|
|
266
|
+
# Start the workspace daemon on .hpilot/run/daemon.sock
|
|
267
|
+
hpilot serve
|
|
268
|
+
hpilot serve --socket /short/private/daemon.sock
|
|
269
|
+
hpilot serve --host 0.0.0.0 --port 9000 # Explicit TCP migration
|
|
270
|
+
hpilot serve --background # Returns only after a WebSocket health exchange
|
|
271
|
+
|
|
272
|
+
# Check daemon connectivity and active tasks (exits 0 when reachable, 1 when not)
|
|
273
|
+
hpilot status
|
|
274
|
+
hpilot status --socket /short/private/daemon.sock
|
|
275
|
+
# Example output when a task is running:
|
|
276
|
+
# Running task: abc123def456 (stage: Spec, cwd: /workspace/project, bounds: end_stage=Verify)
|
|
277
|
+
# Daemon reachable at unix:///workspace/project/.hpilot/run/daemon.sock
|
|
278
|
+
# Example output when no task is running:
|
|
279
|
+
# No active tasks.
|
|
280
|
+
# Daemon reachable at unix:///workspace/project/.hpilot/run/daemon.sock
|
|
281
|
+
# Example output when daemon is down:
|
|
282
|
+
# Daemon not reachable at unix:///workspace/project/.hpilot/run/daemon.sock; no daemon is running
|
|
283
|
+
|
|
284
|
+
# Check status of a specific task by ID (matches across all directories)
|
|
285
|
+
hpilot status abc123def456
|
|
286
|
+
|
|
287
|
+
# Submit a task and stream events until completion
|
|
288
|
+
hpilot submit "Your task description" --config hpilot.yaml --start-from Implement
|
|
289
|
+
hpilot submit "Your task" --end-after "Review Code"
|
|
290
|
+
hpilot submit "Your task" --end-before Verify
|
|
291
|
+
hpilot submit "Your task" --start-from "Implement" --resume
|
|
292
|
+
printf "Your task description" | hpilot submit # read prompt from stdin
|
|
293
|
+
cat task_prompt.txt | hpilot submit # multi-line prompts preserved
|
|
294
|
+
hpilot submit "Your task" --task-id my-task-123 # explicit task ID
|
|
295
|
+
# On submit, the task ID is printed to stderr (e.g. "Task created: abc123def456")
|
|
296
|
+
# Use this ID with attach, cancel, logs, or end
|
|
297
|
+
|
|
298
|
+
# Update or clear the active task's end boundary
|
|
299
|
+
hpilot end --after "Review Code"
|
|
300
|
+
hpilot end --before Verify
|
|
301
|
+
hpilot end --clear
|
|
302
|
+
|
|
303
|
+
# Batch submit: process ready .md files sequentially and rescan after successes
|
|
304
|
+
hpilot submit --path prompts/ # active batches accept later stable plans
|
|
305
|
+
hpilot submit --path prompts/ --task-id batch # IDs: batch_1, batch_2, ...
|
|
306
|
+
# New groups append in filename order; completed plans move to prompts/completed/
|
|
307
|
+
# Changing plans are deferred; failure leaves all unprocessed plans in place
|
|
308
|
+
# Reaching a submit-time or operator-updated end boundary halts the batch,
|
|
309
|
+
# leaves the current plan in place, and exits 0 without submitting later plans.
|
|
310
|
+
# If an operator targets an already-passed stage, the current task finishes,
|
|
311
|
+
# its plan moves to completed/, and the boundary carries into the next task.
|
|
312
|
+
# `hpilot end --clear` clears the current task and removes the boundary from later submissions in this batch.
|
|
313
|
+
# The batch-wide effect is process-local and best-effort if a stage boundary is imminent.
|
|
314
|
+
|
|
315
|
+
# Reconnect to a running or completed task (auto-detects task in current directory)
|
|
316
|
+
hpilot attach
|
|
317
|
+
|
|
318
|
+
# Reconnect to a specific task by ID to replay buffered events
|
|
319
|
+
hpilot attach my-task-123
|
|
320
|
+
|
|
321
|
+
# Cancel an active task (auto-detects task in current directory; errors if zero tasks)
|
|
322
|
+
hpilot cancel
|
|
323
|
+
|
|
324
|
+
# Cancel a specific task by ID (works from any directory)
|
|
325
|
+
hpilot cancel my-task-123
|
|
326
|
+
|
|
327
|
+
# Dump all buffered events (non-blocking)
|
|
328
|
+
hpilot logs my-task-123
|
|
329
|
+
|
|
330
|
+
# Update the end stage of a running task
|
|
331
|
+
hpilot end --after Verify # auto-detect task in current directory; stop after Verify executes
|
|
332
|
+
hpilot end --before Verify # auto-detect task in current directory; stop before Verify starts
|
|
333
|
+
hpilot end abc123 --before Verify # specify task ID explicitly (works from any directory)
|
|
334
|
+
hpilot end abc123 --clear # clear a specific task's boundary (works from any directory)
|
|
335
|
+
|
|
336
|
+
# Override daemon address for any client command
|
|
337
|
+
hpilot submit "task" --socket /short/private/daemon.sock
|
|
338
|
+
hpilot submit "task" --host 0.0.0.0 --port 9000
|
|
339
|
+
|
|
340
|
+
# Query private local history without a running daemon
|
|
341
|
+
hpilot usage
|
|
342
|
+
hpilot usage --all-workspaces --group-by workspace
|
|
343
|
+
hpilot usage --from 2026-07-01 --stage Implement
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
**Exit codes for client commands:**
|
|
347
|
+
- `0` — success
|
|
348
|
+
- `1` — failure (daemon unreachable, task not found, invalid state, etc.)
|
|
349
|
+
- `2` — configuration validation error
|
|
350
|
+
- `130` — interrupted (SIGINT/SIGTERM received)
|
|
351
|
+
|
|
352
|
+
## Shell Completions
|
|
353
|
+
|
|
354
|
+
hpilot supports two completion modes:
|
|
355
|
+
|
|
356
|
+
### Eval-based (requires `argcomplete`)
|
|
357
|
+
|
|
358
|
+
```bash
|
|
359
|
+
uv tool install 'hpilot[completions]'
|
|
360
|
+
eval "$(register-python-argcomplete hpilot)"
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
If hpilot is already installed without the extra, reinstall with `uv tool install 'hpilot[completions]'`. Add the `eval` line to `~/.bashrc` for persistence. This mode provides dynamic completions for stage names, harnesses, and document IDs.
|
|
364
|
+
|
|
365
|
+
### Static file (no dependencies)
|
|
366
|
+
|
|
367
|
+
```bash
|
|
368
|
+
source <(hpilot completion bash)
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
Add to `~/.bashrc` for persistence. This mode covers all subcommands, flags, and static choices (e.g., `--template simple|speckit`, `completion bash`) without runtime dependencies.
|
|
372
|
+
|
|
373
|
+
For full details, see [Shell Completions](docs/completions.md).
|
|
374
|
+
|
|
375
|
+
## Documentation
|
|
376
|
+
|
|
377
|
+
Build the web guides in the workspace’s `hpilot-docs/` project with `npm run sync && npm run dev`.
|
|
378
|
+
|
|
379
|
+
- [Getting Started](docs/getting-started.md) — Step-by-step tutorial from install to first pipeline run
|
|
380
|
+
- [Configuration Reference](docs/configuration.md) — `hpilot.yaml`, `~/.hpilot/config.yaml`, stage fields, CLI commands
|
|
381
|
+
- [Pipeline Authoring Guide](docs/pipeline-authoring.md) — Designing stages, contracts, routing, and stage prompts
|
|
382
|
+
- [Runtime and Daemon — User Guide](docs/runtime-user.md) — Daemon mode, live stderr output, skill disable/restore, signals
|
|
383
|
+
- [OAuth-Protected Workspace MCP Server](docs/mcp-server.md) — OAuth 2.1 HTTP access to workspace file and command tools for ChatGPT, Gemini Spark, and other remote MCP clients
|
|
384
|
+
- [Native Harness Session History](docs/runtime-user.md#native-harness-session-history) — Find or resume stage conversations in each harness's native CLI
|
|
385
|
+
- [Local Usage Metrics](docs/usage-metrics.md) — Local history, filters, grouping, privacy, and token coverage
|
|
386
|
+
- [Runtime and Daemon — Developer Reference](docs/runtime-internals.md) — stage evaluation, adapter internals, logs
|
|
387
|
+
- [WebSocket Protocol](docs/websocket-protocol.md) — Daemon message schema, connection lifecycle, chunking
|
|
388
|
+
- [Testing](docs/testing.md) — Smoke tests, the mock adapter, and daemon fixtures.
|
|
389
|
+
- [Updating](docs/updating.md) — Install, upgrade, and migration workflows
|
|
390
|
+
- [Native Session Verification Report](docs/native-session-verification.md) — Metadata-only evidence for native session persistence and discovery boundaries
|
|
391
|
+
- [Troubleshooting](docs/troubleshooting/index.md) — Common issues and resolutions
|
|
392
|
+
|
|
393
|
+
For development and contributing documentation, see [docs/development.md](docs/development.md).
|