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,27 @@
|
|
|
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
|
+
buildGateConvergenceHint,
|
|
5
|
+
createDeliveryGateV2,
|
|
6
|
+
filterExternalNoise,
|
|
7
|
+
isJunkExternalPath
|
|
8
|
+
} from "./chunk-2E6CK2RC.js";
|
|
9
|
+
import "./chunk-ZO3I3A7O.js";
|
|
10
|
+
import "./chunk-THKDVSEC.js";
|
|
11
|
+
import "./chunk-UFMN76QD.js";
|
|
12
|
+
import "./chunk-ER5JW2QZ.js";
|
|
13
|
+
import "./chunk-CGFZGR7G.js";
|
|
14
|
+
import "./chunk-P5KJURUR.js";
|
|
15
|
+
import "./chunk-WMUWEO2C.js";
|
|
16
|
+
import "./chunk-BKTQAYO2.js";
|
|
17
|
+
import "./chunk-OO3TAHO5.js";
|
|
18
|
+
import "./chunk-7KUCBNLB.js";
|
|
19
|
+
import "./chunk-A5MNH4ER.js";
|
|
20
|
+
import "./chunk-BCQXEZPJ.js";
|
|
21
|
+
import "./chunk-5GGOGLSN.js";
|
|
22
|
+
export {
|
|
23
|
+
buildGateConvergenceHint,
|
|
24
|
+
createDeliveryGateV2,
|
|
25
|
+
filterExternalNoise,
|
|
26
|
+
isJunkExternalPath
|
|
27
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
DomainKnowledgeStore
|
|
5
|
+
} from "./chunk-5TQ3JYBU.js";
|
|
6
|
+
import "./chunk-RAXBAWRN.js";
|
|
7
|
+
import "./chunk-A5MNH4ER.js";
|
|
8
|
+
import "./chunk-5GGOGLSN.js";
|
|
9
|
+
export {
|
|
10
|
+
DomainKnowledgeStore
|
|
11
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
fetchMarkdown
|
|
5
|
+
} from "./chunk-2HKD2UFM.js";
|
|
6
|
+
import "./chunk-5JRZPLI6.js";
|
|
7
|
+
import "./chunk-2HDP7RMR.js";
|
|
8
|
+
import "./chunk-Z3QE7TZM.js";
|
|
9
|
+
import "./chunk-O5VZQKCB.js";
|
|
10
|
+
import "./chunk-BKTQAYO2.js";
|
|
11
|
+
import "./chunk-5GGOGLSN.js";
|
|
12
|
+
export {
|
|
13
|
+
fetchMarkdown
|
|
14
|
+
};
|
|
@@ -0,0 +1,91 @@
|
|
|
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
|
+
analyzeWriteDimensionPlan,
|
|
5
|
+
createGalaxyTool
|
|
6
|
+
} from "./chunk-WOE3D7JM.js";
|
|
7
|
+
import "./chunk-B3YEBABJ.js";
|
|
8
|
+
import "./chunk-UXXS53EA.js";
|
|
9
|
+
import "./chunk-ZDIFBJFT.js";
|
|
10
|
+
import "./chunk-D4PTYFOG.js";
|
|
11
|
+
import "./chunk-AERM3VGP.js";
|
|
12
|
+
import "./chunk-UXNLELW6.js";
|
|
13
|
+
import "./chunk-424AP7FM.js";
|
|
14
|
+
import "./chunk-OTNHSAGN.js";
|
|
15
|
+
import "./chunk-DZ6UOJ5D.js";
|
|
16
|
+
import "./chunk-T3ED6BY2.js";
|
|
17
|
+
import "./chunk-RAXBAWRN.js";
|
|
18
|
+
import "./chunk-4J5TZGOE.js";
|
|
19
|
+
import "./chunk-BUIMGNDD.js";
|
|
20
|
+
import "./chunk-ZU7JZCVP.js";
|
|
21
|
+
import "./chunk-JSS75KCG.js";
|
|
22
|
+
import "./chunk-EHHUASO5.js";
|
|
23
|
+
import "./chunk-LA6IPTGH.js";
|
|
24
|
+
import "./chunk-HBVF6BWO.js";
|
|
25
|
+
import "./chunk-UHGLFRZE.js";
|
|
26
|
+
import "./chunk-4QJ3Y5JM.js";
|
|
27
|
+
import "./chunk-CGOADM2X.js";
|
|
28
|
+
import "./chunk-ZGGCEXDC.js";
|
|
29
|
+
import "./chunk-ZMZCZNKU.js";
|
|
30
|
+
import "./chunk-Z3QE7TZM.js";
|
|
31
|
+
import "./chunk-GHVMWF2I.js";
|
|
32
|
+
import "./chunk-J6ESSM47.js";
|
|
33
|
+
import "./chunk-3C3R7JXY.js";
|
|
34
|
+
import "./chunk-TI4GSEL5.js";
|
|
35
|
+
import "./chunk-OXMIV4WE.js";
|
|
36
|
+
import "./chunk-ILBCKAV6.js";
|
|
37
|
+
import "./chunk-X2IK5LVR.js";
|
|
38
|
+
import "./chunk-CEZNQVWM.js";
|
|
39
|
+
import "./chunk-O5VZQKCB.js";
|
|
40
|
+
import "./chunk-SEPGEJNK.js";
|
|
41
|
+
import "./chunk-7RDOV3DF.js";
|
|
42
|
+
import "./chunk-6HSVXHCZ.js";
|
|
43
|
+
import "./chunk-RWA23GMM.js";
|
|
44
|
+
import "./chunk-OHSV42QB.js";
|
|
45
|
+
import "./chunk-ADIVZ2D5.js";
|
|
46
|
+
import "./chunk-7FW3I7WC.js";
|
|
47
|
+
import "./chunk-GD4ZNZ7W.js";
|
|
48
|
+
import "./chunk-ZQKXBUB7.js";
|
|
49
|
+
import "./chunk-Z5Z3JHJY.js";
|
|
50
|
+
import "./chunk-KIOXTQQL.js";
|
|
51
|
+
import "./chunk-35H7GVNR.js";
|
|
52
|
+
import "./chunk-AE3P3F6W.js";
|
|
53
|
+
import "./chunk-JSXWIWWJ.js";
|
|
54
|
+
import "./chunk-BSECIPAQ.js";
|
|
55
|
+
import "./chunk-2E6CK2RC.js";
|
|
56
|
+
import "./chunk-ZO3I3A7O.js";
|
|
57
|
+
import "./chunk-P6GJOVO6.js";
|
|
58
|
+
import "./chunk-TPI73L57.js";
|
|
59
|
+
import "./chunk-HV4YGVMS.js";
|
|
60
|
+
import "./chunk-722LQO64.js";
|
|
61
|
+
import "./chunk-GMKAXSYQ.js";
|
|
62
|
+
import "./chunk-EPKTIOED.js";
|
|
63
|
+
import "./chunk-2VYRLULP.js";
|
|
64
|
+
import "./chunk-SUJERP5I.js";
|
|
65
|
+
import "./chunk-CI4R6P2B.js";
|
|
66
|
+
import "./chunk-XU2YXCDL.js";
|
|
67
|
+
import "./chunk-ETHFACAB.js";
|
|
68
|
+
import "./chunk-THKDVSEC.js";
|
|
69
|
+
import "./chunk-UFMN76QD.js";
|
|
70
|
+
import "./chunk-EXUE5W2F.js";
|
|
71
|
+
import "./chunk-LH5VCGLB.js";
|
|
72
|
+
import "./chunk-6S5FPUS7.js";
|
|
73
|
+
import "./chunk-EXXICUIW.js";
|
|
74
|
+
import "./chunk-QARAGUXX.js";
|
|
75
|
+
import "./chunk-DEBI37QB.js";
|
|
76
|
+
import "./chunk-ER5JW2QZ.js";
|
|
77
|
+
import "./chunk-CGFZGR7G.js";
|
|
78
|
+
import "./chunk-P5KJURUR.js";
|
|
79
|
+
import "./chunk-WMUWEO2C.js";
|
|
80
|
+
import "./chunk-BKTQAYO2.js";
|
|
81
|
+
import "./chunk-OO3TAHO5.js";
|
|
82
|
+
import "./chunk-EGEI2RQA.js";
|
|
83
|
+
import "./chunk-ZNC5T65N.js";
|
|
84
|
+
import "./chunk-7KUCBNLB.js";
|
|
85
|
+
import "./chunk-A5MNH4ER.js";
|
|
86
|
+
import "./chunk-BCQXEZPJ.js";
|
|
87
|
+
import "./chunk-5GGOGLSN.js";
|
|
88
|
+
export {
|
|
89
|
+
analyzeWriteDimensionPlan,
|
|
90
|
+
createGalaxyTool
|
|
91
|
+
};
|
|
@@ -0,0 +1,141 @@
|
|
|
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
|
+
createProviderClient,
|
|
5
|
+
resolveApiKey,
|
|
6
|
+
resolveCapabilities
|
|
7
|
+
} from "./chunk-X2IK5LVR.js";
|
|
8
|
+
import "./chunk-CEZNQVWM.js";
|
|
9
|
+
import "./chunk-O5VZQKCB.js";
|
|
10
|
+
import "./chunk-ZQKXBUB7.js";
|
|
11
|
+
import "./chunk-Z5Z3JHJY.js";
|
|
12
|
+
import "./chunk-KIOXTQQL.js";
|
|
13
|
+
import "./chunk-35H7GVNR.js";
|
|
14
|
+
import "./chunk-TPI73L57.js";
|
|
15
|
+
import "./chunk-CI4R6P2B.js";
|
|
16
|
+
import "./chunk-XU2YXCDL.js";
|
|
17
|
+
import "./chunk-ETHFACAB.js";
|
|
18
|
+
import "./chunk-UFMN76QD.js";
|
|
19
|
+
import "./chunk-EXXICUIW.js";
|
|
20
|
+
import "./chunk-QARAGUXX.js";
|
|
21
|
+
import "./chunk-ER5JW2QZ.js";
|
|
22
|
+
import "./chunk-CGFZGR7G.js";
|
|
23
|
+
import "./chunk-P5KJURUR.js";
|
|
24
|
+
import "./chunk-WMUWEO2C.js";
|
|
25
|
+
import "./chunk-BKTQAYO2.js";
|
|
26
|
+
import "./chunk-OO3TAHO5.js";
|
|
27
|
+
import "./chunk-7KUCBNLB.js";
|
|
28
|
+
import "./chunk-A5MNH4ER.js";
|
|
29
|
+
import "./chunk-BCQXEZPJ.js";
|
|
30
|
+
import {
|
|
31
|
+
init_esm_shims
|
|
32
|
+
} from "./chunk-5GGOGLSN.js";
|
|
33
|
+
|
|
34
|
+
// src/agent/goal-criteria.ts
|
|
35
|
+
init_esm_shims();
|
|
36
|
+
var GENERIC_SUCCESS_CRITERIA = [
|
|
37
|
+
"The requested change or behavior is actually implemented, not merely described.",
|
|
38
|
+
"Relevant verification (tests / typecheck / observed behavior) passed, or any gap is explicitly disclosed."
|
|
39
|
+
];
|
|
40
|
+
var MAX_CRITERIA = 8;
|
|
41
|
+
var EXTRACTION_SYSTEM = `You decompose a software engineering goal into concrete, independently verifiable success criteria.
|
|
42
|
+
|
|
43
|
+
Rules:
|
|
44
|
+
- Output ONLY a JSON array of 3 to 6 short strings. No prose, no markdown, no keys.
|
|
45
|
+
- Each criterion must be checkable by running a command, reading a file, or observing a concrete behavior \u2014 never vague ("works well", "is good").
|
|
46
|
+
- Prefer criteria a reviewer could test without asking the author.
|
|
47
|
+
- Do not restate the goal verbatim; break it into discrete acceptance checks.
|
|
48
|
+
|
|
49
|
+
Example output:
|
|
50
|
+
["All new functions have unit tests under __tests__/", "npm test passes with 0 failures", "The CLI accepts --foo and prints the parsed value"]`;
|
|
51
|
+
function buildCriteriaExtractionUser(goal) {
|
|
52
|
+
return `Goal:
|
|
53
|
+
${goal.trim()}
|
|
54
|
+
|
|
55
|
+
Return a JSON array of 3-6 concrete success criteria.`;
|
|
56
|
+
}
|
|
57
|
+
function parseCriteria(text) {
|
|
58
|
+
if (!text) return null;
|
|
59
|
+
const start = text.indexOf("[");
|
|
60
|
+
const end = text.lastIndexOf("]");
|
|
61
|
+
if (start === -1 || end === -1 || end <= start) return null;
|
|
62
|
+
const slice = text.slice(start, end + 1);
|
|
63
|
+
let parsed;
|
|
64
|
+
try {
|
|
65
|
+
parsed = JSON.parse(slice);
|
|
66
|
+
} catch {
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
if (!Array.isArray(parsed)) return null;
|
|
70
|
+
const items = parsed.filter((x) => typeof x === "string").map((s) => s.trim()).filter((s) => s.length > 0);
|
|
71
|
+
return items.length > 0 ? items : null;
|
|
72
|
+
}
|
|
73
|
+
async function extractGoalCriteria(goal, complete, signal) {
|
|
74
|
+
try {
|
|
75
|
+
const raw = await complete(EXTRACTION_SYSTEM, buildCriteriaExtractionUser(goal), signal);
|
|
76
|
+
const parsed = parseCriteria(raw);
|
|
77
|
+
if (parsed && parsed.length > 0) return parsed.slice(0, MAX_CRITERIA);
|
|
78
|
+
} catch {
|
|
79
|
+
}
|
|
80
|
+
return [...GENERIC_SUCCESS_CRITERIA];
|
|
81
|
+
}
|
|
82
|
+
function completionFromClient(client, model, maxTokens = 1024) {
|
|
83
|
+
return async (system, user, signal) => {
|
|
84
|
+
let text = "";
|
|
85
|
+
let err;
|
|
86
|
+
const messages = [
|
|
87
|
+
{ role: "system", content: system },
|
|
88
|
+
{ role: "user", content: user }
|
|
89
|
+
];
|
|
90
|
+
await client.stream(
|
|
91
|
+
{ model, messages, max_tokens: maxTokens, temperature: 0, stream: true },
|
|
92
|
+
{
|
|
93
|
+
onTextDelta: (d) => {
|
|
94
|
+
text += d;
|
|
95
|
+
},
|
|
96
|
+
onThinkingDelta: () => {
|
|
97
|
+
},
|
|
98
|
+
onContentBlock: () => {
|
|
99
|
+
},
|
|
100
|
+
onStopReason: () => {
|
|
101
|
+
},
|
|
102
|
+
onError: (e) => {
|
|
103
|
+
err = e;
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
signal
|
|
107
|
+
);
|
|
108
|
+
if (err && !text) throw err;
|
|
109
|
+
return text;
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
function buildCheapClient(profile, providers, sessionId) {
|
|
113
|
+
const prov = providers[profile.provider];
|
|
114
|
+
if (!prov) return null;
|
|
115
|
+
let apiKey;
|
|
116
|
+
try {
|
|
117
|
+
apiKey = resolveApiKey(prov);
|
|
118
|
+
} catch {
|
|
119
|
+
return null;
|
|
120
|
+
}
|
|
121
|
+
if (!apiKey) return null;
|
|
122
|
+
const modelSpec = prov.models.find((m) => m.id === profile.model);
|
|
123
|
+
const model = modelSpec?.id ?? profile.model;
|
|
124
|
+
const maxTokens = Math.min(1024, modelSpec?.maxTokens ?? 4096);
|
|
125
|
+
const client = createProviderClient(
|
|
126
|
+
prov,
|
|
127
|
+
resolveCapabilities(profile.provider, prov.capabilities),
|
|
128
|
+
// 判据抽取是主会话的 side-path,会话 ID 仍用主会话的——上游按会话做路由/
|
|
129
|
+
// 缓存亲和,缺省会落到 factory 的进程级兜底,把不同会话的判据请求混成一段。
|
|
130
|
+
{ apiKey, model, maxTokens, sessionId }
|
|
131
|
+
);
|
|
132
|
+
return { client, model };
|
|
133
|
+
}
|
|
134
|
+
export {
|
|
135
|
+
GENERIC_SUCCESS_CRITERIA,
|
|
136
|
+
buildCheapClient,
|
|
137
|
+
buildCriteriaExtractionUser,
|
|
138
|
+
completionFromClient,
|
|
139
|
+
extractGoalCriteria,
|
|
140
|
+
parseCriteria
|
|
141
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
deleteGoalState,
|
|
5
|
+
goalStatePath,
|
|
6
|
+
loadGoalState,
|
|
7
|
+
restoreGoalTracker,
|
|
8
|
+
saveGoalState
|
|
9
|
+
} from "./chunk-TI4GSEL5.js";
|
|
10
|
+
import "./chunk-OXMIV4WE.js";
|
|
11
|
+
import "./chunk-A5MNH4ER.js";
|
|
12
|
+
import "./chunk-5GGOGLSN.js";
|
|
13
|
+
export {
|
|
14
|
+
deleteGoalState,
|
|
15
|
+
goalStatePath,
|
|
16
|
+
loadGoalState,
|
|
17
|
+
restoreGoalTracker,
|
|
18
|
+
saveGoalState
|
|
19
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
GoalTracker,
|
|
5
|
+
buildGoalModePrompt
|
|
6
|
+
} from "./chunk-OXMIV4WE.js";
|
|
7
|
+
import "./chunk-5GGOGLSN.js";
|
|
8
|
+
export {
|
|
9
|
+
GoalTracker,
|
|
10
|
+
buildGoalModePrompt
|
|
11
|
+
};
|
|
@@ -0,0 +1,162 @@
|
|
|
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
|
+
tapAgentCallbacks
|
|
5
|
+
} from "./chunk-V5DHFGI7.js";
|
|
6
|
+
import {
|
|
7
|
+
redactText,
|
|
8
|
+
redactValue,
|
|
9
|
+
truncateUtf16Safe
|
|
10
|
+
} from "./chunk-ML3UKMH3.js";
|
|
11
|
+
import {
|
|
12
|
+
init_esm_shims
|
|
13
|
+
} from "./chunk-5GGOGLSN.js";
|
|
14
|
+
|
|
15
|
+
// src/headless.ts
|
|
16
|
+
init_esm_shims();
|
|
17
|
+
|
|
18
|
+
// src/stream-json.ts
|
|
19
|
+
init_esm_shims();
|
|
20
|
+
function resultMaxLen() {
|
|
21
|
+
const raw = process.env.RIVET_STREAM_RESULT_MAX;
|
|
22
|
+
if (raw === void 0 || raw === "") return 8e3;
|
|
23
|
+
const n = Number.parseInt(raw, 10);
|
|
24
|
+
return Number.isFinite(n) && n >= 0 ? n : 8e3;
|
|
25
|
+
}
|
|
26
|
+
function serializeEvent(ev) {
|
|
27
|
+
let payload = ev;
|
|
28
|
+
if (ev.type === "tool_result") {
|
|
29
|
+
const cap = resultMaxLen();
|
|
30
|
+
if (cap > 0 && ev.result.length > cap) {
|
|
31
|
+
payload = { ...ev, result: truncateUtf16Safe(ev.result, cap), truncated: true };
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return JSON.stringify(payload) + "\n";
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// src/headless.ts
|
|
38
|
+
function parseCliArgs(args) {
|
|
39
|
+
const printIndex = args.findIndex((arg) => arg === "-p" || arg === "--print");
|
|
40
|
+
const goalIndex = args.findIndex((arg) => arg === "--goal");
|
|
41
|
+
const json = args.includes("--json");
|
|
42
|
+
const streamJson = args.includes("--stream-json");
|
|
43
|
+
if (goalIndex >= 0) {
|
|
44
|
+
const goal = args[goalIndex + 1];
|
|
45
|
+
const budgetIndex = args.indexOf("--budget");
|
|
46
|
+
const budget = budgetIndex >= 0 ? parseInt(args[budgetIndex + 1], 10) : 100;
|
|
47
|
+
return { headless: true, prompt: void 0, json, streamJson, goal, budget };
|
|
48
|
+
}
|
|
49
|
+
if (printIndex === -1) return { headless: false, json, streamJson };
|
|
50
|
+
const prompt = args[printIndex + 1];
|
|
51
|
+
return { headless: true, prompt, json, streamJson };
|
|
52
|
+
}
|
|
53
|
+
async function runHeadless(config) {
|
|
54
|
+
const agent = config.createAgent();
|
|
55
|
+
const streamJson = config.streamJson;
|
|
56
|
+
let text = "";
|
|
57
|
+
let usage;
|
|
58
|
+
let error;
|
|
59
|
+
const emit = (ev) => process.stdout.write(serializeEvent(ev));
|
|
60
|
+
const base = {
|
|
61
|
+
onTextDelta: (delta) => {
|
|
62
|
+
text += delta;
|
|
63
|
+
if (streamJson) emit({ type: "text_delta", text: redactText(delta) });
|
|
64
|
+
},
|
|
65
|
+
onThinkingDelta: (delta) => {
|
|
66
|
+
if (streamJson) emit({ type: "thinking_delta", text: redactText(delta) });
|
|
67
|
+
},
|
|
68
|
+
onToolUse: (id, name, input) => {
|
|
69
|
+
if (streamJson) emit({ type: "tool_use", id, name, input: redactValue(input) });
|
|
70
|
+
},
|
|
71
|
+
onToolResult: (id, name, result, isError) => {
|
|
72
|
+
if (isError) error = result;
|
|
73
|
+
if (streamJson) emit({ type: "tool_result", id, name, result: redactText(result), isError: isError ?? false });
|
|
74
|
+
},
|
|
75
|
+
onTurnComplete: (turnUsage, turnNumber, isFinal) => {
|
|
76
|
+
usage = turnUsage;
|
|
77
|
+
if (streamJson) emit({ type: "turn_complete", usage: turnUsage, turn: turnNumber, is_final: isFinal ?? false });
|
|
78
|
+
},
|
|
79
|
+
onPhaseChange: (phase, detail) => {
|
|
80
|
+
if (streamJson) emit({ type: "phase", phase, tool: detail?.tool, reason: detail?.reason });
|
|
81
|
+
},
|
|
82
|
+
onDelegationActivity: (activity) => {
|
|
83
|
+
if (!streamJson) return;
|
|
84
|
+
emit({
|
|
85
|
+
type: "worker",
|
|
86
|
+
work_order_id: activity.workOrderId,
|
|
87
|
+
parent_tool_id: activity.parentToolId,
|
|
88
|
+
status: activity.status,
|
|
89
|
+
profile: activity.profile,
|
|
90
|
+
authority: activity.authority,
|
|
91
|
+
objective: activity.objective,
|
|
92
|
+
progress_line: activity.progressLine ? redactText(activity.progressLine) : void 0,
|
|
93
|
+
tool_use_count: activity.toolUseCount,
|
|
94
|
+
token_count: activity.tokenCount,
|
|
95
|
+
model: activity.model,
|
|
96
|
+
failure_reason: activity.failureReason
|
|
97
|
+
});
|
|
98
|
+
},
|
|
99
|
+
onError: (err) => {
|
|
100
|
+
error = err.message;
|
|
101
|
+
if (streamJson) emit({ type: "error", error: redactText(err.message) });
|
|
102
|
+
},
|
|
103
|
+
onAbort: () => {
|
|
104
|
+
error = "Aborted";
|
|
105
|
+
},
|
|
106
|
+
onApprovalRequired: async () => false,
|
|
107
|
+
// 事件面与 TUI 对齐:tap 只在 inner **定义了**回调时才投影对应的 SessionEvent,
|
|
108
|
+
// 而 TUI 侧 bridge 定义了 checkpoint / domain_drift / intent_note
|
|
109
|
+
// (src/tui/engine/bridge.ts),无头缺定义就会在 --stream-events 的文件里静默
|
|
110
|
+
// 少掉这三类。三者都不改 stdout 契约——StreamJsonEvent 里没有对应信封,
|
|
111
|
+
// 所以 stdout 字节与从前完全一致,受益的只有事件文件。
|
|
112
|
+
//
|
|
113
|
+
// 代价说明:onCheckpoint / onDomainDrift 是**免费**的(值在调用点已经算好,
|
|
114
|
+
// 只有回调调用被 `?.` gate);onIntentNote 是**门槛式**的——turn-intent.ts 里
|
|
115
|
+
// `!input.onIntentNote` 直接早退,定义它会启用 buildIntentPreview 的本地计算
|
|
116
|
+
//(纯内存、有 MAX_INTENT_NOTES 上限与指纹去重)。这正是 TUI 的行为,
|
|
117
|
+
// 无头对齐它换来的是"agent 当时想往哪走"这一条审计信息。
|
|
118
|
+
onCheckpoint: () => {
|
|
119
|
+
},
|
|
120
|
+
onDomainDrift: () => {
|
|
121
|
+
},
|
|
122
|
+
onIntentNote: () => {
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
const tapped = config.eventSink ? tapAgentCallbacks(base, config.eventSink) : null;
|
|
126
|
+
const callbacks = tapped ?? base;
|
|
127
|
+
if (streamJson) {
|
|
128
|
+
emit({ type: "system", subtype: "init", session_id: config.sessionId ?? "", model: config.model ?? "", cwd: process.cwd() });
|
|
129
|
+
}
|
|
130
|
+
await agent.run(config.prompt, callbacks);
|
|
131
|
+
tapped?.flush();
|
|
132
|
+
const success = !error;
|
|
133
|
+
if (streamJson) {
|
|
134
|
+
emit({
|
|
135
|
+
type: "result",
|
|
136
|
+
subtype: success ? "success" : "error",
|
|
137
|
+
session_id: config.sessionId ?? "",
|
|
138
|
+
is_error: !success,
|
|
139
|
+
result: redactText(success ? text : error ?? "Unknown error"),
|
|
140
|
+
...usage ? { usage } : {}
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
const payload = success ? { success: true, text, ...usage ? { usage } : {} } : { success: false, text, error: error ?? "Unknown error" };
|
|
144
|
+
const stdout = config.json ? JSON.stringify(payload) : streamJson ? "" : payload.text;
|
|
145
|
+
return {
|
|
146
|
+
exitCode: success ? 0 : 1,
|
|
147
|
+
stdout,
|
|
148
|
+
// 失败必须有出口:非 JSON 模式下 stdout 只承载 payload.text,模型一个字
|
|
149
|
+
// 没输出就失败时(provider 报错、鉴权失败、模型名非法)text 为空串,
|
|
150
|
+
// error 又只存在于 payload.json——json 未开时整条错误信息就此蒸发,
|
|
151
|
+
// 用户看到的是 exit 1 加全空输出。stderr 字段此前定义了却从未被写过。
|
|
152
|
+
...success ? {} : { stderr: error ?? "Unknown error" },
|
|
153
|
+
// streamJson 的终止态已由 result 信封承载——遗留 payload 一并输出会在同一条
|
|
154
|
+
// NDJSON 流里出现两个 schema 的收尾(且无 type 字段),消费者按 type 分派
|
|
155
|
+
// 会在最后一行拿到 undefined。
|
|
156
|
+
json: config.json ? payload : void 0
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
export {
|
|
160
|
+
parseCliArgs,
|
|
161
|
+
runHeadless
|
|
162
|
+
};
|
|
@@ -0,0 +1,90 @@
|
|
|
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
|
+
buildModelCards,
|
|
5
|
+
createHeadlessCoordinator
|
|
6
|
+
} from "./chunk-JYV7I2QH.js";
|
|
7
|
+
import "./chunk-B3YEBABJ.js";
|
|
8
|
+
import "./chunk-UXXS53EA.js";
|
|
9
|
+
import "./chunk-D4PTYFOG.js";
|
|
10
|
+
import "./chunk-UXNLELW6.js";
|
|
11
|
+
import "./chunk-424AP7FM.js";
|
|
12
|
+
import "./chunk-OTNHSAGN.js";
|
|
13
|
+
import "./chunk-DZ6UOJ5D.js";
|
|
14
|
+
import "./chunk-T3ED6BY2.js";
|
|
15
|
+
import "./chunk-RAXBAWRN.js";
|
|
16
|
+
import "./chunk-4J5TZGOE.js";
|
|
17
|
+
import "./chunk-BUIMGNDD.js";
|
|
18
|
+
import "./chunk-ZU7JZCVP.js";
|
|
19
|
+
import "./chunk-JSS75KCG.js";
|
|
20
|
+
import "./chunk-EHHUASO5.js";
|
|
21
|
+
import "./chunk-LA6IPTGH.js";
|
|
22
|
+
import "./chunk-HBVF6BWO.js";
|
|
23
|
+
import "./chunk-UHGLFRZE.js";
|
|
24
|
+
import "./chunk-4QJ3Y5JM.js";
|
|
25
|
+
import "./chunk-CGOADM2X.js";
|
|
26
|
+
import "./chunk-ZGGCEXDC.js";
|
|
27
|
+
import "./chunk-ZMZCZNKU.js";
|
|
28
|
+
import "./chunk-Z3QE7TZM.js";
|
|
29
|
+
import "./chunk-GHVMWF2I.js";
|
|
30
|
+
import "./chunk-J6ESSM47.js";
|
|
31
|
+
import "./chunk-3C3R7JXY.js";
|
|
32
|
+
import "./chunk-TI4GSEL5.js";
|
|
33
|
+
import "./chunk-OXMIV4WE.js";
|
|
34
|
+
import "./chunk-V5YIPMHV.js";
|
|
35
|
+
import "./chunk-ILBCKAV6.js";
|
|
36
|
+
import "./chunk-X2IK5LVR.js";
|
|
37
|
+
import "./chunk-CEZNQVWM.js";
|
|
38
|
+
import "./chunk-O5VZQKCB.js";
|
|
39
|
+
import "./chunk-SEPGEJNK.js";
|
|
40
|
+
import "./chunk-7RDOV3DF.js";
|
|
41
|
+
import "./chunk-6HSVXHCZ.js";
|
|
42
|
+
import "./chunk-RWA23GMM.js";
|
|
43
|
+
import "./chunk-OHSV42QB.js";
|
|
44
|
+
import "./chunk-ADIVZ2D5.js";
|
|
45
|
+
import "./chunk-7FW3I7WC.js";
|
|
46
|
+
import "./chunk-GD4ZNZ7W.js";
|
|
47
|
+
import "./chunk-ZQKXBUB7.js";
|
|
48
|
+
import "./chunk-Z5Z3JHJY.js";
|
|
49
|
+
import "./chunk-KIOXTQQL.js";
|
|
50
|
+
import "./chunk-35H7GVNR.js";
|
|
51
|
+
import "./chunk-AE3P3F6W.js";
|
|
52
|
+
import "./chunk-JSXWIWWJ.js";
|
|
53
|
+
import "./chunk-BSECIPAQ.js";
|
|
54
|
+
import "./chunk-2E6CK2RC.js";
|
|
55
|
+
import "./chunk-ZO3I3A7O.js";
|
|
56
|
+
import "./chunk-P6GJOVO6.js";
|
|
57
|
+
import "./chunk-TPI73L57.js";
|
|
58
|
+
import "./chunk-HV4YGVMS.js";
|
|
59
|
+
import "./chunk-722LQO64.js";
|
|
60
|
+
import "./chunk-GMKAXSYQ.js";
|
|
61
|
+
import "./chunk-EPKTIOED.js";
|
|
62
|
+
import "./chunk-2VYRLULP.js";
|
|
63
|
+
import "./chunk-SUJERP5I.js";
|
|
64
|
+
import "./chunk-CI4R6P2B.js";
|
|
65
|
+
import "./chunk-XU2YXCDL.js";
|
|
66
|
+
import "./chunk-ETHFACAB.js";
|
|
67
|
+
import "./chunk-THKDVSEC.js";
|
|
68
|
+
import "./chunk-UFMN76QD.js";
|
|
69
|
+
import "./chunk-EXUE5W2F.js";
|
|
70
|
+
import "./chunk-LH5VCGLB.js";
|
|
71
|
+
import "./chunk-6S5FPUS7.js";
|
|
72
|
+
import "./chunk-EXXICUIW.js";
|
|
73
|
+
import "./chunk-QARAGUXX.js";
|
|
74
|
+
import "./chunk-DEBI37QB.js";
|
|
75
|
+
import "./chunk-ER5JW2QZ.js";
|
|
76
|
+
import "./chunk-CGFZGR7G.js";
|
|
77
|
+
import "./chunk-P5KJURUR.js";
|
|
78
|
+
import "./chunk-WMUWEO2C.js";
|
|
79
|
+
import "./chunk-BKTQAYO2.js";
|
|
80
|
+
import "./chunk-OO3TAHO5.js";
|
|
81
|
+
import "./chunk-EGEI2RQA.js";
|
|
82
|
+
import "./chunk-ZNC5T65N.js";
|
|
83
|
+
import "./chunk-7KUCBNLB.js";
|
|
84
|
+
import "./chunk-A5MNH4ER.js";
|
|
85
|
+
import "./chunk-BCQXEZPJ.js";
|
|
86
|
+
import "./chunk-5GGOGLSN.js";
|
|
87
|
+
export {
|
|
88
|
+
buildModelCards,
|
|
89
|
+
createHeadlessCoordinator
|
|
90
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
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
|
+
init_esm_shims
|
|
5
|
+
} from "./chunk-5GGOGLSN.js";
|
|
6
|
+
|
|
7
|
+
// src/mcp/oauth/inject.ts
|
|
8
|
+
init_esm_shims();
|
|
9
|
+
var PROVIDER_ENV_MAP = {
|
|
10
|
+
github: (t) => ({ GITHUB_PERSONAL_ACCESS_TOKEN: t.accessToken }),
|
|
11
|
+
slack: (t) => ({ SLACK_BOT_TOKEN: t.accessToken }),
|
|
12
|
+
notion: (t) => ({ NOTION_API_KEY: t.accessToken }),
|
|
13
|
+
linear: (t) => ({ LINEAR_API_KEY: t.accessToken })
|
|
14
|
+
};
|
|
15
|
+
function defaultOAuthHeaders(token) {
|
|
16
|
+
return { Authorization: `Bearer ${token.accessToken}` };
|
|
17
|
+
}
|
|
18
|
+
function resolveOAuthEnv(providerId, token) {
|
|
19
|
+
const fn = PROVIDER_ENV_MAP[providerId];
|
|
20
|
+
if (fn) return fn(token);
|
|
21
|
+
return { [`${providerId.toUpperCase()}_API_KEY`]: token.accessToken };
|
|
22
|
+
}
|
|
23
|
+
function resolveOAuthHeaders(providerId, token) {
|
|
24
|
+
return defaultOAuthHeaders(token);
|
|
25
|
+
}
|
|
26
|
+
var PRESET_TO_PROVIDER = {
|
|
27
|
+
github: "github",
|
|
28
|
+
slack: "slack",
|
|
29
|
+
notion: "notion",
|
|
30
|
+
linear: "linear"
|
|
31
|
+
};
|
|
32
|
+
function presetToProvider(presetId) {
|
|
33
|
+
return PRESET_TO_PROVIDER[presetId];
|
|
34
|
+
}
|
|
35
|
+
export {
|
|
36
|
+
presetToProvider,
|
|
37
|
+
resolveOAuthEnv,
|
|
38
|
+
resolveOAuthHeaders
|
|
39
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
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
|
+
createOAuthLoginAuth
|
|
5
|
+
} from "./chunk-GMKAXSYQ.js";
|
|
6
|
+
import "./chunk-EPKTIOED.js";
|
|
7
|
+
import "./chunk-2VYRLULP.js";
|
|
8
|
+
import {
|
|
9
|
+
loadConfig
|
|
10
|
+
} from "./chunk-ER5JW2QZ.js";
|
|
11
|
+
import "./chunk-CGFZGR7G.js";
|
|
12
|
+
import "./chunk-P5KJURUR.js";
|
|
13
|
+
import "./chunk-WMUWEO2C.js";
|
|
14
|
+
import "./chunk-BKTQAYO2.js";
|
|
15
|
+
import "./chunk-OO3TAHO5.js";
|
|
16
|
+
import "./chunk-7KUCBNLB.js";
|
|
17
|
+
import "./chunk-A5MNH4ER.js";
|
|
18
|
+
import "./chunk-BCQXEZPJ.js";
|
|
19
|
+
import {
|
|
20
|
+
init_esm_shims
|
|
21
|
+
} from "./chunk-5GGOGLSN.js";
|
|
22
|
+
|
|
23
|
+
// src/auth/login-flow.ts
|
|
24
|
+
init_esm_shims();
|
|
25
|
+
import { execFile } from "child_process";
|
|
26
|
+
function openInBrowser(url) {
|
|
27
|
+
const [cmd, args] = process.platform === "darwin" ? ["open", [url]] : process.platform === "win32" ? ["cmd", ["/c", "start", "", url]] : ["xdg-open", [url]];
|
|
28
|
+
const child = execFile(cmd, [...args], { windowsHide: true }, () => {
|
|
29
|
+
});
|
|
30
|
+
child.on("error", () => {
|
|
31
|
+
});
|
|
32
|
+
child.unref();
|
|
33
|
+
}
|
|
34
|
+
async function runOAuthLogin(providerName, onUrl) {
|
|
35
|
+
const cfg = loadConfig();
|
|
36
|
+
const provider = cfg.provider.providers[providerName];
|
|
37
|
+
if (!provider) {
|
|
38
|
+
return { ok: false, message: `provider "${providerName}" \u672A\u914D\u7F6E\u2014\u2014\u5148 /connect \u6216 rivet config setup ${providerName} \u6DFB\u52A0` };
|
|
39
|
+
}
|
|
40
|
+
if (provider.auth?.type !== "oauth") {
|
|
41
|
+
return { ok: false, message: `"${providerName}" \u4E0D\u662F OAuth \u578B provider\uFF08API key \u8D70 /connect \u6216 rivet config set-key ${providerName}\uFF09` };
|
|
42
|
+
}
|
|
43
|
+
const auth = createOAuthLoginAuth(provider.auth.provider, onUrl);
|
|
44
|
+
try {
|
|
45
|
+
if (auth.isAuthenticated()) {
|
|
46
|
+
return { ok: true, message: `${providerName} \u5DF2\u767B\u5F55\uFF08token \u4ECD\u6709\u6548\uFF09\uFF0C\u65E0\u9700\u91CD\u590D\u767B\u5F55` };
|
|
47
|
+
}
|
|
48
|
+
await auth.authenticate();
|
|
49
|
+
return { ok: true, message: `${providerName} \u767B\u5F55\u6210\u529F\u2014\u2014token \u5DF2\u843D\u76D8\uFF0C\u5230\u671F\u81EA\u52A8\u7EED\u671F` };
|
|
50
|
+
} catch (err) {
|
|
51
|
+
return { ok: false, message: `\u767B\u5F55\u5931\u8D25\uFF1A${err instanceof Error ? err.message : String(err)}` };
|
|
52
|
+
} finally {
|
|
53
|
+
auth.dispose();
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
export {
|
|
57
|
+
openInBrowser,
|
|
58
|
+
runOAuthLogin
|
|
59
|
+
};
|