bitfab-cli 0.2.166 → 0.2.167

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/README.md CHANGED
@@ -9,4 +9,7 @@ npx bitfab-cli init # Detect editors, prompt if multiple
9
9
  npx bitfab-cli init --editor claude # Install for Claude Code
10
10
  npx bitfab-cli init --editor codex # Install for Codex
11
11
  npx bitfab-cli init --editor cursor # Install for Cursor
12
+ npx bitfab-cli session-logs enable # Enable session log collection
13
+ npx bitfab-cli session-logs disable # Disable session log collection
14
+ npx bitfab-cli session-logs status # Show the saved session log setting
12
15
  ```
package/dist/index.js CHANGED
@@ -31530,6 +31530,54 @@ function runLogoutCommand() {
31530
31530
  runLogout();
31531
31531
  }
31532
31532
 
31533
+ // src/sessionLogs.ts
31534
+ function parseSessionLogsArgs(args) {
31535
+ const [verb, value] = args;
31536
+ if (verb === void 0 || verb === "status" || verb === "get") {
31537
+ return { kind: "status" };
31538
+ }
31539
+ if (verb === "enable" || verb === "on") {
31540
+ return { kind: "set", value: true };
31541
+ }
31542
+ if (verb === "disable" || verb === "off") {
31543
+ return { kind: "set", value: false };
31544
+ }
31545
+ if (verb === "set") {
31546
+ if (value === "true") {
31547
+ return { kind: "set", value: true };
31548
+ }
31549
+ if (value === "false") {
31550
+ return { kind: "set", value: false };
31551
+ }
31552
+ throw new Error(
31553
+ `Expected "set true" or "set false", got "set ${value ?? ""}".`
31554
+ );
31555
+ }
31556
+ throw new Error(
31557
+ `Unknown session-logs command "${verb}". Expected status, enable, or disable.`
31558
+ );
31559
+ }
31560
+ function runSessionLogsCommand(args) {
31561
+ const action = parseSessionLogsArgs(args);
31562
+ if (action.kind === "status") {
31563
+ const consent = getSessionLogConsent();
31564
+ if (consent === true) {
31565
+ process.stdout.write("Session logs are enabled.\n");
31566
+ return;
31567
+ }
31568
+ if (consent === false) {
31569
+ process.stdout.write("Session logs are disabled.\n");
31570
+ return;
31571
+ }
31572
+ process.stdout.write("Session logs are not configured.\n");
31573
+ return;
31574
+ }
31575
+ setSessionLogConsent(action.value);
31576
+ process.stdout.write(
31577
+ action.value ? "Session logs enabled.\n" : "Session logs disabled.\n"
31578
+ );
31579
+ }
31580
+
31533
31581
  // src/updateCheck.ts
31534
31582
  var NPM_REGISTRY_URL = "https://registry.npmjs.org/bitfab-cli/latest";
31535
31583
  var TIMEOUT_MS = 3e3;
@@ -31581,6 +31629,7 @@ Commands:
31581
31629
  plugin-install [--editor <name>] Install the Bitfab plugin in one editor
31582
31630
  login Authenticate with Bitfab (opens browser)
31583
31631
  logout Remove stored credentials
31632
+ session-logs [status|enable|disable] Read or update session log collection
31584
31633
  setup [--editor <name>] Launch /bitfab:setup in the editor
31585
31634
  analyze-repo [--editor <name>] Headless scan: draft + upload trace plans (no prompts, no code edits)
31586
31635
  assistant [--editor <name>] [args] Launch /bitfab:assistant in the editor
@@ -31600,6 +31649,8 @@ Examples:
31600
31649
  bitfab init --editor claude Full setup for Claude Code
31601
31650
  bitfab analyze-repo Scan the repo and upload draft trace plans (headless)
31602
31651
  bitfab analyze-repo --limit 3 Scan the repo and upload at most 3 draft trace plans
31652
+ bitfab session-logs enable Enable session log collection
31653
+ bitfab session-logs disable Disable session log collection
31603
31654
  bitfab assistant investigate Investigate traces
31604
31655
  bitfab setup --skip-permissions Setup without permission prompts
31605
31656
  bitfab assistant --skip-permissions Run assistant autonomously
@@ -31684,6 +31735,11 @@ async function main() {
31684
31735
  abortUpdateCheck();
31685
31736
  return;
31686
31737
  }
31738
+ if (command === "session-logs") {
31739
+ runSessionLogsCommand(rest);
31740
+ abortUpdateCheck();
31741
+ return;
31742
+ }
31687
31743
  if (command === "setup") {
31688
31744
  await runSetup({ editor, skipPermissions });
31689
31745
  abortUpdateCheck();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bitfab-cli",
3
- "version": "0.2.166",
3
+ "version": "0.2.167",
4
4
  "description": "Install and configure the Bitfab plugin in Claude Code, Codex, or Cursor.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",