failproofai 1.0.9-beta.1 → 1.0.9
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/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/build-manifest.json +3 -3
- package/.next/standalone/.next/prerender-manifest.json +4 -4
- package/.next/standalone/.next/required-server-files.json +1 -1
- package/.next/standalone/.next/server/app/_global-error/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +7 -7
- package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +6 -6
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +7 -7
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/.next/server/app/_not-found.rsc +14 -14
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +14 -14
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +13 -13
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/api/audit/invite/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/audit/run/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/audit/status/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/login-request/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/login-verify/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/logout/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/status/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/download/[project]/[session]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/audit/page/server-reference-manifest.json +2 -2
- package/.next/standalone/.next/server/app/audit/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/audit/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/index.html +1 -1
- package/.next/standalone/.next/server/app/index.rsc +14 -14
- package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +13 -13
- package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +14 -14
- package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/policies/page/server-reference-manifest.json +14 -14
- package/.next/standalone/.next/server/app/policies/page.js +1 -1
- package/.next/standalone/.next/server/app/policies/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/policies/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/project/[name]/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/project/[name]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/project/[name]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/react-loadable-manifest.json +2 -2
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/server-reference-manifest.json +2 -2
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/projects/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/projects/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/projects/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +8 -8
- package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0o07qi9._.js +1 -1
- package/.next/standalone/.next/server/chunks/_0tovk6q._.js +1 -1
- package/.next/standalone/.next/server/chunks/_0trp3yc._.js +1 -1
- package/.next/standalone/.next/server/chunks/package_json_[json]_cjs_1nxcc4v._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__04usis8._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__056wjo4._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0n0xg95._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0rwtwpm._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__11mayhe._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__15578wp._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__03m2iw6._.js → [root-of-the-server]__1ec94jt._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1m_svbe._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1pprgri._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1q4p5b8._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_042cgl1._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_08x1r5t._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0bqoto4._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_11ilmst._.js → _0xq-p5o._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_1jatlmf._.js → _1g7s7di._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_1gb0ifp._.js +3 -3
- package/.next/standalone/.next/server/chunks/ssr/_1zopuov._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_next-internal_server_app_policies_page_actions_1sp2-yo.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/app_actions_get-scheduled-audit_ts_0ei9sni._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_audit__components_audit-dashboard_tsx_0p9ud47._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_global-error_tsx_1kp6l3x._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_policies_hooks-client_tsx_19dqvpc._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_settings_02tf1h4._.js +1 -1
- package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
- package/.next/standalone/.next/server/pages/404.html +1 -1
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +23 -23
- package/.next/standalone/.next/static/chunks/{1uec0n0lcx5h1.js → 03madt33xbsx2.js} +1 -1
- package/.next/standalone/.next/static/chunks/0w8_n30wmnorq.js +1 -0
- package/.next/standalone/.next/static/chunks/{3vp54x0dyrrm6.js → 0zlixskj11-yh.js} +1 -1
- package/.next/standalone/.next/static/chunks/{21qlo00jis4w-.js → 1-n1o5wh4wfy6.js} +1 -1
- package/.next/standalone/.next/static/chunks/{2n00c3zqyloy9.js → 1t6tmwe_1myeo.js} +1 -1
- package/.next/standalone/.next/static/chunks/{3tv107_for_n7.js → 28z6u4u7hdrnd.js} +1 -1
- package/.next/standalone/.next/static/chunks/{1r74hmr1wm_sd.js → 2dj6xq9mueqb6.js} +1 -1
- package/.next/standalone/.next/static/chunks/{1-d48e9k-7e1a.js → 2lczelmvvc2yg.js} +1 -1
- package/.next/standalone/.next/static/chunks/{08ckontevw-0w.js → 3fbsuyflx-2qi.js} +1 -1
- package/.next/standalone/.next/static/chunks/{21-pqc3-l9ak2.js → 3jffngwvgxm5q.js} +1 -1
- package/.next/standalone/package.json +9 -9
- package/.next/standalone/sdk/typescript/CHANGELOG.md +39 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/ai-5/package-lock.json +3 -3
- package/.next/standalone/sdk/typescript/integration/fixtures/ai-5/package.json +1 -1
- package/.next/standalone/sdk/typescript/integration/fixtures/mastra-0/package-lock.json +16 -113
- package/.next/standalone/sdk/typescript/integration/fixtures/mastra-0/package.json +3 -1
- package/.next/standalone/server.js +1 -1
- package/dist/cli.mjs +254 -124
- package/dist/worker.mjs +1 -1
- package/package.json +9 -9
- package/src/hooks/daemon-service.ts +14 -1
- package/src/hooks/integrations.ts +133 -31
- package/src/hooks/safe-config-write.ts +80 -7
- package/.next/standalone/.next/static/chunks/0pefjgvu4x-sx.js +0 -1
- /package/.next/standalone/.next/static/{ozuWoyIwOTqeUUjKqOKiH → Q2PyL8ZdGGdvVnn-3FrL2}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{ozuWoyIwOTqeUUjKqOKiH → Q2PyL8ZdGGdvVnn-3FrL2}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{ozuWoyIwOTqeUUjKqOKiH → Q2PyL8ZdGGdvVnn-3FrL2}/_ssgManifest.js +0 -0
package/dist/cli.mjs
CHANGED
|
@@ -29,7 +29,7 @@ var __esm = (fn, res, err) => () => {
|
|
|
29
29
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
30
30
|
|
|
31
31
|
// package.json
|
|
32
|
-
var version2 = "1.0.9
|
|
32
|
+
var version2 = "1.0.9", package_default;
|
|
33
33
|
var init_package = __esm(() => {
|
|
34
34
|
package_default = {
|
|
35
35
|
name: "failproofai",
|
|
@@ -155,16 +155,16 @@ var init_package = __esm(() => {
|
|
|
155
155
|
browserslist: "4.28.8"
|
|
156
156
|
},
|
|
157
157
|
optionalDependencies: {
|
|
158
|
-
"@failproofai/failproofaid-linux-x64": "1.0.9
|
|
159
|
-
"@failproofai/failproofaid-linux-arm64": "1.0.9
|
|
160
|
-
"@failproofai/failproofaid-darwin-x64": "1.0.9
|
|
161
|
-
"@failproofai/failproofaid-darwin-arm64": "1.0.9
|
|
158
|
+
"@failproofai/failproofaid-linux-x64": "1.0.9",
|
|
159
|
+
"@failproofai/failproofaid-linux-arm64": "1.0.9",
|
|
160
|
+
"@failproofai/failproofaid-darwin-x64": "1.0.9",
|
|
161
|
+
"@failproofai/failproofaid-darwin-arm64": "1.0.9"
|
|
162
162
|
},
|
|
163
163
|
failproofaidBinaries: {
|
|
164
|
-
"linux-x64": "
|
|
165
|
-
"linux-arm64": "
|
|
166
|
-
"darwin-x64": "
|
|
167
|
-
"darwin-arm64": "
|
|
164
|
+
"linux-x64": "c406199fbd5682ee84eb3bdd679fe48d1f78a26e97710f05bcfe42771e33ca4a",
|
|
165
|
+
"linux-arm64": "8ec339035013aaf069bd882660b89eefde137a5fb3c66bed9c65bfbfa1afaa19",
|
|
166
|
+
"darwin-x64": "fdf77e2432131ff6081769555c0a87d709d3380c78bc33de92743694dd20a83b",
|
|
167
|
+
"darwin-arm64": "a85e7e2af98fbcc09b6dfdd7fba8289d309757eab6482770ca64d3eeb81407d5"
|
|
168
168
|
}
|
|
169
169
|
};
|
|
170
170
|
});
|
|
@@ -12496,12 +12496,14 @@ var init_dist = __esm(() => {
|
|
|
12496
12496
|
import {
|
|
12497
12497
|
chmodSync as chmodSync2,
|
|
12498
12498
|
closeSync as closeSync2,
|
|
12499
|
+
constants as fsConstants2,
|
|
12499
12500
|
copyFileSync,
|
|
12500
12501
|
existsSync as existsSync7,
|
|
12501
12502
|
fsyncSync,
|
|
12502
12503
|
lstatSync,
|
|
12503
12504
|
mkdirSync as mkdirSync4,
|
|
12504
12505
|
openSync as openSync2,
|
|
12506
|
+
readlinkSync,
|
|
12505
12507
|
realpathSync as realpathSync2,
|
|
12506
12508
|
renameSync as renameSync2,
|
|
12507
12509
|
rmSync as rmSync2,
|
|
@@ -12511,19 +12513,50 @@ import {
|
|
|
12511
12513
|
import { randomBytes } from "node:crypto";
|
|
12512
12514
|
import { basename, dirname as dirname3, join as join3 } from "node:path";
|
|
12513
12515
|
function resolveWriteTarget(path) {
|
|
12516
|
+
let isLink = false;
|
|
12514
12517
|
try {
|
|
12515
|
-
|
|
12516
|
-
|
|
12517
|
-
|
|
12518
|
-
|
|
12518
|
+
isLink = lstatSync(path).isSymbolicLink();
|
|
12519
|
+
} catch {
|
|
12520
|
+
return path;
|
|
12521
|
+
}
|
|
12522
|
+
if (!isLink)
|
|
12523
|
+
return path;
|
|
12524
|
+
try {
|
|
12525
|
+
return realpathSync2(path);
|
|
12526
|
+
} catch {
|
|
12527
|
+
let target = "(unreadable link)";
|
|
12528
|
+
try {
|
|
12529
|
+
target = readlinkSync(path);
|
|
12530
|
+
} catch {}
|
|
12531
|
+
throw new DanglingConfigSymlinkError(path, target);
|
|
12532
|
+
}
|
|
12533
|
+
}
|
|
12534
|
+
function isSymlink(path) {
|
|
12535
|
+
try {
|
|
12536
|
+
return lstatSync(path).isSymbolicLink();
|
|
12537
|
+
} catch {
|
|
12538
|
+
return false;
|
|
12539
|
+
}
|
|
12540
|
+
}
|
|
12541
|
+
function writeBackup(target, dir) {
|
|
12542
|
+
const backup = `${target}.failproofai-backup`;
|
|
12543
|
+
const temporary = join3(dir, `.${basename(target)}.failproofai-backup-${process.pid}-${randomBytes(4).toString("hex")}.tmp`);
|
|
12544
|
+
try {
|
|
12545
|
+
copyFileSync(target, temporary, fsConstants2.COPYFILE_EXCL);
|
|
12546
|
+
renameSync2(temporary, backup);
|
|
12547
|
+
} catch (err) {
|
|
12548
|
+
rmSync2(temporary, { force: true });
|
|
12549
|
+
throw err;
|
|
12550
|
+
}
|
|
12519
12551
|
}
|
|
12520
12552
|
function writeConfigFileAtomic(path, content, deps = {}) {
|
|
12521
|
-
const
|
|
12553
|
+
const replacingLink = deps.symlinks === "replace" && isSymlink(path);
|
|
12554
|
+
const target = deps.symlinks === "replace" ? path : resolveWriteTarget(path);
|
|
12522
12555
|
const dir = dirname3(target);
|
|
12523
12556
|
mkdirSync4(dir, { recursive: true });
|
|
12524
12557
|
let mode;
|
|
12525
12558
|
try {
|
|
12526
|
-
mode = statSync5(target).mode & 511;
|
|
12559
|
+
mode = replacingLink ? undefined : statSync5(target).mode & 511;
|
|
12527
12560
|
} catch {
|
|
12528
12561
|
mode = undefined;
|
|
12529
12562
|
}
|
|
@@ -12540,8 +12573,8 @@ function writeConfigFileAtomic(path, content, deps = {}) {
|
|
|
12540
12573
|
fd = undefined;
|
|
12541
12574
|
if (mode !== undefined)
|
|
12542
12575
|
chmodSync2(temporary, mode);
|
|
12543
|
-
if (existsSync7(target))
|
|
12544
|
-
|
|
12576
|
+
if (deps.backup !== false && !replacingLink && existsSync7(target))
|
|
12577
|
+
writeBackup(target, dir);
|
|
12545
12578
|
(deps.rename ?? renameSync2)(temporary, target);
|
|
12546
12579
|
} catch (err) {
|
|
12547
12580
|
if (fd !== undefined) {
|
|
@@ -12561,7 +12594,19 @@ function writeConfigFileAtomic(path, content, deps = {}) {
|
|
|
12561
12594
|
}
|
|
12562
12595
|
} catch {}
|
|
12563
12596
|
}
|
|
12564
|
-
var
|
|
12597
|
+
var DanglingConfigSymlinkError;
|
|
12598
|
+
var init_safe_config_write = __esm(() => {
|
|
12599
|
+
DanglingConfigSymlinkError = class DanglingConfigSymlinkError extends Error {
|
|
12600
|
+
path;
|
|
12601
|
+
target;
|
|
12602
|
+
constructor(path, target) {
|
|
12603
|
+
super(`Refusing to write ${path}: it is a symlink to ${target}, which does not exist. ` + `Fix or remove the link, then retry — failproofai will not replace it with a regular file.`);
|
|
12604
|
+
this.path = path;
|
|
12605
|
+
this.target = target;
|
|
12606
|
+
this.name = "DanglingConfigSymlinkError";
|
|
12607
|
+
}
|
|
12608
|
+
};
|
|
12609
|
+
});
|
|
12565
12610
|
|
|
12566
12611
|
// lib/hermes-profiles.ts
|
|
12567
12612
|
import { existsSync as existsSync8, readdirSync } from "node:fs";
|
|
@@ -12704,7 +12749,7 @@ import {
|
|
|
12704
12749
|
existsSync as existsSync10,
|
|
12705
12750
|
lstatSync as lstatSync2,
|
|
12706
12751
|
mkdirSync as mkdirSync5,
|
|
12707
|
-
readlinkSync,
|
|
12752
|
+
readlinkSync as readlinkSync2,
|
|
12708
12753
|
realpathSync as realpathSync3,
|
|
12709
12754
|
renameSync as renameSync3,
|
|
12710
12755
|
rmSync as rmSync3,
|
|
@@ -13076,14 +13121,38 @@ function pathPresent(path) {
|
|
|
13076
13121
|
function hasAllHermesPluginFiles(dir) {
|
|
13077
13122
|
return HERMES_PLUGIN_FILES.every((file) => existsSync10(resolve8(dir, file)));
|
|
13078
13123
|
}
|
|
13079
|
-
function
|
|
13080
|
-
|
|
13081
|
-
|
|
13082
|
-
|
|
13124
|
+
function hermesLinkRecordPath(pluginPath) {
|
|
13125
|
+
return resolve8(dirname6(pluginPath), HERMES_LINK_RECORD);
|
|
13126
|
+
}
|
|
13127
|
+
function readHermesLinkRecord(pluginPath) {
|
|
13128
|
+
try {
|
|
13129
|
+
const recorded = readFileSync5(hermesLinkRecordPath(pluginPath), "utf8").trim();
|
|
13130
|
+
return recorded === "" ? null : resolve8(recorded);
|
|
13131
|
+
} catch {
|
|
13132
|
+
return null;
|
|
13133
|
+
}
|
|
13134
|
+
}
|
|
13135
|
+
function writeHermesLinkRecord(pluginPath, target) {
|
|
13136
|
+
writeConfigFileAtomic(hermesLinkRecordPath(pluginPath), resolve8(target) + `
|
|
13137
|
+
`, { backup: false, symlinks: "replace" });
|
|
13138
|
+
}
|
|
13139
|
+
function removeHermesLinkRecord(pluginPath) {
|
|
13140
|
+
rmSync3(hermesLinkRecordPath(pluginPath), { force: true });
|
|
13141
|
+
}
|
|
13142
|
+
function isOwnedHermesPluginLink(pluginPath, target) {
|
|
13143
|
+
const recorded = readHermesLinkRecord(pluginPath);
|
|
13144
|
+
if (recorded && resolve8(target) === recorded)
|
|
13083
13145
|
return true;
|
|
13146
|
+
if (samePath(target, getHermesPluginSourcePath()))
|
|
13147
|
+
return true;
|
|
13148
|
+
const pkgRoot = dirname6(resolve8(target));
|
|
13149
|
+
if (basename4(resolve8(target)) !== HERMES_PLUGIN_SOURCE_DIR)
|
|
13150
|
+
return false;
|
|
13151
|
+
if (basename4(pkgRoot) !== "failproofai" || basename4(dirname6(pkgRoot)) !== "node_modules")
|
|
13152
|
+
return false;
|
|
13084
13153
|
try {
|
|
13085
|
-
const
|
|
13086
|
-
return
|
|
13154
|
+
const pkg = JSON.parse(readFileSync5(resolve8(pkgRoot, "package.json"), "utf8"));
|
|
13155
|
+
return pkg.name === "failproofai";
|
|
13087
13156
|
} catch {
|
|
13088
13157
|
return false;
|
|
13089
13158
|
}
|
|
@@ -13111,11 +13180,11 @@ function hermesPluginState(settingsPath) {
|
|
|
13111
13180
|
if (isLink) {
|
|
13112
13181
|
let target;
|
|
13113
13182
|
try {
|
|
13114
|
-
target = resolve8(dirname6(pluginPath),
|
|
13183
|
+
target = resolve8(dirname6(pluginPath), readlinkSync2(pluginPath));
|
|
13115
13184
|
} catch {
|
|
13116
13185
|
return { kind: "foreign" };
|
|
13117
13186
|
}
|
|
13118
|
-
if (!
|
|
13187
|
+
if (!isOwnedHermesPluginLink(pluginPath, target))
|
|
13119
13188
|
return { kind: "foreign" };
|
|
13120
13189
|
return {
|
|
13121
13190
|
kind: "link",
|
|
@@ -13148,8 +13217,14 @@ function installHermesPlugin(settingsPath, deps = {}) {
|
|
|
13148
13217
|
if (existing.kind === "foreign") {
|
|
13149
13218
|
throw new Error(`Refusing to overwrite an unmanaged Hermes plugin at ${destination}. ` + `Move it aside or install FailproofAI under a different Hermes profile.`);
|
|
13150
13219
|
}
|
|
13151
|
-
if (existing.kind === "link" && existing.current)
|
|
13220
|
+
if (existing.kind === "link" && existing.current) {
|
|
13221
|
+
if (readHermesLinkRecord(destination) !== resolve8(existing.target)) {
|
|
13222
|
+
try {
|
|
13223
|
+
writeHermesLinkRecord(destination, existing.target);
|
|
13224
|
+
} catch {}
|
|
13225
|
+
}
|
|
13152
13226
|
return "unchanged";
|
|
13227
|
+
}
|
|
13153
13228
|
mkdirSync5(dirname6(destination), { recursive: true });
|
|
13154
13229
|
const suffix = `${process.pid}-${Date.now()}`;
|
|
13155
13230
|
const temporary = `${destination}.install-${suffix}`;
|
|
@@ -13175,6 +13250,7 @@ function installHermesPlugin(settingsPath, deps = {}) {
|
|
|
13175
13250
|
if (linked && (existing.kind === "absent" || existing.kind === "link")) {
|
|
13176
13251
|
try {
|
|
13177
13252
|
renameSync3(temporary, destination);
|
|
13253
|
+
writeHermesLinkRecord(destination, source);
|
|
13178
13254
|
return "linked";
|
|
13179
13255
|
} catch (err) {
|
|
13180
13256
|
if (existing.kind !== "link") {
|
|
@@ -13193,6 +13269,10 @@ function installHermesPlugin(settingsPath, deps = {}) {
|
|
|
13193
13269
|
renameSync3(temporary, destination);
|
|
13194
13270
|
if (movedExisting)
|
|
13195
13271
|
rmSync3(backup, { recursive: true, force: true });
|
|
13272
|
+
if (linked)
|
|
13273
|
+
writeHermesLinkRecord(destination, source);
|
|
13274
|
+
else
|
|
13275
|
+
removeHermesLinkRecord(destination);
|
|
13196
13276
|
} catch (err) {
|
|
13197
13277
|
rmSync3(temporary, { recursive: true, force: true });
|
|
13198
13278
|
if (movedExisting && !pathPresent(destination) && pathPresent(backup)) {
|
|
@@ -13207,6 +13287,7 @@ function removeManagedHermesPlugin(settingsPath) {
|
|
|
13207
13287
|
const state = hermesPluginState(settingsPath);
|
|
13208
13288
|
if (state.kind === "link") {
|
|
13209
13289
|
unlinkSync(pluginPath);
|
|
13290
|
+
removeHermesLinkRecord(pluginPath);
|
|
13210
13291
|
return true;
|
|
13211
13292
|
}
|
|
13212
13293
|
if (state.kind !== "copy")
|
|
@@ -13243,16 +13324,22 @@ function removeLegacyHermesHooks(doc) {
|
|
|
13243
13324
|
}
|
|
13244
13325
|
function hermesConfigState(settingsPath) {
|
|
13245
13326
|
if (!existsSync10(settingsPath)) {
|
|
13246
|
-
return { pluginEnabled: false, legacyShellHookPresent: false };
|
|
13327
|
+
return { pluginEnabled: false, pluginListed: false, pluginDisabled: false, legacyShellHookPresent: false };
|
|
13247
13328
|
}
|
|
13248
13329
|
const doc = inspectYamlDoc(settingsPath);
|
|
13249
|
-
if (!doc)
|
|
13250
|
-
return { pluginEnabled: false, legacyShellHookPresent: false, unreadable: true };
|
|
13330
|
+
if (!doc) {
|
|
13331
|
+
return { pluginEnabled: false, pluginListed: false, pluginDisabled: false, legacyShellHookPresent: false, unreadable: true };
|
|
13332
|
+
}
|
|
13251
13333
|
const js = doc.toJS() ?? {};
|
|
13252
13334
|
const enabled = js.plugins?.enabled;
|
|
13335
|
+
const disabled = js.plugins?.disabled;
|
|
13253
13336
|
const legacyShellHookPresent = !!js.hooks && typeof js.hooks === "object" && Object.values(js.hooks).some((entries) => Array.isArray(entries) && entries.some((entry) => isMarkedHook(entry)));
|
|
13337
|
+
const pluginListed = Array.isArray(enabled) && enabled.includes(HERMES_PLUGIN_ID);
|
|
13338
|
+
const pluginDisabled = Array.isArray(disabled) && disabled.includes(HERMES_PLUGIN_ID);
|
|
13254
13339
|
return {
|
|
13255
|
-
pluginEnabled:
|
|
13340
|
+
pluginEnabled: pluginListed && !pluginDisabled,
|
|
13341
|
+
pluginListed,
|
|
13342
|
+
pluginDisabled,
|
|
13256
13343
|
legacyShellHookPresent
|
|
13257
13344
|
};
|
|
13258
13345
|
}
|
|
@@ -13275,85 +13362,90 @@ async function migrateHermesProfiles(opts) {
|
|
|
13275
13362
|
const results = [];
|
|
13276
13363
|
let daemonOk;
|
|
13277
13364
|
for (const profile of listHermesProfiles()) {
|
|
13278
|
-
|
|
13279
|
-
|
|
13280
|
-
|
|
13281
|
-
|
|
13282
|
-
|
|
13283
|
-
|
|
13284
|
-
|
|
13285
|
-
|
|
13286
|
-
|
|
13287
|
-
|
|
13288
|
-
|
|
13289
|
-
|
|
13290
|
-
|
|
13291
|
-
|
|
13292
|
-
|
|
13365
|
+
try {
|
|
13366
|
+
if (!existsSync10(profile.home))
|
|
13367
|
+
continue;
|
|
13368
|
+
const settingsPath = resolve8(profile.home, "config.yaml");
|
|
13369
|
+
const pluginPath = hermesPluginPathForSettings(settingsPath);
|
|
13370
|
+
const config = hermesConfigState(settingsPath);
|
|
13371
|
+
const plugin = hermesPluginState(settingsPath);
|
|
13372
|
+
const ours = plugin.kind === "link" || plugin.kind === "copy";
|
|
13373
|
+
const base = { name: profile.name, home: profile.home };
|
|
13374
|
+
const legacy = config.legacyShellHookPresent;
|
|
13375
|
+
if (config.unreadable) {
|
|
13376
|
+
let raw = "";
|
|
13377
|
+
try {
|
|
13378
|
+
raw = readFileSync5(settingsPath, "utf8");
|
|
13379
|
+
} catch {
|
|
13380
|
+
raw = "";
|
|
13381
|
+
}
|
|
13382
|
+
const mentionsUs = ours || raw.includes(FAILPROOFAI_HOOK_MARKER) || /failproofai/.test(raw);
|
|
13383
|
+
results.push(mentionsUs ? {
|
|
13384
|
+
...base,
|
|
13385
|
+
status: "failed",
|
|
13386
|
+
detail: `${settingsPath} does not parse as YAML; left untouched`,
|
|
13387
|
+
legacyShellHooksRemain: /--hook\s+\S+\s+--cli\s+hermes|__failproofai_hook__/.test(raw)
|
|
13388
|
+
} : { ...base, status: "untouched", detail: "no failproofai integration", legacyShellHooksRemain: false });
|
|
13389
|
+
continue;
|
|
13293
13390
|
}
|
|
13294
|
-
|
|
13295
|
-
|
|
13296
|
-
|
|
13297
|
-
|
|
13298
|
-
|
|
13299
|
-
|
|
13300
|
-
|
|
13301
|
-
|
|
13302
|
-
|
|
13303
|
-
|
|
13304
|
-
|
|
13305
|
-
|
|
13306
|
-
|
|
13307
|
-
|
|
13308
|
-
results.push({ ...base, status: "current", detail: "already linked", legacyShellHooksRemain: false });
|
|
13309
|
-
continue;
|
|
13310
|
-
}
|
|
13311
|
-
if (plugin.kind === "foreign") {
|
|
13312
|
-
results.push({
|
|
13313
|
-
...base,
|
|
13314
|
-
status: "failed",
|
|
13315
|
-
detail: `an unmanaged plugin occupies ${pluginPath}` + (legacy ? "; shell hooks left in place (cron jobs are not checked)" : ""),
|
|
13316
|
-
legacyShellHooksRemain: legacy
|
|
13317
|
-
});
|
|
13318
|
-
continue;
|
|
13319
|
-
}
|
|
13320
|
-
if (existsSync10(settingsPath)) {
|
|
13321
|
-
const errors = $parseDocument(readFileSync5(settingsPath, "utf8")).errors;
|
|
13322
|
-
if (errors.length > 0) {
|
|
13391
|
+
if (!legacy && !ours && !config.pluginListed && !config.pluginDisabled) {
|
|
13392
|
+
results.push({ ...base, status: "untouched", detail: "no failproofai integration", legacyShellHooksRemain: false });
|
|
13393
|
+
continue;
|
|
13394
|
+
}
|
|
13395
|
+
if (plugin.kind === "link" && plugin.current && plugin.complete && config.pluginEnabled && !legacy) {
|
|
13396
|
+
if (readHermesLinkRecord(pluginPath) !== resolve8(plugin.target)) {
|
|
13397
|
+
try {
|
|
13398
|
+
writeHermesLinkRecord(pluginPath, plugin.target);
|
|
13399
|
+
} catch {}
|
|
13400
|
+
}
|
|
13401
|
+
results.push({ ...base, status: "current", detail: "already linked", legacyShellHooksRemain: false });
|
|
13402
|
+
continue;
|
|
13403
|
+
}
|
|
13404
|
+
if (plugin.kind === "foreign") {
|
|
13323
13405
|
results.push({
|
|
13324
13406
|
...base,
|
|
13325
13407
|
status: "failed",
|
|
13326
|
-
detail:
|
|
13408
|
+
detail: `an unmanaged plugin occupies ${pluginPath}` + (legacy ? "; shell hooks left in place (cron jobs are not checked)" : ""),
|
|
13327
13409
|
legacyShellHooksRemain: legacy
|
|
13328
13410
|
});
|
|
13329
13411
|
continue;
|
|
13330
13412
|
}
|
|
13331
|
-
|
|
13332
|
-
|
|
13333
|
-
|
|
13334
|
-
|
|
13335
|
-
|
|
13336
|
-
|
|
13337
|
-
|
|
13338
|
-
|
|
13339
|
-
|
|
13340
|
-
|
|
13341
|
-
|
|
13342
|
-
|
|
13343
|
-
|
|
13344
|
-
|
|
13345
|
-
|
|
13346
|
-
|
|
13347
|
-
|
|
13348
|
-
|
|
13349
|
-
|
|
13350
|
-
|
|
13413
|
+
if (daemonOk === undefined)
|
|
13414
|
+
daemonOk = await opts.daemonSupportsPolicyEvaluation();
|
|
13415
|
+
if (!daemonOk) {
|
|
13416
|
+
results.push({
|
|
13417
|
+
...base,
|
|
13418
|
+
status: "blocked",
|
|
13419
|
+
detail: legacy ? "daemon lacks native policy evaluation; shell hooks left in place (cron jobs are not checked)" : "daemon lacks native policy evaluation; the plugin here cannot get verdicts",
|
|
13420
|
+
legacyShellHooksRemain: legacy
|
|
13421
|
+
});
|
|
13422
|
+
continue;
|
|
13423
|
+
}
|
|
13424
|
+
try {
|
|
13425
|
+
const mode = installHermesPlugin(settingsPath, opts.installDeps);
|
|
13426
|
+
const doc = readYamlDoc(settingsPath);
|
|
13427
|
+
enableHermesPluginInDoc(doc);
|
|
13428
|
+
writeYamlDoc(settingsPath, doc);
|
|
13429
|
+
const reenabledOnly = !legacy && plugin.kind === "link" && plugin.current && mode === "unchanged";
|
|
13430
|
+
const from = legacy ? "shell hooks" : plugin.kind === "copy" ? "copied plugin" : plugin.kind === "link" ? "old plugin link" : "enabled but missing plugin";
|
|
13431
|
+
const to = mode === "copied" ? "plugin copy (symlink not possible here)" : "linked plugin";
|
|
13432
|
+
const detail = reenabledOnly ? config.pluginDisabled ? "plugin re-enabled (was listed in plugins.disabled)" : "plugin enabled in config.yaml" : `${from} → ${to}`;
|
|
13433
|
+
results.push({ ...base, status: "migrated", detail, legacyShellHooksRemain: false });
|
|
13434
|
+
} catch (err) {
|
|
13435
|
+
results.push({
|
|
13436
|
+
...base,
|
|
13437
|
+
status: "failed",
|
|
13438
|
+
detail: err instanceof Error ? err.message : String(err),
|
|
13439
|
+
legacyShellHooksRemain: hermesConfigState(settingsPath).legacyShellHookPresent
|
|
13440
|
+
});
|
|
13441
|
+
}
|
|
13351
13442
|
} catch (err) {
|
|
13352
13443
|
results.push({
|
|
13353
|
-
|
|
13444
|
+
name: profile.name,
|
|
13445
|
+
home: profile.home,
|
|
13354
13446
|
status: "failed",
|
|
13355
|
-
detail: err instanceof Error ? err.message : String(err)
|
|
13356
|
-
legacyShellHooksRemain:
|
|
13447
|
+
detail: `could not inspect this profile (${err instanceof Error ? err.message : String(err)}); left untouched`,
|
|
13448
|
+
legacyShellHooksRemain: false
|
|
13357
13449
|
});
|
|
13358
13450
|
}
|
|
13359
13451
|
}
|
|
@@ -13396,7 +13488,7 @@ function listInstallableIds() {
|
|
|
13396
13488
|
function detectInstalledClis() {
|
|
13397
13489
|
return INTEGRATION_TYPES.filter((id) => INTEGRATIONS[id]?.detectInstalled());
|
|
13398
13490
|
}
|
|
13399
|
-
var UnreadableAgentConfigError, claudeCode, codex, copilot, cursor, OPENCODE_PLUGIN_REL_PATH = "./plugins/failproofai.mjs", opencode, pi, HERMES_PLUGIN_ID = "failproofai", HERMES_PLUGIN_MARKER = ".failproofai-managed", HERMES_PLUGIN_FILES, HERMES_PLUGIN_SOURCE_DIR = "hermes-plugin", hermes, OPENCLAW_PLUGIN_ID = "failproofai", openclaw, factory, devin, ANTIGRAVITY_HOOK_NAME = "failproofai", ANTIGRAVITY_TOOL_EVENTS, antigravity, goose, INTEGRATIONS;
|
|
13491
|
+
var UnreadableAgentConfigError, claudeCode, codex, copilot, cursor, OPENCODE_PLUGIN_REL_PATH = "./plugins/failproofai.mjs", opencode, pi, HERMES_PLUGIN_ID = "failproofai", HERMES_PLUGIN_MARKER = ".failproofai-managed", HERMES_PLUGIN_FILES, HERMES_PLUGIN_SOURCE_DIR = "hermes-plugin", HERMES_LINK_RECORD = ".failproofai-link", hermes, OPENCLAW_PLUGIN_ID = "failproofai", openclaw, factory, devin, ANTIGRAVITY_HOOK_NAME = "failproofai", ANTIGRAVITY_TOOL_EVENTS, antigravity, goose, INTEGRATIONS;
|
|
13400
13492
|
var init_integrations = __esm(() => {
|
|
13401
13493
|
init_dist();
|
|
13402
13494
|
init_safe_config_write();
|
|
@@ -13914,7 +14006,7 @@ var init_integrations = __esm(() => {
|
|
|
13914
14006
|
const settingsPath = effectiveScope === "user" ? resolve8(homedir6(), ".config", "opencode", "opencode.json") : resolve8(process.cwd(), ".opencode", "opencode.json");
|
|
13915
14007
|
const pluginPath = opencodePluginFilePath(settingsPath);
|
|
13916
14008
|
mkdirSync5(dirname6(pluginPath), { recursive: true });
|
|
13917
|
-
writeConfigFileAtomic(pluginPath, buildOpenCodePluginShim(binaryPath, effectiveScope));
|
|
14009
|
+
writeConfigFileAtomic(pluginPath, buildOpenCodePluginShim(binaryPath, effectiveScope), { symlinks: "replace" });
|
|
13918
14010
|
if (!Array.isArray(s.plugin))
|
|
13919
14011
|
s.plugin = [];
|
|
13920
14012
|
const desired = effectiveScope === "user" ? `file://${pluginPath}` : OPENCODE_PLUGIN_REL_PATH;
|
|
@@ -27056,7 +27148,7 @@ var init_fp_reset = __esm(() => {
|
|
|
27056
27148
|
});
|
|
27057
27149
|
|
|
27058
27150
|
// src/hooks/semantic/jev-config.ts
|
|
27059
|
-
import { closeSync as closeSync3, constants as
|
|
27151
|
+
import { closeSync as closeSync3, constants as fsConstants3, fstatSync as fstatSync2, openSync as openSync3, readSync as readSync2, statSync as statSync19 } from "node:fs";
|
|
27060
27152
|
import { dirname as dirname13 } from "node:path";
|
|
27061
27153
|
function parseJevMode(raw) {
|
|
27062
27154
|
return raw === "off" || raw === "observe" || raw === "enforce" ? raw : null;
|
|
@@ -27531,7 +27623,7 @@ var init_jev_config = __esm(() => {
|
|
|
27531
27623
|
JEV_PROVIDER_KINDS = ["typesafe", "openrouter", "vercel", "cloudflare", "custom", "failproofai"];
|
|
27532
27624
|
JEV_CALIBRATED_FAMILY = { major: 1, minor: 13 };
|
|
27533
27625
|
MAX_CONFIG_BYTES = 64 * 1024;
|
|
27534
|
-
OPEN_FLAGS =
|
|
27626
|
+
OPEN_FLAGS = fsConstants3.O_RDONLY | (fsConstants3.O_NONBLOCK ?? 0);
|
|
27535
27627
|
VERSIONED_MODEL_RE = /^(?:(?:typesafe|typesafe-ai)\/)?jev-(\d{1,4})\.(\d{1,4})(?:\.(\d{1,6}))?(?:-(\d{8}))?$/;
|
|
27536
27628
|
CLOUDFLARE_ACCOUNT_ID_RE = /^[0-9a-f]{32}$/;
|
|
27537
27629
|
API_KEY_RE = /^[\x21-\x7e]{1,4096}$/;
|
|
@@ -32780,7 +32872,7 @@ var INTROSPECT_PATH = "/v1/auth/introspect", PERMISSION_EVENTS = "events:add", P
|
|
|
32780
32872
|
import {
|
|
32781
32873
|
chmodSync as chmodSync7,
|
|
32782
32874
|
closeSync as closeSync5,
|
|
32783
|
-
constants as
|
|
32875
|
+
constants as fsConstants4,
|
|
32784
32876
|
existsSync as existsSync34,
|
|
32785
32877
|
fstatSync as fstatSync3,
|
|
32786
32878
|
linkSync,
|
|
@@ -32973,7 +33065,7 @@ function fieldsOf(file) {
|
|
|
32973
33065
|
const none = { provider: null, off: false };
|
|
32974
33066
|
let fd;
|
|
32975
33067
|
try {
|
|
32976
|
-
fd = openSync5(file,
|
|
33068
|
+
fd = openSync5(file, fsConstants4.O_RDONLY | (fsConstants4.O_NONBLOCK ?? 0) | (fsConstants4.O_NOFOLLOW ?? 0));
|
|
32977
33069
|
} catch {
|
|
32978
33070
|
return none;
|
|
32979
33071
|
}
|
|
@@ -38946,7 +39038,7 @@ var init_jev_cli = __esm(() => {
|
|
|
38946
39038
|
import {
|
|
38947
39039
|
chmodSync as chmodSync10,
|
|
38948
39040
|
closeSync as closeSync8,
|
|
38949
|
-
constants as
|
|
39041
|
+
constants as fsConstants5,
|
|
38950
39042
|
existsSync as existsSync46,
|
|
38951
39043
|
fstatSync as fstatSync4,
|
|
38952
39044
|
mkdirSync as mkdirSync29,
|
|
@@ -39730,9 +39822,14 @@ async function refreshDaemonToCliVersion(deps = {}) {
|
|
|
39730
39822
|
const install = deps.install ?? installDaemonService2;
|
|
39731
39823
|
const prime = deps.prime ?? primeElevation2;
|
|
39732
39824
|
const interactive = deps.interactive ?? (() => Boolean(process.stdin.isTTY && process.stdout.isTTY));
|
|
39733
|
-
|
|
39825
|
+
const current = status();
|
|
39826
|
+
if (current === "not-installed") {
|
|
39734
39827
|
return { ok: true, lines: ["No failproofaid service on this machine; nothing to update."] };
|
|
39735
39828
|
}
|
|
39829
|
+
const recorded = readVersionFile()?.daemon;
|
|
39830
|
+
if (current === "running" && recorded === version2 && existsSync48(installedBinaryPath(version2))) {
|
|
39831
|
+
return { ok: true, lines: [`failproofaid ${version2} is already installed and running; nothing to update.`] };
|
|
39832
|
+
}
|
|
39736
39833
|
if (interactive())
|
|
39737
39834
|
prime();
|
|
39738
39835
|
const result = await install();
|
|
@@ -44213,7 +44310,7 @@ import {
|
|
|
44213
44310
|
existsSync as existsSync54,
|
|
44214
44311
|
lstatSync as lstatSync4,
|
|
44215
44312
|
mkdirSync as mkdirSync33,
|
|
44216
|
-
readlinkSync as
|
|
44313
|
+
readlinkSync as readlinkSync3,
|
|
44217
44314
|
realpathSync as realpathSync8,
|
|
44218
44315
|
renameSync as renameSync14,
|
|
44219
44316
|
rmSync as rmSync21,
|
|
@@ -44280,14 +44377,31 @@ function hermesPluginPathForSettings2(settingsPath) {
|
|
|
44280
44377
|
function hasAllHermesPluginFiles2(dir) {
|
|
44281
44378
|
return HERMES_PLUGIN_FILES2.every((file) => existsSync54(resolve39(dir, file)));
|
|
44282
44379
|
}
|
|
44283
|
-
function
|
|
44284
|
-
|
|
44285
|
-
|
|
44286
|
-
|
|
44380
|
+
function hermesLinkRecordPath2(pluginPath) {
|
|
44381
|
+
return resolve39(dirname30(pluginPath), HERMES_LINK_RECORD2);
|
|
44382
|
+
}
|
|
44383
|
+
function readHermesLinkRecord2(pluginPath) {
|
|
44384
|
+
try {
|
|
44385
|
+
const recorded = readFileSync41(hermesLinkRecordPath2(pluginPath), "utf8").trim();
|
|
44386
|
+
return recorded === "" ? null : resolve39(recorded);
|
|
44387
|
+
} catch {
|
|
44388
|
+
return null;
|
|
44389
|
+
}
|
|
44390
|
+
}
|
|
44391
|
+
function isOwnedHermesPluginLink2(pluginPath, target) {
|
|
44392
|
+
const recorded = readHermesLinkRecord2(pluginPath);
|
|
44393
|
+
if (recorded && resolve39(target) === recorded)
|
|
44394
|
+
return true;
|
|
44395
|
+
if (samePath2(target, getHermesPluginSourcePath2()))
|
|
44287
44396
|
return true;
|
|
44397
|
+
const pkgRoot = dirname30(resolve39(target));
|
|
44398
|
+
if (basename13(resolve39(target)) !== HERMES_PLUGIN_SOURCE_DIR2)
|
|
44399
|
+
return false;
|
|
44400
|
+
if (basename13(pkgRoot) !== "failproofai" || basename13(dirname30(pkgRoot)) !== "node_modules")
|
|
44401
|
+
return false;
|
|
44288
44402
|
try {
|
|
44289
|
-
const
|
|
44290
|
-
return
|
|
44403
|
+
const pkg = JSON.parse(readFileSync41(resolve39(pkgRoot, "package.json"), "utf8"));
|
|
44404
|
+
return pkg.name === "failproofai";
|
|
44291
44405
|
} catch {
|
|
44292
44406
|
return false;
|
|
44293
44407
|
}
|
|
@@ -44315,11 +44429,11 @@ function hermesPluginState2(settingsPath) {
|
|
|
44315
44429
|
if (isLink) {
|
|
44316
44430
|
let target;
|
|
44317
44431
|
try {
|
|
44318
|
-
target = resolve39(dirname30(pluginPath),
|
|
44432
|
+
target = resolve39(dirname30(pluginPath), readlinkSync3(pluginPath));
|
|
44319
44433
|
} catch {
|
|
44320
44434
|
return { kind: "foreign" };
|
|
44321
44435
|
}
|
|
44322
|
-
if (!
|
|
44436
|
+
if (!isOwnedHermesPluginLink2(pluginPath, target))
|
|
44323
44437
|
return { kind: "foreign" };
|
|
44324
44438
|
return {
|
|
44325
44439
|
kind: "link",
|
|
@@ -44335,16 +44449,22 @@ function hermesPluginState2(settingsPath) {
|
|
|
44335
44449
|
}
|
|
44336
44450
|
function hermesConfigState2(settingsPath) {
|
|
44337
44451
|
if (!existsSync54(settingsPath)) {
|
|
44338
|
-
return { pluginEnabled: false, legacyShellHookPresent: false };
|
|
44452
|
+
return { pluginEnabled: false, pluginListed: false, pluginDisabled: false, legacyShellHookPresent: false };
|
|
44339
44453
|
}
|
|
44340
44454
|
const doc = inspectYamlDoc2(settingsPath);
|
|
44341
|
-
if (!doc)
|
|
44342
|
-
return { pluginEnabled: false, legacyShellHookPresent: false, unreadable: true };
|
|
44455
|
+
if (!doc) {
|
|
44456
|
+
return { pluginEnabled: false, pluginListed: false, pluginDisabled: false, legacyShellHookPresent: false, unreadable: true };
|
|
44457
|
+
}
|
|
44343
44458
|
const js = doc.toJS() ?? {};
|
|
44344
44459
|
const enabled = js.plugins?.enabled;
|
|
44460
|
+
const disabled = js.plugins?.disabled;
|
|
44345
44461
|
const legacyShellHookPresent = !!js.hooks && typeof js.hooks === "object" && Object.values(js.hooks).some((entries) => Array.isArray(entries) && entries.some((entry) => isMarkedHook2(entry)));
|
|
44462
|
+
const pluginListed = Array.isArray(enabled) && enabled.includes(HERMES_PLUGIN_ID2);
|
|
44463
|
+
const pluginDisabled = Array.isArray(disabled) && disabled.includes(HERMES_PLUGIN_ID2);
|
|
44346
44464
|
return {
|
|
44347
|
-
pluginEnabled:
|
|
44465
|
+
pluginEnabled: pluginListed && !pluginDisabled,
|
|
44466
|
+
pluginListed,
|
|
44467
|
+
pluginDisabled,
|
|
44348
44468
|
legacyShellHookPresent
|
|
44349
44469
|
};
|
|
44350
44470
|
}
|
|
@@ -44362,9 +44482,11 @@ function hermesProfileHealth() {
|
|
|
44362
44482
|
pluginInstalled,
|
|
44363
44483
|
pluginMode: plugin.kind === "link" || plugin.kind === "copy" ? plugin.kind : null,
|
|
44364
44484
|
pluginEnabled: config.pluginEnabled,
|
|
44485
|
+
pluginDisabled: config.pluginDisabled,
|
|
44365
44486
|
legacyShellHookPresent: config.legacyShellHookPresent,
|
|
44366
44487
|
cronUnchecked: config.legacyShellHookPresent && !pluginWorks,
|
|
44367
44488
|
configUnreadable: config.unreadable === true,
|
|
44489
|
+
pluginForeign: plugin.kind === "foreign",
|
|
44368
44490
|
healthy: pluginWorks && !config.legacyShellHookPresent && config.unreadable !== true
|
|
44369
44491
|
};
|
|
44370
44492
|
});
|
|
@@ -44372,6 +44494,12 @@ function hermesProfileHealth() {
|
|
|
44372
44494
|
function hermesProfileStatusRows() {
|
|
44373
44495
|
return hermesProfileHealth().filter((profile) => existsSync54(profile.home)).map((profile) => {
|
|
44374
44496
|
const label = "hermes/" + profile.name;
|
|
44497
|
+
if (profile.pluginForeign) {
|
|
44498
|
+
return [
|
|
44499
|
+
label,
|
|
44500
|
+
`UNHEALTHY — another plugin occupies ${resolve39(profile.home, "plugins", "failproofai")}; failproofai will not replace it. Move it aside, then run update`
|
|
44501
|
+
];
|
|
44502
|
+
}
|
|
44375
44503
|
if (profile.configUnreadable) {
|
|
44376
44504
|
return [label, `UNHEALTHY — ${profile.settingsPath} does not parse; failproofai leaves it untouched until it is fixed`];
|
|
44377
44505
|
}
|
|
@@ -44384,7 +44512,9 @@ function hermesProfileStatusRows() {
|
|
|
44384
44512
|
const problems = [];
|
|
44385
44513
|
if (!profile.pluginInstalled)
|
|
44386
44514
|
problems.push("plugin files missing or incomplete");
|
|
44387
|
-
if (
|
|
44515
|
+
if (profile.pluginDisabled)
|
|
44516
|
+
problems.push("plugin disabled (listed in plugins.disabled)");
|
|
44517
|
+
else if (!profile.pluginEnabled)
|
|
44388
44518
|
problems.push("plugin not enabled");
|
|
44389
44519
|
if (profile.legacyShellHookPresent)
|
|
44390
44520
|
problems.push("legacy shell hook also present");
|
|
@@ -44396,7 +44526,7 @@ function hermesProfileStatusRows() {
|
|
|
44396
44526
|
];
|
|
44397
44527
|
});
|
|
44398
44528
|
}
|
|
44399
|
-
var UnreadableAgentConfigError2, HERMES_PLUGIN_ID2 = "failproofai", HERMES_PLUGIN_MARKER2 = ".failproofai-managed", HERMES_PLUGIN_FILES2, HERMES_PLUGIN_SOURCE_DIR2 = "hermes-plugin", ANTIGRAVITY_TOOL_EVENTS2;
|
|
44529
|
+
var UnreadableAgentConfigError2, HERMES_PLUGIN_ID2 = "failproofai", HERMES_PLUGIN_MARKER2 = ".failproofai-managed", HERMES_PLUGIN_FILES2, HERMES_PLUGIN_SOURCE_DIR2 = "hermes-plugin", HERMES_LINK_RECORD2 = ".failproofai-link", ANTIGRAVITY_TOOL_EVENTS2;
|
|
44400
44530
|
var init_integrations2 = __esm(() => {
|
|
44401
44531
|
init_dist();
|
|
44402
44532
|
init_safe_config_write();
|
|
@@ -44544,7 +44674,7 @@ import { realpathSync as realpathSync10 } from "fs";
|
|
|
44544
44674
|
import { dirname as dirname32, resolve as resolve41 } from "path";
|
|
44545
44675
|
import { fileURLToPath as fileURLToPath5 } from "url";
|
|
44546
44676
|
// package.json
|
|
44547
|
-
var version = "1.0.9
|
|
44677
|
+
var version = "1.0.9";
|
|
44548
44678
|
|
|
44549
44679
|
// bin/failproofai.mjs
|
|
44550
44680
|
if (!process.env.FAILPROOFAI_PACKAGE_ROOT) {
|