Parse invocation flags across command discovery

This commit is contained in:
2026-11-22 20:53:25 +00:00
parent ea3ce25001
commit b6cb183a71
10 changed files with 136 additions and 30 deletions

View File

@@ -71,7 +71,7 @@ func (a *App) routeSnapshot() *routingSnapshot {
}
func (a *App) buildRoutingSnapshot() *routingSnapshot {
root := &commandmeta.Command{Name: a.identity.Name, CoreFlags: commandmeta.ReportingFlags()}
root := &commandmeta.Command{Name: a.identity.Name, CoreFlags: commandmeta.ReportingFlags(), InvocationFlags: a.featureFlags}
snapshot := &routingSnapshot{
metadata: root,
runners: make(map[commandmeta.Key]commandPayload),
@@ -113,11 +113,12 @@ func bridgeCommand(node *canonicalNode, snapshot *routingSnapshot, next *command
record := node.command.record
*next = *next + 1
declaration := &commandmeta.Command{
Key: *next,
Name: record.name,
Summary: record.summary,
Description: record.description,
CoreFlags: commandmeta.ReportingFlags(),
Key: *next,
Name: record.name,
Summary: record.summary,
Description: record.description,
CoreFlags: commandmeta.ReportingFlags(),
InvocationFlags: snapshot.featureFlags,
}
node.metadata = declaration
if record.payload != nil {