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

Function newMeContextCommand

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

Source from the content-addressed store, hash-verified

72}
73
74func newMeContextCommand(deps commandDeps) *cobra.Command {
75 return &cobra.Command{
76 Use: agentKernelContextKey,
77 Short: "Inspect the bounded situation context for the current agent session",
78 Example: ` # Show the bounded situation context injected for this session
79 agh me context
80
81 # Read the context payload as JSON
82 agh me context -o json`,
83 RunE: func(cmd *cobra.Command, _ []string) error {
84 client, err := clientFromDeps(deps)
85 if err != nil {
86 return err
87 }
88 credentials, err := requireAgentCommandIdentity(cmd.Context(), deps, client, agentActionCLI("me.context"))
89 if err != nil {
90 return err
91 }
92 record, err := client.AgentContext(cmd.Context(), credentials)
93 if err != nil {
94 return err
95 }
96 return writeCommandOutput(cmd, agentContextBundle(&record))
97 },
98 }
99}
100
101func newChannelCommand(deps commandDeps) *cobra.Command {
102 cmd := &cobra.Command{

Callers 1

newMeCommandFunction · 0.85

Calls 6

clientFromDepsFunction · 0.85
agentActionCLIFunction · 0.85
writeCommandOutputFunction · 0.85
agentContextBundleFunction · 0.85
AgentContextMethod · 0.65

Tested by

no test coverage detected