github-router 0.3.373 → 0.3.375
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/dist/ado-tools-BOW1k1KW.js +1 -0
- package/dist/{aic-ledger-Cp7Yk9-Q.js → aic-ledger-CeSXqTEE.js} +5 -7
- package/dist/{aic-ledger-Cp7Yk9-Q.js.map → aic-ledger-CeSXqTEE.js.map} +1 -1
- package/dist/{aic-statusline-settings-B5EMMSFC.js → aic-statusline-settings-BKveu679.js} +3 -4
- package/dist/{aic-statusline-settings-B5EMMSFC.js.map → aic-statusline-settings-BKveu679.js.map} +1 -1
- package/dist/{attribution-settings-DZ8fEfvP.js → attribution-settings-Cs6CsXK3.js} +33 -53
- package/dist/{attribution-settings-DZ8fEfvP.js.map → attribution-settings-Cs6CsXK3.js.map} +1 -1
- package/dist/{auth-B1egtvt4.js → auth-BZHpTtfF.js} +5 -6
- package/dist/{auth-B1egtvt4.js.map → auth-BZHpTtfF.js.map} +1 -1
- package/dist/{balanced-profile-contract-Dm_usmw7.js → balanced-profile-contract-B6pSoWjm.js} +2 -3
- package/dist/{balanced-profile-contract-Dm_usmw7.js.map → balanced-profile-contract-B6pSoWjm.js.map} +1 -1
- package/dist/{bluebird-client-ByCRusGQ.js → bluebird-client-BasIdv5J.js} +8 -12
- package/dist/{bluebird-client-ByCRusGQ.js.map → bluebird-client-BasIdv5J.js.map} +1 -1
- package/dist/{bluebird-client-CY6NBHQu.js → bluebird-client-BvoMTmEv.js} +1 -1
- package/dist/browser-bridge/index.js +84 -55
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/{check-usage-T_z84Pgc.js → check-usage-BlIWDuV2.js} +5 -6
- package/dist/{check-usage-T_z84Pgc.js.map → check-usage-BlIWDuV2.js.map} +1 -1
- package/dist/{claude-8ksmV0dC.js → claude-Q1yfHGGE.js} +37 -43
- package/dist/{claude-8ksmV0dC.js.map → claude-Q1yfHGGE.js.map} +1 -1
- package/dist/{claude-md-injection-BnzVv_aB.js → claude-md-injection-DU5KYXNc.js} +6 -7
- package/dist/{claude-md-injection-BnzVv_aB.js.map → claude-md-injection-DU5KYXNc.js.map} +1 -1
- package/dist/{client-CQMfroGV.js → client-Bjp3XAMK.js} +3 -5
- package/dist/{client-CQMfroGV.js.map → client-Bjp3XAMK.js.map} +1 -1
- package/dist/{codex-C89FoaaG.js → codex-BuOUR6lB.js} +10 -11
- package/dist/{codex-C89FoaaG.js.map → codex-BuOUR6lB.js.map} +1 -1
- package/dist/{copilot-discount-T-cfWmc4.js → copilot-discount-CHNQLYDJ.js} +3 -4
- package/dist/{copilot-discount-T-cfWmc4.js.map → copilot-discount-CHNQLYDJ.js.map} +1 -1
- package/dist/{debug-DL2JsRqY.js → debug-1HUHCWFl.js} +3 -4
- package/dist/{debug-DL2JsRqY.js.map → debug-1HUHCWFl.js.map} +1 -1
- package/dist/engine-BC4TF4pt.js +1 -0
- package/dist/{exec-Bf8g_bIR.js → exec-BC0MAnoA.js} +2 -3
- package/dist/{exec-Bf8g_bIR.js.map → exec-BC0MAnoA.js.map} +1 -1
- package/dist/{fast-profile-contract-JOnZBgFB.js → fast-profile-contract-BLnKg0Ay.js} +2 -3
- package/dist/{fast-profile-contract-JOnZBgFB.js.map → fast-profile-contract-BLnKg0Ay.js.map} +1 -1
- package/dist/{gate-discovery-Bc9FdRwg.js → gate-discovery-DiXu_olc.js} +8 -10
- package/dist/{gate-discovery-Bc9FdRwg.js.map → gate-discovery-DiXu_olc.js.map} +1 -1
- package/dist/{get-copilot-usage-BSXeQEx8.js → get-copilot-usage-CKg42gSH.js} +5 -6
- package/dist/{get-copilot-usage-BSXeQEx8.js.map → get-copilot-usage-CKg42gSH.js.map} +1 -1
- package/dist/{hook-mcp-client-DERIkeR7.js → hook-mcp-client-CYx10nlU.js} +2 -3
- package/dist/hook-mcp-client-CYx10nlU.js.map +1 -0
- package/dist/hooks.mjs +1766 -1548
- package/dist/hooks.sha256 +1 -1
- package/dist/{index-cmd-DOhwt92u.js → index-cmd-BPXhTfGQ.js} +8 -9
- package/dist/index-cmd-BPXhTfGQ.js.map +1 -0
- package/dist/{internal-aic-status-CY0QxSa7.js → internal-aic-status-FQB1DQzX.js} +6 -8
- package/dist/{internal-aic-status-CY0QxSa7.js.map → internal-aic-status-FQB1DQzX.js.map} +1 -1
- package/dist/{internal-artifact-open-NAGn9Mgt.js → internal-artifact-open-DbHjipxU.js} +5 -7
- package/dist/{internal-artifact-open-NAGn9Mgt.js.map → internal-artifact-open-DbHjipxU.js.map} +1 -1
- package/dist/{internal-fast-dispatch-guard-De_DJOyZ.js → internal-fast-dispatch-guard-DMzqs-r8.js} +1 -1
- package/dist/{internal-fast-dispatch-guard-_n-A8hgo.js → internal-fast-dispatch-guard-PDdlkPU3.js} +6 -8
- package/dist/{internal-fast-dispatch-guard-_n-A8hgo.js.map → internal-fast-dispatch-guard-PDdlkPU3.js.map} +1 -1
- package/dist/{internal-first-mate-guard-GufCUMl3.js → internal-first-mate-guard-4Yro9xNM.js} +5 -7
- package/dist/{internal-first-mate-guard-GufCUMl3.js.map → internal-first-mate-guard-4Yro9xNM.js.map} +1 -1
- package/dist/{internal-first-mate-guard-C8GwLbaX.js → internal-first-mate-guard-BxPDUsV3.js} +1 -1
- package/dist/{internal-max-dispatch-guard-4rh6KSd8.js → internal-max-dispatch-guard-D3L00YXj.js} +5 -7
- package/dist/{internal-max-dispatch-guard-4rh6KSd8.js.map → internal-max-dispatch-guard-D3L00YXj.js.map} +1 -1
- package/dist/{internal-max-dispatch-guard-CKnzgJje.js → internal-max-dispatch-guard-fhBX_w49.js} +1 -1
- package/dist/{internal-plan-review-ChFx8wTX.js → internal-plan-review-BfHLeszV.js} +6 -7
- package/dist/{internal-plan-review-ChFx8wTX.js.map → internal-plan-review-BfHLeszV.js.map} +1 -1
- package/dist/{internal-prompt-submit-BW5g3MjD.js → internal-prompt-submit-BbnaMF2R.js} +7 -8
- package/dist/{internal-prompt-submit-BW5g3MjD.js.map → internal-prompt-submit-BbnaMF2R.js.map} +1 -1
- package/dist/{internal-prompt-submit-C4uDwr7G.js → internal-prompt-submit-DKzCckz-.js} +2 -2
- package/dist/{internal-rebrief-DvBS8myn.js → internal-rebrief-aEvxp7jw.js} +7 -9
- package/dist/{internal-rebrief-DvBS8myn.js.map → internal-rebrief-aEvxp7jw.js.map} +1 -1
- package/dist/{internal-session-bind-dsUOcKxU.js → internal-session-bind-pN1V11Mn.js} +3 -4
- package/dist/{internal-session-bind-dsUOcKxU.js.map → internal-session-bind-pN1V11Mn.js.map} +1 -1
- package/dist/{internal-stop-hook-nS91Jkda.js → internal-stop-hook-VQuOYpUC.js} +9 -10
- package/dist/{internal-stop-hook-nS91Jkda.js.map → internal-stop-hook-VQuOYpUC.js.map} +1 -1
- package/dist/{internal-stop-review-D_KEV_04.js → internal-stop-review-BWp-4XWW.js} +4 -5
- package/dist/{internal-stop-review-D_KEV_04.js.map → internal-stop-review-BWp-4XWW.js.map} +1 -1
- package/dist/{internal-worker-guard-DB6shBIn.js → internal-worker-guard-C9OZPgzu.js} +3 -4
- package/dist/{internal-worker-guard-DB6shBIn.js.map → internal-worker-guard-C9OZPgzu.js.map} +1 -1
- package/dist/{internal-workspace-header-DBg5Y7oN.js → internal-workspace-header-B4TXFBLU.js} +3 -4
- package/dist/{internal-workspace-header-DBg5Y7oN.js.map → internal-workspace-header-B4TXFBLU.js.map} +1 -1
- package/dist/lib/tree-sitter-pool/{lifecycle-Dx0SnP7Z.js → lifecycle-BPpOigPZ.js} +1 -2
- package/dist/lib/tree-sitter-pool/{lifecycle-C7W8D2lx.js → lifecycle-C3vsqXjS.js} +1 -3
- package/dist/lib/tree-sitter-pool/worker.js +29 -35
- package/dist/lifecycle-BENRuuX6.js +1 -0
- package/dist/{lifecycle-K9oVtGde.mjs → lifecycle-DBKu1T5r.mjs} +0 -1
- package/dist/{lifecycle-Gge2Dadd.js → lifecycle-Dh9y8OF1.js} +3 -4
- package/dist/{lifecycle-Gge2Dadd.js.map → lifecycle-Dh9y8OF1.js.map} +1 -1
- package/dist/lifecycle-Dli9vGI2.js +1 -0
- package/dist/{lifecycle-9nX09dBl.js → lifecycle-vjHAFCaY.js} +4 -6
- package/dist/{lifecycle-9nX09dBl.js.map → lifecycle-vjHAFCaY.js.map} +1 -1
- package/dist/main.js +26 -27
- package/dist/{max-profile-contract-CRj7N211.js → max-profile-contract-DLLTsSs2.js} +5 -8
- package/dist/{max-profile-contract-CRj7N211.js.map → max-profile-contract-DLLTsSs2.js.map} +1 -1
- package/dist/{mcp-workspace-header-Xw9B1W6T.js → mcp-workspace-header-C5-dOWNa.js} +3 -4
- package/dist/{mcp-workspace-header-Xw9B1W6T.js.map → mcp-workspace-header-C5-dOWNa.js.map} +1 -1
- package/dist/{models-Ca-HQTYi.js → models-B6nH1sS6.js} +4 -5
- package/dist/{models-Ca-HQTYi.js.map → models-B6nH1sS6.js.map} +1 -1
- package/dist/{orchestration-D3-2ulhX.js → orchestration-B93jxrWI.js} +4 -5
- package/dist/{orchestration-D3-2ulhX.js.map → orchestration-B93jxrWI.js.map} +1 -1
- package/dist/{package-root-B-osctCk.js → package-root-BXgdIM3q.js} +2 -3
- package/dist/{package-root-B-osctCk.js.map → package-root-BXgdIM3q.js.map} +1 -1
- package/dist/paths-Be9_ujQ3.js +1 -0
- package/dist/{paths-C5477RGC.js → paths-CVEO8jEH.js} +5 -7
- package/dist/{paths-C5477RGC.js.map → paths-CVEO8jEH.js.map} +1 -1
- package/dist/{peer-mcp-personas-BSxDj9sJ.js → peer-mcp-personas-Cv21q_YR.js} +244 -372
- package/dist/peer-mcp-personas-Cv21q_YR.js.map +1 -0
- package/dist/{pi-BglhJ6n_.js → pi-B5qq1G6b.js} +84 -36
- package/dist/pi-B5qq1G6b.js.map +1 -0
- package/dist/{pi-memory-bridge-DEU1SUDz.js → pi-memory-bridge-Dvj1T3e3.js} +2 -3
- package/dist/{pi-memory-bridge-DEU1SUDz.js.map → pi-memory-bridge-Dvj1T3e3.js.map} +1 -1
- package/dist/{plan-review-hook-C9K-em4D.js → plan-review-hook-MhjK92wq.js} +5 -6
- package/dist/{plan-review-hook-C9K-em4D.js.map → plan-review-hook-MhjK92wq.js.map} +1 -1
- package/dist/{provision-B0GNohdl.js → provision-CRmtV6ew.js} +10 -14
- package/dist/{provision-B0GNohdl.js.map → provision-CRmtV6ew.js.map} +1 -1
- package/dist/rolldown-runtime-D3PmRqjj.js +4 -0
- package/dist/{self-invocation-BtcGj-lY.js → self-invocation-DMUnXVGT.js} +5 -7
- package/dist/{self-invocation-BtcGj-lY.js.map → self-invocation-DMUnXVGT.js.map} +1 -1
- package/dist/{serve-BxZq9vNl.js → serve-wl5FKum-.js} +24 -30
- package/dist/{serve-BxZq9vNl.js.map → serve-wl5FKum-.js.map} +1 -1
- package/dist/{server-setup-BLdWCcby.js → server-setup-Ck_FRAEt.js} +67 -117
- package/dist/{server-setup-BLdWCcby.js.map → server-setup-Ck_FRAEt.js.map} +1 -1
- package/dist/{service-backend-BV2hHjuB.js → service-backend-Ce6b2XEe.js} +112 -130
- package/dist/service-backend-Ce6b2XEe.js.map +1 -0
- package/dist/{start-C3Zb8XMT.js → start-CsMY6_qY.js} +6 -8
- package/dist/{start-C3Zb8XMT.js.map → start-CsMY6_qY.js.map} +1 -1
- package/dist/{state-DzsaGHr9.js → state-CCGDJ43X.js} +2 -3
- package/dist/{state-DzsaGHr9.js.map → state-CCGDJ43X.js.map} +1 -1
- package/dist/{static-context-pack-CsOAC87F.js → static-context-pack-DwC69_VA.js} +14 -24
- package/dist/{static-context-pack-CsOAC87F.js.map → static-context-pack-DwC69_VA.js.map} +1 -1
- package/dist/{stop-gate-hook-DnLC09Lg.js → stop-gate-hook-CBVLD8iB.js} +9 -14
- package/dist/{stop-gate-hook-DnLC09Lg.js.map → stop-gate-hook-CBVLD8iB.js.map} +1 -1
- package/dist/{stop-gate-policy-Dx9c98_d.js → stop-gate-policy-BehNiNix.js} +4 -5
- package/dist/{stop-gate-policy-Dx9c98_d.js.map → stop-gate-policy-BehNiNix.js.map} +1 -1
- package/dist/{token-Dqjs5ixP.js → token-CPzYxU4Y.js} +16 -28
- package/dist/{token-Dqjs5ixP.js.map → token-CPzYxU4Y.js.map} +1 -1
- package/dist/{token-CVG0yI_j.js → token-DHEkiO4g.js} +3 -4
- package/dist/{token-CVG0yI_j.js.map → token-DHEkiO4g.js.map} +1 -1
- package/dist/{upstream-retry-i1k1Xai2.js → upstream-retry-VNR-bCuT.js} +2 -3
- package/dist/{upstream-retry-i1k1Xai2.js.map → upstream-retry-VNR-bCuT.js.map} +1 -1
- package/dist/{version-C8x2hQrZ.js → version-CTqwKr26.js} +3 -4
- package/dist/{version-C8x2hQrZ.js.map → version-CTqwKr26.js.map} +1 -1
- package/dist/{worker-dispatch-B1w2qfjX.js → worker-dispatch-C7RtNOXv.js} +3 -4
- package/dist/{worker-dispatch-B1w2qfjX.js.map → worker-dispatch-C7RtNOXv.js.map} +1 -1
- package/dist/{workiq-qnJR5_n2.js → workiq-CQauEAMc.js} +3 -4
- package/dist/{workiq-qnJR5_n2.js.map → workiq-CQauEAMc.js.map} +1 -1
- package/dist/{workiq-tools-C6LAF_vA.js → workiq-tools-7n2xXMrQ.js} +1 -1
- package/package.json +18 -15
- package/dist/ado-tools-WDyisN8w.js +0 -1
- package/dist/engine-C207cikp.js +0 -1
- package/dist/hook-mcp-client-DERIkeR7.js.map +0 -1
- package/dist/index-cmd-DOhwt92u.js.map +0 -1
- package/dist/lifecycle-C_CT13c9.js +0 -1
- package/dist/lifecycle-DibiH857.js +0 -1
- package/dist/paths-CEswtFj5.js +0 -1
- package/dist/peer-mcp-personas-BSxDj9sJ.js.map +0 -1
- package/dist/pi-BglhJ6n_.js.map +0 -1
- package/dist/service-backend-BV2hHjuB.js.map +0 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as
|
|
3
|
-
import { t as
|
|
4
|
-
import { t as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { t as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
1
|
+
import { H as profileDescriptor, I as formatBalancedPrerequisiteFailure, S as enableFileLogging, U as resolveLaunchProfile, V as formatLocalPrerequisiteFailure, W as validateBalancedProfilePrerequisites, Y as validateLocalProfilePrerequisites, Z as runSelfUpdate, _ as sweepStalePiAgentMirrors, a as setupAndServe, c as PI_MIN_VERSION, d as meetsPiMinVersion, f as refreshPiInBackground, g as removeOwnPiAgentMirror, h as ensurePiAgentMirror, i as parseSharedArgs, l as ensurePiInstalled, m as updatePi, o as sharedServerArgs, p as resolvePiRegistry, q as validateCheapestProfilePrerequisites, r as getPiLaunchEnvVars, s as LAUNCH_SECRET_HEADER, u as getInstalledPiVersion, v as startKeepAwake, y as stopKeepAwake, z as formatCheapestPrerequisiteFailure } from "./server-setup-Ck_FRAEt.js";
|
|
2
|
+
import { i as buildAicStatusHookCommand, n as AIC_STATUSLINE_DISABLE_ENV, t as AIC_LEDGER_ENV } from "./aic-statusline-settings-BKveu679.js";
|
|
3
|
+
import { d as removeAicLedgerFile, f as sweepStaleAicLedgerFiles, n as aicSnapshot, o as formatAicExitSummary, t as aicLedgerPath } from "./aic-ledger-CeSXqTEE.js";
|
|
4
|
+
import { n as formatDiscountedCostTable, t as discountedUsdForSnapshot } from "./copilot-discount-CHNQLYDJ.js";
|
|
5
|
+
import { r as resolveSelfInvocation } from "./self-invocation-DMUnXVGT.js";
|
|
6
|
+
import { t as PATHS } from "./paths-CVEO8jEH.js";
|
|
7
|
+
import { t as FRESH_CONSULT_CONTRACT } from "./claude-md-injection-DU5KYXNc.js";
|
|
8
|
+
import { Bn as colbertDegradedWarning, Bt as cloudAgentToolsEnabled, D as toolbeltEnabled, Dt as artifactToolsEnabled, Gn as LOCAL_CONSULT_REDACTION_NOTE, Mn as provisionBrowserAssets, Nt as browserToolsEnabled, Qt as kustoToolsEnabled, Sn as unregisterLaunch, Tt as adoToolsEnabled, Vn as provisionAndIndexColbert, Wn as LOCAL_CONSULT_REDACTION_LINE, bn as registerLaunch, fn as configureLocalEgress, jt as browseAgentEnabled, pn as localBaseUrl, sn as workiqToolsEnabled } from "./peer-mcp-personas-Cv21q_YR.js";
|
|
9
|
+
import { C as localContractFor, O as LOCAL_PROFILE_TIER_MODELS, S as local2AdvisorContract, _ as isBalancedFamily, b as isLocalFamily, f as balancedContractFor, h as consultIsLocalTransport, p as cheapestContractFor, v as isCheapestFamily, y as isCheaplocalProfile } from "./static-context-pack-DwC69_VA.js";
|
|
10
|
+
import { i as launchChild, t as provisionToolbelt } from "./provision-CRmtV6ew.js";
|
|
11
|
+
import { t as state } from "./state-CCGDJ43X.js";
|
|
12
|
+
import { t as getPackageVersion } from "./version-CTqwKr26.js";
|
|
13
|
+
import { P as warmTreeSitterPool } from "./service-backend-Ce6b2XEe.js";
|
|
14
14
|
import { defineCommand } from "citty";
|
|
15
15
|
import consola from "consola";
|
|
16
16
|
import { existsSync } from "node:fs";
|
|
@@ -18,7 +18,7 @@ import path from "node:path";
|
|
|
18
18
|
import { createHash, randomBytes } from "node:crypto";
|
|
19
19
|
import fs$1 from "node:fs/promises";
|
|
20
20
|
import process$1 from "node:process";
|
|
21
|
-
|
|
21
|
+
// src/lib/pi-tier-windows.ts
|
|
22
22
|
/**
|
|
23
23
|
* Copilot Default-tier (cheap) input-token thresholds per model.
|
|
24
24
|
*
|
|
@@ -120,8 +120,7 @@ function liveInputPer1M(models) {
|
|
|
120
120
|
function warnOnTierPriceDriftForModels(models) {
|
|
121
121
|
warnOnTierPriceDrift(liveInputPer1M(models));
|
|
122
122
|
}
|
|
123
|
-
|
|
124
|
-
//#region src/lib/pi-statusline.ts
|
|
123
|
+
// src/lib/pi-statusline.ts
|
|
125
124
|
/**
|
|
126
125
|
* Pi footer statusline: Claude-shaped payload builder + launch constants.
|
|
127
126
|
*
|
|
@@ -288,8 +287,7 @@ function buildPiStatusPayload(source, opts) {
|
|
|
288
287
|
worktree: null
|
|
289
288
|
};
|
|
290
289
|
}
|
|
291
|
-
|
|
292
|
-
//#region src/lib/pi-package-cache.ts
|
|
290
|
+
// src/lib/pi-package-cache.ts
|
|
293
291
|
/**
|
|
294
292
|
* Persistent npm-package cache for Pi launches.
|
|
295
293
|
*
|
|
@@ -439,8 +437,7 @@ async function sweepStalePiPackageCaches() {
|
|
|
439
437
|
}
|
|
440
438
|
}));
|
|
441
439
|
}
|
|
442
|
-
|
|
443
|
-
//#region src/lib/pi-models-settings.ts
|
|
440
|
+
// src/lib/pi-models-settings.ts
|
|
444
441
|
/**
|
|
445
442
|
* Pi thinking levels that can appear in `thinkingLevelMap`. `off` is
|
|
446
443
|
* omitted: it means "no reasoning" and is never mapped to a provider
|
|
@@ -795,6 +792,41 @@ function buildPiModelsJson(opts) {
|
|
|
795
792
|
} } };
|
|
796
793
|
}
|
|
797
794
|
/**
|
|
795
|
+
* Local-family compaction reserve: 80% of the 200K window.
|
|
796
|
+
*
|
|
797
|
+
* The Copilot derivation below optimises for a price cliff; the local
|
|
798
|
+
* endpoint has none, so the binding constraint there is the summarization
|
|
799
|
+
* request itself. Measured on the live endpoint (`https://…:11111`):
|
|
800
|
+
* with `thinking` enabled the generated ceiling is `thinking.budget_tokens`,
|
|
801
|
+
* NOT `max_tokens` — `max_tokens=25904, budget=16384` stops at exactly
|
|
802
|
+
* 16384 output tokens with `stop_reason: max_tokens`, and `budget=30000`
|
|
803
|
+
* returns 30000. Pi then maps that stop to `length` and
|
|
804
|
+
* `getSummarizationFailure` refuses the truncated summary
|
|
805
|
+
* (`generation hit the token cap and the summary is incomplete`).
|
|
806
|
+
*
|
|
807
|
+
* Triggering at 160K instead of Pi's 183K default leaves the clamp enough
|
|
808
|
+
* room that the 32768 budget below is reachable: at a 160K estimate
|
|
809
|
+
* `clampMaxTokensToContext` yields 32768, so the provider sends
|
|
810
|
+
* `budget = min(32768, 32768 − 1024)`. Raised reserves alone are not enough
|
|
811
|
+
* (the budget, not the trigger, is the ceiling) — both halves ship together.
|
|
812
|
+
*/
|
|
813
|
+
const PI_LOCAL_COMPACTION_RESERVE_TOKENS = 4e4;
|
|
814
|
+
/**
|
|
815
|
+
* Thinking budgets for LOCAL launches only.
|
|
816
|
+
*
|
|
817
|
+
* Pi merges these over its `{minimal:1024, low:2048, medium:8192, high:16384}`
|
|
818
|
+
* defaults, and `high` is the level the local rows resolve to (their rows
|
|
819
|
+
* carry no `thinkingLevelMap`, so `clampReasoning` walks `max`/`xhigh` down
|
|
820
|
+
* to `high`). 16384 is the ceiling that truncates real summaries — 5 of the
|
|
821
|
+
* 19 compactions in the reference session reported output above it, up to
|
|
822
|
+
* 21643. 32768 roughly doubles the summarization headroom and costs nothing
|
|
823
|
+
* on local inference.
|
|
824
|
+
*
|
|
825
|
+
* Deliberately NOT emitted for Copilot profiles: there the thinking budget
|
|
826
|
+
* is billed reasoning tokens on every turn, not a free local decode.
|
|
827
|
+
*/
|
|
828
|
+
const PI_LOCAL_THINKING_BUDGETS = Object.freeze({ high: 32768 });
|
|
829
|
+
/**
|
|
798
830
|
* Derive Pi compaction budgets from live catalog `max_prompt_tokens`
|
|
799
831
|
* ceilings AND each model's cheap-tier window — the Pi-native analogue
|
|
800
832
|
* of `deriveAutoCompactWindowTokens`. Pi triggers at
|
|
@@ -806,14 +838,34 @@ function buildPiModelsJson(opts) {
|
|
|
806
838
|
* safe); overrides carry each model's own value. Unknown catalog (no
|
|
807
839
|
* prompt metadata) → Pi built-in defaults so a missing signal can never
|
|
808
840
|
* disable compaction.
|
|
841
|
+
*
|
|
842
|
+
* LOCAL launches take a different path entirely (see
|
|
843
|
+
* `PI_LOCAL_COMPACTION_RESERVE_TOKENS`): the local catalog carries no
|
|
844
|
+
* `max_prompt_tokens`, so the price-cliff derivation has nothing to read,
|
|
845
|
+
* and the constraint that matters is the endpoint's thinking-budget
|
|
846
|
+
* ceiling. Every local row is the same 200K window, so one flat reserve
|
|
847
|
+
* covers the whole roster.
|
|
809
848
|
*/
|
|
810
|
-
function derivePiCompactionSettings(catalog, modelIds) {
|
|
849
|
+
function derivePiCompactionSettings(catalog, modelIds, profileId) {
|
|
811
850
|
const FALLBACK = {
|
|
812
851
|
enabled: true,
|
|
813
852
|
reserveTokens: 16384,
|
|
814
853
|
keepRecentTokens: 2e4,
|
|
815
854
|
modelOverrides: {}
|
|
816
855
|
};
|
|
856
|
+
if (profileId !== void 0 && isLocalFamily(profileId)) {
|
|
857
|
+
const localOverrides = {};
|
|
858
|
+
for (const id of modelIds) localOverrides[`${PI_PROVIDER_NAME}/${id}`] = {
|
|
859
|
+
reserveTokens: PI_LOCAL_COMPACTION_RESERVE_TOKENS,
|
|
860
|
+
keepRecentTokens: 2e4
|
|
861
|
+
};
|
|
862
|
+
return {
|
|
863
|
+
enabled: true,
|
|
864
|
+
reserveTokens: PI_LOCAL_COMPACTION_RESERVE_TOKENS,
|
|
865
|
+
keepRecentTokens: 2e4,
|
|
866
|
+
modelOverrides: localOverrides
|
|
867
|
+
};
|
|
868
|
+
}
|
|
817
869
|
if (!catalog || catalog.length === 0) return FALLBACK;
|
|
818
870
|
const perModel = /* @__PURE__ */ new Map();
|
|
819
871
|
for (const id of modelIds) {
|
|
@@ -1132,7 +1184,8 @@ function buildPiSettingsJson(opts) {
|
|
|
1132
1184
|
reserveTokens: 16384,
|
|
1133
1185
|
skipPrompt: false
|
|
1134
1186
|
},
|
|
1135
|
-
compaction: derivePiCompactionSettings(opts.catalog, modelIds),
|
|
1187
|
+
compaction: derivePiCompactionSettings(opts.catalog, modelIds, opts.profileId),
|
|
1188
|
+
...isLocalFamily(opts.profileId) ? { thinkingBudgets: { ...PI_LOCAL_THINKING_BUDGETS } } : {},
|
|
1136
1189
|
retry: {
|
|
1137
1190
|
enabled: true,
|
|
1138
1191
|
maxRetries: 3,
|
|
@@ -1370,8 +1423,7 @@ function buildPiAppendSystem(profileId, opts = {}) {
|
|
|
1370
1423
|
lines.push("", `(${PI_MIN_VERSION_NOTE})`, "");
|
|
1371
1424
|
return lines.join("\n");
|
|
1372
1425
|
}
|
|
1373
|
-
|
|
1374
|
-
//#region src/lib/pi-plan-mode.ts
|
|
1426
|
+
// src/lib/pi-plan-mode.ts
|
|
1375
1427
|
/**
|
|
1376
1428
|
* Strip markdown noise from one step's text.
|
|
1377
1429
|
*
|
|
@@ -2132,8 +2184,7 @@ function buildPiPlanModeSection() {
|
|
|
2132
2184
|
``
|
|
2133
2185
|
];
|
|
2134
2186
|
}
|
|
2135
|
-
|
|
2136
|
-
//#region src/lib/pi-extension.ts
|
|
2187
|
+
// src/lib/pi-extension.ts
|
|
2137
2188
|
/**
|
|
2138
2189
|
* The gh-router Pi extension source, generated per launch into the
|
|
2139
2190
|
* isolated mirror (`extensions/gh-router-pi/index.ts`).
|
|
@@ -2738,8 +2789,7 @@ function buildPiPrompts(opts) {
|
|
|
2738
2789
|
});
|
|
2739
2790
|
return prompts;
|
|
2740
2791
|
}
|
|
2741
|
-
|
|
2742
|
-
//#region src/lib/pi-mcp-config.ts
|
|
2792
|
+
// src/lib/pi-mcp-config.ts
|
|
2743
2793
|
/**
|
|
2744
2794
|
* Pi's MCP surface for the router's scoped groups.
|
|
2745
2795
|
*
|
|
@@ -3030,8 +3080,7 @@ async function findShadowedKeys(workspace, keys) {
|
|
|
3030
3080
|
}
|
|
3031
3081
|
return found;
|
|
3032
3082
|
}
|
|
3033
|
-
|
|
3034
|
-
//#region src/pi.ts
|
|
3083
|
+
// src/pi.ts
|
|
3035
3084
|
const piArgs = {
|
|
3036
3085
|
...sharedServerArgs,
|
|
3037
3086
|
model: {
|
|
@@ -3341,7 +3390,7 @@ const pi = defineCommand({
|
|
|
3341
3390
|
if (!bridgeDisabled) {
|
|
3342
3391
|
const passthrough = collectPiPassthroughArgs(rawArgs, piArgs);
|
|
3343
3392
|
if (!(passthrough.includes("--no-context-files") || passthrough.includes("-nc"))) try {
|
|
3344
|
-
const { collectBridgeInputs } = await import("./pi-memory-bridge-
|
|
3393
|
+
const { collectBridgeInputs } = await import("./pi-memory-bridge-Dvj1T3e3.js");
|
|
3345
3394
|
const collected = await collectBridgeInputs(process$1.cwd());
|
|
3346
3395
|
bridgeStats = {
|
|
3347
3396
|
staticFiles: collected.copilotInstructions.length + collected.unscopedRules.length + collected.userGlobal.length,
|
|
@@ -3392,7 +3441,7 @@ const pi = defineCommand({
|
|
|
3392
3441
|
try {
|
|
3393
3442
|
const collected = globalThis.__ghRouterBridgeCollected;
|
|
3394
3443
|
if (collected) {
|
|
3395
|
-
const { buildMirrorBridgeSection, mergeBridgeIntoAgentsMd } = await import("./pi-memory-bridge-
|
|
3444
|
+
const { buildMirrorBridgeSection, mergeBridgeIntoAgentsMd } = await import("./pi-memory-bridge-Dvj1T3e3.js");
|
|
3396
3445
|
const { section } = buildMirrorBridgeSection(collected, { repoRoot: process$1.cwd() });
|
|
3397
3446
|
const agentsPath = path.join(mirror, "AGENTS.md");
|
|
3398
3447
|
let existing;
|
|
@@ -3473,8 +3522,8 @@ const pi = defineCommand({
|
|
|
3473
3522
|
serverUrl
|
|
3474
3523
|
})}\n`);
|
|
3475
3524
|
if (sweEnabled && !peersEnabled) process$1.stderr.write("Note: --swe without --peers emits no delegate/review skills or prompts (no agents behind them in a peerless launch).\n");
|
|
3476
|
-
const { disposeBluebirdClients } = await import("./bluebird-client-
|
|
3477
|
-
const { disposeAdoClients } = await import("./ado-tools-
|
|
3525
|
+
const { disposeBluebirdClients } = await import("./bluebird-client-BvoMTmEv.js");
|
|
3526
|
+
const { disposeAdoClients } = await import("./ado-tools-BOW1k1KW.js");
|
|
3478
3527
|
launchChild({
|
|
3479
3528
|
kind: "pi",
|
|
3480
3529
|
envVars: {
|
|
@@ -3509,7 +3558,6 @@ const pi = defineCommand({
|
|
|
3509
3558
|
});
|
|
3510
3559
|
}
|
|
3511
3560
|
});
|
|
3512
|
-
//#endregion
|
|
3513
3561
|
export { pi };
|
|
3514
3562
|
|
|
3515
|
-
//# sourceMappingURL=pi-
|
|
3563
|
+
//# sourceMappingURL=pi-B5qq1G6b.js.map
|