ark-runtime-kernel 1.1.0 → 1.3.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.
@@ -0,0 +1,59 @@
1
+ # Production Hardening
2
+
3
+ Ark's built-in stores are intentionally in-memory defaults. They are appropriate for tests,
4
+ local development, examples, and single-process demos. Production systems should provide
5
+ stores that match their durability, ordering, retention, and operational requirements.
6
+
7
+ ## In-Memory Defaults
8
+
9
+ These defaults do not survive process restarts:
10
+
11
+ - `InMemoryAuditStore`
12
+ - `InMemoryOutboxStore`
13
+ - `InMemoryReadModelStore`
14
+ - `InMemoryWorkflowStore`
15
+
16
+ Use them only when losing state is acceptable.
17
+
18
+ ## Production Store Checklist
19
+
20
+ When implementing Ark store interfaces in production, cover these guarantees explicitly:
21
+
22
+ - Durability: records survive process restarts and deploys.
23
+ - Idempotency: repeated writes or dispatch attempts do not corrupt state.
24
+ - Ordering: event/outbox ordering is defined where consumers depend on it.
25
+ - Concurrency: simultaneous publishers/workers cannot race checkpoints or workflow state.
26
+ - Retention: audit and trace records have an explicit retention policy.
27
+ - Observability: failed writes and dispatches are visible to operators.
28
+ - Migration: schema changes for stored records are versioned.
29
+
30
+ ## Interface Targets
31
+
32
+ | Concern | Interface |
33
+ |---------|-----------|
34
+ | Audit records | `AuditStore` |
35
+ | Outbox dispatch handoff | `OutboxStore` |
36
+ | Projection state | `ReadModelStore` |
37
+ | Workflow snapshots | `WorkflowStore` |
38
+
39
+ ## Example Shape
40
+
41
+ ```ts
42
+ class DurableAuditStore implements AuditStore {
43
+ async append(record: AuditRecord): Promise<void> {
44
+ // Insert into your database with an idempotent key.
45
+ }
46
+
47
+ async query(query: AuditQuery = {}): Promise<AuditRecord[]> {
48
+ // Apply query filters and retention-aware ordering.
49
+ return [];
50
+ }
51
+
52
+ async clear(): Promise<void> {
53
+ // Usually only enabled in tests or isolated maintenance jobs.
54
+ }
55
+ }
56
+ ```
57
+
58
+ Ark does not ship a database adapter in core because storage choice is operationally
59
+ specific. Keep those adapters in the application or a separate integration package.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ark-runtime-kernel",
3
- "version": "1.1.0",
3
+ "version": "1.3.0",
4
4
  "description": "Architectural Runtime Kernel — governance for Hexagonal + Event-Driven + DDD systems",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -24,6 +24,7 @@
24
24
  }
25
25
  },
26
26
  "bin": {
27
+ "ark": "bin/ark.mjs",
27
28
  "ark-check": "bin/ark-check.mjs",
28
29
  "ark-mcp": "bin/ark-mcp.mjs"
29
30
  },
@@ -31,6 +32,7 @@
31
32
  "files": [
32
33
  "bin",
33
34
  "dist",
35
+ "docs",
34
36
  "server.json",
35
37
  "README.md",
36
38
  "LICENSE"
@@ -43,6 +45,7 @@
43
45
  "typecheck": "tsc --noEmit",
44
46
  "check:architecture": "node bin/ark-check.mjs --root . --config ark.config.json --strict-config",
45
47
  "clean": "rm -rf dist",
48
+ "postinstall": "node bin/ark-postinstall.mjs",
46
49
  "release:npm": "node scripts/release-npm.mjs",
47
50
  "prepack": "npm run build"
48
51
  },
package/server.json CHANGED
@@ -6,12 +6,12 @@
6
6
  "url": "https://github.com/pedroknigge/ark-runtime-kernel",
7
7
  "source": "github"
8
8
  },
9
- "version": "1.1.0",
9
+ "version": "1.3.0",
10
10
  "packages": [
11
11
  {
12
12
  "registry_type": "npm",
13
13
  "identifier": "ark-runtime-kernel",
14
- "version": "1.1.0",
14
+ "version": "1.3.0",
15
15
  "transport": {
16
16
  "type": "stdio"
17
17
  },