pi-harness-runtime 1.1.2 → 1.1.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.
Files changed (2) hide show
  1. package/index.ts +5 -27
  2. package/package.json +1 -1
package/index.ts CHANGED
@@ -142,24 +142,8 @@ function _debugLog(...args: unknown[]): void {
142
142
  }
143
143
  }
144
144
 
145
- // --- Selective console override harness DEBUG file only --------
146
- // Real errors (no [DEBUG prefix) still print to TUI so you notice problems.
147
- const _origLog = console.log.bind(console);
148
- const _origError = console.error.bind(console);
149
-
150
- console.log = (...args: unknown[]) => {
151
- _origLog(...args);
152
- _debugLog(...args);
153
- };
154
- console.error = (...args: unknown[]) => {
155
- const first = String(args[0] ?? "");
156
- if (first.startsWith("[DEBUG")) {
157
- _debugLog(...args);
158
- } else {
159
- _origError(...args);
160
- _debugLog(...args);
161
- }
162
- };
145
+ // --- Debug logging (file only, no console override) ---------------
146
+ // Logs written to file only. Real console output preserved for pi's TUI.
163
147
 
164
148
  // --- Harness Runtime State --------------------------------------------
165
149
  const HARNESS_ROOT_DIR = join(homedir(), ".pi", "harness");
@@ -220,9 +204,7 @@ function ensureHarnessDir() {
220
204
  }
221
205
 
222
206
  async function getCheckpointManager(): Promise<CheckpointManager> {
223
- const { JsonCheckpointManager } = await import(
224
- "./packages/checkpoint/src/checkpoint-manager.ts"
225
- );
207
+ const { JsonCheckpointManager } = await import("./packages/checkpoint/src/checkpoint-manager.ts");
226
208
  return new JsonCheckpointManager(
227
209
  HARNESS_ROOT_DIR,
228
210
  ) as unknown as CheckpointManager;
@@ -655,9 +637,7 @@ Run \`bd ready\` to see current tasks.
655
637
 
656
638
  async function hasBrowserProfileAutoFetchSource(): Promise<boolean> {
657
639
  try {
658
- const { getLiveSessionPath, getStatusPath } = await import(
659
- "./packages/auth/src/minimax-browser-auth.ts"
660
- );
640
+ const { getLiveSessionPath, getStatusPath } = await import("./packages/auth/src/minimax-browser-auth.ts");
661
641
  return existsSync(getLiveSessionPath()) || existsSync(getStatusPath());
662
642
  } catch {
663
643
  return false;
@@ -717,9 +697,7 @@ Run \`bd ready\` to see current tasks.
717
697
  }
718
698
 
719
699
  try {
720
- const { scrapeWithExistingProfile } = await import(
721
- "./packages/auth/src/minimax-browser-auth.ts"
722
- );
700
+ const { scrapeWithExistingProfile } = await import("./packages/auth/src/minimax-browser-auth.ts");
723
701
  const status = await scrapeWithExistingProfile({ quiet: true });
724
702
  if (
725
703
  status.page_url.includes("unified-login") ||
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-harness-runtime",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "description": "[BETA] Codex-style /usage status + autonomous coding harness for pi. Not production ready — expect breaking changes.",
5
5
  "type": "module",
6
6
  "scripts": {