guardian-framework 0.1.93 → 0.1.95

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -3197,7 +3197,7 @@ __export(exports_package, {
3197
3197
  bin: () => bin,
3198
3198
  author: () => author
3199
3199
  });
3200
- var name = "guardian-framework", version = "0.1.93", description = "Token-optimized agentic framework scaffolder with pi-first architecture", type = "module", main = "dist/exports.js", exports, types = "dist/exports.d.ts", bin, files, engines, scripts, publishConfig, pi, repository, homepage = "https://github.com/arman-jalili/guardian-framework#readme", bugs, dependencies, devDependencies, keywords, author = "Arman Wolkensteiner-Jalili", license = "MIT", package_default;
3200
+ var name = "guardian-framework", version = "0.1.95", description = "Token-optimized agentic framework scaffolder with pi-first architecture", type = "module", main = "dist/exports.js", exports, types = "dist/exports.d.ts", bin, files, engines, scripts, publishConfig, pi, repository, homepage = "https://github.com/arman-jalili/guardian-framework#readme", bugs, dependencies, devDependencies, keywords, author = "Arman Wolkensteiner-Jalili", license = "MIT", package_default;
3201
3201
  var init_package = __esm(() => {
3202
3202
  exports = {
3203
3203
  ".": {
package/dist/exports.js CHANGED
@@ -1982,7 +1982,7 @@ __export(exports_package, {
1982
1982
  bin: () => bin,
1983
1983
  author: () => author
1984
1984
  });
1985
- var name = "guardian-framework", version = "0.1.93", description = "Token-optimized agentic framework scaffolder with pi-first architecture", type = "module", main = "dist/exports.js", exports, types = "dist/exports.d.ts", bin, files, engines, scripts, publishConfig, pi, repository, homepage = "https://github.com/arman-jalili/guardian-framework#readme", bugs, dependencies, devDependencies, keywords, author = "Arman Wolkensteiner-Jalili", license = "MIT", package_default;
1985
+ var name = "guardian-framework", version = "0.1.95", description = "Token-optimized agentic framework scaffolder with pi-first architecture", type = "module", main = "dist/exports.js", exports, types = "dist/exports.d.ts", bin, files, engines, scripts, publishConfig, pi, repository, homepage = "https://github.com/arman-jalili/guardian-framework#readme", bugs, dependencies, devDependencies, keywords, author = "Arman Wolkensteiner-Jalili", license = "MIT", package_default;
1986
1986
  var init_package = __esm(() => {
1987
1987
  exports = {
1988
1988
  ".": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "guardian-framework",
3
- "version": "0.1.93",
3
+ "version": "0.1.95",
4
4
  "description": "Token-optimized agentic framework scaffolder with pi-first architecture",
5
5
  "type": "module",
6
6
  "main": "dist/exports.js",
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2026-07-17T18:17:45Z",
2
+ "timestamp": "2026-07-17T20:52:41Z",
3
3
  "mode": "all",
4
4
  "stages_run": [],
5
5
  "summary": {
@@ -20,22 +20,29 @@ Every bounded context follows the same 4-layer structure:
20
20
  module/
21
21
  ├── domain/ # Pure domain entities, value objects, events
22
22
  │ ├── mod.rs # Re-exports + module-level documentation
23
- │ ├── entity.rs # Aggregate roots and entities
24
- │ ├── value.rs # Value objects
25
- │ ├── event.rs # Domain event payloads
26
- │ └── error.rs # Typed error enum (thiserror)
27
- ├── application/ # Service traits, DTOs, factory interfaces
23
+ │ ├── entity/ # Aggregate roots and entities
24
+ │ │ └── [entity].rs
25
+ │ ├── value/ # Value objects
26
+ │ │ └── [value].rs
27
+ │ ├── event/ # Domain event payloads
28
+ │ └── error/ # Typed error enum (thiserror)
29
+ ├── application/ # Service traits, DTOs, use case orchestration
28
30
  │ ├── mod.rs
29
31
  │ ├── service.rs # Service trait definitions
30
- │ ├── factory.rs # Factory trait interfaces
31
- │ └── dto/ # Input/Output DTOs with validation
32
- │ └── mod.rs
33
- ├── infrastructure/ # Repository implementations, external adapters
32
+ │ ├── dto/ # Input/Output DTOs
33
+ │ │ └── mod.rs
34
+ │ └── factory.rs # Factory trait interfaces
35
+ ├── infrastructure/ # Repository implementations, external adapters, repository traits
34
36
  │ ├── mod.rs
35
- │ ├── repository/ # Repository trait definitions
37
+ │ ├── repository/ # Repository trait definitions + implementations
36
38
  │ │ ├── mod.rs
37
39
  │ │ └── [entity]_repository.rs
38
40
  │ └── persistence/ # ORM/database implementations
41
+ │ ├── mod.rs
42
+ │ ├── repository/ # Repository IMPLEMENTATIONS (concrete, not traits)
43
+ │ │ ├── mod.rs
44
+ │ │ └── [entity]_repository_impl.rs
45
+ │ └── persistence/ # ORM/database implementations
39
46
  └── interfaces/ # API contracts (HTTP, events)
40
47
  ├── mod.rs
41
48
  └── http/ # REST endpoint contracts
@@ -971,6 +978,20 @@ pub struct Order { pub customer: Customer } // BAD — use customer_id: Uuid
971
978
 
972
979
  // ❌ Infrastructure leak in domain
973
980
  use sqlx::PgPool; // BAD — domain NEVER imports infrastructure concerns
981
+
982
+ // ❌ Handler with trait (handlers are concrete only)
983
+ pub trait UserHandler { ... } // BAD — the route/handler fn IS the contract
984
+ pub struct UserHandlerImpl { ... } // BAD — pointless indirection
985
+
986
+ // ❌ Handler importing repository directly (bypasses service layer)
987
+ async fn get_users(repo: impl UserRepository) { // BAD — use application service
988
+ let users = repo.find_all().await;
989
+ }
990
+
991
+ // Note: This project keeps repository traits + impls together in
992
+ // infrastructure/repository/ for consistency across existing codebases.
993
+ // Both traits and concrete implementations live side by side:
994
+ // infrastructure/repository/user_repository.rs — both trait + impl
974
995
  ```
975
996
 
976
997
  ---