Skip to content

Commit 5235c10

Browse files
committed
chore(deps): bump deps
1 parent b6980ff commit 5235c10

6 files changed

Lines changed: 82 additions & 30 deletions

File tree

cmd/ipsw/cmd/symbols.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,9 @@ func init() {
5656

5757
// symbolsCmd represents the symbols command
5858
var symbolsCmd = &cobra.Command{
59-
Use: "symbols <IPSW>",
60-
Short: "Emit IPSW symbols as JSONL",
59+
Use: "symbols <IPSW>",
60+
Aliases: []string{"syms"},
61+
Short: "Emit IPSW symbols as JSONL",
6162
Long: `Emit every symbol in an IPSW as newline-delimited JSON (JSONL).
6263
6364
The stream is emitted in this order: one "ipsw" line, then for each image an
@@ -70,6 +71,7 @@ database stores them, so a server backed by this output returns byte-identical
7071
results to the daemon.`,
7172
Args: cobra.ExactArgs(1),
7273
SilenceErrors: true,
74+
Hidden: true,
7375
RunE: func(cmd *cobra.Command, args []string) error {
7476
if Verbose {
7577
log.SetLevel(log.DebugLevel)

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ require (
3333
github.com/charmbracelet/bubbles v1.0.0
3434
github.com/charmbracelet/bubbletea v1.3.10
3535
github.com/charmbracelet/lipgloss v1.1.0
36-
github.com/coder/acp-go-sdk v0.13.0
36+
github.com/coder/acp-go-sdk v0.13.5
3737
github.com/disintegration/imaging v1.6.2
3838
github.com/docker/docker v28.5.2+incompatible
3939
github.com/dominikbraun/graph v0.23.0
@@ -60,7 +60,7 @@ require (
6060
github.com/mattn/go-isatty v0.0.22
6161
github.com/mattn/go-mastodon v0.0.11
6262
github.com/mitchellh/mapstructure v1.5.0
63-
github.com/ollama/ollama v0.24.0
63+
github.com/ollama/ollama v0.30.0
6464
github.com/openai/openai-go v1.12.0
6565
github.com/opencontainers/image-spec v1.1.1
6666
github.com/pkg/errors v0.9.1

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,8 @@ github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWH
240240
github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
241241
github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
242242
github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
243-
github.com/coder/acp-go-sdk v0.13.0 h1:IAKBDIbe/iBfKAGikeIndzb8fowt4ioD+gCtSU4HwMA=
244-
github.com/coder/acp-go-sdk v0.13.0/go.mod h1:yKzM/3R9uELp4+nBAwwtkS0aN1FOFjo11CNPy37yFko=
243+
github.com/coder/acp-go-sdk v0.13.5 h1:LI9jq5xon7xslaYlnoktvTVyDlE37yIk2daT7N9ASYk=
244+
github.com/coder/acp-go-sdk v0.13.5/go.mod h1:yKzM/3R9uELp4+nBAwwtkS0aN1FOFjo11CNPy37yFko=
245245
github.com/containerd/errdefs v1.0.0 h1:tg5yIfIlQIrxYtu9ajqY42W3lpS19XqdxRQeEwYG8PI=
246246
github.com/containerd/errdefs v1.0.0/go.mod h1:+YBYIdtsnF4Iw6nWZhJcqGSg/dwvV7tyJ/kCkyJ2k+M=
247247
github.com/containerd/errdefs/pkg v0.3.0 h1:9IKJ06FvyNlexW690DXuQNx2KA2cUJXx151Xdx3ZPPE=
@@ -680,8 +680,8 @@ github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S
680680
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
681681
github.com/nlnwa/whatwg-url v0.6.2 h1:jU61lU2ig4LANydbEJmA2nPrtCGiKdtgT0rmMd2VZ/Q=
682682
github.com/nlnwa/whatwg-url v0.6.2/go.mod h1:x0FPXJzzOEieQtsBT/AKvbiBbQ46YlL6Xa7m02M1ECk=
683-
github.com/ollama/ollama v0.24.0 h1:CBZ0ffE+cxMWRWau5yD5vXHkiZHAeuxLk+3j55u0XxQ=
684-
github.com/ollama/ollama v0.24.0/go.mod h1:lX6J1oDiqbQLNMg9qJbLyEbFwqgM4uD3VDFn6YYy2v4=
683+
github.com/ollama/ollama v0.30.0 h1:sUw0oK1SOgKwSg5UwXiMfwa6V8Eg8yWOGuiRxTqy3MM=
684+
github.com/ollama/ollama v0.30.0/go.mod h1:TjwyryJftKpcf7ByoIuZWso/Wx2Jr2AcGubxadv13dY=
685685
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
686686
github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
687687
github.com/onsi/gomega v1.34.1 h1:EUMJIKUjM8sKjYbtxQI9A4z2o+rruxnzNvpknOXie6k=

internal/ai/acp/acp.go

Lines changed: 53 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ func (c *ACP) Models() (map[string]string, error) {
6262
return c.models, nil
6363
}
6464

65-
// Attempt to query supported models via ACP. The protocol exposes this via the
66-
// (unstable) SessionModelState returned from `session/new`.
65+
// Attempt to query supported models via ACP. The protocol exposes these as a
66+
// "model"-category session config option returned from `session/new`.
6767
models, err := c.fetchModelsViaACP()
6868
if err == nil && len(models) > 0 {
6969
c.models = models
@@ -128,15 +128,16 @@ func (c *ACP) fetchModelsViaACP() (map[string]string, error) {
128128
}
129129

130130
models := make(map[string]string)
131-
if sess.Models == nil {
131+
sel := modelConfigOption(sess.ConfigOptions)
132+
if sel == nil {
132133
return models, nil
133134
}
134-
for _, mi := range sess.Models.AvailableModels {
135-
id := strings.TrimSpace(string(mi.ModelId))
135+
for _, opt := range selectOptionValues(sel) {
136+
id := strings.TrimSpace(string(opt.Value))
136137
if id == "" {
137138
continue
138139
}
139-
key := strings.TrimSpace(mi.Name)
140+
key := strings.TrimSpace(opt.Name)
140141
if key == "" {
141142
key = id
142143
}
@@ -149,6 +150,38 @@ func (c *ACP) fetchModelsViaACP() (map[string]string, error) {
149150
return models, nil
150151
}
151152

153+
// modelConfigOption returns the model-selection config option the agent
154+
// advertised in its session configuration, or nil if none is exposed. The ACP
155+
// protocol surfaces model choices as a "select" session config option tagged
156+
// with the "model" category.
157+
func modelConfigOption(opts []acp.SessionConfigOption) *acp.SessionConfigOptionSelect {
158+
for i := range opts {
159+
sel := opts[i].Select
160+
if sel == nil || sel.Category == nil {
161+
continue
162+
}
163+
if *sel.Category == acp.SessionConfigOptionCategoryModel {
164+
return sel
165+
}
166+
}
167+
return nil
168+
}
169+
170+
// selectOptionValues flattens a select config option's grouped and ungrouped
171+
// values into a single slice.
172+
func selectOptionValues(sel *acp.SessionConfigOptionSelect) []acp.SessionConfigSelectOption {
173+
var out []acp.SessionConfigSelectOption
174+
if sel.Options.Ungrouped != nil {
175+
out = append(out, (*sel.Options.Ungrouped)...)
176+
}
177+
if sel.Options.Grouped != nil {
178+
for _, group := range *sel.Options.Grouped {
179+
out = append(out, group.Options...)
180+
}
181+
}
182+
return out
183+
}
184+
152185
func (c *ACP) SetModel(model string) error {
153186
model = strings.TrimSpace(model)
154187
if model == "" {
@@ -503,15 +536,21 @@ func (c *ACP) Chat() (string, error) {
503536
return "", stderrCapture.wrap(fmt.Errorf("acp: newSession failed: %w", err))
504537
}
505538

506-
// Best-effort: attempt to set model if the agent supports it (UNSTABLE ACP API).
539+
// Best-effort: attempt to set the model if the agent advertises a model
540+
// configuration option (ACP session config option, category "model").
507541
if m := strings.TrimSpace(c.conf.Model); m != "" && m != "default" {
508-
setModelReq := acp.UnstableSetSessionModelRequest{
509-
SessionId: sess.SessionId,
510-
ModelId: acp.UnstableModelId(m),
511-
}
512-
if _, setErr := clientConn.conn.UnstableSetSessionModel(ctx, setModelReq); setErr != nil {
513-
if c.conf.Verbose {
514-
log.Debugf("acp: UnstableSetSessionModel failed (ignored): %v", setErr)
542+
if sel := modelConfigOption(sess.ConfigOptions); sel != nil {
543+
setModelReq := acp.SetSessionConfigOptionRequest{
544+
ValueId: &acp.SetSessionConfigOptionValueId{
545+
ConfigId: sel.Id,
546+
SessionId: sess.SessionId,
547+
Value: acp.SessionConfigValueId(m),
548+
},
549+
}
550+
if _, setErr := clientConn.conn.SetSessionConfigOption(ctx, setModelReq); setErr != nil {
551+
if c.conf.Verbose {
552+
log.Debugf("acp: SetSessionConfigOption(model) failed (ignored): %v", setErr)
553+
}
515554
}
516555
}
517556
}

internal/ai/acp/acp_test.go

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,10 @@ func (a *testACPAgent) Authenticate(ctx context.Context, _ acpsdk.AuthenticateRe
292292
return acpsdk.AuthenticateResponse{}, nil
293293
}
294294

295+
func (a *testACPAgent) Logout(ctx context.Context, _ acpsdk.LogoutRequest) (acpsdk.LogoutResponse, error) {
296+
return acpsdk.LogoutResponse{}, nil
297+
}
298+
295299
func (a *testACPAgent) Initialize(ctx context.Context, _ acpsdk.InitializeRequest) (acpsdk.InitializeResponse, error) {
296300
return acpsdk.InitializeResponse{
297301
ProtocolVersion: acpsdk.ProtocolVersionNumber,
@@ -312,15 +316,22 @@ func (a *testACPAgent) ListSessions(ctx context.Context, _ acpsdk.ListSessionsRe
312316
}
313317

314318
func (a *testACPAgent) NewSession(ctx context.Context, _ acpsdk.NewSessionRequest) (acpsdk.NewSessionResponse, error) {
319+
modelCategory := acpsdk.SessionConfigOptionCategoryModel
320+
options := acpsdk.SessionConfigSelectOptionsUngrouped{{
321+
Name: "Test Model",
322+
Value: acpsdk.SessionConfigValueId("test-model"),
323+
}}
315324
return acpsdk.NewSessionResponse{
316325
SessionId: acpsdk.SessionId("test-session"),
317-
Models: &acpsdk.SessionModelState{
318-
CurrentModelId: acpsdk.ModelId("test-model"),
319-
AvailableModels: []acpsdk.ModelInfo{{
320-
Name: "Test Model",
321-
ModelId: acpsdk.ModelId("test-model"),
322-
}},
323-
},
326+
ConfigOptions: []acpsdk.SessionConfigOption{{
327+
Select: &acpsdk.SessionConfigOptionSelect{
328+
Category: &modelCategory,
329+
Id: acpsdk.SessionConfigId("model"),
330+
Name: "Model",
331+
CurrentValue: acpsdk.SessionConfigValueId("test-model"),
332+
Options: acpsdk.SessionConfigSelectOptions{Ungrouped: &options},
333+
},
334+
}},
324335
}, nil
325336
}
326337

www/docs/cli/ipsw/symbols.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ ipsw symbols <IPSW> [flags]
3333
--dyld Include dyld_shared_cache dylib symbols
3434
--filesystem Include file system Mach-O symbols
3535
-h, --help help for symbols
36-
--json Emit symbols as JSONL (one JSON object per line)
36+
--json Emit symbols as JSONL (one JSON object per line) (default true)
3737
--kernel Include kernelcache/KEXT symbols
3838
-o, --output string Output file path ("-" or unset for stdout)
3939
--pem-db string AEA pem DB JSON file

0 commit comments

Comments
 (0)