failproofai 1.0.0-beta.13 → 1.0.0-beta.15

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.
Files changed (106) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/build-manifest.json +3 -3
  3. package/.next/standalone/.next/prerender-manifest.json +3 -3
  4. package/.next/standalone/.next/required-server-files.json +1 -1
  5. package/.next/standalone/.next/server/app/_global-error/page/server-reference-manifest.json +1 -1
  6. package/.next/standalone/.next/server/app/_global-error/page.js.nft.json +1 -1
  7. package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  8. package/.next/standalone/.next/server/app/_global-error.html +1 -1
  9. package/.next/standalone/.next/server/app/_global-error.rsc +7 -7
  10. package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +2 -2
  11. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +7 -7
  12. package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +3 -3
  13. package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +3 -3
  14. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  15. package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  16. package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
  17. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  18. package/.next/standalone/.next/server/app/_not-found.html +1 -1
  19. package/.next/standalone/.next/server/app/_not-found.rsc +14 -14
  20. package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +14 -14
  21. package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
  22. package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +9 -9
  23. package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  24. package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
  25. package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  26. package/.next/standalone/.next/server/app/audit/page/server-reference-manifest.json +2 -2
  27. package/.next/standalone/.next/server/app/audit/page.js.nft.json +1 -1
  28. package/.next/standalone/.next/server/app/audit/page_client-reference-manifest.js +1 -1
  29. package/.next/standalone/.next/server/app/index.html +1 -1
  30. package/.next/standalone/.next/server/app/index.rsc +14 -14
  31. package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  32. package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +14 -14
  33. package/.next/standalone/.next/server/app/index.segments/_head.segment.rsc +4 -4
  34. package/.next/standalone/.next/server/app/index.segments/_index.segment.rsc +9 -9
  35. package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  36. package/.next/standalone/.next/server/app/page/server-reference-manifest.json +1 -1
  37. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  38. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  39. package/.next/standalone/.next/server/app/policies/page/server-reference-manifest.json +10 -10
  40. package/.next/standalone/.next/server/app/policies/page.js.nft.json +1 -1
  41. package/.next/standalone/.next/server/app/policies/page_client-reference-manifest.js +1 -1
  42. package/.next/standalone/.next/server/app/project/[name]/page/server-reference-manifest.json +1 -1
  43. package/.next/standalone/.next/server/app/project/[name]/page.js.nft.json +1 -1
  44. package/.next/standalone/.next/server/app/project/[name]/page_client-reference-manifest.js +1 -1
  45. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/react-loadable-manifest.json +2 -2
  46. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/server-reference-manifest.json +2 -2
  47. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page.js.nft.json +1 -1
  48. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page_client-reference-manifest.js +1 -1
  49. package/.next/standalone/.next/server/app/projects/page/server-reference-manifest.json +1 -1
  50. package/.next/standalone/.next/server/app/projects/page.js.nft.json +1 -1
  51. package/.next/standalone/.next/server/app/projects/page_client-reference-manifest.js +1 -1
  52. package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +4 -4
  53. package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
  54. package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  55. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1uyc-z4._.js +1 -1
  56. package/.next/standalone/.next/server/chunks/_0lxbzdq._.js +1 -1
  57. package/.next/standalone/.next/server/chunks/_1zuiiy3._.js +1 -1
  58. package/.next/standalone/.next/server/chunks/package_json_[json]_cjs_1nxcc4v._.js +1 -1
  59. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__1dx-a-c._.js → [root-of-the-server]__0er51rw._.js} +2 -2
  60. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0spkm68._.js +2 -2
  61. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__17itmx-._.js +1 -1
  62. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0eeipso._.js → [root-of-the-server]__1i-hxx5._.js} +2 -2
  63. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1mmefsr._.js +2 -2
  64. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1rv-sc9._.js +1 -1
  65. package/.next/standalone/.next/server/chunks/ssr/_0rjgfln._.js +1 -1
  66. package/.next/standalone/.next/server/chunks/ssr/_0vo2qyt._.js +1 -1
  67. package/.next/standalone/.next/server/chunks/ssr/_0xej-0e._.js +1 -1
  68. package/.next/standalone/.next/server/chunks/ssr/_10399ge._.js +1 -1
  69. package/.next/standalone/.next/server/chunks/ssr/_149k9oy._.js +1 -1
  70. package/.next/standalone/.next/server/chunks/ssr/{_166jvu8._.js → _17aso1e._.js} +1 -1
  71. package/.next/standalone/.next/server/chunks/ssr/_1_hwp06._.js +1 -1
  72. package/.next/standalone/.next/server/chunks/ssr/_1mnhi_r._.js +1 -1
  73. package/.next/standalone/.next/server/chunks/ssr/_1ror7k9._.js +1 -1
  74. package/.next/standalone/.next/server/chunks/ssr/app_audit__components_audit-dashboard_tsx_0p9ud47._.js +1 -1
  75. package/.next/standalone/.next/server/chunks/ssr/app_global-error_tsx_1kp6l3x._.js +1 -1
  76. package/.next/standalone/.next/server/chunks/ssr/app_policies_hooks-client_tsx_19dqvpc._.js +1 -1
  77. package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
  78. package/.next/standalone/.next/server/pages/404.html +1 -1
  79. package/.next/standalone/.next/server/pages/500.html +1 -1
  80. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  81. package/.next/standalone/.next/server/server-reference-manifest.json +15 -15
  82. package/.next/standalone/.next/static/chunks/{3l4-fu3xt75j8.js → 010huwv917_8b.js} +1 -1
  83. package/.next/standalone/.next/static/chunks/{0zbcd_n8ku2ov.js → 01ow5ctk14a3m.js} +1 -1
  84. package/.next/standalone/.next/static/chunks/{3poscoxn69x9g.js → 0t1a790b2z9zg.js} +1 -1
  85. package/.next/standalone/.next/static/chunks/{23hnlzqx44vbe.js → 1g4yf15nu24nl.js} +1 -1
  86. package/.next/standalone/.next/static/chunks/{2y42ebzynyxdv.js → 1hohlism5o738.js} +1 -1
  87. package/.next/standalone/.next/static/chunks/{31_px0dfgdg9j.js → 27fu32-3jq61l.js} +1 -1
  88. package/.next/standalone/.next/static/chunks/{1erji0ratofla.js → 2jgru_vga6bt2.js} +1 -1
  89. package/.next/standalone/.next/static/chunks/{01s3vpzky_qew.js → 2u1auvctu_c9g.js} +1 -1
  90. package/.next/standalone/.next/static/chunks/{2cwsiyhc7d2cw.js → 37bhx_w0e5rja.js} +1 -1
  91. package/.next/standalone/.next/static/chunks/{315lncj7dsp9c.js → 3sd3fplldbaob.js} +1 -1
  92. package/.next/standalone/package.json +9 -9
  93. package/.next/standalone/server.js +1 -1
  94. package/bin/failproofai.mjs +15 -3
  95. package/dist/cli.mjs +29 -14
  96. package/dist/worker.mjs +1 -1
  97. package/package.json +9 -9
  98. package/src/hooks/collector-config.ts +1 -1
  99. package/src/hooks/configure-wizard.ts +1 -1
  100. package/src/hooks/daemon-service.ts +18 -1
  101. package/src/hooks/fp-config.ts +1 -1
  102. package/src/hooks/fp-home.ts +2 -2
  103. package/src/hooks/harness-cli.ts +5 -5
  104. /package/.next/standalone/.next/static/{ziAsXfNE0cH_S7LHK-Py3 → o2yNxSgw7WN_rtuWqOzIo}/_buildManifest.js +0 -0
  105. /package/.next/standalone/.next/static/{ziAsXfNE0cH_S7LHK-Py3 → o2yNxSgw7WN_rtuWqOzIo}/_clientMiddlewareManifest.js +0 -0
  106. /package/.next/standalone/.next/static/{ziAsXfNE0cH_S7LHK-Py3 → o2yNxSgw7WN_rtuWqOzIo}/_ssgManifest.js +0 -0
@@ -393,8 +393,25 @@ function systemdUnitName(user: string = serviceUser()): string {
393
393
  return `failproofaid@${user}.service`;
394
394
  }
395
395
 
396
+ /**
397
+ * The unit directory, redirectable for tests ONLY.
398
+ *
399
+ * It was hardcoded, which left a test asserting "a failed install writes
400
+ * nothing" checking the REAL `/etc/systemd/system` — so it passed in CI, where
401
+ * nothing is installed, and failed on the machine of anyone who actually uses
402
+ * failproofai, whose genuine unit file is sitting right there. That is the bug
403
+ * class `handler.test.ts`'s header already documents: CI is green, so the red is
404
+ * only ever seen locally, by exactly the people who most need to trust the suite.
405
+ *
406
+ * Read through a function rather than captured at module load, because a test
407
+ * sets it after importing this module.
408
+ */
409
+ function systemdUnitDir(): string {
410
+ return process.env.FAILPROOFAI_SYSTEMD_DIR || "/etc/systemd/system";
411
+ }
412
+
396
413
  function systemdUnitPath(user: string = serviceUser()): string {
397
- return resolve("/etc/systemd/system", systemdUnitName(user));
414
+ return resolve(systemdUnitDir(), systemdUnitName(user));
398
415
  }
399
416
 
400
417
  /**
@@ -242,7 +242,7 @@ export interface FpConfig {
242
242
  machineId?: string;
243
243
  /**
244
244
  * Extra locations to capture per harness, beyond the one each source ships
245
- * with — `[collector.sources.<harness>] extra_paths` in `config.toml`.
245
+ * with — `collector.sources.<harness>.extra_paths` in `config.json`.
246
246
  *
247
247
  * Each entry is `label=path` or a bare `path`; the label becomes an agent-id
248
248
  * namespace (`<label>-<agentId>`), which is what keeps two copies of one
@@ -269,7 +269,7 @@ export const sessionPauseDir = () => resolve(stateDir(), "sessions");
269
269
  * The DAEMON is the sole writer (`crates/failproofaid/src/audit_lane.rs`, which
270
270
  * mirrors this path in `paths.rs`) — it owns the schedule, and a second writer
271
271
  * racing it could hand a machine two full scans back to back. Everything on this
272
- * side reads it: the interval itself lives in `config.toml`'s `[audit]` table,
272
+ * side reads it: the interval itself lives in `config.json`'s `audit` object,
273
273
  * which a human edits, while this file is derived state a human never opens,
274
274
  * which is why it sits under `state/` rather than beside the audit results.
275
275
  */
@@ -285,7 +285,7 @@ export const auditScheduleFile = (home?: string) => resolve(stateDir(home), "aud
285
285
  * `x64` where Rust says `x86_64`), and a near-miss there does not fail, it
286
286
  * silently files one machine under two PostHog persons — so this file is how the
287
287
  * two agree. Derived state a human never opens, hence `state/` rather than
288
- * beside `config.toml`.
288
+ * beside `config.json`.
289
289
  */
290
290
  export const telemetryIdFile = (home?: string) => resolve(stateDir(home), "telemetry-id");
291
291
  export const launcherMarker = (home?: string) => resolve(stateDir(home), "launcher-configured");
@@ -18,13 +18,13 @@
18
18
  * from the feature working.
19
19
  *
20
20
  * The one thing validated here is the HARNESS NAME, because that failure has no
21
- * other detector: `[collector.sources.claud]` is valid TOML, parses cleanly,
21
+ * other detector: `collector.sources.claud` is valid JSON, parses cleanly,
22
22
  * captures nothing, and is mentioned nowhere else a user would look.
23
23
  *
24
24
  * # No restart, and no sudo
25
25
  *
26
26
  * This writes one file in the user's own home and nothing else. The daemon's
27
- * collector manager re-reads `config.toml` on an interval and cycles the
27
+ * collector manager re-reads `config.json` on an interval and cycles the
28
28
  * collector whenever the resolved `CollectorConfig` changes — the same path
29
29
  * that already picks up `--connect`, a stream being switched off, and a
30
30
  * verbosity change. `extra_paths` rides it for free by living inside
@@ -39,7 +39,7 @@ import { readConfig, updateConfig } from "./fp-config";
39
39
  import { configFile } from "./fp-home";
40
40
 
41
41
  /**
42
- * Harness keys `[collector.sources.<key>]` accepts.
42
+ * Harness keys `collector.sources.<key>` accepts.
43
43
  *
44
44
  * MUST stay in step with `HARNESS_KEYS` in `crates/failproofaid/src/main.rs`,
45
45
  * which is the side that actually registers the tasks. A name here that the
@@ -124,7 +124,7 @@ function writePaths(harness: string, paths: string[]): void {
124
124
  /**
125
125
  * No restart, and deliberately no instruction to perform one.
126
126
  *
127
- * The daemon's collector manager re-reads `config.toml` on an interval and
127
+ * The daemon's collector manager re-reads `config.json` on an interval and
128
128
  * cycles the collector whenever the resolved `CollectorConfig` changes — the
129
129
  * same path that already picks up `--connect`, a stream being switched off and
130
130
  * a verbosity change. `extra_paths` rides that for free because it lives inside
@@ -266,7 +266,7 @@ export function listPaths(harness?: string): HarnessResult {
266
266
  }
267
267
  }
268
268
  // Unknown tables are surfaced here as well as by the daemon: a user who
269
- // hand-edited config.toml runs `list` to check it, and that is the moment the
269
+ // hand-edited config.json runs `list` to check it, and that is the moment the
270
270
  // typo is cheapest to find.
271
271
  if (unknown.length > 0) {
272
272
  if (lines.length === 0) lines.push("No extra capture paths configured for any known harness.");