agent-harness 0.36.5 → 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 +4 -4
- data/.release-please-manifest.json +1 -1
- data/CHANGELOG.md +7 -0
- data/lib/agent_harness/error_taxonomy.rb +7 -0
- data/lib/agent_harness/errors.rb +10 -0
- data/lib/agent_harness/provider_health_check.rb +3 -1
- data/lib/agent_harness/providers/base.rb +7 -0
- data/lib/agent_harness/providers/cursor.rb +7 -0
- data/lib/agent_harness/providers/opencode.rb +11 -1
- data/lib/agent_harness/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3db06209d4131f2daeb943b41a938dbe2e77c98f525b0e5340afdc90682edde4
|
|
4
|
+
data.tar.gz: b82b2edabdf20d6dfb9248a43523173b04186d451605a867cf715f86bd9bc6c3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7b4121c0f3c2a7437568ce6f534625500db535cdf072ed6ab435463a38554e4430c599fa44afde06547a80e810218427a69a683dabab789755b0fa19e2f7f3f7
|
|
7
|
+
data.tar.gz: 517c0502f071368f0d7b6d4dc6e9a224224c482872390b0206226a11bcc9bf44ee2266efca9a4f2e80562a4819c4ec40989f82d172875778f5f544fed8549899
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,13 @@
|
|
|
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
|
+
|
|
8
15
|
## [0.36.5](https://github.com/viamin/agent-harness/compare/agent-harness/v0.36.4...agent-harness/v0.36.5) (2026-08-23)
|
|
9
16
|
|
|
10
17
|
|
|
@@ -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
|
data/lib/agent_harness/errors.rb
CHANGED
|
@@ -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?(
|
|
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
|
|
@@ -23,7 +23,17 @@ module AgentHarness
|
|
|
23
23
|
.freeze
|
|
24
24
|
}.freeze
|
|
25
25
|
SUPPORTED_CLI_VERSIONS = [SUPPORTED_CLI_VERSION].freeze
|
|
26
|
-
POSTINSTALL_COMMAND =
|
|
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
|