silas 0.1.2 → 0.1.3

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: e6f592c5f4b254794f9a2a9cd4efc87d70b898f685f50ffff75c7af41415a7d8
4
- data.tar.gz: 43871af8708f50e68803bc727975201d693ba4337ddf056f54062fb8e6070208
3
+ metadata.gz: 35e622a6b7c17416ebe71717f1d072bd07c8a075f901c5b477177aa9bfccfa29
4
+ data.tar.gz: 59a87acd719063f275926852e255507d3c6159c16892907f70c8a77180dd61f8
5
5
  SHA512:
6
- metadata.gz: f1b8239d3d5eaaf1de6d199ac1a3fd53562cc7c1e8d8b6f67124974810fbe811692aa2d466a4d595660bca13cbc98c98ae0b500275bc54e216e2a2a4b8810fb5
7
- data.tar.gz: d1a1132bb5b027b19e338e40b57ac9a418f8bdde7fefe11f1d20a196cf6f7ecd7999fd0f7209f45c1e21ef7445a313d65f88abd2dabe56c00fc5dafaf79e9279
6
+ metadata.gz: 608b8bc79c926eadf04b74360e62832413580986c8ef5c6899b5acdc9371695db555799d9dd26d76b3aea77d2deafee13f32236cf8564c3cc6ad47692c58be80
7
+ data.tar.gz: f992423e27b802ae2efb6e7cf1c366f584ff703bd2210b9388b68abb9730616f2d16ded6b0da6e4b0a62c4c9fefd5becc8e8a85c6a17763d47dfd72bfef6d9ab
data/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.3
4
+
5
+ - **Ledger: parallel graded gates.** When the model emits several tool calls in
6
+ one step, `settle!` now settles every invocation instead of stopping at the
7
+ first one that needs approval. An ungated call (e.g. a low-risk write) runs
8
+ immediately even when a gated sibling (e.g. a money move) parks for a human —
9
+ it is no longer stranded behind the approval. This changes only *timing*, not
10
+ safety: an unsettled sibling already executed on resume regardless of the
11
+ human's approve/decline, so stopping early only delayed independent work.
12
+ Regression test in `spec/silas/parallel_tool_calls_spec.rb`.
13
+
3
14
  ## 0.1.2
4
15
 
5
16
  - **Security (email channel scaffold): approvals no longer go to the session
data/lib/silas/ledger.rb CHANGED
@@ -34,12 +34,19 @@ module Silas
34
34
  "the continuation believes are committed."
35
35
  end
36
36
 
37
+ # Settle EVERY invocation in the step, then report whether the turn must
38
+ # park. When the model emits parallel tool calls, an ungated one must not
39
+ # be blocked by a gated sibling's approval — and it wouldn't be protected
40
+ # anyway: an unsettled sibling executes on resume regardless of whether the
41
+ # human approves or declines the gated call, so stopping at the first park
42
+ # only delays independent work. Execute what can proceed; park if any
43
+ # invocation is awaiting a human.
37
44
  def settle!(step, resolver:)
45
+ parked = false
38
46
  step.tool_invocations.order(:id).each do |invocation|
39
- outcome = settle_invocation!(invocation, resolver)
40
- return :parked if outcome == :parked
47
+ parked = true if settle_invocation!(invocation, resolver) == :parked
41
48
  end
42
- :completed
49
+ parked ? :parked : :completed
43
50
  end
44
51
 
45
52
  # Drive a SINGLE freshly-created invocation to a terminal state — the
data/lib/silas/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Silas
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: silas
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel St Paul