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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8d0d7ed4f6ef8391d0b495868dd13f0fbfb84ee496c63ccabdd2900bba04f3d0
4
- data.tar.gz: 0c8dd8c73feee507a47397dce38c1575889d25413cf4fb93fe66407e736f18c0
3
+ metadata.gz: 0e59433136b9fefab1e54397b752f0843b05db3b4f26dfd27a3607650ff3b4ad
4
+ data.tar.gz: 6043894c347081129f4486795bcb6d0d1f95750ac980dabe464e889ee0266bd2
5
5
  SHA512:
6
- metadata.gz: f22bd0d258e06b594fd56a2cb523f6823d975988002f9b50338b0e46d1ebabd478c90f43fd3acaae8dced8842635c249e8d7b27a02fad45e528fc060b59143c1
7
- data.tar.gz: 6d8b8f987d8fb747c134743729ed47c105bb4ba0689c350bd8868674c07a3da17df84cfe6a64a137403b022032800fb21477a7319d02820ee996fe5f8b3bd367
6
+ metadata.gz: 480f739434416487cef969aa1f21bbb772d5694099418468604c41be315da9f0cbe8d2167bfb2c3e9f9620cb62d162b725ac414959b5e9cd3723c867265a6625
7
+ data.tar.gz: 9d625423fd5a2956567626074c66479d951b3d4988684fb8da12b414b3500bd4535050e6fef33e46e0c84792b6bb2599b58a2a757b07d9ef0879971d967aacb3
@@ -1,3 +1,3 @@
1
1
  {
2
- ".": "0.28.4"
2
+ ".": "0.28.5"
3
3
  }
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 reads of scratch files under /tmp are
20
- # auto-rejected and the agent silently loses access to its own scratch
21
- # output, killing the run without a recoverable error. This default rule
22
- # broadens the allowlist to all of /tmp so the agent can read back files
23
- # it (or its sub-agents) wrote there. See #282 (precedent: #277/#280).
24
- DEFAULT_PERMISSION_EXTERNAL_DIRECTORY_PATTERN = "/tmp/**"
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" => {DEFAULT_PERMISSION_EXTERNAL_DIRECTORY_PATTERN => "allow"}
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
- "/tmp/**" => "allow"
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 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/**"
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" => {DEFAULT_PERMISSION_EXTERNAL_DIRECTORY_PATTERN => "allow"}
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AgentHarness
4
- VERSION = "0.28.4"
4
+ VERSION = "0.28.5"
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.28.4
4
+ version: 0.28.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bart Agapinan