@mplp/runtime-minimal 1.0.3 → 1.0.5
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 +4 -4
- package/DERIVATION_PROOF.yaml +33 -0
- package/LICENSE +17 -0
- package/LICENSE.txt +201 -201
- package/README.md +8 -8
- package/dist/ael/index.d.ts +8 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +8 -1
- package/dist/orchestrator/error-recovery.d.ts +8 -1
- package/dist/orchestrator/error-recovery.js +8 -1
- package/dist/orchestrator/index.d.ts +8 -1
- package/dist/orchestrator/index.js +8 -1
- package/dist/orchestrator/multi-agent.d.ts +8 -1
- package/dist/orchestrator/multi-agent.js +8 -1
- package/dist/orchestrator/risk-confirmation.d.ts +8 -1
- package/dist/orchestrator/risk-confirmation.js +8 -1
- package/dist/orchestrator/single-agent.d.ts +8 -1
- package/dist/registry/modules-registry.d.ts +8 -1
- package/dist/types/runtime-context.d.ts +8 -1
- package/dist/types/runtime-result.d.ts +8 -1
- package/dist/vsl/index.d.ts +8 -1
- package/package.json +9 -7
- package/tests/single-agent.runtime.test.ts +131 -131
- package/tsconfig.json +23 -23
- package/src/ael/index.d.ts +0 -37
- package/src/ael/index.js +0 -26
- package/src/ael/index.ts +0 -42
- package/src/index.d.ts +0 -13
- package/src/index.js +0 -29
- package/src/index.ts +0 -13
- package/src/orchestrator/error-recovery.d.ts +0 -8
- package/src/orchestrator/error-recovery.js +0 -14
- package/src/orchestrator/error-recovery.ts +0 -11
- package/src/orchestrator/index.d.ts +0 -11
- package/src/orchestrator/index.js +0 -28
- package/src/orchestrator/index.ts +0 -12
- package/src/orchestrator/multi-agent.d.ts +0 -8
- package/src/orchestrator/multi-agent.js +0 -14
- package/src/orchestrator/multi-agent.ts +0 -11
- package/src/orchestrator/risk-confirmation.d.ts +0 -8
- package/src/orchestrator/risk-confirmation.js +0 -14
- package/src/orchestrator/risk-confirmation.ts +0 -11
- package/src/orchestrator/single-agent.d.ts +0 -21
- package/src/orchestrator/single-agent.js +0 -112
- package/src/orchestrator/single-agent.ts +0 -134
- package/src/registry/modules-registry.d.ts +0 -21
- package/src/registry/modules-registry.js +0 -36
- package/src/registry/modules-registry.ts +0 -62
- package/src/types/runtime-context.d.ts +0 -24
- package/src/types/runtime-context.js +0 -9
- package/src/types/runtime-context.ts +0 -27
- package/src/types/runtime-result.d.ts +0 -18
- package/src/types/runtime-result.js +0 -9
- package/src/types/runtime-result.ts +0 -20
- package/src/vsl/index.d.ts +0 -28
- package/src/vsl/index.js +0 -35
- package/src/vsl/index.ts +0 -43
|
@@ -2,7 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.runMultiAgentFlow = runMultiAgentFlow;
|
|
4
4
|
/**
|
|
5
|
-
* © 2025
|
|
5
|
+
* © 2025 Bangshi Beijing Network Technology Limited Company
|
|
6
|
+
* Licensed under the Apache License, Version 2.0.
|
|
7
|
+
*
|
|
8
|
+
* This file is part of the MPLP reference implementation.
|
|
9
|
+
* It is NOT part of the frozen protocol specification.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* © 2025 Bangshi Beijing Network Technology Limited Company
|
|
6
13
|
* Licensed under the Apache License, Version 2.0.
|
|
7
14
|
*
|
|
8
15
|
* This file is part of the MPLP reference implementation.
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* © 2025
|
|
2
|
+
* © 2025 Bangshi Beijing Network Technology Limited Company
|
|
3
|
+
* Licensed under the Apache License, Version 2.0.
|
|
4
|
+
*
|
|
5
|
+
* This file is part of the MPLP reference implementation.
|
|
6
|
+
* It is NOT part of the frozen protocol specification.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* © 2025 Bangshi Beijing Network Technology Limited Company
|
|
3
10
|
* Licensed under the Apache License, Version 2.0.
|
|
4
11
|
*
|
|
5
12
|
* This file is part of the MPLP reference implementation.
|
|
@@ -2,7 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.runRiskConfirmationFlow = runRiskConfirmationFlow;
|
|
4
4
|
/**
|
|
5
|
-
* © 2025
|
|
5
|
+
* © 2025 Bangshi Beijing Network Technology Limited Company
|
|
6
|
+
* Licensed under the Apache License, Version 2.0.
|
|
7
|
+
*
|
|
8
|
+
* This file is part of the MPLP reference implementation.
|
|
9
|
+
* It is NOT part of the frozen protocol specification.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* © 2025 Bangshi Beijing Network Technology Limited Company
|
|
6
13
|
* Licensed under the Apache License, Version 2.0.
|
|
7
14
|
*
|
|
8
15
|
* This file is part of the MPLP reference implementation.
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* © 2025
|
|
2
|
+
* © 2025 Bangshi Beijing Network Technology Limited Company
|
|
3
|
+
* Licensed under the Apache License, Version 2.0.
|
|
4
|
+
*
|
|
5
|
+
* This file is part of the MPLP reference implementation.
|
|
6
|
+
* It is NOT part of the frozen protocol specification.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* © 2025 Bangshi Beijing Network Technology Limited Company
|
|
3
10
|
* Licensed under the Apache License, Version 2.0.
|
|
4
11
|
*
|
|
5
12
|
* This file is part of the MPLP reference implementation.
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* © 2025
|
|
2
|
+
* © 2025 Bangshi Beijing Network Technology Limited Company
|
|
3
|
+
* Licensed under the Apache License, Version 2.0.
|
|
4
|
+
*
|
|
5
|
+
* This file is part of the MPLP reference implementation.
|
|
6
|
+
* It is NOT part of the frozen protocol specification.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* © 2025 Bangshi Beijing Network Technology Limited Company
|
|
3
10
|
* Licensed under the Apache License, Version 2.0.
|
|
4
11
|
*
|
|
5
12
|
* This file is part of the MPLP reference implementation.
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* © 2025
|
|
2
|
+
* © 2025 Bangshi Beijing Network Technology Limited Company
|
|
3
|
+
* Licensed under the Apache License, Version 2.0.
|
|
4
|
+
*
|
|
5
|
+
* This file is part of the MPLP reference implementation.
|
|
6
|
+
* It is NOT part of the frozen protocol specification.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* © 2025 Bangshi Beijing Network Technology Limited Company
|
|
3
10
|
* Licensed under the Apache License, Version 2.0.
|
|
4
11
|
*
|
|
5
12
|
* This file is part of the MPLP reference implementation.
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* © 2025
|
|
2
|
+
* © 2025 Bangshi Beijing Network Technology Limited Company
|
|
3
|
+
* Licensed under the Apache License, Version 2.0.
|
|
4
|
+
*
|
|
5
|
+
* This file is part of the MPLP reference implementation.
|
|
6
|
+
* It is NOT part of the frozen protocol specification.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* © 2025 Bangshi Beijing Network Technology Limited Company
|
|
3
10
|
* Licensed under the Apache License, Version 2.0.
|
|
4
11
|
*
|
|
5
12
|
* This file is part of the MPLP reference implementation.
|
package/dist/vsl/index.d.ts
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* © 2025
|
|
2
|
+
* © 2025 Bangshi Beijing Network Technology Limited Company
|
|
3
|
+
* Licensed under the Apache License, Version 2.0.
|
|
4
|
+
*
|
|
5
|
+
* This file is part of the MPLP reference implementation.
|
|
6
|
+
* It is NOT part of the frozen protocol specification.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* © 2025 Bangshi Beijing Network Technology Limited Company
|
|
3
10
|
* Licensed under the Apache License, Version 2.0.
|
|
4
11
|
*
|
|
5
12
|
* This file is part of the MPLP reference implementation.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mplp/runtime-minimal",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "Vendor-neutral reference runtime (L3) for MPLP Protocol v1.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -15,15 +15,15 @@
|
|
|
15
15
|
"vitest": "^1.0.0",
|
|
16
16
|
"@types/node": "^20.0.0"
|
|
17
17
|
},
|
|
18
|
-
"author": "
|
|
19
|
-
"copyright": "©
|
|
18
|
+
"author": "Bangshi Beijing Network Technology Limited Company",
|
|
19
|
+
"copyright": "© 2026 Bangshi Beijing Network Technology Limited Company",
|
|
20
20
|
"mplp": {
|
|
21
21
|
"protocolVersion": "1.0.0",
|
|
22
22
|
"frozen": true,
|
|
23
23
|
"governance": "MPGC",
|
|
24
24
|
"layer": "L3"
|
|
25
25
|
},
|
|
26
|
-
"homepage": "https://mplp.io",
|
|
26
|
+
"homepage": "https://www.mplp.io",
|
|
27
27
|
"bugs": {
|
|
28
28
|
"url": "https://github.com/Coregentis/MPLP-Protocol/issues"
|
|
29
29
|
},
|
|
@@ -36,10 +36,12 @@
|
|
|
36
36
|
"multi-agent",
|
|
37
37
|
"protocol",
|
|
38
38
|
"lifecycle",
|
|
39
|
-
"agent-os"
|
|
39
|
+
"agent-os",
|
|
40
|
+
"agent-os-protocol"
|
|
40
41
|
],
|
|
41
42
|
"exports": {
|
|
42
43
|
".": {
|
|
44
|
+
"require": "./dist/index.js",
|
|
43
45
|
"import": "./dist/index.js",
|
|
44
46
|
"types": "./dist/index.d.ts"
|
|
45
47
|
}
|
|
@@ -47,6 +49,6 @@
|
|
|
47
49
|
"sideEffects": false,
|
|
48
50
|
"scripts": {
|
|
49
51
|
"build": "tsc -p tsconfig.json",
|
|
50
|
-
"test": "
|
|
52
|
+
"test": "echo 'Publish-only workspace: run unit tests in packages/sources/ instead'"
|
|
51
53
|
}
|
|
52
|
-
}
|
|
54
|
+
}
|
|
@@ -1,131 +1,131 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MPLP Protocol v1.0.0 — Frozen Specification
|
|
3
|
-
* Freeze Date: 2025-12-03
|
|
4
|
-
* Status: FROZEN (no breaking changes permitted)
|
|
5
|
-
* Governance: MPLP Protocol Governance Committee (MPGC)
|
|
6
|
-
*
|
|
7
|
-
* © 2025 邦士(北京)网络科技有限公司. All rights reserved.
|
|
8
|
-
*
|
|
9
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
import { describe, it, expect } from "vitest";
|
|
14
|
-
|
|
15
|
-
import { SingleAgentFlowContract } from "@mplp/coordination";
|
|
16
|
-
import {
|
|
17
|
-
runSingleAgentFlow
|
|
18
|
-
} from "../src/orchestrator/single-agent";
|
|
19
|
-
import { InMemoryVSL } from "../src/vsl";
|
|
20
|
-
import type { RuntimeContext } from "../src/types/runtime-context";
|
|
21
|
-
import type {
|
|
22
|
-
ContextModuleHandler,
|
|
23
|
-
PlanModuleHandler,
|
|
24
|
-
ConfirmModuleHandler,
|
|
25
|
-
TraceModuleHandler
|
|
26
|
-
} from "@mplp/coordination";
|
|
27
|
-
|
|
28
|
-
const contextHandler: ContextModuleHandler = async ({ ctx }) => ({
|
|
29
|
-
output: {
|
|
30
|
-
context: {
|
|
31
|
-
meta: {
|
|
32
|
-
protocol_version: "1.0.0",
|
|
33
|
-
schema_version: "1.0.0",
|
|
34
|
-
created_at: new Date().toISOString()
|
|
35
|
-
},
|
|
36
|
-
context_id: "00000000-0000-0000-0000-000000000001",
|
|
37
|
-
root: { domain: "test", environment: "test" },
|
|
38
|
-
title: "Test Context",
|
|
39
|
-
status: "active"
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
events: []
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
const planHandler: PlanModuleHandler = async ({ ctx }) => ({
|
|
46
|
-
output: {
|
|
47
|
-
plan: {
|
|
48
|
-
meta: {
|
|
49
|
-
protocol_version: "1.0.0",
|
|
50
|
-
schema_version: "1.0.0",
|
|
51
|
-
created_at: new Date().toISOString()
|
|
52
|
-
},
|
|
53
|
-
plan_id: "00000000-0000-0000-0000-000000000002",
|
|
54
|
-
context_id: ctx.context?.context_id ?? "",
|
|
55
|
-
steps: []
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
events: []
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
const confirmHandler: ConfirmModuleHandler = async ({ ctx }) => ({
|
|
62
|
-
output: {
|
|
63
|
-
confirm: {
|
|
64
|
-
meta: {
|
|
65
|
-
protocol_version: "1.0.0",
|
|
66
|
-
schema_version: "1.0.0",
|
|
67
|
-
created_at: new Date().toISOString()
|
|
68
|
-
},
|
|
69
|
-
confirm_id: "00000000-0000-0000-0000-000000000003",
|
|
70
|
-
plan_id: ctx.plan?.plan_id ?? "",
|
|
71
|
-
status: "approved"
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
events: []
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
const traceHandler: TraceModuleHandler = async ({ ctx }) => ({
|
|
78
|
-
output: {
|
|
79
|
-
trace: {
|
|
80
|
-
meta: {
|
|
81
|
-
protocol_version: "1.0.0",
|
|
82
|
-
schema_version: "1.0.0",
|
|
83
|
-
created_at: new Date().toISOString()
|
|
84
|
-
},
|
|
85
|
-
trace_id: "00000000-0000-0000-0000-000000000004",
|
|
86
|
-
context_id: ctx.context?.context_id ?? "",
|
|
87
|
-
plan_id: ctx.plan?.plan_id ?? "",
|
|
88
|
-
confirm_id: ctx.confirm?.confirm_id ?? "",
|
|
89
|
-
entries: []
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
events: []
|
|
93
|
-
});
|
|
94
|
-
|
|
95
|
-
describe("Reference Runtime �?Single Agent Flow", () => {
|
|
96
|
-
it("should execute SingleAgentFlowContract successfully", async () => {
|
|
97
|
-
const vsl = new InMemoryVSL();
|
|
98
|
-
|
|
99
|
-
const runtimeContext: RuntimeContext = {
|
|
100
|
-
ids: { runId: "run-1" },
|
|
101
|
-
coordination: {
|
|
102
|
-
ids: { runId: "run-1" },
|
|
103
|
-
metadata: {}
|
|
104
|
-
},
|
|
105
|
-
events: []
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
const modules = {
|
|
109
|
-
context: contextHandler,
|
|
110
|
-
plan: planHandler,
|
|
111
|
-
confirm: confirmHandler,
|
|
112
|
-
trace: traceHandler
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
const result = await runSingleAgentFlow({
|
|
116
|
-
flow: SingleAgentFlowContract,
|
|
117
|
-
runtimeContext,
|
|
118
|
-
modules,
|
|
119
|
-
vsl
|
|
120
|
-
});
|
|
121
|
-
|
|
122
|
-
expect(result.success).toBe(true);
|
|
123
|
-
expect(result.output?.context).toBeDefined();
|
|
124
|
-
expect(result.output?.plan).toBeDefined();
|
|
125
|
-
expect(result.output?.confirm).toBeDefined();
|
|
126
|
-
expect(result.output?.trace).toBeDefined();
|
|
127
|
-
|
|
128
|
-
const events = await vsl.getEvents("run-1");
|
|
129
|
-
expect(Array.isArray(events)).toBe(true);
|
|
130
|
-
});
|
|
131
|
-
});
|
|
1
|
+
/**
|
|
2
|
+
* MPLP Protocol v1.0.0 — Frozen Specification
|
|
3
|
+
* Freeze Date: 2025-12-03
|
|
4
|
+
* Status: FROZEN (no breaking changes permitted)
|
|
5
|
+
* Governance: MPLP Protocol Governance Committee (MPGC)
|
|
6
|
+
*
|
|
7
|
+
* © 2025 邦士(北京)网络科技有限公司. All rights reserved.
|
|
8
|
+
*
|
|
9
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { describe, it, expect } from "vitest";
|
|
14
|
+
|
|
15
|
+
import { SingleAgentFlowContract } from "@mplp/coordination";
|
|
16
|
+
import {
|
|
17
|
+
runSingleAgentFlow
|
|
18
|
+
} from "../src/orchestrator/single-agent";
|
|
19
|
+
import { InMemoryVSL } from "../src/vsl";
|
|
20
|
+
import type { RuntimeContext } from "../src/types/runtime-context";
|
|
21
|
+
import type {
|
|
22
|
+
ContextModuleHandler,
|
|
23
|
+
PlanModuleHandler,
|
|
24
|
+
ConfirmModuleHandler,
|
|
25
|
+
TraceModuleHandler
|
|
26
|
+
} from "@mplp/coordination";
|
|
27
|
+
|
|
28
|
+
const contextHandler: ContextModuleHandler = async ({ ctx }) => ({
|
|
29
|
+
output: {
|
|
30
|
+
context: {
|
|
31
|
+
meta: {
|
|
32
|
+
protocol_version: "1.0.0",
|
|
33
|
+
schema_version: "1.0.0",
|
|
34
|
+
created_at: new Date().toISOString()
|
|
35
|
+
},
|
|
36
|
+
context_id: "00000000-0000-0000-0000-000000000001",
|
|
37
|
+
root: { domain: "test", environment: "test" },
|
|
38
|
+
title: "Test Context",
|
|
39
|
+
status: "active"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
events: []
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
const planHandler: PlanModuleHandler = async ({ ctx }) => ({
|
|
46
|
+
output: {
|
|
47
|
+
plan: {
|
|
48
|
+
meta: {
|
|
49
|
+
protocol_version: "1.0.0",
|
|
50
|
+
schema_version: "1.0.0",
|
|
51
|
+
created_at: new Date().toISOString()
|
|
52
|
+
},
|
|
53
|
+
plan_id: "00000000-0000-0000-0000-000000000002",
|
|
54
|
+
context_id: ctx.context?.context_id ?? "",
|
|
55
|
+
steps: []
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
events: []
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
const confirmHandler: ConfirmModuleHandler = async ({ ctx }) => ({
|
|
62
|
+
output: {
|
|
63
|
+
confirm: {
|
|
64
|
+
meta: {
|
|
65
|
+
protocol_version: "1.0.0",
|
|
66
|
+
schema_version: "1.0.0",
|
|
67
|
+
created_at: new Date().toISOString()
|
|
68
|
+
},
|
|
69
|
+
confirm_id: "00000000-0000-0000-0000-000000000003",
|
|
70
|
+
plan_id: ctx.plan?.plan_id ?? "",
|
|
71
|
+
status: "approved"
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
events: []
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
const traceHandler: TraceModuleHandler = async ({ ctx }) => ({
|
|
78
|
+
output: {
|
|
79
|
+
trace: {
|
|
80
|
+
meta: {
|
|
81
|
+
protocol_version: "1.0.0",
|
|
82
|
+
schema_version: "1.0.0",
|
|
83
|
+
created_at: new Date().toISOString()
|
|
84
|
+
},
|
|
85
|
+
trace_id: "00000000-0000-0000-0000-000000000004",
|
|
86
|
+
context_id: ctx.context?.context_id ?? "",
|
|
87
|
+
plan_id: ctx.plan?.plan_id ?? "",
|
|
88
|
+
confirm_id: ctx.confirm?.confirm_id ?? "",
|
|
89
|
+
entries: []
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
events: []
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
describe("Reference Runtime �?Single Agent Flow", () => {
|
|
96
|
+
it("should execute SingleAgentFlowContract successfully", async () => {
|
|
97
|
+
const vsl = new InMemoryVSL();
|
|
98
|
+
|
|
99
|
+
const runtimeContext: RuntimeContext = {
|
|
100
|
+
ids: { runId: "run-1" },
|
|
101
|
+
coordination: {
|
|
102
|
+
ids: { runId: "run-1" },
|
|
103
|
+
metadata: {}
|
|
104
|
+
},
|
|
105
|
+
events: []
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
const modules = {
|
|
109
|
+
context: contextHandler,
|
|
110
|
+
plan: planHandler,
|
|
111
|
+
confirm: confirmHandler,
|
|
112
|
+
trace: traceHandler
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
const result = await runSingleAgentFlow({
|
|
116
|
+
flow: SingleAgentFlowContract,
|
|
117
|
+
runtimeContext,
|
|
118
|
+
modules,
|
|
119
|
+
vsl
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
expect(result.success).toBe(true);
|
|
123
|
+
expect(result.output?.context).toBeDefined();
|
|
124
|
+
expect(result.output?.plan).toBeDefined();
|
|
125
|
+
expect(result.output?.confirm).toBeDefined();
|
|
126
|
+
expect(result.output?.trace).toBeDefined();
|
|
127
|
+
|
|
128
|
+
const events = await vsl.getEvents("run-1");
|
|
129
|
+
expect(Array.isArray(events)).toBe(true);
|
|
130
|
+
});
|
|
131
|
+
});
|
package/tsconfig.json
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$comment": "MPLP Protocol v1.0.0 — Frozen Specification\nFreeze Date: 2025-12-03\nStatus: FROZEN (no breaking changes permitted)\nGovernance: MPLP Protocol Governance Committee (MPGC)\nCopyright: © 2025 邦士(北京)网络科技有限公司\nLicense: Apache-2.0\nAny normative change requires a new protocol version.",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"target": "ES2020",
|
|
5
|
-
"module": "commonjs",
|
|
6
|
-
"lib": [
|
|
7
|
-
"ES2020"
|
|
8
|
-
],
|
|
9
|
-
"strict": true,
|
|
10
|
-
"esModuleInterop": true,
|
|
11
|
-
"skipLibCheck": true,
|
|
12
|
-
"forceConsistentCasingInFileNames": true,
|
|
13
|
-
"resolveJsonModule": true,
|
|
14
|
-
"declaration": true,
|
|
15
|
-
"moduleResolution": "node",
|
|
16
|
-
"downlevelIteration": true,
|
|
17
|
-
"outDir": "dist",
|
|
18
|
-
"rootDir": "src"
|
|
19
|
-
},
|
|
20
|
-
"include": [
|
|
21
|
-
"src"
|
|
22
|
-
]
|
|
23
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"$comment": "MPLP Protocol v1.0.0 — Frozen Specification\nFreeze Date: 2025-12-03\nStatus: FROZEN (no breaking changes permitted)\nGovernance: MPLP Protocol Governance Committee (MPGC)\nCopyright: © 2025 邦士(北京)网络科技有限公司\nLicense: Apache-2.0\nAny normative change requires a new protocol version.",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"target": "ES2020",
|
|
5
|
+
"module": "commonjs",
|
|
6
|
+
"lib": [
|
|
7
|
+
"ES2020"
|
|
8
|
+
],
|
|
9
|
+
"strict": true,
|
|
10
|
+
"esModuleInterop": true,
|
|
11
|
+
"skipLibCheck": true,
|
|
12
|
+
"forceConsistentCasingInFileNames": true,
|
|
13
|
+
"resolveJsonModule": true,
|
|
14
|
+
"declaration": true,
|
|
15
|
+
"moduleResolution": "node",
|
|
16
|
+
"downlevelIteration": true,
|
|
17
|
+
"outDir": "dist",
|
|
18
|
+
"rootDir": "src"
|
|
19
|
+
},
|
|
20
|
+
"include": [
|
|
21
|
+
"src"
|
|
22
|
+
]
|
|
23
|
+
}
|
package/src/ael/index.d.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* © 2025 邦士(北京)网络科技有限公司
|
|
3
|
-
* Licensed under the Apache License, Version 2.0.
|
|
4
|
-
*
|
|
5
|
-
* This file is part of the MPLP reference implementation.
|
|
6
|
-
* It is NOT part of the frozen protocol specification.
|
|
7
|
-
*/
|
|
8
|
-
import type { RuntimeContext } from "../types/runtime-context";
|
|
9
|
-
import type { MplpEvent } from "@mplp/coordination";
|
|
10
|
-
export interface ActionExecutionLayer {
|
|
11
|
-
executeAction(params: {
|
|
12
|
-
module: string;
|
|
13
|
-
stepId?: string;
|
|
14
|
-
input: unknown;
|
|
15
|
-
context: RuntimeContext;
|
|
16
|
-
}): Promise<{
|
|
17
|
-
output: unknown;
|
|
18
|
-
events?: MplpEvent[];
|
|
19
|
-
}>;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* InMemoryAEL
|
|
23
|
-
*
|
|
24
|
-
* Reference implementation used for tests and examples.
|
|
25
|
-
* It does NOT call any real external systems.
|
|
26
|
-
*/
|
|
27
|
-
export declare class InMemoryAEL implements ActionExecutionLayer {
|
|
28
|
-
executeAction(params: {
|
|
29
|
-
module: string;
|
|
30
|
-
stepId?: string;
|
|
31
|
-
input: unknown;
|
|
32
|
-
context: RuntimeContext;
|
|
33
|
-
}): Promise<{
|
|
34
|
-
output: unknown;
|
|
35
|
-
events?: MplpEvent[];
|
|
36
|
-
}>;
|
|
37
|
-
}
|
package/src/ael/index.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* © 2025 邦士(北京)网络科技有限公司
|
|
3
|
-
* Licensed under the Apache License, Version 2.0.
|
|
4
|
-
*
|
|
5
|
-
* This file is part of the MPLP reference implementation.
|
|
6
|
-
* It is NOT part of the frozen protocol specification.
|
|
7
|
-
*/
|
|
8
|
-
"use strict";
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.InMemoryAEL = void 0;
|
|
11
|
-
/**
|
|
12
|
-
* InMemoryAEL
|
|
13
|
-
*
|
|
14
|
-
* Reference implementation used for tests and examples.
|
|
15
|
-
* It does NOT call any real external systems.
|
|
16
|
-
*/
|
|
17
|
-
class InMemoryAEL {
|
|
18
|
-
async executeAction(params) {
|
|
19
|
-
// For now, simply echo the input as output.
|
|
20
|
-
return {
|
|
21
|
-
output: params.input,
|
|
22
|
-
events: []
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
exports.InMemoryAEL = InMemoryAEL;
|
package/src/ael/index.ts
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* © 2025 邦士(北京)网络科技有限公司
|
|
3
|
-
* Licensed under the Apache License, Version 2.0.
|
|
4
|
-
*
|
|
5
|
-
* This file is part of the MPLP reference implementation.
|
|
6
|
-
* It is NOT part of the frozen protocol specification.
|
|
7
|
-
*/
|
|
8
|
-
import type { RuntimeContext } from "../types/runtime-context";
|
|
9
|
-
import type { MplpEvent } from "@mplp/coordination";
|
|
10
|
-
|
|
11
|
-
export interface ActionExecutionLayer {
|
|
12
|
-
executeAction(params: {
|
|
13
|
-
module: string;
|
|
14
|
-
stepId?: string;
|
|
15
|
-
input: unknown;
|
|
16
|
-
context: RuntimeContext;
|
|
17
|
-
}): Promise<{
|
|
18
|
-
output: unknown;
|
|
19
|
-
events?: MplpEvent[];
|
|
20
|
-
}>;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* InMemoryAEL
|
|
25
|
-
*
|
|
26
|
-
* Reference implementation used for tests and examples.
|
|
27
|
-
* It does NOT call any real external systems.
|
|
28
|
-
*/
|
|
29
|
-
export class InMemoryAEL implements ActionExecutionLayer {
|
|
30
|
-
async executeAction(params: {
|
|
31
|
-
module: string;
|
|
32
|
-
stepId?: string;
|
|
33
|
-
input: unknown;
|
|
34
|
-
context: RuntimeContext;
|
|
35
|
-
}): Promise<{ output: unknown; events?: MplpEvent[] }> {
|
|
36
|
-
// For now, simply echo the input as output.
|
|
37
|
-
return {
|
|
38
|
-
output: params.input,
|
|
39
|
-
events: []
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
}
|
package/src/index.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* © 2025 邦士(北京)网络科技有限公司
|
|
3
|
-
* Licensed under the Apache License, Version 2.0.
|
|
4
|
-
*
|
|
5
|
-
* This file is part of the MPLP reference implementation.
|
|
6
|
-
* It is NOT part of the frozen protocol specification.
|
|
7
|
-
*/
|
|
8
|
-
export * from "./types/runtime-context";
|
|
9
|
-
export * from "./types/runtime-result";
|
|
10
|
-
export * from "./ael";
|
|
11
|
-
export * from "./vsl";
|
|
12
|
-
export * from "./registry/modules-registry";
|
|
13
|
-
export * from "./orchestrator";
|
package/src/index.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* © 2025 邦士(北京)网络科技有限公司
|
|
3
|
-
* Licensed under the Apache License, Version 2.0.
|
|
4
|
-
*
|
|
5
|
-
* This file is part of the MPLP reference implementation.
|
|
6
|
-
* It is NOT part of the frozen protocol specification.
|
|
7
|
-
*/
|
|
8
|
-
"use strict";
|
|
9
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
12
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
13
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
14
|
-
}
|
|
15
|
-
Object.defineProperty(o, k2, desc);
|
|
16
|
-
}) : (function(o, m, k, k2) {
|
|
17
|
-
if (k2 === undefined) k2 = k;
|
|
18
|
-
o[k2] = m[k];
|
|
19
|
-
}));
|
|
20
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
21
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
22
|
-
};
|
|
23
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
-
__exportStar(require("./types/runtime-context"), exports);
|
|
25
|
-
__exportStar(require("./types/runtime-result"), exports);
|
|
26
|
-
__exportStar(require("./ael"), exports);
|
|
27
|
-
__exportStar(require("./vsl"), exports);
|
|
28
|
-
__exportStar(require("./registry/modules-registry"), exports);
|
|
29
|
-
__exportStar(require("./orchestrator"), exports);
|
package/src/index.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* © 2025 邦士(北京)网络科技有限公司
|
|
3
|
-
* Licensed under the Apache License, Version 2.0.
|
|
4
|
-
*
|
|
5
|
-
* This file is part of the MPLP reference implementation.
|
|
6
|
-
* It is NOT part of the frozen protocol specification.
|
|
7
|
-
*/
|
|
8
|
-
export * from "./types/runtime-context";
|
|
9
|
-
export * from "./types/runtime-result";
|
|
10
|
-
export * from "./ael";
|
|
11
|
-
export * from "./vsl";
|
|
12
|
-
export * from "./registry/modules-registry";
|
|
13
|
-
export * from "./orchestrator";
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* © 2025 邦士(北京)网络科技有限公司
|
|
3
|
-
* Licensed under the Apache License, Version 2.0.
|
|
4
|
-
*
|
|
5
|
-
* This file is part of the MPLP reference implementation.
|
|
6
|
-
* It is NOT part of the frozen protocol specification.
|
|
7
|
-
*/
|
|
8
|
-
export declare function runErrorRecoveryFlow(): Promise<void>;
|