feat: add a calculator tool, so a number is calculated rather than predicted #926
No reviewers
Labels
No labels
move-to-repo
coilyco-bridge-deploy
move-to-repo
coilyco-flight-deck-agent-compose
move-to-repo
coilyco-gaming-eco-app
move-to-repo
coilysiren-inbox
move-to-repo
unknown
🔒⚠️📦⚠️🔒 SANDBOXED 🔒⚠️📦⚠️🔒
autonomy
async-consult
autonomy
epic
autonomy
headless
autonomy
live-collab
c#
priority
P0
priority
P1
priority
P2
priority
P3
priority
P4
role/ai
role/creator
role/design
role/director
role/engineer
role/exec
role/human
role/ops
role/qa
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
coilyco-gaming/sirens-echo!926
Loading…
Reference in a new issue
No description provided.
Delete branch "issue-916-calculator-tool"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
calculate, in process, exact.Done means, one at a time
+ - * / ^, parentheses, and a trailing%. The result text is<expression> = <value>, so a trace is checkable against what was asked rather than against what the reply claimed.CALCULATOR_RUNES,CALCULATOR_DIGITS,CALCULATOR_EXPONENT,CALCULATOR_PLACES, all knobs inconfig.go. Bad input comes back asIsErrorthe model can read and correct, matchingfetch_urland the scratch tools, and only an unserved tool name fails the turn.Exact, not floating point
Values are
big.Rat, so0.1 + 0.2is0.3and a recipe scaled across three multiplications does not drift. A result that is not a decimal says it was rounded and prints the exact fraction beside it, because a rounded number presented as exact is the failure this tool exists to stop.Not a language
No identifiers, no calls, nothing to evaluate but numbers and those operators.
total * 2,exec(1), andrm -rf /all refuse with "that is not arithmetic". #179 puts code execution across the blast-radius line and this does not approach it.Registered unconditionally
It needs no configuration. A tool behind an unset switch is a tool nobody has, which is what #885 found after
SIRENS_ECHO_DISCORD_COMMANDSsat dark.Three things worth a reviewer's eye
docs/sirens-echo-prompt.mdwith its cause as that file requires. The rule is what makes the tool used rather than merely offered, so the raise is the point rather than a side effect.boardcitation_test.gocaught it.agents/deep/packs/board.yamlis updated to 88-89, 91-92, and 101-109.Tests
Arithmetic including right-associative
^and thousands separators, exactness on0.1 + 0.2, the rounding disclosure on1/3, the echoed expression, ten refusal cases, and the tool surface.just gatePASS.closes #916