refactor: 리펙토링

This commit is contained in:
DongHyeonka
2026-08-01 19:39:59 +09:00
parent 9c959ea2a5
commit c6da03369c
171 changed files with 20329 additions and 782 deletions
+9 -1
View File
@@ -91,9 +91,17 @@ export function createApplication(
buildId: release.buildId,
releaseId: release.releaseId,
configSchemaVersion: release.configSchemaVersion,
apiContractVersion: release.apiContractVersion,
...(release.apiContractVersion === undefined
? {}
: { apiContractVersion: release.apiContractVersion }),
...(release.contractSetDigest === undefined
? {}
: { contractSetDigest: release.contractSetDigest }),
});
},
getCapabilitySnapshot() {
return outputPorts.runtimeCapabilities.getSnapshot();
},
});
const recovery = Object.freeze({
+11 -1
View File
@@ -1,7 +1,9 @@
import type { SessionState } from "../auth-session-port.ts";
import type { RuntimeCapabilitySnapshot } from "../runtime-capabilities-port.ts";
import type { StoragePort } from "../storage-port.ts";
export type { SessionState } from "../auth-session-port.ts";
export type { RuntimeCapabilitySnapshot };
/**
* Features add their driving API through module augmentation. The application
@@ -31,7 +33,10 @@ export type ReleaseSummary = Readonly<{
buildId: string;
releaseId: string;
configSchemaVersion: string;
apiContractVersion: string;
/** Legacy V1 scalar; absent once the release manifest is V2. */
apiContractVersion?: string;
/** §5.2 contract set identity for a V2 release manifest. */
contractSetDigest?: string;
}>;
export type ApplicationApi = Readonly<{
@@ -54,6 +59,11 @@ export type ApplicationApi = Readonly<{
}>;
runtime: Readonly<{
getReleaseSummary(): Promise<ReleaseSummary>;
/**
* §3.5. The static selection reduced by the runtime overrides. Presentation
* reads capability state here instead of importing the composition root.
*/
getCapabilitySnapshot(): RuntimeCapabilitySnapshot;
}>;
recovery: Readonly<{
recoverChunk(input: Readonly<{
@@ -1,5 +1,6 @@
import type { AuthSessionPort } from "../auth-session-port.ts";
import type { ReleaseInfoPort } from "../release-info-port.ts";
import type { RuntimeCapabilitiesPort } from "../runtime-capabilities-port.ts";
import type { StoragePort } from "../storage-port.ts";
import type { TelemetryPort } from "../telemetry-port.ts";
import type { DiagnosticsPort } from "../diagnostics-port.ts";
@@ -17,5 +18,6 @@ export type ApplicationOutputPorts = Readonly<{
diagnostics: DiagnosticsPort;
telemetry: TelemetryPort;
releaseInfo: ReleaseInfoPort;
runtimeCapabilities: RuntimeCapabilitiesPort;
navigation: Readonly<{ reload(): void }>;
}>;
+8 -1
View File
@@ -4,7 +4,13 @@ export type ReleaseInfo = Readonly<{
buildId: string;
commitSha?: string;
configSchemaVersion: string;
apiContractVersion: string;
/**
* §5.1. Legacy scalar, present only while a V1 release manifest is still
* accepted. A V2 manifest expresses contract identity through
* {@link ReleaseInfo.contractSetDigest}.
*/
apiContractVersion?: string;
contractSetDigest?: string;
assetManifestHash: string;
releaseId: string;
builtAt?: string;
@@ -17,6 +23,7 @@ export type ActiveReleaseInfo = Readonly<
| "buildId"
| "configSchemaVersion"
| "apiContractVersion"
| "contractSetDigest"
| "assetManifestHash"
| "releaseId"
| "routeChunks"
@@ -0,0 +1,12 @@
import type { RuntimeCapabilitySnapshot } from "../../contracts/runtime-capabilities.ts";
export type { RuntimeCapabilitySnapshot };
/**
* §3.5. The application reads capability state; it never resolves it. Only the
* composition root knows the runtime overrides, so the snapshot arrives here
* already reduced to counts and cannot be used to reach a runtime object.
*/
export type RuntimeCapabilitiesPort = Readonly<{
getSnapshot(): RuntimeCapabilitySnapshot;
}>;