@flowrail/init 0.0.17 → 0.0.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/doctor-script.js +26 -8
- package/package.json +2 -2
package/dist/doctor-script.js
CHANGED
|
@@ -1488,6 +1488,16 @@ const VERIFY_LATENCY_PROBE_CAP_MS = 60000;
|
|
|
1488
1488
|
const VERIFY_RETRY_BACKOFF_MS = 1500;
|
|
1489
1489
|
const PROBE_MARKER_FILE = 'status-probe.json';
|
|
1490
1490
|
const DIAGNOSTIC_DETAIL_MAX_CHARS = 300;
|
|
1491
|
+
// Keep aligned with @flowrail/hook's verify-latency operational verdicts.
|
|
1492
|
+
const OPERATIONAL_VERDICT_IDS = new Set([
|
|
1493
|
+
'cost_cap_exceeded',
|
|
1494
|
+
'verify_no_verdict',
|
|
1495
|
+
'judge_no_verdict',
|
|
1496
|
+
'managed_model_pricing_unavailable',
|
|
1497
|
+
'managed_admission_unavailable',
|
|
1498
|
+
'managed_route_unavailable',
|
|
1499
|
+
'truncated_judge',
|
|
1500
|
+
]);
|
|
1491
1501
|
|
|
1492
1502
|
function failModeSettingsLayers(settings) {
|
|
1493
1503
|
return doctorSettingsLayers(settings);
|
|
@@ -1644,6 +1654,14 @@ function failModePostureMessage(verifyMode, depMode, rawEnv) {
|
|
|
1644
1654
|
? 'FLOWRAIL_FAIL_MODE=' + legacyRaw +
|
|
1645
1655
|
' is not a recognised value — treated as unset'
|
|
1646
1656
|
: 'default — FLOWRAIL_FAIL_MODE unset';
|
|
1657
|
+
if (verifyMode === undefined) {
|
|
1658
|
+
return (
|
|
1659
|
+
'FlowRail: write gate fail mode is SCOPED (' + origin + ') — ' +
|
|
1660
|
+
'incomplete design-bound writes pause for retry; ' +
|
|
1661
|
+
'unbound writes still allow on errors/timeouts' + depGateNote + '. ' +
|
|
1662
|
+
'Set FLOWRAIL_VERIFY_FAIL_MODE=closed to pause unbound writes too.'
|
|
1663
|
+
);
|
|
1664
|
+
}
|
|
1647
1665
|
return (
|
|
1648
1666
|
'FlowRail: write gate fail mode is OPEN (' + origin + ') — verifier ' +
|
|
1649
1667
|
'errors/timeouts allow code writes silently' + depGateNote + '. ' +
|
|
@@ -1919,7 +1937,9 @@ async function checkVerifyLatency(settings, hookVerifyBudgetMs) {
|
|
|
1919
1937
|
? 'with the closed verifier posture the write gate will block every code write (issue #300)'
|
|
1920
1938
|
: posture === 'advisory'
|
|
1921
1939
|
? 'the write gate will allow every code write with advisory context (issue #300)'
|
|
1922
|
-
:
|
|
1940
|
+
: posture === undefined
|
|
1941
|
+
? 'design-bound writes pause for retry; unbound writes fail open (issue #300)'
|
|
1942
|
+
: 'the write gate is failing open on every code write (issue #300)';
|
|
1923
1943
|
|
|
1924
1944
|
if (out.transportError) {
|
|
1925
1945
|
if (
|
|
@@ -2001,12 +2021,10 @@ async function checkVerifyLatency(settings, hookVerifyBudgetMs) {
|
|
|
2001
2021
|
);
|
|
2002
2022
|
return false;
|
|
2003
2023
|
}
|
|
2004
|
-
//
|
|
2005
|
-
//
|
|
2006
|
-
//
|
|
2007
|
-
//
|
|
2008
|
-
// _credential_unavailable) or cost_cap_exceeded; real guardrail ids
|
|
2009
|
-
// are kebab-case.
|
|
2024
|
+
// Operational verdicts refuse dispatch or report an unusable response.
|
|
2025
|
+
// Neither establishes the latency of a usable security verdict. Preserve
|
|
2026
|
+
// the reserved underscore IDs and match other operational IDs exactly so
|
|
2027
|
+
// ordinary guardrail failures still count as measured verifier results.
|
|
2010
2028
|
const structuredVerdicts = structured ? structured.per_guardrail_verdicts : undefined;
|
|
2011
2029
|
const verdicts = Array.isArray(structuredVerdicts)
|
|
2012
2030
|
? structuredVerdicts
|
|
@@ -2015,7 +2033,7 @@ async function checkVerifyLatency(settings, hookVerifyBudgetMs) {
|
|
|
2015
2033
|
: [];
|
|
2016
2034
|
for (const v of verdicts) {
|
|
2017
2035
|
const gid = v && typeof v.guardrail_id === 'string' ? v.guardrail_id : '';
|
|
2018
|
-
if (gid.charAt(0) === '_' || gid
|
|
2036
|
+
if (gid.charAt(0) === '_' || OPERATIONAL_VERDICT_IDS.has(gid)) {
|
|
2019
2037
|
console.warn(
|
|
2020
2038
|
'FlowRail: verify-latency probe inconclusive — the server answered ' +
|
|
2021
2039
|
'with a synthetic verdict (' +
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flowrail/init",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.18",
|
|
4
4
|
"description": "One-shot FlowRail installer for Claude Code. Wires PreToolUse hooks, MCP server config, and skill markdown into your repo, then probes the FlowRail server with your API key.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"private": false,
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"prepublishOnly": "npm run build && npm test"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@flowrail/skills": "0.0.
|
|
28
|
+
"@flowrail/skills": "0.0.8"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/jest": "^29.5.12",
|