ctx_driver 0.2.5 → 0.2.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/CHANGELOG.md +4 -0
- data/lib/ctx_driver/reader.rb +1 -12
- data/lib/ctx_driver/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: 00e67a362c8e7578cb1a41d46f3c219b3442cea7414844456f20769cc47b1824
|
|
4
|
+
data.tar.gz: 3b7c8e7d31e5ddcee16d146878dc90fdb3ce6b7ccabab6b2c440c3d6cbf5fefa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1f42673092f459e1302f1b23294c4573c9e191963982fc0ce4127ce1e939cd4688681cd74561676c8aa8f2e78eecce20bbe5dccad12252375516e4a772905e71
|
|
7
|
+
data.tar.gz: 4f1736586ea386d06b5874f8cdc03fcc28374122cfe9ccdede2ea939ef44f8bb952d7f73e294fba167cd5dacf5578d7877a21703da42ca434e30134111bc0b19
|
data/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,10 @@ Changes to the public contract are recorded here. Versions follow Semantic Versi
|
|
|
4
4
|
|
|
5
5
|
## Unreleased
|
|
6
6
|
|
|
7
|
+
## 0.2.6 (2026-10-23)
|
|
8
|
+
|
|
9
|
+
- Validate single-command receipts consistently without legacy rejection hooks; preserve borrowed-session ownership.
|
|
10
|
+
|
|
7
11
|
## 0.2.5 (2026-10-21)
|
|
8
12
|
|
|
9
13
|
- Add repository-specific AGENTS.md guidance for responsibilities, Ruby conventions, evidence boundaries and validation.
|
data/lib/ctx_driver/reader.rb
CHANGED
|
@@ -59,11 +59,7 @@ module CtxDriver
|
|
|
59
59
|
stage, evidence, command_failure, body = :execute, [], nil, nil
|
|
60
60
|
capture_completed = false
|
|
61
61
|
begin
|
|
62
|
-
receipt =
|
|
63
|
-
@session.send_commands([ command ], preserve_session_on_rejection: true)
|
|
64
|
-
else
|
|
65
|
-
@session.send_commands([ command ])
|
|
66
|
-
end
|
|
62
|
+
receipt = @session.send_commands([ command ])
|
|
67
63
|
stage = :response
|
|
68
64
|
output = receipt.output
|
|
69
65
|
raise TypeError, "Command output must be text" unless output.is_a?(String)
|
|
@@ -108,13 +104,6 @@ module CtxDriver
|
|
|
108
104
|
@session_failure ||= command_failure || { code: :command_aborted, stage: stage || :execute }.freeze unless capture_completed
|
|
109
105
|
end
|
|
110
106
|
|
|
111
|
-
# 仅在明确支持时复用命令拒绝后的会话;未知提示符仍由连接器关闭处理。
|
|
112
|
-
def supports_session_preservation?
|
|
113
|
-
@session.method(:send_commands).parameters.any? do |kind, name|
|
|
114
|
-
%i[key keyreq].include?(kind) && name == :preserve_session_on_rejection
|
|
115
|
-
end
|
|
116
|
-
end
|
|
117
|
-
|
|
118
107
|
# 连接状态不确定时视为不可用,后续跳过的查询保留首次失败原因。
|
|
119
108
|
def detect_session_failure
|
|
120
109
|
state = @session.connected?
|
data/lib/ctx_driver/version.rb
CHANGED