Route executions through neutral snapshots

This commit is contained in:
2026-10-11 01:25:45 +00:00
parent 24e8cd8629
commit 7e5f84bf16
12 changed files with 217 additions and 191 deletions

13
app.go
View File

@@ -3,14 +3,19 @@ package commandkit
import (
"fmt"
internalcobra "gitea.maximumdirect.net/eric/CommandKit/internal/cobra"
commandmeta "gitea.maximumdirect.net/eric/CommandKit/internal/commandmeta"
)
// App owns one command registry and its application identity.
type App struct {
identity Identity
commands map[string]*commandNode
commandTree *internalcobra.Command
identity Identity
commands map[string]*commandNode
snapshot *routingSnapshot
}
type routingSnapshot struct {
metadata *commandmeta.Command
runners map[commandmeta.Key]commandPayload
}
type commandNode struct {