failproofai 1.0.9-beta.2 → 1.0.10-beta.1
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/src_hooks_1eem5a7._.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]__1ox4w55._.js → [root-of-the-server]__0a2-9ht._.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]__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/{_0n6zrjv._.js → _0krq5f0._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/_1gb0ifp._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_1pa3k5k._.js → _1n-mym7._.js} +1 -1
- 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/0s4cko_weh6pi.js +1 -0
- package/.next/standalone/.next/static/chunks/0yclxmfppc_8e.js +1 -0
- package/.next/standalone/.next/static/chunks/{30z-240_lrczt.js → 1-k37ijadiv9h.js} +1 -1
- package/.next/standalone/.next/static/chunks/{28cmd5molgwa3.js → 18reoqya39rov.js} +1 -1
- package/.next/standalone/.next/static/chunks/{2b59i-n9l-4of.js → 2cvvec76j9bwq.js} +1 -1
- package/.next/standalone/.next/static/chunks/2o9-3ff26v4yd.js +1 -0
- package/.next/standalone/.next/static/chunks/3q8vesnwk_r0i.js +1 -0
- package/.next/standalone/.next/static/chunks/3tj1zi4xv-bll.js +1 -0
- package/.next/standalone/.next/static/chunks/3vk6jdkxvb7yk.js +6 -0
- package/.next/standalone/.next/static/chunks/{1srecm9k-z_i1.js → 3z7mx6me_j7d3.js} +1 -1
- package/.next/standalone/.next/static/chunks/{2hg_bp8z_vm2g.js → 3ztf2h_fv6_t9.js} +1 -1
- package/.next/standalone/fp-cloud-cli/fp_cli/app.py +4 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/auth.py +29 -4
- package/.next/standalone/fp-cloud-cli/fp_cli/client.py +57 -14
- package/.next/standalone/fp-cloud-cli/fp_cli/errors.py +17 -3
- package/.next/standalone/fp-cloud-cli/tests/test_request_id.py +111 -0
- package/.next/standalone/fp-cloud-cli/uv.lock +3 -3
- package/.next/standalone/hermes-plugin/README.md +83 -10
- package/.next/standalone/hermes-plugin/__init__.py +762 -28
- package/.next/standalone/hermes-plugin/client.py +4 -2
- package/.next/standalone/hermes-plugin/ledger.py +9 -3
- package/.next/standalone/hermes-plugin/plugin.yaml +2 -2
- package/.next/standalone/package.json +10 -10
- package/.next/standalone/sdk/python/failproofai_sdk/evaluator/__init__.py +8 -1
- package/.next/standalone/sdk/python/failproofai_sdk/evaluator/client.py +82 -7
- package/.next/standalone/sdk/python/failproofai_sdk/evaluator/runtime.py +23 -4
- package/.next/standalone/sdk/python/tests/test_evaluator_request_id.py +197 -0
- package/.next/standalone/sdk/python/uv.lock +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 +235 -117
- package/dist/worker.mjs +5 -2
- package/hermes-plugin/README.md +83 -10
- package/hermes-plugin/__init__.py +762 -28
- package/hermes-plugin/client.py +4 -2
- package/hermes-plugin/ledger.py +9 -3
- package/hermes-plugin/plugin.yaml +2 -2
- package/package.json +10 -10
- package/src/hooks/daemon-service.ts +14 -1
- package/src/hooks/integrations.ts +108 -26
- package/src/hooks/safe-config-write.ts +80 -7
- package/src/hooks/types.ts +7 -0
- package/.next/standalone/.next/static/chunks/0h--izcpk__m9.js +0 -1
- package/.next/standalone/.next/static/chunks/2k5vhij_w1g82.js +0 -1
- package/.next/standalone/.next/static/chunks/2o1fy-waqn1he.js +0 -6
- package/.next/standalone/.next/static/chunks/38gpf5tb_rd0m.js +0 -1
- package/.next/standalone/.next/static/chunks/3nyf50dub1vuk.js +0 -1
- package/.next/standalone/.next/static/chunks/42-l25bbfo0ec.js +0 -1
- /package/.next/standalone/.next/static/{D1BjwOkHNPetPo47DhV4_ → OJTzlkhxVSWnwhlF2Q7m3}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{D1BjwOkHNPetPo47DhV4_ → OJTzlkhxVSWnwhlF2Q7m3}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{D1BjwOkHNPetPo47DhV4_ → OJTzlkhxVSWnwhlF2Q7m3}/_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.
|
|
32
|
+
var version2 = "1.0.10-beta.1", package_default;
|
|
33
33
|
var init_package = __esm(() => {
|
|
34
34
|
package_default = {
|
|
35
35
|
name: "failproofai",
|
|
@@ -150,21 +150,21 @@ var init_package = __esm(() => {
|
|
|
150
150
|
"eslint-plugin-react-hooks": "7.0.1",
|
|
151
151
|
vite: "8.0.16",
|
|
152
152
|
undici: "7.29.1",
|
|
153
|
-
"brace-expansion": "5.0.
|
|
153
|
+
"brace-expansion": "5.0.12",
|
|
154
154
|
sharp: "0.35.4",
|
|
155
155
|
browserslist: "4.28.8"
|
|
156
156
|
},
|
|
157
157
|
optionalDependencies: {
|
|
158
|
-
"@failproofai/failproofaid-linux-x64": "1.0.
|
|
159
|
-
"@failproofai/failproofaid-linux-arm64": "1.0.
|
|
160
|
-
"@failproofai/failproofaid-darwin-x64": "1.0.
|
|
161
|
-
"@failproofai/failproofaid-darwin-arm64": "1.0.
|
|
158
|
+
"@failproofai/failproofaid-linux-x64": "1.0.10-beta.1",
|
|
159
|
+
"@failproofai/failproofaid-linux-arm64": "1.0.10-beta.1",
|
|
160
|
+
"@failproofai/failproofaid-darwin-x64": "1.0.10-beta.1",
|
|
161
|
+
"@failproofai/failproofaid-darwin-arm64": "1.0.10-beta.1"
|
|
162
162
|
},
|
|
163
163
|
failproofaidBinaries: {
|
|
164
|
-
"linux-x64": "
|
|
165
|
-
"linux-arm64": "
|
|
166
|
-
"darwin-x64": "
|
|
167
|
-
"darwin-arm64": "
|
|
164
|
+
"linux-x64": "868a4978a66e4407b86dac8d6c8af4ad0b2b355da56983fa5530f5d8b5024098",
|
|
165
|
+
"linux-arm64": "8a4603784e43552ed8cf5ed7a1552721c7216be4fb106ed6851daabd18e19ebe",
|
|
166
|
+
"darwin-x64": "b6a59948ad12c06cedc90ebca95492a357430a2a150b76ceaf98930f8b1279c2",
|
|
167
|
+
"darwin-arm64": "8c14361f7274973bb2cf99135ddb4a5a9cdc8b453a33e653156ba6b68354c417"
|
|
168
168
|
}
|
|
169
169
|
};
|
|
170
170
|
});
|
|
@@ -1279,7 +1279,10 @@ var init_types = __esm(() => {
|
|
|
1279
1279
|
web_search: "WebSearch",
|
|
1280
1280
|
web_extract: "WebFetch",
|
|
1281
1281
|
search_files: "Grep",
|
|
1282
|
-
todo: "TodoWrite"
|
|
1282
|
+
todo: "TodoWrite",
|
|
1283
|
+
todo_list: "TodoWrite",
|
|
1284
|
+
process_manage: "process",
|
|
1285
|
+
cronjob_manage: "cronjob"
|
|
1283
1286
|
};
|
|
1284
1287
|
HERMES_TOOL_INPUT_MAP = {
|
|
1285
1288
|
Read: { path: "file_path" },
|
|
@@ -12496,12 +12499,14 @@ var init_dist = __esm(() => {
|
|
|
12496
12499
|
import {
|
|
12497
12500
|
chmodSync as chmodSync2,
|
|
12498
12501
|
closeSync as closeSync2,
|
|
12502
|
+
constants as fsConstants2,
|
|
12499
12503
|
copyFileSync,
|
|
12500
12504
|
existsSync as existsSync7,
|
|
12501
12505
|
fsyncSync,
|
|
12502
12506
|
lstatSync,
|
|
12503
12507
|
mkdirSync as mkdirSync4,
|
|
12504
12508
|
openSync as openSync2,
|
|
12509
|
+
readlinkSync,
|
|
12505
12510
|
realpathSync as realpathSync2,
|
|
12506
12511
|
renameSync as renameSync2,
|
|
12507
12512
|
rmSync as rmSync2,
|
|
@@ -12511,19 +12516,50 @@ import {
|
|
|
12511
12516
|
import { randomBytes } from "node:crypto";
|
|
12512
12517
|
import { basename, dirname as dirname3, join as join3 } from "node:path";
|
|
12513
12518
|
function resolveWriteTarget(path) {
|
|
12519
|
+
let isLink = false;
|
|
12514
12520
|
try {
|
|
12515
|
-
|
|
12516
|
-
|
|
12517
|
-
|
|
12518
|
-
|
|
12521
|
+
isLink = lstatSync(path).isSymbolicLink();
|
|
12522
|
+
} catch {
|
|
12523
|
+
return path;
|
|
12524
|
+
}
|
|
12525
|
+
if (!isLink)
|
|
12526
|
+
return path;
|
|
12527
|
+
try {
|
|
12528
|
+
return realpathSync2(path);
|
|
12529
|
+
} catch {
|
|
12530
|
+
let target = "(unreadable link)";
|
|
12531
|
+
try {
|
|
12532
|
+
target = readlinkSync(path);
|
|
12533
|
+
} catch {}
|
|
12534
|
+
throw new DanglingConfigSymlinkError(path, target);
|
|
12535
|
+
}
|
|
12536
|
+
}
|
|
12537
|
+
function isSymlink(path) {
|
|
12538
|
+
try {
|
|
12539
|
+
return lstatSync(path).isSymbolicLink();
|
|
12540
|
+
} catch {
|
|
12541
|
+
return false;
|
|
12542
|
+
}
|
|
12543
|
+
}
|
|
12544
|
+
function writeBackup(target, dir) {
|
|
12545
|
+
const backup = `${target}.failproofai-backup`;
|
|
12546
|
+
const temporary = join3(dir, `.${basename(target)}.failproofai-backup-${process.pid}-${randomBytes(4).toString("hex")}.tmp`);
|
|
12547
|
+
try {
|
|
12548
|
+
copyFileSync(target, temporary, fsConstants2.COPYFILE_EXCL);
|
|
12549
|
+
renameSync2(temporary, backup);
|
|
12550
|
+
} catch (err) {
|
|
12551
|
+
rmSync2(temporary, { force: true });
|
|
12552
|
+
throw err;
|
|
12553
|
+
}
|
|
12519
12554
|
}
|
|
12520
12555
|
function writeConfigFileAtomic(path, content, deps = {}) {
|
|
12521
|
-
const
|
|
12556
|
+
const replacingLink = deps.symlinks === "replace" && isSymlink(path);
|
|
12557
|
+
const target = deps.symlinks === "replace" ? path : resolveWriteTarget(path);
|
|
12522
12558
|
const dir = dirname3(target);
|
|
12523
12559
|
mkdirSync4(dir, { recursive: true });
|
|
12524
12560
|
let mode;
|
|
12525
12561
|
try {
|
|
12526
|
-
mode = statSync5(target).mode & 511;
|
|
12562
|
+
mode = replacingLink ? undefined : statSync5(target).mode & 511;
|
|
12527
12563
|
} catch {
|
|
12528
12564
|
mode = undefined;
|
|
12529
12565
|
}
|
|
@@ -12540,8 +12576,8 @@ function writeConfigFileAtomic(path, content, deps = {}) {
|
|
|
12540
12576
|
fd = undefined;
|
|
12541
12577
|
if (mode !== undefined)
|
|
12542
12578
|
chmodSync2(temporary, mode);
|
|
12543
|
-
if (existsSync7(target))
|
|
12544
|
-
|
|
12579
|
+
if (deps.backup !== false && !replacingLink && existsSync7(target))
|
|
12580
|
+
writeBackup(target, dir);
|
|
12545
12581
|
(deps.rename ?? renameSync2)(temporary, target);
|
|
12546
12582
|
} catch (err) {
|
|
12547
12583
|
if (fd !== undefined) {
|
|
@@ -12561,7 +12597,19 @@ function writeConfigFileAtomic(path, content, deps = {}) {
|
|
|
12561
12597
|
}
|
|
12562
12598
|
} catch {}
|
|
12563
12599
|
}
|
|
12564
|
-
var
|
|
12600
|
+
var DanglingConfigSymlinkError;
|
|
12601
|
+
var init_safe_config_write = __esm(() => {
|
|
12602
|
+
DanglingConfigSymlinkError = class DanglingConfigSymlinkError extends Error {
|
|
12603
|
+
path;
|
|
12604
|
+
target;
|
|
12605
|
+
constructor(path, target) {
|
|
12606
|
+
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.`);
|
|
12607
|
+
this.path = path;
|
|
12608
|
+
this.target = target;
|
|
12609
|
+
this.name = "DanglingConfigSymlinkError";
|
|
12610
|
+
}
|
|
12611
|
+
};
|
|
12612
|
+
});
|
|
12565
12613
|
|
|
12566
12614
|
// lib/hermes-profiles.ts
|
|
12567
12615
|
import { existsSync as existsSync8, readdirSync } from "node:fs";
|
|
@@ -12704,7 +12752,7 @@ import {
|
|
|
12704
12752
|
existsSync as existsSync10,
|
|
12705
12753
|
lstatSync as lstatSync2,
|
|
12706
12754
|
mkdirSync as mkdirSync5,
|
|
12707
|
-
readlinkSync,
|
|
12755
|
+
readlinkSync as readlinkSync2,
|
|
12708
12756
|
realpathSync as realpathSync3,
|
|
12709
12757
|
renameSync as renameSync3,
|
|
12710
12758
|
rmSync as rmSync3,
|
|
@@ -13076,14 +13124,38 @@ function pathPresent(path) {
|
|
|
13076
13124
|
function hasAllHermesPluginFiles(dir) {
|
|
13077
13125
|
return HERMES_PLUGIN_FILES.every((file) => existsSync10(resolve8(dir, file)));
|
|
13078
13126
|
}
|
|
13079
|
-
function
|
|
13080
|
-
|
|
13081
|
-
|
|
13082
|
-
|
|
13127
|
+
function hermesLinkRecordPath(pluginPath) {
|
|
13128
|
+
return resolve8(dirname6(pluginPath), HERMES_LINK_RECORD);
|
|
13129
|
+
}
|
|
13130
|
+
function readHermesLinkRecord(pluginPath) {
|
|
13131
|
+
try {
|
|
13132
|
+
const recorded = readFileSync5(hermesLinkRecordPath(pluginPath), "utf8").trim();
|
|
13133
|
+
return recorded === "" ? null : resolve8(recorded);
|
|
13134
|
+
} catch {
|
|
13135
|
+
return null;
|
|
13136
|
+
}
|
|
13137
|
+
}
|
|
13138
|
+
function writeHermesLinkRecord(pluginPath, target) {
|
|
13139
|
+
writeConfigFileAtomic(hermesLinkRecordPath(pluginPath), resolve8(target) + `
|
|
13140
|
+
`, { backup: false, symlinks: "replace" });
|
|
13141
|
+
}
|
|
13142
|
+
function removeHermesLinkRecord(pluginPath) {
|
|
13143
|
+
rmSync3(hermesLinkRecordPath(pluginPath), { force: true });
|
|
13144
|
+
}
|
|
13145
|
+
function isOwnedHermesPluginLink(pluginPath, target) {
|
|
13146
|
+
const recorded = readHermesLinkRecord(pluginPath);
|
|
13147
|
+
if (recorded && resolve8(target) === recorded)
|
|
13083
13148
|
return true;
|
|
13149
|
+
if (samePath(target, getHermesPluginSourcePath()))
|
|
13150
|
+
return true;
|
|
13151
|
+
const pkgRoot = dirname6(resolve8(target));
|
|
13152
|
+
if (basename4(resolve8(target)) !== HERMES_PLUGIN_SOURCE_DIR)
|
|
13153
|
+
return false;
|
|
13154
|
+
if (basename4(pkgRoot) !== "failproofai" || basename4(dirname6(pkgRoot)) !== "node_modules")
|
|
13155
|
+
return false;
|
|
13084
13156
|
try {
|
|
13085
|
-
const
|
|
13086
|
-
return
|
|
13157
|
+
const pkg = JSON.parse(readFileSync5(resolve8(pkgRoot, "package.json"), "utf8"));
|
|
13158
|
+
return pkg.name === "failproofai";
|
|
13087
13159
|
} catch {
|
|
13088
13160
|
return false;
|
|
13089
13161
|
}
|
|
@@ -13111,11 +13183,11 @@ function hermesPluginState(settingsPath) {
|
|
|
13111
13183
|
if (isLink) {
|
|
13112
13184
|
let target;
|
|
13113
13185
|
try {
|
|
13114
|
-
target = resolve8(dirname6(pluginPath),
|
|
13186
|
+
target = resolve8(dirname6(pluginPath), readlinkSync2(pluginPath));
|
|
13115
13187
|
} catch {
|
|
13116
13188
|
return { kind: "foreign" };
|
|
13117
13189
|
}
|
|
13118
|
-
if (!
|
|
13190
|
+
if (!isOwnedHermesPluginLink(pluginPath, target))
|
|
13119
13191
|
return { kind: "foreign" };
|
|
13120
13192
|
return {
|
|
13121
13193
|
kind: "link",
|
|
@@ -13148,8 +13220,14 @@ function installHermesPlugin(settingsPath, deps = {}) {
|
|
|
13148
13220
|
if (existing.kind === "foreign") {
|
|
13149
13221
|
throw new Error(`Refusing to overwrite an unmanaged Hermes plugin at ${destination}. ` + `Move it aside or install FailproofAI under a different Hermes profile.`);
|
|
13150
13222
|
}
|
|
13151
|
-
if (existing.kind === "link" && existing.current)
|
|
13223
|
+
if (existing.kind === "link" && existing.current) {
|
|
13224
|
+
if (readHermesLinkRecord(destination) !== resolve8(existing.target)) {
|
|
13225
|
+
try {
|
|
13226
|
+
writeHermesLinkRecord(destination, existing.target);
|
|
13227
|
+
} catch {}
|
|
13228
|
+
}
|
|
13152
13229
|
return "unchanged";
|
|
13230
|
+
}
|
|
13153
13231
|
mkdirSync5(dirname6(destination), { recursive: true });
|
|
13154
13232
|
const suffix = `${process.pid}-${Date.now()}`;
|
|
13155
13233
|
const temporary = `${destination}.install-${suffix}`;
|
|
@@ -13175,6 +13253,7 @@ function installHermesPlugin(settingsPath, deps = {}) {
|
|
|
13175
13253
|
if (linked && (existing.kind === "absent" || existing.kind === "link")) {
|
|
13176
13254
|
try {
|
|
13177
13255
|
renameSync3(temporary, destination);
|
|
13256
|
+
writeHermesLinkRecord(destination, source);
|
|
13178
13257
|
return "linked";
|
|
13179
13258
|
} catch (err) {
|
|
13180
13259
|
if (existing.kind !== "link") {
|
|
@@ -13193,6 +13272,10 @@ function installHermesPlugin(settingsPath, deps = {}) {
|
|
|
13193
13272
|
renameSync3(temporary, destination);
|
|
13194
13273
|
if (movedExisting)
|
|
13195
13274
|
rmSync3(backup, { recursive: true, force: true });
|
|
13275
|
+
if (linked)
|
|
13276
|
+
writeHermesLinkRecord(destination, source);
|
|
13277
|
+
else
|
|
13278
|
+
removeHermesLinkRecord(destination);
|
|
13196
13279
|
} catch (err) {
|
|
13197
13280
|
rmSync3(temporary, { recursive: true, force: true });
|
|
13198
13281
|
if (movedExisting && !pathPresent(destination) && pathPresent(backup)) {
|
|
@@ -13207,6 +13290,7 @@ function removeManagedHermesPlugin(settingsPath) {
|
|
|
13207
13290
|
const state = hermesPluginState(settingsPath);
|
|
13208
13291
|
if (state.kind === "link") {
|
|
13209
13292
|
unlinkSync(pluginPath);
|
|
13293
|
+
removeHermesLinkRecord(pluginPath);
|
|
13210
13294
|
return true;
|
|
13211
13295
|
}
|
|
13212
13296
|
if (state.kind !== "copy")
|
|
@@ -13281,85 +13365,90 @@ async function migrateHermesProfiles(opts) {
|
|
|
13281
13365
|
const results = [];
|
|
13282
13366
|
let daemonOk;
|
|
13283
13367
|
for (const profile of listHermesProfiles()) {
|
|
13284
|
-
|
|
13285
|
-
|
|
13286
|
-
|
|
13287
|
-
|
|
13288
|
-
|
|
13289
|
-
|
|
13290
|
-
|
|
13291
|
-
|
|
13292
|
-
|
|
13293
|
-
|
|
13294
|
-
|
|
13295
|
-
|
|
13296
|
-
|
|
13297
|
-
|
|
13298
|
-
|
|
13368
|
+
try {
|
|
13369
|
+
if (!existsSync10(profile.home))
|
|
13370
|
+
continue;
|
|
13371
|
+
const settingsPath = resolve8(profile.home, "config.yaml");
|
|
13372
|
+
const pluginPath = hermesPluginPathForSettings(settingsPath);
|
|
13373
|
+
const config = hermesConfigState(settingsPath);
|
|
13374
|
+
const plugin = hermesPluginState(settingsPath);
|
|
13375
|
+
const ours = plugin.kind === "link" || plugin.kind === "copy";
|
|
13376
|
+
const base = { name: profile.name, home: profile.home };
|
|
13377
|
+
const legacy = config.legacyShellHookPresent;
|
|
13378
|
+
if (config.unreadable) {
|
|
13379
|
+
let raw = "";
|
|
13380
|
+
try {
|
|
13381
|
+
raw = readFileSync5(settingsPath, "utf8");
|
|
13382
|
+
} catch {
|
|
13383
|
+
raw = "";
|
|
13384
|
+
}
|
|
13385
|
+
const mentionsUs = ours || raw.includes(FAILPROOFAI_HOOK_MARKER) || /failproofai/.test(raw);
|
|
13386
|
+
results.push(mentionsUs ? {
|
|
13387
|
+
...base,
|
|
13388
|
+
status: "failed",
|
|
13389
|
+
detail: `${settingsPath} does not parse as YAML; left untouched`,
|
|
13390
|
+
legacyShellHooksRemain: /--hook\s+\S+\s+--cli\s+hermes|__failproofai_hook__/.test(raw)
|
|
13391
|
+
} : { ...base, status: "untouched", detail: "no failproofai integration", legacyShellHooksRemain: false });
|
|
13392
|
+
continue;
|
|
13299
13393
|
}
|
|
13300
|
-
|
|
13301
|
-
|
|
13302
|
-
|
|
13303
|
-
|
|
13304
|
-
|
|
13305
|
-
|
|
13306
|
-
|
|
13307
|
-
|
|
13308
|
-
|
|
13309
|
-
|
|
13310
|
-
|
|
13311
|
-
|
|
13312
|
-
|
|
13313
|
-
|
|
13314
|
-
results.push({ ...base, status: "current", detail: "already linked", legacyShellHooksRemain: false });
|
|
13315
|
-
continue;
|
|
13316
|
-
}
|
|
13317
|
-
if (plugin.kind === "foreign") {
|
|
13318
|
-
results.push({
|
|
13319
|
-
...base,
|
|
13320
|
-
status: "failed",
|
|
13321
|
-
detail: `an unmanaged plugin occupies ${pluginPath}` + (legacy ? "; shell hooks left in place (cron jobs are not checked)" : ""),
|
|
13322
|
-
legacyShellHooksRemain: legacy
|
|
13323
|
-
});
|
|
13324
|
-
continue;
|
|
13325
|
-
}
|
|
13326
|
-
if (existsSync10(settingsPath)) {
|
|
13327
|
-
const errors = $parseDocument(readFileSync5(settingsPath, "utf8")).errors;
|
|
13328
|
-
if (errors.length > 0) {
|
|
13394
|
+
if (!legacy && !ours && !config.pluginListed && !config.pluginDisabled) {
|
|
13395
|
+
results.push({ ...base, status: "untouched", detail: "no failproofai integration", legacyShellHooksRemain: false });
|
|
13396
|
+
continue;
|
|
13397
|
+
}
|
|
13398
|
+
if (plugin.kind === "link" && plugin.current && plugin.complete && config.pluginEnabled && !legacy) {
|
|
13399
|
+
if (readHermesLinkRecord(pluginPath) !== resolve8(plugin.target)) {
|
|
13400
|
+
try {
|
|
13401
|
+
writeHermesLinkRecord(pluginPath, plugin.target);
|
|
13402
|
+
} catch {}
|
|
13403
|
+
}
|
|
13404
|
+
results.push({ ...base, status: "current", detail: "already linked", legacyShellHooksRemain: false });
|
|
13405
|
+
continue;
|
|
13406
|
+
}
|
|
13407
|
+
if (plugin.kind === "foreign") {
|
|
13329
13408
|
results.push({
|
|
13330
13409
|
...base,
|
|
13331
13410
|
status: "failed",
|
|
13332
|
-
detail:
|
|
13411
|
+
detail: `an unmanaged plugin occupies ${pluginPath}` + (legacy ? "; shell hooks left in place (cron jobs are not checked)" : ""),
|
|
13333
13412
|
legacyShellHooksRemain: legacy
|
|
13334
13413
|
});
|
|
13335
13414
|
continue;
|
|
13336
13415
|
}
|
|
13337
|
-
|
|
13338
|
-
|
|
13339
|
-
|
|
13340
|
-
|
|
13341
|
-
|
|
13342
|
-
|
|
13343
|
-
|
|
13344
|
-
|
|
13345
|
-
|
|
13346
|
-
|
|
13347
|
-
|
|
13348
|
-
|
|
13349
|
-
|
|
13350
|
-
|
|
13351
|
-
|
|
13352
|
-
|
|
13353
|
-
|
|
13354
|
-
|
|
13355
|
-
|
|
13356
|
-
|
|
13416
|
+
if (daemonOk === undefined)
|
|
13417
|
+
daemonOk = await opts.daemonSupportsPolicyEvaluation();
|
|
13418
|
+
if (!daemonOk) {
|
|
13419
|
+
results.push({
|
|
13420
|
+
...base,
|
|
13421
|
+
status: "blocked",
|
|
13422
|
+
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",
|
|
13423
|
+
legacyShellHooksRemain: legacy
|
|
13424
|
+
});
|
|
13425
|
+
continue;
|
|
13426
|
+
}
|
|
13427
|
+
try {
|
|
13428
|
+
const mode = installHermesPlugin(settingsPath, opts.installDeps);
|
|
13429
|
+
const doc = readYamlDoc(settingsPath);
|
|
13430
|
+
enableHermesPluginInDoc(doc);
|
|
13431
|
+
writeYamlDoc(settingsPath, doc);
|
|
13432
|
+
const reenabledOnly = !legacy && plugin.kind === "link" && plugin.current && mode === "unchanged";
|
|
13433
|
+
const from = legacy ? "shell hooks" : plugin.kind === "copy" ? "copied plugin" : plugin.kind === "link" ? "old plugin link" : "enabled but missing plugin";
|
|
13434
|
+
const to = mode === "copied" ? "plugin copy (symlink not possible here)" : "linked plugin";
|
|
13435
|
+
const detail = reenabledOnly ? config.pluginDisabled ? "plugin re-enabled (was listed in plugins.disabled)" : "plugin enabled in config.yaml" : `${from} → ${to}`;
|
|
13436
|
+
results.push({ ...base, status: "migrated", detail, legacyShellHooksRemain: false });
|
|
13437
|
+
} catch (err) {
|
|
13438
|
+
results.push({
|
|
13439
|
+
...base,
|
|
13440
|
+
status: "failed",
|
|
13441
|
+
detail: err instanceof Error ? err.message : String(err),
|
|
13442
|
+
legacyShellHooksRemain: hermesConfigState(settingsPath).legacyShellHookPresent
|
|
13443
|
+
});
|
|
13444
|
+
}
|
|
13357
13445
|
} catch (err) {
|
|
13358
13446
|
results.push({
|
|
13359
|
-
|
|
13447
|
+
name: profile.name,
|
|
13448
|
+
home: profile.home,
|
|
13360
13449
|
status: "failed",
|
|
13361
|
-
detail: err instanceof Error ? err.message : String(err)
|
|
13362
|
-
legacyShellHooksRemain:
|
|
13450
|
+
detail: `could not inspect this profile (${err instanceof Error ? err.message : String(err)}); left untouched`,
|
|
13451
|
+
legacyShellHooksRemain: false
|
|
13363
13452
|
});
|
|
13364
13453
|
}
|
|
13365
13454
|
}
|
|
@@ -13402,7 +13491,7 @@ function listInstallableIds() {
|
|
|
13402
13491
|
function detectInstalledClis() {
|
|
13403
13492
|
return INTEGRATION_TYPES.filter((id) => INTEGRATIONS[id]?.detectInstalled());
|
|
13404
13493
|
}
|
|
13405
|
-
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;
|
|
13494
|
+
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;
|
|
13406
13495
|
var init_integrations = __esm(() => {
|
|
13407
13496
|
init_dist();
|
|
13408
13497
|
init_safe_config_write();
|
|
@@ -13920,7 +14009,7 @@ var init_integrations = __esm(() => {
|
|
|
13920
14009
|
const settingsPath = effectiveScope === "user" ? resolve8(homedir6(), ".config", "opencode", "opencode.json") : resolve8(process.cwd(), ".opencode", "opencode.json");
|
|
13921
14010
|
const pluginPath = opencodePluginFilePath(settingsPath);
|
|
13922
14011
|
mkdirSync5(dirname6(pluginPath), { recursive: true });
|
|
13923
|
-
writeConfigFileAtomic(pluginPath, buildOpenCodePluginShim(binaryPath, effectiveScope));
|
|
14012
|
+
writeConfigFileAtomic(pluginPath, buildOpenCodePluginShim(binaryPath, effectiveScope), { symlinks: "replace" });
|
|
13924
14013
|
if (!Array.isArray(s.plugin))
|
|
13925
14014
|
s.plugin = [];
|
|
13926
14015
|
const desired = effectiveScope === "user" ? `file://${pluginPath}` : OPENCODE_PLUGIN_REL_PATH;
|
|
@@ -27062,7 +27151,7 @@ var init_fp_reset = __esm(() => {
|
|
|
27062
27151
|
});
|
|
27063
27152
|
|
|
27064
27153
|
// src/hooks/semantic/jev-config.ts
|
|
27065
|
-
import { closeSync as closeSync3, constants as
|
|
27154
|
+
import { closeSync as closeSync3, constants as fsConstants3, fstatSync as fstatSync2, openSync as openSync3, readSync as readSync2, statSync as statSync19 } from "node:fs";
|
|
27066
27155
|
import { dirname as dirname13 } from "node:path";
|
|
27067
27156
|
function parseJevMode(raw) {
|
|
27068
27157
|
return raw === "off" || raw === "observe" || raw === "enforce" ? raw : null;
|
|
@@ -27537,7 +27626,7 @@ var init_jev_config = __esm(() => {
|
|
|
27537
27626
|
JEV_PROVIDER_KINDS = ["typesafe", "openrouter", "vercel", "cloudflare", "custom", "failproofai"];
|
|
27538
27627
|
JEV_CALIBRATED_FAMILY = { major: 1, minor: 13 };
|
|
27539
27628
|
MAX_CONFIG_BYTES = 64 * 1024;
|
|
27540
|
-
OPEN_FLAGS =
|
|
27629
|
+
OPEN_FLAGS = fsConstants3.O_RDONLY | (fsConstants3.O_NONBLOCK ?? 0);
|
|
27541
27630
|
VERSIONED_MODEL_RE = /^(?:(?:typesafe|typesafe-ai)\/)?jev-(\d{1,4})\.(\d{1,4})(?:\.(\d{1,6}))?(?:-(\d{8}))?$/;
|
|
27542
27631
|
CLOUDFLARE_ACCOUNT_ID_RE = /^[0-9a-f]{32}$/;
|
|
27543
27632
|
API_KEY_RE = /^[\x21-\x7e]{1,4096}$/;
|
|
@@ -32786,7 +32875,7 @@ var INTROSPECT_PATH = "/v1/auth/introspect", PERMISSION_EVENTS = "events:add", P
|
|
|
32786
32875
|
import {
|
|
32787
32876
|
chmodSync as chmodSync7,
|
|
32788
32877
|
closeSync as closeSync5,
|
|
32789
|
-
constants as
|
|
32878
|
+
constants as fsConstants4,
|
|
32790
32879
|
existsSync as existsSync34,
|
|
32791
32880
|
fstatSync as fstatSync3,
|
|
32792
32881
|
linkSync,
|
|
@@ -32979,7 +33068,7 @@ function fieldsOf(file) {
|
|
|
32979
33068
|
const none = { provider: null, off: false };
|
|
32980
33069
|
let fd;
|
|
32981
33070
|
try {
|
|
32982
|
-
fd = openSync5(file,
|
|
33071
|
+
fd = openSync5(file, fsConstants4.O_RDONLY | (fsConstants4.O_NONBLOCK ?? 0) | (fsConstants4.O_NOFOLLOW ?? 0));
|
|
32983
33072
|
} catch {
|
|
32984
33073
|
return none;
|
|
32985
33074
|
}
|
|
@@ -38952,7 +39041,7 @@ var init_jev_cli = __esm(() => {
|
|
|
38952
39041
|
import {
|
|
38953
39042
|
chmodSync as chmodSync10,
|
|
38954
39043
|
closeSync as closeSync8,
|
|
38955
|
-
constants as
|
|
39044
|
+
constants as fsConstants5,
|
|
38956
39045
|
existsSync as existsSync46,
|
|
38957
39046
|
fstatSync as fstatSync4,
|
|
38958
39047
|
mkdirSync as mkdirSync29,
|
|
@@ -39736,9 +39825,14 @@ async function refreshDaemonToCliVersion(deps = {}) {
|
|
|
39736
39825
|
const install = deps.install ?? installDaemonService2;
|
|
39737
39826
|
const prime = deps.prime ?? primeElevation2;
|
|
39738
39827
|
const interactive = deps.interactive ?? (() => Boolean(process.stdin.isTTY && process.stdout.isTTY));
|
|
39739
|
-
|
|
39828
|
+
const current = status();
|
|
39829
|
+
if (current === "not-installed") {
|
|
39740
39830
|
return { ok: true, lines: ["No failproofaid service on this machine; nothing to update."] };
|
|
39741
39831
|
}
|
|
39832
|
+
const recorded = readVersionFile()?.daemon;
|
|
39833
|
+
if (current === "running" && recorded === version2 && existsSync48(installedBinaryPath(version2))) {
|
|
39834
|
+
return { ok: true, lines: [`failproofaid ${version2} is already installed and running; nothing to update.`] };
|
|
39835
|
+
}
|
|
39742
39836
|
if (interactive())
|
|
39743
39837
|
prime();
|
|
39744
39838
|
const result = await install();
|
|
@@ -44219,7 +44313,7 @@ import {
|
|
|
44219
44313
|
existsSync as existsSync54,
|
|
44220
44314
|
lstatSync as lstatSync4,
|
|
44221
44315
|
mkdirSync as mkdirSync33,
|
|
44222
|
-
readlinkSync as
|
|
44316
|
+
readlinkSync as readlinkSync3,
|
|
44223
44317
|
realpathSync as realpathSync8,
|
|
44224
44318
|
renameSync as renameSync14,
|
|
44225
44319
|
rmSync as rmSync21,
|
|
@@ -44286,14 +44380,31 @@ function hermesPluginPathForSettings2(settingsPath) {
|
|
|
44286
44380
|
function hasAllHermesPluginFiles2(dir) {
|
|
44287
44381
|
return HERMES_PLUGIN_FILES2.every((file) => existsSync54(resolve39(dir, file)));
|
|
44288
44382
|
}
|
|
44289
|
-
function
|
|
44290
|
-
|
|
44291
|
-
|
|
44292
|
-
|
|
44383
|
+
function hermesLinkRecordPath2(pluginPath) {
|
|
44384
|
+
return resolve39(dirname30(pluginPath), HERMES_LINK_RECORD2);
|
|
44385
|
+
}
|
|
44386
|
+
function readHermesLinkRecord2(pluginPath) {
|
|
44387
|
+
try {
|
|
44388
|
+
const recorded = readFileSync41(hermesLinkRecordPath2(pluginPath), "utf8").trim();
|
|
44389
|
+
return recorded === "" ? null : resolve39(recorded);
|
|
44390
|
+
} catch {
|
|
44391
|
+
return null;
|
|
44392
|
+
}
|
|
44393
|
+
}
|
|
44394
|
+
function isOwnedHermesPluginLink2(pluginPath, target) {
|
|
44395
|
+
const recorded = readHermesLinkRecord2(pluginPath);
|
|
44396
|
+
if (recorded && resolve39(target) === recorded)
|
|
44293
44397
|
return true;
|
|
44398
|
+
if (samePath2(target, getHermesPluginSourcePath2()))
|
|
44399
|
+
return true;
|
|
44400
|
+
const pkgRoot = dirname30(resolve39(target));
|
|
44401
|
+
if (basename13(resolve39(target)) !== HERMES_PLUGIN_SOURCE_DIR2)
|
|
44402
|
+
return false;
|
|
44403
|
+
if (basename13(pkgRoot) !== "failproofai" || basename13(dirname30(pkgRoot)) !== "node_modules")
|
|
44404
|
+
return false;
|
|
44294
44405
|
try {
|
|
44295
|
-
const
|
|
44296
|
-
return
|
|
44406
|
+
const pkg = JSON.parse(readFileSync41(resolve39(pkgRoot, "package.json"), "utf8"));
|
|
44407
|
+
return pkg.name === "failproofai";
|
|
44297
44408
|
} catch {
|
|
44298
44409
|
return false;
|
|
44299
44410
|
}
|
|
@@ -44321,11 +44432,11 @@ function hermesPluginState2(settingsPath) {
|
|
|
44321
44432
|
if (isLink) {
|
|
44322
44433
|
let target;
|
|
44323
44434
|
try {
|
|
44324
|
-
target = resolve39(dirname30(pluginPath),
|
|
44435
|
+
target = resolve39(dirname30(pluginPath), readlinkSync3(pluginPath));
|
|
44325
44436
|
} catch {
|
|
44326
44437
|
return { kind: "foreign" };
|
|
44327
44438
|
}
|
|
44328
|
-
if (!
|
|
44439
|
+
if (!isOwnedHermesPluginLink2(pluginPath, target))
|
|
44329
44440
|
return { kind: "foreign" };
|
|
44330
44441
|
return {
|
|
44331
44442
|
kind: "link",
|
|
@@ -44378,6 +44489,7 @@ function hermesProfileHealth() {
|
|
|
44378
44489
|
legacyShellHookPresent: config.legacyShellHookPresent,
|
|
44379
44490
|
cronUnchecked: config.legacyShellHookPresent && !pluginWorks,
|
|
44380
44491
|
configUnreadable: config.unreadable === true,
|
|
44492
|
+
pluginForeign: plugin.kind === "foreign",
|
|
44381
44493
|
healthy: pluginWorks && !config.legacyShellHookPresent && config.unreadable !== true
|
|
44382
44494
|
};
|
|
44383
44495
|
});
|
|
@@ -44385,6 +44497,12 @@ function hermesProfileHealth() {
|
|
|
44385
44497
|
function hermesProfileStatusRows() {
|
|
44386
44498
|
return hermesProfileHealth().filter((profile) => existsSync54(profile.home)).map((profile) => {
|
|
44387
44499
|
const label = "hermes/" + profile.name;
|
|
44500
|
+
if (profile.pluginForeign) {
|
|
44501
|
+
return [
|
|
44502
|
+
label,
|
|
44503
|
+
`UNHEALTHY — another plugin occupies ${resolve39(profile.home, "plugins", "failproofai")}; failproofai will not replace it. Move it aside, then run update`
|
|
44504
|
+
];
|
|
44505
|
+
}
|
|
44388
44506
|
if (profile.configUnreadable) {
|
|
44389
44507
|
return [label, `UNHEALTHY — ${profile.settingsPath} does not parse; failproofai leaves it untouched until it is fixed`];
|
|
44390
44508
|
}
|
|
@@ -44411,7 +44529,7 @@ function hermesProfileStatusRows() {
|
|
|
44411
44529
|
];
|
|
44412
44530
|
});
|
|
44413
44531
|
}
|
|
44414
|
-
var UnreadableAgentConfigError2, HERMES_PLUGIN_ID2 = "failproofai", HERMES_PLUGIN_MARKER2 = ".failproofai-managed", HERMES_PLUGIN_FILES2, HERMES_PLUGIN_SOURCE_DIR2 = "hermes-plugin", ANTIGRAVITY_TOOL_EVENTS2;
|
|
44532
|
+
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;
|
|
44415
44533
|
var init_integrations2 = __esm(() => {
|
|
44416
44534
|
init_dist();
|
|
44417
44535
|
init_safe_config_write();
|
|
@@ -44559,7 +44677,7 @@ import { realpathSync as realpathSync10 } from "fs";
|
|
|
44559
44677
|
import { dirname as dirname32, resolve as resolve41 } from "path";
|
|
44560
44678
|
import { fileURLToPath as fileURLToPath5 } from "url";
|
|
44561
44679
|
// package.json
|
|
44562
|
-
var version = "1.0.
|
|
44680
|
+
var version = "1.0.10-beta.1";
|
|
44563
44681
|
|
|
44564
44682
|
// bin/failproofai.mjs
|
|
44565
44683
|
if (!process.env.FAILPROOFAI_PACKAGE_ROOT) {
|
package/dist/worker.mjs
CHANGED
|
@@ -53,7 +53,10 @@ var init_types = __esm(() => {
|
|
|
53
53
|
web_search: "WebSearch",
|
|
54
54
|
web_extract: "WebFetch",
|
|
55
55
|
search_files: "Grep",
|
|
56
|
-
todo: "TodoWrite"
|
|
56
|
+
todo: "TodoWrite",
|
|
57
|
+
todo_list: "TodoWrite",
|
|
58
|
+
process_manage: "process",
|
|
59
|
+
cronjob_manage: "cronjob"
|
|
57
60
|
};
|
|
58
61
|
HERMES_TOOL_INPUT_MAP = {
|
|
59
62
|
Read: { path: "file_path" },
|
|
@@ -1162,7 +1165,7 @@ function instruct(reason) {
|
|
|
1162
1165
|
}
|
|
1163
1166
|
|
|
1164
1167
|
// package.json
|
|
1165
|
-
var version = "1.0.
|
|
1168
|
+
var version = "1.0.10-beta.1";
|
|
1166
1169
|
var init_package = () => {};
|
|
1167
1170
|
|
|
1168
1171
|
// src/hooks/policy-types.ts
|