@dv.nghiem/flowdeck 0.3.1 → 0.3.2
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/hooks/patch-trust.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"patch-trust.d.ts","sourceRoot":"","sources":["../../src/hooks/patch-trust.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAYH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,iBAAiB,GAAG,WAAW,CAAA;AAEnE,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,YAAY,CAAA;IACrB,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB;AA0BD,wBAAgB,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,UAAU,CA4B5F;AAED,wBAAsB,cAAc,CAClC,GAAG,EAAE;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,EAC1B,KAAK,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,EACvB,MAAM,EAAE;IAAE,IAAI,EAAE,GAAG,CAAA;CAAE,GACpB,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"patch-trust.d.ts","sourceRoot":"","sources":["../../src/hooks/patch-trust.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAYH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,iBAAiB,GAAG,WAAW,CAAA;AAEnE,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,YAAY,CAAA;IACrB,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB;AA0BD,wBAAgB,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,UAAU,CA4B5F;AAED,wBAAsB,cAAc,CAClC,GAAG,EAAE;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,EAC1B,KAAK,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,EACvB,MAAM,EAAE;IAAE,IAAI,EAAE,GAAG,CAAA;CAAE,GACpB,OAAO,CAAC,IAAI,CAAC,CAwBf"}
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAiGjD,QAAA,MAAM,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAiGjD,QAAA,MAAM,MAAM,EAAE,MAkOb,CAAA;AAED,eAAe,MAAM,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -2288,6 +2288,10 @@ async function patchTrustHook(ctx, input, output) {
|
|
|
2288
2288
|
Signals: ${trust.signals.join("; ")}
|
|
2289
2289
|
This edit requires explicit human review before applying.`);
|
|
2290
2290
|
} else if (trust.verdict === "review-required") {
|
|
2291
|
+
const reviewEnabled = process.env.FLOWDECK_PATCH_TRUST_REVIEW_ENABLED;
|
|
2292
|
+
if (reviewEnabled !== "true" && reviewEnabled !== "1") {
|
|
2293
|
+
return;
|
|
2294
|
+
}
|
|
2291
2295
|
throw new Error(`[flowdeck] PATCH-TRUST REVIEW-REQUIRED (score=${trust.score}): ${filePath}
|
|
2292
2296
|
Signals: ${trust.signals.join("; ")}`);
|
|
2293
2297
|
}
|
|
@@ -6026,6 +6030,16 @@ var plugin = async (input, _options) => {
|
|
|
6026
6030
|
}
|
|
6027
6031
|
},
|
|
6028
6032
|
"tool.execute.before": async (toolInput, toolOutput) => {
|
|
6033
|
+
if ((toolInput.tool === "read" || toolInput.tool === "view") && toolOutput?.args) {
|
|
6034
|
+
if (typeof toolOutput.args.offset === "string") {
|
|
6035
|
+
const n = Number(toolOutput.args.offset);
|
|
6036
|
+
if (!isNaN(n))
|
|
6037
|
+
toolOutput.args.offset = Math.floor(n);
|
|
6038
|
+
}
|
|
6039
|
+
if (Array.isArray(toolOutput.args.view_range)) {
|
|
6040
|
+
toolOutput.args.view_range = toolOutput.args.view_range.map((v) => typeof v === "string" ? Math.floor(Number(v)) : v);
|
|
6041
|
+
}
|
|
6042
|
+
}
|
|
6029
6043
|
orchestratorGuard.check(toolInput.sessionID ?? "", toolInput.tool ?? toolInput.name ?? "");
|
|
6030
6044
|
await telemetryHook({ directory }, toolInput, toolOutput);
|
|
6031
6045
|
await approvalHook({ directory }, toolInput, toolOutput);
|