ace-herdr 0.3.0 → 0.3.2

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: a3c3149a40374844ef590a17e1ff5908daf08153ebf64f3d82f776efb22985b8
4
- data.tar.gz: 5c8ba6b8316a3c5f3808a138e7b4e543006107286edefa6d9b5fc12403a975d8
3
+ metadata.gz: c6c7f32e364c4df76447fd6d4356f2117007cf920dc3f2f420bd4dd1e21f8242
4
+ data.tar.gz: 783dd62904dd12e952528d80d9956511c052fcf23a53551b390f5817bbe93c8c
5
5
  SHA512:
6
- metadata.gz: ffd4b11b53a480492c625a3f43bab4710a732ef0dda2dae9d84bf5caa9a15aba156c4f9484abf47ac0f36c2caed0c8f36947c3788999b8e21a4070c8c3790e21
7
- data.tar.gz: '03794e613cbce4ea3edcfdc06e8e04bff70d0e75afa8e3cc0755b85eceddbed6f79a2a2f1f245b6171dc140569b63353b9646746d1fdec78df2922d08558ccc5'
6
+ metadata.gz: bd865086e653b9f8bed7434073707fb733f0f9f0f08c6d979046476ee955a65a2938e7efbad966942fe2a55b68b80c7bbc6a53076601bdaac4cb0ff94029e099
7
+ data.tar.gz: '08c29e0f0cfb5fa1857959c1fd0ef05376ce3dcc895e6ee6a056e2b3be58c00311e5d0b397e07f063bc94151bb3567441c9e1213bf11e6ea16ea570e8e3fa010'
data/CHANGELOG.md CHANGED
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.3.2] - 2026-10-04
11
+
12
+ ### Changed
13
+
14
+ - Depend on the leaf `ace-hitl-contract` provider vocabulary instead of full HITL orchestration, removing the assignment adapter dependency cycle.
15
+
16
+ ## [0.3.1] - 2026-10-04
17
+
18
+ ### Fixed
19
+ - Replacing a dead prepared pane updates only the recorded pane pointer: a foreign tab's pointer-only identity record stays pointer-only instead of gaining invented `root`/`preset` ownership keys, so the live replacement pane is reused across adapter and process restarts and `ensure_window` at the verified native root still adopts the tab. Records with genuine provenance keep their exact root and preset, and wrong ids, conflicting provenance, corrupt records, and stale pointers still cannot bypass the ownership guards.
20
+ - `ace-herdr tab` reports a failed preset materialization (native tab created, later step failed) through the standard CLI error boundary — non-zero exit, actionable message, no success payload, and no stack trace in ordinary mode. The runtime adapter keeps its documented runtime classification and exact-id rollback; this entrypoint never closes tabs.
21
+
10
22
  ## [0.3.0] - 2026-10-02
11
23
 
12
24
  ### Added
data/docs/usage.md CHANGED
@@ -3,8 +3,8 @@ doc-type: user
3
3
  title: ace-herdr Usage
4
4
  purpose: Full CLI and configuration reference for ace-herdr: push delivery, agent bootstrap, the terminal-control surface (list, send, capture, wait, presets), and tidy cleanup.
5
5
  ace-docs:
6
- last-updated: 2026-10-02
7
- last-checked: 2026-10-02
6
+ last-updated: 2026-10-04
7
+ last-checked: 2026-10-04
8
8
  ---
9
9
 
10
10
  # Usage
@@ -38,6 +38,8 @@ Install `ace-herdr` alongside `ace-runtime`, then resolve the adapter with `Ace:
38
38
 
39
39
  The adapter implements `context`, `ensure_window`, `prepare_pane`, `focus`, ordered `send` and its convenience methods, `capture`, `wait_output`, `wait_agent`, `wait_lifecycle`, `close_window`, `list_windows`, and `list_panes`. `ensure_window` scopes the sanitized tab label to the caller workspace. It records the tab's root, preset, and prepared pane under `~/.ace/local/herdr/runtime-tabs/` — keyed by workspace and label, so adapter instances from any working directory or requested root share one record, create through the same lock, and serialize prepared-pane creation through it. Later instances verify an idempotent request and reject a conflicting one; a tab whose ownership cannot be proven is never closed or replaced (a failed create rolls back only tabs the same attempt created). `prepare_pane` splits a retained shell target and returns the native pane ID after verifying it exists and has a shell process.
40
40
 
41
+ Replacing a dead prepared pane updates only the recorded pane pointer: a foreign tab's pointer-only record stays pointer-only (no root/preset keys are invented, so it never becomes ownership evidence), and an owned record keeps its exact root and preset. A prepared-pane pointer to a dead pane is replaced by the next split; a pointer-only record never satisfies `ensure_window` by itself -- adoption still requires the tab's verified native root.
42
+
41
43
  Sends probe for a live agent. Plain panes receive raw text and keys in order; agent panes receive one self-submitting `agent prompt`, with one trailing Enter dropped and reported. Agent waits use native `agent wait` states (`idle`, `working`, `blocked`, `done`). Contract timeout values are seconds and are converted to Herdr milliseconds. Lifecycle waits observe `tab get`, focused tab state, `pane get`, and `pane process-info`; a missing pane keeps `pane-exists` waiting but immediately satisfies `pane-exited`. A pane with only its retained shell also satisfies `pane-exited` because no submitted foreground command remains. This observation does not prove assignment success or authorize cleanup.
42
44
 
43
45
  Native `agent_blocked` becomes `SendRejectedError`; `agent_prompt_stalled` becomes `SendStalledError` and must not be automatically resent. Native wait timeouts become `WaitTimeoutError`, missing targets become `TargetNotFoundError`, and an unavailable binary or socket becomes `RuntimeUnavailableError`.
@@ -239,6 +241,8 @@ Output: `{"workspace":"w2","tabs":[{"tab":"w2:t1","panes":["w2:p1","w2:p2"],"com
239
241
 
240
242
  Unknown preset: CLI error listing the available names (ace-tmux `--list-presets` parity), for example `Error: Unknown workspace preset 'nope' (available: development)`.
241
243
 
244
+ Failed tab materialization: when a preset's native tab is created but a later materialization step fails (split, command, or agent start), both `ace-herdr tab` and `ace-herdr workspace` report a standard CLI error -- the process exits non-zero with the underlying failure on stderr, prints no success payload on stdout, and shows no stack trace in ordinary mode. These entrypoints never close tabs (rollback of the failed tab is the runtime adapter's exact-id policy).
245
+
242
246
  ## `ace-herdr deliver`
243
247
 
244
248
  Push an answer to an agent pane.
@@ -355,6 +359,7 @@ Commands raise a CLI error (non-zero exit) carrying herdr's machine code where o
355
359
  - herdr binary or socket unavailable: explicit CLI error, no partial output
356
360
  - Blocked agent: `agent_blocked: ...` (terminal -- never silently dropped); stalled prompt: `agent_prompt_stalled: ...` (transient)
357
361
  - Output wait timeout: `timeout: ...`
362
+ - Failed tab materialization: CLI error carrying the underlying failure (`ace-herdr tab`, `ace-herdr workspace`); never a false success or a stack trace
358
363
  - Unknown preset: usage error listing the available preset names
359
364
  - Invalid send shapes: usage error **before any transport call** (nothing is sent)
360
365
 
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "ace/hitl/contract"
4
+
3
5
  require "json"
4
6
  require "ace/support/cli"
5
7
  require "ace/core"
@@ -58,6 +60,7 @@ module Ace
58
60
  Ace::Herdr::ValidationError,
59
61
  Ace::Herdr::TargetResolutionError,
60
62
  Ace::Herdr::WaitTimeoutError,
63
+ Ace::Herdr::TabMaterializationError,
61
64
  Ace::Herdr::ExecutorError => e
62
65
  raise Ace::Support::Cli::Error, e.message
63
66
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  require "shellwords"
4
4
  require "time"
5
- require "ace/hitl"
5
+ require "ace/hitl/contract"
6
6
 
7
7
  module Ace
8
8
  module Herdr
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "shellwords"
4
- require "ace/hitl"
4
+ require "ace/hitl/contract"
5
5
 
6
6
  module Ace
7
7
  module Herdr
@@ -5,7 +5,7 @@ require "json"
5
5
  require "time"
6
6
  require "securerandom"
7
7
  require "openssl"
8
- require "ace/hitl"
8
+ require "ace/hitl/contract"
9
9
 
10
10
  module Ace
11
11
  module Herdr
@@ -362,8 +362,12 @@ module Ace
362
362
  recorded = :corrupt
363
363
  end
364
364
  if recorded.is_a?(Hash) && recorded["id"] == tab[:id]
365
- write_identity(path, id: recorded["id"], root: recorded["root"], preset: recorded["preset"],
366
- prepared_pane: pane_id)
365
+ # Preserve the record's exact provenance shape: a pointer-only
366
+ # record stays pointer-only (no invented root/preset keys), an
367
+ # owned record keeps its verified values — only the pointer moves.
368
+ updated = recorded.dup
369
+ updated["prepared_pane"] = pane_id
370
+ atomic_write_json(path, updated)
367
371
  else
368
372
  # Foreign tab (not created through ensure_window) or corrupt
369
373
  # record: persist a pointer-only record so later instances
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Ace
4
4
  module Herdr
5
- VERSION = "0.3.0"
5
+ VERSION = "0.3.2"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,28 +1,28 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ace-herdr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michal Czyz
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2026-10-02 00:00:00.000000000 Z
10
+ date: 2026-10-04 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
- name: ace-hitl
13
+ name: ace-hitl-contract
14
14
  requirement: !ruby/object:Gem::Requirement
15
15
  requirements:
16
16
  - - "~>"
17
17
  - !ruby/object:Gem::Version
18
- version: '0.10'
18
+ version: '0.1'
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - "~>"
24
24
  - !ruby/object:Gem::Version
25
- version: '0.10'
25
+ version: '0.1'
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: ace-runtime
28
28
  requirement: !ruby/object:Gem::Requirement