@hardkas/core 0.8.5-alpha → 0.8.10-alpha
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/index.d.ts +26 -26
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -382,7 +382,7 @@ declare function writeFileAtomicSync(targetPath: string, data: string | Buffer,
|
|
|
382
382
|
/**
|
|
383
383
|
* HardKAS Corruption Taxonomy & Issue Reporting
|
|
384
384
|
*/
|
|
385
|
-
type CorruptionCode = "ARTIFACT_JSON_INVALID" | "ARTIFACT_SCHEMA_MISSING" | "ARTIFACT_SCHEMA_INVALID" | "ARTIFACT_HASH_MISMATCH" | "ARTIFACT_ID_INVALID" | "ARTIFACT_LINEAGE_INVALID" | "EVENT_JSON_INVALID" | "EVENT_SCHEMA_INVALID" | "EVENT_LINE_CORRUPT" | "STORE_STALE" | "STORE_CORRUPT" | "STORE_REBUILD_REQUIRED" | "DUPLICATE_ARTIFACT" | "DUPLICATE_EVENT" | "SEMANTIC_DIVERGENCE" | "REPLAY_PARTIAL" | "REPLAY_UNSUPPORTED_CHECK" | "LOCK_HELD" | "LOCK_TIMEOUT" | "STALE_LOCK" | "LOCK_RELEASE_FAILED" | "LOCK_OWNER_MISMATCH" | "LOCK_METADATA_INVALID" | "STORE_MIGRATION_REQUIRED" | "STORE_MIGRATION_FAILED" | "STORE_MIGRATION_CHECKSUM_MISMATCH" | "STORE_SCHEMA_UNSUPPORTED" | "STORE_LEGACY_BOOTSTRAPPED";
|
|
385
|
+
type CorruptionCode = "ARTIFACT_JSON_INVALID" | "ARTIFACT_SCHEMA_MISSING" | "ARTIFACT_SCHEMA_INVALID" | "ARTIFACT_HASH_MISMATCH" | "ARTIFACT_ID_INVALID" | "LEGACY_HASH_VERSION_UNSAFE" | "ARTIFACT_LINEAGE_INVALID" | "EVENT_JSON_INVALID" | "EVENT_SCHEMA_INVALID" | "EVENT_LINE_CORRUPT" | "STORE_STALE" | "STORE_CORRUPT" | "STORE_REBUILD_REQUIRED" | "DUPLICATE_ARTIFACT" | "DUPLICATE_EVENT" | "SEMANTIC_DIVERGENCE" | "REPLAY_PARTIAL" | "REPLAY_UNSUPPORTED_CHECK" | "LOCK_HELD" | "LOCK_TIMEOUT" | "STALE_LOCK" | "LOCK_RELEASE_FAILED" | "LOCK_OWNER_MISMATCH" | "LOCK_METADATA_INVALID" | "STORE_MIGRATION_REQUIRED" | "STORE_MIGRATION_FAILED" | "STORE_MIGRATION_CHECKSUM_MISMATCH" | "STORE_SCHEMA_UNSUPPORTED" | "STORE_LEGACY_BOOTSTRAPPED";
|
|
386
386
|
type CorruptionSeverity = "warning" | "error";
|
|
387
387
|
interface CorruptionIssue {
|
|
388
388
|
readonly code: CorruptionCode;
|
|
@@ -560,6 +560,29 @@ declare function readSnapshotManifest(snapshotDir: string): Promise<SnapshotMani
|
|
|
560
560
|
*/
|
|
561
561
|
declare function deterministicCompare(a: string, b: string): number;
|
|
562
562
|
|
|
563
|
+
interface RotationResult {
|
|
564
|
+
rotated: boolean;
|
|
565
|
+
archivePath?: string;
|
|
566
|
+
bytesRotated?: number;
|
|
567
|
+
reason?: string;
|
|
568
|
+
}
|
|
569
|
+
declare class TelemetryRotator {
|
|
570
|
+
private static readonly DEFAULT_MAX_SIZE_BYTES;
|
|
571
|
+
/**
|
|
572
|
+
* Rotates the telemetry stream if it exceeds the maximum size.
|
|
573
|
+
* This is a safe operation that renames the active file to an archive directory.
|
|
574
|
+
*/
|
|
575
|
+
static rotateIfNeeded(rootDir: string, maxSizeBytes?: number): RotationResult;
|
|
576
|
+
/**
|
|
577
|
+
* Forces a rotation regardless of file size.
|
|
578
|
+
*/
|
|
579
|
+
static forceRotate(rootDir: string): RotationResult;
|
|
580
|
+
/**
|
|
581
|
+
* Lists all archived telemetry segments.
|
|
582
|
+
*/
|
|
583
|
+
static listArchivedSegments(rootDir: string): string[];
|
|
584
|
+
}
|
|
585
|
+
|
|
563
586
|
type TelemetrySubsystem = "lock" | "fs" | "replay" | "normalization" | "query-store" | "lineage" | "projection" | "unknown";
|
|
564
587
|
type AnomalyType = "LOCK_CONTENTION" | "STALE_LOCK_RECOVERY" | "FS_RETRY" | "NORMALIZATION_COLLISION" | "REPLAY_RECONCILIATION" | "EXTERNAL_MUTATION" | "PATH_TRAVERSAL_ATTEMPT" | "ORPHAN_PROJECTION_RECOVERY";
|
|
565
588
|
type Severity = "low" | "medium" | "high" | "critical";
|
|
@@ -616,29 +639,6 @@ declare class TelemetryProxy {
|
|
|
616
639
|
}
|
|
617
640
|
declare const EnvironmentTelemetry: TelemetryProxy;
|
|
618
641
|
|
|
619
|
-
interface RotationResult {
|
|
620
|
-
rotated: boolean;
|
|
621
|
-
archivePath?: string;
|
|
622
|
-
bytesRotated?: number;
|
|
623
|
-
reason?: string;
|
|
624
|
-
}
|
|
625
|
-
declare class TelemetryRotator {
|
|
626
|
-
private static readonly DEFAULT_MAX_SIZE_BYTES;
|
|
627
|
-
/**
|
|
628
|
-
* Rotates the telemetry stream if it exceeds the maximum size.
|
|
629
|
-
* This is a safe operation that renames the active file to an archive directory.
|
|
630
|
-
*/
|
|
631
|
-
static rotateIfNeeded(rootDir: string, maxSizeBytes?: number): RotationResult;
|
|
632
|
-
/**
|
|
633
|
-
* Forces a rotation regardless of file size.
|
|
634
|
-
*/
|
|
635
|
-
static forceRotate(rootDir: string): RotationResult;
|
|
636
|
-
/**
|
|
637
|
-
* Lists all archived telemetry segments.
|
|
638
|
-
*/
|
|
639
|
-
static listArchivedSegments(rootDir: string): string[];
|
|
640
|
-
}
|
|
641
|
-
|
|
642
642
|
interface DeterministicClock {
|
|
643
643
|
now(): number;
|
|
644
644
|
}
|
|
@@ -787,7 +787,7 @@ declare class AppendCoordinator {
|
|
|
787
787
|
};
|
|
788
788
|
}
|
|
789
789
|
|
|
790
|
-
declare const CURRENT_RUNTIME_VERSION = "0.8.
|
|
790
|
+
declare const CURRENT_RUNTIME_VERSION = "0.8.10-alpha";
|
|
791
791
|
declare const MIN_SUPPORTED_VERSION = "0.5.0-alpha";
|
|
792
792
|
interface MigrationStatus {
|
|
793
793
|
needsMigration: boolean;
|
|
@@ -892,4 +892,4 @@ declare function parseHardkasConfig(input: unknown): HardkasConfig;
|
|
|
892
892
|
declare function parseKasToSompi(input: string): bigint;
|
|
893
893
|
declare function formatSompi(amountSompi: bigint): string;
|
|
894
894
|
|
|
895
|
-
export { type AcquireLockArgs, type AnomalyEvent, type AnomalyType, AppendCoordinator, type ArtifactId, type ArtifactStatus, type ArtifactType, ArtifactTypeSchema, type Brand, type Branded, CURRENT_RUNTIME_VERSION, type ContentHash, type CoreEvent, type CoreEventListener, type CorrelationId, type CorruptionCode, type CorruptionIssue, type CorruptionSeverity, type CreateSnapshotOptions, type DaaScore, type DeterministicClock, type DeterministicDiff, type DeterministicRandom, EnvironmentTelemetry, type EventDomain, type EventEnvelope, type EventId, type EventKind, type EventPayloadByKind, type EventSequence, type ExecutionMode, ExecutionModeSchema, type HardkasConfig, HardkasError, type IdProvider, type IntegrityStatus, type InvariantDomain, type InvariantSeverity, InvariantViolationError, type KaspaAddress, LOCK_ORDER, type LayeredReplayDiff, type LineageId, type LockHandle, type LockMetadata, MIN_SUPPORTED_VERSION, MigrationManager, type MigrationResult, type MigrationStatus, type NetworkId, NetworkIdSchema, type ReplayContext, type RpcEndpointId, type RuntimeContext, type RuntimeNoiseDiff, SOMPI_PER_KAS, type SchemaVersion, type SemanticDriftReport, type SemanticIdentity, type Severity, type SnapshotManifest, type StampedEvent, type StateProvenance, type StructuralDiff, TelemetryManager, TelemetryRotator, type TelemetrySubsystem, type TxId, type UnknownEventPayload, type WorkflowId, type WriteFileAtomicOptions, acquireLock, artifactTypeSchema, asArtifactId, asContentHash, asCorrelationId, asDaaScore, asEventId, asEventSequence, asKaspaAddress, asLineageId, asNetworkId, asRpcEndpointId, asTxId, asWorkflowId, assertNoSemanticDrift, attachLedgerAppender, classifyArtifactStatus, clearLock, comparePrePostMigrationLineage, coreEvents, createEventEnvelope, createSnapshot, detectSemanticDrift, deterministicCompare, diffReplays, executionModeSchema, formatCorruptionIssue, formatSompi, getTelemetry, globalTelemetry, hardkasConfigSchema, isProcessAlive, kaspaNetworkIdSchema, listLocks, maskSecrets, migrateArtifact, parseHardkasConfig, parseKasToSompi, readSnapshotManifest, redactSecret, resolveCanonicalArtifact, resolveLineage, systemRuntimeContext, telemetryContextStorage, validateEventEnvelope, validateStatusTransition, verifyArtifactIntegrity, verifyCapabilityBoundary, verifyMigrationIntegrity, verifyProjectionFreshness, verifyReplay, withLock, withLocks, writeFileAtomic, writeFileAtomicSync };
|
|
895
|
+
export { type AcquireLockArgs, type AnomalyEvent, type AnomalyType, AppendCoordinator, type ArtifactId, type ArtifactStatus, type ArtifactType, ArtifactTypeSchema, type Brand, type Branded, CURRENT_RUNTIME_VERSION, type ContentHash, type CoreEvent, type CoreEventListener, type CorrelationId, type CorruptionCode, type CorruptionIssue, type CorruptionSeverity, type CreateSnapshotOptions, type DaaScore, type DeterministicClock, type DeterministicDiff, type DeterministicRandom, EnvironmentTelemetry, type EventDomain, type EventEnvelope, type EventId, type EventKind, type EventPayloadByKind, type EventSequence, type ExecutionMode, ExecutionModeSchema, type HardkasConfig, HardkasError, type IdProvider, type IntegrityStatus, type InvariantDomain, type InvariantSeverity, InvariantViolationError, type KaspaAddress, LOCK_ORDER, type LayeredReplayDiff, type LineageId, type LockHandle, type LockMetadata, MIN_SUPPORTED_VERSION, MigrationManager, type MigrationResult, type MigrationStatus, type NetworkId, NetworkIdSchema, type ReplayContext, type RotationResult, type RpcEndpointId, type RuntimeContext, type RuntimeNoiseDiff, SOMPI_PER_KAS, type SchemaVersion, type SemanticDriftReport, type SemanticIdentity, type Severity, type SnapshotManifest, type StampedEvent, type StateProvenance, type StructuralDiff, TelemetryManager, TelemetryRotator, type TelemetrySubsystem, type TxId, type UnknownEventPayload, type WorkflowId, type WriteFileAtomicOptions, acquireLock, artifactTypeSchema, asArtifactId, asContentHash, asCorrelationId, asDaaScore, asEventId, asEventSequence, asKaspaAddress, asLineageId, asNetworkId, asRpcEndpointId, asTxId, asWorkflowId, assertNoSemanticDrift, attachLedgerAppender, classifyArtifactStatus, clearLock, comparePrePostMigrationLineage, coreEvents, createEventEnvelope, createSnapshot, detectSemanticDrift, deterministicCompare, diffReplays, executionModeSchema, formatCorruptionIssue, formatSompi, getTelemetry, globalTelemetry, hardkasConfigSchema, isProcessAlive, kaspaNetworkIdSchema, listLocks, maskSecrets, migrateArtifact, parseHardkasConfig, parseKasToSompi, readSnapshotManifest, redactSecret, resolveCanonicalArtifact, resolveLineage, systemRuntimeContext, telemetryContextStorage, validateEventEnvelope, validateStatusTransition, verifyArtifactIntegrity, verifyCapabilityBoundary, verifyMigrationIntegrity, verifyProjectionFreshness, verifyReplay, withLock, withLocks, writeFileAtomic, writeFileAtomicSync };
|
package/dist/index.js
CHANGED
|
@@ -956,7 +956,7 @@ async function createSnapshot(options) {
|
|
|
956
956
|
const manifest = {
|
|
957
957
|
snapshotVersion: 1,
|
|
958
958
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
959
|
-
hardkasVersion: "0.8.
|
|
959
|
+
hardkasVersion: "0.8.10-alpha",
|
|
960
960
|
stateAuthority: "filesystem",
|
|
961
961
|
projectionAuthority: "sqlite",
|
|
962
962
|
deterministicScope,
|
|
@@ -1205,7 +1205,7 @@ Resolution Command: ${report.exactReplayCommand}`
|
|
|
1205
1205
|
// src/migrations.ts
|
|
1206
1206
|
import fs6 from "fs";
|
|
1207
1207
|
import path8 from "path";
|
|
1208
|
-
var CURRENT_RUNTIME_VERSION = "0.8.
|
|
1208
|
+
var CURRENT_RUNTIME_VERSION = "0.8.10-alpha";
|
|
1209
1209
|
var MIN_SUPPORTED_VERSION = "0.5.0-alpha";
|
|
1210
1210
|
var MigrationManager = class {
|
|
1211
1211
|
static checkVersion(rootDir) {
|