@signetai/connector-pi 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 +133 -125
- 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":"AAEA,OAAO,EACN,aAAa,EACb,KAAK,aAAa,EAGlB,KAAK,eAAe,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACN,aAAa,EACb,KAAK,aAAa,EAGlB,KAAK,eAAe,EASpB,MAAM,wBAAwB,CAAC;AA+BhC,qBAAa,WAAY,SAAQ,aAAa;IAC7C,QAAQ,CAAC,IAAI,QAAQ;IACrB,QAAQ,CAAC,SAAS,QAAQ;IAE1B,OAAO,CAAC,uBAAuB;IAI/B,OAAO,CAAC,wBAAwB;IAIhC,aAAa,IAAI,MAAM;IAIjB,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IA4CjD,SAAS,IAAI,OAAO,CAAC,eAAe,CAAC;IAmB3C,WAAW,IAAI,OAAO;CAGtB"}
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { dirname as dirname7, join as join6 } from "node:path";
|
|
|
6
6
|
import { randomBytes } from "node:crypto";
|
|
7
7
|
import { existsSync, readFileSync, renameSync, statSync as statSync2, unlinkSync as unlinkSync2, writeFileSync } from "node:fs";
|
|
8
8
|
import { homedir } from "node:os";
|
|
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";
|
|
@@ -3629,10 +3629,10 @@ var require_resolve_block_map = __commonJS2((exports) => {
|
|
|
3629
3629
|
let offset = bm.offset;
|
|
3630
3630
|
let commentEnd = null;
|
|
3631
3631
|
for (const collItem of bm.items) {
|
|
3632
|
-
const { start, key, sep, value } = collItem;
|
|
3632
|
+
const { start, key, sep: sep2, value } = collItem;
|
|
3633
3633
|
const keyProps = resolveProps.resolveProps(start, {
|
|
3634
3634
|
indicator: "explicit-key-ind",
|
|
3635
|
-
next: key ??
|
|
3635
|
+
next: key ?? sep2?.[0],
|
|
3636
3636
|
offset,
|
|
3637
3637
|
onError,
|
|
3638
3638
|
parentIndent: bm.indent,
|
|
@@ -3646,7 +3646,7 @@ var require_resolve_block_map = __commonJS2((exports) => {
|
|
|
3646
3646
|
else if ("indent" in key && key.indent !== bm.indent)
|
|
3647
3647
|
onError(offset, "BAD_INDENT", startColMsg);
|
|
3648
3648
|
}
|
|
3649
|
-
if (!keyProps.anchor && !keyProps.tag && !
|
|
3649
|
+
if (!keyProps.anchor && !keyProps.tag && !sep2) {
|
|
3650
3650
|
commentEnd = keyProps.end;
|
|
3651
3651
|
if (keyProps.comment) {
|
|
3652
3652
|
if (map.comment)
|
|
@@ -3671,7 +3671,7 @@ var require_resolve_block_map = __commonJS2((exports) => {
|
|
|
3671
3671
|
ctx.atKey = false;
|
|
3672
3672
|
if (utilMapIncludes.mapIncludes(ctx, map.items, keyNode))
|
|
3673
3673
|
onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique");
|
|
3674
|
-
const valueProps = resolveProps.resolveProps(
|
|
3674
|
+
const valueProps = resolveProps.resolveProps(sep2 ?? [], {
|
|
3675
3675
|
indicator: "map-value-ind",
|
|
3676
3676
|
next: value,
|
|
3677
3677
|
offset: keyNode.range[2],
|
|
@@ -3687,7 +3687,7 @@ var require_resolve_block_map = __commonJS2((exports) => {
|
|
|
3687
3687
|
if (ctx.options.strict && keyProps.start < valueProps.found.offset - 1024)
|
|
3688
3688
|
onError(keyNode.range, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit block mapping key");
|
|
3689
3689
|
}
|
|
3690
|
-
const valueNode = value ? composeNode(ctx, value, valueProps, onError) : composeEmptyNode(ctx, offset,
|
|
3690
|
+
const valueNode = value ? composeNode(ctx, value, valueProps, onError) : composeEmptyNode(ctx, offset, sep2, null, valueProps, onError);
|
|
3691
3691
|
if (ctx.schema.compat)
|
|
3692
3692
|
utilFlowIndentCheck.flowIndentCheck(bm.indent, value, onError);
|
|
3693
3693
|
offset = valueNode.range[2];
|
|
@@ -3769,7 +3769,7 @@ var require_resolve_end = __commonJS2((exports) => {
|
|
|
3769
3769
|
let comment = "";
|
|
3770
3770
|
if (end) {
|
|
3771
3771
|
let hasSpace = false;
|
|
3772
|
-
let
|
|
3772
|
+
let sep2 = "";
|
|
3773
3773
|
for (const token of end) {
|
|
3774
3774
|
const { source, type } = token;
|
|
3775
3775
|
switch (type) {
|
|
@@ -3783,13 +3783,13 @@ var require_resolve_end = __commonJS2((exports) => {
|
|
|
3783
3783
|
if (!comment)
|
|
3784
3784
|
comment = cb;
|
|
3785
3785
|
else
|
|
3786
|
-
comment +=
|
|
3787
|
-
|
|
3786
|
+
comment += sep2 + cb;
|
|
3787
|
+
sep2 = "";
|
|
3788
3788
|
break;
|
|
3789
3789
|
}
|
|
3790
3790
|
case "newline":
|
|
3791
3791
|
if (comment)
|
|
3792
|
-
|
|
3792
|
+
sep2 += source;
|
|
3793
3793
|
hasSpace = true;
|
|
3794
3794
|
break;
|
|
3795
3795
|
default:
|
|
@@ -3827,18 +3827,18 @@ var require_resolve_flow_collection = __commonJS2((exports) => {
|
|
|
3827
3827
|
let offset = fc.offset + fc.start.source.length;
|
|
3828
3828
|
for (let i = 0;i < fc.items.length; ++i) {
|
|
3829
3829
|
const collItem = fc.items[i];
|
|
3830
|
-
const { start, key, sep, value } = collItem;
|
|
3830
|
+
const { start, key, sep: sep2, value } = collItem;
|
|
3831
3831
|
const props = resolveProps.resolveProps(start, {
|
|
3832
3832
|
flow: fcName,
|
|
3833
3833
|
indicator: "explicit-key-ind",
|
|
3834
|
-
next: key ??
|
|
3834
|
+
next: key ?? sep2?.[0],
|
|
3835
3835
|
offset,
|
|
3836
3836
|
onError,
|
|
3837
3837
|
parentIndent: fc.indent,
|
|
3838
3838
|
startOnNewline: false
|
|
3839
3839
|
});
|
|
3840
3840
|
if (!props.found) {
|
|
3841
|
-
if (!props.anchor && !props.tag && !
|
|
3841
|
+
if (!props.anchor && !props.tag && !sep2 && !value) {
|
|
3842
3842
|
if (i === 0 && props.comma)
|
|
3843
3843
|
onError(props.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${fcName}`);
|
|
3844
3844
|
else if (i < fc.items.length - 1)
|
|
@@ -3890,8 +3890,8 @@ var require_resolve_flow_collection = __commonJS2((exports) => {
|
|
|
3890
3890
|
}
|
|
3891
3891
|
}
|
|
3892
3892
|
}
|
|
3893
|
-
if (!isMap && !
|
|
3894
|
-
const valueNode = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end,
|
|
3893
|
+
if (!isMap && !sep2 && !props.found) {
|
|
3894
|
+
const valueNode = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end, sep2, null, props, onError);
|
|
3895
3895
|
coll.items.push(valueNode);
|
|
3896
3896
|
offset = valueNode.range[2];
|
|
3897
3897
|
if (isBlock(value))
|
|
@@ -3903,7 +3903,7 @@ var require_resolve_flow_collection = __commonJS2((exports) => {
|
|
|
3903
3903
|
if (isBlock(key))
|
|
3904
3904
|
onError(keyNode.range, "BLOCK_IN_FLOW", blockMsg);
|
|
3905
3905
|
ctx.atKey = false;
|
|
3906
|
-
const valueProps = resolveProps.resolveProps(
|
|
3906
|
+
const valueProps = resolveProps.resolveProps(sep2 ?? [], {
|
|
3907
3907
|
flow: fcName,
|
|
3908
3908
|
indicator: "map-value-ind",
|
|
3909
3909
|
next: value,
|
|
@@ -3914,8 +3914,8 @@ var require_resolve_flow_collection = __commonJS2((exports) => {
|
|
|
3914
3914
|
});
|
|
3915
3915
|
if (valueProps.found) {
|
|
3916
3916
|
if (!isMap && !props.found && ctx.options.strict) {
|
|
3917
|
-
if (
|
|
3918
|
-
for (const st of
|
|
3917
|
+
if (sep2)
|
|
3918
|
+
for (const st of sep2) {
|
|
3919
3919
|
if (st === valueProps.found)
|
|
3920
3920
|
break;
|
|
3921
3921
|
if (st.type === "newline") {
|
|
@@ -3932,7 +3932,7 @@ var require_resolve_flow_collection = __commonJS2((exports) => {
|
|
|
3932
3932
|
else
|
|
3933
3933
|
onError(valueProps.start, "MISSING_CHAR", `Missing , or : between ${fcName} items`);
|
|
3934
3934
|
}
|
|
3935
|
-
const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end,
|
|
3935
|
+
const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end, sep2, null, valueProps, onError) : null;
|
|
3936
3936
|
if (valueNode) {
|
|
3937
3937
|
if (isBlock(value))
|
|
3938
3938
|
onError(valueNode.range, "BLOCK_IN_FLOW", blockMsg);
|
|
@@ -4105,7 +4105,7 @@ var require_resolve_block_scalar = __commonJS2((exports) => {
|
|
|
4105
4105
|
chompStart = i + 1;
|
|
4106
4106
|
}
|
|
4107
4107
|
let value = "";
|
|
4108
|
-
let
|
|
4108
|
+
let sep2 = "";
|
|
4109
4109
|
let prevMoreIndented = false;
|
|
4110
4110
|
for (let i = 0;i < contentStart; ++i)
|
|
4111
4111
|
value += lines[i][0].slice(trimIndent) + `
|
|
@@ -4123,33 +4123,33 @@ var require_resolve_block_scalar = __commonJS2((exports) => {
|
|
|
4123
4123
|
indent = "";
|
|
4124
4124
|
}
|
|
4125
4125
|
if (type === Scalar.Scalar.BLOCK_LITERAL) {
|
|
4126
|
-
value +=
|
|
4127
|
-
|
|
4126
|
+
value += sep2 + indent.slice(trimIndent) + content;
|
|
4127
|
+
sep2 = `
|
|
4128
4128
|
`;
|
|
4129
4129
|
} else if (indent.length > trimIndent || content[0] === "\t") {
|
|
4130
|
-
if (
|
|
4131
|
-
|
|
4130
|
+
if (sep2 === " ")
|
|
4131
|
+
sep2 = `
|
|
4132
4132
|
`;
|
|
4133
|
-
else if (!prevMoreIndented &&
|
|
4133
|
+
else if (!prevMoreIndented && sep2 === `
|
|
4134
4134
|
`)
|
|
4135
|
-
|
|
4135
|
+
sep2 = `
|
|
4136
4136
|
|
|
4137
4137
|
`;
|
|
4138
|
-
value +=
|
|
4139
|
-
|
|
4138
|
+
value += sep2 + indent.slice(trimIndent) + content;
|
|
4139
|
+
sep2 = `
|
|
4140
4140
|
`;
|
|
4141
4141
|
prevMoreIndented = true;
|
|
4142
4142
|
} else if (content === "") {
|
|
4143
|
-
if (
|
|
4143
|
+
if (sep2 === `
|
|
4144
4144
|
`)
|
|
4145
4145
|
value += `
|
|
4146
4146
|
`;
|
|
4147
4147
|
else
|
|
4148
|
-
|
|
4148
|
+
sep2 = `
|
|
4149
4149
|
`;
|
|
4150
4150
|
} else {
|
|
4151
|
-
value +=
|
|
4152
|
-
|
|
4151
|
+
value += sep2 + content;
|
|
4152
|
+
sep2 = " ";
|
|
4153
4153
|
prevMoreIndented = false;
|
|
4154
4154
|
}
|
|
4155
4155
|
}
|
|
@@ -4328,27 +4328,27 @@ var require_resolve_flow_scalar = __commonJS2((exports) => {
|
|
|
4328
4328
|
if (!match)
|
|
4329
4329
|
return source;
|
|
4330
4330
|
let res = match[1];
|
|
4331
|
-
let
|
|
4331
|
+
let sep2 = " ";
|
|
4332
4332
|
let pos = first.lastIndex;
|
|
4333
4333
|
line.lastIndex = pos;
|
|
4334
4334
|
while (match = line.exec(source)) {
|
|
4335
4335
|
if (match[1] === "") {
|
|
4336
|
-
if (
|
|
4336
|
+
if (sep2 === `
|
|
4337
4337
|
`)
|
|
4338
|
-
res +=
|
|
4338
|
+
res += sep2;
|
|
4339
4339
|
else
|
|
4340
|
-
|
|
4340
|
+
sep2 = `
|
|
4341
4341
|
`;
|
|
4342
4342
|
} else {
|
|
4343
|
-
res +=
|
|
4344
|
-
|
|
4343
|
+
res += sep2 + match[1];
|
|
4344
|
+
sep2 = " ";
|
|
4345
4345
|
}
|
|
4346
4346
|
pos = line.lastIndex;
|
|
4347
4347
|
}
|
|
4348
4348
|
const last = /[ \t]*(.*)/sy;
|
|
4349
4349
|
last.lastIndex = pos;
|
|
4350
4350
|
match = last.exec(source);
|
|
4351
|
-
return res +
|
|
4351
|
+
return res + sep2 + (match?.[1] ?? "");
|
|
4352
4352
|
}
|
|
4353
4353
|
function doubleQuotedValue(source, onError) {
|
|
4354
4354
|
let res = "";
|
|
@@ -5115,14 +5115,14 @@ var require_cst_stringify = __commonJS2((exports) => {
|
|
|
5115
5115
|
}
|
|
5116
5116
|
}
|
|
5117
5117
|
}
|
|
5118
|
-
function stringifyItem({ start, key, sep, value }) {
|
|
5118
|
+
function stringifyItem({ start, key, sep: sep2, value }) {
|
|
5119
5119
|
let res = "";
|
|
5120
5120
|
for (const st of start)
|
|
5121
5121
|
res += st.source;
|
|
5122
5122
|
if (key)
|
|
5123
5123
|
res += stringifyToken(key);
|
|
5124
|
-
if (
|
|
5125
|
-
for (const st of
|
|
5124
|
+
if (sep2)
|
|
5125
|
+
for (const st of sep2)
|
|
5126
5126
|
res += st.source;
|
|
5127
5127
|
if (value)
|
|
5128
5128
|
res += stringifyToken(value);
|
|
@@ -6261,18 +6261,18 @@ var require_parser = __commonJS2((exports) => {
|
|
|
6261
6261
|
if (this.type === "map-value-ind") {
|
|
6262
6262
|
const prev = getPrevProps(this.peek(2));
|
|
6263
6263
|
const start = getFirstKeyStartProps(prev);
|
|
6264
|
-
let
|
|
6264
|
+
let sep2;
|
|
6265
6265
|
if (scalar.end) {
|
|
6266
|
-
|
|
6267
|
-
|
|
6266
|
+
sep2 = scalar.end;
|
|
6267
|
+
sep2.push(this.sourceToken);
|
|
6268
6268
|
delete scalar.end;
|
|
6269
6269
|
} else
|
|
6270
|
-
|
|
6270
|
+
sep2 = [this.sourceToken];
|
|
6271
6271
|
const map = {
|
|
6272
6272
|
type: "block-map",
|
|
6273
6273
|
offset: scalar.offset,
|
|
6274
6274
|
indent: scalar.indent,
|
|
6275
|
-
items: [{ start, key: scalar, sep }]
|
|
6275
|
+
items: [{ start, key: scalar, sep: sep2 }]
|
|
6276
6276
|
};
|
|
6277
6277
|
this.onKeyLine = true;
|
|
6278
6278
|
this.stack[this.stack.length - 1] = map;
|
|
@@ -6426,15 +6426,15 @@ var require_parser = __commonJS2((exports) => {
|
|
|
6426
6426
|
} else if (isFlowToken(it.key) && !includesToken(it.sep, "newline")) {
|
|
6427
6427
|
const start2 = getFirstKeyStartProps(it.start);
|
|
6428
6428
|
const key = it.key;
|
|
6429
|
-
const
|
|
6430
|
-
|
|
6429
|
+
const sep2 = it.sep;
|
|
6430
|
+
sep2.push(this.sourceToken);
|
|
6431
6431
|
delete it.key;
|
|
6432
6432
|
delete it.sep;
|
|
6433
6433
|
this.stack.push({
|
|
6434
6434
|
type: "block-map",
|
|
6435
6435
|
offset: this.offset,
|
|
6436
6436
|
indent: this.indent,
|
|
6437
|
-
items: [{ start: start2, key, sep }]
|
|
6437
|
+
items: [{ start: start2, key, sep: sep2 }]
|
|
6438
6438
|
});
|
|
6439
6439
|
} else if (start.length > 0) {
|
|
6440
6440
|
it.sep = it.sep.concat(start, this.sourceToken);
|
|
@@ -6628,13 +6628,13 @@ var require_parser = __commonJS2((exports) => {
|
|
|
6628
6628
|
const prev = getPrevProps(parent);
|
|
6629
6629
|
const start = getFirstKeyStartProps(prev);
|
|
6630
6630
|
fixFlowSeqItems(fc);
|
|
6631
|
-
const
|
|
6632
|
-
|
|
6631
|
+
const sep2 = fc.end.splice(1, fc.end.length);
|
|
6632
|
+
sep2.push(this.sourceToken);
|
|
6633
6633
|
const map = {
|
|
6634
6634
|
type: "block-map",
|
|
6635
6635
|
offset: fc.offset,
|
|
6636
6636
|
indent: fc.indent,
|
|
6637
|
-
items: [{ start, key: fc, sep }]
|
|
6637
|
+
items: [{ start, key: fc, sep: sep2 }]
|
|
6638
6638
|
};
|
|
6639
6639
|
this.onKeyLine = true;
|
|
6640
6640
|
this.stack[this.stack.length - 1] = map;
|
|
@@ -11644,13 +11644,16 @@ ${content}`);
|
|
|
11644
11644
|
}
|
|
11645
11645
|
var MANAGED_DAEMON_URL_DEFAULT = "http://127.0.0.1:3850";
|
|
11646
11646
|
var MANAGED_AGENT_ID_DEFAULT = "default";
|
|
11647
|
-
function
|
|
11647
|
+
function readTrimmedEnv2(name) {
|
|
11648
11648
|
const value = process.env[name];
|
|
11649
11649
|
if (typeof value !== "string")
|
|
11650
11650
|
return;
|
|
11651
|
-
const trimmed = value.trim();
|
|
11651
|
+
const trimmed = value.trim().replace(/[\r\n]+/g, "");
|
|
11652
11652
|
return trimmed.length > 0 ? trimmed : undefined;
|
|
11653
11653
|
}
|
|
11654
|
+
function readManagedTrimmedEnv(name) {
|
|
11655
|
+
return readTrimmedEnv2(name);
|
|
11656
|
+
}
|
|
11654
11657
|
function isExistingDirectory2(path) {
|
|
11655
11658
|
try {
|
|
11656
11659
|
return statSync2(path).isDirectory();
|
|
@@ -11707,6 +11710,20 @@ ${signetPathBlock} if (!__signetReadEnv("SIGNET_DAEMON_URL")) {
|
|
|
11707
11710
|
function managedExtensionFilePath(agentDir, filename) {
|
|
11708
11711
|
return join3(agentDir, "extensions", filename);
|
|
11709
11712
|
}
|
|
11713
|
+
function buildManagedExtensionContent(params) {
|
|
11714
|
+
if (params.bundle.length === 0) {
|
|
11715
|
+
throw new Error(`Bundled extension content is empty. Rebuild ${params.packageName} and rerun the connector build so ${params.entry} is embedded.`);
|
|
11716
|
+
}
|
|
11717
|
+
const bootstrap = buildManagedExtensionEnvBootstrap(params.env);
|
|
11718
|
+
return `// ${params.marker}
|
|
11719
|
+
// Managed by Signet (${params.packageName})
|
|
11720
|
+
// Source: ${params.entry}
|
|
11721
|
+
// DO NOT EDIT - this file is overwritten by Signet setup/sync.
|
|
11722
|
+
|
|
11723
|
+
${bootstrap}
|
|
11724
|
+
|
|
11725
|
+
${params.bundle}`;
|
|
11726
|
+
}
|
|
11710
11727
|
function isManagedExtensionFile(filePath, marker) {
|
|
11711
11728
|
const content = readManagedExtensionFile(filePath);
|
|
11712
11729
|
return content?.includes(marker) ?? false;
|
|
@@ -15345,10 +15362,10 @@ var require_resolve_block_map2 = __commonJS((exports) => {
|
|
|
15345
15362
|
let offset = bm.offset;
|
|
15346
15363
|
let commentEnd = null;
|
|
15347
15364
|
for (const collItem of bm.items) {
|
|
15348
|
-
const { start, key, sep, value } = collItem;
|
|
15365
|
+
const { start, key, sep: sep2, value } = collItem;
|
|
15349
15366
|
const keyProps = resolveProps.resolveProps(start, {
|
|
15350
15367
|
indicator: "explicit-key-ind",
|
|
15351
|
-
next: key ??
|
|
15368
|
+
next: key ?? sep2?.[0],
|
|
15352
15369
|
offset,
|
|
15353
15370
|
onError,
|
|
15354
15371
|
parentIndent: bm.indent,
|
|
@@ -15362,7 +15379,7 @@ var require_resolve_block_map2 = __commonJS((exports) => {
|
|
|
15362
15379
|
else if ("indent" in key && key.indent !== bm.indent)
|
|
15363
15380
|
onError(offset, "BAD_INDENT", startColMsg);
|
|
15364
15381
|
}
|
|
15365
|
-
if (!keyProps.anchor && !keyProps.tag && !
|
|
15382
|
+
if (!keyProps.anchor && !keyProps.tag && !sep2) {
|
|
15366
15383
|
commentEnd = keyProps.end;
|
|
15367
15384
|
if (keyProps.comment) {
|
|
15368
15385
|
if (map.comment)
|
|
@@ -15387,7 +15404,7 @@ var require_resolve_block_map2 = __commonJS((exports) => {
|
|
|
15387
15404
|
ctx.atKey = false;
|
|
15388
15405
|
if (utilMapIncludes.mapIncludes(ctx, map.items, keyNode))
|
|
15389
15406
|
onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique");
|
|
15390
|
-
const valueProps = resolveProps.resolveProps(
|
|
15407
|
+
const valueProps = resolveProps.resolveProps(sep2 ?? [], {
|
|
15391
15408
|
indicator: "map-value-ind",
|
|
15392
15409
|
next: value,
|
|
15393
15410
|
offset: keyNode.range[2],
|
|
@@ -15403,7 +15420,7 @@ var require_resolve_block_map2 = __commonJS((exports) => {
|
|
|
15403
15420
|
if (ctx.options.strict && keyProps.start < valueProps.found.offset - 1024)
|
|
15404
15421
|
onError(keyNode.range, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit block mapping key");
|
|
15405
15422
|
}
|
|
15406
|
-
const valueNode = value ? composeNode(ctx, value, valueProps, onError) : composeEmptyNode(ctx, offset,
|
|
15423
|
+
const valueNode = value ? composeNode(ctx, value, valueProps, onError) : composeEmptyNode(ctx, offset, sep2, null, valueProps, onError);
|
|
15407
15424
|
if (ctx.schema.compat)
|
|
15408
15425
|
utilFlowIndentCheck.flowIndentCheck(bm.indent, value, onError);
|
|
15409
15426
|
offset = valueNode.range[2];
|
|
@@ -15485,7 +15502,7 @@ var require_resolve_end2 = __commonJS((exports) => {
|
|
|
15485
15502
|
let comment = "";
|
|
15486
15503
|
if (end) {
|
|
15487
15504
|
let hasSpace = false;
|
|
15488
|
-
let
|
|
15505
|
+
let sep2 = "";
|
|
15489
15506
|
for (const token of end) {
|
|
15490
15507
|
const { source, type } = token;
|
|
15491
15508
|
switch (type) {
|
|
@@ -15499,13 +15516,13 @@ var require_resolve_end2 = __commonJS((exports) => {
|
|
|
15499
15516
|
if (!comment)
|
|
15500
15517
|
comment = cb;
|
|
15501
15518
|
else
|
|
15502
|
-
comment +=
|
|
15503
|
-
|
|
15519
|
+
comment += sep2 + cb;
|
|
15520
|
+
sep2 = "";
|
|
15504
15521
|
break;
|
|
15505
15522
|
}
|
|
15506
15523
|
case "newline":
|
|
15507
15524
|
if (comment)
|
|
15508
|
-
|
|
15525
|
+
sep2 += source;
|
|
15509
15526
|
hasSpace = true;
|
|
15510
15527
|
break;
|
|
15511
15528
|
default:
|
|
@@ -15543,18 +15560,18 @@ var require_resolve_flow_collection2 = __commonJS((exports) => {
|
|
|
15543
15560
|
let offset = fc.offset + fc.start.source.length;
|
|
15544
15561
|
for (let i = 0;i < fc.items.length; ++i) {
|
|
15545
15562
|
const collItem = fc.items[i];
|
|
15546
|
-
const { start, key, sep, value } = collItem;
|
|
15563
|
+
const { start, key, sep: sep2, value } = collItem;
|
|
15547
15564
|
const props = resolveProps.resolveProps(start, {
|
|
15548
15565
|
flow: fcName,
|
|
15549
15566
|
indicator: "explicit-key-ind",
|
|
15550
|
-
next: key ??
|
|
15567
|
+
next: key ?? sep2?.[0],
|
|
15551
15568
|
offset,
|
|
15552
15569
|
onError,
|
|
15553
15570
|
parentIndent: fc.indent,
|
|
15554
15571
|
startOnNewline: false
|
|
15555
15572
|
});
|
|
15556
15573
|
if (!props.found) {
|
|
15557
|
-
if (!props.anchor && !props.tag && !
|
|
15574
|
+
if (!props.anchor && !props.tag && !sep2 && !value) {
|
|
15558
15575
|
if (i === 0 && props.comma)
|
|
15559
15576
|
onError(props.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${fcName}`);
|
|
15560
15577
|
else if (i < fc.items.length - 1)
|
|
@@ -15606,8 +15623,8 @@ var require_resolve_flow_collection2 = __commonJS((exports) => {
|
|
|
15606
15623
|
}
|
|
15607
15624
|
}
|
|
15608
15625
|
}
|
|
15609
|
-
if (!isMap && !
|
|
15610
|
-
const valueNode = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end,
|
|
15626
|
+
if (!isMap && !sep2 && !props.found) {
|
|
15627
|
+
const valueNode = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end, sep2, null, props, onError);
|
|
15611
15628
|
coll.items.push(valueNode);
|
|
15612
15629
|
offset = valueNode.range[2];
|
|
15613
15630
|
if (isBlock(value))
|
|
@@ -15619,7 +15636,7 @@ var require_resolve_flow_collection2 = __commonJS((exports) => {
|
|
|
15619
15636
|
if (isBlock(key))
|
|
15620
15637
|
onError(keyNode.range, "BLOCK_IN_FLOW", blockMsg);
|
|
15621
15638
|
ctx.atKey = false;
|
|
15622
|
-
const valueProps = resolveProps.resolveProps(
|
|
15639
|
+
const valueProps = resolveProps.resolveProps(sep2 ?? [], {
|
|
15623
15640
|
flow: fcName,
|
|
15624
15641
|
indicator: "map-value-ind",
|
|
15625
15642
|
next: value,
|
|
@@ -15630,8 +15647,8 @@ var require_resolve_flow_collection2 = __commonJS((exports) => {
|
|
|
15630
15647
|
});
|
|
15631
15648
|
if (valueProps.found) {
|
|
15632
15649
|
if (!isMap && !props.found && ctx.options.strict) {
|
|
15633
|
-
if (
|
|
15634
|
-
for (const st of
|
|
15650
|
+
if (sep2)
|
|
15651
|
+
for (const st of sep2) {
|
|
15635
15652
|
if (st === valueProps.found)
|
|
15636
15653
|
break;
|
|
15637
15654
|
if (st.type === "newline") {
|
|
@@ -15648,7 +15665,7 @@ var require_resolve_flow_collection2 = __commonJS((exports) => {
|
|
|
15648
15665
|
else
|
|
15649
15666
|
onError(valueProps.start, "MISSING_CHAR", `Missing , or : between ${fcName} items`);
|
|
15650
15667
|
}
|
|
15651
|
-
const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end,
|
|
15668
|
+
const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end, sep2, null, valueProps, onError) : null;
|
|
15652
15669
|
if (valueNode) {
|
|
15653
15670
|
if (isBlock(value))
|
|
15654
15671
|
onError(valueNode.range, "BLOCK_IN_FLOW", blockMsg);
|
|
@@ -15821,7 +15838,7 @@ var require_resolve_block_scalar2 = __commonJS((exports) => {
|
|
|
15821
15838
|
chompStart = i + 1;
|
|
15822
15839
|
}
|
|
15823
15840
|
let value = "";
|
|
15824
|
-
let
|
|
15841
|
+
let sep2 = "";
|
|
15825
15842
|
let prevMoreIndented = false;
|
|
15826
15843
|
for (let i = 0;i < contentStart; ++i)
|
|
15827
15844
|
value += lines[i][0].slice(trimIndent) + `
|
|
@@ -15839,33 +15856,33 @@ var require_resolve_block_scalar2 = __commonJS((exports) => {
|
|
|
15839
15856
|
indent = "";
|
|
15840
15857
|
}
|
|
15841
15858
|
if (type === Scalar.Scalar.BLOCK_LITERAL) {
|
|
15842
|
-
value +=
|
|
15843
|
-
|
|
15859
|
+
value += sep2 + indent.slice(trimIndent) + content;
|
|
15860
|
+
sep2 = `
|
|
15844
15861
|
`;
|
|
15845
15862
|
} else if (indent.length > trimIndent || content[0] === "\t") {
|
|
15846
|
-
if (
|
|
15847
|
-
|
|
15863
|
+
if (sep2 === " ")
|
|
15864
|
+
sep2 = `
|
|
15848
15865
|
`;
|
|
15849
|
-
else if (!prevMoreIndented &&
|
|
15866
|
+
else if (!prevMoreIndented && sep2 === `
|
|
15850
15867
|
`)
|
|
15851
|
-
|
|
15868
|
+
sep2 = `
|
|
15852
15869
|
|
|
15853
15870
|
`;
|
|
15854
|
-
value +=
|
|
15855
|
-
|
|
15871
|
+
value += sep2 + indent.slice(trimIndent) + content;
|
|
15872
|
+
sep2 = `
|
|
15856
15873
|
`;
|
|
15857
15874
|
prevMoreIndented = true;
|
|
15858
15875
|
} else if (content === "") {
|
|
15859
|
-
if (
|
|
15876
|
+
if (sep2 === `
|
|
15860
15877
|
`)
|
|
15861
15878
|
value += `
|
|
15862
15879
|
`;
|
|
15863
15880
|
else
|
|
15864
|
-
|
|
15881
|
+
sep2 = `
|
|
15865
15882
|
`;
|
|
15866
15883
|
} else {
|
|
15867
|
-
value +=
|
|
15868
|
-
|
|
15884
|
+
value += sep2 + content;
|
|
15885
|
+
sep2 = " ";
|
|
15869
15886
|
prevMoreIndented = false;
|
|
15870
15887
|
}
|
|
15871
15888
|
}
|
|
@@ -16044,27 +16061,27 @@ var require_resolve_flow_scalar2 = __commonJS((exports) => {
|
|
|
16044
16061
|
if (!match)
|
|
16045
16062
|
return source;
|
|
16046
16063
|
let res = match[1];
|
|
16047
|
-
let
|
|
16064
|
+
let sep2 = " ";
|
|
16048
16065
|
let pos = first.lastIndex;
|
|
16049
16066
|
line.lastIndex = pos;
|
|
16050
16067
|
while (match = line.exec(source)) {
|
|
16051
16068
|
if (match[1] === "") {
|
|
16052
|
-
if (
|
|
16069
|
+
if (sep2 === `
|
|
16053
16070
|
`)
|
|
16054
|
-
res +=
|
|
16071
|
+
res += sep2;
|
|
16055
16072
|
else
|
|
16056
|
-
|
|
16073
|
+
sep2 = `
|
|
16057
16074
|
`;
|
|
16058
16075
|
} else {
|
|
16059
|
-
res +=
|
|
16060
|
-
|
|
16076
|
+
res += sep2 + match[1];
|
|
16077
|
+
sep2 = " ";
|
|
16061
16078
|
}
|
|
16062
16079
|
pos = line.lastIndex;
|
|
16063
16080
|
}
|
|
16064
16081
|
const last = /[ \t]*(.*)/sy;
|
|
16065
16082
|
last.lastIndex = pos;
|
|
16066
16083
|
match = last.exec(source);
|
|
16067
|
-
return res +
|
|
16084
|
+
return res + sep2 + (match?.[1] ?? "");
|
|
16068
16085
|
}
|
|
16069
16086
|
function doubleQuotedValue(source, onError) {
|
|
16070
16087
|
let res = "";
|
|
@@ -16831,14 +16848,14 @@ var require_cst_stringify2 = __commonJS((exports) => {
|
|
|
16831
16848
|
}
|
|
16832
16849
|
}
|
|
16833
16850
|
}
|
|
16834
|
-
function stringifyItem({ start, key, sep, value }) {
|
|
16851
|
+
function stringifyItem({ start, key, sep: sep2, value }) {
|
|
16835
16852
|
let res = "";
|
|
16836
16853
|
for (const st of start)
|
|
16837
16854
|
res += st.source;
|
|
16838
16855
|
if (key)
|
|
16839
16856
|
res += stringifyToken(key);
|
|
16840
|
-
if (
|
|
16841
|
-
for (const st of
|
|
16857
|
+
if (sep2)
|
|
16858
|
+
for (const st of sep2)
|
|
16842
16859
|
res += st.source;
|
|
16843
16860
|
if (value)
|
|
16844
16861
|
res += stringifyToken(value);
|
|
@@ -17977,18 +17994,18 @@ var require_parser2 = __commonJS((exports) => {
|
|
|
17977
17994
|
if (this.type === "map-value-ind") {
|
|
17978
17995
|
const prev = getPrevProps(this.peek(2));
|
|
17979
17996
|
const start = getFirstKeyStartProps(prev);
|
|
17980
|
-
let
|
|
17997
|
+
let sep2;
|
|
17981
17998
|
if (scalar.end) {
|
|
17982
|
-
|
|
17983
|
-
|
|
17999
|
+
sep2 = scalar.end;
|
|
18000
|
+
sep2.push(this.sourceToken);
|
|
17984
18001
|
delete scalar.end;
|
|
17985
18002
|
} else
|
|
17986
|
-
|
|
18003
|
+
sep2 = [this.sourceToken];
|
|
17987
18004
|
const map = {
|
|
17988
18005
|
type: "block-map",
|
|
17989
18006
|
offset: scalar.offset,
|
|
17990
18007
|
indent: scalar.indent,
|
|
17991
|
-
items: [{ start, key: scalar, sep }]
|
|
18008
|
+
items: [{ start, key: scalar, sep: sep2 }]
|
|
17992
18009
|
};
|
|
17993
18010
|
this.onKeyLine = true;
|
|
17994
18011
|
this.stack[this.stack.length - 1] = map;
|
|
@@ -18142,15 +18159,15 @@ var require_parser2 = __commonJS((exports) => {
|
|
|
18142
18159
|
} else if (isFlowToken(it.key) && !includesToken(it.sep, "newline")) {
|
|
18143
18160
|
const start2 = getFirstKeyStartProps(it.start);
|
|
18144
18161
|
const key = it.key;
|
|
18145
|
-
const
|
|
18146
|
-
|
|
18162
|
+
const sep2 = it.sep;
|
|
18163
|
+
sep2.push(this.sourceToken);
|
|
18147
18164
|
delete it.key;
|
|
18148
18165
|
delete it.sep;
|
|
18149
18166
|
this.stack.push({
|
|
18150
18167
|
type: "block-map",
|
|
18151
18168
|
offset: this.offset,
|
|
18152
18169
|
indent: this.indent,
|
|
18153
|
-
items: [{ start: start2, key, sep }]
|
|
18170
|
+
items: [{ start: start2, key, sep: sep2 }]
|
|
18154
18171
|
});
|
|
18155
18172
|
} else if (start.length > 0) {
|
|
18156
18173
|
it.sep = it.sep.concat(start, this.sourceToken);
|
|
@@ -18344,13 +18361,13 @@ var require_parser2 = __commonJS((exports) => {
|
|
|
18344
18361
|
const prev = getPrevProps(parent);
|
|
18345
18362
|
const start = getFirstKeyStartProps(prev);
|
|
18346
18363
|
fixFlowSeqItems(fc);
|
|
18347
|
-
const
|
|
18348
|
-
|
|
18364
|
+
const sep2 = fc.end.splice(1, fc.end.length);
|
|
18365
|
+
sep2.push(this.sourceToken);
|
|
18349
18366
|
const map = {
|
|
18350
18367
|
type: "block-map",
|
|
18351
18368
|
offset: fc.offset,
|
|
18352
18369
|
indent: fc.indent,
|
|
18353
|
-
items: [{ start, key: fc, sep }]
|
|
18370
|
+
items: [{ start, key: fc, sep: sep2 }]
|
|
18354
18371
|
};
|
|
18355
18372
|
this.onKeyLine = true;
|
|
18356
18373
|
this.stack[this.stack.length - 1] = map;
|
|
@@ -25611,23 +25628,14 @@ var PI_EXTENSION_PACKAGE = "@signet/pi-extension";
|
|
|
25611
25628
|
var PI_EXTENSION_ENTRY = "dist/signet-pi.mjs";
|
|
25612
25629
|
var PI_MANAGED_FILENAME = "signet-pi.js";
|
|
25613
25630
|
var PI_MANAGED_MARKER = "SIGNET_MANAGED_PI_EXTENSION";
|
|
25614
|
-
function
|
|
25615
|
-
|
|
25616
|
-
|
|
25617
|
-
|
|
25618
|
-
|
|
25619
|
-
|
|
25620
|
-
|
|
25621
|
-
|
|
25622
|
-
const bootstrap = buildManagedExtensionEnvBootstrap(env);
|
|
25623
|
-
return `// ${PI_MANAGED_MARKER}
|
|
25624
|
-
// Managed by Signet (${PI_EXTENSION_PACKAGE})
|
|
25625
|
-
// Source: ${PI_EXTENSION_ENTRY}
|
|
25626
|
-
// DO NOT EDIT - this file is overwritten by Signet setup/sync.
|
|
25627
|
-
|
|
25628
|
-
${bootstrap}
|
|
25629
|
-
|
|
25630
|
-
${bundle}`;
|
|
25631
|
+
function buildManagedPiExtensionContent(env) {
|
|
25632
|
+
return buildManagedExtensionContent({
|
|
25633
|
+
bundle: EXTENSION_BUNDLE,
|
|
25634
|
+
marker: PI_MANAGED_MARKER,
|
|
25635
|
+
packageName: PI_EXTENSION_PACKAGE,
|
|
25636
|
+
entry: PI_EXTENSION_ENTRY,
|
|
25637
|
+
env
|
|
25638
|
+
});
|
|
25631
25639
|
}
|
|
25632
25640
|
|
|
25633
25641
|
class PiConnector extends BaseConnector {
|
|
@@ -25655,7 +25663,7 @@ class PiConnector extends BaseConnector {
|
|
|
25655
25663
|
removeManagedExtensionFile(filePath, PI_MANAGED_MARKER);
|
|
25656
25664
|
}
|
|
25657
25665
|
mkdirSync(dirname7(targetPath), { recursive: true });
|
|
25658
|
-
const managedContent =
|
|
25666
|
+
const managedContent = buildManagedPiExtensionContent({
|
|
25659
25667
|
signetPath: basePath || resolveSignetWorkspacePath(),
|
|
25660
25668
|
daemonUrl: resolveSignetDaemonUrl2() || MANAGED_DAEMON_URL_DEFAULT,
|
|
25661
25669
|
agentId: resolveSignetAgentId(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@signetai/connector-pi",
|
|
3
|
-
"version": "0.163.
|
|
3
|
+
"version": "0.163.18",
|
|
4
4
|
"description": "Signet connector for pi",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"typecheck": "tsc --noEmit"
|
|
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",
|