MCPcopy Create free account
hub / github.com/compozy/agh / newChannelListCommand

Function newChannelListCommand

internal/cli/agent_kernel.go:119–144  ·  view source on GitHub ↗
(deps commandDeps)

Source from the content-addressed store, hash-verified

117}
118
119func newChannelListCommand(deps commandDeps) *cobra.Command {
120 return &cobra.Command{
121 Use: agentKernelListKey,
122 Short: "List coordination channels visible to the current agent session",
123 Example: ` # List coordination channels visible to this session
124 agh ch list
125
126 # Print channel discovery metadata as JSON
127 agh ch list -o json`,
128 RunE: func(cmd *cobra.Command, _ []string) error {
129 client, err := clientFromDeps(deps)
130 if err != nil {
131 return err
132 }
133 credentials, err := requireAgentCommandIdentity(cmd.Context(), deps, client, agentActionCLI("ch.list"))
134 if err != nil {
135 return err
136 }
137 channels, err := client.AgentChannels(cmd.Context(), credentials)
138 if err != nil {
139 return err
140 }
141 return writeCommandOutput(cmd, agentChannelsBundle(channels))
142 },
143 }
144}
145
146func newChannelRecvCommand(deps commandDeps) *cobra.Command {
147 var wait bool

Callers 1

newChannelCommandFunction · 0.85

Calls 6

clientFromDepsFunction · 0.85
agentActionCLIFunction · 0.85
writeCommandOutputFunction · 0.85
agentChannelsBundleFunction · 0.85
AgentChannelsMethod · 0.65

Tested by

no test coverage detected