mcptask-rails-runner 0.3.18-aarch64-linux → 0.3.19-aarch64-linux

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: 99987510bd98763ce26293238e43d2758d6ea62595b68bf878b6abf891e074a5
4
- data.tar.gz: 5c9bea0cc358abe46eda3013a6c3a4f149cab91c0afa41a00441f8f90cdc0b81
3
+ metadata.gz: c41fe0c5aa1f09717740d4fa9c16248f40f93589544671a3c7a24983372be936
4
+ data.tar.gz: 1a1f66c63d8fd588faf4b0dbb4635315fb239580779a068a440025b956a2461b
5
5
  SHA512:
6
- metadata.gz: 71a39c423229898cdf9c7ae0ffaa7c9cef068609d03c5c8cffae61e6b29cd7899b43fa53704220be9561d53f7be7424dad85ab829e6357f098c402c5fd391bd1
7
- data.tar.gz: c5d220c2bb81dbf6a90cb34a785d1cb76e97294fa7ff36a3a1b7f438f4c800d19d4ebad691e5ebbc4f70a16df295948ea5658c98ff07e7ff43f326727339179c
6
+ metadata.gz: a05eff5b3e5dfc703a7ccfc7b8631f728afa75c8445b6d7a15f52b288a7523c42332aa531f5bad2e5caecdf8e17a87244b36df0534e4d95f615d9a8f64a9cbf1
7
+ data.tar.gz: a4b40dd33eaba23092c78bfbd705bc9a257ecf17df6c8d652ce68f655ba0f893bfcfbdcaba227b4f31d069aa86b36daf642b763ed5ec36db2e7174dfc5b9cf98
data/CHANGELOG.md CHANGED
@@ -5,6 +5,90 @@ 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
+ ## Unreleased
9
+
10
+ ## 0.3.19
11
+
12
+ **Upgrading:** `bundle update mcptask-rails-runner` in each project for the
13
+ wrapper change, and `mcptask_runner update --self` on each host for the binary
14
+ ones — the installed copy is per machine, so the project bump alone does not
15
+ change what the 08:00 job runs. Both binary changes below are prompt text sent
16
+ to the child, so they take effect on the next run the updated binary starts;
17
+ there is nothing to migrate.
18
+
19
+ - The line `Binary.install!` prints just before it hands over with `exec` is
20
+ coloured like everything the binary prints after it: green for a first
21
+ install and for the same version laid down again, yellow for replacing an
22
+ older copy, for keeping a newer one, and for `MCPTASK_RUNNER_BIN` diverting
23
+ the install. Until now it was the last grey line on the screen, sitting in
24
+ front of a coloured wall and looking like the least important thing there
25
+ while being the only line that reports a binary was replaced.
26
+
27
+ The palette is a deliberate copy of the binary's own rather than a second
28
+ opinion — `MCPTASK_RUNNER_COLOR` first and winning both ways, then
29
+ `NO_COLOR`, then `TERM=dumb`, then whether the stream is a terminal, and on
30
+ Windows the terminal has to advertise ANSI. Both halves of
31
+ `rake mcptask_runner:update` now answer that question the same way, and a
32
+ redirect or a pipe still gets exactly the bytes it got before.
33
+
34
+ Binary changes carried by this version:
35
+
36
+ - Every numbered workflow step that does real work now carries its own "LOG
37
+ PROGRESS NOW" line, and each one names the `TaskUpdate` that closes the same
38
+ step's todo item. A run on 2026-08-25 opened its pull request having logged
39
+ nothing at all, while its plan moved on the dashboard the whole time: three
40
+ anchors sat on the auto-squash spine, the seven steps between them said
41
+ nothing about logging, and the three manual workflows had no anchor anywhere
42
+ — only the block that sits past the last numbered step, which is the
43
+ arrangement already known not to get read. Hanging the log on the call the
44
+ child does make reliably is what ties the effort trail to the plan.
45
+ - The child is told to search inside the project directory and never to run
46
+ `find /` or `find ~`. That walk enters macOS's protected folders, and the
47
+ permission dialog it raises names mcptask_runner and blocks the call until it
48
+ times out — at 08:02 there is nobody there to answer it. The instruction
49
+ names where to look instead: `bundle show` / `gem which` for Ruby, `go env
50
+ GOMODCACHE` for Go.
51
+
52
+ ## 0.3.18
53
+
54
+ No wrapper changes. Full notes in
55
+ [mcptask-releases v0.3.18](https://github.com/jchsoft/mcptask-releases/releases/tag/v0.3.18).
56
+
57
+ **Upgrading:** run `mcptask_runner update --self` on each host. Both changes
58
+ below are binary behaviour, and the first of them is visible in the output of
59
+ the very command that installs it — so the run that replaces the binary is
60
+ still grey, and every run after it is not.
61
+
62
+ Binary changes carried by this version:
63
+
64
+ - The install and update output is coloured, so the one row that needs a look
65
+ no longer reads exactly like the thirty that do not: green for up-to-date
66
+ and added, yellow for updated and force-updated, red for conflict-skipped,
67
+ dimmed section tags, and warnings in red on stderr. It is decided per stream
68
+ and only when the stream is really a terminal, so a pipe, a redirect and a
69
+ launchd log get the bytes they always got; `MCPTASK_RUNNER_COLOR` and
70
+ `NO_COLOR` override.
71
+ - A child's process group is remembered when the child starts, so anything it
72
+ leaves behind is still reachable after it exits. A process group outlives
73
+ its leader, but the kernel can no longer name that group once the leader has
74
+ been reaped — and the kill path used to ask at kill time, get nothing, and
75
+ signal a bare pid that no longer resolved. Anything a child started and then
76
+ exited on went on running: a dev server, a backgrounded command, a watcher.
77
+ Nothing raised, so nothing ever reported it. This had shipped in every
78
+ version of the runner there has ever been.
79
+
80
+ ## 0.3.17
81
+
82
+ No wrapper changes, and no entry was written here at the time. Full notes in
83
+ [mcptask-releases v0.3.17](https://github.com/jchsoft/mcptask-releases/releases/tag/v0.3.17).
84
+
85
+ Nothing an operator can observe changed in the binary either. The release
86
+ carried one refactor — the event stream's assignment callback moved to a
87
+ setter so that a caller supplying its own stream gets it too — which leaves
88
+ production behaviour identical and exists so the path cannot break silently
89
+ under test. Everything else in it was the chaos stress harness, which does not
90
+ ship in the binary.
91
+
8
92
  ## 0.3.16
9
93
 
10
94
  No wrapper changes. Full notes in
data/README.md CHANGED
@@ -91,6 +91,15 @@ Go binary as-is. The only legacy task without a counterpart is
91
91
  `verbose=true` and `ignore_quota=true` environment variables are honored by
92
92
  the binary itself, exactly as before.
93
93
 
94
+ `install` and `update` print one line before handing the process over, and it
95
+ is coloured the way the binary colours everything after it: green when the
96
+ install left the machine where it already was, yellow when a binary the host
97
+ was running has just been replaced or when the version on disk was kept
98
+ instead. Only at a terminal — a pipe, a redirect and CI get the plain text
99
+ they always got. `NO_COLOR` turns it off, and `MCPTASK_RUNNER_COLOR` (`1` /
100
+ `0`) answers it either way, ahead of `NO_COLOR`. The binary reads the same two
101
+ variables.
102
+
94
103
  ## Supported platforms
95
104
 
96
105
  Platform gems exist for `arm64-darwin`, `x86_64-darwin`, `aarch64-linux`,
@@ -86,10 +86,12 @@ module McptaskRailsRunner
86
86
  # versions and one installed binary, so a project pinning an older gem must
87
87
  # not quietly drag the machine's runner backwards.
88
88
  def install!(install_dir: INSTALL_DIR, gem_root: GEM_ROOT, out: $stdout)
89
+ paint = Palette.for(out)
90
+
89
91
  override = ENV["MCPTASK_RUNNER_BIN"]
90
92
  unless override.nil? || override.empty?
91
- out.puts "[mcptask_runner] MCPTASK_RUNNER_BIN is set — running #{override} " \
92
- "and leaving #{installed_path(install_dir: install_dir)} alone."
93
+ out.puts paint.changed("[mcptask_runner] MCPTASK_RUNNER_BIN is set — running #{override} " \
94
+ "and leaving #{installed_path(install_dir: install_dir)} alone.")
93
95
  return override
94
96
  end
95
97
 
@@ -98,14 +100,20 @@ module McptaskRailsRunner
98
100
 
99
101
  existing = installed_version(target)
100
102
  if existing && existing > Gem::Version.new(VERSION)
101
- out.puts "[mcptask_runner] #{target} already holds #{existing}, which is newer than this " \
102
- "gem's #{VERSION} — keeping it. Delete that file to install this gem's binary instead."
103
+ out.puts paint.changed("[mcptask_runner] #{target} already holds #{existing}, which is newer than " \
104
+ "this gem's #{VERSION} — keeping it. Delete that file to install this " \
105
+ "gem's binary instead.")
103
106
  return target
104
107
  end
105
108
 
106
109
  copy(source, target)
107
- out.puts "[mcptask_runner] installed mcptask_runner #{VERSION} into #{target}" \
108
- "#{existing ? " (replacing #{existing})" : ''}."
110
+ # Green when this leaves the machine where it already was — a first
111
+ # install, or the same version laid down again. Yellow when a binary the
112
+ # host was running has just been replaced, which is the one line of this
113
+ # command worth stopping on.
114
+ line = "[mcptask_runner] installed mcptask_runner #{VERSION} into #{target}" \
115
+ "#{existing ? " (replacing #{existing})" : ''}."
116
+ out.puts(existing && existing < Gem::Version.new(VERSION) ? paint.changed(line) : paint.ok(line))
109
117
  target
110
118
  end
111
119
 
@@ -0,0 +1,80 @@
1
+ # frozen_string_literal: true
2
+
3
+ module McptaskRailsRunner
4
+ # Colour for the lines this gem prints before it hands the process over.
5
+ #
6
+ # `rake mcptask_runner:update` opens with Binary.install!'s line, and
7
+ # everything after it comes from the Go binary, which since 0.3.18 colours its
8
+ # own output by meaning: green when there was nothing to do, yellow when
9
+ # something moved, red when something is waiting on a decision. A grey first
10
+ # line in front of that wall reads as the least important thing on the screen,
11
+ # when it is in fact the only one that replaced a binary.
12
+ #
13
+ # The rules here are copied from internal/install/color.go in the Go repo
14
+ # rather than invented — same colours, same two environment levers, same "a
15
+ # terminal and nowhere else". Two halves of one command that disagreed about
16
+ # what NO_COLOR means would be a puzzle, not a feature.
17
+ class Palette
18
+ RESET = "\e[0m"
19
+ GREEN = "\e[32m"
20
+ YELLOW = "\e[33m"
21
+
22
+ # Values of MCPTASK_RUNNER_COLOR that settle the question, either way.
23
+ FORCE_ON = %w[1 true always force].freeze
24
+ FORCE_OFF = %w[0 false never].freeze
25
+
26
+ # Terminals that turn escape codes on for themselves and say so. A Windows
27
+ # console renders them only once virtual-terminal processing is switched on
28
+ # for its handle, and this gem is not going to call into Win32 for a
29
+ # convenience — so anything not on this list gets plain text, and
30
+ # MCPTASK_RUNNER_COLOR=1 is the way in for a console the list has not heard
31
+ # of.
32
+ WINDOWS_ANSI_HINTS = %w[WT_SESSION ANSICON ConEmuANSI TERM].freeze
33
+
34
+ # for decides how one stream should be written to.
35
+ def self.for(out, env: ENV)
36
+ new(enabled: enabled?(out, env))
37
+ end
38
+
39
+ # MCPTASK_RUNNER_COLOR is asked first and wins both ways, because it is the
40
+ # specific answer: whoever set it knows where this output is going. NO_COLOR
41
+ # is the general convention (no-color.org) — present and non-empty means no
42
+ # colour, from anything.
43
+ def self.enabled?(out, env)
44
+ specific = env["MCPTASK_RUNNER_COLOR"].to_s.downcase
45
+ return true if FORCE_ON.include?(specific)
46
+ return false if FORCE_OFF.include?(specific)
47
+ return false unless env["NO_COLOR"].to_s.empty?
48
+ return false if env["TERM"] == "dumb"
49
+ return false unless out.respond_to?(:tty?) && out.tty?
50
+
51
+ Gem.win_platform? ? WINDOWS_ANSI_HINTS.any? { |name| !env[name].to_s.empty? } : true
52
+ end
53
+
54
+ def initialize(enabled:)
55
+ @enabled = enabled
56
+ end
57
+
58
+ def enabled?
59
+ @enabled
60
+ end
61
+
62
+ # ok — this is the state you wanted; nothing to read closely.
63
+ def ok(text)
64
+ wrap(GREEN, text)
65
+ end
66
+
67
+ # changed — something moved, or what you assumed would happen did not.
68
+ def changed(text)
69
+ wrap(YELLOW, text)
70
+ end
71
+
72
+ private
73
+
74
+ def wrap(code, text)
75
+ return text unless @enabled && !text.empty?
76
+
77
+ "#{code}#{text}#{RESET}"
78
+ end
79
+ end
80
+ end
@@ -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.18"
13
+ VERSION = "0.3.19"
14
14
  end
@@ -14,6 +14,7 @@ module McptaskRailsRunner
14
14
  end
15
15
  end
16
16
 
17
+ require_relative "mcptask_rails_runner/palette"
17
18
  require_relative "mcptask_rails_runner/binary"
18
19
 
19
20
  # Only inside a booted Rails app — rails/railtie needs active_support loaded,
Binary file
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.18
4
+ version: 0.3.19
5
5
  platform: aarch64-linux
6
6
  authors:
7
7
  - Josef Chmel
@@ -38,6 +38,7 @@ files:
38
38
  - lib/mcptask/rails/runner.rb
39
39
  - lib/mcptask_rails_runner.rb
40
40
  - lib/mcptask_rails_runner/binary.rb
41
+ - lib/mcptask_rails_runner/palette.rb
41
42
  - lib/mcptask_rails_runner/railtie.rb
42
43
  - lib/mcptask_rails_runner/version.rb
43
44
  - lib/tasks/mcptask_runner.rake