bloom-launch 0.2.1__tar.gz → 0.3.0__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 (88) hide show
  1. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/.github/workflows/release.yml +2 -2
  2. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/PKG-INFO +21 -16
  3. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/README.md +20 -15
  4. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/docs/alpha-release-contract.md +3 -3
  5. bloom_launch-0.3.0/docs/code-harness-compatibility/copilot-1.0.112.md +80 -0
  6. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/docs/installation.md +7 -7
  7. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/docs/quick-launch.md +8 -5
  8. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/docs/releasing.md +15 -15
  9. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/pyproject.toml +1 -1
  10. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/scripts/check_artifacts.py +1 -1
  11. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/scripts/verify_release_candidate.py +2 -2
  12. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/src/bloom_cli/cli.py +1 -1
  13. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/src/bloom_cli/launch.py +48 -4
  14. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/src/bloom_cli/settings.py +4 -1
  15. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/src/bloom_cli/wrappers.py +60 -0
  16. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/tests/test_artifacts.py +2 -2
  17. bloom_launch-0.3.0/tests/test_copilot_launch.py +166 -0
  18. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/tests/test_release_workflow.py +5 -5
  19. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/uv.lock +1 -1
  20. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/.github/workflows/local-checks.yml +0 -0
  21. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/.gitignore +0 -0
  22. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/CONTEXT.md +0 -0
  23. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/LICENSE +0 -0
  24. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/docs/adapter-contract.md +0 -0
  25. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/docs/adr/0001-authorization-is-not-qualification.md +0 -0
  26. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/docs/adr/0002-persistent-native-profiles.md +0 -0
  27. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/docs/adr/0003-credential-and-process-ownership.md +0 -0
  28. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/docs/ci-efficiency-decisions.md +0 -0
  29. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/docs/code-harness-compatibility/codex-0.167.2.md +0 -0
  30. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/docs/connections.md +0 -0
  31. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/docs/demo-goal.md +0 -0
  32. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/docs/development.md +0 -0
  33. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/docs/headless.md +0 -0
  34. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/docs/local-testing.md +0 -0
  35. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/docs/models.md +0 -0
  36. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/docs/multi-harness-engineering-requirements.md +0 -0
  37. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/docs/opencode-bootstrap-compatibility.md +0 -0
  38. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/docs/opencode-demo.md +0 -0
  39. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/docs/qualification.md +0 -0
  40. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/docs/superpowers/plans/2026-11-04-ci-efficiency.md +0 -0
  41. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/docs/superpowers/plans/2026-11-04-coderabbit-followup.md +0 -0
  42. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/docs/superpowers/plans/2026-11-05-demo-goal.md +0 -0
  43. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/docs/superpowers/plans/2026-11-05-opencode-demo.md +0 -0
  44. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/docs/superpowers/plans/2026-11-11-agent-id.md +0 -0
  45. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/docs/superpowers/plans/2026-11-12-agent-id-default.md +0 -0
  46. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/docs/superpowers/plans/2026-11-12-codex-launch-spike.md +0 -0
  47. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/docs/superpowers/plans/2026-11-12-session-id.md +0 -0
  48. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/docs/superpowers/specs/2026-11-04-ci-efficiency-design.md +0 -0
  49. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/docs/superpowers/specs/2026-11-04-coderabbit-followup-design.md +0 -0
  50. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/docs/superpowers/specs/2026-11-05-demo-goal-design.md +0 -0
  51. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/docs/superpowers/specs/2026-11-05-opencode-demo-design.md +0 -0
  52. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/scripts/check_local_install.sh +0 -0
  53. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/scripts/diagnose_discovery.py +0 -0
  54. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/src/bloom_cli/__init__.py +0 -0
  55. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/src/bloom_cli/__main__.py +0 -0
  56. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/src/bloom_cli/contract.py +0 -0
  57. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/src/bloom_cli/discovery.py +0 -0
  58. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/src/bloom_cli/labels.py +0 -0
  59. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/src/bloom_cli/model_metadata.py +0 -0
  60. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/src/bloom_cli/process.py +0 -0
  61. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/src/bloom_cli/progress.py +0 -0
  62. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/src/bloom_cli/urls.py +0 -0
  63. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/tests/conftest.py +0 -0
  64. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/tests/installed_connection_probe.py +0 -0
  65. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/tests/job_control.py +0 -0
  66. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/tests/job_control_probe.py +0 -0
  67. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/tests/native_smoke_support.py +0 -0
  68. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/tests/pty_driver.py +0 -0
  69. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/tests/test_ci_workflow.py +0 -0
  70. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/tests/test_cli_forwarding.py +0 -0
  71. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/tests/test_codex_compatibility.py +0 -0
  72. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/tests/test_codex_launch.py +0 -0
  73. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/tests/test_discovery_diagnostic.py +0 -0
  74. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/tests/test_install_script.py +0 -0
  75. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/tests/test_installed_launch.py +0 -0
  76. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/tests/test_job_control.py +0 -0
  77. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/tests/test_launch_progress.py +0 -0
  78. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/tests/test_model_labels.py +0 -0
  79. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/tests/test_model_limits.py +0 -0
  80. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/tests/test_model_metadata.py +0 -0
  81. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/tests/test_native_smoke.py +0 -0
  82. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/tests/test_process.py +0 -0
  83. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/tests/test_progress.py +0 -0
  84. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/tests/test_secret_validation.py +0 -0
  85. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/tests/test_thin_launch.py +0 -0
  86. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/tests/test_urls.py +0 -0
  87. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/tests/test_wrappers.py +0 -0
  88. {bloom_launch-0.2.1 → bloom_launch-0.3.0}/tests/thin_job_control_probe.py +0 -0
@@ -76,7 +76,7 @@ jobs:
76
76
 
77
77
  root = Path(os.environ["CANDIDATE_DIR"])
78
78
  dist = root / "dist"
79
- names = {"bloom_launch-0.2.1-py3-none-any.whl", "bloom_launch-0.2.1.tar.gz"}
79
+ names = {"bloom_launch-0.3.0-py3-none-any.whl", "bloom_launch-0.3.0.tar.gz"}
80
80
  if (dist.is_symlink() or not dist.is_dir()
81
81
  or {p.name for p in root.iterdir()} != {"dist"}
82
82
  or {p.name for p in dist.iterdir()} != names
@@ -144,7 +144,7 @@ jobs:
144
144
  trusted = Path(os.environ["GITHUB_WORKSPACE"]) / "trusted"
145
145
  root = Path(os.environ["RUNNER_TEMP"]) / "bloom-release-candidate"
146
146
  verifier = runpy.run_path(str(trusted / "scripts/verify_release_candidate.py"))
147
- names = ("bloom_launch-0.2.1-py3-none-any.whl", "bloom_launch-0.2.1.tar.gz")
147
+ names = ("bloom_launch-0.3.0-py3-none-any.whl", "bloom_launch-0.3.0.tar.gz")
148
148
  expected = {
149
149
  "source_sha": os.environ["TRUSTED_WORKFLOW_SHA"],
150
150
  "repository": os.environ["GITHUB_REPOSITORY"],
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: bloom-launch
3
- Version: 0.2.1
3
+ Version: 0.3.0
4
4
  Summary: Scoped launcher for native coding harnesses
5
5
  License-Expression: Apache-2.0
6
6
  License-File: LICENSE
@@ -15,32 +15,32 @@ Description-Content-Type: text/markdown
15
15
 
16
16
  # Bloom Launch
17
17
 
18
- Connect your installed Claude Code, Codex, or OpenCode to the Bloom gateway for one invocation.
19
- Claude Code and OpenCode retain their normal settings, permissions, plugins, and history.
18
+ Connect your installed Claude Code, Codex, GitHub Copilot CLI, or OpenCode to the Bloom gateway for one invocation.
19
+ Claude Code, Copilot CLI, and OpenCode retain their normal settings, permissions, plugins, and history.
20
20
  Codex uses a separate persistent Bloom-owned home at `$HOME/.config/bloom/codex` for its native state and project trust.
21
- Plain `claude`, `codex`, or `opencode` continues to use its normal connection.
21
+ Plain `claude`, `codex`, `copilot`, or `opencode` continues to use its normal connection.
22
22
 
23
23
  ## Install
24
24
 
25
- Requirements: Python **3.12 or later**, plus Claude Code, Codex CLI `0.167.2`, or OpenCode already installed and available on `PATH`.
25
+ Requirements: Python **3.12 or later**, plus Claude Code, Codex CLI `0.167.2`, GitHub Copilot CLI `1.0.112`, or OpenCode already installed and available on `PATH`.
26
26
  macOS is the primary platform. Bloom does not install or repair your Coding Harness.
27
- Codex has structural adapter evidence only. Live Bloom, tool/history, and full interactive qualification remain unrecorded.
28
- The bundled Codex command does not establish a Qualified Harness Path or satisfy the release's native acceptance gate.
29
- Before launching, follow the [Claude Code installation instructions](https://docs.anthropic.com/en/docs/claude-code/overview), [Codex CLI installation instructions](https://developers.openai.com/codex/), or [OpenCode installation instructions](https://opencode.ai/docs/installation/).
27
+ Codex and Copilot have structural adapter evidence only. Live Bloom, tool/history, and full interactive qualification remain unrecorded.
28
+ The bundled Codex and Copilot commands do not establish a Qualified Harness Path or satisfy the release's native acceptance gate.
29
+ Before launching, follow the [Claude Code installation instructions](https://docs.anthropic.com/en/docs/claude-code/overview), [Codex CLI installation instructions](https://developers.openai.com/codex/), [GitHub Copilot CLI installation instructions](https://docs.github.com/en/copilot/how-tos/set-up/install-copilot-cli), or [OpenCode installation instructions](https://opencode.ai/docs/installation/).
30
30
 
31
- These instructions describe `0.2.1`; if not yet available on PyPI, collaborators can use a source checkout.
32
- The selected source version is `0.2.1`.
31
+ These instructions describe `0.3.0`; if not yet available on PyPI, collaborators can use a source checkout.
32
+ The selected source version is `0.3.0`.
33
33
 
34
34
  When available on PyPI, install this exact version with either tool:
35
35
 
36
36
  ```sh
37
- uv tool install 'bloom-launch==0.2.1'
37
+ uv tool install 'bloom-launch==0.3.0'
38
38
  # Or:
39
- pipx install 'bloom-launch==0.2.1'
39
+ pipx install 'bloom-launch==0.3.0'
40
40
  ```
41
41
 
42
42
  Collaborators need access to the private [repository](https://github.com/Bloom-Factory-Engineering/bloom-cli) for a source checkout.
43
- Use a checkout whose project metadata and lockfile both specify `0.2.1` before running:
43
+ Use a checkout whose project metadata and lockfile both specify `0.3.0` before running:
44
44
 
45
45
  ```sh
46
46
  uv sync --locked --group dev
@@ -48,6 +48,8 @@ uv run --no-sync bloom launch claude
48
48
  # Or:
49
49
  uv run --no-sync bloom launch codex
50
50
  # Or:
51
+ uv run --no-sync bloom launch copilot
52
+ # Or:
51
53
  uv run --no-sync bloom launch opencode
52
54
  ```
53
55
 
@@ -64,6 +66,7 @@ bloom --help
64
66
  bloom --version
65
67
  bloom launch --help
66
68
  bloom launch claude
69
+ bloom launch copilot
67
70
  bloom launch opencode
68
71
  bloom launch claude --model EXACT_GATEWAY_MODEL_ID
69
72
  bloom launch opencode --config
@@ -73,10 +76,11 @@ bloom launch claude --agent-id Alex
73
76
  bloom launch claude --session-id session-123
74
77
  ```
75
78
 
76
- Bloom sends extra arguments to the selected Coding Harness. For example, use `-p` with Claude Code or `run` with OpenCode:
79
+ Bloom sends extra arguments to the selected Coding Harness. For example, use `-p` with Claude Code or Copilot CLI, or `run` with OpenCode:
77
80
 
78
81
  ```sh
79
82
  bloom launch claude -p "say hi"
83
+ bloom launch copilot -p "say hi"
80
84
  bloom launch opencode run "say hi"
81
85
  ```
82
86
 
@@ -92,7 +96,7 @@ Bloom keeps `--model` for its own gateway model selection. Bloom also keeps Clau
92
96
  | --- | --- |
93
97
  | `-h`, `--help` | Show global help or `launch` help. |
94
98
  | `--version` | Show the package version. Use before `launch`. |
95
- | `launch {claude,codex,opencode}` | Select the installed Coding Harness. |
99
+ | `launch {claude,codex,copilot,opencode}` | Select the installed Coding Harness. |
96
100
  | `--config` | Replace the gateway vkey and the current harness's default model. |
97
101
  | `--model EXACT_GATEWAY_MODEL_ID` | Select an exact, full gateway model ID. |
98
102
  | `--base_url BASE_URL` | Select the gateway for this invocation. |
@@ -110,7 +114,8 @@ It uses an animated ASCII spinner on a TTY and a plain line otherwise.
110
114
  The indicator stops before the picker, native handoff, or error output, including cancellation.
111
115
  Ordinary launches use the cached vkey and the harness's saved model for direct native handoff without launcher HTTP or progress output.
112
116
  First setup, `--config`, and explicit `--model` perform discovery and access checks before handoff.
113
- Each normalized gateway shares one vkey across all three harnesses. Each harness has a separate model default.
117
+ Each normalized gateway shares one vkey across all four harnesses. Each harness has a separate model default.
118
+ Copilot CLI `1.0.112` sends agent and session headers through `COPILOT_PROVIDER_HEADERS`. Older `1.0.x` builds launch with a warning and without those headers.
114
119
 
115
120
  `--config` prompts for a replacement vkey, displays model choices, and prompts for an agent ID.
116
121
  Bloom saves the vkey, agent ID, and current harness's model atomically after discovery, selection, and native preparation succeed.
@@ -1,31 +1,31 @@
1
1
  # Bloom Launch
2
2
 
3
- Connect your installed Claude Code, Codex, or OpenCode to the Bloom gateway for one invocation.
4
- Claude Code and OpenCode retain their normal settings, permissions, plugins, and history.
3
+ Connect your installed Claude Code, Codex, GitHub Copilot CLI, or OpenCode to the Bloom gateway for one invocation.
4
+ Claude Code, Copilot CLI, and OpenCode retain their normal settings, permissions, plugins, and history.
5
5
  Codex uses a separate persistent Bloom-owned home at `$HOME/.config/bloom/codex` for its native state and project trust.
6
- Plain `claude`, `codex`, or `opencode` continues to use its normal connection.
6
+ Plain `claude`, `codex`, `copilot`, or `opencode` continues to use its normal connection.
7
7
 
8
8
  ## Install
9
9
 
10
- Requirements: Python **3.12 or later**, plus Claude Code, Codex CLI `0.167.2`, or OpenCode already installed and available on `PATH`.
10
+ Requirements: Python **3.12 or later**, plus Claude Code, Codex CLI `0.167.2`, GitHub Copilot CLI `1.0.112`, or OpenCode already installed and available on `PATH`.
11
11
  macOS is the primary platform. Bloom does not install or repair your Coding Harness.
12
- Codex has structural adapter evidence only. Live Bloom, tool/history, and full interactive qualification remain unrecorded.
13
- The bundled Codex command does not establish a Qualified Harness Path or satisfy the release's native acceptance gate.
14
- Before launching, follow the [Claude Code installation instructions](https://docs.anthropic.com/en/docs/claude-code/overview), [Codex CLI installation instructions](https://developers.openai.com/codex/), or [OpenCode installation instructions](https://opencode.ai/docs/installation/).
12
+ Codex and Copilot have structural adapter evidence only. Live Bloom, tool/history, and full interactive qualification remain unrecorded.
13
+ The bundled Codex and Copilot commands do not establish a Qualified Harness Path or satisfy the release's native acceptance gate.
14
+ Before launching, follow the [Claude Code installation instructions](https://docs.anthropic.com/en/docs/claude-code/overview), [Codex CLI installation instructions](https://developers.openai.com/codex/), [GitHub Copilot CLI installation instructions](https://docs.github.com/en/copilot/how-tos/set-up/install-copilot-cli), or [OpenCode installation instructions](https://opencode.ai/docs/installation/).
15
15
 
16
- These instructions describe `0.2.1`; if not yet available on PyPI, collaborators can use a source checkout.
17
- The selected source version is `0.2.1`.
16
+ These instructions describe `0.3.0`; if not yet available on PyPI, collaborators can use a source checkout.
17
+ The selected source version is `0.3.0`.
18
18
 
19
19
  When available on PyPI, install this exact version with either tool:
20
20
 
21
21
  ```sh
22
- uv tool install 'bloom-launch==0.2.1'
22
+ uv tool install 'bloom-launch==0.3.0'
23
23
  # Or:
24
- pipx install 'bloom-launch==0.2.1'
24
+ pipx install 'bloom-launch==0.3.0'
25
25
  ```
26
26
 
27
27
  Collaborators need access to the private [repository](https://github.com/Bloom-Factory-Engineering/bloom-cli) for a source checkout.
28
- Use a checkout whose project metadata and lockfile both specify `0.2.1` before running:
28
+ Use a checkout whose project metadata and lockfile both specify `0.3.0` before running:
29
29
 
30
30
  ```sh
31
31
  uv sync --locked --group dev
@@ -33,6 +33,8 @@ uv run --no-sync bloom launch claude
33
33
  # Or:
34
34
  uv run --no-sync bloom launch codex
35
35
  # Or:
36
+ uv run --no-sync bloom launch copilot
37
+ # Or:
36
38
  uv run --no-sync bloom launch opencode
37
39
  ```
38
40
 
@@ -49,6 +51,7 @@ bloom --help
49
51
  bloom --version
50
52
  bloom launch --help
51
53
  bloom launch claude
54
+ bloom launch copilot
52
55
  bloom launch opencode
53
56
  bloom launch claude --model EXACT_GATEWAY_MODEL_ID
54
57
  bloom launch opencode --config
@@ -58,10 +61,11 @@ bloom launch claude --agent-id Alex
58
61
  bloom launch claude --session-id session-123
59
62
  ```
60
63
 
61
- Bloom sends extra arguments to the selected Coding Harness. For example, use `-p` with Claude Code or `run` with OpenCode:
64
+ Bloom sends extra arguments to the selected Coding Harness. For example, use `-p` with Claude Code or Copilot CLI, or `run` with OpenCode:
62
65
 
63
66
  ```sh
64
67
  bloom launch claude -p "say hi"
68
+ bloom launch copilot -p "say hi"
65
69
  bloom launch opencode run "say hi"
66
70
  ```
67
71
 
@@ -77,7 +81,7 @@ Bloom keeps `--model` for its own gateway model selection. Bloom also keeps Clau
77
81
  | --- | --- |
78
82
  | `-h`, `--help` | Show global help or `launch` help. |
79
83
  | `--version` | Show the package version. Use before `launch`. |
80
- | `launch {claude,codex,opencode}` | Select the installed Coding Harness. |
84
+ | `launch {claude,codex,copilot,opencode}` | Select the installed Coding Harness. |
81
85
  | `--config` | Replace the gateway vkey and the current harness's default model. |
82
86
  | `--model EXACT_GATEWAY_MODEL_ID` | Select an exact, full gateway model ID. |
83
87
  | `--base_url BASE_URL` | Select the gateway for this invocation. |
@@ -95,7 +99,8 @@ It uses an animated ASCII spinner on a TTY and a plain line otherwise.
95
99
  The indicator stops before the picker, native handoff, or error output, including cancellation.
96
100
  Ordinary launches use the cached vkey and the harness's saved model for direct native handoff without launcher HTTP or progress output.
97
101
  First setup, `--config`, and explicit `--model` perform discovery and access checks before handoff.
98
- Each normalized gateway shares one vkey across all three harnesses. Each harness has a separate model default.
102
+ Each normalized gateway shares one vkey across all four harnesses. Each harness has a separate model default.
103
+ Copilot CLI `1.0.112` sends agent and session headers through `COPILOT_PROVIDER_HEADERS`. Older `1.0.x` builds launch with a warning and without those headers.
99
104
 
100
105
  `--config` prompts for a replacement vkey, displays model choices, and prompts for an agent ID.
101
106
  Bloom saves the vkey, agent ID, and current harness's model atomically after discovery, selection, and native preparation succeed.
@@ -1,9 +1,9 @@
1
- # `0.2.1` macOS-first public release contract
1
+ # `0.3.0` macOS-first public release contract
2
2
 
3
- This contract describes the selected `bloom-launch==0.2.1` release, with command `bloom` and Python 3.12 or later.
3
+ This contract describes the selected `bloom-launch==0.3.0` release, with command `bloom` and Python 3.12 or later.
4
4
  It retains the macOS-first boundary and separate release gates. It does not grant new publication approval or establish production readiness.
5
5
  The earlier `0.1.0a4` release-preparation check is historical. Publication of
6
- `0.2.1` remains a separate owner-authorized action.
6
+ `0.3.0` remains a separate owner-authorized action.
7
7
 
8
8
  ## HISTORICAL: `0.1.0a1` and `0.1.0a4` approvals
9
9
 
@@ -0,0 +1,80 @@
1
+ # GitHub Copilot CLI 1.0.112 Compatibility Evidence
2
+
3
+ Status: historical structural adapter evidence recorded. No live Bloom request is recorded here.
4
+
5
+ ## Baseline
6
+
7
+ - Executable: `copilot`
8
+ - Reported version: `GitHub Copilot CLI 1.0.112.`
9
+ - Host: macOS Apple Silicon
10
+ - Tested native surfaces: non-interactive `-p/--prompt` against a loopback OpenAI Chat Completions recorder
11
+
12
+ ## Documented Configuration
13
+
14
+ The installed Copilot CLI documents these relevant controls:
15
+
16
+ - `COPILOT_PROVIDER_BASE_URL` selects a bring-your-own-key provider endpoint.
17
+ - `COPILOT_PROVIDER_TYPE=openai` selects an OpenAI-compatible provider.
18
+ - `COPILOT_PROVIDER_WIRE_API=completions` selects Chat Completions.
19
+ - `COPILOT_PROVIDER_API_KEY` supplies the provider credential as `Authorization: Bearer`.
20
+ - `COPILOT_PROVIDER_BEARER_TOKEN` would replace the API key for OpenAI-type providers.
21
+ - `COPILOT_MODEL` and `--model` select the model ID.
22
+ - `COPILOT_PROVIDER_WIRE_MODEL` sets the model name sent on the wire.
23
+ - `COPILOT_PROVIDER_MAX_PROMPT_TOKENS` sets the prompt token budget.
24
+ - `COPILOT_PROVIDER_HEADERS` sends custom provider-only headers as newline-separated `Name: Value` pairs.
25
+ - `COPILOT_OFFLINE=true` skips GitHub authentication, telemetry, and auto-update.
26
+ - GitHub authentication is not required when `COPILOT_PROVIDER_*` configures a provider.
27
+
28
+ The adapter uses invocation-scoped environment variables only. It does not rewrite the user's `~/.copilot` home.
29
+
30
+ ## Adapter Mapping
31
+
32
+ The structural adapter sets these child environment values:
33
+
34
+ ```text
35
+ COPILOT_PROVIDER_TYPE=openai
36
+ COPILOT_PROVIDER_WIRE_API=completions
37
+ COPILOT_PROVIDER_BASE_URL=<Bloom base URL>/v1
38
+ COPILOT_PROVIDER_API_KEY=<selected Bloom vkey>
39
+ COPILOT_MODEL=<selected Bloom model>
40
+ COPILOT_PROVIDER_WIRE_MODEL=<selected Bloom model>
41
+ COPILOT_PROVIDER_MAX_PROMPT_TOKENS=<optional cached max_input_tokens>
42
+ COPILOT_PROVIDER_HEADERS=X-Bloom-Agent-ID: ...\nX-Bloom-Session-ID: ...
43
+ COPILOT_OFFLINE=true
44
+ COPILOT_AUTO_UPDATE=false
45
+ ```
46
+
47
+ The argv prefix is `--model <selected Bloom model>`, followed by forwarded native arguments.
48
+
49
+ ## Loopback Spike Result
50
+
51
+ Against a local `127.0.0.1` recorder with `COPILOT_OFFLINE=true`:
52
+
53
+ - Request path: `POST /v1/chat/completions`
54
+ - Authorization: `Bearer test-vkey`
55
+ - Custom headers: `X-Bloom-Agent-ID` and `X-Bloom-Session-ID` reached the recorder
56
+ - Body included `model=bloom-test-model`, `stream=true`, and `tools`
57
+ - Exit status was `0`
58
+ - No GitHub sign-in prompt occurred for this BYOK launch
59
+
60
+ ## Version Gate
61
+
62
+ Bloom pins GitHub Copilot CLI `1.0.112` as the header-capable release.
63
+
64
+ - `1.0.112`: launch with attribution headers
65
+ - older `1.0.x` below `1.0.112`: launch without attribution headers and print a warning
66
+ - other versions: refuse
67
+
68
+ ## Native Argument Policy
69
+
70
+ The adapter forwards non-conflicting native arguments in their original order.
71
+ It reserves these Copilot controls because they can change the Bloom connection:
72
+
73
+ - `--model` and `-m`
74
+ - `--provider`, `--provider-url`, and `--provider-base-url`
75
+
76
+ ## Limits
77
+
78
+ - This record is loopback/recorder evidence only. It is not live Bloom gateway qualification.
79
+ - Attribution depends on `COPILOT_PROVIDER_HEADERS`. Older Copilot builds without that variable launch with a warning and without agent or session headers.
80
+ - Copilot CLI may still create session files under the user's Copilot home. Bloom does not manage those files.
@@ -10,25 +10,25 @@ macOS is the primary platform. Bloom does not install, upgrade, or repair the Co
10
10
  The Coding Harness retains its normal settings, permissions, plugins, and history.
11
11
  Install [Claude Code](https://docs.anthropic.com/en/docs/claude-code/overview), [Codex CLI](https://developers.openai.com/codex/), or [OpenCode](https://opencode.ai/docs/installation/) before using Bloom Launch.
12
12
 
13
- ## Install `0.2.1`
13
+ ## Install `0.3.0`
14
14
 
15
- These instructions describe `0.2.1`; if not yet available on PyPI, collaborators can use a source checkout.
15
+ These instructions describe `0.3.0`; if not yet available on PyPI, collaborators can use a source checkout.
16
16
  When available, choose either isolated installation tool:
17
17
 
18
18
  ```sh
19
- uv tool install 'bloom-launch==0.2.1'
19
+ uv tool install 'bloom-launch==0.3.0'
20
20
  # Or:
21
- pipx install 'bloom-launch==0.2.1'
21
+ pipx install 'bloom-launch==0.3.0'
22
22
  ```
23
23
 
24
- The selected source metadata is `0.2.1`. This does not establish publication or release approval.
24
+ The selected source metadata is `0.3.0`. This does not establish publication or release approval.
25
25
  The published `0.1.0a1` lacks the cached-vkey behavior described here.
26
26
  See its [historical PyPI instructions](https://pypi.org/project/bloom-launch/0.1.0a1/) for that version.
27
27
 
28
28
  ## Source checkout
29
29
 
30
30
  Collaborators need access to the private [repository](https://github.com/Bloom-Factory-Engineering/bloom-cli) to obtain a source checkout.
31
- Before using the commands below, confirm that project metadata and the owner-updated root lockfile both specify `0.2.1`.
31
+ Before using the commands below, confirm that project metadata and the owner-updated root lockfile both specify `0.3.0`.
32
32
  Agents must not edit `uv.lock` or bypass the locked install.
33
33
  Run from the checkout root:
34
34
 
@@ -43,7 +43,7 @@ uv run --no-sync bloom launch opencode
43
43
  ```
44
44
 
45
45
  In this checkout, prefix the documented `bloom` commands with `uv run --no-sync`.
46
- The source checkout implements the `0.2.1` behavior described in these documents.
46
+ The source checkout implements the `0.3.0` behavior described in these documents.
47
47
 
48
48
  ## Credentials and first launch
49
49
 
@@ -1,7 +1,7 @@
1
1
  # Launch behavior
2
2
 
3
3
  These instructions describe cached vkeys and configurable agent IDs.
4
- If `0.2.1` is not yet available on PyPI, collaborators can follow the [source-checkout installation](installation.md#source-checkout).
4
+ If `0.3.0` is not yet available on PyPI, collaborators can follow the [source-checkout installation](installation.md#source-checkout).
5
5
  In that checkout, use `uv run --no-sync bloom` instead of `bloom`.
6
6
 
7
7
  ## Commands
@@ -12,9 +12,11 @@ bloom --version
12
12
  bloom launch --help
13
13
  bloom launch claude
14
14
  bloom launch codex
15
+ bloom launch copilot
15
16
  bloom launch opencode
16
17
  bloom launch codex exec "say hi"
17
18
  bloom launch codex --agent-id Platform --session-id session-123 exec "say hi"
19
+ bloom launch copilot -p "say hi"
18
20
  bloom launch claude --model EXACT_GATEWAY_MODEL_ID
19
21
  bloom launch opencode --config
20
22
  bloom launch claude --config --model EXACT_GATEWAY_MODEL_ID
@@ -22,12 +24,13 @@ bloom launch opencode --base_url https://gateway.example.com/prefix/v1
22
24
  ```
23
25
 
24
26
  Global options are `-h`/`--help` and `--version`.
25
- `launch` takes one positional harness: `claude`, `codex`, or `opencode`.
27
+ `launch` takes one positional harness: `claude`, `codex`, `copilot`, or `opencode`.
26
28
  Its options are `-h`/`--help`, `--config`, `--model EXACT_GATEWAY_MODEL_ID`, `--base_url BASE_URL`, and `--agent-id VALUE`.
27
- Use `--session-id VALUE` to set a per-launch session ID. Unknown arguments after the harness pass to that harness, and `--` starts an explicit native-argument suffix. Bloom reserves native connection controls. For Codex, these include `-m`, `--model`, `-c`, `--config`, `--profile`, `--oss`, `--local-provider`, and `--base_url`. Codex uses Bloom's persistent `~/.config/bloom/codex` home for project trust state, while Bloom keeps connection values invocation-scoped.
29
+ Use `--session-id VALUE` to set a per-launch session ID. Unknown arguments after the harness pass to that harness, and `--` starts an explicit native-argument suffix. Bloom reserves native connection controls. For Codex, these include `-m`, `--model`, `-c`, `--config`, `--profile`, `--oss`, `--local-provider`, and `--base_url`. For Copilot, these include `--model`, `-m`, `--provider`, `--provider-url`, and `--provider-base-url`. Codex uses Bloom's persistent `~/.config/bloom/codex` home for project trust state, while Bloom keeps connection values invocation-scoped. Copilot uses environment-only BYOK settings and does not rewrite `~/.copilot`.
28
30
 
29
31
  ```sh
30
32
  bloom launch claude -p "say hi"
33
+ bloom launch copilot -p "say hi"
31
34
  bloom launch opencode run "say hi"
32
35
  bloom launch claude -- --verbose
33
36
  ```
@@ -90,7 +93,7 @@ Normalization also removes trailing slashes, lowercases the hostname, and remove
90
93
  URLs must not contain credentials, queries, or fragments.
91
94
 
92
95
  Settings live in `$HOME/.config/bloom/launcher.json`, with owner-only permissions (`0600`).
93
- Each normalized gateway has one shared vkey and separate `claude` and `opencode` model defaults. The optional agent ID is global across gateways and harnesses.
96
+ Each normalized gateway has one shared vkey and separate `claude`, `codex`, `copilot`, and `opencode` model defaults. The optional agent ID is global across gateways and harnesses.
94
97
  Its optional `max_input_tokens` map associates exact model IDs with positive integer limits, alongside those unchanged string fields.
95
98
  Changing the shared key affects subsequent launches of either harness at that gateway.
96
99
  The other harness's model default stays unchanged.
@@ -112,7 +115,7 @@ Never put a vkey in command arguments, a URL, a project file, or an error report
112
115
  ## Native workflow
113
116
 
114
117
  Bloom overrides the connection for one invocation. The Coding Harness retains its normal settings, permissions, plugins, and history.
115
- Plain `claude` or `opencode` uses its normal connection.
118
+ Plain `claude`, `codex`, `copilot`, or `opencode` uses its normal connection.
116
119
  Complete native setup and trust prompts normally.
117
120
  Shell approvals follow native permissions and workspace instructions. A shell approval prompt is not a connection error.
118
121
 
@@ -1,6 +1,6 @@
1
- # Manual `0.2.1` release
1
+ # Manual `0.3.0` release
2
2
 
3
- The selected candidate version is `bloom-launch==0.2.1`, with command `bloom` and Python 3.12 or later.
3
+ The selected candidate version is `bloom-launch==0.3.0`, with command `bloom` and Python 3.12 or later.
4
4
  The release-preparation public PyPI metadata check returned 404 for this version. Publication remains pending.
5
5
  This procedure describes preparation and gates. It does not grant candidate approval or publication authority.
6
6
  GitHub Actions retains a candidate artifact only. A human approves the hashes and performs the upload locally.
@@ -8,16 +8,16 @@ This procedure does not authorize native execution, paid calls, credential-store
8
8
 
9
9
  ## Version consistency
10
10
 
11
- `pyproject.toml`, artifact scripts, release inventory, and matching release tests now select `0.2.1`.
11
+ `pyproject.toml`, artifact scripts, release inventory, and matching release tests now select `0.3.0`.
12
12
  The owner supplied the matching root package version update in `uv.lock`. Dependency entries remain unchanged.
13
- Fresh locked installation passed and the installed source command reports `0.2.1`.
13
+ Fresh locked installation passed and the installed source command reports `0.3.0`.
14
14
  Preserve every dependency entry. Agents must not edit `uv.lock`; the owner-supplied version change is part of the coordinated source commit.
15
- The historical `0.1.0` to `0.1.0a1` exception does not authorize an agent change for `0.2.1`.
15
+ The historical `0.1.0` to `0.1.0a1` exception does not authorize an agent change for `0.3.0`.
16
16
  Preserve locked validation and verify that candidate creation does not change the committed lockfile.
17
17
 
18
18
  Before creating a candidate:
19
19
 
20
- 1. Confirm the committed project and lockfile root versions both select `0.2.1`.
20
+ 1. Confirm the committed project and lockfile root versions both select `0.3.0`.
21
21
  2. Confirm agreement between project metadata, lockfile, artifact scripts, workflow inventory, release tests, and these documents.
22
22
  3. Verify the exact-version install instructions and supported arguments in the README.
23
23
  4. Verify that wheel and sdist descriptions match the README. PyPI displays the packaged description after upload.
@@ -30,7 +30,7 @@ Do not republish or overwrite `0.1.0a1`.
30
30
  The owner approved the macOS-first `0.1.0a1` alpha, Apache-2.0 licensing, and public distribution of its included Python source.
31
31
  The owner also approved manual exact-artifact publication while retaining the private repository on GitHub Team.
32
32
  The historical lockfile exception covered only the root version change from `0.1.0` to `0.1.0a1`.
33
- These historical approvals do not authorize a `0.2.1` upload or transfer acceptance of older artifacts.
33
+ These historical approvals do not authorize a `0.3.0` upload or transfer acceptance of older artifacts.
34
34
 
35
35
  ## Account and repository preparation
36
36
 
@@ -108,8 +108,8 @@ Download exactly that artifact into a fresh private directory. It contains:
108
108
 
109
109
  ```text
110
110
  manifest.json
111
- dist/bloom_launch-0.2.1-py3-none-any.whl
112
- dist/bloom_launch-0.2.1.tar.gz
111
+ dist/bloom_launch-0.3.0-py3-none-any.whl
112
+ dist/bloom_launch-0.3.0.tar.gz
113
113
  ```
114
114
 
115
115
  The manifest records both SHA256 hashes, source SHA, repository, run ID, and attempt.
@@ -121,7 +121,7 @@ Each new run or attempt creates a new candidate. Never substitute another run's
121
121
  The build backend's isolated dependency resolution is not locked by `uv.lock`.
122
122
  Builds are not promised to produce identical bytes across runs.
123
123
  README edits change wheel metadata and can change both artifact hashes even when runtime modules stay identical.
124
- Acceptance and hash approval for `0.1.0a1` do not transfer to `0.2.1`. Review the exact new candidate bytes.
124
+ Acceptance and hash approval for `0.1.0a1` do not transfer to `0.3.0`. Review the exact new candidate bytes.
125
125
 
126
126
  ## Review and exact-hash approval
127
127
 
@@ -171,8 +171,8 @@ Use the same `CANDIDATE` directory and release-record variables as above.
171
171
 
172
172
  ```sh
173
173
  uvx --from twine==7.0.0 twine check --strict \
174
- "$CANDIDATE/dist/bloom_launch-0.2.1-py3-none-any.whl" \
175
- "$CANDIDATE/dist/bloom_launch-0.2.1.tar.gz"
174
+ "$CANDIDATE/dist/bloom_launch-0.3.0-py3-none-any.whl" \
175
+ "$CANDIDATE/dist/bloom_launch-0.3.0.tar.gz"
176
176
 
177
177
  uv run --no-sync python scripts/verify_release_candidate.py "$CANDIDATE" \
178
178
  --source-sha "$SOURCE_SHA" \
@@ -183,8 +183,8 @@ env -u TWINE_PASSWORD -u TWINE_NON_INTERACTIVE \
183
183
  uvx --from twine==7.0.0 twine upload \
184
184
  --config-file /dev/null --repository-url https://upload.pypi.org/legacy/ \
185
185
  --username __token__ \
186
- "$CANDIDATE/dist/bloom_launch-0.2.1-py3-none-any.whl" \
187
- "$CANDIDATE/dist/bloom_launch-0.2.1.tar.gz"
186
+ "$CANDIDATE/dist/bloom_launch-0.3.0-py3-none-any.whl" \
187
+ "$CANDIDATE/dist/bloom_launch-0.3.0.tar.gz"
188
188
  ```
189
189
 
190
190
  Enter the API token, including its prefix, at Twine's hidden prompt. Do not use the account password.
@@ -196,7 +196,7 @@ This manual token upload does not provide a Trusted Publishing attestation.
196
196
  ## Post-upload verification and recovery
197
197
 
198
198
  Compare PyPI's filenames and SHA256 values with the approved receipt. Retain the upload result.
199
- Install `bloom-launch==0.2.1` from PyPI outside the checkout in fresh isolated uv-tool and pipx environments.
199
+ Install `bloom-launch==0.3.0` from PyPI outside the checkout in fresh isolated uv-tool and pipx environments.
200
200
  Verify version, help, and the agreed installed-user journey. Record the final receipt and remaining evidence limits.
201
201
  Obtain separate authority for repeated native execution, paid calls, or credential-store access.
202
202
 
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "bloom-launch"
7
- version = "0.2.1"
7
+ version = "0.3.0"
8
8
  description = "Scoped launcher for native coding harnesses"
9
9
  readme = "README.md"
10
10
  license = "Apache-2.0"
@@ -55,7 +55,7 @@ def safe_path(name):
55
55
  def validate(root, dist, terms):
56
56
  project = tomllib.loads((root / "pyproject.toml").read_text())["project"]
57
57
  name, version = project["name"], project["version"]
58
- require(name == "bloom-launch" and version == "0.2.1")
58
+ require(name == "bloom-launch" and version == "0.3.0")
59
59
  require(project["license"] == "Apache-2.0" and project["license-files"] == ["LICENSE"])
60
60
  license_bytes = (root / "LICENSE").read_bytes()
61
61
  readme_bytes = (root / project["readme"]).read_bytes()
@@ -6,8 +6,8 @@ import json
6
6
  import re
7
7
  from pathlib import Path
8
8
 
9
- WHEEL = "bloom_launch-0.2.1-py3-none-any.whl"
10
- SDIST = "bloom_launch-0.2.1.tar.gz"
9
+ WHEEL = "bloom_launch-0.3.0-py3-none-any.whl"
10
+ SDIST = "bloom_launch-0.3.0.tar.gz"
11
11
 
12
12
 
13
13
  def unique_fields(pairs):
@@ -22,7 +22,7 @@ def main(argv: list[str] | None = None) -> int:
22
22
  parser.add_argument("--version", action="version", version=version("bloom-launch"))
23
23
  commands = parser.add_subparsers(dest="command", required=True)
24
24
  command = commands.add_parser("launch", allow_abbrev=False)
25
- command.add_argument("harness", choices=("claude", "codex", "opencode"))
25
+ command.add_argument("harness", choices=("claude", "codex", "copilot", "opencode"))
26
26
  command.add_argument("--base_url", default=DEFAULT_BASE_URL)
27
27
  command.add_argument("--model")
28
28
  command.add_argument("--config", action="store_true")
@@ -19,13 +19,16 @@ from .process import run_launch
19
19
  from .progress import fetching_models
20
20
  from .settings import GatewaySettings, load_settings, save_selection
21
21
  from .urls import normalize_base_url
22
- from .wrappers import prepare_claude, prepare_codex, prepare_opencode
22
+ from .wrappers import prepare_claude, prepare_codex, prepare_copilot, prepare_opencode
23
23
 
24
24
  _DEFAULT_AGENT_IDS = {
25
25
  "claude": "bloom-launch-claude",
26
26
  "codex": "bloom-launch-codex",
27
+ "copilot": "bloom-launch-copilot",
27
28
  "opencode": "bloom-launch-opencode",
28
29
  }
30
+ _COPILOT_PINNED_VERSION = "1.0.112"
31
+ _COPILOT_HEADERS_SINCE = (1, 0, 112)
29
32
 
30
33
 
31
34
  def prompt_vkey() -> Secret:
@@ -59,6 +62,30 @@ def _validate_codex_version(executable: Path) -> None:
59
62
  raise LaunchError("Codex CLI 0.167.2 is required for this launch")
60
63
 
61
64
 
65
+ def _validate_copilot_version(executable: Path) -> tuple[str, bool]:
66
+ """Return the reported version and whether custom provider headers are supported."""
67
+ try:
68
+ result = subprocess.run((str(executable), "--version"), capture_output=True,
69
+ text=True, check=True, timeout=5)
70
+ except (OSError, subprocess.SubprocessError):
71
+ raise LaunchError(
72
+ f"Cannot verify Copilot CLI version; install GitHub Copilot CLI "
73
+ f"{_COPILOT_PINNED_VERSION}") from None
74
+ match = re.fullmatch(r"GitHub Copilot CLI (\d+)\.(\d+)\.(\d+)\.?",
75
+ result.stdout.strip().splitlines()[0].strip())
76
+ if match is None:
77
+ raise LaunchError(
78
+ f"Unsupported Copilot CLI version; install GitHub Copilot CLI "
79
+ f"{_COPILOT_PINNED_VERSION}")
80
+ version = tuple(int(part) for part in match.groups())
81
+ version_text = ".".join(str(part) for part in version)
82
+ if version[0] != 1 or version[1] != 0 or version[2] > _COPILOT_HEADERS_SINCE[2]:
83
+ raise LaunchError(
84
+ f"Unsupported Copilot CLI version {version_text}; install GitHub Copilot CLI "
85
+ f"{_COPILOT_PINNED_VERSION}")
86
+ return version_text, version >= _COPILOT_HEADERS_SINCE
87
+
88
+
62
89
  def launch(harness: str, *, base_url: str, model: str | None = None, reset: bool = False,
63
90
  agent_id: str | None = None, session_id: str | None = None,
64
91
  native_args: tuple[str, ...] = ()) -> int:
@@ -69,8 +96,18 @@ def launch(harness: str, *, base_url: str, model: str | None = None, reset: bool
69
96
  executable = shutil.which(harness, path=environment.get("PATH", os.defpath))
70
97
  if executable is None:
71
98
  raise LaunchError("Harness executable not found; install it and check PATH")
99
+ copilot_headers = True
100
+ copilot_version = _COPILOT_PINNED_VERSION
72
101
  if harness == "codex":
73
102
  _validate_codex_version(Path(executable))
103
+ elif harness == "copilot":
104
+ copilot_version, copilot_headers = _validate_copilot_version(Path(executable))
105
+ if not copilot_headers:
106
+ print(
107
+ f"bloom: Copilot CLI {copilot_version} cannot send agent/session headers; "
108
+ "attribution is off for this launch",
109
+ file=sys.stderr,
110
+ )
74
111
  path = Path(environment.get("HOME", str(Path.home()))) / ".config/bloom/launcher.json"
75
112
  all_settings = load_settings(path)
76
113
  settings = cast(GatewaySettings, all_settings.get(base_url, {}))
@@ -148,9 +185,16 @@ def launch(harness: str, *, base_url: str, model: str | None = None, reset: bool
148
185
  connection = SelectedConnection(base_url, selected, vkey, limits.get(selected),
149
186
  resolved_agent_id, direct_session_id)
150
187
  prepare = {"claude": prepare_claude, "codex": prepare_codex,
151
- "opencode": prepare_opencode}[harness]
152
- plan = prepare(connection, executable=Path(executable).absolute(), cwd=cwd,
153
- environment=environment, native_args=native_args)
188
+ "copilot": prepare_copilot, "opencode": prepare_opencode}[harness]
189
+ prepare_kwargs = {
190
+ "executable": Path(executable).absolute(),
191
+ "cwd": cwd,
192
+ "environment": environment,
193
+ "native_args": native_args,
194
+ }
195
+ if harness == "copilot":
196
+ prepare_kwargs["headers_supported"] = copilot_headers
197
+ plan = prepare(connection, **prepare_kwargs)
154
198
  required_save = prompted or reset or not usable
155
199
  new_limit = fresh_limits.get(selected)
156
200
  try:
@@ -14,6 +14,8 @@ from .contract import AgentId, LaunchError, Secret
14
14
  class GatewaySettings(TypedDict, total=False):
15
15
  vkey: str
16
16
  claude: str
17
+ codex: str
18
+ copilot: str
17
19
  opencode: str
18
20
  max_input_tokens: dict[str, int]
19
21
 
@@ -35,7 +37,8 @@ def load_settings(path: Path) -> Settings:
35
37
  if any(
36
38
  not isinstance(base, str) or not isinstance(entries, dict)
37
39
  or base == "agent_id"
38
- or any(name not in {"claude", "codex", "opencode", "vkey", "max_input_tokens"}
40
+ or any(name not in {"claude", "codex", "copilot", "opencode", "vkey",
41
+ "max_input_tokens"}
39
42
  or (name != "max_input_tokens" and (not isinstance(value, str) or not value))
40
43
  for name, value in entries.items())
41
44
  for base, entries in data.items()
@@ -150,6 +150,8 @@ def validate_native_args(harness: str, native_args: tuple[str, ...]) -> None:
150
150
  elif harness == "codex":
151
151
  reserved.update({"-m", "-c", "--config", "--profile", "--oss", "--local-provider",
152
152
  "--base_url"})
153
+ elif harness == "copilot":
154
+ reserved.update({"-m", "--provider", "--provider-url", "--provider-base-url"})
153
155
  positional = False
154
156
  for index, argument in enumerate(native_args):
155
157
  if positional:
@@ -260,6 +262,64 @@ def prepare_opencode(connection: SelectedConnection, *, executable: Path, cwd: P
260
262
  "use a JSON object for OPENCODE_CONFIG_CONTENT") from None
261
263
 
262
264
 
265
+ def prepare_copilot(connection: SelectedConnection, *, executable: Path, cwd: Path,
266
+ environment: Mapping[str, str],
267
+ native_args: tuple[str, ...] = (),
268
+ headers_supported: bool = True) -> LaunchPlan:
269
+ validate_native_args("copilot", native_args)
270
+ try:
271
+ base_url = connection.base_url.rstrip("/")
272
+ if not base_url.endswith("/v1"):
273
+ base_url += "/v1"
274
+ child = dict(environment)
275
+ for name in ("COPILOT_PROVIDER_BEARER_TOKEN", "COPILOT_PROVIDER_API_KEY_COMMAND",
276
+ "COPILOT_PROVIDER_API_KEY", "COPILOT_PROVIDER_BASE_URL",
277
+ "COPILOT_PROVIDER_TYPE", "COPILOT_PROVIDER_WIRE_API",
278
+ "COPILOT_PROVIDER_WIRE_MODEL", "COPILOT_PROVIDER_MODEL_ID",
279
+ "COPILOT_PROVIDER_MAX_PROMPT_TOKENS", "COPILOT_MODEL"):
280
+ child.pop(name, None)
281
+ child.update({
282
+ "COPILOT_PROVIDER_TYPE": "openai",
283
+ "COPILOT_PROVIDER_WIRE_API": "completions",
284
+ "COPILOT_PROVIDER_BASE_URL": base_url,
285
+ "COPILOT_PROVIDER_API_KEY": connection.vkey.value,
286
+ "COPILOT_MODEL": connection.model_id,
287
+ "COPILOT_PROVIDER_WIRE_MODEL": connection.model_id,
288
+ "COPILOT_OFFLINE": "true",
289
+ "COPILOT_AUTO_UPDATE": "false",
290
+ })
291
+ if type(connection.max_input_tokens) is int and connection.max_input_tokens > 0:
292
+ child["COPILOT_PROVIDER_MAX_PROMPT_TOKENS"] = str(connection.max_input_tokens)
293
+ inherited = child.get("COPILOT_PROVIDER_HEADERS")
294
+ inherited_headers = []
295
+ if inherited is not None:
296
+ inherited_headers = [line for line in inherited.splitlines()
297
+ if line.strip() and line.split(":", 1)[0].strip().lower()
298
+ not in {"x-bloom-agent-id", "x-bloom-session-id"}]
299
+ if inherited_headers:
300
+ child["COPILOT_PROVIDER_HEADERS"] = "\n".join(inherited_headers)
301
+ else:
302
+ child.pop("COPILOT_PROVIDER_HEADERS", None)
303
+ headers = inherited_headers.copy()
304
+ if headers_supported:
305
+ if connection.agent_id:
306
+ headers.append("X-Bloom-Agent-ID: " + connection.agent_id)
307
+ if connection.session_id:
308
+ headers.append("X-Bloom-Session-ID: " + connection.session_id)
309
+ if headers:
310
+ child["COPILOT_PROVIDER_HEADERS"] = "\n".join(headers)
311
+ elif "COPILOT_PROVIDER_HEADERS" in child and not inherited_headers:
312
+ child.pop("COPILOT_PROVIDER_HEADERS", None)
313
+ return LaunchPlan(
314
+ executable=executable,
315
+ argv=("--model", connection.model_id, *native_args),
316
+ cwd=cwd,
317
+ child_environment=child,
318
+ )
319
+ except (ValueError, TypeError, AttributeError):
320
+ raise LaunchError("Cannot prepare private Copilot connection settings") from None
321
+
322
+
263
323
  def prepare_codex(connection: SelectedConnection, *, executable: Path, cwd: Path,
264
324
  environment: Mapping[str, str],
265
325
  native_args: tuple[str, ...] = ()) -> LaunchPlan:
@@ -14,7 +14,7 @@ import pytest
14
14
  from test_release_workflow import step
15
15
 
16
16
  ROOT = Path(__file__).resolve().parents[1]
17
- STEM = "bloom_launch-0.2.1"
17
+ STEM = "bloom_launch-0.3.0"
18
18
  INFO = f"{STEM}.dist-info"
19
19
  CLASSIFIERS = (
20
20
  "Development Status :: 3 - Alpha",
@@ -34,7 +34,7 @@ HANDOFF = (
34
34
  @pytest.fixture
35
35
  def artifacts(tmp_path):
36
36
  metadata = (
37
- "Metadata-Version: 2.4\nName: bloom-launch\nVersion: 0.2.1\n"
37
+ "Metadata-Version: 2.4\nName: bloom-launch\nVersion: 0.3.0\n"
38
38
  "Summary: Scoped launcher for native coding harnesses\nRequires-Python: >=3.12\n"
39
39
  "Description-Content-Type: text/markdown\nLicense-Expression: Apache-2.0\n"
40
40
  "License-File: LICENSE\n"
@@ -0,0 +1,166 @@
1
+ from pathlib import Path
2
+
3
+ import pytest
4
+
5
+ from bloom_cli import cli
6
+ from bloom_cli import launch as launch_module
7
+ from bloom_cli.contract import LaunchError, Secret, SelectedConnection
8
+ from bloom_cli.settings import save_selection
9
+ from bloom_cli.wrappers import prepare_copilot, validate_native_args
10
+
11
+
12
+ def test_copilot_plan_sets_openai_completions_env(tmp_path):
13
+ connection = SelectedConnection(
14
+ "https://gateway.example", "openai/model-a", Secret("fixture-key"),
15
+ max_input_tokens=128000, agent_id="fixture-agent", session_id="fixture-session",
16
+ )
17
+ plan = prepare_copilot(
18
+ connection, executable=Path("/fake/copilot"), cwd=tmp_path,
19
+ environment={
20
+ "COPILOT_PROVIDER_BEARER_TOKEN": "stale-bearer",
21
+ "COPILOT_PROVIDER_API_KEY": "stale-key",
22
+ "COPILOT_PROVIDER_HEADERS": "X-Trace: kept\nx-bloom-agent-id: stale",
23
+ },
24
+ native_args=("-p", "say hi"),
25
+ )
26
+ env = plan.child_environment
27
+ assert env["COPILOT_PROVIDER_TYPE"] == "openai"
28
+ assert env["COPILOT_PROVIDER_WIRE_API"] == "completions"
29
+ assert env["COPILOT_PROVIDER_BASE_URL"] == "https://gateway.example/v1"
30
+ assert env["COPILOT_PROVIDER_API_KEY"] == "fixture-key"
31
+ assert env["COPILOT_MODEL"] == "openai/model-a"
32
+ assert env["COPILOT_PROVIDER_WIRE_MODEL"] == "openai/model-a"
33
+ assert env["COPILOT_PROVIDER_MAX_PROMPT_TOKENS"] == "128000"
34
+ assert env["COPILOT_OFFLINE"] == "true"
35
+ assert env["COPILOT_AUTO_UPDATE"] == "false"
36
+ assert "COPILOT_PROVIDER_BEARER_TOKEN" not in env
37
+ assert env["COPILOT_PROVIDER_HEADERS"] == (
38
+ "X-Trace: kept\nX-Bloom-Agent-ID: fixture-agent\nX-Bloom-Session-ID: fixture-session"
39
+ )
40
+ assert plan.argv == ("--model", "openai/model-a", "-p", "say hi")
41
+ assert "fixture-key" not in plan.argv
42
+
43
+
44
+ def test_copilot_plan_omits_attribution_when_headers_unsupported(tmp_path):
45
+ connection = SelectedConnection(
46
+ "https://gateway.example", "openai/model-a", Secret("fixture-key"),
47
+ agent_id="fixture-agent", session_id="fixture-session",
48
+ )
49
+ plan = prepare_copilot(
50
+ connection, executable=Path("/fake/copilot"), cwd=tmp_path, environment={},
51
+ headers_supported=False,
52
+ )
53
+ assert "COPILOT_PROVIDER_HEADERS" not in plan.child_environment
54
+
55
+
56
+ def test_copilot_plan_removes_inherited_bloom_headers_when_unset(tmp_path):
57
+ connection = SelectedConnection(
58
+ "https://gateway.example", "openai/model-a", Secret("fixture-key"),
59
+ )
60
+ plan = prepare_copilot(
61
+ connection, executable=Path("/fake/copilot"), cwd=tmp_path,
62
+ environment={"COPILOT_PROVIDER_HEADERS": "X-Bloom-Session-ID: stale"},
63
+ )
64
+ assert "COPILOT_PROVIDER_HEADERS" not in plan.child_environment
65
+
66
+
67
+ @pytest.mark.parametrize("native_args", [
68
+ ("--model", "other-model"),
69
+ ("--model=other-model",),
70
+ ("-m", "other-model"),
71
+ ])
72
+ def test_copilot_rejects_reserved_native_model(tmp_path, native_args):
73
+ connection = SelectedConnection(
74
+ "https://gateway.example", "openai/model-a", Secret("fixture-key"),
75
+ )
76
+ with pytest.raises(LaunchError, match="reserved"):
77
+ prepare_copilot(
78
+ connection, executable=Path("/fake/copilot"), cwd=tmp_path,
79
+ environment={}, native_args=native_args,
80
+ )
81
+
82
+
83
+ def test_copilot_is_a_supported_harness(monkeypatch):
84
+ captured = {}
85
+ monkeypatch.setattr(cli, "launch", lambda *args, **kwargs: captured.update(kwargs) or 0)
86
+ assert cli.main(["launch", "copilot", "-p", "say hi"]) == 0
87
+ assert captured["native_args"] == ("-p", "say hi")
88
+
89
+
90
+ @pytest.mark.parametrize("argv", [
91
+ ["launch", "copilot", "--", "--model", "other-model"],
92
+ ["launch", "copilot", "--", "-m", "other-model"],
93
+ ])
94
+ def test_copilot_rejects_reserved_native_overrides(monkeypatch, argv):
95
+ monkeypatch.setattr(cli, "launch", lambda *args, **kwargs: 0)
96
+ with pytest.raises(SystemExit) as error:
97
+ cli.main(argv)
98
+ assert error.value.code == 2
99
+
100
+
101
+ def test_cached_copilot_launch_dispatches_to_copilot_wrapper(tmp_path, monkeypatch):
102
+ base_url = "https://gateway.example"
103
+ model = "openai/model-a"
104
+ monkeypatch.setenv("HOME", str(tmp_path))
105
+ monkeypatch.setattr(launch_module.shutil, "which", lambda *_args, **_kwargs: "/fake/copilot")
106
+ monkeypatch.setattr(launch_module.subprocess, "run", lambda *args, **kwargs: type(
107
+ "Result", (), {"stdout": "GitHub Copilot CLI 1.0.112.\n"}
108
+ )())
109
+ path = Path(tmp_path) / ".config/bloom/launcher.json"
110
+ save_selection(path, base_url, "copilot", model, vkey=Secret("fixture-key"))
111
+ captured = {}
112
+
113
+ def run(plan):
114
+ captured["plan"] = plan
115
+ assert plan.executable == Path("/fake/copilot")
116
+ assert plan.argv[:2] == ("--model", model)
117
+ assert plan.child_environment["COPILOT_PROVIDER_API_KEY"] == "fixture-key"
118
+ assert plan.child_environment["COPILOT_PROVIDER_HEADERS"] == (
119
+ "X-Bloom-Agent-ID: bloom-launch-copilot"
120
+ )
121
+ return 0
122
+
123
+ monkeypatch.setattr(launch_module, "run_launch", run)
124
+ assert launch_module.launch("copilot", base_url=base_url, native_args=("-p", "hi")) == 0
125
+ assert captured["plan"].argv[-2:] == ("-p", "hi")
126
+
127
+
128
+ def test_copilot_older_version_launches_without_headers(tmp_path, monkeypatch, capsys):
129
+ base_url = "https://gateway.example"
130
+ model = "openai/model-a"
131
+ monkeypatch.setenv("HOME", str(tmp_path))
132
+ monkeypatch.setattr(launch_module.shutil, "which", lambda *_args, **_kwargs: "/fake/copilot")
133
+ monkeypatch.setattr(launch_module.subprocess, "run", lambda *args, **kwargs: type(
134
+ "Result", (), {"stdout": "GitHub Copilot CLI 1.0.88.\n"}
135
+ )())
136
+ path = Path(tmp_path) / ".config/bloom/launcher.json"
137
+ save_selection(path, base_url, "copilot", model, vkey=Secret("fixture-key"))
138
+ captured = {}
139
+
140
+ def run(plan):
141
+ captured["plan"] = plan
142
+ return 0
143
+
144
+ monkeypatch.setattr(launch_module, "run_launch", run)
145
+ assert launch_module.launch("copilot", base_url=base_url) == 0
146
+ assert "COPILOT_PROVIDER_HEADERS" not in captured["plan"].child_environment
147
+ err = capsys.readouterr().err
148
+ assert "cannot send agent/session headers" in err
149
+ assert "1.0.88" in err
150
+
151
+
152
+ def test_copilot_unknown_version_is_refused(tmp_path, monkeypatch):
153
+ monkeypatch.setenv("HOME", str(tmp_path))
154
+ monkeypatch.setattr(launch_module.shutil, "which", lambda *_args, **_kwargs: "/fake/copilot")
155
+ monkeypatch.setattr(launch_module.subprocess, "run", lambda *args, **kwargs: type(
156
+ "Result", (), {"stdout": "GitHub Copilot CLI 2.0.0.\n"}
157
+ )())
158
+ path = Path(tmp_path) / ".config/bloom/launcher.json"
159
+ save_selection(path, "https://gateway.example", "copilot", "openai/model-a",
160
+ vkey=Secret("fixture-key"))
161
+ with pytest.raises(LaunchError, match="Unsupported Copilot CLI version"):
162
+ launch_module.launch("copilot", base_url="https://gateway.example")
163
+
164
+
165
+ def test_validate_native_args_accepts_prompt_mode():
166
+ validate_native_args("copilot", ("-p", "say hi", "--allow-all"))
@@ -14,8 +14,8 @@ import pytest
14
14
  import yaml
15
15
 
16
16
  ROOT = Path(__file__).resolve().parents[1]
17
- WHEEL = "bloom_launch-0.2.1-py3-none-any.whl"
18
- SDIST = "bloom_launch-0.2.1.tar.gz"
17
+ WHEEL = "bloom_launch-0.3.0-py3-none-any.whl"
18
+ SDIST = "bloom_launch-0.3.0.tar.gz"
19
19
 
20
20
 
21
21
  def workflow():
@@ -307,7 +307,7 @@ def test_real_uv_build_passes_actual_receipt_and_manual_verification(tmp_path):
307
307
 
308
308
  [project]
309
309
  name = "bloom-launch"
310
- version = "0.2.1"
310
+ version = "0.3.0"
311
311
  '''))
312
312
  (project / "release_test_backend.py").write_text(textwrap.dedent('''\
313
313
  import base64
@@ -318,8 +318,8 @@ def test_real_uv_build_passes_actual_receipt_and_manual_verification(tmp_path):
318
318
  import zipfile
319
319
  from pathlib import Path
320
320
 
321
- STEM = "bloom_launch-0.2.1"
322
- METADATA = b"Metadata-Version: 2.4\\nName: bloom-launch\\nVersion: 0.2.1\\n"
321
+ STEM = "bloom_launch-0.3.0"
322
+ METADATA = b"Metadata-Version: 2.4\\nName: bloom-launch\\nVersion: 0.3.0\\n"
323
323
 
324
324
  def build_sdist(sdist_directory, config_settings=None):
325
325
  name = STEM + ".tar.gz"
@@ -4,7 +4,7 @@ requires-python = ">=3.12"
4
4
 
5
5
  [[package]]
6
6
  name = "bloom-launch"
7
- version = "0.2.1"
7
+ version = "0.3.0"
8
8
  source = { editable = "." }
9
9
  dependencies = [
10
10
  { name = "keyring" },
File without changes
File without changes
File without changes