failproofai 1.0.2-beta.2 → 1.0.2-beta.4
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 +6 -6
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/required-server-files.json +1 -1
- package/.next/standalone/.next/server/app/_global-error/page/build-manifest.json +3 -3
- 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/build-manifest.json +3 -3
- 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 +2 -3
- 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 +4 -5
- 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 +2 -2
- 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 +3 -4
- 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 +4 -4
- 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 +4 -4
- 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/build-manifest.json +3 -3
- 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/build-manifest.json +3 -3
- 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/build-manifest.json +3 -3
- package/.next/standalone/.next/server/app/policies/page/server-reference-manifest.json +14 -14
- package/.next/standalone/.next/server/app/policies/page.js +2 -2
- 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/build-manifest.json +3 -3
- 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/build-manifest.json +3 -3
- 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/build-manifest.json +3 -3
- 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/build-manifest.json +3 -3
- package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +4 -4
- 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/{[externals]__0e32-7c._.js → [externals]__1qzqcio._.js} +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0_usx0j._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0_zk340._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0clqfab._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0o07qi9._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0oy4kxb._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0zf034w._.js +3 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0igxt32._.js → [root-of-the-server]__1p8poxd._.js} +2 -2
- package/.next/standalone/.next/server/chunks/_0lxbzdq._.js +3 -0
- package/.next/standalone/.next/server/chunks/_1ek68ln._.js +6 -5
- package/.next/standalone/.next/server/chunks/_1lbh81u._.js +3 -0
- package/.next/standalone/.next/server/chunks/_1zuiiy3._.js +3 -0
- package/.next/standalone/.next/server/chunks/node_modules_posthog-node_dist_entrypoints_index_node_mjs_01r25oi._.js +2 -2
- package/.next/standalone/.next/server/chunks/{node_modules_posthog-node_dist_entrypoints_index_node_mjs_04op_ou._.js → node_modules_posthog-node_dist_entrypoints_index_node_mjs_09d5c79._.js} +1 -1
- package/.next/standalone/.next/server/chunks/node_modules_posthog-node_dist_entrypoints_index_node_mjs_09z9-p7._.js +2 -2
- package/.next/standalone/.next/server/chunks/{node_modules_posthog-node_dist_entrypoints_index_node_mjs_0dr20uz._.js → node_modules_posthog-node_dist_entrypoints_index_node_mjs_1d2g73o._.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_fp-home_ts_09kv0bn._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__013jr2b._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__01wy8d-._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__02npjtd._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__07gm3zl._.js +4 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0da85px._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ftmoxc._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0oa1lav._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0p-5p8u._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0s740oi._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__14muoc4._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{src_hooks_08o7bqo._.js → [root-of-the-server]__15r6r7w._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1p2otjt._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1tag8_-._.js +5 -0
- package/.next/standalone/.next/server/chunks/ssr/_08x1r5t._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_1oggjel._.js → _0ovx4lz._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_1dkh76z._.js +23 -0
- package/.next/standalone/.next/server/chunks/ssr/_1u8-lu2._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_1zopuov._.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_settings-client_tsx_20lq-mq._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/node_modules_13n822a._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/node_modules_posthog-node_dist_entrypoints_index_node_mjs_11bnuzn._.js +2 -2
- package/.next/standalone/.next/server/middleware-build-manifest.js +6 -6
- package/.next/standalone/.next/server/middleware.js +1 -1
- 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 +19 -19
- package/.next/standalone/.next/static/chunks/{1yw71gn8vqco1.js → 00_t-xvc59tkb.js} +2 -2
- package/.next/standalone/.next/static/chunks/{3jjmdqqzem21x.js → 07j2u70_3qsx8.js} +1 -1
- package/.next/standalone/.next/static/chunks/{2fzxl7n717pbc.js → 0d_re32wscs0b.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0ykd_go4oahan.js → 0ds64uculrze8.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0nnbtp0w4sxrr.js → 0k_yvjc1yz0pq.js} +1 -1
- package/.next/standalone/.next/static/chunks/0lshnlpy1m6bc.js +1 -0
- package/.next/standalone/.next/static/chunks/{1da5a_a-3btas.js → 1o0ahew9568ls.js} +1 -1
- package/.next/standalone/.next/static/chunks/{1za08zjcctyil.js → 1oz0svxwt9574.js} +2 -2
- package/.next/standalone/.next/static/chunks/{29eh4k77otcw6.js → 1q76jk_1_wgjq.js} +1 -1
- package/.next/standalone/.next/static/chunks/{2axi5ehjbld9h.js → 2817_8e94ah9z.js} +1 -1
- package/.next/standalone/.next/static/chunks/{1nzy5jc_vf9e0.js → 2dbi_x0c8n8fi.js} +1 -1
- package/.next/standalone/.next/static/chunks/{1fac8krph-zgp.js → 354-n7p7labpn.js} +1 -1
- package/.next/standalone/.next/static/chunks/turbopack-17utl_jw0wj11.js +1 -0
- package/.next/standalone/SECURITY.md +18 -3
- package/.next/standalone/fp-cloud-cli/CHANGELOG.md +7 -0
- package/.next/standalone/fp-cloud-cli/uv.lock +6 -6
- package/.next/standalone/node_modules/@next/env/package.json +1 -1
- package/.next/standalone/node_modules/next/dist/build/swc/index.js +1 -1
- package/.next/standalone/node_modules/next/dist/client/components/segment-cache/cache.js +23 -34
- package/.next/standalone/node_modules/next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js +1 -1
- package/.next/standalone/node_modules/next/dist/compiled/next-server/app-page-turbo.runtime.prod.js +1 -1
- package/.next/standalone/node_modules/next/dist/compiled/next-server/pages-turbo.runtime.prod.js +1 -1
- package/.next/standalone/node_modules/next/dist/lib/patch-incorrect-lockfile.js +3 -3
- package/.next/standalone/node_modules/next/dist/server/config.js +1 -1
- package/.next/standalone/node_modules/next/dist/server/dev/hot-reloader-turbopack.js +2 -2
- package/.next/standalone/node_modules/next/dist/server/dev/hot-reloader-webpack.js +1 -1
- package/.next/standalone/node_modules/next/dist/server/lib/app-info-log.js +1 -1
- package/.next/standalone/node_modules/next/dist/server/lib/start-server.js +1 -1
- package/.next/standalone/node_modules/next/dist/telemetry/anonymous-meta.js +1 -1
- package/.next/standalone/node_modules/next/dist/telemetry/events/swc-load-failure.js +1 -1
- package/.next/standalone/node_modules/next/dist/telemetry/events/version.js +2 -2
- package/.next/standalone/node_modules/next/package.json +10 -10
- package/.next/standalone/package.json +19 -19
- package/.next/standalone/sdk/python/CHANGELOG.md +7 -0
- package/.next/standalone/sdk/python/uv.lock +23 -23
- package/.next/standalone/server.js +1 -1
- package/bin/failproofai.mjs +131 -55
- package/dist/cli.mjs +12940 -12627
- package/dist/worker.mjs +11 -1
- package/package.json +19 -19
- package/src/audit/cache.ts +34 -29
- package/src/audit/replay.ts +15 -91
- package/src/hooks/configure-wizard.ts +16 -48
- package/src/hooks/handler.ts +8 -1
- package/src/hooks/manager.ts +24 -2
- package/src/hooks/pack-cli.ts +572 -43
- package/src/hooks/pack-manifest.ts +28 -0
- package/src/hooks/pack-store.ts +20 -28
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__01eqny5._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0neqlu-._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0t9oqnn._.js +0 -3
- package/.next/standalone/.next/server/chunks/_0bs-v8p._.js +0 -3
- package/.next/standalone/.next/server/chunks/_0tovk6q._.js +0 -3
- package/.next/standalone/.next/server/chunks/_0trp3yc._.js +0 -3
- package/.next/standalone/.next/server/chunks/_185gyk9._.js +0 -3
- package/.next/standalone/.next/server/chunks/src_hooks_0xbw3bu._.js +0 -12
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__090sxxw._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__192nhvh._.js +0 -5
- package/.next/standalone/.next/server/chunks/ssr/_0wb8osu._.js +0 -23
- package/.next/standalone/.next/static/chunks/140ip21rqmelt.js +0 -1
- package/.next/standalone/.next/static/chunks/turbopack-2vqpa-dts1gy4.js +0 -1
- /package/.next/standalone/.next/static/{A7czO1PZdTcNzLGa_H1sm → 0iNzkTsP6rh14Rj5WL17o}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{A7czO1PZdTcNzLGa_H1sm → 0iNzkTsP6rh14Rj5WL17o}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{A7czO1PZdTcNzLGa_H1sm → 0iNzkTsP6rh14Rj5WL17o}/_ssgManifest.js +0 -0
package/bin/failproofai.mjs
CHANGED
|
@@ -369,34 +369,62 @@ see docs.befailproof.ai. Denials are reported to the agent, never to you.
|
|
|
369
369
|
if (extraArgs.length > 0) {
|
|
370
370
|
throw new CliError(`Unexpected argument: ${extraArgs[0]}\nRun \`failproofai help\` for usage.`);
|
|
371
371
|
}
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
372
|
+
// Built row by row rather than as one literal, so the command column can be
|
|
373
|
+
// painted without the escape sequences becoming part of the layout. Colour
|
|
374
|
+
// is decoration here and never meaning: the column position already says
|
|
375
|
+
// which half is a command, so this reads identically under NO_COLOR, piped
|
|
376
|
+
// to a file, or on a terminal that has never heard of 24-bit.
|
|
377
|
+
const { brandAnsi, ANSI_RESET, ANSI_BOLD, ANSI_DIM, colorsEnabled } =
|
|
378
|
+
await import("../src/hooks/tui");
|
|
379
|
+
const tint = colorsEnabled(process.stdout);
|
|
380
|
+
const pink = (t) => (tint ? `${brandAnsi("pink")}${t}${ANSI_RESET}` : t);
|
|
381
|
+
const mint = (t) => (tint ? `${brandAnsi("guide")}${t}${ANSI_RESET}` : t);
|
|
382
|
+
const dim = (t) => (tint ? `${ANSI_DIM}${t}${ANSI_RESET}` : t);
|
|
383
|
+
const bold = (t) => (tint ? `${ANSI_BOLD}${t}${ANSI_RESET}` : t);
|
|
384
|
+
|
|
385
|
+
// Padded BEFORE painting: an escape sequence has no width, so padding a
|
|
386
|
+
// coloured string right-aligns nothing and the description column drifts.
|
|
387
|
+
const row = (cmd, desc) => ` ${pink(cmd.padEnd(18))}${desc}`;
|
|
388
|
+
// 78 visible columns, matching the body. Computed from the VISIBLE prefix —
|
|
389
|
+
// `" \u2501\u2501 "` is 5, the label is `${n} ${title}`, then one space — because the
|
|
390
|
+
// painted string's length counts escape bytes and would shorten every rule
|
|
391
|
+
// by however many the terminal happened to need.
|
|
392
|
+
const section = (n, title) => {
|
|
393
|
+
const label = `${n} ${title}`;
|
|
394
|
+
const fill = 78 - (5 + label.length + 1);
|
|
395
|
+
return dim(" \u2501\u2501 ") + bold(label) + " " + dim("\u2501".repeat(Math.max(0, fill)));
|
|
396
|
+
};
|
|
397
|
+
|
|
398
|
+
console.log([
|
|
399
|
+
`${bold("fa")}${pink("il")}${bold("proofai")} v${version}` +
|
|
400
|
+
`${" ".repeat(23)}${dim("-v version -h this screen")}`,
|
|
401
|
+
` ${dim("Usage")} failproofai <command> [options] ${dim("Detail")} failproofai help <command>`,
|
|
402
|
+
section(1, "GET IT RUNNING"),
|
|
403
|
+
row("config, setup", "Interactive setup: agents, daemon, cloud"),
|
|
404
|
+
row("config --connect", "Connect to Cloud with no prompts: --token <key>"),
|
|
405
|
+
row("update", "Finish an npm upgrade: migrate home, match daemon"),
|
|
406
|
+
section(2, "CHOOSE WHAT IT ENFORCES"),
|
|
407
|
+
row("policies", "Every policy on this machine, and whether it is on"),
|
|
408
|
+
row("policies add", "Pick from a list, or name one: <policy> or <owner>/<repo>"),
|
|
409
|
+
row("policies remove", "Turn one policy off, or uninstall a whole pack"),
|
|
410
|
+
row("policies show", "What a pack contains, before you install it"),
|
|
411
|
+
row("publish", "Ship your own policies as a pack anyone can install"),
|
|
412
|
+
section(3, "SEE WHAT IT CAUGHT"),
|
|
413
|
+
row("(no args)", "Open the policy dashboard on localhost:8020"),
|
|
414
|
+
row("audit", "Scan your agents' history, then open the audit view"),
|
|
415
|
+
row("config --status", "Cloud connection, daemon version, pause state"),
|
|
416
|
+
row("harness", "Extra paths to capture agent sessions from"),
|
|
417
|
+
section(4, "PUT IT RIGHT"),
|
|
418
|
+
row("config --pause", "Pause enforcement for one session (30m; max 8h)"),
|
|
419
|
+
row("flush --wait", "Send everything spooled now, and block until it lands"),
|
|
420
|
+
row("backfill --since", "Re-send history already read past: 30d, 6m, YYYY-MM-DD"),
|
|
421
|
+
row("policies -i / -u", "Wire failproofai into your agent CLIs, or unwire"),
|
|
422
|
+
row("migrate", "Run pending ~/.failproofai layout migrations"),
|
|
423
|
+
row("uninstall", "Remove hooks and daemon, BEFORE npm rm -g failproofai"),
|
|
424
|
+
"",
|
|
425
|
+
` ${dim("Docs")} ${mint("docs.befailproof.ai")} ${dim("Code")} github.com/failproofai/failproofai`,
|
|
426
|
+
` ${dim("Chat")} ${mint("discord.befailproof.ai")} ${dim("Forum")} reddit.com/r/failproofai`,
|
|
427
|
+
].join("\n"));
|
|
400
428
|
process.exit(0);
|
|
401
429
|
}
|
|
402
430
|
|
|
@@ -1196,46 +1224,94 @@ WHY THIS EXISTS
|
|
|
1196
1224
|
console.log(`
|
|
1197
1225
|
failproofai publish — ship your policies as a pack anyone can install
|
|
1198
1226
|
|
|
1199
|
-
|
|
1200
|
-
failproofai publish <entry.mjs> --repo <owner>/<repo> --version <version>
|
|
1227
|
+
TWO COMMANDS, FROM NOTHING
|
|
1201
1228
|
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
assets, creates (or reuses) the release, and attaches them. One command.
|
|
1229
|
+
failproofai publish --init write a policy to start from
|
|
1230
|
+
failproofai publish ship it
|
|
1205
1231
|
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
source is for humans reading it, not for the install to work.
|
|
1232
|
+
Everything else is optional. Every flag below overrides something that is
|
|
1233
|
+
otherwise worked out for you.
|
|
1209
1234
|
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
--
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1235
|
+
WHAT --init DOES
|
|
1236
|
+
Asks what the pack is called, writes <name>.mjs, and stops. No network, no
|
|
1237
|
+
git, nothing published.
|
|
1238
|
+
|
|
1239
|
+
The file is not a template with blanks — it is one policy that already
|
|
1240
|
+
blocks git push --force. So the first thing you do is edit something that
|
|
1241
|
+
works. Refuses rather than overwriting a file that already exists.
|
|
1242
|
+
|
|
1243
|
+
Then try it on THIS machine, before anyone else can see it:
|
|
1244
|
+
|
|
1245
|
+
failproofai policies -i -c ./<name>.mjs
|
|
1246
|
+
|
|
1247
|
+
That enforces the file right now — any path, any filename. Ask your agent to
|
|
1248
|
+
do the thing you blocked and watch it get refused. Iterate here; nothing is
|
|
1249
|
+
published and nobody else is affected.
|
|
1219
1250
|
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1251
|
+
WHAT publish DOES
|
|
1252
|
+
In order, and it stops before touching GitHub if anything is wrong:
|
|
1253
|
+
|
|
1254
|
+
1 Finds the policy file here, by CONTENT — one that imports failproofai
|
|
1255
|
+
and calls customPolicies.add — not by filename. So it finds guards.mjs
|
|
1256
|
+
and ignores an unrelated policies.mjs. Not recursive: publishing a
|
|
1257
|
+
fixture is worse than being asked. Two candidates and it lists them.
|
|
1258
|
+
2 Reads the repo from git remote get-url origin, in the FILE's directory
|
|
1259
|
+
rather than yours — a policy in another checkout is normal.
|
|
1260
|
+
3 Decides the version (see below).
|
|
1261
|
+
4 Finds your credential: GITHUB_TOKEN, GH_TOKEN, or gh auth login. Needs
|
|
1262
|
+
release-write and nothing else. Never printed.
|
|
1263
|
+
5 Creates the repository if it does not exist. Public — see below.
|
|
1264
|
+
6 Builds the three assets, validating with the LOADER's own rules: the code
|
|
1265
|
+
that decides what may install on a stranger's machine. A pack that could
|
|
1266
|
+
never install fails here, where you can fix it.
|
|
1267
|
+
7 Creates or reuses the release, and uploads the assets — replacing any of
|
|
1268
|
+
the same name, because the install URL is built from fixed names and a
|
|
1269
|
+
stale copy is what somebody would fetch.
|
|
1270
|
+
|
|
1271
|
+
HOW THE VERSION IS DECIDED
|
|
1272
|
+
--version if you pass one. Otherwise a tag on HEAD — someone who tagged
|
|
1273
|
+
v1.2.0 has SAID what this release is. Otherwise one past the highest version
|
|
1274
|
+
the repository has already published: 1.0.0, then 1.0.1, and so on.
|
|
1275
|
+
|
|
1276
|
+
Counted from the repository's own releases, not anything local, so a fresh
|
|
1277
|
+
clone still gets the right number and two people cannot both mint 1.0.1.
|
|
1278
|
+
Releases that are not semver (nightly) are ignored rather than guessed at.
|
|
1279
|
+
|
|
1280
|
+
A tag names a COMMIT, so it is refused when the file has uncommitted changes:
|
|
1281
|
+
those bytes are not in that commit, and two packs would claim one version. A
|
|
1282
|
+
counted version names no commit and has no such problem.
|
|
1224
1283
|
|
|
1225
1284
|
THE REPO MUST BE PUBLIC
|
|
1226
1285
|
Installs are anonymous HTTPS with no credential to offer, so a private
|
|
1227
|
-
repository publishes to nobody.
|
|
1286
|
+
repository publishes to nobody. A repo created here is public for that
|
|
1287
|
+
reason; an existing private one still publishes, and warns.
|
|
1288
|
+
|
|
1289
|
+
Only the release matters. Installs read releases/download/<tag>/<asset> and
|
|
1290
|
+
never touch your git tree — pushing the source is for humans reading it.
|
|
1228
1291
|
|
|
1229
1292
|
YOUR ENTRY FILE
|
|
1230
|
-
One file, no relative imports
|
|
1293
|
+
One file, no relative imports: only the entry is digest-pinned, so a pack
|
|
1231
1294
|
importing siblings could not honestly claim to be verified. Bundle first
|
|
1232
1295
|
(esbuild, bun build, rollup) if yours is split. Each policy may carry
|
|
1233
|
-
|
|
1296
|
+
category and defaultEnabled alongside the usual fields.
|
|
1297
|
+
|
|
1298
|
+
OPTIONS
|
|
1299
|
+
--init [file] Write a starter policy and stop.
|
|
1300
|
+
--repo <owner>/<repo> Where to release it, created if missing.
|
|
1301
|
+
--version <version> Skip the counting and say which version this is.
|
|
1302
|
+
--id <publisher/name> The pack's id. Defaults to --repo.
|
|
1303
|
+
--tag <tag> Release tag. Defaults to the version; v prefix ok.
|
|
1304
|
+
--notes <text> Release notes.
|
|
1305
|
+
--out <dir> Where to write the assets (default: dist-pack)
|
|
1306
|
+
--effect enforce|observe
|
|
1307
|
+
observe records and blocks nothing (default: enforce)
|
|
1308
|
+
--dry-run Build the assets, publish nothing. No credential.
|
|
1234
1309
|
|
|
1235
1310
|
EXAMPLES
|
|
1236
|
-
failproofai publish
|
|
1237
|
-
failproofai publish
|
|
1238
|
-
failproofai publish
|
|
1311
|
+
failproofai publish --init
|
|
1312
|
+
failproofai publish
|
|
1313
|
+
failproofai publish --dry-run
|
|
1314
|
+
failproofai publish ./guards.mjs --repo me/guards --version 2.0.0
|
|
1239
1315
|
`.trimStart());
|
|
1240
1316
|
process.exit(0);
|
|
1241
1317
|
}
|