@tdd_issue @tdd_issue_2588
Feature: TDD Issue #2588 — agents resource stop rejects container-instance resources
  As a CleverAgents user
  I want to stop container-instance resources via agents resource stop
  So that both container-instance and devcontainer-instance resources
  can be stopped as required by the specification

  The specification states:
    "Stop an active devcontainer-instance or container-instance resource.
     Transitions the container through running -> stopping -> stopped.
     Only container-typed resources may be stopped."

  Scenario: container-instance is accepted by resource stop
    Given a running container-instance resource "local/my-ctr" with id "01TDD2588CONTAINERINST001"
    When I invoke resource stop for "local/my-ctr" with --yes
    Then the stop exit code should be 0
    And the stop output should contain "Stopped"

  Scenario: devcontainer-instance is still accepted by resource stop
    Given a running devcontainer-instance resource "local/my-dc" with id "01TDD2588DEVCONTAINERINST1"
    When I invoke resource stop for "local/my-dc" with --yes
    Then the stop exit code should be 0
    And the stop output should contain "Stopped"

  Scenario: non-container resource type is still rejected by resource stop
    Given a git-checkout resource "local/my-repo" with id "01TDD2588GITCHECKOUT00001"
    When I invoke resource stop for "local/my-repo" with --yes
    Then the stop exit code should be non-zero
    And the stop output should contain "not a stoppable container type"

  Scenario: _STOPPABLE_TYPES contains both container types
    When I inspect the _STOPPABLE_TYPES constant
    Then _STOPPABLE_TYPES should contain "container-instance"
    And _STOPPABLE_TYPES should contain "devcontainer-instance"
    And _STOPPABLE_TYPES should not contain "git-checkout"
