@agentica/core 0.32.7 → 0.32.8
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/lib/index.mjs +4 -203
- package/lib/index.mjs.map +1 -1
- package/lib/utils/JsonUtil.d.ts +0 -1
- package/lib/utils/JsonUtil.js +3 -97
- package/lib/utils/JsonUtil.js.map +1 -1
- package/lib/utils/JsonUtil.spec.js +137 -69
- package/lib/utils/JsonUtil.spec.js.map +1 -1
- package/package.json +2 -1
- package/src/utils/JsonUtil.spec.ts +168 -80
- package/src/utils/JsonUtil.ts +4 -140
package/lib/utils/JsonUtil.js
CHANGED
|
@@ -1,108 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.JsonUtil = void 0;
|
|
4
|
-
|
|
4
|
+
const es_jsonkit_1 = require("es-jsonkit");
|
|
5
5
|
exports.JsonUtil = {
|
|
6
6
|
parse,
|
|
7
7
|
};
|
|
8
8
|
function parse(str) {
|
|
9
|
-
const corrected = pipe(
|
|
9
|
+
const corrected = pipe(es_jsonkit_1.removeEmptyObjectPrefix, es_jsonkit_1.addMissingBraces, es_jsonkit_1.removeTrailingCommas)(str);
|
|
10
|
+
console.log(corrected);
|
|
10
11
|
return JSON.parse(corrected);
|
|
11
12
|
}
|
|
12
13
|
const pipe = (...fns) => (str) => fns.reduce((acc, fn) => fn(acc), str);
|
|
13
|
-
function stripFirstBrace(str) {
|
|
14
|
-
if (RegExp("^{}.").test(str) === true) {
|
|
15
|
-
return str.substring(2);
|
|
16
|
-
}
|
|
17
|
-
return str;
|
|
18
|
-
}
|
|
19
|
-
function correctMissingLastBrace(input) {
|
|
20
|
-
const initial = { s: "OUT", stack: [], line: 1, col: 0, edits: [] };
|
|
21
|
-
const scanned = Array.from(input).reduce((ps, ch, i) => {
|
|
22
|
-
var _a;
|
|
23
|
-
const updated = ch === "\n"
|
|
24
|
-
? Object.assign(Object.assign({}, ps), { line: ps.line + 1, col: 0 }) : Object.assign(Object.assign({}, ps), { col: ps.col + 1 });
|
|
25
|
-
const tok = categorize(ch);
|
|
26
|
-
const trans = (_a = table[updated.s]) === null || _a === void 0 ? void 0 : _a[tok];
|
|
27
|
-
return trans ? trans(updated, ch, i) : updated;
|
|
28
|
-
}, initial);
|
|
29
|
-
// Return original string if string is not closed (do not modify)
|
|
30
|
-
if (scanned.s !== "OUT")
|
|
31
|
-
return input;
|
|
32
|
-
// Insert closing braces at the end for remaining open braces (LIFO)
|
|
33
|
-
const withTail = scanned.stack.length === 0
|
|
34
|
-
? scanned
|
|
35
|
-
: (() => {
|
|
36
|
-
const closers = scanned.stack.slice().reverse().map(e => closeOf[e.type]).join("");
|
|
37
|
-
return Object.assign(Object.assign({}, scanned), { edits: [...scanned.edits, { op: "insert", index: input.length, text: closers }], stack: [] });
|
|
38
|
-
})();
|
|
39
|
-
return applyEditsImmutable(input, withTail.edits);
|
|
40
|
-
}
|
|
41
|
-
// Apply edits immutably
|
|
42
|
-
function applyEditsImmutable(src, edits) {
|
|
43
|
-
const sorted = [...edits].sort((a, b) => a.index - b.index);
|
|
44
|
-
const built = sorted.reduce((acc, e) => {
|
|
45
|
-
const prefix = src.slice(acc.cursor, e.index);
|
|
46
|
-
const acc1 = { out: acc.out + prefix, cursor: e.index };
|
|
47
|
-
return e.op === "delete"
|
|
48
|
-
? { out: acc1.out, cursor: acc1.cursor + 1 }
|
|
49
|
-
: e.op === "replace"
|
|
50
|
-
? { out: acc1.out + e.text, cursor: acc1.cursor + 1 }
|
|
51
|
-
: /* insert */ { out: acc1.out + e.text, cursor: acc1.cursor };
|
|
52
|
-
}, { out: "", cursor: 0 });
|
|
53
|
-
return built.out + src.slice(built.cursor);
|
|
54
|
-
}
|
|
55
|
-
const openOf = Object.freeze({ "}": "{", "]": "[" });
|
|
56
|
-
const closeOf = Object.freeze({ "{": "}", "[": "]" });
|
|
57
|
-
const categorize = (ch) => {
|
|
58
|
-
switch (ch) {
|
|
59
|
-
case '"': return "DQUOTE";
|
|
60
|
-
case "\\": return "BSLASH";
|
|
61
|
-
case "{": return "OCB";
|
|
62
|
-
case "[": return "OSB";
|
|
63
|
-
case "}": return "CCB";
|
|
64
|
-
case "]": return "CSB";
|
|
65
|
-
case "\n": return "NEWLINE";
|
|
66
|
-
default: return "CHAR";
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
const push = (ps, type, index) => (Object.assign(Object.assign({}, ps), { stack: [...ps.stack, { type, index }] }));
|
|
70
|
-
const withEdit = (ps, edit) => (Object.assign(Object.assign({}, ps), { edits: [...ps.edits, edit] }));
|
|
71
|
-
const popOrFix = (ps, closer, idx) => (() => {
|
|
72
|
-
if (ps.stack.length === 0) {
|
|
73
|
-
// Extra closing brace → delete
|
|
74
|
-
return withEdit(ps, { op: "delete", index: idx });
|
|
75
|
-
}
|
|
76
|
-
const top = ps.stack[ps.stack.length - 1];
|
|
77
|
-
if (top !== undefined && top.type !== openOf[closer]) {
|
|
78
|
-
// Type mismatch → replace with expected value + pop
|
|
79
|
-
const expected = closeOf[top.type];
|
|
80
|
-
return withEdit(Object.assign(Object.assign({}, ps), { stack: ps.stack.slice(0, -1) }), { op: "replace", index: idx, text: expected });
|
|
81
|
-
}
|
|
82
|
-
// Normal matching → pop
|
|
83
|
-
return Object.assign(Object.assign({}, ps), { stack: ps.stack.slice(0, -1) });
|
|
84
|
-
})();
|
|
85
|
-
const table = {
|
|
86
|
-
OUT: {
|
|
87
|
-
DQUOTE: (ps) => (Object.assign(Object.assign({}, ps), { s: "IN" })),
|
|
88
|
-
OCB: (ps, _ch, i) => push(ps, "{", i),
|
|
89
|
-
OSB: (ps, _ch, i) => push(ps, "[", i),
|
|
90
|
-
CCB: (ps, _ch, i) => popOrFix(ps, "}", i),
|
|
91
|
-
CSB: (ps, _ch, i) => popOrFix(ps, "]", i),
|
|
92
|
-
},
|
|
93
|
-
IN: {
|
|
94
|
-
BSLASH: (ps) => (Object.assign(Object.assign({}, ps), { s: "ESC" })),
|
|
95
|
-
DQUOTE: (ps) => (Object.assign(Object.assign({}, ps), { s: "OUT" })),
|
|
96
|
-
},
|
|
97
|
-
ESC: {
|
|
98
|
-
DQUOTE: (ps) => (Object.assign(Object.assign({}, ps), { s: "IN" })),
|
|
99
|
-
BSLASH: (ps) => (Object.assign(Object.assign({}, ps), { s: "IN" })),
|
|
100
|
-
OCB: (ps) => (Object.assign(Object.assign({}, ps), { s: "IN" })),
|
|
101
|
-
OSB: (ps) => (Object.assign(Object.assign({}, ps), { s: "IN" })),
|
|
102
|
-
CCB: (ps) => (Object.assign(Object.assign({}, ps), { s: "IN" })),
|
|
103
|
-
CSB: (ps) => (Object.assign(Object.assign({}, ps), { s: "IN" })),
|
|
104
|
-
CHAR: (ps) => (Object.assign(Object.assign({}, ps), { s: "IN" })),
|
|
105
|
-
NEWLINE: (ps) => (Object.assign(Object.assign({}, ps), { s: "IN" })),
|
|
106
|
-
},
|
|
107
|
-
};
|
|
108
14
|
//# sourceMappingURL=JsonUtil.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JsonUtil.js","sourceRoot":"","sources":["../../src/utils/JsonUtil.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"JsonUtil.js","sourceRoot":"","sources":["../../src/utils/JsonUtil.ts"],"names":[],"mappings":";;;AAAA,2CAA6F;AAEhF,QAAA,QAAQ,GAAG;IACtB,KAAK;CACN,CAAC;AAEF,SAAS,KAAK,CAAC,GAAW;IACxB,MAAM,SAAS,GAAG,IAAI,CAAC,oCAAuB,EAAE,6BAAgB,EAAE,iCAAoB,CAAC,CAAC,GAAG,CAAC,CAAC;IAC7F,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IACvB,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AAC/B,CAAC;AAED,MAAM,IAAI,GAAG,CAAC,GAAG,GAAgC,EAAE,EAAE,CAAC,CAAC,GAAW,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC"}
|
|
@@ -3,80 +3,148 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const JsonUtil_1 = require("./JsonUtil");
|
|
4
4
|
describe("JsonUtil", () => {
|
|
5
5
|
describe("parse", () => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
it("should handle array with '{}' prefix", () => {
|
|
12
|
-
const jsonString = '{}[1, 2, 3, "test"]';
|
|
13
|
-
const result = JsonUtil_1.JsonUtil.parse(jsonString);
|
|
14
|
-
expect(result).toEqual([1, 2, 3, "test"]);
|
|
15
|
-
});
|
|
16
|
-
it("should handle nested object with '{}' prefix", () => {
|
|
17
|
-
const jsonString = '{}{"user": {"id": 1, "name": "John"}}';
|
|
18
|
-
const result = JsonUtil_1.JsonUtil.parse(jsonString);
|
|
19
|
-
expect(result).toEqual({
|
|
20
|
-
user: { id: 1, name: "John" }
|
|
6
|
+
describe("Normal Operations", () => {
|
|
7
|
+
it("should parse standard valid JSON", () => {
|
|
8
|
+
const jsonString = '{"normal": "json"}';
|
|
9
|
+
const result = JsonUtil_1.JsonUtil.parse(jsonString);
|
|
10
|
+
expect(result).toEqual({ normal: "json" });
|
|
21
11
|
});
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
expect(JsonUtil_1.JsonUtil.parse('{}true')).toBe(true);
|
|
27
|
-
expect(JsonUtil_1.JsonUtil.parse('{}null')).toBeNull();
|
|
28
|
-
});
|
|
29
|
-
it("should not modify string that doesn't start with '{}'", () => {
|
|
30
|
-
const jsonString = '{"normal": "json"}';
|
|
31
|
-
const result = JsonUtil_1.JsonUtil.parse(jsonString);
|
|
32
|
-
expect(result).toEqual({ normal: "json" });
|
|
33
|
-
});
|
|
34
|
-
// 마지막 괄호 누락 보정 테스트 (예상 기능)
|
|
35
|
-
it("should handle missing closing brace in object", () => {
|
|
36
|
-
const jsonString = '{"name": "test", "value": 42';
|
|
37
|
-
const result = JsonUtil_1.JsonUtil.parse(jsonString);
|
|
38
|
-
expect(result).toEqual({ name: "test", value: 42 });
|
|
39
|
-
});
|
|
40
|
-
it("should handle missing closing bracket in array", () => {
|
|
41
|
-
const jsonString = '[1, 2, 3, "test"';
|
|
42
|
-
const result = JsonUtil_1.JsonUtil.parse(jsonString);
|
|
43
|
-
expect(result).toEqual([1, 2, 3, "test"]);
|
|
44
|
-
});
|
|
45
|
-
it("should handle nested object with missing closing brace", () => {
|
|
46
|
-
const jsonString = '{"user": {"id": 1, "name": "John"}';
|
|
47
|
-
const result = JsonUtil_1.JsonUtil.parse(jsonString);
|
|
48
|
-
expect(result).toEqual({
|
|
49
|
-
user: { id: 1, name: "John" }
|
|
12
|
+
it("should handle object with '{}' prefix", () => {
|
|
13
|
+
const jsonString = '{}{"name": "test", "value": 42}';
|
|
14
|
+
const result = JsonUtil_1.JsonUtil.parse(jsonString);
|
|
15
|
+
expect(result).toEqual({ name: "test", value: 42 });
|
|
50
16
|
});
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
17
|
+
it("should handle array with '{}' prefix", () => {
|
|
18
|
+
const jsonString = '{}[1, 2, 3, "test"]';
|
|
19
|
+
const result = JsonUtil_1.JsonUtil.parse(jsonString);
|
|
20
|
+
expect(result).toEqual([1, 2, 3, "test"]);
|
|
21
|
+
});
|
|
22
|
+
it("should handle primitive values with '{}' prefix", () => {
|
|
23
|
+
expect(JsonUtil_1.JsonUtil.parse('{}42')).toBe(42);
|
|
24
|
+
expect(JsonUtil_1.JsonUtil.parse('{}"hello"')).toBe("hello");
|
|
25
|
+
expect(JsonUtil_1.JsonUtil.parse('{}true')).toBe(true);
|
|
26
|
+
expect(JsonUtil_1.JsonUtil.parse('{}null')).toBeNull();
|
|
27
|
+
});
|
|
28
|
+
it("should remove trailing comma in object", () => {
|
|
29
|
+
const jsonString = '{"name": "test", "value": 42,}';
|
|
30
|
+
const result = JsonUtil_1.JsonUtil.parse(jsonString);
|
|
31
|
+
expect(result).toEqual({ name: "test", value: 42 });
|
|
32
|
+
});
|
|
33
|
+
it("should remove trailing comma in array", () => {
|
|
34
|
+
const jsonString = '[1, 2, 3, "test",]';
|
|
35
|
+
const result = JsonUtil_1.JsonUtil.parse(jsonString);
|
|
36
|
+
expect(result).toEqual([1, 2, 3, "test"]);
|
|
37
|
+
});
|
|
38
|
+
it("should add missing closing brace in object", () => {
|
|
39
|
+
const jsonString = '{"name": "test", "value": 42';
|
|
40
|
+
const result = JsonUtil_1.JsonUtil.parse(jsonString);
|
|
41
|
+
expect(result).toEqual({ name: "test", value: 42 });
|
|
42
|
+
});
|
|
43
|
+
it("should add missing closing bracket in array", () => {
|
|
44
|
+
const jsonString = '[1, 2, 3, "test"';
|
|
45
|
+
const result = JsonUtil_1.JsonUtil.parse(jsonString);
|
|
46
|
+
expect(result).toEqual([1, 2, 3, "test"]);
|
|
61
47
|
});
|
|
62
48
|
});
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
49
|
+
describe("Combined Features", () => {
|
|
50
|
+
it("should handle '{}' prefix and missing closing brace together", () => {
|
|
51
|
+
const jsonString = '{}{"name": "test", "value": 42';
|
|
52
|
+
const result = JsonUtil_1.JsonUtil.parse(jsonString);
|
|
53
|
+
expect(result).toEqual({ name: "test", value: 42 });
|
|
54
|
+
});
|
|
55
|
+
it("should handle '{}' prefix and missing closing bracket together", () => {
|
|
56
|
+
const jsonString = '{}[1, 2, 3, "test"';
|
|
57
|
+
const result = JsonUtil_1.JsonUtil.parse(jsonString);
|
|
58
|
+
expect(result).toEqual([1, 2, 3, "test"]);
|
|
59
|
+
});
|
|
60
|
+
it("should handle trailing comma in nested objects", () => {
|
|
61
|
+
const jsonString = '{"user": {"id": 1, "name": "John",}, "active": true,}';
|
|
62
|
+
const result = JsonUtil_1.JsonUtil.parse(jsonString);
|
|
63
|
+
expect(result).toEqual({
|
|
64
|
+
user: { id: 1, name: "John" },
|
|
65
|
+
active: true
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
it("should handle missing closing brace in nested objects", () => {
|
|
69
|
+
const jsonString = '{"user": {"id": 1, "name": "John"}';
|
|
70
|
+
const result = JsonUtil_1.JsonUtil.parse(jsonString);
|
|
71
|
+
expect(result).toEqual({
|
|
72
|
+
user: { id: 1, name: "John" }
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
it("should handle missing closing brace in complex nested structure", () => {
|
|
76
|
+
const jsonString = '{"users": [{"id": 1, "name": "John"}, {"id": 2, "name": "Jane"}], "count": 2';
|
|
77
|
+
const result = JsonUtil_1.JsonUtil.parse(jsonString);
|
|
78
|
+
expect(result).toEqual({
|
|
79
|
+
users: [
|
|
80
|
+
{ id: 1, name: "John" },
|
|
81
|
+
{ id: 2, name: "Jane" }
|
|
82
|
+
],
|
|
83
|
+
count: 2
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
it("should apply all correction features together", () => {
|
|
87
|
+
const jsonString = '{}{"name": "test", "items": [1, 2, 3,], "user": {"id": 1, "name": "John",}';
|
|
88
|
+
const result = JsonUtil_1.JsonUtil.parse(jsonString);
|
|
89
|
+
expect(result).toEqual({
|
|
90
|
+
name: "test",
|
|
91
|
+
items: [1, 2, 3],
|
|
92
|
+
user: { id: 1, name: "John" }
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
it("should handle all issues simultaneously in complex nested structure", () => {
|
|
96
|
+
const jsonString = '{}{"data": {"users": [{"id": 1, "name": "John",}, {"id": 2, "name": "Jane",}], "meta": {"total": 2, "page": 1,}}, "status": "ok",';
|
|
97
|
+
const result = JsonUtil_1.JsonUtil.parse(jsonString);
|
|
98
|
+
expect(result).toEqual({
|
|
99
|
+
data: {
|
|
100
|
+
users: [
|
|
101
|
+
{ id: 1, name: "John" },
|
|
102
|
+
{ id: 2, name: "Jane" }
|
|
103
|
+
],
|
|
104
|
+
meta: { total: 2, page: 1 }
|
|
105
|
+
},
|
|
106
|
+
status: "ok"
|
|
107
|
+
});
|
|
108
|
+
});
|
|
77
109
|
});
|
|
78
|
-
|
|
79
|
-
|
|
110
|
+
describe("Edge Cases", () => {
|
|
111
|
+
it("should handle empty object with '{}' prefix", () => {
|
|
112
|
+
const jsonString = '{}{}';
|
|
113
|
+
const result = JsonUtil_1.JsonUtil.parse(jsonString);
|
|
114
|
+
expect(result).toEqual({});
|
|
115
|
+
});
|
|
116
|
+
it("should handle empty array with '{}' prefix", () => {
|
|
117
|
+
const jsonString = '{}[]';
|
|
118
|
+
const result = JsonUtil_1.JsonUtil.parse(jsonString);
|
|
119
|
+
expect(result).toEqual([]);
|
|
120
|
+
});
|
|
121
|
+
it("should handle nested object with '{}' prefix", () => {
|
|
122
|
+
const jsonString = '{}{"user": {"id": 1, "name": "John"}}';
|
|
123
|
+
const result = JsonUtil_1.JsonUtil.parse(jsonString);
|
|
124
|
+
expect(result).toEqual({
|
|
125
|
+
user: { id: 1, name: "John" }
|
|
126
|
+
});
|
|
127
|
+
});
|
|
128
|
+
it("should handle multiple trailing commas", () => {
|
|
129
|
+
const jsonString = '{"items": [1, 2, 3,,,], "count": 3,,,}';
|
|
130
|
+
const result = JsonUtil_1.JsonUtil.parse(jsonString);
|
|
131
|
+
expect(result).toEqual({
|
|
132
|
+
items: [1, 2, 3],
|
|
133
|
+
count: 3
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
it("should handle JSON with whitespace and formatting issues", () => {
|
|
137
|
+
const jsonString = '{} { "name" : "test" , "value" : 42 , } ';
|
|
138
|
+
const result = JsonUtil_1.JsonUtil.parse(jsonString);
|
|
139
|
+
expect(result).toEqual({ name: "test", value: 42 });
|
|
140
|
+
});
|
|
141
|
+
it("should throw error for completely invalid JSON", () => {
|
|
142
|
+
const invalidJson = '{invalid: json without quotes}';
|
|
143
|
+
expect(() => JsonUtil_1.JsonUtil.parse(invalidJson)).toThrow();
|
|
144
|
+
});
|
|
145
|
+
it("should throw error for empty string", () => {
|
|
146
|
+
expect(() => JsonUtil_1.JsonUtil.parse("")).toThrow();
|
|
147
|
+
});
|
|
80
148
|
});
|
|
81
149
|
});
|
|
82
150
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JsonUtil.spec.js","sourceRoot":"","sources":["../../src/utils/JsonUtil.spec.ts"],"names":[],"mappings":";;AAAA,yCAAsC;AAEtC,QAAQ,CAAC,UAAU,EAAE,GAAG,EAAE;IACxB,QAAQ,CAAC,OAAO,EAAE,GAAG,EAAE;
|
|
1
|
+
{"version":3,"file":"JsonUtil.spec.js","sourceRoot":"","sources":["../../src/utils/JsonUtil.spec.ts"],"names":[],"mappings":";;AAAA,yCAAsC;AAEtC,QAAQ,CAAC,UAAU,EAAE,GAAG,EAAE;IACxB,QAAQ,CAAC,OAAO,EAAE,GAAG,EAAE;QAErB,QAAQ,CAAC,mBAAmB,EAAE,GAAG,EAAE;YACjC,EAAE,CAAC,kCAAkC,EAAE,GAAG,EAAE;gBAC1C,MAAM,UAAU,GAAG,oBAAoB,CAAC;gBACxC,MAAM,MAAM,GAAG,mBAAQ,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;gBAE1C,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;YAC7C,CAAC,CAAC,CAAC;YAEH,EAAE,CAAC,uCAAuC,EAAE,GAAG,EAAE;gBAC/C,MAAM,UAAU,GAAG,iCAAiC,CAAC;gBAC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AC,KAAK,CAAC,UAAU,CAAC,CAAC;gBAE1C,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;YACtD,CAAC,CAAC,CAAC;YAEH,EAAE,CAAC,gDAAgD,EAAE,GAAG,EAAE;gBACxD,MAAM,WAAW,GAAG,gCAAgC,CAAC;gBAErD,MAAM,CAAC,GAAG,EAAE,CAAC,mBAAQ,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;YACtD,CAAC,CAAC,CAAC;YAEH,EAAE,CAAC,qCAAqC,EAAE,GAAG,EAAE;gBAC7C,MAAM,CAAC,GAAG,EAAE,CAAC,mBAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;YAC7C,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IAEL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentica/core",
|
|
3
|
-
"version": "0.32.
|
|
3
|
+
"version": "0.32.8",
|
|
4
4
|
"description": "Agentic AI Library specialized in LLM Function Calling",
|
|
5
5
|
"author": "Wrtn Technologies",
|
|
6
6
|
"license": "MIT",
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@samchon/openapi": "^4.7.1",
|
|
51
|
+
"es-jsonkit": "^0.1.6",
|
|
51
52
|
"tstl": "^3.0.0",
|
|
52
53
|
"typia": "^9.7.0",
|
|
53
54
|
"uuid": "^11.0.4"
|