Publish Claude Code Binaries / Stage and publish binaries (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-arm64 (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build linux-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build windows-amd64 (push) Canceled after 0s
Sync Tutti Agent Skills / sync (push) Canceled after 0s
Windows Agent Adapters / Test Windows agent adapters (push) Canceled after 0s
Windows Daemon Adapters / Test Windows daemon adapters (push) Canceled after 0s
Publish Tutti App Runtime / Publish runtime catalog (push) Canceled after 0s
38 lines
1.3 KiB
Go
38 lines
1.3 KiB
Go
package conformance
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
|
|
agenthost "github.com/tutti-os/tutti/packages/agent/host"
|
|
storesqlite "github.com/tutti-os/tutti/packages/agent/store-sqlite"
|
|
)
|
|
|
|
func runInteractionTreeSnapshot(ctx context.Context, driver InteractionTreeDriver) error {
|
|
if err := driver.ResetInteractionTree(ctx); err != nil {
|
|
return err
|
|
}
|
|
snapshot, err := driver.GetSessionInteractionTreeSnapshot(
|
|
ctx,
|
|
agenthost.SessionRef{WorkspaceID: "workspace-tree", AgentSessionID: "session-root"},
|
|
agenthost.SessionInteractionTreeQuery{},
|
|
)
|
|
if err != nil {
|
|
return fmt.Errorf("GetSessionInteractionTreeSnapshot(): %w", err)
|
|
}
|
|
if snapshot.RootTurnID != "turn-root" {
|
|
return fmt.Errorf("root Turn=%q, want turn-root", snapshot.RootTurnID)
|
|
}
|
|
if len(snapshot.Interactions) != 2 ||
|
|
snapshot.Interactions[0].RequestID != "request-child-latest" ||
|
|
snapshot.Interactions[1].RequestID != "request-root" {
|
|
return fmt.Errorf("tree interactions=%#v, want child latest and root", snapshot.Interactions)
|
|
}
|
|
if len(snapshot.PendingInteractions) != 1 ||
|
|
snapshot.PendingInteractions[0].RequestID != "request-child-latest" ||
|
|
snapshot.PendingInteractions[0].Status != storesqlite.InteractionStatusPending {
|
|
return fmt.Errorf("pending tree interactions=%#v, want child latest", snapshot.PendingInteractions)
|
|
}
|
|
return nil
|
|
}
|