@signetai/connector-openclaw 0.163.16 → 0.163.18
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/index.d.ts.map +1 -1
- package/dist/index.js +108 -108
- package/package.json +3 -3
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAKH,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAKH,OAAO,EACN,aAAa,EACb,KAAK,aAAa,EAClB,KAAK,eAAe,EAGpB,MAAM,wBAAwB,CAAC;AAkDhC,MAAM,WAAW,sBAAsB;IACtC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,WAAW,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;CAClC;AAED,MAAM,MAAM,oBAAoB,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,IAAI,CAAC;AA2FvE;;;;GAIG;AACH,qBAAa,iBAAkB,SAAQ,aAAa;IACnD,QAAQ,CAAC,IAAI,cAAc;IAC3B,QAAQ,CAAC,SAAS,cAAc;IAEhC;;;;;;;;;;;;OAYG;IACG,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,GAAE,sBAA2B,GAAG,OAAO,CAAC,aAAa,CAAC;IA+F7F;;OAEG;IACG,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAiB7D;;;;OAIG;IACG,kBAAkB,CACvB,MAAM,EAAE,aAAa,CAAC;QACrB,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;QAClC,MAAM,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;KAC/B,CAAC,EACF,QAAQ,EAAE,MAAM,GACd,OAAO,CAAC,IAAI,CAAC;IAsDhB;;OAEG;IACH,wBAAwB,IAAI,MAAM,EAAE;IAIpC;;;;OAIG;IACH,2BAA2B,IAAI,MAAM,EAAE;IAmCvC;;;;OAIG;IACG,SAAS,IAAI,OAAO,CAAC,eAAe,CAAC;IAmD3C,OAAO,CAAC,qBAAqB;IA8C7B;;;OAGG;IACH,WAAW,IAAI,OAAO;IA0BtB,eAAe,IAAI,oBAAoB;IAqCvC,wBAAwB,IAAI,QAAQ,GAAG,QAAQ,GAAG,IAAI;IAWtD;;OAEG;IACH,aAAa,IAAI,MAAM;IAevB;;;;OAIG;IACH,OAAO,CAAC,qBAAqB;IAQ7B;;;;OAIG;IACH,OAAO,CAAC,uBAAuB;IAoB/B,OAAO,CAAC,mBAAmB;IAmG3B;;;;;;;;OAQG;IACH,OAAO,CAAC,yBAAyB;IAyFjC,OAAO,CAAC,eAAe;IAsBvB,OAAO,CAAC,WAAW;IAUnB;;;;;;;;OAQG;IACH,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG;QAAE,OAAO,EAAE,MAAM,EAAE,CAAC;QAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;KAAE;IAkF7E;;;;;OAKG;IACH,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE;IAsJ5C,0DAA0D;IAC1D,OAAO,CAAC,YAAY;IAKpB,OAAO,CAAC,UAAU;CAIlB;AAMD,6CAA6C;AAC7C,wBAAgB,eAAe,IAAI,iBAAiB,CAEnD;AAED,eAAe,iBAAiB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { delimiter, join as join4, resolve } from "node:path";
|
|
|
6
6
|
// ../../../libs/connector-base/dist/index.js
|
|
7
7
|
import { randomBytes } from "node:crypto";
|
|
8
8
|
import { existsSync, readFileSync, renameSync, statSync as statSync2, unlinkSync as unlinkSync2, writeFileSync } from "node:fs";
|
|
9
|
-
import { dirname as dirname3, join as join3 } from "node:path";
|
|
9
|
+
import { dirname as dirname3, isAbsolute, join as join3, relative, sep } from "node:path";
|
|
10
10
|
import { createRequire } from "node:module";
|
|
11
11
|
import { dirname, join } from "node:path";
|
|
12
12
|
import { fileURLToPath } from "node:url";
|
|
@@ -3624,10 +3624,10 @@ var require_resolve_block_map = __commonJS2((exports) => {
|
|
|
3624
3624
|
let offset = bm.offset;
|
|
3625
3625
|
let commentEnd = null;
|
|
3626
3626
|
for (const collItem of bm.items) {
|
|
3627
|
-
const { start, key, sep, value } = collItem;
|
|
3627
|
+
const { start, key, sep: sep2, value } = collItem;
|
|
3628
3628
|
const keyProps = resolveProps.resolveProps(start, {
|
|
3629
3629
|
indicator: "explicit-key-ind",
|
|
3630
|
-
next: key ??
|
|
3630
|
+
next: key ?? sep2?.[0],
|
|
3631
3631
|
offset,
|
|
3632
3632
|
onError,
|
|
3633
3633
|
parentIndent: bm.indent,
|
|
@@ -3641,7 +3641,7 @@ var require_resolve_block_map = __commonJS2((exports) => {
|
|
|
3641
3641
|
else if ("indent" in key && key.indent !== bm.indent)
|
|
3642
3642
|
onError(offset, "BAD_INDENT", startColMsg);
|
|
3643
3643
|
}
|
|
3644
|
-
if (!keyProps.anchor && !keyProps.tag && !
|
|
3644
|
+
if (!keyProps.anchor && !keyProps.tag && !sep2) {
|
|
3645
3645
|
commentEnd = keyProps.end;
|
|
3646
3646
|
if (keyProps.comment) {
|
|
3647
3647
|
if (map.comment)
|
|
@@ -3666,7 +3666,7 @@ var require_resolve_block_map = __commonJS2((exports) => {
|
|
|
3666
3666
|
ctx.atKey = false;
|
|
3667
3667
|
if (utilMapIncludes.mapIncludes(ctx, map.items, keyNode))
|
|
3668
3668
|
onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique");
|
|
3669
|
-
const valueProps = resolveProps.resolveProps(
|
|
3669
|
+
const valueProps = resolveProps.resolveProps(sep2 ?? [], {
|
|
3670
3670
|
indicator: "map-value-ind",
|
|
3671
3671
|
next: value,
|
|
3672
3672
|
offset: keyNode.range[2],
|
|
@@ -3682,7 +3682,7 @@ var require_resolve_block_map = __commonJS2((exports) => {
|
|
|
3682
3682
|
if (ctx.options.strict && keyProps.start < valueProps.found.offset - 1024)
|
|
3683
3683
|
onError(keyNode.range, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit block mapping key");
|
|
3684
3684
|
}
|
|
3685
|
-
const valueNode = value ? composeNode(ctx, value, valueProps, onError) : composeEmptyNode(ctx, offset,
|
|
3685
|
+
const valueNode = value ? composeNode(ctx, value, valueProps, onError) : composeEmptyNode(ctx, offset, sep2, null, valueProps, onError);
|
|
3686
3686
|
if (ctx.schema.compat)
|
|
3687
3687
|
utilFlowIndentCheck.flowIndentCheck(bm.indent, value, onError);
|
|
3688
3688
|
offset = valueNode.range[2];
|
|
@@ -3764,7 +3764,7 @@ var require_resolve_end = __commonJS2((exports) => {
|
|
|
3764
3764
|
let comment = "";
|
|
3765
3765
|
if (end) {
|
|
3766
3766
|
let hasSpace = false;
|
|
3767
|
-
let
|
|
3767
|
+
let sep2 = "";
|
|
3768
3768
|
for (const token of end) {
|
|
3769
3769
|
const { source, type } = token;
|
|
3770
3770
|
switch (type) {
|
|
@@ -3778,13 +3778,13 @@ var require_resolve_end = __commonJS2((exports) => {
|
|
|
3778
3778
|
if (!comment)
|
|
3779
3779
|
comment = cb;
|
|
3780
3780
|
else
|
|
3781
|
-
comment +=
|
|
3782
|
-
|
|
3781
|
+
comment += sep2 + cb;
|
|
3782
|
+
sep2 = "";
|
|
3783
3783
|
break;
|
|
3784
3784
|
}
|
|
3785
3785
|
case "newline":
|
|
3786
3786
|
if (comment)
|
|
3787
|
-
|
|
3787
|
+
sep2 += source;
|
|
3788
3788
|
hasSpace = true;
|
|
3789
3789
|
break;
|
|
3790
3790
|
default:
|
|
@@ -3822,18 +3822,18 @@ var require_resolve_flow_collection = __commonJS2((exports) => {
|
|
|
3822
3822
|
let offset = fc.offset + fc.start.source.length;
|
|
3823
3823
|
for (let i = 0;i < fc.items.length; ++i) {
|
|
3824
3824
|
const collItem = fc.items[i];
|
|
3825
|
-
const { start, key, sep, value } = collItem;
|
|
3825
|
+
const { start, key, sep: sep2, value } = collItem;
|
|
3826
3826
|
const props = resolveProps.resolveProps(start, {
|
|
3827
3827
|
flow: fcName,
|
|
3828
3828
|
indicator: "explicit-key-ind",
|
|
3829
|
-
next: key ??
|
|
3829
|
+
next: key ?? sep2?.[0],
|
|
3830
3830
|
offset,
|
|
3831
3831
|
onError,
|
|
3832
3832
|
parentIndent: fc.indent,
|
|
3833
3833
|
startOnNewline: false
|
|
3834
3834
|
});
|
|
3835
3835
|
if (!props.found) {
|
|
3836
|
-
if (!props.anchor && !props.tag && !
|
|
3836
|
+
if (!props.anchor && !props.tag && !sep2 && !value) {
|
|
3837
3837
|
if (i === 0 && props.comma)
|
|
3838
3838
|
onError(props.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${fcName}`);
|
|
3839
3839
|
else if (i < fc.items.length - 1)
|
|
@@ -3885,8 +3885,8 @@ var require_resolve_flow_collection = __commonJS2((exports) => {
|
|
|
3885
3885
|
}
|
|
3886
3886
|
}
|
|
3887
3887
|
}
|
|
3888
|
-
if (!isMap && !
|
|
3889
|
-
const valueNode = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end,
|
|
3888
|
+
if (!isMap && !sep2 && !props.found) {
|
|
3889
|
+
const valueNode = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end, sep2, null, props, onError);
|
|
3890
3890
|
coll.items.push(valueNode);
|
|
3891
3891
|
offset = valueNode.range[2];
|
|
3892
3892
|
if (isBlock(value))
|
|
@@ -3898,7 +3898,7 @@ var require_resolve_flow_collection = __commonJS2((exports) => {
|
|
|
3898
3898
|
if (isBlock(key))
|
|
3899
3899
|
onError(keyNode.range, "BLOCK_IN_FLOW", blockMsg);
|
|
3900
3900
|
ctx.atKey = false;
|
|
3901
|
-
const valueProps = resolveProps.resolveProps(
|
|
3901
|
+
const valueProps = resolveProps.resolveProps(sep2 ?? [], {
|
|
3902
3902
|
flow: fcName,
|
|
3903
3903
|
indicator: "map-value-ind",
|
|
3904
3904
|
next: value,
|
|
@@ -3909,8 +3909,8 @@ var require_resolve_flow_collection = __commonJS2((exports) => {
|
|
|
3909
3909
|
});
|
|
3910
3910
|
if (valueProps.found) {
|
|
3911
3911
|
if (!isMap && !props.found && ctx.options.strict) {
|
|
3912
|
-
if (
|
|
3913
|
-
for (const st of
|
|
3912
|
+
if (sep2)
|
|
3913
|
+
for (const st of sep2) {
|
|
3914
3914
|
if (st === valueProps.found)
|
|
3915
3915
|
break;
|
|
3916
3916
|
if (st.type === "newline") {
|
|
@@ -3927,7 +3927,7 @@ var require_resolve_flow_collection = __commonJS2((exports) => {
|
|
|
3927
3927
|
else
|
|
3928
3928
|
onError(valueProps.start, "MISSING_CHAR", `Missing , or : between ${fcName} items`);
|
|
3929
3929
|
}
|
|
3930
|
-
const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end,
|
|
3930
|
+
const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end, sep2, null, valueProps, onError) : null;
|
|
3931
3931
|
if (valueNode) {
|
|
3932
3932
|
if (isBlock(value))
|
|
3933
3933
|
onError(valueNode.range, "BLOCK_IN_FLOW", blockMsg);
|
|
@@ -4100,7 +4100,7 @@ var require_resolve_block_scalar = __commonJS2((exports) => {
|
|
|
4100
4100
|
chompStart = i + 1;
|
|
4101
4101
|
}
|
|
4102
4102
|
let value = "";
|
|
4103
|
-
let
|
|
4103
|
+
let sep2 = "";
|
|
4104
4104
|
let prevMoreIndented = false;
|
|
4105
4105
|
for (let i = 0;i < contentStart; ++i)
|
|
4106
4106
|
value += lines[i][0].slice(trimIndent) + `
|
|
@@ -4118,33 +4118,33 @@ var require_resolve_block_scalar = __commonJS2((exports) => {
|
|
|
4118
4118
|
indent = "";
|
|
4119
4119
|
}
|
|
4120
4120
|
if (type === Scalar.Scalar.BLOCK_LITERAL) {
|
|
4121
|
-
value +=
|
|
4122
|
-
|
|
4121
|
+
value += sep2 + indent.slice(trimIndent) + content;
|
|
4122
|
+
sep2 = `
|
|
4123
4123
|
`;
|
|
4124
4124
|
} else if (indent.length > trimIndent || content[0] === "\t") {
|
|
4125
|
-
if (
|
|
4126
|
-
|
|
4125
|
+
if (sep2 === " ")
|
|
4126
|
+
sep2 = `
|
|
4127
4127
|
`;
|
|
4128
|
-
else if (!prevMoreIndented &&
|
|
4128
|
+
else if (!prevMoreIndented && sep2 === `
|
|
4129
4129
|
`)
|
|
4130
|
-
|
|
4130
|
+
sep2 = `
|
|
4131
4131
|
|
|
4132
4132
|
`;
|
|
4133
|
-
value +=
|
|
4134
|
-
|
|
4133
|
+
value += sep2 + indent.slice(trimIndent) + content;
|
|
4134
|
+
sep2 = `
|
|
4135
4135
|
`;
|
|
4136
4136
|
prevMoreIndented = true;
|
|
4137
4137
|
} else if (content === "") {
|
|
4138
|
-
if (
|
|
4138
|
+
if (sep2 === `
|
|
4139
4139
|
`)
|
|
4140
4140
|
value += `
|
|
4141
4141
|
`;
|
|
4142
4142
|
else
|
|
4143
|
-
|
|
4143
|
+
sep2 = `
|
|
4144
4144
|
`;
|
|
4145
4145
|
} else {
|
|
4146
|
-
value +=
|
|
4147
|
-
|
|
4146
|
+
value += sep2 + content;
|
|
4147
|
+
sep2 = " ";
|
|
4148
4148
|
prevMoreIndented = false;
|
|
4149
4149
|
}
|
|
4150
4150
|
}
|
|
@@ -4323,27 +4323,27 @@ var require_resolve_flow_scalar = __commonJS2((exports) => {
|
|
|
4323
4323
|
if (!match)
|
|
4324
4324
|
return source;
|
|
4325
4325
|
let res = match[1];
|
|
4326
|
-
let
|
|
4326
|
+
let sep2 = " ";
|
|
4327
4327
|
let pos = first.lastIndex;
|
|
4328
4328
|
line.lastIndex = pos;
|
|
4329
4329
|
while (match = line.exec(source)) {
|
|
4330
4330
|
if (match[1] === "") {
|
|
4331
|
-
if (
|
|
4331
|
+
if (sep2 === `
|
|
4332
4332
|
`)
|
|
4333
|
-
res +=
|
|
4333
|
+
res += sep2;
|
|
4334
4334
|
else
|
|
4335
|
-
|
|
4335
|
+
sep2 = `
|
|
4336
4336
|
`;
|
|
4337
4337
|
} else {
|
|
4338
|
-
res +=
|
|
4339
|
-
|
|
4338
|
+
res += sep2 + match[1];
|
|
4339
|
+
sep2 = " ";
|
|
4340
4340
|
}
|
|
4341
4341
|
pos = line.lastIndex;
|
|
4342
4342
|
}
|
|
4343
4343
|
const last = /[ \t]*(.*)/sy;
|
|
4344
4344
|
last.lastIndex = pos;
|
|
4345
4345
|
match = last.exec(source);
|
|
4346
|
-
return res +
|
|
4346
|
+
return res + sep2 + (match?.[1] ?? "");
|
|
4347
4347
|
}
|
|
4348
4348
|
function doubleQuotedValue(source, onError) {
|
|
4349
4349
|
let res = "";
|
|
@@ -5110,14 +5110,14 @@ var require_cst_stringify = __commonJS2((exports) => {
|
|
|
5110
5110
|
}
|
|
5111
5111
|
}
|
|
5112
5112
|
}
|
|
5113
|
-
function stringifyItem({ start, key, sep, value }) {
|
|
5113
|
+
function stringifyItem({ start, key, sep: sep2, value }) {
|
|
5114
5114
|
let res = "";
|
|
5115
5115
|
for (const st of start)
|
|
5116
5116
|
res += st.source;
|
|
5117
5117
|
if (key)
|
|
5118
5118
|
res += stringifyToken(key);
|
|
5119
|
-
if (
|
|
5120
|
-
for (const st of
|
|
5119
|
+
if (sep2)
|
|
5120
|
+
for (const st of sep2)
|
|
5121
5121
|
res += st.source;
|
|
5122
5122
|
if (value)
|
|
5123
5123
|
res += stringifyToken(value);
|
|
@@ -6256,18 +6256,18 @@ var require_parser = __commonJS2((exports) => {
|
|
|
6256
6256
|
if (this.type === "map-value-ind") {
|
|
6257
6257
|
const prev = getPrevProps(this.peek(2));
|
|
6258
6258
|
const start = getFirstKeyStartProps(prev);
|
|
6259
|
-
let
|
|
6259
|
+
let sep2;
|
|
6260
6260
|
if (scalar.end) {
|
|
6261
|
-
|
|
6262
|
-
|
|
6261
|
+
sep2 = scalar.end;
|
|
6262
|
+
sep2.push(this.sourceToken);
|
|
6263
6263
|
delete scalar.end;
|
|
6264
6264
|
} else
|
|
6265
|
-
|
|
6265
|
+
sep2 = [this.sourceToken];
|
|
6266
6266
|
const map = {
|
|
6267
6267
|
type: "block-map",
|
|
6268
6268
|
offset: scalar.offset,
|
|
6269
6269
|
indent: scalar.indent,
|
|
6270
|
-
items: [{ start, key: scalar, sep }]
|
|
6270
|
+
items: [{ start, key: scalar, sep: sep2 }]
|
|
6271
6271
|
};
|
|
6272
6272
|
this.onKeyLine = true;
|
|
6273
6273
|
this.stack[this.stack.length - 1] = map;
|
|
@@ -6421,15 +6421,15 @@ var require_parser = __commonJS2((exports) => {
|
|
|
6421
6421
|
} else if (isFlowToken(it.key) && !includesToken(it.sep, "newline")) {
|
|
6422
6422
|
const start2 = getFirstKeyStartProps(it.start);
|
|
6423
6423
|
const key = it.key;
|
|
6424
|
-
const
|
|
6425
|
-
|
|
6424
|
+
const sep2 = it.sep;
|
|
6425
|
+
sep2.push(this.sourceToken);
|
|
6426
6426
|
delete it.key;
|
|
6427
6427
|
delete it.sep;
|
|
6428
6428
|
this.stack.push({
|
|
6429
6429
|
type: "block-map",
|
|
6430
6430
|
offset: this.offset,
|
|
6431
6431
|
indent: this.indent,
|
|
6432
|
-
items: [{ start: start2, key, sep }]
|
|
6432
|
+
items: [{ start: start2, key, sep: sep2 }]
|
|
6433
6433
|
});
|
|
6434
6434
|
} else if (start.length > 0) {
|
|
6435
6435
|
it.sep = it.sep.concat(start, this.sourceToken);
|
|
@@ -6623,13 +6623,13 @@ var require_parser = __commonJS2((exports) => {
|
|
|
6623
6623
|
const prev = getPrevProps(parent);
|
|
6624
6624
|
const start = getFirstKeyStartProps(prev);
|
|
6625
6625
|
fixFlowSeqItems(fc);
|
|
6626
|
-
const
|
|
6627
|
-
|
|
6626
|
+
const sep2 = fc.end.splice(1, fc.end.length);
|
|
6627
|
+
sep2.push(this.sourceToken);
|
|
6628
6628
|
const map = {
|
|
6629
6629
|
type: "block-map",
|
|
6630
6630
|
offset: fc.offset,
|
|
6631
6631
|
indent: fc.indent,
|
|
6632
|
-
items: [{ start, key: fc, sep }]
|
|
6632
|
+
items: [{ start, key: fc, sep: sep2 }]
|
|
6633
6633
|
};
|
|
6634
6634
|
this.onKeyLine = true;
|
|
6635
6635
|
this.stack[this.stack.length - 1] = map;
|
|
@@ -11476,6 +11476,9 @@ function atomicWriteJson(path, data, indent = 2) {
|
|
|
11476
11476
|
atomicWriteText(path, `${JSON.stringify(data, null, indent)}
|
|
11477
11477
|
`);
|
|
11478
11478
|
}
|
|
11479
|
+
function isJsonObject(value) {
|
|
11480
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
11481
|
+
}
|
|
11479
11482
|
|
|
11480
11483
|
// ../../../libs/connector-base/dist/lenient-json.js
|
|
11481
11484
|
var __create = Object.create;
|
|
@@ -17086,10 +17089,10 @@ var require_resolve_block_map2 = __commonJS3((exports) => {
|
|
|
17086
17089
|
let offset = bm.offset;
|
|
17087
17090
|
let commentEnd = null;
|
|
17088
17091
|
for (const collItem of bm.items) {
|
|
17089
|
-
const { start, key, sep, value } = collItem;
|
|
17092
|
+
const { start, key, sep: sep2, value } = collItem;
|
|
17090
17093
|
const keyProps = resolveProps.resolveProps(start, {
|
|
17091
17094
|
indicator: "explicit-key-ind",
|
|
17092
|
-
next: key ??
|
|
17095
|
+
next: key ?? sep2?.[0],
|
|
17093
17096
|
offset,
|
|
17094
17097
|
onError,
|
|
17095
17098
|
parentIndent: bm.indent,
|
|
@@ -17103,7 +17106,7 @@ var require_resolve_block_map2 = __commonJS3((exports) => {
|
|
|
17103
17106
|
else if ("indent" in key && key.indent !== bm.indent)
|
|
17104
17107
|
onError(offset, "BAD_INDENT", startColMsg);
|
|
17105
17108
|
}
|
|
17106
|
-
if (!keyProps.anchor && !keyProps.tag && !
|
|
17109
|
+
if (!keyProps.anchor && !keyProps.tag && !sep2) {
|
|
17107
17110
|
commentEnd = keyProps.end;
|
|
17108
17111
|
if (keyProps.comment) {
|
|
17109
17112
|
if (map.comment)
|
|
@@ -17128,7 +17131,7 @@ var require_resolve_block_map2 = __commonJS3((exports) => {
|
|
|
17128
17131
|
ctx.atKey = false;
|
|
17129
17132
|
if (utilMapIncludes.mapIncludes(ctx, map.items, keyNode))
|
|
17130
17133
|
onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique");
|
|
17131
|
-
const valueProps = resolveProps.resolveProps(
|
|
17134
|
+
const valueProps = resolveProps.resolveProps(sep2 ?? [], {
|
|
17132
17135
|
indicator: "map-value-ind",
|
|
17133
17136
|
next: value,
|
|
17134
17137
|
offset: keyNode.range[2],
|
|
@@ -17144,7 +17147,7 @@ var require_resolve_block_map2 = __commonJS3((exports) => {
|
|
|
17144
17147
|
if (ctx.options.strict && keyProps.start < valueProps.found.offset - 1024)
|
|
17145
17148
|
onError(keyNode.range, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit block mapping key");
|
|
17146
17149
|
}
|
|
17147
|
-
const valueNode = value ? composeNode(ctx, value, valueProps, onError) : composeEmptyNode(ctx, offset,
|
|
17150
|
+
const valueNode = value ? composeNode(ctx, value, valueProps, onError) : composeEmptyNode(ctx, offset, sep2, null, valueProps, onError);
|
|
17148
17151
|
if (ctx.schema.compat)
|
|
17149
17152
|
utilFlowIndentCheck.flowIndentCheck(bm.indent, value, onError);
|
|
17150
17153
|
offset = valueNode.range[2];
|
|
@@ -17226,7 +17229,7 @@ var require_resolve_end2 = __commonJS3((exports) => {
|
|
|
17226
17229
|
let comment = "";
|
|
17227
17230
|
if (end) {
|
|
17228
17231
|
let hasSpace = false;
|
|
17229
|
-
let
|
|
17232
|
+
let sep2 = "";
|
|
17230
17233
|
for (const token of end) {
|
|
17231
17234
|
const { source, type } = token;
|
|
17232
17235
|
switch (type) {
|
|
@@ -17240,13 +17243,13 @@ var require_resolve_end2 = __commonJS3((exports) => {
|
|
|
17240
17243
|
if (!comment)
|
|
17241
17244
|
comment = cb;
|
|
17242
17245
|
else
|
|
17243
|
-
comment +=
|
|
17244
|
-
|
|
17246
|
+
comment += sep2 + cb;
|
|
17247
|
+
sep2 = "";
|
|
17245
17248
|
break;
|
|
17246
17249
|
}
|
|
17247
17250
|
case "newline":
|
|
17248
17251
|
if (comment)
|
|
17249
|
-
|
|
17252
|
+
sep2 += source;
|
|
17250
17253
|
hasSpace = true;
|
|
17251
17254
|
break;
|
|
17252
17255
|
default:
|
|
@@ -17284,18 +17287,18 @@ var require_resolve_flow_collection2 = __commonJS3((exports) => {
|
|
|
17284
17287
|
let offset = fc.offset + fc.start.source.length;
|
|
17285
17288
|
for (let i = 0;i < fc.items.length; ++i) {
|
|
17286
17289
|
const collItem = fc.items[i];
|
|
17287
|
-
const { start, key, sep, value } = collItem;
|
|
17290
|
+
const { start, key, sep: sep2, value } = collItem;
|
|
17288
17291
|
const props = resolveProps.resolveProps(start, {
|
|
17289
17292
|
flow: fcName,
|
|
17290
17293
|
indicator: "explicit-key-ind",
|
|
17291
|
-
next: key ??
|
|
17294
|
+
next: key ?? sep2?.[0],
|
|
17292
17295
|
offset,
|
|
17293
17296
|
onError,
|
|
17294
17297
|
parentIndent: fc.indent,
|
|
17295
17298
|
startOnNewline: false
|
|
17296
17299
|
});
|
|
17297
17300
|
if (!props.found) {
|
|
17298
|
-
if (!props.anchor && !props.tag && !
|
|
17301
|
+
if (!props.anchor && !props.tag && !sep2 && !value) {
|
|
17299
17302
|
if (i === 0 && props.comma)
|
|
17300
17303
|
onError(props.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${fcName}`);
|
|
17301
17304
|
else if (i < fc.items.length - 1)
|
|
@@ -17347,8 +17350,8 @@ var require_resolve_flow_collection2 = __commonJS3((exports) => {
|
|
|
17347
17350
|
}
|
|
17348
17351
|
}
|
|
17349
17352
|
}
|
|
17350
|
-
if (!isMap && !
|
|
17351
|
-
const valueNode = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end,
|
|
17353
|
+
if (!isMap && !sep2 && !props.found) {
|
|
17354
|
+
const valueNode = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end, sep2, null, props, onError);
|
|
17352
17355
|
coll.items.push(valueNode);
|
|
17353
17356
|
offset = valueNode.range[2];
|
|
17354
17357
|
if (isBlock(value))
|
|
@@ -17360,7 +17363,7 @@ var require_resolve_flow_collection2 = __commonJS3((exports) => {
|
|
|
17360
17363
|
if (isBlock(key))
|
|
17361
17364
|
onError(keyNode.range, "BLOCK_IN_FLOW", blockMsg);
|
|
17362
17365
|
ctx.atKey = false;
|
|
17363
|
-
const valueProps = resolveProps.resolveProps(
|
|
17366
|
+
const valueProps = resolveProps.resolveProps(sep2 ?? [], {
|
|
17364
17367
|
flow: fcName,
|
|
17365
17368
|
indicator: "map-value-ind",
|
|
17366
17369
|
next: value,
|
|
@@ -17371,8 +17374,8 @@ var require_resolve_flow_collection2 = __commonJS3((exports) => {
|
|
|
17371
17374
|
});
|
|
17372
17375
|
if (valueProps.found) {
|
|
17373
17376
|
if (!isMap && !props.found && ctx.options.strict) {
|
|
17374
|
-
if (
|
|
17375
|
-
for (const st of
|
|
17377
|
+
if (sep2)
|
|
17378
|
+
for (const st of sep2) {
|
|
17376
17379
|
if (st === valueProps.found)
|
|
17377
17380
|
break;
|
|
17378
17381
|
if (st.type === "newline") {
|
|
@@ -17389,7 +17392,7 @@ var require_resolve_flow_collection2 = __commonJS3((exports) => {
|
|
|
17389
17392
|
else
|
|
17390
17393
|
onError(valueProps.start, "MISSING_CHAR", `Missing , or : between ${fcName} items`);
|
|
17391
17394
|
}
|
|
17392
|
-
const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end,
|
|
17395
|
+
const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end, sep2, null, valueProps, onError) : null;
|
|
17393
17396
|
if (valueNode) {
|
|
17394
17397
|
if (isBlock(value))
|
|
17395
17398
|
onError(valueNode.range, "BLOCK_IN_FLOW", blockMsg);
|
|
@@ -17562,7 +17565,7 @@ var require_resolve_block_scalar2 = __commonJS3((exports) => {
|
|
|
17562
17565
|
chompStart = i + 1;
|
|
17563
17566
|
}
|
|
17564
17567
|
let value = "";
|
|
17565
|
-
let
|
|
17568
|
+
let sep2 = "";
|
|
17566
17569
|
let prevMoreIndented = false;
|
|
17567
17570
|
for (let i = 0;i < contentStart; ++i)
|
|
17568
17571
|
value += lines[i][0].slice(trimIndent) + `
|
|
@@ -17580,33 +17583,33 @@ var require_resolve_block_scalar2 = __commonJS3((exports) => {
|
|
|
17580
17583
|
indent = "";
|
|
17581
17584
|
}
|
|
17582
17585
|
if (type === Scalar.Scalar.BLOCK_LITERAL) {
|
|
17583
|
-
value +=
|
|
17584
|
-
|
|
17586
|
+
value += sep2 + indent.slice(trimIndent) + content;
|
|
17587
|
+
sep2 = `
|
|
17585
17588
|
`;
|
|
17586
17589
|
} else if (indent.length > trimIndent || content[0] === "\t") {
|
|
17587
|
-
if (
|
|
17588
|
-
|
|
17590
|
+
if (sep2 === " ")
|
|
17591
|
+
sep2 = `
|
|
17589
17592
|
`;
|
|
17590
|
-
else if (!prevMoreIndented &&
|
|
17593
|
+
else if (!prevMoreIndented && sep2 === `
|
|
17591
17594
|
`)
|
|
17592
|
-
|
|
17595
|
+
sep2 = `
|
|
17593
17596
|
|
|
17594
17597
|
`;
|
|
17595
|
-
value +=
|
|
17596
|
-
|
|
17598
|
+
value += sep2 + indent.slice(trimIndent) + content;
|
|
17599
|
+
sep2 = `
|
|
17597
17600
|
`;
|
|
17598
17601
|
prevMoreIndented = true;
|
|
17599
17602
|
} else if (content === "") {
|
|
17600
|
-
if (
|
|
17603
|
+
if (sep2 === `
|
|
17601
17604
|
`)
|
|
17602
17605
|
value += `
|
|
17603
17606
|
`;
|
|
17604
17607
|
else
|
|
17605
|
-
|
|
17608
|
+
sep2 = `
|
|
17606
17609
|
`;
|
|
17607
17610
|
} else {
|
|
17608
|
-
value +=
|
|
17609
|
-
|
|
17611
|
+
value += sep2 + content;
|
|
17612
|
+
sep2 = " ";
|
|
17610
17613
|
prevMoreIndented = false;
|
|
17611
17614
|
}
|
|
17612
17615
|
}
|
|
@@ -17785,27 +17788,27 @@ var require_resolve_flow_scalar2 = __commonJS3((exports) => {
|
|
|
17785
17788
|
if (!match)
|
|
17786
17789
|
return source;
|
|
17787
17790
|
let res = match[1];
|
|
17788
|
-
let
|
|
17791
|
+
let sep2 = " ";
|
|
17789
17792
|
let pos = first.lastIndex;
|
|
17790
17793
|
line.lastIndex = pos;
|
|
17791
17794
|
while (match = line.exec(source)) {
|
|
17792
17795
|
if (match[1] === "") {
|
|
17793
|
-
if (
|
|
17796
|
+
if (sep2 === `
|
|
17794
17797
|
`)
|
|
17795
|
-
res +=
|
|
17798
|
+
res += sep2;
|
|
17796
17799
|
else
|
|
17797
|
-
|
|
17800
|
+
sep2 = `
|
|
17798
17801
|
`;
|
|
17799
17802
|
} else {
|
|
17800
|
-
res +=
|
|
17801
|
-
|
|
17803
|
+
res += sep2 + match[1];
|
|
17804
|
+
sep2 = " ";
|
|
17802
17805
|
}
|
|
17803
17806
|
pos = line.lastIndex;
|
|
17804
17807
|
}
|
|
17805
17808
|
const last = /[ \t]*(.*)/sy;
|
|
17806
17809
|
last.lastIndex = pos;
|
|
17807
17810
|
match = last.exec(source);
|
|
17808
|
-
return res +
|
|
17811
|
+
return res + sep2 + (match?.[1] ?? "");
|
|
17809
17812
|
}
|
|
17810
17813
|
function doubleQuotedValue(source, onError) {
|
|
17811
17814
|
let res = "";
|
|
@@ -18572,14 +18575,14 @@ var require_cst_stringify2 = __commonJS3((exports) => {
|
|
|
18572
18575
|
}
|
|
18573
18576
|
}
|
|
18574
18577
|
}
|
|
18575
|
-
function stringifyItem({ start, key, sep, value }) {
|
|
18578
|
+
function stringifyItem({ start, key, sep: sep2, value }) {
|
|
18576
18579
|
let res = "";
|
|
18577
18580
|
for (const st of start)
|
|
18578
18581
|
res += st.source;
|
|
18579
18582
|
if (key)
|
|
18580
18583
|
res += stringifyToken(key);
|
|
18581
|
-
if (
|
|
18582
|
-
for (const st of
|
|
18584
|
+
if (sep2)
|
|
18585
|
+
for (const st of sep2)
|
|
18583
18586
|
res += st.source;
|
|
18584
18587
|
if (value)
|
|
18585
18588
|
res += stringifyToken(value);
|
|
@@ -19718,18 +19721,18 @@ var require_parser2 = __commonJS3((exports) => {
|
|
|
19718
19721
|
if (this.type === "map-value-ind") {
|
|
19719
19722
|
const prev = getPrevProps(this.peek(2));
|
|
19720
19723
|
const start = getFirstKeyStartProps(prev);
|
|
19721
|
-
let
|
|
19724
|
+
let sep2;
|
|
19722
19725
|
if (scalar.end) {
|
|
19723
|
-
|
|
19724
|
-
|
|
19726
|
+
sep2 = scalar.end;
|
|
19727
|
+
sep2.push(this.sourceToken);
|
|
19725
19728
|
delete scalar.end;
|
|
19726
19729
|
} else
|
|
19727
|
-
|
|
19730
|
+
sep2 = [this.sourceToken];
|
|
19728
19731
|
const map = {
|
|
19729
19732
|
type: "block-map",
|
|
19730
19733
|
offset: scalar.offset,
|
|
19731
19734
|
indent: scalar.indent,
|
|
19732
|
-
items: [{ start, key: scalar, sep }]
|
|
19735
|
+
items: [{ start, key: scalar, sep: sep2 }]
|
|
19733
19736
|
};
|
|
19734
19737
|
this.onKeyLine = true;
|
|
19735
19738
|
this.stack[this.stack.length - 1] = map;
|
|
@@ -19883,15 +19886,15 @@ var require_parser2 = __commonJS3((exports) => {
|
|
|
19883
19886
|
} else if (isFlowToken(it.key) && !includesToken(it.sep, "newline")) {
|
|
19884
19887
|
const start2 = getFirstKeyStartProps(it.start);
|
|
19885
19888
|
const key = it.key;
|
|
19886
|
-
const
|
|
19887
|
-
|
|
19889
|
+
const sep2 = it.sep;
|
|
19890
|
+
sep2.push(this.sourceToken);
|
|
19888
19891
|
delete it.key;
|
|
19889
19892
|
delete it.sep;
|
|
19890
19893
|
this.stack.push({
|
|
19891
19894
|
type: "block-map",
|
|
19892
19895
|
offset: this.offset,
|
|
19893
19896
|
indent: this.indent,
|
|
19894
|
-
items: [{ start: start2, key, sep }]
|
|
19897
|
+
items: [{ start: start2, key, sep: sep2 }]
|
|
19895
19898
|
});
|
|
19896
19899
|
} else if (start.length > 0) {
|
|
19897
19900
|
it.sep = it.sep.concat(start, this.sourceToken);
|
|
@@ -20085,13 +20088,13 @@ var require_parser2 = __commonJS3((exports) => {
|
|
|
20085
20088
|
const prev = getPrevProps(parent);
|
|
20086
20089
|
const start = getFirstKeyStartProps(prev);
|
|
20087
20090
|
fixFlowSeqItems(fc);
|
|
20088
|
-
const
|
|
20089
|
-
|
|
20091
|
+
const sep2 = fc.end.splice(1, fc.end.length);
|
|
20092
|
+
sep2.push(this.sourceToken);
|
|
20090
20093
|
const map = {
|
|
20091
20094
|
type: "block-map",
|
|
20092
20095
|
offset: fc.offset,
|
|
20093
20096
|
indent: fc.indent,
|
|
20094
|
-
items: [{ start, key: fc, sep }]
|
|
20097
|
+
items: [{ start, key: fc, sep: sep2 }]
|
|
20095
20098
|
};
|
|
20096
20099
|
this.onKeyLine = true;
|
|
20097
20100
|
this.stack[this.stack.length - 1] = map;
|
|
@@ -24782,9 +24785,6 @@ var home2 = homedir82();
|
|
|
24782
24785
|
|
|
24783
24786
|
// src/index.ts
|
|
24784
24787
|
var OPENCLAW_PARSE_OPTIONS = { label: "OpenClaw config" };
|
|
24785
|
-
function isJsonObject(value) {
|
|
24786
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
24787
|
-
}
|
|
24788
24788
|
function deepMerge(target, source) {
|
|
24789
24789
|
for (const key of Object.keys(source)) {
|
|
24790
24790
|
const srcVal = source[key];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@signetai/connector-openclaw",
|
|
3
|
-
"version": "0.163.
|
|
3
|
+
"version": "0.163.18",
|
|
4
4
|
"description": "Signet connector for OpenClaw - configures workspace and memory hooks",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"test": "bun test"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@signetai/connector-base": "0.163.
|
|
29
|
-
"@signetai/core": "0.163.
|
|
28
|
+
"@signetai/connector-base": "0.163.18",
|
|
29
|
+
"@signetai/core": "0.163.18"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/node": "^22.0.0",
|