@inline-chat/hermes-agent-adapter 1.0.0-alpha.2 → 1.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/dist/install.js +95 -95
- package/package.json +10 -4
- package/plugin/inline/adapter.py +104 -74
- package/plugin/inline/cli.py +9 -2
- package/plugin/inline/plugin.yaml +1 -1
- package/plugin/inline/sidecar/index.mjs +846 -801
- package/plugin/inline/tools.py +32 -8
package/dist/install.js
CHANGED
|
@@ -484,8 +484,8 @@ var require_toJS = __commonJS(function(exports) {
|
|
|
484
484
|
return value.toJSON(arg, ctx);
|
|
485
485
|
const data = { aliasCount: 0, count: 1, res: undefined };
|
|
486
486
|
ctx.anchors.set(value, data);
|
|
487
|
-
ctx.onCreate = (
|
|
488
|
-
data.res =
|
|
487
|
+
ctx.onCreate = (res) => {
|
|
488
|
+
data.res = res;
|
|
489
489
|
delete ctx.onCreate;
|
|
490
490
|
};
|
|
491
491
|
const res = value.toJSON(arg, ctx);
|
|
@@ -529,8 +529,8 @@ var require_Node = __commonJS(function(exports) {
|
|
|
529
529
|
};
|
|
530
530
|
const res = toJS.toJS(this, "", ctx);
|
|
531
531
|
if (typeof onAnchor === "function")
|
|
532
|
-
for (const { count, res
|
|
533
|
-
onAnchor(
|
|
532
|
+
for (const { count, res } of ctx.anchors.values())
|
|
533
|
+
onAnchor(res, count);
|
|
534
534
|
return typeof reviver === "function" ? applyReviver.applyReviver(reviver, { "": res }, "", res) : res;
|
|
535
535
|
}
|
|
536
536
|
}
|
|
@@ -584,16 +584,16 @@ var require_Alias = __commonJS(function(exports) {
|
|
|
584
584
|
toJSON(_arg, ctx) {
|
|
585
585
|
if (!ctx)
|
|
586
586
|
return { source: this.source };
|
|
587
|
-
const { anchors
|
|
587
|
+
const { anchors, doc, maxAliasCount } = ctx;
|
|
588
588
|
const source = this.resolve(doc, ctx);
|
|
589
589
|
if (!source) {
|
|
590
590
|
const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
|
|
591
591
|
throw new ReferenceError(msg);
|
|
592
592
|
}
|
|
593
|
-
let data =
|
|
593
|
+
let data = anchors.get(source);
|
|
594
594
|
if (!data) {
|
|
595
595
|
toJS.toJS(source, null, ctx);
|
|
596
|
-
data =
|
|
596
|
+
data = anchors.get(source);
|
|
597
597
|
}
|
|
598
598
|
if (data?.res === undefined) {
|
|
599
599
|
const msg = "This should not happen: Alias anchor was not resolved?";
|
|
@@ -602,7 +602,7 @@ var require_Alias = __commonJS(function(exports) {
|
|
|
602
602
|
if (maxAliasCount >= 0) {
|
|
603
603
|
data.count += 1;
|
|
604
604
|
if (data.aliasCount === 0)
|
|
605
|
-
data.aliasCount = getAliasCount(doc, source,
|
|
605
|
+
data.aliasCount = getAliasCount(doc, source, anchors);
|
|
606
606
|
if (data.count * data.aliasCount > maxAliasCount) {
|
|
607
607
|
const msg = "Excessive alias count indicates a resource exhaustion attack";
|
|
608
608
|
throw new ReferenceError(msg);
|
|
@@ -624,22 +624,22 @@ var require_Alias = __commonJS(function(exports) {
|
|
|
624
624
|
return src;
|
|
625
625
|
}
|
|
626
626
|
}
|
|
627
|
-
function getAliasCount(doc, node,
|
|
627
|
+
function getAliasCount(doc, node, anchors) {
|
|
628
628
|
if (identity.isAlias(node)) {
|
|
629
629
|
const source = node.resolve(doc);
|
|
630
|
-
const anchor =
|
|
630
|
+
const anchor = anchors && source && anchors.get(source);
|
|
631
631
|
return anchor ? anchor.count * anchor.aliasCount : 0;
|
|
632
632
|
} else if (identity.isCollection(node)) {
|
|
633
633
|
let count = 0;
|
|
634
634
|
for (const item of node.items) {
|
|
635
|
-
const c = getAliasCount(doc, item,
|
|
635
|
+
const c = getAliasCount(doc, item, anchors);
|
|
636
636
|
if (c > count)
|
|
637
637
|
count = c;
|
|
638
638
|
}
|
|
639
639
|
return count;
|
|
640
640
|
} else if (identity.isPair(node)) {
|
|
641
|
-
const kc = getAliasCount(doc, node.key,
|
|
642
|
-
const vc = getAliasCount(doc, node.value,
|
|
641
|
+
const kc = getAliasCount(doc, node.key, anchors);
|
|
642
|
+
const vc = getAliasCount(doc, node.value, anchors);
|
|
643
643
|
return Math.max(kc, vc);
|
|
644
644
|
}
|
|
645
645
|
return 1;
|
|
@@ -724,10 +724,10 @@ var require_createNode = __commonJS(function(exports) {
|
|
|
724
724
|
value = value.toJSON();
|
|
725
725
|
}
|
|
726
726
|
if (!value || typeof value !== "object") {
|
|
727
|
-
const
|
|
727
|
+
const node = new Scalar.Scalar(value);
|
|
728
728
|
if (ref)
|
|
729
|
-
ref.node =
|
|
730
|
-
return
|
|
729
|
+
ref.node = node;
|
|
730
|
+
return node;
|
|
731
731
|
}
|
|
732
732
|
tagObj = value instanceof Map ? schema[identity.MAP] : (Symbol.iterator in Object(value)) ? schema[identity.SEQ] : schema[identity.MAP];
|
|
733
733
|
}
|
|
@@ -976,17 +976,17 @@ var require_foldFlowLines = __commonJS(function(exports) {
|
|
|
976
976
|
if (onFold)
|
|
977
977
|
onFold();
|
|
978
978
|
let res = text.slice(0, folds[0]);
|
|
979
|
-
for (let
|
|
980
|
-
const fold = folds[
|
|
981
|
-
const
|
|
979
|
+
for (let i = 0;i < folds.length; ++i) {
|
|
980
|
+
const fold = folds[i];
|
|
981
|
+
const end = folds[i + 1] || text.length;
|
|
982
982
|
if (fold === 0)
|
|
983
983
|
res = `
|
|
984
|
-
${indent}${text.slice(0,
|
|
984
|
+
${indent}${text.slice(0, end)}`;
|
|
985
985
|
else {
|
|
986
986
|
if (mode === FOLD_QUOTED && escapedFolds[fold])
|
|
987
987
|
res += `${text[fold]}\\`;
|
|
988
988
|
res += `
|
|
989
|
-
${indent}${text.slice(fold + 1,
|
|
989
|
+
${indent}${text.slice(fold + 1, end)}`;
|
|
990
990
|
}
|
|
991
991
|
}
|
|
992
992
|
return res;
|
|
@@ -1622,15 +1622,15 @@ var require_merge = __commonJS(function(exports) {
|
|
|
1622
1622
|
if (!identity.isMap(source))
|
|
1623
1623
|
throw new Error("Merge sources must be maps or map aliases");
|
|
1624
1624
|
const srcMap = source.toJSON(null, ctx, Map);
|
|
1625
|
-
for (const [key,
|
|
1625
|
+
for (const [key, value] of srcMap) {
|
|
1626
1626
|
if (map instanceof Map) {
|
|
1627
1627
|
if (!map.has(key))
|
|
1628
|
-
map.set(key,
|
|
1628
|
+
map.set(key, value);
|
|
1629
1629
|
} else if (map instanceof Set) {
|
|
1630
1630
|
map.add(key);
|
|
1631
1631
|
} else if (!Object.prototype.hasOwnProperty.call(map, key)) {
|
|
1632
1632
|
Object.defineProperty(map, key, {
|
|
1633
|
-
value
|
|
1633
|
+
value,
|
|
1634
1634
|
writable: true,
|
|
1635
1635
|
enumerable: true,
|
|
1636
1636
|
configurable: true
|
|
@@ -1753,8 +1753,8 @@ var require_stringifyCollection = __commonJS(function(exports) {
|
|
|
1753
1753
|
var stringifyComment = require_stringifyComment();
|
|
1754
1754
|
function stringifyCollection(collection, ctx, options) {
|
|
1755
1755
|
const flow = ctx.inFlow ?? collection.flow;
|
|
1756
|
-
const
|
|
1757
|
-
return
|
|
1756
|
+
const stringify = flow ? stringifyFlowCollection : stringifyBlockCollection;
|
|
1757
|
+
return stringify(collection, ctx, options);
|
|
1758
1758
|
}
|
|
1759
1759
|
function stringifyBlockCollection({ comment, items }, ctx, { blockItemPrefix, flowChars, itemIndent, onChompKeep, onComment }) {
|
|
1760
1760
|
const { indent, options: { commentString } } = ctx;
|
|
@@ -1763,13 +1763,13 @@ var require_stringifyCollection = __commonJS(function(exports) {
|
|
|
1763
1763
|
const lines = [];
|
|
1764
1764
|
for (let i = 0;i < items.length; ++i) {
|
|
1765
1765
|
const item = items[i];
|
|
1766
|
-
let
|
|
1766
|
+
let comment = null;
|
|
1767
1767
|
if (identity.isNode(item)) {
|
|
1768
1768
|
if (!chompKeep && item.spaceBefore)
|
|
1769
1769
|
lines.push("");
|
|
1770
1770
|
addCommentBefore(ctx, lines, item.commentBefore, chompKeep);
|
|
1771
1771
|
if (item.comment)
|
|
1772
|
-
|
|
1772
|
+
comment = item.comment;
|
|
1773
1773
|
} else if (identity.isPair(item)) {
|
|
1774
1774
|
const ik = identity.isNode(item.key) ? item.key : null;
|
|
1775
1775
|
if (ik) {
|
|
@@ -1779,12 +1779,12 @@ var require_stringifyCollection = __commonJS(function(exports) {
|
|
|
1779
1779
|
}
|
|
1780
1780
|
}
|
|
1781
1781
|
chompKeep = false;
|
|
1782
|
-
let
|
|
1783
|
-
if (
|
|
1784
|
-
|
|
1785
|
-
if (chompKeep &&
|
|
1782
|
+
let str = stringify.stringify(item, itemCtx, () => comment = null, () => chompKeep = true);
|
|
1783
|
+
if (comment)
|
|
1784
|
+
str += stringifyComment.lineComment(str, itemIndent, commentString(comment));
|
|
1785
|
+
if (chompKeep && comment)
|
|
1786
1786
|
chompKeep = false;
|
|
1787
|
-
lines.push(blockItemPrefix +
|
|
1787
|
+
lines.push(blockItemPrefix + str);
|
|
1788
1788
|
}
|
|
1789
1789
|
let str;
|
|
1790
1790
|
if (lines.length === 0) {
|
|
@@ -2034,10 +2034,10 @@ var require_map = __commonJS(function(exports) {
|
|
|
2034
2034
|
default: true,
|
|
2035
2035
|
nodeClass: YAMLMap.YAMLMap,
|
|
2036
2036
|
tag: "tag:yaml.org,2002:map",
|
|
2037
|
-
resolve(
|
|
2038
|
-
if (!identity.isMap(
|
|
2037
|
+
resolve(map, onError) {
|
|
2038
|
+
if (!identity.isMap(map))
|
|
2039
2039
|
onError("Expected a mapping for this tag");
|
|
2040
|
-
return
|
|
2040
|
+
return map;
|
|
2041
2041
|
},
|
|
2042
2042
|
createNode: (schema, obj, ctx) => YAMLMap.YAMLMap.from(schema, obj, ctx)
|
|
2043
2043
|
};
|
|
@@ -2146,10 +2146,10 @@ var require_seq = __commonJS(function(exports) {
|
|
|
2146
2146
|
default: true,
|
|
2147
2147
|
nodeClass: YAMLSeq.YAMLSeq,
|
|
2148
2148
|
tag: "tag:yaml.org,2002:seq",
|
|
2149
|
-
resolve(
|
|
2150
|
-
if (!identity.isSeq(
|
|
2149
|
+
resolve(seq, onError) {
|
|
2150
|
+
if (!identity.isSeq(seq))
|
|
2151
2151
|
onError("Expected a sequence for this tag");
|
|
2152
|
-
return
|
|
2152
|
+
return seq;
|
|
2153
2153
|
},
|
|
2154
2154
|
createNode: (schema, obj, ctx) => YAMLSeq.YAMLSeq.from(schema, obj, ctx)
|
|
2155
2155
|
};
|
|
@@ -2495,8 +2495,8 @@ ${cn.comment}` : item.comment;
|
|
|
2495
2495
|
}
|
|
2496
2496
|
function createPairs(schema, iterable, ctx) {
|
|
2497
2497
|
const { replacer } = ctx;
|
|
2498
|
-
const
|
|
2499
|
-
|
|
2498
|
+
const pairs = new YAMLSeq.YAMLSeq(schema);
|
|
2499
|
+
pairs.tag = "tag:yaml.org,2002:pairs";
|
|
2500
2500
|
let i = 0;
|
|
2501
2501
|
if (iterable && Symbol.iterator in Object(iterable))
|
|
2502
2502
|
for (let it of iterable) {
|
|
@@ -2520,9 +2520,9 @@ ${cn.comment}` : item.comment;
|
|
|
2520
2520
|
} else {
|
|
2521
2521
|
key = it;
|
|
2522
2522
|
}
|
|
2523
|
-
|
|
2523
|
+
pairs.items.push(Pair.createPair(key, value, ctx));
|
|
2524
2524
|
}
|
|
2525
|
-
return
|
|
2525
|
+
return pairs;
|
|
2526
2526
|
}
|
|
2527
2527
|
var pairs = {
|
|
2528
2528
|
collection: "seq",
|
|
@@ -2576,9 +2576,9 @@ var require_omap = __commonJS(function(exports) {
|
|
|
2576
2576
|
}
|
|
2577
2577
|
static from(schema, iterable, ctx) {
|
|
2578
2578
|
const pairs$1 = pairs.createPairs(schema, iterable, ctx);
|
|
2579
|
-
const
|
|
2580
|
-
|
|
2581
|
-
return
|
|
2579
|
+
const omap = new this;
|
|
2580
|
+
omap.items = pairs$1.items;
|
|
2581
|
+
return omap;
|
|
2582
2582
|
}
|
|
2583
2583
|
}
|
|
2584
2584
|
YAMLOMap.tag = "tag:yaml.org,2002:omap";
|
|
@@ -2704,8 +2704,8 @@ var require_int2 = __commonJS(function(exports) {
|
|
|
2704
2704
|
str = `0x${str}`;
|
|
2705
2705
|
break;
|
|
2706
2706
|
}
|
|
2707
|
-
const
|
|
2708
|
-
return sign === "-" ? BigInt(-1) *
|
|
2707
|
+
const n = BigInt(str);
|
|
2708
|
+
return sign === "-" ? BigInt(-1) * n : n;
|
|
2709
2709
|
}
|
|
2710
2710
|
const n = parseInt(str, radix);
|
|
2711
2711
|
return sign === "-" ? -1 * n : n;
|
|
@@ -2809,14 +2809,14 @@ var require_set = __commonJS(function(exports) {
|
|
|
2809
2809
|
}
|
|
2810
2810
|
static from(schema, iterable, ctx) {
|
|
2811
2811
|
const { replacer } = ctx;
|
|
2812
|
-
const
|
|
2812
|
+
const set = new this(schema);
|
|
2813
2813
|
if (iterable && Symbol.iterator in Object(iterable))
|
|
2814
2814
|
for (let value of iterable) {
|
|
2815
2815
|
if (typeof replacer === "function")
|
|
2816
2816
|
value = replacer.call(iterable, value, value);
|
|
2817
|
-
|
|
2817
|
+
set.items.push(Pair.createPair(value, null, ctx));
|
|
2818
2818
|
}
|
|
2819
|
-
return
|
|
2819
|
+
return set;
|
|
2820
2820
|
}
|
|
2821
2821
|
}
|
|
2822
2822
|
YAMLSet.tag = "tag:yaml.org,2002:set";
|
|
@@ -2849,7 +2849,7 @@ var require_timestamp = __commonJS(function(exports) {
|
|
|
2849
2849
|
const sign = str[0];
|
|
2850
2850
|
const parts = sign === "-" || sign === "+" ? str.substring(1) : str;
|
|
2851
2851
|
const num = (n) => asBigInt ? BigInt(n) : Number(n);
|
|
2852
|
-
const res = parts.replace(/_/g, "").split(":").reduce((
|
|
2852
|
+
const res = parts.replace(/_/g, "").split(":").reduce((res, p) => res * num(60) + num(p), num(0));
|
|
2853
2853
|
return sign === "-" ? num(-1) * res : res;
|
|
2854
2854
|
}
|
|
2855
2855
|
function stringifySexagesimal(node) {
|
|
@@ -3040,16 +3040,16 @@ var require_tags = __commonJS(function(exports) {
|
|
|
3040
3040
|
}
|
|
3041
3041
|
if (addMergeTag)
|
|
3042
3042
|
tags = tags.concat(merge.merge);
|
|
3043
|
-
return tags.reduce((
|
|
3043
|
+
return tags.reduce((tags, tag) => {
|
|
3044
3044
|
const tagObj = typeof tag === "string" ? tagsByName[tag] : tag;
|
|
3045
3045
|
if (!tagObj) {
|
|
3046
3046
|
const tagName = JSON.stringify(tag);
|
|
3047
3047
|
const keys = Object.keys(tagsByName).map((key) => JSON.stringify(key)).join(", ");
|
|
3048
3048
|
throw new Error(`Unknown custom tag ${tagName}; use one of ${keys}`);
|
|
3049
3049
|
}
|
|
3050
|
-
if (!
|
|
3051
|
-
|
|
3052
|
-
return
|
|
3050
|
+
if (!tags.includes(tagObj))
|
|
3051
|
+
tags.push(tagObj);
|
|
3052
|
+
return tags;
|
|
3053
3053
|
}, []);
|
|
3054
3054
|
}
|
|
3055
3055
|
exports.coreKnownTags = coreKnownTags;
|
|
@@ -3376,8 +3376,8 @@ var require_Document = __commonJS(function(exports) {
|
|
|
3376
3376
|
};
|
|
3377
3377
|
const res = toJS.toJS(this.contents, jsonArg ?? "", ctx);
|
|
3378
3378
|
if (typeof onAnchor === "function")
|
|
3379
|
-
for (const { count, res
|
|
3380
|
-
onAnchor(
|
|
3379
|
+
for (const { count, res } of ctx.anchors.values())
|
|
3380
|
+
onAnchor(res, count);
|
|
3381
3381
|
return typeof reviver === "function" ? applyReviver.applyReviver(reviver, { "": res }, "", res) : res;
|
|
3382
3382
|
}
|
|
3383
3383
|
toJSON(jsonArg, onAnchor) {
|
|
@@ -4131,12 +4131,12 @@ var require_resolve_block_scalar = __commonJS(function(exports) {
|
|
|
4131
4131
|
break;
|
|
4132
4132
|
}
|
|
4133
4133
|
if (chompStart === 0) {
|
|
4134
|
-
const
|
|
4134
|
+
const value = header.chomp === "+" && lines.length > 0 ? `
|
|
4135
4135
|
`.repeat(Math.max(1, lines.length - 1)) : "";
|
|
4136
|
-
let
|
|
4136
|
+
let end = start + header.length;
|
|
4137
4137
|
if (scalar.source)
|
|
4138
|
-
|
|
4139
|
-
return { value
|
|
4138
|
+
end += scalar.source.length;
|
|
4139
|
+
return { value, type, comment: header.comment, range: [start, end, end] };
|
|
4140
4140
|
}
|
|
4141
4141
|
let trimIndent = scalar.indent + header.indent;
|
|
4142
4142
|
let offset = scalar.offset + header.length;
|
|
@@ -4585,9 +4585,9 @@ var require_compose_scalar = __commonJS(function(exports) {
|
|
|
4585
4585
|
return schema[identity.SCALAR];
|
|
4586
4586
|
}
|
|
4587
4587
|
function findScalarTagByTest({ atKey, directives, schema }, value, token, onError) {
|
|
4588
|
-
const tag = schema.tags.find((
|
|
4588
|
+
const tag = schema.tags.find((tag) => (tag.default === true || atKey && tag.default === "key") && tag.test?.test(value)) || schema[identity.SCALAR];
|
|
4589
4589
|
if (schema.compat) {
|
|
4590
|
-
const compat = schema.compat.find((
|
|
4590
|
+
const compat = schema.compat.find((tag) => tag.default && tag.test?.test(value)) ?? schema[identity.SCALAR];
|
|
4591
4591
|
if (tag.tag !== compat.tag) {
|
|
4592
4592
|
const ts = directives.tagString(tag.tag);
|
|
4593
4593
|
const cs = directives.tagString(compat.tag);
|
|
@@ -5743,18 +5743,18 @@ var require_lexer = __commonJS(function(exports) {
|
|
|
5743
5743
|
let indent = 0;
|
|
5744
5744
|
let ch;
|
|
5745
5745
|
loop:
|
|
5746
|
-
for (let
|
|
5746
|
+
for (let i = this.pos;ch = this.buffer[i]; ++i) {
|
|
5747
5747
|
switch (ch) {
|
|
5748
5748
|
case " ":
|
|
5749
5749
|
indent += 1;
|
|
5750
5750
|
break;
|
|
5751
5751
|
case `
|
|
5752
5752
|
`:
|
|
5753
|
-
nl =
|
|
5753
|
+
nl = i;
|
|
5754
5754
|
indent = 0;
|
|
5755
5755
|
break;
|
|
5756
5756
|
case "\r": {
|
|
5757
|
-
const next = this.buffer[
|
|
5757
|
+
const next = this.buffer[i + 1];
|
|
5758
5758
|
if (!next && !this.atEnd)
|
|
5759
5759
|
return this.setNext("block-scalar");
|
|
5760
5760
|
if (next === `
|
|
@@ -5797,16 +5797,16 @@ var require_lexer = __commonJS(function(exports) {
|
|
|
5797
5797
|
nl = i - 1;
|
|
5798
5798
|
} else if (!this.blockScalarKeep) {
|
|
5799
5799
|
do {
|
|
5800
|
-
let
|
|
5801
|
-
let
|
|
5802
|
-
if (
|
|
5803
|
-
|
|
5804
|
-
const lastChar =
|
|
5805
|
-
while (
|
|
5806
|
-
|
|
5807
|
-
if (
|
|
5808
|
-
` &&
|
|
5809
|
-
nl =
|
|
5800
|
+
let i = nl - 1;
|
|
5801
|
+
let ch = this.buffer[i];
|
|
5802
|
+
if (ch === "\r")
|
|
5803
|
+
ch = this.buffer[--i];
|
|
5804
|
+
const lastChar = i;
|
|
5805
|
+
while (ch === " ")
|
|
5806
|
+
ch = this.buffer[--i];
|
|
5807
|
+
if (ch === `
|
|
5808
|
+
` && i >= this.pos && i + 1 + indent > lastChar)
|
|
5809
|
+
nl = i;
|
|
5810
5810
|
else
|
|
5811
5811
|
break;
|
|
5812
5812
|
} while (true);
|
|
@@ -6493,12 +6493,12 @@ var require_parser = __commonJS(function(exports) {
|
|
|
6493
6493
|
if (includesToken(it.start, "newline")) {
|
|
6494
6494
|
Object.assign(it, { key: null, sep: [this.sourceToken] });
|
|
6495
6495
|
} else {
|
|
6496
|
-
const
|
|
6496
|
+
const start = getFirstKeyStartProps(it.start);
|
|
6497
6497
|
this.stack.push({
|
|
6498
6498
|
type: "block-map",
|
|
6499
6499
|
offset: this.offset,
|
|
6500
6500
|
indent: this.indent,
|
|
6501
|
-
items: [{ start
|
|
6501
|
+
items: [{ start, key: null, sep: [this.sourceToken] }]
|
|
6502
6502
|
});
|
|
6503
6503
|
}
|
|
6504
6504
|
} else if (it.value) {
|
|
@@ -6511,7 +6511,7 @@ var require_parser = __commonJS(function(exports) {
|
|
|
6511
6511
|
items: [{ start, key: null, sep: [this.sourceToken] }]
|
|
6512
6512
|
});
|
|
6513
6513
|
} else if (isFlowToken(it.key) && !includesToken(it.sep, "newline")) {
|
|
6514
|
-
const
|
|
6514
|
+
const start = getFirstKeyStartProps(it.start);
|
|
6515
6515
|
const key = it.key;
|
|
6516
6516
|
const sep = it.sep;
|
|
6517
6517
|
sep.push(this.sourceToken);
|
|
@@ -6521,7 +6521,7 @@ var require_parser = __commonJS(function(exports) {
|
|
|
6521
6521
|
type: "block-map",
|
|
6522
6522
|
offset: this.offset,
|
|
6523
6523
|
indent: this.indent,
|
|
6524
|
-
items: [{ start
|
|
6524
|
+
items: [{ start, key, sep }]
|
|
6525
6525
|
});
|
|
6526
6526
|
} else if (start.length > 0) {
|
|
6527
6527
|
it.sep = it.sep.concat(start, this.sourceToken);
|
|
@@ -6865,22 +6865,22 @@ var require_public_api = __commonJS(function(exports) {
|
|
|
6865
6865
|
return { lineCounter: lineCounter$1, prettyErrors };
|
|
6866
6866
|
}
|
|
6867
6867
|
function parseAllDocuments(source, options = {}) {
|
|
6868
|
-
const { lineCounter
|
|
6869
|
-
const parser$1 = new parser.Parser(
|
|
6868
|
+
const { lineCounter, prettyErrors } = parseOptions(options);
|
|
6869
|
+
const parser$1 = new parser.Parser(lineCounter?.addNewLine);
|
|
6870
6870
|
const composer$1 = new composer.Composer(options);
|
|
6871
6871
|
const docs = Array.from(composer$1.compose(parser$1.parse(source)));
|
|
6872
|
-
if (prettyErrors &&
|
|
6872
|
+
if (prettyErrors && lineCounter)
|
|
6873
6873
|
for (const doc of docs) {
|
|
6874
|
-
doc.errors.forEach(errors.prettifyError(source,
|
|
6875
|
-
doc.warnings.forEach(errors.prettifyError(source,
|
|
6874
|
+
doc.errors.forEach(errors.prettifyError(source, lineCounter));
|
|
6875
|
+
doc.warnings.forEach(errors.prettifyError(source, lineCounter));
|
|
6876
6876
|
}
|
|
6877
6877
|
if (docs.length > 0)
|
|
6878
6878
|
return docs;
|
|
6879
6879
|
return Object.assign([], { empty: true }, composer$1.streamInfo());
|
|
6880
6880
|
}
|
|
6881
6881
|
function parseDocument(source, options = {}) {
|
|
6882
|
-
const { lineCounter
|
|
6883
|
-
const parser$1 = new parser.Parser(
|
|
6882
|
+
const { lineCounter, prettyErrors } = parseOptions(options);
|
|
6883
|
+
const parser$1 = new parser.Parser(lineCounter?.addNewLine);
|
|
6884
6884
|
const composer$1 = new composer.Composer(options);
|
|
6885
6885
|
let doc = null;
|
|
6886
6886
|
for (const _doc of composer$1.compose(parser$1.parse(source), true, source.length)) {
|
|
@@ -6891,9 +6891,9 @@ var require_public_api = __commonJS(function(exports) {
|
|
|
6891
6891
|
break;
|
|
6892
6892
|
}
|
|
6893
6893
|
}
|
|
6894
|
-
if (prettyErrors &&
|
|
6895
|
-
doc.errors.forEach(errors.prettifyError(source,
|
|
6896
|
-
doc.warnings.forEach(errors.prettifyError(source,
|
|
6894
|
+
if (prettyErrors && lineCounter) {
|
|
6895
|
+
doc.errors.forEach(errors.prettifyError(source, lineCounter));
|
|
6896
|
+
doc.warnings.forEach(errors.prettifyError(source, lineCounter));
|
|
6897
6897
|
}
|
|
6898
6898
|
return doc;
|
|
6899
6899
|
}
|
|
@@ -7073,13 +7073,13 @@ async function main(argv = process.argv.slice(2)) {
|
|
|
7073
7073
|
return status.ok ? 0 : 1;
|
|
7074
7074
|
}
|
|
7075
7075
|
if (opts.command === "test-send") {
|
|
7076
|
-
const
|
|
7076
|
+
const result = await testSend({ source, opts, pkg });
|
|
7077
7077
|
if (opts.json) {
|
|
7078
|
-
console.log(JSON.stringify(
|
|
7078
|
+
console.log(JSON.stringify(result, null, 2));
|
|
7079
7079
|
} else {
|
|
7080
|
-
printTestSendResult(
|
|
7080
|
+
printTestSendResult(result);
|
|
7081
7081
|
}
|
|
7082
|
-
return
|
|
7082
|
+
return result.ok ? 0 : 1;
|
|
7083
7083
|
}
|
|
7084
7084
|
const result = await installPlugin({ source, target, opts, pkg });
|
|
7085
7085
|
if (opts.json) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inline-chat/hermes-agent-adapter",
|
|
3
|
-
"version": "1.0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Hermes Agent platform adapter for Inline, with a native Python plugin and bundled Inline realtime sidecar.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -74,6 +74,12 @@
|
|
|
74
74
|
"typescript": "5.8.3",
|
|
75
75
|
"vitest": "4.1.10"
|
|
76
76
|
},
|
|
77
|
+
"overrides": {
|
|
78
|
+
"@noble/ciphers": "1.3.0",
|
|
79
|
+
"@noble/hashes": "1.8.0",
|
|
80
|
+
"@protobuf-ts/runtime": "2.11.1",
|
|
81
|
+
"ws": "8.22.1"
|
|
82
|
+
},
|
|
77
83
|
"publishConfig": {
|
|
78
84
|
"access": "public"
|
|
79
85
|
},
|
|
@@ -88,9 +94,9 @@
|
|
|
88
94
|
"testedHermesVersion": "0.22.5",
|
|
89
95
|
"testedHermesCommit": "bf0203a794a07aac3ff764972ab9087baa4e4f4e"
|
|
90
96
|
},
|
|
91
|
-
"gitHead": "
|
|
97
|
+
"gitHead": "16c59df96eba4c530270ca1e093ef5fd22d7bd98",
|
|
92
98
|
"inlineRelease": {
|
|
93
|
-
"tag": "hermes-agent-v1.0.0
|
|
94
|
-
"sha": "
|
|
99
|
+
"tag": "hermes-agent-v1.0.0",
|
|
100
|
+
"sha": "16c59df96eba4c530270ca1e093ef5fd22d7bd98"
|
|
95
101
|
}
|
|
96
102
|
}
|