tianshu-harness 3.23.0
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/LICENSE +189 -0
- package/README.en.md +1066 -0
- package/README.ja.md +1214 -0
- package/README.ko.md +1216 -0
- package/README.md +309 -0
- package/completions/rivet.bash +118 -0
- package/completions/rivet.fish +110 -0
- package/completions/rivet.ps1 +230 -0
- package/completions/rivet.zsh +187 -0
- package/dist/account-OAEKORZE.js +47 -0
- package/dist/account-login-V6FOLHJR.js +65 -0
- package/dist/account-status-KHNPPAFL.js +23 -0
- package/dist/agent/worker-process/child.js +407 -0
- package/dist/browser-cli-FLNY5ZHI.js +19 -0
- package/dist/browser-readiness-LWVGSBD5.js +12 -0
- package/dist/build-backends-5KXKR2S4.js +13 -0
- package/dist/build-options-66Y4ZE7C.js +9 -0
- package/dist/bundled-skills/brainstorming/SKILL.md +139 -0
- package/dist/bundled-skills/visual-acceptance/SKILL.md +64 -0
- package/dist/chain-7MAMFXZ3.js +10 -0
- package/dist/checkpoint-MND4DUIX.js +33 -0
- package/dist/chunk-2E6CK2RC.js +392 -0
- package/dist/chunk-2EBWGAXD.js +51 -0
- package/dist/chunk-2HDP7RMR.js +119 -0
- package/dist/chunk-2HKD2UFM.js +1000 -0
- package/dist/chunk-2VYRLULP.js +51 -0
- package/dist/chunk-2XN7PM4N.js +125 -0
- package/dist/chunk-35H7GVNR.js +66 -0
- package/dist/chunk-3C3R7JXY.js +77 -0
- package/dist/chunk-3VGD2FXB.js +118 -0
- package/dist/chunk-424AP7FM.js +534 -0
- package/dist/chunk-4J5TZGOE.js +3707 -0
- package/dist/chunk-4QJ3Y5JM.js +898 -0
- package/dist/chunk-4U2ET7ZY.js +1326 -0
- package/dist/chunk-4XPFLICE.js +876 -0
- package/dist/chunk-5B2OCU5P.js +31707 -0
- package/dist/chunk-5GGOGLSN.js +73 -0
- package/dist/chunk-5JRZPLI6.js +251 -0
- package/dist/chunk-5TQ3JYBU.js +397 -0
- package/dist/chunk-66JPZSGX.js +55 -0
- package/dist/chunk-6HSVXHCZ.js +764 -0
- package/dist/chunk-6S5FPUS7.js +21 -0
- package/dist/chunk-722LQO64.js +131 -0
- package/dist/chunk-73NJ7IT7.js +354 -0
- package/dist/chunk-7FW3I7WC.js +95 -0
- package/dist/chunk-7KUCBNLB.js +173 -0
- package/dist/chunk-7RDOV3DF.js +201 -0
- package/dist/chunk-A5MNH4ER.js +79 -0
- package/dist/chunk-ADIVZ2D5.js +15 -0
- package/dist/chunk-AE3P3F6W.js +366 -0
- package/dist/chunk-AERM3VGP.js +280 -0
- package/dist/chunk-AEWHC4WM.js +246 -0
- package/dist/chunk-AOVQ7VIF.js +169 -0
- package/dist/chunk-AOYHP3WI.js +12411 -0
- package/dist/chunk-B3YEBABJ.js +7160 -0
- package/dist/chunk-BCQXEZPJ.js +154 -0
- package/dist/chunk-BKTQAYO2.js +418 -0
- package/dist/chunk-BSECIPAQ.js +80 -0
- package/dist/chunk-BUIMGNDD.js +52 -0
- package/dist/chunk-BXHV3GSB.js +10320 -0
- package/dist/chunk-C6ZVZCPP.js +139 -0
- package/dist/chunk-CEZNQVWM.js +82 -0
- package/dist/chunk-CGFZGR7G.js +1492 -0
- package/dist/chunk-CGOADM2X.js +337 -0
- package/dist/chunk-CI4R6P2B.js +24 -0
- package/dist/chunk-D2TCGRSX.js +73 -0
- package/dist/chunk-D4PTYFOG.js +154 -0
- package/dist/chunk-D54ZWG4T.js +717 -0
- package/dist/chunk-DEBI37QB.js +145 -0
- package/dist/chunk-DWROHPXP.js +1051 -0
- package/dist/chunk-DZ6UOJ5D.js +92 -0
- package/dist/chunk-EBJTVRQN.js +81 -0
- package/dist/chunk-EGEI2RQA.js +1167 -0
- package/dist/chunk-EHHUASO5.js +1305 -0
- package/dist/chunk-EPKTIOED.js +41 -0
- package/dist/chunk-ER5JW2QZ.js +5681 -0
- package/dist/chunk-ETHFACAB.js +315 -0
- package/dist/chunk-EXUE5W2F.js +112 -0
- package/dist/chunk-EXXICUIW.js +73 -0
- package/dist/chunk-FFQSZJOO.js +169 -0
- package/dist/chunk-FHFKPGDO.js +85 -0
- package/dist/chunk-FW3QKMFX.js +158 -0
- package/dist/chunk-GD4ZNZ7W.js +30 -0
- package/dist/chunk-GHVMWF2I.js +581 -0
- package/dist/chunk-GMKAXSYQ.js +297 -0
- package/dist/chunk-HBVF6BWO.js +325 -0
- package/dist/chunk-HV4YGVMS.js +379 -0
- package/dist/chunk-ILBCKAV6.js +89 -0
- package/dist/chunk-J4U4AW46.js +440 -0
- package/dist/chunk-J6ESSM47.js +1791 -0
- package/dist/chunk-JBZHIC6T.js +2309 -0
- package/dist/chunk-JCFWOULR.js +245 -0
- package/dist/chunk-JRF5L6OD.js +131 -0
- package/dist/chunk-JSS75KCG.js +2014 -0
- package/dist/chunk-JSXWIWWJ.js +225 -0
- package/dist/chunk-JYV7I2QH.js +98 -0
- package/dist/chunk-KIOXTQQL.js +1596 -0
- package/dist/chunk-KWVTXT5B.js +89 -0
- package/dist/chunk-KX22RD6R.js +33 -0
- package/dist/chunk-LA6IPTGH.js +709 -0
- package/dist/chunk-LH5VCGLB.js +1796 -0
- package/dist/chunk-LQQ6XJ2Y.js +269 -0
- package/dist/chunk-MJQ55WZZ.js +65 -0
- package/dist/chunk-ML3UKMH3.js +40 -0
- package/dist/chunk-MOZPLHSU.js +5526 -0
- package/dist/chunk-NGEWJ4DF.js +89 -0
- package/dist/chunk-NH6VIOAR.js +211 -0
- package/dist/chunk-O5VZQKCB.js +26106 -0
- package/dist/chunk-OHSV42QB.js +748 -0
- package/dist/chunk-OO3TAHO5.js +4070 -0
- package/dist/chunk-OTNHSAGN.js +38282 -0
- package/dist/chunk-OUWAC7AQ.js +442 -0
- package/dist/chunk-OXMIV4WE.js +270 -0
- package/dist/chunk-P5KJURUR.js +229 -0
- package/dist/chunk-P6GJOVO6.js +307 -0
- package/dist/chunk-QARAGUXX.js +23 -0
- package/dist/chunk-R43HJCDX.js +2711 -0
- package/dist/chunk-RAXBAWRN.js +210 -0
- package/dist/chunk-RK3JHWPT.js +39 -0
- package/dist/chunk-RWA23GMM.js +24 -0
- package/dist/chunk-S4K4L6IM.js +179 -0
- package/dist/chunk-SAXK6LVF.js +124 -0
- package/dist/chunk-SEPGEJNK.js +1607 -0
- package/dist/chunk-SUJERP5I.js +285 -0
- package/dist/chunk-T3ED6BY2.js +913 -0
- package/dist/chunk-THKDVSEC.js +90 -0
- package/dist/chunk-TI4GSEL5.js +52 -0
- package/dist/chunk-TPI73L57.js +164 -0
- package/dist/chunk-TVHW77C7.js +338 -0
- package/dist/chunk-TWNHOSDT.js +1073 -0
- package/dist/chunk-UFMN76QD.js +347 -0
- package/dist/chunk-UHGLFRZE.js +205 -0
- package/dist/chunk-UTZYPKBF.js +15231 -0
- package/dist/chunk-UXNLELW6.js +25 -0
- package/dist/chunk-UXXS53EA.js +166 -0
- package/dist/chunk-V5DHFGI7.js +171 -0
- package/dist/chunk-V5YIPMHV.js +2353 -0
- package/dist/chunk-WMUWEO2C.js +754 -0
- package/dist/chunk-WOE3D7JM.js +945 -0
- package/dist/chunk-X2IK5LVR.js +2592 -0
- package/dist/chunk-XU2YXCDL.js +459 -0
- package/dist/chunk-YJG5HIX5.js +203 -0
- package/dist/chunk-Z3QE7TZM.js +72 -0
- package/dist/chunk-Z5Z3JHJY.js +64 -0
- package/dist/chunk-ZDIFBJFT.js +168 -0
- package/dist/chunk-ZGGCEXDC.js +176 -0
- package/dist/chunk-ZMZCZNKU.js +263 -0
- package/dist/chunk-ZNC5T65N.js +17 -0
- package/dist/chunk-ZO3I3A7O.js +308 -0
- package/dist/chunk-ZQKXBUB7.js +217 -0
- package/dist/chunk-ZTRINFM2.js +78 -0
- package/dist/chunk-ZU7JZCVP.js +193 -0
- package/dist/chunk-ZZAWNALS.js +350 -0
- package/dist/cli/entry.js +54 -0
- package/dist/connector-L5QQTR6Y.js +26 -0
- package/dist/context-62DC6EC3.js +31 -0
- package/dist/council-convene-NJWPNBDU.js +46 -0
- package/dist/create-agent-config-ODSQWNVC.js +55 -0
- package/dist/default-registry-2PU3BTAU.js +68 -0
- package/dist/deliver-task-KONV4C4M.js +57 -0
- package/dist/delivery-gate-v2-F2YVMVGK.js +27 -0
- package/dist/domain-knowledge-store-DDZ3F4J7.js +11 -0
- package/dist/fetch-core-ZPPYDSZH.js +14 -0
- package/dist/galaxy-K72BBDQN.js +91 -0
- package/dist/goal-criteria-SCALAU2D.js +141 -0
- package/dist/goal-persist-XWY2GDQX.js +19 -0
- package/dist/goal-tracker-FXMJ2GVK.js +11 -0
- package/dist/headless-LSB6I7PT.js +162 -0
- package/dist/headless-coordinator-VDPDMVUT.js +90 -0
- package/dist/inject-U55SMB6A.js +39 -0
- package/dist/login-flow-CD4ZGXOC.js +59 -0
- package/dist/logs-cli-SQVYFMMN.js +283 -0
- package/dist/loop-ULZYBDA3.js +76 -0
- package/dist/main.js +4064 -0
- package/dist/manager-ROZBCWPA.js +171 -0
- package/dist/manager-Z7XFFUOM.js +10670 -0
- package/dist/meridian-indexer-ZIW363L7.js +21 -0
- package/dist/native-resolver-PN34UIVV.js +13 -0
- package/dist/node_modules/better-sqlite3/lib/database.js +90 -0
- package/dist/node_modules/better-sqlite3/lib/index.js +3 -0
- package/dist/node_modules/better-sqlite3/lib/methods/aggregate.js +43 -0
- package/dist/node_modules/better-sqlite3/lib/methods/backup.js +67 -0
- package/dist/node_modules/better-sqlite3/lib/methods/function.js +31 -0
- package/dist/node_modules/better-sqlite3/lib/methods/inspect.js +7 -0
- package/dist/node_modules/better-sqlite3/lib/methods/pragma.js +12 -0
- package/dist/node_modules/better-sqlite3/lib/methods/serialize.js +16 -0
- package/dist/node_modules/better-sqlite3/lib/methods/table.js +189 -0
- package/dist/node_modules/better-sqlite3/lib/methods/transaction.js +78 -0
- package/dist/node_modules/better-sqlite3/lib/methods/wrappers.js +54 -0
- package/dist/node_modules/better-sqlite3/lib/sqlite-error.js +20 -0
- package/dist/node_modules/better-sqlite3/lib/util.js +12 -0
- package/dist/node_modules/better-sqlite3/package.json +59 -0
- package/dist/ownership-ledger-E3WIEKPL.js +9 -0
- package/dist/package.json +3 -0
- package/dist/path-grants-XRRXHXG7.js +40 -0
- package/dist/paths-LVV5IMQN.js +49 -0
- package/dist/plan-fact-anchors-LMVQZCW5.js +13 -0
- package/dist/plan-store-ODLTTPFB.js +17 -0
- package/dist/plan-templates-5FPFBOL6.js +109 -0
- package/dist/plugin-loader-ZZKX7ZE6.js +22 -0
- package/dist/prefix-budget-62OV5HQC.js +13 -0
- package/dist/project-trust-5WS5MOMU.js +31 -0
- package/dist/provider-cli-ALDQXIT7.js +37 -0
- package/dist/providers-XQYTAVPK.js +11 -0
- package/dist/proxy-resolver-V2Y6534D.js +15 -0
- package/dist/recovery-cli-KPGY6FY3.js +106 -0
- package/dist/review-discipline-MNSYCST5.js +55 -0
- package/dist/review-router-BVQZW3MX.js +18 -0
- package/dist/seed-capsules/seed-capsule-attack-methodology.md +62 -0
- package/dist/seed-capsules/seed-capsule-changgeng.md +31 -0
- package/dist/seed-capsules/seed-capsule-design-aesthetics.md +38 -0
- package/dist/seed-capsules/seed-capsule-diagnostic-ladder.md +54 -0
- package/dist/seed-capsules/seed-capsule-fu.md +39 -0
- package/dist/seed-capsules/seed-capsule-huagai.md +73 -0
- package/dist/seed-capsules/seed-capsule-kaiyang.md +65 -0
- package/dist/seed-capsules/seed-capsule-knowledge-work.md +40 -0
- package/dist/seed-capsules/seed-capsule-tanlang.md +47 -0
- package/dist/seed-capsules/seed-capsule-tianfu.md +23 -0
- package/dist/seed-capsules/seed-capsule-tianliang.md +63 -0
- package/dist/seed-capsules/seed-capsule-tianquan.md +32 -0
- package/dist/seed-capsules/seed-capsule-tianxuan-ccr.md +22 -0
- package/dist/seed-capsules/seed-capsule-tianxuan.md +64 -0
- package/dist/seed-capsules/seed-capsule-yaoguang.md +87 -0
- package/dist/serve-X2R2UTLF.js +170 -0
- package/dist/serve-agent-KHSU6RVV.js +965 -0
- package/dist/session-persist-HUUC772H.js +37 -0
- package/dist/session-registry-6XUD5C4Y.js +15 -0
- package/dist/skill-loader-CK3RMO47.js +48 -0
- package/dist/skills/cli-harness-sop.md +207 -0
- package/dist/spawn-git-4HFU65AH.js +29 -0
- package/dist/sse-EYUTBWUK.js +512 -0
- package/dist/starflow-NOFBMPFU.js +30 -0
- package/dist/streamableHttp-V67CNJMO.js +447 -0
- package/dist/task-contract-6XHBNJQK.js +32 -0
- package/dist/task-ledger-3K4TJIER.js +9 -0
- package/dist/team-orchestrate-S6NHZP7X.js +64 -0
- package/dist/title-extract-QX4XGCYN.js +50 -0
- package/dist/todo-QDXGRZZP.js +31 -0
- package/dist/todo-store-V3TTO5AH.js +12 -0
- package/dist/tool-preset-LU5BYEDZ.js +23 -0
- package/dist/tool-tiers-GD742YBN.js +23 -0
- package/dist/turndown.es-OI55K6C3.js +17373 -0
- package/dist/verification-attribution-EKG4CNUV.js +13 -0
- package/dist/volatile-git-MBTST7RA.js +15 -0
- package/dist/wave-checkpoint-XLIIHXQA.js +30 -0
- package/dist/web-cli-DUG4I35O.js +233 -0
- package/dist/web-search-3IK542AA.js +34 -0
- package/dist/workers/cpu-worker.js +45 -0
- package/dist/workflow-runner-HX7UBAYG.js +297 -0
- package/dist/worktree-baseline-O5NCU6M2.js +9 -0
- package/package.json +122 -0
- package/scripts/check-mobile-env.mjs +76 -0
- package/scripts/fetch-native-sqlite.js +392 -0
- package/scripts/prune-installed-wasms.js +45 -0
- package/scripts/tree-sitter-wasm-keep.js +40 -0
|
@@ -0,0 +1,350 @@
|
|
|
1
|
+
#!/usr/bin/env -S node --expose-gc --max-old-space-size=4096
|
|
2
|
+
import { createRequire as __rivetCreateRequire } from 'node:module'; const require = __rivetCreateRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
buildPinnedLookup,
|
|
5
|
+
resolveAndAssertPublic
|
|
6
|
+
} from "./chunk-5JRZPLI6.js";
|
|
7
|
+
import {
|
|
8
|
+
resolveProxyForUrl
|
|
9
|
+
} from "./chunk-2HDP7RMR.js";
|
|
10
|
+
import {
|
|
11
|
+
require_undici
|
|
12
|
+
} from "./chunk-O5VZQKCB.js";
|
|
13
|
+
import {
|
|
14
|
+
buildAuthorizeUrl,
|
|
15
|
+
generatePKCE,
|
|
16
|
+
shouldRefresh
|
|
17
|
+
} from "./chunk-EPKTIOED.js";
|
|
18
|
+
import {
|
|
19
|
+
TokenStore
|
|
20
|
+
} from "./chunk-2VYRLULP.js";
|
|
21
|
+
import {
|
|
22
|
+
init_paths,
|
|
23
|
+
rivetHome
|
|
24
|
+
} from "./chunk-BCQXEZPJ.js";
|
|
25
|
+
import {
|
|
26
|
+
__toESM,
|
|
27
|
+
init_esm_shims
|
|
28
|
+
} from "./chunk-5GGOGLSN.js";
|
|
29
|
+
|
|
30
|
+
// src/mcp/oauth/connector.ts
|
|
31
|
+
init_esm_shims();
|
|
32
|
+
var import_undici = __toESM(require_undici(), 1);
|
|
33
|
+
import { randomBytes } from "crypto";
|
|
34
|
+
import dns from "dns/promises";
|
|
35
|
+
import { join } from "path";
|
|
36
|
+
import { createServer } from "http";
|
|
37
|
+
init_paths();
|
|
38
|
+
var REDIRECT_PORT = parseInt(process.env.RIVET_OAUTH_PORT || "1456", 10);
|
|
39
|
+
var CALLBACK_PATH = "/auth/callback";
|
|
40
|
+
var CALLBACK_TIMEOUT_MS = 5 * 6e4;
|
|
41
|
+
var OAUTH_TIMEOUT_MS = 3e4;
|
|
42
|
+
var MAX_TOKEN_RESPONSE_BYTES = 64 * 1024;
|
|
43
|
+
function mcpOAuthDir() {
|
|
44
|
+
return join(rivetHome(), "mcp-oauth");
|
|
45
|
+
}
|
|
46
|
+
function tokenStore(serverId) {
|
|
47
|
+
return new TokenStore(mcpOAuthDir(), serverId);
|
|
48
|
+
}
|
|
49
|
+
async function startMcpOAuth(serverId, provider, clientId, extraScopes) {
|
|
50
|
+
const pkce = await generatePKCE();
|
|
51
|
+
const state = randomBytes(16).toString("hex");
|
|
52
|
+
const redirectUri = `http://localhost:${REDIRECT_PORT}${CALLBACK_PATH}`;
|
|
53
|
+
const scopes = [...provider.defaultScopes, ...extraScopes ?? []];
|
|
54
|
+
const authUrl = buildAuthorizeUrl({
|
|
55
|
+
clientId,
|
|
56
|
+
codeChallenge: pkce.challenge,
|
|
57
|
+
redirectUri,
|
|
58
|
+
state,
|
|
59
|
+
authorizeBase: provider.authorizeUrl
|
|
60
|
+
});
|
|
61
|
+
const url = new URL(authUrl);
|
|
62
|
+
url.searchParams.set("scope", scopes.join(" "));
|
|
63
|
+
const code = await serveCallback(REDIRECT_PORT, state, url.toString());
|
|
64
|
+
const token = await exchange(code, pkce.verifier, redirectUri, provider, clientId);
|
|
65
|
+
const mcpToken = {
|
|
66
|
+
...token,
|
|
67
|
+
provider: provider.id,
|
|
68
|
+
scopes
|
|
69
|
+
};
|
|
70
|
+
tokenStore(serverId).save({
|
|
71
|
+
...token,
|
|
72
|
+
_provider: provider.id,
|
|
73
|
+
_scopes: scopes
|
|
74
|
+
});
|
|
75
|
+
return mcpToken;
|
|
76
|
+
}
|
|
77
|
+
async function getMcpAccessToken(serverId, provider, clientId) {
|
|
78
|
+
const store = tokenStore(serverId);
|
|
79
|
+
let token = store.load();
|
|
80
|
+
if (!token) throw new Error(`No OAuth token for MCP server "${serverId}" \u2014 run /mcp auth ${serverId}`);
|
|
81
|
+
if (shouldRefresh(token)) {
|
|
82
|
+
token = await refreshMcpToken(token, provider, clientId);
|
|
83
|
+
store.save(token);
|
|
84
|
+
}
|
|
85
|
+
return token.accessToken;
|
|
86
|
+
}
|
|
87
|
+
function hasMcpOAuthToken(serverId) {
|
|
88
|
+
const token = tokenStore(serverId).load();
|
|
89
|
+
return token !== null && token.expiresAt > Date.now();
|
|
90
|
+
}
|
|
91
|
+
function revokeMcpOAuth(serverId) {
|
|
92
|
+
tokenStore(serverId).clear();
|
|
93
|
+
}
|
|
94
|
+
function loadMcpOAuthToken(serverId) {
|
|
95
|
+
const data = tokenStore(serverId).load();
|
|
96
|
+
if (!data) return null;
|
|
97
|
+
if (data.expiresAt <= Date.now()) return null;
|
|
98
|
+
return {
|
|
99
|
+
accessToken: data.accessToken,
|
|
100
|
+
refreshToken: data.refreshToken,
|
|
101
|
+
expiresAt: data.expiresAt,
|
|
102
|
+
provider: data._provider ?? "",
|
|
103
|
+
scopes: data._scopes ?? []
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
var sharedServer = null;
|
|
107
|
+
var sharedServerPort = null;
|
|
108
|
+
var serverStartPromise = null;
|
|
109
|
+
var pendingCallbacks = /* @__PURE__ */ new Map();
|
|
110
|
+
async function getOrStartSharedServer(port) {
|
|
111
|
+
if (sharedServer && sharedServerPort === port) return;
|
|
112
|
+
if (serverStartPromise) {
|
|
113
|
+
await serverStartPromise;
|
|
114
|
+
if (sharedServerPort !== port) return getOrStartSharedServer(port);
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
serverStartPromise = new Promise((resolve, reject) => {
|
|
118
|
+
const server = createServer((req, res) => {
|
|
119
|
+
handleCallbackRequest(req, res);
|
|
120
|
+
});
|
|
121
|
+
server.once("error", (err) => {
|
|
122
|
+
const wasStarting = serverStartPromise !== null;
|
|
123
|
+
const allPending = Array.from(pendingCallbacks.values());
|
|
124
|
+
closeSharedServer().catch(() => {
|
|
125
|
+
});
|
|
126
|
+
if (wasStarting) {
|
|
127
|
+
reject(err);
|
|
128
|
+
} else {
|
|
129
|
+
for (const pending of allPending) pending.reject(err);
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
server.listen(port, "127.0.0.1", () => {
|
|
133
|
+
sharedServer = server;
|
|
134
|
+
sharedServerPort = port;
|
|
135
|
+
resolve();
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
try {
|
|
139
|
+
await serverStartPromise;
|
|
140
|
+
} finally {
|
|
141
|
+
if (serverStartPromise) serverStartPromise = null;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
async function closeSharedServer() {
|
|
145
|
+
const server = sharedServer;
|
|
146
|
+
sharedServer = null;
|
|
147
|
+
sharedServerPort = null;
|
|
148
|
+
serverStartPromise = null;
|
|
149
|
+
for (const pending of pendingCallbacks.values()) clearTimeout(pending.timeout);
|
|
150
|
+
pendingCallbacks.clear();
|
|
151
|
+
if (server) {
|
|
152
|
+
await new Promise((resolve) => server.close(() => resolve()));
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
function handleCallbackRequest(req, res) {
|
|
156
|
+
const port = sharedServerPort ?? REDIRECT_PORT;
|
|
157
|
+
const url = new URL(req.url ?? "/", `http://localhost:${port}`);
|
|
158
|
+
if (url.pathname !== CALLBACK_PATH) {
|
|
159
|
+
res.writeHead(404, { "Content-Type": "text/html" });
|
|
160
|
+
res.end("<h1>Not found</h1>");
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
const state = url.searchParams.get("state");
|
|
164
|
+
const code = url.searchParams.get("code");
|
|
165
|
+
const pending = state ? pendingCallbacks.get(state) : void 0;
|
|
166
|
+
if (!pending) {
|
|
167
|
+
res.writeHead(400, { "Content-Type": "text/html" });
|
|
168
|
+
res.end("<h1>Unknown or expired authorization session</h1>");
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
if (!code) {
|
|
172
|
+
const providerError = sanitizeProviderText(url.searchParams.get("error") ?? "unknown");
|
|
173
|
+
res.writeHead(400, { "Content-Type": "text/html" });
|
|
174
|
+
res.end(`<h1>Authorization failed: ${escapeHtml(providerError)}</h1>`);
|
|
175
|
+
pending.reject(new Error(`OAuth error: ${providerError}`));
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
res.writeHead(200, { "Content-Type": "text/html" });
|
|
179
|
+
res.end("<h1>MCP connected \u2014 you can close this tab</h1>");
|
|
180
|
+
pending.resolve(code);
|
|
181
|
+
}
|
|
182
|
+
function escapeHtml(s) {
|
|
183
|
+
const map = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" };
|
|
184
|
+
return s.replace(/[&<>"']/g, (c) => map[c] ?? c);
|
|
185
|
+
}
|
|
186
|
+
function sanitizeProviderText(raw, maxLength = 200) {
|
|
187
|
+
return raw.replace(/[\u0000-\u001f\u007f-\u009f]/g, "").slice(0, maxLength);
|
|
188
|
+
}
|
|
189
|
+
async function serveCallback(port, expectedState, authUrl, timeoutMs = CALLBACK_TIMEOUT_MS) {
|
|
190
|
+
await getOrStartSharedServer(port);
|
|
191
|
+
return new Promise((resolve, reject) => {
|
|
192
|
+
const timeout = setTimeout(() => {
|
|
193
|
+
cleanup();
|
|
194
|
+
reject(new Error(`OAuth callback timed out after ${timeoutMs}ms`));
|
|
195
|
+
}, timeoutMs);
|
|
196
|
+
const cleanup = () => {
|
|
197
|
+
clearTimeout(timeout);
|
|
198
|
+
pendingCallbacks.delete(expectedState);
|
|
199
|
+
if (pendingCallbacks.size === 0) {
|
|
200
|
+
closeSharedServer().catch(() => {
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
pendingCallbacks.set(expectedState, {
|
|
205
|
+
resolve: (code) => {
|
|
206
|
+
cleanup();
|
|
207
|
+
resolve(code);
|
|
208
|
+
},
|
|
209
|
+
reject: (err) => {
|
|
210
|
+
cleanup();
|
|
211
|
+
reject(err);
|
|
212
|
+
},
|
|
213
|
+
timeout
|
|
214
|
+
});
|
|
215
|
+
process.stderr.write(`Open this URL to connect MCP:
|
|
216
|
+
${authUrl}
|
|
217
|
+
`);
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
async function postTokenRequest(endpoint, form) {
|
|
221
|
+
const url = new URL(endpoint);
|
|
222
|
+
if (url.protocol !== "http:" && url.protocol !== "https:") {
|
|
223
|
+
throw new Error(`Unsupported OAuth token endpoint protocol: ${url.protocol}`);
|
|
224
|
+
}
|
|
225
|
+
const signal = AbortSignal.timeout(OAUTH_TIMEOUT_MS);
|
|
226
|
+
let abortLookup = () => {
|
|
227
|
+
};
|
|
228
|
+
const deadline = new Promise((_resolve, reject) => {
|
|
229
|
+
abortLookup = () => reject(signal.reason);
|
|
230
|
+
signal.addEventListener("abort", abortLookup, { once: true });
|
|
231
|
+
if (signal.aborted) abortLookup();
|
|
232
|
+
});
|
|
233
|
+
const resolved = await Promise.race([
|
|
234
|
+
resolveAndAssertPublic(url.hostname, dns.lookup),
|
|
235
|
+
deadline
|
|
236
|
+
]).finally(() => signal.removeEventListener("abort", abortLookup));
|
|
237
|
+
signal.throwIfAborted();
|
|
238
|
+
const proxyUrl = resolveProxyForUrl(url.href);
|
|
239
|
+
const dispatcher = proxyUrl ? new import_undici.default.ProxyAgent({ uri: proxyUrl }) : new import_undici.default.Agent({ connect: { lookup: buildPinnedLookup(resolved.address, resolved.family) } });
|
|
240
|
+
try {
|
|
241
|
+
const response = await import_undici.default.fetch(url, {
|
|
242
|
+
method: "POST",
|
|
243
|
+
headers: { "Content-Type": "application/x-www-form-urlencoded", "Accept": "application/json" },
|
|
244
|
+
body: new URLSearchParams(form).toString(),
|
|
245
|
+
redirect: "error",
|
|
246
|
+
dispatcher,
|
|
247
|
+
signal
|
|
248
|
+
});
|
|
249
|
+
return { ok: response.ok, status: response.status, text: await readBodyCapped(response, MAX_TOKEN_RESPONSE_BYTES) };
|
|
250
|
+
} finally {
|
|
251
|
+
await dispatcher.destroy().catch(() => {
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
async function readBodyCapped(response, maxBytes) {
|
|
256
|
+
const declared = Number(response.headers.get("content-length"));
|
|
257
|
+
if (Number.isFinite(declared) && declared > maxBytes) {
|
|
258
|
+
const declaredOversize = `OAuth token response declares ${declared} bytes, over the ${maxBytes}-byte limit`;
|
|
259
|
+
if (response.body) await response.body.cancel(declaredOversize).catch(() => {
|
|
260
|
+
});
|
|
261
|
+
throw new Error(declaredOversize);
|
|
262
|
+
}
|
|
263
|
+
if (!response.body) return "";
|
|
264
|
+
const reader = response.body.getReader();
|
|
265
|
+
const chunks = [];
|
|
266
|
+
let total = 0;
|
|
267
|
+
try {
|
|
268
|
+
for (; ; ) {
|
|
269
|
+
const { done, value } = await reader.read();
|
|
270
|
+
if (done) break;
|
|
271
|
+
if (!value) continue;
|
|
272
|
+
total += value.byteLength;
|
|
273
|
+
if (total > maxBytes) {
|
|
274
|
+
await reader.cancel(`OAuth token response exceeds ${maxBytes} bytes`).catch(() => {
|
|
275
|
+
});
|
|
276
|
+
throw new Error(`OAuth token response exceeds ${maxBytes} bytes`);
|
|
277
|
+
}
|
|
278
|
+
chunks.push(value);
|
|
279
|
+
}
|
|
280
|
+
} catch (err) {
|
|
281
|
+
await reader.cancel().catch(() => {
|
|
282
|
+
});
|
|
283
|
+
throw err;
|
|
284
|
+
}
|
|
285
|
+
const merged = new Uint8Array(total);
|
|
286
|
+
let offset = 0;
|
|
287
|
+
for (const chunk of chunks) {
|
|
288
|
+
merged.set(chunk, offset);
|
|
289
|
+
offset += chunk.byteLength;
|
|
290
|
+
}
|
|
291
|
+
return new TextDecoder().decode(merged);
|
|
292
|
+
}
|
|
293
|
+
async function exchange(code, codeVerifier, redirectUri, provider, clientId) {
|
|
294
|
+
const resp = await postTokenRequest(provider.tokenEndpoint, {
|
|
295
|
+
grant_type: "authorization_code",
|
|
296
|
+
client_id: clientId,
|
|
297
|
+
code,
|
|
298
|
+
code_verifier: codeVerifier,
|
|
299
|
+
redirect_uri: redirectUri
|
|
300
|
+
});
|
|
301
|
+
const text = resp.text;
|
|
302
|
+
let data;
|
|
303
|
+
if (text.startsWith("{")) {
|
|
304
|
+
data = JSON.parse(text);
|
|
305
|
+
} else {
|
|
306
|
+
const params = new URLSearchParams(text);
|
|
307
|
+
data = Object.fromEntries(params.entries());
|
|
308
|
+
}
|
|
309
|
+
if (!resp.ok || typeof data.error === "string") {
|
|
310
|
+
const detail = typeof data.error === "string" ? data.error : text;
|
|
311
|
+
throw new Error(`Token exchange failed (${resp.status}): ${sanitizeProviderText(detail)}`);
|
|
312
|
+
}
|
|
313
|
+
const expiresIn = typeof data.expires_in === "number" ? data.expires_in : typeof data.expires_in === "string" ? Number.parseInt(data.expires_in, 10) : 3600;
|
|
314
|
+
return {
|
|
315
|
+
accessToken: data.access_token ?? data.accessToken,
|
|
316
|
+
refreshToken: typeof data.refresh_token === "string" ? data.refresh_token : void 0,
|
|
317
|
+
expiresAt: Date.now() + (Number.isFinite(expiresIn) ? expiresIn : 3600) * 1e3
|
|
318
|
+
};
|
|
319
|
+
}
|
|
320
|
+
async function refreshMcpToken(token, provider, clientId) {
|
|
321
|
+
if (!token.refreshToken) throw new Error("No refresh token \u2014 re-authenticate");
|
|
322
|
+
const resp = await postTokenRequest(provider.tokenEndpoint, {
|
|
323
|
+
grant_type: "refresh_token",
|
|
324
|
+
client_id: clientId,
|
|
325
|
+
refresh_token: token.refreshToken
|
|
326
|
+
});
|
|
327
|
+
const text = resp.text;
|
|
328
|
+
let data;
|
|
329
|
+
if (text.startsWith("{")) {
|
|
330
|
+
data = JSON.parse(text);
|
|
331
|
+
} else {
|
|
332
|
+
data = Object.fromEntries(new URLSearchParams(text).entries());
|
|
333
|
+
}
|
|
334
|
+
if (!resp.ok) throw new Error(`Token refresh failed (${resp.status})`);
|
|
335
|
+
const expiresIn = typeof data.expires_in === "number" ? data.expires_in : typeof data.expires_in === "string" ? Number.parseInt(data.expires_in, 10) : 3600;
|
|
336
|
+
return {
|
|
337
|
+
accessToken: data.access_token ?? data.accessToken,
|
|
338
|
+
refreshToken: typeof data.refresh_token === "string" ? data.refresh_token : token.refreshToken,
|
|
339
|
+
expiresAt: Date.now() + (Number.isFinite(expiresIn) ? expiresIn : 3600) * 1e3
|
|
340
|
+
};
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
export {
|
|
344
|
+
startMcpOAuth,
|
|
345
|
+
getMcpAccessToken,
|
|
346
|
+
hasMcpOAuthToken,
|
|
347
|
+
revokeMcpOAuth,
|
|
348
|
+
loadMcpOAuthToken,
|
|
349
|
+
serveCallback
|
|
350
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
#!/usr/bin/env -S node --expose-gc --max-old-space-size=4096
|
|
2
|
+
import { createRequire as __rivetCreateRequire } from 'node:module'; const require = __rivetCreateRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
HELP_TEXT,
|
|
5
|
+
applyEarlyCliEnv,
|
|
6
|
+
routeEarlyCli
|
|
7
|
+
} from "../chunk-C6ZVZCPP.js";
|
|
8
|
+
import {
|
|
9
|
+
formatVersionLine
|
|
10
|
+
} from "../chunk-66JPZSGX.js";
|
|
11
|
+
import {
|
|
12
|
+
init_paths,
|
|
13
|
+
rivetHome
|
|
14
|
+
} from "../chunk-BCQXEZPJ.js";
|
|
15
|
+
import {
|
|
16
|
+
init_esm_shims
|
|
17
|
+
} from "../chunk-5GGOGLSN.js";
|
|
18
|
+
|
|
19
|
+
// src/cli/entry.ts
|
|
20
|
+
init_esm_shims();
|
|
21
|
+
import { mkdirSync } from "fs";
|
|
22
|
+
import { enableCompileCache } from "module";
|
|
23
|
+
import { join } from "path";
|
|
24
|
+
init_paths();
|
|
25
|
+
function enableCliCompileCache() {
|
|
26
|
+
if (typeof enableCompileCache !== "function") return;
|
|
27
|
+
if (process.env.NODE_COMPILE_CACHE) return;
|
|
28
|
+
try {
|
|
29
|
+
const dir = join(rivetHome(), "cli", "compile-cache");
|
|
30
|
+
mkdirSync(dir, { recursive: true });
|
|
31
|
+
enableCompileCache(dir);
|
|
32
|
+
return;
|
|
33
|
+
} catch {
|
|
34
|
+
}
|
|
35
|
+
try {
|
|
36
|
+
enableCompileCache();
|
|
37
|
+
} catch {
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
enableCliCompileCache();
|
|
41
|
+
var args = process.argv.slice(2);
|
|
42
|
+
if (args.includes("--help") || args.includes("-h")) {
|
|
43
|
+
process.stdout.write(HELP_TEXT);
|
|
44
|
+
process.exit(0);
|
|
45
|
+
}
|
|
46
|
+
if (args.includes("--version") || args.includes("-v")) {
|
|
47
|
+
process.stdout.write(formatVersionLine());
|
|
48
|
+
process.exit(0);
|
|
49
|
+
}
|
|
50
|
+
await applyEarlyCliEnv(args);
|
|
51
|
+
if (await routeEarlyCli(args)) {
|
|
52
|
+
} else {
|
|
53
|
+
await import("../main.js");
|
|
54
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
#!/usr/bin/env -S node --expose-gc --max-old-space-size=4096
|
|
2
|
+
import { createRequire as __rivetCreateRequire } from 'node:module'; const require = __rivetCreateRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
getMcpAccessToken,
|
|
5
|
+
hasMcpOAuthToken,
|
|
6
|
+
loadMcpOAuthToken,
|
|
7
|
+
revokeMcpOAuth,
|
|
8
|
+
serveCallback,
|
|
9
|
+
startMcpOAuth
|
|
10
|
+
} from "./chunk-ZZAWNALS.js";
|
|
11
|
+
import "./chunk-5JRZPLI6.js";
|
|
12
|
+
import "./chunk-2HDP7RMR.js";
|
|
13
|
+
import "./chunk-O5VZQKCB.js";
|
|
14
|
+
import "./chunk-EPKTIOED.js";
|
|
15
|
+
import "./chunk-2VYRLULP.js";
|
|
16
|
+
import "./chunk-P5KJURUR.js";
|
|
17
|
+
import "./chunk-BCQXEZPJ.js";
|
|
18
|
+
import "./chunk-5GGOGLSN.js";
|
|
19
|
+
export {
|
|
20
|
+
getMcpAccessToken,
|
|
21
|
+
hasMcpOAuthToken,
|
|
22
|
+
loadMcpOAuthToken,
|
|
23
|
+
revokeMcpOAuth,
|
|
24
|
+
serveCallback,
|
|
25
|
+
startMcpOAuth
|
|
26
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#!/usr/bin/env -S node --expose-gc --max-old-space-size=4096
|
|
2
|
+
import { createRequire as __rivetCreateRequire } from 'node:module'; const require = __rivetCreateRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
EMPTY_USAGE,
|
|
5
|
+
SessionContext
|
|
6
|
+
} from "./chunk-424AP7FM.js";
|
|
7
|
+
import "./chunk-ZGGCEXDC.js";
|
|
8
|
+
import "./chunk-ZMZCZNKU.js";
|
|
9
|
+
import "./chunk-CEZNQVWM.js";
|
|
10
|
+
import "./chunk-RWA23GMM.js";
|
|
11
|
+
import "./chunk-KIOXTQQL.js";
|
|
12
|
+
import "./chunk-35H7GVNR.js";
|
|
13
|
+
import "./chunk-TPI73L57.js";
|
|
14
|
+
import "./chunk-XU2YXCDL.js";
|
|
15
|
+
import "./chunk-ETHFACAB.js";
|
|
16
|
+
import "./chunk-UFMN76QD.js";
|
|
17
|
+
import "./chunk-QARAGUXX.js";
|
|
18
|
+
import "./chunk-ER5JW2QZ.js";
|
|
19
|
+
import "./chunk-CGFZGR7G.js";
|
|
20
|
+
import "./chunk-P5KJURUR.js";
|
|
21
|
+
import "./chunk-WMUWEO2C.js";
|
|
22
|
+
import "./chunk-BKTQAYO2.js";
|
|
23
|
+
import "./chunk-OO3TAHO5.js";
|
|
24
|
+
import "./chunk-7KUCBNLB.js";
|
|
25
|
+
import "./chunk-A5MNH4ER.js";
|
|
26
|
+
import "./chunk-BCQXEZPJ.js";
|
|
27
|
+
import "./chunk-5GGOGLSN.js";
|
|
28
|
+
export {
|
|
29
|
+
EMPTY_USAGE,
|
|
30
|
+
SessionContext
|
|
31
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
#!/usr/bin/env -S node --expose-gc --max-old-space-size=4096
|
|
2
|
+
import { createRequire as __rivetCreateRequire } from 'node:module'; const require = __rivetCreateRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
DEFAULT_COUNCIL_SEATS,
|
|
5
|
+
createCouncilConveneTool,
|
|
6
|
+
setDeprecatedModelNotesForTest
|
|
7
|
+
} from "./chunk-4U2ET7ZY.js";
|
|
8
|
+
import "./chunk-KWVTXT5B.js";
|
|
9
|
+
import "./chunk-R43HJCDX.js";
|
|
10
|
+
import "./chunk-D4PTYFOG.js";
|
|
11
|
+
import "./chunk-AERM3VGP.js";
|
|
12
|
+
import "./chunk-RK3JHWPT.js";
|
|
13
|
+
import "./chunk-NH6VIOAR.js";
|
|
14
|
+
import "./chunk-S4K4L6IM.js";
|
|
15
|
+
import "./chunk-3VGD2FXB.js";
|
|
16
|
+
import "./chunk-UXNLELW6.js";
|
|
17
|
+
import "./chunk-TVHW77C7.js";
|
|
18
|
+
import "./chunk-EHHUASO5.js";
|
|
19
|
+
import "./chunk-LA6IPTGH.js";
|
|
20
|
+
import "./chunk-HBVF6BWO.js";
|
|
21
|
+
import "./chunk-4QJ3Y5JM.js";
|
|
22
|
+
import "./chunk-CGOADM2X.js";
|
|
23
|
+
import "./chunk-ILBCKAV6.js";
|
|
24
|
+
import "./chunk-6HSVXHCZ.js";
|
|
25
|
+
import "./chunk-OHSV42QB.js";
|
|
26
|
+
import "./chunk-ADIVZ2D5.js";
|
|
27
|
+
import "./chunk-Z5Z3JHJY.js";
|
|
28
|
+
import "./chunk-35H7GVNR.js";
|
|
29
|
+
import "./chunk-CI4R6P2B.js";
|
|
30
|
+
import "./chunk-THKDVSEC.js";
|
|
31
|
+
import "./chunk-UFMN76QD.js";
|
|
32
|
+
import "./chunk-ER5JW2QZ.js";
|
|
33
|
+
import "./chunk-CGFZGR7G.js";
|
|
34
|
+
import "./chunk-P5KJURUR.js";
|
|
35
|
+
import "./chunk-WMUWEO2C.js";
|
|
36
|
+
import "./chunk-BKTQAYO2.js";
|
|
37
|
+
import "./chunk-OO3TAHO5.js";
|
|
38
|
+
import "./chunk-7KUCBNLB.js";
|
|
39
|
+
import "./chunk-A5MNH4ER.js";
|
|
40
|
+
import "./chunk-BCQXEZPJ.js";
|
|
41
|
+
import "./chunk-5GGOGLSN.js";
|
|
42
|
+
export {
|
|
43
|
+
DEFAULT_COUNCIL_SEATS,
|
|
44
|
+
createCouncilConveneTool,
|
|
45
|
+
setDeprecatedModelNotesForTest
|
|
46
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
#!/usr/bin/env -S node --expose-gc --max-old-space-size=4096
|
|
2
|
+
import { createRequire as __rivetCreateRequire } from 'node:module'; const require = __rivetCreateRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
createAgentConfig,
|
|
5
|
+
createMainAgentConfigInput,
|
|
6
|
+
resolveCompactProviderName,
|
|
7
|
+
resolveFallbackModel
|
|
8
|
+
} from "./chunk-4XPFLICE.js";
|
|
9
|
+
import "./chunk-V5YIPMHV.js";
|
|
10
|
+
import "./chunk-ILBCKAV6.js";
|
|
11
|
+
import "./chunk-X2IK5LVR.js";
|
|
12
|
+
import "./chunk-CEZNQVWM.js";
|
|
13
|
+
import "./chunk-O5VZQKCB.js";
|
|
14
|
+
import "./chunk-SEPGEJNK.js";
|
|
15
|
+
import "./chunk-7RDOV3DF.js";
|
|
16
|
+
import "./chunk-6HSVXHCZ.js";
|
|
17
|
+
import "./chunk-RWA23GMM.js";
|
|
18
|
+
import "./chunk-OHSV42QB.js";
|
|
19
|
+
import "./chunk-ADIVZ2D5.js";
|
|
20
|
+
import "./chunk-7FW3I7WC.js";
|
|
21
|
+
import "./chunk-GD4ZNZ7W.js";
|
|
22
|
+
import "./chunk-ZQKXBUB7.js";
|
|
23
|
+
import "./chunk-Z5Z3JHJY.js";
|
|
24
|
+
import "./chunk-KIOXTQQL.js";
|
|
25
|
+
import "./chunk-35H7GVNR.js";
|
|
26
|
+
import "./chunk-JSXWIWWJ.js";
|
|
27
|
+
import "./chunk-TPI73L57.js";
|
|
28
|
+
import "./chunk-GMKAXSYQ.js";
|
|
29
|
+
import "./chunk-EPKTIOED.js";
|
|
30
|
+
import "./chunk-2VYRLULP.js";
|
|
31
|
+
import "./chunk-SUJERP5I.js";
|
|
32
|
+
import "./chunk-CI4R6P2B.js";
|
|
33
|
+
import "./chunk-XU2YXCDL.js";
|
|
34
|
+
import "./chunk-ETHFACAB.js";
|
|
35
|
+
import "./chunk-UFMN76QD.js";
|
|
36
|
+
import "./chunk-EXUE5W2F.js";
|
|
37
|
+
import "./chunk-6S5FPUS7.js";
|
|
38
|
+
import "./chunk-EXXICUIW.js";
|
|
39
|
+
import "./chunk-QARAGUXX.js";
|
|
40
|
+
import "./chunk-ER5JW2QZ.js";
|
|
41
|
+
import "./chunk-CGFZGR7G.js";
|
|
42
|
+
import "./chunk-P5KJURUR.js";
|
|
43
|
+
import "./chunk-WMUWEO2C.js";
|
|
44
|
+
import "./chunk-BKTQAYO2.js";
|
|
45
|
+
import "./chunk-OO3TAHO5.js";
|
|
46
|
+
import "./chunk-7KUCBNLB.js";
|
|
47
|
+
import "./chunk-A5MNH4ER.js";
|
|
48
|
+
import "./chunk-BCQXEZPJ.js";
|
|
49
|
+
import "./chunk-5GGOGLSN.js";
|
|
50
|
+
export {
|
|
51
|
+
createAgentConfig,
|
|
52
|
+
createMainAgentConfigInput,
|
|
53
|
+
resolveCompactProviderName,
|
|
54
|
+
resolveFallbackModel
|
|
55
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
#!/usr/bin/env -S node --expose-gc --max-old-space-size=4096
|
|
2
|
+
import { createRequire as __rivetCreateRequire } from 'node:module'; const require = __rivetCreateRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
createDefaultToolRegistry
|
|
5
|
+
} from "./chunk-BXHV3GSB.js";
|
|
6
|
+
import "./chunk-FW3QKMFX.js";
|
|
7
|
+
import "./chunk-UXXS53EA.js";
|
|
8
|
+
import "./chunk-JCFWOULR.js";
|
|
9
|
+
import "./chunk-2HKD2UFM.js";
|
|
10
|
+
import "./chunk-5JRZPLI6.js";
|
|
11
|
+
import "./chunk-JRF5L6OD.js";
|
|
12
|
+
import "./chunk-EBJTVRQN.js";
|
|
13
|
+
import "./chunk-J4U4AW46.js";
|
|
14
|
+
import "./chunk-2HDP7RMR.js";
|
|
15
|
+
import "./chunk-4J5TZGOE.js";
|
|
16
|
+
import "./chunk-BUIMGNDD.js";
|
|
17
|
+
import "./chunk-ZU7JZCVP.js";
|
|
18
|
+
import "./chunk-JSS75KCG.js";
|
|
19
|
+
import "./chunk-HBVF6BWO.js";
|
|
20
|
+
import "./chunk-ZGGCEXDC.js";
|
|
21
|
+
import "./chunk-ZMZCZNKU.js";
|
|
22
|
+
import "./chunk-Z3QE7TZM.js";
|
|
23
|
+
import "./chunk-J6ESSM47.js";
|
|
24
|
+
import "./chunk-3C3R7JXY.js";
|
|
25
|
+
import "./chunk-ILBCKAV6.js";
|
|
26
|
+
import "./chunk-X2IK5LVR.js";
|
|
27
|
+
import "./chunk-CEZNQVWM.js";
|
|
28
|
+
import "./chunk-O5VZQKCB.js";
|
|
29
|
+
import "./chunk-7RDOV3DF.js";
|
|
30
|
+
import "./chunk-6HSVXHCZ.js";
|
|
31
|
+
import "./chunk-OHSV42QB.js";
|
|
32
|
+
import "./chunk-ADIVZ2D5.js";
|
|
33
|
+
import "./chunk-7FW3I7WC.js";
|
|
34
|
+
import "./chunk-GD4ZNZ7W.js";
|
|
35
|
+
import "./chunk-ZQKXBUB7.js";
|
|
36
|
+
import "./chunk-Z5Z3JHJY.js";
|
|
37
|
+
import "./chunk-KIOXTQQL.js";
|
|
38
|
+
import "./chunk-35H7GVNR.js";
|
|
39
|
+
import "./chunk-AE3P3F6W.js";
|
|
40
|
+
import "./chunk-TPI73L57.js";
|
|
41
|
+
import "./chunk-722LQO64.js";
|
|
42
|
+
import "./chunk-SUJERP5I.js";
|
|
43
|
+
import "./chunk-CI4R6P2B.js";
|
|
44
|
+
import "./chunk-XU2YXCDL.js";
|
|
45
|
+
import "./chunk-ETHFACAB.js";
|
|
46
|
+
import "./chunk-THKDVSEC.js";
|
|
47
|
+
import "./chunk-UFMN76QD.js";
|
|
48
|
+
import "./chunk-LH5VCGLB.js";
|
|
49
|
+
import "./chunk-6S5FPUS7.js";
|
|
50
|
+
import "./chunk-EXXICUIW.js";
|
|
51
|
+
import "./chunk-QARAGUXX.js";
|
|
52
|
+
import "./chunk-DEBI37QB.js";
|
|
53
|
+
import "./chunk-ER5JW2QZ.js";
|
|
54
|
+
import "./chunk-CGFZGR7G.js";
|
|
55
|
+
import "./chunk-P5KJURUR.js";
|
|
56
|
+
import "./chunk-WMUWEO2C.js";
|
|
57
|
+
import "./chunk-BKTQAYO2.js";
|
|
58
|
+
import "./chunk-OO3TAHO5.js";
|
|
59
|
+
import "./chunk-EGEI2RQA.js";
|
|
60
|
+
import "./chunk-ZTRINFM2.js";
|
|
61
|
+
import "./chunk-ZNC5T65N.js";
|
|
62
|
+
import "./chunk-7KUCBNLB.js";
|
|
63
|
+
import "./chunk-A5MNH4ER.js";
|
|
64
|
+
import "./chunk-BCQXEZPJ.js";
|
|
65
|
+
import "./chunk-5GGOGLSN.js";
|
|
66
|
+
export {
|
|
67
|
+
createDefaultToolRegistry
|
|
68
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
#!/usr/bin/env -S node --expose-gc --max-old-space-size=4096
|
|
2
|
+
import { createRequire as __rivetCreateRequire } from 'node:module'; const require = __rivetCreateRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
__expirePostCommitReviewCooldown,
|
|
5
|
+
collectCurrentDirtyFiles,
|
|
6
|
+
createDeliverTaskTool,
|
|
7
|
+
createStageMarker,
|
|
8
|
+
detectMissingVisualVerify,
|
|
9
|
+
detectSymptomPatch,
|
|
10
|
+
formatReviewOutcomeLines,
|
|
11
|
+
parseLearnedEntries,
|
|
12
|
+
resetPostCommitReviewCooldown
|
|
13
|
+
} from "./chunk-JBZHIC6T.js";
|
|
14
|
+
import "./chunk-KWVTXT5B.js";
|
|
15
|
+
import "./chunk-AERM3VGP.js";
|
|
16
|
+
import "./chunk-RK3JHWPT.js";
|
|
17
|
+
import "./chunk-NH6VIOAR.js";
|
|
18
|
+
import "./chunk-S4K4L6IM.js";
|
|
19
|
+
import "./chunk-TVHW77C7.js";
|
|
20
|
+
import "./chunk-T3ED6BY2.js";
|
|
21
|
+
import "./chunk-ZU7JZCVP.js";
|
|
22
|
+
import "./chunk-LA6IPTGH.js";
|
|
23
|
+
import "./chunk-HBVF6BWO.js";
|
|
24
|
+
import "./chunk-4QJ3Y5JM.js";
|
|
25
|
+
import "./chunk-CGOADM2X.js";
|
|
26
|
+
import "./chunk-ZMZCZNKU.js";
|
|
27
|
+
import "./chunk-3C3R7JXY.js";
|
|
28
|
+
import "./chunk-6HSVXHCZ.js";
|
|
29
|
+
import "./chunk-ADIVZ2D5.js";
|
|
30
|
+
import "./chunk-Z5Z3JHJY.js";
|
|
31
|
+
import "./chunk-35H7GVNR.js";
|
|
32
|
+
import "./chunk-2E6CK2RC.js";
|
|
33
|
+
import "./chunk-ZO3I3A7O.js";
|
|
34
|
+
import "./chunk-CI4R6P2B.js";
|
|
35
|
+
import "./chunk-THKDVSEC.js";
|
|
36
|
+
import "./chunk-UFMN76QD.js";
|
|
37
|
+
import "./chunk-ER5JW2QZ.js";
|
|
38
|
+
import "./chunk-CGFZGR7G.js";
|
|
39
|
+
import "./chunk-P5KJURUR.js";
|
|
40
|
+
import "./chunk-WMUWEO2C.js";
|
|
41
|
+
import "./chunk-BKTQAYO2.js";
|
|
42
|
+
import "./chunk-OO3TAHO5.js";
|
|
43
|
+
import "./chunk-7KUCBNLB.js";
|
|
44
|
+
import "./chunk-A5MNH4ER.js";
|
|
45
|
+
import "./chunk-BCQXEZPJ.js";
|
|
46
|
+
import "./chunk-5GGOGLSN.js";
|
|
47
|
+
export {
|
|
48
|
+
__expirePostCommitReviewCooldown,
|
|
49
|
+
collectCurrentDirtyFiles,
|
|
50
|
+
createDeliverTaskTool,
|
|
51
|
+
createStageMarker,
|
|
52
|
+
detectMissingVisualVerify,
|
|
53
|
+
detectSymptomPatch,
|
|
54
|
+
formatReviewOutcomeLines,
|
|
55
|
+
parseLearnedEntries,
|
|
56
|
+
resetPostCommitReviewCooldown
|
|
57
|
+
};
|