feat(resources): design and implement resource type extension interface #9998

Open
opened 2026-04-16 11:31:50 +00:00 by HAL9000 · 2 comments
Owner

Background: The v3.6.0 resource type system (cloud, database, virtual) requires a well-defined extension interface so that third-party developers can add custom resource types without modifying core code. Without a stable extension interface, the concrete resource type implementations (#8607, #8608, #8610) risk diverging in API shape, making the system harder to maintain and extend.

Acceptance criteria:

  • ResourceType abstract base class / protocol is defined with all required lifecycle methods
  • Interface includes: provision(), deprovision(), status(), validate_config(), and to_dict() methods
  • Extension interface is documented with docstrings and a developer guide section
  • All existing resource type implementations (#8607, #8608, #8610) conform to the interface
  • Interface is importable from the top-level cleveragents.resources package
  • Unit tests verify interface contract via abstract method enforcement

Metadata

  • Commit Message: feat(resources): design and implement resource type extension interface
  • Branch: feat/resources-extension-interface

Subtasks

  • Define ResourceType protocol/ABC with lifecycle method signatures
  • Define ResourceConfig typed dict / dataclass for configuration schema
  • Define ResourceStatus enum (PENDING, ACTIVE, FAILED, DEPROVISIONED)
  • Add register_resource_type(name: str, cls: Type[ResourceType]) registry function
  • Update __init__.py to export interface symbols from cleveragents.resources
  • Write developer guide section documenting how to implement a custom resource type
  • Write unit tests verifying ABC enforcement and registry behavior

Definition of Done

  • All acceptance criteria met
  • Tests written and passing (coverage ≥ 97%)
  • Code reviewed and approved
  • Documentation updated
  • No regressions introduced

Parent Epic

Child of and blocks #8568 — Epic: Resource Types & Container Tool Execution (v3.6.0)


Automated by CleverAgents Bot
Supervisor: Epic Planning | Agent: epic-planning-pool-supervisor
Worker: [AUTO-EPIC-2]

**Background**: The v3.6.0 resource type system (cloud, database, virtual) requires a well-defined extension interface so that third-party developers can add custom resource types without modifying core code. Without a stable extension interface, the concrete resource type implementations (#8607, #8608, #8610) risk diverging in API shape, making the system harder to maintain and extend. **Acceptance criteria**: - [ ] `ResourceType` abstract base class / protocol is defined with all required lifecycle methods - [ ] Interface includes: `provision()`, `deprovision()`, `status()`, `validate_config()`, and `to_dict()` methods - [ ] Extension interface is documented with docstrings and a developer guide section - [ ] All existing resource type implementations (#8607, #8608, #8610) conform to the interface - [ ] Interface is importable from the top-level `cleveragents.resources` package - [ ] Unit tests verify interface contract via abstract method enforcement ## Metadata - **Commit Message**: `feat(resources): design and implement resource type extension interface` - **Branch**: `feat/resources-extension-interface` ## Subtasks - [ ] Define `ResourceType` protocol/ABC with lifecycle method signatures - [ ] Define `ResourceConfig` typed dict / dataclass for configuration schema - [ ] Define `ResourceStatus` enum (`PENDING`, `ACTIVE`, `FAILED`, `DEPROVISIONED`) - [ ] Add `register_resource_type(name: str, cls: Type[ResourceType])` registry function - [ ] Update `__init__.py` to export interface symbols from `cleveragents.resources` - [ ] Write developer guide section documenting how to implement a custom resource type - [ ] Write unit tests verifying ABC enforcement and registry behavior ## Definition of Done - [ ] All acceptance criteria met - [ ] Tests written and passing (coverage ≥ 97%) - [ ] Code reviewed and approved - [ ] Documentation updated - [ ] No regressions introduced ## Parent Epic Child of and blocks #8568 — Epic: Resource Types & Container Tool Execution (v3.6.0) --- **Automated by CleverAgents Bot** Supervisor: Epic Planning | Agent: epic-planning-pool-supervisor Worker: [AUTO-EPIC-2]
Author
Owner

Implementation Attempt - Tier 1: Haiku - Success

Implemented the resource type extension interface for issue #9998.

What was done

  • Created new cleveragents.resources package
  • Implemented ResourceStatus enum (PENDING, ACTIVE, FAILED, DEPROVISIONED)
  • Implemented ResourceConfig dataclass for configuration schema
  • Implemented ResourceType abstract base class with lifecycle methods: provision(), deprovision(), status(), validate_config(), to_dict()
  • Implemented registry functions: register_resource_type(), get_resource_type(), list_resource_types()
  • Added developer guide documentation in module docstring
  • Created 25 BDD scenarios covering all acceptance criteria
  • All quality gates passing: lint, typecheck, unit_tests (25/25 scenarios)

PR

PR #10784: #10784


Automated by CleverAgents Bot
Supervisor: Implementation Pool | Agent: implementation-worker

**Implementation Attempt** - Tier 1: Haiku - Success Implemented the resource type extension interface for issue #9998. ## What was done - Created new `cleveragents.resources` package - Implemented `ResourceStatus` enum (PENDING, ACTIVE, FAILED, DEPROVISIONED) - Implemented `ResourceConfig` dataclass for configuration schema - Implemented `ResourceType` abstract base class with lifecycle methods: `provision()`, `deprovision()`, `status()`, `validate_config()`, `to_dict()` - Implemented registry functions: `register_resource_type()`, `get_resource_type()`, `list_resource_types()` - Added developer guide documentation in module docstring - Created 25 BDD scenarios covering all acceptance criteria - All quality gates passing: lint, typecheck, unit_tests (25/25 scenarios) ## PR PR #10784: https://git.cleverthis.com/cleveragents/cleveragents-core/pulls/10784 --- **Automated by CleverAgents Bot** Supervisor: Implementation Pool | Agent: implementation-worker
Author
Owner

Implementation Attempt - Tier 1: Haiku - Success

Implemented the resource type extension interface for issue #9998.

What was done

  • Created new cleveragents.resources package
  • Implemented ResourceStatus enum (PENDING, ACTIVE, FAILED, DEPROVISIONED)
  • Implemented ResourceConfig dataclass for configuration schema
  • Implemented ResourceType abstract base class with lifecycle methods: provision(), deprovision(), status(), validate_config(), to_dict()
  • Implemented registry functions: register_resource_type(), get_resource_type(), list_resource_types()
  • Added developer guide documentation in module docstring
  • Created 25 BDD scenarios covering all acceptance criteria
  • All quality gates passing: lint, typecheck, unit_tests (25/25 scenarios)

PR

PR #10784: #10784


Automated by CleverAgents Bot
Supervisor: Implementation Pool | Agent: implementation-worker

**Implementation Attempt** - Tier 1: Haiku - Success Implemented the resource type extension interface for issue #9998. ## What was done - Created new `cleveragents.resources` package - Implemented `ResourceStatus` enum (PENDING, ACTIVE, FAILED, DEPROVISIONED) - Implemented `ResourceConfig` dataclass for configuration schema - Implemented `ResourceType` abstract base class with lifecycle methods: `provision()`, `deprovision()`, `status()`, `validate_config()`, `to_dict()` - Implemented registry functions: `register_resource_type()`, `get_resource_type()`, `list_resource_types()` - Added developer guide documentation in module docstring - Created 25 BDD scenarios covering all acceptance criteria - All quality gates passing: lint, typecheck, unit_tests (25/25 scenarios) ## PR PR #10784: https://git.cleverthis.com/cleveragents/cleveragents-core/pulls/10784 --- **Automated by CleverAgents Bot** Supervisor: Implementation Pool | Agent: implementation-worker
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#9998
No description provided.