Skip to content

Commit 23ec33a

Browse files
committed
Refactor: Update executor to an 11-step pipeline, replacing the validate method with a comprehensive preflight_check that collects errors across initial pipeline steps.
1 parent 83b600d commit 23ec33a

File tree

8 files changed

+215
-61
lines changed

8 files changed

+215
-61
lines changed

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,25 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.9.0] - 2026-03-06
9+
10+
### Added
11+
12+
#### Enhanced Executor.validate() Preflight
13+
- **`PreflightCheckResult`** — New frozen dataclass representing a single preflight check result with `check`, `passed`, and `error` fields.
14+
- **`PreflightResult`** — New dataclass returned by `Executor.validate()`, containing per-check results and `requires_approval` flag. Duck-type compatible with `ValidationResult` via `.valid` and `.errors` properties.
15+
- **Full 6-check preflight**`validate()` now runs Steps 1–6 of the pipeline (module_id format, module lookup, call chain safety, ACL, approval detection, schema validation) without executing module code or middleware.
16+
17+
### Changed
18+
19+
#### Executor Pipeline
20+
- **Step renumbering** — Approval Gate renumbered from Step 4.5 to Step 5; all subsequent steps shifted +1 (now 11 clean steps).
21+
- **`validate()` return type** — Changed from `ValidationResult` to `PreflightResult`. Backward compatible: `.valid` and `.errors` still work identically for existing consumers (e.g., apcore-mcp router).
22+
- **`validate()` signature** — Added optional `context` parameter for call-chain checks; `inputs` now defaults to `{}`.
23+
24+
#### Public API
25+
- Exported `PreflightCheckResult` and `PreflightResult` from `apcore` top-level package.
26+
827
## [0.8.0] - 2026-03-05
928

1029
### Added
@@ -365,6 +384,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
365384

366385
---
367386

387+
[0.9.0]: https://github.com/aipartnerup/apcore-python/compare/v0.8.0...v0.9.0
368388
[0.8.0]: https://github.com/aipartnerup/apcore-python/compare/v0.7.0...v0.8.0
369389
[0.7.0]: https://github.com/aipartnerup/apcore-python/compare/v0.6.0...v0.7.0
370390
[0.6.0]: https://github.com/aipartnerup/apcore-python/compare/v0.5.0...v0.6.0

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div align="center">
2-
<img src="https://raw.githubusercontent.com/aipartnerup/apcore-typescript/main/apcore-logo.svg" alt="apcore logo" width="200"/>
2+
<img src="https://raw.githubusercontent.com/aipartnerup/apcore/main/apcore-logo.svg" alt="apcore logo" width="200"/>
33
</div>
44

55
# apcore

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "apcore"
7-
version = "0.8.0"
7+
version = "0.9.0"
88
description = "Schema-driven module development framework for AI-perceivable interfaces"
99
readme = "README.md"
1010
requires-python = ">=3.11"

src/apcore/__init__.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,14 @@
2626
from apcore.executor import Executor, redact_sensitive, REDACTED_VALUE
2727

2828
# Module types
29-
from apcore.module import Module, ModuleAnnotations, ModuleExample, ValidationResult
29+
from apcore.module import (
30+
Module,
31+
ModuleAnnotations,
32+
ModuleExample,
33+
PreflightCheckResult,
34+
PreflightResult,
35+
ValidationResult,
36+
)
3037

3138
# Config
3239
from apcore.config import Config
@@ -135,7 +142,7 @@
135142
# Trace Context
136143
from apcore.trace_context import TraceContext, TraceParent
137144

138-
__version__ = "0.8.0"
145+
__version__ = "0.9.0"
139146

140147
__all__ = [
141148
# Core
@@ -158,6 +165,8 @@
158165
"ModuleAnnotations",
159166
"ModuleExample",
160167
"ValidationResult",
168+
"PreflightCheckResult",
169+
"PreflightResult",
161170
# Registry types
162171
"ModuleDescriptor",
163172
"DiscoveredModule",

0 commit comments

Comments
 (0)