pi-harness-runtime 1.1.7 → 1.1.10
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 +30 -0
- package/index.ts +27 -28
- package/package.json +1 -1
- package/packages/clipboard-plugin/dist/index.d.ts.map +1 -1
- package/packages/clipboard-plugin/dist/index.js +4 -1
- package/packages/clipboard-plugin/dist/index.js.map +1 -1
- package/packages/clipboard-plugin/src/index.ts +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,36 @@
|
|
|
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
|
+
### [1.1.10](https://github.com/ManotLuijiu/pi-harness-runtime/compare/v0.10.42...v1.1.10) (2026-08-20)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* add quota scrapers for ChatGPT and GLM providers ([17f9d0e](https://github.com/ManotLuijiu/pi-harness-runtime/commit/17f9d0e7d6f486210a30244f2fecc0131e8b7d57))
|
|
11
|
+
* improve Playwright Prompt ([24ac09b](https://github.com/ManotLuijiu/pi-harness-runtime/commit/24ac09b75f5d79924a7a0c9e47cdacc9da143a68))
|
|
12
|
+
* index.ts ([d0fc002](https://github.com/ManotLuijiu/pi-harness-runtime/commit/d0fc002d6d16e59318155677cb6128846bc993a4))
|
|
13
|
+
* update workflow run name to show version number ([ee8c59f](https://github.com/ManotLuijiu/pi-harness-runtime/commit/ee8c59fec4c0116a5948b2ae04ad4609edaed3ac))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* add typescript as devDependency, build notification dist ([c76b522](https://github.com/ManotLuijiu/pi-harness-runtime/commit/c76b5221c33262c38615c6117ecf9db13ab7b5d2))
|
|
19
|
+
* **clipboard-plugin:** return proper content array format in tool result ([400bbdb](https://github.com/ManotLuijiu/pi-harness-runtime/commit/400bbdbe2b17a8c31571942a7ccacc2c2f4f56bc))
|
|
20
|
+
* configure npm to use OIDC auth method for trusted publishing ([0b9042e](https://github.com/ManotLuijiu/pi-harness-runtime/commit/0b9042e49726ece53f5bfccd0afa7eceac5e75ec))
|
|
21
|
+
* debug run name update API call ([0301d44](https://github.com/ManotLuijiu/pi-harness-runtime/commit/0301d44d260315147c4f5445ec83d80ed2f9bcfc))
|
|
22
|
+
* properly configure npm auth for publish workflow ([f4fe31a](https://github.com/ManotLuijiu/pi-harness-runtime/commit/f4fe31a9096ce3fb065f4fbbfe7db74eaad620b3))
|
|
23
|
+
* refresh footer status on periodic quota refresh ([59885a1](https://github.com/ManotLuijiu/pi-harness-runtime/commit/59885a14e8261b0aa03e5ae6d11651bb5c40671a))
|
|
24
|
+
* remove console override that was crashing pi ([b8d1d02](https://github.com/ManotLuijiu/pi-harness-runtime/commit/b8d1d029c773fd16a6f52e08186eb687f4d2cbbc))
|
|
25
|
+
* remove develop branch trigger from release workflow ([28da559](https://github.com/ManotLuijiu/pi-harness-runtime/commit/28da559ccd3cbb7860a409b1d52436aad175ca07))
|
|
26
|
+
* remove invalid cache: false option ([00079b6](https://github.com/ManotLuijiu/pi-harness-runtime/commit/00079b6fe4ad59fedc2464d3c8c8309897d6a543))
|
|
27
|
+
* remove token config - use OIDC trusted publishing only ([177d395](https://github.com/ManotLuijiu/pi-harness-runtime/commit/177d3956194fe2196cd11491c7b42257eaf0ca95))
|
|
28
|
+
* resolve merge conflict in package.json, release v1.1.6 ([a976a73](https://github.com/ManotLuijiu/pi-harness-runtime/commit/a976a73bf5210dfd1f20477850c40ef336235f64))
|
|
29
|
+
* unset OIDC env vars before npm publish ([463e88c](https://github.com/ManotLuijiu/pi-harness-runtime/commit/463e88c92a1687e1620584fb7efe672f7782d535))
|
|
30
|
+
* use curl for updating run name (gh CLI not available in runner) ([1d0701d](https://github.com/ManotLuijiu/pi-harness-runtime/commit/1d0701d3d5ea73b4eeaddee64bce2ee0e93cc89b))
|
|
31
|
+
* use Node.js 24 for OIDC trusted publishing ([8a74380](https://github.com/ManotLuijiu/pi-harness-runtime/commit/8a74380eb95b8cfbea627f0332a5e79853592431))
|
|
32
|
+
* use npm-publish action instead of direct npm publish ([4c7218c](https://github.com/ManotLuijiu/pi-harness-runtime/commit/4c7218c99436703dd0a210c3866f35dc305911f5))
|
|
33
|
+
* use OIDC Trusted Publishing instead of token auth ([01626b5](https://github.com/ManotLuijiu/pi-harness-runtime/commit/01626b579f77d67d965c3a276bd5e9a3bcf1f67b))
|
|
34
|
+
|
|
5
35
|
### [0.10.30](https://github.com/ManotLuijiu/pi-harness-runtime/compare/v0.10.29...v0.10.30) (2026-08-11)
|
|
6
36
|
|
|
7
37
|
|
package/index.ts
CHANGED
|
@@ -204,7 +204,9 @@ function ensureHarnessDir() {
|
|
|
204
204
|
}
|
|
205
205
|
|
|
206
206
|
async function getCheckpointManager(): Promise<CheckpointManager> {
|
|
207
|
-
const { JsonCheckpointManager } = await import(
|
|
207
|
+
const { JsonCheckpointManager } = await import(
|
|
208
|
+
"./packages/checkpoint/src/checkpoint-manager.ts"
|
|
209
|
+
);
|
|
208
210
|
return new JsonCheckpointManager(
|
|
209
211
|
HARNESS_ROOT_DIR,
|
|
210
212
|
) as unknown as CheckpointManager;
|
|
@@ -446,8 +448,8 @@ Run \`bd ready\` to see current tasks.
|
|
|
446
448
|
const MINIMAX_REFRESH_TOKEN_THRESHOLD = 200_000;
|
|
447
449
|
const MINIMAX_REFRESH_REQUEST_THRESHOLD = 12;
|
|
448
450
|
const quotaScraper = process.env.QUOTA_COOKIE_FILE
|
|
449
|
-
? new MiniMaxQuotaScraper({ cookieFile: process.env.QUOTA_COOKIE_FILE })
|
|
450
|
-
: new MiniMaxQuotaScraper();
|
|
451
|
+
? new MiniMaxQuotaScraper({ cookieFile: process.env.QUOTA_COOKIE_FILE, quiet: true })
|
|
452
|
+
: new MiniMaxQuotaScraper({ quiet: true });
|
|
451
453
|
|
|
452
454
|
// --- Smart quota fetch for OpenAI status -------------------------
|
|
453
455
|
const OPENAI_REFRESH_MIN_INTERVAL_MS = 5 * 60 * 1000; // 5 minutes
|
|
@@ -552,10 +554,7 @@ Run \`bd ready\` to see current tasks.
|
|
|
552
554
|
"Drop folder sync still works — polling will resume automatically.",
|
|
553
555
|
);
|
|
554
556
|
} else {
|
|
555
|
-
console.error(
|
|
556
|
-
"[pi-harness] cookie-sanitizer watcher failed to start:",
|
|
557
|
-
msg,
|
|
558
|
-
);
|
|
557
|
+
console.error("[pi-harness] cookie-sanitizer watcher failed to start:", msg);
|
|
559
558
|
}
|
|
560
559
|
}
|
|
561
560
|
|
|
@@ -637,7 +636,9 @@ Run \`bd ready\` to see current tasks.
|
|
|
637
636
|
|
|
638
637
|
async function hasBrowserProfileAutoFetchSource(): Promise<boolean> {
|
|
639
638
|
try {
|
|
640
|
-
const { getLiveSessionPath, getStatusPath } = await import(
|
|
639
|
+
const { getLiveSessionPath, getStatusPath } = await import(
|
|
640
|
+
"./packages/auth/src/minimax-browser-auth.ts"
|
|
641
|
+
);
|
|
641
642
|
return existsSync(getLiveSessionPath()) || existsSync(getStatusPath());
|
|
642
643
|
} catch {
|
|
643
644
|
return false;
|
|
@@ -697,7 +698,9 @@ Run \`bd ready\` to see current tasks.
|
|
|
697
698
|
}
|
|
698
699
|
|
|
699
700
|
try {
|
|
700
|
-
const { scrapeWithExistingProfile } = await import(
|
|
701
|
+
const { scrapeWithExistingProfile } = await import(
|
|
702
|
+
"./packages/auth/src/minimax-browser-auth.ts"
|
|
703
|
+
);
|
|
701
704
|
const status = await scrapeWithExistingProfile({ quiet: true });
|
|
702
705
|
if (
|
|
703
706
|
status.page_url.includes("unified-login") ||
|
|
@@ -714,10 +717,7 @@ Run \`bd ready\` to see current tasks.
|
|
|
714
717
|
}
|
|
715
718
|
|
|
716
719
|
const parsed = parseMiniMaxQuotaText(rawText);
|
|
717
|
-
if (
|
|
718
|
-
parsed.h5UsedPct === undefined &&
|
|
719
|
-
parsed.weeklyUsedPct === undefined
|
|
720
|
-
) {
|
|
720
|
+
if (parsed.h5UsedPct === undefined && parsed.weeklyUsedPct === undefined) {
|
|
721
721
|
return null;
|
|
722
722
|
}
|
|
723
723
|
|
|
@@ -744,8 +744,7 @@ Run \`bd ready\` to see current tasks.
|
|
|
744
744
|
suppressErrors?: boolean;
|
|
745
745
|
}): Promise<boolean> {
|
|
746
746
|
const suppressErrors = options?.suppressErrors === true;
|
|
747
|
-
const profileRecord =
|
|
748
|
-
await autoFetchQuotaFromBrowserProfile(suppressErrors);
|
|
747
|
+
const profileRecord = await autoFetchQuotaFromBrowserProfile(suppressErrors);
|
|
749
748
|
if (profileRecord) {
|
|
750
749
|
writeMirrorRecord("minimax", {
|
|
751
750
|
synced_at: profileRecord.synced_at,
|
|
@@ -926,8 +925,7 @@ Run \`bd ready\` to see current tasks.
|
|
|
926
925
|
description: "Force refresh quota from provider console",
|
|
927
926
|
handler: async (_args: string, ctx: ExtensionCommandContext) => {
|
|
928
927
|
const autoFetchAvailable =
|
|
929
|
-
cookieQuotaAutoFetchAvailable ||
|
|
930
|
-
(await hasBrowserProfileAutoFetchSource());
|
|
928
|
+
cookieQuotaAutoFetchAvailable || (await hasBrowserProfileAutoFetchSource());
|
|
931
929
|
if (!autoFetchAvailable) {
|
|
932
930
|
ctx.ui.notify(
|
|
933
931
|
"MiniMax cookies not found. Drop any cookie file (Netscape or EditThisCookie JSON) into ~/.pi-harness-runtime/cookies/ — the runtime normalizes it for you. Or run `bun packages/auth/src/run-minimax-auth.ts auth`.",
|
|
@@ -1160,10 +1158,7 @@ Run \`bd ready\` to see current tasks.
|
|
|
1160
1158
|
return;
|
|
1161
1159
|
}
|
|
1162
1160
|
|
|
1163
|
-
const lines = [
|
|
1164
|
-
`Tasks for Job ${currentSession.jobId}`,
|
|
1165
|
-
`${"-".repeat(50)}`,
|
|
1166
|
-
];
|
|
1161
|
+
const lines = [`Tasks for Job ${currentSession.jobId}`, `${"-".repeat(50)}`];
|
|
1167
1162
|
|
|
1168
1163
|
for (const task of tasks) {
|
|
1169
1164
|
const status = task.status.padEnd(10);
|
|
@@ -1391,6 +1386,16 @@ Run \`bd ready\` to see current tasks.
|
|
|
1391
1386
|
// so this is safe to call frequently.
|
|
1392
1387
|
setInterval(() => {
|
|
1393
1388
|
void maybeAutoFetchQuota(lastActiveProvider ?? null);
|
|
1389
|
+
// Also refresh footer status so user sees updated quota data
|
|
1390
|
+
if (footerStatusCtx) {
|
|
1391
|
+
refreshFooterStatus(
|
|
1392
|
+
footerStatusCtx,
|
|
1393
|
+
tracker,
|
|
1394
|
+
mirrorStore,
|
|
1395
|
+
hasCookieSource,
|
|
1396
|
+
() => lastActiveProvider,
|
|
1397
|
+
);
|
|
1398
|
+
}
|
|
1394
1399
|
}, MINIMAX_REFRESH_MIN_INTERVAL_MS);
|
|
1395
1400
|
|
|
1396
1401
|
function queueAutoResume(
|
|
@@ -1474,12 +1479,6 @@ function refreshFooterStatus(
|
|
|
1474
1479
|
const freshness = mirrorStore.freshness(mirror, nowMs);
|
|
1475
1480
|
ctx.ui.setStatus(
|
|
1476
1481
|
"harness-runtime",
|
|
1477
|
-
buildFooterStatusValue(
|
|
1478
|
-
local,
|
|
1479
|
-
mirror,
|
|
1480
|
-
freshness,
|
|
1481
|
-
hasCookieSource(),
|
|
1482
|
-
provider,
|
|
1483
|
-
),
|
|
1482
|
+
buildFooterStatusValue(local, mirror, freshness, hasCookieSource(), provider),
|
|
1484
1483
|
);
|
|
1485
1484
|
}
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAGlF,YAAY,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAExD;;;GAGG;AACH,wBAAgB,yBAAyB,IAAI,aAAa,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAGlF,YAAY,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAExD;;;GAGG;AACH,wBAAgB,yBAAyB,IAAI,aAAa,CAwBzD;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,IAAI,kBAAkB,CAahE;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAC3C,EAAE,EAAE,OAAO,EACX,GAAG,EAAE,OAAO,GACV,IAAI,CAGN;AAED;;GAEG;eACY,yBAAyB"}
|
|
@@ -24,7 +24,10 @@ export function createClipboardBridgeTool() {
|
|
|
24
24
|
},
|
|
25
25
|
execute: async () => {
|
|
26
26
|
const content = pasteFromBridge();
|
|
27
|
-
|
|
27
|
+
if (!content) {
|
|
28
|
+
return { content: [], isError: false };
|
|
29
|
+
}
|
|
30
|
+
return { content: [{ type: "text", text: content }] };
|
|
28
31
|
},
|
|
29
32
|
},
|
|
30
33
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAIvE;;;GAGG;AACH,MAAM,UAAU,yBAAyB;IACxC,OAAO;QACN,UAAU,EAAE,MAAM;QAClB,IAAI,EAAE,kBAAkB;QACxB,KAAK,EAAE;YACN;gBACC,IAAI,EAAE,mBAAmB;gBACzB,WAAW,EAAE,kEAAkE;gBAC/E,UAAU,EAAE;oBACX,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE,EAAE;oBACd,QAAQ,EAAE,EAAE;iBACZ;gBACD,OAAO,EAAE,KAAK,IAAI,EAAE;oBACnB,MAAM,OAAO,G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9D,qBAAqB,CAAC,EAAS,EAAE,GAAU,CAAC,CAAC;AAC9C,CAAC;AAED;;GAEG;AACH,eAAe,yBAAyB,CAAC"}
|
|
@@ -29,7 +29,10 @@ export function createClipboardBridgeTool(): ToolExtension {
|
|
|
29
29
|
},
|
|
30
30
|
execute: async () => {
|
|
31
31
|
const content = pasteFromBridge();
|
|
32
|
-
|
|
32
|
+
if (!content) {
|
|
33
|
+
return { content: [], isError: false };
|
|
34
|
+
}
|
|
35
|
+
return { content: [{ type: "text", text: content }] };
|
|
33
36
|
},
|
|
34
37
|
},
|
|
35
38
|
],
|