ace-coworker 0.6.0 → 0.6.1

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: 288508c14f62358d53a0fe59f3a772ea024fa370201285151439e5ab93de88ff
4
- data.tar.gz: 84e997a0876ad657f0caf39502c65e4d553110306f8b9fd63d83e6c7e5623fc8
3
+ metadata.gz: 6901776c6bcef11b2bfb48ddaeb2377dd830f352d01c79bddc59254a4f799849
4
+ data.tar.gz: 604583cbbb6eab225faccd01025cc5efdce6cad789bc7faca87091713cdf7a7b
5
5
  SHA512:
6
- metadata.gz: f73a2ccd21437dc1f44525ada59476246c7668abc4f9bfa26ca8356b8505447fd7bfc498a28baa8ad1ced52109f10b3871e53641e85cab4c249f1d0c8ed633b4
7
- data.tar.gz: 4756deff6b2f919b3dfd307e17354605e4e5e5e4449a1a562f014d03045e26f083280efcb69598d49375c114775875a7f3d74e11c233721beabab78cac8a6642
6
+ metadata.gz: be41301547584600fba77e414d603bed84caa025bdae72601644bbbd6b62569167ed72cb20da61ecb45c8c6deeefcb5367beb11f5914f1e3471f2180d847bea6
7
+ data.tar.gz: 8e29e8818c437ae80ffd3de61976dafe166db7c215d47003176e3e5ae43ea995d4db969aa8e7168be44c8207db3a93a41e1052760d9b6be6f6a49eed184dbfa4
data/CHANGELOG.md CHANGED
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.6.1] - 2026-10-20
11
+
12
+ ### Fixed
13
+ - Honor `ACE_TOOLCHAIN=installed` for published-gem execution and context propagation without source-runtime fallback; retain default auto development behavior.
14
+
10
15
 
11
16
  ## [0.6.0] - 2026-10-20
12
17
 
@@ -9,6 +9,11 @@ module Ace
9
9
  h = brief.to_h
10
10
  lines = []
11
11
  lines << "Coworker brief"
12
+ lines << " toolchain: #{h.dig('toolchain', 'mode')}"
13
+ if h.dig("toolchain", "mode") == "installed"
14
+ lines << " runtime rule: keep ACE_TOOLCHAIN=installed; use installed ACE commands and packaged generic instructions, never project binstubs or bundle exec"
15
+ lines << " project context: retain domain instructions/tasks/config; source-development launch advice does not select this runtime"
16
+ end
12
17
  lines << " role: #{h['role']}"
13
18
  lines << " instructions: #{h['instructions']}"
14
19
  lines << " instructions src: #{h['instructions_source']}"
@@ -27,6 +27,9 @@ module Ace
27
27
  end
28
28
  end
29
29
 
30
+ if raw.key?("toolchain") && !%w[auto installed].include?(raw["toolchain"])
31
+ errors << "toolchain must be auto or installed"
32
+ end
30
33
  errors.concat(prompt_errors(raw))
31
34
  errors.concat(nested_mapping_errors(raw, "reporting"))
32
35
  errors.concat(nested_mapping_errors(raw, "errors"))
@@ -41,6 +44,7 @@ module Ace
41
44
  # by the loader (IO does not belong in this pure atom).
42
45
  def self.normalize(raw)
43
46
  {
47
+ "toolchain" => raw["toolchain"],
44
48
  "role" => str(raw["role"]),
45
49
  "instructions" => str(raw["instructions"]),
46
50
  "start_prompt" => str(raw["start_prompt"]),
@@ -50,7 +54,7 @@ module Ace
50
54
  "overseer" => str(raw["overseer"]),
51
55
  "reporting" => {"channel" => nested_str(raw, "reporting", "channel").empty? ? "hitl" : nested_str(raw, "reporting", "channel")},
52
56
  "errors" => {"on_failure" => nested_str(raw, "errors", "on_failure").empty? ? "report" : nested_str(raw, "errors", "on_failure")}
53
- }
57
+ }.compact
54
58
  end
55
59
 
56
60
  # Protocol instructions reference an external resource; plain paths
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "ace/support/cli/toolchain"
4
+
3
5
  module Ace
4
6
  module Coworker
5
7
  module Models
@@ -17,6 +19,7 @@ module Ace
17
19
 
18
20
  def to_h
19
21
  {
22
+ "toolchain" => Ace::Support::Cli::Toolchain.evidence,
20
23
  "role" => config.role,
21
24
  "instructions" => config.instructions,
22
25
  "instructions_source" => instructions_source,
@@ -6,10 +6,11 @@ module Ace
6
6
  # Immutable validated coworker run configuration.
7
7
  class Config
8
8
  attr_reader :role, :instructions, :start_prompt, :start_prompt_file, :task, :assignment,
9
- :overseer, :reporting_channel, :on_failure, :source_path
9
+ :overseer, :reporting_channel, :on_failure, :source_path, :toolchain
10
10
 
11
11
  def initialize(role:, instructions:, start_prompt:, task:, assignment:, overseer:,
12
- start_prompt_file: nil, reporting_channel: "hitl", on_failure: "report", source_path: nil)
12
+ start_prompt_file: nil, reporting_channel: "hitl", on_failure: "report", source_path: nil, toolchain: nil)
13
+ @toolchain = toolchain&.freeze
13
14
  @role = role.freeze
14
15
  @instructions = instructions.freeze
15
16
  @start_prompt = start_prompt.freeze
@@ -32,11 +33,12 @@ module Ace
32
33
  start_prompt: start_prompt, start_prompt_file: start_prompt_file,
33
34
  task: task, assignment: assignment, overseer: overseer,
34
35
  reporting_channel: reporting_channel, on_failure: on_failure,
35
- source_path: source_path)
36
+ source_path: source_path, toolchain: toolchain)
36
37
  end
37
38
 
38
39
  def to_h
39
40
  {
41
+ "toolchain" => toolchain,
40
42
  "role" => role,
41
43
  "instructions" => instructions,
42
44
  "start_prompt" => start_prompt,
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "ace/support/cli/toolchain"
4
+
3
5
  require "open3"
4
6
  require "json"
5
7
 
@@ -9,7 +11,7 @@ module Ace
9
11
  # Probes assignment truth via `ace-assign status --assignment <id> --format json`
10
12
  # with an injectable runner (ADR-031: argv array + explicit cwd).
11
13
  class AssignmentProbe
12
- DEFAULT_RUNNER = ->(argv, cwd) { Open3.capture3(*argv, chdir: cwd) }
14
+ DEFAULT_RUNNER = ->(argv, cwd) { Open3.capture3(Ace::Support::Cli::Toolchain.child_environment, *argv, chdir: cwd) }
13
15
 
14
16
  def initialize(project_root:, runner: DEFAULT_RUNNER)
15
17
  @project_root = project_root
@@ -48,6 +50,8 @@ module Ace
48
50
  # Prefer the repo binstub when present (agent shells do not activate
49
51
  # mise, so bare ace-* may resolve to stale installed gems).
50
52
  def assign_binary
53
+ return Ace::Support::Cli::Toolchain.executable("ace-assign") if Ace::Support::Cli::Toolchain.installed?
54
+
51
55
  binstub = File.join(@project_root, "bin", "ace-assign")
52
56
  File.executable?(binstub) ? binstub : "ace-assign"
53
57
  end
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "ace/support/cli/toolchain"
4
+
3
5
  require "yaml"
4
6
 
5
7
  module Ace
@@ -46,6 +48,10 @@ module Ace
46
48
  raise Error, "invalid config #{relativize(target)}: #{errors.join('; ')}"
47
49
  end
48
50
 
51
+ if raw["toolchain"] == "installed" && !Ace::Support::Cli::Toolchain.installed?
52
+ raise Error, "this coworker run requires ACE_TOOLCHAIN=installed; restart through the installed executable"
53
+ end
54
+ Ace::Support::Cli::Toolchain.verify_loaded! if raw["toolchain"] == "installed"
49
55
  build_config(Atoms::ConfigSchema.normalize(raw), target)
50
56
  end
51
57
 
@@ -86,7 +92,7 @@ module Ace
86
92
  overseer: normalized["overseer"],
87
93
  reporting_channel: normalized.dig("reporting", "channel"),
88
94
  on_failure: normalized.dig("errors", "on_failure"),
89
- source_path: target
95
+ source_path: target, toolchain: normalized["toolchain"]
90
96
  )
91
97
  end
92
98
 
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "ace/support/cli/toolchain"
4
+
3
5
  require "open3"
4
6
 
5
7
  module Ace
@@ -9,7 +11,7 @@ module Ace
9
11
  # argv contract, ADR-031; injectable runner). ace-hitl owns its files;
10
12
  # this molecule never writes HITL state directly.
11
13
  class HitlReporter
12
- DEFAULT_RUNNER = ->(argv, cwd) { Open3.capture3(*argv, chdir: cwd) }
14
+ DEFAULT_RUNNER = ->(argv, cwd) { Open3.capture3(Ace::Support::Cli::Toolchain.child_environment, *argv, chdir: cwd) }
13
15
 
14
16
  Failure = Struct.new(:stage, :message, keyword_init: true)
15
17
 
@@ -118,6 +120,8 @@ module Ace
118
120
  # Prefer the repo binstub when present (agent shells do not activate
119
121
  # mise, so bare ace-* may resolve to stale installed gems).
120
122
  def hitl_binary
123
+ return Ace::Support::Cli::Toolchain.executable("ace-hitl") if Ace::Support::Cli::Toolchain.installed?
124
+
121
125
  binstub = File.join(@project_root, "bin", "ace-hitl")
122
126
  File.executable?(binstub) ? binstub : "ace-hitl"
123
127
  end
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "ace/support/cli/toolchain"
4
+
3
5
  require "open3"
4
6
 
5
7
  module Ace
@@ -9,7 +11,7 @@ module Ace
9
11
  # project root, or a protocol URI (wfi://, prompt:// tmpl://) resolved
10
12
  # through ace-nav.
11
13
  class InstructionResolver
12
- DEFAULT_NAV_RUNNER = ->(argv, cwd) { Open3.capture3(*argv, chdir: cwd) }
14
+ DEFAULT_NAV_RUNNER = ->(argv, cwd) { Open3.capture3(Ace::Support::Cli::Toolchain.child_environment, *argv, chdir: cwd) }
13
15
 
14
16
  # The ace-nav CLI itself is missing (ENOENT on exec): the resolver
15
17
  # never ran, so no verdict exists. Prepare treats this distinctly
@@ -72,6 +74,8 @@ module Ace
72
74
  # executes the repository-controlled binstub — PATH only
73
75
  # (trust-posture parity with ace-lab Verify#nav_binary).
74
76
  def nav_binary
77
+ return Ace::Support::Cli::Toolchain.executable("ace-nav") if Ace::Support::Cli::Toolchain.installed?
78
+
75
79
  binstub = File.join(@project_root, "bin", "ace-nav")
76
80
  use_binstub = !Process.uid.zero? && File.executable?(binstub)
77
81
  use_binstub ? binstub : "ace-nav"
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "ace/support/cli/toolchain"
4
+
3
5
  require "open3"
4
6
  require "json"
5
7
  require "yaml"
@@ -16,7 +18,7 @@ module Ace
16
18
  # `ace-assign list --all --format json` (subprocess argv contract
17
19
  # with explicit cwd, ADR-031).
18
20
  class WorktreeExecutorProbe
19
- DEFAULT_RUNNER = ->(argv, cwd) { Open3.capture3(*argv, chdir: cwd) }
21
+ DEFAULT_RUNNER = ->(argv, cwd) { Open3.capture3(Ace::Support::Cli::Toolchain.child_environment, *argv, chdir: cwd) }
20
22
  # Coworker config cascade files that may carry a `config_path`
21
23
  # override for the probed worktree (project `.ace` and user tiers;
22
24
  # the gem-defaults tier equals the loader's built-in default).
@@ -130,6 +132,8 @@ module Ace
130
132
  # mise, so bare ace-* may resolve to stale installed gems); the
131
133
  # subprocess still runs with cwd = the probed worktree.
132
134
  def assign_binary
135
+ return Ace::Support::Cli::Toolchain.executable("ace-assign") if Ace::Support::Cli::Toolchain.installed?
136
+
133
137
  binstub = File.join(@project_root, "bin", "ace-assign")
134
138
  File.executable?(binstub) ? binstub : "ace-assign"
135
139
  end
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "ace/support/cli/toolchain"
4
+
3
5
  require "fileutils"
4
6
  require "tmpdir"
5
7
 
@@ -103,6 +105,7 @@ module Ace
103
105
  "assignment" => assignment,
104
106
  "overseer" => overseer
105
107
  }
108
+ config["toolchain"] = "installed" if Ace::Support::Cli::Toolchain.installed?
106
109
  config["reporting"] = {"channel" => preset["reporting"]} unless preset["reporting"].to_s.empty?
107
110
  config["errors"] = {"on_failure" => preset["errors"]} unless preset["errors"].to_s.empty?
108
111
  config
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Ace
4
4
  module Coworker
5
- VERSION = "0.6.0"
5
+ VERSION = "0.6.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ace-coworker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michal Czyz
@@ -16,6 +16,9 @@ dependencies:
16
16
  - - "~>"
17
17
  - !ruby/object:Gem::Version
18
18
  version: '0.6'
19
+ - - ">="
20
+ - !ruby/object:Gem::Version
21
+ version: 0.6.10
19
22
  type: :runtime
20
23
  prerelease: false
21
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -23,6 +26,9 @@ dependencies:
23
26
  - - "~>"
24
27
  - !ruby/object:Gem::Version
25
28
  version: '0.6'
29
+ - - ">="
30
+ - !ruby/object:Gem::Version
31
+ version: 0.6.10
26
32
  - !ruby/object:Gem::Dependency
27
33
  name: ace-support-core
28
34
  requirement: !ruby/object:Gem::Requirement
@@ -72,6 +78,9 @@ dependencies:
72
78
  - - "~>"
73
79
  - !ruby/object:Gem::Version
74
80
  version: '0.28'
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: 0.28.8
75
84
  type: :runtime
76
85
  prerelease: false
77
86
  version_requirements: !ruby/object:Gem::Requirement
@@ -79,6 +88,9 @@ dependencies:
79
88
  - - "~>"
80
89
  - !ruby/object:Gem::Version
81
90
  version: '0.28'
91
+ - - ">="
92
+ - !ruby/object:Gem::Version
93
+ version: 0.28.8
82
94
  - !ruby/object:Gem::Dependency
83
95
  name: ace-task
84
96
  requirement: !ruby/object:Gem::Requirement
@@ -100,6 +112,9 @@ dependencies:
100
112
  - - "~>"
101
113
  - !ruby/object:Gem::Version
102
114
  version: '0.72'
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: 0.73.1
103
118
  type: :runtime
104
119
  prerelease: false
105
120
  version_requirements: !ruby/object:Gem::Requirement
@@ -107,6 +122,9 @@ dependencies:
107
122
  - - "~>"
108
123
  - !ruby/object:Gem::Version
109
124
  version: '0.72'
125
+ - - ">="
126
+ - !ruby/object:Gem::Version
127
+ version: 0.73.1
110
128
  - !ruby/object:Gem::Dependency
111
129
  name: ace-hitl
112
130
  requirement: !ruby/object:Gem::Requirement