@solid-stack/agnos 0.1.0

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.
Files changed (59) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +153 -0
  3. package/dist/core/Program.d.ts +12 -0
  4. package/dist/core/Program.d.ts.map +1 -0
  5. package/dist/core/bootstrap/index.d.ts +3 -0
  6. package/dist/core/bootstrap/index.d.ts.map +1 -0
  7. package/dist/core/bootstrap/loadFeatures.d.ts +3 -0
  8. package/dist/core/bootstrap/loadFeatures.d.ts.map +1 -0
  9. package/dist/core/bootstrap/loadInfra.d.ts +3 -0
  10. package/dist/core/bootstrap/loadInfra.d.ts.map +1 -0
  11. package/dist/core/errors/AgnosError.d.ts +36 -0
  12. package/dist/core/errors/AgnosError.d.ts.map +1 -0
  13. package/dist/core/errors/AppError.d.ts +8 -0
  14. package/dist/core/errors/AppError.d.ts.map +1 -0
  15. package/dist/core/errors/BootstrapError.d.ts +8 -0
  16. package/dist/core/errors/BootstrapError.d.ts.map +1 -0
  17. package/dist/core/errors/FeatureLoadError.d.ts +18 -0
  18. package/dist/core/errors/FeatureLoadError.d.ts.map +1 -0
  19. package/dist/core/errors/InputParsingError.d.ts +24 -0
  20. package/dist/core/errors/InputParsingError.d.ts.map +1 -0
  21. package/dist/core/errors/InternalError.d.ts +9 -0
  22. package/dist/core/errors/InternalError.d.ts.map +1 -0
  23. package/dist/core/errors/InvalidDependencyError.d.ts +16 -0
  24. package/dist/core/errors/InvalidDependencyError.d.ts.map +1 -0
  25. package/dist/core/errors/MissingDependencyError.d.ts +16 -0
  26. package/dist/core/errors/MissingDependencyError.d.ts.map +1 -0
  27. package/dist/core/errors/NotFoundError.d.ts +18 -0
  28. package/dist/core/errors/NotFoundError.d.ts.map +1 -0
  29. package/dist/core/errors/PresentationError.d.ts +11 -0
  30. package/dist/core/errors/PresentationError.d.ts.map +1 -0
  31. package/dist/core/errors/ResourceConflictError.d.ts +18 -0
  32. package/dist/core/errors/ResourceConflictError.d.ts.map +1 -0
  33. package/dist/core/errors/index.d.ts +12 -0
  34. package/dist/core/errors/index.d.ts.map +1 -0
  35. package/dist/core/index.d.ts +4 -0
  36. package/dist/core/index.d.ts.map +1 -0
  37. package/dist/core/logging/Logger.d.ts +16 -0
  38. package/dist/core/logging/Logger.d.ts.map +1 -0
  39. package/dist/core/logging/SilentLogger.d.ts +13 -0
  40. package/dist/core/logging/SilentLogger.d.ts.map +1 -0
  41. package/dist/core/logging/index.d.ts +3 -0
  42. package/dist/core/logging/index.d.ts.map +1 -0
  43. package/dist/core/start.d.ts +15 -0
  44. package/dist/core/start.d.ts.map +1 -0
  45. package/dist/index.cjs +482 -0
  46. package/dist/index.cjs.map +1 -0
  47. package/dist/index.d.ts +8 -0
  48. package/dist/index.d.ts.map +1 -0
  49. package/dist/index.js +459 -0
  50. package/dist/index.js.map +1 -0
  51. package/dist/types/index.d.ts +2 -0
  52. package/dist/types/index.d.ts.map +1 -0
  53. package/dist/types/public.d.ts +52 -0
  54. package/dist/types/public.d.ts.map +1 -0
  55. package/dist/utils/folderExists.d.ts +2 -0
  56. package/dist/utils/folderExists.d.ts.map +1 -0
  57. package/dist/utils/index.d.ts +2 -0
  58. package/dist/utils/index.d.ts.map +1 -0
  59. package/package.json +71 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Solid Stack Digital
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,153 @@
1
+ # @solid-stack/agnos
2
+
3
+ An agnostic, type-safe clean architecture application framework for TypeScript, powered by **[@solid-stack/di](https://www.npmjs.com/package/@solid-stack/di)**.
4
+
5
+ ---
6
+
7
+ ## ✨ Features
8
+
9
+ - 🏗️ **Presentation-Agnostic Core**: Decouple your business logic from presentation layers (CLI, HTTP, Next.js, WebSockets, background workers) via `IPresentation` and `Program`.
10
+ - 💉 **Integrated Type-Safe DI**: Seamless integration with `@solid-stack/di` supporting Stage 3 decorators (`@MakeInjectable`), multi-tokens, and compile-time dependency validation.
11
+ - 🪵 **Pluggable Logging**: Extensible logging subsystem using `ILoggerTransport` and `LoggerTransportsToken` multi-tokens with error isolation and `SilentLogger` support.
12
+ - 🎯 **Standardized Use Cases**: Clean `UseCase<IRequest, IResponse>` contracts for domain logic.
13
+ - 🛡️ **Structured Error Hierarchy**: Rich, domain- and lifecycle-tailored error types with HTTP status codes, machine-readable error codes, metadata context, and formatting (`AgnosError`, `AppError`, `BootstrapError`, `FeatureLoadError`, `PresentationError`, `InputParsingError`, `InternalError`, `NotFoundError`, `ResourceConflictError`, `InvalidDependencyError`, `MissingDependencyError`).
14
+ - ⚡ **Dual ESM + CJS Output**: Bundled via [tsup](https://tsup.egoist.dev/) with tree-shaking, sourcemaps, and full `.d.ts` declarations.
15
+
16
+ ---
17
+
18
+ ## 📦 Installation
19
+
20
+ ```bash
21
+ pnpm add @solid-stack/agnos @solid-stack/di
22
+ ```
23
+
24
+ ---
25
+
26
+ ## 🚀 Quick Start
27
+
28
+ ### 1. Define Domain Use Case and Presentation
29
+
30
+ ```typescript
31
+ import { Container, MakeInjectable, type DepsType } from "@solid-stack/di";
32
+ import {
33
+ IPresentation,
34
+ ILogger,
35
+ ILoggerTransport,
36
+ LoggerTransportsToken,
37
+ UseCase,
38
+ start,
39
+ type LogLevel,
40
+ } from "@solid-stack/agnos";
41
+
42
+ // 1. Define a Logger Transport
43
+ @MakeInjectable
44
+ class ConsoleTransport extends ILoggerTransport {
45
+ public static deps = {};
46
+ constructor(public deps: DepsType<typeof ConsoleTransport.deps>) {
47
+ super();
48
+ }
49
+
50
+ push = (message: any[], level: LogLevel) => {
51
+ console.log(`[${level.toUpperCase()}]`, ...message);
52
+ };
53
+ }
54
+
55
+ // 2. Define a Use Case
56
+ interface GreetRequest {
57
+ name: string;
58
+ }
59
+
60
+ interface GreetResponse {
61
+ greeting: string;
62
+ }
63
+
64
+ @MakeInjectable
65
+ class GreetUseCase extends UseCase<GreetRequest, GreetResponse> {
66
+ public static deps = {
67
+ logger: ILogger,
68
+ };
69
+
70
+ constructor(public deps: DepsType<typeof GreetUseCase.deps>) {
71
+ super();
72
+ }
73
+
74
+ async execute(request: GreetRequest): Promise<GreetResponse> {
75
+ this.deps.logger.info(`Greeting user: ${request.name}`);
76
+ return { greeting: `Hello, ${request.name}!` };
77
+ }
78
+ }
79
+
80
+ // 3. Define Presentation Layer
81
+ @MakeInjectable
82
+ class AppPresentation extends IPresentation {
83
+ public static deps = {
84
+ greetUseCase: GreetUseCase,
85
+ logger: ILogger,
86
+ };
87
+
88
+ constructor(public deps: DepsType<typeof AppPresentation.deps>) {
89
+ super();
90
+ }
91
+
92
+ async init(): Promise<void> {
93
+ this.deps.logger.info("Initializing presentation layer...");
94
+ }
95
+
96
+ async run(): Promise<void> {
97
+ const res = await this.deps.greetUseCase.execute({ name: "Solid Stack Developer" });
98
+ console.log(res.greeting);
99
+ }
100
+
101
+ async stop(): Promise<void> {
102
+ this.deps.logger.info("Stopping presentation layer...");
103
+ }
104
+ }
105
+
106
+ // 4. Bootstrap and Start Application
107
+ async function main() {
108
+ const container = new Container();
109
+
110
+ // Register logger transport and presentation
111
+ container.provideMulti(LoggerTransportsToken, ConsoleTransport);
112
+ container.provide(IPresentation, AppPresentation);
113
+
114
+ // Start the application lifecycle (automatically loads infra and runs the presentation)
115
+ await start(container);
116
+ }
117
+
118
+ main().catch(console.error);
119
+ ```
120
+
121
+ ---
122
+
123
+ ## 🛠️ Available Scripts
124
+
125
+ | Command | Description |
126
+ | --- | --- |
127
+ | `pnpm dev` | Starts `tsup` in watch mode for development |
128
+ | `pnpm build` | Bundles ESM/CJS outputs and generates TypeScript type declarations |
129
+ | `pnpm test` | Runs tests using Vitest |
130
+ | `pnpm test:watch` | Runs Vitest in interactive watch mode |
131
+ | `pnpm test:coverage` | Runs tests with code coverage reporting |
132
+ | `pnpm typecheck` | Typechecks the project using TypeScript (`tsc --noEmit`) |
133
+ | `pnpm check` | Runs typecheck, tests, and build in sequence |
134
+ | `pnpm prepublishOnly` | Automatically runs tests, build, and dist validation before publishing |
135
+
136
+ ---
137
+
138
+ ## 🐳 Docker / Make Commands
139
+
140
+ ```bash
141
+ make dev # Start dev watcher container
142
+ make test # Run test suite in container
143
+ make build # Build package in container
144
+ make prod # Verify production container
145
+ make clean # Clean up containers and volumes
146
+ ```
147
+
148
+ ---
149
+
150
+ ## 📄 License
151
+
152
+ MIT © [Solid Stack Digital](https://github.com/solid-stack-digital)
153
+
@@ -0,0 +1,12 @@
1
+ import { type DepsType } from "@solid-stack/di";
2
+ import { IPresentation, ILogger } from "../types/index.js";
3
+ export declare class Program {
4
+ deps: DepsType<typeof Program.deps>;
5
+ static deps: {
6
+ presentation: typeof IPresentation;
7
+ logger: typeof ILogger;
8
+ };
9
+ constructor(deps: DepsType<typeof Program.deps>);
10
+ start(): Promise<void>;
11
+ }
12
+ //# sourceMappingURL=Program.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Program.d.ts","sourceRoot":"","sources":["../../src/core/Program.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE3D,qBACa,OAAO;IAMC,IAAI,EAAE,QAAQ,CAAC,OAAO,OAAO,CAAC,IAAI,CAAC;IALtD,OAAc,IAAI;QAChB,YAAY;QACZ,MAAM;MACN;IAEF,YAAmB,IAAI,EAAE,QAAQ,CAAC,OAAO,OAAO,CAAC,IAAI,CAAC,EAAI;IAEpD,KAAK,kBAiDV;CACF"}
@@ -0,0 +1,3 @@
1
+ export { loadFeatures } from "./loadFeatures.js";
2
+ export { loadInfra } from "./loadInfra.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/bootstrap/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Container } from "@solid-stack/di";
2
+ export declare function loadFeatures(c: Container, featuresDir: string): Promise<void>;
3
+ //# sourceMappingURL=loadFeatures.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loadFeatures.d.ts","sourceRoot":"","sources":["../../../src/core/bootstrap/loadFeatures.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAIjD,wBAAsB,YAAY,CAChC,CAAC,EAAE,SAAS,EACZ,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,IAAI,CAAC,CAoCf"}
@@ -0,0 +1,3 @@
1
+ import type { Container } from "@solid-stack/di";
2
+ export declare const loadInfra: (c: Container) => Promise<void>;
3
+ //# sourceMappingURL=loadInfra.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loadInfra.d.ts","sourceRoot":"","sources":["../../../src/core/bootstrap/loadInfra.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAIjD,eAAO,MAAM,SAAS,MAAa,SAAS,kBAE3C,CAAC"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Options for constructing Agnos framework errors.
3
+ */
4
+ export interface AgnosErrorOptions {
5
+ /** Underlying cause of the error */
6
+ cause?: unknown;
7
+ /** Machine-readable error code */
8
+ code?: string | undefined;
9
+ /** HTTP status code equivalent */
10
+ statusCode?: number | undefined;
11
+ /** Additional diagnostic metadata */
12
+ context?: Record<string, unknown> | undefined;
13
+ }
14
+ /**
15
+ * Base error class for all Agnos framework and application errors.
16
+ */
17
+ export declare class AgnosError extends Error {
18
+ readonly details: string;
19
+ readonly code: string;
20
+ readonly statusCode: number;
21
+ readonly context?: Record<string, unknown> | undefined;
22
+ constructor(name?: string, details?: string, options?: AgnosErrorOptions);
23
+ /**
24
+ * Formats the error into a human-readable diagnostic string with code, context, cause, and stack trace.
25
+ */
26
+ prettyDetails(): string;
27
+ /**
28
+ * Serializes the error to a JSON-safe object.
29
+ */
30
+ toJSON(): Record<string, unknown>;
31
+ /**
32
+ * Type guard to verify if an unknown error is an instance of AgnosError.
33
+ */
34
+ static isAgnosError(error: unknown): error is AgnosError;
35
+ }
36
+ //# sourceMappingURL=AgnosError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AgnosError.d.ts","sourceRoot":"","sources":["../../../src/core/errors/AgnosError.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,oCAAoC;IACpC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,kCAAkC;IAClC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,kCAAkC;IAClC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,qCAAqC;IACrC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;CAC/C;AAED;;GAEG;AACH,qBAAa,UAAW,SAAQ,KAAK;IACnC,SAAgB,OAAO,EAAE,MAAM,CAAC;IAChC,SAAgB,IAAI,EAAE,MAAM,CAAC;IAC7B,SAAgB,UAAU,EAAE,MAAM,CAAC;IACnC,SAAgB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;IAE9D,YACE,IAAI,SAAe,EACnB,OAAO,SAAuC,EAC9C,OAAO,CAAC,EAAE,iBAAiB,EAY5B;IAED;;OAEG;IACH,aAAa,IAAI,MAAM,CAYtB;IAED;;OAEG;IACH,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAShC;IAED;;OAEG;IACH,MAAM,CAAC,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAEvD;CACF"}
@@ -0,0 +1,8 @@
1
+ import { AgnosError, type AgnosErrorOptions } from "./AgnosError.js";
2
+ /**
3
+ * Base application-level error class inheriting from AgnosError.
4
+ */
5
+ export declare class AppError extends AgnosError {
6
+ constructor(name?: string, details?: string, options?: AgnosErrorOptions);
7
+ }
8
+ //# sourceMappingURL=AppError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppError.d.ts","sourceRoot":"","sources":["../../../src/core/errors/AppError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAErE;;GAEG;AACH,qBAAa,QAAS,SAAQ,UAAU;IACtC,YACE,IAAI,SAA0B,EAC9B,OAAO,SAAsC,EAC7C,OAAO,CAAC,EAAE,iBAAiB,EAO5B;CACF"}
@@ -0,0 +1,8 @@
1
+ import { AgnosError, type AgnosErrorOptions } from "./AgnosError.js";
2
+ /**
3
+ * Thrown when application bootstrap or infrastructure initialization fails.
4
+ */
5
+ export declare class BootstrapError extends AgnosError {
6
+ constructor(details: string, options?: AgnosErrorOptions);
7
+ }
8
+ //# sourceMappingURL=BootstrapError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BootstrapError.d.ts","sourceRoot":"","sources":["../../../src/core/errors/BootstrapError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAErE;;GAEG;AACH,qBAAa,cAAe,SAAQ,UAAU;IAC5C,YAAY,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,iBAAiB,EAMvD;CACF"}
@@ -0,0 +1,18 @@
1
+ import { BootstrapError } from "./BootstrapError.js";
2
+ import type { AgnosErrorOptions } from "./AgnosError.js";
3
+ /**
4
+ * Options for constructing a FeatureLoadError.
5
+ */
6
+ export interface FeatureLoadErrorOptions extends AgnosErrorOptions {
7
+ featureName?: string | undefined;
8
+ providerPath?: string | undefined;
9
+ }
10
+ /**
11
+ * Thrown when auto-loading a feature module or its DepsProvider fails.
12
+ */
13
+ export declare class FeatureLoadError extends BootstrapError {
14
+ readonly featureName?: string | undefined;
15
+ readonly providerPath?: string | undefined;
16
+ constructor(featureName: string, providerPath?: string | undefined, details?: string | undefined, options?: FeatureLoadErrorOptions);
17
+ }
18
+ //# sourceMappingURL=FeatureLoadError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FeatureLoadError.d.ts","sourceRoot":"","sources":["../../../src/core/errors/FeatureLoadError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,uBAAwB,SAAQ,iBAAiB;IAChE,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACnC;AAED;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,cAAc;IAClD,SAAgB,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjD,SAAgB,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAElD,YACE,WAAW,EAAE,MAAM,EACnB,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,EACjC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,EAC5B,OAAO,CAAC,EAAE,uBAAuB,EAsBlC;CACF"}
@@ -0,0 +1,24 @@
1
+ import { AppError } from "./AppError.js";
2
+ import type { AgnosErrorOptions } from "./AgnosError.js";
3
+ /**
4
+ * Options for InputParsingError, including field-level validation errors.
5
+ */
6
+ export interface InputParsingErrorOptions extends AgnosErrorOptions {
7
+ issues?: Array<{
8
+ field?: string | undefined;
9
+ message: string;
10
+ code?: string | undefined;
11
+ }> | undefined;
12
+ }
13
+ /**
14
+ * Thrown when request payload or user input validation fails.
15
+ */
16
+ export declare class InputParsingError extends AppError {
17
+ readonly issues?: Array<{
18
+ field?: string | undefined;
19
+ message: string;
20
+ code?: string | undefined;
21
+ }> | undefined;
22
+ constructor(details: string, options?: InputParsingErrorOptions);
23
+ }
24
+ //# sourceMappingURL=InputParsingError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputParsingError.d.ts","sourceRoot":"","sources":["../../../src/core/errors/InputParsingError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,wBAAyB,SAAQ,iBAAiB;IACjE,MAAM,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,CAAC,GAAG,SAAS,CAAC;CACxG;AAED;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,QAAQ;IAC7C,SAAgB,MAAM,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,CAAC,GAAG,SAAS,CAAC;IAEvH,YAAY,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,wBAAwB,EAc9D;CACF"}
@@ -0,0 +1,9 @@
1
+ import { AppError } from "./AppError.js";
2
+ import type { AgnosErrorOptions } from "./AgnosError.js";
3
+ /**
4
+ * Thrown when an unexpected internal framework or application error occurs.
5
+ */
6
+ export declare class InternalError extends AppError {
7
+ constructor(details?: string, options?: AgnosErrorOptions);
8
+ }
9
+ //# sourceMappingURL=InternalError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InternalError.d.ts","sourceRoot":"","sources":["../../../src/core/errors/InternalError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;GAEG;AACH,qBAAa,aAAc,SAAQ,QAAQ;IACzC,YACE,OAAO,SAAsC,EAC7C,OAAO,CAAC,EAAE,iBAAiB,EAO5B;CACF"}
@@ -0,0 +1,16 @@
1
+ import { AppError } from "./AppError.js";
2
+ import type { AgnosErrorOptions } from "./AgnosError.js";
3
+ /**
4
+ * Options for InvalidDependencyError.
5
+ */
6
+ export interface InvalidDependencyErrorOptions extends AgnosErrorOptions {
7
+ dependencyName?: string | undefined;
8
+ }
9
+ /**
10
+ * Thrown when an invalid or improperly configured dependency is encountered.
11
+ */
12
+ export declare class InvalidDependencyError extends AppError {
13
+ readonly dependencyName?: string | undefined;
14
+ constructor(details: string, optionsOrCause?: InvalidDependencyErrorOptions | unknown);
15
+ }
16
+ //# sourceMappingURL=InvalidDependencyError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InvalidDependencyError.d.ts","sourceRoot":"","sources":["../../../src/core/errors/InvalidDependencyError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,6BAA8B,SAAQ,iBAAiB;IACtE,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACrC;AAED;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,QAAQ;IAClD,SAAgB,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEpD,YACE,OAAO,EAAE,MAAM,EACf,cAAc,CAAC,EAAE,6BAA6B,GAAG,OAAO,EA2BzD;CACF"}
@@ -0,0 +1,16 @@
1
+ import { AppError } from "./AppError.js";
2
+ import type { AgnosErrorOptions } from "./AgnosError.js";
3
+ /**
4
+ * Options for MissingDependencyError.
5
+ */
6
+ export interface MissingDependencyErrorOptions extends AgnosErrorOptions {
7
+ dependencyName?: string | undefined;
8
+ }
9
+ /**
10
+ * Thrown when a required dependency or token cannot be resolved.
11
+ */
12
+ export declare class MissingDependencyError extends AppError {
13
+ readonly dependencyName?: string | undefined;
14
+ constructor(details: string, optionsOrCause?: MissingDependencyErrorOptions | unknown);
15
+ }
16
+ //# sourceMappingURL=MissingDependencyError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MissingDependencyError.d.ts","sourceRoot":"","sources":["../../../src/core/errors/MissingDependencyError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,6BAA8B,SAAQ,iBAAiB;IACtE,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACrC;AAED;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,QAAQ;IAClD,SAAgB,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEpD,YACE,OAAO,EAAE,MAAM,EACf,cAAc,CAAC,EAAE,6BAA6B,GAAG,OAAO,EA2BzD;CACF"}
@@ -0,0 +1,18 @@
1
+ import { AppError } from "./AppError.js";
2
+ import type { AgnosErrorOptions } from "./AgnosError.js";
3
+ /**
4
+ * Options for NotFoundError including resource identifier metadata.
5
+ */
6
+ export interface NotFoundErrorOptions extends AgnosErrorOptions {
7
+ resource?: string | undefined;
8
+ resourceId?: string | number | undefined;
9
+ }
10
+ /**
11
+ * Thrown when a requested resource or entity cannot be found.
12
+ */
13
+ export declare class NotFoundError extends AppError {
14
+ readonly resource?: string | undefined;
15
+ readonly resourceId?: string | number | undefined;
16
+ constructor(details: string, options?: NotFoundErrorOptions);
17
+ }
18
+ //# sourceMappingURL=NotFoundError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NotFoundError.d.ts","sourceRoot":"","sources":["../../../src/core/errors/NotFoundError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,iBAAiB;IAC7D,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CAC1C;AAED;;GAEG;AACH,qBAAa,aAAc,SAAQ,QAAQ;IACzC,SAAgB,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9C,SAAgB,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IAEzD,YAAY,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,oBAAoB,EAgB1D;CACF"}
@@ -0,0 +1,11 @@
1
+ import { AgnosError, type AgnosErrorOptions } from "./AgnosError.js";
2
+ /**
3
+ * Thrown when the presentation layer fails during init, run, or stop lifecycle hooks.
4
+ */
5
+ export declare class PresentationError extends AgnosError {
6
+ readonly phase?: ("init" | "run" | "stop") | undefined;
7
+ constructor(details: string, options?: AgnosErrorOptions & {
8
+ phase?: ("init" | "run" | "stop") | undefined;
9
+ });
10
+ }
11
+ //# sourceMappingURL=PresentationError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PresentationError.d.ts","sourceRoot":"","sources":["../../../src/core/errors/PresentationError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAErE;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,UAAU;IAC/C,SAAgB,KAAK,CAAC,EAAE,CAAC,MAAM,GAAG,KAAK,GAAG,MAAM,CAAC,GAAG,SAAS,CAAC;IAE9D,YACE,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,iBAAiB,GAAG;QAAE,KAAK,CAAC,EAAE,CAAC,MAAM,GAAG,KAAK,GAAG,MAAM,CAAC,GAAG,SAAS,CAAA;KAAE,EAehF;CACF"}
@@ -0,0 +1,18 @@
1
+ import { AppError } from "./AppError.js";
2
+ import type { AgnosErrorOptions } from "./AgnosError.js";
3
+ /**
4
+ * Options for ResourceConflictError.
5
+ */
6
+ export interface ResourceConflictErrorOptions extends AgnosErrorOptions {
7
+ conflictKey?: string | undefined;
8
+ conflictingValue?: unknown;
9
+ }
10
+ /**
11
+ * Thrown when an operation conflicts with existing state (e.g. duplicate key or concurrency collision).
12
+ */
13
+ export declare class ResourceConflictError extends AppError {
14
+ readonly conflictKey?: string | undefined;
15
+ readonly conflictingValue?: unknown;
16
+ constructor(message: string, optionsOrCause?: ResourceConflictErrorOptions | unknown);
17
+ }
18
+ //# sourceMappingURL=ResourceConflictError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ResourceConflictError.d.ts","sourceRoot":"","sources":["../../../src/core/errors/ResourceConflictError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,4BAA6B,SAAQ,iBAAiB;IACrE,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,QAAQ;IACjD,SAAgB,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjD,SAAgB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3C,YACE,OAAO,EAAE,MAAM,EACf,cAAc,CAAC,EAAE,4BAA4B,GAAG,OAAO,EA+BxD;CACF"}
@@ -0,0 +1,12 @@
1
+ export { AgnosError, type AgnosErrorOptions } from "./AgnosError.js";
2
+ export { AppError } from "./AppError.js";
3
+ export { BootstrapError } from "./BootstrapError.js";
4
+ export { FeatureLoadError, type FeatureLoadErrorOptions, } from "./FeatureLoadError.js";
5
+ export { PresentationError } from "./PresentationError.js";
6
+ export { InputParsingError, type InputParsingErrorOptions, } from "./InputParsingError.js";
7
+ export { InternalError } from "./InternalError.js";
8
+ export { InvalidDependencyError, type InvalidDependencyErrorOptions, } from "./InvalidDependencyError.js";
9
+ export { MissingDependencyError, type MissingDependencyErrorOptions, } from "./MissingDependencyError.js";
10
+ export { NotFoundError, type NotFoundErrorOptions } from "./NotFoundError.js";
11
+ export { ResourceConflictError, type ResourceConflictErrorOptions, } from "./ResourceConflictError.js";
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/errors/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EACL,gBAAgB,EAChB,KAAK,uBAAuB,GAC7B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EACL,iBAAiB,EACjB,KAAK,wBAAwB,GAC9B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EACL,sBAAsB,EACtB,KAAK,6BAA6B,GACnC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,sBAAsB,EACtB,KAAK,6BAA6B,GACnC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,KAAK,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EACL,qBAAqB,EACrB,KAAK,4BAA4B,GAClC,MAAM,4BAA4B,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { start } from "./start.js";
2
+ export { SilentLogger } from "./logging/index.js";
3
+ export { AgnosError, type AgnosErrorOptions, AppError, BootstrapError, FeatureLoadError, type FeatureLoadErrorOptions, PresentationError, InputParsingError, type InputParsingErrorOptions, InternalError, InvalidDependencyError, type InvalidDependencyErrorOptions, MissingDependencyError, type MissingDependencyErrorOptions, NotFoundError, type NotFoundErrorOptions, ResourceConflictError, type ResourceConflictErrorOptions, } from "./errors/index.js";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAGnC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGlD,OAAO,EACL,UAAU,EACV,KAAK,iBAAiB,EACtB,QAAQ,EACR,cAAc,EACd,gBAAgB,EAChB,KAAK,uBAAuB,EAC5B,iBAAiB,EACjB,iBAAiB,EACjB,KAAK,wBAAwB,EAC7B,aAAa,EACb,sBAAsB,EACtB,KAAK,6BAA6B,EAClC,sBAAsB,EACtB,KAAK,6BAA6B,EAClC,aAAa,EACb,KAAK,oBAAoB,EACzB,qBAAqB,EACrB,KAAK,4BAA4B,GAClC,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { type DepsType } from "@solid-stack/di";
2
+ import { ILogger, LoggerTransportsToken } from "../../types/index.js";
3
+ export declare class Logger implements ILogger {
4
+ deps: DepsType<typeof Logger.deps>;
5
+ static deps: {
6
+ transports: typeof LoggerTransportsToken;
7
+ };
8
+ constructor(deps: DepsType<typeof Logger.deps>);
9
+ private broadcast;
10
+ log(...args: any[]): void;
11
+ info(...args: any[]): void;
12
+ warn(...args: any[]): void;
13
+ error(...args: any[]): void;
14
+ debug(...args: any[]): void;
15
+ }
16
+ //# sourceMappingURL=Logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Logger.d.ts","sourceRoot":"","sources":["../../../src/core/logging/Logger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EACL,OAAO,EACP,qBAAqB,EAEtB,MAAM,sBAAsB,CAAC;AAE9B,qBACa,MAAO,YAAW,OAAO;IAKjB,IAAI,EAAE,QAAQ,CAAC,OAAO,MAAM,CAAC,IAAI,CAAC;IAJrD,OAAc,IAAI;QAChB,UAAU;MACV;IAEF,YAAmB,IAAI,EAAE,QAAQ,CAAC,OAAO,MAAM,CAAC,IAAI,CAAC,EAAI;IAEzD,OAAO,CAAC,SAAS;IAcjB,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI,CAExB;IACD,IAAI,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI,CAEzB;IACD,IAAI,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI,CAEzB;IACD,KAAK,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI,CAE1B;IACD,KAAK,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI,CAE1B;CACF"}
@@ -0,0 +1,13 @@
1
+ import { type DepsType } from "@solid-stack/di";
2
+ import type { ILogger } from "../../types/index.js";
3
+ export declare class SilentLogger implements ILogger {
4
+ deps: DepsType<typeof SilentLogger.deps>;
5
+ static deps: {};
6
+ constructor(deps: DepsType<typeof SilentLogger.deps>);
7
+ log(..._args: any[]): void;
8
+ info(..._args: any[]): void;
9
+ warn(..._args: any[]): void;
10
+ error(..._args: any[]): void;
11
+ debug(..._args: any[]): void;
12
+ }
13
+ //# sourceMappingURL=SilentLogger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SilentLogger.d.ts","sourceRoot":"","sources":["../../../src/core/logging/SilentLogger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEpD,qBACa,YAAa,YAAW,OAAO;IAEvB,IAAI,EAAE,QAAQ,CAAC,OAAO,YAAY,CAAC,IAAI,CAAC;IAD3D,OAAc,IAAI,KAAM;IACxB,YAAmB,IAAI,EAAE,QAAQ,CAAC,OAAO,YAAY,CAAC,IAAI,CAAC,EAAI;IAC/D,GAAG,CAAC,GAAG,KAAK,EAAE,GAAG,EAAE,GAAG,IAAI,CAAG;IAC7B,IAAI,CAAC,GAAG,KAAK,EAAE,GAAG,EAAE,GAAG,IAAI,CAAG;IAC9B,IAAI,CAAC,GAAG,KAAK,EAAE,GAAG,EAAE,GAAG,IAAI,CAAG;IAC9B,KAAK,CAAC,GAAG,KAAK,EAAE,GAAG,EAAE,GAAG,IAAI,CAAG;IAC/B,KAAK,CAAC,GAAG,KAAK,EAAE,GAAG,EAAE,GAAG,IAAI,CAAG;CAChC"}
@@ -0,0 +1,3 @@
1
+ export { Logger } from "./Logger.js";
2
+ export { SilentLogger } from "./SilentLogger.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/logging/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,15 @@
1
+ import type { Container } from "@solid-stack/di";
2
+ import { type StartOptions } from "../types/index.js";
3
+ /**
4
+ * Boots up and executes the Agnos application lifecycle.
5
+ *
6
+ * Automatically:
7
+ * 1. Initializes core infrastructure (ILogger, etc.).
8
+ * 2. Auto-discovers and loads feature modules if a features directory is specified.
9
+ * 3. Resolves the Program lifecycle coordinator and runs the presentation layer.
10
+ *
11
+ * @param container - The @solid-stack/di Container instance.
12
+ * @param options - Optional configuration including feature directory path.
13
+ */
14
+ export declare const start: (container: Container, options?: StartOptions) => Promise<void>;
15
+ //# sourceMappingURL=start.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"start.d.ts","sourceRoot":"","sources":["../../src/core/start.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAIjD,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE/D;;;;;;;;;;GAUG;AACH,eAAO,MAAM,KAAK,cACL,SAAS,YACV,YAAY,KACrB,OAAO,CAAC,IAAI,CAsBd,CAAC"}