guardian-framework 0.1.82 → 0.1.84

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.82", 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.84", 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.82", 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.84", 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.82",
3
+ "version": "0.1.84",
4
4
  "description": "Token-optimized agentic framework scaffolder with pi-first architecture",
5
5
  "type": "module",
6
6
  "main": "dist/exports.js",
@@ -170,6 +170,8 @@ before the implementation issue can be closed. These ACs flow into the generated
170
170
  ## Error Handling
171
171
 
172
172
  **Domain errors (domain/):**
173
+
174
+ TypeScript:
173
175
  ```typescript
174
176
  class [ErrorType] extends Error {
175
177
  constructor(code: string, message: string, retriable?: boolean) {
@@ -179,6 +181,51 @@ class [ErrorType] extends Error {
179
181
  }
180
182
  ```
181
183
 
184
+ Java:
185
+ ```java
186
+ // domain/error/DomainException.java — abstract base
187
+ public abstract class DomainException extends RuntimeException {
188
+ private final ErrorCode code;
189
+ protected DomainException(ErrorCode code, String message) {
190
+ super(message); this.code = code;
191
+ }
192
+ public ErrorCode getCode() { return code; }
193
+ }
194
+
195
+ // domain/error/DomainError.java — concrete error
196
+ public class DomainError extends DomainException {
197
+ public DomainError(ErrorCode code, String message) { super(code, message); }
198
+ }
199
+ ```
200
+
201
+ Python:
202
+ ```python
203
+ class DomainError(Exception):
204
+ """Base domain error."""
205
+ def __init__(self, message: str, code: str = "VALIDATION"):
206
+ super().__init__(message)
207
+ self.code = code
208
+ ```
209
+
210
+ Go:
211
+ ```go
212
+ var (
213
+ ErrNotFound = errors.New("resource not found")
214
+ ErrInvalidState = errors.New("invalid state")
215
+ )
216
+ ```
217
+
218
+ Rust:
219
+ ```rust
220
+ #[derive(Debug, thiserror::Error)]
221
+ pub enum DomainError {
222
+ #[error("Resource {0} not found")]
223
+ NotFound(String),
224
+ #[error("Invalid state: {0}")]
225
+ InvalidState(String),
226
+ }
227
+ ```
228
+
182
229
  **Recovery:**
183
230
  - [Error 1]: [Recovery strategy]
184
231
  - [Error 2]: [Recovery strategy]
@@ -5,27 +5,32 @@
5
5
 
6
6
  ## Error Handling
7
7
 
8
- {{ERROR_HANDLING_SECTION}}
8
+ **Pattern:** {{ERROR_HANDLING_PATTERN}}
9
9
 
10
- **Rule:** {{ERROR_HANDLING_RULE}}
10
+ **Rule:**
11
+ - **Java:** Domain errors extend `DomainException` (abstract base in `domain/error/`), never `RuntimeException` directly. Use `ErrorCode` enum for machine-readable types. Catch at controller advice layer.
12
+ - **TypeScript:** Use Result type pattern (`ok()`/`err()`) for recoverable errors. Throw typed `extends Error` classes for unrecoverable.
13
+ - **Rust:** Use `Result<T, E>` with custom error enums implementing `std::error::Error`.
14
+ - **Python:** Use custom exception classes inheriting from `Exception`.
15
+ - **Go:** Use sentinel errors with `errors.Is/As`.
11
16
 
12
17
  ## Tracing
13
18
 
14
- {{TRACING_SECTION}}
19
+ **Pattern:** {{TRACING_PATTERN}}
15
20
 
16
- **Rule:** {{TRACING_RULE}}
21
+ **Rule:** Every handler must propagate trace context. Use correlation IDs across service boundaries.
17
22
 
18
23
  ## Cancellation
19
24
 
20
- {{CANCELLATION_SECTION}}
25
+ **Pattern:** {{CANCELLATION_PATTERN}}
21
26
 
22
- **Rule:** {{CANCELLATION_RULE}}
27
+ **Rule:** Every async operation must respect cancellation signals. Clean up resources on cancellation.
23
28
 
24
29
  ## Atomic Writes
25
30
 
26
- {{ATOMIC_WRITE_SECTION}}
31
+ **Pattern:** {{ATOMIC_WRITE_PATTERN}}
27
32
 
28
- **Rule:** {{ATOMIC_WRITE_RULE}}
33
+ **Rule:** Never write files in place. Use write-rename pattern (`.tmp` then rename) or transactional storage.
29
34
 
30
35
  ## Retry Logic
31
36
 
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2026-07-16T13:04:53Z",
2
+ "timestamp": "2026-07-16T13:08:13Z",
3
3
  "mode": "all",
4
4
  "stages_run": [],
5
5
  "summary": {