agent-harness 0.36.4 → 0.36.6

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: 458208ef1a66a79128372aaf458c89b1885311eafe14d4480296ca816fe1898c
4
- data.tar.gz: b1cd8209c5770e2dc549ed69d970307d135e6a6d640ff2deefb4b44cc31c228d
3
+ metadata.gz: 3db06209d4131f2daeb943b41a938dbe2e77c98f525b0e5340afdc90682edde4
4
+ data.tar.gz: b82b2edabdf20d6dfb9248a43523173b04186d451605a867cf715f86bd9bc6c3
5
5
  SHA512:
6
- metadata.gz: 2b4b8fc782f37a73dcf27eab69a509d946072f4ede901ce12682cf33edee908f845d6d54fd995369757d2eac29769e329c7b2228dfff93b980b9c1ea6bdf0608
7
- data.tar.gz: f33d7be0130240d4966e4d721555f0a4950a1fae7094699952097c07139c50f7e0eba4be54793f4282e864c2740d0ddd15bf8bfde2cc0e76ea25bfefe7522dd8
6
+ metadata.gz: 7b4121c0f3c2a7437568ce6f534625500db535cdf072ed6ab435463a38554e4430c599fa44afde06547a80e810218427a69a683dabab789755b0fa19e2f7f3f7
7
+ data.tar.gz: 517c0502f071368f0d7b6d4dc6e9a224224c482872390b0206226a11bcc9bf44ee2266efca9a4f2e80562a4819c4ec40989f82d172875778f5f544fed8549899
@@ -1,3 +1,3 @@
1
1
  {
2
- ".": "0.36.4"
2
+ ".": "0.36.6"
3
3
  }
data/CHANGELOG.md CHANGED
@@ -5,6 +5,20 @@
5
5
  * add runner model compatibility contract (`AgentHarness.model_compatibility`) with structured `ModelCompatibility::Result` outcomes. Codex exposes static facts for CLI-gated models (e.g. `gpt-5.5` requires Codex CLI `>= 0.116.0`), a baseline supported-model list, supported auth modes, and a `DEFAULT_COMPATIBLE_MODEL_ID` fallback so downstream orchestrators can validate tier/model assignments before scheduling agent runs ([#259](https://github.com/viamin/agent-harness/issues/259)).
6
6
  * **auth:** add provider-owned PKCE code-exchange API for Claude OAuth (`AgentHarness::Authentication.exchange_code`). Takes an authorization code plus PKCE verifier (and `redirect_uri`/`client_id`), posts an `authorization_code` grant to the Claude token endpoint, and persists the resulting access/refresh tokens in the native `claudeAiOauth` shape. Adds `exchange_code_supported?` and a `code_exchange` key to `auth_capabilities` ([#266](https://github.com/viamin/agent-harness/issues/266)).
7
7
 
8
+ ## [0.36.6](https://github.com/viamin/agent-harness/compare/agent-harness/v0.36.5...agent-harness/v0.36.6) (2026-08-25)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * verify opencode native installs on linux arm64 ([#368](https://github.com/viamin/agent-harness/issues/368)) ([354ac87](https://github.com/viamin/agent-harness/commit/354ac87d5fc57b7d207b89f305eb523aa8da4553))
14
+
15
+ ## [0.36.5](https://github.com/viamin/agent-harness/compare/agent-harness/v0.36.4...agent-harness/v0.36.5) (2026-08-23)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * **deps-dev:** bump @oh-my-pi/pi-coding-agent from 17.3.5 to 17.4.0 in /vendor/pins/omp ([#358](https://github.com/viamin/agent-harness/issues/358)) ([c8c163d](https://github.com/viamin/agent-harness/commit/c8c163d11c5beaf870791a817ea3da854efb8cef))
21
+
8
22
  ## [0.36.4](https://github.com/viamin/agent-harness/compare/agent-harness/v0.36.3...agent-harness/v0.36.4) (2026-08-23)
9
23
 
10
24
 
@@ -24,6 +24,11 @@ module AgentHarness
24
24
  action: :switch_provider,
25
25
  retryable: false
26
26
  },
27
+ installation: {
28
+ description: "Installation or platform compatibility failed",
29
+ action: :escalate,
30
+ retryable: false
31
+ },
27
32
  transient: {
28
33
  description: "Temporary error",
29
34
  action: :retry_with_backoff,
@@ -126,6 +131,8 @@ module AgentHarness
126
131
  :rate_limited
127
132
  when /quota|usage.?limit|billing|(?:weekly|monthly)(?:\/(?:weekly|monthly))?\s+limit\s+exhausted/i
128
133
  :quota_exceeded
134
+ when /dynamic loader not found|ld-linux-[^\/\s]+\.so|exec format error|cannot execute binary file|wrong architecture|unsupported platform|unsupported.*architecture|not found in PATH|command not found|No such file or directory|is not installed/i
135
+ :installation
129
136
  when /auth|unauthorized|forbidden|invalid.*(key|token)|\b401\b|\b403\b/i
130
137
  :auth_expired
131
138
  when /timeout|timed.?out/i
@@ -15,6 +15,16 @@ module AgentHarness
15
15
  # Provider-related errors
16
16
  class ProviderError < Error; end
17
17
 
18
+ class ProviderInstallationError < ProviderError
19
+ attr_reader :provider, :error_category
20
+
21
+ def initialize(message = nil, provider: nil, error_category: :installation, **kwargs)
22
+ @provider = provider
23
+ @error_category = error_category
24
+ super(message, **kwargs)
25
+ end
26
+ end
27
+
18
28
  class ProviderNotFoundError < ProviderError; end
19
29
 
20
30
  class ProviderUnavailableError < ProviderError; end
@@ -470,7 +470,9 @@ module AgentHarness
470
470
  end
471
471
 
472
472
  def installation_failure_message?(message)
473
- message.to_s.match?(/(not found in PATH|command not found|No such file or directory|is not installed)/i)
473
+ message.to_s.match?(
474
+ /(not found in PATH|command not found|No such file or directory|is not installed|Dynamic loader not found|ld-linux-[^\/\s]+\.so|Exec format error|cannot execute binary file|wrong architecture|unsupported platform|unsupported architecture)/i
475
+ )
474
476
  end
475
477
 
476
478
  def provider_overrides_method?(provider_instance, method_name)
@@ -1114,6 +1114,13 @@ module AgentHarness
1114
1114
  return original_error if original_error.is_a?(IdleTimeoutError)
1115
1115
 
1116
1116
  IdleTimeoutError.new(original_error.message, original_error: original_error)
1117
+ when :installation
1118
+ ProviderInstallationError.new(
1119
+ original_error.message,
1120
+ provider: self.class.provider_name,
1121
+ error_category: :installation,
1122
+ original_error: original_error
1123
+ )
1117
1124
  else
1118
1125
  ProviderError.new(original_error.message, original_error: original_error)
1119
1126
  end
@@ -452,6 +452,13 @@ module AgentHarness
452
452
  raise error if error.is_a?(IdleTimeoutError)
453
453
 
454
454
  raise IdleTimeoutError.new(error.message, original_error: error)
455
+ when :installation
456
+ raise ProviderInstallationError.new(
457
+ error.message,
458
+ provider: self.class.provider_name,
459
+ error_category: :installation,
460
+ original_error: error
461
+ )
455
462
  else
456
463
  raise ProviderError.new(error.message, original_error: error)
457
464
  end
@@ -12,7 +12,7 @@ module AgentHarness
12
12
  # CLI.
13
13
  class OhMyPi < Base
14
14
  CLI_PACKAGE = "@oh-my-pi/pi-coding-agent"
15
- SUPPORTED_CLI_VERSION = "17.3.5"
15
+ SUPPORTED_CLI_VERSION = "17.4.0"
16
16
  SUPPORTED_CLI_REQUIREMENT = Gem::Requirement.new("= #{SUPPORTED_CLI_VERSION}").freeze
17
17
 
18
18
  # Bun runtime requirements. The omp entrypoint is
@@ -23,7 +23,17 @@ module AgentHarness
23
23
  .freeze
24
24
  }.freeze
25
25
  SUPPORTED_CLI_VERSIONS = [SUPPORTED_CLI_VERSION].freeze
26
- POSTINSTALL_COMMAND = "node $(npm root -g)/opencode-ai/postinstall.mjs"
26
+ POSTINSTALL_COMMAND = [
27
+ "set -eu",
28
+ "raw_platform=$(uname -s)",
29
+ "raw_arch=$(uname -m)",
30
+ "case \"$raw_platform\" in Linux) target_platform=linux ;; Darwin) target_platform=darwin ;; *) echo \"Unsupported OpenCode platform: ${raw_platform}/${raw_arch}\" >&2; exit 1 ;; esac",
31
+ "case \"$raw_arch\" in x86_64|amd64) target_arch=x64 ;; aarch64|arm64) target_arch=arm64 ;; *) echo \"Unsupported OpenCode architecture: ${raw_platform}/${raw_arch}\" >&2; exit 1 ;; esac",
32
+ "postinstall_path=\"$(npm root -g)/opencode-ai/postinstall.mjs\"",
33
+ "binary_path=\"$(npm root -g)/opencode-ai/bin/opencode.exe\"",
34
+ "node -e 'const os = require(\"os\"); const {pathToFileURL} = require(\"url\"); const platform = process.argv[1]; const arch = process.argv[2]; const scriptPath = process.argv[3]; os.platform = () => platform; os.arch = () => arch; import(pathToFileURL(scriptPath).href);' \"$target_platform\" \"$target_arch\" \"$postinstall_path\"",
35
+ "\"$binary_path\" --version >/dev/null"
36
+ ].join(" && ").freeze
27
37
  VERSION_REQUIREMENT_STRINGS = SUPPORTED_CLI_REQUIREMENT.requirements
28
38
  .map { |op, ver| "#{op} #{ver}".freeze }
29
39
  .freeze
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AgentHarness
4
- VERSION = "0.36.4"
4
+ VERSION = "0.36.6"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: agent-harness
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.36.4
4
+ version: 0.36.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bart Agapinan