mcptask-rails-runner 0.3.26 → 0.3.27

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9150a88af52c2da08479ff7ac863c0f8318ba96067bd962875c45d6210d961bb
4
- data.tar.gz: d54d7901e76e270efd39673faf8675099dae91c94a4ac48badffa84ba10d9d04
3
+ metadata.gz: f753fa3a7050b05b3287867b14c19e8db4a22044c73a9619eb0aa9336e184b3b
4
+ data.tar.gz: d9101426d33c852f0d6259b10b07c851d5055fbecad2ff05201fd13898ab57aa
5
5
  SHA512:
6
- metadata.gz: b06458265150f75cf3b544bca5e613c2e9eddabdb3dacbed23e3f3aa3be6607b72f157bfe0fd2f3b9fc0cfdfd99724aa1672995a1b95ffbcdc844d12a51712a2
7
- data.tar.gz: 05cb17080a5d23ce2c94ee16a9881e51a03d1e6648b34886c94eaf3e8556465db26cf01a3781d395922e0c76a3d875a2b99b1116c462c632b7889a1257f88aa8
6
+ metadata.gz: b5b468957425ecb3159e15b97ab6a5f412ed69550c8eb5c43165e7ab21bf77fe73811c921ccc2d5c752392ca73cb2dfa848dc4a66ee771809ada2500245db561
7
+ data.tar.gz: 5a78068b18c6a0adfdecfa847e5e35be26116e7f3114f57615c6f4d5caa814de4fa217c8a506b2f2530360db21cfca59dd5e445aa9e2c44792a609d74b700d70
data/CHANGELOG.md CHANGED
@@ -5,6 +5,46 @@ entries below describe wrapper changes only. Binary changes are listed in the
5
5
  [mcptask-releases](https://github.com/jchsoft/mcptask-releases/releases)
6
6
  release notes for the same tag.
7
7
 
8
+ ## 0.3.27
9
+
10
+ Full binary notes in
11
+ [mcptask-releases v0.3.27](https://github.com/jchsoft/mcptask-releases/releases/tag/v0.3.27).
12
+
13
+ **Upgrading takes two commands.** `mcptask_runner update --self` replaces the
14
+ binary; then a bare `mcptask_runner update` in any one project on the host,
15
+ because the bundled `pr` skill and the permission baseline both changed. Run it
16
+ while no runner is working that checkout.
17
+
18
+ Wrapper changes:
19
+
20
+ - **`mcptask_runner:install` forwards `--cli` and `--git-host`.** Either as
21
+ rake args — `rake "mcptask_runner:install[--cli codex,--git-host bitbucket]"` —
22
+ or as `CLI=codex GIT_HOST=bitbucket rake mcptask_runner:install`; env wins on
23
+ a tie. `update` takes no flags; re-run `install` to change them. A project
24
+ without a `harness:` line is refused by name, and `mcptask_runner:update`
25
+ writes `harness: claude` once for a legacy install so it gets through.
26
+
27
+ Binary changes carried by this version:
28
+
29
+ - **GitLab is a third git host**, driven through the `glab` CLI, which holds
30
+ its own login — nothing for the runner to store. gitlab.com is derived from
31
+ the origin; a self-managed instance sets `git_host: gitlab`. `pr checks`
32
+ prints one row per merge request because GitLab publishes one pipeline
33
+ status. Verified in manual and auto-squash mode on a real gitlab.com project
34
+ (story #12448).
35
+ - **`mcptask_runner` is on the child's PATH on every project.** Until now only
36
+ projects with this gem could reach it from inside a task, through Bundler's
37
+ shim; a project without the gem got `exit 127` on every `mcptask_runner pr`
38
+ call (task #12456).
39
+ - **A failing `gh` or `glab` repeats what the CLI said** instead of a bare
40
+ `exit status 1` (task #12454).
41
+ - **A machine's own pull-request skill no longer outranks the runner.** The
42
+ create step now claims the words "create a pull request"; the stale
43
+ `Skill(pull-request-creator)` approval left the permission baseline
44
+ (task #12455).
45
+ - **Adoption works on an rbenv, asdf or mise host** — the bundled gem is found
46
+ through the project's Ruby, not only through `GEM_HOME` (task #12435).
47
+
8
48
  ## 0.3.26
9
49
 
10
50
  No wrapper changes. Full notes in
data/README.md CHANGED
@@ -31,7 +31,7 @@ with an older one.
31
31
  ## Requirements
32
32
 
33
33
  - Ruby >= 3.0, Rails >= 6.0
34
- - [Claude Code](https://claude.com/claude-code) CLI
34
+ - One of [Claude Code](https://claude.com/claude-code), [Codex CLI](https://github.com/openai/codex) or [OpenCode](https://opencode.ai), signed in by the machine owner — picked per project at install time (`--cli` below; Codex and OpenCode need their own login on top of the runner account)
35
35
  - An mcptask.online account
36
36
 
37
37
  ## Installation
@@ -71,15 +71,38 @@ keeps working but stops recording what it ran. The regenerated one execs
71
71
  Every `rake mcptask_runner:*` invocation and shell alias keeps working
72
72
  unchanged. Your existing
73
73
  `config/mcptask_runner.yml`, `.mcp.json` and `.claude/` setup are read by the
74
- Go binary as-is. The only legacy task without a counterpart is
74
+ Go binary as-is — with one exception: a project without a `harness:` line is
75
+ now refused by name (no silent default), and `mcptask_runner:update` will write
76
+ `harness: claude` once for a legacy `.mcp.json`-style install so the host gets
77
+ through the gate on the next run. The only legacy task without a counterpart is
75
78
  `mcptask_runner:prepare:permissions` — permission sync is part of
76
79
  `mcptask_runner:install` now.
77
80
 
81
+ ### Picking the coding CLI and the git host
82
+
83
+ `mcptask_runner:install` delegates to `mcptask_runner init`, which takes the
84
+ harness choice and the git host as flags. Both reach the binary through the
85
+ rake task in two equivalent ways — choose whichever fits how the command is
86
+ invoked:
87
+
88
+ ```bash
89
+ # Square-bracket form — works inside a Procfile or a CI step:
90
+ bundle exec rake "mcptask_runner:install[--cli codex]"
91
+ bundle exec rake "mcptask_runner:install[--cli codex,--git-host bitbucket]"
92
+
93
+ # Environment form — what an operator types at the shell, where a one-line
94
+ # override (CLI=opencode rake …) is easier than retyping the rake args:
95
+ CLI=codex GIT_HOST=bitbucket bundle exec rake mcptask_runner:install
96
+ ```
97
+
98
+ Env wins on a tie. `update` does not take flags — re-run `install` with the
99
+ ones you want.
100
+
78
101
  ## Tasks
79
102
 
80
103
  | Task | Delegates to |
81
104
  |---|---|
82
- | `mcptask_runner:install` | `mcptask_runner init` (from `~/.mcptask/bin`) |
105
+ | `mcptask_runner:install` | `mcptask_runner init [--cli <name>] [--git-host <name>]` (from `~/.mcptask/bin`) |
83
106
  | `mcptask_runner:update` | `mcptask_runner update` (from `~/.mcptask/bin`) |
84
107
  | `mcptask_runner:bug_report` | `mcptask_runner bug-report` |
85
108
  | `mcptask_runner:version` | `mcptask_runner version` |
@@ -132,6 +132,39 @@ module McptaskRailsRunner
132
132
  Kernel.exec(install!, *args)
133
133
  end
134
134
 
135
+ # Flags `mcptask_runner init` consumes in one form or another, paired with the
136
+ # env-var name each is read under on the rake side. The dash in `--git-host`
137
+ # would be stripped by `.delete_prefix` and lost by `.upcase` (`GIT-HOST`
138
+ # is not what anyone writes), so the substitution is explicit.
139
+ INIT_FLAGS = {
140
+ "--cli" => "CLI",
141
+ "--git-host" => "GIT_HOST"
142
+ }.freeze
143
+
144
+ # Env comes first so it wins on tie: the rake args baked into a Procfile or
145
+ # a CI step are the ones harder to override, so they are the ones we keep
146
+ # second and let the developer's shell environment silence.
147
+ def forwarded_init_flags(rake_args, env = ENV)
148
+ raw = rake_args.to_a.flat_map { |a| a.to_s.split(",") }.map(&:strip).reject(&:empty?)
149
+ from_rake = raw.flat_map { |token| token.split(/\s+/) }
150
+
151
+ from_env = []
152
+ INIT_FLAGS.each do |flag, var|
153
+ value = env[var]
154
+ from_env << flag << value if value && !value.empty?
155
+ end
156
+
157
+ # Drop rake-side flags the env already answered — env wins on a tie. The
158
+ # check is on the flag name alone: if `--cli` came from the env, the rake
159
+ # side's `--cli <value>` (whatever value it carries) is overridden by it.
160
+ rake_flags = from_env.each_slice(2).map(&:first).to_set
161
+ remaining_rake = from_rake.each_slice(2).reject do |pair|
162
+ pair.size == 2 && rake_flags.include?(pair.first)
163
+ end.flatten
164
+
165
+ (from_env + remaining_rake)
166
+ end
167
+
135
168
  # What the installed copy reports about itself, or nil when there is none —
136
169
  # or when it cannot be asked, which a stray file at that path cannot be.
137
170
  #
@@ -10,5 +10,5 @@ module McptaskRailsRunner
10
10
  # Binary::INSTALL_DIR. So the pin is per project and per foreground rake
11
11
  # invocation; the installed copy is per machine, and the newest binary any of
12
12
  # those projects offers is the one that stays.
13
- VERSION = "0.3.26"
13
+ VERSION = "0.3.27"
14
14
  end
@@ -15,9 +15,22 @@
15
15
  require "mcptask_rails_runner"
16
16
 
17
17
  namespace :mcptask_runner do
18
+ # `init` and `update` take flags the harness choice and git host depend on
19
+ # (--cli <name>, --git-host <name>). Forward everything the rake caller passed
20
+ # after the rake args so a Codex/OpenCode or Bitbucket user has a documented
21
+ # path through the gem:
22
+ #
23
+ # bundle exec rake "mcptask_runner:install[--cli codex]"
24
+ # bundle exec rake "mcptask_runner:install[--cli codex,--git-host bitbucket]"
25
+ # CLI=codex GIT_HOST=bitbucket bundle exec rake mcptask_runner:install
26
+ #
27
+ # Anything else (`update`, the manual/auto tasks) keeps its 1:1 delegation so
28
+ # a flag the binary does not know about surfaces as a real error from it.
18
29
  desc "Install skills, permissions, token and scheduled job into this project"
19
- task :install do
20
- McptaskRailsRunner::Binary.exec_installed!("init")
30
+ task :install, [:args] do |_t, args|
31
+ McptaskRailsRunner::Binary.exec_installed!(
32
+ "init", *McptaskRailsRunner::Binary.forwarded_init_flags(args, ENV)
33
+ )
21
34
  end
22
35
 
23
36
  desc "Refresh bundled skills and helpers"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mcptask-rails-runner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.26
4
+ version: 0.3.27
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josef Chmel
@@ -25,7 +25,9 @@ dependencies:
25
25
  version: '6.0'
26
26
  description: Thin Rails wrapper around the mcptask_runner Go binary. Ships the platform-specific
27
27
  binary inside the gem and exposes the same rake tasks as the legacy mcptask_runner
28
- gem, delegating 1:1 to the CLI.
28
+ gem, delegating 1:1 to the CLI. Drives Claude Code, Codex CLI or OpenCode — pick
29
+ one with `mcptask_runner:install[--cli <name>]`. Works with GitHub and Bitbucket
30
+ Cloud repos (`--git-host <name>`).
29
31
  email:
30
32
  - info@jchsoft.cz
31
33
  executables: []
@@ -66,5 +68,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
66
68
  requirements: []
67
69
  rubygems_version: 3.6.9
68
70
  specification_version: 4
69
- summary: mcptask.online autonomous runner for Rails apps
71
+ summary: mcptask.online autonomous runner for Rails apps (drives Claude Code, Codex
72
+ CLI or OpenCode)
70
73
  test_files: []