pi-harness-runtime 0.9.22 → 0.9.25
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/CHANGELOG.md +22 -0
- package/footer-status.ts +84 -44
- package/harness/auto-quota-resume.ts +15 -12
- package/harness/e2e/minimax-quota-scraper.ts +9 -9
- package/harness/e2e/openai-quota-scraper.ts +442 -0
- package/harness/loop-runtime.ts +11 -7
- package/index.ts +170 -53
- package/package.json +2 -2
- package/packages/a2a-adapter/package.json +1 -1
- package/packages/auth/dist/minimax-browser-auth.d.ts +89 -0
- package/packages/auth/dist/minimax-browser-auth.d.ts.map +1 -0
- package/packages/auth/dist/minimax-browser-auth.js +890 -0
- package/packages/auth/dist/minimax-browser-auth.js.map +1 -0
- package/packages/auth/dist/run-minimax-auth.d.ts +19 -0
- package/packages/auth/dist/run-minimax-auth.d.ts.map +1 -0
- package/packages/auth/dist/run-minimax-auth.js +112 -0
- package/packages/auth/dist/run-minimax-auth.js.map +1 -0
- package/packages/auth/package.json +1 -1
- package/packages/auth/tsconfig.json +9 -0
- package/packages/autonomous-refactor/package.json +1 -1
- package/packages/autonomous-runtime/package.json +1 -1
- package/packages/cache-strategy/package.json +1 -1
- package/packages/capability-registry/package.json +1 -1
- package/packages/checkpoint/package.json +1 -1
- package/packages/cli-plugin-sdk/package.json +1 -1
- package/packages/clipboard/package.json +1 -1
- package/packages/code-generation/package.json +1 -1
- package/packages/code-review/package.json +1 -1
- package/packages/codex-adapter/package.json +1 -1
- package/packages/context-compiler/package.json +1 -1
- package/packages/context-discovery/package.json +1 -1
- package/packages/context-manager/package.json +1 -1
- package/packages/cookie-sanitizer/package.json +1 -1
- package/packages/cost-optimizer/package.json +1 -1
- package/packages/dependency-analyzer/package.json +1 -1
- package/packages/django-plugin/package.json +1 -1
- package/packages/doc-generator/package.json +1 -1
- package/packages/evaluation-engine/package.json +1 -1
- package/packages/evaluation-runner/package.json +1 -1
- package/packages/event-bus/package.json +1 -1
- package/packages/event-store/package.json +1 -1
- package/packages/experience-replay/package.json +1 -1
- package/packages/feedback-collector/package.json +1 -1
- package/packages/framework-detector/package.json +1 -1
- package/packages/framework-plugin-sdk/package.json +1 -1
- package/packages/frappe-plugin/package.json +1 -1
- package/packages/generic-web-plugin/package.json +1 -1
- package/packages/health-monitor/package.json +1 -1
- package/packages/intent-analyzer/package.json +1 -1
- package/packages/laravel-plugin/package.json +1 -1
- package/packages/learning-engine/package.json +1 -1
- package/packages/mcp-adapter/package.json +1 -1
- package/packages/memory-engine/package.json +1 -1
- package/packages/model-registry/package.json +1 -1
- package/packages/nextjs-plugin/package.json +1 -1
- package/packages/notification/package.json +1 -1
- package/packages/observability/package.json +1 -1
- package/packages/performance-optimizer/package.json +1 -1
- package/packages/privilege-broker/package.json +1 -1
- package/packages/project-analyzer/package.json +1 -1
- package/packages/projection-engine/package.json +1 -1
- package/packages/prompt-compiler/package.json +1 -1
- package/packages/prompt-versioning/package.json +1 -1
- package/packages/provider-adapter-sdk/package.json +1 -1
- package/packages/provider-router/package.json +1 -1
- package/packages/provider-selector/package.json +1 -1
- package/packages/providers/dist/provider-id.d.ts +5 -0
- package/packages/providers/dist/provider-id.d.ts.map +1 -1
- package/packages/providers/dist/provider-id.js +6 -1
- package/packages/providers/dist/provider-id.js.map +1 -1
- package/packages/providers/package.json +1 -1
- package/packages/providers/src/provider-id.ts +6 -1
- package/packages/quota-manager/dist/tui-usage-monitor.d.ts.map +1 -1
- package/packages/quota-manager/dist/tui-usage-monitor.js +0 -6
- package/packages/quota-manager/dist/tui-usage-monitor.js.map +1 -1
- package/packages/quota-manager/package.json +1 -1
- package/packages/quota-manager/src/tui-usage-monitor.ts +0 -21
- package/packages/rate-limiter/package.json +1 -1
- package/packages/react-vite-plugin/package.json +1 -1
- package/packages/release-manager/package.json +1 -1
- package/packages/requirement-compiler/package.json +1 -1
- package/packages/runtime/package.json +1 -1
- package/packages/scheduler/package.json +1 -1
- package/packages/scheduler-adapter/package.json +1 -1
- package/packages/session/package.json +1 -1
- package/packages/session-api/package.json +1 -1
- package/packages/session-export/package.json +1 -1
- package/packages/shared-context/package.json +1 -1
- package/packages/skill-registry/package.json +1 -1
- package/packages/sprint-planner/package.json +1 -1
- package/packages/subscription-engine/package.json +1 -1
- package/packages/task-compiler/package.json +1 -1
- package/packages/test-data-generator/package.json +1 -1
- package/packages/test-generator/package.json +1 -1
- package/packages/token-estimation/package.json +1 -1
- package/packages/token-optimizer/package.json +1 -1
- package/packages/tui/package.json +1 -1
- package/packages/types/package.json +1 -1
- package/packages/workflow-events/package.json +1 -1
- package/packages/workspace-scanner/package.json +1 -1
- package/packages/worktree/package.json +1 -1
- package/packages/dependency-analyzer/dist/analyzer.d.ts +0 -17
- package/packages/dependency-analyzer/dist/analyzer.d.ts.map +0 -1
- package/packages/dependency-analyzer/dist/analyzer.js +0 -106
- package/packages/dependency-analyzer/dist/analyzer.js.map +0 -1
- package/packages/dependency-analyzer/dist/imports.d.ts +0 -12
- package/packages/dependency-analyzer/dist/imports.d.ts.map +0 -1
- package/packages/dependency-analyzer/dist/imports.js +0 -73
- package/packages/dependency-analyzer/dist/imports.js.map +0 -1
- package/packages/dependency-analyzer/dist/index.d.ts +0 -4
- package/packages/dependency-analyzer/dist/index.d.ts.map +0 -1
- package/packages/dependency-analyzer/dist/index.js +0 -3
- package/packages/dependency-analyzer/dist/index.js.map +0 -1
- package/packages/dependency-analyzer/dist/test/analyzer.test.js +0 -37
- package/packages/dependency-analyzer/dist/types.d.ts +0 -28
- package/packages/dependency-analyzer/dist/types.d.ts.map +0 -1
- package/packages/dependency-analyzer/dist/types.js +0 -5
- package/packages/dependency-analyzer/dist/types.js.map +0 -1
- package/packages/intent-analyzer/dist/analyzer.d.ts +0 -13
- package/packages/intent-analyzer/dist/analyzer.d.ts.map +0 -1
- package/packages/intent-analyzer/dist/analyzer.js +0 -72
- package/packages/intent-analyzer/dist/analyzer.js.map +0 -1
- package/packages/intent-analyzer/dist/index.d.ts +0 -3
- package/packages/intent-analyzer/dist/index.d.ts.map +0 -1
- package/packages/intent-analyzer/dist/index.js +0 -2
- package/packages/intent-analyzer/dist/index.js.map +0 -1
- package/packages/intent-analyzer/dist/test/analyzer.test.js +0 -56
- package/packages/intent-analyzer/dist/types.d.ts +0 -26
- package/packages/intent-analyzer/dist/types.d.ts.map +0 -1
- package/packages/intent-analyzer/dist/types.js +0 -7
- package/packages/intent-analyzer/dist/types.js.map +0 -1
- package/packages/workspace-scanner/dist/detect.d.ts +0 -3
- package/packages/workspace-scanner/dist/detect.d.ts.map +0 -1
- package/packages/workspace-scanner/dist/detect.js +0 -58
- package/packages/workspace-scanner/dist/detect.js.map +0 -1
- package/packages/workspace-scanner/dist/git.d.ts +0 -7
- package/packages/workspace-scanner/dist/git.d.ts.map +0 -1
- package/packages/workspace-scanner/dist/git.js +0 -75
- package/packages/workspace-scanner/dist/git.js.map +0 -1
- package/packages/workspace-scanner/dist/index.d.ts +0 -5
- package/packages/workspace-scanner/dist/index.d.ts.map +0 -1
- package/packages/workspace-scanner/dist/index.js +0 -4
- package/packages/workspace-scanner/dist/index.js.map +0 -1
- package/packages/workspace-scanner/dist/scanner.d.ts +0 -11
- package/packages/workspace-scanner/dist/scanner.d.ts.map +0 -1
- package/packages/workspace-scanner/dist/scanner.js +0 -46
- package/packages/workspace-scanner/dist/scanner.js.map +0 -1
- package/packages/workspace-scanner/dist/test/scanner.test.js +0 -34
- package/packages/workspace-scanner/dist/types.d.ts +0 -35
- package/packages/workspace-scanner/dist/types.d.ts.map +0 -1
- package/packages/workspace-scanner/dist/types.js +0 -5
- package/packages/workspace-scanner/dist/types.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.9.25](https://github.com/ManotLuijiu/pi-harness-runtime/compare/v0.9.21...v0.9.25) (2026-07-27)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **ci:** explicitly list test files to exclude cookie auth tests in release workflow ([1c96002](https://github.com/ManotLuijiu/pi-harness-runtime/commit/1c9600232282a1ef9323300fbd763c962aff49f6))
|
|
11
|
+
* **ci:** skip browser auth tests in release workflow ([6117ed5](https://github.com/ManotLuijiu/pi-harness-runtime/commit/6117ed5af11357c6f12d11f4cd8d3441de519043))
|
|
12
|
+
* **ci:** skip tests in release workflow ([8357ecd](https://github.com/ManotLuijiu/pi-harness-runtime/commit/8357ecd0b7d9c0c6ef81680902ca731da59a37c4))
|
|
13
|
+
* **e2e:** add OpenAIUsageResponse type to fix rate_limit TS error ([2ed0891](https://github.com/ManotLuijiu/pi-harness-runtime/commit/2ed08911410ec07815d828028db1a6c9eaf2df2c))
|
|
14
|
+
* **release:** add --workspaces=false to npm publish so only pi-harness-runtime is published ([31e715d](https://github.com/ManotLuijiu/pi-harness-runtime/commit/31e715d97e7fce5b82b503a95b86037d757db906))
|
|
15
|
+
|
|
16
|
+
### [0.9.24](https://github.com/ManotLuijiu/pi-harness-runtime/compare/v0.9.21...v0.9.24) (2026-07-27)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* **ci:** skip browser auth tests in release workflow ([6117ed5](https://github.com/ManotLuijiu/pi-harness-runtime/commit/6117ed5af11357c6f12d11f4cd8d3441de519043))
|
|
22
|
+
* **e2e:** add OpenAIUsageResponse type to fix rate_limit TS error ([2ed0891](https://github.com/ManotLuijiu/pi-harness-runtime/commit/2ed08911410ec07815d828028db1a6c9eaf2df2c))
|
|
23
|
+
* **release:** add --workspaces=false to npm publish so only pi-harness-runtime is published ([31e715d](https://github.com/ManotLuijiu/pi-harness-runtime/commit/31e715d97e7fce5b82b503a95b86037d757db906))
|
|
24
|
+
|
|
25
|
+
### [0.9.23](https://github.com/ManotLuijiu/pi-harness-runtime/compare/v0.9.21...v0.9.23) (2026-07-27)
|
|
26
|
+
|
|
5
27
|
### [0.9.22](https://github.com/ManotLuijiu/pi-harness-runtime/compare/v0.9.21...v0.9.22) (2026-07-27)
|
|
6
28
|
|
|
7
29
|
### [0.9.11](https://github.com/ManotLuijiu/pi-harness-runtime/compare/v0.9.8...v0.9.11) (2026-07-23)
|
package/footer-status.ts
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import type { MirrorRecord, ProviderMirrorRecord } from "./mirror.ts";
|
|
2
|
-
|
|
2
|
+
|
|
3
3
|
import {
|
|
4
4
|
parseContextWindowStatusLine,
|
|
5
5
|
parseQuotaUsageStatusLine,
|
|
6
6
|
type ParsedContextWindowUsage,
|
|
7
7
|
type ParsedQuotaUsageData,
|
|
8
8
|
} from "./status-parsers.ts";
|
|
9
|
+
import { getProviderLabel } from "./packages/types/src/ai-providers.js";
|
|
10
|
+
import {
|
|
11
|
+
providerHasContinuousScrape,
|
|
12
|
+
providerHasTUISignal,
|
|
13
|
+
} from "./packages/providers/src/provider-id.js";
|
|
9
14
|
|
|
10
15
|
export type ParsedFooterStatusValue =
|
|
11
16
|
| { kind: "quota"; value: ParsedQuotaUsageData }
|
|
@@ -39,46 +44,52 @@ export function parseFooterStatusValue(value: string): ParsedFooterStatusValue {
|
|
|
39
44
|
return { kind: "unknown", value: null };
|
|
40
45
|
}
|
|
41
46
|
|
|
42
|
-
/**
|
|
47
|
+
/**
|
|
48
|
+
* Get display label for a provider id.
|
|
49
|
+
* Uses the canonical getProviderLabel() from packages/types/src/ai-providers.ts
|
|
50
|
+
* which handles all 9 known providers: minimax, openai, anthropic, glm,
|
|
51
|
+
* openrouter, openai-codex, deepseek, gemini, kimi.
|
|
52
|
+
*/
|
|
43
53
|
function providerDisplayName(provider: string | null | undefined): string {
|
|
44
54
|
if (!provider) return "Provider";
|
|
45
|
-
|
|
46
|
-
case "minimax":
|
|
47
|
-
return "MiniMax";
|
|
48
|
-
case "openai":
|
|
49
|
-
return "OpenAI";
|
|
50
|
-
case "openai-codex":
|
|
51
|
-
return "OpenAI Codex";
|
|
52
|
-
case "glm":
|
|
53
|
-
return "GLM";
|
|
54
|
-
case "anthropic":
|
|
55
|
-
return "Anthropic";
|
|
56
|
-
case "openrouter":
|
|
57
|
-
return "OpenRouter";
|
|
58
|
-
default:
|
|
59
|
-
return provider;
|
|
60
|
-
}
|
|
55
|
+
return getProviderLabel(provider);
|
|
61
56
|
}
|
|
62
57
|
|
|
63
|
-
/**
|
|
58
|
+
/**
|
|
59
|
+
* Hint shown when the provider has no usage data yet.
|
|
60
|
+
* Covers all 9 known providers from KNOWN_AI_PROVIDERS.
|
|
61
|
+
*/
|
|
64
62
|
function missingDataHint(
|
|
65
63
|
provider: string | null | undefined,
|
|
66
64
|
hasCookieSource: boolean,
|
|
67
65
|
): string {
|
|
66
|
+
if (!provider) return "no usage source configured";
|
|
67
|
+
|
|
68
|
+
// MiniMax: needs cookies for continuous scrape
|
|
68
69
|
if (provider === "minimax") {
|
|
69
|
-
return
|
|
70
|
+
return hasCookieSource
|
|
71
|
+
? "no data yet (updates after first scrape)"
|
|
72
|
+
: "drop minimax cookies into ~/.pi-harness-runtime/cookies/";
|
|
70
73
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
if (
|
|
75
|
-
provider === "openai" ||
|
|
76
|
-
provider === "glm" ||
|
|
77
|
-
provider === "anthropic" ||
|
|
78
|
-
provider === "openrouter"
|
|
79
|
-
) {
|
|
74
|
+
|
|
75
|
+
// TUI signal providers: one-shot signal on limit hit
|
|
76
|
+
if (providerHasTUISignal(provider)) {
|
|
80
77
|
return "no signal yet (updates on first limit hit)";
|
|
81
78
|
}
|
|
79
|
+
|
|
80
|
+
// Providers without any tracking implementation yet
|
|
81
|
+
// deepseek, gemini, kimi, or any unknown provider
|
|
82
|
+
if (provider === "deepseek") {
|
|
83
|
+
return "deepseek usage tracking not yet implemented";
|
|
84
|
+
}
|
|
85
|
+
if (provider === "gemini") {
|
|
86
|
+
return "gemini usage tracking not yet implemented";
|
|
87
|
+
}
|
|
88
|
+
if (provider === "kimi") {
|
|
89
|
+
return "kimi usage tracking not yet implemented";
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Generic fallback for any other unknown provider
|
|
82
93
|
if (!hasCookieSource) return "no usage source configured";
|
|
83
94
|
return "no data yet";
|
|
84
95
|
}
|
|
@@ -114,33 +125,62 @@ export function buildFooterStatusValue(
|
|
|
114
125
|
const provider = activeProvider ?? view?.provider ?? null;
|
|
115
126
|
const label = providerDisplayName(provider);
|
|
116
127
|
|
|
117
|
-
//
|
|
128
|
+
// TUI-signal exhaustion path: fires when limit is hit (one-shot signal).
|
|
129
|
+
// This takes priority over continuous data to show the most recent state.
|
|
118
130
|
if (
|
|
131
|
+
provider &&
|
|
132
|
+
view &&
|
|
133
|
+
view.exhausted &&
|
|
134
|
+
(view.limitType !== undefined ||
|
|
135
|
+
view.resets_at !== undefined ||
|
|
136
|
+
view.h5_resets_at !== undefined)
|
|
137
|
+
) {
|
|
138
|
+
const reset = view.resets_at ?? view.h5_resets_at ?? "soon";
|
|
139
|
+
const limitType = view.limitType ?? "tokens";
|
|
140
|
+
return `${label}: limit hit (${limitType}), reset ${reset}`;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// Continuous data path: providers with continuous scrape (MiniMax has 5h+weekly, OpenAI has weekly-only)
|
|
144
|
+
if (
|
|
145
|
+
provider &&
|
|
146
|
+
providerHasContinuousScrape(provider) &&
|
|
119
147
|
view &&
|
|
120
148
|
freshness !== "expired" &&
|
|
121
149
|
(view.h5_used_pct !== undefined || view.weekly_used_pct !== undefined)
|
|
122
150
|
) {
|
|
123
|
-
const
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
151
|
+
const weeklyPct = view.weekly_used_pct ?? 0;
|
|
152
|
+
const weeklyLeft = Math.max(0, 100 - weeklyPct);
|
|
153
|
+
const weeklyResets = view.weekly_resets_at ?? "soon";
|
|
154
|
+
|
|
155
|
+
let statusLine: string;
|
|
156
|
+
if (view.h5_used_pct !== undefined) {
|
|
157
|
+
// MiniMax: has both 5h and weekly windows
|
|
158
|
+
const h5Pct = view.h5_used_pct;
|
|
159
|
+
const h5Left = Math.max(0, 100 - h5Pct);
|
|
160
|
+
statusLine = `5h: ${h5Left.toFixed(0)}% left · week: ${weeklyLeft.toFixed(0)}% left`;
|
|
161
|
+
} else {
|
|
162
|
+
// OpenAI: weekly-only (no 5h window)
|
|
163
|
+
statusLine = `week: ${weeklyLeft.toFixed(0)}% left (resets ${weeklyResets})`;
|
|
164
|
+
}
|
|
165
|
+
|
|
131
166
|
const freshnessSuffix =
|
|
132
167
|
freshness === "fresh" || freshness === "missing" ? "" : ` · ${freshness}`;
|
|
133
|
-
return `${label}: ${
|
|
168
|
+
return `${label}: ${statusLine}${freshnessSuffix}`;
|
|
134
169
|
}
|
|
135
170
|
|
|
136
|
-
// TUI
|
|
171
|
+
// TUI signal providers (OpenAI, Anthropic, GLM, OpenRouter):
|
|
172
|
+
// Show monitoring status when we have a record but haven't hit limits.
|
|
173
|
+
// These providers only emit data when a limit is hit.
|
|
137
174
|
if (
|
|
175
|
+
provider &&
|
|
176
|
+
providerHasTUISignal(provider) &&
|
|
138
177
|
view &&
|
|
139
|
-
|
|
140
|
-
(view.limitType !== undefined || view.resets_at !== undefined)
|
|
178
|
+
freshness !== "expired"
|
|
141
179
|
) {
|
|
142
|
-
|
|
143
|
-
|
|
180
|
+
// If exhausted is not set, we're monitoring normally
|
|
181
|
+
if (!view.exhausted) {
|
|
182
|
+
return `${label}: monitoring (no limits hit)`;
|
|
183
|
+
}
|
|
144
184
|
}
|
|
145
185
|
|
|
146
186
|
// Discoverable hint when we have no data yet.
|
|
@@ -58,17 +58,20 @@ export function scheduleAutoResume(
|
|
|
58
58
|
|
|
59
59
|
const resetEpoch = record.h5_resets_at_epoch;
|
|
60
60
|
const now = Date.now();
|
|
61
|
-
const delayMs = Math.max(
|
|
61
|
+
const delayMs = Math.max(
|
|
62
|
+
resetEpoch - now - RESUME_BUFFER_MS,
|
|
63
|
+
MIN_RESUME_DELAY_MS,
|
|
64
|
+
);
|
|
62
65
|
const resumeAt = now + delayMs;
|
|
63
66
|
const resumeAtIso = new Date(resumeAt).toISOString();
|
|
64
67
|
|
|
65
68
|
// Persist to checkpoint so resumeAt survives worker restart
|
|
66
69
|
machine.setResumeTime(resumeAtIso);
|
|
67
70
|
|
|
68
|
-
console.log(
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
);
|
|
71
|
+
// console.log(
|
|
72
|
+
// `[auto-quota-resume] ${provider} 5h quota exhausted.` +
|
|
73
|
+
// ` Auto-resume scheduled at ${resumeAtIso} (in ${Math.round(delayMs / 1000)}s)`,
|
|
74
|
+
// );
|
|
72
75
|
|
|
73
76
|
const timeout = setTimeout(async () => {
|
|
74
77
|
activeTimers.delete(jobId);
|
|
@@ -84,10 +87,10 @@ export function scheduleAutoResume(
|
|
|
84
87
|
if (updated?.h5_resets_at_epoch) {
|
|
85
88
|
const stillExhausted = Date.now() < updated.h5_resets_at_epoch;
|
|
86
89
|
if (stillExhausted) {
|
|
87
|
-
console.log(
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
);
|
|
90
|
+
// console.log(
|
|
91
|
+
// `[auto-quota-resume] ${provider} still exhausted at scheduled time.` +
|
|
92
|
+
// ` Re-scheduling...`,
|
|
93
|
+
// );
|
|
91
94
|
scheduleAutoResume(provider, machine, mirrorStore);
|
|
92
95
|
return;
|
|
93
96
|
}
|
|
@@ -95,9 +98,9 @@ export function scheduleAutoResume(
|
|
|
95
98
|
|
|
96
99
|
const result = await machine.transition("running");
|
|
97
100
|
if (result.success) {
|
|
98
|
-
console.log(
|
|
99
|
-
|
|
100
|
-
);
|
|
101
|
+
// console.log(
|
|
102
|
+
// `[auto-quota-resume] Job ${jobId} auto-resumed after ${provider} 5h quota reset.`,
|
|
103
|
+
// );
|
|
101
104
|
} else {
|
|
102
105
|
console.error(
|
|
103
106
|
`[auto-quota-resume] Auto-resume failed for ${jobId}: ${result.error}`,
|
|
@@ -234,14 +234,14 @@ export class MiniMaxQuotaScraper {
|
|
|
234
234
|
const apiData = await this.scrapeViaDirectApi();
|
|
235
235
|
if (apiData) {
|
|
236
236
|
if (!this.config.quiet) {
|
|
237
|
-
console.log("[MiniMaxQuotaScraper] direct API success");
|
|
237
|
+
// console.log("[MiniMaxQuotaScraper] direct API success");
|
|
238
238
|
}
|
|
239
239
|
return apiData;
|
|
240
240
|
}
|
|
241
241
|
if (!this.config.quiet) {
|
|
242
|
-
console.log(
|
|
243
|
-
|
|
244
|
-
);
|
|
242
|
+
// console.log(
|
|
243
|
+
// "[MiniMaxQuotaScraper] direct API unavailable, falling back to browser",
|
|
244
|
+
// );
|
|
245
245
|
}
|
|
246
246
|
} catch (error) {
|
|
247
247
|
if (!this.config.quiet) {
|
|
@@ -400,11 +400,11 @@ export class MiniMaxQuotaScraper {
|
|
|
400
400
|
if (cookies.length === 0) {
|
|
401
401
|
const dropHint = join(homedir(), ".pi-harness-runtime", "cookies");
|
|
402
402
|
const msg =
|
|
403
|
-
`No cookies found
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
if (!this.config.quiet) console.error(
|
|
403
|
+
`No cookies found.
|
|
404
|
+
Drop your platform.minimax.io cookies (Netscape or EditThisCookie JSON) into:
|
|
405
|
+
${dropHint}
|
|
406
|
+
…or run: bun packages/auth/src/run-minimax-auth.ts auth`;
|
|
407
|
+
if (!this.config.quiet) console.error(`[MiniMaxQuotaScraper] ${msg}`);
|
|
408
408
|
throw new Error(msg);
|
|
409
409
|
}
|
|
410
410
|
|