ega-v9 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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Dae Jung Byun
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,44 @@
1
+ # EGA V9
2
+
3
+ Execution Governance AI V9 is a deterministic runtime-governance framework for autonomous AI workflows.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install ega-v9
9
+ ```
10
+
11
+ ## Quick Start
12
+
13
+ ```javascript
14
+ import { govern } from "ega-v9";
15
+
16
+ const result = govern([
17
+ { step: 1, action: "search_product", item: "laptop" },
18
+ { step: 2, action: "select_product", quantity: 1 },
19
+ { step: 3, action: "checkout_request", approved: true }
20
+ ]);
21
+
22
+ console.log(result.verification);
23
+ ```
24
+
25
+ ## Core Concepts
26
+
27
+ - Deterministic replay
28
+ - Provenance-aware verification
29
+ - Trust-state evaluation
30
+ - Fail-closed containment
31
+
32
+ ## Example Output
33
+
34
+ ```json
35
+ {
36
+ "replayConsistency": true,
37
+ "trustState": "VERIFIED",
38
+ "containmentRequired": false
39
+ }
40
+ ```
41
+
42
+ ## License
43
+
44
+ MIT
@@ -0,0 +1,9 @@
1
+ import { govern } from "../src/index.js";
2
+
3
+ const result = govern([
4
+ { step: 1, action: "search_product", item: "laptop" },
5
+ { step: 2, action: "select_product", quantity: 1 },
6
+ { step: 3, action: "checkout_request", approved: true }
7
+ ]);
8
+
9
+ console.log(JSON.stringify(result, null, 2));
package/package.json ADDED
@@ -0,0 +1,27 @@
1
+ {
2
+ "name": "ega-v9",
3
+ "version": "0.1.0",
4
+ "description": "Execution Governance AI V9: deterministic runtime governance for autonomous AI workflows.",
5
+ "main": "src/index.js",
6
+ "type": "module",
7
+ "keywords": [
8
+ "ega",
9
+ "execution-governance",
10
+ "ai-agents",
11
+ "deterministic-replay",
12
+ "runtime-governance",
13
+ "provenance",
14
+ "containment"
15
+ ],
16
+ "author": "Dae Jung Byun",
17
+ "license": "MIT",
18
+ "files": [
19
+ "src",
20
+ "examples",
21
+ "README.md",
22
+ "LICENSE"
23
+ ],
24
+ "scripts": {
25
+ "test": "node examples/basic.js"
26
+ }
27
+ }
package/src/index.js ADDED
@@ -0,0 +1,40 @@
1
+ import crypto from "crypto";
2
+
3
+ export function createTrace(actions = []) {
4
+ return {
5
+ id: crypto.randomUUID(),
6
+ createdAt: new Date().toISOString(),
7
+ actions
8
+ };
9
+ }
10
+
11
+ export function replay(trace) {
12
+ return {
13
+ replayed: true,
14
+ traceId: trace.id,
15
+ actions: trace.actions
16
+ };
17
+ }
18
+
19
+ export function verify(trace, replayedTrace) {
20
+ const original = JSON.stringify(trace.actions);
21
+ const replayed = JSON.stringify(replayedTrace.actions);
22
+
23
+ return {
24
+ replayConsistency: original === replayed,
25
+ trustState: original === replayed ? "VERIFIED" : "DIVERGED",
26
+ containmentRequired: original !== replayed
27
+ };
28
+ }
29
+
30
+ export function govern(actions = []) {
31
+ const trace = createTrace(actions);
32
+ const replayedTrace = replay(trace);
33
+ const verification = verify(trace, replayedTrace);
34
+
35
+ return {
36
+ trace,
37
+ replayedTrace,
38
+ verification
39
+ };
40
+ }