agent-harness 0.28.4 → 0.28.5
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/kilocode.rb +16 -7
- data/lib/agent_harness/providers/opencode.rb +23 -9
- 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: 0e59433136b9fefab1e54397b752f0843b05db3b4f26dfd27a3607650ff3b4ad
|
|
4
|
+
data.tar.gz: 6043894c347081129f4486795bcb6d0d1f95750ac980dabe464e889ee0266bd2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 480f739434416487cef969aa1f21bbb772d5694099418468604c41be315da9f0cbe8d2167bfb2c3e9f9620cb62d162b725ac414959b5e9cd3723c867265a6625
|
|
7
|
+
data.tar.gz: 9d625423fd5a2956567626074c66479d951b3d4988684fb8da12b414b3500bd4535050e6fef33e46e0c84792b6bb2599b58a2a757b07d9ef0879971d967aacb3
|
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.5](https://github.com/viamin/agent-harness/compare/agent-harness/v0.28.4...agent-harness/v0.28.5) (2026-07-10)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* Kilocode/OpenCode: external_directory permission also blocks ~/.config and ~/.local/share paths, not just /tmp ([#290](https://github.com/viamin/agent-harness/issues/290)) ([7042f57](https://github.com/viamin/agent-harness/commit/7042f572e5723120159c96b735906edeede6ef76))
|
|
15
|
+
|
|
9
16
|
## [0.28.4](https://github.com/viamin/agent-harness/compare/agent-harness/v0.28.3...agent-harness/v0.28.4) (2026-07-10)
|
|
10
17
|
|
|
11
18
|
|
|
@@ -16,14 +16,23 @@ module AgentHarness
|
|
|
16
16
|
# Kilo CLI (an OpenCode fork) ships the same external_directory
|
|
17
17
|
# permission category as OpenCode, defaulting to "ask" for anything
|
|
18
18
|
# outside the project dir. In non-interactive execution there is no
|
|
19
|
-
# human to answer the prompt, so
|
|
20
|
-
#
|
|
21
|
-
#
|
|
22
|
-
#
|
|
23
|
-
#
|
|
24
|
-
|
|
19
|
+
# human to answer the prompt, so dedicated read/write/edit tool calls
|
|
20
|
+
# targeting paths outside the project dir are auto-rejected and the
|
|
21
|
+
# agent silently loses access to its own scratch output or its own
|
|
22
|
+
# config/data files, killing the run without a recoverable error.
|
|
23
|
+
#
|
|
24
|
+
# This default rule broadens the allowlist to all of /tmp (so the agent
|
|
25
|
+
# can read back files it or its sub-agents wrote there) and to the full
|
|
26
|
+
# agent home directory (so the agent can inspect/maintain its own
|
|
27
|
+
# config, cache, and data files such as ~/.config/kilocode,
|
|
28
|
+
# ~/.local/share/kilo, ~/.cache). The container is already isolated
|
|
29
|
+
# (Docker, non-root user) and the agent runs with --auto which approves
|
|
30
|
+
# everything inside the project dir. See #289 (precedent: #282/#277).
|
|
31
|
+
DEFAULT_PERMISSION_EXTERNAL_DIRECTORY_PATTERNS = ["/tmp/**", "/home/agent/**"].freeze
|
|
25
32
|
DEFAULT_PERMISSION_CONFIG = {
|
|
26
|
-
"external_directory" =>
|
|
33
|
+
"external_directory" => DEFAULT_PERMISSION_EXTERNAL_DIRECTORY_PATTERNS
|
|
34
|
+
.to_h { |pattern| [pattern, "allow"] }
|
|
35
|
+
.freeze
|
|
27
36
|
}.freeze
|
|
28
37
|
USAGE_EVENT_TYPES = %w[result usage].freeze
|
|
29
38
|
TOKEN_USAGE_KEYS = %w[
|
|
@@ -13,10 +13,14 @@ module AgentHarness
|
|
|
13
13
|
SUPPORTED_CLI_VERSION = "1.3.2"
|
|
14
14
|
SUPPORTED_CLI_REQUIREMENT = Gem::Requirement.new(">= #{SUPPORTED_CLI_VERSION}", "< 1.4.0").freeze
|
|
15
15
|
INSTALL_COMMAND_PREFIX = ["npm", "install", "-g", "--ignore-scripts"].freeze
|
|
16
|
+
# Allowlist of external_directory patterns auto-approved in
|
|
17
|
+
# non-interactive execution. See the DEFAULT_PERMISSION_RULE comment
|
|
18
|
+
# below for the rationale (precedent: #289/#282/#277/#280).
|
|
19
|
+
DEFAULT_PERMISSION_EXTERNAL_DIRECTORY_PATTERNS = ["/tmp/**", "/home/agent/**"].freeze
|
|
16
20
|
DEFAULT_PERMISSION_CONFIG = {
|
|
17
|
-
"external_directory" =>
|
|
18
|
-
|
|
19
|
-
|
|
21
|
+
"external_directory" => DEFAULT_PERMISSION_EXTERNAL_DIRECTORY_PATTERNS
|
|
22
|
+
.to_h { |pattern| [pattern, "allow"] }
|
|
23
|
+
.freeze
|
|
20
24
|
}.freeze
|
|
21
25
|
SUPPORTED_CLI_VERSIONS = [SUPPORTED_CLI_VERSION].freeze
|
|
22
26
|
POSTINSTALL_COMMAND = "node $(npm root -g)/opencode-ai/postinstall.mjs"
|
|
@@ -132,13 +136,23 @@ module AgentHarness
|
|
|
132
136
|
# `/tmp/opencode/*`, but its own sub-agent delegation pattern (e.g. the
|
|
133
137
|
# Explore-Agent used to summarize large diffs/outputs) writes scratch
|
|
134
138
|
# files to other `/tmp/*` paths. In non-interactive execution there is no
|
|
135
|
-
# human to approve the resulting permission prompt, so
|
|
136
|
-
#
|
|
137
|
-
#
|
|
138
|
-
#
|
|
139
|
-
|
|
139
|
+
# human to approve the resulting permission prompt, so dedicated
|
|
140
|
+
# read/write/edit tool calls targeting paths outside the project dir are
|
|
141
|
+
# auto-rejected and the agent silently loses access to its own scratch
|
|
142
|
+
# output (or its own config/data files) and never completes the task.
|
|
143
|
+
#
|
|
144
|
+
# This default rule broadens the allowlist (see
|
|
145
|
+
# DEFAULT_PERMISSION_EXTERNAL_DIRECTORY_PATTERNS) to all of `/tmp` (so
|
|
146
|
+
# the agent can read back files it or its sub-agents wrote there) and to
|
|
147
|
+
# the full agent home directory (so the agent can inspect/maintain its
|
|
148
|
+
# own config, cache, and data files such as ~/.config/opencode,
|
|
149
|
+
# ~/.local/share/opencode, ~/.cache). The container is already isolated
|
|
150
|
+
# (Docker, non-root user) and the agent runs with --auto which approves
|
|
151
|
+
# everything inside the project dir. See #289 (precedent: #282/#277/#280).
|
|
140
152
|
DEFAULT_PERMISSION_RULE = {
|
|
141
|
-
"external_directory" =>
|
|
153
|
+
"external_directory" => DEFAULT_PERMISSION_EXTERNAL_DIRECTORY_PATTERNS
|
|
154
|
+
.to_h { |pattern| [pattern, "allow"] }
|
|
155
|
+
.freeze
|
|
142
156
|
}.freeze
|
|
143
157
|
|
|
144
158
|
def name
|