arkgate 2.8.0 → 2.8.2
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/CHANGELOG.md +46 -0
- package/README.md +8 -0
- package/bin/ark-shared.mjs +66 -4
- package/bin/ark.mjs +50 -9
- package/bin/lib/agent-gates.mjs +32 -3
- package/bin/lib/doctor-plan.mjs +16 -0
- package/bin/lib/html-report.mjs +15 -0
- package/bin/lib/presets.mjs +86 -12
- package/dist/index.cjs +417 -338
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +29 -9
- package/dist/index.d.ts +29 -9
- package/dist/index.js +417 -338
- package/dist/index.js.map +1 -1
- package/dist/nestjs/index.cjs +452 -373
- package/dist/nestjs/index.cjs.map +1 -1
- package/dist/nestjs/index.d.cts +1 -1
- package/dist/nestjs/index.d.ts +1 -1
- package/dist/nestjs/index.js +452 -373
- package/dist/nestjs/index.js.map +1 -1
- package/dist/runtime/index.cjs +417 -338
- package/dist/runtime/index.cjs.map +1 -1
- package/dist/runtime/index.d.cts +1 -1
- package/dist/runtime/index.d.ts +1 -1
- package/dist/runtime/index.js +417 -338
- package/dist/runtime/index.js.map +1 -1
- package/dist/{types-CP3KkwZt.d.cts → types-CSJhEOk2.d.cts} +34 -0
- package/dist/{types-CP3KkwZt.d.ts → types-CSJhEOk2.d.ts} +34 -0
- package/docs/package-surface.md +1 -1
- package/docs/production-hardening.md +11 -4
- package/package.json +1 -1
- package/server.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { I as IntentRegistry, a as IntentName, D as DefineIntentOptions, b as IntentCreator, P as PolicyViolation, c as PolicySeverity, d as PolicyEnforcementMode, e as Policy, f as CreateArchitectureProfileOptions, g as ArchitectureProfile, h as ArkCheckConfig, i as CreateArchitectureProfileFromArkConfigOptions, j as CreateElevenLayerArkConfigOptions, k as DependencyGraph, G as GraphEdge, l as IntentRelationship, m as AuditStore, n as AuditRecord, o as AuditQuery, p as CreateAuditTrailOptions, q as AuditTrail, E as EventContractRegistry, r as EventContract, s as DomainEvent, t as EventContractValidationResult, O as OutboxStore, u as OutboxRecord, v as OutboxStatus, w as EventBusOptions, x as EventBus, y as CreateObservabilityReporterOptions, z as ObservabilityReporter, M as MetadataRegistry, R as ReadModelStore, B as CreateProjectionRegistryOptions, F as ProjectionRegistry, H as PolicyEngine, J as ArkManifest, W as WorkflowStore, S as SagaContext, K as WorkflowSnapshot, L as SagaDefinition, N as CreateWorkflowEngineOptions, Q as SagaInstance, T as WorkflowEngine, C as CreateArkKernelOptions, A as ArkKernel, U as ArkKernelConfig, V as CreateArkKernelFromConfigOptions, X as TraceRecordType, Y as TraceRecord, Z as ObservabilityDriftReport } from './types-
|
|
2
|
-
export { _ as ArchitectureLayer, $ as ArchitectureLayerConfig, a0 as ArchitectureRule, a1 as ArkManifestArchitecture, a2 as ArkManifestData, a3 as ArkManifestEntityLink, a4 as ArkManifestGraph, a5 as ArkManifestIntent, a6 as ArkManifestPolicy, a7 as ArkManifestProjection, a8 as AuditRecordInput, a9 as AuditRecordType, aa as CorrelationId, ab as EntityMeta, ac as EventContractIssue, ad as EventHandler, ae as EventInterceptionInfo, af as EventInterceptor, ag as EventInterceptorContext, ah as EventMetadata, ai as EventPayloadPatch, aj as EventPayloadSchema, ak as EventPublisher, al as EventSchemaField, am as EventSchemaFieldType, an as FieldMeta, ao as GraphNode, ap as IntentRelationshipKind, aq as ObservabilityFlow, ar as ObservedLayerFlowMode, as as PolicyEvaluationResult, at as ProjectionCheckpoint, au as ProjectionDefinition, av as PublishedEventRecord, aw as RetryPolicy, ax as SagaStatus, ay as SagaStep, az as TraceSink, aA as Unsubscribe, aB as WorkflowDefinition, aC as WorkflowStatus, aD as WorkflowStep } from './types-
|
|
1
|
+
import { I as IntentRegistry, a as IntentName, D as DefineIntentOptions, b as IntentCreator, P as PolicyViolation, c as PolicySeverity, d as PolicyEnforcementMode, e as Policy, f as CreateArchitectureProfileOptions, g as ArchitectureProfile, h as ArkCheckConfig, i as CreateArchitectureProfileFromArkConfigOptions, j as CreateElevenLayerArkConfigOptions, k as DependencyGraph, G as GraphEdge, l as IntentRelationship, m as AuditStore, n as AuditRecord, o as AuditQuery, p as CreateAuditTrailOptions, q as AuditTrail, E as EventContractRegistry, r as EventContract, s as DomainEvent, t as EventContractValidationResult, O as OutboxStore, u as OutboxRecord, v as OutboxStatus, w as EventBusOptions, x as EventBus, y as CreateObservabilityReporterOptions, z as ObservabilityReporter, M as MetadataRegistry, R as ReadModelStore, B as CreateProjectionRegistryOptions, F as ProjectionRegistry, H as PolicyEngine, J as ArkManifest, W as WorkflowStore, S as SagaContext, K as WorkflowSnapshot, L as SagaDefinition, N as CreateWorkflowEngineOptions, Q as SagaInstance, T as WorkflowEngine, C as CreateArkKernelOptions, A as ArkKernel, U as ArkKernelConfig, V as CreateArkKernelFromConfigOptions, X as TraceRecordType, Y as TraceRecord, Z as ObservabilityDriftReport } from './types-CSJhEOk2.cjs';
|
|
2
|
+
export { _ as ArchitectureLayer, $ as ArchitectureLayerConfig, a0 as ArchitectureRule, a1 as ArkManifestArchitecture, a2 as ArkManifestData, a3 as ArkManifestEntityLink, a4 as ArkManifestGraph, a5 as ArkManifestIntent, a6 as ArkManifestPolicy, a7 as ArkManifestProjection, a8 as AuditRecordInput, a9 as AuditRecordType, aa as CorrelationId, ab as EntityMeta, ac as EventContractIssue, ad as EventHandler, ae as EventInterceptionInfo, af as EventInterceptor, ag as EventInterceptorContext, ah as EventMetadata, ai as EventPayloadPatch, aj as EventPayloadSchema, ak as EventPublisher, al as EventSchemaField, am as EventSchemaFieldType, an as FieldMeta, ao as GraphNode, ap as IntentRelationshipKind, aq as ObservabilityFlow, ar as ObservedLayerFlowMode, as as PolicyEvaluationResult, at as ProjectionCheckpoint, au as ProjectionDefinition, av as PublishedEventRecord, aw as RetryPolicy, ax as SagaStatus, ay as SagaStep, az as TraceSink, aA as Unsubscribe, aB as WorkflowDefinition, aC as WorkflowStatus, aD as WorkflowStep } from './types-CSJhEOk2.cjs';
|
|
3
3
|
|
|
4
4
|
/** ArkGate library version — single source of truth. */
|
|
5
|
-
declare const version = "2.8.
|
|
5
|
+
declare const version = "2.8.2";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* defineIntent
|
|
@@ -200,6 +200,11 @@ declare function defineArchitectureProfilePolicy<Context extends {
|
|
|
200
200
|
relationships?: IntentRelationship[];
|
|
201
201
|
}>(profile: ArchitectureProfile, options?: Omit<LayerPolicyOptions, 'rules' | 'resolveLayer'>): Policy<Context>;
|
|
202
202
|
|
|
203
|
+
/**
|
|
204
|
+
* Reference in-process audit store. **Not production durability** — records do not
|
|
205
|
+
* survive process restarts. For production, inject an `AuditStore` that writes to your
|
|
206
|
+
* durable log/DB (see `docs/production-hardening.md`).
|
|
207
|
+
*/
|
|
203
208
|
declare class InMemoryAuditStore implements AuditStore {
|
|
204
209
|
private readonly maxRecords?;
|
|
205
210
|
private readonly records;
|
|
@@ -208,6 +213,10 @@ declare class InMemoryAuditStore implements AuditStore {
|
|
|
208
213
|
query(query?: AuditQuery): AuditRecord[];
|
|
209
214
|
clear(): void;
|
|
210
215
|
}
|
|
216
|
+
/**
|
|
217
|
+
* Create an audit trail. Defaults to `InMemoryAuditStore` (**not** production durability).
|
|
218
|
+
* Pass `options.store` for a durable backend.
|
|
219
|
+
*/
|
|
211
220
|
declare function createAuditTrail(options?: CreateAuditTrailOptions): AuditTrail;
|
|
212
221
|
|
|
213
222
|
declare class EventContractRegistryImpl implements EventContractRegistry {
|
|
@@ -221,6 +230,11 @@ declare class EventContractRegistryImpl implements EventContractRegistry {
|
|
|
221
230
|
}
|
|
222
231
|
declare function createEventContractRegistry(): EventContractRegistry;
|
|
223
232
|
|
|
233
|
+
/**
|
|
234
|
+
* Reference in-process outbox. **Not production durability** — state is lost on
|
|
235
|
+
* process exit. Use only for tests/demos/local single-process work; inject a durable
|
|
236
|
+
* `OutboxStore` in production (see `docs/production-hardening.md`).
|
|
237
|
+
*/
|
|
224
238
|
declare class InMemoryOutboxStore implements OutboxStore {
|
|
225
239
|
private readonly records;
|
|
226
240
|
enqueue(event: DomainEvent): Promise<OutboxRecord>;
|
|
@@ -231,13 +245,11 @@ declare class InMemoryOutboxStore implements OutboxStore {
|
|
|
231
245
|
}
|
|
232
246
|
|
|
233
247
|
/**
|
|
234
|
-
* EventBus implementation.
|
|
248
|
+
* EventBus implementation — public surface + publish orchestration.
|
|
235
249
|
*
|
|
236
|
-
*
|
|
237
|
-
*
|
|
238
|
-
*
|
|
239
|
-
* - Full publish history for observability
|
|
240
|
-
* - Strict registry validation (opt-in by default when registry provided)
|
|
250
|
+
* Publish pipeline stages live in cohesive modules (R8):
|
|
251
|
+
* guards → interceptors → contract re-check → observed layer flow →
|
|
252
|
+
* policy → history/outbox/trace → handlers → onPublish hook
|
|
241
253
|
*/
|
|
242
254
|
|
|
243
255
|
declare function createEventBus<Context = unknown>(options?: EventBusOptions<Context>): EventBus;
|
|
@@ -330,6 +342,10 @@ declare function createObservabilityReporter(options: CreateObservabilityReporte
|
|
|
330
342
|
|
|
331
343
|
declare function createMetadataRegistry(): MetadataRegistry;
|
|
332
344
|
|
|
345
|
+
/**
|
|
346
|
+
* Reference in-process read-model store. **Not production durability.**
|
|
347
|
+
* See `docs/production-hardening.md`.
|
|
348
|
+
*/
|
|
333
349
|
declare class InMemoryReadModelStore implements ReadModelStore {
|
|
334
350
|
private readonly states;
|
|
335
351
|
load<State = unknown>(name: string): State | undefined;
|
|
@@ -365,6 +381,10 @@ declare function createArkManifest(options?: CreateArkManifestOptions): ArkManif
|
|
|
365
381
|
* In-process workflow engine with durable-store seams.
|
|
366
382
|
*/
|
|
367
383
|
|
|
384
|
+
/**
|
|
385
|
+
* Reference in-process workflow store. **Not production durability.**
|
|
386
|
+
* See `docs/production-hardening.md`.
|
|
387
|
+
*/
|
|
368
388
|
declare class InMemoryWorkflowStore implements WorkflowStore {
|
|
369
389
|
private readonly snapshots;
|
|
370
390
|
save<P extends SagaContext>(snapshot: WorkflowSnapshot<P>): void;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { I as IntentRegistry, a as IntentName, D as DefineIntentOptions, b as IntentCreator, P as PolicyViolation, c as PolicySeverity, d as PolicyEnforcementMode, e as Policy, f as CreateArchitectureProfileOptions, g as ArchitectureProfile, h as ArkCheckConfig, i as CreateArchitectureProfileFromArkConfigOptions, j as CreateElevenLayerArkConfigOptions, k as DependencyGraph, G as GraphEdge, l as IntentRelationship, m as AuditStore, n as AuditRecord, o as AuditQuery, p as CreateAuditTrailOptions, q as AuditTrail, E as EventContractRegistry, r as EventContract, s as DomainEvent, t as EventContractValidationResult, O as OutboxStore, u as OutboxRecord, v as OutboxStatus, w as EventBusOptions, x as EventBus, y as CreateObservabilityReporterOptions, z as ObservabilityReporter, M as MetadataRegistry, R as ReadModelStore, B as CreateProjectionRegistryOptions, F as ProjectionRegistry, H as PolicyEngine, J as ArkManifest, W as WorkflowStore, S as SagaContext, K as WorkflowSnapshot, L as SagaDefinition, N as CreateWorkflowEngineOptions, Q as SagaInstance, T as WorkflowEngine, C as CreateArkKernelOptions, A as ArkKernel, U as ArkKernelConfig, V as CreateArkKernelFromConfigOptions, X as TraceRecordType, Y as TraceRecord, Z as ObservabilityDriftReport } from './types-
|
|
2
|
-
export { _ as ArchitectureLayer, $ as ArchitectureLayerConfig, a0 as ArchitectureRule, a1 as ArkManifestArchitecture, a2 as ArkManifestData, a3 as ArkManifestEntityLink, a4 as ArkManifestGraph, a5 as ArkManifestIntent, a6 as ArkManifestPolicy, a7 as ArkManifestProjection, a8 as AuditRecordInput, a9 as AuditRecordType, aa as CorrelationId, ab as EntityMeta, ac as EventContractIssue, ad as EventHandler, ae as EventInterceptionInfo, af as EventInterceptor, ag as EventInterceptorContext, ah as EventMetadata, ai as EventPayloadPatch, aj as EventPayloadSchema, ak as EventPublisher, al as EventSchemaField, am as EventSchemaFieldType, an as FieldMeta, ao as GraphNode, ap as IntentRelationshipKind, aq as ObservabilityFlow, ar as ObservedLayerFlowMode, as as PolicyEvaluationResult, at as ProjectionCheckpoint, au as ProjectionDefinition, av as PublishedEventRecord, aw as RetryPolicy, ax as SagaStatus, ay as SagaStep, az as TraceSink, aA as Unsubscribe, aB as WorkflowDefinition, aC as WorkflowStatus, aD as WorkflowStep } from './types-
|
|
1
|
+
import { I as IntentRegistry, a as IntentName, D as DefineIntentOptions, b as IntentCreator, P as PolicyViolation, c as PolicySeverity, d as PolicyEnforcementMode, e as Policy, f as CreateArchitectureProfileOptions, g as ArchitectureProfile, h as ArkCheckConfig, i as CreateArchitectureProfileFromArkConfigOptions, j as CreateElevenLayerArkConfigOptions, k as DependencyGraph, G as GraphEdge, l as IntentRelationship, m as AuditStore, n as AuditRecord, o as AuditQuery, p as CreateAuditTrailOptions, q as AuditTrail, E as EventContractRegistry, r as EventContract, s as DomainEvent, t as EventContractValidationResult, O as OutboxStore, u as OutboxRecord, v as OutboxStatus, w as EventBusOptions, x as EventBus, y as CreateObservabilityReporterOptions, z as ObservabilityReporter, M as MetadataRegistry, R as ReadModelStore, B as CreateProjectionRegistryOptions, F as ProjectionRegistry, H as PolicyEngine, J as ArkManifest, W as WorkflowStore, S as SagaContext, K as WorkflowSnapshot, L as SagaDefinition, N as CreateWorkflowEngineOptions, Q as SagaInstance, T as WorkflowEngine, C as CreateArkKernelOptions, A as ArkKernel, U as ArkKernelConfig, V as CreateArkKernelFromConfigOptions, X as TraceRecordType, Y as TraceRecord, Z as ObservabilityDriftReport } from './types-CSJhEOk2.js';
|
|
2
|
+
export { _ as ArchitectureLayer, $ as ArchitectureLayerConfig, a0 as ArchitectureRule, a1 as ArkManifestArchitecture, a2 as ArkManifestData, a3 as ArkManifestEntityLink, a4 as ArkManifestGraph, a5 as ArkManifestIntent, a6 as ArkManifestPolicy, a7 as ArkManifestProjection, a8 as AuditRecordInput, a9 as AuditRecordType, aa as CorrelationId, ab as EntityMeta, ac as EventContractIssue, ad as EventHandler, ae as EventInterceptionInfo, af as EventInterceptor, ag as EventInterceptorContext, ah as EventMetadata, ai as EventPayloadPatch, aj as EventPayloadSchema, ak as EventPublisher, al as EventSchemaField, am as EventSchemaFieldType, an as FieldMeta, ao as GraphNode, ap as IntentRelationshipKind, aq as ObservabilityFlow, ar as ObservedLayerFlowMode, as as PolicyEvaluationResult, at as ProjectionCheckpoint, au as ProjectionDefinition, av as PublishedEventRecord, aw as RetryPolicy, ax as SagaStatus, ay as SagaStep, az as TraceSink, aA as Unsubscribe, aB as WorkflowDefinition, aC as WorkflowStatus, aD as WorkflowStep } from './types-CSJhEOk2.js';
|
|
3
3
|
|
|
4
4
|
/** ArkGate library version — single source of truth. */
|
|
5
|
-
declare const version = "2.8.
|
|
5
|
+
declare const version = "2.8.2";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* defineIntent
|
|
@@ -200,6 +200,11 @@ declare function defineArchitectureProfilePolicy<Context extends {
|
|
|
200
200
|
relationships?: IntentRelationship[];
|
|
201
201
|
}>(profile: ArchitectureProfile, options?: Omit<LayerPolicyOptions, 'rules' | 'resolveLayer'>): Policy<Context>;
|
|
202
202
|
|
|
203
|
+
/**
|
|
204
|
+
* Reference in-process audit store. **Not production durability** — records do not
|
|
205
|
+
* survive process restarts. For production, inject an `AuditStore` that writes to your
|
|
206
|
+
* durable log/DB (see `docs/production-hardening.md`).
|
|
207
|
+
*/
|
|
203
208
|
declare class InMemoryAuditStore implements AuditStore {
|
|
204
209
|
private readonly maxRecords?;
|
|
205
210
|
private readonly records;
|
|
@@ -208,6 +213,10 @@ declare class InMemoryAuditStore implements AuditStore {
|
|
|
208
213
|
query(query?: AuditQuery): AuditRecord[];
|
|
209
214
|
clear(): void;
|
|
210
215
|
}
|
|
216
|
+
/**
|
|
217
|
+
* Create an audit trail. Defaults to `InMemoryAuditStore` (**not** production durability).
|
|
218
|
+
* Pass `options.store` for a durable backend.
|
|
219
|
+
*/
|
|
211
220
|
declare function createAuditTrail(options?: CreateAuditTrailOptions): AuditTrail;
|
|
212
221
|
|
|
213
222
|
declare class EventContractRegistryImpl implements EventContractRegistry {
|
|
@@ -221,6 +230,11 @@ declare class EventContractRegistryImpl implements EventContractRegistry {
|
|
|
221
230
|
}
|
|
222
231
|
declare function createEventContractRegistry(): EventContractRegistry;
|
|
223
232
|
|
|
233
|
+
/**
|
|
234
|
+
* Reference in-process outbox. **Not production durability** — state is lost on
|
|
235
|
+
* process exit. Use only for tests/demos/local single-process work; inject a durable
|
|
236
|
+
* `OutboxStore` in production (see `docs/production-hardening.md`).
|
|
237
|
+
*/
|
|
224
238
|
declare class InMemoryOutboxStore implements OutboxStore {
|
|
225
239
|
private readonly records;
|
|
226
240
|
enqueue(event: DomainEvent): Promise<OutboxRecord>;
|
|
@@ -231,13 +245,11 @@ declare class InMemoryOutboxStore implements OutboxStore {
|
|
|
231
245
|
}
|
|
232
246
|
|
|
233
247
|
/**
|
|
234
|
-
* EventBus implementation.
|
|
248
|
+
* EventBus implementation — public surface + publish orchestration.
|
|
235
249
|
*
|
|
236
|
-
*
|
|
237
|
-
*
|
|
238
|
-
*
|
|
239
|
-
* - Full publish history for observability
|
|
240
|
-
* - Strict registry validation (opt-in by default when registry provided)
|
|
250
|
+
* Publish pipeline stages live in cohesive modules (R8):
|
|
251
|
+
* guards → interceptors → contract re-check → observed layer flow →
|
|
252
|
+
* policy → history/outbox/trace → handlers → onPublish hook
|
|
241
253
|
*/
|
|
242
254
|
|
|
243
255
|
declare function createEventBus<Context = unknown>(options?: EventBusOptions<Context>): EventBus;
|
|
@@ -330,6 +342,10 @@ declare function createObservabilityReporter(options: CreateObservabilityReporte
|
|
|
330
342
|
|
|
331
343
|
declare function createMetadataRegistry(): MetadataRegistry;
|
|
332
344
|
|
|
345
|
+
/**
|
|
346
|
+
* Reference in-process read-model store. **Not production durability.**
|
|
347
|
+
* See `docs/production-hardening.md`.
|
|
348
|
+
*/
|
|
333
349
|
declare class InMemoryReadModelStore implements ReadModelStore {
|
|
334
350
|
private readonly states;
|
|
335
351
|
load<State = unknown>(name: string): State | undefined;
|
|
@@ -365,6 +381,10 @@ declare function createArkManifest(options?: CreateArkManifestOptions): ArkManif
|
|
|
365
381
|
* In-process workflow engine with durable-store seams.
|
|
366
382
|
*/
|
|
367
383
|
|
|
384
|
+
/**
|
|
385
|
+
* Reference in-process workflow store. **Not production durability.**
|
|
386
|
+
* See `docs/production-hardening.md`.
|
|
387
|
+
*/
|
|
368
388
|
declare class InMemoryWorkflowStore implements WorkflowStore {
|
|
369
389
|
private readonly snapshots;
|
|
370
390
|
save<P extends SagaContext>(snapshot: WorkflowSnapshot<P>): void;
|