chore(deps): update every dependency, and pay what go 1.26 asks

mvdan.cc/sh v3.14.0 requires go 1.26.0, so the directive moves with it,
and the directive is what turns modernize's newexpr rule on across the
tree. The 75 findings are the price of this upgrade rather than debt it
inherited: lint reported 0 issues on the same tree one version back.

Inlining the pointer wrappers leaves nine of them with no caller, and
two different gates are needed to see that: unused catches the
unexported ones, repolint's orphan catches exported tool.IntPtr. The
//go:fix inline directives the fixer writes are dropped rather than
kept, because govet reads one as a demand to inline every call site --
which would delete names that carry meaning. provider.TemperaturePtr
tells an explicit 0 from "not set, use the provider default"; new(0.0)
at twelve call sites says neither. Keeping the new(v) body satisfies
modernize without spending the name.

Go: bubbles, bubbletea, lipgloss, x/ansi, lark, go-runewidth,
jsonschema, x/mod, x/net, sqlite, sh; wails 2.13 -> 2.15 in desktop.
Frontend: vite 8 on rolldown, typescript 7, plugin-react 6, vitest,
electron 44.1.0. Both lockfiles carry the linux and windows native
binaries, which CI installs and this machine never does.

Verified past every gate CI runs, plus the two it does not: the Electron
smoke against a real window, and Studio itself built and launched under
wails 2.15.
This commit is contained in:
esengine committed 2026-08-31 07:49:01 -07:00
1 parent 0382481ea9
commit 5e1ba919d1
35 files changed
+691 -831

No files matched your search

+1 -2
View File
@@ -11,8 +11,7 @@ import (
// jsonTags collects a struct's JSON field names, descending into embedded and
// nested structs the way encoding/json itself does.
func jsonTags(t reflect.Type, into map[string]bool) {
for i := range t.NumField() {
f := t.Field(i)
for f := range t.Fields() {
tag, _, _ := strings.Cut(f.Tag.Get("json"), ",")
if tag == "-" {
continue
+1 -1
View File
@@ -11,7 +11,7 @@
"smoke": "electron test/smoke.js"
},
"devDependencies": {
"electron": "44.0.0",
"electron": "44.1.0",
"playwright": "1.62.1"
},
"pnpm": {
+5 -5
View File
@@ -9,8 +9,8 @@ importers:
.:
devDependencies:
electron:
specifier: 44.0.0
version: 44.0.0
specifier: 44.1.0
version: 44.1.0
playwright:
specifier: 1.62.1
version: 1.62.1
@@ -37,8 +37,8 @@ packages:
supports-color:
optional: true
electron@44.0.0:
resolution: {integrity: sha512-FkTqPrFPZYljdPI5b7KORGsJTd6FgUQDefl5MrU3Xz9R87pAj9JLreIjDqcRN8hJIkFHIou0o8kKzvcpT9qiRQ==}
electron@44.1.0:
resolution: {integrity: sha512-kmLg8axOg22DC3fXx5NCwBYW8fx0rK2zzJ3Tf67GjNCkxfoxEcd+yo0QfDjlBtHJs3xeA8fTg64b6iVzFTVErg==}
engines: {node: '>= 22.12.0'}
hasBin: true
@@ -112,7 +112,7 @@ snapshots:
dependencies:
ms: 2.1.3
electron@44.0.0:
electron@44.1.0:
dependencies:
'@electron-internal/extract-zip': 1.0.5
'@electron/get': 5.1.0
+8 -8
View File
@@ -11,8 +11,8 @@
},
"dependencies": {
"katex": "^0.18.4",
"react": "^19.2.0",
"react-dom": "^19.2.0",
"react": "^19.2.8",
"react-dom": "^19.2.8",
"react-markdown": "^10.1.0",
"rehype-katex": "^7.0.1",
"rehype-raw": "^7.0.0",
@@ -22,12 +22,12 @@
"remark-math": "^6.0.0"
},
"devDependencies": {
"@types/react": "^19.2.0",
"@types/react-dom": "^19.2.0",
"@vitejs/plugin-react": "^5.0.4",
"@types/react": "^19.2.18",
"@types/react-dom": "^19.2.5",
"@vitejs/plugin-react": "^6.1.1",
"playwright": "^1.62.1",
"typescript": "^5.9.3",
"vite": "^7.1.12",
"vitest": "^4.1.10"
"typescript": "^7.0.2",
"vite": "^8.2.2",
"vitest": "^4.1.11"
}
}
+530 -642
View File
File diff suppressed because it is too large. Load diff
+10 -10
View File
@@ -1,6 +1,6 @@
module reasonix/desktop
go 1.25.0
go 1.26.0
toolchain go1.26.6
@@ -15,8 +15,8 @@ require (
aead.dev/minisign v0.3.0
fyne.io/systray v1.12.2
github.com/tc-hib/winres v0.3.1
github.com/wailsapp/wails/v2 v2.13.0
golang.org/x/mod v0.38.0
github.com/wailsapp/wails/v2 v2.15.0
golang.org/x/mod v0.40.0
golang.org/x/sys v0.47.0
)
@@ -26,7 +26,7 @@ require (
github.com/aymanbagabas/go-udiff v0.4.1 // indirect
github.com/bep/debounce v1.2.1 // indirect
github.com/bmatcuk/doublestar/v4 v4.10.0 // indirect
github.com/charmbracelet/x/ansi v0.11.7 // indirect
github.com/charmbracelet/x/ansi v0.11.8 // indirect
github.com/clipperhouse/displaywidth v0.11.0 // indirect
github.com/clipperhouse/uax29/v2 v2.7.0 // indirect
github.com/danieljoos/wincred v1.2.3 // indirect
@@ -45,11 +45,11 @@ require (
github.com/leaanthony/gosod v1.0.4 // indirect
github.com/leaanthony/slicer v1.6.0 // indirect
github.com/leaanthony/u v1.1.1 // indirect
github.com/lucasb-eyer/go-colorful v1.4.0 // indirect
github.com/lucasb-eyer/go-colorful v1.4.1 // indirect
github.com/mattn/go-colorable v0.1.15 // indirect
github.com/mattn/go-isatty v0.0.24 // indirect
github.com/mattn/go-pointer v0.0.1 // indirect
github.com/mattn/go-runewidth v0.0.27 // indirect
github.com/mattn/go-runewidth v0.0.28 // indirect
github.com/ncruces/go-strftime v1.0.0 // indirect
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 // indirect
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
@@ -59,7 +59,7 @@ require (
github.com/rivo/uniseg v0.4.7 // indirect
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 // indirect
github.com/samber/lo v1.53.0 // indirect
github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 // indirect
github.com/santhosh-tekuri/jsonschema/v6 v6.0.3 // indirect
github.com/tkrajina/go-reflector v0.5.8 // indirect
github.com/tree-sitter/go-tree-sitter v0.25.0 // indirect
github.com/tree-sitter/tree-sitter-javascript v0.25.0 // indirect
@@ -74,14 +74,14 @@ require (
github.com/zalando/go-keyring v0.2.8 // indirect
golang.org/x/crypto v0.55.0 // indirect
golang.org/x/image v0.45.0 // indirect
golang.org/x/net v0.57.0 // indirect
golang.org/x/net v0.58.0 // indirect
golang.org/x/text v0.41.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
modernc.org/libc v1.74.4 // indirect
modernc.org/mathutil v1.7.1 // indirect
modernc.org/memory v1.11.0 // indirect
modernc.org/sqlite v1.56.0 // indirect
mvdan.cc/sh/v3 v3.13.1 // indirect
modernc.org/sqlite v1.57.0 // indirect
mvdan.cc/sh/v3 v3.14.0 // indirect
)
replace reasonix => ../
+24 -24
View File
@@ -12,8 +12,8 @@ github.com/bep/debounce v1.2.1 h1:v67fRdBA9UQu2NhLFXrSg0Brw7CexQekrBwDMM8bzeY=
github.com/bep/debounce v1.2.1/go.mod h1:H8yggRPQKLUhUoqrJC1bO2xNya7vanpDl7xR3ISbCJ0=
github.com/bmatcuk/doublestar/v4 v4.10.0 h1:zU9WiOla1YA122oLM6i4EXvGW62DvKZVxIe6TYWexEs=
github.com/bmatcuk/doublestar/v4 v4.10.0/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc=
github.com/charmbracelet/x/ansi v0.11.7 h1:kzv1kJvjg2S3r9KHo8hDdHFQLEqn4RBCb39dAYC84jI=
github.com/charmbracelet/x/ansi v0.11.7/go.mod h1:9qGpnAVYz+8ACONkZBUWPtL7lulP9No6p1epAihUZwQ=
github.com/charmbracelet/x/ansi v0.11.8 h1:JMFwp0CgDC2+jcOB162HH5k7I3FVbgFSMMYg7dSPBQQ=
github.com/charmbracelet/x/ansi v0.11.8/go.mod h1:ZNN+3mXny/516oTQPLMPIBeSINvNJJQ8uQXDgbeJxY0=
github.com/clipperhouse/displaywidth v0.11.0 h1:lBc6kY44VFw+TDx4I8opi/EtL9m20WSEFgwIwO+UVM8=
github.com/clipperhouse/displaywidth v0.11.0/go.mod h1:bkrFNkf81G8HyVqmKGxsPufD3JhNl3dSqnGhOoSD/o0=
github.com/clipperhouse/uax29/v2 v2.7.0 h1:+gs4oBZ2gPfVrKPthwbMzWZDaAFPGYK72F0NJv2v7Vk=
@@ -29,8 +29,8 @@ github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkp
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE=
github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78=
github.com/go-quicktest/qt v1.101.0 h1:O1K29Txy5P2OK0dGo59b7b0LR6wKfIhttaAhHUyn7eI=
github.com/go-quicktest/qt v1.101.0/go.mod h1:14Bz/f7NwaXPtdYEgzsx46kqSxVwTbzVZsDC26tQJow=
github.com/go-quicktest/qt v1.102.0 h1:HSQxCeh5YZH3EL3W39ixjtyaEhcWSXQHtHnMBzSs474=
github.com/go-quicktest/qt v1.102.0/go.mod h1:p4lGIVX+8Wa6ZPNDvqcxq36XpUDLh42FLetFU7odllI=
github.com/godbus/dbus/v5 v5.2.2 h1:TUR3TgtSVDmjiXOgAAyaZbYmIeP3DPkld3jgKGV8mXQ=
github.com/godbus/dbus/v5 v5.2.2/go.mod h1:3AAv2+hPq5rdnr5txxxRwiGjPXamgoIHgz9FPBfOp3c=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
@@ -69,8 +69,8 @@ github.com/leaanthony/slicer v1.6.0 h1:1RFP5uiPJvT93TAHi+ipd3NACobkW53yUiBqZheE/
github.com/leaanthony/slicer v1.6.0/go.mod h1:o/Iz29g7LN0GqH3aMjWAe90381nyZlDNquK+mtH2Fj8=
github.com/leaanthony/u v1.1.1 h1:TUFjwDGlNX+WuwVEzDqQwC2lOv0P4uhTQw7CMFdiK7M=
github.com/leaanthony/u v1.1.1/go.mod h1:9+o6hejoRljvZ3BzdYlVL0JYCwtnAsVuN9pVTQcaRfI=
github.com/lucasb-eyer/go-colorful v1.4.0 h1:UtrWVfLdarDgc44HcS7pYloGHJUjHV/4FwW4TvVgFr4=
github.com/lucasb-eyer/go-colorful v1.4.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
github.com/lucasb-eyer/go-colorful v1.4.1 h1:1EO+WB73+EH8EVbzlrG3KLAfEypQWVHIBqlTf+2hNss=
github.com/lucasb-eyer/go-colorful v1.4.1/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU=
github.com/matryer/is v1.4.1 h1:55ehd8zaGABKLXQUe2awZ99BD/PTc2ls+KV/dXphgEQ=
github.com/matryer/is v1.4.1/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU=
@@ -80,8 +80,8 @@ github.com/mattn/go-isatty v0.0.24 h1:tGZZoVgT/KiqK1c8ocVLeDS8BSWMRd47J3Lbz7vsRe
github.com/mattn/go-isatty v0.0.24/go.mod h1:nMCL3Zebbrt45jsMDgnfIwz6ydEQApk5oEI3HqDio6A=
github.com/mattn/go-pointer v0.0.1 h1:n+XhsuGeVO6MEAp7xyEukFINEa+Quek5psIR/ylA6o0=
github.com/mattn/go-pointer v0.0.1/go.mod h1:2zXcozF6qYGgmsG+SeTZz3oAbFLdD3OWqnUbNvJZAlc=
github.com/mattn/go-runewidth v0.0.27 h1:Feg/Oou5zI/wnpgDF6omIU0OokC9GxLC/WRknhVlIR0=
github.com/mattn/go-runewidth v0.0.27/go.mod h1:3qAiGCV4Koz/yuveO58qUefmUTRm8r0IGEXZ9jeHp/8=
github.com/mattn/go-runewidth v0.0.28 h1:rPyg2ybwEKPebvpzVWe1gKBkH8EQFkxO4Y0hjBeLaBU=
github.com/mattn/go-runewidth v0.0.28/go.mod h1:3qAiGCV4Koz/yuveO58qUefmUTRm8r0IGEXZ9jeHp/8=
github.com/ncruces/go-strftime v1.0.0 h1:HMFp8mLCTPp341M/ZnA4qaf7ZlsbTc+miZjCLOFAw7w=
github.com/ncruces/go-strftime v1.0.0/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls=
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 h1:zYyBkD/k9seD2A7fsi6Oo2LfFZAehjjQMERAvZLEDnQ=
@@ -99,14 +99,14 @@ github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qq
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
github.com/rogpeppe/go-internal v1.15.0 h1:D0RCU5rMAp+SpgkiNdrjfJ+LX4J1M32V2NeCY7EJ6hc=
github.com/rogpeppe/go-internal v1.15.0/go.mod h1:DrUVZyrJU+txYW5/1kwtXQSMFio52ZOxX7yM1VHvnxs=
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
github.com/samber/lo v1.53.0 h1:t975lj2py4kJPQ6haz1QMgtId2gtmfktACxIXArw3HM=
github.com/samber/lo v1.53.0/go.mod h1:4+MXEGsJzbKGaUEQFKBq2xtfuznW9oz/WrgyzMzRoM0=
github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 h1:KRzFb2m7YtdldCEkzs6KqmJw4nqEVZGK7IN2kJkjTuQ=
github.com/santhosh-tekuri/jsonschema/v6 v6.0.2/go.mod h1:JXeL+ps8p7/KNMjDQk3TCwPpBy0wYklyWTfbkIzdIFU=
github.com/santhosh-tekuri/jsonschema/v6 v6.0.3 h1:1EYB5IzjZawrrnELUi78f9fPu57HuXjmddZPjrls/28=
github.com/santhosh-tekuri/jsonschema/v6 v6.0.3/go.mod h1:JXeL+ps8p7/KNMjDQk3TCwPpBy0wYklyWTfbkIzdIFU=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY=
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
@@ -151,8 +151,8 @@ github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQ
github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ=
github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs=
github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o=
github.com/wailsapp/wails/v2 v2.13.0 h1:S7OgXWpj72V91unF8iDWJKbcS9ZpwCT3R0QVru4v2Mg=
github.com/wailsapp/wails/v2 v2.13.0/go.mod h1:nVr/wSIEZ7xxKPkzK65mjpKpaOPQI2k4pvLwGR/i4kc=
github.com/wailsapp/wails/v2 v2.15.0 h1:u7cHK+UesZOlYxyJxfYLteaCPhws6UsZoDdqUejuX6Q=
github.com/wailsapp/wails/v2 v2.15.0/go.mod h1:scxrgwfsv6yR6fE6cCF+Flfl+JeU+SR87T9x4kILJ6M=
github.com/yuin/goldmark v1.8.5 h1:r6N5afV5qj/5S4UTch8agZHJ8UxNCMwX7WjkkJam2NA=
github.com/yuin/goldmark v1.8.5/go.mod h1:ip/1k0VRfGynBgxOz0yCqHrbZXhcjxyuS66Brc7iBKg=
github.com/zalando/go-keyring v0.2.8 h1:6sD/Ucpl7jNq10rM2pgqTs0sZ9V3qMrqfIIy5YPccHs=
@@ -163,11 +163,11 @@ golang.org/x/crypto v0.55.0 h1:+KWHjbgOaAQ66dh/YlkZKHlz9ZUlq61AFirAR9ntP8M=
golang.org/x/crypto v0.55.0/go.mod h1:uq0V9dE/fzQuJtbnL+2EhWOE63vo164FY8xqEnV9xis=
golang.org/x/image v0.45.0 h1:FMb1nTbH5H9vF55SriQHgFw5GnNL9Jg6L25BwXKzhB0=
golang.org/x/image v0.45.0/go.mod h1:n62x/7RqlwXDvGsSU4u6IUTUf6KghUZ9Bt7cG/T9Fx4=
golang.org/x/mod v0.38.0 h1:MECBjubtXD7yj4HrhIUcywNaGeNVUdfVnxmPajOk4yk=
golang.org/x/mod v0.38.0/go.mod h1:V6Xz0pq8TQ3dGqVQ1FVHuelZpAL0uNhSkk9ogYP3c40=
golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs=
golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE=
golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.57.0 h1:K5+3DljvIuDG9/Jv9rvyMywYNFCQ9RSUY6OOTTkT+tE=
golang.org/x/net v0.57.0/go.mod h1:KpXc8iv+r3XplLAG/f7Jsf9RPszJzdR0f58q9vGOuEU=
golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To=
golang.org/x/net v0.58.0/go.mod h1:YwCddHnFlT7eLQqVprV19OnhLGtc5xOKgE0RyqgfWAU=
golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek=
golang.org/x/sync v0.22.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=
golang.org/x/sys v0.0.0-20200810151505-1b9f1253b3ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -183,8 +183,8 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8=
golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.48.0 h1:3+hClM1aLL5mjMKm5ovokw9epgRXPuu2tILgismM6RE=
golang.org/x/tools v0.48.0/go.mod h1:08xX0orndb/F7jJxGDicx061tyd5pcMto75YMAXr6lk=
golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI=
golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
@@ -212,11 +212,11 @@ modernc.org/opt v0.2.0 h1:tGyef5ApycA7FSEOMraay9SaTk5zmbx7Tu+cJs4QKZg=
modernc.org/opt v0.2.0/go.mod h1:03fq9lsNfvkYSfxrfUhZCWPk1lm4cq4N+Bh//bEtgns=
modernc.org/sortutil v1.2.1 h1:+xyoGf15mM3NMlPDnFqrteY07klSFxLElE2PVuWIJ7w=
modernc.org/sortutil v1.2.1/go.mod h1:7ZI3a3REbai7gzCLcotuw9AC4VZVpYMjDzETGsSMqJE=
modernc.org/sqlite v1.56.0 h1:/D8e2RfFqoy/Zc6PuC76U28zFwmI/sYx1Kjm4yEn9e0=
modernc.org/sqlite v1.56.0/go.mod h1:yCJ2cmAaIkHQ25oXWrF8H4O1lIfPYPR26yCEDj2P3pQ=
modernc.org/sqlite v1.57.0 h1:qNQP6xnx5M0ISNtlnxoOX0+cD5bJ0/gr9aMmndFczzg=
modernc.org/sqlite v1.57.0/go.mod h1:yCJ2cmAaIkHQ25oXWrF8H4O1lIfPYPR26yCEDj2P3pQ=
modernc.org/strutil v1.2.1 h1:UneZBkQA+DX2Rp35KcM69cSsNES9ly8mQWD71HKlOA0=
modernc.org/strutil v1.2.1/go.mod h1:EHkiggD70koQxjVdSBM3JKM7k6L0FbGE5eymy9i3B9A=
modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y=
modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM=
mvdan.cc/sh/v3 v3.13.1 h1:DP3TfgZhDkT7lerUdnp6PTGKyxxzz6T+cOlY/xEvfWk=
mvdan.cc/sh/v3 v3.13.1/go.mod h1:lXJ8SexMvEVcHCoDvAGLZgFJ9Wsm2sulmoNEXGhYZD0=
mvdan.cc/sh/v3 v3.14.0 h1:wsPjcfrSXLJomdxwhVZqZ5j5Cue68l549Aj/DCqzbpc=
mvdan.cc/sh/v3 v3.14.0/go.mod h1:syYCoFET8w9tvevxiXUtY8/ICrU+l26jHmhJDra3Vwo=
+14 -14
View File
@@ -1,13 +1,13 @@
module reasonix
go 1.25.0
go 1.26.0
toolchain go1.26.6
require (
charm.land/bubbles/v2 v2.1.1
charm.land/bubbletea/v2 v2.0.8
charm.land/lipgloss/v2 v2.0.5
charm.land/bubbles/v2 v2.2.1
charm.land/bubbletea/v2 v2.0.9
charm.land/lipgloss/v2 v2.0.6
git.sr.ht/~jackmordaunt/go-toast/v2 v2.0.3
github.com/BurntSushi/toml v1.6.0
github.com/alecthomas/chroma/v2 v2.27.0
@@ -15,16 +15,16 @@ require (
github.com/aymanbagabas/go-udiff v0.4.1
github.com/bmatcuk/doublestar/v4 v4.10.0
github.com/charmbracelet/colorprofile v0.4.3
github.com/charmbracelet/x/ansi v0.11.7
github.com/charmbracelet/x/ansi v0.11.8
github.com/godbus/dbus/v5 v5.2.2
github.com/joho/godotenv v1.5.1
github.com/kevinburke/ssh_config v1.6.0
github.com/larksuite/oapi-sdk-go/v3 v3.9.9
github.com/mattn/go-runewidth v0.0.27
github.com/larksuite/oapi-sdk-go/v3 v3.11.0
github.com/mattn/go-runewidth v0.0.28
github.com/pkg/sftp v1.13.11
github.com/rivo/uniseg v0.4.7
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06
github.com/santhosh-tekuri/jsonschema/v6 v6.0.2
github.com/santhosh-tekuri/jsonschema/v6 v6.0.3
github.com/spf13/pflag v1.0.10
github.com/tree-sitter/go-tree-sitter v0.25.0
github.com/tree-sitter/tree-sitter-javascript v0.25.0
@@ -36,18 +36,18 @@ require (
go.uber.org/goleak v1.3.0
golang.org/x/crypto v0.55.0
golang.org/x/image v0.45.0
golang.org/x/mod v0.38.0
golang.org/x/net v0.57.0
golang.org/x/mod v0.40.0
golang.org/x/net v0.58.0
golang.org/x/sys v0.47.0
golang.org/x/term v0.45.0
golang.org/x/text v0.41.0
gopkg.in/yaml.v3 v3.0.1
modernc.org/sqlite v1.56.0
mvdan.cc/sh/v3 v3.13.1
modernc.org/sqlite v1.57.0
mvdan.cc/sh/v3 v3.14.0
)
require (
github.com/charmbracelet/ultraviolet v0.0.0-20260703014108-f5a850f9c2b7 // indirect
github.com/charmbracelet/ultraviolet v0.0.0-20260811164956-006e29f97886 // indirect
github.com/charmbracelet/x/term v0.2.2 // indirect
github.com/charmbracelet/x/termios v0.1.1 // indirect
github.com/charmbracelet/x/windows v0.2.2 // indirect
@@ -61,7 +61,7 @@ require (
github.com/google/uuid v1.6.0 // indirect
github.com/gorilla/websocket v1.5.3 // indirect
github.com/kr/fs v0.1.0 // indirect
github.com/lucasb-eyer/go-colorful v1.4.0 // indirect
github.com/lucasb-eyer/go-colorful v1.4.1 // indirect
github.com/mattn/go-isatty v0.0.24 // indirect
github.com/mattn/go-pointer v0.0.1 // indirect
github.com/muesli/cancelreader v0.2.2 // indirect
+32 -32
View File
@@ -1,9 +1,9 @@
charm.land/bubbles/v2 v2.1.1 h1:7r55WzBxpo/R3z98hGmY7KKPd3ET6vsf0Fb9sDHOV60=
charm.land/bubbles/v2 v2.1.1/go.mod h1:GE6M31gaWZVXzGw73OeuTTgy4lX+OtkH0E5ymnNsHxo=
charm.land/bubbletea/v2 v2.0.8 h1:SxTJMhCAI3lbPmy4SgX5LWZ24AdINr4I6UEqzZvYJuY=
charm.land/bubbletea/v2 v2.0.8/go.mod h1:2SkdgoTXluXJHOUwAoRlRXF/28vklb1rFl6GcgV1/ss=
charm.land/lipgloss/v2 v2.0.5 h1:kbNxgeeUOYv5J0YdpxFjfvf3dFvqH8Aci4zB6xqFtrY=
charm.land/lipgloss/v2 v2.0.5/go.mod h1:9oqhxt4yxIMe6q5A4kHr44DremZk7J9UNh74GlWa5nc=
charm.land/bubbles/v2 v2.2.1 h1:Fq1+qm5hV6GkvzLQDhCBpXXE5tLgvh1PRriCLwSvIQU=
charm.land/bubbles/v2 v2.2.1/go.mod h1:wdMgn+sje1KNXdwFizIWjbf328fIUBxqEmJ/vYPo8yc=
charm.land/bubbletea/v2 v2.0.9 h1:DpJCMWKgzQK8SJv4zbKKFHAI10ymWy/evClPFk0k0f8=
charm.land/bubbletea/v2 v2.0.9/go.mod h1:2SkdgoTXluXJHOUwAoRlRXF/28vklb1rFl6GcgV1/ss=
charm.land/lipgloss/v2 v2.0.6 h1:EaGKeuA8FvF+v2BT5VmZd2LoYLaMZJXA5n34th8nCIQ=
charm.land/lipgloss/v2 v2.0.6/go.mod h1:ipDDJNSGa1hlwDtSfW1s2/xR8Vdhbut4PXh2zEKZd0Q=
git.sr.ht/~jackmordaunt/go-toast/v2 v2.0.3 h1:N3IGoHHp9pb6mj1cbXbuaSXV/UMKwmbKLf53nQmtqMA=
git.sr.ht/~jackmordaunt/go-toast/v2 v2.0.3/go.mod h1:QtOLZGz8olr4qH2vWK0QH0w0O4T9fEIjMuWpKUsH7nc=
github.com/BurntSushi/toml v1.6.0 h1:dRaEfpa2VI55EwlIW72hMRHdWouJeRF7TPYhI+AUQjk=
@@ -24,10 +24,10 @@ github.com/bmatcuk/doublestar/v4 v4.10.0 h1:zU9WiOla1YA122oLM6i4EXvGW62DvKZVxIe6
github.com/bmatcuk/doublestar/v4 v4.10.0/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc=
github.com/charmbracelet/colorprofile v0.4.3 h1:QPa1IWkYI+AOB+fE+mg/5/4HRMZcaXex9t5KX76i20Q=
github.com/charmbracelet/colorprofile v0.4.3/go.mod h1:/zT4BhpD5aGFpqQQqw7a+VtHCzu+zrQtt1zhMt9mR4Q=
github.com/charmbracelet/ultraviolet v0.0.0-20260703014108-f5a850f9c2b7 h1:3FmWoGNWK4STvqg0O0Aeav2T7rodWJAPeF0QpH+8gFw=
github.com/charmbracelet/ultraviolet v0.0.0-20260703014108-f5a850f9c2b7/go.mod h1:f/jRa757WUmaOZrbPspXymbg/GnbF+rwe4OLsG7aXYo=
github.com/charmbracelet/x/ansi v0.11.7 h1:kzv1kJvjg2S3r9KHo8hDdHFQLEqn4RBCb39dAYC84jI=
github.com/charmbracelet/x/ansi v0.11.7/go.mod h1:9qGpnAVYz+8ACONkZBUWPtL7lulP9No6p1epAihUZwQ=
github.com/charmbracelet/ultraviolet v0.0.0-20260811164956-006e29f97886 h1:rdnVWKgJpTVXKuKuJyxDJ+NFJdUaUqGvyGy61OcvlbA=
github.com/charmbracelet/ultraviolet v0.0.0-20260811164956-006e29f97886/go.mod h1:nAw0d9PhFp1qdzi2xhQU5YOu5sVpDIHWlaW2Uz/bCro=
github.com/charmbracelet/x/ansi v0.11.8 h1:JMFwp0CgDC2+jcOB162HH5k7I3FVbgFSMMYg7dSPBQQ=
github.com/charmbracelet/x/ansi v0.11.8/go.mod h1:ZNN+3mXny/516oTQPLMPIBeSINvNJJQ8uQXDgbeJxY0=
github.com/charmbracelet/x/exp/golden v0.0.0-20250806222409-83e3a29d542f h1:pk6gmGpCE7F3FcjaOEKYriCvpmIN4+6OS/RD0vm4uIA=
github.com/charmbracelet/x/exp/golden v0.0.0-20250806222409-83e3a29d542f/go.mod h1:IfZAMTHB6XkZSeXUqriemErjAWCCzT0LwjKFYCZyw0I=
github.com/charmbracelet/x/term v0.2.2 h1:xVRT/S2ZcKdhhOuSP4t5cLi5o+JxklsoEObBSgfgZRk=
@@ -53,8 +53,8 @@ github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkp
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE=
github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78=
github.com/go-quicktest/qt v1.101.0 h1:O1K29Txy5P2OK0dGo59b7b0LR6wKfIhttaAhHUyn7eI=
github.com/go-quicktest/qt v1.101.0/go.mod h1:14Bz/f7NwaXPtdYEgzsx46kqSxVwTbzVZsDC26tQJow=
github.com/go-quicktest/qt v1.102.0 h1:HSQxCeh5YZH3EL3W39ixjtyaEhcWSXQHtHnMBzSs474=
github.com/go-quicktest/qt v1.102.0/go.mod h1:p4lGIVX+8Wa6ZPNDvqcxq36XpUDLh42FLetFU7odllI=
github.com/godbus/dbus/v5 v5.2.2 h1:TUR3TgtSVDmjiXOgAAyaZbYmIeP3DPkld3jgKGV8mXQ=
github.com/godbus/dbus/v5 v5.2.2/go.mod h1:3AAv2+hPq5rdnr5txxxRwiGjPXamgoIHgz9FPBfOp3c=
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
@@ -84,16 +84,16 @@ github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/larksuite/oapi-sdk-go/v3 v3.9.9 h1:qzVK5U1AuT/n0Z4LqCN2ATU6MlYp2Iipa7q+fVK5Nh8=
github.com/larksuite/oapi-sdk-go/v3 v3.9.9/go.mod h1:ZEplY+kwuIrj/nqw5uSCINNATcH3KdxSN7y+UxYY5fI=
github.com/lucasb-eyer/go-colorful v1.4.0 h1:UtrWVfLdarDgc44HcS7pYloGHJUjHV/4FwW4TvVgFr4=
github.com/lucasb-eyer/go-colorful v1.4.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
github.com/larksuite/oapi-sdk-go/v3 v3.11.0 h1:KyCckvO8dFVQJPZYd7DdEPzgGp/C1g+hmi3oiV/dpnI=
github.com/larksuite/oapi-sdk-go/v3 v3.11.0/go.mod h1:ZEplY+kwuIrj/nqw5uSCINNATcH3KdxSN7y+UxYY5fI=
github.com/lucasb-eyer/go-colorful v1.4.1 h1:1EO+WB73+EH8EVbzlrG3KLAfEypQWVHIBqlTf+2hNss=
github.com/lucasb-eyer/go-colorful v1.4.1/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
github.com/mattn/go-isatty v0.0.24 h1:tGZZoVgT/KiqK1c8ocVLeDS8BSWMRd47J3Lbz7vsReI=
github.com/mattn/go-isatty v0.0.24/go.mod h1:nMCL3Zebbrt45jsMDgnfIwz6ydEQApk5oEI3HqDio6A=
github.com/mattn/go-pointer v0.0.1 h1:n+XhsuGeVO6MEAp7xyEukFINEa+Quek5psIR/ylA6o0=
github.com/mattn/go-pointer v0.0.1/go.mod h1:2zXcozF6qYGgmsG+SeTZz3oAbFLdD3OWqnUbNvJZAlc=
github.com/mattn/go-runewidth v0.0.27 h1:Feg/Oou5zI/wnpgDF6omIU0OokC9GxLC/WRknhVlIR0=
github.com/mattn/go-runewidth v0.0.27/go.mod h1:3qAiGCV4Koz/yuveO58qUefmUTRm8r0IGEXZ9jeHp/8=
github.com/mattn/go-runewidth v0.0.28 h1:rPyg2ybwEKPebvpzVWe1gKBkH8EQFkxO4Y0hjBeLaBU=
github.com/mattn/go-runewidth v0.0.28/go.mod h1:3qAiGCV4Koz/yuveO58qUefmUTRm8r0IGEXZ9jeHp/8=
github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELUXHmA=
github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo=
github.com/ncruces/go-strftime v1.0.0 h1:HMFp8mLCTPp341M/ZnA4qaf7ZlsbTc+miZjCLOFAw7w=
@@ -106,12 +106,12 @@ github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
github.com/rogpeppe/go-internal v1.15.0 h1:D0RCU5rMAp+SpgkiNdrjfJ+LX4J1M32V2NeCY7EJ6hc=
github.com/rogpeppe/go-internal v1.15.0/go.mod h1:DrUVZyrJU+txYW5/1kwtXQSMFio52ZOxX7yM1VHvnxs=
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 h1:KRzFb2m7YtdldCEkzs6KqmJw4nqEVZGK7IN2kJkjTuQ=
github.com/santhosh-tekuri/jsonschema/v6 v6.0.2/go.mod h1:JXeL+ps8p7/KNMjDQk3TCwPpBy0wYklyWTfbkIzdIFU=
github.com/santhosh-tekuri/jsonschema/v6 v6.0.3 h1:1EYB5IzjZawrrnELUi78f9fPu57HuXjmddZPjrls/28=
github.com/santhosh-tekuri/jsonschema/v6 v6.0.3/go.mod h1:JXeL+ps8p7/KNMjDQk3TCwPpBy0wYklyWTfbkIzdIFU=
github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk=
github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
@@ -169,14 +169,14 @@ golang.org/x/image v0.45.0 h1:FMb1nTbH5H9vF55SriQHgFw5GnNL9Jg6L25BwXKzhB0=
golang.org/x/image v0.45.0/go.mod h1:n62x/7RqlwXDvGsSU4u6IUTUf6KghUZ9Bt7cG/T9Fx4=
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.38.0 h1:MECBjubtXD7yj4HrhIUcywNaGeNVUdfVnxmPajOk4yk=
golang.org/x/mod v0.38.0/go.mod h1:V6Xz0pq8TQ3dGqVQ1FVHuelZpAL0uNhSkk9ogYP3c40=
golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs=
golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.57.0 h1:K5+3DljvIuDG9/Jv9rvyMywYNFCQ9RSUY6OOTTkT+tE=
golang.org/x/net v0.57.0/go.mod h1:KpXc8iv+r3XplLAG/f7Jsf9RPszJzdR0f58q9vGOuEU=
golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To=
golang.org/x/net v0.58.0/go.mod h1:YwCddHnFlT7eLQqVprV19OnhLGtc5xOKgE0RyqgfWAU=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -198,8 +198,8 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.48.0 h1:3+hClM1aLL5mjMKm5ovokw9epgRXPuu2tILgismM6RE=
golang.org/x/tools v0.48.0/go.mod h1:08xX0orndb/F7jJxGDicx061tyd5pcMto75YMAXr6lk=
golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI=
golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -232,11 +232,11 @@ modernc.org/opt v0.2.0 h1:tGyef5ApycA7FSEOMraay9SaTk5zmbx7Tu+cJs4QKZg=
modernc.org/opt v0.2.0/go.mod h1:03fq9lsNfvkYSfxrfUhZCWPk1lm4cq4N+Bh//bEtgns=
modernc.org/sortutil v1.2.1 h1:+xyoGf15mM3NMlPDnFqrteY07klSFxLElE2PVuWIJ7w=
modernc.org/sortutil v1.2.1/go.mod h1:7ZI3a3REbai7gzCLcotuw9AC4VZVpYMjDzETGsSMqJE=
modernc.org/sqlite v1.56.0 h1:/D8e2RfFqoy/Zc6PuC76U28zFwmI/sYx1Kjm4yEn9e0=
modernc.org/sqlite v1.56.0/go.mod h1:yCJ2cmAaIkHQ25oXWrF8H4O1lIfPYPR26yCEDj2P3pQ=
modernc.org/sqlite v1.57.0 h1:qNQP6xnx5M0ISNtlnxoOX0+cD5bJ0/gr9aMmndFczzg=
modernc.org/sqlite v1.57.0/go.mod h1:yCJ2cmAaIkHQ25oXWrF8H4O1lIfPYPR26yCEDj2P3pQ=
modernc.org/strutil v1.2.1 h1:UneZBkQA+DX2Rp35KcM69cSsNES9ly8mQWD71HKlOA0=
modernc.org/strutil v1.2.1/go.mod h1:EHkiggD70koQxjVdSBM3JKM7k6L0FbGE5eymy9i3B9A=
modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y=
modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM=
mvdan.cc/sh/v3 v3.13.1 h1:DP3TfgZhDkT7lerUdnp6PTGKyxxzz6T+cOlY/xEvfWk=
mvdan.cc/sh/v3 v3.13.1/go.mod h1:lXJ8SexMvEVcHCoDvAGLZgFJ9Wsm2sulmoNEXGhYZD0=
mvdan.cc/sh/v3 v3.14.0 h1:wsPjcfrSXLJomdxwhVZqZ5j5Cue68l549Aj/DCqzbpc=
mvdan.cc/sh/v3 v3.14.0/go.mod h1:syYCoFET8w9tvevxiXUtY8/ICrU+l26jHmhJDra3Vwo=
+3 -5
View File
@@ -7,8 +7,6 @@ import (
"reasonix/internal/tool"
)
func exitCode(n int) *int { return &n }
// A failing `go test` is the case prefix matching cannot see: the output opens
// with "=== RUN" and the failure only shows in the recorded execution.
func TestKeepErrorsSeesStructuredFailure(t *testing.T) {
@@ -20,9 +18,9 @@ func TestKeepErrorsSeesStructuredFailure(t *testing.T) {
}{
{"state failed", &provider.ToolExecution{State: tool.ShellStateFailed}, true},
{"timed out", &provider.ToolExecution{State: tool.ShellStateTimedOut}, true},
{"non-zero exit", &provider.ToolExecution{State: tool.ShellStateCompleted, ExitCode: exitCode(1)}, true},
{"non-zero exit", &provider.ToolExecution{State: tool.ShellStateCompleted, ExitCode: new(1)}, true},
{"verification failed", &provider.ToolExecution{Verification: tool.ShellVerificationFailed}, true},
{"clean run", &provider.ToolExecution{State: tool.ShellStateCompleted, ExitCode: exitCode(0)}, false},
{"clean run", &provider.ToolExecution{State: tool.ShellStateCompleted, ExitCode: new(0)}, false},
{"no execution record", nil, false},
} {
t.Run(tc.name, func(t *testing.T) {
@@ -61,7 +59,7 @@ func TestKeepErrorsTextFallbackUnchanged(t *testing.T) {
// Only tool results are keep-policy candidates; a failing execution record on
// another role must not promote it.
func TestKeepErrorsIgnoresNonToolRoles(t *testing.T) {
ex := &provider.ToolExecution{State: tool.ShellStateFailed, ExitCode: exitCode(2)}
ex := &provider.ToolExecution{State: tool.ShellStateFailed, ExitCode: new(2)}
for _, role := range []provider.Role{provider.RoleUser, provider.RoleAssistant, provider.RoleSystem} {
if isErrorMessage(provider.Message{Role: role, Content: "error: x", ToolExecution: ex}) {
t.Errorf("role %v classified as an error tool result", role)
+1 -1
View File
@@ -14,7 +14,7 @@ func liveContractAgent(t *testing.T, sink event.Sink) *Agent {
a := New(nil, tool.NewRegistry(), NewSession(""), Options{}, sink)
a.resetTurnEvidence()
a.turn.turnInput = "make the cache key model-aware"
a.SetPlanContract(ptr(contractPlan()))
a.SetPlanContract(new(contractPlan()))
return a
}
+1 -3
View File
@@ -78,7 +78,7 @@ func TestShadowContractPrefersPlanCriteriaOverTodoTitles(t *testing.T) {
{Content: "thread the model ref through", Status: "completed", StepID: "p1"},
}},
}
c := buildShadowContract("fix the cache key", receipts, ptr(contractPlan()))
c := buildShadowContract("fix the cache key", receipts, new(contractPlan()))
texts := make([]string, 0, len(c.Requirements))
for _, req := range c.Requirements {
@@ -159,5 +159,3 @@ func TestCoordinatorClearsThePlanContractEachTurn(t *testing.T) {
t.Fatal("an executor-only turn inherited the previous turn's plan")
}
}
func ptr[T any](v T) *T { return &v }
+2 -2
View File
@@ -27,8 +27,8 @@ func fieldNames(t *testing.T, v any) []string {
t.Fatalf("%T is not a struct", v)
}
names := make([]string, 0, rt.NumField())
for i := range rt.NumField() {
names = append(names, rt.Field(i).Name)
for field := range rt.Fields() {
names = append(names, field.Name)
}
slices.Sort(names)
return names
+6 -8
View File
@@ -15,14 +15,12 @@ import (
"reasonix/internal/tool"
)
func intPtr(v int) *int { return &v }
func TestHostReceiptsAttestChangesAndVerifications(t *testing.T) {
summary := evidence.ChildEvidenceSummary{Receipts: []evidence.Receipt{
{ToolName: "write_file", Success: true, Mutation: true, Paths: []string{"parser.go"}},
{ToolName: "write_file", Success: true, Mutation: true, Paths: []string{"parser_test.go"}},
{ToolName: "bash", Success: true, Command: "go test ./parser", ExitCode: intPtr(0), Verification: evidence.VerificationPassed},
{ToolName: "bash", Success: true, Command: "ls -la", ExitCode: intPtr(0), Verification: evidence.VerificationNotVerification},
{ToolName: "bash", Success: true, Command: "go test ./parser", ExitCode: new(0), Verification: evidence.VerificationPassed},
{ToolName: "bash", Success: true, Command: "ls -la", ExitCode: new(0), Verification: evidence.VerificationNotVerification},
}}
got := formatHostReceipts(summary, WritePathSet{})
@@ -53,8 +51,8 @@ func TestHostReceiptsStaySilentForReadOnlyChildren(t *testing.T) {
func TestHostReceiptsRecordFailedCommands(t *testing.T) {
summary := evidence.ChildEvidenceSummary{Receipts: []evidence.Receipt{
{ToolName: "bash", Success: true, Command: "go build ./...", ExitCode: intPtr(2)},
{ToolName: "bash", Success: true, Command: "go test ./parser", ExitCode: intPtr(1), Verification: evidence.VerificationFailed},
{ToolName: "bash", Success: true, Command: "go build ./...", ExitCode: new(2)},
{ToolName: "bash", Success: true, Command: "go test ./parser", ExitCode: new(1), Verification: evidence.VerificationFailed},
}}
got := formatHostReceipts(summary, WritePathSet{})
for _, want := range []string{"go build ./... (exit 2)", "go test ./parser (verification failed, exit 1)"} {
@@ -67,7 +65,7 @@ func TestHostReceiptsRecordFailedCommands(t *testing.T) {
func TestDecorateExecutionReceiptCarriesHostObservedOutcome(t *testing.T) {
rec := evidence.Receipt{ToolName: "bash", Success: true}
decorateExecutionReceipt(&rec, " out ", &tool.ShellExecution{
ExitCode: tool.IntPtr(3),
ExitCode: new(3),
Verification: tool.ShellVerificationFailed,
})
if rec.ExitCode == nil || *rec.ExitCode != 3 {
@@ -146,7 +144,7 @@ func TestAggregateReservesHostReceiptsAgainstLongProse(t *testing.T) {
answer := appendHostReceipts(strings.Repeat("chatter. ", 8000),
evidence.ChildEvidenceSummary{Receipts: []evidence.Receipt{
{ToolName: "write_file", Success: true, Mutation: true, Paths: []string{"payments.go"}},
{ToolName: "bash", Success: true, Command: "go test ./pay", ExitCode: intPtr(1), Verification: evidence.VerificationFailed},
{ToolName: "bash", Success: true, Command: "go test ./pay", ExitCode: new(1), Verification: evidence.VerificationFailed},
}}, WritePathSet{})
out := formatBoundedSubagentAggregate("fleet:\n", []subagentAggregateItem{
+1 -1
View File
@@ -36,7 +36,7 @@ func TestNewProviderAppliesExplicitKimiK3RequestContractToCustomGateway(t *testi
}
ch, err := p.Stream(context.Background(), provider.Request{
Messages: []provider.Message{{Role: provider.RoleUser, Content: "hi"}},
Temperature: provider.TemperaturePtr(0.3), MaxTokens: 2048,
Temperature: new(0.3), MaxTokens: 2048,
})
if err != nil {
t.Fatalf("Stream: %v", err)
+5 -7
View File
@@ -10,8 +10,6 @@ import (
"reasonix/internal/tool"
)
func boolPtr(b bool) *bool { return &b }
func TestLoadCachedToolsForSpecsHonorsSchemaCacheKey(t *testing.T) {
t.Setenv("REASONIX_CACHE_HOME", testenv.TempDir(t))
fresh := plugin.Spec{Name: "gh", Type: "stdio", Command: "gh-mcp"}
@@ -49,8 +47,8 @@ func TestBuildCatalogSurfacesCachedToolsForAutoStartFalse(t *testing.T) {
keyOK := map[string]bool{"gh": true, "old": false}
cat := BuildCatalog(CatalogOptions{
Plugins: []config.PluginEntry{
{Name: "gh", AutoStart: boolPtr(false)},
{Name: "old", AutoStart: boolPtr(false)},
{Name: "gh", AutoStart: new(false)},
{Name: "old", AutoStart: new(false)},
},
Profile: ProfileDelivery,
CachedTools: cached,
@@ -283,7 +281,7 @@ func TestCatalogKeepsProxyToolsAfterConnect(t *testing.T) {
"gh": {{Name: "search_issues", Description: "search", ReadOnly: true}},
}
cat := BuildCatalog(CatalogOptions{
Plugins: []config.PluginEntry{{Name: "gh", AutoStart: boolPtr(false)}},
Plugins: []config.PluginEntry{{Name: "gh", AutoStart: new(false)}},
Profile: ProfileDelivery,
Connected: map[string]bool{"gh": true}, // server is ready now
ProxyTools: proxy,
@@ -302,7 +300,7 @@ func TestCatalogKeepsProxyToolsAfterConnect(t *testing.T) {
// When the same server's tools are already on the registry, no duplicates.
cat = BuildCatalog(CatalogOptions{
Tools: []tool.ContractEntry{{Name: plugin.ModelToolName("gh", "search_issues")}},
Plugins: []config.PluginEntry{{Name: "gh", AutoStart: boolPtr(false)}},
Plugins: []config.PluginEntry{{Name: "gh", AutoStart: new(false)}},
Profile: ProfileDelivery,
Connected: map[string]bool{"gh": true},
ProxyTools: proxy,
@@ -322,7 +320,7 @@ func TestCatalogKeepsProxyToolsAfterConnect(t *testing.T) {
func TestCatalogDoesNotRouteProxyToolsAfterFailure(t *testing.T) {
cat := BuildCatalog(CatalogOptions{
Plugins: []config.PluginEntry{{Name: "gh", AutoStart: boolPtr(false)}},
Plugins: []config.PluginEntry{{Name: "gh", AutoStart: new(false)}},
Profile: ProfileDelivery,
Failed: map[string]string{"gh": "connection reset"},
Connected: map[string]bool{"gh": true},
+2 -2
View File
@@ -37,7 +37,7 @@ func (s *extensionStubCtrl) InvokeExtensionAction(_ context.Context, name string
return s.invokeMsg, s.invokeErr
}
func floatPtr(v float64) *float64 { return &v }
func floatPtr(v float64) *float64 { return new(v) }
func statusPayload(severity string) *event.ExtensionSurfacePayload {
return &event.ExtensionSurfacePayload{
@@ -68,7 +68,7 @@ func TestExtensionStatusLineSeverity(t *testing.T) {
}
// Progress appends a percentage.
p := statusPayload("info")
p.Status.Progress = floatPtr(0.5)
p.Status.Progress = new(0.5)
if line := ansi.Strip(extensionStatusLine(p)); !strings.Contains(line, "(50%)") {
t.Fatalf("progress line = %q, want (50%%)", line)
}
+1 -3
View File
@@ -147,7 +147,7 @@ func (m chatTUI) applyMCPMode(tier string) (tea.Model, tea.Cmd) {
if entry.Name == v.Name {
entry.Tier = normalizeMCPTierForCLI(tier)
if !entry.ShouldAutoStart() {
entry.AutoStart = mcpBoolPtr(true)
entry.AutoStart = new(true)
}
selected = entry
found = true
@@ -501,5 +501,3 @@ func expandLeadingTilde(p string) string {
}
return home + p[1:]
}
func mcpBoolPtr(v bool) *bool { return &v }
+2 -2
View File
@@ -25,7 +25,7 @@ func deepSeekDefaultProviders() []ProviderEntry {
Name: "deepseek-flash", Kind: "anthropic", BaseURL: deepSeekAnthropicBaseURL,
Model: "deepseek-v4-flash", APIKeyEnv: "DEEPSEEK_API_KEY",
BalanceURL: "https://api.deepseek.com/user/balance", Thinking: "enabled",
WebSearch: boolPointer(true), SupportedEfforts: []string{"disabled", "low", "high", "max"}, DefaultEffort: "low",
WebSearch: new(true), SupportedEfforts: []string{"disabled", "low", "high", "max"}, DefaultEffort: "low",
ContextWindow: 1_000_000, Price: deepSeekV4FlashPriceUSD(),
BillingCurrency: "USD", BillingMode: "payg",
},
@@ -33,7 +33,7 @@ func deepSeekDefaultProviders() []ProviderEntry {
Name: "deepseek-pro", Kind: "anthropic", BaseURL: deepSeekAnthropicBaseURL,
Model: "deepseek-v4-pro", APIKeyEnv: "DEEPSEEK_API_KEY",
BalanceURL: "https://api.deepseek.com/user/balance", Thinking: "enabled",
WebSearch: boolPointer(true), SupportedEfforts: []string{"disabled", "high", "max"}, DefaultEffort: "high",
WebSearch: new(true), SupportedEfforts: []string{"disabled", "high", "max"}, DefaultEffort: "high",
ContextWindow: 1_000_000, Price: deepSeekV4ProPriceUSD(),
BillingCurrency: "USD", BillingMode: "payg",
},
+1 -1
View File
@@ -1974,7 +1974,7 @@ func ensureDeepSeekOfficialProvider(c *Config) {
APIKeyEnv: "DEEPSEEK_API_KEY",
BalanceURL: "https://api.deepseek.com/user/balance",
Thinking: "enabled",
WebSearch: boolPointer(true),
WebSearch: new(true),
ContextWindow: 1_000_000,
Prices: deepSeekV4PricesForConfig(c),
ModelOverrides: map[string]ProviderModelOverride{
+2 -6
View File
@@ -202,7 +202,7 @@ var curatedProviderPresets = []ProviderPreset{
APIKeyEnv: "DEEPSEEK_API_KEY",
BalanceURL: "https://api.deepseek.com/user/balance",
Thinking: "enabled",
WebSearch: boolPointer(true),
WebSearch: new(true),
ContextWindow: 1_000_000,
Prices: deepSeekV4PricesUSD(),
ModelOverrides: map[string]ProviderModelOverride{
@@ -558,7 +558,7 @@ var curatedProviderPresets = []ProviderPreset{
ContextWindow: 1_000_000,
Price: deepSeekV4FlashPriceUSD(),
ResponsesMode: "stateless",
WebSearch: boolPointer(true),
WebSearch: new(true),
SupportedEfforts: []string{"low", "high", "max"},
DefaultEffort: "high",
}},
@@ -968,10 +968,6 @@ var curatedProviderPresets = []ProviderPreset{
},
}
func boolPointer(value bool) *bool {
return &value
}
func cloneProviderPreset(p ProviderPreset) ProviderPreset {
p.Entries = cloneProviderEntries(p.Entries)
for i := range p.Entries {
@@ -31,7 +31,7 @@ var opencodeGoDeepSeekAnthropicPreset = ProviderPreset{
Default: "deepseek-v4-flash",
APIKeyEnv: "OPENCODE_GO_API_KEY",
Thinking: "adaptive",
WebSearch: boolPointer(true),
WebSearch: new(true),
ContextWindow: 262144,
SupportedEfforts: []string{"disabled", "high", "max"},
DefaultEffort: "high",
@@ -51,7 +51,7 @@ var opencodeGoDeepSeekResponsesPreset = ProviderPreset{
Default: "deepseek-v4-flash",
APIKeyEnv: "OPENCODE_GO_API_KEY",
ResponsesMode: "stateless",
WebSearch: boolPointer(true),
WebSearch: new(true),
ContextWindow: 128000,
SupportedEfforts: []string{"disabled", "high", "max"},
DefaultEffort: "high",
+10 -14
View File
@@ -208,9 +208,9 @@ func TestRenderTOMLRoundTrips(t *testing.T) {
orig.Desktop.StatusBarStyle = "text"
orig.Desktop.StatusBarItems = []string{"model", "balance", "cache"}
orig.Desktop.DefaultToolApprovalMode = "auto"
orig.Desktop.CheckUpdates = boolPtr(false)
orig.Desktop.CheckUpdates = new(false)
orig.Desktop.UpdateChannel = "preview"
orig.Desktop.Telemetry = boolPtr(false)
orig.Desktop.Telemetry = new(false)
orig.Notifications.Enabled = true
orig.Notifications.TurnDone = true
orig.Notifications.ApprovalRequest = true
@@ -224,8 +224,8 @@ func TestRenderTOMLRoundTrips(t *testing.T) {
orig.Agent.MaxSubagentDepth = 3
orig.Agent.Keep = []string{"errors", "user_marked"}
orig.Agent.RecentKeep = 4
orig.Tools.BashTimeoutSeconds = intPtr(900)
orig.Tools.BackgroundJobs.StalledWarningSeconds = intPtr(30)
orig.Tools.BashTimeoutSeconds = new(900)
orig.Tools.BackgroundJobs.StalledWarningSeconds = new(30)
orig.Tools.Shell.Prefer = "bash"
orig.Tools.Shell.Path = "/usr/local/bin/bash"
orig.Permissions = PermissionsConfig{
@@ -245,7 +245,7 @@ func TestRenderTOMLRoundTrips(t *testing.T) {
Password: "${REASONIX_PROXY_PASSWORD}",
},
}
orig.Environment.Enabled = boolPtr(false)
orig.Environment.Enabled = new(false)
orig.Environment.Tools = map[string]string{"go": "/opt/homebrew/bin/go", "python3": "~/.pyenv/shims/python3"}
orig.Skills.Paths = []string{"~/my-skills", "../shared/skills"}
orig.Skills.ExcludedPaths = []string{"~/.agents/skills"}
@@ -304,7 +304,7 @@ func TestRenderTOMLRoundTrips(t *testing.T) {
}
orig.Plugins = []PluginEntry{
{Name: "example", Command: "reasonix-plugin-example"},
{Name: "stripe", Type: "http", URL: "https://mcp.stripe.com", Headers: map[string]string{"Authorization": "Bearer x"}, AutoStart: boolPtr(false), Tier: "background"},
{Name: "stripe", Type: "http", URL: "https://mcp.stripe.com", Headers: map[string]string{"Authorization": "Bearer x"}, AutoStart: new(false), Tier: "background"},
}
mm, _ := orig.Provider("mimo-pro")
mm.BaseURL = "http://localhost:8000/v1"
@@ -596,8 +596,8 @@ approval_mode = "prompt"
func TestRenderTOMLPreservesMCPTimeouts(t *testing.T) {
cfg := Default()
cfg.Tools.MCPCallTimeoutSeconds = intPtr(450)
cfg.Tools.MCPStartupTimeoutSeconds = intPtr(45)
cfg.Tools.MCPCallTimeoutSeconds = new(450)
cfg.Tools.MCPStartupTimeoutSeconds = new(45)
cfg.Plugins = []PluginEntry{{
Name: "maker",
Command: "maker-mcp",
@@ -786,7 +786,7 @@ func TestScopedRenderSeparatesUserAndProjectConfig(t *testing.T) {
c.Desktop.CloseBehavior = "background"
c.Desktop.StatusBarStyle = "text"
c.Desktop.DefaultToolApprovalMode = "auto"
c.Desktop.CheckUpdates = boolPtr(false)
c.Desktop.CheckUpdates = new(false)
c.Desktop.UpdateChannel = "preview"
c.Agent.RecoveryModel = "deepseek-pro"
c.Agent.RecoveryTemperature = 0.2
@@ -1103,7 +1103,7 @@ func TestRenderTOMLRoundTripsProviderHeadersAndModelOverrides(t *testing.T) {
ReasoningProtocol: ReasoningProtocolDeepSeek,
SupportedEfforts: []string{"high", "max"},
DefaultEffort: "high",
Vision: boolPtr(false),
Vision: new(false),
ContextWindow: 262_144,
MaxOutputTokens: 32_768,
},
@@ -1220,10 +1220,6 @@ func TestRenderTOMLTablePathQuotesEachSegment(t *testing.T) {
}
}
func boolPtr(v bool) *bool { return &v }
func intPtr(v int) *int { return &v }
func TestRenderTOMLPreservesDesktopDisplayMode(t *testing.T) {
c := Default()
if err := c.SetDesktopDisplayMode("compact"); err != nil {
+9 -9
View File
@@ -18,7 +18,7 @@ func TestBashTimeoutSecondsDefaultsToSafetyCap(t *testing.T) {
func TestBashTimeoutSecondsAllowsExplicitZero(t *testing.T) {
cfg := Default()
cfg.Tools.BashTimeoutSeconds = intPtr(0)
cfg.Tools.BashTimeoutSeconds = new(0)
if got := cfg.BashTimeoutSeconds(); got != 0 {
t.Fatalf("BashTimeoutSeconds() = %d, want 0", got)
}
@@ -39,7 +39,7 @@ func TestBashTimeoutSecondsParsesExplicitZero(t *testing.T) {
func TestBashTimeoutSecondsFallsBackForNegative(t *testing.T) {
cfg := Default()
cfg.Tools.BashTimeoutSeconds = intPtr(-1)
cfg.Tools.BashTimeoutSeconds = new(-1)
if got := cfg.BashTimeoutSeconds(); got != 120 {
t.Fatalf("BashTimeoutSeconds() = %d, want 120", got)
}
@@ -70,11 +70,11 @@ func TestMCPCallTimeoutSecondsExplicitPositive(t *testing.T) {
func TestMCPCallTimeoutSecondsFallsBackForZeroOrNegative(t *testing.T) {
cfg := Default()
cfg.Tools.MCPCallTimeoutSeconds = intPtr(0)
cfg.Tools.MCPCallTimeoutSeconds = new(0)
if got := cfg.MCPCallTimeoutSeconds(); got != 300 {
t.Fatalf("zero MCPCallTimeoutSeconds() = %d, want 300", got)
}
cfg.Tools.MCPCallTimeoutSeconds = intPtr(-1)
cfg.Tools.MCPCallTimeoutSeconds = new(-1)
if got := cfg.MCPCallTimeoutSeconds(); got != 300 {
t.Fatalf("negative MCPCallTimeoutSeconds() = %d, want 300", got)
}
@@ -102,11 +102,11 @@ func TestMCPStartupTimeoutSecondsExplicitPositive(t *testing.T) {
func TestMCPStartupTimeoutSecondsFallsBackForZeroOrNegative(t *testing.T) {
cfg := Default()
cfg.Tools.MCPStartupTimeoutSeconds = intPtr(0)
cfg.Tools.MCPStartupTimeoutSeconds = new(0)
if got := cfg.MCPStartupTimeoutSeconds(); got != 30 {
t.Fatalf("zero MCPStartupTimeoutSeconds() = %d, want 30", got)
}
cfg.Tools.MCPStartupTimeoutSeconds = intPtr(-1)
cfg.Tools.MCPStartupTimeoutSeconds = new(-1)
if got := cfg.MCPStartupTimeoutSeconds(); got != 30 {
t.Fatalf("negative MCPStartupTimeoutSeconds() = %d, want 30", got)
}
@@ -124,7 +124,7 @@ func TestBackgroundJobStalledWarningSecondsDefault(t *testing.T) {
func TestBackgroundJobStalledWarningSecondsAllowsExplicitZero(t *testing.T) {
cfg := Default()
cfg.Tools.BackgroundJobs.StalledWarningSeconds = intPtr(0)
cfg.Tools.BackgroundJobs.StalledWarningSeconds = new(0)
if got := cfg.BackgroundJobStalledWarningSeconds(); got != 0 {
t.Fatalf("BackgroundJobStalledWarningSeconds() = %d, want 0", got)
}
@@ -145,11 +145,11 @@ func TestBackgroundJobStalledWarningSecondsParsesExplicitZero(t *testing.T) {
func TestBackgroundJobStalledWarningSecondsBounds(t *testing.T) {
cfg := Default()
cfg.Tools.BackgroundJobs.StalledWarningSeconds = intPtr(-1)
cfg.Tools.BackgroundJobs.StalledWarningSeconds = new(-1)
if got := cfg.BackgroundJobStalledWarningSeconds(); got != 900 {
t.Fatalf("negative BackgroundJobStalledWarningSeconds() = %d, want 900", got)
}
cfg.Tools.BackgroundJobs.StalledWarningSeconds = intPtr(90000)
cfg.Tools.BackgroundJobs.StalledWarningSeconds = new(90000)
if got := cfg.BackgroundJobStalledWarningSeconds(); got != 86400 {
t.Fatalf("oversized BackgroundJobStalledWarningSeconds() = %d, want 86400", got)
}
+5 -4
View File
@@ -84,7 +84,7 @@ var methodFixtures = map[Method]struct {
Name: "bash",
}},
Tools: []ProviderToolSchema{{Name: "bash", Description: "run", Parameters: json.RawMessage(`{"type":"object"}`)}},
Temperature: floatPtr(0.5),
Temperature: new(0.5),
MaxTokens: 1024,
},
},
@@ -151,8 +151,9 @@ var methodFixtures = map[Method]struct {
},
}
func floatPtr(v float64) *float64 { return &v }
func int64Ptr(v int64) *int64 { return &v }
func floatPtr(v float64) *float64 { return new(v) }
func int64Ptr(v int64) *int64 { return new(v) }
func TestMethodDTORoundTripsAreLossless(t *testing.T) {
for _, spec := range Registry() {
@@ -215,7 +216,7 @@ func roundTripThroughDecoder(t *testing.T, spec MethodSpec, value any, params bo
// are not method DTOs but ride inside UIPublishParams/UIRequestParams.
func TestPayloadDTORoundTrips(t *testing.T) {
payloads := []any{
UIStatusPayload{Label: "l", Detail: "d", Severity: UISeverityWarn, Progress: floatPtr(0.5)},
UIStatusPayload{Label: "l", Detail: "d", Severity: UISeverityWarn, Progress: new(0.5)},
UICardPayload{
Title: "t", Markdown: "**m**", Text: "x",
Fields: []UIKeyValue{{Key: "k", Value: "v"}},
+1 -2
View File
@@ -162,8 +162,7 @@ func buildJSONSchema(defs map[string]any, typ reflect.Type) (any, error) {
func buildObjectSchema(defs map[string]any, typ reflect.Type) (map[string]any, error) {
properties := map[string]any{}
var required []string
for i := range typ.NumField() {
field := typ.Field(i)
for field := range typ.Fields() {
if field.PkgPath != "" {
continue
}
+2 -4
View File
@@ -136,8 +136,7 @@ func validateRequiredJSON(raw json.RawMessage, typ reflect.Type, at string) erro
}
func validateRequiredObject(object map[string]json.RawMessage, typ reflect.Type, at string) error {
for i := range typ.NumField() {
field := typ.Field(i)
for field := range typ.Fields() {
if field.PkgPath != "" {
continue
}
@@ -391,8 +390,7 @@ func collectExternalizablePointers(typ reflect.Type, prefix string, out *[]strin
}
switch typ.Kind() {
case reflect.Struct:
for i := range typ.NumField() {
field := typ.Field(i)
for field := range typ.Fields() {
if field.PkgPath != "" {
continue
}
+2 -4
View File
@@ -113,8 +113,7 @@ func (w *sdkTypeWalk) visit(typ reflect.Type) error {
w.seen[typ] = true
w.order = append(w.order, typ)
w.kinds[typ] = "struct"
for i := range typ.NumField() {
field := typ.Field(i)
for field := range typ.Fields() {
if field.PkgPath != "" {
continue
}
@@ -302,8 +301,7 @@ func emitSDKStruct(out *strings.Builder, typ reflect.Type) error {
fmt.Fprintf(out, "// %s is a generated Extension Protocol v2 wire DTO.\n", typ.Name())
fields := 0
var body strings.Builder
for i := range typ.NumField() {
field := typ.Field(i)
for field := range typ.Fields() {
if field.PkgPath != "" {
continue
}
@@ -807,7 +807,7 @@ func TestBuildRequestDeepSeekPreservesCallerTemperature(t *testing.T) {
t.Fatalf("DeepSeek request omitted explicit temperature: %s", b)
}
native := (&client{model: "claude-opus-4-8"}).buildRequest(context.Background(), provider.Request{Temperature: provider.TemperaturePtr(0.5)})
native := (&client{model: "claude-opus-4-8"}).buildRequest(context.Background(), provider.Request{Temperature: new(0.5)})
if native.Temperature != nil {
t.Fatalf("native Anthropic temperature = %v, want omitted", native.Temperature)
}
+1 -1
View File
@@ -18,7 +18,7 @@ func TestExplicitKimiK3GatewayRequestContract(t *testing.T) {
t.Fatal("explicit Kimi K3 protocol must retain reasoning for complete assistant-message replay")
}
req := p.(*client).buildRequest(provider.Request{
Temperature: provider.TemperaturePtr(0.2), MaxTokens: 4096,
Temperature: new(0.2), MaxTokens: 4096,
Messages: []provider.Message{
{Role: provider.RoleUser, Content: "question"},
{Role: provider.RoleAssistant, Content: "answer", ReasoningContent: "gateway reasoning"},
+1 -1
View File
@@ -1138,7 +1138,7 @@ func TestBuildRequestTemperatureSerialization(t *testing.T) {
t.Fatalf("explicit zero temperature must be serialized: %s", b)
}
nonzero := c.buildRequest(provider.Request{Temperature: provider.TemperaturePtr(0.25)})
nonzero := c.buildRequest(provider.Request{Temperature: new(0.25)})
if nonzero.Temperature == nil || *nonzero.Temperature != 0.25 {
t.Fatalf("nonzero request temperature = %v, want ptr(0.25)", nonzero.Temperature)
}
+1 -1
View File
@@ -261,7 +261,7 @@ func AutoOutputBudget(reasoningEnabled bool, effort string) int {
// TemperaturePtr wraps v in a pointer so callers that explicitly want a
// specific temperature, including 0 for deterministic output, can distinguish
// that intent from "not set, use the provider default".
func TemperaturePtr(v float64) *float64 { return &v }
func TemperaturePtr(v float64) *float64 { return new(v) }
// OptionalTemperature returns nil when v is zero, matching the historical
// config behavior where 0 meant "not configured", and a pointer otherwise.
@@ -17,8 +17,6 @@ import (
"reasonix/internal/provider"
)
func boolPtr(value bool) *bool { return &value }
func collect(t *testing.T, p provider.Provider, req provider.Request) []provider.Chunk {
t.Helper()
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
@@ -67,10 +65,10 @@ func TestDetectVendorAndModeDefaults(t *testing.T) {
if got := (Config{BaseURL: "https://api.deepseek.com", Mode: "stateful"}).mode(); got != "stateful" {
t.Fatalf("explicit mode = %q", got)
}
if got := (Config{BaseURL: "https://api.deepseek.com", Mode: "stateful", Stateful: boolPtr(false)}).mode(); got != "stateful" {
if got := (Config{BaseURL: "https://api.deepseek.com", Mode: "stateful", Stateful: new(false)}).mode(); got != "stateful" {
t.Fatalf("mode must win over legacy stateful, got %q", got)
}
if got := (Config{BaseURL: "https://example.com", Stateful: boolPtr(false)}).mode(); got != "stateless" {
if got := (Config{BaseURL: "https://example.com", Stateful: new(false)}).mode(); got != "stateless" {
t.Fatalf("legacy stateful=false mode = %q", got)
}
}
@@ -564,7 +562,7 @@ func TestDashScopeCacheHeaderIsVendorScoped(t *testing.T) {
writeEvents(w, `{"type":"response.completed","response":{"id":"resp","usage":{"input_tokens":1,"output_tokens":1,"total_tokens":2}}}`)
}))
defer server.Close()
p := New(Config{Name: "test", APIKey: "key", BaseURL: server.URL, Model: "m", Mode: "stateless", SessionCache: boolPtr(true)}).(*client)
p := New(Config{Name: "test", APIKey: "key", BaseURL: server.URL, Model: "m", Mode: "stateless", SessionCache: new(true)}).(*client)
p.vendor = "deepseek"
p.caps = capabilitiesFor("deepseek")
collect(t, p, provider.Request{Messages: []provider.Message{{Role: provider.RoleUser, Content: "hi"}}})
+1 -1
View File
@@ -313,7 +313,7 @@ func applyTerminalResult(ex *tool.ShellExecution, err error) {
}
if err == nil {
ex.State = tool.ShellStateCompleted
ex.ExitCode = tool.IntPtr(0)
ex.ExitCode = new(0)
ex.MutationRisk = tool.ShellMutationMayHaveCompleted
return
}
-3
View File
@@ -119,9 +119,6 @@ type DetailedExecutor interface {
ExecuteDetailed(ctx context.Context, args json.RawMessage) (DetailedResult, error)
}
// IntPtr returns a pointer to v for ShellExecution.ExitCode.
func IntPtr(v int) *int { return &v }
// NoMatches is what a search built-in prints when it found nothing. It is one
// constant because two sides need it: the tool writes it for the model, and the
// host reads it to tell a search that came back empty from one that broke.