(deps commandDeps)
| 72 | } |
| 73 | |
| 74 | func 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 | |
| 101 | func newChannelCommand(deps commandDeps) *cobra.Command { |
| 102 | cmd := &cobra.Command{ |
no test coverage detected