Skip to content

Commit e069617

Browse files
fix(parser): align zed shelley capabilities
Provider capabilities are used as a contract for what normalized content a provider can actually emit. Shelley currently records token totals from messages but does not emit aggregate usage events, and Zed filters child threads before relationship fields can surface. Keep the declarations conservative so the facade does not advertise unsupported content features while the providers continue to preserve the parser behavior they actually expose today.
1 parent 034548c commit e069617

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

internal/parser/shelley_provider.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,6 @@ func shelleyProviderCapabilities() Capabilities {
436436
ToolCalls: CapabilitySupported,
437437
ToolResults: CapabilitySupported,
438438
PerMessageTokenUsage: CapabilitySupported,
439-
AggregateUsageEvents: CapabilitySupported,
440439
Model: CapabilitySupported,
441440
},
442441
}

internal/parser/zed_provider.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,6 @@ func zedProviderCapabilities() Capabilities {
438438
FirstMessage: CapabilitySupported,
439439
SessionName: CapabilitySupported,
440440
Cwd: CapabilitySupported,
441-
Relationships: CapabilitySupported,
442441
Thinking: CapabilitySupported,
443442
ToolCalls: CapabilitySupported,
444443
ToolResults: CapabilitySupported,

internal/parser/zed_shelley_provider_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ func TestZedProviderFactoryReplacesLegacyAdapter(t *testing.T) {
1616
require.True(t, ok)
1717
_, legacyFactory := factory.(legacyProviderFactory)
1818
assert.False(t, legacyFactory)
19+
caps := factory.Capabilities()
20+
assert.Equal(t, CapabilityUnsupported, caps.Content.Relationships)
21+
assert.Equal(t, CapabilitySupported, caps.Content.AggregateUsageEvents)
1922

2023
provider, ok := NewProvider(AgentZed, ProviderConfig{
2124
Roots: []string{t.TempDir()},
@@ -213,6 +216,9 @@ func TestShelleyProviderFactoryReplacesLegacyAdapter(t *testing.T) {
213216
require.True(t, ok)
214217
_, legacyFactory := factory.(legacyProviderFactory)
215218
assert.False(t, legacyFactory)
219+
caps := factory.Capabilities()
220+
assert.Equal(t, CapabilitySupported, caps.Content.Relationships)
221+
assert.Equal(t, CapabilityUnsupported, caps.Content.AggregateUsageEvents)
216222

217223
provider, ok := NewProvider(AgentShelley, ProviderConfig{
218224
Roots: []string{t.TempDir()},

0 commit comments

Comments
 (0)