smith-agents 0.12.0 → 0.12.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 +4 -4
- data/CHANGELOG.md +77 -0
- data/README.md +197 -1080
- data/docs/AGENTS.md +238 -0
- data/docs/BUDGETS.md +134 -0
- data/docs/CONFIGURATION.md +30 -4
- data/docs/DEVELOPMENT.md +63 -0
- data/docs/ERRORS_AND_RETRIES.md +175 -0
- data/docs/INSPECTION.md +39 -0
- data/docs/PATTERNS.md +2 -2
- data/docs/PERSISTENCE.md +175 -4
- data/docs/TESTING.md +88 -0
- data/docs/TOOLS_AND_GUARDRAILS.md +59 -1
- data/lib/generators/smith/install/install_generator.rb +6 -2
- data/lib/smith/agent/completion.rb +5 -3
- data/lib/smith/agent/provider_completion.rb +1 -1
- data/lib/smith/agent/provider_streaming.rb +15 -9
- data/lib/smith/agent/usage_tracking.rb +1 -2
- data/lib/smith/interruptions.rb +50 -0
- data/lib/smith/launchers/inline.rb +1 -0
- data/lib/smith/providers/request_holds.rb +1 -1
- data/lib/smith/providers/stream_facts.rb +29 -11
- data/lib/smith/response_memo.rb +149 -44
- data/lib/smith/setting_constructors.rb +14 -0
- data/lib/smith/tool/chat_execution_callbacks.rb +1 -1
- data/lib/smith/tool/execution_batch.rb +5 -0
- data/lib/smith/tool/execution_failure_handling.rb +27 -9
- data/lib/smith/version.rb +1 -1
- data/lib/smith/workflow/deterministic_execution.rb +5 -1
- data/lib/smith/workflow/parallel.rb +5 -1
- data/lib/smith/workflow/remembered_calls.rb +52 -19
- data/lib/smith/workflow/retry_execution.rb +1 -0
- data/lib/smith/workflow/split_step_persistence/composite_branch_execution.rb +1 -0
- data/lib/smith/workflow/step_context.rb +1 -0
- data/lib/smith.rb +9 -0
- metadata +8 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 746bb384c941e4a7276937eec58e74e1b1f11230e7310190a64401e348a92f61
|
|
4
|
+
data.tar.gz: 26b5e327966a11488d166214a0363bc2f554a79230b54392775609bcc2d25b6f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 652ec2c82ed914ce2aa798ccd87ee6a70afbc9149b731bd16e2ff2a14eecef13c23161b2039d46a5943c2a0eb4bcf9135b48c1ba8308e8585fba827aded3cdc7
|
|
7
|
+
data.tar.gz: 2f86f38c713ce0e62cd01ebfbc7b62270d30c30a34f8db2954526c73a9996be0792fd3ef874dbc500e2489883a178e267215b17b53494aaab648d3f9bd612f70
|
data/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,83 @@ All notable changes to Smith are documented in this file.
|
|
|
4
4
|
|
|
5
5
|
Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html). Smith is pre-1.0 and under active development; expect occasional contract tightening between minor versions until 1.0.
|
|
6
6
|
|
|
7
|
+
## [0.12.2] - 2026-10-12
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- `Smith.config.interrupting_errors`: subclasses of StandardError that
|
|
12
|
+
interrupt a step instead of failing it, such as the host's database or
|
|
13
|
+
queue out of reach. A step that meets one (raised in it, a tool failure
|
|
14
|
+
handler included, or one of the first 15 causes of an error that was, never
|
|
15
|
+
through a provider's own failure) stops where it is, as if its worker had
|
|
16
|
+
stopped: no failure route, no retry, no failure recorded or emitted (a
|
|
17
|
+
deterministic step's trace says `outcome: :interrupted`), no tool failure
|
|
18
|
+
handler notified and no failed branch outcome kept. The error itself
|
|
19
|
+
reaches the caller, and wins over other branch and tool errors but a
|
|
20
|
+
process-fatal one; the stored run is as the step left it, so a lax run
|
|
21
|
+
takes the step again when next advanced. Smith does not count
|
|
22
|
+
interruptions. `Smith::Interruptions.find` answers whether an error is or
|
|
23
|
+
was raised from one. None by default.
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
|
|
27
|
+
- The response memo keeps a reply that calls the tools its request offered
|
|
28
|
+
as soon as it comes, before its tools run, so a step cut inside a tool (its
|
|
29
|
+
worker stopped, or an interrupting error) no longer pays again for the reply
|
|
30
|
+
that called it: on replay that reply answers the call's first request
|
|
31
|
+
without sending it, its tools run again under the same idempotency keys,
|
|
32
|
+
and the call goes on. A streamed reply kept so keeps its stream's stop
|
|
33
|
+
reason and message id. Only such a record is version 2; every other record
|
|
34
|
+
is still version 1, and version 1 records are read. A Smith before this one
|
|
35
|
+
ignores version 2 records (paying for that reply again and running its
|
|
36
|
+
tools, as it did).
|
|
37
|
+
- A request's memo digest covers its tools' descriptions and parameters, not
|
|
38
|
+
only their names, so a call kept before a tool changed is never replayed
|
|
39
|
+
against the new tool. Records for calls with tools kept by 0.12.1 are not
|
|
40
|
+
found after the upgrade (those calls are paid for again once).
|
|
41
|
+
|
|
42
|
+
### Fixed
|
|
43
|
+
|
|
44
|
+
- Kept tool results are charged to the agent's `tool_calls` allowance (by
|
|
45
|
+
tool, for an exact budget) and the workflow's `tool_calls` budget as they
|
|
46
|
+
were before the cut, so a replay never runs more tools than the step may.
|
|
47
|
+
- A call a tool halted (`halt`) stored a complete record no replay could read
|
|
48
|
+
(it ended in the tool's result); it now keeps only its progress, which a
|
|
49
|
+
replay goes on from.
|
|
50
|
+
- A memo record whose tool results do not answer the calls before them (a
|
|
51
|
+
result for no call, a call left unanswered before the next reply) is ignored instead of continued into a
|
|
52
|
+
request the provider refuses.
|
|
53
|
+
- A streamed call that failed after replies a memo kept gave the kept replies
|
|
54
|
+
the stream facts (message id, stop reason) of its live rounds; each keeps
|
|
55
|
+
its own now.
|
|
56
|
+
|
|
57
|
+
### Documentation
|
|
58
|
+
|
|
59
|
+
- The README is a short guide now: what Smith is, installing it, a first
|
|
60
|
+
workflow, the steps, and each feature in a few lines with an example and a
|
|
61
|
+
link. Its detailed contracts moved, unchanged, into `docs/`: new
|
|
62
|
+
`AGENTS.md` (outputs, request shaping, streaming, batch mode),
|
|
63
|
+
`BUDGETS.md`, `ERRORS_AND_RETRIES.md` (with the response memo),
|
|
64
|
+
`TESTING.md` (with the doctor), `INSPECTION.md` and `DEVELOPMENT.md`; and
|
|
65
|
+
sections appended to `PERSISTENCE.md`, `TOOLS_AND_GUARDRAILS.md` and
|
|
66
|
+
`CONFIGURATION.md`. The README's examples are run by
|
|
67
|
+
`tmp/probes/readme_probe.rb`; the retries example used an undefined
|
|
68
|
+
`order`, and several examples left states undeclared.
|
|
69
|
+
|
|
70
|
+
## [0.12.1] - 2026-10-11
|
|
71
|
+
|
|
72
|
+
### Changed
|
|
73
|
+
|
|
74
|
+
- `rails g smith:install` sets `persistence_max_bytes` to 16 MiB (it was
|
|
75
|
+
1 MiB), with the payload CHECK a third above it (22,373,717 bytes). One
|
|
76
|
+
step can add more than 1 MiB to a run's state (a `map` step's collected
|
|
77
|
+
results are bounded at 4 MiB), so the old default could refuse a run Smith
|
|
78
|
+
built itself. An app generated with 0.12.0 keeps its bound: raise
|
|
79
|
+
`config.persistence_max_bytes`, and replace the CHECK in a migration
|
|
80
|
+
(`remove_check_constraint` then `add_check_constraint` with the new
|
|
81
|
+
bound; on MySQL, also `change_column :workflow_states, :payload, :text,
|
|
82
|
+
limit: 22_373_717`).
|
|
83
|
+
|
|
7
84
|
## [0.12.0] - 2026-10-11
|
|
8
85
|
|
|
9
86
|
### Upgrade notes
|