marona 1.1.4 → 2.0.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/CHANGELOG.md +7 -0
- package/README.md +123 -72
- package/dist/a2a-server.d.ts +38 -0
- package/dist/a2a-server.d.ts.map +1 -0
- package/dist/a2a-server.js +249 -0
- package/dist/a2a-server.js.map +1 -0
- package/dist/a2a.d.ts +65 -0
- package/dist/a2a.d.ts.map +1 -0
- package/dist/a2a.js +276 -0
- package/dist/a2a.js.map +1 -0
- package/dist/index.d.ts +58 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +324 -193
- package/dist/index.js.map +1 -1
- package/dist/schema.d.ts +2 -0
- package/dist/schema.d.ts.map +1 -0
- package/dist/schema.js +26 -0
- package/dist/schema.js.map +1 -0
- package/package.json +4 -2
package/dist/schema.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAKA,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAOtF"}
|
package/dist/schema.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Ajv2020 } from "ajv/dist/2020.js";
|
|
2
|
+
import { Ajv } from "ajv";
|
|
3
|
+
import addFormats from "ajv-formats";
|
|
4
|
+
// Never resolve remote references or mutate caller input during validation.
|
|
5
|
+
export function matchesSchema(schema, value) {
|
|
6
|
+
rejectRemoteRefs(schema);
|
|
7
|
+
const options = { strict: false, strictNumbers: true, allErrors: false, logger: false };
|
|
8
|
+
const validator = schema.$schema === "http://json-schema.org/draft-07/schema#"
|
|
9
|
+
? new Ajv(options) : new Ajv2020(options);
|
|
10
|
+
addFormats.default(validator);
|
|
11
|
+
return validator.compile(schema)(value);
|
|
12
|
+
}
|
|
13
|
+
function rejectRemoteRefs(value) {
|
|
14
|
+
if (value === null || typeof value !== "object")
|
|
15
|
+
return;
|
|
16
|
+
if (!Array.isArray(value)) {
|
|
17
|
+
const node = value;
|
|
18
|
+
for (const key of ["$ref", "$dynamicRef", "$recursiveRef"]) {
|
|
19
|
+
if (key in node && (typeof node[key] !== "string" || !node[key].startsWith("#"))) {
|
|
20
|
+
throw new Error("Only local JSON Schema references are supported");
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
Object.values(value).forEach(rejectRemoteRefs);
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,UAAU,MAAM,aAAa,CAAC;AAErC,4EAA4E;AAC5E,MAAM,UAAU,aAAa,CAAC,MAA+B,EAAE,KAAc;IAC3E,gBAAgB,CAAC,MAAM,CAAC,CAAC;IACzB,MAAM,OAAO,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,KAAc,EAAE,CAAC;IACjG,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,KAAK,yCAAyC;QAC5E,CAAC,CAAC,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAC5C,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAC9B,OAAO,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,KAAK,CAAY,CAAC;AACrD,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAc;IACtC,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO;IACxD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAC1B,MAAM,IAAI,GAAG,KAAgC,CAAC;QAC9C,KAAK,MAAM,GAAG,IAAI,CAAC,MAAM,EAAE,aAAa,EAAE,eAAe,CAAC,EAAE,CAAC;YAC3D,IAAI,GAAG,IAAI,IAAI,IAAI,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,QAAQ,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;gBACjF,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;YACrE,CAAC;QACH,CAAC;IACH,CAAC;IACD,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;AACjD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "marona",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Universal Model Gateway and MCP/Skill SDK with mandatory project-scoped Marona authentication.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
],
|
|
20
20
|
"sideEffects": false,
|
|
21
21
|
"engines": {
|
|
22
|
-
"node": ">=
|
|
22
|
+
"node": ">=20"
|
|
23
23
|
},
|
|
24
24
|
"scripts": {
|
|
25
25
|
"build": "tsc -p tsconfig.json",
|
|
@@ -39,6 +39,8 @@
|
|
|
39
39
|
"license": "MIT",
|
|
40
40
|
"homepage": "https://www.marona.ai",
|
|
41
41
|
"dependencies": {
|
|
42
|
+
"ajv": "^8.17.1",
|
|
43
|
+
"ajv-formats": "^3.0.1",
|
|
42
44
|
"ws": "^8.18.3"
|
|
43
45
|
},
|
|
44
46
|
"devDependencies": {
|