github-router 0.3.369 → 0.3.371
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-512UGB6R.js +1 -0
- package/dist/{aic-ledger-_mvGW2Ev.js → aic-ledger-Cp7Yk9-Q.js} +2 -2
- package/dist/{aic-ledger-_mvGW2Ev.js.map → aic-ledger-Cp7Yk9-Q.js.map} +1 -1
- package/dist/{attribution-settings-zoBxw08y.js → attribution-settings-Beer9wsJ.js} +6 -6
- package/dist/{attribution-settings-zoBxw08y.js.map → attribution-settings-Beer9wsJ.js.map} +1 -1
- package/dist/{auth-B3UvYB2r.js → auth-B1egtvt4.js} +3 -3
- package/dist/{auth-B3UvYB2r.js.map → auth-B1egtvt4.js.map} +1 -1
- package/dist/{bluebird-client-C29-JOkG.js → bluebird-client-ByCRusGQ.js} +3 -3
- package/dist/bluebird-client-ByCRusGQ.js.map +1 -0
- package/dist/bluebird-client-CY6NBHQu.js +1 -0
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/{check-usage-45vyaLfl.js → check-usage-T_z84Pgc.js} +3 -3
- package/dist/{check-usage-45vyaLfl.js.map → check-usage-T_z84Pgc.js.map} +1 -1
- package/dist/{claude-BbIfnWbm.js → claude-CAYTTiyt.js} +18 -15
- package/dist/claude-CAYTTiyt.js.map +1 -0
- package/dist/{claude-md-injection-BtBG1RBZ.js → claude-md-injection-D1aMjvb_.js} +3 -3
- package/dist/{claude-md-injection-BtBG1RBZ.js.map → claude-md-injection-D1aMjvb_.js.map} +1 -1
- package/dist/{codex-CZVlP2tB.js → codex-CALX-qG4.js} +8 -8
- package/dist/{codex-CZVlP2tB.js.map → codex-CALX-qG4.js.map} +1 -1
- package/dist/{copilot-discount-BuDbQOHq.js → copilot-discount-T-cfWmc4.js} +2 -2
- package/dist/{copilot-discount-BuDbQOHq.js.map → copilot-discount-T-cfWmc4.js.map} +1 -1
- package/dist/engine-CSAEqj2p.js +1 -0
- package/dist/{gate-discovery-BYyYeUnn.js → gate-discovery-CITKjhsD.js} +2 -2
- package/dist/{gate-discovery-BYyYeUnn.js.map → gate-discovery-CITKjhsD.js.map} +1 -1
- package/dist/{get-copilot-usage-BbGmK03C.js → get-copilot-usage-BSXeQEx8.js} +3 -3
- package/dist/{get-copilot-usage-BbGmK03C.js.map → get-copilot-usage-BSXeQEx8.js.map} +1 -1
- package/dist/hooks.mjs +2 -0
- package/dist/hooks.sha256 +1 -1
- package/dist/{internal-aic-status-BAVomi5A.js → internal-aic-status-CY0QxSa7.js} +3 -3
- package/dist/{internal-aic-status-BAVomi5A.js.map → internal-aic-status-CY0QxSa7.js.map} +1 -1
- package/dist/{internal-max-dispatch-guard-BodVFHRC.js → internal-max-dispatch-guard-4rh6KSd8.js} +2 -2
- package/dist/{internal-max-dispatch-guard-BodVFHRC.js.map → internal-max-dispatch-guard-4rh6KSd8.js.map} +1 -1
- package/dist/{internal-max-dispatch-guard-BB0vwiPx.js → internal-max-dispatch-guard-CKnzgJje.js} +1 -1
- package/dist/{internal-stop-hook-BbyobGUU.js → internal-stop-hook-DT27bzH7.js} +2 -2
- package/dist/{internal-stop-hook-BbyobGUU.js.map → internal-stop-hook-DT27bzH7.js.map} +1 -1
- package/dist/main.js +12 -11
- package/dist/main.js.map +1 -1
- package/dist/{max-profile-contract-Cx5_Z1Y7.js → max-profile-contract-CRj7N211.js} +2 -2
- package/dist/{max-profile-contract-Cx5_Z1Y7.js.map → max-profile-contract-CRj7N211.js.map} +1 -1
- package/dist/{models-BR6i348u.js → models-Ca-HQTYi.js} +2 -2
- package/dist/{models-BR6i348u.js.map → models-Ca-HQTYi.js.map} +1 -1
- package/dist/{peer-mcp-personas-DNtWI2C1.js → peer-mcp-personas-D7vaM-V5.js} +813 -59
- package/dist/peer-mcp-personas-D7vaM-V5.js.map +1 -0
- package/dist/{pi-Bc-MVgAo.js → pi-D4LrdubN.js} +16 -13
- package/dist/{pi-Bc-MVgAo.js.map → pi-D4LrdubN.js.map} +1 -1
- package/dist/{provision-DUWdcY_a.js → provision-DonGTIfK.js} +3 -2
- package/dist/provision-DonGTIfK.js.map +1 -0
- package/dist/{serve-CmWOTR7m.js → serve-jzmQ8KEE.js} +18 -10
- package/dist/serve-jzmQ8KEE.js.map +1 -0
- package/dist/{server-setup-CIzmDJzT.js → server-setup-wWidNq5m.js} +73 -28
- package/dist/server-setup-wWidNq5m.js.map +1 -0
- package/dist/{start-rlpaeAtx.js → start-CTluQxu5.js} +3 -3
- package/dist/{start-rlpaeAtx.js.map → start-CTluQxu5.js.map} +1 -1
- package/dist/{state-CiwCLVDZ.js → state-DzsaGHr9.js} +3 -1
- package/dist/{state-CiwCLVDZ.js.map → state-DzsaGHr9.js.map} +1 -1
- package/dist/token-CVG0yI_j.js +480 -0
- package/dist/token-CVG0yI_j.js.map +1 -0
- package/dist/{token-OTb61rOC.js → token-Dqjs5ixP.js} +3 -3
- package/dist/{token-OTb61rOC.js.map → token-Dqjs5ixP.js.map} +1 -1
- package/dist/workiq-qnJR5_n2.js +144 -0
- package/dist/workiq-qnJR5_n2.js.map +1 -0
- package/dist/workiq-tools-CDLIrILp.js +1 -0
- package/package.json +1 -1
- package/dist/ado-tools-C0sY_rX1.js +0 -1
- package/dist/bluebird-client-C29-JOkG.js.map +0 -1
- package/dist/bluebird-client-DGE3WZqh.js +0 -1
- package/dist/claude-BbIfnWbm.js.map +0 -1
- package/dist/engine-DeIo-VIR.js +0 -1
- package/dist/peer-mcp-personas-DNtWI2C1.js.map +0 -1
- package/dist/provision-DUWdcY_a.js.map +0 -1
- package/dist/serve-CmWOTR7m.js.map +0 -1
- package/dist/server-setup-CIzmDJzT.js.map +0 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { I as provisionTreeSitterAssets, L as withInstallLock } from "./service-backend-B6D_DY1Z.js";
|
|
2
2
|
import { t as getPackageVersion } from "./version-C8x2hQrZ.js";
|
|
3
3
|
import { i as ensurePaths, t as PATHS } from "./paths-C5477RGC.js";
|
|
4
|
-
import { t as state } from "./state-
|
|
5
|
-
import {
|
|
4
|
+
import { t as state } from "./state-DzsaGHr9.js";
|
|
5
|
+
import { C as copilotHeaders, S as copilotBaseUrl, c as cacheVSCodeVersion, f as resolveModel, i as tryRefreshAndRetry, l as filterBetaHeader, n as setupGitHubAgentToken, o as cacheCopilotVersion, p as sleep, r as setupGitHubToken, s as cacheModels, t as setupCopilotToken, u as isNullish, v as HTTPError, y as forwardError } from "./token-Dqjs5ixP.js";
|
|
6
6
|
import { r as fetchWithTransientRetry } from "./upstream-retry-i1k1Xai2.js";
|
|
7
|
-
import { t as getCopilotUsage } from "./get-copilot-usage-
|
|
7
|
+
import { t as getCopilotUsage } from "./get-copilot-usage-BSXeQEx8.js";
|
|
8
8
|
import { a as parseBoolEnv, c as runCommandCapture, i as killManagedTree, s as resolveExecutable, u as runCommandVoid } from "./exec-Bf8g_bIR.js";
|
|
9
9
|
import { c as FAST_PROFILE_MODELS, l as FAST_PROFILE_NATIVE_AGENT_NAMES, r as FAST_PROFILE_ADVISOR_MODEL } from "./fast-profile-contract-JOnZBgFB.js";
|
|
10
|
-
import { $ as buildAnthropicErrorEvent, $n as
|
|
10
|
+
import { $ as buildAnthropicErrorEvent, $n as UPSTREAM_FETCH_TIMEOUT_MS, An as parseJsonOrDiagnose, B as FAST_ADVISOR_TOOL_INSTRUCTIONS, Cn as assembleResponsesPayload, Ct as ADO_DEFAULT_TOOLSETS, D as toolbeltEnabled, Dn as createChatCompletions, En as createResponses, Et as agentToolsEnabled, F as ADVISOR_TOOL_INSTRUCTIONS, G as isAdvisorRequested, H as LOCAL_REVIEWER_ADVISOR_TOOL_INSTRUCTIONS, I as CHEAPEST_ADVISOR_TOOL_INSTRUCTIONS, In as normalizeCloudAgentEnvironment, J as resolveCuratedAdvisorModel, Jn as BUDGET_SMALL_FAST_SLUG, K as resolveAdvisorEffort, Kn as toolbeltPathOverride, L as CHEAPEST_REVIEWER_ADVISOR_TOOL_INSTRUCTIONS, Ln as normalizeKustoClusterUri, Mn as effectiveLocalProfile, N as searchWeb, Nn as normalizeOpenAIUsage, On as MAX_RESPONSE_BODY_BYTES, P as ADVISOR_INTERNAL_TOOL_NAME, Q as repairRejectedThinkingHistory, R as CHEAPLOCAL_ADVISOR_TOOL_INSTRUCTIONS, St as provisionAdoTools, Tn as resolveMcpToolTimeoutMs, U as buildAdvisorStream, V as LOCAL_ADVISOR_TOOL_INSTRUCTIONS, W as injectAdvisorTool, X as rememberThinkingHistoryRepair, Y as formatThinkingRepairDecline, Z as repairKnownThinkingHistory, _n as LAUNCH_BOUND_TOKEN_PREFIX, _r as CHEAP_PROFILE_SUBAGENT_CONTEXT_TOKENS, _t as provisionWorkiqTools, ar as upstreamAllowH2, at as EFFORT_ORDER, cn as shimDefaultsToXhigh, cr as catalogAdvertises1M, ct as clampEffort, dn as getTokenizerFromModel, dr as withOneMSuffixForLead, dt as normalizeAnthropicUsageInPlace, er as UPSTREAM_INACTIVITY_TIMEOUT_MS, et as buildOpenAIErrorEvent, fr as CHEAP_PROFILE_ADVISOR_CLIENT_MODEL, ft as handleMcpDelete, gn as createMessages, hn as countTokens, i as assertMcpToolSurfaceConsistent, it as relayAnthropicStream, jn as assertCopilotModelAllowed, kn as readResponseBodyCapped, ln as getTextTokenCount, lr as oneMContextDisabled, lt as anthropicUsageNormalizeDisabled, mn as localSessionId, mr as CHEAP_PROFILE_NATIVE_AGENT_NAMES, nr as isBudgetClaudeLead, nt as logStreamError, or as upstreamMaxConnections, ot as UNKNOWN_EFFORT_ANCHOR, pn as localBaseUrl, pr as CHEAP_PROFILE_MODELS, pt as handleMcpPost, q as resolveAdvisorModel, rt as readIteratorWithTimeout, sr as classifyMessagesRoute, st as bucketEffort, tr as generateRandomPort, tt as isControllerClosedError, un as getTokenCount, ur as withOneMSuffix, ut as createAnthropicUsageRewriteTransform, vn as findLaunchBySecret, wn as warnOnTokenPriceDrift, wt as normalizeAdoToolsets, xn as rememberLaunchSessionId, z as CHEAPLOCAL_REVIEWER_ADVISOR_TOOL_INSTRUCTIONS } from "./peer-mcp-personas-D7vaM-V5.js";
|
|
11
11
|
import { D as LOCAL_PROFILE_TIER_MODELS, F as CHEAPEST_PROFILE_NATIVE_AGENT_NAMES, P as CHEAPEST_PROFILE_MODELS, S as localContractFor, _ as isCheapestFamily, b as isPinnedLaunchProfile, f as balancedContractFor, g as isBalancedFamily, h as displayModelName, k as CHEAPEST_PROFILE_ADVISOR_CLIENT_MODEL, p as cheapestContractFor, x as local2AdvisorContract, y as isLocalFamily } from "./static-context-pack-DvwLWlbe.js";
|
|
12
12
|
import { i as BALANCED_PROFILE_NATIVE_AGENT_NAMES, r as BALANCED_PROFILE_MODELS } from "./balanced-profile-contract-Dm_usmw7.js";
|
|
13
|
-
import { A as normalizeTrailingOneMSuffix, a as MAX_PROFILE_NATIVE_AGENT_NAMES, d as maxAdvisorPinIsValid, h as maxOpusModel, i as MAX_PROFILE_MODELS, j as stripTrailingOneMSuffix, k as fastEndpointForModel, l as maxAdvisorEffortForModel, n as MAX_PROFILE_ALLOWED_LEAD_MODEL_IDS, t as MAX_PROFILE_ADVISOR_INSTRUCTIONS, u as maxAdvisorModelFromPin, y as validateMaxProfilePrerequisites } from "./max-profile-contract-
|
|
14
|
-
import { f as getAzureRepoFromGit } from "./bluebird-client-
|
|
15
|
-
import { a as extractAndRecordPricedAic, g as nanoAiuToCredits, h as formatAic, i as extractAndRecordAic, l as recordAic, m as extractCopilotUsage, p as copilotUsageToWire, u as recordZeroCostRequest } from "./aic-ledger-
|
|
13
|
+
import { A as normalizeTrailingOneMSuffix, a as MAX_PROFILE_NATIVE_AGENT_NAMES, d as maxAdvisorPinIsValid, h as maxOpusModel, i as MAX_PROFILE_MODELS, j as stripTrailingOneMSuffix, k as fastEndpointForModel, l as maxAdvisorEffortForModel, n as MAX_PROFILE_ALLOWED_LEAD_MODEL_IDS, t as MAX_PROFILE_ADVISOR_INSTRUCTIONS, u as maxAdvisorModelFromPin, y as validateMaxProfilePrerequisites } from "./max-profile-contract-CRj7N211.js";
|
|
14
|
+
import { f as getAzureRepoFromGit } from "./bluebird-client-ByCRusGQ.js";
|
|
15
|
+
import { a as extractAndRecordPricedAic, g as nanoAiuToCredits, h as formatAic, i as extractAndRecordAic, l as recordAic, m as extractCopilotUsage, p as copilotUsageToWire, u as recordZeroCostRequest } from "./aic-ledger-Cp7Yk9-Q.js";
|
|
16
16
|
import consola from "consola";
|
|
17
17
|
import fs, { existsSync } from "node:fs";
|
|
18
18
|
import path from "node:path";
|
|
@@ -400,7 +400,8 @@ const FAST_PROFILE = Object.freeze({
|
|
|
400
400
|
"browser",
|
|
401
401
|
"ado",
|
|
402
402
|
"kusto",
|
|
403
|
-
"cloudagent"
|
|
403
|
+
"cloudagent",
|
|
404
|
+
"workiq"
|
|
404
405
|
]),
|
|
405
406
|
hasCoordinator: false
|
|
406
407
|
});
|
|
@@ -423,7 +424,8 @@ const CHEAP1M_PROFILE = Object.freeze({
|
|
|
423
424
|
"browser",
|
|
424
425
|
"ado",
|
|
425
426
|
"kusto",
|
|
426
|
-
"cloudagent"
|
|
427
|
+
"cloudagent",
|
|
428
|
+
"workiq"
|
|
427
429
|
]),
|
|
428
430
|
hasCoordinator: false
|
|
429
431
|
});
|
|
@@ -446,7 +448,8 @@ const CHEAP_PROFILE = Object.freeze({
|
|
|
446
448
|
"browser",
|
|
447
449
|
"ado",
|
|
448
450
|
"kusto",
|
|
449
|
-
"cloudagent"
|
|
451
|
+
"cloudagent",
|
|
452
|
+
"workiq"
|
|
450
453
|
]),
|
|
451
454
|
hasCoordinator: false
|
|
452
455
|
});
|
|
@@ -470,7 +473,8 @@ const CHEAPEST_PROFILE = Object.freeze({
|
|
|
470
473
|
"browser",
|
|
471
474
|
"ado",
|
|
472
475
|
"kusto",
|
|
473
|
-
"cloudagent"
|
|
476
|
+
"cloudagent",
|
|
477
|
+
"workiq"
|
|
474
478
|
]),
|
|
475
479
|
hasCoordinator: false
|
|
476
480
|
});
|
|
@@ -493,7 +497,8 @@ const BALANCED_PROFILE = Object.freeze({
|
|
|
493
497
|
"browser",
|
|
494
498
|
"ado",
|
|
495
499
|
"kusto",
|
|
496
|
-
"cloudagent"
|
|
500
|
+
"cloudagent",
|
|
501
|
+
"workiq"
|
|
497
502
|
]),
|
|
498
503
|
hasCoordinator: false
|
|
499
504
|
});
|
|
@@ -511,7 +516,8 @@ const CHEAPEST2_PROFILE = Object.freeze({
|
|
|
511
516
|
"browser",
|
|
512
517
|
"ado",
|
|
513
518
|
"kusto",
|
|
514
|
-
"cloudagent"
|
|
519
|
+
"cloudagent",
|
|
520
|
+
"workiq"
|
|
515
521
|
]),
|
|
516
522
|
hasCoordinator: false
|
|
517
523
|
});
|
|
@@ -535,7 +541,8 @@ const CHEAPLOCAL_PROFILE = Object.freeze({
|
|
|
535
541
|
"browser",
|
|
536
542
|
"ado",
|
|
537
543
|
"kusto",
|
|
538
|
-
"cloudagent"
|
|
544
|
+
"cloudagent",
|
|
545
|
+
"workiq"
|
|
539
546
|
]),
|
|
540
547
|
hasCoordinator: false
|
|
541
548
|
});
|
|
@@ -552,7 +559,8 @@ const BALANCED2_PROFILE = Object.freeze({
|
|
|
552
559
|
"browser",
|
|
553
560
|
"ado",
|
|
554
561
|
"kusto",
|
|
555
|
-
"cloudagent"
|
|
562
|
+
"cloudagent",
|
|
563
|
+
"workiq"
|
|
556
564
|
]),
|
|
557
565
|
hasCoordinator: false
|
|
558
566
|
});
|
|
@@ -584,7 +592,8 @@ const LOCAL_PROFILE = Object.freeze({
|
|
|
584
592
|
"browser",
|
|
585
593
|
"ado",
|
|
586
594
|
"kusto",
|
|
587
|
-
"cloudagent"
|
|
595
|
+
"cloudagent",
|
|
596
|
+
"workiq"
|
|
588
597
|
]),
|
|
589
598
|
hasCoordinator: false
|
|
590
599
|
});
|
|
@@ -605,7 +614,8 @@ const LOCAL2_PROFILE = Object.freeze({
|
|
|
605
614
|
"browser",
|
|
606
615
|
"ado",
|
|
607
616
|
"kusto",
|
|
608
|
-
"cloudagent"
|
|
617
|
+
"cloudagent",
|
|
618
|
+
"workiq"
|
|
609
619
|
]),
|
|
610
620
|
hasCoordinator: false
|
|
611
621
|
});
|
|
@@ -638,7 +648,8 @@ const MAX_PROFILE = Object.freeze({
|
|
|
638
648
|
"first-mate",
|
|
639
649
|
"ado",
|
|
640
650
|
"kusto",
|
|
641
|
-
"cloudagent"
|
|
651
|
+
"cloudagent",
|
|
652
|
+
"workiq"
|
|
642
653
|
]),
|
|
643
654
|
hasCoordinator: true
|
|
644
655
|
});
|
|
@@ -3538,7 +3549,7 @@ function collectToolFieldKeys(body) {
|
|
|
3538
3549
|
//#endregion
|
|
3539
3550
|
//#region package.json
|
|
3540
3551
|
var name = "github-router";
|
|
3541
|
-
var version = "0.3.
|
|
3552
|
+
var version = "0.3.371";
|
|
3542
3553
|
//#endregion
|
|
3543
3554
|
//#region src/lib/approval.ts
|
|
3544
3555
|
const awaitApproval = async () => {
|
|
@@ -7726,7 +7737,8 @@ async function handleCompletion(c) {
|
|
|
7726
7737
|
const aicTap = localProfileRequest ? void 0 : createAnthropicAicTap((usage) => recordAic(resolvedModel, usage));
|
|
7727
7738
|
return new Response(response.body ? relayAnthropicStream(response.body, {
|
|
7728
7739
|
routePath: c.req.path,
|
|
7729
|
-
...aicTap ? { onBytes: aicTap.onBytes } : {}
|
|
7740
|
+
...aicTap ? { onBytes: aicTap.onBytes } : {},
|
|
7741
|
+
...anthropicUsageNormalizeDisabled() ? {} : { transform: createAnthropicUsageRewriteTransform() }
|
|
7730
7742
|
}) : null, {
|
|
7731
7743
|
status: response.status,
|
|
7732
7744
|
headers: streamHeaders
|
|
@@ -7735,6 +7747,7 @@ async function handleCompletion(c) {
|
|
|
7735
7747
|
const cappedResult = await readResponseBodyCapped(response, c.req.path, MAX_RESPONSE_BODY_BYTES);
|
|
7736
7748
|
if (!cappedResult.ok) return c.json(cappedResult.errorResponse, cappedResult.status);
|
|
7737
7749
|
const responseBody = cappedResult.value;
|
|
7750
|
+
if (!anthropicUsageNormalizeDisabled()) normalizeAnthropicUsageInPlace(responseBody.usage);
|
|
7738
7751
|
const usage = responseBody.usage;
|
|
7739
7752
|
const aicNano = localProfileRequest ? void 0 : extractAndRecordAic(resolvedModel, responseBody);
|
|
7740
7753
|
logRequest({
|
|
@@ -7875,12 +7888,20 @@ function clampOutputConfigEffortInPlace(body, model) {
|
|
|
7875
7888
|
* Sum native Claude `/v1/messages` usage into the TOTAL input-token figure
|
|
7876
7889
|
* `logRequest`'s context-window-fill display expects.
|
|
7877
7890
|
*
|
|
7878
|
-
*
|
|
7879
|
-
* OpenAI's inclusive total, it excludes both `cache_read_input_tokens`
|
|
7880
|
-
* `cache_creation_input_tokens
|
|
7881
|
-
* prompt size on
|
|
7882
|
-
*
|
|
7883
|
-
*
|
|
7891
|
+
* In the ANTHROPIC contract `input_tokens` is the NEW (uncached) portion ONLY —
|
|
7892
|
+
* unlike OpenAI's inclusive total, it excludes both `cache_read_input_tokens`
|
|
7893
|
+
* and `cache_creation_input_tokens` — so summing the three is what yields the
|
|
7894
|
+
* real prompt size on a cache hit. A conformant warm turn reports something
|
|
7895
|
+
* like `input_tokens: 26` with `cache_read_input_tokens: 97304`; the actual
|
|
7896
|
+
* prompt was ~97k tokens, not 26.
|
|
7897
|
+
*
|
|
7898
|
+
* Upstream does not always honour that contract: the local endpoint of session
|
|
7899
|
+
* `a1ab11a5` and the native Copilot path in session `ec65e3f9` reported
|
|
7900
|
+
* `input_tokens` INCLUSIVE of the cached prefix, so summing raw buckets there
|
|
7901
|
+
* double-counts it. Every call
|
|
7902
|
+
* site normalizes first (`normalizeAnthropicUsageInPlace` /
|
|
7903
|
+
* `createAnthropicUsageRewriteTransform`), which makes the three buckets
|
|
7904
|
+
* disjoint again and this sum correct on both paths. Returns `undefined` only when
|
|
7884
7905
|
* `usage` itself is absent, so the log line omits the field entirely rather
|
|
7885
7906
|
* than reporting a fabricated total (matching how `formatTokenInfo` treats an
|
|
7886
7907
|
* undefined `inputTokens`).
|
|
@@ -8980,6 +9001,12 @@ async function setupAndServe(options) {
|
|
|
8980
9001
|
state.kustoDatabase = azureFlags.kustoDatabase;
|
|
8981
9002
|
state.cloudAgentEnabled = cloudAgentFlags.enabled;
|
|
8982
9003
|
state.cloudAgentEnvironment = cloudAgentFlags.environment;
|
|
9004
|
+
state.workiqEnabled = options.workiqEnabled === true || process.env.GH_ROUTER_ENABLE_WORKIQ === "1";
|
|
9005
|
+
state.workiqWriteEnabled = options.workiqWriteEnabled === true;
|
|
9006
|
+
if (state.workiqWriteEnabled && !state.workiqEnabled) {
|
|
9007
|
+
consola.warn("Work IQ: --workiq-write has no effect without --workiq (or GH_ROUTER_ENABLE_WORKIQ=1).");
|
|
9008
|
+
state.workiqWriteEnabled = false;
|
|
9009
|
+
}
|
|
8983
9010
|
if (state.kustoEnabled && state.kustoCluster === null) consola.info("Kusto MCP: no default cluster; every call must name one (--kusto-cluster sets a default).");
|
|
8984
9011
|
for (const reason of azureFlags.reasons) consola.info(`Azure MCP auto-enabled (${reason}).`);
|
|
8985
9012
|
if (azureFlags.reasons.length > 0) consola.info("Suppress auto-enabled Azure surfaces with --no-bluebird / --no-ado / --no-kusto, or GH_ROUTER_AZURE_MCPS=off.");
|
|
@@ -8990,11 +9017,17 @@ async function setupAndServe(options) {
|
|
|
8990
9017
|
consola.info(`Cloud Agent MCP (${state.cloudAgentEnvironment}): enabled by ${source}${veto}.`);
|
|
8991
9018
|
}
|
|
8992
9019
|
if (state.adoEnabled && options.adoWriteEnabled === true) consola.warn("Azure DevOps MCP is running WITHOUT X-MCP-Readonly (--ado-write). Mutating tools are reachable from this session.");
|
|
9020
|
+
if (state.workiqWriteEnabled) consola.warn("Work IQ MCP is exposing its mutating tools (--workiq-write): create_entity, update_entity, delete_entity and do_action can change M365 data from this session.");
|
|
8993
9021
|
if (state.adoEnabled) {
|
|
8994
9022
|
consola.info("Azure DevOps MCP: provisioning the remote tool surface...");
|
|
8995
9023
|
const result = await provisionAdoTools();
|
|
8996
9024
|
if (result.ok) consola.info(`Azure DevOps MCP: ${result.toolCount} tool(s) exposed.`);
|
|
8997
9025
|
}
|
|
9026
|
+
if (state.workiqEnabled) {
|
|
9027
|
+
consola.info("Work IQ MCP: provisioning the remote tool surface...");
|
|
9028
|
+
const result = await provisionWorkiqTools();
|
|
9029
|
+
if (result.ok) consola.info(`Work IQ MCP: ${result.toolCount} tool(s) exposed.`);
|
|
9030
|
+
}
|
|
8998
9031
|
state.fleetEnabled = options.fleetEnabled || process.env.GH_ROUTER_ENABLE_FLEET === "1";
|
|
8999
9032
|
state.agentsEnabled = options.agentsEnabled || process.env.GH_ROUTER_ENABLE_AGENTS === "1";
|
|
9000
9033
|
state.powerBrowseEnabled = options.powerBrowseEnabled || process.env.GH_ROUTER_ENABLE_POWER_BROWSE === "1";
|
|
@@ -9202,6 +9235,16 @@ const sharedServerArgs = {
|
|
|
9202
9235
|
"cloudagent-env": {
|
|
9203
9236
|
type: "string",
|
|
9204
9237
|
description: "Cloud Agent service environment: prod (default) or ppe. Naming one does NOT enable the group; it selects which service --cloudagent talks to, and which Entra audience the token is minted for. Falls back to GH_ROUTER_CLOUDAGENT_ENV."
|
|
9238
|
+
},
|
|
9239
|
+
workiq: {
|
|
9240
|
+
type: "boolean",
|
|
9241
|
+
default: false,
|
|
9242
|
+
description: "Expose the Work IQ MCP group (mcp__workiq__*): Microsoft 365 research over mail, files, chats, meetings and sites through the hosted Work IQ MCP service. Read-only by default (ask, retrieve, fetch, fetch_blob, agents, get_schema, search_paths, call_function). Because the calls run on the Work IQ service, they are billed through its Copilot Credits usage-based plan rather than GitHub Copilot premium requests. Nothing is enabled implicitly: sign in first with `github-router workiq auth`. GH_ROUTER_ENABLE_WORKIQ=1 is the env equivalent."
|
|
9243
|
+
},
|
|
9244
|
+
"workiq-write": {
|
|
9245
|
+
type: "boolean",
|
|
9246
|
+
default: false,
|
|
9247
|
+
description: "Also expose the four mutating Work IQ tools (create_entity, update_entity, delete_entity, do_action). Off by default and never implied by --workiq; a banner line marks the elevated session."
|
|
9205
9248
|
}
|
|
9206
9249
|
};
|
|
9207
9250
|
const allowedAccountTypes = /* @__PURE__ */ new Set([
|
|
@@ -9267,7 +9310,9 @@ function parseSharedArgs(args) {
|
|
|
9267
9310
|
kustoCluster: args["kusto-cluster"],
|
|
9268
9311
|
kustoDatabase: args["kusto-database"],
|
|
9269
9312
|
cloudAgentEnabled: args.cloudagent,
|
|
9270
|
-
cloudAgentEnvironment: args["cloudagent-env"]
|
|
9313
|
+
cloudAgentEnvironment: args["cloudagent-env"],
|
|
9314
|
+
workiqEnabled: args.workiq,
|
|
9315
|
+
workiqWriteEnabled: args["workiq-write"]
|
|
9271
9316
|
};
|
|
9272
9317
|
}
|
|
9273
9318
|
/**
|
|
@@ -9537,4 +9582,4 @@ function getPiLaunchEnvVars(mirrorDir) {
|
|
|
9537
9582
|
//#endregion
|
|
9538
9583
|
export { updateClaude as $, CHEAP_EXPLORE_ALIAS_ID as A, formatFastPrerequisiteFailure as B, BALANCED_EXPLORE_ALIAS_ID as C, CHEAPEST_EXPLORE_ALIAS_ID as D, BROWSE_LOW_ALIAS_ID as E, MAX_BROWSE_LOW_ALIAS_ID as F, validateCheap1mProfilePrerequisites as G, profileDescriptor as H, formatBalancedPrerequisiteFailure as I, validateFastProfilePrerequisites as J, validateCheapProfilePrerequisites as K, formatCheap1mPrerequisiteFailure as L, CHEAP_PLAN_ALIAS_ID as M, CHEAP_REVIEWER_ALIAS_ID as N, CHEAPEST_GENERAL_PURPOSE_ALIAS_ID as O, LUNA_SCOUT_ALIAS_ID as P, checkClaudeVersion as Q, formatCheapPrerequisiteFailure as R, enableFileLogging as S, BALANCED_REVIEWER_ALIAS_ID as T, resolveLaunchProfile as U, formatLocalPrerequisiteFailure as V, validateBalancedProfilePrerequisites as W, validateMaxProfileLaunch as X, validateLocalProfilePrerequisites as Y, runSelfUpdate as Z, sweepStalePiAgentMirrors as _, setupAndServe as a, injectModelPickerSettingsFile as b, PI_MIN_VERSION as c, meetsPiMinVersion as d, refreshPiInBackground as f, removeOwnPiAgentMirror as g, ensurePiAgentMirror as h, parseSharedArgs as i, CHEAP_GENERAL_PURPOSE_ALIAS_ID as j, CHEAPEST_REVIEWER_ALIAS_ID as k, ensurePiInstalled as l, updatePi as m, getCodexEnvVars as n, sharedServerArgs as o, resolvePiRegistry as p, validateCheapestProfilePrerequisites as q, getPiLaunchEnvVars as r, LAUNCH_SECRET_HEADER as s, getClaudeCodeEnvVars as t, getInstalledPiVersion as u, startKeepAwake as v, BALANCED_GENERAL_PURPOSE_ALIAS_ID as w, listModelsForEndpoint as x, stopKeepAwake as y, formatCheapestPrerequisiteFailure as z };
|
|
9539
9584
|
|
|
9540
|
-
//# sourceMappingURL=server-setup-
|
|
9585
|
+
//# sourceMappingURL=server-setup-wWidNq5m.js.map
|