agent-harness 0.28.0 → 0.28.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 +4 -4
- data/.release-please-manifest.json +1 -1
- data/CHANGELOG.md +7 -0
- data/lib/agent_harness/providers/opencode.rb +22 -0
- 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: 7b96455925e7c106c8209663155c2a03e424119a29da0b5a646d3e4ccafc49e5
|
|
4
|
+
data.tar.gz: 86ccd871badbfa21eec7f42f948c9756f7651b0619a5cb2f1cbc2766c0ae5ee7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 03b0f75fb46ab71d2602230e86add7e3ab7d00da531dc94264e544077c197ec5df85f113edad09213a8b9683caf156141566f8e3ff6ffd98ddb7c5ff8815a746
|
|
7
|
+
data.tar.gz: 32df3df874d30e2ef7e072b4c55042766c3ac0bb3a64d77460c084d3e848ce598004be166f114c9c7cbc451b4b7390177110866a2a981661f3ce8abb5d58d2d8
|
data/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,13 @@
|
|
|
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
8
|
|
|
9
|
+
## [0.28.1](https://github.com/viamin/agent-harness/compare/agent-harness/v0.28.0...agent-harness/v0.28.1) (2026-07-08)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* **opencode:** default-merge permissive external_directory permission for non-interactive runs ([#280](https://github.com/viamin/agent-harness/issues/280)) ([1a282aa](https://github.com/viamin/agent-harness/commit/1a282aad6de0e696a9fcd02ebc0be32f1ef6e0e9)), closes [#277](https://github.com/viamin/agent-harness/issues/277)
|
|
15
|
+
|
|
9
16
|
## [0.28.0](https://github.com/viamin/agent-harness/compare/agent-harness/v0.27.1...agent-harness/v0.28.0) (2026-07-08)
|
|
10
17
|
|
|
11
18
|
|
|
@@ -128,6 +128,19 @@ module AgentHarness
|
|
|
128
128
|
|
|
129
129
|
DEFAULT_INSTALLATION_CONTRACT = build_installation_contract(SUPPORTED_CLI_VERSION)
|
|
130
130
|
|
|
131
|
+
# OpenCode's stock default only allowlists `external_directory` access to
|
|
132
|
+
# `/tmp/opencode/*`, but its own sub-agent delegation pattern (e.g. the
|
|
133
|
+
# Explore-Agent used to summarize large diffs/outputs) writes scratch
|
|
134
|
+
# files to other `/tmp/*` paths. In non-interactive execution there is no
|
|
135
|
+
# human to approve the resulting permission prompt, so the agent silently
|
|
136
|
+
# loses access to its own scratch output and never completes the task.
|
|
137
|
+
# This default rule broadens the allowlist to all of `/tmp` so the agent
|
|
138
|
+
# can read back files it (or its sub-agents) wrote there.
|
|
139
|
+
DEFAULT_PERMISSION_EXTERNAL_DIRECTORY_PATTERN = "/tmp/**"
|
|
140
|
+
DEFAULT_PERMISSION_RULE = {
|
|
141
|
+
"external_directory" => {DEFAULT_PERMISSION_EXTERNAL_DIRECTORY_PATTERN => "allow"}
|
|
142
|
+
}.freeze
|
|
143
|
+
|
|
131
144
|
def name
|
|
132
145
|
"opencode"
|
|
133
146
|
end
|
|
@@ -265,9 +278,18 @@ module AgentHarness
|
|
|
265
278
|
payload["model"] = runtime.model if runtime.model
|
|
266
279
|
payload["provider"] = runtime.api_provider if runtime.api_provider
|
|
267
280
|
payload["baseURL"] = runtime.base_url if runtime.base_url
|
|
281
|
+
apply_default_external_directory_permission(payload)
|
|
268
282
|
payload.empty? ? nil : payload
|
|
269
283
|
end
|
|
270
284
|
|
|
285
|
+
def apply_default_external_directory_permission(payload)
|
|
286
|
+
# Respect any caller-supplied `permission` block verbatim: if a caller
|
|
287
|
+
# takes responsibility for permission config, we do not override it.
|
|
288
|
+
return if payload.key?("permission")
|
|
289
|
+
|
|
290
|
+
payload["permission"] = deep_dup(DEFAULT_PERMISSION_RULE)
|
|
291
|
+
end
|
|
292
|
+
|
|
271
293
|
def opencode_config_path(_runtime)
|
|
272
294
|
"~/.config/opencode/opencode.json"
|
|
273
295
|
end
|