id = 'thinkrank/get-ai-budget'; $this->label = __( 'Get ThinkRank AI Budget', 'thinkrank' ); $this->description = __( 'Retrieve ThinkRank AI spend limits and today\'s usage: whether AI is paused, the daily request ceiling (0 means no ceiling), requests used today, requests remaining, the per-minute limit, and when the daily count resets. Use update-ai-budget to change the limits or pause AI.', 'thinkrank' ); } /** * {@inheritDoc} * * @return array */ public function get_annotations() { return [ 'readonly' => true, 'destructive' => false, 'idempotent' => true, 'priority' => 1.0, 'openWorldHint' => false, ]; } /** * {@inheritDoc} * * @return array */ public function get_input_schema() { return [ 'type' => 'object', 'additionalProperties' => false, 'properties' => self::empty_properties(), ]; } /** * {@inheritDoc} * * @return array */ public function get_output_schema() { return [ 'type' => 'object', 'properties' => [ 'paused' => [ 'type' => 'boolean' ], 'daily_limit' => [ 'type' => 'integer' ], 'used_today' => [ 'type' => 'integer' ], 'remaining_today' => [ 'type' => [ 'integer', 'null' ] ], 'per_minute_limit' => [ 'type' => 'integer' ], 'resets_at' => [ 'type' => 'string' ], 'blocked' => [ 'type' => 'boolean' ], 'blocked_reason' => [ 'type' => [ 'string', 'null' ], 'enum' => [ Spend_Guard::REASON_PAUSED, Spend_Guard::REASON_DAILY_LIMIT, null ], ], 'message' => [ 'type' => 'string' ], ], ]; } /** * Execute ability. * * @param array $input Ability input payload. * @return array */ public function execute( $input ) { return Spend_Guard::status(); } }